@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,26 @@
|
|
|
1
|
+
import { FormProps, InputWrapProps, RootClassNameProps } from '../../common/components.types';
|
|
2
|
+
/**
|
|
3
|
+
* SwitchGroup 开关组组件
|
|
4
|
+
*
|
|
5
|
+
* 主要用于将多个 Switch 组合在一起,并提供统一的表单包裹功能(如 label, error, required 等)。
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SwitchGroup label="通知设置" required>
|
|
10
|
+
* <div className="flex flex-col gap-sm">
|
|
11
|
+
* <Switch label="邮件通知" />
|
|
12
|
+
* <Switch label="短信通知" />
|
|
13
|
+
* </div>
|
|
14
|
+
* </SwitchGroup>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const SwitchGroup: (props: SwitchGroupProps) => import("react").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* SwitchGroup 组件属性定义
|
|
20
|
+
*/
|
|
21
|
+
export interface SwitchGroupProps extends RootClassNameProps, InputWrapProps, FormProps {
|
|
22
|
+
/**
|
|
23
|
+
* 开关集合,通常为多个 Switch 组件及布局容器
|
|
24
|
+
*/
|
|
25
|
+
readonly children: React.ReactNode;
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useId as p } from "@mantine/hooks";
|
|
4
|
+
import { useFormWrapperProps as m } from "../../common/use-form-wrapper-props.js";
|
|
5
|
+
import { FormItemWrapper as c } from "../form-wrapper/form-item-wrapper.js";
|
|
6
|
+
const a = (r) => {
|
|
7
|
+
const o = p(), { wrapProps: i, outerDescribedBy: t } = m(r, o);
|
|
8
|
+
return /* @__PURE__ */ e(c, { ...i, id: o, children: /* @__PURE__ */ e("div", { role: "group", "aria-describedby": t, children: r.children }) });
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
a as SwitchGroup
|
|
12
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SwitchProps as MSwitchProps } from '@mantine/core';
|
|
2
|
+
/**
|
|
3
|
+
* Switch 组件属性定义
|
|
4
|
+
*/
|
|
5
|
+
export interface SwitchProps extends MSwitchProps {
|
|
6
|
+
/**
|
|
7
|
+
* 开关的外观形状
|
|
8
|
+
* - `rounded`: 圆角形状(带指示器)
|
|
9
|
+
* - `square`: 方形形状
|
|
10
|
+
* @default 'rounded'
|
|
11
|
+
*/
|
|
12
|
+
readonly shape?: 'rounded' | 'square';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Switch 开关组件
|
|
16
|
+
*
|
|
17
|
+
* 用于在两种状态之间切换。封装自 Mantine 的 Switch,并添加了自定义外观。
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Switch label="开启通知" shape="rounded" />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const Switch: {
|
|
25
|
+
({ shape, className, ...props }: SwitchProps): import("react").JSX.Element;
|
|
26
|
+
Group: (props: import("./switch-group").SwitchGroupProps) => import("react").JSX.Element;
|
|
27
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { Switch as m } from "@mantine/core";
|
|
4
|
+
import { clsx as c } from "clsx";
|
|
5
|
+
import { SwitchGroup as s } from "./switch-group.js";
|
|
6
|
+
import e from "./switch.module.css.js";
|
|
7
|
+
const p = ({
|
|
8
|
+
shape: r = "rounded",
|
|
9
|
+
className: t,
|
|
10
|
+
...o
|
|
11
|
+
}) => /* @__PURE__ */ i(
|
|
12
|
+
m,
|
|
13
|
+
{
|
|
14
|
+
...o,
|
|
15
|
+
withThumbIndicator: r === "rounded",
|
|
16
|
+
"t-shape": r,
|
|
17
|
+
className: c(e.switch, t)
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
p.Group = s;
|
|
21
|
+
export {
|
|
22
|
+
p as Switch
|
|
23
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Tabs } from './tabs';
|
|
2
|
+
export { TabsTab } from './subs/tabs-tab';
|
|
3
|
+
export { TabsPanel } from './subs/tabs-panel';
|
|
4
|
+
export { TabsList } from './subs/tabs-list';
|
|
5
|
+
export { TabsLinkTab } from './subs/tabs-link-tab';
|
|
6
|
+
export type { TabsLinkTabProps } from './subs/tabs-link-tab';
|
|
7
|
+
export type { TabsProps, TabListProps, TabProps, TabPanelProps, TabsVariant, TabsLayout, TabValue, } from './tabs.types';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Tabs as a } from "./tabs.js";
|
|
3
|
+
import { TabsTab as b } from "./subs/tabs-tab.js";
|
|
4
|
+
import { TabsPanel as t } from "./subs/tabs-panel.js";
|
|
5
|
+
import { TabsList as f } from "./subs/tabs-list.js";
|
|
6
|
+
import { TabsLinkTab as p } from "./subs/tabs-link-tab.js";
|
|
7
|
+
export {
|
|
8
|
+
a as Tabs,
|
|
9
|
+
p as TabsLinkTab,
|
|
10
|
+
f as TabsList,
|
|
11
|
+
t as TabsPanel,
|
|
12
|
+
b as TabsTab
|
|
13
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const t = "_tabs_1y0n6_2", n = "_tabList_1y0n6_5", a = "_tab_1y0n6_2", o = "_tabTruncate_1y0n6_70", s = "_tabContent_1y0n6_78", _ = "_tabPanel_1y0n6_93", e = "_scrollAreaRoot_1y0n6_96", c = "_scrollAreaContent_1y0n6_100", b = {
|
|
3
|
+
tabs: t,
|
|
4
|
+
tabList: n,
|
|
5
|
+
tab: a,
|
|
6
|
+
tabTruncate: o,
|
|
7
|
+
tabContent: s,
|
|
8
|
+
tabPanel: _,
|
|
9
|
+
scrollAreaRoot: e,
|
|
10
|
+
scrollAreaContent: c
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
b as default,
|
|
14
|
+
c as scrollAreaContent,
|
|
15
|
+
e as scrollAreaRoot,
|
|
16
|
+
a as tab,
|
|
17
|
+
s as tabContent,
|
|
18
|
+
n as tabList,
|
|
19
|
+
_ as tabPanel,
|
|
20
|
+
o as tabTruncate,
|
|
21
|
+
t as tabs
|
|
22
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TabProps } from '../tabs.types';
|
|
2
|
+
export type TabsLinkTabProps = TabProps & React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
3
|
+
readonly href: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* 链接语义的页签。
|
|
7
|
+
*
|
|
8
|
+
* 根元素取自 `UiProvider` 的 `linkComponent`;未配置时为原生 `<a>`。
|
|
9
|
+
*/
|
|
10
|
+
export declare const TabsLinkTab: (props: TabsLinkTabProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { useUiLink as l } from "../../../provider/hooks.js";
|
|
4
|
+
import { TabsTab as b } from "./tabs-tab.js";
|
|
5
|
+
const k = (n) => {
|
|
6
|
+
const r = l("Tabs.LinkTab"), { href: t, ...a } = n;
|
|
7
|
+
return /* @__PURE__ */ i(
|
|
8
|
+
b,
|
|
9
|
+
{
|
|
10
|
+
...a,
|
|
11
|
+
isLink: !0,
|
|
12
|
+
renderRoot: ({ disabled: s, type: c, ...e }) => s ? /* @__PURE__ */ i(
|
|
13
|
+
"a",
|
|
14
|
+
{
|
|
15
|
+
...e,
|
|
16
|
+
"aria-disabled": !0,
|
|
17
|
+
href: void 0,
|
|
18
|
+
tabIndex: -1,
|
|
19
|
+
onClick: (d) => d.preventDefault(),
|
|
20
|
+
children: e.children
|
|
21
|
+
}
|
|
22
|
+
) : /* @__PURE__ */ i(r, { ...e, href: t, children: e.children })
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
k as TabsLinkTab
|
|
28
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { ScrollArea as g } from "@mantine/core";
|
|
4
|
+
import { useMergedRef as y } from "@mantine/hooks";
|
|
5
|
+
import { clsx as n } from "clsx";
|
|
6
|
+
import { useRef as A } from "react";
|
|
7
|
+
import o from "../styles/tabs.module.css.js";
|
|
8
|
+
import { useTabsContext as x } from "../tabs-context.js";
|
|
9
|
+
import { useTabsDataProps as L } from "../use-tabs-data-props.js";
|
|
10
|
+
import { useTabsKeyboardNavigation as N } from "../use-tabs-keyboard-navigation.js";
|
|
11
|
+
const R = ({
|
|
12
|
+
children: i,
|
|
13
|
+
ref: l,
|
|
14
|
+
scrollRootClassName: c,
|
|
15
|
+
scrollbarType: m,
|
|
16
|
+
...e
|
|
17
|
+
}) => {
|
|
18
|
+
const t = x(), s = A(null), f = y(s, l), { handleKeyDown: p } = N({
|
|
19
|
+
listRef: s,
|
|
20
|
+
activateOnFocus: t.segmented
|
|
21
|
+
}), d = {
|
|
22
|
+
...L(t)
|
|
23
|
+
}, u = {
|
|
24
|
+
"aria-orientation": "horizontal",
|
|
25
|
+
role: "tablist"
|
|
26
|
+
}, b = {
|
|
27
|
+
role: "radiogroup"
|
|
28
|
+
}, r = (
|
|
29
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
30
|
+
/* @__PURE__ */ a(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
ref: f,
|
|
34
|
+
...t.segmented ? b : u,
|
|
35
|
+
onKeyDown: p,
|
|
36
|
+
...e,
|
|
37
|
+
...d,
|
|
38
|
+
className: n(e.className, o.tabList),
|
|
39
|
+
children: i
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
return t.overflow == "scroll" ? /* @__PURE__ */ a(
|
|
44
|
+
g,
|
|
45
|
+
{
|
|
46
|
+
scrollbars: "x",
|
|
47
|
+
type: m,
|
|
48
|
+
classNames: {
|
|
49
|
+
root: n(o.scrollAreaRoot, c),
|
|
50
|
+
content: o.scrollAreaContent
|
|
51
|
+
},
|
|
52
|
+
children: r
|
|
53
|
+
}
|
|
54
|
+
) : r;
|
|
55
|
+
};
|
|
56
|
+
R.displayName = "Tabs.List";
|
|
57
|
+
export {
|
|
58
|
+
R as TabsList
|
|
59
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as b } from "clsx";
|
|
4
|
+
import p from "../styles/tabs.module.css.js";
|
|
5
|
+
import { useTabsContext as o } from "../tabs-context.js";
|
|
6
|
+
import { useTabsDataProps as u } from "../use-tabs-data-props.js";
|
|
7
|
+
const x = ({
|
|
8
|
+
value: e,
|
|
9
|
+
children: l,
|
|
10
|
+
ref: r,
|
|
11
|
+
...t
|
|
12
|
+
}) => {
|
|
13
|
+
const a = o(), { value: i, idPrefix: n } = o(), s = i === e, d = {
|
|
14
|
+
...u(a)
|
|
15
|
+
};
|
|
16
|
+
if (!s && !a.keepMounted)
|
|
17
|
+
return null;
|
|
18
|
+
const c = a.segmented ? {} : {
|
|
19
|
+
role: "tabpanel",
|
|
20
|
+
"aria-labelledby": `${n}-tab-${e}`,
|
|
21
|
+
tabIndex: t.tabIndex ?? (s ? 0 : void 0)
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ m(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
ref: r,
|
|
27
|
+
...c,
|
|
28
|
+
id: `${n}-panel-${e}`,
|
|
29
|
+
hidden: !s,
|
|
30
|
+
...t,
|
|
31
|
+
...d,
|
|
32
|
+
className: b(t.className, p.tabPanel),
|
|
33
|
+
children: l
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
x.displayName = "Tabs.Panel";
|
|
38
|
+
export {
|
|
39
|
+
x as TabsPanel
|
|
40
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TabProps } from '../tabs.types';
|
|
3
|
+
export declare const TabsTab: {
|
|
4
|
+
({ value, children, disabled, onClick, ref, renderRoot, isLink, ...props }: TabProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as u } from "clsx";
|
|
4
|
+
import { Tooltip as y } from "../../tooltip/index.js";
|
|
5
|
+
import c from "../styles/tabs.module.css.js";
|
|
6
|
+
import { useTabsContext as g } from "../tabs-context.js";
|
|
7
|
+
import { useTabsDataProps as w } from "../use-tabs-data-props.js";
|
|
8
|
+
const V = ({
|
|
9
|
+
value: t,
|
|
10
|
+
children: o,
|
|
11
|
+
disabled: n,
|
|
12
|
+
onClick: T,
|
|
13
|
+
ref: f,
|
|
14
|
+
renderRoot: r,
|
|
15
|
+
isLink: x,
|
|
16
|
+
...l
|
|
17
|
+
}) => {
|
|
18
|
+
const a = g(), { value: C, onChange: h, idPrefix: i } = a, e = C === t, N = (k) => {
|
|
19
|
+
n || h(t), T?.(k);
|
|
20
|
+
}, P = {
|
|
21
|
+
...w(a),
|
|
22
|
+
"data-selected": e,
|
|
23
|
+
"data-disabled": n
|
|
24
|
+
}, $ = a.segmented ? {
|
|
25
|
+
role: "radio",
|
|
26
|
+
"aria-checked": e
|
|
27
|
+
} : {
|
|
28
|
+
role: "tab",
|
|
29
|
+
"aria-selected": e,
|
|
30
|
+
...x ? {} : { "aria-controls": `${i}-panel-${t}` }
|
|
31
|
+
}, m = {
|
|
32
|
+
ref: f,
|
|
33
|
+
id: `${i}-tab-${t}`,
|
|
34
|
+
disabled: n,
|
|
35
|
+
tabIndex: e ? 0 : -1,
|
|
36
|
+
onClick: N,
|
|
37
|
+
...l,
|
|
38
|
+
...P,
|
|
39
|
+
...$,
|
|
40
|
+
className: u(
|
|
41
|
+
l.className,
|
|
42
|
+
c.tab
|
|
43
|
+
)
|
|
44
|
+
}, b = a.overflow === "truncate", d = u(c.tabContent, {
|
|
45
|
+
[c.tabTruncate]: b
|
|
46
|
+
}), p = b ? /* @__PURE__ */ s(y, { label: o, showOnlyWhenTruncated: !0, children: /* @__PURE__ */ s("span", { className: d, children: o }) }) : /* @__PURE__ */ s("span", { className: d, children: o });
|
|
47
|
+
return r ? r({ ...m, children: p }) : /* @__PURE__ */ s("button", { ...m, children: p });
|
|
48
|
+
};
|
|
49
|
+
V.displayName = "Tabs.TabsTab";
|
|
50
|
+
export {
|
|
51
|
+
V as TabsTab
|
|
52
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useContext as e, createContext as n } from "react";
|
|
3
|
+
const o = n(null);
|
|
4
|
+
function s() {
|
|
5
|
+
const t = e(o);
|
|
6
|
+
if (!t)
|
|
7
|
+
throw new Error("Tabs components must be used within a <Tabs> provider");
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
o as TabsContext,
|
|
12
|
+
s as useTabsContext
|
|
13
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TabsProps } from './tabs.types';
|
|
3
|
+
export declare const Tabs: {
|
|
4
|
+
(props: TabsProps): React.JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
List: {
|
|
8
|
+
({ children, ref, scrollRootClassName, scrollbarType, ...props }: import("./tabs.types").TabListProps): React.JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
Tab: {
|
|
12
|
+
({ value, children, disabled, onClick, ref, renderRoot, isLink, ...props }: import("./tabs.types").TabProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
LinkTab: (props: import(".").TabsLinkTabProps) => React.JSX.Element;
|
|
16
|
+
Panel: {
|
|
17
|
+
({ value, children, ref, ...props }: import("./tabs.types").TabPanelProps): React.JSX.Element | null;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
3
|
+
import { useUncontrolled as L } from "@mantine/hooks";
|
|
4
|
+
import { clsx as P } from "clsx";
|
|
5
|
+
import { useId as k, useMemo as y } from "react";
|
|
6
|
+
import N from "./styles/tabs-variables.module.css.js";
|
|
7
|
+
import j from "./styles/tabs.module.css.js";
|
|
8
|
+
import { TabsLinkTab as w } from "./subs/tabs-link-tab.js";
|
|
9
|
+
import { TabsList as I } from "./subs/tabs-list.js";
|
|
10
|
+
import { TabsPanel as M } from "./subs/tabs-panel.js";
|
|
11
|
+
import { TabsTab as z } from "./subs/tabs-tab.js";
|
|
12
|
+
import { TabsContext as O } from "./tabs-context.js";
|
|
13
|
+
const u = (e) => {
|
|
14
|
+
const {
|
|
15
|
+
value: p,
|
|
16
|
+
defaultValue: T,
|
|
17
|
+
onChange: v,
|
|
18
|
+
children: h,
|
|
19
|
+
id: a,
|
|
20
|
+
ref: g,
|
|
21
|
+
variant: o = "underline",
|
|
22
|
+
layout: s = "separated",
|
|
23
|
+
bgType: r = "white",
|
|
24
|
+
size: t = "md",
|
|
25
|
+
overflow: n = "scroll",
|
|
26
|
+
keepMounted: l = !1,
|
|
27
|
+
segmented: i = !1,
|
|
28
|
+
color: m = "brand",
|
|
29
|
+
...x
|
|
30
|
+
} = e, [c, d] = L({
|
|
31
|
+
value: p,
|
|
32
|
+
defaultValue: T,
|
|
33
|
+
finalValue: "",
|
|
34
|
+
onChange: v
|
|
35
|
+
}), C = k(), f = a || C, V = y(
|
|
36
|
+
() => ({
|
|
37
|
+
value: c,
|
|
38
|
+
onChange: d,
|
|
39
|
+
idPrefix: f,
|
|
40
|
+
variant: o,
|
|
41
|
+
layout: s,
|
|
42
|
+
bgType: r,
|
|
43
|
+
size: t,
|
|
44
|
+
overflow: n,
|
|
45
|
+
keepMounted: l,
|
|
46
|
+
segmented: i,
|
|
47
|
+
color: m
|
|
48
|
+
}),
|
|
49
|
+
[
|
|
50
|
+
c,
|
|
51
|
+
d,
|
|
52
|
+
f,
|
|
53
|
+
o,
|
|
54
|
+
s,
|
|
55
|
+
r,
|
|
56
|
+
t,
|
|
57
|
+
n,
|
|
58
|
+
l,
|
|
59
|
+
i,
|
|
60
|
+
m
|
|
61
|
+
]
|
|
62
|
+
);
|
|
63
|
+
return /* @__PURE__ */ b(O.Provider, { value: V, children: /* @__PURE__ */ b(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
ref: g,
|
|
67
|
+
id: a,
|
|
68
|
+
...x,
|
|
69
|
+
className: P(e.className, j.tabs, N.tabVars),
|
|
70
|
+
children: h
|
|
71
|
+
}
|
|
72
|
+
) });
|
|
73
|
+
};
|
|
74
|
+
u.displayName = "Tabs";
|
|
75
|
+
const K = Object.assign(u, {
|
|
76
|
+
List: I,
|
|
77
|
+
Tab: z,
|
|
78
|
+
LinkTab: w,
|
|
79
|
+
Panel: M
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
K as Tabs
|
|
83
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { TabSize } from '../../common/components.types';
|
|
3
|
+
export type TabValue = string | null;
|
|
4
|
+
export type TabsVariant = 'outline' | 'filled' | 'underline';
|
|
5
|
+
export type TabsLayout = 'separated' | 'contained';
|
|
6
|
+
export interface BaseTabsProps {
|
|
7
|
+
/**
|
|
8
|
+
* TabsTab 选中时的高亮风格
|
|
9
|
+
* - 'outline': 胶囊形状选中时带主题色边框和浅色背景
|
|
10
|
+
* - 'filled': 胶囊形状选中时为纯主题色实底白字
|
|
11
|
+
* - 'underline': 选中时为文字加底部短下划线
|
|
12
|
+
* @default 'underline'
|
|
13
|
+
*/
|
|
14
|
+
variant?: TabsVariant;
|
|
15
|
+
/**
|
|
16
|
+
* Tabs 列表的外层容器包裹形式 (决定了 TabsList 和 TabsTab 之间的间距和底色关系)
|
|
17
|
+
* - 'separated': 散列式。每个 TabsTab 是独立的胶囊,之间有 gap。
|
|
18
|
+
* - 'contained': 包含式。所有 TabsTab 紧凑地挤在一个带圆角和 padding 的长条背景框内。(替代之前的 segmented)
|
|
19
|
+
* @default 'separated'
|
|
20
|
+
*/
|
|
21
|
+
layout?: TabsLayout;
|
|
22
|
+
/**
|
|
23
|
+
* 胶囊形状未选中状态或容器的背景色,适配灰色和白色外部背景
|
|
24
|
+
* - 'gray': 偏灰色的底色
|
|
25
|
+
* - 'white': 纯白色的底色
|
|
26
|
+
* @default 'white'
|
|
27
|
+
*/
|
|
28
|
+
bgType?: 'gray' | 'white';
|
|
29
|
+
/**
|
|
30
|
+
* 尺寸大小
|
|
31
|
+
* @default 'md'
|
|
32
|
+
*/
|
|
33
|
+
size?: TabSize;
|
|
34
|
+
/**
|
|
35
|
+
* 当标签过多时的溢出处理方式,
|
|
36
|
+
* 'scroll' 允许滚动,
|
|
37
|
+
* 'truncate' 挤压截断,
|
|
38
|
+
* 'wrap' 单行放不下时换行,行间距同 TabsList 的 gap,
|
|
39
|
+
* @default 'scroll'
|
|
40
|
+
*/
|
|
41
|
+
overflow?: 'scroll' | 'truncate' | 'wrap';
|
|
42
|
+
/**
|
|
43
|
+
* 是否在未选中时保持挂载到 DOM 中
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
keepMounted?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 是否为分段控制器(没有TabPanel)
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
segmented?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* 选中态强调色(filled 变体的药丸底色、underline 变体的下划线颜色生效)
|
|
54
|
+
* - 'brand': 品牌主题色
|
|
55
|
+
* - 'air': AI 功能 air 蓝
|
|
56
|
+
* @default 'brand'
|
|
57
|
+
*/
|
|
58
|
+
color?: 'brand' | 'air';
|
|
59
|
+
}
|
|
60
|
+
export interface TabsContextValue extends BaseTabsProps {
|
|
61
|
+
value: TabValue;
|
|
62
|
+
onChange: (value: TabValue) => void;
|
|
63
|
+
idPrefix: string;
|
|
64
|
+
}
|
|
65
|
+
export interface TabsProps extends Omit<React.ComponentProps<'div'>, 'onChange' | 'value' | 'defaultValue' | 'color'>, BaseTabsProps {
|
|
66
|
+
/**
|
|
67
|
+
* 选中的 tab 值 (受控)
|
|
68
|
+
*/
|
|
69
|
+
value?: TabValue;
|
|
70
|
+
/**
|
|
71
|
+
* 默认选中的 tab 值 (非受控)
|
|
72
|
+
*/
|
|
73
|
+
defaultValue?: TabValue;
|
|
74
|
+
/**
|
|
75
|
+
* 切换 tab 时的回调
|
|
76
|
+
*/
|
|
77
|
+
onChange?: (value: TabValue) => void;
|
|
78
|
+
children: ReactNode;
|
|
79
|
+
}
|
|
80
|
+
export interface TabListProps extends React.ComponentProps<'div'> {
|
|
81
|
+
/**
|
|
82
|
+
* TabList 滚动模式下跟元素的样式
|
|
83
|
+
*/
|
|
84
|
+
scrollRootClassName?: string;
|
|
85
|
+
/**
|
|
86
|
+
* 滚动模式下横向滚动条的显示策略(透传给内部 ScrollArea 的 `type`)。
|
|
87
|
+
* 不传时保持默认 `'auto'`(随系统滚动条偏好显示/隐藏);传 `'never'`
|
|
88
|
+
* 可让该 TabList 始终不显示滚动条,仍可横向滑动。
|
|
89
|
+
*/
|
|
90
|
+
scrollbarType?: 'hover' | 'scroll' | 'auto' | 'always' | 'never';
|
|
91
|
+
}
|
|
92
|
+
export interface TabProps extends Omit<React.ComponentProps<'button'>, 'value'> {
|
|
93
|
+
value: TabValue;
|
|
94
|
+
/**
|
|
95
|
+
* 在客户端组件可以自定义渲染根元素
|
|
96
|
+
*/
|
|
97
|
+
renderRoot?: (props: any) => React.ReactNode;
|
|
98
|
+
/**
|
|
99
|
+
* 是否为路由跳转式 tab(由 TabsLinkTab 内部传入)。
|
|
100
|
+
* 此类 tab 通过路由切换内容,当前页面不存在对应的 TabsPanel,
|
|
101
|
+
* 因此不应渲染 aria-controls(避免指向不存在的元素 ID)。
|
|
102
|
+
*/
|
|
103
|
+
isLink?: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface TabPanelProps extends React.ComponentProps<'div'> {
|
|
106
|
+
value: TabValue;
|
|
107
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseTabsProps } from './tabs.types';
|
|
2
|
+
export declare const useTabsDataProps: (props: BaseTabsProps) => {
|
|
3
|
+
'data-variant': import("./tabs.types").TabsVariant | undefined;
|
|
4
|
+
'data-size': import("../..").SimpleComponentSizeBase | undefined;
|
|
5
|
+
'data-layout': import("./tabs.types").TabsLayout | undefined;
|
|
6
|
+
'data-bg-type': "white" | "gray" | undefined;
|
|
7
|
+
'data-overflow': "scroll" | "truncate" | "wrap" | undefined;
|
|
8
|
+
'data-color': "brand" | "air" | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { KeyboardEvent } from 'react';
|
|
2
|
+
interface UseTabsKeyboardNavigationProps {
|
|
3
|
+
listRef: React.RefObject<HTMLDivElement | null>;
|
|
4
|
+
activateOnFocus?: boolean;
|
|
5
|
+
loop?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Tabs的无障碍键盘交互处理
|
|
9
|
+
*/
|
|
10
|
+
export declare function useTabsKeyboardNavigation({ listRef, activateOnFocus, loop, }: UseTabsKeyboardNavigationProps): {
|
|
11
|
+
handleKeyDown: (e: KeyboardEvent<HTMLDivElement>) => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|