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
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { CloseLine } from "../../icons/close-line.jsx";
|
|
2
|
+
import { ModalCore } from "../../primitives/modal/index.jsx";
|
|
3
|
+
import drawer_helper_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer-helper.jsx";
|
|
4
|
+
import { Flex } from "../../layout/flex/index.jsx";
|
|
5
|
+
import "../../layout/index.jsx";
|
|
6
|
+
import "../../primitives/index.jsx";
|
|
7
|
+
import { Show, onMount, splitProps } from "solid-js";
|
|
8
|
+
import { combineClass, combineStyle, makeEventListener, mountStyle } from "solid-tiny-utils";
|
|
9
|
+
import { Ref } from "@solid-primitives/refs";
|
|
10
|
+
|
|
11
|
+
//#region src/components/drawer/helpers.tsx
|
|
12
|
+
function Root(props) {
|
|
13
|
+
mountStyle(drawer_helper_default, "tiny-drawer-helper");
|
|
14
|
+
const [local, others] = splitProps(props, ["class", "style"]);
|
|
15
|
+
return <Flex vertical {...others} class={combineClass("tiny-drawer-helper", local.class)} style={combineStyle({ height: "100%" }, local.style)} />;
|
|
16
|
+
}
|
|
17
|
+
function Header(props) {
|
|
18
|
+
return <div class="tiny-drawer__header">
|
|
19
|
+
{props.title}
|
|
20
|
+
<Show when={props.closable}>
|
|
21
|
+
<Close>
|
|
22
|
+
<button class="tiny-drawer__header-close" type="button">
|
|
23
|
+
<CloseLine />
|
|
24
|
+
</button>
|
|
25
|
+
</Close>
|
|
26
|
+
</Show>
|
|
27
|
+
</div>;
|
|
28
|
+
}
|
|
29
|
+
function Body(props) {
|
|
30
|
+
return <div class="tiny-drawer__body">{props.children}</div>;
|
|
31
|
+
}
|
|
32
|
+
function Footer(props) {
|
|
33
|
+
const [local, others] = splitProps(props, [
|
|
34
|
+
"gap",
|
|
35
|
+
"justify",
|
|
36
|
+
"align",
|
|
37
|
+
"class",
|
|
38
|
+
"style"
|
|
39
|
+
]);
|
|
40
|
+
return <Flex {...others} align={local.align ?? "center"} class={combineClass("tiny-drawer__footer", local.class)} gap={local.gap ?? "sm"} justify={local.justify ?? "flex-end"} style={combineStyle({}, local.style)} />;
|
|
41
|
+
}
|
|
42
|
+
function Close(props) {
|
|
43
|
+
const [, actions] = ModalCore.useContext();
|
|
44
|
+
let ref;
|
|
45
|
+
onMount(() => {
|
|
46
|
+
makeEventListener(ref, "click", () => {
|
|
47
|
+
actions.setState("open", false);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
return <Ref ref={ref}>{props.children}</Ref>;
|
|
51
|
+
}
|
|
52
|
+
const DrawerHelper = Object.assign(Root, {
|
|
53
|
+
Header,
|
|
54
|
+
Body,
|
|
55
|
+
Footer,
|
|
56
|
+
Close
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { DrawerHelper };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ClassNames, Styles } from "../../utils/types.js";
|
|
2
|
+
import { Trigger } from "../../primitives/modal/trigger.js";
|
|
3
|
+
import { ModalCore } from "../../primitives/modal/index.js";
|
|
4
|
+
import { DrawerHelper } from "./helpers.js";
|
|
5
|
+
import { JSX } from "solid-js";
|
|
6
|
+
import * as solid_tiny_utils2 from "solid-tiny-utils";
|
|
7
|
+
import * as solid_js_store8 from "solid-js/store";
|
|
8
|
+
|
|
9
|
+
//#region src/components/drawer/index.d.ts
|
|
10
|
+
declare function Root(props: Parameters<typeof ModalCore>[0]): JSX.Element;
|
|
11
|
+
declare function Content(props: {
|
|
12
|
+
children: JSX.Element;
|
|
13
|
+
placement?: "left" | "right" | "top" | "bottom";
|
|
14
|
+
/**
|
|
15
|
+
* width or height can be set according to the placement
|
|
16
|
+
*/
|
|
17
|
+
size?: string;
|
|
18
|
+
classNames?: ClassNames<"mask" | "wrapper" | "content">;
|
|
19
|
+
styles?: Styles<"mask" | "wrapper" | "content">;
|
|
20
|
+
}): JSX.Element;
|
|
21
|
+
declare const Drawer: typeof Root & {
|
|
22
|
+
Trigger: typeof Trigger;
|
|
23
|
+
Content: typeof Content;
|
|
24
|
+
useContext: () => [Readonly<{
|
|
25
|
+
open: boolean;
|
|
26
|
+
refContent: HTMLElement | null;
|
|
27
|
+
closeOnClickMask: boolean;
|
|
28
|
+
closeOnEsc: boolean;
|
|
29
|
+
} & {}>, Omit<{}, "setState"> & {
|
|
30
|
+
setState: solid_js_store8.SetStoreFunction<{
|
|
31
|
+
open: boolean;
|
|
32
|
+
refContent: HTMLElement | null;
|
|
33
|
+
closeOnClickMask: boolean;
|
|
34
|
+
closeOnEsc: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
}, {
|
|
37
|
+
isMounted: () => boolean;
|
|
38
|
+
presencePhase: () => solid_tiny_utils2.PresencePhase;
|
|
39
|
+
}];
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Drawer };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { createClassStyles } from "../../utils/index.js";
|
|
2
|
+
import drawer_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.js";
|
|
3
|
+
import { ModalCore } from "../../primitives/modal/index.js";
|
|
4
|
+
import { DrawerHelper } from "./helpers.js";
|
|
5
|
+
import { createComponent } from "solid-js/web";
|
|
6
|
+
import { createMemo } from "solid-js";
|
|
7
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
8
|
+
|
|
9
|
+
//#region src/components/drawer/index.tsx
|
|
10
|
+
function Root(props) {
|
|
11
|
+
return createComponent(ModalCore, props);
|
|
12
|
+
}
|
|
13
|
+
function Content(props) {
|
|
14
|
+
mountStyle(drawer_default, "tiny-drawer");
|
|
15
|
+
const [, , { presencePhase }] = ModalCore.useContext();
|
|
16
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles);
|
|
17
|
+
const placement = () => props.placement || "right";
|
|
18
|
+
const isEntering = createMemo(() => ["pre-enter", "entering"].includes(presencePhase()));
|
|
19
|
+
const isExiting = createMemo(() => ["exiting"].includes(presencePhase()));
|
|
20
|
+
const getSize = () => {
|
|
21
|
+
if (placement() === "left" || placement() === "right") return {
|
|
22
|
+
width: props.size || "378px",
|
|
23
|
+
height: "100%"
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
width: "100%",
|
|
27
|
+
height: props.size || "378px"
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const translateFrom = createMemo(() => {
|
|
31
|
+
switch (placement()) {
|
|
32
|
+
case "left": return "-100%, 0";
|
|
33
|
+
case "right": return "100%, 0";
|
|
34
|
+
case "top": return "0, -100%";
|
|
35
|
+
case "bottom": return "0, 100%";
|
|
36
|
+
default: return "";
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return createComponent(ModalCore.Portal, { get children() {
|
|
40
|
+
return [createComponent(ModalCore.Mask, {
|
|
41
|
+
get ["class"]() {
|
|
42
|
+
return combineClass("tiny-drawer__mask", classes().mask);
|
|
43
|
+
},
|
|
44
|
+
get ["data-entering"]() {
|
|
45
|
+
return dataIf(isEntering());
|
|
46
|
+
},
|
|
47
|
+
get ["data-exiting"]() {
|
|
48
|
+
return dataIf(isExiting());
|
|
49
|
+
},
|
|
50
|
+
get style() {
|
|
51
|
+
return styles().mask;
|
|
52
|
+
}
|
|
53
|
+
}), createComponent(ModalCore.ContentWrapper, {
|
|
54
|
+
get ["class"]() {
|
|
55
|
+
return combineClass("tiny-drawer__wrapper", classes().wrapper);
|
|
56
|
+
},
|
|
57
|
+
get style() {
|
|
58
|
+
return combineStyle({}, styles().wrapper);
|
|
59
|
+
},
|
|
60
|
+
get children() {
|
|
61
|
+
return createComponent(ModalCore.Content, {
|
|
62
|
+
get ["class"]() {
|
|
63
|
+
return combineClass("tiny-drawer__content", classes().content);
|
|
64
|
+
},
|
|
65
|
+
get ["data-entering"]() {
|
|
66
|
+
return dataIf(isEntering());
|
|
67
|
+
},
|
|
68
|
+
get ["data-exiting"]() {
|
|
69
|
+
return dataIf(isExiting());
|
|
70
|
+
},
|
|
71
|
+
get ["data-placement"]() {
|
|
72
|
+
return placement();
|
|
73
|
+
},
|
|
74
|
+
get style() {
|
|
75
|
+
return combineStyle({
|
|
76
|
+
...getSize(),
|
|
77
|
+
"--translate-from": translateFrom()
|
|
78
|
+
}, styles().content);
|
|
79
|
+
},
|
|
80
|
+
get children() {
|
|
81
|
+
return props.children;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
})];
|
|
86
|
+
} });
|
|
87
|
+
}
|
|
88
|
+
const Drawer = Object.assign(Root, {
|
|
89
|
+
Trigger: ModalCore.Trigger,
|
|
90
|
+
Content,
|
|
91
|
+
useContext: ModalCore.useContext
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
export { Drawer };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createClassStyles } from "../../utils/index.jsx";
|
|
2
|
+
import drawer_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.jsx";
|
|
3
|
+
import { ModalCore } from "../../primitives/modal/index.jsx";
|
|
4
|
+
import { DrawerHelper } from "./helpers.jsx";
|
|
5
|
+
import { createMemo } from "solid-js";
|
|
6
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
7
|
+
|
|
8
|
+
//#region src/components/drawer/index.tsx
|
|
9
|
+
function Root(props) {
|
|
10
|
+
return <ModalCore {...props} />;
|
|
11
|
+
}
|
|
12
|
+
function Content(props) {
|
|
13
|
+
mountStyle(drawer_default, "tiny-drawer");
|
|
14
|
+
const [, , { presencePhase }] = ModalCore.useContext();
|
|
15
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles);
|
|
16
|
+
const placement = () => props.placement || "right";
|
|
17
|
+
const isEntering = createMemo(() => ["pre-enter", "entering"].includes(presencePhase()));
|
|
18
|
+
const isExiting = createMemo(() => ["exiting"].includes(presencePhase()));
|
|
19
|
+
const getSize = () => {
|
|
20
|
+
if (placement() === "left" || placement() === "right") return {
|
|
21
|
+
width: props.size || "378px",
|
|
22
|
+
height: "100%"
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
width: "100%",
|
|
26
|
+
height: props.size || "378px"
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const translateFrom = createMemo(() => {
|
|
30
|
+
switch (placement()) {
|
|
31
|
+
case "left": return "-100%, 0";
|
|
32
|
+
case "right": return "100%, 0";
|
|
33
|
+
case "top": return "0, -100%";
|
|
34
|
+
case "bottom": return "0, 100%";
|
|
35
|
+
default: return "";
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return <ModalCore.Portal>
|
|
39
|
+
<ModalCore.Mask class={combineClass("tiny-drawer__mask", classes().mask)} data-entering={dataIf(isEntering())} data-exiting={dataIf(isExiting())} style={styles().mask} />
|
|
40
|
+
<ModalCore.ContentWrapper class={combineClass("tiny-drawer__wrapper", classes().wrapper)} style={combineStyle({}, styles().wrapper)}>
|
|
41
|
+
<ModalCore.Content class={combineClass("tiny-drawer__content", classes().content)} data-entering={dataIf(isEntering())} data-exiting={dataIf(isExiting())} data-placement={placement()} style={combineStyle({
|
|
42
|
+
...getSize(),
|
|
43
|
+
"--translate-from": translateFrom()
|
|
44
|
+
}, styles().content)}>
|
|
45
|
+
{props.children}
|
|
46
|
+
</ModalCore.Content>
|
|
47
|
+
</ModalCore.ContentWrapper>
|
|
48
|
+
</ModalCore.Portal>;
|
|
49
|
+
}
|
|
50
|
+
const Drawer = Object.assign(Root, {
|
|
51
|
+
Trigger: ModalCore.Trigger,
|
|
52
|
+
Content,
|
|
53
|
+
useContext: ModalCore.useContext
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export { Drawer };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Description, RequiredIndicator, Root, Title } from "./parts.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/field/index.d.ts
|
|
4
|
+
declare const Field: typeof Root & {
|
|
5
|
+
Title: typeof Title;
|
|
6
|
+
Description: typeof Description;
|
|
7
|
+
RequiredIndicator: typeof RequiredIndicator;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Field };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OmitComponentProps } from "../../utils/types.js";
|
|
2
|
+
import { Flex } from "../../layout/flex/index.js";
|
|
3
|
+
import "../../layout/index.js";
|
|
4
|
+
import { JSX } from "solid-js";
|
|
5
|
+
import { MaybeCallableChild } from "solid-tiny-utils";
|
|
6
|
+
|
|
7
|
+
//#region src/components/field/parts.d.ts
|
|
8
|
+
declare function Root(props: {
|
|
9
|
+
orientation?: "horizontal" | "vertical";
|
|
10
|
+
children?: MaybeCallableChild<[{
|
|
11
|
+
uniqueId: string;
|
|
12
|
+
}]>;
|
|
13
|
+
} & OmitComponentProps<typeof Flex, "vertical" | "children">): JSX.Element;
|
|
14
|
+
declare function Title(props: {
|
|
15
|
+
children?: JSX.Element;
|
|
16
|
+
} & OmitComponentProps<typeof Flex<"label">, "children">): JSX.Element;
|
|
17
|
+
declare function RequiredIndicator(props: {
|
|
18
|
+
show?: boolean;
|
|
19
|
+
}): JSX.Element;
|
|
20
|
+
declare function Description(props: {
|
|
21
|
+
children?: JSX.Element;
|
|
22
|
+
}): JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Description, RequiredIndicator, Root, Title };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Flex } from "../../layout/flex/index.js";
|
|
2
|
+
import "../../layout/index.js";
|
|
3
|
+
import field_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.js";
|
|
4
|
+
import { createComponent, insert, memo, mergeProps, template } from "solid-js/web";
|
|
5
|
+
import { Show, createUniqueId, splitProps } from "solid-js";
|
|
6
|
+
import { callMaybeCallableChild, combineClass, mountStyle } from "solid-tiny-utils";
|
|
7
|
+
|
|
8
|
+
//#region src/components/field/parts.tsx
|
|
9
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span aria-hidden=true class=tiny-field__required-indicator>*`), _tmpl$2 = /* @__PURE__ */ template(`<p class=tiny-field__description>`);
|
|
10
|
+
function Root(props) {
|
|
11
|
+
mountStyle(field_default, "tiny-field");
|
|
12
|
+
const [local, others] = splitProps(props, [
|
|
13
|
+
"orientation",
|
|
14
|
+
"children",
|
|
15
|
+
"gap"
|
|
16
|
+
]);
|
|
17
|
+
return createComponent(Flex, mergeProps(others, {
|
|
18
|
+
get gap() {
|
|
19
|
+
return local.gap ?? "sm";
|
|
20
|
+
},
|
|
21
|
+
get vertical() {
|
|
22
|
+
return local.orientation !== "horizontal";
|
|
23
|
+
},
|
|
24
|
+
get children() {
|
|
25
|
+
return callMaybeCallableChild(local.children, { uniqueId: `field_${createUniqueId()}` });
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
function Title(props) {
|
|
30
|
+
const [local, others] = splitProps(props, [
|
|
31
|
+
"children",
|
|
32
|
+
"class",
|
|
33
|
+
"gap"
|
|
34
|
+
]);
|
|
35
|
+
return createComponent(Flex, mergeProps(others, {
|
|
36
|
+
get as() {
|
|
37
|
+
return others.for ? "label" : "div";
|
|
38
|
+
},
|
|
39
|
+
get ["class"]() {
|
|
40
|
+
return combineClass("tiny-field__label", local.class);
|
|
41
|
+
},
|
|
42
|
+
get gap() {
|
|
43
|
+
return local.gap ?? "xs";
|
|
44
|
+
},
|
|
45
|
+
get children() {
|
|
46
|
+
return local.children;
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
function RequiredIndicator(props) {
|
|
51
|
+
return createComponent(Show, {
|
|
52
|
+
get when() {
|
|
53
|
+
return props.show;
|
|
54
|
+
},
|
|
55
|
+
get children() {
|
|
56
|
+
return _tmpl$();
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function Description(props) {
|
|
61
|
+
return (() => {
|
|
62
|
+
var _el$2 = _tmpl$2();
|
|
63
|
+
insert(_el$2, () => props.children);
|
|
64
|
+
return _el$2;
|
|
65
|
+
})();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
export { Description, RequiredIndicator, Root, Title };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Flex } from "../../layout/flex/index.jsx";
|
|
2
|
+
import "../../layout/index.jsx";
|
|
3
|
+
import field_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.jsx";
|
|
4
|
+
import { Show, createUniqueId, splitProps } from "solid-js";
|
|
5
|
+
import { callMaybeCallableChild, combineClass, mountStyle } from "solid-tiny-utils";
|
|
6
|
+
|
|
7
|
+
//#region src/components/field/parts.tsx
|
|
8
|
+
function Root(props) {
|
|
9
|
+
mountStyle(field_default, "tiny-field");
|
|
10
|
+
const [local, others] = splitProps(props, [
|
|
11
|
+
"orientation",
|
|
12
|
+
"children",
|
|
13
|
+
"gap"
|
|
14
|
+
]);
|
|
15
|
+
return <Flex {...others} gap={local.gap ?? "sm"} vertical={local.orientation !== "horizontal"}>
|
|
16
|
+
{callMaybeCallableChild(local.children, { uniqueId: `field_${createUniqueId()}` })}
|
|
17
|
+
</Flex>;
|
|
18
|
+
}
|
|
19
|
+
function Title(props) {
|
|
20
|
+
const [local, others] = splitProps(props, [
|
|
21
|
+
"children",
|
|
22
|
+
"class",
|
|
23
|
+
"gap"
|
|
24
|
+
]);
|
|
25
|
+
return <Flex {...others} as={others.for ? "label" : "div"} class={combineClass("tiny-field__label", local.class)} gap={local.gap ?? "xs"}>
|
|
26
|
+
{local.children}
|
|
27
|
+
</Flex>;
|
|
28
|
+
}
|
|
29
|
+
function RequiredIndicator(props) {
|
|
30
|
+
return <Show when={props.show}>
|
|
31
|
+
<span aria-hidden="true" class="tiny-field__required-indicator">
|
|
32
|
+
*
|
|
33
|
+
</span>
|
|
34
|
+
</Show>;
|
|
35
|
+
}
|
|
36
|
+
function Description(props) {
|
|
37
|
+
return <p class="tiny-field__description">{props.children}</p>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Description, RequiredIndicator, Root, Title };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ClassNames, Styles } from "../../../utils/types.js";
|
|
2
|
+
import { JSX } from "solid-js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/form-components/checkbox/checkbox.d.ts
|
|
5
|
+
declare function Checkbox(props: {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onChange?: (checked: boolean) => void;
|
|
9
|
+
value?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
children?: JSX.Element;
|
|
13
|
+
indeterminate?: boolean;
|
|
14
|
+
classNames?: ClassNames<"root" | "box" | "indicator" | "label", {
|
|
15
|
+
checked: boolean;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
indeterminate: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
styles?: Styles<"root" | "box" | "indicator" | "label", {
|
|
20
|
+
checked: boolean;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
indeterminate: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
}): JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Checkbox };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { CheckBold } from "../../../icons/check-bold.js";
|
|
2
|
+
import { IconSubtract } from "../../../icons/subtract.js";
|
|
3
|
+
import "../../../icons/index.js";
|
|
4
|
+
import { createClassStyles } from "../../../utils/index.js";
|
|
5
|
+
import { CheckboxCore } from "../../../primitives/checkbox/index.js";
|
|
6
|
+
import "../../../primitives/index.js";
|
|
7
|
+
import checkbox_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.js";
|
|
8
|
+
import { className, createComponent, effect, insert, style, template } from "solid-js/web";
|
|
9
|
+
import { Show, children } from "solid-js";
|
|
10
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
11
|
+
|
|
12
|
+
//#region src/components/form-components/checkbox/checkbox.tsx
|
|
13
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><div>`), _tmpl$2 = /* @__PURE__ */ template(`<span>`);
|
|
14
|
+
function Checkbox(props) {
|
|
15
|
+
mountStyle(checkbox_default, "tiny-checkbox");
|
|
16
|
+
const label = children(() => props.children);
|
|
17
|
+
return createComponent(CheckboxCore, {
|
|
18
|
+
get checked() {
|
|
19
|
+
return props.checked;
|
|
20
|
+
},
|
|
21
|
+
get disabled() {
|
|
22
|
+
return props.disabled;
|
|
23
|
+
},
|
|
24
|
+
get indeterminate() {
|
|
25
|
+
return props.indeterminate;
|
|
26
|
+
},
|
|
27
|
+
get name() {
|
|
28
|
+
return props.name;
|
|
29
|
+
},
|
|
30
|
+
get onChange() {
|
|
31
|
+
return props.onChange;
|
|
32
|
+
},
|
|
33
|
+
get value() {
|
|
34
|
+
return props.value;
|
|
35
|
+
},
|
|
36
|
+
children: (state) => {
|
|
37
|
+
const [stateClasses, stateStyles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
38
|
+
checked: state.checked,
|
|
39
|
+
disabled: state.disabled,
|
|
40
|
+
indeterminate: state.indeterminate
|
|
41
|
+
}));
|
|
42
|
+
return createComponent(CheckboxCore.Label, {
|
|
43
|
+
get ["class"]() {
|
|
44
|
+
return combineClass("tiny-checkbox", stateClasses().root);
|
|
45
|
+
},
|
|
46
|
+
get ["data-checked"]() {
|
|
47
|
+
return dataIf(state.checked);
|
|
48
|
+
},
|
|
49
|
+
get ["data-disabled"]() {
|
|
50
|
+
return dataIf(state.disabled);
|
|
51
|
+
},
|
|
52
|
+
get ["data-indeterminate"]() {
|
|
53
|
+
return dataIf(state.indeterminate);
|
|
54
|
+
},
|
|
55
|
+
get style() {
|
|
56
|
+
return combineStyle({}, stateStyles().root);
|
|
57
|
+
},
|
|
58
|
+
get children() {
|
|
59
|
+
return [
|
|
60
|
+
createComponent(CheckboxCore.Input, { get id() {
|
|
61
|
+
return props.id;
|
|
62
|
+
} }),
|
|
63
|
+
(() => {
|
|
64
|
+
var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
|
|
65
|
+
insert(_el$2, createComponent(Show, {
|
|
66
|
+
get fallback() {
|
|
67
|
+
return createComponent(IconSubtract, { size: "100%" });
|
|
68
|
+
},
|
|
69
|
+
get when() {
|
|
70
|
+
return !props.indeterminate;
|
|
71
|
+
},
|
|
72
|
+
get children() {
|
|
73
|
+
return createComponent(CheckBold, { size: "100%" });
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
effect((_p$) => {
|
|
77
|
+
var _v$ = combineClass("tiny-checkbox-box", stateClasses().box), _v$2 = combineStyle({}, stateStyles().box), _v$3 = combineClass("tiny-checkbox-indicator", stateClasses().indicator), _v$4 = combineStyle({}, stateStyles().indicator);
|
|
78
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
79
|
+
_p$.t = style(_el$, _v$2, _p$.t);
|
|
80
|
+
_v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
|
|
81
|
+
_p$.o = style(_el$2, _v$4, _p$.o);
|
|
82
|
+
return _p$;
|
|
83
|
+
}, {
|
|
84
|
+
e: void 0,
|
|
85
|
+
t: void 0,
|
|
86
|
+
a: void 0,
|
|
87
|
+
o: void 0
|
|
88
|
+
});
|
|
89
|
+
return _el$;
|
|
90
|
+
})(),
|
|
91
|
+
createComponent(Show, {
|
|
92
|
+
get when() {
|
|
93
|
+
return label();
|
|
94
|
+
},
|
|
95
|
+
get children() {
|
|
96
|
+
var _el$3 = _tmpl$2();
|
|
97
|
+
insert(_el$3, label);
|
|
98
|
+
effect((_p$) => {
|
|
99
|
+
var _v$5 = combineClass("tiny-checkbox-label", stateClasses().label), _v$6 = combineStyle({}, stateStyles().label);
|
|
100
|
+
_v$5 !== _p$.e && className(_el$3, _p$.e = _v$5);
|
|
101
|
+
_p$.t = style(_el$3, _v$6, _p$.t);
|
|
102
|
+
return _p$;
|
|
103
|
+
}, {
|
|
104
|
+
e: void 0,
|
|
105
|
+
t: void 0
|
|
106
|
+
});
|
|
107
|
+
return _el$3;
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
export { Checkbox };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CheckBold } from "../../../icons/check-bold.jsx";
|
|
2
|
+
import { IconSubtract } from "../../../icons/subtract.jsx";
|
|
3
|
+
import "../../../icons/index.jsx";
|
|
4
|
+
import { createClassStyles } from "../../../utils/index.jsx";
|
|
5
|
+
import { CheckboxCore } from "../../../primitives/checkbox/index.jsx";
|
|
6
|
+
import "../../../primitives/index.jsx";
|
|
7
|
+
import checkbox_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.jsx";
|
|
8
|
+
import { Show, children } from "solid-js";
|
|
9
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
10
|
+
|
|
11
|
+
//#region src/components/form-components/checkbox/checkbox.tsx
|
|
12
|
+
function Checkbox(props) {
|
|
13
|
+
mountStyle(checkbox_default, "tiny-checkbox");
|
|
14
|
+
const label = children(() => props.children);
|
|
15
|
+
return <CheckboxCore checked={props.checked} disabled={props.disabled} indeterminate={props.indeterminate} name={props.name} onChange={props.onChange} value={props.value}>
|
|
16
|
+
{(state) => {
|
|
17
|
+
const [stateClasses, stateStyles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
18
|
+
checked: state.checked,
|
|
19
|
+
disabled: state.disabled,
|
|
20
|
+
indeterminate: state.indeterminate
|
|
21
|
+
}));
|
|
22
|
+
return <CheckboxCore.Label class={combineClass("tiny-checkbox", stateClasses().root)} data-checked={dataIf(state.checked)} data-disabled={dataIf(state.disabled)} data-indeterminate={dataIf(state.indeterminate)} style={combineStyle({}, stateStyles().root)}>
|
|
23
|
+
<CheckboxCore.Input id={props.id} />
|
|
24
|
+
<div class={combineClass("tiny-checkbox-box", stateClasses().box)} style={combineStyle({}, stateStyles().box)}>
|
|
25
|
+
<div class={combineClass("tiny-checkbox-indicator", stateClasses().indicator)} style={combineStyle({}, stateStyles().indicator)}>
|
|
26
|
+
<Show fallback={<IconSubtract size="100%" />} when={!props.indeterminate}>
|
|
27
|
+
<CheckBold size="100%" />
|
|
28
|
+
</Show>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<Show when={label()}>
|
|
32
|
+
<span class={combineClass("tiny-checkbox-label", stateClasses().label)} style={combineStyle({}, stateStyles().label)}>
|
|
33
|
+
{label()}
|
|
34
|
+
</span>
|
|
35
|
+
</Show>
|
|
36
|
+
</CheckboxCore.Label>;
|
|
37
|
+
}}
|
|
38
|
+
</CheckboxCore>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Checkbox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Checkbox } from "./checkbox.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Checkbox } from "./checkbox.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Checkbox } from "./checkbox.jsx";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ClassNames, OmitComponentProps, Styles } from "../../../utils/types.js";
|
|
2
|
+
import { Flex } from "../../../layout/flex/index.js";
|
|
3
|
+
import "../../../layout/index.js";
|
|
4
|
+
import { JSX } from "solid-js/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/form-components/checkbox-group/checkbox-group.d.ts
|
|
7
|
+
interface CheckboxOption<T> {
|
|
8
|
+
label: JSX.Element;
|
|
9
|
+
value: T;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function CheckboxGroup<T extends string | number>(props: {
|
|
13
|
+
options?: CheckboxOption<T>[];
|
|
14
|
+
value?: T[];
|
|
15
|
+
onChange?: (value: T[]) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
name?: string;
|
|
18
|
+
classNames?: ClassNames<"root", {
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
styles?: Styles<"root", {
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
} & OmitComponentProps<typeof Flex, "children">): JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { CheckboxGroup, CheckboxOption };
|