@accelint/design-system 0.2.1 → 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} +1163 -1057
- 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 +10 -13
- 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,79 +0,0 @@
|
|
|
1
|
-
import type { OptionsClassNames } from './types';
|
|
2
|
-
export declare const optionsContainers: {
|
|
3
|
-
options: string;
|
|
4
|
-
list: string;
|
|
5
|
-
item: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const optionsStateVars: {
|
|
8
|
-
size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
9
|
-
isEntering: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
10
|
-
isExiting: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
-
placement: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
|
-
};
|
|
13
|
-
export declare const optionsListStateVars: {
|
|
14
|
-
size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
15
|
-
isEmpty: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
-
isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
17
|
-
isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
18
|
-
};
|
|
19
|
-
export declare const optionsItemStateVars: {
|
|
20
|
-
selectionBehavior: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
-
selectionMode: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
22
|
-
size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
23
|
-
hasDescription: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
24
|
-
isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
-
isHovered: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
26
|
-
isPressed: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
-
isSelected: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
-
isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
-
isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
30
|
-
};
|
|
31
|
-
export declare const optionsColorVars: {
|
|
32
|
-
list: {
|
|
33
|
-
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
34
|
-
border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
35
|
-
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
36
|
-
};
|
|
37
|
-
header: {
|
|
38
|
-
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
39
|
-
border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
40
|
-
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
41
|
-
};
|
|
42
|
-
separator: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
43
|
-
item: {
|
|
44
|
-
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
45
|
-
border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
46
|
-
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
47
|
-
};
|
|
48
|
-
label: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
49
|
-
description: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
50
|
-
};
|
|
51
|
-
export declare const optionsSpaceVars: {
|
|
52
|
-
options: {
|
|
53
|
-
minWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
54
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
55
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
56
|
-
};
|
|
57
|
-
list: {
|
|
58
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
59
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
60
|
-
};
|
|
61
|
-
section: {
|
|
62
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
63
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
64
|
-
};
|
|
65
|
-
header: {
|
|
66
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
67
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
68
|
-
};
|
|
69
|
-
separator: {
|
|
70
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
71
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
72
|
-
};
|
|
73
|
-
item: {
|
|
74
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
75
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
76
|
-
gap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
export declare const optionsClassNames: OptionsClassNames;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type ContextValue } from 'react-aria-components';
|
|
2
|
-
import type { OptionsItemProps, OptionsListProps, OptionsMapping, OptionsProps } from './types';
|
|
3
|
-
export declare const OptionsContext: import("react").Context<ContextValue<OptionsProps, HTMLElement>>;
|
|
4
|
-
export declare const Options: (props: Omit<import("react-aria-components").PopoverProps, "className" | "style"> & {
|
|
5
|
-
classNames?: import("./types").OptionsClassNames;
|
|
6
|
-
mapping?: Partial<OptionsMapping>;
|
|
7
|
-
size?: import("./types").OptionsSizes;
|
|
8
|
-
} & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement | null;
|
|
9
|
-
export declare const OptionsListContext: import("react").Context<ContextValue<OptionsListProps<object>, HTMLDivElement>>;
|
|
10
|
-
export declare const OptionsList: <T extends object>(props: Omit<import("react-aria-components").ListBoxProps<T>, "className" | "style" | "orientation" | "dragAndDropHooks"> & {
|
|
11
|
-
classNames?: import("./types").OptionsClassNames;
|
|
12
|
-
mapping?: Partial<OptionsMapping>;
|
|
13
|
-
size?: import("./types").OptionsSizes;
|
|
14
|
-
} & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
|
|
15
|
-
export declare const OptionsItemContext: import("react").Context<ContextValue<OptionsItemProps<object>, HTMLDivElement>>;
|
|
16
|
-
export declare const OptionsItem: <T extends object>(props: Omit<import("react-aria-components").ListBoxItemProps<T>, "className" | "style"> & {
|
|
17
|
-
classNames?: import("./types").OptionsClassNames;
|
|
18
|
-
mapping?: Partial<OptionsMapping>;
|
|
19
|
-
size?: import("./types").OptionsSizes;
|
|
20
|
-
} & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, forwardRef, useMemo, useCallback } from 'react';
|
|
3
|
-
import { Provider, Popover, Collection, UNSTABLE_CollectionRendererContext, ListBox, ListBoxItem, ListStateContext } from 'react-aria-components';
|
|
4
|
-
import { useContextProps } from '../../hooks/use-context-props/use-context-props.js';
|
|
5
|
-
import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
|
|
6
|
-
import { inlineVars } from '../../utils/css.js';
|
|
7
|
-
import { mergeClassNames, callRenderProps } from '../../utils/props.js';
|
|
8
|
-
import { useSlot } from '../../hooks/use-slot/use-slot.js';
|
|
9
|
-
import { useTheme } from '../../hooks/use-theme/use-theme.js';
|
|
10
|
-
import { bodies, headings } from '../../styles/typography.vanilla.js';
|
|
11
|
-
import { AriaSectionContext, AriaHeaderContext, AriaSeparatorContext, AriaSection, AriaTextContext, AriaKeyboardContext, AriaText } from '../aria/aria.js';
|
|
12
|
-
import { createCollectionRenderer } from '../collection/collection.js';
|
|
13
|
-
import { IconContext } from '../icon/icon.js';
|
|
14
|
-
import { optionsClassNames, optionsStateVars, optionsItemStateVars } from './options.vanilla.js';
|
|
15
|
-
|
|
16
|
-
const defaultMapping = {
|
|
17
|
-
description: {
|
|
18
|
-
sm: bodies.xs,
|
|
19
|
-
lg: bodies.xs
|
|
20
|
-
},
|
|
21
|
-
header: {
|
|
22
|
-
sm: headings.v4,
|
|
23
|
-
lg: headings.v5
|
|
24
|
-
},
|
|
25
|
-
label: {
|
|
26
|
-
sm: bodies.sm,
|
|
27
|
-
lg: bodies.sm
|
|
28
|
-
},
|
|
29
|
-
shortcut: {
|
|
30
|
-
sm: bodies.xs,
|
|
31
|
-
lg: bodies.xs
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const defaultSize = "lg";
|
|
35
|
-
const OptionsContext = createContext(null);
|
|
36
|
-
const Options = forwardRef(function Options2(props, ref) {
|
|
37
|
-
[props, ref] = useContextProps(props, ref, OptionsContext);
|
|
38
|
-
props = useDefaultProps(props, "Options");
|
|
39
|
-
const { children: childrenProp, classNames: classNamesProp, mapping: mappingProp, size = defaultSize, ...rest } = props;
|
|
40
|
-
const theme = useTheme();
|
|
41
|
-
const classNames = useMemo(() => mergeClassNames(optionsClassNames, theme.Options, classNamesProp, {
|
|
42
|
-
options: {
|
|
43
|
-
container: theme.className
|
|
44
|
-
// required to consume global theme within Popover
|
|
45
|
-
}
|
|
46
|
-
}), [theme.className, theme.Options, classNamesProp]);
|
|
47
|
-
const mapping = useMemo(() => ({
|
|
48
|
-
...defaultMapping,
|
|
49
|
-
...mappingProp
|
|
50
|
-
}), [mappingProp]);
|
|
51
|
-
const style = useCallback(({ ...renderProps }) => ({
|
|
52
|
-
...theme.style,
|
|
53
|
-
// required to consume global styles within Popover
|
|
54
|
-
...inlineVars(optionsStateVars, {
|
|
55
|
-
...renderProps,
|
|
56
|
-
size
|
|
57
|
-
})
|
|
58
|
-
}), [theme.style, size]);
|
|
59
|
-
const values = useMemo(() => [[OptionsListContext, { classNames, mapping, size }]], [classNames, mapping, size]);
|
|
60
|
-
const children = useCallback((renderProps) => jsx(Provider, { values, children: jsx("div", { className: classNames?.options?.options, children: callRenderProps(childrenProp, {
|
|
61
|
-
...renderProps,
|
|
62
|
-
size,
|
|
63
|
-
defaultChildren: null
|
|
64
|
-
}) }) }), [childrenProp, classNames?.options?.options, size, values]);
|
|
65
|
-
return jsx(Popover, { ...rest, ref, className: classNames?.options?.container, style, children });
|
|
66
|
-
});
|
|
67
|
-
const OptionsListContext = createContext(null);
|
|
68
|
-
const OptionsList = forwardRef(function OptionList(props, ref) {
|
|
69
|
-
[props, ref] = useContextProps(props, ref, OptionsListContext);
|
|
70
|
-
props = useDefaultProps(props, "OptionsList");
|
|
71
|
-
const { children: childrenProp, classNames: classNamesProp, items, mapping: mappingProp, selectionMode = "single", size = defaultSize, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest } = props;
|
|
72
|
-
const theme = useTheme();
|
|
73
|
-
const mapping = useMemo(() => ({
|
|
74
|
-
...defaultMapping,
|
|
75
|
-
...mappingProp
|
|
76
|
-
}), [mappingProp]);
|
|
77
|
-
const classNames = useMemo(() => mergeClassNames(optionsClassNames, theme.Options, classNamesProp, {
|
|
78
|
-
list: { header: mapping.header[size] }
|
|
79
|
-
}), [theme.Options, classNamesProp, mapping, size]);
|
|
80
|
-
const values = useMemo(() => [
|
|
81
|
-
[OptionsItemContext, { classNames, size, mapping }],
|
|
82
|
-
[AriaSectionContext, { className: classNames?.list?.section }],
|
|
83
|
-
[AriaHeaderContext, { className: classNames?.list?.header }],
|
|
84
|
-
[AriaSeparatorContext, { className: classNames?.list?.separator }]
|
|
85
|
-
], [classNames, size, mapping]);
|
|
86
|
-
const style = useCallback((renderProps) => inlineVars(optionsItemStateVars, { ...renderProps, size }), [size]);
|
|
87
|
-
const children = useMemo(() => {
|
|
88
|
-
if (!(childrenProp || items)) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
return jsx(AriaSection, { className: classNames?.list?.list, children: typeof childrenProp === "function" ? jsx(Collection, { items, children: childrenProp }) : childrenProp });
|
|
92
|
-
}, [classNames?.list?.list, childrenProp, items]);
|
|
93
|
-
const renderer = useMemo(() => createCollectionRenderer(ListStateContext, values), [values]);
|
|
94
|
-
return jsx(UNSTABLE_CollectionRendererContext.Provider, { value: renderer, children: jsx(Provider, { values, children: jsx(ListBox, { ...rest, ref, className: classNames?.list?.container, items, selectionMode, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children }) }) });
|
|
95
|
-
});
|
|
96
|
-
const OptionsItemContext = createContext(null);
|
|
97
|
-
const OptionsItem = forwardRef(function OptionItem(props, ref) {
|
|
98
|
-
[props, ref] = useContextProps(props, ref, OptionsItemContext);
|
|
99
|
-
props = useDefaultProps(props, "OptionsItem");
|
|
100
|
-
const { id, children: childrenProp, classNames: classNamesProp, mapping: mappingProp, size = defaultSize, textValue = typeof childrenProp === "string" ? childrenProp : void 0, ...rest } = props;
|
|
101
|
-
const theme = useTheme();
|
|
102
|
-
const mapping = useMemo(() => ({
|
|
103
|
-
...defaultMapping,
|
|
104
|
-
...mappingProp
|
|
105
|
-
}), [mappingProp]);
|
|
106
|
-
const classNames = useMemo(() => mergeClassNames(optionsClassNames, classNamesProp, theme.Options, {
|
|
107
|
-
item: {
|
|
108
|
-
description: mapping.description[size],
|
|
109
|
-
label: mapping.label[size],
|
|
110
|
-
shortcut: mapping.shortcut[size]
|
|
111
|
-
}
|
|
112
|
-
}), [theme.Options, classNamesProp, mapping, size]);
|
|
113
|
-
const [descriptionRef, hasDescription] = useSlot();
|
|
114
|
-
const style = useCallback((renderProps) => inlineVars(optionsItemStateVars, {
|
|
115
|
-
...renderProps,
|
|
116
|
-
size,
|
|
117
|
-
hasDescription
|
|
118
|
-
}), [hasDescription, size]);
|
|
119
|
-
const values = useMemo(() => [
|
|
120
|
-
[
|
|
121
|
-
AriaTextContext,
|
|
122
|
-
{
|
|
123
|
-
slots: {
|
|
124
|
-
label: { className: classNames?.item?.label },
|
|
125
|
-
description: {
|
|
126
|
-
ref: descriptionRef,
|
|
127
|
-
className: classNames?.item?.description
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
[IconContext, { classNames: classNames?.item?.icon }],
|
|
133
|
-
[AriaKeyboardContext, { className: classNames?.item?.shortcut }]
|
|
134
|
-
], [
|
|
135
|
-
classNames?.item?.label,
|
|
136
|
-
descriptionRef,
|
|
137
|
-
classNames?.item?.description,
|
|
138
|
-
classNames?.item?.icon,
|
|
139
|
-
classNames?.item?.shortcut
|
|
140
|
-
]);
|
|
141
|
-
const children = useCallback((renderProps) => {
|
|
142
|
-
const content = callRenderProps(childrenProp, {
|
|
143
|
-
...renderProps,
|
|
144
|
-
size,
|
|
145
|
-
defaultChildren: null
|
|
146
|
-
});
|
|
147
|
-
return jsx(Provider, { values, children: jsx("div", { className: classNames?.item?.item, children: typeof content === "string" ? jsx(AriaText, { slot: "label", children: content }) : content }) });
|
|
148
|
-
}, [childrenProp, classNames?.item?.item, size, values]);
|
|
149
|
-
return jsx(ListBoxItem, { ...rest, id: id ?? textValue, ref, className: classNames?.item?.container, style, textValue, children });
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
export { Options, OptionsContext, OptionsItem, OptionsItemContext, OptionsList, OptionsListContext };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sources":["../../../src/components/options/options.tsx"],"sourcesContent":["import {\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n type ForwardedRef,\n type HTMLAttributes,\n} from 'react';\nimport {\n Collection,\n ListBox,\n ListBoxItem,\n ListStateContext,\n Popover,\n Provider,\n UNSTABLE_CollectionRendererContext,\n type CollectionRenderer,\n type ContextValue,\n type ListBoxItemRenderProps,\n type ListBoxRenderProps,\n type PopoverRenderProps,\n type SectionProps,\n type SeparatorProps,\n type TextProps,\n} from 'react-aria-components';\nimport {\n useContextProps,\n useDefaultProps,\n useSlot,\n useTheme,\n} from '../../hooks';\nimport { bodies, headings } from '../../styles';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport {\n AriaHeaderContext,\n AriaKeyboardContext,\n AriaSection,\n AriaSectionContext,\n AriaSeparatorContext,\n AriaText,\n AriaTextContext,\n} from '../aria';\nimport { createCollectionRenderer } from '../collection';\nimport { IconContext, type IconProps } from '../icon';\nimport {\n optionsClassNames,\n optionsItemStateVars,\n optionsStateVars,\n} from './options.css';\nimport type {\n OptionsItemProps,\n OptionsListProps,\n OptionsMapping,\n OptionsProps,\n} from './types';\n\nconst defaultMapping: OptionsMapping = {\n description: {\n sm: bodies.xs,\n lg: bodies.xs,\n },\n header: {\n sm: headings.v4,\n lg: headings.v5,\n },\n label: {\n sm: bodies.sm,\n lg: bodies.sm,\n },\n shortcut: {\n sm: bodies.xs,\n lg: bodies.xs,\n },\n};\n\nconst defaultSize = 'lg';\n\nexport const OptionsContext =\n createContext<ContextValue<OptionsProps, HTMLElement>>(null);\n\nexport const Options = forwardRef(function Options(\n props: OptionsProps,\n ref: ForwardedRef<HTMLElement>,\n) {\n [props, ref] = useContextProps(props, ref, OptionsContext);\n props = useDefaultProps(props, 'Options');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n mapping: mappingProp,\n size = defaultSize,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () =>\n mergeClassNames(optionsClassNames, theme.Options, classNamesProp, {\n options: {\n container: theme.className, // required to consume global theme within Popover\n },\n }),\n [theme.className, theme.Options, classNamesProp],\n );\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const style = useCallback(\n ({ ...renderProps }: PopoverRenderProps) => ({\n ...theme.style, // required to consume global styles within Popover\n ...inlineVars(optionsStateVars, {\n ...renderProps,\n size,\n }),\n }),\n [theme.style, size],\n );\n\n const values = useMemo<\n [\n [\n typeof OptionsListContext,\n ContextValue<OptionsListProps<object>, HTMLDivElement>,\n ],\n ]\n >(\n () => [[OptionsListContext, { classNames, mapping, size }]],\n [classNames, mapping, size],\n );\n\n const children = useCallback(\n (renderProps: PopoverRenderProps) => (\n <Provider values={values}>\n <div className={classNames?.options?.options}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n size,\n defaultChildren: null,\n })}\n </div>\n </Provider>\n ),\n [childrenProp, classNames?.options?.options, size, values],\n );\n\n return (\n <Popover\n {...rest}\n ref={ref}\n className={classNames?.options?.container}\n style={style}\n >\n {children}\n </Popover>\n );\n});\n\nexport const OptionsListContext =\n createContext<ContextValue<OptionsListProps<object>, HTMLDivElement>>(null);\n\ntype OptionsListContexts = [\n [\n typeof OptionsItemContext,\n ContextValue<OptionsItemProps<object>, HTMLDivElement>,\n ],\n [typeof AriaSectionContext, ContextValue<SectionProps<object>, HTMLElement>],\n [\n typeof AriaHeaderContext,\n ContextValue<HTMLAttributes<HTMLElement>, HTMLElement>,\n ],\n [typeof AriaSeparatorContext, ContextValue<SeparatorProps, HTMLElement>],\n];\n\nexport const OptionsList = forwardRef(function OptionList<T extends object>(\n props: OptionsListProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, OptionsListContext);\n props = useDefaultProps(props, 'OptionsList');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n items,\n mapping: mappingProp,\n selectionMode = 'single',\n size = defaultSize,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(optionsClassNames, theme.Options, classNamesProp, {\n list: { header: mapping.header[size] },\n }),\n [theme.Options, classNamesProp, mapping, size],\n );\n\n const values = useMemo<OptionsListContexts>(\n () => [\n [OptionsItemContext, { classNames, size, mapping }],\n [AriaSectionContext, { className: classNames?.list?.section }],\n [AriaHeaderContext, { className: classNames?.list?.header }],\n [AriaSeparatorContext, { className: classNames?.list?.separator }],\n ],\n [classNames, size, mapping],\n );\n\n const style = useCallback(\n (renderProps: ListBoxRenderProps) =>\n inlineVars(optionsItemStateVars, { ...renderProps, size }),\n [size],\n );\n\n const children = useMemo(() => {\n if (!(childrenProp || items)) {\n return null;\n }\n\n return (\n <AriaSection className={classNames?.list?.list}>\n {typeof childrenProp === 'function' ? (\n <Collection items={items}>{childrenProp}</Collection>\n ) : (\n childrenProp\n )}\n </AriaSection>\n );\n }, [classNames?.list?.list, childrenProp, items]);\n\n const renderer = useMemo<CollectionRenderer>(\n () => createCollectionRenderer(ListStateContext, values),\n [values],\n );\n\n return (\n <UNSTABLE_CollectionRendererContext.Provider value={renderer}>\n <Provider values={values}>\n <ListBox<T>\n {...rest}\n ref={ref}\n className={classNames?.list?.container}\n items={items}\n selectionMode={selectionMode}\n style={style}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n {children}\n </ListBox>\n </Provider>\n </UNSTABLE_CollectionRendererContext.Provider>\n );\n});\n\nexport const OptionsItemContext =\n createContext<ContextValue<OptionsItemProps<object>, HTMLDivElement>>(null);\n\nexport const OptionsItem = forwardRef(function OptionItem<T extends object>(\n props: OptionsItemProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, OptionsItemContext);\n props = useDefaultProps(props, 'OptionsItem');\n\n const {\n id,\n children: childrenProp,\n classNames: classNamesProp,\n mapping: mappingProp,\n size = defaultSize,\n textValue = typeof childrenProp === 'string' ? childrenProp : undefined,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const mapping = useMemo(\n () => ({\n ...defaultMapping,\n ...mappingProp,\n }),\n [mappingProp],\n );\n\n const classNames = useMemo(\n () =>\n mergeClassNames(optionsClassNames, classNamesProp, theme.Options, {\n item: {\n description: mapping.description[size],\n label: mapping.label[size],\n shortcut: mapping.shortcut[size],\n },\n }),\n [theme.Options, classNamesProp, mapping, size],\n );\n\n const [descriptionRef, hasDescription] = useSlot();\n\n const style = useCallback(\n (renderProps: ListBoxItemRenderProps) =>\n inlineVars(optionsItemStateVars, {\n ...renderProps,\n size,\n hasDescription,\n }),\n [hasDescription, size],\n );\n\n const values = useMemo<\n [\n [typeof AriaTextContext, ContextValue<TextProps, HTMLElement>],\n [typeof IconContext, ContextValue<IconProps, HTMLDivElement>],\n [\n typeof AriaKeyboardContext,\n ContextValue<HTMLAttributes<HTMLElement>, HTMLElement>,\n ],\n ]\n >(\n () => [\n [\n AriaTextContext,\n {\n slots: {\n label: { className: classNames?.item?.label },\n description: {\n ref: descriptionRef,\n className: classNames?.item?.description,\n },\n },\n },\n ],\n [IconContext, { classNames: classNames?.item?.icon }],\n [AriaKeyboardContext, { className: classNames?.item?.shortcut }],\n ],\n [\n classNames?.item?.label,\n descriptionRef,\n classNames?.item?.description,\n classNames?.item?.icon,\n classNames?.item?.shortcut,\n ],\n );\n\n const children = useCallback(\n (renderProps: ListBoxItemRenderProps) => {\n const content = callRenderProps(childrenProp, {\n ...renderProps,\n size,\n defaultChildren: null,\n });\n\n return (\n <Provider values={values}>\n <div className={classNames?.item?.item}>\n {typeof content === 'string' ? (\n <AriaText slot='label'>{content}</AriaText>\n ) : (\n content\n )}\n </div>\n </Provider>\n );\n },\n [childrenProp, classNames?.item?.item, size, values],\n );\n\n return (\n <ListBoxItem<T>\n {...rest}\n id={id ?? textValue}\n ref={ref as ForwardedRef<T>}\n className={classNames?.item?.container}\n style={style}\n textValue={textValue}\n >\n {children}\n </ListBoxItem>\n );\n});\n"],"names":["Options"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,MAAM,cAAiC,GAAA;AAAA,EACrC,WAAa,EAAA;AAAA,IACX,IAAI,MAAO,CAAA,EAAA;AAAA,IACX,IAAI,MAAO,CAAA,EAAA;AAAA,GACb;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAI,QAAS,CAAA,EAAA;AAAA,IACb,IAAI,QAAS,CAAA,EAAA;AAAA,GACf;AAAA,EACA,KAAO,EAAA;AAAA,IACL,IAAI,MAAO,CAAA,EAAA;AAAA,IACX,IAAI,MAAO,CAAA,EAAA;AAAA,GACb;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAI,MA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AA,QACA,eAAiB,EAAA,IAAA;AAAA,OAClB,CAAA,CAAA;AAED,MAAA,2BACG,QAAS,EAAA,EAAA,MAAA,EACR,8BAAC,KAAI,EAAA,EAAA,SAAA,EAAW,YAAY,IAAM,EAAA,IAAA,EAC/B,iBAAO,OAAY,KAAA,QAAA,uBACjB,QAAS,EAAA,EAAA,IAAA,EAAK,SAAS,QAAQ,EAAA,OAAA,EAAA,CAAA,GAEhC,SAEJ,CACF,EAAA,CAAA,CAAA;AAAA,KAEJ;AAAA,IACA,CAAC,YAAc,EAAA,UAAA,EAAY,IAAM,EAAA,IAAA,EAAM,MAAM,MAAM,CAAA;AAAA,GACrD,CAAA;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,IAAI,EAAM,IAAA,SAAA;AAAA,MACV,GAAA;AAAA,MACA,SAAA,EAAW,YAAY,IAAM,EAAA,SAAA;AAAA,MAC7B,KAAA;AAAA,MACA,SAAA;AAAA,MAEC,QAAA;AAAA,KAAA;AAAA,GACH,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
var optionsClassNames = { options: { container: "options_optionsClassNames_options_container__140gzb51b", options: "options_optionsClassNames_options_options__140gzb51c surfaces_proud__15mw6jf5 surfaces_flush__15mw6jf4" }, list: { container: "options_optionsClassNames_list_container__140gzb51d", list: "options_optionsClassNames_list_list__140gzb51e", section: "options_optionsClassNames_list_section__140gzb51f", header: "options_optionsClassNames_list_header__140gzb51g", separator: "options_optionsClassNames_list_separator__140gzb51h" }, item: { container: "options_optionsClassNames_item_container__140gzb51i", item: "options_optionsClassNames_item_item__140gzb51j", icon: { icon: "options_optionsClassNames_item_icon_icon__140gzb51k" }, label: "options_optionsClassNames_item_label__140gzb51l", description: "options_optionsClassNames_item_description__140gzb51m", shortcut: "options_optionsClassNames_item_shortcut__140gzb51n" } };
|
|
3
|
-
var optionsColorVars = { list: { background: "var(--list-background__140gzb5l)", border: "var(--list-border__140gzb5m)", color: "var(--list-color__140gzb5n)" }, header: { background: "var(--header-background__140gzb5o)", border: "var(--header-border__140gzb5p)", color: "var(--header-color__140gzb5q)" }, separator: "var(--separator__140gzb5r)", item: { background: "var(--item-background__140gzb5s)", border: "var(--item-border__140gzb5t)", color: "var(--item-color__140gzb5u)" }, label: "var(--label__140gzb5v)", description: "var(--description__140gzb5w)" };
|
|
4
|
-
var optionsContainers = { options: "options_optionsContainers_options__140gzb50", list: "options_optionsContainers_list__140gzb51", item: "options_optionsContainers_item__140gzb52" };
|
|
5
|
-
var optionsItemStateVars = { selectionBehavior: "var(--selectionBehavior__140gzb5b)", selectionMode: "var(--selectionMode__140gzb5c)", size: "var(--size__140gzb5d)", hasDescription: "var(--hasDescription__140gzb5e)", isDisabled: "var(--isDisabled__140gzb5f)", isHovered: "var(--isHovered__140gzb5g)", isPressed: "var(--isPressed__140gzb5h)", isSelected: "var(--isSelected__140gzb5i)", isFocused: "var(--isFocused__140gzb5j)", isFocusVisible: "var(--isFocusVisible__140gzb5k)" };
|
|
6
|
-
var optionsListStateVars = { size: "var(--size__140gzb57)", isEmpty: "var(--isEmpty__140gzb58)", isFocused: "var(--isFocused__140gzb59)", isFocusVisible: "var(--isFocusVisible__140gzb5a)" };
|
|
7
|
-
var optionsSpaceVars = { options: { minWidth: "var(--options-minWidth__140gzb5x)", x: "var(--options-x__140gzb5y)", y: "var(--options-y__140gzb5z)" }, list: { x: "var(--list-x__140gzb510)", y: "var(--list-y__140gzb511)" }, section: { x: "var(--section-x__140gzb512)", y: "var(--section-y__140gzb513)" }, header: { x: "var(--header-x__140gzb514)", y: "var(--header-y__140gzb515)" }, separator: { x: "var(--separator-x__140gzb516)", y: "var(--separator-y__140gzb517)" }, item: { x: "var(--item-x__140gzb518)", y: "var(--item-y__140gzb519)", gap: "var(--item-gap__140gzb51a)" } };
|
|
8
|
-
var optionsStateVars = { size: "var(--size__140gzb53)", isEntering: "var(--isEntering__140gzb54)", isExiting: "var(--isExiting__140gzb55)", placement: "var(--placement__140gzb56)" };
|
|
9
|
-
|
|
10
|
-
export { optionsClassNames, optionsColorVars, optionsContainers, optionsItemStateVars, optionsListStateVars, optionsSpaceVars, optionsStateVars };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"options.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { AsType } from '../../types';
|
|
2
|
-
import type { ListBoxItemProps, ListBoxItemRenderProps, ListBoxProps, ListBoxRenderProps, PopoverProps, PopoverRenderProps } from 'react-aria-components';
|
|
3
|
-
import type { PartialDeep } from 'type-fest';
|
|
4
|
-
import type { IconClassNames } from '../icon/types';
|
|
5
|
-
export type OptionsClassNames = PartialDeep<{
|
|
6
|
-
options: {
|
|
7
|
-
container: string;
|
|
8
|
-
options: string;
|
|
9
|
-
};
|
|
10
|
-
list: {
|
|
11
|
-
container: string;
|
|
12
|
-
list: string;
|
|
13
|
-
section: string;
|
|
14
|
-
header: string;
|
|
15
|
-
separator: string;
|
|
16
|
-
};
|
|
17
|
-
item: {
|
|
18
|
-
container: string;
|
|
19
|
-
item: string;
|
|
20
|
-
icon: IconClassNames;
|
|
21
|
-
label: string;
|
|
22
|
-
description: string;
|
|
23
|
-
shortcut: string;
|
|
24
|
-
};
|
|
25
|
-
}>;
|
|
26
|
-
export type OptionsSizes = 'sm' | 'lg';
|
|
27
|
-
export type OptionsMapping = {
|
|
28
|
-
description: Partial<Record<OptionsSizes, string>>;
|
|
29
|
-
header: Partial<Record<OptionsSizes, string>>;
|
|
30
|
-
label: Partial<Record<OptionsSizes, string>>;
|
|
31
|
-
shortcut: Partial<Record<OptionsSizes, string>>;
|
|
32
|
-
};
|
|
33
|
-
type BaseOptionsProps = {
|
|
34
|
-
classNames?: OptionsClassNames;
|
|
35
|
-
mapping?: Partial<OptionsMapping>;
|
|
36
|
-
size?: OptionsSizes;
|
|
37
|
-
};
|
|
38
|
-
export type OptionsProps = Omit<PopoverProps, 'className' | 'style'> & BaseOptionsProps;
|
|
39
|
-
export type OptionsListProps<T extends object> = Omit<ListBoxProps<T>, 'className' | 'dragAndDropHooks' | 'orientation' | 'style'> & BaseOptionsProps;
|
|
40
|
-
export type OptionsItemProps<T extends object> = Omit<ListBoxItemProps<T>, 'className' | 'style'> & BaseOptionsProps;
|
|
41
|
-
export type OptionsRenderProps = AsType<PopoverRenderProps> & Required<Pick<BaseOptionsProps, 'size'>>;
|
|
42
|
-
export type OptionsListRenderProps = AsType<ListBoxRenderProps> & Required<Pick<BaseOptionsProps, 'size'>>;
|
|
43
|
-
export type OptionsItemRenderProps = AsType<ListBoxItemRenderProps> & Required<Pick<BaseOptionsProps, 'size'>>;
|
|
44
|
-
export type OptionsState = Omit<OptionsRenderProps, 'trigger'>;
|
|
45
|
-
export type OptionsListState = Omit<OptionsListRenderProps, 'layout' | 'state' | 'isDropTarget'>;
|
|
46
|
-
export type OptionsItemState = Omit<OptionsItemRenderProps, 'allowsDragging' | 'isDragging' | 'isDropTarget'> & {
|
|
47
|
-
hasDescription: boolean;
|
|
48
|
-
};
|
|
49
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Picker, PickerContext, PickerItem, PickerItemContext } from './picker';
|
|
2
|
-
export { pickerClassNames, pickerContainers, pickerItemColorVars, pickerItemStateVars, pickerSpaceVars, pickerStateVars, } from './picker.css';
|
|
3
|
-
export { type PickerClassNames, type PickerItemProps, type PickerItemRenderProps, type PickerItemState, type PickerProps, type PickerState, } from './types';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { PickerClassNames } from './types';
|
|
2
|
-
export declare const pickerContainers: {
|
|
3
|
-
list: string;
|
|
4
|
-
item: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const pickerSpaceVars: {
|
|
7
|
-
gap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
8
|
-
};
|
|
9
|
-
export declare const pickerStateVars: {
|
|
10
|
-
columns: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
-
layout: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
|
-
orientation: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
13
|
-
isEmpty: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
14
|
-
isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
15
|
-
isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
-
};
|
|
17
|
-
export declare const pickerItemColorVars: {
|
|
18
|
-
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
19
|
-
border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
20
|
-
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
-
};
|
|
22
|
-
export declare const pickerItemStateVars: {
|
|
23
|
-
selectionMode: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
24
|
-
selectionBehavior: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
-
isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
26
|
-
isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
-
isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
-
isHovered: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
-
isPressed: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
30
|
-
isSelected: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
31
|
-
};
|
|
32
|
-
export declare const pickerClassNames: PickerClassNames;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type ContextValue } from 'react-aria-components';
|
|
2
|
-
import type { PickerItemProps, PickerProps } from './types';
|
|
3
|
-
export declare const PickerContext: import("react").Context<ContextValue<PickerProps<unknown>, HTMLDivElement>>;
|
|
4
|
-
export declare const PickerItemContext: import("react").Context<ContextValue<PickerItemProps<unknown>, HTMLDivElement>>;
|
|
5
|
-
/**
|
|
6
|
-
* Generic stylable picker that supports the functionality (sans drag and drop) of
|
|
7
|
-
* React Aria's ListBox: https://react-spectrum.adobe.com/react-aria/ListBox.html
|
|
8
|
-
*
|
|
9
|
-
* NOTE: The picker items does not support sections or separators
|
|
10
|
-
*/
|
|
11
|
-
export declare const Picker: <T extends object>(props: Omit<import("react-aria-components").ListBoxProps<T>, "className" | "style" | "dragAndDropHooks"> & {
|
|
12
|
-
classNames?: import("./types").PickerClassNames;
|
|
13
|
-
} & {
|
|
14
|
-
columns?: number;
|
|
15
|
-
} & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
|
|
16
|
-
export declare const PickerItem: <T extends object>(props: Omit<import("react-aria-components").ListBoxItemProps<T>, "className" | "style"> & {
|
|
17
|
-
classNames?: import("./types").PickerClassNames;
|
|
18
|
-
} & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement | null;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, forwardRef, useMemo, useCallback } from 'react';
|
|
3
|
-
import { useContextProps, Section, Collection, Provider, ListBox, ListBoxItem } from 'react-aria-components';
|
|
4
|
-
import { inlineVars } from '../../utils/css.js';
|
|
5
|
-
import { mergeClassNames, callRenderProps } from '../../utils/props.js';
|
|
6
|
-
import { useDefaultProps } from '../../hooks/use-defaults/use-defaults.js';
|
|
7
|
-
import { useTheme } from '../../hooks/use-theme/use-theme.js';
|
|
8
|
-
import { pickerClassNames, pickerStateVars, pickerItemStateVars } from './picker.vanilla.js';
|
|
9
|
-
|
|
10
|
-
const PickerContext = createContext(null);
|
|
11
|
-
const PickerItemContext = createContext(null);
|
|
12
|
-
const Picker = forwardRef(function Picker2(props, ref) {
|
|
13
|
-
[props, ref] = useContextProps(props, ref, PickerContext);
|
|
14
|
-
props = useDefaultProps(props, "Picker");
|
|
15
|
-
const { children: childrenProp, classNames: classNamesProp, columns, items, layout = "stack", orientation = "horizontal", selectionMode = "single", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest } = props;
|
|
16
|
-
const theme = useTheme();
|
|
17
|
-
const classNames = useMemo(() => mergeClassNames(pickerClassNames, theme.Picker, classNamesProp), [theme.Picker, classNamesProp]);
|
|
18
|
-
const values = useMemo(() => [[PickerItemContext, { classNames }]], [classNames]);
|
|
19
|
-
const style = useCallback(({ state, ...renderProps }) => inlineVars(pickerStateVars, {
|
|
20
|
-
...renderProps,
|
|
21
|
-
columns,
|
|
22
|
-
layout,
|
|
23
|
-
orientation
|
|
24
|
-
}), [columns, layout, orientation]);
|
|
25
|
-
const children = useMemo(() => {
|
|
26
|
-
if (!(childrenProp || items)) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
return jsx(Section, { className: classNames?.list?.list, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children: typeof childrenProp === "function" ? jsx(Collection, { items, children: childrenProp }) : childrenProp });
|
|
30
|
-
}, [childrenProp, items, classNames?.list?.list, ariaLabel, ariaLabelledBy]);
|
|
31
|
-
return jsx(Provider, { values, children: jsx(ListBox, { ...rest, ref, className: classNames?.list?.container, items, layout, orientation, selectionMode, style, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children }) });
|
|
32
|
-
});
|
|
33
|
-
const PickerItem = forwardRef(function PickerItem2(props, ref) {
|
|
34
|
-
[props, ref] = useContextProps(props, ref, PickerItemContext);
|
|
35
|
-
const { children: childrenProp, id, classNames: classNamesProp, textValue = typeof childrenProp === "string" ? childrenProp : void 0, ...rest } = props;
|
|
36
|
-
const theme = useTheme();
|
|
37
|
-
const classNames = useMemo(() => mergeClassNames(pickerClassNames, theme.Picker, classNamesProp), [theme.Picker, classNamesProp]);
|
|
38
|
-
const style = useCallback((renderProps) => inlineVars(pickerItemStateVars, renderProps), []);
|
|
39
|
-
const children = useCallback((renderProps) => jsx("div", { className: classNames?.item?.item, children: callRenderProps(childrenProp, {
|
|
40
|
-
...renderProps,
|
|
41
|
-
defaultChildren: null
|
|
42
|
-
}) }), [childrenProp, classNames?.item?.item]);
|
|
43
|
-
return jsx(ListBoxItem, { ...rest, ref, id: id ?? textValue, className: classNames?.item?.container, style, textValue, children });
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export { Picker, PickerContext, PickerItem, PickerItemContext };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"picker.js","sources":["../../../src/components/picker/picker.tsx"],"sourcesContent":["import {\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n type ForwardedRef,\n} from 'react';\nimport {\n Collection,\n ListBox,\n ListBoxItem,\n Provider,\n Section,\n useContextProps,\n type ContextValue,\n type ListBoxItemRenderProps,\n type ListBoxRenderProps,\n} from 'react-aria-components';\nimport { useDefaultProps, useTheme } from '../../hooks';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport {\n pickerClassNames,\n pickerItemStateVars,\n pickerStateVars,\n} from './picker.css';\nimport type { PickerItemProps, PickerProps } from './types';\n\nexport const PickerContext =\n createContext<ContextValue<PickerProps<unknown>, HTMLDivElement>>(null);\n\nexport const PickerItemContext =\n createContext<ContextValue<PickerItemProps<unknown>, HTMLDivElement>>(null);\n\n/**\n * Generic stylable picker that supports the functionality (sans drag and drop) of\n * React Aria's ListBox: https://react-spectrum.adobe.com/react-aria/ListBox.html\n *\n * NOTE: The picker items does not support sections or separators\n */\nexport const Picker = forwardRef(function Picker<T extends object>(\n props: PickerProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, PickerContext);\n\n props = useDefaultProps(props, 'Picker');\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n columns,\n items,\n layout = 'stack',\n orientation = 'horizontal',\n selectionMode = 'single',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(pickerClassNames, theme.Picker, classNamesProp),\n [theme.Picker, classNamesProp],\n );\n\n const values = useMemo<\n [\n [\n typeof PickerItemContext,\n ContextValue<PickerItemProps<unknown>, HTMLDivElement>,\n ],\n ]\n >(() => [[PickerItemContext, { classNames }]], [classNames]);\n\n const style = useCallback(\n ({ state, ...renderProps }: ListBoxRenderProps) =>\n inlineVars(pickerStateVars, {\n ...renderProps,\n columns,\n layout,\n orientation,\n }),\n [columns, layout, orientation],\n );\n\n const children = useMemo(() => {\n if (!(childrenProp || items)) {\n return null;\n }\n\n return (\n <Section\n className={classNames?.list?.list}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n {typeof childrenProp === 'function' ? (\n <Collection items={items}>{childrenProp}</Collection>\n ) : (\n childrenProp\n )}\n </Section>\n );\n }, [childrenProp, items, classNames?.list?.list, ariaLabel, ariaLabelledBy]);\n\n return (\n <Provider values={values}>\n <ListBox<T>\n {...rest}\n ref={ref}\n className={classNames?.list?.container}\n items={items}\n layout={layout}\n orientation={orientation}\n selectionMode={selectionMode}\n style={style}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n {children}\n </ListBox>\n </Provider>\n );\n});\n\nexport const PickerItem = forwardRef(function PickerItem<T extends object>(\n props: PickerItemProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n [props, ref] = useContextProps(props, ref, PickerItemContext);\n\n const {\n children: childrenProp,\n id,\n classNames: classNamesProp,\n textValue = typeof childrenProp === 'string' ? childrenProp : undefined,\n ...rest\n } = props;\n\n const theme = useTheme();\n\n const classNames = useMemo(\n () => mergeClassNames(pickerClassNames, theme.Picker, classNamesProp),\n [theme.Picker, classNamesProp],\n );\n\n const style = useCallback(\n (renderProps: ListBoxItemRenderProps) =>\n inlineVars(pickerItemStateVars, renderProps),\n [],\n );\n\n const children = useCallback(\n (renderProps: ListBoxItemRenderProps) => (\n <div className={classNames?.item?.item}>\n {callRenderProps(childrenProp, {\n ...renderProps,\n defaultChildren: null,\n })}\n </div>\n ),\n [childrenProp, classNames?.item?.item],\n );\n\n return (\n <ListBoxItem<T>\n {...rest}\n ref={ref as ForwardedRef<T>}\n id={id ?? textValue}\n className={classNames?.item?.container}\n style={style}\n textValue={textValue}\n >\n {children}\n </ListBoxItem>\n );\n});\n"],"names":["Picker","PickerItem"],"mappings":";;;;;;;;;;;;;;;;AA2Ba,MAAA,aAAA,GACX,cAAkE,IAAI,EAAA;AAE3D,MAAA,iBAAA,GACX,cAAsE,IAAI,EAAA;AAQrE,MAAM,MAAS,GAAA,UAAA,CAAW,SAASA,OAAAA,CACxC,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,aAAa,CAAA,CAAA;AAExD,EAAQ,KAAA,GAAA,eAAA,CAAgB,OAAO,QAAQ,CAAA,CAAA;AAEvC,EAAM,MAAA;AAAA,IACJ,QAAU,EAAA,YAAA;AAAA,IACV,UAAY,EAAA,cAAA;AAAA,IACZ,OAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAS,GAAA,OAAA;AAAA,IACT,WAAc,GAAA,YAAA;AAAA,IACd,aAAgB,GAAA,QAAA;AAAA,IAChB,YAAc,EAAA,SAAA;AAAA,IACd,iBAAmB,EAAA,cAAA;AAAA,IACnB,GAAG,IAAA;AAAA,GACD,GAAA,KAAA,CAAA;AAEJ,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAA,MAAM,UAAa,GAAA,OAAA;AAAA,IACjB,MA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;AAAA,MAC7B,GAAG,WAAA;AAAA,MACH,eAAiB,EAAA,IAAA;AAAA,KAClB,CACH,EAAA,CAAA;AAAA,IAEF,CAAC,YAAA,EAAc,UAAY,EAAA,IAAA,EAAM,IAAI,CAAA;AAAA,GACvC,CAAA;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MACA,IAAI,EAAM,IAAA,SAAA;AAAA,MACV,SAAA,EAAW,YAAY,IAAM,EAAA,SAAA;AAAA,MAC7B,KAAA;AAAA,MACA,SAAA;AAAA,MAEC,QAAA;AAAA,KAAA;AAAA,GACH,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
var pickerClassNames = { list: { container: "picker_pickerClassNames_list_container__k0t389k", list: "picker_pickerClassNames_list_list__k0t389l" }, item: { container: "picker_pickerClassNames_item_container__k0t389m", item: "picker_pickerClassNames_item_item__k0t389n" } };
|
|
3
|
-
var pickerContainers = { list: "picker_pickerContainers_list__k0t3890", item: "picker_pickerContainers_item__k0t3891" };
|
|
4
|
-
var pickerItemColorVars = { background: "var(--background__k0t3899)", border: "var(--border__k0t389a)", color: "var(--color__k0t389b)" };
|
|
5
|
-
var pickerItemStateVars = { selectionMode: "var(--selectionMode__k0t389c)", selectionBehavior: "var(--selectionBehavior__k0t389d)", isDisabled: "var(--isDisabled__k0t389e)", isFocused: "var(--isFocused__k0t389f)", isFocusVisible: "var(--isFocusVisible__k0t389g)", isHovered: "var(--isHovered__k0t389h)", isPressed: "var(--isPressed__k0t389i)", isSelected: "var(--isSelected__k0t389j)" };
|
|
6
|
-
var pickerSpaceVars = { gap: "var(--gap__k0t3892)" };
|
|
7
|
-
var pickerStateVars = { columns: "var(--columns__k0t3893)", layout: "var(--layout__k0t3894)", orientation: "var(--orientation__k0t3895)", isEmpty: "var(--isEmpty__k0t3896)", isFocused: "var(--isFocused__k0t3897)", isFocusVisible: "var(--isFocusVisible__k0t3898)" };
|
|
8
|
-
|
|
9
|
-
export { pickerClassNames, pickerContainers, pickerItemColorVars, pickerItemStateVars, pickerSpaceVars, pickerStateVars };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"picker.vanilla.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ListBoxProps, ListBoxItemProps, ListBoxItemRenderProps, ListBoxRenderProps } from 'react-aria-components';
|
|
2
|
-
import type { PartialDeep } from 'type-fest';
|
|
3
|
-
export type PickerClassNames = PartialDeep<{
|
|
4
|
-
list: {
|
|
5
|
-
container: string;
|
|
6
|
-
list: string;
|
|
7
|
-
};
|
|
8
|
-
item: {
|
|
9
|
-
container: string;
|
|
10
|
-
item: string;
|
|
11
|
-
};
|
|
12
|
-
}>;
|
|
13
|
-
type BaseProps = {
|
|
14
|
-
classNames?: PickerClassNames;
|
|
15
|
-
};
|
|
16
|
-
type BasePickerProps = BaseProps & {
|
|
17
|
-
/**
|
|
18
|
-
* Only applicable if layout='grid'
|
|
19
|
-
*/
|
|
20
|
-
columns?: number;
|
|
21
|
-
};
|
|
22
|
-
export type PickerState = Omit<ListBoxRenderProps, 'state' | 'isDropTarget'> & Required<Pick<PickerProps<unknown>, 'columns' | 'layout' | 'orientation'>>;
|
|
23
|
-
export type PickerProps<T> = Omit<ListBoxProps<T>, 'className' | 'dragAndDropHooks' | 'style'> & BasePickerProps;
|
|
24
|
-
export type BasePickerItemProps = BaseProps;
|
|
25
|
-
export type PickerItemRenderProps = Omit<ListBoxItemRenderProps, 'allowsDragging' | 'isDragging' | 'isDropTarget'>;
|
|
26
|
-
export type PickerItemState = PickerItemRenderProps;
|
|
27
|
-
export type PickerItemProps<T> = Omit<ListBoxItemProps<T>, 'className' | 'style'> & BasePickerItemProps;
|
|
28
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { PopoverClassNames } from './types';
|
|
2
|
-
export declare const popoverContainer: string;
|
|
3
|
-
export declare const popoverColorVars: {
|
|
4
|
-
content: {
|
|
5
|
-
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
export declare const popoverSpaceVars: {
|
|
9
|
-
width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
10
|
-
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
-
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
|
-
gap: {
|
|
13
|
-
default: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
14
|
-
header: {
|
|
15
|
-
after: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
-
};
|
|
17
|
-
content: {
|
|
18
|
-
before: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
19
|
-
};
|
|
20
|
-
footer: {
|
|
21
|
-
before: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export declare const popoverStateVars: {
|
|
26
|
-
hasHeader: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
-
placement: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
-
isEntering: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
-
isExiting: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
30
|
-
};
|
|
31
|
-
export declare const popoverClassNames: PopoverClassNames;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ContextValue } from 'react-aria-components';
|
|
2
|
-
import type { PopoverMapping, PopoverProps } from './types';
|
|
3
|
-
export declare const PopoverContext: import("react").Context<ContextValue<PopoverProps, HTMLElement>>;
|
|
4
|
-
export declare const Popover: (props: Omit<import("react-aria-components").PopoverProps, "children" | "className" | "style"> & {
|
|
5
|
-
children?: import("../..").RenderPropsChildren<import("./types").PopoverRenderProps>;
|
|
6
|
-
classNames?: import("./types").PopoverClassNames;
|
|
7
|
-
mapping?: Partial<PopoverMapping>;
|
|
8
|
-
} & import("react").RefAttributes<HTMLElement>) => import("react").ReactElement | null;
|