@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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type ContinuableEvent = {
|
|
2
|
+
continuePropagation: () => void;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* The default behavior of events within React Aria is to stop progagation
|
|
6
|
+
*
|
|
7
|
+
* To reenable propagation, continuePropagation must be called
|
|
8
|
+
*/
|
|
9
|
+
declare function continuePropagation(event: ContinuableEvent): void;
|
|
10
|
+
|
|
11
|
+
export { continuePropagation };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/events.ts"],"names":[],"mappings":";;;AAUO,SAAS,oBAAoB,KAAyB,EAAA;AAC3D,EAAA,KAAA,CAAM,mBAAoB,EAAA;AAC5B","file":"events.js","sourcesContent":["// Support React Aria's BaseEvent & PressEvent (and any others the might share the same interface)\ntype ContinuableEvent = {\n continuePropagation: () => void;\n};\n\n/**\n * The default behavior of events within React Aria is to stop progagation\n *\n * To reenable propagation, continuePropagation must be called\n */\nexport function continuePropagation(event: ContinuableEvent) {\n event.continuePropagation();\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { applyThemeVars, assignPartialVars, computeContract, containerQueries, containerQuery, inlineVars, unwrapCssVar } from './css.js';
|
|
2
|
+
export { continuePropagation } from './events.js';
|
|
3
|
+
export { callRenderProps, mergeClassNames, mergeProps, wrapRenderProps } from './props.js';
|
|
4
|
+
export { alphaChannelAsNumberValidator, alphaChannelAsStringValidator, colorChannelAsNumberValidator, colorChannelAsStringValidator, pixelValueAsNumberValidator, pixelValueAsStringValidator, rgbaAsStringValidator, rgbaAsTupleValidator } from './validators.js';
|
|
5
|
+
import '@vanilla-extract/css';
|
|
6
|
+
import '../types/deckgl.js';
|
|
7
|
+
import '../types/vanilla-extract.js';
|
|
8
|
+
import '../types/generic.js';
|
|
9
|
+
import '../types/props.js';
|
|
10
|
+
import 'zod';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import '../chunk-PZ5AY32C.js';
|
|
2
|
+
export { applyThemeVars, assignPartialVars, computeContract, containerQueries, containerQuery, inlineVars, unwrapCssVar } from './css.js';
|
|
3
|
+
export { continuePropagation } from './events.js';
|
|
4
|
+
export { callRenderProps, mergeClassNames, mergeProps, wrapRenderProps } from './props.js';
|
|
5
|
+
export { alphaChannelAsNumberValidator, alphaChannelAsStringValidator, colorChannelAsNumberValidator, colorChannelAsStringValidator, pixelValueAsNumberValidator, pixelValueAsStringValidator, rgbaAsStringValidator, rgbaAsTupleValidator } from './validators.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AsType } from '../types/generic.js';
|
|
2
|
+
import { ClassNames } from '../types/props.js';
|
|
3
|
+
|
|
4
|
+
type Props<T extends object> = AsType<T> | null | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Deep merges classNames objects by concatenating class values
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* mergeClassNames({ foo: 'foo' }, { foo: 'FOO', bar: 'bar' })
|
|
10
|
+
* // returns { foo: 'foo FOO', bar: 'bar' }
|
|
11
|
+
*/
|
|
12
|
+
declare function mergeClassNames<T extends ClassNames>(...classNamesToMerge: (T | null | undefined)[]): T | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Extends the base margeProps functionality to also merge styles and handle class/style render props
|
|
15
|
+
*/
|
|
16
|
+
declare function mergeProps<T extends object>(...propsToMerge: Props<T>[]): T;
|
|
17
|
+
/**
|
|
18
|
+
* A helper for not having to reimplement the type check for a renderProp value being a function or not everywhere
|
|
19
|
+
*/
|
|
20
|
+
declare function callRenderProps<T extends object, R>(value: R | ((renderProps: T) => R), values: T): R;
|
|
21
|
+
/**
|
|
22
|
+
* A helper function to pair with React Aria's render props. Typically
|
|
23
|
+
* implemented with children, className and styles
|
|
24
|
+
*
|
|
25
|
+
* Allows for the injection of additional renderProps that a component
|
|
26
|
+
* from React Aria may not already provide
|
|
27
|
+
*
|
|
28
|
+
* If the value isn't a renderProp function, then it is passed through unchanged
|
|
29
|
+
*/
|
|
30
|
+
declare function wrapRenderProps<T extends object, U extends object, R>(value: R | ((renderProps: T & U) => R), inject?: U): R | ((renderProps: T) => R);
|
|
31
|
+
|
|
32
|
+
export { callRenderProps, mergeClassNames, mergeProps, wrapRenderProps };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import '../chunk-PZ5AY32C.js';
|
|
2
|
+
import { mergeProps as mergeProps$1 } from '@react-aria/utils';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import mergeWith from 'lodash/mergeWith';
|
|
5
|
+
import { composeRenderProps } from 'react-aria-components';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
|
|
8
|
+
function processClassNameRenderProps(value, renderProps, ...propsToMerge) {
|
|
9
|
+
if (!propsToMerge.length) {
|
|
10
|
+
return "";
|
|
11
|
+
}
|
|
12
|
+
const [props, ...rest] = propsToMerge;
|
|
13
|
+
return clsx(
|
|
14
|
+
value,
|
|
15
|
+
composeRenderProps(
|
|
16
|
+
props?.className ?? "",
|
|
17
|
+
(prev) => processClassNameRenderProps(prev, renderProps, ...rest)
|
|
18
|
+
)(renderProps)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function mergeRenderClassName(...propsToMerge) {
|
|
22
|
+
return composeRenderProps(
|
|
23
|
+
(renderProps) => renderProps.defaultClassName ?? "",
|
|
24
|
+
(prev, renderProps) => processClassNameRenderProps(prev, renderProps, ...propsToMerge)
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function mergeStaticClassName(...propsToMerge) {
|
|
28
|
+
return clsx(
|
|
29
|
+
propsToMerge.reduce((acc, props) => {
|
|
30
|
+
if (typeof props?.className !== "string") {
|
|
31
|
+
return acc;
|
|
32
|
+
}
|
|
33
|
+
acc.push(props.className);
|
|
34
|
+
return acc;
|
|
35
|
+
}, [])
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function mergeClassNameProps(...propsToMerge) {
|
|
39
|
+
const anyFunctions = propsToMerge.some(
|
|
40
|
+
(props) => typeof props?.className === "function"
|
|
41
|
+
);
|
|
42
|
+
const anyPrimitives = propsToMerge.some(
|
|
43
|
+
(props) => typeof props?.className === "string"
|
|
44
|
+
);
|
|
45
|
+
if (!(anyFunctions || anyPrimitives)) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
return anyFunctions ? mergeRenderClassName(...propsToMerge) : mergeStaticClassName(...propsToMerge);
|
|
49
|
+
}
|
|
50
|
+
var classNamesValidator = z.record(
|
|
51
|
+
z.string(),
|
|
52
|
+
z.union([z.string(), z.lazy(() => classNamesValidator)])
|
|
53
|
+
);
|
|
54
|
+
var propsValidator = z.object({
|
|
55
|
+
classNames: classNamesValidator
|
|
56
|
+
});
|
|
57
|
+
function mergeClassNamesProps(...propsToMerge) {
|
|
58
|
+
return propsToMerge.reduce((acc, props) => {
|
|
59
|
+
const result = propsValidator.safeParse(props);
|
|
60
|
+
if (result.success) {
|
|
61
|
+
return acc ? mergeWith(
|
|
62
|
+
acc,
|
|
63
|
+
result.data.classNames,
|
|
64
|
+
(accValue, srcValue) => (!accValue || typeof accValue === "string") && (!srcValue || typeof srcValue === "string") ? clsx(accValue, srcValue) : void 0
|
|
65
|
+
) : result.data.classNames;
|
|
66
|
+
}
|
|
67
|
+
return acc;
|
|
68
|
+
}, void 0);
|
|
69
|
+
}
|
|
70
|
+
function mergeClassNames(...classNamesToMerge) {
|
|
71
|
+
return mergeClassNamesProps(
|
|
72
|
+
...classNamesToMerge.map((classNames) => ({ classNames }))
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
function processStyleRenderProps(value, renderProps, ...propsToMerge) {
|
|
76
|
+
if (!propsToMerge.length) {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
const [props, ...rest] = propsToMerge;
|
|
80
|
+
return {
|
|
81
|
+
...value,
|
|
82
|
+
...composeRenderProps(
|
|
83
|
+
props?.style ?? {},
|
|
84
|
+
(prev) => processStyleRenderProps(prev, renderProps, ...rest)
|
|
85
|
+
)(renderProps)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function mergeRenderStyle(...propsToMerge) {
|
|
89
|
+
return composeRenderProps(
|
|
90
|
+
(renderProps) => renderProps.defaultStyle ?? {},
|
|
91
|
+
(prev, renderProps) => processStyleRenderProps(prev, renderProps, ...propsToMerge)
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function mergeStaticStyle(...propsToMerge) {
|
|
95
|
+
return propsToMerge.reduce((acc, props) => {
|
|
96
|
+
if (!props?.style) {
|
|
97
|
+
return acc;
|
|
98
|
+
}
|
|
99
|
+
Object.assign(acc, props.style);
|
|
100
|
+
return acc;
|
|
101
|
+
}, {});
|
|
102
|
+
}
|
|
103
|
+
function mergeStyleProps(...propsToMerge) {
|
|
104
|
+
const anyFunctions = propsToMerge.some(
|
|
105
|
+
(props) => typeof props?.style === "function"
|
|
106
|
+
);
|
|
107
|
+
const anyObjects = propsToMerge.some(
|
|
108
|
+
(props) => typeof props?.style === "object" && props.style != null
|
|
109
|
+
);
|
|
110
|
+
if (!(anyFunctions || anyObjects)) {
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
return anyFunctions ? mergeRenderStyle(...propsToMerge) : mergeStaticStyle(...propsToMerge);
|
|
114
|
+
}
|
|
115
|
+
function mergeProps(...propsToMerge) {
|
|
116
|
+
const className = mergeClassNameProps(...propsToMerge);
|
|
117
|
+
const classNames = mergeClassNamesProps(...propsToMerge);
|
|
118
|
+
const style = mergeStyleProps(...propsToMerge);
|
|
119
|
+
return {
|
|
120
|
+
...mergeProps$1(...propsToMerge),
|
|
121
|
+
...className ? { className } : {},
|
|
122
|
+
...classNames ? { classNames } : {},
|
|
123
|
+
...style ? { style } : {}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function callRenderProps(value, values) {
|
|
127
|
+
if (typeof value === "function") {
|
|
128
|
+
return value(values);
|
|
129
|
+
}
|
|
130
|
+
return value;
|
|
131
|
+
}
|
|
132
|
+
function wrapRenderProps(value, inject) {
|
|
133
|
+
if (typeof value === "function") {
|
|
134
|
+
return (renderProps) => value({
|
|
135
|
+
...renderProps,
|
|
136
|
+
...inject
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return value;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { callRenderProps, mergeClassNames, mergeProps, wrapRenderProps };
|
|
143
|
+
//# sourceMappingURL=props.js.map
|
|
144
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src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;AAAA,GAChE;AAEA,EAAI,IAAA,EAAE,gBAAgB,UAAa,CAAA,EAAA;AACjC,IAAO,OAAA,MAAA;AAAA;AAGT,EAAA,OAAO,eACH,gBAAiB,CAAA,GAAG,YAAY,CAChC,GAAA,gBAAA,CAAiB,GAAG,YAAY,CAAA;AACtC;AAKO,SAAS,cAAgC,YAA6B,EAAA;AAC3E,EAAM,MAAA,SAAA,GAAY,mBAAoB,CAAA,GAAG,YAAY,CAAA;AACrD,EAAM,MAAA,UAAA,GAAa,oBAAqB,CAAA,GAAG,YAAY,CAAA;AACvD,EAAM,MAAA,KAAA,GAAQ,eAAgB,CAAA,GAAG,YAAY,CAAA;AAE7C,EAAO,OAAA;AAAA,IACL,GAAIA,YAAwB,CAAA,GAAG,YAAY,CAAA;AAAA,IAC3C,GAAI,SAAA,GAAY,EAAE,SAAA,KAAc,EAAC;AAAA,IACjC,GAAI,UAAA,GAAa,EAAE,UAAA,KAAe,EAAC;AAAA,IACnC,GAAI,KAAA,GAAQ,EAAE,KAAA,KAAU;AAAC,GAC3B;AACF;AAKO,SAAS,eAAA,CACd,OACA,MACA,EAAA;AACA,EAAI,IAAA,OAAO,UAAU,UAAY,EAAA;AAC/B,IAAA,OAAQ,MAAgC,MAAM,CAAA;AAAA;AAGhD,EAAO,OAAA,KAAA;AACT;AAWO,SAAS,eAAA,CACd,OACA,MACA,EAAA;AACA,EAAI,IAAA,OAAO,UAAU,UAAY,EAAA;AAC/B,IAAO,OAAA,CAAC,gBACL,KAAoC,CAAA;AAAA,MACnC,GAAG,WAAA;AAAA,MACH,GAAG;AAAA,KACK,CAAA;AAAA;AAGd,EAAO,OAAA,KAAA;AACT","file":"props.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 { mergeProps as mergePropsWithoutStyles } from '@react-aria/utils';\nimport { clsx } from 'clsx';\nimport mergeWith from 'lodash/mergeWith';\nimport type { CSSProperties } from 'react';\nimport { composeRenderProps } from 'react-aria-components';\nimport { z } from 'zod';\nimport type {\n AsType,\n ClassNameRenderProps,\n ClassNames,\n RenderProps,\n StylePropRenderProps,\n} from '../types';\n\ntype Props<T extends object> = AsType<T> | null | undefined;\n\n/**\n * Recursively process merging of all class name render props\n */\nfunction processClassNameRenderProps<T extends RenderProps<object>>(\n value: string,\n renderProps: ClassNameRenderProps<object>,\n ...propsToMerge: Props<T>[]\n): string {\n if (!propsToMerge.length) {\n return '';\n }\n\n const [props, ...rest] = propsToMerge;\n\n return clsx(\n value,\n composeRenderProps<string, ClassNameRenderProps<object>, string>(\n props?.className ?? '',\n (prev) => processClassNameRenderProps(prev, renderProps, ...rest),\n )(renderProps),\n );\n}\n\n/**\n * Compose class name render props to be processed and merged\n */\nfunction mergeRenderClassName<T extends RenderProps<object>>(\n ...propsToMerge: Props<T>[]\n) {\n return composeRenderProps<string, ClassNameRenderProps<object>, string>(\n (renderProps) => renderProps.defaultClassName ?? '',\n (prev, renderProps) =>\n processClassNameRenderProps(prev, renderProps, ...propsToMerge),\n );\n}\n\n/**\n * Merge static class names\n */\nfunction mergeStaticClassName<T extends RenderProps<object>>(\n ...propsToMerge: Props<T>[]\n) {\n return clsx(\n propsToMerge.reduce<string[]>((acc, props) => {\n if (typeof props?.className !== 'string') {\n return acc;\n }\n\n acc.push(props.className);\n\n return acc;\n }, []),\n );\n}\n\n/**\n * Determine if a static or composed merge of class names is necesary based on the presence of functions\n */\nfunction mergeClassNameProps<T extends RenderProps<object>>(\n ...propsToMerge: Props<T>[]\n) {\n const anyFunctions = propsToMerge.some(\n (props) => typeof props?.className === 'function',\n );\n\n const anyPrimitives = propsToMerge.some(\n (props) => typeof props?.className === 'string',\n );\n\n if (!(anyFunctions || anyPrimitives)) {\n return undefined;\n }\n\n return anyFunctions\n ? mergeRenderClassName(...propsToMerge)\n : mergeStaticClassName(...propsToMerge);\n}\n\nconst classNamesValidator: z.ZodType<ClassNames> = z.record(\n z.string(),\n z.union([z.string(), z.lazy(() => classNamesValidator)]),\n);\n\nconst propsValidator = z.object({\n classNames: classNamesValidator,\n});\n\n/**\n * Deep merges classNames objects within props\n */\nfunction mergeClassNamesProps<T extends object>(...propsToMerge: Props<T>[]) {\n return propsToMerge.reduce<ClassNames | undefined>((acc, props) => {\n const result = propsValidator.safeParse(props);\n\n if (result.success) {\n return acc\n ? mergeWith(acc, result.data.classNames, (accValue, srcValue) =>\n (!accValue || typeof accValue === 'string') &&\n (!srcValue || typeof srcValue === 'string')\n ? clsx(accValue, srcValue)\n : undefined,\n )\n : result.data.classNames;\n }\n\n return acc;\n }, undefined);\n}\n\n/**\n * Deep merges classNames objects by concatenating class values\n *\n * @example\n * mergeClassNames({ foo: 'foo' }, { foo: 'FOO', bar: 'bar' })\n * // returns { foo: 'foo FOO', bar: 'bar' }\n */\nexport function mergeClassNames<T extends ClassNames>(\n ...classNamesToMerge: (T | null | undefined)[]\n) {\n return mergeClassNamesProps(\n ...classNamesToMerge.map((classNames) => ({ classNames })),\n ) as T | undefined;\n}\n\n/**\n * Recursively process merging of all style render props\n */\nfunction processStyleRenderProps<T extends RenderProps<object>>(\n value: CSSProperties,\n renderProps: StylePropRenderProps<object>,\n ...propsToMerge: Props<T>[]\n): CSSProperties {\n if (!propsToMerge.length) {\n return {};\n }\n\n const [props, ...rest] = propsToMerge;\n\n return {\n ...value,\n ...composeRenderProps<\n CSSProperties,\n StylePropRenderProps<object>,\n CSSProperties\n >(props?.style ?? {}, (prev) =>\n processStyleRenderProps(prev, renderProps, ...rest),\n )(renderProps),\n };\n}\n\n/**\n * Compose style render props to be processed and merged\n */\nfunction mergeRenderStyle<T extends RenderProps<object>>(\n ...propsToMerge: Props<T>[]\n) {\n return composeRenderProps<\n CSSProperties,\n StylePropRenderProps<object>,\n CSSProperties\n >(\n (renderProps) => renderProps.defaultStyle ?? {},\n (prev, renderProps) =>\n processStyleRenderProps(prev, renderProps, ...propsToMerge),\n );\n}\n\n/**\n * Merge static styles\n */\nfunction mergeStaticStyle<T extends RenderProps<object>>(\n ...propsToMerge: Props<T>[]\n) {\n return propsToMerge.reduce<CSSProperties>((acc, props) => {\n if (!props?.style) {\n return acc;\n }\n\n Object.assign(acc, props.style);\n\n return acc;\n }, {});\n}\n\n/**\n * Determine if a static or composed merge of styles is necesary based on the presence of functions\n */\nfunction mergeStyleProps<T extends RenderProps<object>>(\n ...propsToMerge: Props<T>[]\n) {\n const anyFunctions = propsToMerge.some(\n (props) => typeof props?.style === 'function',\n );\n\n const anyObjects = propsToMerge.some(\n (props) => typeof props?.style === 'object' && props.style != null,\n );\n\n if (!(anyFunctions || anyObjects)) {\n return undefined;\n }\n\n return anyFunctions\n ? mergeRenderStyle(...propsToMerge)\n : mergeStaticStyle(...propsToMerge);\n}\n\n/**\n * Extends the base margeProps functionality to also merge styles and handle class/style render props\n */\nexport function mergeProps<T extends object>(...propsToMerge: Props<T>[]): T {\n const className = mergeClassNameProps(...propsToMerge);\n const classNames = mergeClassNamesProps(...propsToMerge);\n const style = mergeStyleProps(...propsToMerge);\n\n return {\n ...(mergePropsWithoutStyles(...propsToMerge) as T),\n ...(className ? { className } : {}),\n ...(classNames ? { classNames } : {}),\n ...(style ? { style } : {}),\n };\n}\n\n/**\n * A helper for not having to reimplement the type check for a renderProp value being a function or not everywhere\n */\nexport function callRenderProps<T extends object, R>(\n value: R | ((renderProps: T) => R),\n values: T,\n) {\n if (typeof value === 'function') {\n return (value as (renderProps: T) => R)(values);\n }\n\n return value;\n}\n\n/**\n * A helper function to pair with React Aria's render props. Typically\n * implemented with children, className and styles\n *\n * Allows for the injection of additional renderProps that a component\n * from React Aria may not already provide\n *\n * If the value isn't a renderProp function, then it is passed through unchanged\n */\nexport function wrapRenderProps<T extends object, U extends object, R>(\n value: R | ((renderProps: T & U) => R),\n inject?: U,\n) {\n if (typeof value === 'function') {\n return (renderProps: T) =>\n (value as (renderProps: T & U) => R)({\n ...renderProps,\n ...inject,\n } as T & U);\n }\n\n return value;\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RGBA } from '../types/deckgl.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Test for any safe number that could represent a pixel value
|
|
6
|
+
*/
|
|
7
|
+
declare const pixelValueAsNumberValidator: z.ZodNumber;
|
|
8
|
+
/**
|
|
9
|
+
* Test for and capture numeric pixel values
|
|
10
|
+
* Will allow decimals and negative numbers
|
|
11
|
+
*
|
|
12
|
+
* Examples:
|
|
13
|
+
* 0 -> 0
|
|
14
|
+
* 1px -> 1
|
|
15
|
+
* 20.5px -> 20.5
|
|
16
|
+
*/
|
|
17
|
+
declare const pixelValueAsStringValidator: z.ZodPipeline<z.ZodPipeline<z.ZodUnion<[z.ZodLiteral<"0">, z.ZodEffects<z.ZodString, string, string>]>, z.ZodNumber>, z.ZodNumber>;
|
|
18
|
+
/**
|
|
19
|
+
* Test for an integer in the range of 0-255 as a representation of an RGB color channel value
|
|
20
|
+
*/
|
|
21
|
+
declare const colorChannelAsNumberValidator: z.ZodNumber;
|
|
22
|
+
/**
|
|
23
|
+
* Test for and convert CSS RGB color channel to numeric value (0-255)
|
|
24
|
+
*/
|
|
25
|
+
declare const colorChannelAsStringValidator: z.ZodPipeline<z.ZodPipeline<z.ZodString, z.ZodNumber>, z.ZodNumber>;
|
|
26
|
+
/**
|
|
27
|
+
* DeckGL treats alpha channel the same as color channels (0-255)
|
|
28
|
+
*/
|
|
29
|
+
declare const alphaChannelAsNumberValidator: z.ZodNumber;
|
|
30
|
+
/**
|
|
31
|
+
* Test for and convert CSS RGBA alpha channel to DeckGL numeric value
|
|
32
|
+
*/
|
|
33
|
+
declare const alphaChannelAsStringValidator: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodNumber>, number, string>;
|
|
34
|
+
/**
|
|
35
|
+
* Test for and convert CSS RGB(A) values to numeric RGBA tuple
|
|
36
|
+
* Will only allow for rgb with 3 valid numbers `(0-255){3, intergers only}`
|
|
37
|
+
* Will only allow for rgba with 4 valid numbers `(0-255){3, intergers only} + (0-1){1, decimals allowed}`
|
|
38
|
+
* Will allow for whitespace spread throughout
|
|
39
|
+
*
|
|
40
|
+
* Examples:
|
|
41
|
+
* rgb( 0, 0, 0 ) -> [0, 0, 0, 255]
|
|
42
|
+
* rgba(203,117,98,0.4) -> [203, 117, 98, 102]
|
|
43
|
+
*/
|
|
44
|
+
declare const rgbaAsStringValidator: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>, string[], string>, z.ZodTuple<[z.ZodPipeline<z.ZodPipeline<z.ZodString, z.ZodNumber>, z.ZodNumber>, z.ZodPipeline<z.ZodPipeline<z.ZodString, z.ZodNumber>, z.ZodNumber>, z.ZodPipeline<z.ZodPipeline<z.ZodString, z.ZodNumber>, z.ZodNumber>, z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodNumber>, number, string>], null>>;
|
|
45
|
+
/**
|
|
46
|
+
* Test for numeric RGB(A) tuple
|
|
47
|
+
*
|
|
48
|
+
* Will return RGB as RGBA with 100% alpha channel
|
|
49
|
+
*/
|
|
50
|
+
declare const rgbaAsTupleValidator: z.ZodUnion<[z.ZodEffects<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, RGBA, [number, number, number]>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>]>;
|
|
51
|
+
|
|
52
|
+
export { alphaChannelAsNumberValidator, alphaChannelAsStringValidator, colorChannelAsNumberValidator, colorChannelAsStringValidator, pixelValueAsNumberValidator, pixelValueAsStringValidator, rgbaAsStringValidator, rgbaAsTupleValidator };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import '../chunk-PZ5AY32C.js';
|
|
2
|
+
import clamp from 'lodash/clamp';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
var pixelValueAsNumberValidator = z.number().safe();
|
|
6
|
+
var pixelValueAsStringValidator = z.union([
|
|
7
|
+
z.literal("0"),
|
|
8
|
+
z.string().endsWith("px").transform((value) => value.replace(/px$/, ""))
|
|
9
|
+
]).pipe(z.coerce.number()).pipe(pixelValueAsNumberValidator);
|
|
10
|
+
var colorChannelAsNumberValidator = z.number().safe().int().min(0).max(255);
|
|
11
|
+
var colorChannelAsStringValidator = z.string().trim().pipe(z.coerce.number()).pipe(colorChannelAsNumberValidator);
|
|
12
|
+
var alphaChannelAsNumberValidator = colorChannelAsNumberValidator;
|
|
13
|
+
var alphaChannelAsStringValidator = z.string().trim().pipe(z.coerce.number().safe().min(0)).transform((value) => Math.round(clamp(value, 0, 1) * 255));
|
|
14
|
+
var rgbaAsStringValidator = z.union([
|
|
15
|
+
z.string().startsWith("rgb(").endsWith(")").transform((value) => value.replace(/\)$/, ",1")),
|
|
16
|
+
// Add on 100% alpha channel
|
|
17
|
+
z.string().startsWith("rgba(").endsWith(")").transform((value) => value.replace(/\)$/, ""))
|
|
18
|
+
]).transform((value) => value.replace(/^rgba?\(/, "").split(",")).pipe(
|
|
19
|
+
z.tuple([
|
|
20
|
+
colorChannelAsStringValidator,
|
|
21
|
+
colorChannelAsStringValidator,
|
|
22
|
+
colorChannelAsStringValidator,
|
|
23
|
+
alphaChannelAsStringValidator
|
|
24
|
+
])
|
|
25
|
+
);
|
|
26
|
+
var rgbaAsTupleValidator = z.union([
|
|
27
|
+
z.tuple([
|
|
28
|
+
colorChannelAsNumberValidator,
|
|
29
|
+
colorChannelAsNumberValidator,
|
|
30
|
+
colorChannelAsNumberValidator
|
|
31
|
+
]).transform((rgb) => [...rgb, 255]),
|
|
32
|
+
z.tuple([
|
|
33
|
+
colorChannelAsNumberValidator,
|
|
34
|
+
colorChannelAsNumberValidator,
|
|
35
|
+
colorChannelAsNumberValidator,
|
|
36
|
+
alphaChannelAsNumberValidator
|
|
37
|
+
])
|
|
38
|
+
]);
|
|
39
|
+
|
|
40
|
+
export { alphaChannelAsNumberValidator, alphaChannelAsStringValidator, colorChannelAsNumberValidator, colorChannelAsStringValidator, pixelValueAsNumberValidator, pixelValueAsStringValidator, rgbaAsStringValidator, rgbaAsTupleValidator };
|
|
41
|
+
//# sourceMappingURL=validators.js.map
|
|
42
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/validators.ts"],"names":[],"mappings":";;;;AAmBO,IAAM,2BAA8B,GAAA,CAAA,CAAE,MAAO,EAAA,CAAE,IAAK;AAW9C,IAAA,2BAAA,GAA8B,EACxC,KAAM,CAAA;AAAA,EACL,CAAA,CAAE,QAAQ,GAAG,CAAA;AAAA,EACb,CACG,CAAA,MAAA,EACA,CAAA,QAAA,CAAS,IAAI,CAAA,CACb,SAAU,CAAA,CAAC,KAAU,KAAA,KAAA,CAAM,OAAQ,CAAA,KAAA,EAAO,EAAE,CAAC;AAClD,CAAC,CAAA,CACA,KAAK,CAAE,CAAA,MAAA,CAAO,QAAQ,CAAA,CACtB,KAAK,2BAA2B;AAK5B,IAAM,6BAAgC,GAAA,CAAA,CAC1C,MAAO,EAAA,CACP,IAAK,EAAA,CACL,GAAI,EAAA,CACJ,GAAI,CAAA,CAAC,CACL,CAAA,GAAA,CAAI,GAAG;AAKH,IAAM,6BAAgC,GAAA,CAAA,CAC1C,MAAO,EAAA,CACP,IAAK,EAAA,CACL,IAAK,CAAA,CAAA,CAAE,MAAO,CAAA,MAAA,EAAQ,CAAA,CACtB,KAAK,6BAA6B;AAK9B,IAAM,6BAAgC,GAAA;AAKtC,IAAM,6BAAgC,GAAA,CAAA,CAC1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,CAAC","file":"validators.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 clamp from 'lodash/clamp';\nimport { z } from 'zod';\nimport type { RGBA } from '../types';\n\n/**\n * Test for any safe number that could represent a pixel value\n */\nexport const pixelValueAsNumberValidator = z.number().safe();\n\n/**\n * Test for and capture numeric pixel values\n * Will allow decimals and negative numbers\n *\n * Examples:\n * 0 -> 0\n * 1px -> 1\n * 20.5px -> 20.5\n */\nexport const pixelValueAsStringValidator = z\n .union([\n z.literal('0'),\n z\n .string()\n .endsWith('px')\n .transform((value) => value.replace(/px$/, '')),\n ])\n .pipe(z.coerce.number())\n .pipe(pixelValueAsNumberValidator);\n\n/**\n * Test for an integer in the range of 0-255 as a representation of an RGB color channel value\n */\nexport const colorChannelAsNumberValidator = z\n .number()\n .safe()\n .int()\n .min(0)\n .max(255);\n\n/**\n * Test for and convert CSS RGB color channel to numeric value (0-255)\n */\nexport const colorChannelAsStringValidator = z\n .string()\n .trim()\n .pipe(z.coerce.number())\n .pipe(colorChannelAsNumberValidator);\n\n/**\n * DeckGL treats alpha channel the same as color channels (0-255)\n */\nexport const alphaChannelAsNumberValidator = colorChannelAsNumberValidator;\n\n/**\n * Test for and convert CSS RGBA alpha channel to DeckGL numeric value\n */\nexport const alphaChannelAsStringValidator = z\n .string()\n .trim()\n .pipe(z.coerce.number().safe().min(0)) // CSS allows for values greater than 1\n .transform((value) => Math.round(clamp(value, 0, 1) * 255));\n\n/**\n * Test for and convert CSS RGB(A) values to numeric RGBA tuple\n * Will only allow for rgb with 3 valid numbers `(0-255){3, intergers only}`\n * Will only allow for rgba with 4 valid numbers `(0-255){3, intergers only} + (0-1){1, decimals allowed}`\n * Will allow for whitespace spread throughout\n *\n * Examples:\n * rgb( 0, 0, 0 ) -> [0, 0, 0, 255]\n * rgba(203,117,98,0.4) -> [203, 117, 98, 102]\n */\nexport const rgbaAsStringValidator = z\n .union([\n z\n .string()\n .startsWith('rgb(')\n .endsWith(')')\n .transform((value) => value.replace(/\\)$/, ',1')), // Add on 100% alpha channel\n z\n .string()\n .startsWith('rgba(')\n .endsWith(')')\n .transform((value) => value.replace(/\\)$/, '')),\n ])\n .transform((value) => value.replace(/^rgba?\\(/, '').split(','))\n .pipe(\n z.tuple([\n colorChannelAsStringValidator,\n colorChannelAsStringValidator,\n colorChannelAsStringValidator,\n alphaChannelAsStringValidator,\n ]),\n );\n\n/**\n * Test for numeric RGB(A) tuple\n *\n * Will return RGB as RGBA with 100% alpha channel\n */\nexport const rgbaAsTupleValidator = z.union([\n z\n .tuple([\n colorChannelAsNumberValidator,\n colorChannelAsNumberValidator,\n colorChannelAsNumberValidator,\n ])\n .transform<RGBA>((rgb) => [...rgb, 255]),\n z.tuple([\n colorChannelAsNumberValidator,\n colorChannelAsNumberValidator,\n colorChannelAsNumberValidator,\n alphaChannelAsNumberValidator,\n ]),\n]);\n"]}
|
package/dist/vanilla.d.ts
CHANGED
|
@@ -1,10 +1,70 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { buttonClassNames, buttonColorVars, buttonContainer, buttonSpaceVars, buttonStateVars } from './components/button/button.css.js';
|
|
2
|
+
export { ButtonClassNames, ButtonColors, ButtonMapping, ButtonProps, ButtonRenderProps, ButtonSizes, ButtonState, LinkButtonProps, ToggleButtonProps } from './components/button/types.js';
|
|
3
|
+
export { checkboxClassNames, checkboxColorVars, checkboxContainer, checkboxGroupStateVars, checkboxSpaceVars, checkboxStateVars } from './components/checkbox/checkbox.css.js';
|
|
4
|
+
export { CheckboxAlignment, CheckboxClassNames, CheckboxGroupProps, CheckboxGroupRenderProps, CheckboxGroupState, CheckboxProps, CheckboxRenderProps, CheckboxState } from './components/checkbox/types.js';
|
|
5
|
+
export { chipClassNames, chipColorVars, chipContainer, chipSpaceVars, chipStateVars } from './components/chip/chip.css.js';
|
|
6
|
+
export { ChipClassNames, ChipColors, ChipGroupProps, ChipItemProps, ChipListProps, ChipMapping, ChipProps, ChipRenderProps, ChipSizes, ChipState } from './components/chip/types.js';
|
|
7
|
+
export { comboBoxColorVars, comboBoxContainer, comboBoxSpaceVars, comboBoxStateVars } from './components/combo-box/combo-box.css.js';
|
|
8
|
+
export { ComboBoxClassNames, ComboBoxMapping, ComboBoxProps, ComboBoxRenderProps, ComboBoxSizes, ComboBoxState } from './components/combo-box/types.js';
|
|
9
|
+
export { dialogClassNames, dialogColorVars, dialogContainer, dialogSpaceVars, dialogStateVars } from './components/dialog/dialog.css.js';
|
|
10
|
+
export { DialogClassNames, DialogMapping, DialogProps, DialogRenderProps, DialogSizes, DialogState } from './components/dialog/types.js';
|
|
11
|
+
export { drawerAnimationVars, drawerClassNames, drawerColorVars, drawerContainer, drawerDialogStateVars, drawerSpaceVars, drawerStateVars } from './components/drawer/drawer.css.js';
|
|
12
|
+
export { DrawerAnchor, DrawerClassNames, DrawerDialogProps, DrawerDialogState, DrawerMapping, DrawerProps, DrawerRenderProps, DrawerState, DrawerTabListProps, DrawerTabProps, DrawerTabRenderProps } from './components/drawer/types.js';
|
|
13
|
+
export { groupClassNames, groupContainer, groupSpaceVars, groupStateVars } from './components/group/group.css.js';
|
|
14
|
+
export { GroupClassNames, GroupProps, GroupState } from './components/group/types.js';
|
|
15
|
+
export { iconClassNames, iconColorVars, iconContainer, iconSpaceVars, iconStateVars } from './components/icon/icon.css.js';
|
|
16
|
+
export { IconClassNames, IconProps, IconSizes, IconState } from './components/icon/types.js';
|
|
17
|
+
export { inputClassNames, inputColorVars, inputContainer, inputSpaceVars, inputStateVars } from './components/input/input.css.js';
|
|
18
|
+
export { InputClassNames, InputMapping, InputProps, InputRenderProps, InputState, InputType } from './components/input/types.js';
|
|
19
|
+
export { menuColorVars, menuItemStateVars, menuSpaceVars, menuStateVars } from './components/menu/menu.css.js';
|
|
20
|
+
export { MenuClassNames, MenuItemProps, MenuItemRenderProps, MenuItemState, MenuListProps, MenuMapping, MenuProps, MenuSizes, MenuState } from './components/menu/types.js';
|
|
21
|
+
export { numberFieldClassNames, numberFieldColorVars, numberFieldContainer, numberFieldSpaceVars, numberFieldStateVars } from './components/number-field/number-field.css.js';
|
|
22
|
+
export { NumberFieldClassNames, NumberFieldMapping, NumberFieldProps, NumberFieldSizes, NumberFieldState } from './components/number-field/types.js';
|
|
23
|
+
export { optionsClassNames, optionsColorVars, optionsContainers, optionsItemStateVars, optionsListStateVars, optionsSpaceVars, optionsStateVars } from './components/options/options.css.js';
|
|
24
|
+
export { OptionsClassNames, OptionsItemProps, OptionsItemState, OptionsListProps, OptionsListState, OptionsMapping, OptionsProps, OptionsSizes, OptionsState } from './components/options/types.js';
|
|
25
|
+
export { pickerClassNames, pickerContainers, pickerItemColorVars, pickerItemStateVars, pickerSpaceVars, pickerStateVars } from './components/picker/picker.css.js';
|
|
26
|
+
export { PickerClassNames, PickerItemProps, PickerItemRenderProps, PickerItemState, PickerProps, PickerState } from './components/picker/types.js';
|
|
27
|
+
export { popoverClassNames, popoverColorVars, popoverSpaceVars, popoverStateVars } from './components/popover/popover.css.js';
|
|
28
|
+
export { PopoverClassNames, PopoverProps, PopoverState } from './components/popover/types.js';
|
|
29
|
+
export { queryBuilderClassNames, queryBuilderColorVars, queryBuilderContainers, queryBuilderGroupStateVars, queryBuilderRuleStateVars, queryBuilderSpaceVars, queryBuilderStateVars } from './components/query-builder/query-builder.css.js';
|
|
30
|
+
export { QueryBuilderClassNames, QueryBuilderContextValue, QueryBuilderGroupState, QueryBuilderMapping, QueryBuilderProps, QueryBuilderRuleState, QueryBuilderSizes, QueryBuilderState, QueryBuilderValueEditors } from './components/query-builder/types.js';
|
|
31
|
+
export { radioClassNames, radioColorVars, radioGroupStateVars, radioSpaceVars, radioStateVars } from './components/radio/radio.css.js';
|
|
32
|
+
export { RadioAlignment, RadioClassNames, RadioGroupProps, RadioGroupState, RadioProps, RadioState } from './components/radio/types.js';
|
|
33
|
+
export { searchFieldClassNames, searchFieldContainer, searchFieldSpaceVars, searchFieldStateVars } from './components/search-field/search-field.css.js';
|
|
34
|
+
export { SearchFieldClassNames, SearchFieldMapping, SearchFieldProps, SearchFieldRenderProps, SearchFieldState } from './components/search-field/types.js';
|
|
35
|
+
export { selectClassNames, selectColorVars, selectContainer, selectSpaceVars, selectStateVars } from './components/select/select.css.js';
|
|
36
|
+
export { SelectClassNames, SelectMapping, SelectProps, SelectRenderProps, SelectState } from './components/select/types.js';
|
|
37
|
+
export { switchClassNames, switchColorVars, switchContainer, switchSpaceVars, switchStateVars } from './components/switch/switch.css.js';
|
|
38
|
+
export { SwitchAlignment, SwitchClassNames, SwitchProps, SwitchRenderProps, SwitchState } from './components/switch/types.js';
|
|
39
|
+
export { tabColorVars, tabListStateVars, tabPanelStateVars, tabPanelsStateVars, tabSpaceVars, tabStateVars, tabsClassNames, tabsContainers } from './components/tabs/tabs.css.js';
|
|
40
|
+
export { TabListAlignment, TabListAnchor, TabListProps, TabListState, TabListVariants, TabPanelProps, TabPanelRenderProps, TabPanelState, TabPanelsProps, TabPanelsState, TabProps, TabRenderProps, TabState, TabsClassNames, TabsProps } from './components/tabs/types.js';
|
|
41
|
+
export { textAreaClassNames, textAreaColorVars, textAreaContainer, textAreaSpaceVars, textAreaStateVars } from './components/textarea/textarea.css.js';
|
|
42
|
+
export { TextAreaClassNames, TextAreaProps, TextAreaRenderProps, TextAreaState } from './components/textarea/types.js';
|
|
43
|
+
export { textFieldClassNames, textFieldColorVars, textFieldContainer, textFieldSpaceVars, textFieldStateVars } from './components/text-field/text-field.css.js';
|
|
44
|
+
export { TextFieldClassNames, TextFieldMapping, TextFieldProps, TextFieldSizes, TextFieldState } from './components/text-field/types.js';
|
|
45
|
+
export { tooltipClassNames, tooltipContainers, tooltipSpaceVars, tooltipStateVars, tooltipTargetStateVars } from './components/tooltip/tooltip.css.js';
|
|
46
|
+
export { TooltipClassNames, TooltipMapping, TooltipProps, TooltipRenderProps, TooltipState, TooltipTargetProps, TooltipTargetState } from './components/tooltip/types.js';
|
|
47
|
+
export { treeClassNames, treeColorVars, treeContainers, treeGroupStateVars, treeIndicatorStateVars, treeItemStateVars, treeSpaceVars, treeStateVars } from './components/tree/tree.css.js';
|
|
48
|
+
export { TreeClassNames, TreeGroupProps, TreeGroupRenderProps, TreeGroupState, TreeIndicatorRenderProps, TreeIndicatorState, TreeItemProps, TreeItemRenderProps, TreeItemState, TreeMapping, TreeProps, TreeRenderProps, TreeSizes, TreeState, TreeStateContextValue } from './components/tree/types.js';
|
|
49
|
+
export { DefaultsContext, DefaultsProviderProps } from './hooks/use-defaults/types.js';
|
|
50
|
+
export { ThemeContext, ThemeProviderProps, ThemeVars } from './hooks/use-theme/types.js';
|
|
51
|
+
export { layers } from './styles/layers.css.js';
|
|
52
|
+
export { surfaces } from './styles/surfaces.css.js';
|
|
53
|
+
export { defaultElevationVarValues, defaultElevations, defaultFocus, defaultFocusVarValues, defaultGenericColorVarValues, defaultGenericColors, defaultRadius, defaultRadiusVarValues, defaultSemanticColorVarValues, defaultSemanticColors, defaultSizes, defaultSizesVarValues, defaultSpace, defaultSpaceVarValues, defaultTypography, defaultTypographyVarValues, defaultZIndex, defaultZIndexVarValues, elevationVars, focusOutlineStyle, focusVars, genericColorVars, radiusVars, semanticColorVars, sizeVars, spaceVars, typographyVars, zIndexVars } from './styles/theme.css.js';
|
|
54
|
+
export { bodies, families, headings, inputs, label } from './styles/typography.css.js';
|
|
55
|
+
export { RGBA } from './types/deckgl.js';
|
|
56
|
+
export { AsType } from './types/generic.js';
|
|
57
|
+
export { ClassNames, OmitProtectedProps } from './types/props.js';
|
|
58
|
+
export { ChildrenRenderProps, ClassNameRenderProps, ProviderValue, ProviderValues, RenderProps, RenderPropsChildren, RenderPropsClassName, RenderPropsStyle, StylePropRenderProps, StyleRenderProps } from './types/react-aria.js';
|
|
59
|
+
export { TreeActions, TreeGroupNode, TreeItemNode, TreeNode, TreeNodes, UseTreeOptions, UseTreeResult } from './types/use-tree.js';
|
|
60
|
+
export { Contract, CssVarFunction, MapLeafNodes, PartialMapLeafNodes, Primitive } from './types/vanilla-extract.js';
|
|
61
|
+
export { applyThemeVars, assignPartialVars, computeContract, containerQueries, containerQuery, inlineVars, reduceContract, unwrapCssVar } from './utils/css.js';
|
|
2
62
|
import 'react-aria-components';
|
|
3
|
-
import 'react';
|
|
4
63
|
import '@react-types/shared';
|
|
5
64
|
import 'type-fest';
|
|
65
|
+
import 'react';
|
|
6
66
|
import '@react-aria/overlays';
|
|
7
67
|
import '@react-stately/overlays';
|
|
8
68
|
import 'react-querybuilder';
|
|
9
|
-
import '@react-stately/data';
|
|
10
69
|
import '@vanilla-extract/css';
|
|
70
|
+
import '@react-stately/data';
|
package/dist/vanilla.js
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import './chunk-PZ5AY32C.js';
|
|
2
|
+
export { buttonClassNames, buttonColorVars, buttonContainer, buttonSpaceVars, buttonStateVars } from './components/button/button.css.js';
|
|
3
|
+
export { checkboxClassNames, checkboxColorVars, checkboxContainer, checkboxGroupStateVars, checkboxSpaceVars, checkboxStateVars } from './components/checkbox/checkbox.css.js';
|
|
4
|
+
export { chipClassNames, chipColorVars, chipContainer, chipSpaceVars, chipStateVars } from './components/chip/chip.css.js';
|
|
5
|
+
export { comboBoxColorVars, comboBoxContainer, comboBoxSpaceVars, comboBoxStateVars } from './components/combo-box/combo-box.css.js';
|
|
6
|
+
export { dialogClassNames, dialogColorVars, dialogContainer, dialogSpaceVars, dialogStateVars } from './components/dialog/dialog.css.js';
|
|
7
|
+
export { drawerAnimationVars, drawerClassNames, drawerColorVars, drawerContainer, drawerDialogStateVars, drawerSpaceVars, drawerStateVars } from './components/drawer/drawer.css.js';
|
|
8
|
+
export { groupClassNames, groupContainer, groupSpaceVars, groupStateVars } from './components/group/group.css.js';
|
|
9
|
+
export { iconClassNames, iconColorVars, iconContainer, iconSpaceVars, iconStateVars } from './components/icon/icon.css.js';
|
|
10
|
+
export { inputClassNames, inputColorVars, inputContainer, inputSpaceVars, inputStateVars } from './components/input/input.css.js';
|
|
11
|
+
export { menuColorVars, menuItemStateVars, menuSpaceVars, menuStateVars } from './components/menu/menu.css.js';
|
|
12
|
+
export { numberFieldClassNames, numberFieldColorVars, numberFieldContainer, numberFieldSpaceVars, numberFieldStateVars } from './components/number-field/number-field.css.js';
|
|
13
|
+
export { optionsClassNames, optionsColorVars, optionsContainers, optionsItemStateVars, optionsListStateVars, optionsSpaceVars, optionsStateVars } from './components/options/options.css.js';
|
|
14
|
+
export { pickerClassNames, pickerContainers, pickerItemColorVars, pickerItemStateVars, pickerSpaceVars, pickerStateVars } from './components/picker/picker.css.js';
|
|
15
|
+
export { popoverClassNames, popoverColorVars, popoverSpaceVars, popoverStateVars } from './components/popover/popover.css.js';
|
|
16
|
+
export { queryBuilderClassNames, queryBuilderColorVars, queryBuilderContainers, queryBuilderGroupStateVars, queryBuilderRuleStateVars, queryBuilderSpaceVars, queryBuilderStateVars } from './components/query-builder/query-builder.css.js';
|
|
17
|
+
export { radioClassNames, radioColorVars, radioGroupStateVars, radioSpaceVars, radioStateVars } from './components/radio/radio.css.js';
|
|
18
|
+
export { searchFieldClassNames, searchFieldContainer, searchFieldSpaceVars, searchFieldStateVars } from './components/search-field/search-field.css.js';
|
|
19
|
+
export { selectClassNames, selectColorVars, selectContainer, selectSpaceVars, selectStateVars } from './components/select/select.css.js';
|
|
20
|
+
export { switchClassNames, switchColorVars, switchContainer, switchSpaceVars, switchStateVars } from './components/switch/switch.css.js';
|
|
21
|
+
export { tabColorVars, tabListStateVars, tabPanelStateVars, tabPanelsStateVars, tabSpaceVars, tabStateVars, tabsClassNames, tabsContainers } from './components/tabs/tabs.css.js';
|
|
22
|
+
export { textAreaClassNames, textAreaColorVars, textAreaContainer, textAreaSpaceVars, textAreaStateVars } from './components/textarea/textarea.css.js';
|
|
23
|
+
export { textFieldClassNames, textFieldColorVars, textFieldContainer, textFieldSpaceVars, textFieldStateVars } from './components/text-field/text-field.css.js';
|
|
24
|
+
export { tooltipClassNames, tooltipContainers, tooltipSpaceVars, tooltipStateVars, tooltipTargetStateVars } from './components/tooltip/tooltip.css.js';
|
|
25
|
+
export { treeClassNames, treeColorVars, treeContainers, treeGroupStateVars, treeIndicatorStateVars, treeItemStateVars, treeSpaceVars, treeStateVars } from './components/tree/tree.css.js';
|
|
26
|
+
export { bodies, defaultElevationVarValues, defaultElevations, defaultFocus, defaultFocusVarValues, defaultGenericColorVarValues, defaultGenericColors, defaultRadius, defaultRadiusVarValues, defaultSemanticColorVarValues, defaultSemanticColors, defaultSizes, defaultSizesVarValues, defaultSpace, defaultSpaceVarValues, defaultTypography, defaultTypographyVarValues, defaultZIndex, defaultZIndexVarValues, elevationVars, families, focusOutlineStyle, focusVars, genericColorVars, headings, inputs, label, layers, radiusVars, semanticColorVars, sizeVars, spaceVars, surfaces, typographyVars, zIndexVars } from './styles/index.js';
|
|
27
|
+
export { applyThemeVars, assignPartialVars, computeContract, containerQueries, containerQuery, inlineVars, reduceContract, unwrapCssVar } from './utils/css.js';
|
|
2
28
|
//# sourceMappingURL=vanilla.js.map
|
|
3
29
|
//# sourceMappingURL=vanilla.js.map
|
package/dist/vanilla.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"vanilla.js"}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"vanilla.js","sourcesContent":[]}
|