musae 0.2.26 → 0.3.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/dist/components/avatar/avatar.cjs +179 -0
- package/dist/components/avatar/{avatar.js → avatar.mjs} +12 -12
- package/dist/components/avatar/context.cjs +9 -0
- package/dist/components/avatar/group.cjs +67 -0
- package/dist/components/avatar/{group.js → group.mjs} +6 -6
- package/dist/components/avatar/index.cjs +8 -0
- package/dist/components/avatar/{index.js → index.mjs} +2 -2
- package/dist/components/avatar/types.d.ts +1 -1
- package/dist/components/badge/badge.cjs +120 -0
- package/dist/components/badge/{badge.js → badge.mjs} +9 -10
- package/dist/components/badge/types.d.ts +1 -1
- package/dist/components/bench/bench.cjs +164 -0
- package/dist/components/bench/bench.d.ts +2 -2
- package/dist/components/bench/{bench.js → bench.mjs} +13 -14
- package/dist/components/bench/hooks.cjs +129 -0
- package/dist/components/bench/hooks.d.ts +4 -4
- package/dist/components/bench/{hooks.js → hooks.mjs} +3 -3
- package/dist/components/bench/index.d.ts +0 -2
- package/dist/components/breadcrumb/breadcrumb.cjs +60 -0
- package/dist/components/breadcrumb/{breadcrumb.js → breadcrumb.mjs} +10 -11
- package/dist/components/breadcrumb/item.cjs +88 -0
- package/dist/components/breadcrumb/{item.js → item.mjs} +6 -6
- package/dist/components/breadcrumb/types.d.ts +1 -1
- package/dist/components/button/button.cjs +298 -0
- package/dist/components/button/{button.js → button.mjs} +15 -15
- package/dist/components/button/hooks.cjs +24 -0
- package/dist/components/button/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/button/types.d.ts +1 -1
- package/dist/components/calendar/calendar.cjs +109 -0
- package/dist/components/calendar/{calendar.js → calendar.mjs} +15 -16
- package/dist/components/calendar/hooks.cjs +235 -0
- package/dist/components/calendar/{hooks.js → hooks.mjs} +11 -11
- package/dist/components/calendar/types.d.ts +1 -1
- package/dist/components/cascader/cascader.cjs +86 -0
- package/dist/components/cascader/{cascader.js → cascader.mjs} +8 -9
- package/dist/components/cascader/hooks.cjs +130 -0
- package/dist/components/cascader/hooks.d.ts +2 -2
- package/dist/components/cascader/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/cascader/types.d.ts +1 -1
- package/dist/components/cascader/utils.cjs +108 -0
- package/dist/components/cascader/utils.d.ts +1 -1
- package/dist/components/checkbox/checkbox.cjs +88 -0
- package/dist/components/checkbox/{checkbox.js → checkbox.mjs} +10 -10
- package/dist/components/checkbox/context.cjs +7 -0
- package/dist/components/checkbox/group.cjs +48 -0
- package/dist/components/checkbox/{group.js → group.mjs} +1 -1
- package/dist/components/checkbox/index.cjs +8 -0
- package/dist/components/checkbox/{index.js → index.mjs} +2 -2
- package/dist/components/checkbox/styles.cjs +186 -0
- package/dist/components/checkbox/styles.d.ts +1 -0
- package/dist/components/checkbox/{styles.js → styles.mjs} +1 -0
- package/dist/components/checkbox/types.d.ts +1 -1
- package/dist/components/clock/clock.cjs +40 -0
- package/dist/components/clock/{clock.js → clock.mjs} +7 -8
- package/dist/components/clock/column.cjs +92 -0
- package/dist/components/clock/{column.js → column.mjs} +9 -9
- package/dist/components/clock/hooks.cjs +12 -0
- package/dist/components/clock/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/clock/types.cjs +6 -0
- package/dist/components/clock/types.d.ts +1 -1
- package/dist/components/collapse/collapse.cjs +102 -0
- package/dist/components/collapse/{collapse.js → collapse.mjs} +10 -11
- package/dist/components/collapse/context.cjs +12 -0
- package/dist/components/collapse/hooks.cjs +51 -0
- package/dist/components/collapse/item.cjs +170 -0
- package/dist/components/collapse/{item.js → item.mjs} +9 -9
- package/dist/components/collapse/types.d.ts +1 -1
- package/dist/components/config/context.cjs +11 -0
- package/dist/components/config/{context.js → context.mjs} +1 -1
- package/dist/components/config/hooks.cjs +12 -0
- package/dist/components/config/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/config/provider.cjs +35 -0
- package/dist/components/config/{provider.js → provider.mjs} +7 -8
- package/dist/components/config/types.d.ts +1 -1
- package/dist/components/countdown/countdown.cjs +85 -0
- package/dist/components/countdown/{countdown.js → countdown.mjs} +2 -3
- package/dist/components/countdown/types.d.ts +1 -1
- package/dist/components/date-picker/date-picker.cjs +45 -0
- package/dist/components/date-picker/{date-picker.js → date-picker.mjs} +12 -13
- package/dist/components/date-picker/hooks.cjs +31 -0
- package/dist/components/date-range-picker/date-range-picker.cjs +56 -0
- package/dist/components/date-range-picker/{date-range-picker.js → date-range-picker.mjs} +8 -9
- package/dist/components/date-range-picker/hooks.cjs +41 -0
- package/dist/components/dialog/dialog.cjs +40 -0
- package/dist/components/dialog/{dialog.js → dialog.mjs} +3 -4
- package/dist/components/dialog/hooks.cjs +32 -0
- package/dist/components/dialog/{hooks.js → hooks.mjs} +4 -4
- package/dist/components/dialog/popup.cjs +216 -0
- package/dist/components/dialog/{popup.js → popup.mjs} +20 -20
- package/dist/components/dialog/types.d.ts +1 -1
- package/dist/components/divider/divider.cjs +181 -0
- package/dist/components/divider/{divider.js → divider.mjs} +12 -13
- package/dist/components/divider/hooks.cjs +16 -0
- package/dist/components/divider/types.d.ts +1 -1
- package/dist/components/drawer/drawer.cjs +46 -0
- package/dist/components/drawer/{drawer.js → drawer.mjs} +3 -4
- package/dist/components/drawer/hooks.cjs +8 -0
- package/dist/components/drawer/popup.cjs +276 -0
- package/dist/components/drawer/{popup.js → popup.mjs} +15 -15
- package/dist/components/drawer/types.d.ts +1 -1
- package/dist/components/empty/empty.cjs +66 -0
- package/dist/components/empty/{empty.js → empty.mjs} +8 -9
- package/dist/components/floating-action-button/floatable.cjs +102 -0
- package/dist/components/floating-action-button/{floatable.js → floatable.mjs} +4 -4
- package/dist/components/floating-action-button/floating-action-button.cjs +39 -0
- package/dist/components/floating-action-button/{floating-action-button.js → floating-action-button.mjs} +3 -4
- package/dist/components/form/context.cjs +12 -0
- package/dist/components/form/context.d.ts +1 -1
- package/dist/components/form/{context.js → context.mjs} +1 -2
- package/dist/components/form/field/error.cjs +74 -0
- package/dist/components/form/field/error.d.ts +1 -1
- package/dist/components/form/field/{error.js → error.mjs} +6 -6
- package/dist/components/form/field/field.cjs +96 -0
- package/dist/components/form/field/field.d.ts +2 -2
- package/dist/components/form/field/field.mjs +94 -0
- package/dist/components/form/field/layout.cjs +79 -0
- package/dist/components/form/field/layout.d.ts +4 -3
- package/dist/components/form/field/layout.mjs +77 -0
- package/dist/components/form/form.cjs +55 -0
- package/dist/components/form/form.d.ts +1 -1
- package/dist/components/form/{form.js → form.mjs} +2 -2
- package/dist/components/form/hooks.cjs +14 -0
- package/dist/components/form/index.cjs +10 -0
- package/dist/components/form/index.d.ts +1 -4
- package/dist/components/form/index.mjs +10 -0
- package/dist/components/form/item.cjs +35 -0
- package/dist/components/form/item.d.ts +1 -1
- package/dist/components/form/{item.js → item.mjs} +4 -2
- package/dist/components/grid/col.cjs +40 -0
- package/dist/components/grid/{col.js → col.mjs} +5 -5
- package/dist/components/grid/index.cjs +9 -0
- package/dist/components/grid/{index.js → index.mjs} +2 -2
- package/dist/components/grid/row.cjs +65 -0
- package/dist/components/grid/{row.js → row.mjs} +6 -6
- package/dist/components/grid/types.d.ts +1 -1
- package/dist/components/highlight/highlight.cjs +57 -0
- package/dist/components/highlight/{highlight.js → highlight.mjs} +6 -6
- package/dist/components/i18n-button/hooks.cjs +78 -0
- package/dist/components/i18n-button/hooks.d.ts +2 -2
- package/dist/components/i18n-button/{hooks.js → hooks.mjs} +3 -3
- package/dist/components/i18n-button/i18n-button.cjs +56 -0
- package/dist/components/i18n-button/{i18n-button.js → i18n-button.mjs} +6 -7
- package/dist/components/i18n-button/types.d.ts +1 -1
- package/dist/components/icon/hoc.cjs +17 -0
- package/dist/components/icon/{hoc.js → hoc.mjs} +1 -1
- package/dist/components/icon/icon.cjs +60 -0
- package/dist/components/icon/{icon.js → icon.mjs} +8 -9
- package/dist/components/icon/icons/action/check-circle-outline.cjs +20 -0
- package/dist/components/icon/icons/action/{check-circle-outline.js → check-circle-outline.mjs} +2 -3
- package/dist/components/icon/icons/action/check-circle.cjs +20 -0
- package/dist/components/icon/icons/action/{check-circle.js → check-circle.mjs} +2 -3
- package/dist/components/icon/icons/action/code.cjs +20 -0
- package/dist/components/icon/icons/action/{code.js → code.mjs} +2 -3
- package/dist/components/icon/icons/action/done-outline.cjs +20 -0
- package/dist/components/icon/icons/action/{done-outline.js → done-outline.mjs} +2 -3
- package/dist/components/icon/icons/action/done.cjs +20 -0
- package/dist/components/icon/icons/action/{done.js → done.mjs} +2 -3
- package/dist/components/icon/icons/action/index.cjs +29 -0
- package/dist/components/icon/icons/action/index.mjs +13 -0
- package/dist/components/icon/icons/action/open-in-new.cjs +20 -0
- package/dist/components/icon/icons/action/{open-in-new.js → open-in-new.mjs} +2 -3
- package/dist/components/icon/icons/action/swap-horiz.cjs +20 -0
- package/dist/components/icon/icons/action/{swap-horiz.js → swap-horiz.mjs} +2 -3
- package/dist/components/icon/icons/action/swap-vert.cjs +20 -0
- package/dist/components/icon/icons/action/{swap-vert.js → swap-vert.mjs} +2 -3
- package/dist/components/icon/icons/action/translate.cjs +20 -0
- package/dist/components/icon/icons/action/{translate.js → translate.mjs} +2 -3
- package/dist/components/icon/icons/action/visibility-off.cjs +20 -0
- package/dist/components/icon/icons/action/{visibility-off.js → visibility-off.mjs} +2 -3
- package/dist/components/icon/icons/action/visibility.cjs +20 -0
- package/dist/components/icon/icons/action/{visibility.js → visibility.mjs} +2 -3
- package/dist/components/icon/icons/action/zoom-in.cjs +20 -0
- package/dist/components/icon/icons/action/{zoom-in.js → zoom-in.mjs} +2 -3
- package/dist/components/icon/icons/action/zoom-out.cjs +20 -0
- package/dist/components/icon/icons/action/{zoom-out.js → zoom-out.mjs} +2 -3
- package/dist/components/icon/icons/alert/add-alert.cjs +20 -0
- package/dist/components/icon/icons/alert/{add-alert.js → add-alert.mjs} +2 -3
- package/dist/components/icon/icons/alert/auto-delete.cjs +26 -0
- package/dist/components/icon/icons/alert/{auto-delete.js → auto-delete.mjs} +2 -3
- package/dist/components/icon/icons/alert/error-outline.cjs +20 -0
- package/dist/components/icon/icons/alert/{error-outline.js → error-outline.mjs} +2 -3
- package/dist/components/icon/icons/alert/error.cjs +20 -0
- package/dist/components/icon/icons/alert/{error.js → error.mjs} +2 -3
- package/dist/components/icon/icons/alert/index.cjs +17 -0
- package/dist/components/icon/icons/alert/index.mjs +7 -0
- package/dist/components/icon/icons/alert/notification-important.cjs +20 -0
- package/dist/components/icon/icons/alert/{notification-important.js → notification-important.mjs} +2 -3
- package/dist/components/icon/icons/alert/warning-amber.cjs +20 -0
- package/dist/components/icon/icons/alert/{warning-amber.js → warning-amber.mjs} +2 -3
- package/dist/components/icon/icons/alert/warning.cjs +20 -0
- package/dist/components/icon/icons/alert/{warning.js → warning.mjs} +2 -3
- package/dist/components/icon/icons/content/clear.cjs +20 -0
- package/dist/components/icon/icons/content/{clear.js → clear.mjs} +2 -3
- package/dist/components/icon/icons/content/font-download.cjs +20 -0
- package/dist/components/icon/icons/content/{font-download.js → font-download.mjs} +2 -3
- package/dist/components/icon/icons/content/index.cjs +13 -0
- package/dist/components/icon/icons/content/index.mjs +5 -0
- package/dist/components/icon/icons/content/link-off.cjs +20 -0
- package/dist/components/icon/icons/content/{link-off.js → link-off.mjs} +2 -3
- package/dist/components/icon/icons/content/redo.cjs +20 -0
- package/dist/components/icon/icons/content/{redo.js → redo.mjs} +2 -3
- package/dist/components/icon/icons/content/undo.cjs +20 -0
- package/dist/components/icon/icons/content/{undo.js → undo.mjs} +2 -3
- package/dist/components/icon/icons/editor/checklist.cjs +20 -0
- package/dist/components/icon/icons/editor/{checklist.js → checklist.mjs} +2 -3
- package/dist/components/icon/icons/editor/format-bold.cjs +20 -0
- package/dist/components/icon/icons/editor/{format-bold.js → format-bold.mjs} +2 -3
- package/dist/components/icon/icons/editor/format-italic.cjs +20 -0
- package/dist/components/icon/icons/editor/{format-italic.js → format-italic.mjs} +2 -3
- package/dist/components/icon/icons/editor/format-strikethrough.cjs +20 -0
- package/dist/components/icon/icons/editor/{format-strikethrough.js → format-strikethrough.mjs} +2 -3
- package/dist/components/icon/icons/editor/format-underlined.cjs +20 -0
- package/dist/components/icon/icons/editor/{format-underlined.js → format-underlined.mjs} +2 -3
- package/dist/components/icon/icons/editor/index.cjs +21 -0
- package/dist/components/icon/icons/editor/index.mjs +9 -0
- package/dist/components/icon/icons/editor/insert-link.cjs +20 -0
- package/dist/components/icon/icons/editor/{insert-link.js → insert-link.mjs} +2 -3
- package/dist/components/icon/icons/editor/notes.cjs +20 -0
- package/dist/components/icon/icons/editor/{notes.js → notes.mjs} +2 -3
- package/dist/components/icon/icons/editor/subscript.cjs +20 -0
- package/dist/components/icon/icons/editor/{subscript.js → subscript.mjs} +2 -3
- package/dist/components/icon/icons/editor/superscript.cjs +20 -0
- package/dist/components/icon/icons/editor/{superscript.js → superscript.mjs} +2 -3
- package/dist/components/icon/icons/hardware/index.cjs +15 -0
- package/dist/components/icon/icons/hardware/{index.js → index.mjs} +6 -6
- package/dist/components/icon/icons/hardware/keyboard-arrow-down.cjs +19 -0
- package/dist/components/icon/icons/hardware/{keyboard-arrow-down.js → keyboard-arrow-down.mjs} +2 -3
- package/dist/components/icon/icons/hardware/keyboard-arrow-left.cjs +20 -0
- package/dist/components/icon/icons/hardware/{keyboard-arrow-left.js → keyboard-arrow-left.mjs} +2 -3
- package/dist/components/icon/icons/hardware/keyboard-arrow-right.cjs +20 -0
- package/dist/components/icon/icons/hardware/{keyboard-arrow-right.js → keyboard-arrow-right.mjs} +2 -3
- package/dist/components/icon/icons/hardware/keyboard-arrow-up.cjs +20 -0
- package/dist/components/icon/icons/hardware/{keyboard-arrow-up.js → keyboard-arrow-up.mjs} +2 -3
- package/dist/components/icon/icons/hardware/keyboard-double-arrow-left.cjs +23 -0
- package/dist/components/icon/icons/hardware/{keyboard-double-arrow-left.js → keyboard-double-arrow-left.mjs} +2 -3
- package/dist/components/icon/icons/hardware/keyboard-double-arrow-right.cjs +23 -0
- package/dist/components/icon/icons/hardware/{keyboard-double-arrow-right.js → keyboard-double-arrow-right.mjs} +2 -3
- package/dist/components/icon/icons/image/bedtime.cjs +20 -0
- package/dist/components/icon/icons/image/{bedtime.js → bedtime.mjs} +2 -3
- package/dist/components/icon/icons/image/edit.cjs +20 -0
- package/dist/components/icon/icons/image/{edit.js → edit.mjs} +2 -3
- package/dist/components/icon/icons/image/index.cjs +25 -0
- package/dist/components/icon/icons/image/index.mjs +11 -0
- package/dist/components/icon/icons/image/looks-five.cjs +20 -0
- package/dist/components/icon/icons/image/{looks-five.js → looks-five.mjs} +2 -3
- package/dist/components/icon/icons/image/looks-four.cjs +20 -0
- package/dist/components/icon/icons/image/{looks-four.js → looks-four.mjs} +2 -3
- package/dist/components/icon/icons/image/looks-one.cjs +20 -0
- package/dist/components/icon/icons/image/{looks-one.js → looks-one.mjs} +2 -3
- package/dist/components/icon/icons/image/looks-six.cjs +20 -0
- package/dist/components/icon/icons/image/{looks-six.js → looks-six.mjs} +2 -3
- package/dist/components/icon/icons/image/looks-three.cjs +20 -0
- package/dist/components/icon/icons/image/{looks-three.js → looks-three.mjs} +2 -3
- package/dist/components/icon/icons/image/looks-two.cjs +20 -0
- package/dist/components/icon/icons/image/{looks-two.js → looks-two.mjs} +2 -3
- package/dist/components/icon/icons/image/rotate-left.cjs +20 -0
- package/dist/components/icon/icons/image/{rotate-left.js → rotate-left.mjs} +2 -3
- package/dist/components/icon/icons/image/rotate-right.cjs +20 -0
- package/dist/components/icon/icons/image/{rotate-right.js → rotate-right.mjs} +2 -3
- package/dist/components/icon/icons/image/wb-sunny.cjs +20 -0
- package/dist/components/icon/icons/image/{wb-sunny.js → wb-sunny.mjs} +2 -3
- package/dist/components/icon/icons/index.cjs +125 -0
- package/dist/components/icon/icons/index.mjs +61 -0
- package/dist/components/icon/icons/mock/github.cjs +21 -0
- package/dist/components/icon/icons/mock/{github.js → github.mjs} +2 -3
- package/dist/components/icon/icons/mock/index.cjs +7 -0
- package/dist/components/icon/icons/mock/index.mjs +2 -0
- package/dist/components/icon/icons/mock/loading.cjs +26 -0
- package/dist/components/icon/icons/mock/{loading.js → loading.mjs} +2 -3
- package/dist/components/icon/icons/navigation/cancel.cjs +20 -0
- package/dist/components/icon/icons/navigation/{cancel.js → cancel.mjs} +2 -3
- package/dist/components/icon/icons/navigation/check.cjs +20 -0
- package/dist/components/icon/icons/navigation/{check.js → check.mjs} +2 -3
- package/dist/components/icon/icons/navigation/close.cjs +20 -0
- package/dist/components/icon/icons/navigation/{close.js → close.mjs} +2 -3
- package/dist/components/icon/icons/navigation/index.cjs +13 -0
- package/dist/components/icon/icons/navigation/index.mjs +5 -0
- package/dist/components/icon/icons/navigation/more-horiz.cjs +20 -0
- package/dist/components/icon/icons/navigation/{more-horiz.js → more-horiz.mjs} +2 -3
- package/dist/components/icon/icons/navigation/unfold-more.cjs +20 -0
- package/dist/components/icon/icons/navigation/{unfold-more.js → unfold-more.mjs} +2 -3
- package/dist/components/icon/icons/toggle/index.cjs +9 -0
- package/dist/components/icon/icons/toggle/index.mjs +3 -0
- package/dist/components/icon/icons/toggle/star-half.cjs +20 -0
- package/dist/components/icon/icons/toggle/{star-half.js → star-half.mjs} +2 -3
- package/dist/components/icon/icons/toggle/star-outline.cjs +20 -0
- package/dist/components/icon/icons/toggle/{star-outline.js → star-outline.mjs} +2 -3
- package/dist/components/icon/icons/toggle/star.cjs +20 -0
- package/dist/components/icon/icons/toggle/{star.js → star.mjs} +2 -3
- package/dist/components/icon/types.d.ts +1 -1
- package/dist/components/image/hooks.cjs +65 -0
- package/dist/components/image/{hooks.js → hooks.mjs} +7 -7
- package/dist/components/image/image.cjs +47 -0
- package/dist/components/image/{image.js → image.mjs} +2 -2
- package/dist/components/image/index.cjs +8 -0
- package/dist/components/image/{index.js → index.mjs} +2 -2
- package/dist/components/image/preview/context.cjs +7 -0
- package/dist/components/image/preview/group.cjs +62 -0
- package/dist/components/image/preview/{group.js → group.mjs} +2 -2
- package/dist/components/image/preview/operations.cjs +148 -0
- package/dist/components/image/preview/{operations.js → operations.mjs} +10 -10
- package/dist/components/image/preview/preview.cjs +135 -0
- package/dist/components/image/preview/{preview.js → preview.mjs} +3 -3
- package/dist/components/image/types.d.ts +1 -1
- package/dist/components/input/hooks.cjs +69 -0
- package/dist/components/input/input.cjs +225 -0
- package/dist/components/input/{input.js → input.mjs} +11 -12
- package/dist/components/input/types.d.ts +1 -1
- package/dist/components/layout/footer.cjs +7 -0
- package/dist/components/layout/header.cjs +46 -0
- package/dist/components/layout/{header.js → header.mjs} +4 -4
- package/dist/components/layout/hooks.cjs +60 -0
- package/dist/components/layout/hooks.d.ts +1 -1
- package/dist/components/layout/{hooks.js → hooks.mjs} +4 -4
- package/dist/components/layout/index.cjs +13 -0
- package/dist/components/layout/index.mjs +13 -0
- package/dist/components/layout/layout.cjs +52 -0
- package/dist/components/layout/{layout.js → layout.mjs} +5 -5
- package/dist/components/layout/main.cjs +8 -0
- package/dist/components/layout/sider.cjs +18 -0
- package/dist/components/layout/{sider.js → sider.mjs} +1 -1
- package/dist/components/layout/types.d.ts +1 -1
- package/dist/components/loading/loading.cjs +159 -0
- package/dist/components/loading/loading.d.ts +1 -1
- package/dist/components/loading/{loading.js → loading.mjs} +39 -49
- package/dist/components/loading/types.d.ts +9 -2
- package/dist/components/menu/context.cjs +20 -0
- package/dist/components/menu/context.d.ts +1 -1
- package/dist/components/menu/group.cjs +190 -0
- package/dist/components/menu/group.d.ts +2 -2
- package/dist/components/menu/{group.js → group.mjs} +11 -11
- package/dist/components/menu/hooks.cjs +163 -0
- package/dist/components/menu/hooks.d.ts +2 -2
- package/dist/components/menu/{hooks.js → hooks.mjs} +4 -4
- package/dist/components/menu/index.d.ts +1 -2
- package/dist/components/menu/item.cjs +291 -0
- package/dist/components/menu/item.d.ts +3 -3
- package/dist/components/menu/{item.js → item.mjs} +17 -17
- package/dist/components/menu/menu.cjs +73 -0
- package/dist/components/menu/menu.d.ts +1 -1
- package/dist/components/menu/{menu.js → menu.mjs} +7 -8
- package/dist/components/message/hooks.cjs +47 -0
- package/dist/components/message/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/message/messager.cjs +22 -0
- package/dist/components/message/{messager.js → messager.mjs} +2 -3
- package/dist/components/notification/holder.cjs +170 -0
- package/dist/components/notification/{holder.js → holder.mjs} +4 -4
- package/dist/components/notification/hooks.cjs +86 -0
- package/dist/components/notification/{hooks.js → hooks.mjs} +2 -2
- package/dist/components/notification/notification.cjs +279 -0
- package/dist/components/notification/{notification.js → notification.mjs} +14 -14
- package/dist/components/notification/notifier.cjs +73 -0
- package/dist/components/notification/{notifier.js → notifier.mjs} +2 -3
- package/dist/components/number-input/hooks.cjs +31 -0
- package/dist/components/number-input/number-input.cjs +40 -0
- package/dist/components/number-input/{number-input.js → number-input.mjs} +3 -4
- package/dist/components/otp-input/hooks.cjs +82 -0
- package/dist/components/otp-input/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/otp-input/otp-input.cjs +89 -0
- package/dist/components/otp-input/{otp-input.js → otp-input.mjs} +3 -4
- package/dist/components/pagination/hooks.cjs +70 -0
- package/dist/components/pagination/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/pagination/item.cjs +74 -0
- package/dist/components/pagination/{item.js → item.mjs} +7 -7
- package/dist/components/pagination/pagination.cjs +90 -0
- package/dist/components/pagination/{pagination.js → pagination.mjs} +8 -9
- package/dist/components/pagination/types.cjs +11 -0
- package/dist/components/picker/context.cjs +9 -0
- package/dist/components/picker/picker.cjs +121 -0
- package/dist/components/picker/{picker.js → picker.mjs} +12 -12
- package/dist/components/picker/types.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm.cjs +148 -0
- package/dist/components/popconfirm/{popconfirm.js → popconfirm.mjs} +13 -14
- package/dist/components/popconfirm/types.d.ts +1 -1
- package/dist/components/popover/hooks.cjs +64 -0
- package/dist/components/popover/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/popover/popover.cjs +154 -0
- package/dist/components/popover/{popover.js → popover.mjs} +9 -10
- package/dist/components/popover/types.d.ts +1 -1
- package/dist/components/popper/dropdown.cjs +135 -0
- package/dist/components/popper/{dropdown.js → dropdown.mjs} +11 -11
- package/dist/components/popper/hooks.cjs +187 -0
- package/dist/components/popper/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/popper/popper.cjs +26 -0
- package/dist/components/popper/{popper.js → popper.mjs} +2 -2
- package/dist/components/popper/types.d.ts +1 -1
- package/dist/components/portal/portal.cjs +39 -0
- package/dist/components/portal/{portal.js → portal.mjs} +1 -1
- package/dist/components/progress/circular.cjs +86 -0
- package/dist/components/progress/{circular.js → circular.mjs} +5 -5
- package/dist/components/progress/hooks.cjs +48 -0
- package/dist/components/progress/linear.cjs +85 -0
- package/dist/components/progress/{linear.js → linear.mjs} +7 -7
- package/dist/components/progress/progress.cjs +22 -0
- package/dist/components/progress/{progress.js → progress.mjs} +3 -4
- package/dist/components/progress/types.d.ts +1 -1
- package/dist/components/quote/quote.cjs +30 -0
- package/dist/components/quote/{quote.js → quote.mjs} +9 -10
- package/dist/components/quote/styles.cjs +31 -0
- package/dist/components/quote/types.d.ts +1 -1
- package/dist/components/radio/context.cjs +7 -0
- package/dist/components/radio/group.cjs +37 -0
- package/dist/components/radio/{group.js → group.mjs} +1 -1
- package/dist/components/radio/index.cjs +8 -0
- package/dist/components/radio/{index.js → index.mjs} +2 -2
- package/dist/components/radio/radio.cjs +241 -0
- package/dist/components/radio/{radio.js → radio.mjs} +13 -13
- package/dist/components/radio/types.d.ts +1 -1
- package/dist/components/rate/hooks.cjs +59 -0
- package/dist/components/rate/rate.cjs +66 -0
- package/dist/components/rate/{rate.js → rate.mjs} +7 -8
- package/dist/components/rate/star.cjs +147 -0
- package/dist/components/rate/{star.js → star.mjs} +9 -9
- package/dist/components/rate/types.d.ts +1 -1
- package/dist/components/rich-text-editor/dropdown.cjs +80 -0
- package/dist/components/rich-text-editor/{dropdown.js → dropdown.mjs} +4 -4
- package/dist/components/rich-text-editor/index.cjs +12 -0
- package/dist/components/rich-text-editor/{index.js → index.mjs} +1 -1
- package/dist/components/rich-text-editor/nodes/checkable-list-item.cjs +89 -0
- package/dist/components/rich-text-editor/plugins/check-list/index.cjs +49 -0
- package/dist/components/rich-text-editor/plugins/controlled-state/index.cjs +45 -0
- package/dist/components/rich-text-editor/plugins/controlled-state/{index.js → index.mjs} +1 -1
- package/dist/components/rich-text-editor/plugins/floating-link-editor/index.cjs +123 -0
- package/dist/components/rich-text-editor/plugins/floating-link-editor/{index.js → index.mjs} +10 -10
- package/dist/components/rich-text-editor/plugins/markdown-shortcut/index.cjs +16 -0
- package/dist/components/rich-text-editor/plugins/markdown-shortcut/{index.js → index.mjs} +3 -4
- package/dist/components/rich-text-editor/plugins/toolbar/hooks.cjs +265 -0
- package/dist/components/rich-text-editor/plugins/toolbar/hooks.d.ts +3 -3
- package/dist/components/rich-text-editor/plugins/toolbar/{hooks.js → hooks.mjs} +11 -11
- package/dist/components/rich-text-editor/plugins/toolbar/index.cjs +218 -0
- package/dist/components/rich-text-editor/plugins/toolbar/{index.js → index.mjs} +17 -17
- package/dist/components/rich-text-editor/rich-text-editor.cjs +209 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/dist/components/rich-text-editor/{rich-text-editor.js → rich-text-editor.mjs} +16 -20
- package/dist/components/rich-text-editor/types.d.ts +1 -6
- package/dist/components/rich-text-editor/utils/get-element-by-node.cjs +8 -0
- package/dist/components/ripple/hooks.cjs +53 -0
- package/dist/components/ripple/ripple.cjs +93 -0
- package/dist/components/ripple/{ripple.js → ripple.mjs} +2 -2
- package/dist/components/select/hooks.cjs +145 -0
- package/dist/components/select/hooks.d.ts +2 -2
- package/dist/components/select/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/select/select.cjs +91 -0
- package/dist/components/select/{select.js → select.mjs} +8 -9
- package/dist/components/select/selections.cjs +41 -0
- package/dist/components/select/{selections.js → selections.mjs} +3 -3
- package/dist/components/select/selector.cjs +82 -0
- package/dist/components/select/{selector.js → selector.mjs} +7 -7
- package/dist/components/select/types.d.ts +3 -3
- package/dist/components/select/utils.cjs +67 -0
- package/dist/components/select/utils.d.ts +2 -2
- package/dist/components/skeleton/skeleton.cjs +101 -0
- package/dist/components/skeleton/{skeleton.js → skeleton.mjs} +5 -6
- package/dist/components/skeleton/types.d.ts +1 -1
- package/dist/components/space/space.cjs +61 -0
- package/dist/components/space/{space.js → space.mjs} +4 -5
- package/dist/components/space/types.d.ts +1 -1
- package/dist/components/steps/context.cjs +9 -0
- package/dist/components/steps/item.cjs +237 -0
- package/dist/components/steps/{item.js → item.mjs} +10 -10
- package/dist/components/steps/steps.cjs +78 -0
- package/dist/components/steps/{steps.js → steps.mjs} +7 -8
- package/dist/components/steps/types.d.ts +1 -1
- package/dist/components/switch/switch.cjs +311 -0
- package/dist/components/switch/{switch.js → switch.mjs} +15 -16
- package/dist/components/switch/types.d.ts +1 -1
- package/dist/components/table/body.cjs +92 -0
- package/dist/components/table/{body.js → body.mjs} +7 -7
- package/dist/components/table/context.cjs +18 -0
- package/dist/components/table/context.d.ts +1 -1
- package/dist/components/table/header/cell.cjs +135 -0
- package/dist/components/table/header/cell.d.ts +2 -2
- package/dist/components/table/header/{cell.js → cell.mjs} +5 -5
- package/dist/components/table/header/header.cjs +109 -0
- package/dist/components/table/header/header.d.ts +1 -1
- package/dist/components/table/header/{header.js → header.mjs} +8 -8
- package/dist/components/table/hooks.cjs +74 -0
- package/dist/components/table/hooks.d.ts +1 -1
- package/dist/components/table/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/table/index.d.ts +0 -2
- package/dist/components/table/table.cjs +41 -0
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/{table.js → table.mjs} +5 -6
- package/dist/components/tabs/context.cjs +7 -0
- package/dist/components/tabs/hooks.cjs +134 -0
- package/dist/components/tabs/{hooks.js → hooks.mjs} +1 -1
- package/dist/components/tabs/navigation.cjs +168 -0
- package/dist/components/tabs/{navigation.js → navigation.mjs} +8 -8
- package/dist/components/tabs/panels.cjs +88 -0
- package/dist/components/tabs/{panels.js → panels.mjs} +5 -5
- package/dist/components/tabs/tab.cjs +35 -0
- package/dist/components/tabs/{tab.js → tab.mjs} +5 -5
- package/dist/components/tabs/tabs.cjs +56 -0
- package/dist/components/tabs/{tabs.js → tabs.mjs} +8 -9
- package/dist/components/tabs/types.d.ts +1 -1
- package/dist/components/tag/tag.cjs +123 -0
- package/dist/components/tag/{tag.js → tag.mjs} +10 -11
- package/dist/components/tag/types.d.ts +1 -1
- package/dist/components/theme/hooks.cjs +218 -0
- package/dist/components/theme/{hooks.js → hooks.mjs} +2 -2
- package/dist/components/theme/theme-provider.cjs +36 -0
- package/dist/components/theme/{theme-provider.js → theme-provider.mjs} +2 -3
- package/dist/components/theme/theme.cjs +145 -0
- package/dist/components/theme/tokens.stylex.cjs +64 -0
- package/dist/components/time-picker/hooks.cjs +31 -0
- package/dist/components/time-picker/panel.cjs +105 -0
- package/dist/components/time-picker/{panel.js → panel.mjs} +15 -15
- package/dist/components/time-picker/time-picker.cjs +64 -0
- package/dist/components/time-picker/{time-picker.js → time-picker.mjs} +12 -13
- package/dist/components/time-picker/types.d.ts +1 -1
- package/dist/components/timeline/context.cjs +8 -0
- package/dist/components/timeline/item.cjs +220 -0
- package/dist/components/timeline/{item.js → item.mjs} +8 -8
- package/dist/components/timeline/timeline.cjs +44 -0
- package/dist/components/timeline/{timeline.js → timeline.mjs} +6 -7
- package/dist/components/tooltip/tooltip.cjs +24 -0
- package/dist/components/tooltip/{tooltip.js → tooltip.mjs} +5 -6
- package/dist/components/tooltip/types.d.ts +1 -1
- package/dist/components/tour/hooks.cjs +47 -0
- package/dist/components/tour/hooks.d.ts +1 -1
- package/dist/components/tour/index.d.ts +0 -2
- package/dist/components/tour/spotlight.cjs +65 -0
- package/dist/components/tour/spotlight.d.ts +1 -1
- package/dist/components/tour/{spotlight.js → spotlight.mjs} +3 -3
- package/dist/components/tour/tour.cjs +171 -0
- package/dist/components/tour/tour.d.ts +1 -1
- package/dist/components/tour/{tour.js → tour.mjs} +16 -17
- package/dist/components/transfer/context.cjs +11 -0
- package/dist/components/transfer/hooks.cjs +72 -0
- package/dist/components/transfer/item.cjs +27 -0
- package/dist/components/transfer/{item.js → item.mjs} +4 -4
- package/dist/components/transfer/list.cjs +132 -0
- package/dist/components/transfer/{list.js → list.mjs} +11 -11
- package/dist/components/transfer/transfer.cjs +82 -0
- package/dist/components/transfer/{transfer.js → transfer.mjs} +10 -11
- package/dist/components/transfer/types.d.ts +2 -2
- package/dist/components/tree/context.cjs +12 -0
- package/dist/components/tree/context.d.ts +1 -1
- package/dist/components/tree/hooks.cjs +67 -0
- package/dist/components/tree/hooks.d.ts +1 -1
- package/dist/components/tree/index.d.ts +1 -2
- package/dist/components/tree/list.cjs +97 -0
- package/dist/components/tree/list.d.ts +1 -1
- package/dist/components/tree/{list.js → list.mjs} +8 -8
- package/dist/components/tree/node.cjs +153 -0
- package/dist/components/tree/node.d.ts +1 -1
- package/dist/components/tree/{node.js → node.mjs} +14 -14
- package/dist/components/tree/tree.cjs +68 -0
- package/dist/components/tree/tree.d.ts +1 -1
- package/dist/components/tree/{tree.js → tree.mjs} +4 -5
- package/dist/components/upload/upload.cjs +80 -0
- package/dist/components/upload/{upload.js → upload.mjs} +3 -4
- package/dist/components/upload/uploadeds.cjs +116 -0
- package/dist/components/upload/{uploadeds.js → uploadeds.mjs} +3 -3
- package/dist/components/visually-hidden/visually-hidden.cjs +21 -0
- package/dist/components/visually-hidden/{visually-hidden.js → visually-hidden.mjs} +4 -5
- package/dist/components/waterfall/hooks.cjs +60 -0
- package/dist/components/waterfall/sequential.cjs +73 -0
- package/dist/components/waterfall/{sequential.js → sequential.mjs} +2 -2
- package/dist/components/waterfall/types.d.ts +1 -1
- package/dist/components/waterfall/waterfall.cjs +152 -0
- package/dist/components/waterfall/{waterfall.js → waterfall.mjs} +10 -11
- package/dist/components/watermark/hooks.cjs +154 -0
- package/dist/components/watermark/watermark.cjs +86 -0
- package/dist/components/watermark/{watermark.js → watermark.mjs} +2 -3
- package/dist/hooks/use-class-names.cjs +12 -0
- package/dist/hooks/use-class-names.d.ts +1 -0
- package/dist/hooks/{use-class-names.js → use-class-names.mjs} +1 -1
- package/dist/hooks/use-closable.cjs +61 -0
- package/dist/hooks/use-closable.d.ts +1 -1
- package/dist/hooks/{use-closable.js → use-closable.mjs} +3 -3
- package/dist/hooks/use-container.cjs +28 -0
- package/dist/hooks/use-expandable.cjs +74 -0
- package/dist/hooks/use-gutters.cjs +13 -0
- package/dist/hooks/use-lazy-boolean.cjs +64 -0
- package/dist/index.cjs +130 -0
- package/dist/index.d.ts +2 -13
- package/dist/index.mjs +64 -0
- package/dist/locale/context.cjs +6 -0
- package/dist/locale/context.d.ts +1 -1
- package/dist/locale/context.mjs +6 -0
- package/dist/locale/index.d.ts +1 -2
- package/dist/locale/locales/en_US.cjs +34 -0
- package/dist/locale/locales/en_US.d.ts +1 -1
- package/dist/locale/locales/{en_US.js → en_US.mjs} +3 -5
- package/dist/locale/locales/index.cjs +7 -0
- package/dist/locale/locales/index.mjs +2 -0
- package/dist/locale/locales/zh_CN.cjs +34 -0
- package/dist/locale/locales/zh_CN.d.ts +1 -1
- package/dist/locale/locales/{zh_CN.js → zh_CN.mjs} +3 -5
- package/dist/locale/use-locale.cjs +12 -0
- package/dist/locale/use-locale.d.ts +1 -1
- package/dist/locale/{use-locale.js → use-locale.mjs} +1 -1
- package/dist/node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs +306 -0
- package/dist/styles.css +2 -6
- package/dist/{components/bench/types.d.ts → types/bench.d.ts} +5 -5
- package/dist/{components/form/types.d.ts → types/form.d.ts} +7 -2
- package/dist/{locale/types.d.ts → types/locale.d.ts} +1 -4
- package/dist/{components/menu/types.d.ts → types/menu.d.ts} +2 -2
- package/dist/{components/table/types.d.ts → types/table.d.ts} +1 -1
- package/dist/{components/tour/types.d.ts → types/tour.d.ts} +1 -1
- package/dist/{components/tree/types.d.ts → types/tree.d.ts} +1 -1
- package/dist/utils/class-name.cjs +357 -0
- package/dist/utils/class-name.d.ts +4 -1
- package/dist/utils/{class-name.js → class-name.mjs} +4 -3
- package/dist/utils/colors.cjs +72 -0
- package/dist/utils/component-token.cjs +54 -0
- package/dist/utils/keyboard.cjs +12 -0
- package/dist/utils/layer.cjs +23 -0
- package/dist/utils/styles.cjs +15 -0
- package/dist/utils/timespan.cjs +52 -0
- package/package.json +28 -47
- package/dist/components/form/field/field.js +0 -88
- package/dist/components/form/field/layout.js +0 -65
- package/dist/components/form/index.js +0 -10
- package/dist/components/icon/icons/action/index.js +0 -13
- package/dist/components/icon/icons/alert/index.js +0 -7
- package/dist/components/icon/icons/content/index.js +0 -5
- package/dist/components/icon/icons/editor/index.js +0 -9
- package/dist/components/icon/icons/image/index.js +0 -11
- package/dist/components/icon/icons/index.js +0 -61
- package/dist/components/icon/icons/mock/index.js +0 -2
- package/dist/components/icon/icons/navigation/index.js +0 -5
- package/dist/components/icon/icons/toggle/index.js +0 -3
- package/dist/components/layout/index.js +0 -13
- package/dist/index.js +0 -64
- package/dist/locale/context.js +0 -6
- package/dist/locale/locales/index.js +0 -2
- package/dist/locale/types.js +0 -7
- /package/dist/components/avatar/{context.js → context.mjs} +0 -0
- /package/dist/components/cascader/{utils.js → utils.mjs} +0 -0
- /package/dist/components/checkbox/{context.js → context.mjs} +0 -0
- /package/dist/components/clock/{types.js → types.mjs} +0 -0
- /package/dist/components/collapse/{context.js → context.mjs} +0 -0
- /package/dist/components/collapse/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/date-picker/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/date-range-picker/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/divider/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/drawer/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/form/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/image/preview/{context.js → context.mjs} +0 -0
- /package/dist/components/input/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/layout/{footer.js → footer.mjs} +0 -0
- /package/dist/components/layout/{main.js → main.mjs} +0 -0
- /package/dist/components/menu/{context.js → context.mjs} +0 -0
- /package/dist/components/number-input/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/pagination/{types.js → types.mjs} +0 -0
- /package/dist/components/picker/{context.js → context.mjs} +0 -0
- /package/dist/components/progress/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/quote/{styles.js → styles.mjs} +0 -0
- /package/dist/components/radio/{context.js → context.mjs} +0 -0
- /package/dist/components/rate/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/rich-text-editor/nodes/{checkable-list-item.js → checkable-list-item.mjs} +0 -0
- /package/dist/components/rich-text-editor/plugins/check-list/{index.js → index.mjs} +0 -0
- /package/dist/components/rich-text-editor/utils/{get-element-by-node.js → get-element-by-node.mjs} +0 -0
- /package/dist/components/ripple/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/select/{utils.js → utils.mjs} +0 -0
- /package/dist/components/steps/{context.js → context.mjs} +0 -0
- /package/dist/components/table/{context.js → context.mjs} +0 -0
- /package/dist/components/tabs/{context.js → context.mjs} +0 -0
- /package/dist/components/theme/{theme.js → theme.mjs} +0 -0
- /package/dist/components/theme/{tokens.stylex.js → tokens.stylex.mjs} +0 -0
- /package/dist/components/time-picker/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/timeline/{context.js → context.mjs} +0 -0
- /package/dist/components/tour/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/transfer/{context.js → context.mjs} +0 -0
- /package/dist/components/transfer/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/tree/{context.js → context.mjs} +0 -0
- /package/dist/components/tree/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/waterfall/{hooks.js → hooks.mjs} +0 -0
- /package/dist/components/watermark/{hooks.js → hooks.mjs} +0 -0
- /package/dist/hooks/{use-container.js → use-container.mjs} +0 -0
- /package/dist/hooks/{use-expandable.js → use-expandable.mjs} +0 -0
- /package/dist/hooks/{use-gutters.js → use-gutters.mjs} +0 -0
- /package/dist/hooks/{use-lazy-boolean.js → use-lazy-boolean.mjs} +0 -0
- /package/dist/node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/{stylex.js → stylex.mjs} +0 -0
- /package/dist/utils/{colors.js → colors.mjs} +0 -0
- /package/dist/utils/{component-token.js → component-token.mjs} +0 -0
- /package/dist/utils/{keyboard.js → keyboard.mjs} +0 -0
- /package/dist/utils/{layer.js → layer.mjs} +0 -0
- /package/dist/utils/{styles.js → styles.mjs} +0 -0
- /package/dist/utils/{timespan.js → timespan.mjs} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
|
+
var reactTable = require('@tanstack/react-table');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var hooks = require('./hooks.cjs');
|
|
7
|
+
var header = require('./header/header.cjs');
|
|
8
|
+
var context = require('./context.cjs');
|
|
9
|
+
var body = require('./body.cjs');
|
|
10
|
+
|
|
11
|
+
var Table = function Table(_ref) {
|
|
12
|
+
var _ref$bordered = _ref.bordered,
|
|
13
|
+
bordered = _ref$bordered === void 0 ? false : _ref$bordered,
|
|
14
|
+
_ref$dataSource = _ref.dataSource,
|
|
15
|
+
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
|
|
16
|
+
_ref$columns = _ref.columns,
|
|
17
|
+
_columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
18
|
+
sortDescriptor = _ref.sortDescriptor,
|
|
19
|
+
onSortChange = _ref.onSortChange;
|
|
20
|
+
var columns = hooks.useColumns({
|
|
21
|
+
columns: _columns
|
|
22
|
+
});
|
|
23
|
+
var table = reactTable.useReactTable({
|
|
24
|
+
columns: columns,
|
|
25
|
+
data: dataSource,
|
|
26
|
+
getCoreRowModel: reactTable.getCoreRowModel()
|
|
27
|
+
});
|
|
28
|
+
var contextValue = hooks.useContextValue({
|
|
29
|
+
table: table,
|
|
30
|
+
bordered: bordered,
|
|
31
|
+
sortDescriptor: sortDescriptor,
|
|
32
|
+
onSortChange: onSortChange
|
|
33
|
+
});
|
|
34
|
+
return /*#__PURE__*/React.createElement(context.default.Provider, {
|
|
35
|
+
value: contextValue
|
|
36
|
+
}, /*#__PURE__*/React.createElement("table", _objectSpread({}, {
|
|
37
|
+
className: "musaex-h8yej3"
|
|
38
|
+
}), /*#__PURE__*/React.createElement(header.default, null), /*#__PURE__*/React.createElement(body.default, null)));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
exports.default = Table;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { TableProps } from "
|
|
2
|
+
import type { TableProps } from "musae/types/table";
|
|
3
3
|
declare const Table: <T>({ bordered, dataSource, columns: _columns, sortDescriptor, onSortChange, }: TableProps<T>) => React.JSX.Element;
|
|
4
4
|
export default Table;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import { useReactTable, getCoreRowModel } from '@tanstack/react-table';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { useColumns, useContextValue } from './hooks.
|
|
5
|
-
import Header from './header/header.
|
|
6
|
-
import Context from './context.
|
|
7
|
-
import Body from './body.
|
|
4
|
+
import { useColumns, useContextValue } from './hooks.mjs';
|
|
5
|
+
import Header from './header/header.mjs';
|
|
6
|
+
import Context from './context.mjs';
|
|
7
|
+
import Body from './body.mjs';
|
|
8
8
|
|
|
9
9
|
var Table = function Table(_ref) {
|
|
10
10
|
var _ref$bordered = _ref.bordered,
|
|
@@ -35,6 +35,5 @@ var Table = function Table(_ref) {
|
|
|
35
35
|
className: "musaex-h8yej3"
|
|
36
36
|
}), /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(Body, null)));
|
|
37
37
|
};
|
|
38
|
-
var Table$1 = Table;
|
|
39
38
|
|
|
40
|
-
export { Table
|
|
39
|
+
export { Table as default };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
2
|
+
var relax = require('@aiszlab/relax');
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var context = require('./context.cjs');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* use tab context
|
|
9
|
+
*/
|
|
10
|
+
var useTabsContext = function useTabsContext() {
|
|
11
|
+
var _useContext;
|
|
12
|
+
return (_useContext = React.useContext(context.default)) !== null && _useContext !== void 0 ? _useContext : {
|
|
13
|
+
items: [],
|
|
14
|
+
activeKey: void 0
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @description
|
|
19
|
+
* tabs
|
|
20
|
+
*/
|
|
21
|
+
var useTabs = function useTabs(_ref) {
|
|
22
|
+
var _items$at;
|
|
23
|
+
var _activeKey = _ref.activeKey,
|
|
24
|
+
items = _ref.items,
|
|
25
|
+
defaultActiveKey = _ref.defaultActiveKey;
|
|
26
|
+
var _useControlledState = relax.useControlledState(_activeKey, {
|
|
27
|
+
defaultState: defaultActiveKey !== null && defaultActiveKey !== void 0 ? defaultActiveKey : (_items$at = items.at(0)) === null || _items$at === void 0 ? void 0 : _items$at.key
|
|
28
|
+
}),
|
|
29
|
+
_useControlledState2 = _slicedToArray(_useControlledState, 2),
|
|
30
|
+
activeKey = _useControlledState2[0],
|
|
31
|
+
setActiveKey = _useControlledState2[1];
|
|
32
|
+
var _useState = React.useState(function () {
|
|
33
|
+
return new Set(relax.isUndefined(activeKey) ? [] : [activeKey]);
|
|
34
|
+
}),
|
|
35
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
36
|
+
activatedKeys = _useState2[0],
|
|
37
|
+
setActivatedKeys = _useState2[1];
|
|
38
|
+
var changeActiveKey = relax.useEvent(function (key) {
|
|
39
|
+
setActiveKey(key);
|
|
40
|
+
setActivatedKeys(function (prev) {
|
|
41
|
+
return new Set(prev).add(key);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
activeKey: activeKey,
|
|
46
|
+
activatedKeys: activatedKeys,
|
|
47
|
+
changeActiveKey: changeActiveKey
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @description
|
|
52
|
+
* count dom ele size
|
|
53
|
+
*/
|
|
54
|
+
var useNavigation = function useNavigation() {
|
|
55
|
+
var navigatorRef = React.useRef(null);
|
|
56
|
+
var tabsRef = React.useRef(null);
|
|
57
|
+
var _useState3 = React.useState(0),
|
|
58
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
59
|
+
offset = _useState4[0],
|
|
60
|
+
setOffset = _useState4[1];
|
|
61
|
+
// navigator size
|
|
62
|
+
var _useState5 = React.useState(0),
|
|
63
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
64
|
+
navigatorSize = _useState6[0],
|
|
65
|
+
setNavigatorSize = _useState6[1];
|
|
66
|
+
// tabs size
|
|
67
|
+
var _useState7 = React.useState(0),
|
|
68
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
69
|
+
tabsSize = _useState8[0],
|
|
70
|
+
setTabsSize = _useState8[1];
|
|
71
|
+
React.useLayoutEffect(function () {
|
|
72
|
+
var _navigatorRef$current, _navigatorRef$current2, _tabsRef$current$getB, _tabsRef$current;
|
|
73
|
+
var _navigatorSize = (_navigatorRef$current = (_navigatorRef$current2 = navigatorRef.current) === null || _navigatorRef$current2 === void 0 ? void 0 : _navigatorRef$current2.getBoundingClientRect().width) !== null && _navigatorRef$current !== void 0 ? _navigatorRef$current : 0;
|
|
74
|
+
var _tabsSize = (_tabsRef$current$getB = (_tabsRef$current = tabsRef.current) === null || _tabsRef$current === void 0 ? void 0 : _tabsRef$current.getBoundingClientRect().width) !== null && _tabsRef$current$getB !== void 0 ? _tabsRef$current$getB : 0;
|
|
75
|
+
setNavigatorSize(_navigatorSize);
|
|
76
|
+
setTabsSize(_tabsSize);
|
|
77
|
+
}, []);
|
|
78
|
+
var _useMemo = React.useMemo(function () {
|
|
79
|
+
return {
|
|
80
|
+
maxOffset: Math.max(0, tabsSize - navigatorSize),
|
|
81
|
+
minOffset: 0
|
|
82
|
+
};
|
|
83
|
+
}, [navigatorSize, tabsSize]),
|
|
84
|
+
maxOffset = _useMemo.maxOffset,
|
|
85
|
+
minOffset = _useMemo.minOffset;
|
|
86
|
+
var _useMemo2 = React.useMemo(function () {
|
|
87
|
+
return {
|
|
88
|
+
isLeadingOverflow: offset > minOffset,
|
|
89
|
+
isTrailingOverflow: offset < maxOffset
|
|
90
|
+
};
|
|
91
|
+
}, [minOffset, maxOffset, offset]),
|
|
92
|
+
isLeadingOverflow = _useMemo2.isLeadingOverflow,
|
|
93
|
+
isTrailingOverflow = _useMemo2.isTrailingOverflow;
|
|
94
|
+
var scroll = relax.useEvent(function (delta) {
|
|
95
|
+
setOffset(function (prev) {
|
|
96
|
+
return relax.clamp(prev + delta, minOffset, maxOffset);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
return {
|
|
100
|
+
navigatorRef: navigatorRef,
|
|
101
|
+
tabsRef: tabsRef,
|
|
102
|
+
scroll: scroll,
|
|
103
|
+
offset: offset,
|
|
104
|
+
isLeadingOverflow: isLeadingOverflow,
|
|
105
|
+
isTrailingOverflow: isTrailingOverflow
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* @description
|
|
110
|
+
* use navigator scroll
|
|
111
|
+
*/
|
|
112
|
+
var useNavigatorScroll = function useNavigatorScroll(_ref2) {
|
|
113
|
+
var navigatorRef = _ref2.navigatorRef,
|
|
114
|
+
scroll = _ref2.scroll;
|
|
115
|
+
// mouse wheel
|
|
116
|
+
var onWheel = relax.useEvent(function (event) {
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
var deltaY = event.deltaY;
|
|
119
|
+
scroll(deltaY);
|
|
120
|
+
});
|
|
121
|
+
React.useEffect(function () {
|
|
122
|
+
var navigator = navigatorRef.current;
|
|
123
|
+
navigator === null || navigator === void 0 || navigator.addEventListener("wheel", onWheel);
|
|
124
|
+
return function () {
|
|
125
|
+
navigator === null || navigator === void 0 || navigator.removeEventListener("wheel", onWheel);
|
|
126
|
+
};
|
|
127
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
128
|
+
}, []);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
exports.useNavigation = useNavigation;
|
|
132
|
+
exports.useNavigatorScroll = useNavigatorScroll;
|
|
133
|
+
exports.useTabs = useTabs;
|
|
134
|
+
exports.useTabsContext = useTabsContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import { useControlledState, isUndefined, useEvent, clamp } from '@aiszlab/relax';
|
|
3
3
|
import { useState, useContext, useRef, useLayoutEffect, useMemo, useEffect } from 'react';
|
|
4
|
-
import Context from './context.
|
|
4
|
+
import Context from './context.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
|
|
6
|
+
var useClassNames = require('../../hooks/use-class-names.cjs');
|
|
7
|
+
var className = require('../../utils/class-name.cjs');
|
|
8
|
+
var tab = require('./tab.cjs');
|
|
9
|
+
var framerMotion = require('framer-motion');
|
|
10
|
+
var relax = require('@aiszlab/relax');
|
|
11
|
+
var hooks$1 = require('../theme/hooks.cjs');
|
|
12
|
+
var colors = require('../../utils/colors.cjs');
|
|
13
|
+
var hooks = require('./hooks.cjs');
|
|
14
|
+
var componentToken = require('../../utils/component-token.cjs');
|
|
15
|
+
|
|
16
|
+
var styles = {
|
|
17
|
+
navigation: {
|
|
18
|
+
"default": function _default(props) {
|
|
19
|
+
return [{
|
|
20
|
+
borderBottomColor: "musaex-43481e",
|
|
21
|
+
borderBottomWidth: "musaex-cql0v9",
|
|
22
|
+
borderBottomStyle: "musaex-1q0q8m5",
|
|
23
|
+
$$css: true
|
|
24
|
+
}, {
|
|
25
|
+
"--borderBottomColor": props.outlineColor != null ? props.outlineColor : "initial"
|
|
26
|
+
}];
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
navigator: {
|
|
30
|
+
"default": {
|
|
31
|
+
position: "musaex-1n2onr6",
|
|
32
|
+
overflow: "musaex-b3r6kr",
|
|
33
|
+
overflowX: null,
|
|
34
|
+
overflowY: null,
|
|
35
|
+
$$css: true
|
|
36
|
+
},
|
|
37
|
+
leading: {
|
|
38
|
+
"::before_content": "musaex-1cpjm7i",
|
|
39
|
+
"::before_position": "musaex-1hmns74",
|
|
40
|
+
"::before_insetBlock": "musaex-1nc033x",
|
|
41
|
+
"::before_top": null,
|
|
42
|
+
"::before_bottom": null,
|
|
43
|
+
"::before_insetInlineStart": "musaex-1682cnc",
|
|
44
|
+
"::before_left": null,
|
|
45
|
+
"::before_right": null,
|
|
46
|
+
"::before_pointerEvents": "musaex-kk1bqk",
|
|
47
|
+
"::before_width": "musaex-bplea8",
|
|
48
|
+
"::before_boxShadow": "musaex-91zhsk",
|
|
49
|
+
$$css: true
|
|
50
|
+
},
|
|
51
|
+
trailing: {
|
|
52
|
+
"::after_content": "musaex-1s928wv",
|
|
53
|
+
"::after_position": "musaex-1j6awrg",
|
|
54
|
+
"::after_insetBlock": "musaex-d54j2p",
|
|
55
|
+
"::after_top": null,
|
|
56
|
+
"::after_bottom": null,
|
|
57
|
+
"::after_insetInlineEnd": "musaex-1unh1gc",
|
|
58
|
+
"::after_left": null,
|
|
59
|
+
"::after_right": null,
|
|
60
|
+
"::after_pointerEvents": "musaex-2q1x1w",
|
|
61
|
+
"::after_width": "musaex-1glcteh",
|
|
62
|
+
"::after_boxShadow": "musaex-15cyge6",
|
|
63
|
+
$$css: true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
list: {
|
|
67
|
+
"default": function _default(props) {
|
|
68
|
+
return [{
|
|
69
|
+
display: "musaex-78zum5",
|
|
70
|
+
width: "musaex-eq5yr9",
|
|
71
|
+
transform: "musaex-1v0jg1i",
|
|
72
|
+
$$css: true
|
|
73
|
+
}, {
|
|
74
|
+
"--transform": "translateX(-".concat(props.offset, "px)") != null ? "translateX(-".concat(props.offset, "px)") : "initial"
|
|
75
|
+
}];
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
indicator: {
|
|
79
|
+
"default": function _default(props) {
|
|
80
|
+
return [{
|
|
81
|
+
height: "musaex-26n3vf",
|
|
82
|
+
backgroundColor: "musaex-q1mx2j",
|
|
83
|
+
position: "musaex-10l6tqk",
|
|
84
|
+
bottom: "musaex-1al2we5",
|
|
85
|
+
$$css: true
|
|
86
|
+
}, {
|
|
87
|
+
"--backgroundColor": props.color != null ? props.color : "initial"
|
|
88
|
+
}];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
var Navigation = function Navigation(_ref) {
|
|
93
|
+
var onChange = _ref.onChange;
|
|
94
|
+
var _useTabsContext = hooks.useTabsContext(),
|
|
95
|
+
activeKey = _useTabsContext.activeKey,
|
|
96
|
+
items = _useTabsContext.items;
|
|
97
|
+
var classNames = useClassNames.useClassNames(componentToken.ComponentToken.Tabs);
|
|
98
|
+
var _useAnimate = framerMotion.useAnimate(),
|
|
99
|
+
_useAnimate2 = _slicedToArray(_useAnimate, 2),
|
|
100
|
+
indicatorRef = _useAnimate2[0],
|
|
101
|
+
animateIndicator = _useAnimate2[1];
|
|
102
|
+
var tabRefs = React.useRef(new Map());
|
|
103
|
+
var theme = hooks$1.useTheme();
|
|
104
|
+
var _useNavigation = hooks.useNavigation(),
|
|
105
|
+
navigatorRef = _useNavigation.navigatorRef,
|
|
106
|
+
tabsRef = _useNavigation.tabsRef,
|
|
107
|
+
scroll = _useNavigation.scroll,
|
|
108
|
+
offset = _useNavigation.offset,
|
|
109
|
+
isLeadingOverflow = _useNavigation.isLeadingOverflow,
|
|
110
|
+
isTrailingOverflow = _useNavigation.isTrailingOverflow;
|
|
111
|
+
// control tabs scroll
|
|
112
|
+
hooks.useNavigatorScroll({
|
|
113
|
+
navigatorRef: navigatorRef,
|
|
114
|
+
scroll: scroll
|
|
115
|
+
});
|
|
116
|
+
var styled = {
|
|
117
|
+
navigation: stylex.default.props(styles.navigation["default"]({
|
|
118
|
+
outlineColor: theme.colors[colors.ColorToken.Outline]
|
|
119
|
+
})),
|
|
120
|
+
navigator: stylex.default.props(styles.navigator["default"], isLeadingOverflow && styles.navigator.leading, isTrailingOverflow && styles.navigator.trailing),
|
|
121
|
+
list: stylex.default.props(styles.list["default"]({
|
|
122
|
+
offset: offset
|
|
123
|
+
})),
|
|
124
|
+
indicator: stylex.default.props(styles.indicator["default"]({
|
|
125
|
+
color: theme.colors[colors.ColorToken.Primary]
|
|
126
|
+
}))
|
|
127
|
+
};
|
|
128
|
+
// repaint indicator when activeKey changed
|
|
129
|
+
// animate indicator to correct position & width
|
|
130
|
+
React.useEffect(function () {
|
|
131
|
+
if (relax.isUndefined(activeKey)) return;
|
|
132
|
+
var tab = tabRefs.current.get(activeKey);
|
|
133
|
+
animateIndicator(indicatorRef.current, {
|
|
134
|
+
left: tab === null || tab === void 0 ? void 0 : tab.offsetLeft,
|
|
135
|
+
width: tab === null || tab === void 0 ? void 0 : tab.clientWidth
|
|
136
|
+
});
|
|
137
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
|
+
}, [activeKey]);
|
|
139
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
role: "tablist",
|
|
141
|
+
className: relax.clsx(classNames[className.TabsClassToken.TabsNavigation], styled.navigation.className),
|
|
142
|
+
style: styled.navigation.style
|
|
143
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
144
|
+
ref: navigatorRef,
|
|
145
|
+
className: relax.clsx(classNames[className.TabsClassToken.TabsNavigator], styled.navigator.className),
|
|
146
|
+
style: styled.navigator.style
|
|
147
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
148
|
+
ref: tabsRef,
|
|
149
|
+
className: relax.clsx(classNames[className.TabsClassToken.TabList], styled.list.className),
|
|
150
|
+
style: styled.list.style
|
|
151
|
+
}, items.map(function (item) {
|
|
152
|
+
return /*#__PURE__*/React.createElement(tab.default, {
|
|
153
|
+
key: item.key,
|
|
154
|
+
value: item.key,
|
|
155
|
+
label: item.label,
|
|
156
|
+
onClick: onChange,
|
|
157
|
+
ref: function ref(_tab) {
|
|
158
|
+
tabRefs.current.set(item.key, _tab);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
ref: indicatorRef,
|
|
163
|
+
className: relax.clsx(classNames[className.TabsClassToken.Indicator], styled.indicator.className),
|
|
164
|
+
style: styled.indicator.style
|
|
165
|
+
}))), /*#__PURE__*/React.createElement("div", null));
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
exports.default = Navigation;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import React, { useRef, useEffect } from 'react';
|
|
3
|
-
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.
|
|
4
|
-
import { useClassNames } from '../../hooks/use-class-names.
|
|
5
|
-
import { TabsClassToken } from '../../utils/class-name.
|
|
6
|
-
import Tab from './tab.
|
|
3
|
+
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
|
|
4
|
+
import { useClassNames } from '../../hooks/use-class-names.mjs';
|
|
5
|
+
import { TabsClassToken } from '../../utils/class-name.mjs';
|
|
6
|
+
import Tab from './tab.mjs';
|
|
7
7
|
import { useAnimate } from 'framer-motion';
|
|
8
8
|
import { isUndefined, clsx } from '@aiszlab/relax';
|
|
9
|
-
import { useTheme } from '../theme/hooks.
|
|
10
|
-
import { ColorToken } from '../../utils/colors.
|
|
11
|
-
import { useTabsContext, useNavigation, useNavigatorScroll } from './hooks.
|
|
12
|
-
import { ComponentToken } from '../../utils/component-token.
|
|
9
|
+
import { useTheme } from '../theme/hooks.mjs';
|
|
10
|
+
import { ColorToken } from '../../utils/colors.mjs';
|
|
11
|
+
import { useTabsContext, useNavigation, useNavigatorScroll } from './hooks.mjs';
|
|
12
|
+
import { ComponentToken } from '../../utils/component-token.mjs';
|
|
13
13
|
|
|
14
14
|
var styles = {
|
|
15
15
|
navigation: {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
|
|
6
|
+
var useClassNames = require('../../hooks/use-class-names.cjs');
|
|
7
|
+
var className = require('../../utils/class-name.cjs');
|
|
8
|
+
var relax = require('@aiszlab/relax');
|
|
9
|
+
var hooks = require('./hooks.cjs');
|
|
10
|
+
var componentToken = require('../../utils/component-token.cjs');
|
|
11
|
+
|
|
12
|
+
var styles = {
|
|
13
|
+
panels: {
|
|
14
|
+
"default": {
|
|
15
|
+
marginTop: "musaex-xhh4n9",
|
|
16
|
+
$$css: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
panel: {
|
|
20
|
+
"default": {
|
|
21
|
+
$$css: true
|
|
22
|
+
},
|
|
23
|
+
active: {
|
|
24
|
+
display: null,
|
|
25
|
+
$$css: true
|
|
26
|
+
},
|
|
27
|
+
hidden: {
|
|
28
|
+
display: "musaex-1s85apg",
|
|
29
|
+
$$css: true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var Panels = function Panels(_ref) {
|
|
34
|
+
var forceRender = _ref.forceRender,
|
|
35
|
+
destroyable = _ref.destroyable,
|
|
36
|
+
activatedKeys = _ref.activatedKeys;
|
|
37
|
+
var _useTabsContext = hooks.useTabsContext(),
|
|
38
|
+
items = _useTabsContext.items,
|
|
39
|
+
activeKey = _useTabsContext.activeKey;
|
|
40
|
+
var classNames = useClassNames.useClassNames(componentToken.ComponentToken.Tabs);
|
|
41
|
+
var styled = {
|
|
42
|
+
panels: stylex.default.props(styles.panels["default"]),
|
|
43
|
+
panel: {
|
|
44
|
+
active: stylex.default.props(styles.panel["default"], styles.panel.active),
|
|
45
|
+
hidden: stylex.default.props(styles.panel["default"], styles.panel.hidden)
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var panels = React.useMemo(function () {
|
|
49
|
+
if (relax.isUndefined(activeKey)) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
if (destroyable) {
|
|
53
|
+
var _items$find;
|
|
54
|
+
return [[activeKey, (_items$find = items.find(function (item) {
|
|
55
|
+
return item.key === activeKey;
|
|
56
|
+
})) === null || _items$find === void 0 ? void 0 : _items$find.children]];
|
|
57
|
+
}
|
|
58
|
+
if (forceRender) {
|
|
59
|
+
return items.map(function (item) {
|
|
60
|
+
return [item.key, item.children];
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return items.map(function (item) {
|
|
64
|
+
return [item.key, activatedKeys.has(item.key) ? item.children : null];
|
|
65
|
+
});
|
|
66
|
+
}, [destroyable, forceRender, items, activeKey, activatedKeys]);
|
|
67
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: relax.clsx(classNames[className.TabsClassToken.Panels], styled.panels.className),
|
|
69
|
+
style: styled.panels.style
|
|
70
|
+
}, panels.map(function (_ref2) {
|
|
71
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
72
|
+
key = _ref3[0],
|
|
73
|
+
children = _ref3[1];
|
|
74
|
+
var _ref4 = key === activeKey ? styled.panel.active : styled.panel.hidden,
|
|
75
|
+
className$1 = _ref4.className,
|
|
76
|
+
style = _ref4.style;
|
|
77
|
+
if (relax.isVoid(children)) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
key: key,
|
|
82
|
+
className: relax.clsx(classNames[className.TabsClassToken.Panel], className$1),
|
|
83
|
+
style: style
|
|
84
|
+
}, children);
|
|
85
|
+
}));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.default = Panels;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.
|
|
4
|
-
import { useClassNames } from '../../hooks/use-class-names.
|
|
5
|
-
import { TabsClassToken } from '../../utils/class-name.
|
|
3
|
+
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
|
|
4
|
+
import { useClassNames } from '../../hooks/use-class-names.mjs';
|
|
5
|
+
import { TabsClassToken } from '../../utils/class-name.mjs';
|
|
6
6
|
import { isUndefined, clsx, isVoid } from '@aiszlab/relax';
|
|
7
|
-
import { useTabsContext } from './hooks.
|
|
8
|
-
import { ComponentToken } from '../../utils/component-token.
|
|
7
|
+
import { useTabsContext } from './hooks.mjs';
|
|
8
|
+
import { ComponentToken } from '../../utils/component-token.mjs';
|
|
9
9
|
|
|
10
10
|
var styles = {
|
|
11
11
|
panels: {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var button = require('../button/button.cjs');
|
|
5
|
+
var context = require('./context.cjs');
|
|
6
|
+
var useClassNames = require('../../hooks/use-class-names.cjs');
|
|
7
|
+
var className = require('../../utils/class-name.cjs');
|
|
8
|
+
var componentToken = require('../../utils/component-token.cjs');
|
|
9
|
+
|
|
10
|
+
var Tab = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
11
|
+
var _useContext;
|
|
12
|
+
var value = _ref.value,
|
|
13
|
+
onClick = _ref.onClick,
|
|
14
|
+
label = _ref.label;
|
|
15
|
+
var _ref2 = (_useContext = React.useContext(context.default)) !== null && _useContext !== void 0 ? _useContext : {},
|
|
16
|
+
activeKey = _ref2.activeKey;
|
|
17
|
+
var isActive = activeKey === value;
|
|
18
|
+
var classNames = useClassNames.useClassNames(componentToken.ComponentToken.Tabs);
|
|
19
|
+
var click = React.useCallback(function () {
|
|
20
|
+
onClick(value);
|
|
21
|
+
}, [onClick, value]);
|
|
22
|
+
return /*#__PURE__*/React.createElement(button.Button, {
|
|
23
|
+
variant: "text",
|
|
24
|
+
color: isActive ? "primary" : "secondary",
|
|
25
|
+
ref: ref,
|
|
26
|
+
onClick: click,
|
|
27
|
+
className: classNames[className.TabsClassToken.Tab],
|
|
28
|
+
ripple: false,
|
|
29
|
+
style: {
|
|
30
|
+
borderRadius: "10% 10% 0 0"
|
|
31
|
+
}
|
|
32
|
+
}, label);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
exports.default = Tab;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef, useContext, useCallback } from 'react';
|
|
2
|
-
import Button from '../button/button.
|
|
3
|
-
import Context from './context.
|
|
4
|
-
import { useClassNames } from '../../hooks/use-class-names.
|
|
5
|
-
import { TabsClassToken } from '../../utils/class-name.
|
|
6
|
-
import { ComponentToken } from '../../utils/component-token.
|
|
2
|
+
import { Button } from '../button/button.mjs';
|
|
3
|
+
import Context from './context.mjs';
|
|
4
|
+
import { useClassNames } from '../../hooks/use-class-names.mjs';
|
|
5
|
+
import { TabsClassToken } from '../../utils/class-name.mjs';
|
|
6
|
+
import { ComponentToken } from '../../utils/component-token.mjs';
|
|
7
7
|
|
|
8
8
|
var Tab = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
9
9
|
var _useContext;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var context = require('./context.cjs');
|
|
5
|
+
var useClassNames = require('../../hooks/use-class-names.cjs');
|
|
6
|
+
var className = require('../../utils/class-name.cjs');
|
|
7
|
+
var relax = require('@aiszlab/relax');
|
|
8
|
+
var hooks = require('./hooks.cjs');
|
|
9
|
+
var panels = require('./panels.cjs');
|
|
10
|
+
var navigation = require('./navigation.cjs');
|
|
11
|
+
var componentToken = require('../../utils/component-token.cjs');
|
|
12
|
+
|
|
13
|
+
var Tabs = function Tabs(_ref) {
|
|
14
|
+
var _ref$items = _ref.items,
|
|
15
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
16
|
+
className$1 = _ref.className,
|
|
17
|
+
style = _ref.style,
|
|
18
|
+
_activeKey = _ref.activeKey,
|
|
19
|
+
defaultActiveKey = _ref.defaultActiveKey,
|
|
20
|
+
_ref$forceRender = _ref.forceRender,
|
|
21
|
+
forceRender = _ref$forceRender === void 0 ? false : _ref$forceRender,
|
|
22
|
+
_ref$destroyable = _ref.destroyable,
|
|
23
|
+
destroyable = _ref$destroyable === void 0 ? false : _ref$destroyable;
|
|
24
|
+
var _useTabs = hooks.useTabs({
|
|
25
|
+
items: items,
|
|
26
|
+
activeKey: _activeKey,
|
|
27
|
+
defaultActiveKey: defaultActiveKey
|
|
28
|
+
}),
|
|
29
|
+
activeKey = _useTabs.activeKey,
|
|
30
|
+
activatedKeys = _useTabs.activatedKeys,
|
|
31
|
+
changeActiveKey = _useTabs.changeActiveKey;
|
|
32
|
+
var classNames = useClassNames.useClassNames(componentToken.ComponentToken.Tabs);
|
|
33
|
+
/// context value
|
|
34
|
+
var contextValue = React.useMemo(function () {
|
|
35
|
+
return {
|
|
36
|
+
activeKey: activeKey,
|
|
37
|
+
items: items
|
|
38
|
+
};
|
|
39
|
+
}, [activeKey, items]);
|
|
40
|
+
// if there is not any item, return null
|
|
41
|
+
if (items.length === 0) return null;
|
|
42
|
+
return /*#__PURE__*/React.createElement(context.default.Provider, {
|
|
43
|
+
value: contextValue
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: relax.clsx(classNames[className.TabsClassToken.Tabs], className$1),
|
|
46
|
+
style: style
|
|
47
|
+
}, /*#__PURE__*/React.createElement(navigation.default, {
|
|
48
|
+
onChange: changeActiveKey
|
|
49
|
+
}), /*#__PURE__*/React.createElement(panels.default, {
|
|
50
|
+
activatedKeys: activatedKeys,
|
|
51
|
+
destroyable: destroyable,
|
|
52
|
+
forceRender: forceRender
|
|
53
|
+
})));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.default = Tabs;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import Context from './context.
|
|
3
|
-
import { useClassNames } from '../../hooks/use-class-names.
|
|
4
|
-
import { TabsClassToken } from '../../utils/class-name.
|
|
2
|
+
import Context from './context.mjs';
|
|
3
|
+
import { useClassNames } from '../../hooks/use-class-names.mjs';
|
|
4
|
+
import { TabsClassToken } from '../../utils/class-name.mjs';
|
|
5
5
|
import { clsx } from '@aiszlab/relax';
|
|
6
|
-
import { useTabs } from './hooks.
|
|
7
|
-
import Panels from './panels.
|
|
8
|
-
import Navigation from './navigation.
|
|
9
|
-
import { ComponentToken } from '../../utils/component-token.
|
|
6
|
+
import { useTabs } from './hooks.mjs';
|
|
7
|
+
import Panels from './panels.mjs';
|
|
8
|
+
import Navigation from './navigation.mjs';
|
|
9
|
+
import { ComponentToken } from '../../utils/component-token.mjs';
|
|
10
10
|
|
|
11
11
|
var Tabs = function Tabs(_ref) {
|
|
12
12
|
var _ref$items = _ref.items,
|
|
@@ -50,6 +50,5 @@ var Tabs = function Tabs(_ref) {
|
|
|
50
50
|
forceRender: forceRender
|
|
51
51
|
})));
|
|
52
52
|
};
|
|
53
|
-
var Tabs$1 = Tabs;
|
|
54
53
|
|
|
55
|
-
export { Tabs
|
|
54
|
+
export { Tabs as default };
|