solid-tiny-ui 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/alert/alert.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/alert/alert.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/buttons/basic-button/basic-button.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/buttons/basic-button/basic-button.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer-helper.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer-helper.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/drawer/drawer.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/field/field.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/checkbox/checkbox.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/combobox/combobox.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/combobox/combobox.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/number-input/number-input.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/number-input/number-input.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/password-input/password-input.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/password-input/password-input.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/radio-group/radio-group.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/radio-group/radio-group.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/switcher/switcher.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/switcher/switcher.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/text-field/text-field.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/text-field/text-field.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/textarea/textarea.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/textarea/textarea.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/time-picker/time-picker.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/form-components/time-picker/time-picker.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/pagination/pagination.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/pagination/pagination.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/popover/popover.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/popover/popover.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/spin/spin.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/spin/spin.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tabs/tabs.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tabs/tabs.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/toaster/toaster.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/toaster/toaster.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tooltip/tooltip.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/tooltip/tooltip.jsx +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/visually-hidden/visually-hidden.js +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/visually-hidden/visually-hidden.jsx +5 -0
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/root-provider/global.js +1 -1
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/root-provider/global.jsx +1 -1
- package/dist/components/alert/alert.d.ts +25 -0
- package/dist/components/alert/alert.js +186 -0
- package/dist/components/alert/alert.jsx +73 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/alert/index.jsx +1 -0
- package/dist/components/buttons/basic-button/basic-button.d.ts +2 -2
- package/dist/components/buttons/basic-button/basic-button.js +20 -29
- package/dist/components/buttons/basic-button/basic-button.jsx +6 -7
- package/dist/components/buttons/state-button/state-button.d.ts +2 -2
- package/dist/components/buttons/state-button/state-button.js +2 -2
- package/dist/components/buttons/state-button/state-button.jsx +2 -2
- package/dist/components/drawer/helpers.d.ts +25 -0
- package/dist/components/drawer/helpers.js +104 -0
- package/dist/components/drawer/helpers.jsx +60 -0
- package/dist/components/drawer/index.d.ts +42 -0
- package/dist/components/drawer/index.js +95 -0
- package/dist/components/drawer/index.jsx +57 -0
- package/dist/components/field/index.d.ts +10 -0
- package/dist/components/field/index.js +11 -0
- package/dist/components/field/index.jsx +11 -0
- package/dist/components/field/parts.d.ts +24 -0
- package/dist/components/field/parts.js +69 -0
- package/dist/components/field/parts.jsx +41 -0
- package/dist/components/form-components/checkbox/checkbox.d.ts +26 -0
- package/dist/components/form-components/checkbox/checkbox.js +118 -0
- package/dist/components/form-components/checkbox/checkbox.jsx +42 -0
- package/dist/components/form-components/checkbox/index.d.ts +1 -0
- package/dist/components/form-components/checkbox/index.js +1 -0
- package/dist/components/form-components/checkbox/index.jsx +1 -0
- package/dist/components/form-components/checkbox-group/checkbox-group.d.ts +26 -0
- package/dist/components/form-components/checkbox-group/checkbox-group.js +76 -0
- package/dist/components/form-components/checkbox-group/checkbox-group.jsx +34 -0
- package/dist/components/form-components/checkbox-group/index.d.ts +1 -0
- package/dist/components/form-components/checkbox-group/index.js +1 -0
- package/dist/components/form-components/checkbox-group/index.jsx +1 -0
- package/dist/components/{combobox → form-components/combobox}/combobox.d.ts +6 -4
- package/dist/components/{combobox → form-components/combobox}/combobox.js +18 -14
- package/dist/components/{combobox → form-components/combobox}/combobox.jsx +10 -10
- package/dist/components/form-components/index.d.ts +19 -0
- package/dist/components/form-components/index.js +19 -0
- package/dist/components/form-components/index.jsx +19 -0
- package/dist/components/form-components/number-input/index.d.ts +1 -0
- package/dist/components/form-components/number-input/index.js +1 -0
- package/dist/components/form-components/number-input/index.jsx +1 -0
- package/dist/components/form-components/number-input/number-input.d.ts +33 -0
- package/dist/components/form-components/number-input/number-input.js +113 -0
- package/dist/components/form-components/number-input/number-input.jsx +59 -0
- package/dist/components/form-components/password-input/index.d.ts +1 -0
- package/dist/components/form-components/password-input/index.js +1 -0
- package/dist/components/form-components/password-input/index.jsx +1 -0
- package/dist/components/form-components/password-input/password-input.d.ts +31 -0
- package/dist/components/form-components/password-input/password-input.js +95 -0
- package/dist/components/form-components/password-input/password-input.jsx +36 -0
- package/dist/components/form-components/radio-group/index.d.ts +1 -0
- package/dist/components/form-components/radio-group/index.js +1 -0
- package/dist/components/form-components/radio-group/index.jsx +1 -0
- package/dist/components/form-components/radio-group/radio-group.d.ts +26 -0
- package/dist/components/form-components/radio-group/radio-group.js +118 -0
- package/dist/components/form-components/radio-group/radio-group.jsx +45 -0
- package/dist/components/form-components/switcher/index.d.ts +1 -0
- package/dist/components/form-components/switcher/index.js +1 -0
- package/dist/components/form-components/switcher/index.jsx +1 -0
- package/dist/components/form-components/switcher/switcher.d.ts +23 -0
- package/dist/components/form-components/switcher/switcher.js +92 -0
- package/dist/components/form-components/switcher/switcher.jsx +32 -0
- package/dist/components/form-components/text-field/index.d.ts +1 -0
- package/dist/components/form-components/text-field/index.js +1 -0
- package/dist/components/form-components/text-field/index.jsx +1 -0
- package/dist/components/form-components/text-field/text-field.d.ts +30 -0
- package/dist/components/form-components/text-field/text-field.js +112 -0
- package/dist/components/form-components/text-field/text-field.jsx +40 -0
- package/dist/components/{textarea → form-components/textarea}/textarea.d.ts +5 -2
- package/dist/components/form-components/textarea/textarea.js +55 -0
- package/dist/components/form-components/textarea/textarea.jsx +24 -0
- package/dist/components/form-components/time-picker/index.d.ts +27 -0
- package/dist/components/form-components/time-picker/index.js +106 -0
- package/dist/components/form-components/time-picker/index.jsx +44 -0
- package/dist/components/form-components/time-picker/panel.js +185 -0
- package/dist/components/form-components/time-picker/panel.jsx +108 -0
- package/dist/components/form-components/time-picker/trigger.js +68 -0
- package/dist/components/form-components/time-picker/trigger.jsx +37 -0
- package/dist/components/modal/helpers.js +1 -1
- package/dist/components/modal/helpers.jsx +1 -1
- package/dist/components/modal/index.d.ts +5 -8
- package/dist/components/modal/index.js +13 -10
- package/dist/components/modal/index.jsx +7 -4
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/index.jsx +1 -0
- package/dist/components/pagination/pagination.d.ts +32 -0
- package/dist/components/pagination/pagination.js +336 -0
- package/dist/components/pagination/pagination.jsx +104 -0
- package/dist/components/popover/index.js +4 -3
- package/dist/components/popover/index.jsx +2 -1
- package/dist/components/progress/circle-progress.d.ts +7 -0
- package/dist/components/progress/circle-progress.js +33 -14
- package/dist/components/progress/circle-progress.jsx +15 -12
- package/dist/components/progress/line-progress.d.ts +2 -2
- package/dist/components/progress/line-progress.js +6 -5
- package/dist/components/progress/line-progress.jsx +6 -5
- package/dist/components/progress/loading-bar.d.ts +2 -2
- package/dist/components/spin/spin-ring.d.ts +2 -2
- package/dist/components/spin/spin-ring.js +1 -1
- package/dist/components/spin/spin-ring.jsx +1 -1
- package/dist/components/spin/spin.js +8 -7
- package/dist/components/spin/spin.jsx +6 -5
- package/dist/components/tabs/index.d.ts +7 -0
- package/dist/components/tabs/index.js +40 -12
- package/dist/components/tabs/index.jsx +9 -7
- package/dist/components/toaster/context.js +31 -0
- package/dist/components/toaster/context.jsx +31 -0
- package/dist/components/toaster/icon.js +50 -0
- package/dist/components/toaster/icon.jsx +27 -0
- package/dist/components/toaster/index.d.ts +3 -0
- package/dist/components/toaster/index.js +2 -0
- package/dist/components/toaster/index.jsx +2 -0
- package/dist/components/toaster/locator.js +67 -0
- package/dist/components/toaster/locator.jsx +54 -0
- package/dist/components/toaster/one-toaster.js +146 -0
- package/dist/components/toaster/one-toaster.jsx +104 -0
- package/dist/components/toaster/provider.d.ts +11 -0
- package/dist/components/toaster/provider.js +64 -0
- package/dist/components/toaster/provider.jsx +51 -0
- package/dist/components/toaster/type.d.ts +15 -0
- package/dist/components/toaster/use-toaster.d.ts +48 -0
- package/dist/components/toaster/use-toaster.js +72 -0
- package/dist/components/toaster/use-toaster.jsx +72 -0
- package/dist/components/tooltip/tooltip.d.ts +7 -0
- package/dist/components/tooltip/tooltip.js +9 -2
- package/dist/components/tooltip/tooltip.jsx +4 -2
- package/dist/components/visually-hidden/index.js +19 -0
- package/dist/components/visually-hidden/index.jsx +12 -0
- package/dist/icons/arrow-down-s-line.d.ts +3 -2
- package/dist/icons/arrow-down-s-line.js +4 -4
- package/dist/icons/arrow-down-s-line.jsx +2 -2
- package/dist/icons/arrow-left.d.ts +7 -0
- package/dist/icons/arrow-left.js +13 -0
- package/dist/icons/arrow-left.jsx +11 -0
- package/dist/icons/arrow-right.d.ts +7 -0
- package/dist/icons/arrow-right.js +13 -0
- package/dist/icons/arrow-right.jsx +11 -0
- package/dist/icons/check-bold.d.ts +7 -0
- package/dist/icons/check-bold.js +13 -0
- package/dist/icons/check-bold.jsx +11 -0
- package/dist/icons/check-line.d.ts +7 -0
- package/dist/icons/check-line.js +13 -0
- package/dist/icons/check-line.jsx +11 -0
- package/dist/icons/checkbox-circle-line.d.ts +7 -0
- package/dist/icons/checkbox-circle-line.js +13 -0
- package/dist/icons/checkbox-circle-line.jsx +11 -0
- package/dist/icons/close-line.d.ts +3 -2
- package/dist/icons/close-line.js +4 -4
- package/dist/icons/close-line.jsx +2 -2
- package/dist/icons/common.d.ts +9 -0
- package/dist/icons/common.js +12 -2
- package/dist/icons/common.jsx +1 -1
- package/dist/icons/ellipsis.d.ts +7 -0
- package/dist/icons/ellipsis.js +13 -0
- package/dist/icons/ellipsis.jsx +11 -0
- package/dist/icons/error-warning-line.d.ts +7 -0
- package/dist/icons/error-warning-line.js +13 -0
- package/dist/icons/error-warning-line.jsx +11 -0
- package/dist/icons/eye-line.d.ts +7 -0
- package/dist/icons/eye-line.js +13 -0
- package/dist/icons/eye-line.jsx +11 -0
- package/dist/icons/eye-off-line.d.ts +7 -0
- package/dist/icons/eye-off-line.js +13 -0
- package/dist/icons/eye-off-line.jsx +11 -0
- package/dist/icons/index.d.ts +13 -1
- package/dist/icons/index.js +13 -1
- package/dist/icons/index.jsx +13 -1
- package/dist/icons/information-line.d.ts +7 -0
- package/dist/icons/information-line.js +13 -0
- package/dist/icons/information-line.jsx +11 -0
- package/dist/icons/loading.d.ts +13 -0
- package/dist/icons/loading.js +18 -0
- package/dist/icons/loading.jsx +19 -0
- package/dist/icons/subtract.d.ts +7 -0
- package/dist/icons/subtract.js +13 -0
- package/dist/icons/subtract.jsx +11 -0
- package/dist/index.d.ts +23 -8
- package/dist/index.js +23 -9
- package/dist/index.jsx +23 -9
- package/dist/layout/flex/index.d.ts +5 -4
- package/dist/layout/flex/index.js +25 -15
- package/dist/layout/flex/index.jsx +23 -10
- package/dist/layout/index.d.ts +1 -2
- package/dist/layout/index.js +0 -1
- package/dist/layout/index.jsx +0 -1
- package/dist/primitives/animated-group/context.d.ts +9 -9
- package/dist/primitives/animated-group/panel.js +14 -13
- package/dist/primitives/animated-group/panel.jsx +7 -6
- package/dist/primitives/animated-group/root.d.ts +4 -4
- package/dist/primitives/animated-group/root.js +2 -3
- package/dist/primitives/animated-group/root.jsx +2 -3
- package/dist/primitives/checkbox/context.d.ts +63 -0
- package/dist/primitives/checkbox/context.js +13 -0
- package/dist/primitives/checkbox/context.jsx +13 -0
- package/dist/primitives/checkbox/index.d.ts +26 -0
- package/dist/primitives/checkbox/index.js +13 -0
- package/dist/primitives/checkbox/index.jsx +13 -0
- package/dist/primitives/checkbox/parts.d.ts +10 -0
- package/dist/primitives/checkbox/parts.js +62 -0
- package/dist/primitives/checkbox/parts.jsx +28 -0
- package/dist/primitives/checkbox/root.d.ts +16 -0
- package/dist/primitives/checkbox/root.js +25 -0
- package/dist/primitives/checkbox/root.jsx +24 -0
- package/dist/primitives/checkbox-group/context.js +21 -0
- package/dist/primitives/checkbox-group/context.jsx +21 -0
- package/dist/primitives/checkbox-group/index.js +12 -0
- package/dist/primitives/checkbox-group/index.jsx +12 -0
- package/dist/primitives/checkbox-group/parts.js +33 -0
- package/dist/primitives/checkbox-group/parts.jsx +21 -0
- package/dist/primitives/checkbox-group/root.js +24 -0
- package/dist/primitives/checkbox-group/root.jsx +23 -0
- package/dist/primitives/fake-scroll-list/context.js +30 -0
- package/dist/primitives/fake-scroll-list/context.jsx +30 -0
- package/dist/primitives/fake-scroll-list/index.d.ts +52 -0
- package/dist/primitives/fake-scroll-list/index.js +36 -0
- package/dist/primitives/fake-scroll-list/index.jsx +36 -0
- package/dist/primitives/fake-scroll-list/item.d.ts +11 -0
- package/dist/primitives/fake-scroll-list/item.js +30 -0
- package/dist/primitives/fake-scroll-list/item.jsx +13 -0
- package/dist/primitives/fake-scroll-list/listbox.d.ts +8 -0
- package/dist/primitives/fake-scroll-list/listbox.js +72 -0
- package/dist/primitives/fake-scroll-list/listbox.jsx +61 -0
- package/dist/primitives/fake-scroll-list/root.d.ts +15 -0
- package/dist/primitives/fake-scroll-list/root.js +52 -0
- package/dist/primitives/fake-scroll-list/root.jsx +40 -0
- package/dist/primitives/floating/content.js +12 -11
- package/dist/primitives/floating/content.jsx +7 -6
- package/dist/primitives/floating/context.d.ts +10 -9
- package/dist/primitives/floating/context.js +1 -1
- package/dist/primitives/floating/context.jsx +1 -1
- package/dist/primitives/floating/index.d.ts +3 -2
- package/dist/primitives/floating/trigger.js +1 -1
- package/dist/primitives/floating/trigger.jsx +1 -1
- package/dist/primitives/floating/types.d.ts +2 -1
- package/dist/primitives/index.d.ts +8 -1
- package/dist/primitives/index.js +8 -3
- package/dist/primitives/index.jsx +8 -3
- package/dist/primitives/listbox/listbox.d.ts +3 -3
- package/dist/primitives/modal/content.d.ts +3 -3
- package/dist/primitives/modal/content.js +2 -3
- package/dist/primitives/modal/content.jsx +2 -3
- package/dist/primitives/modal/context.d.ts +16 -29
- package/dist/primitives/modal/context.js +2 -4
- package/dist/primitives/modal/context.jsx +2 -4
- package/dist/primitives/modal/index.d.ts +5 -8
- package/dist/primitives/modal/portal.js +1 -1
- package/dist/primitives/modal/portal.jsx +1 -1
- package/dist/primitives/modal/root.d.ts +2 -3
- package/dist/primitives/modal/root.js +10 -10
- package/dist/primitives/modal/root.jsx +10 -10
- package/dist/primitives/pagination/context.d.ts +89 -0
- package/dist/primitives/pagination/context.js +88 -0
- package/dist/primitives/pagination/context.jsx +88 -0
- package/dist/primitives/pagination/index.d.ts +33 -0
- package/dist/primitives/pagination/index.js +12 -0
- package/dist/primitives/pagination/index.jsx +12 -0
- package/dist/primitives/pagination/items.d.ts +9 -0
- package/dist/primitives/pagination/items.js +19 -0
- package/dist/primitives/pagination/items.jsx +11 -0
- package/dist/primitives/pagination/root.d.ts +16 -0
- package/dist/primitives/pagination/root.js +24 -0
- package/dist/primitives/pagination/root.jsx +23 -0
- package/dist/primitives/radio-group/context.d.ts +91 -0
- package/dist/primitives/radio-group/context.js +16 -0
- package/dist/primitives/radio-group/context.jsx +16 -0
- package/dist/primitives/radio-group/index.d.ts +34 -0
- package/dist/primitives/radio-group/index.js +15 -0
- package/dist/primitives/radio-group/index.jsx +15 -0
- package/dist/primitives/radio-group/item.d.ts +19 -0
- package/dist/primitives/radio-group/item.js +74 -0
- package/dist/primitives/radio-group/item.jsx +44 -0
- package/dist/primitives/radio-group/root.d.ts +14 -0
- package/dist/primitives/radio-group/root.js +23 -0
- package/dist/primitives/radio-group/root.jsx +22 -0
- package/dist/root-provider/context.d.ts +16 -9
- package/dist/root-provider/context.js +4 -1
- package/dist/root-provider/context.jsx +4 -1
- package/dist/root-provider/gen-colors.js +138 -0
- package/dist/root-provider/gen-colors.jsx +138 -0
- package/dist/root-provider/provider.js +4 -3
- package/dist/root-provider/provider.jsx +3 -2
- package/dist/utils/duration.js +10 -0
- package/dist/utils/duration.jsx +10 -0
- package/dist/utils/index.js +1 -4
- package/dist/utils/index.jsx +1 -4
- package/dist/utils/types.d.ts +4 -8
- package/package.json +9 -8
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/combobox/combobox.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/combobox/combobox.jsx +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/input/input.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/input/input.jsx +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/textarea/textarea.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/textarea/textarea.jsx +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/layout/input-compact/input-compact.js +0 -5
- package/dist/_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/layout/input-compact/input-compact.jsx +0 -5
- package/dist/components/input/index.d.ts +0 -1
- package/dist/components/input/index.js +0 -1
- package/dist/components/input/index.jsx +0 -1
- package/dist/components/input/input.d.ts +0 -15
- package/dist/components/input/input.js +0 -44
- package/dist/components/input/input.jsx +0 -16
- package/dist/components/textarea/textarea.js +0 -49
- package/dist/components/textarea/textarea.jsx +0 -24
- package/dist/layout/input-compact/index.d.ts +0 -13
- package/dist/layout/input-compact/index.js +0 -42
- package/dist/layout/input-compact/index.jsx +0 -32
- package/dist/root-provider/gen-brand.js +0 -55
- package/dist/root-provider/gen-brand.jsx +0 -55
- package/dist/utils/types.js +0 -7
- package/dist/utils/types.jsx +0 -7
- /package/dist/components/{combobox → form-components/combobox}/index.d.ts +0 -0
- /package/dist/components/{combobox → form-components/combobox}/index.js +0 -0
- /package/dist/components/{combobox → form-components/combobox}/index.jsx +0 -0
- /package/dist/components/{textarea → form-components/textarea}/index.d.ts +0 -0
- /package/dist/components/{textarea → form-components/textarea}/index.js +0 -0
- /package/dist/components/{textarea → form-components/textarea}/index.jsx +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { VisuallyHidden } from "../../visually-hidden/index.jsx";
|
|
2
|
+
import { Show, createMemo } from "solid-js";
|
|
3
|
+
import { combineClass, combineStyle, dataIf } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/components/form-components/time-picker/trigger.tsx
|
|
6
|
+
function TimeTrigger(props) {
|
|
7
|
+
const typeIndex = createMemo(() => [
|
|
8
|
+
"hour",
|
|
9
|
+
"minute",
|
|
10
|
+
"second"
|
|
11
|
+
].indexOf(props.type));
|
|
12
|
+
const toStr = (num) => {
|
|
13
|
+
if (num === null) return "";
|
|
14
|
+
return num.toString().padStart(2, "0");
|
|
15
|
+
};
|
|
16
|
+
return <button class={combineClass("tiny-time-picker-trigger tiny-time-picker-trigger-vars", props.class)} data-disabled={dataIf(props.disabled)} data-size={props.size} style={combineStyle({}, props.style)} type="button">
|
|
17
|
+
<VisuallyHidden>
|
|
18
|
+
<input disabled={props.disabled} readonly tabIndex={-1} type="text" />
|
|
19
|
+
</VisuallyHidden>
|
|
20
|
+
<div class="tiny-time-picker-trigger__item" data-empty={dataIf(props.hour === null)}>
|
|
21
|
+
{toStr(props.hour) || "hh"}
|
|
22
|
+
</div>
|
|
23
|
+
<Show when={typeIndex() > 0}>
|
|
24
|
+
<div class="tiny-time-picker-trigger__item" data-empty={dataIf(props.minute === null)}>
|
|
25
|
+
{toStr(props.minute) || "mm"}
|
|
26
|
+
</div>
|
|
27
|
+
</Show>
|
|
28
|
+
<Show when={typeIndex() > 1}>
|
|
29
|
+
<div class="tiny-time-picker-trigger__item" data-empty={dataIf(props.second === null)}>
|
|
30
|
+
{toStr(props.second) || "ss"}
|
|
31
|
+
</div>
|
|
32
|
+
</Show>
|
|
33
|
+
</button>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { TimeTrigger };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CloseLine } from "../../icons/close-line.js";
|
|
2
2
|
import { ModalCore } from "../../primitives/modal/index.js";
|
|
3
|
-
import modal_helper_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.js";
|
|
4
3
|
import { Flex } from "../../layout/flex/index.js";
|
|
5
4
|
import "../../layout/index.js";
|
|
6
5
|
import "../../primitives/index.js";
|
|
6
|
+
import modal_helper_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.js";
|
|
7
7
|
import { createComponent, insert, memo, mergeProps, template } from "solid-js/web";
|
|
8
8
|
import { Show, onMount, splitProps } from "solid-js";
|
|
9
9
|
import { combineClass, combineStyle, makeEventListener, mountStyle } from "solid-tiny-utils";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CloseLine } from "../../icons/close-line.jsx";
|
|
2
2
|
import { ModalCore } from "../../primitives/modal/index.jsx";
|
|
3
|
-
import modal_helper_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.jsx";
|
|
4
3
|
import { Flex } from "../../layout/flex/index.jsx";
|
|
5
4
|
import "../../layout/index.jsx";
|
|
6
5
|
import "../../primitives/index.jsx";
|
|
6
|
+
import modal_helper_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal-helper.jsx";
|
|
7
7
|
import { Show, onMount, splitProps } from "solid-js";
|
|
8
8
|
import { combineClass, combineStyle, makeEventListener, mountStyle } from "solid-tiny-utils";
|
|
9
9
|
import { Ref } from "@solid-primitives/refs";
|
|
@@ -3,7 +3,8 @@ import { Trigger } from "../../primitives/modal/trigger.js";
|
|
|
3
3
|
import { ModalCore } from "../../primitives/modal/index.js";
|
|
4
4
|
import { ModalHelper } from "./helpers.js";
|
|
5
5
|
import { JSX } from "solid-js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as solid_tiny_utils2 from "solid-tiny-utils";
|
|
7
|
+
import * as solid_js_store10 from "solid-js/store";
|
|
7
8
|
|
|
8
9
|
//#region src/components/modal/index.d.ts
|
|
9
10
|
declare function Root(props: Parameters<typeof ModalCore>[0]): JSX.Element;
|
|
@@ -17,24 +18,20 @@ declare const Modal: typeof Root & {
|
|
|
17
18
|
Trigger: typeof Trigger;
|
|
18
19
|
Content: typeof Content;
|
|
19
20
|
useContext: () => [Readonly<{
|
|
20
|
-
id: string;
|
|
21
21
|
open: boolean;
|
|
22
22
|
refContent: HTMLElement | null;
|
|
23
|
-
preventScroll: boolean;
|
|
24
23
|
closeOnClickMask: boolean;
|
|
25
24
|
closeOnEsc: boolean;
|
|
26
25
|
} & {}>, Omit<{}, "setState"> & {
|
|
27
|
-
setState:
|
|
28
|
-
id: string;
|
|
26
|
+
setState: solid_js_store10.SetStoreFunction<{
|
|
29
27
|
open: boolean;
|
|
30
28
|
refContent: HTMLElement | null;
|
|
31
|
-
preventScroll: boolean;
|
|
32
29
|
closeOnClickMask: boolean;
|
|
33
30
|
closeOnEsc: boolean;
|
|
34
31
|
}>;
|
|
35
32
|
}, {
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
isMounted: () => boolean;
|
|
34
|
+
presencePhase: () => solid_tiny_utils2.PresencePhase;
|
|
38
35
|
}];
|
|
39
36
|
};
|
|
40
37
|
//#endregion
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createClassStyles } from "../../utils/index.js";
|
|
2
|
-
import modal_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.js";
|
|
3
2
|
import { ModalCore } from "../../primitives/modal/index.js";
|
|
3
|
+
import modal_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.js";
|
|
4
4
|
import { ModalHelper } from "./helpers.js";
|
|
5
5
|
import { createComponent } from "solid-js/web";
|
|
6
|
+
import { createMemo } from "solid-js";
|
|
6
7
|
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
7
8
|
|
|
8
9
|
//#region src/components/modal/index.tsx
|
|
@@ -11,18 +12,20 @@ function Root(props) {
|
|
|
11
12
|
}
|
|
12
13
|
function Content(props) {
|
|
13
14
|
mountStyle(modal_default, "tiny-modal");
|
|
14
|
-
const [, , {
|
|
15
|
+
const [, , { presencePhase }] = ModalCore.useContext();
|
|
15
16
|
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles);
|
|
17
|
+
const isEntering = createMemo(() => ["pre-enter", "entering"].includes(presencePhase()));
|
|
18
|
+
const isExiting = createMemo(() => ["exiting"].includes(presencePhase()));
|
|
16
19
|
return createComponent(ModalCore.Portal, { get children() {
|
|
17
20
|
return [createComponent(ModalCore.Mask, {
|
|
18
21
|
get ["class"]() {
|
|
19
22
|
return combineClass("tiny-modal__mask", classes().mask);
|
|
20
23
|
},
|
|
21
|
-
get ["data-
|
|
22
|
-
return dataIf(
|
|
24
|
+
get ["data-entering"]() {
|
|
25
|
+
return dataIf(isEntering());
|
|
23
26
|
},
|
|
24
|
-
get ["data-
|
|
25
|
-
return dataIf(
|
|
27
|
+
get ["data-exiting"]() {
|
|
28
|
+
return dataIf(isExiting());
|
|
26
29
|
},
|
|
27
30
|
get style() {
|
|
28
31
|
return styles().mask;
|
|
@@ -39,11 +42,11 @@ function Content(props) {
|
|
|
39
42
|
get ["class"]() {
|
|
40
43
|
return combineClass("tiny-modal__content", classes().content);
|
|
41
44
|
},
|
|
42
|
-
get ["data-
|
|
43
|
-
return dataIf(
|
|
45
|
+
get ["data-entering"]() {
|
|
46
|
+
return dataIf(isEntering());
|
|
44
47
|
},
|
|
45
|
-
get ["data-
|
|
46
|
-
return dataIf(
|
|
48
|
+
get ["data-exiting"]() {
|
|
49
|
+
return dataIf(isExiting());
|
|
47
50
|
},
|
|
48
51
|
get style() {
|
|
49
52
|
return combineStyle({ width: props.width || "500px" }, styles().content);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createClassStyles } from "../../utils/index.jsx";
|
|
2
|
-
import modal_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.jsx";
|
|
3
2
|
import { ModalCore } from "../../primitives/modal/index.jsx";
|
|
3
|
+
import modal_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/modal/modal.jsx";
|
|
4
4
|
import { ModalHelper } from "./helpers.jsx";
|
|
5
|
+
import { createMemo } from "solid-js";
|
|
5
6
|
import { combineClass, combineStyle, dataIf, mountStyle } from "solid-tiny-utils";
|
|
6
7
|
|
|
7
8
|
//#region src/components/modal/index.tsx
|
|
@@ -10,12 +11,14 @@ function Root(props) {
|
|
|
10
11
|
}
|
|
11
12
|
function Content(props) {
|
|
12
13
|
mountStyle(modal_default, "tiny-modal");
|
|
13
|
-
const [, , {
|
|
14
|
+
const [, , { presencePhase }] = ModalCore.useContext();
|
|
14
15
|
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles);
|
|
16
|
+
const isEntering = createMemo(() => ["pre-enter", "entering"].includes(presencePhase()));
|
|
17
|
+
const isExiting = createMemo(() => ["exiting"].includes(presencePhase()));
|
|
15
18
|
return <ModalCore.Portal>
|
|
16
|
-
<ModalCore.Mask class={combineClass("tiny-modal__mask", classes().mask)} data-
|
|
19
|
+
<ModalCore.Mask class={combineClass("tiny-modal__mask", classes().mask)} data-entering={dataIf(isEntering())} data-exiting={dataIf(isExiting())} style={styles().mask} />
|
|
17
20
|
<ModalCore.ContentWrapper class={combineClass("tiny-modal__wrapper tiny-modal-vars", classes().wrapper)} style={combineStyle({}, styles().wrapper)}>
|
|
18
|
-
<ModalCore.Content class={combineClass("tiny-modal__content", classes().content)} data-
|
|
21
|
+
<ModalCore.Content class={combineClass("tiny-modal__content", classes().content)} data-entering={dataIf(isEntering())} data-exiting={dataIf(isExiting())} style={combineStyle({ width: props.width || "500px" }, styles().content)}>
|
|
19
22
|
{props.children}
|
|
20
23
|
</ModalCore.Content>
|
|
21
24
|
</ModalCore.ContentWrapper>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Pagination, PaginationSize } from "./pagination.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Pagination } from "./pagination.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Pagination } from "./pagination.jsx";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ClassNames, Styles } from "../../utils/types.js";
|
|
2
|
+
import { JSX } from "solid-js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/pagination/pagination.d.ts
|
|
5
|
+
type PaginationSize = "small" | "middle" | "large";
|
|
6
|
+
/**
|
|
7
|
+
* A pagination component for navigating through pages of content.
|
|
8
|
+
*
|
|
9
|
+
* maxVisiblePages: Maximum number of page buttons to display (default: 7, minimum: 5).
|
|
10
|
+
*/
|
|
11
|
+
declare function Pagination(props: {
|
|
12
|
+
current?: number;
|
|
13
|
+
total?: number;
|
|
14
|
+
pageSize?: number;
|
|
15
|
+
onChange?: (page: number) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
maxVisiblePages?: number;
|
|
18
|
+
size?: PaginationSize;
|
|
19
|
+
dense?: boolean;
|
|
20
|
+
classNames?: ClassNames<"root" | "prev" | "items" | "item" | "separator" | "next" | "input", {
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
size: PaginationSize;
|
|
23
|
+
dense: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
styles?: Styles<"root" | "prev" | "items" | "item" | "separator" | "next" | "input", {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
size: PaginationSize;
|
|
28
|
+
dense: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
}): JSX.Element;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Pagination, PaginationSize };
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { IconArrowLeft } from "../../icons/arrow-left.js";
|
|
2
|
+
import { IconArrowRight } from "../../icons/arrow-right.js";
|
|
3
|
+
import { IconEllipsis } from "../../icons/ellipsis.js";
|
|
4
|
+
import "../../icons/index.js";
|
|
5
|
+
import { createClassStyles } from "../../utils/index.js";
|
|
6
|
+
import { PaginationCore } from "../../primitives/pagination/index.js";
|
|
7
|
+
import "../../primitives/index.js";
|
|
8
|
+
import pagination_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/pagination/pagination.js";
|
|
9
|
+
import { addEventListener, className, createComponent, delegateEvents, effect, insert, setAttribute, style, template, use } from "solid-js/web";
|
|
10
|
+
import { Show, createSignal, onMount } from "solid-js";
|
|
11
|
+
import { combineClass, combineStyle, createWatch, dataIf, makeEventListener, mountStyle } from "solid-tiny-utils";
|
|
12
|
+
import { Ref } from "@solid-primitives/refs";
|
|
13
|
+
|
|
14
|
+
//#region src/components/pagination/pagination.tsx
|
|
15
|
+
var _tmpl$ = /* @__PURE__ */ template(`<input min=1 type=number>`), _tmpl$2 = /* @__PURE__ */ template(`<button type=button>`), _tmpl$3 = /* @__PURE__ */ template(`<span>/`), _tmpl$4 = /* @__PURE__ */ template(`<div><button type=button></button><div></div><button type=button>`);
|
|
16
|
+
function GoToPageInput(props) {
|
|
17
|
+
let ref;
|
|
18
|
+
onMount(() => {
|
|
19
|
+
ref.focus();
|
|
20
|
+
});
|
|
21
|
+
const handleKeyDown = (e) => {
|
|
22
|
+
if (e.key === "Enter") ref.blur();
|
|
23
|
+
};
|
|
24
|
+
return (() => {
|
|
25
|
+
var _el$ = _tmpl$();
|
|
26
|
+
var _ref$ = ref;
|
|
27
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
|
|
28
|
+
_el$.$$keydown = handleKeyDown;
|
|
29
|
+
addEventListener(_el$, "blur", props.onBlur);
|
|
30
|
+
effect((_p$) => {
|
|
31
|
+
var _v$ = combineClass("tiny-pagination-input", props.class), _v$2 = combineStyle({ "--width": `${props.width}px` }, props.style);
|
|
32
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
33
|
+
_p$.t = style(_el$, _v$2, _p$.t);
|
|
34
|
+
return _p$;
|
|
35
|
+
}, {
|
|
36
|
+
e: void 0,
|
|
37
|
+
t: void 0
|
|
38
|
+
});
|
|
39
|
+
effect(() => _el$.value = props.value);
|
|
40
|
+
return _el$;
|
|
41
|
+
})();
|
|
42
|
+
}
|
|
43
|
+
function GoToPageEditable(props) {
|
|
44
|
+
const [editable, setEditable] = createSignal(false);
|
|
45
|
+
const [ref, setRef] = createSignal(null);
|
|
46
|
+
const [w, setW] = createSignal(0);
|
|
47
|
+
createWatch(ref, (el) => {
|
|
48
|
+
if (!el) return;
|
|
49
|
+
makeEventListener(el, "click", () => {
|
|
50
|
+
setW(el.offsetWidth);
|
|
51
|
+
setEditable(true);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
return createComponent(Show, {
|
|
55
|
+
get fallback() {
|
|
56
|
+
return createComponent(Ref, {
|
|
57
|
+
ref: setRef,
|
|
58
|
+
get children() {
|
|
59
|
+
return props.children;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
get when() {
|
|
64
|
+
return editable();
|
|
65
|
+
},
|
|
66
|
+
get children() {
|
|
67
|
+
return createComponent(GoToPageInput, {
|
|
68
|
+
get ["class"]() {
|
|
69
|
+
return props.inputClass;
|
|
70
|
+
},
|
|
71
|
+
onBlur: (e) => {
|
|
72
|
+
const tryTo = e.currentTarget.valueAsNumber;
|
|
73
|
+
if (tryTo > 0 && tryTo !== props.current) props.gotoPage(tryTo);
|
|
74
|
+
setEditable(false);
|
|
75
|
+
},
|
|
76
|
+
get style() {
|
|
77
|
+
return props.inputStyle;
|
|
78
|
+
},
|
|
79
|
+
get value() {
|
|
80
|
+
return props.current;
|
|
81
|
+
},
|
|
82
|
+
get width() {
|
|
83
|
+
return w();
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function DensePages(props) {
|
|
90
|
+
return [
|
|
91
|
+
createComponent(GoToPageEditable, {
|
|
92
|
+
get current() {
|
|
93
|
+
return props.current;
|
|
94
|
+
},
|
|
95
|
+
get disabled() {
|
|
96
|
+
return props.disabled;
|
|
97
|
+
},
|
|
98
|
+
get gotoPage() {
|
|
99
|
+
return props.onPageClick;
|
|
100
|
+
},
|
|
101
|
+
get inputClass() {
|
|
102
|
+
return props.inputClass;
|
|
103
|
+
},
|
|
104
|
+
get inputStyle() {
|
|
105
|
+
return props.inputStyle;
|
|
106
|
+
},
|
|
107
|
+
get children() {
|
|
108
|
+
var _el$2 = _tmpl$2();
|
|
109
|
+
insert(_el$2, () => props.current);
|
|
110
|
+
effect((_p$) => {
|
|
111
|
+
var _v$3 = combineClass("tiny-pagination-item", props.itemClass), _v$4 = props.disabled, _v$5 = combineStyle({}, props.itemStyle);
|
|
112
|
+
_v$3 !== _p$.e && className(_el$2, _p$.e = _v$3);
|
|
113
|
+
_v$4 !== _p$.t && (_el$2.disabled = _p$.t = _v$4);
|
|
114
|
+
_p$.a = style(_el$2, _v$5, _p$.a);
|
|
115
|
+
return _p$;
|
|
116
|
+
}, {
|
|
117
|
+
e: void 0,
|
|
118
|
+
t: void 0,
|
|
119
|
+
a: void 0
|
|
120
|
+
});
|
|
121
|
+
return _el$2;
|
|
122
|
+
}
|
|
123
|
+
}),
|
|
124
|
+
(() => {
|
|
125
|
+
var _el$3 = _tmpl$3();
|
|
126
|
+
effect((_p$) => {
|
|
127
|
+
var _v$6 = combineClass("tiny-pagination-separator", props.separatorClass), _v$7 = dataIf(props.disabled), _v$8 = combineStyle({}, props.separatorStyle);
|
|
128
|
+
_v$6 !== _p$.e && className(_el$3, _p$.e = _v$6);
|
|
129
|
+
_v$7 !== _p$.t && setAttribute(_el$3, "data-disabled", _p$.t = _v$7);
|
|
130
|
+
_p$.a = style(_el$3, _v$8, _p$.a);
|
|
131
|
+
return _p$;
|
|
132
|
+
}, {
|
|
133
|
+
e: void 0,
|
|
134
|
+
t: void 0,
|
|
135
|
+
a: void 0
|
|
136
|
+
});
|
|
137
|
+
return _el$3;
|
|
138
|
+
})(),
|
|
139
|
+
(() => {
|
|
140
|
+
var _el$4 = _tmpl$2();
|
|
141
|
+
_el$4.$$click = () => props.onPageClick(props.totalPages);
|
|
142
|
+
insert(_el$4, () => props.totalPages);
|
|
143
|
+
effect((_p$) => {
|
|
144
|
+
var _v$9 = combineClass("tiny-pagination-item", props.itemClass), _v$0 = props.disabled, _v$1 = combineStyle({}, props.itemStyle);
|
|
145
|
+
_v$9 !== _p$.e && className(_el$4, _p$.e = _v$9);
|
|
146
|
+
_v$0 !== _p$.t && (_el$4.disabled = _p$.t = _v$0);
|
|
147
|
+
_p$.a = style(_el$4, _v$1, _p$.a);
|
|
148
|
+
return _p$;
|
|
149
|
+
}, {
|
|
150
|
+
e: void 0,
|
|
151
|
+
t: void 0,
|
|
152
|
+
a: void 0
|
|
153
|
+
});
|
|
154
|
+
return _el$4;
|
|
155
|
+
})()
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* A pagination component for navigating through pages of content.
|
|
160
|
+
*
|
|
161
|
+
* maxVisiblePages: Maximum number of page buttons to display (default: 7, minimum: 5).
|
|
162
|
+
*/
|
|
163
|
+
function Pagination(props) {
|
|
164
|
+
mountStyle(pagination_default, "tiny-pagination");
|
|
165
|
+
const size = () => props.size ?? "middle";
|
|
166
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
167
|
+
disabled: props.disabled ?? false,
|
|
168
|
+
size: size(),
|
|
169
|
+
dense: props.dense ?? false
|
|
170
|
+
}));
|
|
171
|
+
return createComponent(PaginationCore, {
|
|
172
|
+
get current() {
|
|
173
|
+
return props.current;
|
|
174
|
+
},
|
|
175
|
+
get disabled() {
|
|
176
|
+
return props.disabled;
|
|
177
|
+
},
|
|
178
|
+
get maxVisiblePages() {
|
|
179
|
+
return props.maxVisiblePages;
|
|
180
|
+
},
|
|
181
|
+
get onChange() {
|
|
182
|
+
return props.onChange;
|
|
183
|
+
},
|
|
184
|
+
get pageSize() {
|
|
185
|
+
return props.pageSize;
|
|
186
|
+
},
|
|
187
|
+
get total() {
|
|
188
|
+
return props.total;
|
|
189
|
+
},
|
|
190
|
+
children: (state, actions) => {
|
|
191
|
+
return (() => {
|
|
192
|
+
var _el$5 = _tmpl$4(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling;
|
|
193
|
+
addEventListener(_el$6, "click", actions.prev, true);
|
|
194
|
+
insert(_el$6, createComponent(IconArrowLeft, {}));
|
|
195
|
+
insert(_el$7, createComponent(Show, {
|
|
196
|
+
get fallback() {
|
|
197
|
+
return createComponent(DensePages, {
|
|
198
|
+
get current() {
|
|
199
|
+
return state.current;
|
|
200
|
+
},
|
|
201
|
+
get disabled() {
|
|
202
|
+
return state.disabled;
|
|
203
|
+
},
|
|
204
|
+
get inputClass() {
|
|
205
|
+
return classes().input;
|
|
206
|
+
},
|
|
207
|
+
get inputStyle() {
|
|
208
|
+
return styles().input;
|
|
209
|
+
},
|
|
210
|
+
get itemClass() {
|
|
211
|
+
return classes().item;
|
|
212
|
+
},
|
|
213
|
+
get itemStyle() {
|
|
214
|
+
return styles().item;
|
|
215
|
+
},
|
|
216
|
+
get onPageClick() {
|
|
217
|
+
return actions.gotoPage;
|
|
218
|
+
},
|
|
219
|
+
get separatorClass() {
|
|
220
|
+
return classes().separator;
|
|
221
|
+
},
|
|
222
|
+
get separatorStyle() {
|
|
223
|
+
return styles().separator;
|
|
224
|
+
},
|
|
225
|
+
get totalPages() {
|
|
226
|
+
return state.totalPages;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
get when() {
|
|
231
|
+
return !props.dense;
|
|
232
|
+
},
|
|
233
|
+
get children() {
|
|
234
|
+
return createComponent(PaginationCore.Items, { render: (page) => {
|
|
235
|
+
return createComponent(Show, {
|
|
236
|
+
get fallback() {
|
|
237
|
+
return createComponent(GoToPageEditable, {
|
|
238
|
+
get current() {
|
|
239
|
+
return state.current;
|
|
240
|
+
},
|
|
241
|
+
get disabled() {
|
|
242
|
+
return state.disabled;
|
|
243
|
+
},
|
|
244
|
+
get gotoPage() {
|
|
245
|
+
return actions.gotoPage;
|
|
246
|
+
},
|
|
247
|
+
get inputClass() {
|
|
248
|
+
return classes().input;
|
|
249
|
+
},
|
|
250
|
+
get inputStyle() {
|
|
251
|
+
return styles().input;
|
|
252
|
+
},
|
|
253
|
+
get children() {
|
|
254
|
+
var _el$0 = _tmpl$2();
|
|
255
|
+
insert(_el$0, createComponent(IconEllipsis, {}));
|
|
256
|
+
effect((_p$) => {
|
|
257
|
+
var _v$26 = combineClass("tiny-pagination-item", classes().item), _v$27 = state.disabled, _v$28 = combineStyle({}, styles().item);
|
|
258
|
+
_v$26 !== _p$.e && className(_el$0, _p$.e = _v$26);
|
|
259
|
+
_v$27 !== _p$.t && (_el$0.disabled = _p$.t = _v$27);
|
|
260
|
+
_p$.a = style(_el$0, _v$28, _p$.a);
|
|
261
|
+
return _p$;
|
|
262
|
+
}, {
|
|
263
|
+
e: void 0,
|
|
264
|
+
t: void 0,
|
|
265
|
+
a: void 0
|
|
266
|
+
});
|
|
267
|
+
return _el$0;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
},
|
|
271
|
+
get when() {
|
|
272
|
+
return page.type === "page";
|
|
273
|
+
},
|
|
274
|
+
get children() {
|
|
275
|
+
var _el$9 = _tmpl$2();
|
|
276
|
+
_el$9.$$click = () => actions.gotoPage(page.page);
|
|
277
|
+
insert(_el$9, () => page.page);
|
|
278
|
+
effect((_p$) => {
|
|
279
|
+
var _v$22 = combineClass("tiny-pagination-item", classes().item), _v$23 = dataIf(page.page === state.current), _v$24 = state.disabled, _v$25 = combineStyle({}, styles().item);
|
|
280
|
+
_v$22 !== _p$.e && className(_el$9, _p$.e = _v$22);
|
|
281
|
+
_v$23 !== _p$.t && setAttribute(_el$9, "data-active", _p$.t = _v$23);
|
|
282
|
+
_v$24 !== _p$.a && (_el$9.disabled = _p$.a = _v$24);
|
|
283
|
+
_p$.o = style(_el$9, _v$25, _p$.o);
|
|
284
|
+
return _p$;
|
|
285
|
+
}, {
|
|
286
|
+
e: void 0,
|
|
287
|
+
t: void 0,
|
|
288
|
+
a: void 0,
|
|
289
|
+
o: void 0
|
|
290
|
+
});
|
|
291
|
+
return _el$9;
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
} });
|
|
295
|
+
}
|
|
296
|
+
}));
|
|
297
|
+
addEventListener(_el$8, "click", actions.next, true);
|
|
298
|
+
insert(_el$8, createComponent(IconArrowRight, {}));
|
|
299
|
+
effect((_p$) => {
|
|
300
|
+
var _v$10 = combineClass("tiny-pagination", classes().root), _v$11 = dataIf(state.disabled), _v$12 = size(), _v$13 = combineStyle({}, styles().root), _v$14 = combineClass("tiny-pagination-prev", classes().prev), _v$15 = state.disabled || state.current <= 1, _v$16 = combineStyle({}, styles().prev), _v$17 = combineClass("tiny-pagination-items", classes().items), _v$18 = combineStyle({}, styles().items), _v$19 = combineClass("tiny-pagination-next", classes().next), _v$20 = state.disabled || state.current >= state.totalPages, _v$21 = combineStyle({}, styles().next);
|
|
301
|
+
_v$10 !== _p$.e && className(_el$5, _p$.e = _v$10);
|
|
302
|
+
_v$11 !== _p$.t && setAttribute(_el$5, "data-disabled", _p$.t = _v$11);
|
|
303
|
+
_v$12 !== _p$.a && setAttribute(_el$5, "data-size", _p$.a = _v$12);
|
|
304
|
+
_p$.o = style(_el$5, _v$13, _p$.o);
|
|
305
|
+
_v$14 !== _p$.i && className(_el$6, _p$.i = _v$14);
|
|
306
|
+
_v$15 !== _p$.n && (_el$6.disabled = _p$.n = _v$15);
|
|
307
|
+
_p$.s = style(_el$6, _v$16, _p$.s);
|
|
308
|
+
_v$17 !== _p$.h && className(_el$7, _p$.h = _v$17);
|
|
309
|
+
_p$.r = style(_el$7, _v$18, _p$.r);
|
|
310
|
+
_v$19 !== _p$.d && className(_el$8, _p$.d = _v$19);
|
|
311
|
+
_v$20 !== _p$.l && (_el$8.disabled = _p$.l = _v$20);
|
|
312
|
+
_p$.u = style(_el$8, _v$21, _p$.u);
|
|
313
|
+
return _p$;
|
|
314
|
+
}, {
|
|
315
|
+
e: void 0,
|
|
316
|
+
t: void 0,
|
|
317
|
+
a: void 0,
|
|
318
|
+
o: void 0,
|
|
319
|
+
i: void 0,
|
|
320
|
+
n: void 0,
|
|
321
|
+
s: void 0,
|
|
322
|
+
h: void 0,
|
|
323
|
+
r: void 0,
|
|
324
|
+
d: void 0,
|
|
325
|
+
l: void 0,
|
|
326
|
+
u: void 0
|
|
327
|
+
});
|
|
328
|
+
return _el$5;
|
|
329
|
+
})();
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
delegateEvents(["keydown", "click"]);
|
|
334
|
+
|
|
335
|
+
//#endregion
|
|
336
|
+
export { Pagination };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { IconArrowLeft } from "../../icons/arrow-left.jsx";
|
|
2
|
+
import { IconArrowRight } from "../../icons/arrow-right.jsx";
|
|
3
|
+
import { IconEllipsis } from "../../icons/ellipsis.jsx";
|
|
4
|
+
import "../../icons/index.jsx";
|
|
5
|
+
import { createClassStyles } from "../../utils/index.jsx";
|
|
6
|
+
import { PaginationCore } from "../../primitives/pagination/index.jsx";
|
|
7
|
+
import "../../primitives/index.jsx";
|
|
8
|
+
import pagination_default from "../../_virtual/__viteSafe__/home/runner/work/solid-tiny-ui/solid-tiny-ui/packages/core/src/components/pagination/pagination.jsx";
|
|
9
|
+
import { Show, createSignal, onMount } from "solid-js";
|
|
10
|
+
import { combineClass, combineStyle, createWatch, dataIf, makeEventListener, mountStyle } from "solid-tiny-utils";
|
|
11
|
+
import { Ref } from "@solid-primitives/refs";
|
|
12
|
+
|
|
13
|
+
//#region src/components/pagination/pagination.tsx
|
|
14
|
+
function GoToPageInput(props) {
|
|
15
|
+
let ref;
|
|
16
|
+
onMount(() => {
|
|
17
|
+
ref.focus();
|
|
18
|
+
});
|
|
19
|
+
const handleKeyDown = (e) => {
|
|
20
|
+
if (e.key === "Enter") ref.blur();
|
|
21
|
+
};
|
|
22
|
+
return <input class={combineClass("tiny-pagination-input", props.class)} min="1" onBlur={props.onBlur} onKeyDown={handleKeyDown} ref={ref} style={combineStyle({ "--width": `${props.width}px` }, props.style)} type="number" value={props.value} />;
|
|
23
|
+
}
|
|
24
|
+
function GoToPageEditable(props) {
|
|
25
|
+
const [editable, setEditable] = createSignal(false);
|
|
26
|
+
const [ref, setRef] = createSignal(null);
|
|
27
|
+
const [w, setW] = createSignal(0);
|
|
28
|
+
createWatch(ref, (el) => {
|
|
29
|
+
if (!el) return;
|
|
30
|
+
makeEventListener(el, "click", () => {
|
|
31
|
+
setW(el.offsetWidth);
|
|
32
|
+
setEditable(true);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return <Show fallback={<Ref ref={setRef}>{props.children}</Ref>} when={editable()}>
|
|
36
|
+
<GoToPageInput class={props.inputClass} onBlur={(e) => {
|
|
37
|
+
const tryTo = e.currentTarget.valueAsNumber;
|
|
38
|
+
if (tryTo > 0 && tryTo !== props.current) props.gotoPage(tryTo);
|
|
39
|
+
setEditable(false);
|
|
40
|
+
}} style={props.inputStyle} value={props.current} width={w()} />
|
|
41
|
+
</Show>;
|
|
42
|
+
}
|
|
43
|
+
function DensePages(props) {
|
|
44
|
+
return <>
|
|
45
|
+
<GoToPageEditable current={props.current} disabled={props.disabled} gotoPage={props.onPageClick} inputClass={props.inputClass} inputStyle={props.inputStyle}>
|
|
46
|
+
<button class={combineClass("tiny-pagination-item", props.itemClass)} disabled={props.disabled} style={combineStyle({}, props.itemStyle)} type="button">
|
|
47
|
+
{props.current}
|
|
48
|
+
</button>
|
|
49
|
+
</GoToPageEditable>
|
|
50
|
+
|
|
51
|
+
<span class={combineClass("tiny-pagination-separator", props.separatorClass)} data-disabled={dataIf(props.disabled)} style={combineStyle({}, props.separatorStyle)}>
|
|
52
|
+
/
|
|
53
|
+
</span>
|
|
54
|
+
|
|
55
|
+
<button class={combineClass("tiny-pagination-item", props.itemClass)} disabled={props.disabled} onClick={() => props.onPageClick(props.totalPages)} style={combineStyle({}, props.itemStyle)} type="button">
|
|
56
|
+
{props.totalPages}
|
|
57
|
+
</button>
|
|
58
|
+
</>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A pagination component for navigating through pages of content.
|
|
62
|
+
*
|
|
63
|
+
* maxVisiblePages: Maximum number of page buttons to display (default: 7, minimum: 5).
|
|
64
|
+
*/
|
|
65
|
+
function Pagination(props) {
|
|
66
|
+
mountStyle(pagination_default, "tiny-pagination");
|
|
67
|
+
const size = () => props.size ?? "middle";
|
|
68
|
+
const [classes, styles] = createClassStyles(() => props.classNames, () => props.styles, () => ({
|
|
69
|
+
disabled: props.disabled ?? false,
|
|
70
|
+
size: size(),
|
|
71
|
+
dense: props.dense ?? false
|
|
72
|
+
}));
|
|
73
|
+
return <PaginationCore current={props.current} disabled={props.disabled} maxVisiblePages={props.maxVisiblePages} onChange={props.onChange} pageSize={props.pageSize} total={props.total}>
|
|
74
|
+
{(state, actions) => {
|
|
75
|
+
return <div class={combineClass("tiny-pagination", classes().root)} data-disabled={dataIf(state.disabled)} data-size={size()} style={combineStyle({}, styles().root)}>
|
|
76
|
+
<button class={combineClass("tiny-pagination-prev", classes().prev)} disabled={state.disabled || state.current <= 1} onClick={actions.prev} style={combineStyle({}, styles().prev)} type="button">
|
|
77
|
+
<IconArrowLeft />
|
|
78
|
+
</button>
|
|
79
|
+
<div class={combineClass("tiny-pagination-items", classes().items)} style={combineStyle({}, styles().items)}>
|
|
80
|
+
<Show fallback={<DensePages current={state.current} disabled={state.disabled} inputClass={classes().input} inputStyle={styles().input} itemClass={classes().item} itemStyle={styles().item} onPageClick={actions.gotoPage} separatorClass={classes().separator} separatorStyle={styles().separator} totalPages={state.totalPages} />} when={!props.dense}>
|
|
81
|
+
<PaginationCore.Items render={(page) => {
|
|
82
|
+
return <Show fallback={<GoToPageEditable current={state.current} disabled={state.disabled} gotoPage={actions.gotoPage} inputClass={classes().input} inputStyle={styles().input}>
|
|
83
|
+
<button class={combineClass("tiny-pagination-item", classes().item)} disabled={state.disabled} style={combineStyle({}, styles().item)} type="button">
|
|
84
|
+
<IconEllipsis />
|
|
85
|
+
</button>
|
|
86
|
+
</GoToPageEditable>} when={page.type === "page"}>
|
|
87
|
+
<button class={combineClass("tiny-pagination-item", classes().item)} data-active={dataIf(page.page === state.current)} disabled={state.disabled} onClick={() => actions.gotoPage(page.page)} style={combineStyle({}, styles().item)} type="button">
|
|
88
|
+
{page.page}
|
|
89
|
+
</button>
|
|
90
|
+
</Show>;
|
|
91
|
+
}} />
|
|
92
|
+
</Show>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<button class={combineClass("tiny-pagination-next", classes().next)} disabled={state.disabled || state.current >= state.totalPages} onClick={actions.next} style={combineStyle({}, styles().next)} type="button">
|
|
96
|
+
<IconArrowRight />
|
|
97
|
+
</button>
|
|
98
|
+
</div>;
|
|
99
|
+
}}
|
|
100
|
+
</PaginationCore>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
//#endregion
|
|
104
|
+
export { Pagination };
|