solid-tiny-ui 0.5.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/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/{time-picker → form-components/time-picker}/index.js +21 -5
- package/dist/components/{time-picker → form-components/time-picker}/index.jsx +11 -6
- package/dist/components/{time-picker → form-components/time-picker}/panel.js +6 -6
- package/dist/components/{time-picker → form-components/time-picker}/panel.jsx +6 -6
- package/dist/components/{time-picker → form-components/time-picker}/trigger.js +14 -10
- package/dist/components/{time-picker → form-components/time-picker}/trigger.jsx +4 -4
- 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/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 +10 -8
- package/dist/components/visually-hidden/index.jsx +3 -2
- 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 +3 -2
- package/dist/icons/check-line.js +4 -4
- package/dist/icons/check-line.jsx +2 -2
- 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 +12 -1
- package/dist/icons/index.js +12 -1
- package/dist/icons/index.jsx +12 -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 -9
- package/dist/index.js +23 -10
- package/dist/index.jsx +23 -10
- 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 +6 -6
- 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/index.d.ts +2 -2
- package/dist/primitives/fake-scroll-list/listbox.js +2 -2
- 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 +5 -4
- 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 +7 -1
- package/dist/primitives/index.js +7 -3
- package/dist/primitives/index.jsx +7 -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 +4 -4
- 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/components/time-picker/time-picker.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/time-picker/time-picker.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/components/time-picker/index.d.ts +0 -18
- 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,95 @@
|
|
|
1
|
+
import { EyeLine } from "../../../icons/eye-line.js";
|
|
2
|
+
import { EyeOffLine } from "../../../icons/eye-off-line.js";
|
|
3
|
+
import "../../../icons/index.js";
|
|
4
|
+
import { createClassStyles, extraAriasAndDatasets } from "../../../utils/index.js";
|
|
5
|
+
import password_input_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/password-input/password-input.js";
|
|
6
|
+
import { className, createComponent, delegateEvents, effect, insert, memo, mergeProps, setAttribute, spread, style, template } from "solid-js/web";
|
|
7
|
+
import { createSignal } from "solid-js";
|
|
8
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
9
|
+
|
|
10
|
+
//#region src/components/form-components/password-input/password-input.tsx
|
|
11
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><input><button type=button>`);
|
|
12
|
+
function PasswordInput(props) {
|
|
13
|
+
mountStyle(password_input_default, "tiny-password-input");
|
|
14
|
+
const [visible, setVisible] = createSignal(false);
|
|
15
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
16
|
+
disabled: props.disabled ?? false,
|
|
17
|
+
invalid: props.invalid ?? false,
|
|
18
|
+
size: props.size || "medium",
|
|
19
|
+
visible: visible()
|
|
20
|
+
}));
|
|
21
|
+
const handleKeyDown = (e) => {
|
|
22
|
+
if (e.key === "Enter") {
|
|
23
|
+
props.onPressEnter?.(e);
|
|
24
|
+
e.currentTarget.blur();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return (() => {
|
|
28
|
+
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
29
|
+
spread(_el$2, mergeProps(() => extraAriasAndDatasets(props), {
|
|
30
|
+
get ["class"]() {
|
|
31
|
+
return combineClass("tiny-password-input", classes().input);
|
|
32
|
+
},
|
|
33
|
+
get disabled() {
|
|
34
|
+
return props.disabled;
|
|
35
|
+
},
|
|
36
|
+
get id() {
|
|
37
|
+
return props.id;
|
|
38
|
+
},
|
|
39
|
+
get name() {
|
|
40
|
+
return props.name;
|
|
41
|
+
},
|
|
42
|
+
"onInput": (e) => {
|
|
43
|
+
props.onChange?.(e.currentTarget.value);
|
|
44
|
+
},
|
|
45
|
+
"onKeyDown": handleKeyDown,
|
|
46
|
+
get placeholder() {
|
|
47
|
+
return props.placeholder;
|
|
48
|
+
},
|
|
49
|
+
get style() {
|
|
50
|
+
return combineStyle({}, styles().input);
|
|
51
|
+
},
|
|
52
|
+
get type() {
|
|
53
|
+
return visible() ? "text" : "password";
|
|
54
|
+
},
|
|
55
|
+
get value() {
|
|
56
|
+
return props.value;
|
|
57
|
+
}
|
|
58
|
+
}), false, false);
|
|
59
|
+
_el$3.$$click = () => setVisible(!visible());
|
|
60
|
+
insert(_el$3, (() => {
|
|
61
|
+
var _c$ = memo(() => !!visible());
|
|
62
|
+
return () => _c$() ? createComponent(EyeOffLine, {}) : createComponent(EyeLine, {});
|
|
63
|
+
})());
|
|
64
|
+
effect((_p$) => {
|
|
65
|
+
var _v$ = combineClass("tiny-password-input-wrapper", classes().wrapper), _v$2 = dataIf(props.disabled ?? false), _v$3 = dataIf(props.invalid ?? false), _v$4 = props.size || "medium", _v$5 = combineStyle({ width: props.width }, styles().wrapper), _v$6 = visible() ? "Hide password" : "Show password", _v$7 = combineClass("tiny-password-input-toggle", classes().toggle), _v$8 = dataIf(props.disabled ?? false), _v$9 = props.disabled, _v$0 = combineStyle({}, styles().toggle);
|
|
66
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
67
|
+
_v$2 !== _p$.t && setAttribute(_el$, "data-disabled", _p$.t = _v$2);
|
|
68
|
+
_v$3 !== _p$.a && setAttribute(_el$, "data-invalid", _p$.a = _v$3);
|
|
69
|
+
_v$4 !== _p$.o && setAttribute(_el$, "data-size", _p$.o = _v$4);
|
|
70
|
+
_p$.i = style(_el$, _v$5, _p$.i);
|
|
71
|
+
_v$6 !== _p$.n && setAttribute(_el$3, "aria-label", _p$.n = _v$6);
|
|
72
|
+
_v$7 !== _p$.s && className(_el$3, _p$.s = _v$7);
|
|
73
|
+
_v$8 !== _p$.h && setAttribute(_el$3, "data-disabled", _p$.h = _v$8);
|
|
74
|
+
_v$9 !== _p$.r && (_el$3.disabled = _p$.r = _v$9);
|
|
75
|
+
_p$.d = style(_el$3, _v$0, _p$.d);
|
|
76
|
+
return _p$;
|
|
77
|
+
}, {
|
|
78
|
+
e: void 0,
|
|
79
|
+
t: void 0,
|
|
80
|
+
a: void 0,
|
|
81
|
+
o: void 0,
|
|
82
|
+
i: void 0,
|
|
83
|
+
n: void 0,
|
|
84
|
+
s: void 0,
|
|
85
|
+
h: void 0,
|
|
86
|
+
r: void 0,
|
|
87
|
+
d: void 0
|
|
88
|
+
});
|
|
89
|
+
return _el$;
|
|
90
|
+
})();
|
|
91
|
+
}
|
|
92
|
+
delegateEvents(["click"]);
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
export { PasswordInput };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EyeLine } from "../../../icons/eye-line.jsx";
|
|
2
|
+
import { EyeOffLine } from "../../../icons/eye-off-line.jsx";
|
|
3
|
+
import "../../../icons/index.jsx";
|
|
4
|
+
import { createClassStyles, extraAriasAndDatasets } from "../../../utils/index.jsx";
|
|
5
|
+
import password_input_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/password-input/password-input.jsx";
|
|
6
|
+
import { createSignal } from "solid-js";
|
|
7
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
8
|
+
|
|
9
|
+
//#region src/components/form-components/password-input/password-input.tsx
|
|
10
|
+
function PasswordInput(props) {
|
|
11
|
+
mountStyle(password_input_default, "tiny-password-input");
|
|
12
|
+
const [visible, setVisible] = createSignal(false);
|
|
13
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
14
|
+
disabled: props.disabled ?? false,
|
|
15
|
+
invalid: props.invalid ?? false,
|
|
16
|
+
size: props.size || "medium",
|
|
17
|
+
visible: visible()
|
|
18
|
+
}));
|
|
19
|
+
const handleKeyDown = (e) => {
|
|
20
|
+
if (e.key === "Enter") {
|
|
21
|
+
props.onPressEnter?.(e);
|
|
22
|
+
e.currentTarget.blur();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return <div class={combineClass("tiny-password-input-wrapper", classes().wrapper)} data-disabled={dataIf(props.disabled ?? false)} data-invalid={dataIf(props.invalid ?? false)} data-size={props.size || "medium"} style={combineStyle({ width: props.width }, styles().wrapper)}>
|
|
26
|
+
<input {...extraAriasAndDatasets(props)} class={combineClass("tiny-password-input", classes().input)} disabled={props.disabled} id={props.id} name={props.name} onInput={(e) => {
|
|
27
|
+
props.onChange?.(e.currentTarget.value);
|
|
28
|
+
}} onKeyDown={handleKeyDown} placeholder={props.placeholder} style={combineStyle({}, styles().input)} type={visible() ? "text" : "password"} value={props.value} />
|
|
29
|
+
<button aria-label={visible() ? "Hide password" : "Show password"} class={combineClass("tiny-password-input-toggle", classes().toggle)} data-disabled={dataIf(props.disabled ?? false)} disabled={props.disabled} onClick={() => setVisible(!visible())} style={combineStyle({}, styles().toggle)} type="button">
|
|
30
|
+
{visible() ? <EyeOffLine /> : <EyeLine />}
|
|
31
|
+
</button>
|
|
32
|
+
</div>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { PasswordInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { RadioGroup, RadioOption } from "./radio-group.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { RadioGroup } from "./radio-group.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { RadioGroup } from "./radio-group.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/radio-group/radio-group.d.ts
|
|
7
|
+
interface RadioOption<T> {
|
|
8
|
+
label: JSX.Element;
|
|
9
|
+
value: T;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function RadioGroup<T extends string | number>(props: {
|
|
13
|
+
options?: RadioOption<T>[];
|
|
14
|
+
value?: T;
|
|
15
|
+
onChange?: (value: T) => void;
|
|
16
|
+
name?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
classNames?: ClassNames<"root" | "item" | "circle" | "label", {
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
styles?: Styles<"root" | "item" | "circle" | "label", {
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
} & OmitComponentProps<typeof Flex, "children">): JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { RadioGroup, RadioOption };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { createClassStyles } from "../../../utils/index.js";
|
|
2
|
+
import { Flex } from "../../../layout/flex/index.js";
|
|
3
|
+
import "../../../layout/index.js";
|
|
4
|
+
import { RadioGroupCore } from "../../../primitives/radio-group/index.js";
|
|
5
|
+
import "../../../primitives/index.js";
|
|
6
|
+
import radio_group_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/radio-group/radio-group.js";
|
|
7
|
+
import { className, createComponent, effect, insert, mergeProps, style, template } from "solid-js/web";
|
|
8
|
+
import { For as For$1, splitProps } from "solid-js";
|
|
9
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
10
|
+
|
|
11
|
+
//#region src/components/form-components/radio-group/radio-group.tsx
|
|
12
|
+
var _tmpl$ = /* @__PURE__ */ template(`<span>`);
|
|
13
|
+
function RadioGroup(props) {
|
|
14
|
+
mountStyle(radio_group_default, "tiny-radio-group");
|
|
15
|
+
const [local, others] = splitProps(props, [
|
|
16
|
+
"options",
|
|
17
|
+
"value",
|
|
18
|
+
"onChange",
|
|
19
|
+
"name",
|
|
20
|
+
"disabled",
|
|
21
|
+
"class",
|
|
22
|
+
"classNames",
|
|
23
|
+
"styles"
|
|
24
|
+
]);
|
|
25
|
+
const [classes, styles] = createClassStyles(() => local.classNames, () => local.styles, () => ({ disabled: local.disabled ?? false }));
|
|
26
|
+
return createComponent(RadioGroupCore, {
|
|
27
|
+
get disabled() {
|
|
28
|
+
return local.disabled;
|
|
29
|
+
},
|
|
30
|
+
get name() {
|
|
31
|
+
return local.name;
|
|
32
|
+
},
|
|
33
|
+
get onChange() {
|
|
34
|
+
return local.onChange;
|
|
35
|
+
},
|
|
36
|
+
get value() {
|
|
37
|
+
return local.value;
|
|
38
|
+
},
|
|
39
|
+
children: (rootState) => createComponent(Flex, mergeProps({
|
|
40
|
+
get ["class"]() {
|
|
41
|
+
return combineClass("tiny-radio-group", classes().root, local.class);
|
|
42
|
+
},
|
|
43
|
+
get ["data-disabled"]() {
|
|
44
|
+
return dataIf(rootState.disabled);
|
|
45
|
+
},
|
|
46
|
+
gap: "md",
|
|
47
|
+
get style() {
|
|
48
|
+
return combineStyle({}, styles().root);
|
|
49
|
+
}
|
|
50
|
+
}, others, { get children() {
|
|
51
|
+
return createComponent(For$1, {
|
|
52
|
+
get each() {
|
|
53
|
+
return local.options;
|
|
54
|
+
},
|
|
55
|
+
children: (o) => createComponent(RadioGroupCore.Item, {
|
|
56
|
+
get disabled() {
|
|
57
|
+
return o.disabled;
|
|
58
|
+
},
|
|
59
|
+
get value() {
|
|
60
|
+
return o.value;
|
|
61
|
+
},
|
|
62
|
+
children: (itemState) => {
|
|
63
|
+
const [itemClasses, itemStyles] = createClassStyles(() => local.classNames, () => local.styles, () => ({ disabled: itemState.disabled }));
|
|
64
|
+
return createComponent(RadioGroupCore.ItemLabel, {
|
|
65
|
+
get ["class"]() {
|
|
66
|
+
return combineClass("tiny-radio-item", itemClasses().item);
|
|
67
|
+
},
|
|
68
|
+
get ["data-checked"]() {
|
|
69
|
+
return dataIf(itemState.checked);
|
|
70
|
+
},
|
|
71
|
+
get ["data-disabled"]() {
|
|
72
|
+
return dataIf(itemState.disabled);
|
|
73
|
+
},
|
|
74
|
+
get style() {
|
|
75
|
+
return combineStyle({}, itemStyles().item);
|
|
76
|
+
},
|
|
77
|
+
get children() {
|
|
78
|
+
return [
|
|
79
|
+
createComponent(RadioGroupCore.ItemInput, {}),
|
|
80
|
+
(() => {
|
|
81
|
+
var _el$ = _tmpl$();
|
|
82
|
+
effect((_p$) => {
|
|
83
|
+
var _v$ = combineClass("tiny-radio-circle", itemClasses().circle), _v$2 = combineStyle({}, itemStyles().circle);
|
|
84
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
85
|
+
_p$.t = style(_el$, _v$2, _p$.t);
|
|
86
|
+
return _p$;
|
|
87
|
+
}, {
|
|
88
|
+
e: void 0,
|
|
89
|
+
t: void 0
|
|
90
|
+
});
|
|
91
|
+
return _el$;
|
|
92
|
+
})(),
|
|
93
|
+
(() => {
|
|
94
|
+
var _el$2 = _tmpl$();
|
|
95
|
+
insert(_el$2, () => o.label);
|
|
96
|
+
effect((_p$) => {
|
|
97
|
+
var _v$3 = combineClass("tiny-radio-label", itemClasses().label), _v$4 = combineStyle({}, itemStyles().label);
|
|
98
|
+
_v$3 !== _p$.e && className(_el$2, _p$.e = _v$3);
|
|
99
|
+
_p$.t = style(_el$2, _v$4, _p$.t);
|
|
100
|
+
return _p$;
|
|
101
|
+
}, {
|
|
102
|
+
e: void 0,
|
|
103
|
+
t: void 0
|
|
104
|
+
});
|
|
105
|
+
return _el$2;
|
|
106
|
+
})()
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
} }))
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
export { RadioGroup };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createClassStyles } from "../../../utils/index.jsx";
|
|
2
|
+
import { Flex } from "../../../layout/flex/index.jsx";
|
|
3
|
+
import "../../../layout/index.jsx";
|
|
4
|
+
import { RadioGroupCore } from "../../../primitives/radio-group/index.jsx";
|
|
5
|
+
import "../../../primitives/index.jsx";
|
|
6
|
+
import radio_group_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/radio-group/radio-group.jsx";
|
|
7
|
+
import { For, splitProps } from "solid-js";
|
|
8
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
9
|
+
|
|
10
|
+
//#region src/components/form-components/radio-group/radio-group.tsx
|
|
11
|
+
function RadioGroup(props) {
|
|
12
|
+
mountStyle(radio_group_default, "tiny-radio-group");
|
|
13
|
+
const [local, others] = splitProps(props, [
|
|
14
|
+
"options",
|
|
15
|
+
"value",
|
|
16
|
+
"onChange",
|
|
17
|
+
"name",
|
|
18
|
+
"disabled",
|
|
19
|
+
"class",
|
|
20
|
+
"classNames",
|
|
21
|
+
"styles"
|
|
22
|
+
]);
|
|
23
|
+
const [classes, styles] = createClassStyles(() => local.classNames, () => local.styles, () => ({ disabled: local.disabled ?? false }));
|
|
24
|
+
return <RadioGroupCore disabled={local.disabled} name={local.name} onChange={local.onChange} value={local.value}>
|
|
25
|
+
{(rootState) => <Flex class={combineClass("tiny-radio-group", classes().root, local.class)} data-disabled={dataIf(rootState.disabled)} gap="md" style={combineStyle({}, styles().root)} {...others}>
|
|
26
|
+
<For each={local.options}>
|
|
27
|
+
{(o) => <RadioGroupCore.Item disabled={o.disabled} value={o.value}>
|
|
28
|
+
{(itemState) => {
|
|
29
|
+
const [itemClasses, itemStyles] = createClassStyles(() => local.classNames, () => local.styles, () => ({ disabled: itemState.disabled }));
|
|
30
|
+
return <RadioGroupCore.ItemLabel class={combineClass("tiny-radio-item", itemClasses().item)} data-checked={dataIf(itemState.checked)} data-disabled={dataIf(itemState.disabled)} style={combineStyle({}, itemStyles().item)}>
|
|
31
|
+
<RadioGroupCore.ItemInput />
|
|
32
|
+
<span class={combineClass("tiny-radio-circle", itemClasses().circle)} style={combineStyle({}, itemStyles().circle)} />
|
|
33
|
+
<span class={combineClass("tiny-radio-label", itemClasses().label)} style={combineStyle({}, itemStyles().label)}>
|
|
34
|
+
{o.label}
|
|
35
|
+
</span>
|
|
36
|
+
</RadioGroupCore.ItemLabel>;
|
|
37
|
+
}}
|
|
38
|
+
</RadioGroupCore.Item>}
|
|
39
|
+
</For>
|
|
40
|
+
</Flex>}
|
|
41
|
+
</RadioGroupCore>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { RadioGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Switcher } from "./switcher.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Switcher } from "./switcher.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Switcher } from "./switcher.jsx";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ClassNames, Styles } from "../../../utils/types.js";
|
|
2
|
+
import { JSX } from "solid-js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/form-components/switcher/switcher.d.ts
|
|
5
|
+
declare function Switcher(props: {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onChange?: (checked: boolean) => void;
|
|
9
|
+
children?: JSX.Element;
|
|
10
|
+
id?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
classNames?: ClassNames<"root" | "track" | "thumb" | "label", {
|
|
14
|
+
checked: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
styles?: Styles<"root" | "track" | "thumb" | "label", {
|
|
18
|
+
checked: boolean;
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Switcher };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { createClassStyles } from "../../../utils/index.js";
|
|
2
|
+
import { CheckboxCore } from "../../../primitives/checkbox/index.js";
|
|
3
|
+
import "../../../primitives/index.js";
|
|
4
|
+
import switcher_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/switcher/switcher.js";
|
|
5
|
+
import { className, createComponent, effect, insert, style, template } from "solid-js/web";
|
|
6
|
+
import { children } from "solid-js";
|
|
7
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
8
|
+
|
|
9
|
+
//#region src/components/form-components/switcher/switcher.tsx
|
|
10
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><div>`), _tmpl$2 = /* @__PURE__ */ template(`<span>`);
|
|
11
|
+
function Switcher(props) {
|
|
12
|
+
mountStyle(switcher_default, "tiny-switcher");
|
|
13
|
+
const label = children(() => props.children);
|
|
14
|
+
return createComponent(CheckboxCore, {
|
|
15
|
+
get checked() {
|
|
16
|
+
return props.checked;
|
|
17
|
+
},
|
|
18
|
+
get disabled() {
|
|
19
|
+
return props.disabled;
|
|
20
|
+
},
|
|
21
|
+
get name() {
|
|
22
|
+
return props.name;
|
|
23
|
+
},
|
|
24
|
+
get onChange() {
|
|
25
|
+
return props.onChange;
|
|
26
|
+
},
|
|
27
|
+
get value() {
|
|
28
|
+
return props.value;
|
|
29
|
+
},
|
|
30
|
+
children: (state) => {
|
|
31
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
32
|
+
checked: state.checked,
|
|
33
|
+
disabled: state.disabled
|
|
34
|
+
}));
|
|
35
|
+
return createComponent(CheckboxCore.Label, {
|
|
36
|
+
get ["class"]() {
|
|
37
|
+
return combineClass("tiny-switcher", classes().root);
|
|
38
|
+
},
|
|
39
|
+
get ["data-checked"]() {
|
|
40
|
+
return dataIf(state.checked);
|
|
41
|
+
},
|
|
42
|
+
get ["data-disabled"]() {
|
|
43
|
+
return dataIf(state.disabled);
|
|
44
|
+
},
|
|
45
|
+
get style() {
|
|
46
|
+
return combineStyle({}, styles().root);
|
|
47
|
+
},
|
|
48
|
+
get children() {
|
|
49
|
+
return [
|
|
50
|
+
createComponent(CheckboxCore.Input, { get id() {
|
|
51
|
+
return props.id;
|
|
52
|
+
} }),
|
|
53
|
+
(() => {
|
|
54
|
+
var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
|
|
55
|
+
effect((_p$) => {
|
|
56
|
+
var _v$ = combineClass("tiny-switcher-track", classes().track), _v$2 = combineStyle({}, styles().track), _v$3 = combineClass("tiny-switcher-thumb", classes().thumb), _v$4 = combineStyle({}, styles().thumb);
|
|
57
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
58
|
+
_p$.t = style(_el$, _v$2, _p$.t);
|
|
59
|
+
_v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
|
|
60
|
+
_p$.o = style(_el$2, _v$4, _p$.o);
|
|
61
|
+
return _p$;
|
|
62
|
+
}, {
|
|
63
|
+
e: void 0,
|
|
64
|
+
t: void 0,
|
|
65
|
+
a: void 0,
|
|
66
|
+
o: void 0
|
|
67
|
+
});
|
|
68
|
+
return _el$;
|
|
69
|
+
})(),
|
|
70
|
+
(() => {
|
|
71
|
+
var _el$3 = _tmpl$2();
|
|
72
|
+
insert(_el$3, label);
|
|
73
|
+
effect((_p$) => {
|
|
74
|
+
var _v$5 = combineClass("tiny-switcher-label", classes().label), _v$6 = combineStyle({}, styles().label);
|
|
75
|
+
_v$5 !== _p$.e && className(_el$3, _p$.e = _v$5);
|
|
76
|
+
_p$.t = style(_el$3, _v$6, _p$.t);
|
|
77
|
+
return _p$;
|
|
78
|
+
}, {
|
|
79
|
+
e: void 0,
|
|
80
|
+
t: void 0
|
|
81
|
+
});
|
|
82
|
+
return _el$3;
|
|
83
|
+
})()
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
export { Switcher };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createClassStyles } from "../../../utils/index.jsx";
|
|
2
|
+
import { CheckboxCore } from "../../../primitives/checkbox/index.jsx";
|
|
3
|
+
import "../../../primitives/index.jsx";
|
|
4
|
+
import switcher_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/switcher/switcher.jsx";
|
|
5
|
+
import { children } from "solid-js";
|
|
6
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
7
|
+
|
|
8
|
+
//#region src/components/form-components/switcher/switcher.tsx
|
|
9
|
+
function Switcher(props) {
|
|
10
|
+
mountStyle(switcher_default, "tiny-switcher");
|
|
11
|
+
const label = children(() => props.children);
|
|
12
|
+
return <CheckboxCore checked={props.checked} disabled={props.disabled} name={props.name} onChange={props.onChange} value={props.value}>
|
|
13
|
+
{(state) => {
|
|
14
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
15
|
+
checked: state.checked,
|
|
16
|
+
disabled: state.disabled
|
|
17
|
+
}));
|
|
18
|
+
return <CheckboxCore.Label class={combineClass("tiny-switcher", classes().root)} data-checked={dataIf(state.checked)} data-disabled={dataIf(state.disabled)} style={combineStyle({}, styles().root)}>
|
|
19
|
+
<CheckboxCore.Input id={props.id} />
|
|
20
|
+
<div class={combineClass("tiny-switcher-track", classes().track)} style={combineStyle({}, styles().track)}>
|
|
21
|
+
<div class={combineClass("tiny-switcher-thumb", classes().thumb)} style={combineStyle({}, styles().thumb)} />
|
|
22
|
+
</div>
|
|
23
|
+
<span class={combineClass("tiny-switcher-label", classes().label)} style={combineStyle({}, styles().label)}>
|
|
24
|
+
{label()}
|
|
25
|
+
</span>
|
|
26
|
+
</CheckboxCore.Label>;
|
|
27
|
+
}}
|
|
28
|
+
</CheckboxCore>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Switcher };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { TextField, TextFieldProps } from "./text-field.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { TextField } from "./text-field.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { TextField } from "./text-field.jsx";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ClassNames, Styles } from "../../../utils/types.js";
|
|
2
|
+
import { JSX } from "solid-js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/form-components/text-field/text-field.d.ts
|
|
5
|
+
interface TextFieldProps {
|
|
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
|
+
prefix?: JSX.Element;
|
|
15
|
+
suffix?: JSX.Element;
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
classNames?: ClassNames<"root" | "input" | "prefix" | "suffix", {
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
invalid: boolean;
|
|
20
|
+
size: "small" | "medium" | "large";
|
|
21
|
+
}>;
|
|
22
|
+
styles?: Styles<"root" | "input" | "prefix" | "suffix", {
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
invalid: boolean;
|
|
25
|
+
size: "small" | "medium" | "large";
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
declare function TextField(props: TextFieldProps): JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { TextField, TextFieldProps };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { createClassStyles, extraAriasAndDatasets } from "../../../utils/index.js";
|
|
2
|
+
import text_field_default from "../../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/text-field/text-field.js";
|
|
3
|
+
import { className, createComponent, effect, insert, mergeProps, setAttribute, spread, style, template } from "solid-js/web";
|
|
4
|
+
import { Show, children } from "solid-js";
|
|
5
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
6
|
+
|
|
7
|
+
//#region src/components/form-components/text-field/text-field.tsx
|
|
8
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`), _tmpl$2 = /* @__PURE__ */ template(`<div><input>`);
|
|
9
|
+
function TextField(props) {
|
|
10
|
+
mountStyle(text_field_default, "tiny-text-field");
|
|
11
|
+
const prefix = children(() => props.prefix);
|
|
12
|
+
const suffix = children(() => props.suffix);
|
|
13
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
14
|
+
disabled: props.disabled ?? false,
|
|
15
|
+
invalid: props.invalid ?? false,
|
|
16
|
+
size: props.size || "medium"
|
|
17
|
+
}));
|
|
18
|
+
const handleKeyDown = (e) => {
|
|
19
|
+
if (e.key === "Enter") {
|
|
20
|
+
props.onPressEnter?.(e);
|
|
21
|
+
e.currentTarget.blur();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return (() => {
|
|
25
|
+
var _el$ = _tmpl$2(), _el$3 = _el$.firstChild;
|
|
26
|
+
insert(_el$, createComponent(Show, {
|
|
27
|
+
get when() {
|
|
28
|
+
return prefix();
|
|
29
|
+
},
|
|
30
|
+
get children() {
|
|
31
|
+
var _el$2 = _tmpl$();
|
|
32
|
+
insert(_el$2, prefix);
|
|
33
|
+
effect((_p$) => {
|
|
34
|
+
var _v$ = combineClass("tiny-text-field-prefix", classes().prefix), _v$2 = combineStyle({}, styles().prefix);
|
|
35
|
+
_v$ !== _p$.e && className(_el$2, _p$.e = _v$);
|
|
36
|
+
_p$.t = style(_el$2, _v$2, _p$.t);
|
|
37
|
+
return _p$;
|
|
38
|
+
}, {
|
|
39
|
+
e: void 0,
|
|
40
|
+
t: void 0
|
|
41
|
+
});
|
|
42
|
+
return _el$2;
|
|
43
|
+
}
|
|
44
|
+
}), _el$3);
|
|
45
|
+
spread(_el$3, mergeProps(() => extraAriasAndDatasets(props), {
|
|
46
|
+
get ["class"]() {
|
|
47
|
+
return combineClass("tiny-text-field-input", classes().input);
|
|
48
|
+
},
|
|
49
|
+
get disabled() {
|
|
50
|
+
return props.disabled;
|
|
51
|
+
},
|
|
52
|
+
get id() {
|
|
53
|
+
return props.id;
|
|
54
|
+
},
|
|
55
|
+
get name() {
|
|
56
|
+
return props.name;
|
|
57
|
+
},
|
|
58
|
+
"onInput": (e) => {
|
|
59
|
+
props.onChange?.(e.currentTarget.value);
|
|
60
|
+
},
|
|
61
|
+
"onKeyDown": handleKeyDown,
|
|
62
|
+
get placeholder() {
|
|
63
|
+
return props.placeholder;
|
|
64
|
+
},
|
|
65
|
+
get style() {
|
|
66
|
+
return combineStyle({}, styles().input);
|
|
67
|
+
},
|
|
68
|
+
"type": "text",
|
|
69
|
+
get value() {
|
|
70
|
+
return props.value;
|
|
71
|
+
}
|
|
72
|
+
}), false, false);
|
|
73
|
+
insert(_el$, createComponent(Show, {
|
|
74
|
+
get when() {
|
|
75
|
+
return suffix();
|
|
76
|
+
},
|
|
77
|
+
get children() {
|
|
78
|
+
var _el$4 = _tmpl$();
|
|
79
|
+
insert(_el$4, suffix);
|
|
80
|
+
effect((_p$) => {
|
|
81
|
+
var _v$3 = combineClass("tiny-text-field-suffix", classes().suffix), _v$4 = combineStyle({}, styles().suffix);
|
|
82
|
+
_v$3 !== _p$.e && className(_el$4, _p$.e = _v$3);
|
|
83
|
+
_p$.t = style(_el$4, _v$4, _p$.t);
|
|
84
|
+
return _p$;
|
|
85
|
+
}, {
|
|
86
|
+
e: void 0,
|
|
87
|
+
t: void 0
|
|
88
|
+
});
|
|
89
|
+
return _el$4;
|
|
90
|
+
}
|
|
91
|
+
}), null);
|
|
92
|
+
effect((_p$) => {
|
|
93
|
+
var _v$5 = combineClass("tiny-text-field", classes().root), _v$6 = dataIf(props.disabled ?? false), _v$7 = dataIf(props.invalid ?? false), _v$8 = props.size || "medium", _v$9 = combineStyle({}, styles().root);
|
|
94
|
+
_v$5 !== _p$.e && className(_el$, _p$.e = _v$5);
|
|
95
|
+
_v$6 !== _p$.t && setAttribute(_el$, "data-disabled", _p$.t = _v$6);
|
|
96
|
+
_v$7 !== _p$.a && setAttribute(_el$, "data-invalid", _p$.a = _v$7);
|
|
97
|
+
_v$8 !== _p$.o && setAttribute(_el$, "data-size", _p$.o = _v$8);
|
|
98
|
+
_p$.i = style(_el$, _v$9, _p$.i);
|
|
99
|
+
return _p$;
|
|
100
|
+
}, {
|
|
101
|
+
e: void 0,
|
|
102
|
+
t: void 0,
|
|
103
|
+
a: void 0,
|
|
104
|
+
o: void 0,
|
|
105
|
+
i: void 0
|
|
106
|
+
});
|
|
107
|
+
return _el$;
|
|
108
|
+
})();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
export { TextField };
|