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
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createClassStyles, getGlobalToken } from "../../utils/index.jsx";
|
|
2
2
|
import progress_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/progress/progress.jsx";
|
|
3
3
|
import { createMemo } from "solid-js";
|
|
4
|
-
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
4
|
+
import { clamp, combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
5
5
|
|
|
6
6
|
//#region src/components/progress/line-progress.tsx
|
|
7
7
|
function LineProgress(props) {
|
|
8
8
|
mountStyle(progress_default, "tiny-progress");
|
|
9
9
|
const normalizedPercent = createMemo(() => {
|
|
10
10
|
if (props.percent === void 0) return 45;
|
|
11
|
-
return
|
|
11
|
+
return clamp(props.percent, 0, 100);
|
|
12
12
|
});
|
|
13
13
|
const background = createMemo(() => {
|
|
14
|
-
const color = props.fillColor || getGlobalToken("
|
|
14
|
+
const color = props.fillColor || `rgb(${getGlobalToken("rgb-brand-5")})`;
|
|
15
15
|
if (props.indeterminate) return `linear-gradient(90deg, transparent, ${color} 30%, ${color} 65%, transparent)`;
|
|
16
16
|
return color;
|
|
17
17
|
});
|
|
@@ -27,12 +27,13 @@ function LineProgress(props) {
|
|
|
27
27
|
overflow: "hidden",
|
|
28
28
|
display: "flex",
|
|
29
29
|
"align-items": "center",
|
|
30
|
-
"border-radius": "3px"
|
|
30
|
+
"border-radius": "3px",
|
|
31
|
+
width: props.width || "100%"
|
|
31
32
|
}, styles().root)}>
|
|
32
33
|
<div class={combineClass("tiny-progress-line-rail", classes().rail)} style={combineStyle({
|
|
33
34
|
height: "1px",
|
|
34
35
|
width: props.width || "100%",
|
|
35
|
-
background: props.railColor || getGlobalToken("
|
|
36
|
+
background: props.railColor || `rgb(${getGlobalToken("rgb-neutral-3")})`,
|
|
36
37
|
overflow: "visible"
|
|
37
38
|
}, styles().rail)}>
|
|
38
39
|
<div class={combineClass("tiny-progress-line-fill", classes().fill)} data-indeterminate={dataIf(props.indeterminate ?? false)} style={combineStyle({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as solid_js44 from "solid-js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/progress/loading-bar.d.ts
|
|
4
4
|
|
|
@@ -9,6 +9,6 @@ import * as solid_js17 from "solid-js";
|
|
|
9
9
|
*/
|
|
10
10
|
declare function LoadingBar(props: {
|
|
11
11
|
open: boolean;
|
|
12
|
-
}):
|
|
12
|
+
}): solid_js44.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { LoadingBar };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClassNames, Styles } from "../../utils/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as solid_js46 from "solid-js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/spin/spin-ring.d.ts
|
|
5
5
|
declare function SpinRing(props: {
|
|
@@ -16,6 +16,6 @@ declare function SpinRing(props: {
|
|
|
16
16
|
color: string;
|
|
17
17
|
strokeWidth: number;
|
|
18
18
|
}>;
|
|
19
|
-
}):
|
|
19
|
+
}): solid_js46.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { SpinRing };
|
|
@@ -10,7 +10,7 @@ function SpinRing(props) {
|
|
|
10
10
|
mountStyle(spin_ring_default, "tiny-spin-ring");
|
|
11
11
|
const real = mergeProps$1({
|
|
12
12
|
size: 32,
|
|
13
|
-
color: getGlobalToken("
|
|
13
|
+
color: `rgb(${getGlobalToken("rgb-brand-5")})`,
|
|
14
14
|
strokeWidth: 12
|
|
15
15
|
}, props);
|
|
16
16
|
const viewBoxSize = 100;
|
|
@@ -8,7 +8,7 @@ function SpinRing(props) {
|
|
|
8
8
|
mountStyle(spin_ring_default, "tiny-spin-ring");
|
|
9
9
|
const real = mergeProps({
|
|
10
10
|
size: 32,
|
|
11
|
-
color: getGlobalToken("
|
|
11
|
+
color: `rgb(${getGlobalToken("rgb-brand-5")})`,
|
|
12
12
|
strokeWidth: 12
|
|
13
13
|
}, props);
|
|
14
14
|
const viewBoxSize = 100;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { makeClassNames, makeStyles } from "../../utils/index.js";
|
|
2
2
|
import spin_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/spin/spin.js";
|
|
3
|
+
import { getAnimationDurationMs } from "../../utils/duration.js";
|
|
3
4
|
import { SpinRing } from "./spin-ring.js";
|
|
4
5
|
import { className, createComponent, effect, insert, setAttribute, style, template, use } from "solid-js/web";
|
|
5
6
|
import { Show, children, createMemo, createSignal, onCleanup } from "solid-js";
|
|
@@ -31,16 +32,16 @@ function Spin(props) {
|
|
|
31
32
|
});
|
|
32
33
|
const resolvedIndicator = children(() => props.indicator);
|
|
33
34
|
const [refLoader, setRefLoader] = createSignal();
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const presence = createPresence(spinning, {
|
|
36
|
+
enterDuration: () => getAnimationDurationMs(refLoader()),
|
|
37
|
+
exitDuration: () => getAnimationDurationMs(refLoader())
|
|
37
38
|
});
|
|
38
39
|
return (() => {
|
|
39
40
|
var _el$ = _tmpl$2(), _el$2 = _el$.firstChild;
|
|
40
41
|
insert(_el$2, () => props.children);
|
|
41
42
|
insert(_el$, createComponent(Show, {
|
|
42
43
|
get when() {
|
|
43
|
-
return
|
|
44
|
+
return presence.isMounted();
|
|
44
45
|
},
|
|
45
46
|
get children() {
|
|
46
47
|
var _el$3 = _tmpl$();
|
|
@@ -57,10 +58,10 @@ function Spin(props) {
|
|
|
57
58
|
}
|
|
58
59
|
}));
|
|
59
60
|
effect((_p$) => {
|
|
60
|
-
var _v$ = combineClass("tiny-spin__loader", classes().loader), _v$2 = dataIf(
|
|
61
|
+
var _v$ = combineClass("tiny-spin__loader", classes().loader), _v$2 = dataIf(["entering", "pre-enter"].includes(presence.phase())), _v$3 = dataIf(["exiting"].includes(presence.phase())), _v$4 = styles().loader;
|
|
61
62
|
_v$ !== _p$.e && className(_el$3, _p$.e = _v$);
|
|
62
|
-
_v$2 !== _p$.t && setAttribute(_el$3, "data-
|
|
63
|
-
_v$3 !== _p$.a && setAttribute(_el$3, "data-
|
|
63
|
+
_v$2 !== _p$.t && setAttribute(_el$3, "data-entering", _p$.t = _v$2);
|
|
64
|
+
_v$3 !== _p$.a && setAttribute(_el$3, "data-exiting", _p$.a = _v$3);
|
|
64
65
|
_p$.o = style(_el$3, _v$4, _p$.o);
|
|
65
66
|
return _p$;
|
|
66
67
|
}, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { makeClassNames, makeStyles } from "../../utils/index.jsx";
|
|
2
2
|
import spin_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/spin/spin.jsx";
|
|
3
|
+
import { getAnimationDurationMs } from "../../utils/duration.jsx";
|
|
3
4
|
import { SpinRing } from "./spin-ring.jsx";
|
|
4
5
|
import { Show, children, createMemo, createSignal, onCleanup } from "solid-js";
|
|
5
6
|
import { combineClass, createPresence, createWatch, dataIf, mountStyle } from "solid-tiny-utils";
|
|
@@ -29,16 +30,16 @@ function Spin(props) {
|
|
|
29
30
|
});
|
|
30
31
|
const resolvedIndicator = children(() => props.indicator);
|
|
31
32
|
const [refLoader, setRefLoader] = createSignal();
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const presence = createPresence(spinning, {
|
|
34
|
+
enterDuration: () => getAnimationDurationMs(refLoader()),
|
|
35
|
+
exitDuration: () => getAnimationDurationMs(refLoader())
|
|
35
36
|
});
|
|
36
37
|
return <div aria-busy={spinning()} class={combineClass("tiny-spin", classes().root)} data-spinning={dataIf(spinning())} style={styles().root}>
|
|
37
38
|
<div class={combineClass("tiny-spin__content", classes().content)} style={styles().content}>
|
|
38
39
|
{props.children}
|
|
39
40
|
</div>
|
|
40
|
-
<Show when={
|
|
41
|
-
<div class={combineClass("tiny-spin__loader", classes().loader)} data-
|
|
41
|
+
<Show when={presence.isMounted()}>
|
|
42
|
+
<div class={combineClass("tiny-spin__loader", classes().loader)} data-entering={dataIf(["entering", "pre-enter"].includes(presence.phase()))} data-exiting={dataIf(["exiting"].includes(presence.phase()))} ref={setRefLoader} style={styles().loader}>
|
|
42
43
|
<Show fallback={<SpinRing />} when={resolvedIndicator()}>
|
|
43
44
|
{resolvedIndicator()}
|
|
44
45
|
</Show>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ClassNames, Styles } from "../../utils/types.js";
|
|
1
2
|
import { JSX } from "solid-js";
|
|
2
3
|
|
|
3
4
|
//#region src/components/tabs/index.d.ts
|
|
@@ -17,6 +18,12 @@ interface TabsProps {
|
|
|
17
18
|
items: TabItem[];
|
|
18
19
|
activeKey: string;
|
|
19
20
|
onChange?: (key: string) => void;
|
|
21
|
+
classNames?: ClassNames<"root" | "header" | "tab" | "content" | "item", {
|
|
22
|
+
activeKey: string;
|
|
23
|
+
}>;
|
|
24
|
+
styles?: Styles<"root" | "header" | "tab" | "content" | "item", {
|
|
25
|
+
activeKey: string;
|
|
26
|
+
}>;
|
|
20
27
|
}
|
|
21
28
|
declare function Tabs(props: TabsProps): JSX.Element;
|
|
22
29
|
//#endregion
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import { createClassStyles } from "../../utils/index.js";
|
|
1
2
|
import { AnimatedGroup } from "../../primitives/animated-group/index.js";
|
|
2
3
|
import tabs_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tabs/tabs.js";
|
|
3
|
-
import { createComponent, delegateEvents, effect, insert, memo, setAttribute, template } from "solid-js/web";
|
|
4
|
-
import { For, createSignal } from "solid-js";
|
|
5
|
-
import { dataIf, mountStyle } from "solid-tiny-utils";
|
|
4
|
+
import { className, createComponent, delegateEvents, effect, insert, memo, setAttribute, style, template } from "solid-js/web";
|
|
5
|
+
import { For as For$1, createSignal } from "solid-js";
|
|
6
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
6
7
|
|
|
7
8
|
//#region src/components/tabs/index.tsx
|
|
8
|
-
var _tmpl$ = /* @__PURE__ */ template(`<div
|
|
9
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div><div></div><div>`), _tmpl$2 = /* @__PURE__ */ template(`<button type=button>`);
|
|
9
10
|
function Tabs(props) {
|
|
10
11
|
mountStyle(tabs_default, "tiny-tabs");
|
|
11
12
|
const [dir, setDir] = createSignal(null);
|
|
12
13
|
const [prev, setPrev] = createSignal("");
|
|
14
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({ activeKey: props.activeKey }));
|
|
13
15
|
return createComponent(AnimatedGroup, {
|
|
14
16
|
get activeKey() {
|
|
15
17
|
return props.activeKey;
|
|
@@ -20,7 +22,7 @@ function Tabs(props) {
|
|
|
20
22
|
children: (state, actions) => {
|
|
21
23
|
return (() => {
|
|
22
24
|
var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
23
|
-
insert(_el$2, createComponent(For, {
|
|
25
|
+
insert(_el$2, createComponent(For$1, {
|
|
24
26
|
get each() {
|
|
25
27
|
return props.items;
|
|
26
28
|
},
|
|
@@ -35,36 +37,62 @@ function Tabs(props) {
|
|
|
35
37
|
};
|
|
36
38
|
insert(_el$4, () => item.label ?? item.key);
|
|
37
39
|
effect((_p$) => {
|
|
38
|
-
var _v$ = dataIf(state.active === item.key), _v$
|
|
39
|
-
_v$ !== _p$.e &&
|
|
40
|
-
_v$
|
|
41
|
-
_v$
|
|
40
|
+
var _v$7 = combineClass("tiny-tabs__tab", classes().tab), _v$8 = dataIf(state.active === item.key), _v$9 = dir() || void 0, _v$0 = dataIf(prev() === item.key && state.active !== item.key), _v$1 = combineStyle({}, styles().tab);
|
|
41
|
+
_v$7 !== _p$.e && className(_el$4, _p$.e = _v$7);
|
|
42
|
+
_v$8 !== _p$.t && setAttribute(_el$4, "data-active", _p$.t = _v$8);
|
|
43
|
+
_v$9 !== _p$.a && setAttribute(_el$4, "data-dir", _p$.a = _v$9);
|
|
44
|
+
_v$0 !== _p$.o && setAttribute(_el$4, "data-prev", _p$.o = _v$0);
|
|
45
|
+
_p$.i = style(_el$4, _v$1, _p$.i);
|
|
42
46
|
return _p$;
|
|
43
47
|
}, {
|
|
44
48
|
e: void 0,
|
|
45
49
|
t: void 0,
|
|
46
|
-
a: void 0
|
|
50
|
+
a: void 0,
|
|
51
|
+
o: void 0,
|
|
52
|
+
i: void 0
|
|
47
53
|
});
|
|
48
54
|
return _el$4;
|
|
49
55
|
})()
|
|
50
56
|
}));
|
|
51
|
-
insert(_el$3, createComponent(For, {
|
|
57
|
+
insert(_el$3, createComponent(For$1, {
|
|
52
58
|
get each() {
|
|
53
59
|
return props.items;
|
|
54
60
|
},
|
|
55
61
|
children: (item) => createComponent(AnimatedGroup.Panel, {
|
|
56
|
-
"class"
|
|
62
|
+
get ["class"]() {
|
|
63
|
+
return combineClass("tiny-tabs__item", classes().item);
|
|
64
|
+
},
|
|
57
65
|
get ["data-dir"]() {
|
|
58
66
|
return dir() || void 0;
|
|
59
67
|
},
|
|
60
68
|
get key() {
|
|
61
69
|
return item.key;
|
|
62
70
|
},
|
|
71
|
+
get style() {
|
|
72
|
+
return combineStyle({}, styles().item);
|
|
73
|
+
},
|
|
63
74
|
get children() {
|
|
64
75
|
return item.content;
|
|
65
76
|
}
|
|
66
77
|
})
|
|
67
78
|
}));
|
|
79
|
+
effect((_p$) => {
|
|
80
|
+
var _v$ = combineClass("tiny-tabs", classes().root), _v$2 = combineStyle({}, styles().root), _v$3 = combineClass("tiny-tabs__header", classes().header), _v$4 = combineStyle({}, styles().header), _v$5 = combineClass("tiny-tabs__content", classes().content), _v$6 = combineStyle({}, styles().content);
|
|
81
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
82
|
+
_p$.t = style(_el$, _v$2, _p$.t);
|
|
83
|
+
_v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
|
|
84
|
+
_p$.o = style(_el$2, _v$4, _p$.o);
|
|
85
|
+
_v$5 !== _p$.i && className(_el$3, _p$.i = _v$5);
|
|
86
|
+
_p$.n = style(_el$3, _v$6, _p$.n);
|
|
87
|
+
return _p$;
|
|
88
|
+
}, {
|
|
89
|
+
e: void 0,
|
|
90
|
+
t: void 0,
|
|
91
|
+
a: void 0,
|
|
92
|
+
o: void 0,
|
|
93
|
+
i: void 0,
|
|
94
|
+
n: void 0
|
|
95
|
+
});
|
|
68
96
|
return _el$;
|
|
69
97
|
})();
|
|
70
98
|
}
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
+
import { createClassStyles } from "../../utils/index.jsx";
|
|
1
2
|
import { AnimatedGroup } from "../../primitives/animated-group/index.jsx";
|
|
2
3
|
import tabs_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tabs/tabs.jsx";
|
|
3
4
|
import { For, createSignal } from "solid-js";
|
|
4
|
-
import { dataIf, mountStyle } from "solid-tiny-utils";
|
|
5
|
+
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
5
6
|
|
|
6
7
|
//#region src/components/tabs/index.tsx
|
|
7
8
|
function Tabs(props) {
|
|
8
9
|
mountStyle(tabs_default, "tiny-tabs");
|
|
9
10
|
const [dir, setDir] = createSignal(null);
|
|
10
11
|
const [prev, setPrev] = createSignal("");
|
|
12
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({ activeKey: props.activeKey }));
|
|
11
13
|
return <AnimatedGroup activeKey={props.activeKey} onChange={props.onChange}>
|
|
12
14
|
{(state, actions) => {
|
|
13
|
-
return <div class="tiny-tabs">
|
|
14
|
-
<div class="tiny-tabs__header">
|
|
15
|
+
return <div class={combineClass("tiny-tabs", classes().root)} style={combineStyle({}, styles().root)}>
|
|
16
|
+
<div class={combineClass("tiny-tabs__header", classes().header)} style={combineStyle({}, styles().header)}>
|
|
15
17
|
<For each={props.items}>
|
|
16
|
-
{(item) => <button class="tiny-tabs__tab" data-active={dataIf(state.active === item.key)} data-dir={dir() || void 0} data-prev={dataIf(prev() === item.key && state.active !== item.key)} onClick={() => {
|
|
18
|
+
{(item) => <button class={combineClass("tiny-tabs__tab", classes().tab)} data-active={dataIf(state.active === item.key)} data-dir={dir() || void 0} data-prev={dataIf(prev() === item.key && state.active !== item.key)} onClick={() => {
|
|
17
19
|
if (state.active === item.key) return;
|
|
18
20
|
const prevIndex = props.items.findIndex((i) => i.key === state.active);
|
|
19
21
|
setDir(props.items.findIndex((i) => i.key === item.key) > prevIndex ? "right" : "left");
|
|
20
22
|
setPrev(state.active);
|
|
21
23
|
actions.setState("active", item.key);
|
|
22
|
-
}} type="button">
|
|
24
|
+
}} style={combineStyle({}, styles().tab)} type="button">
|
|
23
25
|
{item.label ?? item.key}
|
|
24
26
|
</button>}
|
|
25
27
|
</For>
|
|
26
28
|
</div>
|
|
27
|
-
<div class="tiny-tabs__content">
|
|
29
|
+
<div class={combineClass("tiny-tabs__content", classes().content)} style={combineStyle({}, styles().content)}>
|
|
28
30
|
<For each={props.items}>
|
|
29
|
-
{(item) => <AnimatedGroup.Panel class="tiny-tabs__item" data-dir={dir() || void 0} key={item.key}>
|
|
31
|
+
{(item) => <AnimatedGroup.Panel class={combineClass("tiny-tabs__item", classes().item)} data-dir={dir() || void 0} key={item.key} style={combineStyle({}, styles().item)}>
|
|
30
32
|
{item.content}
|
|
31
33
|
</AnimatedGroup.Panel>}
|
|
32
34
|
</For>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createComponentState } from "solid-tiny-context";
|
|
2
|
+
|
|
3
|
+
//#region src/components/toaster/context.ts
|
|
4
|
+
const context = createComponentState({
|
|
5
|
+
state: () => ({
|
|
6
|
+
toasts: [],
|
|
7
|
+
dismissSignal: {},
|
|
8
|
+
pauseRemoval: false,
|
|
9
|
+
defaultDuration: 3e3,
|
|
10
|
+
defaultPosition: "top-center"
|
|
11
|
+
}),
|
|
12
|
+
methods: {
|
|
13
|
+
removeToast(id) {
|
|
14
|
+
this.actions.setState("toasts", (toasts) => toasts.filter((toast) => toast.id !== id));
|
|
15
|
+
this.actions.setState("dismissSignal", id, void 0);
|
|
16
|
+
},
|
|
17
|
+
getToastsByPosition(position) {
|
|
18
|
+
return this.state.toasts.filter((toast) => toast.position === position);
|
|
19
|
+
},
|
|
20
|
+
dismissToast(id) {
|
|
21
|
+
this.actions.setState("dismissSignal", id, true);
|
|
22
|
+
},
|
|
23
|
+
updateToast(id, updatedProps) {
|
|
24
|
+
const index = this.state.toasts.findIndex((toast) => toast.id === id);
|
|
25
|
+
if (index !== -1 && !this.state.dismissSignal[id]) this.actions.setState("toasts", index, updatedProps);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { context };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createComponentState } from "solid-tiny-context";
|
|
2
|
+
|
|
3
|
+
//#region src/components/toaster/context.ts
|
|
4
|
+
const context = createComponentState({
|
|
5
|
+
state: () => ({
|
|
6
|
+
toasts: [],
|
|
7
|
+
dismissSignal: {},
|
|
8
|
+
pauseRemoval: false,
|
|
9
|
+
defaultDuration: 3e3,
|
|
10
|
+
defaultPosition: "top-center"
|
|
11
|
+
}),
|
|
12
|
+
methods: {
|
|
13
|
+
removeToast(id) {
|
|
14
|
+
this.actions.setState("toasts", (toasts) => toasts.filter((toast) => toast.id !== id));
|
|
15
|
+
this.actions.setState("dismissSignal", id, void 0);
|
|
16
|
+
},
|
|
17
|
+
getToastsByPosition(position) {
|
|
18
|
+
return this.state.toasts.filter((toast) => toast.position === position);
|
|
19
|
+
},
|
|
20
|
+
dismissToast(id) {
|
|
21
|
+
this.actions.setState("dismissSignal", id, true);
|
|
22
|
+
},
|
|
23
|
+
updateToast(id, updatedProps) {
|
|
24
|
+
const index = this.state.toasts.findIndex((toast) => toast.id === id);
|
|
25
|
+
if (index !== -1 && !this.state.dismissSignal[id]) this.actions.setState("toasts", index, updatedProps);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { context };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IconCheckboxCircleLine } from "../../icons/checkbox-circle-line.js";
|
|
2
|
+
import { IconErrorWarningLine } from "../../icons/error-warning-line.js";
|
|
3
|
+
import { InformationLine } from "../../icons/information-line.js";
|
|
4
|
+
import { IconLoading } from "../../icons/loading.js";
|
|
5
|
+
import "../../icons/index.js";
|
|
6
|
+
import { createComponent, memo } from "solid-js/web";
|
|
7
|
+
import { Match, Switch } from "solid-js";
|
|
8
|
+
|
|
9
|
+
//#region src/components/toaster/icon.tsx
|
|
10
|
+
function ToasterIcon(props) {
|
|
11
|
+
return createComponent(Switch, { get children() {
|
|
12
|
+
return [
|
|
13
|
+
createComponent(Match, {
|
|
14
|
+
get when() {
|
|
15
|
+
return props.type === "info";
|
|
16
|
+
},
|
|
17
|
+
get children() {
|
|
18
|
+
return createComponent(InformationLine, { size: "20px" });
|
|
19
|
+
}
|
|
20
|
+
}),
|
|
21
|
+
createComponent(Match, {
|
|
22
|
+
get when() {
|
|
23
|
+
return props.type === "success";
|
|
24
|
+
},
|
|
25
|
+
get children() {
|
|
26
|
+
return createComponent(IconCheckboxCircleLine, { size: "20px" });
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
29
|
+
createComponent(Match, {
|
|
30
|
+
get when() {
|
|
31
|
+
return props.type === "error" || props.type === "warning";
|
|
32
|
+
},
|
|
33
|
+
get children() {
|
|
34
|
+
return createComponent(IconErrorWarningLine, { size: "20px" });
|
|
35
|
+
}
|
|
36
|
+
}),
|
|
37
|
+
createComponent(Match, {
|
|
38
|
+
get when() {
|
|
39
|
+
return props.type === "loading";
|
|
40
|
+
},
|
|
41
|
+
get children() {
|
|
42
|
+
return createComponent(IconLoading, { size: "20px" });
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
];
|
|
46
|
+
} });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { ToasterIcon };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IconCheckboxCircleLine } from "../../icons/checkbox-circle-line.jsx";
|
|
2
|
+
import { IconErrorWarningLine } from "../../icons/error-warning-line.jsx";
|
|
3
|
+
import { InformationLine } from "../../icons/information-line.jsx";
|
|
4
|
+
import { IconLoading } from "../../icons/loading.jsx";
|
|
5
|
+
import "../../icons/index.jsx";
|
|
6
|
+
import { Match, Switch } from "solid-js";
|
|
7
|
+
|
|
8
|
+
//#region src/components/toaster/icon.tsx
|
|
9
|
+
function ToasterIcon(props) {
|
|
10
|
+
return <Switch>
|
|
11
|
+
<Match when={props.type === "info"}>
|
|
12
|
+
<InformationLine size="20px" />
|
|
13
|
+
</Match>
|
|
14
|
+
<Match when={props.type === "success"}>
|
|
15
|
+
<IconCheckboxCircleLine size="20px" />
|
|
16
|
+
</Match>
|
|
17
|
+
<Match when={props.type === "error" || props.type === "warning"}>
|
|
18
|
+
<IconErrorWarningLine size="20px" />
|
|
19
|
+
</Match>
|
|
20
|
+
<Match when={props.type === "loading"}>
|
|
21
|
+
<IconLoading size="20px" />
|
|
22
|
+
</Match>
|
|
23
|
+
</Switch>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ToasterIcon };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Flex } from "../../layout/flex/index.js";
|
|
2
|
+
import "../../layout/index.js";
|
|
3
|
+
import { createComponent } from "solid-js/web";
|
|
4
|
+
import { createMemo } from "solid-js";
|
|
5
|
+
|
|
6
|
+
//#region src/components/toaster/locator.tsx
|
|
7
|
+
function ToasterLocator(props) {
|
|
8
|
+
const inset = createMemo(() => {
|
|
9
|
+
switch (props.position) {
|
|
10
|
+
case "top-left": return {
|
|
11
|
+
top: "0",
|
|
12
|
+
left: "0"
|
|
13
|
+
};
|
|
14
|
+
case "top-center": return {
|
|
15
|
+
top: "0",
|
|
16
|
+
left: "50%",
|
|
17
|
+
transform: "translateX(-50%)"
|
|
18
|
+
};
|
|
19
|
+
case "top-right": return {
|
|
20
|
+
top: "0",
|
|
21
|
+
right: "0"
|
|
22
|
+
};
|
|
23
|
+
case "bottom-left": return {
|
|
24
|
+
bottom: "0",
|
|
25
|
+
left: "0"
|
|
26
|
+
};
|
|
27
|
+
case "bottom-center": return {
|
|
28
|
+
bottom: "0",
|
|
29
|
+
left: "50%",
|
|
30
|
+
transform: "translateX(-50%)"
|
|
31
|
+
};
|
|
32
|
+
case "bottom-right": return {
|
|
33
|
+
bottom: "0",
|
|
34
|
+
right: "0"
|
|
35
|
+
};
|
|
36
|
+
default: return {};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const alignItems = createMemo(() => {
|
|
40
|
+
const pos = props.position;
|
|
41
|
+
if (pos.includes("left")) return "flex-start";
|
|
42
|
+
if (pos.includes("center")) return "center";
|
|
43
|
+
if (pos.includes("right")) return "flex-end";
|
|
44
|
+
});
|
|
45
|
+
return createComponent(Flex, {
|
|
46
|
+
get align() {
|
|
47
|
+
return alignItems();
|
|
48
|
+
},
|
|
49
|
+
get reverse() {
|
|
50
|
+
return props.position.startsWith("bottom");
|
|
51
|
+
},
|
|
52
|
+
get style() {
|
|
53
|
+
return {
|
|
54
|
+
position: "absolute",
|
|
55
|
+
width: "fit-content",
|
|
56
|
+
...inset()
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
vertical: true,
|
|
60
|
+
get children() {
|
|
61
|
+
return props.children;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
export { ToasterLocator };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Flex } from "../../layout/flex/index.jsx";
|
|
2
|
+
import "../../layout/index.jsx";
|
|
3
|
+
import { createMemo } from "solid-js";
|
|
4
|
+
|
|
5
|
+
//#region src/components/toaster/locator.tsx
|
|
6
|
+
function ToasterLocator(props) {
|
|
7
|
+
const inset = createMemo(() => {
|
|
8
|
+
switch (props.position) {
|
|
9
|
+
case "top-left": return {
|
|
10
|
+
top: "0",
|
|
11
|
+
left: "0"
|
|
12
|
+
};
|
|
13
|
+
case "top-center": return {
|
|
14
|
+
top: "0",
|
|
15
|
+
left: "50%",
|
|
16
|
+
transform: "translateX(-50%)"
|
|
17
|
+
};
|
|
18
|
+
case "top-right": return {
|
|
19
|
+
top: "0",
|
|
20
|
+
right: "0"
|
|
21
|
+
};
|
|
22
|
+
case "bottom-left": return {
|
|
23
|
+
bottom: "0",
|
|
24
|
+
left: "0"
|
|
25
|
+
};
|
|
26
|
+
case "bottom-center": return {
|
|
27
|
+
bottom: "0",
|
|
28
|
+
left: "50%",
|
|
29
|
+
transform: "translateX(-50%)"
|
|
30
|
+
};
|
|
31
|
+
case "bottom-right": return {
|
|
32
|
+
bottom: "0",
|
|
33
|
+
right: "0"
|
|
34
|
+
};
|
|
35
|
+
default: return {};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const alignItems = createMemo(() => {
|
|
39
|
+
const pos = props.position;
|
|
40
|
+
if (pos.includes("left")) return "flex-start";
|
|
41
|
+
if (pos.includes("center")) return "center";
|
|
42
|
+
if (pos.includes("right")) return "flex-end";
|
|
43
|
+
});
|
|
44
|
+
return <Flex align={alignItems()} reverse={props.position.startsWith("bottom")} style={{
|
|
45
|
+
position: "absolute",
|
|
46
|
+
width: "fit-content",
|
|
47
|
+
...inset()
|
|
48
|
+
}} vertical>
|
|
49
|
+
{props.children}
|
|
50
|
+
</Flex>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { ToasterLocator };
|