@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,161 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a, Fragment as E, jsxs as B } from "react/jsx-runtime";
|
|
3
|
+
import { Stack as S, Divider as K, ScrollArea as L, Group as P } from "@mantine/core";
|
|
4
|
+
import { isValidElement as V, cloneElement as j, useState as x } from "react";
|
|
5
|
+
import "../../../provider/ui-context.js";
|
|
6
|
+
import { useLocale as N } from "../../../provider/hooks.js";
|
|
7
|
+
import { Button as D } from "../../button/button.js";
|
|
8
|
+
import { drawers as w } from "../../drawer/drawer-events.js";
|
|
9
|
+
import { TextInput as z } from "../../text-input/text-input.js";
|
|
10
|
+
import { ActionItem as M } from "./bottom-action-item.js";
|
|
11
|
+
import d from "./bottom-action.module.css.js";
|
|
12
|
+
const O = ({
|
|
13
|
+
items: p,
|
|
14
|
+
labelCenter: C,
|
|
15
|
+
selectType: i,
|
|
16
|
+
initialValue: c,
|
|
17
|
+
onItemClick: s,
|
|
18
|
+
onConfirm: k,
|
|
19
|
+
openSubMenu: b,
|
|
20
|
+
renderOption: A,
|
|
21
|
+
searchable: f
|
|
22
|
+
}) => {
|
|
23
|
+
const n = N(), [m, I] = x(""), [h, g] = x(
|
|
24
|
+
i === "multiple" && Array.isArray(c) ? c : []
|
|
25
|
+
), v = (e, t) => {
|
|
26
|
+
if (!t.disabled) {
|
|
27
|
+
if (t.children && t.children.length > 0) {
|
|
28
|
+
b(t.label ?? "", t.children);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (i === "multiple") {
|
|
32
|
+
if (!t.value) return;
|
|
33
|
+
g((u) => u.includes(t.value) ? u.filter((r) => r !== t.value) : [...u, t.value]);
|
|
34
|
+
} else
|
|
35
|
+
s(e, t);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ B(S, { gap: 0, children: [
|
|
39
|
+
f && /* @__PURE__ */ a(
|
|
40
|
+
z,
|
|
41
|
+
{
|
|
42
|
+
size: "lg",
|
|
43
|
+
leftIconName: "search",
|
|
44
|
+
className: d.searchInput,
|
|
45
|
+
value: m,
|
|
46
|
+
"aria-label": n.search,
|
|
47
|
+
onChange: (e) => {
|
|
48
|
+
I(e.target.value);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
!f && /* @__PURE__ */ a(K, { className: d.divider }),
|
|
53
|
+
/* @__PURE__ */ a(L.Autosize, { mah: "60vh", type: "auto", children: /* @__PURE__ */ a(S, { gap: 0, children: (f ? p.filter(
|
|
54
|
+
(e) => e.label?.toLowerCase()?.includes(m.toLowerCase())
|
|
55
|
+
) : p).map((e, t) => /* @__PURE__ */ a(
|
|
56
|
+
M,
|
|
57
|
+
{
|
|
58
|
+
labelCenter: C,
|
|
59
|
+
selectType: i,
|
|
60
|
+
value: i === "multiple" ? h : c,
|
|
61
|
+
currentItem: e,
|
|
62
|
+
handleItemClick: v,
|
|
63
|
+
renderOption: A
|
|
64
|
+
},
|
|
65
|
+
e.value ?? e.label ?? t
|
|
66
|
+
)) }) }),
|
|
67
|
+
i === "multiple" && /* @__PURE__ */ B(P, { className: d.footer, wrap: "nowrap", gap: 12, children: [
|
|
68
|
+
/* @__PURE__ */ a(
|
|
69
|
+
D,
|
|
70
|
+
{
|
|
71
|
+
className: d.footerButton,
|
|
72
|
+
variant: "stroke",
|
|
73
|
+
color: "regular",
|
|
74
|
+
onClick: () => {
|
|
75
|
+
g([]);
|
|
76
|
+
},
|
|
77
|
+
children: n.reset
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ a(
|
|
81
|
+
D,
|
|
82
|
+
{
|
|
83
|
+
className: d.footerButton,
|
|
84
|
+
variant: "primary",
|
|
85
|
+
color: "brand",
|
|
86
|
+
onClick: () => {
|
|
87
|
+
k?.(h), w.closeAll();
|
|
88
|
+
},
|
|
89
|
+
children: n.confirm
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
] })
|
|
93
|
+
] });
|
|
94
|
+
}, Y = ({
|
|
95
|
+
title: p,
|
|
96
|
+
labelCenter: C = !1,
|
|
97
|
+
actionItems: i,
|
|
98
|
+
onClick: c,
|
|
99
|
+
children: s,
|
|
100
|
+
selectType: k,
|
|
101
|
+
value: b,
|
|
102
|
+
onConfirm: A,
|
|
103
|
+
searchable: f,
|
|
104
|
+
disabled: n = !1,
|
|
105
|
+
triggerAriaLabel: m,
|
|
106
|
+
renderOption: I,
|
|
107
|
+
"data-testid": h
|
|
108
|
+
}) => {
|
|
109
|
+
const g = N(), v = () => {
|
|
110
|
+
n || u(p ?? "", i);
|
|
111
|
+
}, e = (o) => {
|
|
112
|
+
o.stopPropagation(), o.preventDefault(), v();
|
|
113
|
+
}, t = (o) => {
|
|
114
|
+
n || (o.key === "Enter" || o.key === " ") && (o.preventDefault(), o.stopPropagation(), v());
|
|
115
|
+
}, u = (o, l) => {
|
|
116
|
+
w.open({
|
|
117
|
+
title: o,
|
|
118
|
+
position: "bottom",
|
|
119
|
+
withCloseButton: !!o,
|
|
120
|
+
height: "fit-content",
|
|
121
|
+
noMinHeight: !0,
|
|
122
|
+
children: /* @__PURE__ */ a(
|
|
123
|
+
O,
|
|
124
|
+
{
|
|
125
|
+
renderOption: I,
|
|
126
|
+
items: l,
|
|
127
|
+
labelCenter: C,
|
|
128
|
+
selectType: k,
|
|
129
|
+
initialValue: b,
|
|
130
|
+
onItemClick: y,
|
|
131
|
+
onConfirm: A,
|
|
132
|
+
openSubMenu: u,
|
|
133
|
+
searchable: f
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
});
|
|
137
|
+
}, y = (o, l) => {
|
|
138
|
+
(l.type === "option" || !l.type) && (l.onClick && l.onClick(o, l), c && c(o, l), w.closeAll());
|
|
139
|
+
};
|
|
140
|
+
if (!V(s))
|
|
141
|
+
return s;
|
|
142
|
+
const r = s.props;
|
|
143
|
+
return /* @__PURE__ */ a(E, { children: j(s, {
|
|
144
|
+
role: r.role ?? "button",
|
|
145
|
+
tabIndex: n ? -1 : r.tabIndex ?? 0,
|
|
146
|
+
"aria-haspopup": "dialog",
|
|
147
|
+
"aria-disabled": n || r["aria-disabled"],
|
|
148
|
+
"data-testid": h ?? r["data-testid"],
|
|
149
|
+
"aria-label": r["aria-label"] ?? m ?? p ?? g.pleaseSelect,
|
|
150
|
+
onClick: (o) => {
|
|
151
|
+
r.onClick?.(o), e(o);
|
|
152
|
+
},
|
|
153
|
+
onKeyDown: (o) => {
|
|
154
|
+
r.onKeyDown?.(o), t(o);
|
|
155
|
+
}
|
|
156
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
157
|
+
}) });
|
|
158
|
+
};
|
|
159
|
+
export {
|
|
160
|
+
Y as BottomAction
|
|
161
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = "_searchInput_1n8vw_2", t = "_divider_1n8vw_6", n = "_footer_1n8vw_10", o = "_footerButton_1n8vw_15", r = "_itemDivider_1n8vw_19", _ = "_thickDivider_1n8vw_23", i = "_itemLabelHeader_1n8vw_28", c = "_itemLabelHeaderCenter_1n8vw_35", a = "_rowWrap_1n8vw_39", w = "_disabledOverlay_1n8vw_44", v = "_row_1n8vw_39", s = "_rowButton_1n8vw_62", d = "_rowMain_1n8vw_71", l = "_rowMainCenter_1n8vw_76", b = "_itemIcon_1n8vw_80", m = "_label_1n8vw_84", p = "_rowSide_1n8vw_99", h = "_itemDescription_1n8vw_103", u = "_chevron_1n8vw_108", D = "_checkboxWrap_1n8vw_112", f = {
|
|
3
|
+
searchInput: e,
|
|
4
|
+
divider: t,
|
|
5
|
+
footer: n,
|
|
6
|
+
footerButton: o,
|
|
7
|
+
itemDivider: r,
|
|
8
|
+
thickDivider: _,
|
|
9
|
+
itemLabelHeader: i,
|
|
10
|
+
itemLabelHeaderCenter: c,
|
|
11
|
+
rowWrap: a,
|
|
12
|
+
disabledOverlay: w,
|
|
13
|
+
row: v,
|
|
14
|
+
rowButton: s,
|
|
15
|
+
rowMain: d,
|
|
16
|
+
rowMainCenter: l,
|
|
17
|
+
itemIcon: b,
|
|
18
|
+
label: m,
|
|
19
|
+
rowSide: p,
|
|
20
|
+
itemDescription: h,
|
|
21
|
+
chevron: u,
|
|
22
|
+
checkboxWrap: D
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
D as checkboxWrap,
|
|
26
|
+
u as chevron,
|
|
27
|
+
f as default,
|
|
28
|
+
w as disabledOverlay,
|
|
29
|
+
t as divider,
|
|
30
|
+
n as footer,
|
|
31
|
+
o as footerButton,
|
|
32
|
+
h as itemDescription,
|
|
33
|
+
r as itemDivider,
|
|
34
|
+
b as itemIcon,
|
|
35
|
+
i as itemLabelHeader,
|
|
36
|
+
c as itemLabelHeaderCenter,
|
|
37
|
+
m as label,
|
|
38
|
+
v as row,
|
|
39
|
+
s as rowButton,
|
|
40
|
+
d as rowMain,
|
|
41
|
+
l as rowMainCenter,
|
|
42
|
+
p as rowSide,
|
|
43
|
+
a as rowWrap,
|
|
44
|
+
e as searchInput,
|
|
45
|
+
_ as thickDivider
|
|
46
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { IconButtonProps } from '../../icon-button';
|
|
2
|
+
import { RenderOptionFunction } from '../base-select/common/select.types';
|
|
3
|
+
import type { IconName } from '@wisdomgarden/torque-icons';
|
|
4
|
+
export interface BottomActionItem {
|
|
5
|
+
'data-testid'?: string;
|
|
6
|
+
/**
|
|
7
|
+
* 可用于业务中判断点击了哪一项
|
|
8
|
+
*/
|
|
9
|
+
value?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 菜单项的标签
|
|
12
|
+
*/
|
|
13
|
+
label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* 菜单项的提示文字
|
|
16
|
+
*/
|
|
17
|
+
description?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 菜单项的左侧图标
|
|
20
|
+
*/
|
|
21
|
+
leftIconName?: IconName;
|
|
22
|
+
/**
|
|
23
|
+
* 菜单项的左侧图标的类名
|
|
24
|
+
*/
|
|
25
|
+
leftIconClassName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 菜单项标签的自定义 className(会覆盖 dangerous/selected 默认色)
|
|
28
|
+
*/
|
|
29
|
+
labelClassName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* 是否使用原始颜色渲染左侧图标
|
|
32
|
+
*/
|
|
33
|
+
leftUseOriginalColor?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 子菜单项
|
|
36
|
+
*/
|
|
37
|
+
children?: BottomActionItem[];
|
|
38
|
+
/**
|
|
39
|
+
* 是否为危险操作
|
|
40
|
+
*/
|
|
41
|
+
dangerous?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 是否禁用菜单项
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 禁用时 hover 显示的 Tooltip 文字
|
|
48
|
+
*/
|
|
49
|
+
disabledTooltip?: string;
|
|
50
|
+
/**
|
|
51
|
+
* 右侧图标可以展示tooltip
|
|
52
|
+
*/
|
|
53
|
+
rightIconTooltip?: string;
|
|
54
|
+
/**
|
|
55
|
+
* 菜单项的类型
|
|
56
|
+
* option: 普通选项
|
|
57
|
+
* label: 标签
|
|
58
|
+
* divider: 分隔线
|
|
59
|
+
* thick-divider: 粗分隔线(仅移动端展示8px高度,PC端解析为普通divider)
|
|
60
|
+
*/
|
|
61
|
+
type?: 'option' | 'label' | 'divider' | 'thick-divider';
|
|
62
|
+
/**
|
|
63
|
+
* 点击菜单项的回调函数
|
|
64
|
+
*/
|
|
65
|
+
onClick?: BottomActionOnClick;
|
|
66
|
+
/**
|
|
67
|
+
* 右侧图标按钮的属性
|
|
68
|
+
*/
|
|
69
|
+
rightIconButtonProps?: IconButtonProps;
|
|
70
|
+
}
|
|
71
|
+
export type BottomActionOnClick = (e: React.MouseEvent<HTMLButtonElement>, item: BottomActionItem) => void;
|
|
72
|
+
export interface BottomActionProps {
|
|
73
|
+
/** 选项列表 */
|
|
74
|
+
readonly actionItems: BottomActionItem[];
|
|
75
|
+
/** 可以整体设置点击事件 */
|
|
76
|
+
readonly onClick?: BottomActionOnClick;
|
|
77
|
+
/** target元素 */
|
|
78
|
+
readonly children: React.ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* 移动端的时候,用于展示第一层BottomDrawer的标题 后续的展示上一级的选中结果
|
|
81
|
+
*/
|
|
82
|
+
readonly title?: string;
|
|
83
|
+
/**
|
|
84
|
+
* 移动端的时候,是否居中展示标题
|
|
85
|
+
* 如果为true,将不会展示leftIcon、description、rightIcon
|
|
86
|
+
*/
|
|
87
|
+
readonly labelCenter?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 为单选还是多选
|
|
90
|
+
*/
|
|
91
|
+
readonly selectType?: 'single' | 'multiple';
|
|
92
|
+
/**
|
|
93
|
+
* 单选或者多选的值
|
|
94
|
+
*/
|
|
95
|
+
readonly value?: string | string[];
|
|
96
|
+
/**
|
|
97
|
+
* 是否可搜索
|
|
98
|
+
*/
|
|
99
|
+
readonly searchable?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* 多选时候点击确认按钮的回调函数
|
|
102
|
+
*/
|
|
103
|
+
readonly onConfirm?: (value: string[]) => void;
|
|
104
|
+
/**
|
|
105
|
+
* 是否禁用BottomAction
|
|
106
|
+
*/
|
|
107
|
+
readonly disabled?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* 触发器的aria-label
|
|
110
|
+
*/
|
|
111
|
+
readonly triggerAriaLabel?: string;
|
|
112
|
+
readonly 'data-testid'?: string;
|
|
113
|
+
/**
|
|
114
|
+
* 自定义选项渲染函数。
|
|
115
|
+
*/
|
|
116
|
+
renderOption?: RenderOptionFunction;
|
|
117
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DistributiveOmit, DrawerProps } from '../../drawer';
|
|
3
|
+
export type BaseBottomDrawerProps = DistributiveOmit<DrawerProps, 'withXPadding' | 'topPadding'> & {
|
|
4
|
+
/**
|
|
5
|
+
* 底部抽屉的内容节点
|
|
6
|
+
*/
|
|
7
|
+
readonly children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* 固定在底部抽屉主体区域底部的节点
|
|
10
|
+
*/
|
|
11
|
+
readonly bottomSection?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* 底部抽屉的高度,可以是具体数值(如 '300px')或百分比(如 '50%'),默认由内容撑开 ('fit-content')
|
|
14
|
+
*/
|
|
15
|
+
readonly height?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 是否不设置最小高度 默认false
|
|
18
|
+
*/
|
|
19
|
+
readonly noMinHeight?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 底部抽屉内容区域(外层容器)的自定义类名
|
|
22
|
+
*/
|
|
23
|
+
readonly contentClassName?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 底部抽屉主体区域(内层容器)的自定义类名
|
|
26
|
+
*/
|
|
27
|
+
readonly bodyClassName?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 移动端使用的底部弹出的抽屉组件
|
|
31
|
+
*/
|
|
32
|
+
export declare const BaseBottomDrawer: ({ withCloseButton, title, "aria-label": ariaLabel, children, bottomSection, height, noMinHeight, contentClassName, bodyClassName, ...props }: BaseBottomDrawerProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as s, jsx as r, Fragment as u } from "react/jsx-runtime";
|
|
3
|
+
import { Drawer as C, Space as y, Text as N } from "@mantine/core";
|
|
4
|
+
import { clsx as c } from "clsx";
|
|
5
|
+
import "../../../provider/ui-context.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { useLocale as x } from "../../../provider/hooks.js";
|
|
8
|
+
import t from "../../drawer/drawer.module.css.js";
|
|
9
|
+
import { IconButton as g } from "../../icon-button/icon-button.js";
|
|
10
|
+
import a from "./base-bottom-drawer.module.css.js";
|
|
11
|
+
const k = ({
|
|
12
|
+
withCloseButton: e = !0,
|
|
13
|
+
title: o,
|
|
14
|
+
"aria-label": m,
|
|
15
|
+
children: i,
|
|
16
|
+
bottomSection: n,
|
|
17
|
+
height: d = "fit-content",
|
|
18
|
+
noMinHeight: h = !1,
|
|
19
|
+
contentClassName: w,
|
|
20
|
+
bodyClassName: f,
|
|
21
|
+
...l
|
|
22
|
+
}) => {
|
|
23
|
+
const B = o || e;
|
|
24
|
+
return (
|
|
25
|
+
// todo 无障碍aria-describedby没有正确关联的问题待解决
|
|
26
|
+
/* @__PURE__ */ s(
|
|
27
|
+
C,
|
|
28
|
+
{
|
|
29
|
+
...l,
|
|
30
|
+
position: "bottom",
|
|
31
|
+
title: m ?? (typeof o == "string" ? o : void 0),
|
|
32
|
+
withCloseButton: !1,
|
|
33
|
+
styles: {
|
|
34
|
+
content: {
|
|
35
|
+
height: d
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
classNames: {
|
|
39
|
+
content: c(
|
|
40
|
+
t.drawerContent,
|
|
41
|
+
n && t.drawerContentWithBottomSection,
|
|
42
|
+
w,
|
|
43
|
+
a.content,
|
|
44
|
+
!h && a.contentMinHeight
|
|
45
|
+
),
|
|
46
|
+
header: t.hiddenHeader,
|
|
47
|
+
body: c(
|
|
48
|
+
t.drawerBody,
|
|
49
|
+
n && t.drawerBodyWithBottomSection,
|
|
50
|
+
f
|
|
51
|
+
)
|
|
52
|
+
},
|
|
53
|
+
children: [
|
|
54
|
+
B && /* @__PURE__ */ r(
|
|
55
|
+
p,
|
|
56
|
+
{
|
|
57
|
+
title: o,
|
|
58
|
+
withCloseButton: e,
|
|
59
|
+
onClose: l.onClose
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
n ? /* @__PURE__ */ s(u, { children: [
|
|
63
|
+
/* @__PURE__ */ r("div", { className: t.drawerMain, children: i }),
|
|
64
|
+
/* @__PURE__ */ r("div", { className: t.drawerBottomSection, children: n })
|
|
65
|
+
] }) : i
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
}, p = (e) => {
|
|
71
|
+
const o = x();
|
|
72
|
+
return /* @__PURE__ */ s("div", { className: a.header, children: [
|
|
73
|
+
e.withCloseButton && /* @__PURE__ */ r(y, { w: 40 }),
|
|
74
|
+
/* @__PURE__ */ r(N, { className: a.headerTitle, children: e.title }),
|
|
75
|
+
e.withCloseButton && /* @__PURE__ */ r(
|
|
76
|
+
g,
|
|
77
|
+
{
|
|
78
|
+
iconName: "close",
|
|
79
|
+
variant: "text",
|
|
80
|
+
color: "regular",
|
|
81
|
+
size: "lg",
|
|
82
|
+
className: a.headerClose,
|
|
83
|
+
onClick: () => e.onClose?.(),
|
|
84
|
+
"aria-label": o.close
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] });
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
k as BaseBottomDrawer
|
|
91
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = "_content_wgw7p_2", t = "_contentMinHeight_wgw7p_9", n = "_header_wgw7p_13", o = "_headerTitle_wgw7p_21", d = "_headerClose_wgw7p_32", _ = "_bodyXPadding_wgw7p_36", a = {
|
|
3
|
+
content: e,
|
|
4
|
+
contentMinHeight: t,
|
|
5
|
+
header: n,
|
|
6
|
+
headerTitle: o,
|
|
7
|
+
headerClose: d,
|
|
8
|
+
bodyXPadding: _
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
_ as bodyXPadding,
|
|
12
|
+
e as content,
|
|
13
|
+
t as contentMinHeight,
|
|
14
|
+
a as default,
|
|
15
|
+
n as header,
|
|
16
|
+
d as headerClose,
|
|
17
|
+
o as headerTitle
|
|
18
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import "../../../provider/ui-context.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { useLocale as a } from "../../../provider/hooks.js";
|
|
6
|
+
import t from "./empty-state.module.css.js";
|
|
7
|
+
const d = ({ icon: e, text: m }) => {
|
|
8
|
+
const r = a();
|
|
9
|
+
return /* @__PURE__ */ s("div", { className: t.emptyState, children: [
|
|
10
|
+
e && /* @__PURE__ */ o("div", { className: t.emptyIcon, children: e }),
|
|
11
|
+
/* @__PURE__ */ o("div", { className: t.emptyText, children: m ?? r.noData })
|
|
12
|
+
] });
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
d as DropDownEmptyState
|
|
16
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverDropdownProps } from '../../popover/popover.types';
|
|
3
|
+
import { RenderOptionFunction, SelectOptions } from '../base-select/common/select.types';
|
|
4
|
+
export interface OptionsDropDownEmptyState {
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
text?: string;
|
|
7
|
+
node?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface OptionsDropDownProps extends Pick<PopoverDropdownProps, 'width' | 'maxHeight' | 'matchTargetWidth' | 'withinPortal' | 'className'> {
|
|
10
|
+
options: SelectOptions[];
|
|
11
|
+
multiSelect?: boolean;
|
|
12
|
+
value?: string | string[];
|
|
13
|
+
defaultValue?: string | string[];
|
|
14
|
+
header?: React.ReactNode;
|
|
15
|
+
footer?: React.ReactNode;
|
|
16
|
+
emptyState?: OptionsDropDownEmptyState;
|
|
17
|
+
renderOption?: RenderOptionFunction;
|
|
18
|
+
/** 非 desktop 时作为 BottomDrawer 标题。 */
|
|
19
|
+
title?: string;
|
|
20
|
+
}
|
|
21
|
+
/** 基于系统 Combobox 的统一选项下拉列表。 */
|
|
22
|
+
export declare function OptionsDropDown({ options, multiSelect, value, defaultValue, header, footer, emptyState, renderOption, title, className, matchTargetWidth, ...dropdownProps }: Readonly<OptionsDropDownProps>): React.JSX.Element;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as c, jsx as a, Fragment as o } from "react/jsx-runtime";
|
|
3
|
+
import { Icon as d } from "@wisdomgarden/torque-icons";
|
|
4
|
+
import { clsx as v } from "clsx";
|
|
5
|
+
import { Checkbox as C } from "../../checkbox/checkbox.js";
|
|
6
|
+
import { Combobox as t } from "../../combobox/combobox.js";
|
|
7
|
+
import { DropDownEmptyState as w } from "./empty-state.js";
|
|
8
|
+
import l from "./options-drop-down.module.css.js";
|
|
9
|
+
const y = (s, r) => r ? Array.isArray(r) ? r.includes(s) : r === s : !1;
|
|
10
|
+
function $({
|
|
11
|
+
options: s,
|
|
12
|
+
multiSelect: r,
|
|
13
|
+
value: m,
|
|
14
|
+
defaultValue: h,
|
|
15
|
+
header: f,
|
|
16
|
+
footer: u,
|
|
17
|
+
emptyState: n,
|
|
18
|
+
renderOption: g,
|
|
19
|
+
title: x,
|
|
20
|
+
className: N,
|
|
21
|
+
matchTargetWidth: b = !0,
|
|
22
|
+
...I
|
|
23
|
+
}) {
|
|
24
|
+
const O = m ?? h, p = s.length === 0;
|
|
25
|
+
return /* @__PURE__ */ c(
|
|
26
|
+
t.Dropdown,
|
|
27
|
+
{
|
|
28
|
+
...I,
|
|
29
|
+
title: x,
|
|
30
|
+
className: v(l.dropdown, N),
|
|
31
|
+
matchTargetWidth: b,
|
|
32
|
+
children: [
|
|
33
|
+
f,
|
|
34
|
+
p ? n?.node ?? /* @__PURE__ */ a(w, { icon: n?.icon, text: n?.text }) : /* @__PURE__ */ c(o, { children: [
|
|
35
|
+
/* @__PURE__ */ a(t.Options, { "aria-multiselectable": r || void 0, children: s.map((e) => {
|
|
36
|
+
const i = y(e.value, O);
|
|
37
|
+
return /* @__PURE__ */ c(
|
|
38
|
+
t.Option,
|
|
39
|
+
{
|
|
40
|
+
value: e.value,
|
|
41
|
+
active: i,
|
|
42
|
+
disabled: e.disabled,
|
|
43
|
+
"data-single-selected": i && !r ? "" : void 0,
|
|
44
|
+
"data-multi-select": r ? "" : void 0,
|
|
45
|
+
className: l.option,
|
|
46
|
+
style: {
|
|
47
|
+
paddingInlineStart: `calc(5px + ${e.level ?? 0} * 12px)`
|
|
48
|
+
},
|
|
49
|
+
children: [
|
|
50
|
+
r && /* @__PURE__ */ a(
|
|
51
|
+
C,
|
|
52
|
+
{
|
|
53
|
+
visualOnly: !0,
|
|
54
|
+
checked: i,
|
|
55
|
+
className: l.checkbox
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
g?.(e, i) ?? /* @__PURE__ */ c(o, { children: [
|
|
59
|
+
e.leftIconName && /* @__PURE__ */ a(
|
|
60
|
+
d,
|
|
61
|
+
{
|
|
62
|
+
width: 16,
|
|
63
|
+
height: 16,
|
|
64
|
+
name: e.leftIconName,
|
|
65
|
+
useOriginalColor: e.leftUseOriginalColor,
|
|
66
|
+
className: l.leftIcon
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ a("span", { className: l.label, children: e.label }),
|
|
70
|
+
e.rightIconName && /* @__PURE__ */ a(
|
|
71
|
+
d,
|
|
72
|
+
{
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
width: 16,
|
|
75
|
+
height: 16,
|
|
76
|
+
name: e.rightIconName,
|
|
77
|
+
useOriginalColor: e.rightIconUseOriginalColor,
|
|
78
|
+
className: l.rightIcon
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] })
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
e.value
|
|
85
|
+
);
|
|
86
|
+
}) }),
|
|
87
|
+
u
|
|
88
|
+
] })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
$ as OptionsDropDown
|
|
95
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const o = "_dropdown_kq4wl_2", c = "_option_kq4wl_9", n = "_checkbox_kq4wl_55", t = "_leftIcon_kq4wl_61", l = "_label_kq4wl_66", _ = "_rightIcon_kq4wl_71", e = {
|
|
3
|
+
dropdown: o,
|
|
4
|
+
option: c,
|
|
5
|
+
checkbox: n,
|
|
6
|
+
leftIcon: t,
|
|
7
|
+
label: l,
|
|
8
|
+
rightIcon: _
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
n as checkbox,
|
|
12
|
+
e as default,
|
|
13
|
+
o as dropdown,
|
|
14
|
+
l as label,
|
|
15
|
+
t as leftIcon,
|
|
16
|
+
c as option,
|
|
17
|
+
_ as rightIcon
|
|
18
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuProps } from '../../../menu/menu.types';
|
|
3
|
+
type MenuMobileProps = Omit<MenuProps, 'renderTarget' | 'position'> & {
|
|
4
|
+
readonly children: React.ReactNode;
|
|
5
|
+
readonly renderTarget?: never;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 下拉菜单移动端适配
|
|
9
|
+
*/
|
|
10
|
+
export declare const MenuMobile: ({ menuItems, ...props }: MenuMobileProps) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { BottomAction as o } from "../../bottom-action/bottom-action.js";
|
|
4
|
+
const l = ({ menuItems: t, ...e }) => /* @__PURE__ */ r(
|
|
5
|
+
o,
|
|
6
|
+
{
|
|
7
|
+
...e,
|
|
8
|
+
triggerAriaLabel: e.triggerAriaLabel,
|
|
9
|
+
disabled: e.disabled,
|
|
10
|
+
actionItems: t.map((i) => ({ ...i }))
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
export {
|
|
14
|
+
l as MenuMobile
|
|
15
|
+
};
|