@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 m } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as d } from "clsx";
|
|
4
|
+
import n from "../styles/base-input.module.css.js";
|
|
5
|
+
const g = ({
|
|
6
|
+
ref: r,
|
|
7
|
+
error: s,
|
|
8
|
+
hideValue: e,
|
|
9
|
+
textColor: i,
|
|
10
|
+
classNames: o,
|
|
11
|
+
renderRoot: t,
|
|
12
|
+
children: p,
|
|
13
|
+
required: u,
|
|
14
|
+
...c
|
|
15
|
+
}) => {
|
|
16
|
+
const l = d(
|
|
17
|
+
n.inputNative,
|
|
18
|
+
e && n.inputNativeHidden,
|
|
19
|
+
o?.input
|
|
20
|
+
), a = {
|
|
21
|
+
ref: r,
|
|
22
|
+
className: l,
|
|
23
|
+
style: i ? { color: i } : void 0,
|
|
24
|
+
"aria-invalid": s ? !0 : void 0,
|
|
25
|
+
"aria-required": u,
|
|
26
|
+
...c
|
|
27
|
+
};
|
|
28
|
+
return typeof t == "function" ? t({
|
|
29
|
+
...a,
|
|
30
|
+
children: p
|
|
31
|
+
}) : /* @__PURE__ */ m("input", { ...a });
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
g as BaseInputTarget
|
|
35
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BoxProps, LayoutElement } from '../../box';
|
|
2
|
+
import { BaseInputClassNames, BaseInputProps } from '../base-input.types';
|
|
3
|
+
type BaseInputWrapperProps<T extends LayoutElement = 'div'> = {
|
|
4
|
+
readonly className?: string;
|
|
5
|
+
readonly classNames?: BaseInputClassNames;
|
|
6
|
+
readonly size?: BaseInputProps['size'];
|
|
7
|
+
readonly borderRadius?: BaseInputProps['borderRadius'];
|
|
8
|
+
readonly error?: BaseInputProps['error'];
|
|
9
|
+
readonly disabled?: boolean;
|
|
10
|
+
readonly pointer?: boolean;
|
|
11
|
+
readonly inputRef?: React.RefObject<HTMLInputElement | null>;
|
|
12
|
+
readonly onClick?: React.MouseEventHandler<HTMLElement>;
|
|
13
|
+
readonly onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
14
|
+
readonly onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
15
|
+
readonly children?: React.ReactNode;
|
|
16
|
+
} & BoxProps<T>;
|
|
17
|
+
export declare function BaseInputWrapper<T extends LayoutElement = 'div'>({ className, classNames, size, borderRadius, error, disabled, pointer, inputRef, onClick, onMouseEnter, onMouseLeave, children, ...reset }: BaseInputWrapperProps<T>): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as v } from "clsx";
|
|
4
|
+
import { Box as x } from "../../box/box.js";
|
|
5
|
+
import B from "../styles/base-input-variables.module.css.js";
|
|
6
|
+
import C from "../styles/base-input.module.css.js";
|
|
7
|
+
function N({
|
|
8
|
+
className: o,
|
|
9
|
+
classNames: t,
|
|
10
|
+
size: a = "md",
|
|
11
|
+
borderRadius: e = "full",
|
|
12
|
+
error: i,
|
|
13
|
+
disabled: r,
|
|
14
|
+
pointer: s,
|
|
15
|
+
inputRef: p,
|
|
16
|
+
onClick: u,
|
|
17
|
+
onMouseEnter: m,
|
|
18
|
+
onMouseLeave: d,
|
|
19
|
+
children: n,
|
|
20
|
+
...c
|
|
21
|
+
}) {
|
|
22
|
+
return (
|
|
23
|
+
// onClick 仅用于扩大鼠标/触屏点击热区(点击视觉边框聚焦 input)。
|
|
24
|
+
/* @__PURE__ */ l(
|
|
25
|
+
x,
|
|
26
|
+
{
|
|
27
|
+
className: v(
|
|
28
|
+
B.inputVar,
|
|
29
|
+
C.inputRoot,
|
|
30
|
+
t?.wrapper,
|
|
31
|
+
o
|
|
32
|
+
),
|
|
33
|
+
"data-size": a,
|
|
34
|
+
"data-radius": e,
|
|
35
|
+
"data-error": i ? "true" : void 0,
|
|
36
|
+
"data-disabled": r ? "true" : void 0,
|
|
37
|
+
"data-pointer": s ? "true" : void 0,
|
|
38
|
+
onMouseEnter: m,
|
|
39
|
+
onMouseLeave: d,
|
|
40
|
+
onClick: r ? void 0 : (f) => {
|
|
41
|
+
p?.current?.focus(), u?.(f);
|
|
42
|
+
},
|
|
43
|
+
...c,
|
|
44
|
+
children: n
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
N as BaseInputWrapper
|
|
51
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function t(e, f) {
|
|
3
|
+
const m = () => {
|
|
4
|
+
f ? f() : e.form && e.fieldName && e.form.setFieldValue(e.fieldName, "");
|
|
5
|
+
};
|
|
6
|
+
let i = {};
|
|
7
|
+
return e.form && e.fieldName && (i = {
|
|
8
|
+
...e.form?.getInputProps(e.fieldName)
|
|
9
|
+
}), {
|
|
10
|
+
...i,
|
|
11
|
+
onClear: m
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
t as getFormProps
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseBottomDrawerProps } from '../_inner/drawer/base-bottom-drawer';
|
|
2
|
+
export type BottomDrawerProps = BaseBottomDrawerProps;
|
|
3
|
+
/**
|
|
4
|
+
* 移动端使用的底部弹出的抽屉组件
|
|
5
|
+
*/
|
|
6
|
+
export declare const BottomDrawer: ({ children, ...props }: BottomDrawerProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as m } from "clsx";
|
|
4
|
+
import { BaseBottomDrawer as e } from "../_inner/drawer/base-bottom-drawer.js";
|
|
5
|
+
import s from "../_inner/drawer/base-bottom-drawer.module.css.js";
|
|
6
|
+
const b = ({ children: t, ...o }) => /* @__PURE__ */ r(
|
|
7
|
+
e,
|
|
8
|
+
{
|
|
9
|
+
...o,
|
|
10
|
+
bodyClassName: m(o.bodyClassName, s.bodyXPadding),
|
|
11
|
+
children: t
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
export {
|
|
15
|
+
b as BottomDrawer
|
|
16
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { clsx as m } from "clsx";
|
|
4
|
+
import n from "./box.module.css.js";
|
|
5
|
+
function p(t) {
|
|
6
|
+
const {
|
|
7
|
+
component: o = "div",
|
|
8
|
+
hiddenFrom: r,
|
|
9
|
+
visibleFrom: a,
|
|
10
|
+
className: s,
|
|
11
|
+
...e
|
|
12
|
+
} = t;
|
|
13
|
+
return /* @__PURE__ */ i(
|
|
14
|
+
o,
|
|
15
|
+
{
|
|
16
|
+
...e,
|
|
17
|
+
...{
|
|
18
|
+
"data-hidden-from": r,
|
|
19
|
+
"data-visible-from": a
|
|
20
|
+
},
|
|
21
|
+
className: m(n.root, s)
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
p as Box
|
|
27
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `component` prop 支持的 HTML 标签联合类型。
|
|
4
|
+
*
|
|
5
|
+
* 仅包含常见语义标签,不支持传入 React 组件——
|
|
6
|
+
* 传入标签字符串后,TS 会通过泛型自动推导对应的原生属性和 ref 类型。
|
|
7
|
+
*/
|
|
8
|
+
export type LayoutElement = 'div' | 'span' | 'p' | 'section' | 'article' | 'aside' | 'nav' | 'header' | 'footer' | 'main' | 'form' | 'fieldset' | 'ul' | 'ol' | 'li' | 'label' | 'a' | 'button' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
9
|
+
/**
|
|
10
|
+
* 断点 token,对应项目 tailwind.js 里的
|
|
11
|
+
* `xs`(576) / `sm`(768) / `md`(1200) / `lg`(1440) / `xl`(1920)。
|
|
12
|
+
*/
|
|
13
|
+
export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
/**
|
|
15
|
+
* 支持 `component` 动态标签渲染的基础 prop。
|
|
16
|
+
*
|
|
17
|
+
* Flex 和 Paper 的 OwnProps 都继承此接口,
|
|
18
|
+
* 共享 `component` 泛型推导能力和响应式显隐。
|
|
19
|
+
*
|
|
20
|
+
* @typeParam T - 渲染的 HTML 标签,默认 `'div'`。
|
|
21
|
+
*/
|
|
22
|
+
export interface LayoutBaseProps<T extends LayoutElement = 'div'> {
|
|
23
|
+
/** 渲染的 HTML 标签,TS 自动推导对应原生属性与 ref 类型。 */
|
|
24
|
+
readonly component?: T;
|
|
25
|
+
/** 在该断点及以上隐藏(`display: none`)*/
|
|
26
|
+
readonly hiddenFrom?: Breakpoint;
|
|
27
|
+
/** 在该断点以下隐藏(`display: none` */
|
|
28
|
+
readonly visibleFrom?: Breakpoint;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 将组件自有 prop 与对应 HTML 标签的原生属性合并。
|
|
32
|
+
*
|
|
33
|
+
* 同名冲突时自有 prop 优先(如原生 `align` 被自定义 `FlexAlign` 覆盖)。
|
|
34
|
+
*/
|
|
35
|
+
export type PolymorphicProps<T extends LayoutElement, OwnProps extends LayoutBaseProps<T>> = OwnProps & Omit<ComponentPropsWithRef<T>, keyof OwnProps>;
|
|
36
|
+
export type BoxProps<T extends LayoutElement = 'div'> = PolymorphicProps<T, LayoutBaseProps<T>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from './button.types';
|
|
3
|
+
/**
|
|
4
|
+
* 基础 Button 组件
|
|
5
|
+
*
|
|
6
|
+
* 提供了多种变体(variant)、颜色(color)、尺寸(size)和图标支持。
|
|
7
|
+
* 支持加载状态(loading)和禁用状态(disabled)。
|
|
8
|
+
* 可以通过 `renderRoot` 属性自定义渲染外层标签。
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <Button variant="primary" color="brand" leftIconName="plus">
|
|
13
|
+
* 点击操作
|
|
14
|
+
* </Button>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const Button: (_props: ButtonProps) => React.JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as u, Fragment as $, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { Loader as q } from "@mantine/core";
|
|
4
|
+
import { Icon as b } from "@wisdomgarden/torque-icons";
|
|
5
|
+
import { clsx as e } from "clsx";
|
|
6
|
+
import { Fragment as w } from "react";
|
|
7
|
+
import E from "./styles/button-variables.module.css.js";
|
|
8
|
+
import t from "./styles/button.module.css.js";
|
|
9
|
+
const S = (g) => {
|
|
10
|
+
const {
|
|
11
|
+
children: h,
|
|
12
|
+
variant: r = "primary",
|
|
13
|
+
ghost: p = !1,
|
|
14
|
+
color: I = "brand",
|
|
15
|
+
leftIconName: s,
|
|
16
|
+
leftIconUseOriginalColor: x = !1,
|
|
17
|
+
leftIconClassName: N,
|
|
18
|
+
rightIconName: i,
|
|
19
|
+
rightIconUseOriginalColor: C = !1,
|
|
20
|
+
rightIconClassName: v,
|
|
21
|
+
size: y = "md",
|
|
22
|
+
loading: o,
|
|
23
|
+
disabled: l,
|
|
24
|
+
borderRadius: O,
|
|
25
|
+
onClick: c,
|
|
26
|
+
className: R,
|
|
27
|
+
floating: z = !1,
|
|
28
|
+
truncate: D = !1,
|
|
29
|
+
renderRoot: d,
|
|
30
|
+
"aria-disabled": F,
|
|
31
|
+
tabIndex: j,
|
|
32
|
+
type: k = "button",
|
|
33
|
+
...B
|
|
34
|
+
} = g, n = l || o, L = O ?? (r === "text" ? "xs" : "full"), T = n ? -1 : j, U = n ? !0 : F, A = {
|
|
35
|
+
"data-disabled": n,
|
|
36
|
+
"data-loading": o,
|
|
37
|
+
"data-variant": r,
|
|
38
|
+
"data-ghost": p,
|
|
39
|
+
"data-color": I,
|
|
40
|
+
"data-size": y,
|
|
41
|
+
"data-radius": L,
|
|
42
|
+
"data-floating": z,
|
|
43
|
+
className: e(
|
|
44
|
+
"t-button",
|
|
45
|
+
E.buttonVar,
|
|
46
|
+
t.button,
|
|
47
|
+
R
|
|
48
|
+
),
|
|
49
|
+
"aria-disabled": U,
|
|
50
|
+
tabIndex: T,
|
|
51
|
+
type: k,
|
|
52
|
+
...B
|
|
53
|
+
}, m = /* @__PURE__ */ u($, { children: [
|
|
54
|
+
/* @__PURE__ */ a("div", { className: t.loader, children: typeof o == "boolean" && o && /* @__PURE__ */ a(q, { size: "xs" }) }),
|
|
55
|
+
/* @__PURE__ */ u(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: e(t.content, D && t.contentTruncate),
|
|
59
|
+
children: [
|
|
60
|
+
s && /* @__PURE__ */ a(
|
|
61
|
+
b,
|
|
62
|
+
{
|
|
63
|
+
name: s,
|
|
64
|
+
useOriginalColor: x,
|
|
65
|
+
className: e(t.buttonLeftIcon, N)
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
h,
|
|
69
|
+
i && /* @__PURE__ */ a(
|
|
70
|
+
b,
|
|
71
|
+
{
|
|
72
|
+
name: i,
|
|
73
|
+
useOriginalColor: C,
|
|
74
|
+
className: e(t.buttonRightIcon, v)
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] }), f = {
|
|
81
|
+
onClick: (V) => {
|
|
82
|
+
l || o || c && c(V);
|
|
83
|
+
},
|
|
84
|
+
children: m,
|
|
85
|
+
...A
|
|
86
|
+
};
|
|
87
|
+
return /* @__PURE__ */ a(w, { children: typeof d == "function" ? d(f) : /* @__PURE__ */ a("button", { ...f, children: m }) });
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
S as Button
|
|
91
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { IconName } from '@wisdomgarden/torque-icons';
|
|
2
|
+
import React, { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { ButtonSize, RefProps } from '../../common/components.types';
|
|
4
|
+
export type ButtonColor = 'brand' | 'regular' | 'air' | 'secondary' | 'dangerous';
|
|
5
|
+
/**
|
|
6
|
+
* 按钮组件的属性定义
|
|
7
|
+
*/
|
|
8
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, RefProps<HTMLButtonElement> {
|
|
9
|
+
/**
|
|
10
|
+
* 按钮内容
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode | string;
|
|
13
|
+
/**
|
|
14
|
+
* 按钮风格变体
|
|
15
|
+
* @default 'primary'
|
|
16
|
+
*/
|
|
17
|
+
variant?: 'primary' | 'light' | 'stroke' | 'dotted' | 'text';
|
|
18
|
+
/**
|
|
19
|
+
* 幽灵模式,使背景透明并反转颜色,适用于有颜色的背景上
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
ghost?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 按钮的色系
|
|
25
|
+
* @default 'brand'
|
|
26
|
+
*/
|
|
27
|
+
color?: ButtonColor;
|
|
28
|
+
/**
|
|
29
|
+
* 左侧图标名称
|
|
30
|
+
*/
|
|
31
|
+
leftIconName?: IconName;
|
|
32
|
+
/**
|
|
33
|
+
* 左侧图标是否使用原色
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
leftIconUseOriginalColor?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 左侧图标自定义类名
|
|
39
|
+
*/
|
|
40
|
+
leftIconClassName?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 右侧图标名称
|
|
43
|
+
*/
|
|
44
|
+
rightIconName?: IconName;
|
|
45
|
+
/**
|
|
46
|
+
* 右侧图标是否使用原色
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
rightIconUseOriginalColor?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 右侧图标自定义类名
|
|
52
|
+
*/
|
|
53
|
+
rightIconClassName?: string;
|
|
54
|
+
/**
|
|
55
|
+
* 按钮尺寸
|
|
56
|
+
* @default 'md'
|
|
57
|
+
*/
|
|
58
|
+
size?: ButtonSize;
|
|
59
|
+
/**
|
|
60
|
+
* 是否禁用按钮
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 是否显示加载状态
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
loading?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* 按钮圆角大小。未显式传入时,`variant="text"` 默认为 `'xs'`,其余变体默认为 `'full'`
|
|
71
|
+
* @default 'full'(`variant="text"` 时为 `'xs'`)
|
|
72
|
+
*/
|
|
73
|
+
borderRadius?: 'full' | 'sm' | 'xs';
|
|
74
|
+
/**
|
|
75
|
+
* 是否作为悬浮按钮显示 (Floating Action Button)
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
floating?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 文字过长时截断并显示省略号
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
truncate?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 自定义渲染根节点的方法,允许使用其他标签(如 a 标签、Link组件等)替换默认的 button 标签
|
|
86
|
+
*/
|
|
87
|
+
renderRoot?: (props: Record<string, any>) => any;
|
|
88
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const t = "_button_180zv_2", n = "_content_180zv_39", o = "_contentTruncate_180zv_50", c = "_loader_180zv_55", e = "_buttonLeftIcon_180zv_83", _ = "_buttonRightIcon_180zv_88", u = {
|
|
3
|
+
button: t,
|
|
4
|
+
content: n,
|
|
5
|
+
contentTruncate: o,
|
|
6
|
+
loader: c,
|
|
7
|
+
buttonLeftIcon: e,
|
|
8
|
+
buttonRightIcon: _
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
t as button,
|
|
12
|
+
e as buttonLeftIcon,
|
|
13
|
+
_ as buttonRightIcon,
|
|
14
|
+
n as content,
|
|
15
|
+
o as contentTruncate,
|
|
16
|
+
u as default,
|
|
17
|
+
c as loader
|
|
18
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CheckboxContextValue, CheckboxGroupProps } from './checkbox.types';
|
|
3
|
+
export declare const CheckboxContext: React.Context<CheckboxContextValue | null>;
|
|
4
|
+
/**
|
|
5
|
+
* 复选框组组件
|
|
6
|
+
*/
|
|
7
|
+
export declare const CheckboxGroup: ({ ref, ...props }: CheckboxGroupProps) => React.JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useId as s, useUncontrolled as y } from "@mantine/hooks";
|
|
4
|
+
import { createContext as _ } from "react";
|
|
5
|
+
import { useFormWrapperProps as w } from "../../common/use-form-wrapper-props.js";
|
|
6
|
+
import { FormItemWrapper as F } from "../form-wrapper/form-item-wrapper.js";
|
|
7
|
+
const N = _(null), z = ({ ref: u, ...e }) => {
|
|
8
|
+
const r = s(e.id), { wrapProps: i, rest: d, outerDescribedBy: h, labelId: m } = w(
|
|
9
|
+
e,
|
|
10
|
+
r
|
|
11
|
+
), {
|
|
12
|
+
children: p,
|
|
13
|
+
value: C,
|
|
14
|
+
defaultValue: b,
|
|
15
|
+
onChange: g,
|
|
16
|
+
name: x,
|
|
17
|
+
id: P,
|
|
18
|
+
groupClassName: f,
|
|
19
|
+
...T
|
|
20
|
+
} = d, V = s(x), [t, k] = y({
|
|
21
|
+
value: C,
|
|
22
|
+
defaultValue: b,
|
|
23
|
+
finalValue: [],
|
|
24
|
+
onChange: g
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ o(F, { ...i, id: r, children: /* @__PURE__ */ o(N, { value: {
|
|
27
|
+
name: V,
|
|
28
|
+
value: t,
|
|
29
|
+
onChange: (l) => {
|
|
30
|
+
const n = l.currentTarget.value, v = l.currentTarget.checked, c = t || [];
|
|
31
|
+
let a;
|
|
32
|
+
v ? a = [...c, n] : a = c.filter((I) => I !== n), k(a);
|
|
33
|
+
}
|
|
34
|
+
}, children: /* @__PURE__ */ o(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
ref: u,
|
|
38
|
+
role: "group",
|
|
39
|
+
id: r,
|
|
40
|
+
"aria-label": e["aria-label"],
|
|
41
|
+
"aria-labelledby": m,
|
|
42
|
+
"aria-describedby": h,
|
|
43
|
+
className: f,
|
|
44
|
+
children: p
|
|
45
|
+
}
|
|
46
|
+
) }) });
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
N as CheckboxContext,
|
|
50
|
+
z as CheckboxGroup
|
|
51
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o, jsxs as j } from "react/jsx-runtime";
|
|
3
|
+
import { useId as B } from "@mantine/hooks";
|
|
4
|
+
import { clsx as c } from "clsx";
|
|
5
|
+
import { use as E, useRef as F, useCallback as I, useLayoutEffect as L } from "react";
|
|
6
|
+
import { CheckboxContext as O } from "./checkbox-group.js";
|
|
7
|
+
import k from "./checkbox-variables.module.css.js";
|
|
8
|
+
import s from "./checkbox.module.css.js";
|
|
9
|
+
const P = (a) => {
|
|
10
|
+
const {
|
|
11
|
+
id: x,
|
|
12
|
+
className: d,
|
|
13
|
+
wrapperClassName: m,
|
|
14
|
+
label: u,
|
|
15
|
+
checked: C,
|
|
16
|
+
onChange: p,
|
|
17
|
+
name: N,
|
|
18
|
+
value: f,
|
|
19
|
+
indeterminate: t,
|
|
20
|
+
color: h = "brand",
|
|
21
|
+
labelClassName: g,
|
|
22
|
+
visualOnly: v = !1,
|
|
23
|
+
...y
|
|
24
|
+
} = a, n = E(O), b = B(x), l = n ? n.value?.includes(f) ?? !1 : C, i = F(null), R = I(
|
|
25
|
+
(e) => {
|
|
26
|
+
i.current = e;
|
|
27
|
+
const r = a.ref;
|
|
28
|
+
typeof r == "function" ? r(e) : r && (r.current = e);
|
|
29
|
+
},
|
|
30
|
+
[a.ref]
|
|
31
|
+
);
|
|
32
|
+
L(() => {
|
|
33
|
+
i.current && (i.current.indeterminate = !!t);
|
|
34
|
+
}, [t, l]);
|
|
35
|
+
const w = (e) => {
|
|
36
|
+
n?.onChange(e), p?.(e);
|
|
37
|
+
}, V = n?.name ?? N;
|
|
38
|
+
return v ? /* @__PURE__ */ o(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
className: c(s.wrapper, m),
|
|
43
|
+
children: /* @__PURE__ */ o(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
"data-color": h,
|
|
47
|
+
"data-indeterminate": t,
|
|
48
|
+
"data-visual-checked": l ? "true" : void 0,
|
|
49
|
+
"data-disabled": a.disabled ? "true" : void 0,
|
|
50
|
+
className: c(
|
|
51
|
+
d,
|
|
52
|
+
s.checkbox,
|
|
53
|
+
k.checkboxVars
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
) : /* @__PURE__ */ j("div", { className: c(s.wrapper, m), children: [
|
|
59
|
+
/* @__PURE__ */ o(
|
|
60
|
+
"input",
|
|
61
|
+
{
|
|
62
|
+
...y,
|
|
63
|
+
ref: R,
|
|
64
|
+
"data-indeterminate": t,
|
|
65
|
+
"data-color": h,
|
|
66
|
+
type: "checkbox",
|
|
67
|
+
id: b,
|
|
68
|
+
name: V,
|
|
69
|
+
value: f,
|
|
70
|
+
checked: l,
|
|
71
|
+
onChange: w,
|
|
72
|
+
className: c(d, s.checkbox, k.checkboxVars),
|
|
73
|
+
onClick: (e) => {
|
|
74
|
+
e.stopPropagation(), a.onClick?.(e);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
u && // eslint-disable-next-line jsx-a11y/label-has-for
|
|
79
|
+
/* @__PURE__ */ o(
|
|
80
|
+
"label",
|
|
81
|
+
{
|
|
82
|
+
htmlFor: b,
|
|
83
|
+
"data-disabled": a.disabled,
|
|
84
|
+
className: c(s.label, g),
|
|
85
|
+
children: u
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] });
|
|
89
|
+
};
|
|
90
|
+
P.displayName = "Checkbox";
|
|
91
|
+
export {
|
|
92
|
+
P as Checkbox
|
|
93
|
+
};
|