solid-tiny-ui 0.4.0 → 0.6.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/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/alert/alert.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/alert/alert.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/buttons/basic-button/basic-button.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/buttons/basic-button/basic-button.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer-helper.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer-helper.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/combobox/combobox.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/combobox/combobox.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/number-input/number-input.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/number-input/number-input.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/password-input/password-input.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/password-input/password-input.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/radio-group/radio-group.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/radio-group/radio-group.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/switcher/switcher.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/switcher/switcher.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/text-field/text-field.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/text-field/text-field.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/textarea/textarea.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/textarea/textarea.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/time-picker/time-picker.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/time-picker/time-picker.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/pagination/pagination.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/pagination/pagination.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/popover/popover.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/popover/popover.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/spin/spin.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/spin/spin.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tabs/tabs.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tabs/tabs.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/toaster/toaster.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/toaster/toaster.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tooltip/tooltip.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tooltip/tooltip.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/visually-hidden/visually-hidden.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/visually-hidden/visually-hidden.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/root-provider/global.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/root-provider/global.jsx +1 -1
- package/dist/components/alert/alert.d.ts +25 -0
- package/dist/components/alert/alert.js +186 -0
- package/dist/components/alert/alert.jsx +73 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/alert/index.jsx +1 -0
- package/dist/components/buttons/basic-button/basic-button.d.ts +2 -2
- package/dist/components/buttons/basic-button/basic-button.js +20 -29
- package/dist/components/buttons/basic-button/basic-button.jsx +6 -7
- package/dist/components/buttons/state-button/state-button.d.ts +2 -2
- package/dist/components/buttons/state-button/state-button.js +2 -2
- package/dist/components/buttons/state-button/state-button.jsx +2 -2
- package/dist/components/drawer/helpers.d.ts +25 -0
- package/dist/components/drawer/helpers.js +104 -0
- package/dist/components/drawer/helpers.jsx +60 -0
- package/dist/components/drawer/index.d.ts +42 -0
- package/dist/components/drawer/index.js +95 -0
- package/dist/components/drawer/index.jsx +57 -0
- package/dist/components/field/index.d.ts +10 -0
- package/dist/components/field/index.js +11 -0
- package/dist/components/field/index.jsx +11 -0
- package/dist/components/field/parts.d.ts +24 -0
- package/dist/components/field/parts.js +69 -0
- package/dist/components/field/parts.jsx +41 -0
- package/dist/components/form-components/checkbox/checkbox.d.ts +26 -0
- package/dist/components/form-components/checkbox/checkbox.js +118 -0
- package/dist/components/form-components/checkbox/checkbox.jsx +42 -0
- package/dist/components/form-components/checkbox/index.d.ts +1 -0
- package/dist/components/form-components/checkbox/index.js +1 -0
- package/dist/components/form-components/checkbox/index.jsx +1 -0
- package/dist/components/form-components/checkbox-group/checkbox-group.d.ts +26 -0
- package/dist/components/form-components/checkbox-group/checkbox-group.js +76 -0
- package/dist/components/form-components/checkbox-group/checkbox-group.jsx +34 -0
- package/dist/components/form-components/checkbox-group/index.d.ts +1 -0
- package/dist/components/form-components/checkbox-group/index.js +1 -0
- package/dist/components/form-components/checkbox-group/index.jsx +1 -0
- package/dist/components/{combobox → form-components/combobox}/combobox.d.ts +6 -4
- package/dist/components/{combobox → form-components/combobox}/combobox.js +18 -14
- package/dist/components/{combobox → form-components/combobox}/combobox.jsx +10 -10
- package/dist/components/form-components/index.d.ts +19 -0
- package/dist/components/form-components/index.js +19 -0
- package/dist/components/form-components/index.jsx +19 -0
- package/dist/components/form-components/number-input/index.d.ts +1 -0
- package/dist/components/form-components/number-input/index.js +1 -0
- package/dist/components/form-components/number-input/index.jsx +1 -0
- package/dist/components/form-components/number-input/number-input.d.ts +33 -0
- package/dist/components/form-components/number-input/number-input.js +113 -0
- package/dist/components/form-components/number-input/number-input.jsx +59 -0
- package/dist/components/form-components/password-input/index.d.ts +1 -0
- package/dist/components/form-components/password-input/index.js +1 -0
- package/dist/components/form-components/password-input/index.jsx +1 -0
- package/dist/components/form-components/password-input/password-input.d.ts +31 -0
- package/dist/components/form-components/password-input/password-input.js +95 -0
- package/dist/components/form-components/password-input/password-input.jsx +36 -0
- package/dist/components/form-components/radio-group/index.d.ts +1 -0
- package/dist/components/form-components/radio-group/index.js +1 -0
- package/dist/components/form-components/radio-group/index.jsx +1 -0
- package/dist/components/form-components/radio-group/radio-group.d.ts +26 -0
- package/dist/components/form-components/radio-group/radio-group.js +118 -0
- package/dist/components/form-components/radio-group/radio-group.jsx +45 -0
- package/dist/components/form-components/switcher/index.d.ts +1 -0
- package/dist/components/form-components/switcher/index.js +1 -0
- package/dist/components/form-components/switcher/index.jsx +1 -0
- package/dist/components/form-components/switcher/switcher.d.ts +23 -0
- package/dist/components/form-components/switcher/switcher.js +92 -0
- package/dist/components/form-components/switcher/switcher.jsx +32 -0
- package/dist/components/form-components/text-field/index.d.ts +1 -0
- package/dist/components/form-components/text-field/index.js +1 -0
- package/dist/components/form-components/text-field/index.jsx +1 -0
- package/dist/components/form-components/text-field/text-field.d.ts +30 -0
- package/dist/components/form-components/text-field/text-field.js +112 -0
- package/dist/components/form-components/text-field/text-field.jsx +40 -0
- package/dist/components/{textarea → form-components/textarea}/textarea.d.ts +5 -2
- package/dist/components/form-components/textarea/textarea.js +55 -0
- package/dist/components/form-components/textarea/textarea.jsx +24 -0
- package/dist/components/form-components/time-picker/index.d.ts +27 -0
- package/dist/components/form-components/time-picker/index.js +106 -0
- package/dist/components/form-components/time-picker/index.jsx +44 -0
- package/dist/components/form-components/time-picker/panel.js +185 -0
- package/dist/components/form-components/time-picker/panel.jsx +108 -0
- package/dist/components/form-components/time-picker/trigger.js +68 -0
- package/dist/components/form-components/time-picker/trigger.jsx +37 -0
- package/dist/components/modal/helpers.js +1 -1
- package/dist/components/modal/helpers.jsx +1 -1
- package/dist/components/modal/index.d.ts +5 -8
- package/dist/components/modal/index.js +13 -10
- package/dist/components/modal/index.jsx +7 -4
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/index.jsx +1 -0
- package/dist/components/pagination/pagination.d.ts +32 -0
- package/dist/components/pagination/pagination.js +336 -0
- package/dist/components/pagination/pagination.jsx +104 -0
- package/dist/components/popover/index.js +4 -3
- package/dist/components/popover/index.jsx +2 -1
- package/dist/components/progress/circle-progress.d.ts +7 -0
- package/dist/components/progress/circle-progress.js +33 -14
- package/dist/components/progress/circle-progress.jsx +15 -12
- package/dist/components/progress/line-progress.d.ts +2 -2
- package/dist/components/progress/line-progress.js +6 -5
- package/dist/components/progress/line-progress.jsx +6 -5
- package/dist/components/progress/loading-bar.d.ts +2 -2
- package/dist/components/spin/spin-ring.d.ts +2 -2
- package/dist/components/spin/spin-ring.js +1 -1
- package/dist/components/spin/spin-ring.jsx +1 -1
- package/dist/components/spin/spin.js +8 -7
- package/dist/components/spin/spin.jsx +6 -5
- package/dist/components/tabs/index.d.ts +7 -0
- package/dist/components/tabs/index.js +40 -12
- package/dist/components/tabs/index.jsx +9 -7
- package/dist/components/toaster/context.js +31 -0
- package/dist/components/toaster/context.jsx +31 -0
- package/dist/components/toaster/icon.js +50 -0
- package/dist/components/toaster/icon.jsx +27 -0
- package/dist/components/toaster/index.d.ts +3 -0
- package/dist/components/toaster/index.js +2 -0
- package/dist/components/toaster/index.jsx +2 -0
- package/dist/components/toaster/locator.js +67 -0
- package/dist/components/toaster/locator.jsx +54 -0
- package/dist/components/toaster/one-toaster.js +146 -0
- package/dist/components/toaster/one-toaster.jsx +104 -0
- package/dist/components/toaster/provider.d.ts +11 -0
- package/dist/components/toaster/provider.js +64 -0
- package/dist/components/toaster/provider.jsx +51 -0
- package/dist/components/toaster/type.d.ts +15 -0
- package/dist/components/toaster/use-toaster.d.ts +48 -0
- package/dist/components/toaster/use-toaster.js +72 -0
- package/dist/components/toaster/use-toaster.jsx +72 -0
- package/dist/components/tooltip/tooltip.d.ts +7 -0
- package/dist/components/tooltip/tooltip.js +9 -2
- package/dist/components/tooltip/tooltip.jsx +4 -2
- package/dist/components/visually-hidden/index.js +19 -0
- package/dist/components/visually-hidden/index.jsx +12 -0
- package/dist/icons/arrow-down-s-line.d.ts +3 -2
- package/dist/icons/arrow-down-s-line.js +4 -4
- package/dist/icons/arrow-down-s-line.jsx +2 -2
- package/dist/icons/arrow-left.d.ts +7 -0
- package/dist/icons/arrow-left.js +13 -0
- package/dist/icons/arrow-left.jsx +11 -0
- package/dist/icons/arrow-right.d.ts +7 -0
- package/dist/icons/arrow-right.js +13 -0
- package/dist/icons/arrow-right.jsx +11 -0
- package/dist/icons/check-bold.d.ts +7 -0
- package/dist/icons/check-bold.js +13 -0
- package/dist/icons/check-bold.jsx +11 -0
- package/dist/icons/check-line.d.ts +7 -0
- package/dist/icons/check-line.js +13 -0
- package/dist/icons/check-line.jsx +11 -0
- package/dist/icons/checkbox-circle-line.d.ts +7 -0
- package/dist/icons/checkbox-circle-line.js +13 -0
- package/dist/icons/checkbox-circle-line.jsx +11 -0
- package/dist/icons/close-line.d.ts +3 -2
- package/dist/icons/close-line.js +4 -4
- package/dist/icons/close-line.jsx +2 -2
- package/dist/icons/common.d.ts +9 -0
- package/dist/icons/common.js +12 -2
- package/dist/icons/common.jsx +1 -1
- package/dist/icons/ellipsis.d.ts +7 -0
- package/dist/icons/ellipsis.js +13 -0
- package/dist/icons/ellipsis.jsx +11 -0
- package/dist/icons/error-warning-line.d.ts +7 -0
- package/dist/icons/error-warning-line.js +13 -0
- package/dist/icons/error-warning-line.jsx +11 -0
- package/dist/icons/eye-line.d.ts +7 -0
- package/dist/icons/eye-line.js +13 -0
- package/dist/icons/eye-line.jsx +11 -0
- package/dist/icons/eye-off-line.d.ts +7 -0
- package/dist/icons/eye-off-line.js +13 -0
- package/dist/icons/eye-off-line.jsx +11 -0
- package/dist/icons/index.d.ts +13 -1
- package/dist/icons/index.js +13 -1
- package/dist/icons/index.jsx +13 -1
- package/dist/icons/information-line.d.ts +7 -0
- package/dist/icons/information-line.js +13 -0
- package/dist/icons/information-line.jsx +11 -0
- package/dist/icons/loading.d.ts +13 -0
- package/dist/icons/loading.js +18 -0
- package/dist/icons/loading.jsx +19 -0
- package/dist/icons/subtract.d.ts +7 -0
- package/dist/icons/subtract.js +13 -0
- package/dist/icons/subtract.jsx +11 -0
- package/dist/index.d.ts +23 -8
- package/dist/index.js +23 -9
- package/dist/index.jsx +23 -9
- package/dist/layout/flex/index.d.ts +5 -4
- package/dist/layout/flex/index.js +25 -15
- package/dist/layout/flex/index.jsx +23 -10
- package/dist/layout/index.d.ts +1 -2
- package/dist/layout/index.js +0 -1
- package/dist/layout/index.jsx +0 -1
- package/dist/primitives/animated-group/context.d.ts +9 -9
- package/dist/primitives/animated-group/panel.js +14 -13
- package/dist/primitives/animated-group/panel.jsx +7 -6
- package/dist/primitives/animated-group/root.d.ts +4 -4
- package/dist/primitives/animated-group/root.js +2 -3
- package/dist/primitives/animated-group/root.jsx +2 -3
- package/dist/primitives/checkbox/context.d.ts +63 -0
- package/dist/primitives/checkbox/context.js +13 -0
- package/dist/primitives/checkbox/context.jsx +13 -0
- package/dist/primitives/checkbox/index.d.ts +26 -0
- package/dist/primitives/checkbox/index.js +13 -0
- package/dist/primitives/checkbox/index.jsx +13 -0
- package/dist/primitives/checkbox/parts.d.ts +10 -0
- package/dist/primitives/checkbox/parts.js +62 -0
- package/dist/primitives/checkbox/parts.jsx +28 -0
- package/dist/primitives/checkbox/root.d.ts +16 -0
- package/dist/primitives/checkbox/root.js +25 -0
- package/dist/primitives/checkbox/root.jsx +24 -0
- package/dist/primitives/checkbox-group/context.js +21 -0
- package/dist/primitives/checkbox-group/context.jsx +21 -0
- package/dist/primitives/checkbox-group/index.js +12 -0
- package/dist/primitives/checkbox-group/index.jsx +12 -0
- package/dist/primitives/checkbox-group/parts.js +33 -0
- package/dist/primitives/checkbox-group/parts.jsx +21 -0
- package/dist/primitives/checkbox-group/root.js +24 -0
- package/dist/primitives/checkbox-group/root.jsx +23 -0
- package/dist/primitives/fake-scroll-list/context.js +30 -0
- package/dist/primitives/fake-scroll-list/context.jsx +30 -0
- package/dist/primitives/fake-scroll-list/index.d.ts +52 -0
- package/dist/primitives/fake-scroll-list/index.js +36 -0
- package/dist/primitives/fake-scroll-list/index.jsx +36 -0
- package/dist/primitives/fake-scroll-list/item.d.ts +11 -0
- package/dist/primitives/fake-scroll-list/item.js +30 -0
- package/dist/primitives/fake-scroll-list/item.jsx +13 -0
- package/dist/primitives/fake-scroll-list/listbox.d.ts +8 -0
- package/dist/primitives/fake-scroll-list/listbox.js +72 -0
- package/dist/primitives/fake-scroll-list/listbox.jsx +61 -0
- package/dist/primitives/fake-scroll-list/root.d.ts +15 -0
- package/dist/primitives/fake-scroll-list/root.js +52 -0
- package/dist/primitives/fake-scroll-list/root.jsx +40 -0
- package/dist/primitives/floating/content.js +12 -11
- package/dist/primitives/floating/content.jsx +7 -6
- package/dist/primitives/floating/context.d.ts +10 -9
- package/dist/primitives/floating/context.js +1 -1
- package/dist/primitives/floating/context.jsx +1 -1
- package/dist/primitives/floating/index.d.ts +3 -2
- package/dist/primitives/floating/trigger.js +1 -1
- package/dist/primitives/floating/trigger.jsx +1 -1
- package/dist/primitives/floating/types.d.ts +2 -1
- package/dist/primitives/index.d.ts +8 -1
- package/dist/primitives/index.js +8 -3
- package/dist/primitives/index.jsx +8 -3
- package/dist/primitives/listbox/listbox.d.ts +3 -3
- package/dist/primitives/modal/content.d.ts +3 -3
- package/dist/primitives/modal/content.js +2 -3
- package/dist/primitives/modal/content.jsx +2 -3
- package/dist/primitives/modal/context.d.ts +16 -29
- package/dist/primitives/modal/context.js +2 -4
- package/dist/primitives/modal/context.jsx +2 -4
- package/dist/primitives/modal/index.d.ts +5 -8
- package/dist/primitives/modal/portal.js +1 -1
- package/dist/primitives/modal/portal.jsx +1 -1
- package/dist/primitives/modal/root.d.ts +2 -3
- package/dist/primitives/modal/root.js +10 -10
- package/dist/primitives/modal/root.jsx +10 -10
- package/dist/primitives/pagination/context.d.ts +89 -0
- package/dist/primitives/pagination/context.js +88 -0
- package/dist/primitives/pagination/context.jsx +88 -0
- package/dist/primitives/pagination/index.d.ts +33 -0
- package/dist/primitives/pagination/index.js +12 -0
- package/dist/primitives/pagination/index.jsx +12 -0
- package/dist/primitives/pagination/items.d.ts +9 -0
- package/dist/primitives/pagination/items.js +19 -0
- package/dist/primitives/pagination/items.jsx +11 -0
- package/dist/primitives/pagination/root.d.ts +16 -0
- package/dist/primitives/pagination/root.js +24 -0
- package/dist/primitives/pagination/root.jsx +23 -0
- package/dist/primitives/radio-group/context.d.ts +91 -0
- package/dist/primitives/radio-group/context.js +16 -0
- package/dist/primitives/radio-group/context.jsx +16 -0
- package/dist/primitives/radio-group/index.d.ts +34 -0
- package/dist/primitives/radio-group/index.js +15 -0
- package/dist/primitives/radio-group/index.jsx +15 -0
- package/dist/primitives/radio-group/item.d.ts +19 -0
- package/dist/primitives/radio-group/item.js +74 -0
- package/dist/primitives/radio-group/item.jsx +44 -0
- package/dist/primitives/radio-group/root.d.ts +14 -0
- package/dist/primitives/radio-group/root.js +23 -0
- package/dist/primitives/radio-group/root.jsx +22 -0
- package/dist/root-provider/context.d.ts +16 -9
- package/dist/root-provider/context.js +4 -1
- package/dist/root-provider/context.jsx +4 -1
- package/dist/root-provider/gen-colors.js +138 -0
- package/dist/root-provider/gen-colors.jsx +138 -0
- package/dist/root-provider/provider.js +4 -3
- package/dist/root-provider/provider.jsx +3 -2
- package/dist/utils/duration.js +10 -0
- package/dist/utils/duration.jsx +10 -0
- package/dist/utils/index.js +1 -4
- package/dist/utils/index.jsx +1 -4
- package/dist/utils/types.d.ts +4 -8
- package/package.json +9 -8
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/combobox/combobox.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/combobox/combobox.jsx +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/input/input.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/input/input.jsx +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/textarea/textarea.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/textarea/textarea.jsx +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/layout/input-compact/input-compact.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/layout/input-compact/input-compact.jsx +0 -5
- package/dist/components/input/index.d.ts +0 -1
- package/dist/components/input/index.js +0 -1
- package/dist/components/input/index.jsx +0 -1
- package/dist/components/input/input.d.ts +0 -15
- package/dist/components/input/input.js +0 -44
- package/dist/components/input/input.jsx +0 -16
- package/dist/components/textarea/textarea.js +0 -49
- package/dist/components/textarea/textarea.jsx +0 -24
- package/dist/layout/input-compact/index.d.ts +0 -13
- package/dist/layout/input-compact/index.js +0 -42
- package/dist/layout/input-compact/index.jsx +0 -32
- package/dist/root-provider/gen-brand.js +0 -55
- package/dist/root-provider/gen-brand.jsx +0 -55
- package/dist/utils/types.js +0 -7
- package/dist/utils/types.jsx +0 -7
- /package/dist/components/{combobox → form-components/combobox}/index.d.ts +0 -0
- /package/dist/components/{combobox → form-components/combobox}/index.js +0 -0
- /package/dist/components/{combobox → form-components/combobox}/index.jsx +0 -0
- /package/dist/components/{textarea → form-components/textarea}/index.d.ts +0 -0
- /package/dist/components/{textarea → form-components/textarea}/index.js +0 -0
- /package/dist/components/{textarea → form-components/textarea}/index.jsx +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { extraAriasAndDatasets } from "../../utils/index.js";
|
|
2
|
+
import { getAnimationDurationMs } from "../../utils/duration.js";
|
|
2
3
|
import { context } from "./context.js";
|
|
3
4
|
import { createComponent, insert, mergeProps, spread, template, use } from "solid-js/web";
|
|
4
5
|
import { Show, createSignal } from "solid-js";
|
|
@@ -15,15 +16,15 @@ function Content(props) {
|
|
|
15
16
|
get ["class"]() {
|
|
16
17
|
return props.class;
|
|
17
18
|
},
|
|
18
|
-
get ["data-
|
|
19
|
-
return dataIf(
|
|
19
|
+
get ["data-entering"]() {
|
|
20
|
+
return dataIf(["pre-enter", "entering"].includes(props.presencePhase));
|
|
21
|
+
},
|
|
22
|
+
get ["data-exiting"]() {
|
|
23
|
+
return dataIf(props.presencePhase === "exiting");
|
|
20
24
|
},
|
|
21
25
|
get ["data-key"]() {
|
|
22
26
|
return props.key;
|
|
23
27
|
},
|
|
24
|
-
get ["data-opening"]() {
|
|
25
|
-
return dataIf(props.status === "opening");
|
|
26
|
-
},
|
|
27
28
|
get style() {
|
|
28
29
|
return props.style;
|
|
29
30
|
}
|
|
@@ -35,20 +36,20 @@ function Content(props) {
|
|
|
35
36
|
function Panel(props) {
|
|
36
37
|
const [state] = context.useContext();
|
|
37
38
|
const [ref, setRef] = createSignal();
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const presence = createPresence(() => state.active === props.key, {
|
|
40
|
+
enterDuration: () => getAnimationDurationMs(ref()),
|
|
41
|
+
exitDuration: () => getAnimationDurationMs(ref())
|
|
41
42
|
});
|
|
42
43
|
return createComponent(Show, {
|
|
43
44
|
get when() {
|
|
44
|
-
return
|
|
45
|
+
return presence.isMounted();
|
|
45
46
|
},
|
|
46
47
|
get children() {
|
|
47
48
|
return createComponent(Content, mergeProps(props, {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
get presencePhase() {
|
|
50
|
+
return presence.phase();
|
|
51
|
+
},
|
|
52
|
+
ref: setRef
|
|
52
53
|
}));
|
|
53
54
|
}
|
|
54
55
|
});
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { extraAriasAndDatasets } from "../../utils/index.jsx";
|
|
2
|
+
import { getAnimationDurationMs } from "../../utils/duration.jsx";
|
|
2
3
|
import { context } from "./context.jsx";
|
|
3
4
|
import { Show, createSignal } from "solid-js";
|
|
4
5
|
import { createPresence, dataIf } from "solid-tiny-utils";
|
|
5
6
|
|
|
6
7
|
//#region src/primitives/animated-group/panel.tsx
|
|
7
8
|
function Content(props) {
|
|
8
|
-
return <div {...extraAriasAndDatasets(props)} class={props.class} data-
|
|
9
|
+
return <div {...extraAriasAndDatasets(props)} class={props.class} data-entering={dataIf(["pre-enter", "entering"].includes(props.presencePhase))} data-exiting={dataIf(props.presencePhase === "exiting")} data-key={props.key} ref={props.ref} style={props.style}>
|
|
9
10
|
{props.children}
|
|
10
11
|
</div>;
|
|
11
12
|
}
|
|
12
13
|
function Panel(props) {
|
|
13
14
|
const [state] = context.useContext();
|
|
14
15
|
const [ref, setRef] = createSignal();
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const presence = createPresence(() => state.active === props.key, {
|
|
17
|
+
enterDuration: () => getAnimationDurationMs(ref()),
|
|
18
|
+
exitDuration: () => getAnimationDurationMs(ref())
|
|
18
19
|
});
|
|
19
|
-
return <Show when={
|
|
20
|
-
<Content {...props}
|
|
20
|
+
return <Show when={presence.isMounted()}>
|
|
21
|
+
<Content {...props} presencePhase={presence.phase()} ref={setRef} />
|
|
21
22
|
</Show>;
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { MaybeContextChild } from "../../utils/types.js";
|
|
2
1
|
import { context } from "./context.js";
|
|
3
|
-
import * as
|
|
2
|
+
import * as solid_js0 from "solid-js";
|
|
3
|
+
import { MaybeCallableChild } from "solid-tiny-utils";
|
|
4
4
|
|
|
5
5
|
//#region src/primitives/animated-group/root.d.ts
|
|
6
6
|
declare function Root(props: {
|
|
7
|
-
children:
|
|
7
|
+
children: MaybeCallableChild<ReturnType<typeof context.useContext>>;
|
|
8
8
|
activeKey?: string;
|
|
9
9
|
onChange?: (key: string) => void;
|
|
10
|
-
}):
|
|
10
|
+
}): solid_js0.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Root };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { context } from "./context.js";
|
|
2
|
-
import { callMaybeContextChild } from "../../utils/types.js";
|
|
3
2
|
import { createComponent } from "solid-js/web";
|
|
4
|
-
import { createWatch } from "solid-tiny-utils";
|
|
3
|
+
import { callMaybeCallableChild, createWatch } from "solid-tiny-utils";
|
|
5
4
|
|
|
6
5
|
//#region src/primitives/animated-group/root.tsx
|
|
7
6
|
function Root(props) {
|
|
@@ -11,7 +10,7 @@ function Root(props) {
|
|
|
11
10
|
if (active !== props.activeKey) props.onChange?.(active);
|
|
12
11
|
});
|
|
13
12
|
return createComponent(Context.Provider, { get children() {
|
|
14
|
-
return
|
|
13
|
+
return callMaybeCallableChild(props.children, ...Context.value);
|
|
15
14
|
} });
|
|
16
15
|
}
|
|
17
16
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { context } from "./context.jsx";
|
|
2
|
-
import {
|
|
3
|
-
import { createWatch } from "solid-tiny-utils";
|
|
2
|
+
import { callMaybeCallableChild, createWatch } from "solid-tiny-utils";
|
|
4
3
|
|
|
5
4
|
//#region src/primitives/animated-group/root.tsx
|
|
6
5
|
function Root(props) {
|
|
@@ -10,7 +9,7 @@ function Root(props) {
|
|
|
10
9
|
if (active !== props.activeKey) props.onChange?.(active);
|
|
11
10
|
});
|
|
12
11
|
return <Context.Provider>
|
|
13
|
-
{
|
|
12
|
+
{callMaybeCallableChild(props.children, ...Context.value)}
|
|
14
13
|
</Context.Provider>;
|
|
15
14
|
}
|
|
16
15
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as solid_js33 from "solid-js";
|
|
2
|
+
import * as solid_tiny_context3 from "solid-tiny-context";
|
|
3
|
+
import * as solid_js_store13 from "solid-js/store";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/checkbox/context.d.ts
|
|
6
|
+
declare const context: {
|
|
7
|
+
useContext: () => [Readonly<{
|
|
8
|
+
checked: boolean;
|
|
9
|
+
indeterminate: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
} & {}>, Omit<{}, "setState"> & {
|
|
14
|
+
setState: solid_js_store13.SetStoreFunction<{
|
|
15
|
+
checked: boolean;
|
|
16
|
+
indeterminate: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
name: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}>;
|
|
21
|
+
}, {}];
|
|
22
|
+
initial(initialState?: Partial<solid_tiny_context3.MaybeSignals<{
|
|
23
|
+
checked: boolean;
|
|
24
|
+
indeterminate: boolean;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
name: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}>> | undefined): {
|
|
29
|
+
Provider(props: {
|
|
30
|
+
children?: solid_js33.JSX.Element;
|
|
31
|
+
}): solid_js33.JSX.Element;
|
|
32
|
+
value: [Readonly<{
|
|
33
|
+
checked: boolean;
|
|
34
|
+
indeterminate: boolean;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
name: string;
|
|
37
|
+
value: string;
|
|
38
|
+
} & {}>, Omit<ThisType<solid_tiny_context3.RealContextThis<{
|
|
39
|
+
checked: boolean;
|
|
40
|
+
indeterminate: boolean;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
name: string;
|
|
43
|
+
value: string;
|
|
44
|
+
}, {}, {}, {}>>, "setState"> & {
|
|
45
|
+
setState: solid_js_store13.SetStoreFunction<{
|
|
46
|
+
checked: boolean;
|
|
47
|
+
indeterminate: boolean;
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
name: string;
|
|
50
|
+
value: string;
|
|
51
|
+
}>;
|
|
52
|
+
}, {}];
|
|
53
|
+
};
|
|
54
|
+
defaultValue: () => {
|
|
55
|
+
checked: boolean;
|
|
56
|
+
indeterminate: boolean;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
name: string;
|
|
59
|
+
value: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { context };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createComponentState } from "solid-tiny-context";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/checkbox/context.ts
|
|
4
|
+
const context = createComponentState({ state: () => ({
|
|
5
|
+
checked: false,
|
|
6
|
+
indeterminate: false,
|
|
7
|
+
disabled: false,
|
|
8
|
+
name: "",
|
|
9
|
+
value: "on"
|
|
10
|
+
}) });
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { context };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createComponentState } from "solid-tiny-context";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/checkbox/context.ts
|
|
4
|
+
const context = createComponentState({ state: () => ({
|
|
5
|
+
checked: false,
|
|
6
|
+
indeterminate: false,
|
|
7
|
+
disabled: false,
|
|
8
|
+
name: "",
|
|
9
|
+
value: "on"
|
|
10
|
+
}) });
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { context };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Input, Label } from "./parts.js";
|
|
2
|
+
import { Root } from "./root.js";
|
|
3
|
+
import * as solid_js_store1 from "solid-js/store";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/checkbox/index.d.ts
|
|
6
|
+
declare const CheckboxCore: typeof Root & {
|
|
7
|
+
Input: typeof Input;
|
|
8
|
+
Label: typeof Label;
|
|
9
|
+
useContext: () => [Readonly<{
|
|
10
|
+
checked: boolean;
|
|
11
|
+
indeterminate: boolean;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
} & {}>, Omit<{}, "setState"> & {
|
|
16
|
+
setState: solid_js_store1.SetStoreFunction<{
|
|
17
|
+
checked: boolean;
|
|
18
|
+
indeterminate: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
name: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}>;
|
|
23
|
+
}, {}];
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { CheckboxCore };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { Input, Label } from "./parts.js";
|
|
3
|
+
import { Root } from "./root.js";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/checkbox/index.ts
|
|
6
|
+
const CheckboxCore = Object.assign(Root, {
|
|
7
|
+
Input,
|
|
8
|
+
Label,
|
|
9
|
+
useContext: context.useContext
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { CheckboxCore };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { Input, Label } from "./parts.jsx";
|
|
3
|
+
import { Root } from "./root.jsx";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/checkbox/index.ts
|
|
6
|
+
const CheckboxCore = Object.assign(Root, {
|
|
7
|
+
Input,
|
|
8
|
+
Label,
|
|
9
|
+
useContext: context.useContext
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { CheckboxCore };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as solid_js3 from "solid-js";
|
|
2
|
+
import { ComponentProps } from "solid-js";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/checkbox/parts.d.ts
|
|
5
|
+
declare function Input(props: {
|
|
6
|
+
id?: string;
|
|
7
|
+
}): solid_js3.JSX.Element;
|
|
8
|
+
declare function Label(props: ComponentProps<"label">): solid_js3.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Input, Label };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { VisuallyHidden } from "../../components/visually-hidden/index.js";
|
|
3
|
+
import { createComponent, spread, template } from "solid-js/web";
|
|
4
|
+
import { createMemo, onMount } from "solid-js";
|
|
5
|
+
import { createWatch } from "solid-tiny-utils";
|
|
6
|
+
|
|
7
|
+
//#region src/primitives/checkbox/parts.tsx
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<label>`);
|
|
9
|
+
function Input(props) {
|
|
10
|
+
const [state, actions] = context.useContext();
|
|
11
|
+
const handleOnChange = (e) => {
|
|
12
|
+
const checked = e.target.checked;
|
|
13
|
+
actions.setState({ checked });
|
|
14
|
+
};
|
|
15
|
+
let inputRef;
|
|
16
|
+
onMount(() => {
|
|
17
|
+
createWatch(() => state.indeterminate, (v) => {
|
|
18
|
+
if (inputRef) inputRef.indeterminate = v;
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
const ariaChecked = createMemo(() => {
|
|
22
|
+
if (state.indeterminate) return "mixed";
|
|
23
|
+
return state.checked ? "true" : "false";
|
|
24
|
+
});
|
|
25
|
+
return createComponent(VisuallyHidden, {
|
|
26
|
+
get ["aria-checked"]() {
|
|
27
|
+
return ariaChecked();
|
|
28
|
+
},
|
|
29
|
+
as: "input",
|
|
30
|
+
get checked() {
|
|
31
|
+
return state.checked;
|
|
32
|
+
},
|
|
33
|
+
get disabled() {
|
|
34
|
+
return state.disabled;
|
|
35
|
+
},
|
|
36
|
+
get id() {
|
|
37
|
+
return props.id;
|
|
38
|
+
},
|
|
39
|
+
get name() {
|
|
40
|
+
return state.name;
|
|
41
|
+
},
|
|
42
|
+
onChange: handleOnChange,
|
|
43
|
+
ref(r$) {
|
|
44
|
+
var _ref$ = inputRef;
|
|
45
|
+
typeof _ref$ === "function" ? _ref$(r$) : inputRef = r$;
|
|
46
|
+
},
|
|
47
|
+
type: "checkbox",
|
|
48
|
+
get value() {
|
|
49
|
+
return state.value;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function Label(props) {
|
|
54
|
+
return (() => {
|
|
55
|
+
var _el$ = _tmpl$();
|
|
56
|
+
spread(_el$, props, false, false);
|
|
57
|
+
return _el$;
|
|
58
|
+
})();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { Input, Label };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { VisuallyHidden } from "../../components/visually-hidden/index.jsx";
|
|
3
|
+
import { createMemo, onMount } from "solid-js";
|
|
4
|
+
import { createWatch } from "solid-tiny-utils";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/checkbox/parts.tsx
|
|
7
|
+
function Input(props) {
|
|
8
|
+
const [state, actions] = context.useContext();
|
|
9
|
+
const handleOnChange = (e) => {
|
|
10
|
+
const checked = e.target.checked;
|
|
11
|
+
actions.setState({ checked });
|
|
12
|
+
};
|
|
13
|
+
let inputRef;
|
|
14
|
+
onMount(() => {
|
|
15
|
+
createWatch(() => state.indeterminate, (v) => {});
|
|
16
|
+
});
|
|
17
|
+
const ariaChecked = createMemo(() => {
|
|
18
|
+
if (state.indeterminate) return "mixed";
|
|
19
|
+
return state.checked ? "true" : "false";
|
|
20
|
+
});
|
|
21
|
+
return <VisuallyHidden aria-checked={ariaChecked()} as="input" checked={state.checked} disabled={state.disabled} id={props.id} name={state.name} onChange={handleOnChange} ref={inputRef} type="checkbox" value={state.value} />;
|
|
22
|
+
}
|
|
23
|
+
function Label(props) {
|
|
24
|
+
return <label {...props} />;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Input, Label };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import * as solid_js0 from "solid-js";
|
|
3
|
+
import { MaybeCallableChild } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/checkbox/root.d.ts
|
|
6
|
+
declare function Root(props: {
|
|
7
|
+
children?: MaybeCallableChild<ReturnType<typeof context.useContext>>;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onChange?: (checked: boolean) => void;
|
|
11
|
+
name?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
indeterminate?: boolean;
|
|
14
|
+
}): solid_js0.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Root };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { createComponent } from "solid-js/web";
|
|
3
|
+
import { createUniqueId } from "solid-js";
|
|
4
|
+
import { callMaybeCallableChild, createWatch } from "solid-tiny-utils";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/checkbox/root.tsx
|
|
7
|
+
function Root(props) {
|
|
8
|
+
const Context = context.initial({
|
|
9
|
+
checked: () => props.checked,
|
|
10
|
+
disabled: () => props.disabled,
|
|
11
|
+
indeterminate: () => props.indeterminate,
|
|
12
|
+
value: () => props.value,
|
|
13
|
+
name: () => props.name || `checkbox_${createUniqueId()}`
|
|
14
|
+
});
|
|
15
|
+
const [state] = Context.value;
|
|
16
|
+
createWatch(() => state.checked, (v) => {
|
|
17
|
+
if (v !== props.checked) props.onChange?.(v);
|
|
18
|
+
});
|
|
19
|
+
return createComponent(Context.Provider, { get children() {
|
|
20
|
+
return callMaybeCallableChild(props.children, ...Context.value);
|
|
21
|
+
} });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Root };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { createUniqueId } from "solid-js";
|
|
3
|
+
import { callMaybeCallableChild, createWatch } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/checkbox/root.tsx
|
|
6
|
+
function Root(props) {
|
|
7
|
+
const Context = context.initial({
|
|
8
|
+
checked: () => props.checked,
|
|
9
|
+
disabled: () => props.disabled,
|
|
10
|
+
indeterminate: () => props.indeterminate,
|
|
11
|
+
value: () => props.value,
|
|
12
|
+
name: () => props.name || `checkbox_${createUniqueId()}`
|
|
13
|
+
});
|
|
14
|
+
const [state] = Context.value;
|
|
15
|
+
createWatch(() => state.checked, (v) => {
|
|
16
|
+
if (v !== props.checked) props.onChange?.(v);
|
|
17
|
+
});
|
|
18
|
+
return <Context.Provider>
|
|
19
|
+
{callMaybeCallableChild(props.children, ...Context.value)}
|
|
20
|
+
</Context.Provider>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Root };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createComponentState } from "solid-tiny-context";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/checkbox-group/context.ts
|
|
4
|
+
const context = createComponentState({
|
|
5
|
+
state: () => ({
|
|
6
|
+
selectValues: [],
|
|
7
|
+
name: "",
|
|
8
|
+
disabled: false
|
|
9
|
+
}),
|
|
10
|
+
methods: { toggleValue(value, checked) {
|
|
11
|
+
const { state, actions } = this;
|
|
12
|
+
const currentValues = state.selectValues;
|
|
13
|
+
let newValues;
|
|
14
|
+
if (checked) newValues = [...currentValues, value];
|
|
15
|
+
else newValues = currentValues.filter((v) => v !== value);
|
|
16
|
+
actions.setState({ selectValues: newValues });
|
|
17
|
+
} }
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { context };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createComponentState } from "solid-tiny-context";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/checkbox-group/context.ts
|
|
4
|
+
const context = createComponentState({
|
|
5
|
+
state: () => ({
|
|
6
|
+
selectValues: [],
|
|
7
|
+
name: "",
|
|
8
|
+
disabled: false
|
|
9
|
+
}),
|
|
10
|
+
methods: { toggleValue(value, checked) {
|
|
11
|
+
const { state, actions } = this;
|
|
12
|
+
const currentValues = state.selectValues;
|
|
13
|
+
let newValues;
|
|
14
|
+
if (checked) newValues = [...currentValues, value];
|
|
15
|
+
else newValues = currentValues.filter((v) => v !== value);
|
|
16
|
+
actions.setState({ selectValues: newValues });
|
|
17
|
+
} }
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { context };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Item, ItemInput, ItemLabel } from "./parts.js";
|
|
2
|
+
import { Root } from "./root.js";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/checkbox-group/index.ts
|
|
5
|
+
const CheckboxGroupCore = Object.assign(Root, {
|
|
6
|
+
Item,
|
|
7
|
+
ItemInput,
|
|
8
|
+
ItemLabel
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { CheckboxGroupCore };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Item, ItemInput, ItemLabel } from "./parts.jsx";
|
|
2
|
+
import { Root } from "./root.jsx";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/checkbox-group/index.ts
|
|
5
|
+
const CheckboxGroupCore = Object.assign(Root, {
|
|
6
|
+
Item,
|
|
7
|
+
ItemInput,
|
|
8
|
+
ItemLabel
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { CheckboxGroupCore };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CheckboxCore } from "../checkbox/index.js";
|
|
2
|
+
import { context } from "./context.js";
|
|
3
|
+
import { createComponent } from "solid-js/web";
|
|
4
|
+
import { createMemo } from "solid-js";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/checkbox-group/parts.tsx
|
|
7
|
+
function Item(props) {
|
|
8
|
+
const [state, actions] = context.useContext();
|
|
9
|
+
const checked = createMemo(() => state.selectValues.includes(props.value));
|
|
10
|
+
return createComponent(CheckboxCore, {
|
|
11
|
+
get checked() {
|
|
12
|
+
return checked();
|
|
13
|
+
},
|
|
14
|
+
get name() {
|
|
15
|
+
return state.name;
|
|
16
|
+
},
|
|
17
|
+
onChange: (c) => {
|
|
18
|
+
actions.toggleValue(props.value, c);
|
|
19
|
+
},
|
|
20
|
+
get value() {
|
|
21
|
+
return String(props.value);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function ItemInput(props) {
|
|
26
|
+
return createComponent(CheckboxCore.Input, props);
|
|
27
|
+
}
|
|
28
|
+
function ItemLabel(props) {
|
|
29
|
+
return createComponent(CheckboxCore.Label, props);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Item, ItemInput, ItemLabel };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CheckboxCore } from "../checkbox/index.jsx";
|
|
2
|
+
import { context } from "./context.jsx";
|
|
3
|
+
import { createMemo } from "solid-js";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/checkbox-group/parts.tsx
|
|
6
|
+
function Item(props) {
|
|
7
|
+
const [state, actions] = context.useContext();
|
|
8
|
+
const checked = createMemo(() => state.selectValues.includes(props.value));
|
|
9
|
+
return <CheckboxCore checked={checked()} name={state.name} onChange={(c) => {
|
|
10
|
+
actions.toggleValue(props.value, c);
|
|
11
|
+
}} value={String(props.value)} />;
|
|
12
|
+
}
|
|
13
|
+
function ItemInput(props) {
|
|
14
|
+
return <CheckboxCore.Input {...props} />;
|
|
15
|
+
}
|
|
16
|
+
function ItemLabel(props) {
|
|
17
|
+
return <CheckboxCore.Label {...props} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Item, ItemInput, ItemLabel };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { createComponent } from "solid-js/web";
|
|
3
|
+
import { createUniqueId } from "solid-js";
|
|
4
|
+
import { callMaybeCallableChild, createWatch, isUndefined } from "solid-tiny-utils";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/checkbox-group/root.tsx
|
|
7
|
+
function Root(props) {
|
|
8
|
+
const Context = context.initial({
|
|
9
|
+
selectValues: () => props.selectValues,
|
|
10
|
+
name: () => props.name ?? `checkbox_group_${createUniqueId()}`,
|
|
11
|
+
disabled: () => props.disabled
|
|
12
|
+
});
|
|
13
|
+
const [state] = Context.value;
|
|
14
|
+
createWatch(() => state.selectValues, (v) => {
|
|
15
|
+
const propValues = props.selectValues;
|
|
16
|
+
if (isUndefined(propValues) || JSON.stringify([...v].sort()) !== JSON.stringify([...propValues].sort())) props.onChange?.(v);
|
|
17
|
+
});
|
|
18
|
+
return createComponent(Context.Provider, { get children() {
|
|
19
|
+
return callMaybeCallableChild(props.children, ...Context.value);
|
|
20
|
+
} });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Root };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { createUniqueId } from "solid-js";
|
|
3
|
+
import { callMaybeCallableChild, createWatch, isUndefined } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/checkbox-group/root.tsx
|
|
6
|
+
function Root(props) {
|
|
7
|
+
const Context = context.initial({
|
|
8
|
+
selectValues: () => props.selectValues,
|
|
9
|
+
name: () => props.name ?? `checkbox_group_${createUniqueId()}`,
|
|
10
|
+
disabled: () => props.disabled
|
|
11
|
+
});
|
|
12
|
+
const [state] = Context.value;
|
|
13
|
+
createWatch(() => state.selectValues, (v) => {
|
|
14
|
+
const propValues = props.selectValues;
|
|
15
|
+
if (isUndefined(propValues) || JSON.stringify([...v].sort()) !== JSON.stringify([...propValues].sort())) props.onChange?.(v);
|
|
16
|
+
});
|
|
17
|
+
return <Context.Provider>
|
|
18
|
+
{callMaybeCallableChild(props.children, ...Context.value)}
|
|
19
|
+
</Context.Provider>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Root };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createComponentState } from "solid-tiny-context";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/fake-scroll-list/context.ts
|
|
4
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: any */
|
|
5
|
+
const context = createComponentState({
|
|
6
|
+
state: () => ({
|
|
7
|
+
inViewIndex: 0,
|
|
8
|
+
visibleItemsCount: 5,
|
|
9
|
+
itemHeight: 30,
|
|
10
|
+
items: []
|
|
11
|
+
}),
|
|
12
|
+
getters: {
|
|
13
|
+
shouldFake() {
|
|
14
|
+
return this.state.items.length > this.state.visibleItemsCount;
|
|
15
|
+
},
|
|
16
|
+
overScan() {
|
|
17
|
+
if (!this.state.shouldFake) return 0;
|
|
18
|
+
return Math.ceil(this.state.visibleItemsCount / 2) + 3;
|
|
19
|
+
},
|
|
20
|
+
fixedInViewIndex() {
|
|
21
|
+
let index = this.state.inViewIndex;
|
|
22
|
+
if (index < 0) index = this.state.items.length + index % this.state.items.length;
|
|
23
|
+
if (index >= this.state.items.length) index %= this.state.items.length;
|
|
24
|
+
return index;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { context };
|