@accelint/design-system 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-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 +304 -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 +288 -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 +62 -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 +89 -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 +488 -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 +27 -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 +55 -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 +257 -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 +84 -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 +90 -53
- 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 +6879 -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 +6 -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 +55 -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 +145 -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 +6 -4
- 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 @@
|
|
|
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,145 @@
|
|
|
1
|
+
import '../chunk-PZ5AY32C.js';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import mergeWith from 'lodash/mergeWith';
|
|
4
|
+
import { mergeProps as mergeProps$1 } from '@react-aria/utils';
|
|
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
|
+
return [...acc, props.className];
|
|
34
|
+
}, [])
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function mergeClassNameProps(...propsToMerge) {
|
|
38
|
+
const anyFunctions = propsToMerge.some(
|
|
39
|
+
(props) => typeof props?.className === "function"
|
|
40
|
+
);
|
|
41
|
+
const anyPrimitives = propsToMerge.some(
|
|
42
|
+
(props) => typeof props?.className === "string"
|
|
43
|
+
);
|
|
44
|
+
if (!(anyFunctions || anyPrimitives)) {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
return anyFunctions ? mergeRenderClassName(...propsToMerge) : mergeStaticClassName(...propsToMerge);
|
|
48
|
+
}
|
|
49
|
+
var classNamesValidator = z.record(
|
|
50
|
+
z.string(),
|
|
51
|
+
z.union([z.string(), z.lazy(() => classNamesValidator)])
|
|
52
|
+
);
|
|
53
|
+
var propsValidator = z.object({
|
|
54
|
+
classNames: classNamesValidator
|
|
55
|
+
});
|
|
56
|
+
function mergeClassNamesProps(...propsToMerge) {
|
|
57
|
+
return propsToMerge.reduce((acc, props) => {
|
|
58
|
+
const result = propsValidator.safeParse(props);
|
|
59
|
+
if (result.success) {
|
|
60
|
+
return acc ? mergeWith(
|
|
61
|
+
acc,
|
|
62
|
+
result.data.classNames,
|
|
63
|
+
(accValue, srcValue) => (!accValue || typeof accValue === "string") && (!srcValue || typeof srcValue === "string") ? clsx(accValue, srcValue) : void 0
|
|
64
|
+
) : result.data.classNames;
|
|
65
|
+
}
|
|
66
|
+
return acc;
|
|
67
|
+
}, void 0);
|
|
68
|
+
}
|
|
69
|
+
function mergeClassNames(...classNamesToMerge) {
|
|
70
|
+
return mergeClassNamesProps(
|
|
71
|
+
...classNamesToMerge.map((classNames) => ({ classNames }))
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
function processStyleRenderProps(value, renderProps, ...propsToMerge) {
|
|
75
|
+
if (!propsToMerge.length) {
|
|
76
|
+
return {};
|
|
77
|
+
}
|
|
78
|
+
const [props, ...rest] = propsToMerge;
|
|
79
|
+
return {
|
|
80
|
+
...value,
|
|
81
|
+
...composeRenderProps(
|
|
82
|
+
props?.style ?? {},
|
|
83
|
+
(prev) => processStyleRenderProps(prev, renderProps, ...rest)
|
|
84
|
+
)(renderProps)
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function mergeRenderStyle(...propsToMerge) {
|
|
88
|
+
return composeRenderProps(
|
|
89
|
+
(renderProps) => renderProps.defaultStyle ?? {},
|
|
90
|
+
(prev, renderProps) => processStyleRenderProps(prev, renderProps, ...propsToMerge)
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function mergeStaticStyle(...propsToMerge) {
|
|
94
|
+
return propsToMerge.reduce((acc, props) => {
|
|
95
|
+
if (!props?.style) {
|
|
96
|
+
return acc;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
...acc,
|
|
100
|
+
...props.style
|
|
101
|
+
};
|
|
102
|
+
}, {});
|
|
103
|
+
}
|
|
104
|
+
function mergeStyleProps(...propsToMerge) {
|
|
105
|
+
const anyFunctions = propsToMerge.some(
|
|
106
|
+
(props) => typeof props?.style === "function"
|
|
107
|
+
);
|
|
108
|
+
const anyObjects = propsToMerge.some(
|
|
109
|
+
(props) => typeof props?.style === "object" && props.style != null
|
|
110
|
+
);
|
|
111
|
+
if (!(anyFunctions || anyObjects)) {
|
|
112
|
+
return void 0;
|
|
113
|
+
}
|
|
114
|
+
return anyFunctions ? mergeRenderStyle(...propsToMerge) : mergeStaticStyle(...propsToMerge);
|
|
115
|
+
}
|
|
116
|
+
function mergeProps(...propsToMerge) {
|
|
117
|
+
const className = mergeClassNameProps(...propsToMerge);
|
|
118
|
+
const classNames = mergeClassNamesProps(...propsToMerge);
|
|
119
|
+
const style = mergeStyleProps(...propsToMerge);
|
|
120
|
+
return {
|
|
121
|
+
...mergeProps$1(...propsToMerge),
|
|
122
|
+
...className ? { className } : {},
|
|
123
|
+
...classNames ? { classNames } : {},
|
|
124
|
+
...style ? { style } : {}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function callRenderProps(value, values) {
|
|
128
|
+
if (typeof value === "function") {
|
|
129
|
+
return value(values);
|
|
130
|
+
}
|
|
131
|
+
return value;
|
|
132
|
+
}
|
|
133
|
+
function wrapRenderProps(value, inject) {
|
|
134
|
+
if (typeof value === "function") {
|
|
135
|
+
return (renderProps) => value({
|
|
136
|
+
...renderProps,
|
|
137
|
+
...inject
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return value;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export { callRenderProps, mergeClassNames, mergeProps, wrapRenderProps };
|
|
144
|
+
//# sourceMappingURL=props.js.map
|
|
145
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/props.ts"],"names":["mergePropsWithoutStyles"],"mappings":";;;;;;;AAmBA,SAAS,2BAAA,CACP,KACA,EAAA,WAAA,EAAA,GACG,YACK,EAAA;AACR,EAAI,IAAA,CAAC,aAAa,MAAQ,EAAA;AACxB,IAAO,OAAA,EAAA;AAAA;AAGT,EAAA,MAAM,CAAC,KAAA,EAAO,GAAG,IAAI,CAAI,GAAA,YAAA;AAEzB,EAAO,OAAA,IAAA;AAAA,IACL,KAAA;AAAA,IAC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AA,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":["import { clsx } from 'clsx';\nimport mergeWith from 'lodash/mergeWith';\nimport type { CSSProperties } from 'react';\nimport { mergeProps as mergePropsWithoutStyles } from '@react-aria/utils';\nimport { composeRenderProps } from 'react-aria-components';\nimport { z } from 'zod';\nimport type {\n ClassNameRenderProps,\n ClassNames,\n RenderProps,\n StylePropRenderProps,\n AsType,\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 return [...acc, props.className];\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 return {\n ...acc,\n ...props.style,\n };\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":";;;;AAOO,IAAM,2BAA8B,GAAA,CAAA,CAAE,MAAO,EAAA,CAAE,IAAK;AAW9C,IAAA,2BAAA,GAA8B,EACxC,KAAM,CAAA;AAAA,EACL,CAAA,CAAE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,CAAA,KAAA,EAAO,EAAE,CAAC;AAClD,CAAC,CACA,CAAA,SAAA,CAAU,CAAC,KAAA,KAAU,KAAM,CAAA,OAAA,CAAQ,UAAY,EAAA,EAAE,CAAE,CAAA,KAAA,CAAM,GAAG,CAAC,CAC7D,CAAA,IAAA;AAAA,EACC,EAAE,KAAM,CAAA;AAAA,IACN,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA;AAAA,GACD;AACH;AAOW,IAAA,oBAAA,GAAuB,EAAE,KAAM,CAAA;AAAA,EAC1C,EACG,KAAM,CAAA;AAAA,IACL,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA;AAAA,GACD,EACA,SAAgB,CAAA,CAAC,QAAQ,CAAC,GAAG,GAAK,EAAA,GAAG,CAAC,CAAA;AAAA,EACzC,EAAE,KAAM,CAAA;AAAA,IACN,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA;AAAA,GACD;AACH,CAAC","file":"validators.js","sourcesContent":["import 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":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@accelint/design-system",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"author": "https://hypergiant.com",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"publishConfig": {
|
|
@@ -46,10 +46,12 @@
|
|
|
46
46
|
"@testing-library/user-event": "^14.5.2",
|
|
47
47
|
"@types/lodash": "^4.17.10",
|
|
48
48
|
"@types/react": "^18.3.11",
|
|
49
|
+
"@types/react-dom": "^18.3.1",
|
|
49
50
|
"@vanilla-extract/esbuild-plugin": "^2.3.11",
|
|
50
51
|
"@vanilla-extract/vite-plugin": "^4.0.16",
|
|
51
52
|
"@vitest/coverage-istanbul": "^2.1.3",
|
|
52
53
|
"autoprefixer": "^10.4.20",
|
|
54
|
+
"esbuild-plugin-file-path-extensions": "^2.1.3",
|
|
53
55
|
"esbuild-plugin-lodash": "^1.2.0",
|
|
54
56
|
"jsdom": "^25.0.1",
|
|
55
57
|
"react-test-renderer": "^18.3.1",
|
|
@@ -58,8 +60,8 @@
|
|
|
58
60
|
"vite": "^5.4.9",
|
|
59
61
|
"vitest": "^2.1.3",
|
|
60
62
|
"@accelint/typescript-config": "0.1.2",
|
|
61
|
-
"@accelint/
|
|
62
|
-
"@accelint/
|
|
63
|
+
"@accelint/biome-config": "0.1.2",
|
|
64
|
+
"@accelint/vitest-config": "0.1.3"
|
|
63
65
|
},
|
|
64
66
|
"dependencies": {
|
|
65
67
|
"@vanilla-extract/css": "^1.16.0",
|
|
@@ -91,7 +93,7 @@
|
|
|
91
93
|
},
|
|
92
94
|
"scripts": {
|
|
93
95
|
"bench": "pnpm vitest bench --run --dir src",
|
|
94
|
-
"build": "pnpm tsup && rm -
|
|
96
|
+
"build": "rm -rf dist && pnpm tsup --config=tsup.css.config.ts && rm -f dist/index.js && NODE_OPTIONS=--max_old_space_size=8192 pnpm tsup",
|
|
95
97
|
"dev": "pnpm tsc --watch",
|
|
96
98
|
"index": "pnpm zx ../../scripts/indexer.mjs packages/design-system --barrels",
|
|
97
99
|
"lint:todo": "pnpm biome lint ./",
|