@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,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { Icon as a } from "@wisdomgarden/torque-icons";
|
|
4
|
+
import "../../provider/ui-context.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { useLocale as m } from "../../provider/hooks.js";
|
|
7
|
+
import s from "./styles/tag.module.css.js";
|
|
8
|
+
import { Tag as c } from "./tag.js";
|
|
9
|
+
const C = ({
|
|
10
|
+
children: t,
|
|
11
|
+
onCloseClick: e,
|
|
12
|
+
...r
|
|
13
|
+
}) => {
|
|
14
|
+
const l = m();
|
|
15
|
+
return /* @__PURE__ */ o(
|
|
16
|
+
c,
|
|
17
|
+
{
|
|
18
|
+
...r,
|
|
19
|
+
rightSection: /* @__PURE__ */ o(
|
|
20
|
+
"button",
|
|
21
|
+
{
|
|
22
|
+
type: "button",
|
|
23
|
+
"aria-label": l.close,
|
|
24
|
+
onClick: e,
|
|
25
|
+
className: s.tagClosableButton,
|
|
26
|
+
children: /* @__PURE__ */ o(a, { name: "close" })
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
children: t
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
C as ClosableTag
|
|
35
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { Icon as e } from "@wisdomgarden/torque-icons";
|
|
4
|
+
import { clsx as a } from "clsx";
|
|
5
|
+
import o from "./styles/tag.module.css.js";
|
|
6
|
+
import { Tag as g } from "./tag.js";
|
|
7
|
+
const x = ({
|
|
8
|
+
children: n,
|
|
9
|
+
iconName: c,
|
|
10
|
+
iconClassName: s,
|
|
11
|
+
renderIcon: r,
|
|
12
|
+
...t
|
|
13
|
+
}) => /* @__PURE__ */ m(
|
|
14
|
+
g,
|
|
15
|
+
{
|
|
16
|
+
...t,
|
|
17
|
+
className: a("icon-tag-root", t.className),
|
|
18
|
+
leftSection: r?.({
|
|
19
|
+
className: a(o.tagIcon, o.tagIconSpacing)
|
|
20
|
+
}) ?? (c && /* @__PURE__ */ m(
|
|
21
|
+
e,
|
|
22
|
+
{
|
|
23
|
+
name: c,
|
|
24
|
+
className: a(
|
|
25
|
+
o.tagIcon,
|
|
26
|
+
s,
|
|
27
|
+
o.tagIconSpacing
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
)),
|
|
31
|
+
children: n
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
export {
|
|
35
|
+
x as IconTag
|
|
36
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Tag as e } from "./tag.js";
|
|
3
|
+
import { ClosableTag as t } from "./closable-tag.js";
|
|
4
|
+
import { IconTag as g } from "./icon-tag.js";
|
|
5
|
+
import { LinkTag as p } from "./link-tag.js";
|
|
6
|
+
export {
|
|
7
|
+
t as ClosableTag,
|
|
8
|
+
g as IconTag,
|
|
9
|
+
p as LinkTag,
|
|
10
|
+
e as Tag
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TagProps } from './tag.types';
|
|
3
|
+
export type LinkTagProps = TagProps & React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
|
+
readonly href: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* 带标签外观的链接。
|
|
8
|
+
*
|
|
9
|
+
* 根元素取自 `UiProvider` 的 `linkComponent`;未配置时为原生 `<a>`。
|
|
10
|
+
*/
|
|
11
|
+
export declare const LinkTag: ({ href, onClick, onKeyDown, ...others }: LinkTagProps) => React.JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { useUiLink as c } from "../../provider/hooks.js";
|
|
4
|
+
import { Tag as k } from "./tag.js";
|
|
5
|
+
const d = ({
|
|
6
|
+
href: r,
|
|
7
|
+
onClick: e,
|
|
8
|
+
onKeyDown: o,
|
|
9
|
+
...t
|
|
10
|
+
}) => {
|
|
11
|
+
const m = c("LinkTag");
|
|
12
|
+
return /* @__PURE__ */ n(
|
|
13
|
+
k,
|
|
14
|
+
{
|
|
15
|
+
...t,
|
|
16
|
+
renderRoot: (i) => /* @__PURE__ */ n(
|
|
17
|
+
m,
|
|
18
|
+
{
|
|
19
|
+
...i,
|
|
20
|
+
href: r,
|
|
21
|
+
onClick: e,
|
|
22
|
+
onKeyDown: o,
|
|
23
|
+
children: i.children
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
d as LinkTag
|
|
31
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const t = "_tag_r2m14_2", a = "_tagClosableButton_r2m14_36", n = "_tagLeftSection_r2m14_52", o = "_tagRightSection_r2m14_56", c = "_tagIcon_r2m14_60", g = "_tagIconSpacing_r2m14_65", _ = {
|
|
3
|
+
tag: t,
|
|
4
|
+
tagClosableButton: a,
|
|
5
|
+
tagLeftSection: n,
|
|
6
|
+
tagRightSection: o,
|
|
7
|
+
tagIcon: c,
|
|
8
|
+
tagIconSpacing: g
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
_ as default,
|
|
12
|
+
t as tag,
|
|
13
|
+
a as tagClosableButton,
|
|
14
|
+
c as tagIcon,
|
|
15
|
+
g as tagIconSpacing,
|
|
16
|
+
n as tagLeftSection,
|
|
17
|
+
o as tagRightSection
|
|
18
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TagProps } from './tag.types';
|
|
3
|
+
/**
|
|
4
|
+
* 基础标签组件。
|
|
5
|
+
*
|
|
6
|
+
* - 传入 `onClick` 后自动呈现可点击的 hover/active 交互样式。
|
|
7
|
+
* - `children` 超出宽度时自动显示 Tooltip。
|
|
8
|
+
* - 左侧需要图标时优先使用 `IconTag`,需要关闭功能时优先使用 `ClosableTag`,
|
|
9
|
+
* 其余特殊场景再通过 `leftSection` / `rightSection` 插入自定义内容。
|
|
10
|
+
* - 需要渲染为链接时使用 `LinkTag` 或通过 `renderRoot` 自定义根节点。
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // 基础用法
|
|
14
|
+
* <Tag variant="outline" color="brand" size="sm">标签</Tag>
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 可点击
|
|
18
|
+
* <Tag onClick={() => {}}>可点击标签</Tag>
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // 自定义插槽
|
|
22
|
+
* <Tag leftSection={<MyIcon />} rightSection={<CloseBtn />}>内容</Tag>
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // 自定义根节点
|
|
26
|
+
* <Tag renderRoot={props => <a href="/path" {...props} />}>链接标签</Tag>
|
|
27
|
+
*/
|
|
28
|
+
export declare const Tag: (_props: TagProps) => React.JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o, jsxs as b, Fragment as v } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as y } from "clsx";
|
|
4
|
+
import { Tooltip as k } from "../tooltip/index.js";
|
|
5
|
+
import x from "./styles/tag-variables.module.css.js";
|
|
6
|
+
import n from "./styles/tag.module.css.js";
|
|
7
|
+
const K = (m) => {
|
|
8
|
+
const {
|
|
9
|
+
children: a,
|
|
10
|
+
renderRoot: i,
|
|
11
|
+
className: f,
|
|
12
|
+
variant: u = "outline",
|
|
13
|
+
color: h = "brand",
|
|
14
|
+
borderRadius: p = "full",
|
|
15
|
+
size: g = "sm",
|
|
16
|
+
leftSection: s,
|
|
17
|
+
rightSection: c,
|
|
18
|
+
...t
|
|
19
|
+
} = m, r = !!t.onClick, l = {
|
|
20
|
+
className: y(n.tag, x.tagVars, f),
|
|
21
|
+
"data-variant": u,
|
|
22
|
+
"data-color": h,
|
|
23
|
+
"data-border-radius": p,
|
|
24
|
+
"data-size": g,
|
|
25
|
+
"data-click": r ? "true" : "false",
|
|
26
|
+
...r && { role: "button", tabIndex: 0 },
|
|
27
|
+
...t,
|
|
28
|
+
onKeyDown: r ? (e) => {
|
|
29
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), t.onClick?.(e)), t.onKeyDown?.(e);
|
|
30
|
+
} : t.onKeyDown
|
|
31
|
+
}, d = /* @__PURE__ */ b(v, { children: [
|
|
32
|
+
s && /* @__PURE__ */ o("div", { className: n.tagLeftSection, children: s }),
|
|
33
|
+
/* @__PURE__ */ o(k, { label: a, showOnlyWhenTruncated: !0, children: /* @__PURE__ */ o("div", { className: n.tagContent, children: a }) }),
|
|
34
|
+
c && /* @__PURE__ */ o("div", { className: n.tagRightSection, children: c })
|
|
35
|
+
] });
|
|
36
|
+
return typeof i == "function" ? i({ ...l, children: d }) : /* @__PURE__ */ o("span", { ...l, children: d });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
K as Tag
|
|
40
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { CommonColor, RefProps } from '../../common/components.types';
|
|
3
|
+
import type { IconName } from '@wisdomgarden/torque-icons';
|
|
4
|
+
export type TagVariant = 'outline' | 'light' | 'filled';
|
|
5
|
+
export type TagColor = CommonColor | 'white';
|
|
6
|
+
export type TagBorderRadius = 'xs' | 'full';
|
|
7
|
+
export type TagSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
8
|
+
export interface TagProps extends HTMLAttributes<HTMLDivElement>, RefProps<HTMLElement> {
|
|
9
|
+
/**
|
|
10
|
+
* 变体
|
|
11
|
+
* outline: 带边框的标签
|
|
12
|
+
* light: 浅色标签
|
|
13
|
+
* filled: 填充主色标签
|
|
14
|
+
* @default 'outline'
|
|
15
|
+
*/
|
|
16
|
+
variant?: TagVariant;
|
|
17
|
+
/**
|
|
18
|
+
* 色系:
|
|
19
|
+
* 红 橙 黄 绿 品牌青 蓝 air蓝 紫 粉紫 灰
|
|
20
|
+
* @default 'red'
|
|
21
|
+
*/
|
|
22
|
+
color?: TagColor;
|
|
23
|
+
/**
|
|
24
|
+
* 圆角
|
|
25
|
+
* xs: 圆角矩形
|
|
26
|
+
* full: 全圆角
|
|
27
|
+
* @default 'full'
|
|
28
|
+
*/
|
|
29
|
+
borderRadius?: TagBorderRadius;
|
|
30
|
+
/**
|
|
31
|
+
* 标签的大小
|
|
32
|
+
*/
|
|
33
|
+
size?: TagSize;
|
|
34
|
+
/**
|
|
35
|
+
* 右侧部分 一般是操作按钮
|
|
36
|
+
*/
|
|
37
|
+
rightSection?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* 左侧部分 一般是图标
|
|
40
|
+
*/
|
|
41
|
+
leftSection?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* 标签内容,一般为文字,或者文字加图标
|
|
44
|
+
*/
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* 自定义渲染根节点的方法,允许使用其他标签(如 a 标签、Link组件等)替换默认的 span 标签
|
|
48
|
+
*/
|
|
49
|
+
renderRoot?: (props: any) => React.ReactElement;
|
|
50
|
+
}
|
|
51
|
+
export interface IconTagProps extends TagProps {
|
|
52
|
+
/**
|
|
53
|
+
* 左侧显示的图标名称
|
|
54
|
+
*/
|
|
55
|
+
readonly iconName?: IconName;
|
|
56
|
+
/**
|
|
57
|
+
* 左侧图标自定义类名
|
|
58
|
+
*/
|
|
59
|
+
readonly iconClassName?: string;
|
|
60
|
+
/**
|
|
61
|
+
* 可以自己渲染左侧图标
|
|
62
|
+
*/
|
|
63
|
+
readonly renderIcon?: (props: {
|
|
64
|
+
className: string;
|
|
65
|
+
}) => React.ReactNode;
|
|
66
|
+
}
|
|
67
|
+
export interface ClosableTagProps extends TagProps {
|
|
68
|
+
/**
|
|
69
|
+
* 点击关闭按钮时的回调函数
|
|
70
|
+
*/
|
|
71
|
+
readonly onCloseClick: () => void;
|
|
72
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as d } from "clsx";
|
|
4
|
+
import { Box as p } from "../box/box.js";
|
|
5
|
+
import u from "./text.module.css.js";
|
|
6
|
+
function N(o) {
|
|
7
|
+
const {
|
|
8
|
+
component: a = "p",
|
|
9
|
+
size: t = "md",
|
|
10
|
+
fz: r,
|
|
11
|
+
lh: e,
|
|
12
|
+
fw: s,
|
|
13
|
+
truncate: m = !1,
|
|
14
|
+
className: c,
|
|
15
|
+
children: n,
|
|
16
|
+
...f
|
|
17
|
+
} = o, l = {
|
|
18
|
+
"data-truncate": m,
|
|
19
|
+
"data-fz": r ?? t,
|
|
20
|
+
"data-lh": e ?? t,
|
|
21
|
+
"data-fw": s
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ i(
|
|
24
|
+
p,
|
|
25
|
+
{
|
|
26
|
+
component: a,
|
|
27
|
+
className: d(u.root, c),
|
|
28
|
+
...f,
|
|
29
|
+
...l,
|
|
30
|
+
children: n
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
N as Text
|
|
36
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BoxProps, LayoutElement } from '../box/box.types';
|
|
2
|
+
export type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
3
|
+
export type TextFontWeight = 'normal' | 'medium';
|
|
4
|
+
export interface TextOwnProps {
|
|
5
|
+
readonly size?: TextSize;
|
|
6
|
+
readonly fz?: TextSize;
|
|
7
|
+
readonly lh?: TextSize;
|
|
8
|
+
readonly fw?: TextFontWeight;
|
|
9
|
+
readonly truncate?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type TextProps<T extends LayoutElement = 'p'> = TextOwnProps & BoxProps<T>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextAreaProps } from './text-area.types';
|
|
2
|
+
/**
|
|
3
|
+
* 多行文本输入框组件
|
|
4
|
+
* 基于 Mantine 的 Textarea 封装,内置字数统计、表单集成和统一的错误状态样式。
|
|
5
|
+
* 支持通过 `maxLength` 限制长度,并在右下角展示已输入的字符数(受控模式或使用 form 的情况下生效)。
|
|
6
|
+
*
|
|
7
|
+
* @param props - TextArea 组件的属性配置,详细请参考 `TextAreaProps`
|
|
8
|
+
*/
|
|
9
|
+
export declare const TextArea: (props: TextAreaProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as F, jsxs as y } from "react/jsx-runtime";
|
|
3
|
+
import { Textarea as q } from "@mantine/core";
|
|
4
|
+
import { useId as G, useMergedRef as H } from "@mantine/hooks";
|
|
5
|
+
import { clsx as c } from "clsx";
|
|
6
|
+
import { useRef as B, useEffect as I, useReducer as J } from "react";
|
|
7
|
+
import { useFormWrapperProps as K } from "../../common/use-form-wrapper-props.js";
|
|
8
|
+
import { useImeSafeInput as Q } from "../../common/use-ime-safe-input.js";
|
|
9
|
+
import { FormItemWrapper as U } from "../form-wrapper/form-item-wrapper.js";
|
|
10
|
+
import n from "./text-area.module.css.js";
|
|
11
|
+
const L = (e) => typeof e == "string" ? e : "", re = (e) => {
|
|
12
|
+
const f = G(e.id), { wrapProps: d, outerDescribedBy: S } = K(
|
|
13
|
+
{ ...e, borderRadius: void 0 },
|
|
14
|
+
f
|
|
15
|
+
), {
|
|
16
|
+
resize: z = "vertical",
|
|
17
|
+
disabled: T = !1,
|
|
18
|
+
showMaxLengthTip: V = !0,
|
|
19
|
+
rows: x = 2,
|
|
20
|
+
autosize: a,
|
|
21
|
+
minRows: W,
|
|
22
|
+
maxRows: j,
|
|
23
|
+
imeSafe: M = !0,
|
|
24
|
+
borderRadius: P = "md",
|
|
25
|
+
fill: s = !1
|
|
26
|
+
} = e, o = {
|
|
27
|
+
...e.fieldName && e.form?.getInputProps(e.fieldName)
|
|
28
|
+
};
|
|
29
|
+
typeof o == "object" && (o.error = !!o.error);
|
|
30
|
+
const { ref: A } = e, v = B(null), O = H(v, A), { maxLength: i } = e, r = o.value ?? e.value, m = i !== void 0 && typeof r == "string" && r.length > i ? r.slice(0, i) : r, b = M && m !== void 0, l = Q(m, (t) => {
|
|
31
|
+
if (e.form && e.fieldName)
|
|
32
|
+
e.form.setFieldValue(e.fieldName, t);
|
|
33
|
+
else {
|
|
34
|
+
const u = v.current, w = {
|
|
35
|
+
nativeEvent: new Event("input"),
|
|
36
|
+
target: u ?? { value: t },
|
|
37
|
+
currentTarget: u ?? { value: t }
|
|
38
|
+
};
|
|
39
|
+
e.onChange?.(w);
|
|
40
|
+
}
|
|
41
|
+
}), { form: h, fieldName: g, onChange: N } = e;
|
|
42
|
+
I(() => {
|
|
43
|
+
if (typeof r != "string" || i === void 0 || r.length <= i) return;
|
|
44
|
+
const t = r.slice(0, i);
|
|
45
|
+
h && g ? h.setFieldValue(g, t) : N?.({
|
|
46
|
+
nativeEvent: new Event("input"),
|
|
47
|
+
target: { value: t },
|
|
48
|
+
currentTarget: { value: t }
|
|
49
|
+
});
|
|
50
|
+
}, [r, i, h, g, N]);
|
|
51
|
+
const k = b ? {
|
|
52
|
+
value: l.value,
|
|
53
|
+
onChange: l.onChange,
|
|
54
|
+
onCompositionStart: l.onCompositionStart,
|
|
55
|
+
onCompositionEnd: l.onCompositionEnd
|
|
56
|
+
} : {
|
|
57
|
+
value: m,
|
|
58
|
+
onChange: o.onChange ?? e.onChange,
|
|
59
|
+
onCompositionStart: void 0,
|
|
60
|
+
onCompositionEnd: void 0
|
|
61
|
+
}, p = b ? L(l.value).length : L(m).length, E = !!e.maxLength && V, [, D] = J((t) => t + 1, 0), C = B(void 0);
|
|
62
|
+
return I(() => {
|
|
63
|
+
if (!a) return;
|
|
64
|
+
const t = v.current;
|
|
65
|
+
if (!t || typeof ResizeObserver > "u") return;
|
|
66
|
+
const u = new ResizeObserver((w) => {
|
|
67
|
+
const R = w[0]?.contentRect.width;
|
|
68
|
+
R != null && (C.current !== void 0 && Math.abs(R - C.current) < 0.5 || (C.current = R, D()));
|
|
69
|
+
});
|
|
70
|
+
return u.observe(t), () => u.disconnect();
|
|
71
|
+
}, [a]), /* @__PURE__ */ F(
|
|
72
|
+
U,
|
|
73
|
+
{
|
|
74
|
+
...d,
|
|
75
|
+
className: c(
|
|
76
|
+
n.fullWidth,
|
|
77
|
+
s && n.fillColumn,
|
|
78
|
+
d.className
|
|
79
|
+
),
|
|
80
|
+
id: f,
|
|
81
|
+
children: /* @__PURE__ */ y("div", { className: c(n.counterBox, s && n.fillColumn), children: [
|
|
82
|
+
/* @__PURE__ */ F(
|
|
83
|
+
q,
|
|
84
|
+
{
|
|
85
|
+
ref: O,
|
|
86
|
+
id: f,
|
|
87
|
+
error: d.error,
|
|
88
|
+
rows: a ? void 0 : x,
|
|
89
|
+
autosize: a,
|
|
90
|
+
minRows: a ? W ?? x : void 0,
|
|
91
|
+
maxRows: j,
|
|
92
|
+
classNames: {
|
|
93
|
+
root: c(s && n.fillColumn),
|
|
94
|
+
wrapper: c(s && n.fillColumn),
|
|
95
|
+
input: c(
|
|
96
|
+
n.areaBox,
|
|
97
|
+
P === "sm" && n.radiusSm,
|
|
98
|
+
E && n.withCounter,
|
|
99
|
+
s && n.fillInput,
|
|
100
|
+
e.classNames?.input
|
|
101
|
+
)
|
|
102
|
+
},
|
|
103
|
+
placeholder: e.placeholder,
|
|
104
|
+
maxLength: e.maxLength,
|
|
105
|
+
resize: z,
|
|
106
|
+
disabled: T,
|
|
107
|
+
...o,
|
|
108
|
+
...k,
|
|
109
|
+
onFocus: e.onFocus ?? o.onFocus,
|
|
110
|
+
onBlur: e.onBlur ?? o.onBlur,
|
|
111
|
+
"aria-describedby": S
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
E && /* @__PURE__ */ y("span", { className: n.counter, children: [
|
|
115
|
+
p,
|
|
116
|
+
"/",
|
|
117
|
+
e.maxLength
|
|
118
|
+
] })
|
|
119
|
+
] })
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
re as TextArea
|
|
125
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const t = "_areaBox_q552y_2", o = "_radiusSm_q552y_14", n = "_withCounter_q552y_18", l = "_fullWidth_q552y_63", _ = "_counterBox_q552y_67", u = "_fillColumn_q552y_74", c = "_fillInput_q552y_81", e = "_counter_q552y_67", s = {
|
|
3
|
+
areaBox: t,
|
|
4
|
+
radiusSm: o,
|
|
5
|
+
withCounter: n,
|
|
6
|
+
fullWidth: l,
|
|
7
|
+
counterBox: _,
|
|
8
|
+
fillColumn: u,
|
|
9
|
+
fillInput: c,
|
|
10
|
+
counter: e
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
t as areaBox,
|
|
14
|
+
e as counter,
|
|
15
|
+
_ as counterBox,
|
|
16
|
+
s as default,
|
|
17
|
+
u as fillColumn,
|
|
18
|
+
c as fillInput,
|
|
19
|
+
l as fullWidth,
|
|
20
|
+
o as radiusSm,
|
|
21
|
+
n as withCounter
|
|
22
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormProps, InputWrapProps, RefProps, RootClassNameProps } from '../../common/components.types';
|
|
3
|
+
/**
|
|
4
|
+
* 多行文本输入框属性
|
|
5
|
+
*/
|
|
6
|
+
export interface TextAreaProps extends Omit<InputWrapProps, 'borderRadius'>, FormProps, RootClassNameProps, RefProps<HTMLTextAreaElement>, Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'form'> {
|
|
7
|
+
/** 当前值(受控模式) */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** 默认值(非受控模式) */
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
/** 占位符文本 */
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
/** 允许输入的最大字符长度 */
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
/** 是否在右下角显示字符长度计数提示,默认 true。仅在传入 maxLength 时生效 */
|
|
16
|
+
showMaxLengthTip?: boolean;
|
|
17
|
+
/** 默认显示的文本行数,默认值为 2 */
|
|
18
|
+
rows?: number;
|
|
19
|
+
/** 是否自动增高,启用时使用 minRows/maxRows 替代 rows */
|
|
20
|
+
autosize?: boolean;
|
|
21
|
+
/** 自动增高模式下的最小行数 */
|
|
22
|
+
minRows?: number;
|
|
23
|
+
/** 自动增高模式下的最大行数 */
|
|
24
|
+
maxRows?: number;
|
|
25
|
+
/** 是否禁用输入框 */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** 允许调整大小的方向,同 CSS resize 属性。默认 'both' */
|
|
28
|
+
resize?: React.CSSProperties['resize'];
|
|
29
|
+
/** 自定义 class,支持覆盖 input 元素样式 */
|
|
30
|
+
classNames?: {
|
|
31
|
+
input?: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 是否启用中文输入法安全模式。
|
|
35
|
+
* 默认 `true`:中文输入过程中不触发 `onChange`,输入法确认后(compositionend)再提交最终值。
|
|
36
|
+
* 显式传 `false` 可恢复原生行为(每次按键都触发 onChange)。
|
|
37
|
+
*/
|
|
38
|
+
imeSafe?: boolean;
|
|
39
|
+
/** 圆角大小,`'md'` = 12px,`'sm'` = 8px。默认 `'md'` */
|
|
40
|
+
borderRadius?: 'md' | 'sm';
|
|
41
|
+
/**
|
|
42
|
+
* 是否撑满父容器剩余高度。默认 `false`。
|
|
43
|
+
* 需要父级是 flex 列容器(本组件作为可伸缩的 flex 子项),常见于抽屉/弹窗里让输入框吃满剩余空间。
|
|
44
|
+
*/
|
|
45
|
+
fill?: boolean;
|
|
46
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InnerInputProps } from '../base-input';
|
|
3
|
+
/**
|
|
4
|
+
* 文本输入框组件的属性类型
|
|
5
|
+
* 继承自内部基础输入框(`InnerInputProps`),支持表单集成、清空按钮、前后缀图标等配置。
|
|
6
|
+
*/
|
|
7
|
+
export type InputProps = InnerInputProps;
|
|
8
|
+
/**
|
|
9
|
+
* 文本输入框组件 (TextInput)
|
|
10
|
+
* 这是一个包装了基础输入框和表单项状态(Label、错误信息、必填星号等)的组件。
|
|
11
|
+
*
|
|
12
|
+
* @param props - 文本输入框的属性,详细请参考 `InputProps` (`InnerInputProps`)
|
|
13
|
+
*/
|
|
14
|
+
export declare function TextInput(props: Readonly<InputProps>): React.JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { createElement as n } from "react";
|
|
4
|
+
import { useId as f } from "@mantine/hooks";
|
|
5
|
+
import { useFormWrapperProps as a } from "../../common/use-form-wrapper-props.js";
|
|
6
|
+
import { BaseInput as c } from "../base-input/base-input.js";
|
|
7
|
+
import { getFormProps as d } from "../base-input/util.js";
|
|
8
|
+
import { FormItemWrapper as p } from "../form-wrapper/form-item-wrapper.js";
|
|
9
|
+
function F(r) {
|
|
10
|
+
const e = f(r.id), { wrapProps: o, rest: t, outerDescribedBy: m } = a(r, e);
|
|
11
|
+
return /* @__PURE__ */ i(p, { ...o, id: e, children: /* @__PURE__ */ n(
|
|
12
|
+
c,
|
|
13
|
+
{
|
|
14
|
+
...t,
|
|
15
|
+
...d(r, r.onClear),
|
|
16
|
+
key: r.form?.key(r.fieldName ?? ""),
|
|
17
|
+
id: e,
|
|
18
|
+
"aria-describedby": m
|
|
19
|
+
}
|
|
20
|
+
) });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
F as TextInput
|
|
24
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ArrowPosition, FloatingPosition } from './types';
|
|
2
|
+
export interface FloatingArrowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
readonly arrowX?: number;
|
|
4
|
+
readonly arrowY?: number;
|
|
5
|
+
readonly arrowSize?: number;
|
|
6
|
+
readonly arrowOffset?: number;
|
|
7
|
+
readonly arrowRadius?: number;
|
|
8
|
+
readonly arrowPosition?: ArrowPosition;
|
|
9
|
+
readonly dir?: 'rtl' | 'ltr';
|
|
10
|
+
readonly ref?: React.Ref<HTMLDivElement>;
|
|
11
|
+
readonly placement: FloatingPosition;
|
|
12
|
+
}
|
|
13
|
+
export declare const FloatingArrow: ({ arrowX, arrowY, arrowSize, arrowOffset, arrowRadius, arrowPosition, dir, className, style, ref, placement, ...others }: FloatingArrowProps) => import("react").JSX.Element;
|