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,76 @@
|
|
|
1
|
+
import { createClassStyles } from "../../../utils/index.js";
|
|
2
|
+
import { Flex } from "../../../layout/flex/index.js";
|
|
3
|
+
import "../../../layout/index.js";
|
|
4
|
+
import { Checkbox } from "../checkbox/checkbox.js";
|
|
5
|
+
import "../checkbox/index.js";
|
|
6
|
+
import { CheckboxGroupCore } from "../../../primitives/checkbox-group/index.js";
|
|
7
|
+
import { createComponent, memo, mergeProps } from "solid-js/web";
|
|
8
|
+
import { For as For$1, splitProps } from "solid-js";
|
|
9
|
+
import { combineStyle } from "solid-tiny-utils";
|
|
10
|
+
|
|
11
|
+
//#region src/components/form-components/checkbox-group/checkbox-group.tsx
|
|
12
|
+
function CheckboxGroup(props) {
|
|
13
|
+
const [local, others] = splitProps(props, [
|
|
14
|
+
"options",
|
|
15
|
+
"value",
|
|
16
|
+
"onChange",
|
|
17
|
+
"disabled",
|
|
18
|
+
"name",
|
|
19
|
+
"classNames",
|
|
20
|
+
"styles"
|
|
21
|
+
]);
|
|
22
|
+
const [classes, styles] = createClassStyles(() => local.classNames, () => local.styles, () => ({ disabled: local.disabled ?? false }));
|
|
23
|
+
return createComponent(CheckboxGroupCore, {
|
|
24
|
+
get disabled() {
|
|
25
|
+
return local.disabled;
|
|
26
|
+
},
|
|
27
|
+
get name() {
|
|
28
|
+
return local.name;
|
|
29
|
+
},
|
|
30
|
+
get onChange() {
|
|
31
|
+
return local.onChange;
|
|
32
|
+
},
|
|
33
|
+
get selectValues() {
|
|
34
|
+
return local.value;
|
|
35
|
+
},
|
|
36
|
+
children: (state, actions) => createComponent(Flex, mergeProps({
|
|
37
|
+
get ["class"]() {
|
|
38
|
+
return classes().root;
|
|
39
|
+
},
|
|
40
|
+
get ["data-disabled"]() {
|
|
41
|
+
return state.disabled;
|
|
42
|
+
},
|
|
43
|
+
gap: "md",
|
|
44
|
+
get style() {
|
|
45
|
+
return combineStyle({}, styles().root);
|
|
46
|
+
}
|
|
47
|
+
}, others, { get children() {
|
|
48
|
+
return createComponent(For$1, {
|
|
49
|
+
get each() {
|
|
50
|
+
return local.options;
|
|
51
|
+
},
|
|
52
|
+
children: (o) => createComponent(Checkbox, {
|
|
53
|
+
get checked() {
|
|
54
|
+
return state.selectValues.includes(o.value);
|
|
55
|
+
},
|
|
56
|
+
get disabled() {
|
|
57
|
+
return state.disabled || o.disabled;
|
|
58
|
+
},
|
|
59
|
+
get name() {
|
|
60
|
+
return state.name;
|
|
61
|
+
},
|
|
62
|
+
onChange: (c) => actions.toggleValue(o.value, c),
|
|
63
|
+
get value() {
|
|
64
|
+
return String(o.value);
|
|
65
|
+
},
|
|
66
|
+
get children() {
|
|
67
|
+
return o.label;
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
} }))
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
export { CheckboxGroup };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createClassStyles } from "../../../utils/index.jsx";
|
|
2
|
+
import { Flex } from "../../../layout/flex/index.jsx";
|
|
3
|
+
import "../../../layout/index.jsx";
|
|
4
|
+
import { Checkbox } from "../checkbox/checkbox.jsx";
|
|
5
|
+
import "../checkbox/index.jsx";
|
|
6
|
+
import { CheckboxGroupCore } from "../../../primitives/checkbox-group/index.jsx";
|
|
7
|
+
import { For, splitProps } from "solid-js";
|
|
8
|
+
import { combineStyle } from "solid-tiny-utils";
|
|
9
|
+
|
|
10
|
+
//#region src/components/form-components/checkbox-group/checkbox-group.tsx
|
|
11
|
+
function CheckboxGroup(props) {
|
|
12
|
+
const [local, others] = splitProps(props, [
|
|
13
|
+
"options",
|
|
14
|
+
"value",
|
|
15
|
+
"onChange",
|
|
16
|
+
"disabled",
|
|
17
|
+
"name",
|
|
18
|
+
"classNames",
|
|
19
|
+
"styles"
|
|
20
|
+
]);
|
|
21
|
+
const [classes, styles] = createClassStyles(() => local.classNames, () => local.styles, () => ({ disabled: local.disabled ?? false }));
|
|
22
|
+
return <CheckboxGroupCore disabled={local.disabled} name={local.name} onChange={local.onChange} selectValues={local.value}>
|
|
23
|
+
{(state, actions) => <Flex class={classes().root} data-disabled={state.disabled} gap="md" style={combineStyle({}, styles().root)} {...others}>
|
|
24
|
+
<For each={local.options}>
|
|
25
|
+
{(o) => <Checkbox checked={state.selectValues.includes(o.value)} disabled={state.disabled || o.disabled} name={state.name} onChange={(c) => actions.toggleValue(o.value, c)} value={String(o.value)}>
|
|
26
|
+
{o.label}
|
|
27
|
+
</Checkbox>}
|
|
28
|
+
</For>
|
|
29
|
+
</Flex>}
|
|
30
|
+
</CheckboxGroupCore>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { CheckboxGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { CheckboxGroup, CheckboxOption } from "./checkbox-group.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { CheckboxGroup } from "./checkbox-group.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { CheckboxGroup } from "./checkbox-group.jsx";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ClassNames, Styles } from "
|
|
2
|
-
import * as
|
|
1
|
+
import { ClassNames, Styles } from "../../../utils/types.js";
|
|
2
|
+
import * as solid_js50 from "solid-js";
|
|
3
3
|
|
|
4
|
-
//#region src/components/combobox/combobox.d.ts
|
|
4
|
+
//#region src/components/form-components/combobox/combobox.d.ts
|
|
5
5
|
interface ComboboxProps<T extends {
|
|
6
6
|
label: string;
|
|
7
7
|
value: unknown;
|
|
@@ -15,11 +15,13 @@ interface ComboboxProps<T extends {
|
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
size?: "small" | "medium" | "large";
|
|
17
17
|
disabled?: boolean;
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: string;
|
|
18
20
|
}
|
|
19
21
|
declare function Combobox<T extends {
|
|
20
22
|
label: string;
|
|
21
23
|
value: unknown;
|
|
22
24
|
disabled?: boolean;
|
|
23
|
-
}>(props: ComboboxProps<T>):
|
|
25
|
+
}>(props: ComboboxProps<T>): solid_js50.JSX.Element;
|
|
24
26
|
//#endregion
|
|
25
27
|
export { Combobox, ComboboxProps };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import
|
|
6
|
-
import "
|
|
7
|
-
import { Popover } from "
|
|
1
|
+
import { ArrowDownSLine } from "../../../icons/arrow-down-s-line.js";
|
|
2
|
+
import "../../../icons/index.js";
|
|
3
|
+
import { createClassStyles } from "../../../utils/index.js";
|
|
4
|
+
import { Listbox } from "../../../primitives/listbox/listbox.js";
|
|
5
|
+
import "../../../primitives/listbox/index.js";
|
|
6
|
+
import combobox_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/combobox/combobox.js";
|
|
7
|
+
import { Popover } from "../../popover/index.js";
|
|
8
8
|
import { className, createComponent, effect, insert, setAttribute, style, template } from "solid-js/web";
|
|
9
|
-
import { For, createMemo, createSignal } from "solid-js";
|
|
9
|
+
import { For as For$1, createMemo, createSignal } from "solid-js";
|
|
10
10
|
import { combineClass, combineStyle, createWatch, dataIf, mountStyle } from "solid-tiny-utils";
|
|
11
11
|
|
|
12
|
-
//#region src/components/combobox/combobox.tsx
|
|
12
|
+
//#region src/components/form-components/combobox/combobox.tsx
|
|
13
13
|
/** biome-ignore-all lint/complexity/noBannedTypes: I need Function */
|
|
14
14
|
var _tmpl$ = /* @__PURE__ */ template(`<div><input autocomplete=off readonly role=combobox tabindex=-1 type=search style=height:100%;width:100%><div class=tiny-combobox__suffix>`);
|
|
15
15
|
function Combobox(props) {
|
|
@@ -30,15 +30,17 @@ function Combobox(props) {
|
|
|
30
30
|
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
31
31
|
insert(_el$3, createComponent(ArrowDownSLine, {}));
|
|
32
32
|
effect((_p$) => {
|
|
33
|
-
var _v$ = combineClass("tiny-combobox__trigger
|
|
33
|
+
var _v$ = combineClass("tiny-combobox__trigger", classes().trigger), _v$2 = dataIf(props.disabled ?? false), _v$3 = dataIf(state.open), _v$4 = props.size ?? "medium", _v$5 = combineStyle({}, styles().trigger), _v$6 = state.open, _v$7 = props.id, _v$8 = props.name, _v$9 = props.placeholder, _v$0 = combineStyle({}, styles().suffix);
|
|
34
34
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
35
35
|
_v$2 !== _p$.t && setAttribute(_el$, "data-disabled", _p$.t = _v$2);
|
|
36
36
|
_v$3 !== _p$.a && setAttribute(_el$, "data-open", _p$.a = _v$3);
|
|
37
37
|
_v$4 !== _p$.o && setAttribute(_el$, "data-size", _p$.o = _v$4);
|
|
38
38
|
_p$.i = style(_el$, _v$5, _p$.i);
|
|
39
39
|
_v$6 !== _p$.n && setAttribute(_el$2, "aria-expanded", _p$.n = _v$6);
|
|
40
|
-
_v$7 !== _p$.s && setAttribute(_el$2, "
|
|
41
|
-
_p$.h
|
|
40
|
+
_v$7 !== _p$.s && setAttribute(_el$2, "id", _p$.s = _v$7);
|
|
41
|
+
_v$8 !== _p$.h && setAttribute(_el$2, "name", _p$.h = _v$8);
|
|
42
|
+
_v$9 !== _p$.r && setAttribute(_el$2, "placeholder", _p$.r = _v$9);
|
|
43
|
+
_p$.d = style(_el$3, _v$0, _p$.d);
|
|
42
44
|
return _p$;
|
|
43
45
|
}, {
|
|
44
46
|
e: void 0,
|
|
@@ -48,7 +50,9 @@ function Combobox(props) {
|
|
|
48
50
|
i: void 0,
|
|
49
51
|
n: void 0,
|
|
50
52
|
s: void 0,
|
|
51
|
-
h: void 0
|
|
53
|
+
h: void 0,
|
|
54
|
+
r: void 0,
|
|
55
|
+
d: void 0
|
|
52
56
|
});
|
|
53
57
|
effect(() => _el$2.value = label());
|
|
54
58
|
return _el$;
|
|
@@ -72,7 +76,7 @@ function Combobox(props) {
|
|
|
72
76
|
return combineStyle({ "--tiny-combobox-trigger-width": `${state.refTrigger?.offsetWidth}px` }, styles().options);
|
|
73
77
|
},
|
|
74
78
|
get children() {
|
|
75
|
-
return createComponent(For, {
|
|
79
|
+
return createComponent(For$1, {
|
|
76
80
|
get each() {
|
|
77
81
|
return props.options;
|
|
78
82
|
},
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import
|
|
6
|
-
import "
|
|
7
|
-
import { Popover } from "
|
|
1
|
+
import { ArrowDownSLine } from "../../../icons/arrow-down-s-line.jsx";
|
|
2
|
+
import "../../../icons/index.jsx";
|
|
3
|
+
import { createClassStyles } from "../../../utils/index.jsx";
|
|
4
|
+
import { Listbox } from "../../../primitives/listbox/listbox.jsx";
|
|
5
|
+
import "../../../primitives/listbox/index.jsx";
|
|
6
|
+
import combobox_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/combobox/combobox.jsx";
|
|
7
|
+
import { Popover } from "../../popover/index.jsx";
|
|
8
8
|
import { For, createMemo, createSignal } from "solid-js";
|
|
9
9
|
import { combineClass, combineStyle, createWatch, dataIf, mountStyle } from "solid-tiny-utils";
|
|
10
10
|
|
|
11
|
-
//#region src/components/combobox/combobox.tsx
|
|
11
|
+
//#region src/components/form-components/combobox/combobox.tsx
|
|
12
12
|
/** biome-ignore-all lint/complexity/noBannedTypes: I need Function */
|
|
13
13
|
function Combobox(props) {
|
|
14
14
|
mountStyle(combobox_default, "tiny-combobox");
|
|
@@ -24,8 +24,8 @@ function Combobox(props) {
|
|
|
24
24
|
return <Popover placement="bottom" trigger="click">
|
|
25
25
|
{(state, acts) => <>
|
|
26
26
|
<Popover.Trigger>
|
|
27
|
-
<div class={combineClass("tiny-combobox__trigger
|
|
28
|
-
<input aria-expanded={state.open} autocomplete="off" placeholder={props.placeholder} readonly role="combobox" style={{
|
|
27
|
+
<div class={combineClass("tiny-combobox__trigger", classes().trigger)} data-disabled={dataIf(props.disabled ?? false)} data-open={dataIf(state.open)} data-size={props.size ?? "medium"} style={combineStyle({}, styles().trigger)}>
|
|
28
|
+
<input aria-expanded={state.open} autocomplete="off" id={props.id} name={props.name} placeholder={props.placeholder} readonly role="combobox" style={{
|
|
29
29
|
height: "100%",
|
|
30
30
|
width: "100%"
|
|
31
31
|
}} tabIndex={-1} type="search" value={label()} />
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Checkbox } from "./checkbox/checkbox.js";
|
|
2
|
+
import "./checkbox/index.js";
|
|
3
|
+
import { CheckboxGroup, CheckboxOption } from "./checkbox-group/checkbox-group.js";
|
|
4
|
+
import "./checkbox-group/index.js";
|
|
5
|
+
import { Combobox, ComboboxProps } from "./combobox/combobox.js";
|
|
6
|
+
import "./combobox/index.js";
|
|
7
|
+
import { NumberInput, NumberInputProps } from "./number-input/number-input.js";
|
|
8
|
+
import "./number-input/index.js";
|
|
9
|
+
import { PasswordInput, PasswordInputProps } from "./password-input/password-input.js";
|
|
10
|
+
import "./password-input/index.js";
|
|
11
|
+
import { RadioGroup, RadioOption } from "./radio-group/radio-group.js";
|
|
12
|
+
import "./radio-group/index.js";
|
|
13
|
+
import { Switcher } from "./switcher/switcher.js";
|
|
14
|
+
import "./switcher/index.js";
|
|
15
|
+
import { TextField, TextFieldProps } from "./text-field/text-field.js";
|
|
16
|
+
import "./text-field/index.js";
|
|
17
|
+
import { Textarea } from "./textarea/textarea.js";
|
|
18
|
+
import "./textarea/index.js";
|
|
19
|
+
import { TimePicker } from "./time-picker/index.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Checkbox } from "./checkbox/checkbox.js";
|
|
2
|
+
import "./checkbox/index.js";
|
|
3
|
+
import { CheckboxGroup } from "./checkbox-group/checkbox-group.js";
|
|
4
|
+
import "./checkbox-group/index.js";
|
|
5
|
+
import { Combobox } from "./combobox/combobox.js";
|
|
6
|
+
import "./combobox/index.js";
|
|
7
|
+
import { NumberInput } from "./number-input/number-input.js";
|
|
8
|
+
import "./number-input/index.js";
|
|
9
|
+
import { PasswordInput } from "./password-input/password-input.js";
|
|
10
|
+
import "./password-input/index.js";
|
|
11
|
+
import { RadioGroup } from "./radio-group/radio-group.js";
|
|
12
|
+
import "./radio-group/index.js";
|
|
13
|
+
import { Switcher } from "./switcher/switcher.js";
|
|
14
|
+
import "./switcher/index.js";
|
|
15
|
+
import { TextField } from "./text-field/text-field.js";
|
|
16
|
+
import "./text-field/index.js";
|
|
17
|
+
import { Textarea } from "./textarea/textarea.js";
|
|
18
|
+
import "./textarea/index.js";
|
|
19
|
+
import { TimePicker } from "./time-picker/index.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Checkbox } from "./checkbox/checkbox.jsx";
|
|
2
|
+
import "./checkbox/index.jsx";
|
|
3
|
+
import { CheckboxGroup } from "./checkbox-group/checkbox-group.jsx";
|
|
4
|
+
import "./checkbox-group/index.jsx";
|
|
5
|
+
import { Combobox } from "./combobox/combobox.jsx";
|
|
6
|
+
import "./combobox/index.jsx";
|
|
7
|
+
import { NumberInput } from "./number-input/number-input.jsx";
|
|
8
|
+
import "./number-input/index.jsx";
|
|
9
|
+
import { PasswordInput } from "./password-input/password-input.jsx";
|
|
10
|
+
import "./password-input/index.jsx";
|
|
11
|
+
import { RadioGroup } from "./radio-group/radio-group.jsx";
|
|
12
|
+
import "./radio-group/index.jsx";
|
|
13
|
+
import { Switcher } from "./switcher/switcher.jsx";
|
|
14
|
+
import "./switcher/index.jsx";
|
|
15
|
+
import { TextField } from "./text-field/text-field.jsx";
|
|
16
|
+
import "./text-field/index.jsx";
|
|
17
|
+
import { Textarea } from "./textarea/textarea.jsx";
|
|
18
|
+
import "./textarea/index.jsx";
|
|
19
|
+
import { TimePicker } from "./time-picker/index.jsx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { NumberInput, NumberInputProps } from "./number-input.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { NumberInput } from "./number-input.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { NumberInput } from "./number-input.jsx";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ClassNames, Styles } from "../../../utils/types.js";
|
|
2
|
+
import { JSX } from "solid-js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/form-components/number-input/number-input.d.ts
|
|
5
|
+
interface NumberInputProps<Nullable extends boolean> {
|
|
6
|
+
value?: number;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onChange?: (value: Nullable extends true ? number | null : number) => void;
|
|
10
|
+
onPressEnter?: (e: KeyboardEvent) => void;
|
|
11
|
+
size?: "small" | "medium" | "large";
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
min?: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
step?: number;
|
|
17
|
+
nullable?: Nullable;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
width?: JSX.CSSProperties["width"];
|
|
20
|
+
classNames?: ClassNames<"wrapper" | "input", {
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
invalid: boolean;
|
|
23
|
+
size: "small" | "medium" | "large";
|
|
24
|
+
}>;
|
|
25
|
+
styles?: Styles<"wrapper" | "input", {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
invalid: boolean;
|
|
28
|
+
size: "small" | "medium" | "large";
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
declare function NumberInput<Nullable extends boolean = false>(props: NumberInputProps<Nullable>): JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { NumberInput, NumberInputProps };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { createClassStyles, extraAriasAndDatasets } from "../../../utils/index.js";
|
|
2
|
+
import number_input_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/number-input/number-input.js";
|
|
3
|
+
import { className, effect, mergeProps, setAttribute, spread, style, template } from "solid-js/web";
|
|
4
|
+
import { createMemo, createSignal } from "solid-js";
|
|
5
|
+
import { combineClass, combineStyle, createWatch, dataIf, isDefined, isUndefined, mountStyle } from "solid-tiny-utils";
|
|
6
|
+
|
|
7
|
+
//#region src/components/form-components/number-input/number-input.tsx
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><input>`);
|
|
9
|
+
function NumberInput(props) {
|
|
10
|
+
mountStyle(number_input_default, "tiny-number-input");
|
|
11
|
+
const [invalid, setInvalid] = createSignal(false);
|
|
12
|
+
const [inputVal, setInputVal] = createSignal(null);
|
|
13
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
14
|
+
disabled: props.disabled ?? false,
|
|
15
|
+
invalid: invalid(),
|
|
16
|
+
size: props.size || "medium"
|
|
17
|
+
}));
|
|
18
|
+
const handleInput = (e) => {
|
|
19
|
+
const value = e.currentTarget.value;
|
|
20
|
+
if (value === "") {
|
|
21
|
+
setInputVal(null);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const numValue = Number(value);
|
|
25
|
+
if (!Number.isNaN(numValue)) setInputVal(numValue);
|
|
26
|
+
};
|
|
27
|
+
const handleBlur = (e) => {
|
|
28
|
+
const target = e.currentTarget;
|
|
29
|
+
if (target.value === "") if (props.nullable) setInputVal(null);
|
|
30
|
+
else {
|
|
31
|
+
setInputVal(props.min ?? 0);
|
|
32
|
+
target.value = String(inputVal());
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const isValueInRange = createMemo(() => {
|
|
36
|
+
const v = inputVal();
|
|
37
|
+
if (isUndefined(v) || v === null) return true;
|
|
38
|
+
if (isDefined(props.min) && v < props.min) return false;
|
|
39
|
+
if (isDefined(props.max) && v > props.max) return false;
|
|
40
|
+
return true;
|
|
41
|
+
});
|
|
42
|
+
createWatch(() => [props.invalid, isValueInRange()], ([invalid$1, isInRange]) => {
|
|
43
|
+
setInvalid(!!invalid$1 || !isInRange);
|
|
44
|
+
});
|
|
45
|
+
createWatch(() => [inputVal(), invalid()], ([val, invalid$1]) => {
|
|
46
|
+
if (!invalid$1 && val !== props.value) if (props.nullable) props.onChange?.(val);
|
|
47
|
+
else props.onChange?.(val === null ? props.min ?? 0 : val);
|
|
48
|
+
}, { defer: true });
|
|
49
|
+
const handleKeyDown = (e) => {
|
|
50
|
+
if (e.key === "Enter") {
|
|
51
|
+
props.onPressEnter?.(e);
|
|
52
|
+
e.currentTarget.blur();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return (() => {
|
|
56
|
+
var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
|
|
57
|
+
spread(_el$2, mergeProps(() => extraAriasAndDatasets(props), {
|
|
58
|
+
get ["class"]() {
|
|
59
|
+
return combineClass("tiny-number-input", classes().input);
|
|
60
|
+
},
|
|
61
|
+
get disabled() {
|
|
62
|
+
return props.disabled;
|
|
63
|
+
},
|
|
64
|
+
get id() {
|
|
65
|
+
return props.id;
|
|
66
|
+
},
|
|
67
|
+
get max() {
|
|
68
|
+
return props.max;
|
|
69
|
+
},
|
|
70
|
+
get min() {
|
|
71
|
+
return props.min;
|
|
72
|
+
},
|
|
73
|
+
get name() {
|
|
74
|
+
return props.name;
|
|
75
|
+
},
|
|
76
|
+
"onBlur": handleBlur,
|
|
77
|
+
"onInput": handleInput,
|
|
78
|
+
"onKeyDown": handleKeyDown,
|
|
79
|
+
get placeholder() {
|
|
80
|
+
return props.placeholder;
|
|
81
|
+
},
|
|
82
|
+
get step() {
|
|
83
|
+
return props.step;
|
|
84
|
+
},
|
|
85
|
+
get style() {
|
|
86
|
+
return combineStyle({}, styles().input);
|
|
87
|
+
},
|
|
88
|
+
"type": "number",
|
|
89
|
+
get value() {
|
|
90
|
+
return props.value;
|
|
91
|
+
}
|
|
92
|
+
}), false, false);
|
|
93
|
+
effect((_p$) => {
|
|
94
|
+
var _v$ = combineClass("tiny-number-input-wrapper", classes().wrapper), _v$2 = dataIf(props.disabled ?? false), _v$3 = dataIf(invalid()), _v$4 = props.size || "medium", _v$5 = combineStyle({ width: props.width }, styles().wrapper);
|
|
95
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
96
|
+
_v$2 !== _p$.t && setAttribute(_el$, "data-disabled", _p$.t = _v$2);
|
|
97
|
+
_v$3 !== _p$.a && setAttribute(_el$, "data-invalid", _p$.a = _v$3);
|
|
98
|
+
_v$4 !== _p$.o && setAttribute(_el$, "data-size", _p$.o = _v$4);
|
|
99
|
+
_p$.i = style(_el$, _v$5, _p$.i);
|
|
100
|
+
return _p$;
|
|
101
|
+
}, {
|
|
102
|
+
e: void 0,
|
|
103
|
+
t: void 0,
|
|
104
|
+
a: void 0,
|
|
105
|
+
o: void 0,
|
|
106
|
+
i: void 0
|
|
107
|
+
});
|
|
108
|
+
return _el$;
|
|
109
|
+
})();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
export { NumberInput };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { createClassStyles, extraAriasAndDatasets } from "../../../utils/index.jsx";
|
|
2
|
+
import number_input_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/number-input/number-input.jsx";
|
|
3
|
+
import { createMemo, createSignal } from "solid-js";
|
|
4
|
+
import { combineClass, combineStyle, createWatch, dataIf, isDefined, isUndefined, mountStyle } from "solid-tiny-utils";
|
|
5
|
+
|
|
6
|
+
//#region src/components/form-components/number-input/number-input.tsx
|
|
7
|
+
function NumberInput(props) {
|
|
8
|
+
mountStyle(number_input_default, "tiny-number-input");
|
|
9
|
+
const [invalid, setInvalid] = createSignal(false);
|
|
10
|
+
const [inputVal, setInputVal] = createSignal(null);
|
|
11
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
12
|
+
disabled: props.disabled ?? false,
|
|
13
|
+
invalid: invalid(),
|
|
14
|
+
size: props.size || "medium"
|
|
15
|
+
}));
|
|
16
|
+
const handleInput = (e) => {
|
|
17
|
+
const value = e.currentTarget.value;
|
|
18
|
+
if (value === "") {
|
|
19
|
+
setInputVal(null);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const numValue = Number(value);
|
|
23
|
+
if (!Number.isNaN(numValue)) setInputVal(numValue);
|
|
24
|
+
};
|
|
25
|
+
const handleBlur = (e) => {
|
|
26
|
+
const target = e.currentTarget;
|
|
27
|
+
if (target.value === "") if (props.nullable) setInputVal(null);
|
|
28
|
+
else {
|
|
29
|
+
setInputVal(props.min ?? 0);
|
|
30
|
+
target.value = String(inputVal());
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const isValueInRange = createMemo(() => {
|
|
34
|
+
const v = inputVal();
|
|
35
|
+
if (isUndefined(v) || v === null) return true;
|
|
36
|
+
if (isDefined(props.min) && v < props.min) return false;
|
|
37
|
+
if (isDefined(props.max) && v > props.max) return false;
|
|
38
|
+
return true;
|
|
39
|
+
});
|
|
40
|
+
createWatch(() => [props.invalid, isValueInRange()], ([invalid$1, isInRange]) => {
|
|
41
|
+
setInvalid(!!invalid$1 || !isInRange);
|
|
42
|
+
});
|
|
43
|
+
createWatch(() => [inputVal(), invalid()], ([val, invalid$1]) => {
|
|
44
|
+
if (!invalid$1 && val !== props.value) if (props.nullable) props.onChange?.(val);
|
|
45
|
+
else props.onChange?.(val === null ? props.min ?? 0 : val);
|
|
46
|
+
}, { defer: true });
|
|
47
|
+
const handleKeyDown = (e) => {
|
|
48
|
+
if (e.key === "Enter") {
|
|
49
|
+
props.onPressEnter?.(e);
|
|
50
|
+
e.currentTarget.blur();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return <div class={combineClass("tiny-number-input-wrapper", classes().wrapper)} data-disabled={dataIf(props.disabled ?? false)} data-invalid={dataIf(invalid())} data-size={props.size || "medium"} style={combineStyle({ width: props.width }, styles().wrapper)}>
|
|
54
|
+
<input {...extraAriasAndDatasets(props)} class={combineClass("tiny-number-input", classes().input)} disabled={props.disabled} id={props.id} max={props.max} min={props.min} name={props.name} onBlur={handleBlur} onInput={handleInput} onKeyDown={handleKeyDown} placeholder={props.placeholder} step={props.step} style={combineStyle({}, styles().input)} type="number" value={props.value} />
|
|
55
|
+
</div>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
export { NumberInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { PasswordInput, PasswordInputProps } from "./password-input.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { PasswordInput } from "./password-input.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { PasswordInput } from "./password-input.jsx";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ClassNames, Styles } from "../../../utils/types.js";
|
|
2
|
+
import { JSX } from "solid-js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/form-components/password-input/password-input.d.ts
|
|
5
|
+
interface PasswordInputProps {
|
|
6
|
+
value?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
onPressEnter?: (e: KeyboardEvent) => void;
|
|
11
|
+
size?: "small" | "medium" | "large";
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
width?: JSX.CSSProperties["width"];
|
|
15
|
+
invalid?: boolean;
|
|
16
|
+
classNames?: ClassNames<"wrapper" | "input" | "toggle", {
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
invalid: boolean;
|
|
19
|
+
size: "small" | "medium" | "large";
|
|
20
|
+
visible: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
styles?: Styles<"wrapper" | "input" | "toggle", {
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
invalid: boolean;
|
|
25
|
+
size: "small" | "medium" | "large";
|
|
26
|
+
visible: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
declare function PasswordInput(props: PasswordInputProps): JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { PasswordInput, PasswordInputProps };
|