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,30 @@
|
|
|
1
|
+
import { createComponentState } from "solid-tiny-context";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/fake-scroll-list/context.ts
|
|
4
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: any */
|
|
5
|
+
const context = createComponentState({
|
|
6
|
+
state: () => ({
|
|
7
|
+
inViewIndex: 0,
|
|
8
|
+
visibleItemsCount: 5,
|
|
9
|
+
itemHeight: 30,
|
|
10
|
+
items: []
|
|
11
|
+
}),
|
|
12
|
+
getters: {
|
|
13
|
+
shouldFake() {
|
|
14
|
+
return this.state.items.length > this.state.visibleItemsCount;
|
|
15
|
+
},
|
|
16
|
+
overScan() {
|
|
17
|
+
if (!this.state.shouldFake) return 0;
|
|
18
|
+
return Math.ceil(this.state.visibleItemsCount / 2) + 3;
|
|
19
|
+
},
|
|
20
|
+
fixedInViewIndex() {
|
|
21
|
+
let index = this.state.inViewIndex;
|
|
22
|
+
if (index < 0) index = this.state.items.length + index % this.state.items.length;
|
|
23
|
+
if (index >= this.state.items.length) index %= this.state.items.length;
|
|
24
|
+
return index;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { context };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Item } from "./item.js";
|
|
2
|
+
import { Listbox } from "./listbox.js";
|
|
3
|
+
import { Root } from "./root.js";
|
|
4
|
+
import * as solid_js_store0 from "solid-js/store";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/fake-scroll-list/index.d.ts
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* create a fake scroll list component
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <FakeScrollListCore
|
|
14
|
+
* items={items}
|
|
15
|
+
* visibleItemsCount={5}
|
|
16
|
+
* itemHeight={30}
|
|
17
|
+
* inViewIndex={inViewIndex}
|
|
18
|
+
* onInViewIndexChange={(index) => setInViewIndex(index)}
|
|
19
|
+
* >
|
|
20
|
+
* <FakeScrollListCore.Listbox>
|
|
21
|
+
* {(label, index) => (
|
|
22
|
+
* <FakeScrollListCore.Item index={index()}>
|
|
23
|
+
* {label}
|
|
24
|
+
* </FakeScrollListCore.Item>
|
|
25
|
+
* )}
|
|
26
|
+
* </FakeScrollListCore.Listbox>
|
|
27
|
+
* </FakeScrollListCore>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare const FakeScrollListCore: typeof Root & {
|
|
31
|
+
Item: typeof Item;
|
|
32
|
+
Listbox: typeof Listbox;
|
|
33
|
+
useContext: () => [Readonly<{
|
|
34
|
+
inViewIndex: number;
|
|
35
|
+
visibleItemsCount: number;
|
|
36
|
+
itemHeight: number;
|
|
37
|
+
items: string[];
|
|
38
|
+
} & {
|
|
39
|
+
shouldFake: boolean;
|
|
40
|
+
overScan: number;
|
|
41
|
+
fixedInViewIndex: number;
|
|
42
|
+
}>, Omit<{}, "setState" | "shouldFake" | "overScan" | "fixedInViewIndex"> & {
|
|
43
|
+
setState: solid_js_store0.SetStoreFunction<{
|
|
44
|
+
inViewIndex: number;
|
|
45
|
+
visibleItemsCount: number;
|
|
46
|
+
itemHeight: number;
|
|
47
|
+
items: string[];
|
|
48
|
+
}>;
|
|
49
|
+
}, {}];
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { FakeScrollListCore };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { Item } from "./item.js";
|
|
3
|
+
import { Listbox } from "./listbox.js";
|
|
4
|
+
import { Root } from "./root.js";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/fake-scroll-list/index.ts
|
|
7
|
+
/**
|
|
8
|
+
* create a fake scroll list component
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <FakeScrollListCore
|
|
13
|
+
* items={items}
|
|
14
|
+
* visibleItemsCount={5}
|
|
15
|
+
* itemHeight={30}
|
|
16
|
+
* inViewIndex={inViewIndex}
|
|
17
|
+
* onInViewIndexChange={(index) => setInViewIndex(index)}
|
|
18
|
+
* >
|
|
19
|
+
* <FakeScrollListCore.Listbox>
|
|
20
|
+
* {(label, index) => (
|
|
21
|
+
* <FakeScrollListCore.Item index={index()}>
|
|
22
|
+
* {label}
|
|
23
|
+
* </FakeScrollListCore.Item>
|
|
24
|
+
* )}
|
|
25
|
+
* </FakeScrollListCore.Listbox>
|
|
26
|
+
* </FakeScrollListCore>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
const FakeScrollListCore = Object.assign(Root, {
|
|
30
|
+
Item,
|
|
31
|
+
Listbox,
|
|
32
|
+
useContext: context.useContext
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { FakeScrollListCore };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { Item } from "./item.jsx";
|
|
3
|
+
import { Listbox } from "./listbox.jsx";
|
|
4
|
+
import { Root } from "./root.jsx";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/fake-scroll-list/index.ts
|
|
7
|
+
/**
|
|
8
|
+
* create a fake scroll list component
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <FakeScrollListCore
|
|
13
|
+
* items={items}
|
|
14
|
+
* visibleItemsCount={5}
|
|
15
|
+
* itemHeight={30}
|
|
16
|
+
* inViewIndex={inViewIndex}
|
|
17
|
+
* onInViewIndexChange={(index) => setInViewIndex(index)}
|
|
18
|
+
* >
|
|
19
|
+
* <FakeScrollListCore.Listbox>
|
|
20
|
+
* {(label, index) => (
|
|
21
|
+
* <FakeScrollListCore.Item index={index()}>
|
|
22
|
+
* {label}
|
|
23
|
+
* </FakeScrollListCore.Item>
|
|
24
|
+
* )}
|
|
25
|
+
* </FakeScrollListCore.Listbox>
|
|
26
|
+
* </FakeScrollListCore>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
const FakeScrollListCore = Object.assign(Root, {
|
|
30
|
+
Item,
|
|
31
|
+
Listbox,
|
|
32
|
+
useContext: context.useContext
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { FakeScrollListCore };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/fake-scroll-list/item.d.ts
|
|
4
|
+
declare function Item(props: {
|
|
5
|
+
class?: string;
|
|
6
|
+
style?: JSX.CSSProperties | string;
|
|
7
|
+
children: JSX.Element;
|
|
8
|
+
key: string;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Item };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { className, effect, insert, setAttribute, style, template } from "solid-js/web";
|
|
3
|
+
import { combineStyle, dataIf } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/fake-scroll-list/item.tsx
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
function Item(props) {
|
|
8
|
+
const [state] = context.useContext();
|
|
9
|
+
return (() => {
|
|
10
|
+
var _el$ = _tmpl$();
|
|
11
|
+
insert(_el$, () => props.children);
|
|
12
|
+
effect((_p$) => {
|
|
13
|
+
var _v$ = props.class, _v$2 = dataIf(props.key === `${state.fixedInViewIndex}`), _v$3 = props.key, _v$4 = combineStyle({ height: `${state.itemHeight}px` }, props.style);
|
|
14
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
15
|
+
_v$2 !== _p$.t && setAttribute(_el$, "data-in-view", _p$.t = _v$2);
|
|
16
|
+
_v$3 !== _p$.a && setAttribute(_el$, "data-key", _p$.a = _v$3);
|
|
17
|
+
_p$.o = style(_el$, _v$4, _p$.o);
|
|
18
|
+
return _p$;
|
|
19
|
+
}, {
|
|
20
|
+
e: void 0,
|
|
21
|
+
t: void 0,
|
|
22
|
+
a: void 0,
|
|
23
|
+
o: void 0
|
|
24
|
+
});
|
|
25
|
+
return _el$;
|
|
26
|
+
})();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Item };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { combineStyle, dataIf } from "solid-tiny-utils";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/fake-scroll-list/item.tsx
|
|
5
|
+
function Item(props) {
|
|
6
|
+
const [state] = context.useContext();
|
|
7
|
+
return <div class={props.class} data-in-view={dataIf(props.key === `${state.fixedInViewIndex}`)} data-key={props.key} style={combineStyle({ height: `${state.itemHeight}px` }, props.style)}>
|
|
8
|
+
{props.children}
|
|
9
|
+
</div>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Item };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { createComponent, effect, insert, setStyleProperty, template, use } from "solid-js/web";
|
|
3
|
+
import { For as For$1, createMemo, onMount } from "solid-js";
|
|
4
|
+
import { runAtNextAnimationFrame } from "solid-tiny-utils";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/fake-scroll-list/listbox.tsx
|
|
7
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
8
|
+
function Listbox(props) {
|
|
9
|
+
const [state, actions] = context.useContext();
|
|
10
|
+
const renderItems = createMemo(() => {
|
|
11
|
+
const keyedItems = state.items.map((item, index) => ({
|
|
12
|
+
item,
|
|
13
|
+
key: `${index}`
|
|
14
|
+
}));
|
|
15
|
+
if (state.shouldFake) {
|
|
16
|
+
const items = [
|
|
17
|
+
...keyedItems.map((k) => ({
|
|
18
|
+
item: k.item,
|
|
19
|
+
key: `${k.key}-pre`
|
|
20
|
+
})),
|
|
21
|
+
...keyedItems,
|
|
22
|
+
...keyedItems.map((k) => ({
|
|
23
|
+
item: k.item,
|
|
24
|
+
key: `${k.key}-post`
|
|
25
|
+
}))
|
|
26
|
+
];
|
|
27
|
+
const startIndex = state.items.length - state.overScan;
|
|
28
|
+
const endIndex = 2 * state.items.length + state.overScan;
|
|
29
|
+
return items.slice(startIndex, endIndex);
|
|
30
|
+
}
|
|
31
|
+
return keyedItems;
|
|
32
|
+
});
|
|
33
|
+
let ref;
|
|
34
|
+
onMount(() => {
|
|
35
|
+
runAtNextAnimationFrame(() => {
|
|
36
|
+
ref.style.transition = "transform 0.2s ease";
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
const checkPos = () => {
|
|
40
|
+
if (state.inViewIndex < 0 || state.inViewIndex >= state.items.length) {
|
|
41
|
+
ref.style.transition = "none";
|
|
42
|
+
actions.setState("inViewIndex", state.fixedInViewIndex);
|
|
43
|
+
runAtNextAnimationFrame(() => {
|
|
44
|
+
ref.style.transition = "transform 0.2s ease";
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const translateY = createMemo(() => {
|
|
49
|
+
const centerHeight = Math.floor(state.visibleItemsCount / 2) * state.itemHeight;
|
|
50
|
+
const overScanHeight = state.overScan * state.itemHeight;
|
|
51
|
+
return -state.inViewIndex * state.itemHeight + centerHeight - overScanHeight;
|
|
52
|
+
});
|
|
53
|
+
return (() => {
|
|
54
|
+
var _el$ = _tmpl$();
|
|
55
|
+
var _ref$ = ref;
|
|
56
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : ref = _el$;
|
|
57
|
+
_el$.addEventListener("transitionend", () => {
|
|
58
|
+
checkPos();
|
|
59
|
+
});
|
|
60
|
+
insert(_el$, createComponent(For$1, {
|
|
61
|
+
get each() {
|
|
62
|
+
return renderItems();
|
|
63
|
+
},
|
|
64
|
+
children: (item) => props.children(item.item, item.key)
|
|
65
|
+
}));
|
|
66
|
+
effect((_$p) => setStyleProperty(_el$, "transform", `translateY(${translateY()}px)`));
|
|
67
|
+
return _el$;
|
|
68
|
+
})();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
export { Listbox };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { For, createMemo, onMount } from "solid-js";
|
|
3
|
+
import { runAtNextAnimationFrame } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/fake-scroll-list/listbox.tsx
|
|
6
|
+
function Listbox(props) {
|
|
7
|
+
const [state, actions] = context.useContext();
|
|
8
|
+
const renderItems = createMemo(() => {
|
|
9
|
+
const keyedItems = state.items.map((item, index) => ({
|
|
10
|
+
item,
|
|
11
|
+
key: `${index}`
|
|
12
|
+
}));
|
|
13
|
+
if (state.shouldFake) {
|
|
14
|
+
const items = [
|
|
15
|
+
...keyedItems.map((k) => ({
|
|
16
|
+
item: k.item,
|
|
17
|
+
key: `${k.key}-pre`
|
|
18
|
+
})),
|
|
19
|
+
...keyedItems,
|
|
20
|
+
...keyedItems.map((k) => ({
|
|
21
|
+
item: k.item,
|
|
22
|
+
key: `${k.key}-post`
|
|
23
|
+
}))
|
|
24
|
+
];
|
|
25
|
+
const startIndex = state.items.length - state.overScan;
|
|
26
|
+
const endIndex = 2 * state.items.length + state.overScan;
|
|
27
|
+
return items.slice(startIndex, endIndex);
|
|
28
|
+
}
|
|
29
|
+
return keyedItems;
|
|
30
|
+
});
|
|
31
|
+
let ref;
|
|
32
|
+
onMount(() => {
|
|
33
|
+
runAtNextAnimationFrame(() => {
|
|
34
|
+
ref.style.transition = "transform 0.2s ease";
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const checkPos = () => {
|
|
38
|
+
if (state.inViewIndex < 0 || state.inViewIndex >= state.items.length) {
|
|
39
|
+
ref.style.transition = "none";
|
|
40
|
+
actions.setState("inViewIndex", state.fixedInViewIndex);
|
|
41
|
+
runAtNextAnimationFrame(() => {
|
|
42
|
+
ref.style.transition = "transform 0.2s ease";
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const translateY = createMemo(() => {
|
|
47
|
+
const centerHeight = Math.floor(state.visibleItemsCount / 2) * state.itemHeight;
|
|
48
|
+
const overScanHeight = state.overScan * state.itemHeight;
|
|
49
|
+
return -state.inViewIndex * state.itemHeight + centerHeight - overScanHeight;
|
|
50
|
+
});
|
|
51
|
+
return <div onTransitionEnd={() => {
|
|
52
|
+
checkPos();
|
|
53
|
+
}} ref={ref} style={{ transform: `translateY(${translateY()}px)` }}>
|
|
54
|
+
<For each={renderItems()}>
|
|
55
|
+
{(item) => props.children(item.item, item.key)}
|
|
56
|
+
</For>
|
|
57
|
+
</div>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Listbox };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/fake-scroll-list/root.d.ts
|
|
4
|
+
declare function Root(props: {
|
|
5
|
+
children: JSX.Element;
|
|
6
|
+
class?: string;
|
|
7
|
+
style?: JSX.CSSProperties | string;
|
|
8
|
+
items: string[];
|
|
9
|
+
visibleItemsCount: number;
|
|
10
|
+
itemHeight: number;
|
|
11
|
+
inViewIndex: number;
|
|
12
|
+
onInViewIndexChange: (index: number) => void;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Root };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { context } from "./context.js";
|
|
2
|
+
import { className, createComponent, effect, insert, style, template } from "solid-js/web";
|
|
3
|
+
import { combineStyle, createWatch } from "solid-tiny-utils";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/fake-scroll-list/root.tsx
|
|
6
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
7
|
+
function Root(props) {
|
|
8
|
+
const Context = context.initial({
|
|
9
|
+
items: () => props.items,
|
|
10
|
+
visibleItemsCount: () => props.visibleItemsCount,
|
|
11
|
+
itemHeight: () => props.itemHeight
|
|
12
|
+
});
|
|
13
|
+
const [state, actions] = Context.value;
|
|
14
|
+
createWatch(() => props.inViewIndex, (index) => {
|
|
15
|
+
if (index !== state.fixedInViewIndex) actions.setState("inViewIndex", index);
|
|
16
|
+
});
|
|
17
|
+
createWatch(() => state.fixedInViewIndex, (inViewIndex) => {
|
|
18
|
+
if (inViewIndex !== props.inViewIndex) props.onInViewIndexChange(inViewIndex);
|
|
19
|
+
});
|
|
20
|
+
const handleOnWheel = (e) => {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
e.stopPropagation();
|
|
23
|
+
const { deltaY } = e;
|
|
24
|
+
const index = state.inViewIndex;
|
|
25
|
+
const newIndex = deltaY > 0 ? index + 1 : index - 1;
|
|
26
|
+
if (state.shouldFake) {
|
|
27
|
+
if (newIndex >= -state.overScan + 3 && newIndex < state.items.length + state.overScan - 3) actions.setState("inViewIndex", newIndex);
|
|
28
|
+
} else if (newIndex >= 0 && newIndex < state.items.length) actions.setState("inViewIndex", newIndex);
|
|
29
|
+
};
|
|
30
|
+
return createComponent(Context.Provider, { get children() {
|
|
31
|
+
var _el$ = _tmpl$();
|
|
32
|
+
_el$.addEventListener("wheel", handleOnWheel);
|
|
33
|
+
insert(_el$, () => props.children);
|
|
34
|
+
effect((_p$) => {
|
|
35
|
+
var _v$ = props.class, _v$2 = combineStyle({
|
|
36
|
+
height: `${props.itemHeight * props.visibleItemsCount}px`,
|
|
37
|
+
width: "100%",
|
|
38
|
+
overflow: "hidden"
|
|
39
|
+
}, props.style);
|
|
40
|
+
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
41
|
+
_p$.t = style(_el$, _v$2, _p$.t);
|
|
42
|
+
return _p$;
|
|
43
|
+
}, {
|
|
44
|
+
e: void 0,
|
|
45
|
+
t: void 0
|
|
46
|
+
});
|
|
47
|
+
return _el$;
|
|
48
|
+
} });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Root };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { context } from "./context.jsx";
|
|
2
|
+
import { combineStyle, createWatch } from "solid-tiny-utils";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/fake-scroll-list/root.tsx
|
|
5
|
+
function Root(props) {
|
|
6
|
+
const Context = context.initial({
|
|
7
|
+
items: () => props.items,
|
|
8
|
+
visibleItemsCount: () => props.visibleItemsCount,
|
|
9
|
+
itemHeight: () => props.itemHeight
|
|
10
|
+
});
|
|
11
|
+
const [state, actions] = Context.value;
|
|
12
|
+
createWatch(() => props.inViewIndex, (index) => {
|
|
13
|
+
if (index !== state.fixedInViewIndex) actions.setState("inViewIndex", index);
|
|
14
|
+
});
|
|
15
|
+
createWatch(() => state.fixedInViewIndex, (inViewIndex) => {
|
|
16
|
+
if (inViewIndex !== props.inViewIndex) props.onInViewIndexChange(inViewIndex);
|
|
17
|
+
});
|
|
18
|
+
const handleOnWheel = (e) => {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
const { deltaY } = e;
|
|
22
|
+
const index = state.inViewIndex;
|
|
23
|
+
const newIndex = deltaY > 0 ? index + 1 : index - 1;
|
|
24
|
+
if (state.shouldFake) {
|
|
25
|
+
if (newIndex >= -state.overScan + 3 && newIndex < state.items.length + state.overScan - 3) actions.setState("inViewIndex", newIndex);
|
|
26
|
+
} else if (newIndex >= 0 && newIndex < state.items.length) actions.setState("inViewIndex", newIndex);
|
|
27
|
+
};
|
|
28
|
+
return <Context.Provider>
|
|
29
|
+
<div class={props.class} onWheel={handleOnWheel} style={combineStyle({
|
|
30
|
+
height: `${props.itemHeight * props.visibleItemsCount}px`,
|
|
31
|
+
width: "100%",
|
|
32
|
+
overflow: "hidden"
|
|
33
|
+
}, props.style)}>
|
|
34
|
+
{props.children}
|
|
35
|
+
</div>
|
|
36
|
+
</Context.Provider>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Root };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getAnimationDurationMs } from "../../utils/duration.js";
|
|
1
2
|
import { context } from "./context.js";
|
|
2
3
|
import { runSolidEventHandler as runSolidEventHandler$1 } from "./utils.js";
|
|
3
4
|
import { Portal, createComponent, effect, insert, mergeProps, setStyleProperty, spread, template, use } from "solid-js/web";
|
|
@@ -51,17 +52,17 @@ function FloatingContentCore(props) {
|
|
|
51
52
|
});
|
|
52
53
|
typeof _ref$ === "function" && use(_ref$, _el$2);
|
|
53
54
|
spread(_el$2, mergeProps(otherProps, {
|
|
54
|
-
get ["data-
|
|
55
|
-
return dataIf(staticData.
|
|
55
|
+
get ["data-entering"]() {
|
|
56
|
+
return dataIf(["pre-enter", "entering"].includes(staticData.presencePhase()));
|
|
56
57
|
},
|
|
57
|
-
get ["data-
|
|
58
|
-
return dataIf(staticData.
|
|
58
|
+
get ["data-exiting"]() {
|
|
59
|
+
return dataIf(["exiting"].includes(staticData.presencePhase()));
|
|
59
60
|
},
|
|
60
61
|
get ["data-placement"]() {
|
|
61
62
|
return state.placement;
|
|
62
63
|
},
|
|
63
|
-
get ["data-
|
|
64
|
-
return staticData.
|
|
64
|
+
get ["data-presence-phase"]() {
|
|
65
|
+
return staticData.presencePhase();
|
|
65
66
|
},
|
|
66
67
|
"onMouseEnter": (e) => {
|
|
67
68
|
if (state.canHoverContent && state.trigger === "hover") actions.setOpen(true);
|
|
@@ -90,14 +91,14 @@ function FloatingContentCore(props) {
|
|
|
90
91
|
}
|
|
91
92
|
function Content(props) {
|
|
92
93
|
const [state, , staticData] = context.useContext();
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
const presence = createPresence(() => state.open, {
|
|
95
|
+
enterDuration: () => getAnimationDurationMs(state.refContentInner),
|
|
96
|
+
exitDuration: () => getAnimationDurationMs(state.refContentInner)
|
|
96
97
|
});
|
|
97
|
-
staticData.
|
|
98
|
+
staticData.presencePhase = presence.phase;
|
|
98
99
|
return createComponent(Show, {
|
|
99
100
|
get when() {
|
|
100
|
-
return
|
|
101
|
+
return presence.isMounted();
|
|
101
102
|
},
|
|
102
103
|
get children() {
|
|
103
104
|
return createComponent(Portal, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getAnimationDurationMs } from "../../utils/duration.jsx";
|
|
1
2
|
import { context } from "./context.jsx";
|
|
2
3
|
import { runSolidEventHandler as runSolidEventHandler$1 } from "./utils.jsx";
|
|
3
4
|
import { Show, onCleanup, onMount, splitProps } from "solid-js";
|
|
@@ -52,7 +53,7 @@ function FloatingContentCore(props) {
|
|
|
52
53
|
"pointer-events": "auto",
|
|
53
54
|
opacity: state.initialized ? 1 : 0
|
|
54
55
|
}}>
|
|
55
|
-
<div {...otherProps} data-
|
|
56
|
+
<div {...otherProps} data-entering={dataIf(["pre-enter", "entering"].includes(staticData.presencePhase()))} data-exiting={dataIf(["exiting"].includes(staticData.presencePhase()))} data-placement={state.placement} data-presence-phase={staticData.presencePhase()} onMouseEnter={(e) => {
|
|
56
57
|
if (state.canHoverContent && state.trigger === "hover") actions.setOpen(true);
|
|
57
58
|
runSolidEventHandler$1(e, localProps.onMouseEnter);
|
|
58
59
|
}} onMouseLeave={(e) => {
|
|
@@ -67,12 +68,12 @@ function FloatingContentCore(props) {
|
|
|
67
68
|
}
|
|
68
69
|
function Content(props) {
|
|
69
70
|
const [state, , staticData] = context.useContext();
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
const presence = createPresence(() => state.open, {
|
|
72
|
+
enterDuration: () => getAnimationDurationMs(state.refContentInner),
|
|
73
|
+
exitDuration: () => getAnimationDurationMs(state.refContentInner)
|
|
73
74
|
});
|
|
74
|
-
staticData.
|
|
75
|
-
return <Show when={
|
|
75
|
+
staticData.presencePhase = presence.phase;
|
|
76
|
+
return <Show when={presence.isMounted()}>
|
|
76
77
|
<Portal mount={document.body}>
|
|
77
78
|
<FloatingContentCore {...props} />
|
|
78
79
|
</Portal>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as solid_js35 from "solid-js";
|
|
2
|
+
import { PresencePhase } from "solid-tiny-utils";
|
|
2
3
|
import * as _floating_ui_dom23 from "@floating-ui/dom";
|
|
3
4
|
import { Derivable, OffsetOptions, Placement } from "@floating-ui/dom";
|
|
4
5
|
import * as solid_tiny_context5 from "solid-tiny-context";
|
|
5
|
-
import * as
|
|
6
|
+
import * as solid_js_store15 from "solid-js/store";
|
|
6
7
|
import * as _floating_ui_core75 from "@floating-ui/core";
|
|
7
8
|
|
|
8
9
|
//#region src/primitives/floating/context.d.ts
|
|
@@ -129,7 +130,7 @@ declare const context: {
|
|
|
129
130
|
_setOpen(open: boolean): void;
|
|
130
131
|
updatePos(): Promise<void>;
|
|
131
132
|
}, "setState"> & {
|
|
132
|
-
setState:
|
|
133
|
+
setState: solid_js_store15.SetStoreFunction<{
|
|
133
134
|
x: number;
|
|
134
135
|
y: number;
|
|
135
136
|
open: boolean;
|
|
@@ -248,7 +249,7 @@ declare const context: {
|
|
|
248
249
|
};
|
|
249
250
|
}>;
|
|
250
251
|
}, {
|
|
251
|
-
|
|
252
|
+
presencePhase: () => PresencePhase;
|
|
252
253
|
}];
|
|
253
254
|
initial(initialState?: Partial<solid_tiny_context5.MaybeSignals<{
|
|
254
255
|
x: number;
|
|
@@ -369,8 +370,8 @@ declare const context: {
|
|
|
369
370
|
};
|
|
370
371
|
}>> | undefined): {
|
|
371
372
|
Provider(props: {
|
|
372
|
-
children?:
|
|
373
|
-
}):
|
|
373
|
+
children?: solid_js35.JSX.Element;
|
|
374
|
+
}): solid_js35.JSX.Element;
|
|
374
375
|
value: [Readonly<{
|
|
375
376
|
x: number;
|
|
376
377
|
y: number;
|
|
@@ -610,13 +611,13 @@ declare const context: {
|
|
|
610
611
|
}> | undefined;
|
|
611
612
|
};
|
|
612
613
|
}, {
|
|
613
|
-
|
|
614
|
+
presencePhase: () => PresencePhase;
|
|
614
615
|
}, {}, {
|
|
615
616
|
setOpen(open: boolean): void;
|
|
616
617
|
_setOpen(open: boolean): void;
|
|
617
618
|
updatePos(): Promise<void>;
|
|
618
619
|
}>>, "setState"> & {
|
|
619
|
-
setState:
|
|
620
|
+
setState: solid_js_store15.SetStoreFunction<{
|
|
620
621
|
x: number;
|
|
621
622
|
y: number;
|
|
622
623
|
open: boolean;
|
|
@@ -735,7 +736,7 @@ declare const context: {
|
|
|
735
736
|
};
|
|
736
737
|
}>;
|
|
737
738
|
}, {
|
|
738
|
-
|
|
739
|
+
presencePhase: () => PresencePhase;
|
|
739
740
|
}];
|
|
740
741
|
};
|
|
741
742
|
defaultValue: () => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Trigger } from "./trigger.js";
|
|
2
2
|
import { Content } from "./content.js";
|
|
3
|
-
import { FloatingUiCoreProps, Placement as Placement$1 } from "./types.js";
|
|
3
|
+
import { CloseableStatus, FloatingUiCoreProps, Placement as Placement$1 } from "./types.js";
|
|
4
4
|
import { Root } from "./root.js";
|
|
5
|
+
import * as solid_tiny_utils0 from "solid-tiny-utils";
|
|
5
6
|
import * as _floating_ui_dom0 from "@floating-ui/dom";
|
|
6
7
|
import * as solid_js_store2 from "solid-js/store";
|
|
7
8
|
import * as _floating_ui_core0 from "@floating-ui/core";
|
|
@@ -251,7 +252,7 @@ declare const FloatingUiCore: typeof Root & {
|
|
|
251
252
|
};
|
|
252
253
|
}>;
|
|
253
254
|
}, {
|
|
254
|
-
|
|
255
|
+
presencePhase: () => solid_tiny_utils0.PresencePhase;
|
|
255
256
|
}];
|
|
256
257
|
};
|
|
257
258
|
//#endregion
|
|
@@ -15,7 +15,7 @@ function Trigger(props) {
|
|
|
15
15
|
state.trigger === "hover" && actions.setOpen(false);
|
|
16
16
|
});
|
|
17
17
|
makeEventListener(refTrigger, "click", () => {
|
|
18
|
-
state.trigger === "click" && actions.setOpen(staticData.
|
|
18
|
+
state.trigger === "click" && actions.setOpen(staticData.presencePhase() === "idle");
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
21
|
return createComponent(Ref, {
|