@accelint/design-system 0.3.3 → 0.5.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/README.md +12 -12
- package/dist/chunk-PZ5AY32C.js +9 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/components/aria/aria.d.ts +32 -0
- package/dist/components/aria/aria.js +39 -0
- package/dist/components/aria/aria.js.map +1 -0
- package/dist/components/aria/index.d.ts +3 -0
- package/dist/components/aria/index.js +4 -0
- package/dist/components/aria/index.js.map +1 -0
- package/dist/components/button/button.css.d.ts +41 -0
- package/dist/components/button/button.css.js +12 -0
- package/dist/components/button/button.css.js.map +1 -0
- package/dist/components/button/button.d.ts +47 -0
- package/dist/components/button/button.js +104 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/index.d.ts +8 -0
- package/dist/components/button/index.js +6 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button/types.d.ts +32 -0
- package/dist/components/button/types.js +3 -0
- package/dist/components/button/types.js.map +1 -0
- package/dist/components/checkbox/checkbox.css.d.ts +44 -0
- package/dist/components/checkbox/checkbox.css.js +14 -0
- package/dist/components/checkbox/checkbox.css.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +30 -0
- package/dist/components/checkbox/checkbox.js +123 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +9 -0
- package/dist/components/checkbox/index.js +6 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/checkbox/types.d.ts +41 -0
- package/dist/components/checkbox/types.js +3 -0
- package/dist/components/checkbox/types.js.map +1 -0
- package/dist/components/chip/chip.css.d.ts +41 -0
- package/dist/components/chip/chip.css.js +12 -0
- package/dist/components/chip/chip.css.js.map +1 -0
- package/dist/components/chip/chip.d.ts +41 -0
- package/dist/components/chip/chip.js +171 -0
- package/dist/components/chip/chip.js.map +1 -0
- package/dist/components/chip/index.d.ts +11 -0
- package/dist/components/chip/index.js +6 -0
- package/dist/components/chip/index.js.map +1 -0
- package/dist/components/chip/types.d.ts +37 -0
- package/dist/components/chip/types.js +3 -0
- package/dist/components/chip/types.js.map +1 -0
- package/dist/components/collection/collection.d.ts +17 -0
- package/dist/components/collection/collection.js +22 -0
- package/dist/components/collection/collection.js.map +1 -0
- package/dist/components/collection/index.d.ts +6 -0
- package/dist/components/collection/index.js +4 -0
- package/dist/components/collection/index.js.map +1 -0
- package/dist/components/combo-box/combo-box.css.d.ts +35 -0
- package/dist/components/combo-box/combo-box.css.js +12 -0
- package/dist/components/combo-box/combo-box.css.js.map +1 -0
- package/dist/components/combo-box/combo-box.d.ts +21 -0
- package/dist/components/combo-box/combo-box.js +116 -0
- package/dist/components/combo-box/combo-box.js.map +1 -0
- package/dist/components/combo-box/index.d.ts +13 -0
- package/dist/components/combo-box/index.js +6 -0
- package/dist/components/combo-box/index.js.map +1 -0
- package/dist/components/combo-box/types.d.ts +38 -0
- package/dist/components/combo-box/types.js +3 -0
- package/dist/components/combo-box/types.js.map +1 -0
- package/dist/components/dialog/dialog.css.d.ts +45 -0
- package/dist/components/dialog/dialog.css.js +12 -0
- package/dist/components/dialog/dialog.css.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +29 -0
- package/dist/components/dialog/dialog.js +186 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/index.d.ts +11 -0
- package/dist/components/dialog/index.js +6 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/dialog/types.d.ts +53 -0
- package/dist/components/dialog/types.js +3 -0
- package/dist/components/dialog/types.js.map +1 -0
- package/dist/components/drawer/drawer.css.d.ts +48 -0
- package/dist/components/drawer/drawer.css.js +14 -0
- package/dist/components/drawer/drawer.css.js.map +1 -0
- package/dist/components/drawer/drawer.d.ts +28 -0
- package/dist/components/drawer/drawer.js +305 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/drawer/index.d.ts +16 -0
- package/dist/components/drawer/index.js +6 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/drawer/types.d.ts +77 -0
- package/dist/components/drawer/types.js +3 -0
- package/dist/components/drawer/types.js.map +1 -0
- package/dist/components/element/element.d.ts +16 -0
- package/dist/components/element/element.js +24 -0
- package/dist/components/element/element.js.map +1 -0
- package/dist/components/element/index.d.ts +5 -0
- package/dist/components/element/index.js +5 -0
- package/dist/components/element/index.js.map +1 -0
- package/dist/components/element/types.d.ts +24 -0
- package/dist/components/element/types.js +3 -0
- package/dist/components/element/types.js.map +1 -0
- package/dist/components/group/group.css.d.ts +20 -0
- package/dist/components/group/group.css.js +11 -0
- package/dist/components/group/group.css.js.map +1 -0
- package/dist/components/group/group.d.ts +16 -0
- package/dist/components/group/group.js +61 -0
- package/dist/components/group/group.js.map +1 -0
- package/dist/components/group/index.d.ts +6 -0
- package/dist/components/group/index.js +6 -0
- package/dist/components/group/index.js.map +1 -0
- package/dist/components/group/types.d.ts +38 -0
- package/dist/components/group/types.js +3 -0
- package/dist/components/group/types.js.map +1 -0
- package/dist/components/icon/icon.css.d.ts +23 -0
- package/dist/components/icon/icon.css.js +12 -0
- package/dist/components/icon/icon.css.js.map +1 -0
- package/dist/components/icon/icon.d.ts +17 -0
- package/dist/components/icon/icon.js +39 -0
- package/dist/components/icon/icon.js.map +1 -0
- package/dist/components/icon/index.d.ts +5 -0
- package/dist/components/icon/index.js +6 -0
- package/dist/components/icon/index.js.map +1 -0
- package/dist/components/icon/types.d.ts +16 -0
- package/dist/components/icon/types.js +3 -0
- package/dist/components/icon/types.js.map +1 -0
- package/dist/components/index.d.ts +93 -0
- package/dist/components/index.js +31 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/input/index.d.ts +6 -0
- package/dist/components/input/index.js +6 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/input.css.d.ts +34 -0
- package/dist/components/input/input.css.js +12 -0
- package/dist/components/input/input.css.js.map +1 -0
- package/dist/components/input/input.d.ts +13 -0
- package/dist/components/input/input.js +141 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/types.d.ts +47 -0
- package/dist/components/input/types.js +3 -0
- package/dist/components/input/types.js.map +1 -0
- package/dist/components/menu/index.d.ts +8 -0
- package/dist/components/menu/index.js +6 -0
- package/dist/components/menu/index.js.map +1 -0
- package/dist/components/menu/menu.css.d.ts +83 -0
- package/dist/components/menu/menu.css.js +13 -0
- package/dist/components/menu/menu.css.js.map +1 -0
- package/dist/components/menu/menu.d.ts +32 -0
- package/dist/components/menu/menu.js +252 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/menu/types.d.ts +51 -0
- package/dist/components/menu/types.js +3 -0
- package/dist/components/menu/types.js.map +1 -0
- package/dist/components/merge-provider/index.d.ts +5 -0
- package/dist/components/merge-provider/index.js +5 -0
- package/dist/components/merge-provider/index.js.map +1 -0
- package/dist/components/merge-provider/merge-provider.d.ts +20 -0
- package/dist/components/merge-provider/merge-provider.js +46 -0
- package/dist/components/merge-provider/merge-provider.js.map +1 -0
- package/dist/components/merge-provider/types.d.ts +8 -0
- package/dist/components/merge-provider/types.js +3 -0
- package/dist/components/merge-provider/types.js.map +1 -0
- package/dist/components/number-field/index.d.ts +12 -0
- package/dist/components/number-field/index.js +5 -0
- package/dist/components/number-field/index.js.map +1 -0
- package/dist/components/number-field/number-field.css.d.ts +40 -0
- package/dist/components/number-field/number-field.css.js +12 -0
- package/dist/components/number-field/number-field.css.js.map +1 -0
- package/dist/components/number-field/number-field.d.ts +20 -0
- package/dist/components/number-field/number-field.js +125 -0
- package/dist/components/number-field/number-field.js.map +1 -0
- package/dist/components/number-field/types.d.ts +38 -0
- package/dist/components/number-field/types.js +3 -0
- package/dist/components/number-field/types.js.map +1 -0
- package/dist/components/options/index.d.ts +8 -0
- package/dist/components/options/index.js +6 -0
- package/dist/components/options/index.js.map +1 -0
- package/dist/components/options/options.css.d.ts +87 -0
- package/dist/components/options/options.css.js +14 -0
- package/dist/components/options/options.css.js.map +1 -0
- package/dist/components/options/options.d.ts +28 -0
- package/dist/components/options/options.js +253 -0
- package/dist/components/options/options.js.map +1 -0
- package/dist/components/options/types.d.ts +52 -0
- package/dist/components/options/types.js +3 -0
- package/dist/components/options/types.js.map +1 -0
- package/dist/components/picker/index.d.ts +6 -0
- package/dist/components/picker/index.js +6 -0
- package/dist/components/picker/index.js.map +1 -0
- package/dist/components/picker/picker.css.d.ts +37 -0
- package/dist/components/picker/picker.css.js +13 -0
- package/dist/components/picker/picker.css.js.map +1 -0
- package/dist/components/picker/picker.d.ts +24 -0
- package/dist/components/picker/picker.js +113 -0
- package/dist/components/picker/picker.js.map +1 -0
- package/dist/components/picker/picker.stories.css.d.ts +5 -0
- package/dist/components/picker/picker.stories.css.js +10 -0
- package/dist/components/picker/picker.stories.css.js.map +1 -0
- package/dist/components/picker/types.d.ts +30 -0
- package/dist/components/picker/types.js +3 -0
- package/dist/components/picker/types.js.map +1 -0
- package/dist/components/popover/index.d.ts +14 -0
- package/dist/components/popover/index.js +6 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/popover/popover.css.d.ts +45 -0
- package/dist/components/popover/popover.css.js +12 -0
- package/dist/components/popover/popover.css.js.map +1 -0
- package/dist/components/popover/popover.d.ts +22 -0
- package/dist/components/popover/popover.js +139 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/popover/types.d.ts +39 -0
- package/dist/components/popover/types.js +3 -0
- package/dist/components/popover/types.js.map +1 -0
- package/dist/components/query-builder/action-element.d.ts +23 -0
- package/dist/components/query-builder/action-element.js +26 -0
- package/dist/components/query-builder/action-element.js.map +1 -0
- package/dist/components/query-builder/constants.d.ts +25 -0
- package/dist/components/query-builder/constants.js +25 -0
- package/dist/components/query-builder/constants.js.map +1 -0
- package/dist/components/query-builder/dataset-sample.d.ts +95 -0
- package/dist/components/query-builder/dataset-sample.js +272 -0
- package/dist/components/query-builder/dataset-sample.js.map +1 -0
- package/dist/components/query-builder/group.d.ts +9 -0
- package/dist/components/query-builder/group.js +396 -0
- package/dist/components/query-builder/group.js.map +1 -0
- package/dist/components/query-builder/index.d.ts +23 -0
- package/dist/components/query-builder/index.js +8 -0
- package/dist/components/query-builder/index.js.map +1 -0
- package/dist/components/query-builder/query-builder.css.d.ts +116 -0
- package/dist/components/query-builder/query-builder.css.js +14 -0
- package/dist/components/query-builder/query-builder.css.js.map +1 -0
- package/dist/components/query-builder/query-builder.d.ts +23 -0
- package/dist/components/query-builder/query-builder.js +196 -0
- package/dist/components/query-builder/query-builder.js.map +1 -0
- package/dist/components/query-builder/rule.d.ts +7 -0
- package/dist/components/query-builder/rule.js +401 -0
- package/dist/components/query-builder/rule.js.map +1 -0
- package/dist/components/query-builder/types.d.ts +146 -0
- package/dist/components/query-builder/types.js +3 -0
- package/dist/components/query-builder/types.js.map +1 -0
- package/dist/components/query-builder/utils.d.ts +32 -0
- package/dist/components/query-builder/utils.js +25 -0
- package/dist/components/query-builder/utils.js.map +1 -0
- package/dist/components/query-builder/value-editor.d.ts +24 -0
- package/dist/components/query-builder/value-editor.js +207 -0
- package/dist/components/query-builder/value-editor.js.map +1 -0
- package/dist/components/query-builder/value-selector.d.ts +6 -0
- package/dist/components/query-builder/value-selector.js +77 -0
- package/dist/components/query-builder/value-selector.js.map +1 -0
- package/dist/components/radio/index.d.ts +7 -0
- package/dist/components/radio/index.js +6 -0
- package/dist/components/radio/index.js.map +1 -0
- package/dist/components/radio/radio.css.d.ts +41 -0
- package/dist/components/radio/radio.css.js +14 -0
- package/dist/components/radio/radio.css.js.map +1 -0
- package/dist/components/radio/radio.d.ts +23 -0
- package/dist/components/radio/radio.js +114 -0
- package/dist/components/radio/radio.js.map +1 -0
- package/dist/components/radio/types.d.ts +32 -0
- package/dist/components/radio/types.js +3 -0
- package/dist/components/radio/types.js.map +1 -0
- package/dist/components/search-field/index.d.ts +12 -0
- package/dist/components/search-field/index.js +6 -0
- package/dist/components/search-field/index.js.map +1 -0
- package/dist/components/search-field/search-field.css.d.ts +28 -0
- package/dist/components/search-field/search-field.css.js +11 -0
- package/dist/components/search-field/search-field.css.js.map +1 -0
- package/dist/components/search-field/search-field.d.ts +21 -0
- package/dist/components/search-field/search-field.js +92 -0
- package/dist/components/search-field/search-field.js.map +1 -0
- package/dist/components/search-field/types.d.ts +34 -0
- package/dist/components/search-field/types.js +3 -0
- package/dist/components/search-field/types.js.map +1 -0
- package/dist/components/select/index.d.ts +12 -0
- package/dist/components/select/index.js +6 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/select.css.d.ts +37 -0
- package/dist/components/select/select.css.js +12 -0
- package/dist/components/select/select.css.js.map +1 -0
- package/dist/components/select/select.d.ts +20 -0
- package/dist/components/select/select.js +109 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/select/types.d.ts +36 -0
- package/dist/components/select/types.js +3 -0
- package/dist/components/select/types.js.map +1 -0
- package/dist/components/switch/index.d.ts +6 -0
- package/dist/components/switch/index.js +6 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/switch/switch.css.d.ts +31 -0
- package/dist/components/switch/switch.css.js +12 -0
- package/dist/components/switch/switch.css.js.map +1 -0
- package/dist/components/switch/switch.d.ts +10 -0
- package/dist/components/switch/switch.js +60 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/switch/types.d.ts +21 -0
- package/dist/components/switch/types.js +3 -0
- package/dist/components/switch/types.js.map +1 -0
- package/dist/components/tabs/index.d.ts +8 -0
- package/dist/components/tabs/index.js +6 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tabs/tabs.css.d.ts +57 -0
- package/dist/components/tabs/tabs.css.js +15 -0
- package/dist/components/tabs/tabs.css.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +75 -0
- package/dist/components/tabs/tabs.js +258 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tabs/types.d.ts +84 -0
- package/dist/components/tabs/types.js +3 -0
- package/dist/components/tabs/types.js.map +1 -0
- package/dist/components/text-field/index.d.ts +9 -0
- package/dist/components/text-field/index.js +5 -0
- package/dist/components/text-field/index.js.map +1 -0
- package/dist/components/text-field/text-field.css.d.ts +28 -0
- package/dist/components/text-field/text-field.css.js +12 -0
- package/dist/components/text-field/text-field.css.js.map +1 -0
- package/dist/components/text-field/text-field.d.ts +63 -0
- package/dist/components/text-field/text-field.js +91 -0
- package/dist/components/text-field/text-field.js.map +1 -0
- package/dist/components/text-field/types.d.ts +28 -0
- package/dist/components/text-field/types.js +3 -0
- package/dist/components/text-field/types.js.map +1 -0
- package/dist/components/textarea/index.d.ts +6 -0
- package/dist/components/textarea/index.js +6 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/textarea/textarea.css.d.ts +37 -0
- package/dist/components/textarea/textarea.css.js +12 -0
- package/dist/components/textarea/textarea.css.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +19 -0
- package/dist/components/textarea/textarea.js +134 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/textarea/types.d.ts +42 -0
- package/dist/components/textarea/types.js +3 -0
- package/dist/components/textarea/types.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +7 -0
- package/dist/components/tooltip/index.js +6 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tooltip/tooltip.css.d.ts +30 -0
- package/dist/components/tooltip/tooltip.css.js +12 -0
- package/dist/components/tooltip/tooltip.css.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +30 -0
- package/dist/components/tooltip/tooltip.js +112 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/tooltip/types.d.ts +41 -0
- package/dist/components/tooltip/types.js +3 -0
- package/dist/components/tooltip/types.js.map +1 -0
- package/dist/components/tree/index.d.ts +17 -0
- package/dist/components/tree/index.js +6 -0
- package/dist/components/tree/index.js.map +1 -0
- package/dist/components/tree/tree.css.d.ts +90 -0
- package/dist/components/tree/tree.css.js +15 -0
- package/dist/components/tree/tree.css.js.map +1 -0
- package/dist/components/tree/tree.d.ts +29 -0
- package/dist/components/tree/tree.js +491 -0
- package/dist/components/tree/tree.js.map +1 -0
- package/dist/components/tree/types.d.ts +121 -0
- package/dist/components/tree/types.js +3 -0
- package/dist/components/tree/types.js.map +1 -0
- package/dist/components/tree/utils.d.ts +12 -0
- package/dist/components/tree/utils.js +89 -0
- package/dist/components/tree/utils.js.map +1 -0
- package/dist/hooks/index.d.ts +52 -0
- package/dist/hooks/index.js +11 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-collection-render/index.d.ts +3 -0
- package/dist/hooks/use-collection-render/index.js +4 -0
- package/dist/hooks/use-collection-render/index.js.map +1 -0
- package/dist/hooks/use-collection-render/use-collection-render.d.ts +11 -0
- package/dist/hooks/use-collection-render/use-collection-render.js +28 -0
- package/dist/hooks/use-collection-render/use-collection-render.js.map +1 -0
- package/dist/hooks/use-context-props/index.d.ts +3 -0
- package/dist/hooks/use-context-props/index.js +4 -0
- package/dist/hooks/use-context-props/index.js.map +1 -0
- package/dist/hooks/use-context-props/use-context-props.d.ts +10 -0
- package/dist/hooks/use-context-props/use-context-props.js +18 -0
- package/dist/hooks/use-context-props/use-context-props.js.map +1 -0
- package/dist/hooks/use-defaults/index.d.ts +37 -0
- package/dist/hooks/use-defaults/index.js +5 -0
- package/dist/hooks/use-defaults/index.js.map +1 -0
- package/dist/hooks/use-defaults/types.d.ts +83 -0
- package/dist/hooks/use-defaults/types.js +3 -0
- package/dist/hooks/use-defaults/types.js.map +1 -0
- package/dist/hooks/use-defaults/use-defaults.d.ts +96 -0
- package/dist/hooks/use-defaults/use-defaults.js +36 -0
- package/dist/hooks/use-defaults/use-defaults.js.map +1 -0
- package/dist/hooks/use-propagating-press/index.d.ts +2 -0
- package/dist/hooks/use-propagating-press/index.js +4 -0
- package/dist/hooks/use-propagating-press/index.js.map +1 -0
- package/dist/hooks/use-propagating-press/use-propagating-press.d.ts +13 -0
- package/dist/hooks/use-propagating-press/use-propagating-press.js +21 -0
- package/dist/hooks/use-propagating-press/use-propagating-press.js.map +1 -0
- package/dist/hooks/use-slot/index.d.ts +2 -0
- package/dist/hooks/use-slot/index.js +4 -0
- package/dist/hooks/use-slot/index.js.map +1 -0
- package/dist/hooks/use-slot/use-slot.d.ts +16 -0
- package/dist/hooks/use-slot/use-slot.js +21 -0
- package/dist/hooks/use-slot/use-slot.js.map +1 -0
- package/dist/hooks/use-theme/index.d.ts +43 -0
- package/dist/hooks/use-theme/index.js +5 -0
- package/dist/hooks/use-theme/index.js.map +1 -0
- package/dist/hooks/use-theme/types.d.ts +104 -0
- package/dist/hooks/use-theme/types.js +3 -0
- package/dist/hooks/use-theme/types.js.map +1 -0
- package/dist/hooks/use-theme/use-theme.css.d.ts +3 -0
- package/dist/hooks/use-theme/use-theme.css.js +8 -0
- package/dist/hooks/use-theme/use-theme.css.js.map +1 -0
- package/dist/hooks/use-theme/use-theme.d.ts +72 -0
- package/dist/hooks/use-theme/use-theme.js +108 -0
- package/dist/hooks/use-theme/use-theme.js.map +1 -0
- package/dist/hooks/use-tree/index.d.ts +4 -0
- package/dist/hooks/use-tree/index.js +4 -0
- package/dist/hooks/use-tree/index.js.map +1 -0
- package/dist/hooks/use-tree/use-tree.d.ts +7 -0
- package/dist/hooks/use-tree/use-tree.js +262 -0
- package/dist/hooks/use-tree/use-tree.js.map +1 -0
- package/dist/hooks/use-tree/utils.d.ts +10 -0
- package/dist/hooks/use-tree/utils.js +83 -0
- package/dist/hooks/use-tree/utils.js.map +1 -0
- package/dist/hooks/use-update-effect/index.d.ts +1 -0
- package/dist/hooks/use-update-effect/index.js +4 -0
- package/dist/hooks/use-update-effect/index.js.map +1 -0
- package/dist/hooks/use-update-effect/use-update-effect.d.ts +3 -0
- package/dist/hooks/use-update-effect/use-update-effect.js +23 -0
- package/dist/hooks/use-update-effect/use-update-effect.js.map +1 -0
- package/dist/index.css +124 -84
- package/dist/index.d.ts +111 -764
- package/dist/index.js +5 -5295
- package/dist/index.js.map +1 -1
- package/dist/ladle/actions.d.ts +3 -0
- package/dist/ladle/actions.js +26 -0
- package/dist/ladle/actions.js.map +1 -0
- package/dist/ladle/index.d.ts +1 -0
- package/dist/ladle/index.js +4 -0
- package/dist/ladle/index.js.map +1 -0
- package/dist/styles/index.d.ts +6 -0
- package/dist/styles/index.js +9 -0
- package/dist/styles/index.js.map +1 -0
- package/dist/styles/layers.css.d.ts +18 -0
- package/dist/styles/layers.css.js +8 -0
- package/dist/styles/layers.css.js.map +1 -0
- package/dist/styles/reset.css.d.ts +2 -0
- package/dist/styles/reset.css.js +3 -0
- package/dist/styles/reset.css.js.map +1 -0
- package/dist/styles/space.css.d.ts +2 -0
- package/dist/styles/space.css.js +3 -0
- package/dist/styles/space.css.js.map +1 -0
- package/dist/styles/surfaces.css.d.ts +6 -0
- package/dist/styles/surfaces.css.js +8 -0
- package/dist/styles/surfaces.css.js.map +1 -0
- package/dist/styles/theme.css.d.ts +337 -0
- package/dist/styles/theme.css.js +35 -0
- package/dist/styles/theme.css.js.map +1 -0
- package/dist/styles/typography.css.d.ts +21 -0
- package/dist/styles/typography.css.js +12 -0
- package/dist/styles/typography.css.js.map +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.js +6895 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/types/deckgl.d.ts +3 -0
- package/dist/types/deckgl.js +3 -0
- package/dist/types/deckgl.js.map +1 -0
- package/dist/types/generic.d.ts +5 -0
- package/dist/types/generic.js +3 -0
- package/dist/types/generic.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/props.d.ts +6 -0
- package/dist/types/props.js +3 -0
- package/dist/types/props.js.map +1 -0
- package/dist/types/react-aria.d.ts +94 -0
- package/dist/types/react-aria.js +3 -0
- package/dist/types/react-aria.js.map +1 -0
- package/dist/types/react.d.d.ts +22 -0
- package/dist/types/react.d.js +3 -0
- package/dist/types/react.d.js.map +1 -0
- package/dist/types/use-tree.d.ts +56 -0
- package/dist/types/use-tree.js +3 -0
- package/dist/types/use-tree.js.map +1 -0
- package/dist/types/vanilla-extract.d.ts +18 -0
- package/dist/types/vanilla-extract.js +3 -0
- package/dist/types/vanilla-extract.js.map +1 -0
- package/dist/utils/css.d.ts +142 -0
- package/dist/utils/css.js +165 -0
- package/dist/utils/css.js.map +1 -0
- package/dist/utils/events.d.ts +11 -0
- package/dist/utils/events.js +10 -0
- package/dist/utils/events.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/props.d.ts +32 -0
- package/dist/utils/props.js +144 -0
- package/dist/utils/props.js.map +1 -0
- package/dist/utils/validators.d.ts +52 -0
- package/dist/utils/validators.js +42 -0
- package/dist/utils/validators.js.map +1 -0
- package/dist/vanilla.d.ts +63 -3
- package/dist/vanilla.js +27 -1
- package/dist/vanilla.js.map +1 -1
- package/package.json +59 -54
- package/dist/chunk-4ZUGQMUD.js +0 -419
- package/dist/chunk-4ZUGQMUD.js.map +0 -1
- package/dist/index.css.map +0 -1
- package/dist/vanilla-oo0eN2ya.d.ts +0 -2628
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @accelint/design-system
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This library is a collection of UI components and tools for engineers to build precise user experiences for specialized systems.
|
|
4
4
|
|
|
5
5
|
## Why does this design system exist?
|
|
6
6
|
|
|
7
|
-
This design system
|
|
7
|
+
This design system was born of three essential business priorities:
|
|
8
8
|
|
|
9
9
|
- We want to improve runtime performance of our applications.
|
|
10
10
|
- We require more flexible tools for building specialized UI than was available in traditional "out of the box" libraries.
|
|
@@ -12,13 +12,13 @@ This design system, which we've designated C2DS for simplicity, was born of thre
|
|
|
12
12
|
|
|
13
13
|
From an engineering perspective, we also want to future-proof our investment by switching to an approach more natively compatible with React Server Components. This is the future of React and getting out ahead of that transition is valuable before it becomes a significant pain point inhibiting rapid feature development.
|
|
14
14
|
|
|
15
|
-
Developed by the Core team at Accelint,
|
|
15
|
+
Developed by the Core team at Accelint, the design system is a shared platform that all engineers can -- and are encouraged -- to contribute to. This system is published as open source to invite collaboration across our partners and the engineering community in general.
|
|
16
16
|
|
|
17
17
|
### Performance
|
|
18
18
|
|
|
19
19
|
The runtime performance of our applications is an enduring central concern. Our applications place a high performance demand on the browser client, primarily due to the sheer data throughput and intensive rendering requirements. Therefore, it makes sense to move away from a runtime CSS-in-JS solution in favor of a build/compile time styling solution.
|
|
20
20
|
|
|
21
|
-
[Advantages >](./
|
|
21
|
+
[Advantages >](./documents/concepts#build-and-runtime)
|
|
22
22
|
|
|
23
23
|
### Flexibility and control
|
|
24
24
|
|
|
@@ -26,25 +26,25 @@ The highly bespoke nature of some of our feature implementation is a constant so
|
|
|
26
26
|
|
|
27
27
|
We also want to establish a common platform for multiple similar, but stylistically and functionally unique, applications to be built on a consistent design language with fewer established opinions. The intent here is to provide all the power and flexibility of a custom solution while maintaining a common foundation for interoperability with different digital properties.
|
|
28
28
|
|
|
29
|
-
## What does
|
|
29
|
+
## What does the design system consist of?
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
The design system is a semi-headless, themeless collection of components that express minimal opinions about layout and baked-in styles with an API of props for each component that strives to suit many common use cases.
|
|
32
32
|
|
|
33
33
|
The vast majority of spacing and color theming is left up to the implementer to define. For every element of this system, the priority has been flexibility over rigid requirements and an "escape hatch" for overriding style and behavior if necessary.
|
|
34
34
|
|
|
35
35
|
## Why isn't there a theme or icons?
|
|
36
36
|
|
|
37
|
-
While the exported modules of this package do not include a theme, the Ladle stories for each component utilize a theme established within the
|
|
37
|
+
While the exported modules of this package do not include a theme, the Ladle stories for each component utilize a theme established within the `.ladle/theme` folder for documentation purposes. You can feel free to use this as a starting point for your app's implementation and customize it to suit your needs.
|
|
38
38
|
|
|
39
39
|
The icons are also missing because we're trying to avoid locking this design system into a specific design language -- they are considered a part of the theming and an application-level concern. Each component that supports icons expects them to be implemented through composition. This enables maximum flexibility and freedom for the implementing app.
|
|
40
40
|
|
|
41
41
|
## Concepts
|
|
42
42
|
|
|
43
|
-
This design system is built on a number of concepts with which you may not be familiar. [Learn](./
|
|
43
|
+
This design system is built on a number of concepts with which you may not be familiar. [Learn](./documents/concepts) about the technologies, packages, abstractions and patterns that power this design system.
|
|
44
44
|
|
|
45
45
|
## Getting started
|
|
46
46
|
|
|
47
|
-
Check out what exists. You can review the components, tokens and primitives available in the system using the Ladle stories for each element: [
|
|
47
|
+
Check out what exists. You can review the components, tokens and primitives available in the system using the Ladle stories for each element: [Stories](https://gohypergiant.github.io/standard-toolkit).
|
|
48
48
|
|
|
49
49
|
From the root of the standard toolkit project, run:
|
|
50
50
|
|
|
@@ -60,8 +60,8 @@ If you run into errors, try running
|
|
|
60
60
|
|
|
61
61
|
### Implementation
|
|
62
62
|
|
|
63
|
-
[Learn](./
|
|
63
|
+
[Learn](./documents/implementation) how to get your app up and running.
|
|
64
64
|
|
|
65
65
|
### Contribution
|
|
66
66
|
|
|
67
|
-
[Learn](./
|
|
67
|
+
[Learn](./documents/contribution) how to craft components for this design system.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export { __export };
|
|
8
|
+
//# sourceMappingURL=chunk-PZ5AY32C.js.map
|
|
9
|
+
//# sourceMappingURL=chunk-PZ5AY32C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-PZ5AY32C.js"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { RefAttributes } from 'react';
|
|
3
|
+
import * as react_aria_components from 'react-aria-components';
|
|
4
|
+
import { ContextValue, SectionProps, SelectValueProps } from 'react-aria-components';
|
|
5
|
+
|
|
6
|
+
declare const AriaFieldError: (props: react_aria_components.FieldErrorProps & RefAttributes<HTMLElement>) => react.ReactElement | null;
|
|
7
|
+
declare const AriaFieldErrorContext: react.Context<ContextValue<react_aria_components.FieldErrorProps & RefAttributes<HTMLElement>, HTMLElement>>;
|
|
8
|
+
declare const AriaGroup: (props: react_aria_components.GroupProps & RefAttributes<HTMLDivElement>) => react.ReactElement | null;
|
|
9
|
+
declare const AriaGroupContext: react.Context<ContextValue<react_aria_components.GroupProps & RefAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
10
|
+
declare const AriaHeader: (props: react.HTMLAttributes<HTMLElement> & RefAttributes<object> & RefAttributes<HTMLElement>) => react.ReactElement | null;
|
|
11
|
+
declare const AriaHeaderContext: react.Context<ContextValue<react.HTMLAttributes<HTMLElement> & RefAttributes<object>, HTMLElement>>;
|
|
12
|
+
declare const AriaHeading: (props: react_aria_components.HeadingProps & RefAttributes<HTMLHeadingElement>) => react.ReactElement | null;
|
|
13
|
+
declare const AriaHeadingContext: react.Context<ContextValue<react_aria_components.HeadingProps & RefAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
14
|
+
declare const AriaKeyboard: (props: react.HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>) => react.ReactElement | null;
|
|
15
|
+
declare const AriaKeyboardContext: react.Context<ContextValue<react.HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>, HTMLElement>>;
|
|
16
|
+
declare const AriaLabel: (props: react_aria_components.LabelProps & RefAttributes<HTMLLabelElement>) => react.ReactElement | null;
|
|
17
|
+
declare const AriaLabelContext: react.Context<ContextValue<react_aria_components.LabelProps & RefAttributes<HTMLLabelElement>, HTMLLabelElement>>;
|
|
18
|
+
declare const AriaSeparator: (props: react_aria_components.SeparatorProps & RefAttributes<object> & RefAttributes<HTMLElement>) => react.ReactElement | null;
|
|
19
|
+
declare const AriaSeparatorContext: react.Context<ContextValue<react_aria_components.SeparatorProps & RefAttributes<object>, HTMLElement>>;
|
|
20
|
+
declare const AriaText: (props: react_aria_components.TextProps & RefAttributes<HTMLElement>) => react.ReactElement | null;
|
|
21
|
+
declare const AriaTextContext: react.Context<ContextValue<react_aria_components.TextProps & RefAttributes<HTMLElement>, HTMLElement>>;
|
|
22
|
+
/**
|
|
23
|
+
* Due to the complexity of types and technical constraints of TS, it's not
|
|
24
|
+
* possible for the above wrapping utility to support components that accept
|
|
25
|
+
* generic parameters. This means that these components must be manually wrapped
|
|
26
|
+
*/
|
|
27
|
+
declare const AriaSectionContext: react.Context<ContextValue<SectionProps<object>, HTMLElement>>;
|
|
28
|
+
declare const AriaSection: <T extends object>(props: SectionProps<T> & RefAttributes<HTMLElement>) => react.ReactElement | null;
|
|
29
|
+
declare const AriaSelectValueContext: react.Context<ContextValue<SelectValueProps<object>, HTMLSpanElement>>;
|
|
30
|
+
declare const AriaSelectValue: <T extends object>(props: SelectValueProps<T> & RefAttributes<HTMLSpanElement>) => react.ReactElement | null;
|
|
31
|
+
|
|
32
|
+
export { AriaFieldError, AriaFieldErrorContext, AriaGroup, AriaGroupContext, AriaHeader, AriaHeaderContext, AriaHeading, AriaHeadingContext, AriaKeyboard, AriaKeyboardContext, AriaLabel, AriaLabelContext, AriaSection, AriaSectionContext, AriaSelectValue, AriaSelectValueContext, AriaSeparator, AriaSeparatorContext, AriaText, AriaTextContext };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import '../../chunk-PZ5AY32C.js';
|
|
2
|
+
import { createContext, forwardRef } from 'react';
|
|
3
|
+
import { Section, SelectValue, FieldError, Group, Header, Heading, Keyboard, Label, Separator, Text } from 'react-aria-components';
|
|
4
|
+
import { useContextProps } from '../../hooks/index.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function wrap(Component) {
|
|
8
|
+
const Context = createContext(null);
|
|
9
|
+
return {
|
|
10
|
+
// biome-ignore lint/style/useNamingConvention: intentional
|
|
11
|
+
Component: forwardRef(function WrappedComponent(props, ref) {
|
|
12
|
+
[props, ref] = useContextProps(props, ref, Context);
|
|
13
|
+
return /* @__PURE__ */ jsx(Component, { ...props, ref });
|
|
14
|
+
}),
|
|
15
|
+
Context
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
var { Component: AriaFieldError, Context: AriaFieldErrorContext } = wrap(FieldError);
|
|
19
|
+
var { Component: AriaGroup, Context: AriaGroupContext } = wrap(Group);
|
|
20
|
+
var { Component: AriaHeader, Context: AriaHeaderContext } = wrap(Header);
|
|
21
|
+
var { Component: AriaHeading, Context: AriaHeadingContext } = wrap(Heading);
|
|
22
|
+
var { Component: AriaKeyboard, Context: AriaKeyboardContext } = wrap(Keyboard);
|
|
23
|
+
var { Component: AriaLabel, Context: AriaLabelContext } = wrap(Label);
|
|
24
|
+
var { Component: AriaSeparator, Context: AriaSeparatorContext } = wrap(Separator);
|
|
25
|
+
var { Component: AriaText, Context: AriaTextContext } = wrap(Text);
|
|
26
|
+
var AriaSectionContext = createContext(null);
|
|
27
|
+
var AriaSection = forwardRef(function AriaSection2(props, ref) {
|
|
28
|
+
[props, ref] = useContextProps(props, ref, AriaSectionContext);
|
|
29
|
+
return /* @__PURE__ */ jsx(Section, { ...props, ref });
|
|
30
|
+
});
|
|
31
|
+
var AriaSelectValueContext = createContext(null);
|
|
32
|
+
var AriaSelectValue = forwardRef(function AriaSelectValue2(props, ref) {
|
|
33
|
+
[props, ref] = useContextProps(props, ref, AriaSelectValueContext);
|
|
34
|
+
return /* @__PURE__ */ jsx(SelectValue, { ...props, ref });
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export { AriaFieldError, AriaFieldErrorContext, AriaGroup, AriaGroupContext, AriaHeader, AriaHeaderContext, AriaHeading, AriaHeadingContext, AriaKeyboard, AriaKeyboardContext, AriaLabel, AriaLabelContext, AriaSection, AriaSectionContext, AriaSelectValue, AriaSelectValueContext, AriaSeparator, AriaSeparatorContext, AriaText, AriaTextContext };
|
|
38
|
+
//# sourceMappingURL=aria.js.map
|
|
39
|
+
//# sourceMappingURL=aria.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/aria/aria.tsx"],"names":["AriaSection","AriaSelectValue"],"mappings":";;;;;;AA0CA,SAAS,KACP,SACA,EAAA;AACA,EAAM,MAAA,OAAA,GAAU,cAAkC,IAAI,CAAA;AAEtD,EAAO,OAAA;AAAA;AAAA,IAEL,SAAW,EAAA,UAAA,CAAiB,SAAS,gBAAA,CAAiB,OAAO,GAAK,EAAA;AAChE,MAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,OAAO,CAAA;AAElD,MAAA,uBAAQ,GAAA,CAAA,SAAA,EAAA,EAAW,GAAG,KAAA,EAAO,GAAU,EAAA,CAAA;AAAA,KACxC,CAAA;AAAA,IACD;AAAA,GACF;AACF;AAEO,IAAM,EAAE,SAAW,EAAA,cAAA,EAAgB,SAAS,qBAAsB,EAAA,GACvE,KAAK,UAAU;AAEV,IAAM,EAAE,SAAW,EAAA,SAAA,EAAW,SAAS,gBAAiB,EAAA,GAAI,KAAK,KAAK;AAEtE,IAAM,EAAE,SAAW,EAAA,UAAA,EAAY,SAAS,iBAAkB,EAAA,GAC/D,KAAK,MAAM;AAEN,IAAM,EAAE,SAAW,EAAA,WAAA,EAAa,SAAS,kBAAmB,EAAA,GACjE,KAAK,OAAO;AAEP,IAAM,EAAE,SAAW,EAAA,YAAA,EAAc,SAAS,mBAAoB,EAAA,GACnE,KAAK,QAAQ;AAER,IAAM,EAAE,SAAW,EAAA,SAAA,EAAW,SAAS,gBAAiB,EAAA,GAAI,KAAK,KAAK;AAEtE,IAAM,EAAE,SAAW,EAAA,aAAA,EAAe,SAAS,oBAAqB,EAAA,GACrE,KAAK,SAAS;AAET,IAAM,EAAE,SAAW,EAAA,QAAA,EAAU,SAAS,eAAgB,EAAA,GAAI,KAAK,IAAI;AAQ7D,IAAA,kBAAA,GACX,cAA+D,IAAI;AAE9D,IAAM,WAAc,GAAA,UAAA,CAAW,SAASA,YAAAA,CAC7C,OACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,kBAAkB,CAAA;AAE7D,EAAA,uBAAQ,GAAA,CAAA,OAAA,EAAA,EAAS,GAAG,KAAA,EAAO,GAAU,EAAA,CAAA;AACvC,CAAC;AAEY,IAAA,sBAAA,GACX,cAAuE,IAAI;AAEtE,IAAM,eAAkB,GAAA,UAAA,CAAW,SAASC,gBAAAA,CAEjD,OAA4B,GAAoC,EAAA;AAChE,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,sBAAsB,CAAA;AAEjE,EAAA,uBAAQ,GAAA,CAAA,WAAA,EAAA,EAAa,GAAG,KAAA,EAAO,GAAU,EAAA,CAAA;AAC3C,CAAC","file":"aria.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n type ForwardedRef,\n type ReactNode,\n type RefAttributes,\n createContext,\n forwardRef,\n} from 'react';\nimport {\n type ContextValue,\n FieldError,\n Group,\n Header,\n Heading,\n Keyboard,\n Label,\n Section,\n type SectionProps,\n SelectValue,\n type SelectValueProps,\n Separator,\n Text,\n} from 'react-aria-components';\nimport { useContextProps } from '../../hooks';\n\n/**\n * To better align with the guidance from RAC about establishing a unique\n * context for components to avoid conflict of props being provided by RAC\n * and design system components, this wrapping utility accepts an RAC and returns\n * a wrapped version along with the new context for the design system to use\n */\nfunction wrap<P extends object, E extends HTMLElement>(\n Component: (props: P & RefAttributes<E>) => ReactNode,\n) {\n const Context = createContext<ContextValue<P, E>>(null);\n\n return {\n // biome-ignore lint/style/useNamingConvention: intentional\n Component: forwardRef<E, P>(function WrappedComponent(props, ref) {\n [props, ref] = useContextProps(props, ref, Context);\n\n return <Component {...props} ref={ref} />;\n }),\n Context,\n };\n}\n\nexport const { Component: AriaFieldError, Context: AriaFieldErrorContext } =\n wrap(FieldError);\n\nexport const { Component: AriaGroup, Context: AriaGroupContext } = wrap(Group);\n\nexport const { Component: AriaHeader, Context: AriaHeaderContext } =\n wrap(Header);\n\nexport const { Component: AriaHeading, Context: AriaHeadingContext } =\n wrap(Heading);\n\nexport const { Component: AriaKeyboard, Context: AriaKeyboardContext } =\n wrap(Keyboard);\n\nexport const { Component: AriaLabel, Context: AriaLabelContext } = wrap(Label);\n\nexport const { Component: AriaSeparator, Context: AriaSeparatorContext } =\n wrap(Separator);\n\nexport const { Component: AriaText, Context: AriaTextContext } = wrap(Text);\n\n/**\n * Due to the complexity of types and technical constraints of TS, it's not\n * possible for the above wrapping utility to support components that accept\n * generic parameters. This means that these components must be manually wrapped\n */\n\nexport const AriaSectionContext =\n createContext<ContextValue<SectionProps<object>, HTMLElement>>(null);\n\nexport const AriaSection = forwardRef(function AriaSection<T extends object>(\n props: SectionProps<T>,\n ref: ForwardedRef<HTMLElement>,\n) {\n [props, ref] = useContextProps(props, ref, AriaSectionContext);\n\n return <Section {...props} ref={ref} />;\n});\n\nexport const AriaSelectValueContext =\n createContext<ContextValue<SelectValueProps<object>, HTMLSpanElement>>(null);\n\nexport const AriaSelectValue = forwardRef(function AriaSelectValue<\n T extends object,\n>(props: SelectValueProps<T>, ref: ForwardedRef<HTMLSpanElement>) {\n [props, ref] = useContextProps(props, ref, AriaSelectValueContext);\n\n return <SelectValue {...props} ref={ref} />;\n});\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AriaFieldError, AriaFieldErrorContext, AriaGroup, AriaGroupContext, AriaHeader, AriaHeaderContext, AriaHeading, AriaHeadingContext, AriaKeyboard, AriaKeyboardContext, AriaLabel, AriaLabelContext, AriaSection, AriaSectionContext, AriaSelectValue, AriaSelectValueContext, AriaSeparator, AriaSeparatorContext, AriaText, AriaTextContext } from './aria.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react-aria-components';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../../chunk-PZ5AY32C.js';
|
|
2
|
+
export { AriaFieldError, AriaFieldErrorContext, AriaGroup, AriaGroupContext, AriaHeader, AriaHeaderContext, AriaHeading, AriaHeadingContext, AriaKeyboard, AriaKeyboardContext, AriaLabel, AriaLabelContext, AriaSection, AriaSectionContext, AriaSelectValue, AriaSelectValueContext, AriaSeparator, AriaSeparatorContext, AriaText, AriaTextContext } from './aria.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ButtonClassNames } from './types.js';
|
|
2
|
+
import 'react-aria-components';
|
|
3
|
+
import '../../types/props.js';
|
|
4
|
+
import '../../types/react-aria.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../icon/types.js';
|
|
7
|
+
|
|
8
|
+
declare const buttonContainer: string;
|
|
9
|
+
declare const buttonColorVars: {
|
|
10
|
+
nonSolidColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
+
bareBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
|
+
hollowBorder: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
13
|
+
solidBackground: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
14
|
+
solidColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
15
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
+
border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
17
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
18
|
+
};
|
|
19
|
+
declare const buttonSpaceVars: {
|
|
20
|
+
gap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
+
minWidth: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
22
|
+
width: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
23
|
+
x: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
24
|
+
y: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
+
};
|
|
26
|
+
declare const buttonStateVars: {
|
|
27
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
+
size: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
+
variant: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
30
|
+
isCurrent: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
31
|
+
isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
32
|
+
isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
33
|
+
isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
34
|
+
isHovered: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
35
|
+
isPending: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
36
|
+
isPressed: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
37
|
+
isSelected: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
38
|
+
};
|
|
39
|
+
declare const buttonClassNames: ButtonClassNames;
|
|
40
|
+
|
|
41
|
+
export { buttonClassNames, buttonColorVars, buttonContainer, buttonSpaceVars, buttonStateVars };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '../../chunk-PZ5AY32C.js';
|
|
2
|
+
|
|
3
|
+
// src/components/button/button.css.ts
|
|
4
|
+
var buttonClassNames = { container: "button_buttonClassNames_container__17k72zwp", button: "button_buttonClassNames_button__17k72zwq" };
|
|
5
|
+
var buttonColorVars = { nonSolidColor: "var(--nonSolidColor__17k72zw1)", bareBackground: "var(--bareBackground__17k72zw2)", hollowBorder: "var(--hollowBorder__17k72zw3)", solidBackground: "var(--solidBackground__17k72zw4)", solidColor: "var(--solidColor__17k72zw5)", background: "var(--background__17k72zw6)", border: "var(--border__17k72zw7)", color: "var(--color__17k72zw8)" };
|
|
6
|
+
var buttonContainer = "button_buttonContainer__17k72zw0";
|
|
7
|
+
var buttonSpaceVars = { gap: "var(--gap__17k72zw9)", minWidth: "var(--minWidth__17k72zwa)", width: "var(--width__17k72zwb)", x: "var(--x__17k72zwc)", y: "var(--y__17k72zwd)" };
|
|
8
|
+
var buttonStateVars = { color: "var(--color__17k72zwe)", size: "var(--size__17k72zwf)", variant: "var(--variant__17k72zwg)", isCurrent: "var(--isCurrent__17k72zwh)", isDisabled: "var(--isDisabled__17k72zwi)", isFocused: "var(--isFocused__17k72zwj)", isFocusVisible: "var(--isFocusVisible__17k72zwk)", isHovered: "var(--isHovered__17k72zwl)", isPending: "var(--isPending__17k72zwm)", isPressed: "var(--isPressed__17k72zwn)", isSelected: "var(--isSelected__17k72zwo)" };
|
|
9
|
+
|
|
10
|
+
export { buttonClassNames, buttonColorVars, buttonContainer, buttonSpaceVars, buttonStateVars };
|
|
11
|
+
//# sourceMappingURL=button.css.js.map
|
|
12
|
+
//# sourceMappingURL=button.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/button.css.ts"],"names":[],"mappings":";;;AAAO,IAAI,gBAAmB,GAAA,EAAC,SAAU,EAAA,6CAAA,EAA8C,QAAO,0CAA0C;AACjI,IAAI,kBAAkB,EAAC,aAAA,EAAc,gCAAiC,EAAA,cAAA,EAAe,mCAAkC,YAAa,EAAA,+BAAA,EAAgC,eAAgB,EAAA,kCAAA,EAAmC,YAAW,6BAA8B,EAAA,UAAA,EAAW,+BAA8B,MAAO,EAAA,yBAAA,EAA0B,OAAM,wBAAwB;AACxW,IAAI,eAAkB,GAAA;AAClB,IAAA,eAAA,GAAkB,EAAC,GAAA,EAAI,sBAAuB,EAAA,QAAA,EAAS,2BAA4B,EAAA,KAAA,EAAM,wBAAyB,EAAA,CAAA,EAAE,oBAAqB,EAAA,CAAA,EAAE,oBAAoB;AAC/J,IAAA,eAAA,GAAkB,EAAC,KAAM,EAAA,wBAAA,EAAyB,MAAK,uBAAwB,EAAA,OAAA,EAAQ,0BAA2B,EAAA,SAAA,EAAU,4BAA6B,EAAA,UAAA,EAAW,+BAA8B,SAAU,EAAA,4BAAA,EAA6B,cAAe,EAAA,iCAAA,EAAkC,SAAU,EAAA,4BAAA,EAA6B,WAAU,4BAA6B,EAAA,SAAA,EAAU,4BAA6B,EAAA,UAAA,EAAW,6BAA6B","file":"button.css.js","sourcesContent":["export var buttonClassNames = {container:'button_buttonClassNames_container__17k72zwp',button:'button_buttonClassNames_button__17k72zwq'};\nexport var buttonColorVars = {nonSolidColor:'var(--nonSolidColor__17k72zw1)',bareBackground:'var(--bareBackground__17k72zw2)',hollowBorder:'var(--hollowBorder__17k72zw3)',solidBackground:'var(--solidBackground__17k72zw4)',solidColor:'var(--solidColor__17k72zw5)',background:'var(--background__17k72zw6)',border:'var(--border__17k72zw7)',color:'var(--color__17k72zw8)'};\nexport var buttonContainer = 'button_buttonContainer__17k72zw0';\nexport var buttonSpaceVars = {gap:'var(--gap__17k72zw9)',minWidth:'var(--minWidth__17k72zwa)',width:'var(--width__17k72zwb)',x:'var(--x__17k72zwc)',y:'var(--y__17k72zwd)'};\nexport var buttonStateVars = {color:'var(--color__17k72zwe)',size:'var(--size__17k72zwf)',variant:'var(--variant__17k72zwg)',isCurrent:'var(--isCurrent__17k72zwh)',isDisabled:'var(--isDisabled__17k72zwi)',isFocused:'var(--isFocused__17k72zwj)',isFocusVisible:'var(--isFocusVisible__17k72zwk)',isHovered:'var(--isHovered__17k72zwl)',isPending:'var(--isPending__17k72zwm)',isPressed:'var(--isPressed__17k72zwn)',isSelected:'var(--isSelected__17k72zwo)'};"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { Context } from 'react';
|
|
3
|
+
import * as react_aria_components from 'react-aria-components';
|
|
4
|
+
import { ContextValue } from 'react-aria-components';
|
|
5
|
+
import { ButtonRenderProps, ButtonColors, ButtonMapping, ButtonSizes, ButtonVariants, ButtonProps, LinkButtonProps, ToggleButtonProps } from './types.js';
|
|
6
|
+
import { RenderPropsChildren } from '../../types/react-aria.js';
|
|
7
|
+
import '../../types/props.js';
|
|
8
|
+
import '../icon/types.js';
|
|
9
|
+
|
|
10
|
+
declare const ButtonContext: Context<ContextValue<ButtonProps, HTMLButtonElement>>;
|
|
11
|
+
declare const Button: (props: Omit<react_aria_components.ButtonProps, "children" | "className" | "style"> & {
|
|
12
|
+
children?: RenderPropsChildren<ButtonRenderProps>;
|
|
13
|
+
classNames?: Partial<{
|
|
14
|
+
container: string;
|
|
15
|
+
button: string;
|
|
16
|
+
}> | undefined;
|
|
17
|
+
color?: ButtonColors;
|
|
18
|
+
mapping?: Partial<ButtonMapping>;
|
|
19
|
+
size?: ButtonSizes;
|
|
20
|
+
variant?: ButtonVariants;
|
|
21
|
+
} & react.RefAttributes<HTMLButtonElement>) => react.ReactElement | null;
|
|
22
|
+
declare const LinkButtonContext: Context<ContextValue<LinkButtonProps, HTMLAnchorElement>>;
|
|
23
|
+
declare const LinkButton: (props: Omit<react_aria_components.LinkProps, "children" | "className" | "style"> & {
|
|
24
|
+
children?: RenderPropsChildren<ButtonRenderProps>;
|
|
25
|
+
classNames?: Partial<{
|
|
26
|
+
container: string;
|
|
27
|
+
button: string;
|
|
28
|
+
}> | undefined;
|
|
29
|
+
color?: ButtonColors;
|
|
30
|
+
mapping?: Partial<ButtonMapping>;
|
|
31
|
+
size?: ButtonSizes;
|
|
32
|
+
variant?: ButtonVariants;
|
|
33
|
+
} & react.RefAttributes<HTMLAnchorElement>) => react.ReactElement | null;
|
|
34
|
+
declare const ToggleButtonContext: Context<ContextValue<ToggleButtonProps, HTMLButtonElement>>;
|
|
35
|
+
declare const ToggleButton: (props: Omit<react_aria_components.ToggleButtonProps, "children" | "className" | "style"> & {
|
|
36
|
+
children?: RenderPropsChildren<ButtonRenderProps>;
|
|
37
|
+
classNames?: Partial<{
|
|
38
|
+
container: string;
|
|
39
|
+
button: string;
|
|
40
|
+
}> | undefined;
|
|
41
|
+
color?: ButtonColors;
|
|
42
|
+
mapping?: Partial<ButtonMapping>;
|
|
43
|
+
size?: ButtonSizes;
|
|
44
|
+
variant?: ButtonVariants;
|
|
45
|
+
} & react.RefAttributes<HTMLButtonElement>) => react.ReactElement | null;
|
|
46
|
+
|
|
47
|
+
export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import '../../chunk-PZ5AY32C.js';
|
|
2
|
+
import { noop } from '@accelint/core';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { createContext, forwardRef, useMemo, useCallback } from 'react';
|
|
5
|
+
import { Button as Button$1, Link, ToggleButton as ToggleButton$1, Provider } from 'react-aria-components';
|
|
6
|
+
import { useContextProps, useDefaultProps, useTheme } from '../../hooks/index.js';
|
|
7
|
+
import { bodies, surfaces } from '../../styles/index.js';
|
|
8
|
+
import { mergeClassNames, inlineVars, callRenderProps } from '../../utils/index.js';
|
|
9
|
+
import { IconContext } from '../icon/index.js';
|
|
10
|
+
import { buttonClassNames, buttonStateVars } from './button.css.js';
|
|
11
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
|
+
|
|
13
|
+
var noopToggleState = { isSelected: false, setSelected: noop, toggle: noop };
|
|
14
|
+
var buttonSizes = ["xs", "sm", "md", "lg", "xl"];
|
|
15
|
+
var defaultMapping = {
|
|
16
|
+
font: bodies,
|
|
17
|
+
icon: buttonSizes.reduce(
|
|
18
|
+
(acc, size) => {
|
|
19
|
+
acc[size] = { size };
|
|
20
|
+
return acc;
|
|
21
|
+
},
|
|
22
|
+
{}
|
|
23
|
+
)
|
|
24
|
+
};
|
|
25
|
+
function useButton(props, ref, context, key) {
|
|
26
|
+
[props, ref] = useContextProps(props, ref, context);
|
|
27
|
+
props = useDefaultProps(props, key);
|
|
28
|
+
const {
|
|
29
|
+
children: childrenProp,
|
|
30
|
+
classNames: classNamesProp,
|
|
31
|
+
color = "primary",
|
|
32
|
+
mapping: mappingProp,
|
|
33
|
+
size = "md",
|
|
34
|
+
variant = "solid",
|
|
35
|
+
...rest
|
|
36
|
+
} = props;
|
|
37
|
+
const theme = useTheme();
|
|
38
|
+
const mapping = useMemo(
|
|
39
|
+
() => ({
|
|
40
|
+
...defaultMapping,
|
|
41
|
+
...mappingProp
|
|
42
|
+
}),
|
|
43
|
+
[mappingProp]
|
|
44
|
+
);
|
|
45
|
+
const classNames = useMemo(
|
|
46
|
+
() => mergeClassNames(buttonClassNames, theme.Button, classNamesProp, {
|
|
47
|
+
button: clsx(
|
|
48
|
+
mapping.font[size],
|
|
49
|
+
variant === "floating" && surfaces.default.proud
|
|
50
|
+
)
|
|
51
|
+
}),
|
|
52
|
+
[theme.Button, classNamesProp, mapping.font, size, variant]
|
|
53
|
+
);
|
|
54
|
+
const style = useCallback(
|
|
55
|
+
(renderProps) => inlineVars(buttonStateVars, {
|
|
56
|
+
isCurrent: false,
|
|
57
|
+
isSelected: false,
|
|
58
|
+
...renderProps,
|
|
59
|
+
color,
|
|
60
|
+
size,
|
|
61
|
+
variant
|
|
62
|
+
}),
|
|
63
|
+
[color, size, variant]
|
|
64
|
+
);
|
|
65
|
+
const values = useMemo(() => [[IconContext, mapping.icon[size]]], [mapping.icon, size]);
|
|
66
|
+
const children = useCallback(
|
|
67
|
+
(renderProps) => /* @__PURE__ */ jsx(Provider, { values, children: /* @__PURE__ */ jsx("span", { className: classNames?.button, children: callRenderProps(childrenProp, {
|
|
68
|
+
state: noopToggleState,
|
|
69
|
+
isCurrent: false,
|
|
70
|
+
isPending: false,
|
|
71
|
+
isSelected: false,
|
|
72
|
+
...renderProps
|
|
73
|
+
}) }) }),
|
|
74
|
+
[values, classNames?.button, childrenProp]
|
|
75
|
+
);
|
|
76
|
+
return useMemo(
|
|
77
|
+
() => ({ ...rest, ref, children, className: classNames?.container, style }),
|
|
78
|
+
[rest, ref, children, classNames?.container, style]
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
var ButtonContext = createContext(null);
|
|
82
|
+
var Button = forwardRef(function Button2(props, ref) {
|
|
83
|
+
const buttonProps = useButton(props, ref, ButtonContext, "Button");
|
|
84
|
+
return /* @__PURE__ */ jsx(Button$1, { ...buttonProps });
|
|
85
|
+
});
|
|
86
|
+
var LinkButtonContext = createContext(null);
|
|
87
|
+
var LinkButton = forwardRef(function LinkButton2(props, ref) {
|
|
88
|
+
const buttonProps = useButton(props, ref, LinkButtonContext, "LinkButton");
|
|
89
|
+
return /* @__PURE__ */ jsx(Link, { ...buttonProps });
|
|
90
|
+
});
|
|
91
|
+
var ToggleButtonContext = createContext(null);
|
|
92
|
+
var ToggleButton = forwardRef(function ToggleButton2(props, ref) {
|
|
93
|
+
const buttonProps = useButton(
|
|
94
|
+
props,
|
|
95
|
+
ref,
|
|
96
|
+
ToggleButtonContext,
|
|
97
|
+
"ToggleButton"
|
|
98
|
+
);
|
|
99
|
+
return /* @__PURE__ */ jsx(ToggleButton$1, { ...buttonProps });
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext };
|
|
103
|
+
//# sourceMappingURL=button.js.map
|
|
104
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/button.tsx"],"names":["Button","RACButton","LinkButton","ToggleButton","RACToggleButton"],"mappings":";;;;;;;;;;;;AA8CA,IAAM,kBAAkB,EAAE,UAAA,EAAY,OAAO,WAAa,EAAA,IAAA,EAAM,QAAQ,IAAK,EAAA;AAC7E,IAAM,cAA6B,CAAC,IAAA,EAAM,IAAM,EAAA,IAAA,EAAM,MAAM,IAAI,CAAA;AAEhE,IAAM,cAAgC,GAAA;AAAA,EACpC,IAAM,EAAA,MAAA;AAAA,EACN,MAAM,WAAY,CAAA,MAAA;AAAA,IAChB,CAAC,KAAK,IAAS,KAAA;AACb,MAAI,GAAA,CAAA,IAAI,CAAI,GAAA,EAAE,IAAK,EAAA;AAEnB,MAAO,OAAA,GAAA;AAAA,KACT;AAAA,IACA;AAAC;AAEL,CAAA;AAEA,SAAS,SAIP,CAAA,KAAA,EACA,GACA,EAAA,OAAA,EACA,GACA,EAAA;AACA,EAAA,CAAC,OAAO,GAAG,CAAA,GAAI,eAAgB,CAAA,KAAA,EAAO,KAAK,OAAO,CAAA;AAElD,EAAQ,KAAA,GAAA,eAAA,CAAgB,OAAO,GAAG,CAAA;AAElC,EAAM,MAAA;AAAA,IACJ,QAAU,EAAA,YAAA;AAAA,IACV,UAAY,EAAA,cAAA;AAAA,IACZ,KAAQ,GAAA,SAAA;AAAA,IACR,OAAS,EAAA,WAAA;AAAA,IACT,IAAO,GAAA,IAAA;AAAA,IACP,OAAU,GAAA,OAAA;AAAA,IACV,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,QAAQ,QAAS,EAAA;AAEvB,EAAA,MAAM,OAAU,GAAA,OAAA;AAAA,IACd,OAAO;AAAA,MACL,GAAG,cAAA;AAAA,MACH,GAAG;AAAA,KACL,CAAA;AAAA,IACA,CAAC,WAAW;AAAA,GACd;AAEA,EAAA,MAAM,UAAa,GAAA,OAAA;AAAA,IACjB,MACE,eAAA,CAAgB,gBAAkB,EAAA,KAAA,CAAM,QAAQ,cAAgB,EAAA;AAAA,MAC9D,MAAQ,EAAA,IAAA;AAAA,QACN,OAAA,CAAQ,KAAK,IAAI,CAAA;AAAA,QACjB,OAAA,KAAY,UAAc,IAAA,QAAA,CAAS,OAAQ,CAAA;AAAA;AAC7C,KACD,CAAA;AAAA,IACH,CAAC,KAAM,CAAA,MAAA,EAAQ,gBAAgB,OAAQ,CAAA,IAAA,EAAM,MAAM,OAAO;AAAA,GAC5D;AAEA,EAAA,MAAM,KAAQ,GAAA,WAAA;AAAA,IACZ,CACE,WAKA,KAAA,UAAA,CAAW,eAAiB,EAAA;AAAA,MAC1B,SAAW,EAAA,KAAA;AAAA,MACX,UAAY,EAAA,KAAA;AAAA,MACZ,GAAG,WAAA;AAAA,MACH,KAAA;AAAA,MACA,IAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA,IACH,CAAC,KAAO,EAAA,IAAA,EAAM,OAAO;AAAA,GACvB;AAEA,EAAA,MAAM,SAAS,OAEb,CAAA,MAAM,CAAC,CAAC,aAAa,OAAQ,CAAA,IAAA,CAAK,IAAI,CAAC,CAAC,CAAG,EAAA,CAAC,OAAQ,CAAA,IAAA,EAAM,IAAI,CAAC,CAAA;AAEjE,EAAA,MAAM,QAAW,GAAA,WAAA;AAAA,IACf,CACE,WAKA,qBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,MAAA,EACR,QAAC,kBAAA,GAAA,CAAA,MAAA,EAAA,EAAK,SAAW,EAAA,UAAA,EAAY,MAC1B,EAAA,QAAA,EAAA,eAAA,CAAgB,YAAc,EAAA;AAAA,MAC7B,KAAO,EAAA,eAAA;AAAA,MACP,SAAW,EAAA,KAAA;AAAA,MACX,SAAW,EAAA,KAAA;AAAA,MACX,UAAY,EAAA,KAAA;AAAA,MACZ,GAAG;AAAA,KACJ,GACH,CACF,EAAA,CAAA;AAAA,IAEF,CAAC,MAAA,EAAQ,UAAY,EAAA,MAAA,EAAQ,YAAY;AAAA,GAC3C;AAEA,EAAO,OAAA,OAAA;AAAA,IACL,OAAO,EAAE,GAAG,IAAA,EAAM,KAAK,QAAU,EAAA,SAAA,EAAW,UAAY,EAAA,SAAA,EAAW,KAAM,EAAA,CAAA;AAAA,IACzE,CAAC,IAAM,EAAA,GAAA,EAAK,QAAU,EAAA,UAAA,EAAY,WAAW,KAAK;AAAA,GACpD;AACF;AAEa,IAAA,aAAA,GACX,cAA4D,IAAI;AAE3D,IAAM,MAAS,GAAA,UAAA,CAAW,SAASA,OAAAA,CACxC,OACA,GACA,EAAA;AACA,EAAA,MAAM,WAAc,GAAA,SAAA,CAAU,KAAO,EAAA,GAAA,EAAK,eAAe,QAAQ,CAAA;AAEjE,EAAO,uBAAA,GAAA,CAACC,QAAW,EAAA,EAAA,GAAG,WAAa,EAAA,CAAA;AACrC,CAAC;AAEY,IAAA,iBAAA,GACX,cAAgE,IAAI;AAE/D,IAAM,UAAa,GAAA,UAAA,CAAW,SAASC,WAAAA,CAC5C,OACA,GACA,EAAA;AACA,EAAA,MAAM,WAAc,GAAA,SAAA,CAAU,KAAO,EAAA,GAAA,EAAK,mBAAmB,YAAY,CAAA;AAEzE,EAAO,uBAAA,GAAA,CAAC,IAAM,EAAA,EAAA,GAAG,WAAa,EAAA,CAAA;AAChC,CAAC;AAEY,IAAA,mBAAA,GACX,cAAkE,IAAI;AAEjE,IAAM,YAAe,GAAA,UAAA,CAAW,SAASC,aAAAA,CAC9C,OACA,GACA,EAAA;AACA,EAAA,MAAM,WAAc,GAAA,SAAA;AAAA,IAClB,KAAA;AAAA,IACA,GAAA;AAAA,IACA,mBAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAO,uBAAA,GAAA,CAACC,cAAiB,EAAA,EAAA,GAAG,WAAa,EAAA,CAAA;AAC3C,CAAC","file":"button.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { noop } from '@accelint/core';\nimport { clsx } from 'clsx';\nimport {\n type Context,\n type ForwardedRef,\n createContext,\n forwardRef,\n useCallback,\n useMemo,\n} from 'react';\nimport {\n type ButtonRenderProps,\n type ContextValue,\n Link,\n type LinkRenderProps,\n Provider,\n Button as RACButton,\n ToggleButton as RACToggleButton,\n type ToggleButtonRenderProps,\n} from 'react-aria-components';\nimport { useContextProps, useDefaultProps, useTheme } from '../../hooks';\nimport { bodies, surfaces } from '../../styles';\nimport type { OmitProtectedProps } from '../../types';\nimport { callRenderProps, inlineVars, mergeClassNames } from '../../utils';\nimport { IconContext, type IconProps } from '../icon';\nimport { buttonClassNames, buttonStateVars } from './button.css';\nimport type {\n ButtonMapping,\n ButtonProps,\n ButtonSizes,\n LinkButtonProps,\n ToggleButtonProps,\n} from './types';\n\nconst noopToggleState = { isSelected: false, setSelected: noop, toggle: noop };\nconst buttonSizes: ButtonSizes[] = ['xs', 'sm', 'md', 'lg', 'xl'];\n\nconst defaultMapping: ButtonMapping = {\n font: bodies,\n icon: buttonSizes.reduce(\n (acc, size) => {\n acc[size] = { size };\n\n return acc;\n },\n {} as Record<ButtonSizes, OmitProtectedProps<IconProps>>,\n ),\n};\n\nfunction useButton<\n P extends ButtonProps | LinkButtonProps | ToggleButtonProps,\n E extends HTMLElement,\n>(\n props: P,\n ref: ForwardedRef<E>,\n context: Context<ContextValue<P, E>>,\n key: 'Button' | 'LinkButton' | 'ToggleButton',\n) {\n [props, ref] = useContextProps(props, ref, context);\n\n props = useDefaultProps(props, key);\n\n const {\n children: childrenProp,\n classNames: classNamesProp,\n color = 'primary',\n mapping: mappingProp,\n size = 'md',\n variant = 'solid',\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(buttonClassNames, theme.Button, classNamesProp, {\n button: clsx(\n mapping.font[size],\n variant === 'floating' && surfaces.default.proud,\n ),\n }),\n [theme.Button, classNamesProp, mapping.font, size, variant],\n );\n\n const style = useCallback(\n (\n renderProps:\n | ButtonRenderProps\n | LinkRenderProps\n | ToggleButtonRenderProps,\n ) =>\n inlineVars(buttonStateVars, {\n isCurrent: false,\n isSelected: false,\n ...renderProps,\n color,\n size,\n variant,\n }),\n [color, size, variant],\n );\n\n const values = useMemo<\n [[typeof IconContext, ContextValue<IconProps, HTMLDivElement>]]\n >(() => [[IconContext, mapping.icon[size]]], [mapping.icon, size]);\n\n const children = useCallback(\n (\n renderProps:\n | ButtonRenderProps\n | LinkRenderProps\n | ToggleButtonRenderProps,\n ) => (\n <Provider values={values}>\n <span className={classNames?.button}>\n {callRenderProps(childrenProp, {\n state: noopToggleState,\n isCurrent: false,\n isPending: false,\n isSelected: false,\n ...renderProps,\n })}\n </span>\n </Provider>\n ),\n [values, classNames?.button, childrenProp],\n );\n\n return useMemo(\n () => ({ ...rest, ref, children, className: classNames?.container, style }),\n [rest, ref, children, classNames?.container, style],\n );\n}\n\nexport const ButtonContext =\n createContext<ContextValue<ButtonProps, HTMLButtonElement>>(null);\n\nexport const Button = forwardRef(function Button(\n props: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n const buttonProps = useButton(props, ref, ButtonContext, 'Button');\n\n return <RACButton {...buttonProps} />;\n});\n\nexport const LinkButtonContext =\n createContext<ContextValue<LinkButtonProps, HTMLAnchorElement>>(null);\n\nexport const LinkButton = forwardRef(function LinkButton(\n props: LinkButtonProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n const buttonProps = useButton(props, ref, LinkButtonContext, 'LinkButton');\n\n return <Link {...buttonProps} />;\n});\n\nexport const ToggleButtonContext =\n createContext<ContextValue<ToggleButtonProps, HTMLButtonElement>>(null);\n\nexport const ToggleButton = forwardRef(function ToggleButton(\n props: ToggleButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n const buttonProps = useButton(\n props,\n ref,\n ToggleButtonContext,\n 'ToggleButton',\n );\n\n return <RACToggleButton {...buttonProps} />;\n});\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { buttonClassNames, buttonColorVars, buttonContainer, buttonSpaceVars, buttonStateVars } from './button.css.js';
|
|
2
|
+
export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext } from './button.js';
|
|
3
|
+
export { ButtonClassNames, ButtonColors, ButtonMapping, ButtonProps, ButtonRenderProps, ButtonSizes, ButtonState, LinkButtonProps, ToggleButtonProps } from './types.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'react-aria-components';
|
|
6
|
+
import '../../types/react-aria.js';
|
|
7
|
+
import '../../types/props.js';
|
|
8
|
+
import '../icon/types.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import '../../chunk-PZ5AY32C.js';
|
|
2
|
+
export { buttonClassNames, buttonColorVars, buttonContainer, buttonSpaceVars, buttonStateVars } from './button.css.js';
|
|
3
|
+
export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext } from './button.js';
|
|
4
|
+
import './types.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ButtonRenderProps as ButtonRenderProps$1, LinkRenderProps, ToggleButtonRenderProps, ButtonProps as ButtonProps$1, LinkProps, ToggleButtonProps as ToggleButtonProps$1 } from 'react-aria-components';
|
|
2
|
+
import { OmitProtectedProps } from '../../types/props.js';
|
|
3
|
+
import { RenderPropsChildren } from '../../types/react-aria.js';
|
|
4
|
+
import { IconProps } from '../icon/types.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
|
|
7
|
+
type ButtonClassNames = Partial<{
|
|
8
|
+
container: string;
|
|
9
|
+
button: string;
|
|
10
|
+
}>;
|
|
11
|
+
type ButtonColors = 'primary' | 'secondary' | 'tertiary' | 'advisory' | 'affirmative' | 'serious' | 'critical';
|
|
12
|
+
type ButtonSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
13
|
+
type ButtonVariants = 'solid' | 'hollow' | 'bare' | 'icon' | 'floating';
|
|
14
|
+
type ButtonRenderProps = ButtonRenderProps$1 & LinkRenderProps & ToggleButtonRenderProps;
|
|
15
|
+
type ButtonMapping = {
|
|
16
|
+
font: Partial<Record<ButtonSizes, string>>;
|
|
17
|
+
icon: Partial<Record<ButtonSizes, OmitProtectedProps<IconProps>>>;
|
|
18
|
+
};
|
|
19
|
+
type BaseButtonProps = {
|
|
20
|
+
children?: RenderPropsChildren<ButtonRenderProps>;
|
|
21
|
+
classNames?: ButtonClassNames;
|
|
22
|
+
color?: ButtonColors;
|
|
23
|
+
mapping?: Partial<ButtonMapping>;
|
|
24
|
+
size?: ButtonSizes;
|
|
25
|
+
variant?: ButtonVariants;
|
|
26
|
+
};
|
|
27
|
+
type ButtonState = Omit<ButtonRenderProps, 'state'> & Required<Pick<BaseButtonProps, 'color' | 'size' | 'variant'>>;
|
|
28
|
+
type ButtonProps = Omit<ButtonProps$1, 'children' | 'className' | 'style'> & BaseButtonProps;
|
|
29
|
+
type ToggleButtonProps = Omit<ToggleButtonProps$1, 'children' | 'className' | 'style'> & BaseButtonProps;
|
|
30
|
+
type LinkButtonProps = Omit<LinkProps, 'children' | 'className' | 'style'> & BaseButtonProps;
|
|
31
|
+
|
|
32
|
+
export type { ButtonClassNames, ButtonColors, ButtonMapping, ButtonProps, ButtonRenderProps, ButtonSizes, ButtonState, ButtonVariants, LinkButtonProps, ToggleButtonProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CheckboxClassNames } from './types.js';
|
|
2
|
+
import '@react-types/shared';
|
|
3
|
+
import 'react-aria-components';
|
|
4
|
+
import 'type-fest';
|
|
5
|
+
import '../../types/react-aria.js';
|
|
6
|
+
import 'react';
|
|
7
|
+
import '../icon/types.js';
|
|
8
|
+
|
|
9
|
+
declare const checkboxContainer: string;
|
|
10
|
+
declare const checkboxGroupContainer: string;
|
|
11
|
+
declare const checkboxColorVars: {
|
|
12
|
+
border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
13
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
14
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
15
|
+
indicator: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
+
};
|
|
17
|
+
declare const checkboxSpaceVars: {
|
|
18
|
+
dimension: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
19
|
+
gap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
20
|
+
elementGap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
+
};
|
|
22
|
+
declare const checkboxStateVars: {
|
|
23
|
+
alignInput: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
24
|
+
isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
+
isFocused: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
26
|
+
isFocusVisible: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
+
isHovered: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
+
isIndeterminate: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
+
isInvalid: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
30
|
+
isPressed: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
31
|
+
isReadOnly: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
32
|
+
isRequired: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
33
|
+
isSelected: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
34
|
+
};
|
|
35
|
+
declare const checkboxGroupStateVars: {
|
|
36
|
+
orientation: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
37
|
+
isDisabled: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
38
|
+
isReadOnly: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
39
|
+
isRequired: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
40
|
+
isInvalid: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
41
|
+
};
|
|
42
|
+
declare const checkboxClassNames: CheckboxClassNames;
|
|
43
|
+
|
|
44
|
+
export { checkboxClassNames, checkboxColorVars, checkboxContainer, checkboxGroupContainer, checkboxGroupStateVars, checkboxSpaceVars, checkboxStateVars };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import '../../chunk-PZ5AY32C.js';
|
|
2
|
+
|
|
3
|
+
// src/components/checkbox/checkbox.css.ts
|
|
4
|
+
var checkboxClassNames = { checkbox: { container: "checkbox_checkboxClassNames_checkbox_container__1rajo3pp", checkbox: "checkbox_checkboxClassNames_checkbox_checkbox__1rajo3pq", icon: { container: "checkbox_checkboxClassNames_checkbox_icon_container__1rajo3pr" }, label: "checkbox_checkboxClassNames_checkbox_label__1rajo3ps typography_label__j8fgabg" }, group: { container: "checkbox_checkboxClassNames_group_container__1rajo3pt", group: "checkbox_checkboxClassNames_group_group__1rajo3pu", label: "checkbox_checkboxClassNames_group_label__1rajo3pv typography_label__j8fgabg" } };
|
|
5
|
+
var checkboxColorVars = { border: "var(--border__1rajo3p2)", background: "var(--background__1rajo3p3)", color: "var(--color__1rajo3p4)", indicator: "var(--indicator__1rajo3p5)" };
|
|
6
|
+
var checkboxContainer = "checkbox_checkboxContainer__1rajo3p0";
|
|
7
|
+
var checkboxGroupContainer = "checkbox_checkboxGroupContainer__1rajo3p1";
|
|
8
|
+
var checkboxGroupStateVars = { orientation: "var(--orientation__1rajo3pk)", isDisabled: "var(--isDisabled__1rajo3pl)", isReadOnly: "var(--isReadOnly__1rajo3pm)", isRequired: "var(--isRequired__1rajo3pn)", isInvalid: "var(--isInvalid__1rajo3po)" };
|
|
9
|
+
var checkboxSpaceVars = { dimension: "var(--dimension__1rajo3p6)", gap: "var(--gap__1rajo3p7)", elementGap: "var(--elementGap__1rajo3p8)" };
|
|
10
|
+
var checkboxStateVars = { alignInput: "var(--alignInput__1rajo3p9)", isDisabled: "var(--isDisabled__1rajo3pa)", isFocused: "var(--isFocused__1rajo3pb)", isFocusVisible: "var(--isFocusVisible__1rajo3pc)", isHovered: "var(--isHovered__1rajo3pd)", isIndeterminate: "var(--isIndeterminate__1rajo3pe)", isInvalid: "var(--isInvalid__1rajo3pf)", isPressed: "var(--isPressed__1rajo3pg)", isReadOnly: "var(--isReadOnly__1rajo3ph)", isRequired: "var(--isRequired__1rajo3pi)", isSelected: "var(--isSelected__1rajo3pj)" };
|
|
11
|
+
|
|
12
|
+
export { checkboxClassNames, checkboxColorVars, checkboxContainer, checkboxGroupContainer, checkboxGroupStateVars, checkboxSpaceVars, checkboxStateVars };
|
|
13
|
+
//# sourceMappingURL=checkbox.css.js.map
|
|
14
|
+
//# sourceMappingURL=checkbox.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/checkbox/checkbox.css.ts"],"names":[],"mappings":";;;AAAW,IAAA,kBAAA,GAAqB,EAAC,QAAA,EAAS,EAAC,SAAA,EAAU,4DAA2D,QAAS,EAAA,yDAAA,EAA0D,IAAK,EAAA,EAAC,SAAU,EAAA,+DAAA,IAAiE,KAAM,EAAA,gFAAA,EAAkF,EAAA,KAAA,EAAM,EAAC,SAAA,EAAU,yDAAwD,KAAM,EAAA,mDAAA,EAAoD,KAAM,EAAA,6EAAA,EAA8E;AACxiB,IAAA,iBAAA,GAAoB,EAAC,MAAO,EAAA,yBAAA,EAA0B,YAAW,6BAA8B,EAAA,KAAA,EAAM,wBAAyB,EAAA,SAAA,EAAU,4BAA4B;AACxK,IAAI,iBAAoB,GAAA;AACxB,IAAI,sBAAyB,GAAA;AACzB,IAAA,sBAAA,GAAyB,EAAC,WAAA,EAAY,8BAA+B,EAAA,UAAA,EAAW,6BAA8B,EAAA,UAAA,EAAW,6BAA8B,EAAA,UAAA,EAAW,6BAA8B,EAAA,SAAA,EAAU,4BAA4B;AAC1O,IAAI,oBAAoB,EAAC,SAAA,EAAU,8BAA6B,GAAI,EAAA,sBAAA,EAAuB,YAAW,6BAA6B;AAC/H,IAAA,iBAAA,GAAoB,EAAC,UAAW,EAAA,6BAAA,EAA8B,YAAW,6BAA8B,EAAA,SAAA,EAAU,4BAA6B,EAAA,cAAA,EAAe,iCAAkC,EAAA,SAAA,EAAU,8BAA6B,eAAgB,EAAA,kCAAA,EAAmC,SAAU,EAAA,4BAAA,EAA6B,SAAU,EAAA,4BAAA,EAA6B,YAAW,6BAA8B,EAAA,UAAA,EAAW,6BAA8B,EAAA,UAAA,EAAW,6BAA6B","file":"checkbox.css.js","sourcesContent":["export var checkboxClassNames = {checkbox:{container:'checkbox_checkboxClassNames_checkbox_container__1rajo3pp',checkbox:'checkbox_checkboxClassNames_checkbox_checkbox__1rajo3pq',icon:{container:'checkbox_checkboxClassNames_checkbox_icon_container__1rajo3pr'},label:'checkbox_checkboxClassNames_checkbox_label__1rajo3ps typography_label__j8fgabg'},group:{container:'checkbox_checkboxClassNames_group_container__1rajo3pt',group:'checkbox_checkboxClassNames_group_group__1rajo3pu',label:'checkbox_checkboxClassNames_group_label__1rajo3pv typography_label__j8fgabg'}};\nexport var checkboxColorVars = {border:'var(--border__1rajo3p2)',background:'var(--background__1rajo3p3)',color:'var(--color__1rajo3p4)',indicator:'var(--indicator__1rajo3p5)'};\nexport var checkboxContainer = 'checkbox_checkboxContainer__1rajo3p0';\nexport var checkboxGroupContainer = 'checkbox_checkboxGroupContainer__1rajo3p1';\nexport var checkboxGroupStateVars = {orientation:'var(--orientation__1rajo3pk)',isDisabled:'var(--isDisabled__1rajo3pl)',isReadOnly:'var(--isReadOnly__1rajo3pm)',isRequired:'var(--isRequired__1rajo3pn)',isInvalid:'var(--isInvalid__1rajo3po)'};\nexport var checkboxSpaceVars = {dimension:'var(--dimension__1rajo3p6)',gap:'var(--gap__1rajo3p7)',elementGap:'var(--elementGap__1rajo3p8)'};\nexport var checkboxStateVars = {alignInput:'var(--alignInput__1rajo3p9)',isDisabled:'var(--isDisabled__1rajo3pa)',isFocused:'var(--isFocused__1rajo3pb)',isFocusVisible:'var(--isFocusVisible__1rajo3pc)',isHovered:'var(--isHovered__1rajo3pd)',isIndeterminate:'var(--isIndeterminate__1rajo3pe)',isInvalid:'var(--isInvalid__1rajo3pf)',isPressed:'var(--isPressed__1rajo3pg)',isReadOnly:'var(--isReadOnly__1rajo3ph)',isRequired:'var(--isRequired__1rajo3pi)',isSelected:'var(--isSelected__1rajo3pj)'};"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as _react_types_shared from '@react-types/shared';
|
|
2
|
+
import { CheckboxRenderProps, CheckboxClassNames, CheckboxAlignment, CheckboxProps, CheckboxGroupRenderProps, CheckboxGroupProps } from './types.js';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import * as react_aria_components from 'react-aria-components';
|
|
5
|
+
import { ContextValue } from 'react-aria-components';
|
|
6
|
+
import { RenderPropsChildren } from '../../types/react-aria.js';
|
|
7
|
+
import 'type-fest';
|
|
8
|
+
import '../icon/types.js';
|
|
9
|
+
|
|
10
|
+
declare const CheckboxContext: react.Context<ContextValue<CheckboxProps, HTMLLabelElement>>;
|
|
11
|
+
declare const Checkbox: (props: Omit<react_aria_components.CheckboxProps, "children" | "className" | "style"> & {
|
|
12
|
+
children?: RenderPropsChildren<CheckboxRenderProps>;
|
|
13
|
+
label?: string;
|
|
14
|
+
classNames?: CheckboxClassNames;
|
|
15
|
+
alignInput?: CheckboxAlignment;
|
|
16
|
+
} & react.RefAttributes<HTMLLabelElement>) => react.ReactElement | null;
|
|
17
|
+
declare const CheckboxGroupContext: react.Context<ContextValue<CheckboxGroupProps, HTMLDivElement>>;
|
|
18
|
+
declare const CheckboxGroup: (props: Omit<react_aria_components.CheckboxGroupProps, "children" | "className" | "style"> & {
|
|
19
|
+
children?: RenderPropsChildren<CheckboxGroupRenderProps>;
|
|
20
|
+
classNames?: CheckboxClassNames;
|
|
21
|
+
label?: string;
|
|
22
|
+
orientation?: _react_types_shared.Orientation;
|
|
23
|
+
} & Pick<{
|
|
24
|
+
children?: RenderPropsChildren<CheckboxRenderProps>;
|
|
25
|
+
label?: string;
|
|
26
|
+
classNames?: CheckboxClassNames;
|
|
27
|
+
alignInput?: CheckboxAlignment;
|
|
28
|
+
}, "alignInput"> & react.RefAttributes<HTMLDivElement>) => react.ReactElement | null;
|
|
29
|
+
|
|
30
|
+
export { Checkbox, CheckboxContext, CheckboxGroup, CheckboxGroupContext };
|