@accelint/design-system 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-4CPMP3H7.js +418 -0
- package/dist/chunk-4CPMP3H7.js.map +1 -0
- package/dist/{styles.css → index.css} +885 -779
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +871 -8
- package/dist/index.js +5278 -66
- package/dist/index.js.map +1 -1
- package/dist/vanilla-DUNpoS8t.d.ts +2514 -0
- package/dist/vanilla.d.ts +9 -30
- package/dist/vanilla.js +3 -27
- package/dist/vanilla.js.map +1 -0
- package/package.json +13 -19
- package/dist/assets/components/button/button.css +0 -55
- package/dist/assets/components/checkbox/checkbox.css +0 -73
- package/dist/assets/components/chip/chip.css +0 -62
- package/dist/assets/components/combo-box/combo-box.css +0 -66
- package/dist/assets/components/dialog/dialog.css +0 -51
- package/dist/assets/components/drawer/drawer.css +0 -135
- package/dist/assets/components/group/group.css +0 -33
- package/dist/assets/components/icon/icon.css +0 -19
- package/dist/assets/components/input/input.css +0 -29
- package/dist/assets/components/menu/menu.css +0 -85
- package/dist/assets/components/options/options.css +0 -82
- package/dist/assets/components/picker/picker.css +0 -47
- package/dist/assets/components/popover/popover.css +0 -26
- package/dist/assets/components/query-builder/query-builder.css +0 -129
- package/dist/assets/components/radio/radio.css +0 -67
- package/dist/assets/components/search-field/search-field.css +0 -62
- package/dist/assets/components/select/select.css +0 -33
- package/dist/assets/components/switch/switch.css +0 -62
- package/dist/assets/components/tabs/tabs.css +0 -144
- package/dist/assets/components/textarea/textarea.css +0 -32
- package/dist/assets/components/tooltip/tooltip.css +0 -54
- package/dist/assets/components/tree/tree.css +0 -157
- package/dist/assets/hooks/use-theme/use-theme.css +0 -6
- package/dist/assets/src/components/button/button.css.ts.vanilla-9uttMYGm.css +0 -55
- package/dist/assets/src/components/checkbox/checkbox.css.ts.vanilla-Bewmypyn.css +0 -73
- package/dist/assets/src/components/chip/chip.css.ts.vanilla-CsGhxrlu.css +0 -62
- package/dist/assets/src/components/combo-box/combo-box.css.ts.vanilla-BNEPKjPm.css +0 -66
- package/dist/assets/src/components/dialog/dialog.css.ts.vanilla-CG0m-NJD.css +0 -51
- package/dist/assets/src/components/drawer/drawer.css.ts.vanilla-DEfHnoNS.css +0 -135
- package/dist/assets/src/components/group/group.css.ts.vanilla-DR69xgQy.css +0 -33
- package/dist/assets/src/components/icon/icon.css.ts.vanilla-CoUAfp2F.css +0 -19
- package/dist/assets/src/components/input/input.css.ts.vanilla-DoK5h9SX.css +0 -29
- package/dist/assets/src/components/menu/menu.css.ts.vanilla-LoWLg-jE.css +0 -85
- package/dist/assets/src/components/options/options.css.ts.vanilla-CWWFBTou.css +0 -82
- package/dist/assets/src/components/picker/picker.css.ts.vanilla-Fe0YXv-c.css +0 -47
- package/dist/assets/src/components/popover/popover.css.ts.vanilla-C5YGwwVD.css +0 -26
- package/dist/assets/src/components/query-builder/query-builder.css.ts.vanilla-B3P9cbCv.css +0 -129
- package/dist/assets/src/components/radio/radio.css.ts.vanilla-gi-KedQc.css +0 -67
- package/dist/assets/src/components/search-field/search-field.css.ts.vanilla-B_JL53f8.css +0 -62
- package/dist/assets/src/components/select/select.css.ts.vanilla-C94A60jf.css +0 -33
- package/dist/assets/src/components/switch/switch.css.ts.vanilla-DkQwtRa6.css +0 -62
- package/dist/assets/src/components/tabs/tabs.css.ts.vanilla-BygIflpl.css +0 -144
- package/dist/assets/src/components/textarea/textarea.css.ts.vanilla-Ba6E5HFc.css +0 -32
- package/dist/assets/src/components/tooltip/tooltip.css.ts.vanilla-BntxAlwN.css +0 -54
- package/dist/assets/src/components/tree/tree.css.ts.vanilla-SLmhk0zZ.css +0 -157
- package/dist/assets/src/hooks/use-theme/use-theme.css.ts.vanilla-zkVHnGkP.css +0 -6
- package/dist/assets/src/styles/layers.css.ts.vanilla-B2GUgnOF.css +0 -21
- package/dist/assets/src/styles/reset.css.ts.vanilla-C8PShXm0.css +0 -31
- package/dist/assets/src/styles/space.css.ts.vanilla-Md6Whc4G.css +0 -18
- package/dist/assets/src/styles/surfaces.css.ts.vanilla-Ckztx7VT.css +0 -24
- package/dist/assets/src/styles/theme.css.ts.vanilla-aDPSIzBK.css +0 -208
- package/dist/assets/src/styles/typography.css.ts.vanilla-DRT9H7rd.css +0 -150
- package/dist/assets/styles/layers.css +0 -21
- package/dist/assets/styles/reset.css +0 -31
- package/dist/assets/styles/space.css +0 -18
- package/dist/assets/styles/surfaces.css +0 -24
- package/dist/assets/styles/theme.css +0 -208
- package/dist/assets/styles/typography.css +0 -150
- package/dist/components/aria/aria.d.ts +0 -19
- package/dist/components/aria/aria.js +0 -36
- package/dist/components/aria/aria.js.map +0 -1
- package/dist/components/aria/index.d.ts +0 -1
- package/dist/components/button/button.css.d.ts +0 -33
- package/dist/components/button/button.d.ts +0 -39
- package/dist/components/button/button.js +0 -71
- package/dist/components/button/button.js.map +0 -1
- package/dist/components/button/button.vanilla.js +0 -8
- package/dist/components/button/button.vanilla.js.map +0 -1
- package/dist/components/button/index.d.ts +0 -3
- package/dist/components/button/types.d.ts +0 -28
- package/dist/components/checkbox/checkbox.css.d.ts +0 -35
- package/dist/components/checkbox/checkbox.d.ts +0 -21
- package/dist/components/checkbox/checkbox.js +0 -68
- package/dist/components/checkbox/checkbox.js.map +0 -1
- package/dist/components/checkbox/checkbox.vanilla.js +0 -9
- package/dist/components/checkbox/checkbox.vanilla.js.map +0 -1
- package/dist/components/checkbox/index.d.ts +0 -3
- package/dist/components/checkbox/types.d.ts +0 -38
- package/dist/components/chip/chip.css.d.ts +0 -31
- package/dist/components/chip/chip.d.ts +0 -30
- package/dist/components/chip/chip.js +0 -106
- package/dist/components/chip/chip.js.map +0 -1
- package/dist/components/chip/chip.vanilla.js +0 -8
- package/dist/components/chip/chip.vanilla.js.map +0 -1
- package/dist/components/chip/index.d.ts +0 -3
- package/dist/components/chip/types.d.ts +0 -31
- package/dist/components/collection/collection.d.ts +0 -13
- package/dist/components/collection/collection.js +0 -15
- package/dist/components/collection/collection.js.map +0 -1
- package/dist/components/collection/index.d.ts +0 -1
- package/dist/components/combo-box/combo-box.css.d.ts +0 -22
- package/dist/components/combo-box/combo-box.d.ts +0 -8
- package/dist/components/combo-box/combo-box.js +0 -87
- package/dist/components/combo-box/combo-box.js.map +0 -1
- package/dist/components/combo-box/combo-box.vanilla.js +0 -8
- package/dist/components/combo-box/combo-box.vanilla.js.map +0 -1
- package/dist/components/combo-box/index.d.ts +0 -3
- package/dist/components/combo-box/types.d.ts +0 -32
- package/dist/components/dialog/dialog.css.d.ts +0 -34
- package/dist/components/dialog/dialog.d.ts +0 -18
- package/dist/components/dialog/dialog.js +0 -146
- package/dist/components/dialog/dialog.js.map +0 -1
- package/dist/components/dialog/dialog.vanilla.js +0 -8
- package/dist/components/dialog/dialog.vanilla.js.map +0 -1
- package/dist/components/dialog/index.d.ts +0 -3
- package/dist/components/dialog/types.d.ts +0 -48
- package/dist/components/drawer/drawer.css.d.ts +0 -33
- package/dist/components/drawer/drawer.d.ts +0 -13
- package/dist/components/drawer/drawer.js +0 -199
- package/dist/components/drawer/drawer.js.map +0 -1
- package/dist/components/drawer/drawer.vanilla.js +0 -10
- package/dist/components/drawer/drawer.vanilla.js.map +0 -1
- package/dist/components/drawer/index.d.ts +0 -3
- package/dist/components/drawer/types.d.ts +0 -71
- package/dist/components/element/element.d.ts +0 -11
- package/dist/components/element/element.js +0 -21
- package/dist/components/element/element.js.map +0 -1
- package/dist/components/element/index.d.ts +0 -2
- package/dist/components/element/types.d.ts +0 -21
- package/dist/components/group/group.css.d.ts +0 -14
- package/dist/components/group/group.d.ts +0 -10
- package/dist/components/group/group.js +0 -44
- package/dist/components/group/group.js.map +0 -1
- package/dist/components/group/group.vanilla.js +0 -7
- package/dist/components/group/group.vanilla.js.map +0 -1
- package/dist/components/group/index.d.ts +0 -3
- package/dist/components/group/types.d.ts +0 -35
- package/dist/components/icon/icon.css.d.ts +0 -18
- package/dist/components/icon/icon.d.ts +0 -12
- package/dist/components/icon/icon.js +0 -26
- package/dist/components/icon/icon.js.map +0 -1
- package/dist/components/icon/icon.vanilla.js +0 -8
- package/dist/components/icon/icon.vanilla.js.map +0 -1
- package/dist/components/icon/index.d.ts +0 -3
- package/dist/components/icon/types.d.ts +0 -13
- package/dist/components/index.d.ts +0 -26
- package/dist/components/input/index.d.ts +0 -3
- package/dist/components/input/input.css.d.ts +0 -29
- package/dist/components/input/input.d.ts +0 -8
- package/dist/components/input/input.js +0 -93
- package/dist/components/input/input.js.map +0 -1
- package/dist/components/input/input.vanilla.js +0 -8
- package/dist/components/input/input.vanilla.js.map +0 -1
- package/dist/components/input/types.d.ts +0 -44
- package/dist/components/menu/index.d.ts +0 -3
- package/dist/components/menu/menu.css.d.ts +0 -75
- package/dist/components/menu/menu.d.ts +0 -24
- package/dist/components/menu/menu.js +0 -155
- package/dist/components/menu/menu.js.map +0 -1
- package/dist/components/menu/menu.vanilla.js +0 -8
- package/dist/components/menu/menu.vanilla.js.map +0 -1
- package/dist/components/menu/types.d.ts +0 -48
- package/dist/components/merge-provider/index.d.ts +0 -2
- package/dist/components/merge-provider/merge-provider.d.ts +0 -14
- package/dist/components/merge-provider/merge-provider.js +0 -40
- package/dist/components/merge-provider/merge-provider.js.map +0 -1
- package/dist/components/merge-provider/types.d.ts +0 -5
- package/dist/components/options/index.d.ts +0 -3
- package/dist/components/options/options.css.d.ts +0 -79
- package/dist/components/options/options.d.ts +0 -20
- package/dist/components/options/options.js +0 -152
- package/dist/components/options/options.js.map +0 -1
- package/dist/components/options/options.vanilla.js +0 -10
- package/dist/components/options/options.vanilla.js.map +0 -1
- package/dist/components/options/types.d.ts +0 -49
- package/dist/components/picker/index.d.ts +0 -3
- package/dist/components/picker/picker.css.d.ts +0 -32
- package/dist/components/picker/picker.d.ts +0 -18
- package/dist/components/picker/picker.js +0 -46
- package/dist/components/picker/picker.js.map +0 -1
- package/dist/components/picker/picker.stories.css.d.ts +0 -3
- package/dist/components/picker/picker.vanilla.js +0 -9
- package/dist/components/picker/picker.vanilla.js.map +0 -1
- package/dist/components/picker/types.d.ts +0 -28
- package/dist/components/popover/index.d.ts +0 -3
- package/dist/components/popover/popover.css.d.ts +0 -31
- package/dist/components/popover/popover.d.ts +0 -8
- package/dist/components/popover/popover.js +0 -110
- package/dist/components/popover/popover.js.map +0 -1
- package/dist/components/popover/popover.vanilla.js +0 -7
- package/dist/components/popover/popover.vanilla.js.map +0 -1
- package/dist/components/popover/types.d.ts +0 -32
- package/dist/components/query-builder/action-element.d.ts +0 -2
- package/dist/components/query-builder/action-element.js +0 -12
- package/dist/components/query-builder/action-element.js.map +0 -1
- package/dist/components/query-builder/constants.d.ts +0 -4
- package/dist/components/query-builder/constants.js +0 -20
- package/dist/components/query-builder/constants.js.map +0 -1
- package/dist/components/query-builder/dataset-sample.d.ts +0 -91
- package/dist/components/query-builder/group.d.ts +0 -5
- package/dist/components/query-builder/group.js +0 -87
- package/dist/components/query-builder/group.js.map +0 -1
- package/dist/components/query-builder/index.d.ts +0 -5
- package/dist/components/query-builder/query-builder.css.d.ts +0 -91
- package/dist/components/query-builder/query-builder.d.ts +0 -2
- package/dist/components/query-builder/query-builder.js +0 -129
- package/dist/components/query-builder/query-builder.js.map +0 -1
- package/dist/components/query-builder/query-builder.vanilla.js +0 -10
- package/dist/components/query-builder/query-builder.vanilla.js.map +0 -1
- package/dist/components/query-builder/rule.d.ts +0 -3
- package/dist/components/query-builder/rule.js +0 -112
- package/dist/components/query-builder/rule.js.map +0 -1
- package/dist/components/query-builder/types.d.ts +0 -128
- package/dist/components/query-builder/utils.d.ts +0 -29
- package/dist/components/query-builder/utils.js +0 -22
- package/dist/components/query-builder/utils.js.map +0 -1
- package/dist/components/query-builder/value-editor.d.ts +0 -4
- package/dist/components/query-builder/value-editor.js +0 -74
- package/dist/components/query-builder/value-editor.js.map +0 -1
- package/dist/components/query-builder/value-selector.d.ts +0 -2
- package/dist/components/query-builder/value-selector.js +0 -28
- package/dist/components/query-builder/value-selector.js.map +0 -1
- package/dist/components/radio/index.d.ts +0 -3
- package/dist/components/radio/radio.css.d.ts +0 -34
- package/dist/components/radio/radio.d.ts +0 -16
- package/dist/components/radio/radio.js +0 -63
- package/dist/components/radio/radio.js.map +0 -1
- package/dist/components/radio/radio.vanilla.js +0 -8
- package/dist/components/radio/radio.vanilla.js.map +0 -1
- package/dist/components/radio/types.d.ts +0 -29
- package/dist/components/search-field/index.d.ts +0 -3
- package/dist/components/search-field/search-field.css.d.ts +0 -16
- package/dist/components/search-field/search-field.d.ts +0 -9
- package/dist/components/search-field/search-field.js +0 -60
- package/dist/components/search-field/search-field.js.map +0 -1
- package/dist/components/search-field/search-field.vanilla.js +0 -7
- package/dist/components/search-field/search-field.vanilla.js.map +0 -1
- package/dist/components/search-field/types.d.ts +0 -29
- package/dist/components/select/index.d.ts +0 -3
- package/dist/components/select/select.css.d.ts +0 -25
- package/dist/components/select/select.d.ts +0 -8
- package/dist/components/select/select.js +0 -80
- package/dist/components/select/select.js.map +0 -1
- package/dist/components/select/select.vanilla.js +0 -8
- package/dist/components/select/select.vanilla.js.map +0 -1
- package/dist/components/select/types.d.ts +0 -30
- package/dist/components/switch/index.d.ts +0 -3
- package/dist/components/switch/switch.css.d.ts +0 -25
- package/dist/components/switch/switch.d.ts +0 -4
- package/dist/components/switch/switch.js +0 -34
- package/dist/components/switch/switch.js.map +0 -1
- package/dist/components/switch/switch.vanilla.js +0 -8
- package/dist/components/switch/switch.vanilla.js.map +0 -1
- package/dist/components/switch/types.d.ts +0 -17
- package/dist/components/tabs/index.d.ts +0 -3
- package/dist/components/tabs/tabs.css.d.ts +0 -49
- package/dist/components/tabs/tabs.d.ts +0 -68
- package/dist/components/tabs/tabs.js +0 -108
- package/dist/components/tabs/tabs.js.map +0 -1
- package/dist/components/tabs/tabs.vanilla.js +0 -11
- package/dist/components/tabs/tabs.vanilla.js.map +0 -1
- package/dist/components/tabs/types.d.ts +0 -82
- package/dist/components/textarea/index.d.ts +0 -3
- package/dist/components/textarea/textarea.css.d.ts +0 -31
- package/dist/components/textarea/textarea.d.ts +0 -14
- package/dist/components/textarea/textarea.js +0 -86
- package/dist/components/textarea/textarea.js.map +0 -1
- package/dist/components/textarea/textarea.vanilla.js +0 -8
- package/dist/components/textarea/textarea.vanilla.js.map +0 -1
- package/dist/components/textarea/types.d.ts +0 -39
- package/dist/components/tooltip/index.d.ts +0 -3
- package/dist/components/tooltip/tooltip.css.d.ts +0 -23
- package/dist/components/tooltip/tooltip.d.ts +0 -23
- package/dist/components/tooltip/tooltip.js +0 -69
- package/dist/components/tooltip/tooltip.js.map +0 -1
- package/dist/components/tooltip/tooltip.vanilla.js +0 -8
- package/dist/components/tooltip/tooltip.vanilla.js.map +0 -1
- package/dist/components/tooltip/types.d.ts +0 -39
- package/dist/components/tree/index.d.ts +0 -3
- package/dist/components/tree/tree.css.d.ts +0 -73
- package/dist/components/tree/tree.d.ts +0 -5
- package/dist/components/tree/tree.js +0 -337
- package/dist/components/tree/tree.js.map +0 -1
- package/dist/components/tree/tree.vanilla.js +0 -11
- package/dist/components/tree/tree.vanilla.js.map +0 -1
- package/dist/components/tree/types.d.ts +0 -114
- package/dist/components/tree/utils.d.ts +0 -8
- package/dist/components/tree/utils.js +0 -75
- package/dist/components/tree/utils.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -8
- package/dist/hooks/use-collection-render/index.d.ts +0 -1
- package/dist/hooks/use-collection-render/use-collection-render.d.ts +0 -9
- package/dist/hooks/use-collection-render/use-collection-render.js +0 -20
- package/dist/hooks/use-collection-render/use-collection-render.js.map +0 -1
- package/dist/hooks/use-context-props/index.d.ts +0 -1
- package/dist/hooks/use-context-props/use-context-props.d.ts +0 -7
- package/dist/hooks/use-context-props/use-context-props.js +0 -15
- package/dist/hooks/use-context-props/use-context-props.js.map +0 -1
- package/dist/hooks/use-defaults/index.d.ts +0 -2
- package/dist/hooks/use-defaults/types.d.ts +0 -67
- package/dist/hooks/use-defaults/use-defaults.d.ts +0 -56
- package/dist/hooks/use-defaults/use-defaults.js +0 -21
- package/dist/hooks/use-defaults/use-defaults.js.map +0 -1
- package/dist/hooks/use-propagating-press/index.d.ts +0 -1
- package/dist/hooks/use-propagating-press/use-propagating-press.d.ts +0 -9
- package/dist/hooks/use-propagating-press/use-propagating-press.js +0 -14
- package/dist/hooks/use-propagating-press/use-propagating-press.js.map +0 -1
- package/dist/hooks/use-slot/index.d.ts +0 -1
- package/dist/hooks/use-slot/use-slot.d.ts +0 -13
- package/dist/hooks/use-slot/use-slot.js +0 -18
- package/dist/hooks/use-slot/use-slot.js.map +0 -1
- package/dist/hooks/use-theme/index.d.ts +0 -2
- package/dist/hooks/use-theme/types.d.ts +0 -86
- package/dist/hooks/use-theme/use-theme.css.d.ts +0 -1
- package/dist/hooks/use-theme/use-theme.d.ts +0 -13
- package/dist/hooks/use-theme/use-theme.js +0 -64
- package/dist/hooks/use-theme/use-theme.js.map +0 -1
- package/dist/hooks/use-theme/use-theme.vanilla.js +0 -4
- package/dist/hooks/use-theme/use-theme.vanilla.js.map +0 -1
- package/dist/hooks/use-tree/index.d.ts +0 -1
- package/dist/hooks/use-tree/use-tree.d.ts +0 -2
- package/dist/hooks/use-tree/use-tree.js +0 -217
- package/dist/hooks/use-tree/use-tree.js.map +0 -1
- package/dist/hooks/use-tree/utils.d.ts +0 -6
- package/dist/hooks/use-tree/utils.js +0 -77
- package/dist/hooks/use-tree/utils.js.map +0 -1
- package/dist/hooks/use-update-effect/index.d.ts +0 -1
- package/dist/hooks/use-update-effect/use-update-effect.d.ts +0 -1
- package/dist/hooks/use-update-effect/use-update-effect.js +0 -20
- package/dist/hooks/use-update-effect/use-update-effect.js.map +0 -1
- package/dist/ladle/actions.d.ts +0 -1
- package/dist/ladle/index.d.ts +0 -1
- package/dist/styles/index.d.ts +0 -6
- package/dist/styles/layers.css.d.ts +0 -16
- package/dist/styles/layers.vanilla.js +0 -4
- package/dist/styles/layers.vanilla.js.map +0 -1
- package/dist/styles/reset.css.d.ts +0 -1
- package/dist/styles/space.css.d.ts +0 -1
- package/dist/styles/surfaces.css.d.ts +0 -4
- package/dist/styles/surfaces.vanilla.js +0 -4
- package/dist/styles/surfaces.vanilla.js.map +0 -1
- package/dist/styles/theme.css.d.ts +0 -334
- package/dist/styles/theme.vanilla.js +0 -31
- package/dist/styles/theme.vanilla.js.map +0 -1
- package/dist/styles/typography.css.d.ts +0 -17
- package/dist/styles/typography.vanilla.js +0 -8
- package/dist/styles/typography.vanilla.js.map +0 -1
- package/dist/test/setup.d.ts +0 -1
- package/dist/types/deckgl.d.ts +0 -1
- package/dist/types/generic.d.ts +0 -3
- package/dist/types/index.d.ts +0 -6
- package/dist/types/props.d.ts +0 -4
- package/dist/types/react-aria.d.ts +0 -91
- package/dist/types/use-tree.d.ts +0 -52
- package/dist/types/vanilla-extract.d.ts +0 -15
- package/dist/utils/css.d.ts +0 -139
- package/dist/utils/css.js +0 -145
- package/dist/utils/css.js.map +0 -1
- package/dist/utils/events.d.ts +0 -10
- package/dist/utils/events.js +0 -5
- package/dist/utils/events.js.map +0 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/props.d.ts +0 -29
- package/dist/utils/props.js +0 -108
- package/dist/utils/props.js.map +0 -1
- package/dist/utils/validators.d.ts +0 -49
- package/dist/utils/validators.js +0 -37
- package/dist/utils/validators.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sources":["../../../src/components/drawer/drawer.tsx"],"sourcesContent":["import { toBoolean } from '@accelint/converters';\nimport { useIsSSR } from '@react-aria/ssr';\nimport { noop } from 'lodash';\nimport {\n type ForwardedRef,\n type HTMLAttributes,\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useMemo,\n useRef,\n} from 'react';\nimport { useFocusWithin, useOverlay, type PressEvent } from 'react-aria';\nimport {\n DEFAULT_SLOT,\n Provider,\n type ContextValue,\n} from 'react-aria-components';\nimport { useOverlayTriggerState } from 'react-stately';\nimport {\n useContextProps,\n useDefaultProps,\n useSlot,\n useTheme,\n} from '../../hooks';\nimport { headings } from '../../styles';\nimport {\n callRenderProps,\n inlineVars,\n mergeClassNames,\n mergeProps,\n} from '../../utils';\nimport { AriaHeadingContext } from '../aria';\nimport { ButtonContext, type ButtonProps } from '../button';\nimport { ElementContext, type ElementProps } from '../element';\nimport { Tab, TabList, Tabs, type TabRenderProps } from '../tabs';\nimport {\n TooltipContext,\n TooltipTargetContext,\n type TooltipProps,\n type TooltipTargetProps,\n} from '../tooltip';\nimport {\n drawerClassNames,\n drawerDialogStateVars,\n drawerStateVars,\n} from './drawer.css';\nimport type {\n DrawerContextValue,\n DrawerDialogProps,\n DrawerMapping,\n DrawerProps,\n DrawerTabListProps,\n DrawerTabProps,\n} from './types';\n\nconst DrawerContext = createContext<DrawerContextValue>({\n anchor: 'right',\n layoutShift: false,\n isOpen: false,\n close: noop,\n open: noop,\n setOpen: noop,\n toggle: noop,\n});\n\nexport function Drawer(props: DrawerProps) {\n props = useDefaultProps(props, 'Drawer');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n anchor = 'right',\n defaultOpen = false,\n layoutShift = false,\n shouldCloseOnBlur = false,\n isDismissable = true,\n isKeyboardDismissDisabled = false,\n isOpen: isOpenProp,\n onOpenChange,\n } = props;\n\n const theme = useTheme();\n const isSSR = useIsSSR();\n\n const classNames = useMemo(\n () => mergeClassNames(drawerClassNames, theme.Drawer, classNamesProp),\n [theme.Drawer, classNamesProp],\n );\n\n // Remove focus when Drawer closes\n const handleOpenChange = useCallback(\n (isOpen: boolean) => {\n if (!isOpen) {\n const focused = isSSR ? null : document.activeElement;\n\n if (\n focused &&\n 'blur' in focused &&\n typeof focused.blur === 'function'\n ) {\n focused.blur();\n }\n }\n\n onOpenChange?.(isOpen);\n },\n [isSSR, onOpenChange],\n );\n\n const state = useOverlayTriggerState({\n defaultOpen,\n isOpen: isOpenProp,\n onOpenChange: handleOpenChange,\n });\n\n const { isOpen, close, open } = state;\n const ref = useRef<HTMLDivElement>(null);\n\n const { overlayProps } = useOverlay(\n {\n isOpen,\n shouldCloseOnBlur,\n isDismissable,\n isKeyboardDismissDisabled,\n onClose: close,\n },\n ref,\n );\n\n // TODO: it may be desirable to disallow focus within the closed Drawer instead\n // If focus forces the Drawer open\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: open,\n });\n\n const context = useMemo(\n () => ({ ...state, anchor, layoutShift }),\n [state, anchor, layoutShift],\n );\n\n const values = useMemo<\n [\n [typeof DrawerContext, DrawerContextValue],\n [\n typeof DrawerDialogContext,\n ContextValue<DrawerDialogProps, HTMLDivElement>,\n ],\n ]\n >(\n () => [\n [DrawerContext, context],\n [DrawerDialogContext, { classNames }],\n ],\n [context, classNames],\n );\n\n const style = useMemo(\n () =>\n inlineVars(drawerStateVars, {\n anchor,\n layoutShift,\n isOpen,\n }),\n [anchor, layoutShift, isOpen],\n );\n\n const children = useMemo(\n () => callRenderProps(childrenProp, state),\n [childrenProp, state],\n );\n\n return (\n <Provider values={values}>\n <div\n {...mergeProps(overlayProps, focusWithinProps)}\n ref={ref}\n className={classNames?.container}\n style={style}\n >\n <Tabs classNames={classNames?.tabs}>{children}</Tabs>\n </div>\n </Provider>\n );\n}\n\nexport function DrawerTabList<T extends object>(props: DrawerTabListProps<T>) {\n props = useDefaultProps(props, 'DrawerTabList');\n\n const { children, classNames: classNamesProp, variant = 'fill' } = props;\n const { anchor } = useContext(DrawerContext);\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(drawerClassNames, theme.Drawer, classNamesProp),\n [theme.Drawer, classNamesProp],\n );\n\n const values = useMemo<\n [\n [typeof TooltipContext, ContextValue<TooltipProps, HTMLDivElement>],\n [\n typeof TooltipTargetContext,\n ContextValue<TooltipTargetProps, HTMLDivElement>,\n ],\n ]\n >(\n () => [\n [TooltipContext, { placement: anchor === 'left' ? 'right' : 'left' }],\n [TooltipTargetContext, { focusable: false, relative: 'parent' }],\n ],\n [anchor],\n );\n\n return (\n <Provider values={values}>\n <TabList<T>\n classNames={classNames?.tabs}\n align='center'\n anchor={anchor === 'left' ? 'start' : 'end'}\n orientation='vertical'\n variant={variant}\n >\n {children}\n </TabList>\n </Provider>\n );\n}\n\nexport function DrawerTab(props: DrawerTabProps) {\n props = useDefaultProps(props, 'DrawerTab');\n\n const { children: childrenProp, classNames: classNamesProp, ...rest } = props;\n const { isOpen, open, toggle } = useContext(DrawerContext);\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(drawerClassNames, theme.Drawer, classNamesProp),\n [theme.Drawer, classNamesProp],\n );\n\n // Must bind to press start (instead of later press events) due to Tab changing selected state on start\n const handlePressStart = useCallback(\n (event: PressEvent) => {\n const { selected } = event.target.parentElement?.dataset ?? {};\n\n if (toBoolean(selected)) {\n toggle();\n } else {\n open();\n }\n },\n [open, toggle],\n );\n\n const children = useCallback(\n (renderProps: TabRenderProps) =>\n callRenderProps(childrenProp, { ...renderProps, isOpen }),\n [childrenProp, isOpen],\n );\n\n return (\n <Tab\n {...rest}\n classNames={classNames?.tabs}\n onPressStart={handlePressStart}\n >\n {children}\n </Tab>\n );\n}\n\nconst defaultMapping: DrawerMapping = {\n heading: {\n child: headings.v4,\n parent: headings.v3,\n },\n back: {\n variant: 'icon',\n },\n close: {\n variant: 'icon',\n },\n};\n\nexport const DrawerDialogContext =\n createContext<ContextValue<DrawerDialogProps, HTMLDivElement>>(null);\n\nexport const DrawerDialog = forwardRef(function DrawerDialog(\n props: DrawerDialogProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, DrawerDialogContext);\n\n const {\n children,\n classNames: classNamesProp,\n mapping: mappingProp,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...rest\n } = props;\n\n const { close } = useContext(DrawerContext);\n const [backRef, hasBack] = useSlot();\n const [titleRef, hasTitle] = useSlot();\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({ ...defaultMapping, ...mappingProp }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(drawerClassNames, theme.Drawer, classNamesProp, {\n header: {\n title: hasBack ? mapping.heading.child : mapping.heading.parent,\n },\n }),\n [theme.Drawer, classNamesProp, hasBack, mapping],\n );\n\n const style = useMemo(\n () =>\n inlineVars(drawerDialogStateVars, {\n isChild: !!hasBack,\n }),\n [hasBack],\n );\n\n const values = useMemo<\n [\n [\n typeof ElementContext,\n ContextValue<\n ElementProps<\n ContextValue<ButtonProps, HTMLButtonElement>,\n ContextValue<HTMLAttributes<HTMLElement>, HTMLHeadingElement>\n >,\n HTMLElement\n >,\n ],\n ]\n >(\n () => [\n [\n ElementContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n header: {\n as: 'header',\n className: classNames?.header?.header,\n values: [\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n back: {\n ...mapping.back,\n ref: backRef,\n classNames: classNames?.header?.back,\n },\n close: {\n ...mapping.close,\n classNames: classNames?.header?.close,\n onPress: close,\n },\n },\n },\n ],\n [\n AriaHeadingContext,\n {\n slots: {\n title: {\n ref: titleRef,\n className: classNames?.header?.title,\n },\n },\n },\n ],\n ],\n },\n content: { className: classNames?.content },\n footer: { as: 'footer', className: classNames?.footer },\n },\n },\n ],\n ],\n [\n classNames?.header?.header,\n classNames?.header?.back,\n classNames?.header?.close,\n classNames?.header?.title,\n classNames?.content,\n classNames?.footer,\n backRef,\n close,\n mapping,\n titleRef,\n ],\n );\n\n // biome-ignore lint/complexity/useSimplifiedLogicExpression: intentional\n if (!ariaLabel && !ariaLabelledBy && !hasTitle) {\n console.warn(\n 'If a Drawer does not contain a <Heading slot=\"title\">, it must have an aria-label or aria-labelledby attribute for accessibility.',\n );\n }\n\n return (\n <Provider values={values}>\n <div\n {...rest}\n className={classNames?.dialog?.container}\n style={style}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n <div className={classNames?.dialog?.dialog}>{children}</div>\n </div>\n </Provider>\n );\n});\n"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,MACZ,OAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,KACF;AAAA,GACF,CAAA;AAGA,EAAA,IAAI,CAAC,SAAA,IAAa,CAAC,cAAA,IAAkB,CAAC,QAAU,EAAA;AAC9C,IAAQ,OAAA,CAAA,IAAA;AAAA,MACN,mIAAA;AAAA,KACF,CAAA;AAAA,GACF;AAEA,EACE,uBAAA,GAAA,CAAC,YAAS,MACR,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,SAAA,EAAW,YAAY,MAAQ,EAAA,SAAA;AAAA,MAC/B,KAAA;AAAA,MACA,YAAY,EAAA,SAAA;AAAA,MACZ,iBAAiB,EAAA,cAAA;AAAA,MAEjB,8BAAC,KAAI,EAAA,EAAA,SAAA,EAAW,UAAY,EAAA,MAAA,EAAQ,QAAS,QAAS,EAAA,CAAA;AAAA,KAAA;AAAA,GAE1D,EAAA,CAAA,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
var drawerAnimationVars = { delay: "var(--delay__3hvldb1)", duration: "var(--duration__3hvldb2)", easing: "var(--easing__3hvldb3)" };
|
|
3
|
-
var drawerClassNames = { container: "drawer_drawerClassNames_container__3hvldbh", tabs: { tabs: "drawer_drawerClassNames_tabs_tabs__3hvldbi", list: { list: "drawer_drawerClassNames_tabs_list_list__3hvldbj surfaces_proud__15mw6jf1 surfaces_flush__15mw6jf0" } }, dialog: { container: "drawer_drawerClassNames_dialog_container__3hvldbk", dialog: "drawer_drawerClassNames_dialog_dialog__3hvldbl surfaces_proud__15mw6jf1 surfaces_flush__15mw6jf0" }, header: { header: "drawer_drawerClassNames_header_header__3hvldbm", back: { container: "drawer_drawerClassNames_header_back_container__3hvldbn" }, title: "drawer_drawerClassNames_header_title__3hvldbo", close: { container: "drawer_drawerClassNames_header_close_container__3hvldbp" } }, content: "drawer_drawerClassNames_content__3hvldbq", footer: "drawer_drawerClassNames_footer__3hvldbr" };
|
|
4
|
-
var drawerColorVars = { background: "var(--background__3hvldb4)", color: "var(--color__3hvldb5)" };
|
|
5
|
-
var drawerContainer = "drawer_drawerContainer__3hvldb0";
|
|
6
|
-
var drawerDialogStateVars = { isChild: "var(--isChild__3hvldbg)" };
|
|
7
|
-
var drawerSpaceVars = { drawer: { width: "var(--drawer-width__3hvldb6)", gap: "var(--drawer-gap__3hvldb7)", x: "var(--drawer-x__3hvldb8)", y: "var(--drawer-y__3hvldb9)" }, list: { top: "var(--list-top__3hvldba)", translateY: "var(--list-translateY__3hvldbb)" } };
|
|
8
|
-
var drawerStateVars = { anchor: "var(--anchor__3hvldbc)", layoutShift: "var(--layoutShift__3hvldbd)", isChild: "var(--isChild__3hvldbe)", isOpen: "var(--isOpen__3hvldbf)" };
|
|
9
|
-
|
|
10
|
-
export { drawerAnimationVars, drawerClassNames, drawerColorVars, drawerContainer, drawerDialogStateVars, drawerSpaceVars, drawerStateVars };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Drawer, DrawerDialog, DrawerTab, DrawerTabList } from './drawer';
|
|
2
|
-
export { drawerAnimationVars, drawerClassNames, drawerColorVars, drawerContainer, drawerDialogStateVars, drawerSpaceVars, drawerStateVars, } from './drawer.css';
|
|
3
|
-
export { type DrawerAnchor, type DrawerClassNames, type DrawerDialogProps, type DrawerDialogState, type DrawerMapping, type DrawerProps, type DrawerRenderProps, type DrawerState, type DrawerTabListProps, type DrawerTabProps, type DrawerTabRenderProps, } from './types';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { AriaLabelingProps as RACLabelingProps } from '@react-types/shared';
|
|
2
|
-
import type { PropsWithChildren } from 'react';
|
|
3
|
-
import type { AriaOverlayProps as RACOverlayProps } from 'react-aria';
|
|
4
|
-
import type { OverlayTriggerProps, OverlayTriggerState } from 'react-stately';
|
|
5
|
-
import type { PartialDeep } from 'type-fest';
|
|
6
|
-
import type { OmitProtectedProps, RenderPropsChildren } from '../../types';
|
|
7
|
-
import type { ButtonClassNames, ButtonProps } from '../button/types';
|
|
8
|
-
import type { TabListProps, TabProps, TabRenderProps, TabsClassNames, TabsProps } from '../tabs/types';
|
|
9
|
-
export type DrawerClassNames = PartialDeep<{
|
|
10
|
-
container: string;
|
|
11
|
-
tabs: TabsClassNames;
|
|
12
|
-
dialog: {
|
|
13
|
-
container: string;
|
|
14
|
-
dialog: string;
|
|
15
|
-
};
|
|
16
|
-
header: {
|
|
17
|
-
header: string;
|
|
18
|
-
back: ButtonClassNames;
|
|
19
|
-
title: string;
|
|
20
|
-
close: ButtonClassNames;
|
|
21
|
-
};
|
|
22
|
-
content: string;
|
|
23
|
-
footer: string;
|
|
24
|
-
}>;
|
|
25
|
-
export type DrawerAnchor = 'left' | 'right';
|
|
26
|
-
export type DrawerMapping = {
|
|
27
|
-
heading: {
|
|
28
|
-
child: string;
|
|
29
|
-
parent: string;
|
|
30
|
-
};
|
|
31
|
-
back: Partial<OmitProtectedProps<ButtonProps>>;
|
|
32
|
-
close: Partial<OmitProtectedProps<ButtonProps>>;
|
|
33
|
-
};
|
|
34
|
-
export type DrawerRenderProps = OverlayTriggerState;
|
|
35
|
-
export type DrawerTabRenderProps = TabRenderProps & {
|
|
36
|
-
isOpen: boolean;
|
|
37
|
-
};
|
|
38
|
-
type BaseProps = {
|
|
39
|
-
classNames?: DrawerClassNames;
|
|
40
|
-
};
|
|
41
|
-
export type BaseDrawerProps = Pick<RACOverlayProps, 'shouldCloseOnBlur' | 'isDismissable' | 'isKeyboardDismissDisabled'> & {
|
|
42
|
-
children?: RenderPropsChildren<DrawerRenderProps>;
|
|
43
|
-
/**
|
|
44
|
-
* Which side of the viewport to originate from
|
|
45
|
-
*/
|
|
46
|
-
anchor?: DrawerAnchor;
|
|
47
|
-
/**
|
|
48
|
-
* If true will push sibling DOM around, else act as an independent overlay
|
|
49
|
-
*
|
|
50
|
-
* NOTE: Layout shift animations are less performant
|
|
51
|
-
*/
|
|
52
|
-
layoutShift?: boolean;
|
|
53
|
-
};
|
|
54
|
-
export type BaseDrawerTabProps = {
|
|
55
|
-
children?: RenderPropsChildren<DrawerTabRenderProps>;
|
|
56
|
-
};
|
|
57
|
-
export type DrawerState = Pick<DrawerRenderProps, 'isOpen'> & Required<Pick<BaseDrawerProps, 'anchor' | 'layoutShift'>>;
|
|
58
|
-
export type DrawerDialogState = {
|
|
59
|
-
/**
|
|
60
|
-
* If back button is present
|
|
61
|
-
*/
|
|
62
|
-
isChild: boolean;
|
|
63
|
-
};
|
|
64
|
-
export type DrawerContextValue = DrawerRenderProps & Required<Pick<BaseDrawerProps, 'anchor' | 'layoutShift'>>;
|
|
65
|
-
export type DrawerProps = OverlayTriggerProps & Omit<TabsProps, 'children' | 'classNames' | 'orientation'> & BaseProps & BaseDrawerProps;
|
|
66
|
-
export type DrawerTabListProps<T> = Omit<TabListProps<T>, 'classNames' | 'align' | 'anchor' | 'orientation'> & BaseProps;
|
|
67
|
-
export type DrawerTabProps = Omit<TabProps, 'children'> & BaseDrawerTabProps & BaseProps;
|
|
68
|
-
export type DrawerDialogProps = PropsWithChildren<RACLabelingProps & BaseProps & {
|
|
69
|
-
mapping?: DrawerMapping;
|
|
70
|
-
}>;
|
|
71
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ContextValue } from 'react-aria-components';
|
|
2
|
-
import type { ElementProps } from './types';
|
|
3
|
-
export declare const ElementContext: import("react").Context<ContextValue<ElementProps<any, any, any, any, any, any, any, any, any, any, any>, HTMLElement>>;
|
|
4
|
-
/**
|
|
5
|
-
* This generic component serves as any easy way for more complex components
|
|
6
|
-
* to establish stylable content areas within their layout with optional
|
|
7
|
-
* targetted contexts for any subcomponents
|
|
8
|
-
*
|
|
9
|
-
* See Dialog & Drawer as examples
|
|
10
|
-
*/
|
|
11
|
-
export declare const Element: <A, B, C, D, E, F, G, H, I, J, K>(props: ElementProps<A, B, C, D, E, F, G, H, I, J, K> & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement | null;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, forwardRef } from 'react';
|
|
3
|
-
import { Provider } from 'react-aria-components';
|
|
4
|
-
import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
|
|
5
|
-
import { MergeProvider } from '../merge-provider/merge-provider.js';
|
|
6
|
-
|
|
7
|
-
const ElementContext = createContext(null);
|
|
8
|
-
const Element = forwardRef(function Element2(props, ref) {
|
|
9
|
-
[props, ref] = useContextProps(props, ref, ElementContext);
|
|
10
|
-
const { as: El = "div", values, mergeValues, ...rest } = props;
|
|
11
|
-
let children = jsx(El, { ...rest, ref });
|
|
12
|
-
if (mergeValues) {
|
|
13
|
-
children = jsx(MergeProvider, { values: mergeValues, children });
|
|
14
|
-
}
|
|
15
|
-
if (values) {
|
|
16
|
-
children = jsx(Provider, { values, children });
|
|
17
|
-
}
|
|
18
|
-
return children;
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export { Element, ElementContext };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sources":["../../../src/components/element/element.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { createContext, forwardRef, type ForwardedRef } from 'react';\nimport { type ContextValue, Provider } from 'react-aria-components';\nimport { useContextProps } from '../../hooks';\nimport { MergeProvider } from '../merge-provider';\nimport type { ElementProps } from './types';\n\nexport const ElementContext =\n createContext<\n ContextValue<\n ElementProps<any, any, any, any, any, any, any, any, any, any, any>,\n HTMLElement\n >\n >(null);\n\n/**\n * This generic component serves as any easy way for more complex components\n * to establish stylable content areas within their layout with optional\n * targetted contexts for any subcomponents\n *\n * See Dialog & Drawer as examples\n */\nexport const Element = forwardRef(function Element<\n A,\n B,\n C,\n D,\n E,\n F,\n G,\n H,\n I,\n J,\n K,\n>(\n props: ElementProps<A, B, C, D, E, F, G, H, I, J, K>,\n ref: ForwardedRef<HTMLElement>,\n) {\n [props, ref] = useContextProps(props, ref, ElementContext);\n\n const { as: El = 'div', values, mergeValues, ...rest } = props;\n\n // @ts-expect-error Can't narrow props type to match element or ref, making this less dynamic runs into union complexity and performance issues\n let children = <El {...rest} ref={ref} />;\n\n if (mergeValues) {\n children = <MergeProvider values={mergeValues}>{children}</MergeProvider>;\n }\n\n if (values) {\n children = <Provider values={values}>{children}</Provider>;\n }\n\n return children;\n});\n"],"names":["Element"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOa,MAAA,cAAA,GACX,cAKE,IAAI,EAAA;AASD,MAAM,OAAU,GAAA,UAAA,CAAW,SAASA,QAAAA,CAazC,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,cAAc,CAAA,CAAA;AAEzD,EAAM,MAAA,EAAE,IAAI,EAAK,GAAA,KAAA,EAAO,QAAQ,WAAa,EAAA,GAAG,MAAS,GAAA,KAAA,CAAA;AAGzD,EAAA,IAAI,QAAW,mBAAA,GAAA,CAAC,EAAI,EAAA,EAAA,GAAG,MAAM,GAAU,EAAA,CAAA,CAAA;AAEvC,EAAA,IAAI,WAAa,EAAA;AACf,IAAA,QAAA,mBAAY,GAAA,CAAA,aAAA,EAAA,EAAc,MAAQ,EAAA,WAAA,EAAc,QAAS,EAAA,CAAA,CAAA;AAAA,GAC3D;AAEA,EAAA,IAAI,MAAQ,EAAA;AACV,IAAW,QAAA,mBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,MAAA,EAAiB,QAAS,EAAA,CAAA,CAAA;AAAA,GACjD;AAEA,EAAO,OAAA,QAAA,CAAA;AACT,CAAC;;;;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ReactHTML, JSX } from 'react';
|
|
2
|
-
import type { SlotProps } from 'react-aria-components';
|
|
3
|
-
import type { ProviderValues } from '../../types';
|
|
4
|
-
export type ElementProps<A = any, B = any, C = any, D = any, E = any, F = any, G = any, H = any, I = any, J = any, K = any> = /**
|
|
5
|
-
* Initially tried to make these props generic and constrain props to element
|
|
6
|
-
* passed into generic, but ran into major performance issues with enormous
|
|
7
|
-
* type unions of all possible HTML elements props. It breaks all of TS
|
|
8
|
-
*/ JSX.IntrinsicElements[keyof ReactHTML] & SlotProps & {
|
|
9
|
-
/**
|
|
10
|
-
* The HTML element to be rendered
|
|
11
|
-
*/
|
|
12
|
-
as?: keyof ReactHTML;
|
|
13
|
-
/**
|
|
14
|
-
* Values passed to Provider, overrides parent contexts
|
|
15
|
-
*/
|
|
16
|
-
values?: ProviderValues<A, B, C, D, E, F, G, H, I, J, K>;
|
|
17
|
-
/**
|
|
18
|
-
* Values passed to MergeProvider, merges with parent contexts
|
|
19
|
-
*/
|
|
20
|
-
mergeValues?: ProviderValues<A, B, C, D, E, F, G, H, I, J, K>;
|
|
21
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { GroupClassNames } from './types';
|
|
2
|
-
export declare const groupContainer: string;
|
|
3
|
-
export declare const groupSpaceVars: {
|
|
4
|
-
gap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
5
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
6
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
7
|
-
};
|
|
8
|
-
export declare const groupStateVars: {
|
|
9
|
-
count: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
10
|
-
orientation: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
-
reverse: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
|
-
type: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
13
|
-
};
|
|
14
|
-
export declare const groupClassNames: GroupClassNames;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
2
|
-
import type { ContextValue } from 'react-aria-components';
|
|
3
|
-
import type { GroupProps } from './types';
|
|
4
|
-
export declare const GroupContext: import("react").Context<ContextValue<GroupProps<any, Element>, HTMLDivElement>>;
|
|
5
|
-
/**
|
|
6
|
-
* This generic component allows for collective prop distribution to a collection of components of the same type
|
|
7
|
-
*
|
|
8
|
-
* @example A list of <Button />s and you want to control their size instead of passing the same props to each
|
|
9
|
-
*/
|
|
10
|
-
export declare const Group: <T, E extends Element>(props: import("./types").BaseGroupProps<T, E> & import("react-aria-components").SlotProps & import("react").RefAttributes<HTMLDivElement>) => ReactElement | null;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, forwardRef, useMemo, Children } from 'react';
|
|
3
|
-
import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
|
|
4
|
-
import { inlineVars } from '../../utils/css.js';
|
|
5
|
-
import { mergeClassNames } from '../../utils/props.js';
|
|
6
|
-
import { useTheme } from '../../hooks/use-theme/use-theme.js';
|
|
7
|
-
import { MergeProvider } from '../merge-provider/merge-provider.js';
|
|
8
|
-
import { groupClassNames, groupStateVars } from './group.vanilla.js';
|
|
9
|
-
|
|
10
|
-
const GroupContext = (
|
|
11
|
-
// Unforunately, using "unknown" or "object" here creates complex type issues with <Provider />
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
-
createContext(null)
|
|
14
|
-
);
|
|
15
|
-
const Group = forwardRef(function Group2(props, ref) {
|
|
16
|
-
[props, ref] = useContextProps(props, ref, GroupContext);
|
|
17
|
-
const { children: childrenProp, classNames: classNamesProp, context, orientation = "horizontal", reverse = false, values: valuesProp } = props;
|
|
18
|
-
const theme = useTheme();
|
|
19
|
-
const classNames = useMemo(() => mergeClassNames(groupClassNames, theme.Group, classNamesProp), [theme.Group, classNamesProp]);
|
|
20
|
-
const style = useMemo(() => {
|
|
21
|
-
const types = Children.toArray(childrenProp).reduce((acc, child) => {
|
|
22
|
-
if (child && typeof child !== "boolean" && typeof child !== "number" && typeof child !== "string") {
|
|
23
|
-
const type2 = child.type;
|
|
24
|
-
const name = typeof type2 !== "string" ? type2.render?.name : type2;
|
|
25
|
-
if (name) {
|
|
26
|
-
acc.add(name);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return acc;
|
|
30
|
-
}, /* @__PURE__ */ new Set());
|
|
31
|
-
const type = { 0: "Empty", 1: [...types].at(0) }[types.size] ?? "Mixed";
|
|
32
|
-
return inlineVars(groupStateVars, {
|
|
33
|
-
count: Children.count(childrenProp),
|
|
34
|
-
orientation,
|
|
35
|
-
reverse,
|
|
36
|
-
type
|
|
37
|
-
});
|
|
38
|
-
}, [childrenProp, orientation, reverse]);
|
|
39
|
-
const values = useMemo(() => [[context, valuesProp]], [context, valuesProp]);
|
|
40
|
-
const children = useMemo(() => jsx("div", { ref, className: classNames?.container, style, children: jsx("div", { className: classNames?.group, children: childrenProp }) }), [ref, classNames?.container, classNames?.group, style, childrenProp]);
|
|
41
|
-
return context && valuesProp ? jsx(MergeProvider, { values, children }) : children;
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export { Group, GroupContext };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group.js","sources":["../../../src/components/group/group.tsx"],"sourcesContent":["import {\n Children,\n createContext,\n forwardRef,\n useMemo,\n type ForwardedRef,\n type ReactElement,\n} from 'react';\nimport type { ContextValue } from 'react-aria-components';\nimport { useContextProps, useTheme } from '../../hooks';\nimport { inlineVars, mergeClassNames } from '../../utils';\nimport { MergeProvider } from '../merge-provider';\nimport { groupClassNames, groupStateVars } from './group.css';\nimport type { GroupProps } from './types';\n\nexport const GroupContext =\n // Unforunately, using \"unknown\" or \"object\" here creates complex type issues with <Provider />\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n createContext<ContextValue<GroupProps<any, Element>, HTMLDivElement>>(null);\n\n/**\n * This generic component allows for collective prop distribution to a collection of components of the same type\n *\n * @example A list of <Button />s and you want to control their size instead of passing the same props to each\n */\nexport const Group = forwardRef(function Group<T, E extends Element>(\n props: GroupProps<T, E>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, GroupContext);\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n context,\n orientation = 'horizontal',\n reverse = false,\n values: valuesProp,\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(groupClassNames, theme.Group, classNamesProp),\n [theme.Group, classNamesProp],\n );\n\n const style = useMemo(() => {\n const types = Children.toArray(childrenProp).reduce<Set<string>>(\n (acc, child) => {\n if (\n child &&\n typeof child !== 'boolean' &&\n typeof child !== 'number' &&\n typeof child !== 'string'\n ) {\n const type = (child as ReactElement).type;\n // @ts-expect-error TS doesn't know about \"render\" type\n const name = typeof type !== 'string' ? type.render?.name : type;\n\n if (name) {\n acc.add(name);\n }\n }\n\n return acc;\n },\n new Set<string>(),\n );\n\n const type = { 0: 'Empty', 1: [...types].at(0) }[types.size] ?? 'Mixed';\n\n return inlineVars(groupStateVars, {\n count: Children.count(childrenProp),\n orientation,\n reverse,\n type,\n });\n }, [childrenProp, orientation, reverse]);\n\n const values = useMemo<\n [[Exclude<typeof context, undefined>, ContextValue<T, E>]]\n >(() => [[context!, valuesProp]], [context, valuesProp]);\n\n const children = useMemo(\n () => (\n <div ref={ref} className={classNames?.container} style={style}>\n <div className={classNames?.group}>{childrenProp}</div>\n </div>\n ),\n [ref, classNames?.container, classNames?.group, style, childrenProp],\n );\n\n return context && valuesProp ? (\n <MergeProvider values={values}>{children}</MergeProvider>\n ) : (\n children\n );\n});\n"],"names":["Group","type"],"mappings":";;;;;;;;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
|
|
3
|
-
var groupContainer = "group_groupContainer__eq8x6h0";
|
|
4
|
-
var groupSpaceVars = { gap: "var(--gap__eq8x6h1)", x: "var(--x__eq8x6h2)", y: "var(--y__eq8x6h3)" };
|
|
5
|
-
var groupStateVars = { count: "var(--count__eq8x6h4)", orientation: "var(--orientation__eq8x6h5)", reverse: "var(--reverse__eq8x6h6)", type: "var(--type__eq8x6h7)" };
|
|
6
|
-
|
|
7
|
-
export { groupClassNames, groupContainer, groupSpaceVars, groupStateVars };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Context, ReactElement } from 'react';
|
|
2
|
-
import type { Orientation } from 'react-aria';
|
|
3
|
-
import type { ContextValue, SlotProps } from 'react-aria-components';
|
|
4
|
-
export type GroupClassNames = Partial<{
|
|
5
|
-
container: string;
|
|
6
|
-
group: string;
|
|
7
|
-
}>;
|
|
8
|
-
export type BaseGroupProps<T, E extends Element> = {
|
|
9
|
-
children?: (ReactElement | boolean | null)[];
|
|
10
|
-
classNames?: GroupClassNames;
|
|
11
|
-
context?: Context<ContextValue<T, E>>;
|
|
12
|
-
orientation?: Orientation;
|
|
13
|
-
reverse?: boolean;
|
|
14
|
-
values?: ContextValue<T, E>;
|
|
15
|
-
};
|
|
16
|
-
export type GroupState = {
|
|
17
|
-
/**
|
|
18
|
-
* The number of children rendered
|
|
19
|
-
*/
|
|
20
|
-
count: number;
|
|
21
|
-
orientation: Orientation;
|
|
22
|
-
/**
|
|
23
|
-
* Whether to flip the order of the children, visually
|
|
24
|
-
*/
|
|
25
|
-
reverse: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* This is based off of the children types
|
|
28
|
-
*
|
|
29
|
-
* Possible values: Empty, Mixed, {component type}
|
|
30
|
-
*
|
|
31
|
-
* @example If all children are <Button />, then "type" will be `Button`
|
|
32
|
-
*/
|
|
33
|
-
type: string;
|
|
34
|
-
};
|
|
35
|
-
export type GroupProps<T, E extends Element> = BaseGroupProps<T, E> & SlotProps;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { IconClassNames } from './types';
|
|
2
|
-
export declare const iconContainer: string;
|
|
3
|
-
export declare const iconColorVars: {
|
|
4
|
-
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
5
|
-
fill: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
6
|
-
stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
7
|
-
};
|
|
8
|
-
export declare const iconSpaceVars: {
|
|
9
|
-
width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
10
|
-
height: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
-
};
|
|
12
|
-
export declare const iconStateVars: {
|
|
13
|
-
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
14
|
-
fill: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
15
|
-
size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
-
stroke: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
17
|
-
};
|
|
18
|
-
export declare const iconClassNames: IconClassNames;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ContextValue } from 'react-aria-components';
|
|
2
|
-
import type { IconProps } from './types';
|
|
3
|
-
export declare const IconContext: import("react").Context<ContextValue<IconProps, HTMLDivElement>>;
|
|
4
|
-
export declare const Icon: (props: Pick<import("react").CSSProperties, "fill" | "color" | "stroke"> & {
|
|
5
|
-
classNames?: Partial<{
|
|
6
|
-
container: string;
|
|
7
|
-
icon: string;
|
|
8
|
-
}> | undefined;
|
|
9
|
-
size?: import("./types").IconSizes;
|
|
10
|
-
} & import("react-aria-components").SlotProps & {
|
|
11
|
-
children?: import("react").ReactNode | undefined;
|
|
12
|
-
} & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, forwardRef, useMemo } from 'react';
|
|
3
|
-
import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
|
|
4
|
-
import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
|
|
5
|
-
import { inlineVars } from '../../utils/css.js';
|
|
6
|
-
import { mergeClassNames } from '../../utils/props.js';
|
|
7
|
-
import { useTheme } from '../../hooks/use-theme/use-theme.js';
|
|
8
|
-
import { iconClassNames, iconStateVars } from './icon.vanilla.js';
|
|
9
|
-
|
|
10
|
-
const IconContext = createContext(null);
|
|
11
|
-
const Icon = forwardRef(function Icon2(props, ref) {
|
|
12
|
-
[props, ref] = useContextProps(props, ref, IconContext);
|
|
13
|
-
props = useDefaultProps(props, "Icon");
|
|
14
|
-
const { children, classNames: classNamesProp, color, fill, size = "relative", stroke } = props;
|
|
15
|
-
const theme = useTheme();
|
|
16
|
-
const classNames = useMemo(() => mergeClassNames(iconClassNames, theme.Icon, classNamesProp), [theme.Icon, classNamesProp]);
|
|
17
|
-
const style = useMemo(() => inlineVars(iconStateVars, {
|
|
18
|
-
color,
|
|
19
|
-
fill,
|
|
20
|
-
size,
|
|
21
|
-
stroke
|
|
22
|
-
}), [color, fill, size, stroke]);
|
|
23
|
-
return jsx("div", { ref, className: classNames?.container, style, children: jsx("div", { className: classNames?.icon, children }) });
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export { Icon, IconContext };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../src/components/icon/icon.tsx"],"sourcesContent":["import { type ForwardedRef, createContext, forwardRef, useMemo } from 'react';\nimport type { ContextValue } from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { inlineVars, mergeClassNames } from '../../utils';\nimport { iconClassNames, iconStateVars } from './icon.css';\nimport type { IconProps } from './types';\n\nexport const IconContext =\n createContext<ContextValue<IconProps, HTMLDivElement>>(null);\n\nexport const Icon = forwardRef(function Icon(\n props: IconProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, IconContext);\n\n props = useDefaultProps(props, 'Icon');\n\n const {\n children,\n classNames: classNamesProp,\n color,\n fill,\n size = 'relative',\n stroke,\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(iconClassNames, theme.Icon, classNamesProp),\n [theme.Icon, classNamesProp],\n );\n\n const style = useMemo(\n () =>\n inlineVars(iconStateVars, {\n color,\n fill,\n size,\n stroke,\n }),\n [color, fill, size, stroke],\n );\n\n return (\n <div ref={ref} className={classNames?.container} style={style}>\n <div className={classNames?.icon}>{children}</div>\n </div>\n );\n});\n"],"names":["Icon"],"mappings":";;;;;;;;;;;;;;;AAOa,MAAA,WAAA,GACX,cAAuD,IAAI,EAAA;AAEtD,MAAM,IAAO,GAAA,UAAA,CAAW,SAASA,KAAAA,CACtC,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,WAAW,CAAA,CAAA;AAEtD,EAAQ,KAAA,GAAA,eAAA,CAAgB,OAAO,MAAM,CAAA,CAAA;AAErC,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,UAAY,EAAA,cAAA;AAAA,IACZ,KAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAO,GAAA,UAAA;AAAA,IACP,MAAA;AAAA,GACE,GAAA,KAAA,CAAA;AAEJ,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAA,MAAM,UAAa,GAAA,OAAA;AAAA,IACjB,MAAM,eAAA,CAAgB,cAAgB,EAAA,KAAA,CAAM,MAAM,cAAc,CAAA;AAAA,IAChE,CAAC,KAAM,CAAA,IAAA,EAAM,cAAc,CAAA;AAAA,GAC7B,CAAA;AAEA,EAAA,MAAM,KAAQ,GAAA,OAAA;AAAA,IACZ,MACE,WAAW,aAAe,EAAA;AAAA,MACxB,KAAA;AAAA,MACA,IAAA;AAAA,MACA,IAAA;AAAA,MACA,MAAA;AAAA,KACD,CAAA;AAAA,IACH,CAAC,KAAA,EAAO,IAAM,EAAA,IAAA,EAAM,MAAM,CAAA;AAAA,GAC5B,CAAA;AAEA,EAAA,uBACG,GAAA,CAAA,KAAA,EAAA,EAAI,GAAU,EAAA,SAAA,EAAW,UAAY,EAAA,SAAA,EAAW,KAC/C,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,UAAY,EAAA,IAAA,EAAO,UAAS,CAC9C,EAAA,CAAA,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
var iconClassNames = { container: "icon_iconClassNames_container__oeqjzpa", icon: "icon_iconClassNames_icon__oeqjzpb" };
|
|
3
|
-
var iconColorVars = { color: "var(--color__oeqjzp1)", fill: "var(--fill__oeqjzp2)", stroke: "var(--stroke__oeqjzp3)" };
|
|
4
|
-
var iconContainer = "icon_iconContainer__oeqjzp0";
|
|
5
|
-
var iconSpaceVars = { width: "var(--width__oeqjzp4)", height: "var(--height__oeqjzp5)" };
|
|
6
|
-
var iconStateVars = { color: "var(--color__oeqjzp6)", fill: "var(--fill__oeqjzp7)", size: "var(--size__oeqjzp8)", stroke: "var(--stroke__oeqjzp9)" };
|
|
7
|
-
|
|
8
|
-
export { iconClassNames, iconColorVars, iconContainer, iconSpaceVars, iconStateVars };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties, PropsWithChildren } from 'react';
|
|
2
|
-
import type { SlotProps } from 'react-aria-components';
|
|
3
|
-
export type IconClassNames = Partial<{
|
|
4
|
-
container: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
}>;
|
|
7
|
-
export type IconSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'relative';
|
|
8
|
-
export type BaseIconProps = Pick<CSSProperties, 'color' | 'fill' | 'stroke'> & {
|
|
9
|
-
classNames?: IconClassNames;
|
|
10
|
-
size?: IconSizes;
|
|
11
|
-
};
|
|
12
|
-
export type IconState = Required<Omit<BaseIconProps, 'classNames'>>;
|
|
13
|
-
export type IconProps = PropsWithChildren<BaseIconProps & SlotProps>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export { AriaFieldError, AriaFieldErrorContext, AriaGroup, AriaGroupContext, AriaHeader, AriaHeaderContext, AriaHeading, AriaHeadingContext, AriaKeyboard, AriaKeyboardContext, AriaLabel, AriaLabelContext, AriaSection, AriaSectionContext, AriaSelectValue, AriaSelectValueContext, AriaSeparator, AriaSeparatorContext, AriaText, AriaTextContext, } from './aria';
|
|
2
|
-
export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext, buttonClassNames, buttonColorVars, buttonContainer, buttonSpaceVars, buttonStateVars, type ButtonClassNames, type ButtonColors, type ButtonMapping, type ButtonProps, type ButtonRenderProps, type ButtonSizes, type ButtonState, type LinkButtonProps, type ToggleButtonProps, } from './button';
|
|
3
|
-
export { Checkbox, CheckboxContext, CheckboxGroup, CheckboxGroupContext, checkboxClassNames, checkboxColorVars, checkboxContainer, checkboxGroupStateVars, checkboxSpaceVars, checkboxStateVars, type CheckboxAlignment, type CheckboxClassNames, type CheckboxGroupProps, type CheckboxGroupRenderProps, type CheckboxGroupState, type CheckboxProps, type CheckboxRenderProps, type CheckboxState, } from './checkbox';
|
|
4
|
-
export { Chip, ChipContext, ChipGroup, ChipGroupContext, ChipItem, ChipList, chipClassNames, chipColorVars, chipContainer, chipSpaceVars, chipStateVars, type ChipClassNames, type ChipColors, type ChipGroupProps, type ChipItemProps, type ChipListProps, type ChipMapping, type ChipProps, type ChipRenderProps, type ChipSizes, type ChipState, } from './chip';
|
|
5
|
-
export { createCollectionRenderer } from './collection';
|
|
6
|
-
export { ComboBox, ComboBoxContext, comboBoxClassNames, comboBoxColorVars, comboBoxContainer, comboBoxSpaceVars, comboBoxStateVars, type ComboBoxClassNames, type ComboBoxMapping, type ComboBoxProps, type ComboBoxRenderProps, type ComboBoxSizes, type ComboBoxState, } from './combo-box';
|
|
7
|
-
export { Dialog, DialogContext, dialogClassNames, dialogColorVars, dialogContainer, dialogSpaceVars, dialogStateVars, type DialogClassNames, type DialogMapping, type DialogProps, type DialogRenderProps, type DialogSizes, type DialogState, } from './dialog';
|
|
8
|
-
export { Drawer, DrawerDialog, DrawerTab, DrawerTabList, drawerAnimationVars, drawerClassNames, drawerColorVars, drawerContainer, drawerDialogStateVars, drawerSpaceVars, drawerStateVars, type DrawerAnchor, type DrawerClassNames, type DrawerDialogProps, type DrawerDialogState, type DrawerMapping, type DrawerProps, type DrawerRenderProps, type DrawerState, type DrawerTabListProps, type DrawerTabProps, type DrawerTabRenderProps, } from './drawer';
|
|
9
|
-
export { Element, ElementContext, type ElementProps } from './element';
|
|
10
|
-
export { Group, GroupContext, groupClassNames, groupContainer, groupSpaceVars, groupStateVars, type GroupClassNames, type GroupProps, type GroupState, } from './group';
|
|
11
|
-
export { Icon, IconContext, iconClassNames, iconColorVars, iconContainer, iconSpaceVars, iconStateVars, type IconClassNames, type IconProps, type IconSizes, type IconState, } from './icon';
|
|
12
|
-
export { Input, InputContext, inputClassNames, inputColorVars, inputContainer, inputSpaceVars, inputStateVars, type InputClassNames, type InputMapping, type InputProps, type InputRenderProps, type InputState, type InputType, } from './input';
|
|
13
|
-
export { Menu, MenuContext, MenuItem, MenuItemContext, MenuList, MenuListContext, menuColorVars, menuItemStateVars, menuSpaceVars, menuStateVars, type MenuClassNames, type MenuItemProps, type MenuItemRenderProps, type MenuItemState, type MenuListProps, type MenuMapping, type MenuProps, type MenuSizes, type MenuState, } from './menu';
|
|
14
|
-
export { MergeProvider, type MergeProviderProps } from './merge-provider';
|
|
15
|
-
export { Options, OptionsContext, OptionsItem, OptionsItemContext, OptionsList, OptionsListContext, optionsClassNames, optionsColorVars, optionsContainers, optionsItemStateVars, optionsListStateVars, optionsSpaceVars, optionsStateVars, type OptionsClassNames, type OptionsItemProps, type OptionsItemState, type OptionsListProps, type OptionsListState, type OptionsMapping, type OptionsProps, type OptionsSizes, type OptionsState, } from './options';
|
|
16
|
-
export { Picker, PickerContext, PickerItem, PickerItemContext, pickerClassNames, pickerContainers, pickerItemColorVars, pickerItemStateVars, pickerSpaceVars, pickerStateVars, type PickerClassNames, type PickerItemProps, type PickerItemRenderProps, type PickerItemState, type PickerProps, type PickerState, } from './picker';
|
|
17
|
-
export { Popover, PopoverContext, popoverClassNames, popoverColorVars, popoverSpaceVars, popoverStateVars, type PopoverClassNames, type PopoverProps, type PopoverState, } from './popover';
|
|
18
|
-
export { pressToMouseEvent, QueryBuilder, QueryBuilderContext, type QueryBuilderClassNames, type QueryBuilderContextValue, type QueryBuilderGroupState, type QueryBuilderMapping, type QueryBuilderProps, type QueryBuilderRuleState, type QueryBuilderSizes, type QueryBuilderState, type QueryBuilderValueEditors, queryBuilderClassNames, queryBuilderColorVars, queryBuilderContainers, queryBuilderGroupStateVars, queryBuilderRuleStateVars, queryBuilderSpaceVars, queryBuilderStateVars, } from './query-builder';
|
|
19
|
-
export { Radio, RadioContext, RadioGroup, RadioGroupContext, radioClassNames, radioColorVars, radioGroupStateVars, radioSpaceVars, radioStateVars, type RadioAlignment, type RadioClassNames, type RadioGroupProps, type RadioGroupState, type RadioProps, type RadioState, } from './radio';
|
|
20
|
-
export { SearchField, SearchFieldContext, searchFieldClassNames, searchFieldContainer, searchFieldSpaceVars, searchFieldStateVars, type SearchFieldClassNames, type SearchFieldMapping, type SearchFieldProps, type SearchFieldRenderProps, type SearchFieldState, } from './search-field';
|
|
21
|
-
export { Select, SelectContext, selectClassNames, selectColorVars, selectContainer, selectSpaceVars, selectStateVars, type SelectClassNames, type SelectMapping, type SelectProps, type SelectRenderProps, type SelectState, } from './select';
|
|
22
|
-
export { Switch, SwitchContext, switchClassNames, switchColorVars, switchContainer, switchSpaceVars, switchStateVars, type SwitchAlignment, type SwitchClassNames, type SwitchProps, type SwitchRenderProps, type SwitchState, } from './switch';
|
|
23
|
-
export { Tab, TabContext, TabList, TabListContext, TabPanel, TabPanelContext, TabPanels, TabPanelsContext, Tabs, TabsContext, tabColorVars, tabListStateVars, tabPanelStateVars, tabPanelsStateVars, tabSpaceVars, tabStateVars, tabsClassNames, tabsContainers, type TabListAlignment, type TabListAnchor, type TabListProps, type TabListState, type TabListVariants, type TabPanelProps, type TabPanelRenderProps, type TabPanelState, type TabPanelsProps, type TabPanelsState, type TabProps, type TabRenderProps, type TabState, type TabsClassNames, type TabsProps, } from './tabs';
|
|
24
|
-
export { TextArea, TextAreaContext, textAreaClassNames, textAreaColorVars, textAreaContainer, textAreaSpaceVars, textAreaStateVars, type TextAreaClassNames, type TextAreaProps, type TextAreaRenderProps, type TextAreaState, } from './textarea';
|
|
25
|
-
export { Tooltip, TooltipContext, TooltipTarget, TooltipTargetContext, tooltipClassNames, tooltipContainers, tooltipSpaceVars, tooltipStateVars, tooltipTargetStateVars, type TooltipClassNames, type TooltipMapping, type TooltipProps, type TooltipRenderProps, type TooltipState, type TooltipTargetProps, type TooltipTargetState, } from './tooltip';
|
|
26
|
-
export { Tree, TreeGroup, TreeItem, TreeStateContext, treeClassNames, treeColorVars, treeContainers, treeGroupStateVars, treeIndicatorStateVars, treeItemStateVars, treeSpaceVars, treeStateVars, type TreeClassNames, type TreeGroupProps, type TreeGroupRenderProps, type TreeGroupState, type TreeIndicatorRenderProps, type TreeIndicatorState, type TreeItemProps, type TreeItemRenderProps, type TreeItemState, type TreeMapping, type TreeProps, type TreeRenderProps, type TreeSizes, type TreeState, type TreeStateContextValue, } from './tree';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Input, InputContext } from './input';
|
|
2
|
-
export { inputClassNames, inputContainer, inputColorVars, inputSpaceVars, inputStateVars, } from './input.css';
|
|
3
|
-
export { type InputClassNames, type InputMapping, type InputProps, type InputRenderProps, type InputState, type InputSize, type InputType, } from './types';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { InputClassNames } from './types';
|
|
2
|
-
export declare const inputContainer: string;
|
|
3
|
-
export declare const inputColorVars: {
|
|
4
|
-
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
5
|
-
border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
6
|
-
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
7
|
-
};
|
|
8
|
-
export declare const inputSpaceVars: {
|
|
9
|
-
minWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
10
|
-
width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
-
maxWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
13
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
14
|
-
};
|
|
15
|
-
export declare const inputStateVars: {
|
|
16
|
-
length: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
17
|
-
size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
18
|
-
type: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
19
|
-
isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
20
|
-
isEmpty: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
-
isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
22
|
-
isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
23
|
-
isHovered: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
24
|
-
isInvalid: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
-
isPlaceholder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
26
|
-
isReadOnly: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
-
isRequired: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
-
};
|
|
29
|
-
export declare const inputClassNames: InputClassNames;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ContextValue, type InputProps as RACInputProps } from 'react-aria-components';
|
|
2
|
-
import type { InputProps } from './types';
|
|
3
|
-
export declare const InputContext: import("react").Context<ContextValue<InputProps, HTMLInputElement>>;
|
|
4
|
-
/**
|
|
5
|
-
* Only intended for generic text-like inputs, see types in props for list
|
|
6
|
-
* Other more specific inputs should be handled by other components
|
|
7
|
-
*/
|
|
8
|
-
export declare const Input: (props: Omit<RACInputProps, "children" | "className" | "style" | "size" | "type"> & import("./types").BaseInputProps & import("react").RefAttributes<HTMLInputElement>) => import("react").ReactElement | null;
|