@wisdomgarden/torque 0.1.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/README.md +75 -0
- package/dist/common/components.types.d.ts +60 -0
- package/dist/common/components.types.js +1 -0
- package/dist/common/dayjs.d.ts +7 -0
- package/dist/common/dayjs.js +10 -0
- package/dist/common/use-css-variable-value.d.ts +6 -0
- package/dist/common/use-css-variable-value.js +23 -0
- package/dist/common/use-css-variable-values.d.ts +10 -0
- package/dist/common/use-css-variable-values.js +25 -0
- package/dist/common/use-form-wrapper-props.d.ts +48 -0
- package/dist/common/use-form-wrapper-props.js +59 -0
- package/dist/common/use-ime-safe-input.d.ts +10 -0
- package/dist/common/use-ime-safe-input.js +23 -0
- package/dist/common/use-notification-a11y.d.ts +4 -0
- package/dist/common/use-notification-a11y.js +18 -0
- package/dist/common/use-sticky-box.d.ts +9 -0
- package/dist/common/use-sticky-box.js +217 -0
- package/dist/common/util.d.ts +5 -0
- package/dist/common/util.js +14 -0
- package/dist/components/_inner/base-select/common/searchable.d.ts +5 -0
- package/dist/components/_inner/base-select/common/searchable.js +6 -0
- package/dist/components/_inner/base-select/common/select.types.d.ts +169 -0
- package/dist/components/_inner/base-select/common/select.types.js +1 -0
- package/dist/components/_inner/base-select/search-select/index.d.ts +6 -0
- package/dist/components/_inner/base-select/search-select/index.js +106 -0
- package/dist/components/_inner/base-select/search-select/search-select.module.css.js +10 -0
- package/dist/components/_inner/base-select/single-select/index.d.ts +1 -0
- package/dist/components/_inner/base-select/single-select/index.js +5 -0
- package/dist/components/_inner/base-select/single-select/single-select.d.ts +5 -0
- package/dist/components/_inner/base-select/single-select/single-select.js +58 -0
- package/dist/components/_inner/base-select/target/single-select-target.d.ts +15 -0
- package/dist/components/_inner/base-select/target/single-select-target.js +56 -0
- package/dist/components/_inner/bottom-action/bottom-action-item.d.ts +11 -0
- package/dist/components/_inner/bottom-action/bottom-action-item.js +140 -0
- package/dist/components/_inner/bottom-action/bottom-action.d.ts +6 -0
- package/dist/components/_inner/bottom-action/bottom-action.js +161 -0
- package/dist/components/_inner/bottom-action/bottom-action.module.css.js +46 -0
- package/dist/components/_inner/bottom-action/bottom-action.types.d.ts +117 -0
- package/dist/components/_inner/bottom-action/index.d.ts +2 -0
- package/dist/components/_inner/bottom-action/index.js +5 -0
- package/dist/components/_inner/drawer/base-bottom-drawer.d.ts +32 -0
- package/dist/components/_inner/drawer/base-bottom-drawer.js +91 -0
- package/dist/components/_inner/drawer/base-bottom-drawer.module.css.js +18 -0
- package/dist/components/_inner/dropdown/empty-state.d.ts +6 -0
- package/dist/components/_inner/dropdown/empty-state.js +16 -0
- package/dist/components/_inner/dropdown/empty-state.module.css.js +12 -0
- package/dist/components/_inner/dropdown/options-drop-down.d.ts +22 -0
- package/dist/components/_inner/dropdown/options-drop-down.js +95 -0
- package/dist/components/_inner/dropdown/options-drop-down.module.css.js +18 -0
- package/dist/components/_inner/menu/_mobile/menu.mobile.d.ts +11 -0
- package/dist/components/_inner/menu/_mobile/menu.mobile.js +15 -0
- package/dist/components/_inner/menu/_web/menu-web.module.css.js +18 -0
- package/dist/components/_inner/menu/_web/menu.web.d.ts +6 -0
- package/dist/components/_inner/menu/_web/menu.web.js +198 -0
- package/dist/components/_inner/number/number-input-left.d.ts +5 -0
- package/dist/components/_inner/number/number-input-left.js +29 -0
- package/dist/components/_inner/number/number-input-right.d.ts +6 -0
- package/dist/components/_inner/number/number-input-right.js +62 -0
- package/dist/components/_inner/number/number.module.css.js +12 -0
- package/dist/components/_inner/table/head/table-head-filter-multi-select.d.ts +25 -0
- package/dist/components/_inner/table/head/table-head-filter-multi-select.js +139 -0
- package/dist/components/_inner/table/head/table-head-filter-search.d.ts +18 -0
- package/dist/components/_inner/table/head/table-head-filter-search.js +102 -0
- package/dist/components/_inner/table/head/table-head-filter-single-select.d.ts +21 -0
- package/dist/components/_inner/table/head/table-head-filter-single-select.js +76 -0
- package/dist/components/_inner/table/head/table-head-sort.d.ts +16 -0
- package/dist/components/_inner/table/head/table-head-sort.js +51 -0
- package/dist/components/_inner/table/head/table-head.module.css.js +40 -0
- package/dist/components/_inner/table/index.d.ts +5 -0
- package/dist/components/_inner/table/index.js +13 -0
- package/dist/components/_inner/table/table-header-title.d.ts +7 -0
- package/dist/components/_inner/table/table-header-title.js +24 -0
- package/dist/components/_inner/table/table-header-title.module.css.js +12 -0
- package/dist/components/_inner/tags-input/hooks/use-height-transition.d.ts +15 -0
- package/dist/components/_inner/tags-input/hooks/use-height-transition.js +31 -0
- package/dist/components/_inner/tags-input/hooks/use-is-wrapped.d.ts +12 -0
- package/dist/components/_inner/tags-input/hooks/use-is-wrapped.js +24 -0
- package/dist/components/_inner/tags-input/index.d.ts +2 -0
- package/dist/components/_inner/tags-input/index.js +5 -0
- package/dist/components/_inner/tags-input/styles/tags-input.module.css.js +48 -0
- package/dist/components/_inner/tags-input/tags-input-tag.d.ts +13 -0
- package/dist/components/_inner/tags-input/tags-input-tag.js +53 -0
- package/dist/components/_inner/tags-input/tags-input.d.ts +9 -0
- package/dist/components/_inner/tags-input/tags-input.js +143 -0
- package/dist/components/_inner/tags-input/tags-input.types.d.ts +57 -0
- package/dist/components/alert/alert.d.ts +6 -0
- package/dist/components/alert/alert.js +102 -0
- package/dist/components/alert/alert.module.css.js +20 -0
- package/dist/components/alert/alert.types.d.ts +18 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.js +6 -0
- package/dist/components/base-input/base-input.d.ts +5 -0
- package/dist/components/base-input/base-input.js +143 -0
- package/dist/components/base-input/base-input.types.d.ts +89 -0
- package/dist/components/base-input/index.d.ts +5 -0
- package/dist/components/base-input/index.js +11 -0
- package/dist/components/base-input/styles/base-input-variables.module.css.js +8 -0
- package/dist/components/base-input/styles/base-input.module.css.js +24 -0
- package/dist/components/base-input/subs/base-input-left-section.d.ts +10 -0
- package/dist/components/base-input/subs/base-input-left-section.js +29 -0
- package/dist/components/base-input/subs/base-input-right-section.d.ts +23 -0
- package/dist/components/base-input/subs/base-input-right-section.js +87 -0
- package/dist/components/base-input/subs/base-input-target.d.ts +11 -0
- package/dist/components/base-input/subs/base-input-target.js +35 -0
- package/dist/components/base-input/subs/base-input-wrapper.d.ts +18 -0
- package/dist/components/base-input/subs/base-input-wrapper.js +51 -0
- package/dist/components/base-input/util.d.ts +8 -0
- package/dist/components/base-input/util.js +16 -0
- package/dist/components/bottom-drawer/bottom-drawer.d.ts +6 -0
- package/dist/components/bottom-drawer/bottom-drawer.js +16 -0
- package/dist/components/bottom-drawer/index.d.ts +2 -0
- package/dist/components/bottom-drawer/index.js +5 -0
- package/dist/components/box/box.d.ts +2 -0
- package/dist/components/box/box.js +27 -0
- package/dist/components/box/box.module.css.js +8 -0
- package/dist/components/box/box.types.d.ts +36 -0
- package/dist/components/box/index.d.ts +2 -0
- package/dist/components/box/index.js +5 -0
- package/dist/components/button/button.d.ts +17 -0
- package/dist/components/button/button.js +91 -0
- package/dist/components/button/button.types.d.ts +88 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.js +5 -0
- package/dist/components/button/styles/button-variables.module.css.js +8 -0
- package/dist/components/button/styles/button.module.css.js +18 -0
- package/dist/components/checkbox/checkbox-group.d.ts +7 -0
- package/dist/components/checkbox/checkbox-group.js +51 -0
- package/dist/components/checkbox/checkbox-variables.module.css.js +8 -0
- package/dist/components/checkbox/checkbox.d.ts +9 -0
- package/dist/components/checkbox/checkbox.js +93 -0
- package/dist/components/checkbox/checkbox.module.css.js +12 -0
- package/dist/components/checkbox/checkbox.types.d.ts +41 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.js +8 -0
- package/dist/components/combobox/combobox-context.d.ts +9 -0
- package/dist/components/combobox/combobox-context.js +15 -0
- package/dist/components/combobox/combobox-dropdown.d.ts +13 -0
- package/dist/components/combobox/combobox-dropdown.js +35 -0
- package/dist/components/combobox/combobox-infinite-dropdown.d.ts +51 -0
- package/dist/components/combobox/combobox-infinite-dropdown.js +56 -0
- package/dist/components/combobox/combobox-option.d.ts +3 -0
- package/dist/components/combobox/combobox-option.js +50 -0
- package/dist/components/combobox/combobox-options.d.ts +8 -0
- package/dist/components/combobox/combobox-options.js +38 -0
- package/dist/components/combobox/combobox-search.d.ts +27 -0
- package/dist/components/combobox/combobox-search.js +29 -0
- package/dist/components/combobox/combobox-target.d.ts +15 -0
- package/dist/components/combobox/combobox-target.js +49 -0
- package/dist/components/combobox/combobox.d.ts +61 -0
- package/dist/components/combobox/combobox.js +53 -0
- package/dist/components/combobox/combobox.types.d.ts +58 -0
- package/dist/components/combobox/hooks/use-combobox-search-input.d.ts +11 -0
- package/dist/components/combobox/hooks/use-combobox-search-input.js +22 -0
- package/dist/components/combobox/hooks/use-combobox-target-key-down.d.ts +12 -0
- package/dist/components/combobox/hooks/use-combobox-target-key-down.js +35 -0
- package/dist/components/combobox/hooks/use-combobox.d.ts +58 -0
- package/dist/components/combobox/hooks/use-combobox.js +90 -0
- package/dist/components/combobox/index.d.ts +5 -0
- package/dist/components/combobox/index.js +9 -0
- package/dist/components/combobox/styles/combobox.module.css.js +14 -0
- package/dist/components/combobox/subs/combobox-bottom-drawer-dropdown.d.ts +10 -0
- package/dist/components/combobox/subs/combobox-bottom-drawer-dropdown.js +14 -0
- package/dist/components/combobox/subs/combobox-bottom-drawer-target.d.ts +3 -0
- package/dist/components/combobox/subs/combobox-bottom-drawer-target.js +20 -0
- package/dist/components/data-filter/data-filter-content.d.ts +13 -0
- package/dist/components/data-filter/data-filter-content.js +46 -0
- package/dist/components/data-filter/data-filter-drawer.d.ts +19 -0
- package/dist/components/data-filter/data-filter-drawer.js +73 -0
- package/dist/components/data-filter/data-filter-inline.d.ts +6 -0
- package/dist/components/data-filter/data-filter-inline.js +12 -0
- package/dist/components/data-filter/data-filter-panel.d.ts +13 -0
- package/dist/components/data-filter/data-filter-panel.js +40 -0
- package/dist/components/data-filter/data-filter.d.ts +2 -0
- package/dist/components/data-filter/data-filter.js +94 -0
- package/dist/components/data-filter/data-filter.module.css.js +56 -0
- package/dist/components/data-filter/data-filter.types.d.ts +29 -0
- package/dist/components/data-filter/filter-condition-tags/filter-condition-tags.d.ts +16 -0
- package/dist/components/data-filter/filter-condition-tags/filter-condition-tags.js +114 -0
- package/dist/components/data-filter/filter-condition-tags/index.d.ts +1 -0
- package/dist/components/data-filter/filter-condition-tags/index.js +5 -0
- package/dist/components/data-filter/hooks/use-data-filter-open-state.d.ts +10 -0
- package/dist/components/data-filter/hooks/use-data-filter-open-state.js +21 -0
- package/dist/components/data-filter/hooks/use-data-filter-state.d.ts +11 -0
- package/dist/components/data-filter/hooks/use-data-filter-state.js +48 -0
- package/dist/components/data-filter/index.d.ts +3 -0
- package/dist/components/data-filter/index.js +7 -0
- package/dist/components/date-picker/components/common/calendar-header.d.ts +10 -0
- package/dist/components/date-picker/components/common/calendar-header.js +70 -0
- package/dist/components/date-picker/components/common/calendar-panel.d.ts +6 -0
- package/dist/components/date-picker/components/common/calendar-panel.js +133 -0
- package/dist/components/date-picker/components/common/date-cell.d.ts +8 -0
- package/dist/components/date-picker/components/common/date-cell.js +46 -0
- package/dist/components/date-picker/components/common/decade-view.d.ts +8 -0
- package/dist/components/date-picker/components/common/decade-view.js +36 -0
- package/dist/components/date-picker/components/common/month-view.d.ts +5 -0
- package/dist/components/date-picker/components/common/month-view.js +65 -0
- package/dist/components/date-picker/components/common/picker-footer.d.ts +28 -0
- package/dist/components/date-picker/components/common/picker-footer.js +29 -0
- package/dist/components/date-picker/components/common/picker-sections.d.ts +14 -0
- package/dist/components/date-picker/components/common/picker-sections.js +31 -0
- package/dist/components/date-picker/components/common/picker-target-input.d.ts +7 -0
- package/dist/components/date-picker/components/common/picker-target-input.js +11 -0
- package/dist/components/date-picker/components/common/time-column.d.ts +6 -0
- package/dist/components/date-picker/components/common/time-column.js +121 -0
- package/dist/components/date-picker/components/common/time-input-row.d.ts +20 -0
- package/dist/components/date-picker/components/common/time-input-row.js +65 -0
- package/dist/components/date-picker/components/common/time-panel.d.ts +6 -0
- package/dist/components/date-picker/components/common/time-panel.js +86 -0
- package/dist/components/date-picker/components/common/year-view.d.ts +8 -0
- package/dist/components/date-picker/components/common/year-view.js +36 -0
- package/dist/components/date-picker/components/picker-focus-context.d.ts +21 -0
- package/dist/components/date-picker/components/picker-focus-context.js +16 -0
- package/dist/components/date-picker/components/range/range-panel.d.ts +33 -0
- package/dist/components/date-picker/components/range/range-panel.js +101 -0
- package/dist/components/date-picker/components/range/range-shell.d.ts +6 -0
- package/dist/components/date-picker/components/range/range-shell.js +110 -0
- package/dist/components/date-picker/components/single/picker-shell.d.ts +6 -0
- package/dist/components/date-picker/components/single/picker-shell.js +109 -0
- package/dist/components/date-picker/date-picker.d.ts +6 -0
- package/dist/components/date-picker/date-picker.js +76 -0
- package/dist/components/date-picker/date-picker.types.d.ts +543 -0
- package/dist/components/date-picker/date-picker.types.js +5 -0
- package/dist/components/date-picker/date-range-picker.d.ts +5 -0
- package/dist/components/date-picker/date-range-picker.js +103 -0
- package/dist/components/date-picker/date-time-picker.d.ts +6 -0
- package/dist/components/date-picker/date-time-picker.js +181 -0
- package/dist/components/date-picker/date-time-range-picker.d.ts +6 -0
- package/dist/components/date-picker/date-time-range-picker.js +157 -0
- package/dist/components/date-picker/hooks/date-disabled.d.ts +27 -0
- package/dist/components/date-picker/hooks/date-disabled.js +60 -0
- package/dist/components/date-picker/hooks/time-utils.d.ts +17 -0
- package/dist/components/date-picker/hooks/time-utils.js +14 -0
- package/dist/components/date-picker/hooks/use-calendar.d.ts +12 -0
- package/dist/components/date-picker/hooks/use-calendar.js +28 -0
- package/dist/components/date-picker/hooks/use-date-parser.d.ts +17 -0
- package/dist/components/date-picker/hooks/use-date-parser.js +16 -0
- package/dist/components/date-picker/hooks/use-grid-keyboard.d.ts +22 -0
- package/dist/components/date-picker/hooks/use-grid-keyboard.js +74 -0
- package/dist/components/date-picker/hooks/use-range-draft.d.ts +61 -0
- package/dist/components/date-picker/hooks/use-range-draft.js +84 -0
- package/dist/components/date-picker/hooks/use-range-session.d.ts +14 -0
- package/dist/components/date-picker/hooks/use-range-session.js +11 -0
- package/dist/components/date-picker/hooks/use-resolved-format.d.ts +15 -0
- package/dist/components/date-picker/hooks/use-resolved-format.js +25 -0
- package/dist/components/date-picker/index.d.ts +21 -0
- package/dist/components/date-picker/index.js +15 -0
- package/dist/components/date-picker/styles/calendar-header.module.css.js +14 -0
- package/dist/components/date-picker/styles/calendar-panel.module.css.js +12 -0
- package/dist/components/date-picker/styles/date-cell.module.css.js +8 -0
- package/dist/components/date-picker/styles/month-view.module.css.js +12 -0
- package/dist/components/date-picker/styles/panel-layout.module.css.js +12 -0
- package/dist/components/date-picker/styles/picker-footer.module.css.js +10 -0
- package/dist/components/date-picker/styles/picker-shell.module.css.js +12 -0
- package/dist/components/date-picker/styles/range-panel.module.css.js +12 -0
- package/dist/components/date-picker/styles/time-column.module.css.js +10 -0
- package/dist/components/date-picker/styles/time-input-row.module.css.js +16 -0
- package/dist/components/date-picker/styles/time-panel.module.css.js +8 -0
- package/dist/components/date-picker/styles/year-view.module.css.js +10 -0
- package/dist/components/date-picker/time-picker.d.ts +6 -0
- package/dist/components/date-picker/time-picker.js +81 -0
- package/dist/components/date-picker/time-range-picker.d.ts +6 -0
- package/dist/components/date-picker/time-range-picker.js +135 -0
- package/dist/components/drawer/drawer-events.d.ts +28 -0
- package/dist/components/drawer/drawer-events.js +14 -0
- package/dist/components/drawer/drawer.d.ts +33 -0
- package/dist/components/drawer/drawer.js +86 -0
- package/dist/components/drawer/drawer.module.css.js +34 -0
- package/dist/components/drawer/drawes.d.ts +4 -0
- package/dist/components/drawer/drawes.js +82 -0
- package/dist/components/drawer/index.d.ts +4 -0
- package/dist/components/drawer/index.js +9 -0
- package/dist/components/filter/filter-popover.d.ts +11 -0
- package/dist/components/filter/filter-popover.js +53 -0
- package/dist/components/filter/filter.d.ts +5 -0
- package/dist/components/filter/filter.js +29 -0
- package/dist/components/filter/filter.module.css.js +12 -0
- package/dist/components/filter/filter.types.d.ts +27 -0
- package/dist/components/filter/filter.types.js +1 -0
- package/dist/components/filter/icon-filter.d.ts +6 -0
- package/dist/components/filter/icon-filter.js +25 -0
- package/dist/components/filter/index.d.ts +4 -0
- package/dist/components/filter/index.js +9 -0
- package/dist/components/filter/multi-filter.d.ts +5 -0
- package/dist/components/filter/multi-filter.js +52 -0
- package/dist/components/flex/flex.d.ts +9 -0
- package/dist/components/flex/flex.js +28 -0
- package/dist/components/flex/flex.module.css.js +8 -0
- package/dist/components/flex/index.d.ts +2 -0
- package/dist/components/flex/index.js +5 -0
- package/dist/components/flex/layout.types.d.ts +69 -0
- package/dist/components/form-wrapper/form-item-wrapper-defaults-context.d.ts +10 -0
- package/dist/components/form-wrapper/form-item-wrapper-defaults-context.js +19 -0
- package/dist/components/form-wrapper/form-item-wrapper.d.ts +5 -0
- package/dist/components/form-wrapper/form-item-wrapper.js +111 -0
- package/dist/components/form-wrapper/form-item-wrapper.module.css.js +28 -0
- package/dist/components/form-wrapper/form-wrapper.types.d.ts +15 -0
- package/dist/components/form-wrapper/index.d.ts +3 -0
- package/dist/components/form-wrapper/index.js +8 -0
- package/dist/components/group/group.d.ts +8 -0
- package/dist/components/group/group.js +36 -0
- package/dist/components/group/group.module.css.js +8 -0
- package/dist/components/group/index.d.ts +1 -0
- package/dist/components/group/index.js +5 -0
- package/dist/components/icon-button/icon-button.d.ts +20 -0
- package/dist/components/icon-button/icon-button.js +20 -0
- package/dist/components/icon-button/icon-button.module.css.js +8 -0
- package/dist/components/icon-button/icon-button.types.d.ts +7 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/icon-button/index.js +5 -0
- package/dist/components/link-button/index.d.ts +1 -0
- package/dist/components/link-button/index.js +5 -0
- package/dist/components/link-button/link-button.d.ts +31 -0
- package/dist/components/link-button/link-button.js +31 -0
- package/dist/components/link-icon-button/index.d.ts +1 -0
- package/dist/components/link-icon-button/index.js +5 -0
- package/dist/components/link-icon-button/link-icon-button.d.ts +37 -0
- package/dist/components/link-icon-button/link-icon-button.js +30 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/index.js +5 -0
- package/dist/components/menu/menu.d.ts +33 -0
- package/dist/components/menu/menu.js +17 -0
- package/dist/components/menu/menu.types.d.ts +46 -0
- package/dist/components/message/index.d.ts +2 -0
- package/dist/components/message/index.js +5 -0
- package/dist/components/message/message.d.ts +2 -0
- package/dist/components/message/message.js +42 -0
- package/dist/components/message/message.module.css.js +14 -0
- package/dist/components/message/message.types.d.ts +7 -0
- package/dist/components/message/messages.d.ts +10 -0
- package/dist/components/message/messages.js +37 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +5 -0
- package/dist/components/modal/modal.d.ts +6 -0
- package/dist/components/modal/modal.js +51 -0
- package/dist/components/modal/modal.module.css.js +10 -0
- package/dist/components/multi-select/base-multi-select.d.ts +3 -0
- package/dist/components/multi-select/base-multi-select.js +100 -0
- package/dist/components/multi-select/index.d.ts +1 -0
- package/dist/components/multi-select/index.js +5 -0
- package/dist/components/multi-select/multi-select-input.d.ts +29 -0
- package/dist/components/multi-select/multi-select-input.js +74 -0
- package/dist/components/multi-select/multi-select.d.ts +28 -0
- package/dist/components/multi-select/multi-select.js +34 -0
- package/dist/components/multi-select/multi-select.mobile.d.ts +4 -0
- package/dist/components/multi-select/multi-select.mobile.js +59 -0
- package/dist/components/multi-select/multi-select.types.d.ts +56 -0
- package/dist/components/multi-select/multi-select.types.js +1 -0
- package/dist/components/multi-select/styles/base-multi-select.module.css.js +16 -0
- package/dist/components/notifications/index.d.ts +3 -0
- package/dist/components/notifications/index.js +7 -0
- package/dist/components/notifications/notification.d.ts +11 -0
- package/dist/components/notifications/notification.js +79 -0
- package/dist/components/notifications/notification.module.css.js +14 -0
- package/dist/components/notifications/notification.types.d.ts +25 -0
- package/dist/components/notifications/notifications.d.ts +42 -0
- package/dist/components/notifications/notifications.js +42 -0
- package/dist/components/number-input/index.d.ts +2 -0
- package/dist/components/number-input/index.js +5 -0
- package/dist/components/number-input/number-input.d.ts +8 -0
- package/dist/components/number-input/number-input.js +161 -0
- package/dist/components/number-input/number-input.module.css.js +8 -0
- package/dist/components/number-input/number-input.types.d.ts +65 -0
- package/dist/components/paper/index.d.ts +1 -0
- package/dist/components/paper/index.js +5 -0
- package/dist/components/paper/paper.d.ts +7 -0
- package/dist/components/paper/paper.js +15 -0
- package/dist/components/paper/paper.module.css.js +8 -0
- package/dist/components/password-input/index.d.ts +2 -0
- package/dist/components/password-input/index.js +5 -0
- package/dist/components/password-input/password-input.d.ts +15 -0
- package/dist/components/password-input/password-input.js +32 -0
- package/dist/components/popover/hooks.d.ts +17 -0
- package/dist/components/popover/hooks.js +131 -0
- package/dist/components/popover/index.d.ts +8 -0
- package/dist/components/popover/index.js +13 -0
- package/dist/components/popover/popover-context.d.ts +4 -0
- package/dist/components/popover/popover-context.js +16 -0
- package/dist/components/popover/popover-dropdown.d.ts +3 -0
- package/dist/components/popover/popover-dropdown.js +149 -0
- package/dist/components/popover/popover-stack.d.ts +10 -0
- package/dist/components/popover/popover-stack.js +24 -0
- package/dist/components/popover/popover-target.d.ts +3 -0
- package/dist/components/popover/popover-target.js +55 -0
- package/dist/components/popover/popover.d.ts +3 -0
- package/dist/components/popover/popover.js +175 -0
- package/dist/components/popover/popover.types.d.ts +211 -0
- package/dist/components/popover/styles/popover.module.css.js +12 -0
- package/dist/components/radio/index.d.ts +8 -0
- package/dist/components/radio/index.js +12 -0
- package/dist/components/radio/radio-group.d.ts +18 -0
- package/dist/components/radio/radio-group.js +54 -0
- package/dist/components/radio/radio-variables.module.css.js +8 -0
- package/dist/components/radio/radio.d.ts +17 -0
- package/dist/components/radio/radio.js +56 -0
- package/dist/components/radio/radio.module.css.js +14 -0
- package/dist/components/radio/radio.types.d.ts +59 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.js +5 -0
- package/dist/components/select/select.d.ts +15 -0
- package/dist/components/select/select.js +48 -0
- package/dist/components/select/select.mobile.d.ts +12 -0
- package/dist/components/select/select.mobile.js +53 -0
- package/dist/components/stack/index.d.ts +1 -0
- package/dist/components/stack/index.js +5 -0
- package/dist/components/stack/stack.d.ts +6 -0
- package/dist/components/stack/stack.js +10 -0
- package/dist/components/sticky-box.d.ts +2 -0
- package/dist/components/sticky-box.js +10 -0
- package/dist/components/switch/index.d.ts +4 -0
- package/dist/components/switch/index.js +7 -0
- package/dist/components/switch/switch-group.d.ts +26 -0
- package/dist/components/switch/switch-group.js +12 -0
- package/dist/components/switch/switch.d.ts +27 -0
- package/dist/components/switch/switch.js +23 -0
- package/dist/components/switch/switch.module.css.js +7 -0
- package/dist/components/tab/index.d.ts +7 -0
- package/dist/components/tab/index.js +13 -0
- package/dist/components/tab/styles/tabs-variables.module.css.js +8 -0
- package/dist/components/tab/styles/tabs.module.css.js +22 -0
- package/dist/components/tab/subs/tabs-link-tab.d.ts +10 -0
- package/dist/components/tab/subs/tabs-link-tab.js +28 -0
- package/dist/components/tab/subs/tabs-list.d.ts +6 -0
- package/dist/components/tab/subs/tabs-list.js +59 -0
- package/dist/components/tab/subs/tabs-panel.d.ts +6 -0
- package/dist/components/tab/subs/tabs-panel.js +40 -0
- package/dist/components/tab/subs/tabs-tab.d.ts +6 -0
- package/dist/components/tab/subs/tabs-tab.js +52 -0
- package/dist/components/tab/tabs-context.d.ts +3 -0
- package/dist/components/tab/tabs-context.js +13 -0
- package/dist/components/tab/tabs.d.ts +20 -0
- package/dist/components/tab/tabs.js +83 -0
- package/dist/components/tab/tabs.types.d.ts +107 -0
- package/dist/components/tab/use-tabs-data-props.d.ts +9 -0
- package/dist/components/tab/use-tabs-data-props.js +12 -0
- package/dist/components/tab/use-tabs-keyboard-navigation.d.ts +13 -0
- package/dist/components/tab/use-tabs-keyboard-navigation.js +44 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.js +16 -0
- package/dist/components/table/table.d.ts +23 -0
- package/dist/components/table/table.js +159 -0
- package/dist/components/table/table.module.css.js +56 -0
- package/dist/components/table/table.types.d.ts +55 -0
- package/dist/components/table-pagination/index.d.ts +3 -0
- package/dist/components/table-pagination/index.js +8 -0
- package/dist/components/table-pagination/pagination.d.ts +10 -0
- package/dist/components/table-pagination/pagination.js +115 -0
- package/dist/components/table-pagination/pagination.module.css.js +14 -0
- package/dist/components/table-pagination/table-pagination.d.ts +15 -0
- package/dist/components/table-pagination/table-pagination.js +123 -0
- package/dist/components/table-pagination/table-pagination.module.css.js +18 -0
- package/dist/components/tag/closable-tag.d.ts +2 -0
- package/dist/components/tag/closable-tag.js +35 -0
- package/dist/components/tag/icon-tag.d.ts +2 -0
- package/dist/components/tag/icon-tag.js +36 -0
- package/dist/components/tag/index.d.ts +5 -0
- package/dist/components/tag/index.js +11 -0
- package/dist/components/tag/link-tag.d.ts +11 -0
- package/dist/components/tag/link-tag.js +31 -0
- package/dist/components/tag/styles/tag-variables.module.css.js +8 -0
- package/dist/components/tag/styles/tag.module.css.js +18 -0
- package/dist/components/tag/tag.d.ts +28 -0
- package/dist/components/tag/tag.js +40 -0
- package/dist/components/tag/tag.types.d.ts +72 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/index.js +5 -0
- package/dist/components/text/text.d.ts +3 -0
- package/dist/components/text/text.js +36 -0
- package/dist/components/text/text.module.css.js +8 -0
- package/dist/components/text/text.types.d.ts +11 -0
- package/dist/components/text-area/index.d.ts +2 -0
- package/dist/components/text-area/index.js +5 -0
- package/dist/components/text-area/text-area.d.ts +9 -0
- package/dist/components/text-area/text-area.js +125 -0
- package/dist/components/text-area/text-area.module.css.js +22 -0
- package/dist/components/text-area/text-area.types.d.ts +46 -0
- package/dist/components/text-input/index.d.ts +2 -0
- package/dist/components/text-input/index.js +5 -0
- package/dist/components/text-input/text-input.d.ts +14 -0
- package/dist/components/text-input/text-input.js +24 -0
- package/dist/components/tooltip/floating-arrow.d.ts +13 -0
- package/dist/components/tooltip/floating-arrow.js +40 -0
- package/dist/components/tooltip/get-arrow-position-styles.d.ts +11 -0
- package/dist/components/tooltip/get-arrow-position-styles.js +63 -0
- package/dist/components/tooltip/index.d.ts +54 -0
- package/dist/components/tooltip/index.js +150 -0
- package/dist/components/tooltip/styles.module.css.js +10 -0
- package/dist/components/tooltip/types.d.ts +13 -0
- package/dist/components/tooltip/use-merged-events.d.ts +18 -0
- package/dist/components/tooltip/use-merged-events.js +22 -0
- package/dist/components/tooltip/use-tooltip-trigger.d.ts +13 -0
- package/dist/components/tooltip/use-tooltip-trigger.js +59 -0
- package/dist/components/tooltip/utils.d.ts +4 -0
- package/dist/components/tooltip/utils.js +35 -0
- package/dist/components/tree/hooks/use-custom-click-behavior-feature.d.ts +16 -0
- package/dist/components/tree/hooks/use-custom-click-behavior-feature.js +125 -0
- package/dist/components/tree/hooks/use-tree-animation.d.ts +12 -0
- package/dist/components/tree/hooks/use-tree-animation.js +111 -0
- package/dist/components/tree/hooks/use-tree-config.d.ts +22 -0
- package/dist/components/tree/hooks/use-tree-config.js +96 -0
- package/dist/components/tree/hooks/use-tree-search.d.ts +19 -0
- package/dist/components/tree/hooks/use-tree-search.js +57 -0
- package/dist/components/tree/hooks/use-tree-value.d.ts +16 -0
- package/dist/components/tree/hooks/use-tree-value.js +37 -0
- package/dist/components/tree/hooks/use-tree.d.ts +13 -0
- package/dist/components/tree/hooks/use-tree.js +111 -0
- package/dist/components/tree/index.d.ts +7 -0
- package/dist/components/tree/index.js +16 -0
- package/dist/components/tree/styles/tree.module.css.js +44 -0
- package/dist/components/tree/tree-content.d.ts +15 -0
- package/dist/components/tree/tree-content.js +77 -0
- package/dist/components/tree/tree-context.d.ts +19 -0
- package/dist/components/tree/tree-context.js +13 -0
- package/dist/components/tree/tree-node-list.d.ts +9 -0
- package/dist/components/tree/tree-node-list.js +21 -0
- package/dist/components/tree/tree-node.d.ts +11 -0
- package/dist/components/tree/tree-node.js +137 -0
- package/dist/components/tree/tree.d.ts +20 -0
- package/dist/components/tree/tree.js +22 -0
- package/dist/components/tree/tree.types.d.ts +126 -0
- package/dist/components/tree-select/index.d.ts +2 -0
- package/dist/components/tree-select/index.js +5 -0
- package/dist/components/tree-select/styles/tree-select.module.css.js +20 -0
- package/dist/components/tree-select/tree-select-dropdown.d.ts +9 -0
- package/dist/components/tree-select/tree-select-dropdown.js +36 -0
- package/dist/components/tree-select/tree-select-target.d.ts +18 -0
- package/dist/components/tree-select/tree-select-target.js +116 -0
- package/dist/components/tree-select/tree-select.d.ts +21 -0
- package/dist/components/tree-select/tree-select.js +201 -0
- package/dist/components/tree-select/tree-select.types.d.ts +39 -0
- package/dist/components/unstyled-button/index.d.ts +1 -0
- package/dist/components/unstyled-button/index.js +5 -0
- package/dist/components/unstyled-button/unstyled-button.d.ts +3 -0
- package/dist/components/unstyled-button/unstyled-button.js +19 -0
- package/dist/components/unstyled-button/unstyled-button.module.css.js +8 -0
- package/dist/components/virtualized-tree-select/index.d.ts +2 -0
- package/dist/components/virtualized-tree-select/index.js +5 -0
- package/dist/components/virtualized-tree-select/virtualized-tree-select.d.ts +25 -0
- package/dist/components/virtualized-tree-select/virtualized-tree-select.js +253 -0
- package/dist/components/virtualized-tree-select/virtualized-tree-select.module.css.js +20 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.js +214 -0
- package/dist/locale/ar.d.ts +2 -0
- package/dist/locale/ar.js +58 -0
- package/dist/locale/en.d.ts +2 -0
- package/dist/locale/en.js +58 -0
- package/dist/locale/index.d.ts +6 -0
- package/dist/locale/index.js +15 -0
- package/dist/locale/ko.d.ts +2 -0
- package/dist/locale/ko.js +58 -0
- package/dist/locale/types.d.ts +55 -0
- package/dist/locale/types.js +8 -0
- package/dist/locale/zh-Hans.d.ts +2 -0
- package/dist/locale/zh-Hans.js +58 -0
- package/dist/locale/zh-Hant.d.ts +2 -0
- package/dist/locale/zh-Hant.js +58 -0
- package/dist/node_modules/.pnpm/react-number-format@5.4.5_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-number-format/dist/react-number-format.es.js +572 -0
- package/dist/provider/hooks.d.ts +24 -0
- package/dist/provider/hooks.js +26 -0
- package/dist/provider/index.d.ts +7 -0
- package/dist/provider/index.js +16 -0
- package/dist/provider/ui-context.d.ts +16 -0
- package/dist/provider/ui-context.js +14 -0
- package/dist/provider/ui-link.d.ts +22 -0
- package/dist/provider/ui-link.js +10 -0
- package/dist/provider/ui-provider.d.ts +19 -0
- package/dist/provider/ui-provider.js +21 -0
- package/package.json +198 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as z, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as B } from "clsx";
|
|
4
|
+
import "../../../../provider/ui-context.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { useLocale as D } from "../../../../provider/hooks.js";
|
|
7
|
+
import { Button as F } from "../../../button/button.js";
|
|
8
|
+
import { toDayjs as n } from "../../hooks/use-date-parser.js";
|
|
9
|
+
import l from "../../styles/range-panel.module.css.js";
|
|
10
|
+
import { CalendarPanel as H } from "../common/calendar-panel.js";
|
|
11
|
+
import { PickerFooter as L } from "../common/picker-footer.js";
|
|
12
|
+
import { TimeInputRow as M } from "../common/time-input-row.js";
|
|
13
|
+
const X = ({
|
|
14
|
+
currentRange: t,
|
|
15
|
+
hover: s,
|
|
16
|
+
viewMonth: c,
|
|
17
|
+
minDate: f,
|
|
18
|
+
maxDate: p,
|
|
19
|
+
shouldDisableDate: d,
|
|
20
|
+
classNames: r,
|
|
21
|
+
withTime: h = !0,
|
|
22
|
+
withSeconds: u = !1,
|
|
23
|
+
use12Hours: v = !1,
|
|
24
|
+
hourStep: g,
|
|
25
|
+
minuteStep: b,
|
|
26
|
+
secondStep: S,
|
|
27
|
+
disabledTimeStart: T,
|
|
28
|
+
disabledTimeEnd: j,
|
|
29
|
+
presets: m,
|
|
30
|
+
onViewMonthChange: C,
|
|
31
|
+
onSelect: P,
|
|
32
|
+
onHover: k,
|
|
33
|
+
onTimeChange: y,
|
|
34
|
+
onCommitPreset: E,
|
|
35
|
+
onCancel: I,
|
|
36
|
+
onConfirm: N,
|
|
37
|
+
confirmDisabled: w
|
|
38
|
+
}) => {
|
|
39
|
+
const i = D();
|
|
40
|
+
return /* @__PURE__ */ z("div", { className: l.root, children: [
|
|
41
|
+
/* @__PURE__ */ o(
|
|
42
|
+
H,
|
|
43
|
+
{
|
|
44
|
+
rangeStart: t[0],
|
|
45
|
+
rangeEnd: t[1],
|
|
46
|
+
rangeHover: s,
|
|
47
|
+
numberOfMonths: 1,
|
|
48
|
+
viewMonth: c,
|
|
49
|
+
onViewMonthChange: C,
|
|
50
|
+
onSelect: P,
|
|
51
|
+
onHover: k,
|
|
52
|
+
minDate: f,
|
|
53
|
+
maxDate: p,
|
|
54
|
+
shouldDisableDate: d,
|
|
55
|
+
classNames: r
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
h && /* @__PURE__ */ o("div", { className: l.timeSection, children: [0, 1].map((e) => /* @__PURE__ */ o(
|
|
59
|
+
M,
|
|
60
|
+
{
|
|
61
|
+
label: e === 0 ? i.startTime || "Start time" : i.endTime || "End time",
|
|
62
|
+
d: t[e],
|
|
63
|
+
withSeconds: u,
|
|
64
|
+
use12Hours: v,
|
|
65
|
+
hourStep: g,
|
|
66
|
+
minuteStep: b,
|
|
67
|
+
secondStep: S,
|
|
68
|
+
...e === 0 ? T : j,
|
|
69
|
+
onTimeChange: (a) => y?.(e, a)
|
|
70
|
+
},
|
|
71
|
+
e
|
|
72
|
+
)) }),
|
|
73
|
+
m && m.length > 0 && /* @__PURE__ */ o("div", { className: B(r?.presets, l.presetSection), children: m.map((e) => /* @__PURE__ */ o(
|
|
74
|
+
F,
|
|
75
|
+
{
|
|
76
|
+
variant: "light",
|
|
77
|
+
color: "regular",
|
|
78
|
+
size: "xs",
|
|
79
|
+
className: r?.presetItem,
|
|
80
|
+
onClick: () => {
|
|
81
|
+
const a = n(e.value[0]), x = n(e.value[1]);
|
|
82
|
+
E([a, x]);
|
|
83
|
+
},
|
|
84
|
+
children: e.label
|
|
85
|
+
},
|
|
86
|
+
e.label
|
|
87
|
+
)) }),
|
|
88
|
+
/* @__PURE__ */ o(
|
|
89
|
+
L,
|
|
90
|
+
{
|
|
91
|
+
className: r?.footer,
|
|
92
|
+
confirmDisabled: w,
|
|
93
|
+
onCancel: I,
|
|
94
|
+
onConfirm: N
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] });
|
|
98
|
+
};
|
|
99
|
+
export {
|
|
100
|
+
X as RangePanel
|
|
101
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RangeShellProps } from '../../date-picker.types';
|
|
2
|
+
/**
|
|
3
|
+
* 范围选择器外壳。
|
|
4
|
+
* 共享一个只读的输入框展示「起始 `separator` 结束」格式。
|
|
5
|
+
*/
|
|
6
|
+
export declare const RangeShell: ({ id, opened, onOpenChange, values, canClear, defaultIconName, placeholder, clearable, disabled, readOnly, withinPortal, error, leftSection, rightSection, className, classNames, separator, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, onClear, renderPanel, }: RangeShellProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as V, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as i } from "clsx";
|
|
4
|
+
import { useRef as m, useMemo as d } from "react";
|
|
5
|
+
import { Popover as n } from "../../../popover/index.js";
|
|
6
|
+
import c from "../../styles/picker-shell.module.css.js";
|
|
7
|
+
import { PickerRightSection as q } from "../common/picker-sections.js";
|
|
8
|
+
import { PickerTargetInput as v } from "../common/picker-target-input.js";
|
|
9
|
+
import { PickerFocusContext as z } from "../picker-focus-context.js";
|
|
10
|
+
const O = ({
|
|
11
|
+
id: s,
|
|
12
|
+
opened: b,
|
|
13
|
+
onOpenChange: h,
|
|
14
|
+
values: r,
|
|
15
|
+
canClear: x,
|
|
16
|
+
defaultIconName: g = "calendar",
|
|
17
|
+
placeholder: R,
|
|
18
|
+
clearable: w = !0,
|
|
19
|
+
disabled: t,
|
|
20
|
+
readOnly: u,
|
|
21
|
+
withinPortal: y = !0,
|
|
22
|
+
error: P,
|
|
23
|
+
leftSection: S,
|
|
24
|
+
rightSection: F,
|
|
25
|
+
className: k,
|
|
26
|
+
classNames: e,
|
|
27
|
+
separator: p = "~",
|
|
28
|
+
"aria-label": $,
|
|
29
|
+
"aria-labelledby": l,
|
|
30
|
+
"aria-describedby": j,
|
|
31
|
+
onClear: C,
|
|
32
|
+
renderPanel: I
|
|
33
|
+
}) => {
|
|
34
|
+
const a = m(null), f = m(null), T = d(
|
|
35
|
+
() => ({
|
|
36
|
+
register: (M) => {
|
|
37
|
+
a.current = M;
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
[]
|
|
41
|
+
), D = d(() => !r[0] && !r[1] ? "" : `${r[0] || ""} ${p} ${r[1] || ""}`, [r, p]);
|
|
42
|
+
return /* @__PURE__ */ V(
|
|
43
|
+
n,
|
|
44
|
+
{
|
|
45
|
+
opened: b,
|
|
46
|
+
onOpenChange: h,
|
|
47
|
+
position: "bottom-start",
|
|
48
|
+
offset: 4,
|
|
49
|
+
disabled: t || u,
|
|
50
|
+
trapFocus: !0,
|
|
51
|
+
initialFocusRef: a,
|
|
52
|
+
restoreFocus: () => f.current?.focus(),
|
|
53
|
+
"aria-labelledby": l,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ o(n.Target, { role: "combobox", children: /* @__PURE__ */ o(
|
|
56
|
+
v,
|
|
57
|
+
{
|
|
58
|
+
inputRef: f,
|
|
59
|
+
id: s,
|
|
60
|
+
imeSafe: !1,
|
|
61
|
+
value: D,
|
|
62
|
+
readOnly: !0,
|
|
63
|
+
placeholder: R,
|
|
64
|
+
disabled: t,
|
|
65
|
+
error: P,
|
|
66
|
+
pointer: !0,
|
|
67
|
+
"aria-label": $,
|
|
68
|
+
"aria-labelledby": l,
|
|
69
|
+
"aria-describedby": j,
|
|
70
|
+
renderLeftSection: S,
|
|
71
|
+
leftIconName: g,
|
|
72
|
+
renderRightSection: /* @__PURE__ */ o(
|
|
73
|
+
q,
|
|
74
|
+
{
|
|
75
|
+
rightSection: F,
|
|
76
|
+
clearable: w,
|
|
77
|
+
canClear: x,
|
|
78
|
+
disabled: t,
|
|
79
|
+
readOnly: u,
|
|
80
|
+
onClear: C
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
classNames: {
|
|
84
|
+
...e?.input,
|
|
85
|
+
wrapper: i(
|
|
86
|
+
c.root,
|
|
87
|
+
e?.root,
|
|
88
|
+
k,
|
|
89
|
+
e?.input?.wrapper
|
|
90
|
+
),
|
|
91
|
+
input: i(c.input, e?.input?.input)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
) }),
|
|
95
|
+
/* @__PURE__ */ o(
|
|
96
|
+
n.Dropdown,
|
|
97
|
+
{
|
|
98
|
+
className: i(c.dropdown, e?.dropdown),
|
|
99
|
+
radius: "sm",
|
|
100
|
+
withinPortal: y,
|
|
101
|
+
children: /* @__PURE__ */ o(z.Provider, { value: T, children: I() })
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
export {
|
|
109
|
+
O as RangeShell
|
|
110
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PickerShellProps } from '../../date-picker.types';
|
|
2
|
+
/**
|
|
3
|
+
* 单值选择器外壳。
|
|
4
|
+
* 提供输入框及 Popover 容器。
|
|
5
|
+
*/
|
|
6
|
+
export declare const PickerShell: ({ id, opened, onOpenChange, value, canClear, defaultIconName, placeholder, clearable, disabled, readOnly, withinPortal, error, leftSection, rightSection, className, classNames, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, onClear, renderPanel, }: PickerShellProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as T, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as t } from "clsx";
|
|
4
|
+
import { useRef as a, useMemo as D } from "react";
|
|
5
|
+
import { Popover as i } from "../../../popover/index.js";
|
|
6
|
+
import n from "../../styles/picker-shell.module.css.js";
|
|
7
|
+
import { PickerRightSection as M } from "../common/picker-sections.js";
|
|
8
|
+
import { PickerTargetInput as q } from "../common/picker-target-input.js";
|
|
9
|
+
import { PickerFocusContext as z } from "../picker-focus-context.js";
|
|
10
|
+
const O = ({
|
|
11
|
+
id: s,
|
|
12
|
+
opened: m,
|
|
13
|
+
onOpenChange: f,
|
|
14
|
+
value: d,
|
|
15
|
+
canClear: b,
|
|
16
|
+
defaultIconName: h = "calendar",
|
|
17
|
+
placeholder: x,
|
|
18
|
+
clearable: P = !0,
|
|
19
|
+
disabled: o,
|
|
20
|
+
readOnly: c,
|
|
21
|
+
withinPortal: g = !0,
|
|
22
|
+
error: w,
|
|
23
|
+
leftSection: R,
|
|
24
|
+
rightSection: S,
|
|
25
|
+
className: k,
|
|
26
|
+
classNames: r,
|
|
27
|
+
"aria-label": y,
|
|
28
|
+
"aria-labelledby": u,
|
|
29
|
+
"aria-describedby": F,
|
|
30
|
+
onClear: v,
|
|
31
|
+
renderPanel: j
|
|
32
|
+
}) => {
|
|
33
|
+
const p = a(null), l = a(null), C = D(
|
|
34
|
+
() => ({
|
|
35
|
+
register: (I) => {
|
|
36
|
+
p.current = I;
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
[]
|
|
40
|
+
);
|
|
41
|
+
return /* @__PURE__ */ T(
|
|
42
|
+
i,
|
|
43
|
+
{
|
|
44
|
+
opened: m,
|
|
45
|
+
onOpenChange: f,
|
|
46
|
+
position: "bottom-start",
|
|
47
|
+
offset: 4,
|
|
48
|
+
disabled: o || c,
|
|
49
|
+
trapFocus: !0,
|
|
50
|
+
initialFocusRef: p,
|
|
51
|
+
restoreFocus: () => l.current?.focus(),
|
|
52
|
+
"aria-labelledby": u,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e(i.Target, { role: "combobox", children: /* @__PURE__ */ e(
|
|
55
|
+
q,
|
|
56
|
+
{
|
|
57
|
+
inputRef: l,
|
|
58
|
+
id: s,
|
|
59
|
+
imeSafe: !1,
|
|
60
|
+
value: d,
|
|
61
|
+
readOnly: !0,
|
|
62
|
+
placeholder: x,
|
|
63
|
+
disabled: o,
|
|
64
|
+
error: w,
|
|
65
|
+
pointer: !0,
|
|
66
|
+
"aria-label": y,
|
|
67
|
+
"aria-labelledby": u,
|
|
68
|
+
"aria-describedby": F,
|
|
69
|
+
renderLeftSection: R,
|
|
70
|
+
leftIconName: h,
|
|
71
|
+
renderRightSection: /* @__PURE__ */ e(
|
|
72
|
+
M,
|
|
73
|
+
{
|
|
74
|
+
rightSection: S,
|
|
75
|
+
clearable: P,
|
|
76
|
+
canClear: b,
|
|
77
|
+
disabled: o,
|
|
78
|
+
readOnly: c,
|
|
79
|
+
onClear: v
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
classNames: {
|
|
83
|
+
...r?.input,
|
|
84
|
+
wrapper: t(
|
|
85
|
+
n.root,
|
|
86
|
+
r?.root,
|
|
87
|
+
k,
|
|
88
|
+
r?.input?.wrapper
|
|
89
|
+
),
|
|
90
|
+
input: t(n.input, r?.input?.input)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
) }),
|
|
94
|
+
/* @__PURE__ */ e(
|
|
95
|
+
i.Dropdown,
|
|
96
|
+
{
|
|
97
|
+
className: t(n.dropdown, r?.dropdown),
|
|
98
|
+
radius: "sm",
|
|
99
|
+
withinPortal: g,
|
|
100
|
+
children: /* @__PURE__ */ e(z.Provider, { value: C, children: j() })
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
O as PickerShell
|
|
109
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import { useId as E, useUncontrolled as I } from "@mantine/hooks";
|
|
4
|
+
import { useState as h } from "react";
|
|
5
|
+
import { dayjs as a } from "../../common/dayjs.js";
|
|
6
|
+
import { useFormWrapperProps as j } from "../../common/use-form-wrapper-props.js";
|
|
7
|
+
import { FormItemWrapper as k } from "../form-wrapper/form-item-wrapper.js";
|
|
8
|
+
import { CalendarPanel as q } from "./components/common/calendar-panel.js";
|
|
9
|
+
import { PickerShell as x } from "./components/single/picker-shell.js";
|
|
10
|
+
import { formatOrEmpty as p, toDate as b } from "./hooks/use-date-parser.js";
|
|
11
|
+
const T = (o) => {
|
|
12
|
+
const n = E(o.id), { wrapProps: i, rest: C, outerDescribedBy: D, formProps: l } = j(
|
|
13
|
+
o,
|
|
14
|
+
n
|
|
15
|
+
), {
|
|
16
|
+
value: F,
|
|
17
|
+
onChange: N,
|
|
18
|
+
error: R,
|
|
19
|
+
defaultValue: g,
|
|
20
|
+
format: s = "YYYY-MM-DD",
|
|
21
|
+
minDate: V,
|
|
22
|
+
maxDate: P,
|
|
23
|
+
shouldDisableDate: v,
|
|
24
|
+
closeOnSelect: y = !0,
|
|
25
|
+
required: W,
|
|
26
|
+
borderRadius: B,
|
|
27
|
+
...t
|
|
28
|
+
} = C, m = l ? l.value : o.value, S = l?.error ?? o.error, [M, c] = h(!1), [e, u] = I({
|
|
29
|
+
value: m !== void 0 ? b(m) : void 0,
|
|
30
|
+
defaultValue: b(g ?? null),
|
|
31
|
+
finalValue: null,
|
|
32
|
+
onChange: (r) => {
|
|
33
|
+
l?.onChange?.(r), o.onChange?.(r, p(r, s));
|
|
34
|
+
}
|
|
35
|
+
}), [O, f] = h(
|
|
36
|
+
() => e ? a(e) : a()
|
|
37
|
+
), _ = p(e, s), w = (r) => {
|
|
38
|
+
r && f(e ? a(e) : a()), c(r);
|
|
39
|
+
}, Y = (r) => {
|
|
40
|
+
u(r.toDate()), y && c(!1);
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ d(k, { ...i, id: n, children: /* @__PURE__ */ d(
|
|
43
|
+
x,
|
|
44
|
+
{
|
|
45
|
+
...t,
|
|
46
|
+
id: n,
|
|
47
|
+
opened: M,
|
|
48
|
+
onOpenChange: w,
|
|
49
|
+
value: _,
|
|
50
|
+
canClear: !!e,
|
|
51
|
+
placeholder: t.placeholder ?? s,
|
|
52
|
+
error: S,
|
|
53
|
+
"aria-describedby": D,
|
|
54
|
+
"aria-labelledby": i.labelId ?? t["aria-labelledby"],
|
|
55
|
+
onClear: () => {
|
|
56
|
+
u(null);
|
|
57
|
+
},
|
|
58
|
+
renderPanel: () => /* @__PURE__ */ d(
|
|
59
|
+
q,
|
|
60
|
+
{
|
|
61
|
+
selectedDate: e ? a(e) : null,
|
|
62
|
+
viewMonth: O,
|
|
63
|
+
onViewMonthChange: f,
|
|
64
|
+
onSelect: Y,
|
|
65
|
+
minDate: V,
|
|
66
|
+
maxDate: P,
|
|
67
|
+
shouldDisableDate: v,
|
|
68
|
+
classNames: t.classNames
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
) });
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
T as DatePicker
|
|
76
|
+
};
|