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,65 @@
|
|
|
1
|
+
var React = require('react');
|
|
2
|
+
var button = require('../button/button.cjs');
|
|
3
|
+
var swapHoriz = require('../icon/icons/action/swap-horiz.cjs');
|
|
4
|
+
var swapVert = require('../icon/icons/action/swap-vert.cjs');
|
|
5
|
+
var zoomOut = require('../icon/icons/action/zoom-out.cjs');
|
|
6
|
+
var zoomIn = require('../icon/icons/action/zoom-in.cjs');
|
|
7
|
+
var rotateLeft = require('../icon/icons/image/rotate-left.cjs');
|
|
8
|
+
var rotateRight = require('../icon/icons/image/rotate-right.cjs');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
* handlers
|
|
13
|
+
*/
|
|
14
|
+
var useHandlers = function useHandlers(_ref) {
|
|
15
|
+
var onZoomIn = _ref.onZoomIn,
|
|
16
|
+
onZoomOut = _ref.onZoomOut,
|
|
17
|
+
onRotateRight = _ref.onRotateRight,
|
|
18
|
+
onRotateLeft = _ref.onRotateLeft,
|
|
19
|
+
onFlipX = _ref.onFlipX,
|
|
20
|
+
onFlipY = _ref.onFlipY;
|
|
21
|
+
var events = React.useMemo(function () {
|
|
22
|
+
return [{
|
|
23
|
+
child: /*#__PURE__*/React.createElement(swapHoriz.default, null),
|
|
24
|
+
onClick: onFlipX,
|
|
25
|
+
type: "flip-x"
|
|
26
|
+
}, {
|
|
27
|
+
child: /*#__PURE__*/React.createElement(swapVert.default, null),
|
|
28
|
+
onClick: onFlipY,
|
|
29
|
+
type: "flip-y"
|
|
30
|
+
}, {
|
|
31
|
+
child: /*#__PURE__*/React.createElement(rotateLeft.default, null),
|
|
32
|
+
onClick: onRotateLeft,
|
|
33
|
+
type: "rotate-left"
|
|
34
|
+
}, {
|
|
35
|
+
child: /*#__PURE__*/React.createElement(rotateRight.default, null),
|
|
36
|
+
onClick: onRotateRight,
|
|
37
|
+
type: "rotate-right"
|
|
38
|
+
}, {
|
|
39
|
+
child: /*#__PURE__*/React.createElement(zoomOut.default, null),
|
|
40
|
+
onClick: onZoomOut,
|
|
41
|
+
type: "zoom-out"
|
|
42
|
+
}, {
|
|
43
|
+
child: /*#__PURE__*/React.createElement(zoomIn.default, null),
|
|
44
|
+
onClick: onZoomIn,
|
|
45
|
+
type: "zoom-in"
|
|
46
|
+
}];
|
|
47
|
+
}, [onFlipX, onFlipY, onRotateLeft, onRotateRight, onZoomIn, onZoomOut]);
|
|
48
|
+
var handlers = React.useMemo(function () {
|
|
49
|
+
return events.map(function (_ref2) {
|
|
50
|
+
var type = _ref2.type,
|
|
51
|
+
onClick = _ref2.onClick,
|
|
52
|
+
child = _ref2.child;
|
|
53
|
+
return /*#__PURE__*/React.createElement(button.Button, {
|
|
54
|
+
onClick: onClick,
|
|
55
|
+
key: type,
|
|
56
|
+
variant: "text",
|
|
57
|
+
shape: "circular",
|
|
58
|
+
disabled: !onClick
|
|
59
|
+
}, child);
|
|
60
|
+
});
|
|
61
|
+
}, [events]);
|
|
62
|
+
return handlers;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.useHandlers = useHandlers;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import Button from '../button/button.
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import ZoomOut from '../icon/icons/action/zoom-out.
|
|
6
|
-
import ZoomIn from '../icon/icons/action/zoom-in.
|
|
7
|
-
import RotateLeft from '../icon/icons/image/rotate-left.
|
|
8
|
-
import RotateRight from '../icon/icons/image/rotate-right.
|
|
2
|
+
import { Button } from '../button/button.mjs';
|
|
3
|
+
import SwapHoriz from '../icon/icons/action/swap-horiz.mjs';
|
|
4
|
+
import SwapVert from '../icon/icons/action/swap-vert.mjs';
|
|
5
|
+
import ZoomOut from '../icon/icons/action/zoom-out.mjs';
|
|
6
|
+
import ZoomIn from '../icon/icons/action/zoom-in.mjs';
|
|
7
|
+
import RotateLeft from '../icon/icons/image/rotate-left.mjs';
|
|
8
|
+
import RotateRight from '../icon/icons/image/rotate-right.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @description
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var preview = require('./preview/preview.cjs');
|
|
6
|
+
var context = require('./preview/context.cjs');
|
|
7
|
+
var relax = require('@aiszlab/relax');
|
|
8
|
+
|
|
9
|
+
var Image = function Image(_ref) {
|
|
10
|
+
var src = _ref.src,
|
|
11
|
+
alt = _ref.alt,
|
|
12
|
+
width = _ref.width,
|
|
13
|
+
height = _ref.height;
|
|
14
|
+
var _useBoolean = relax.useBoolean(false),
|
|
15
|
+
_useBoolean2 = _slicedToArray(_useBoolean, 2),
|
|
16
|
+
isOpen = _useBoolean2[0],
|
|
17
|
+
_useBoolean2$ = _useBoolean2[1],
|
|
18
|
+
turnOn = _useBoolean2$.turnOn,
|
|
19
|
+
turnOff = _useBoolean2$.turnOff;
|
|
20
|
+
var contextValue = React.useContext(context.default);
|
|
21
|
+
var status = relax.useImageLoader({
|
|
22
|
+
src: src
|
|
23
|
+
});
|
|
24
|
+
var click = relax.useEvent(function () {
|
|
25
|
+
// if current image is in preview group
|
|
26
|
+
// just use preview group to preview image
|
|
27
|
+
if (contextValue) {
|
|
28
|
+
contextValue.onClick(src);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// not in preview group, render self
|
|
32
|
+
turnOn();
|
|
33
|
+
});
|
|
34
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, status === "loaded" && /*#__PURE__*/React.createElement("img", {
|
|
35
|
+
src: src,
|
|
36
|
+
alt: alt,
|
|
37
|
+
onClick: click,
|
|
38
|
+
width: width,
|
|
39
|
+
height: height
|
|
40
|
+
}), isOpen && !contextValue && /*#__PURE__*/React.createElement(preview.default, {
|
|
41
|
+
src: src,
|
|
42
|
+
onClose: turnOff,
|
|
43
|
+
alt: alt
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports.default = Image;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
|
-
import Preview from './preview/preview.
|
|
4
|
-
import PreviewGroupContext from './preview/context.
|
|
3
|
+
import Preview from './preview/preview.mjs';
|
|
4
|
+
import PreviewGroupContext from './preview/context.mjs';
|
|
5
5
|
import { useBoolean, useImageLoader, useEvent } from '@aiszlab/relax';
|
|
6
6
|
|
|
7
7
|
var Image = function Image(_ref) {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
var context = require('./context.cjs');
|
|
5
|
+
var preview = require('./preview.cjs');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var relax = require('@aiszlab/relax');
|
|
8
|
+
|
|
9
|
+
var Group = function Group(_ref) {
|
|
10
|
+
var children = _ref.children,
|
|
11
|
+
items = _ref.items;
|
|
12
|
+
var min = 0;
|
|
13
|
+
var max = items.length - 1;
|
|
14
|
+
var _useCounter = relax.useCounter(0, {
|
|
15
|
+
min: 0,
|
|
16
|
+
max: items.length - 1
|
|
17
|
+
}),
|
|
18
|
+
_useCounter2 = _slicedToArray(_useCounter, 2),
|
|
19
|
+
currentAt = _useCounter2[0],
|
|
20
|
+
_useCounter2$ = _useCounter2[1],
|
|
21
|
+
add = _useCounter2$.add,
|
|
22
|
+
subtract = _useCounter2$.subtract,
|
|
23
|
+
setCurrentAt = _useCounter2$.setCount;
|
|
24
|
+
var _useBoolean = relax.useBoolean(),
|
|
25
|
+
_useBoolean2 = _slicedToArray(_useBoolean, 2),
|
|
26
|
+
isOpen = _useBoolean2[0],
|
|
27
|
+
_useBoolean2$ = _useBoolean2[1],
|
|
28
|
+
turnOff = _useBoolean2$.turnOff,
|
|
29
|
+
turnOn = _useBoolean2$.turnOn;
|
|
30
|
+
var ref = React.useRef(null);
|
|
31
|
+
var source = React.useMemo(function () {
|
|
32
|
+
return items[currentAt];
|
|
33
|
+
}, [currentAt, items]);
|
|
34
|
+
/// when image is changed, reset styles
|
|
35
|
+
var prev = relax.useEvent(function () {
|
|
36
|
+
var _ref$current;
|
|
37
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.reset();
|
|
38
|
+
subtract();
|
|
39
|
+
});
|
|
40
|
+
var next = relax.useEvent(function () {
|
|
41
|
+
var _ref$current2;
|
|
42
|
+
(_ref$current2 = ref.current) === null || _ref$current2 === void 0 || _ref$current2.reset();
|
|
43
|
+
add();
|
|
44
|
+
});
|
|
45
|
+
return /*#__PURE__*/React.createElement(context.default.Provider, {
|
|
46
|
+
value: {
|
|
47
|
+
total: items.length,
|
|
48
|
+
onClick: function onClick(src) {
|
|
49
|
+
setCurrentAt(Math.max(items.indexOf(src), 0));
|
|
50
|
+
turnOn();
|
|
51
|
+
},
|
|
52
|
+
onSwitchLeft: currentAt <= min ? void 0 : prev,
|
|
53
|
+
onSwitchRight: currentAt >= max ? void 0 : next
|
|
54
|
+
}
|
|
55
|
+
}, children, isOpen && /*#__PURE__*/React.createElement(preview.default, {
|
|
56
|
+
src: source,
|
|
57
|
+
onClose: turnOff,
|
|
58
|
+
ref: ref
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
exports.default = Group;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
-
import PreviewGroupContext from './context.
|
|
3
|
-
import Preview from './preview.
|
|
2
|
+
import PreviewGroupContext from './context.mjs';
|
|
3
|
+
import Preview from './preview.mjs';
|
|
4
4
|
import React, { useRef, useMemo } from 'react';
|
|
5
5
|
import { useCounter, useBoolean, useEvent } from '@aiszlab/relax';
|
|
6
6
|
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
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 portal = require('../../portal/portal.cjs');
|
|
7
|
+
var hooks = require('../../theme/hooks.cjs');
|
|
8
|
+
var colors = require('../../../utils/colors.cjs');
|
|
9
|
+
var hooks$1 = require('../hooks.cjs');
|
|
10
|
+
var button = require('../../button/button.cjs');
|
|
11
|
+
var context = require('./context.cjs');
|
|
12
|
+
var close = require('../../icon/icons/navigation/close.cjs');
|
|
13
|
+
var keyboardArrowLeft = require('../../icon/icons/hardware/keyboard-arrow-left.cjs');
|
|
14
|
+
var keyboardArrowRight = require('../../icon/icons/hardware/keyboard-arrow-right.cjs');
|
|
15
|
+
|
|
16
|
+
var styles = {
|
|
17
|
+
footer: function footer(props) {
|
|
18
|
+
return [{
|
|
19
|
+
position: "musaex-ixxii4",
|
|
20
|
+
left: "musaex-u96u03",
|
|
21
|
+
insetInlineStart: null,
|
|
22
|
+
insetInlineEnd: null,
|
|
23
|
+
right: "musaex-3m8u43",
|
|
24
|
+
bottom: "musaex-vw9jmq",
|
|
25
|
+
display: "musaex-78zum5",
|
|
26
|
+
flexDirection: "musaex-dt5ytf",
|
|
27
|
+
alignItems: "musaex-6s0dn4",
|
|
28
|
+
color: "musaex-19dipnz",
|
|
29
|
+
$$css: true
|
|
30
|
+
}, {
|
|
31
|
+
"--color": props.color != null ? props.color : "initial"
|
|
32
|
+
}];
|
|
33
|
+
},
|
|
34
|
+
handlers: function handlers(props) {
|
|
35
|
+
return [{
|
|
36
|
+
display: "musaex-78zum5",
|
|
37
|
+
flexDirection: "musaex-1q0g3np",
|
|
38
|
+
gap: "musaex-90xh4w",
|
|
39
|
+
rowGap: null,
|
|
40
|
+
columnGap: null,
|
|
41
|
+
alignItems: "musaex-6s0dn4",
|
|
42
|
+
backgroundColor: "musaex-q1mx2j",
|
|
43
|
+
borderRadius: "musaex-z7qqyb",
|
|
44
|
+
borderStartStartRadius: null,
|
|
45
|
+
borderStartEndRadius: null,
|
|
46
|
+
borderEndStartRadius: null,
|
|
47
|
+
borderEndEndRadius: null,
|
|
48
|
+
borderTopLeftRadius: null,
|
|
49
|
+
borderTopRightRadius: null,
|
|
50
|
+
borderBottomLeftRadius: null,
|
|
51
|
+
borderBottomRightRadius: null,
|
|
52
|
+
paddingInline: "musaex-ei3nwd",
|
|
53
|
+
paddingStart: null,
|
|
54
|
+
paddingLeft: null,
|
|
55
|
+
paddingEnd: null,
|
|
56
|
+
paddingRight: null,
|
|
57
|
+
paddingBlock: "musaex-1i37kmv",
|
|
58
|
+
paddingTop: null,
|
|
59
|
+
paddingBottom: null,
|
|
60
|
+
$$css: true
|
|
61
|
+
}, {
|
|
62
|
+
"--backgroundColor": props.backgroundColor != null ? props.backgroundColor : "initial"
|
|
63
|
+
}];
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var Operations = function Operations(_ref) {
|
|
67
|
+
var _useContext;
|
|
68
|
+
var onClose = _ref.onClose,
|
|
69
|
+
onZoomIn = _ref.onZoomIn,
|
|
70
|
+
onZoomOut = _ref.onZoomOut,
|
|
71
|
+
onRotateRight = _ref.onRotateRight,
|
|
72
|
+
onRotateLeft = _ref.onRotateLeft,
|
|
73
|
+
onFlipX = _ref.onFlipX,
|
|
74
|
+
onFlipY = _ref.onFlipY;
|
|
75
|
+
var theme = hooks.useTheme();
|
|
76
|
+
var styled = {
|
|
77
|
+
operations: {
|
|
78
|
+
className: "musaex-ixxii4 musaex-5z12vg"
|
|
79
|
+
},
|
|
80
|
+
closer: {
|
|
81
|
+
className: "musaex-1mjgxse musaex-l9l3z8"
|
|
82
|
+
},
|
|
83
|
+
navigations: {
|
|
84
|
+
className: "musaex-ixxii4 musaex-u96u03 musaex-3m8u43 musaex-wa60dl musaex-1dhq86w musaex-78zum5 musaex-1q0g3np musaex-1qughib musaex-6s0dn4"
|
|
85
|
+
},
|
|
86
|
+
footer: stylex.default.props(styles.footer({
|
|
87
|
+
color: theme.colors[colors.ColorToken.OnSurface]
|
|
88
|
+
})),
|
|
89
|
+
handlers: stylex.default.props(styles.handlers({
|
|
90
|
+
backgroundColor: theme.colors[colors.ColorToken.Surface]
|
|
91
|
+
}))
|
|
92
|
+
};
|
|
93
|
+
var handlers = hooks$1.useHandlers({
|
|
94
|
+
onFlipX: onFlipX,
|
|
95
|
+
onFlipY: onFlipY,
|
|
96
|
+
onRotateLeft: onRotateLeft,
|
|
97
|
+
onRotateRight: onRotateRight,
|
|
98
|
+
onZoomIn: onZoomIn,
|
|
99
|
+
onZoomOut: onZoomOut
|
|
100
|
+
});
|
|
101
|
+
var _ref2 = (_useContext = React.useContext(context.default)) !== null && _useContext !== void 0 ? _useContext : {},
|
|
102
|
+
onSwitchLeft = _ref2.onSwitchLeft,
|
|
103
|
+
onSwitchRight = _ref2.onSwitchRight,
|
|
104
|
+
_ref2$total = _ref2.total,
|
|
105
|
+
total = _ref2$total === void 0 ? 1 : _ref2$total;
|
|
106
|
+
var isMultiple = total > 1;
|
|
107
|
+
return /*#__PURE__*/React.createElement(portal.default, {
|
|
108
|
+
lockable: true
|
|
109
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
className: styled.operations.className,
|
|
111
|
+
style: styled.operations.style
|
|
112
|
+
}, /*#__PURE__*/React.createElement(button.Button, {
|
|
113
|
+
className: styled.closer.className,
|
|
114
|
+
style: _objectSpread(_objectSpread({}, styled.closer.style), {}, {
|
|
115
|
+
position: "fixed"
|
|
116
|
+
}),
|
|
117
|
+
variant: "text",
|
|
118
|
+
onClick: onClose,
|
|
119
|
+
shape: "circular"
|
|
120
|
+
}, /*#__PURE__*/React.createElement(close.default, {
|
|
121
|
+
size: 32
|
|
122
|
+
})), isMultiple && (/*#__PURE__*/React.createElement("div", {
|
|
123
|
+
className: styled.navigations.className,
|
|
124
|
+
style: styled.navigations.style
|
|
125
|
+
}, /*#__PURE__*/React.createElement(button.Button, {
|
|
126
|
+
variant: "text",
|
|
127
|
+
shape: "circular",
|
|
128
|
+
onClick: onSwitchLeft,
|
|
129
|
+
disabled: !onSwitchLeft
|
|
130
|
+
}, /*#__PURE__*/React.createElement(keyboardArrowLeft.default, {
|
|
131
|
+
size: 32
|
|
132
|
+
})), /*#__PURE__*/React.createElement(button.Button, {
|
|
133
|
+
variant: "text",
|
|
134
|
+
shape: "circular",
|
|
135
|
+
onClick: onSwitchRight,
|
|
136
|
+
disabled: !onSwitchRight
|
|
137
|
+
}, /*#__PURE__*/React.createElement(keyboardArrowRight.default, {
|
|
138
|
+
size: 32
|
|
139
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
className: styled.footer.className,
|
|
141
|
+
style: styled.footer.style
|
|
142
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: styled.handlers.className,
|
|
144
|
+
style: styled.handlers.style
|
|
145
|
+
}, handlers))));
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
exports.default = Operations;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
|
-
import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.
|
|
4
|
-
import Portal from '../../portal/portal.
|
|
5
|
-
import { useTheme } from '../../theme/hooks.
|
|
6
|
-
import { ColorToken } from '../../../utils/colors.
|
|
7
|
-
import { useHandlers } from '../hooks.
|
|
8
|
-
import Button from '../../button/button.
|
|
9
|
-
import PreviewGroupContext from './context.
|
|
10
|
-
import Close from '../../icon/icons/navigation/close.
|
|
11
|
-
import KeyboardArrowLeft from '../../icon/icons/hardware/keyboard-arrow-left.
|
|
12
|
-
import KeyboardArrowRight from '../../icon/icons/hardware/keyboard-arrow-right.
|
|
3
|
+
import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
|
|
4
|
+
import Portal from '../../portal/portal.mjs';
|
|
5
|
+
import { useTheme } from '../../theme/hooks.mjs';
|
|
6
|
+
import { ColorToken } from '../../../utils/colors.mjs';
|
|
7
|
+
import { useHandlers } from '../hooks.mjs';
|
|
8
|
+
import { Button } from '../../button/button.mjs';
|
|
9
|
+
import PreviewGroupContext from './context.mjs';
|
|
10
|
+
import Close from '../../icon/icons/navigation/close.mjs';
|
|
11
|
+
import KeyboardArrowLeft from '../../icon/icons/hardware/keyboard-arrow-left.mjs';
|
|
12
|
+
import KeyboardArrowRight from '../../icon/icons/hardware/keyboard-arrow-right.mjs';
|
|
13
13
|
|
|
14
14
|
var styles = {
|
|
15
15
|
footer: function footer(props) {
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var dialog = require('../../dialog/dialog.cjs');
|
|
6
|
+
var operations = require('./operations.cjs');
|
|
7
|
+
var stylex = require('../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
|
|
8
|
+
|
|
9
|
+
var styles = {
|
|
10
|
+
image: function image(props) {
|
|
11
|
+
return [{
|
|
12
|
+
transform: "musaex-1v0jg1i",
|
|
13
|
+
willChange: "musaex-1so62im",
|
|
14
|
+
transition: "musaex-1trvaba",
|
|
15
|
+
transitionBehavior: null,
|
|
16
|
+
transitionDelay: null,
|
|
17
|
+
transitionDuration: null,
|
|
18
|
+
transitionProperty: null,
|
|
19
|
+
transitionTimingFunction: null,
|
|
20
|
+
$$css: true
|
|
21
|
+
}, {
|
|
22
|
+
"--transform": "translate3d(0px, 0px, 0px) scale3d(".concat(props.scale * props.flipX, ", ").concat(props.scale * props.flipY, ", 1) rotate(").concat(props.rotate, "deg)") != null ? "translate3d(0px, 0px, 0px) scale3d(".concat(props.scale * props.flipX, ", ").concat(props.scale * props.flipY, ", 1) rotate(").concat(props.rotate, "deg)") : "initial"
|
|
23
|
+
}];
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var DefaultStyle;
|
|
27
|
+
(function (DefaultStyle) {
|
|
28
|
+
DefaultStyle[DefaultStyle["scale"] = 1] = "scale";
|
|
29
|
+
DefaultStyle[DefaultStyle["rotate"] = 0] = "rotate";
|
|
30
|
+
DefaultStyle[DefaultStyle["flipX"] = 0] = "flipX";
|
|
31
|
+
DefaultStyle[DefaultStyle["flipY"] = 0] = "flipY";
|
|
32
|
+
})(DefaultStyle || (DefaultStyle = {}));
|
|
33
|
+
var Preview = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
34
|
+
var onClose = _ref.onClose,
|
|
35
|
+
src = _ref.src,
|
|
36
|
+
alt = _ref.alt;
|
|
37
|
+
var _useState = React.useState(DefaultStyle.scale),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
scale = _useState2[0],
|
|
40
|
+
setScale = _useState2[1];
|
|
41
|
+
var _useState3 = React.useState(DefaultStyle.rotate),
|
|
42
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
43
|
+
rotate = _useState4[0],
|
|
44
|
+
setRotate = _useState4[1];
|
|
45
|
+
var _useState5 = React.useState(!!DefaultStyle.flipX),
|
|
46
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
47
|
+
isFlipX = _useState6[0],
|
|
48
|
+
setFlipX = _useState6[1];
|
|
49
|
+
var _useState7 = React.useState(!!DefaultStyle.flipY),
|
|
50
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
51
|
+
isFlipY = _useState8[0],
|
|
52
|
+
setFlipY = _useState8[1];
|
|
53
|
+
var onZoomOut = function onZoomOut() {
|
|
54
|
+
setScale(function (prev) {
|
|
55
|
+
return Math.max(prev / 1.5, 1);
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
var onZoomIn = function onZoomIn() {
|
|
59
|
+
setScale(function (prev) {
|
|
60
|
+
return prev * 1.5;
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
var onRotateLeft = function onRotateLeft() {
|
|
64
|
+
setRotate(function (prev) {
|
|
65
|
+
return prev - 90;
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
var onRotateRight = function onRotateRight() {
|
|
69
|
+
setRotate(function (prev) {
|
|
70
|
+
return prev + 90;
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
var onFlipX = function onFlipX() {
|
|
74
|
+
setFlipX(function (prev) {
|
|
75
|
+
return !prev;
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
var onFlipY = function onFlipY() {
|
|
79
|
+
setFlipY(function (prev) {
|
|
80
|
+
return !prev;
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
React.useImperativeHandle(ref, function () {
|
|
84
|
+
return {
|
|
85
|
+
reset: function reset() {
|
|
86
|
+
setScale(DefaultStyle.scale);
|
|
87
|
+
setRotate(DefaultStyle.rotate);
|
|
88
|
+
setFlipX(!!DefaultStyle.flipX);
|
|
89
|
+
setFlipY(!!DefaultStyle.flipY);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}, []);
|
|
93
|
+
var styled = stylex.default.props(styles.image({
|
|
94
|
+
scale: scale,
|
|
95
|
+
rotate: rotate,
|
|
96
|
+
flipX: isFlipX ? -1 : 1,
|
|
97
|
+
flipY: isFlipY ? -1 : 1
|
|
98
|
+
}));
|
|
99
|
+
var isSmallest = scale <= 1;
|
|
100
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(dialog.default, {
|
|
101
|
+
open: true,
|
|
102
|
+
onClose: onClose,
|
|
103
|
+
footer: false,
|
|
104
|
+
closable: ["esc"],
|
|
105
|
+
styles: {
|
|
106
|
+
panel: {
|
|
107
|
+
backgroundColor: "transparent",
|
|
108
|
+
margin: 0,
|
|
109
|
+
width: "100%",
|
|
110
|
+
height: "100%",
|
|
111
|
+
maxHeight: "100%"
|
|
112
|
+
},
|
|
113
|
+
body: {
|
|
114
|
+
display: "flex",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
justifyContent: "center"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
120
|
+
src: src,
|
|
121
|
+
className: styled.className,
|
|
122
|
+
style: styled.style,
|
|
123
|
+
alt: alt
|
|
124
|
+
})), /*#__PURE__*/React.createElement(operations.default, {
|
|
125
|
+
onZoomOut: isSmallest ? void 0 : onZoomOut,
|
|
126
|
+
onZoomIn: onZoomIn,
|
|
127
|
+
onRotateRight: onRotateRight,
|
|
128
|
+
onRotateLeft: onRotateLeft,
|
|
129
|
+
onFlipX: onFlipX,
|
|
130
|
+
onFlipY: onFlipY,
|
|
131
|
+
onClose: onClose
|
|
132
|
+
}));
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
exports.default = Preview;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import React, { forwardRef, useState, useImperativeHandle } from 'react';
|
|
3
|
-
import Dialog from '../../dialog/dialog.
|
|
4
|
-
import Operations from './operations.
|
|
5
|
-
import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.
|
|
3
|
+
import Dialog from '../../dialog/dialog.mjs';
|
|
4
|
+
import Operations from './operations.mjs';
|
|
5
|
+
import _stylex from '../../../node_modules/.pnpm/@stylexjs_stylex@0.7.5/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
|
|
6
6
|
|
|
7
7
|
var styles = {
|
|
8
8
|
image: function image(props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FC, ImgHTMLAttributes, MouseEvent, ReactNode } from "react";
|
|
2
|
-
import type { ComponentProps } from "
|
|
2
|
+
import type { ComponentProps } from "musae/types/element";
|
|
3
3
|
import type { Partialable } from "@aiszlab/relax/types";
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var React = require('react');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
* use events for input
|
|
6
|
+
*/
|
|
7
|
+
var useInputEvents = function useInputEvents(_ref) {
|
|
8
|
+
var setValue = _ref.setValue,
|
|
9
|
+
onBlur = _ref.onBlur,
|
|
10
|
+
onChange = _ref.onChange,
|
|
11
|
+
onClick = _ref.onClick,
|
|
12
|
+
onFocus = _ref.onFocus;
|
|
13
|
+
var focus = React.useCallback(function (e) {
|
|
14
|
+
onFocus === null || onFocus === void 0 || onFocus(e);
|
|
15
|
+
e.stopPropagation();
|
|
16
|
+
}, [onFocus]);
|
|
17
|
+
var blur = React.useCallback(function (e) {
|
|
18
|
+
onBlur === null || onBlur === void 0 || onBlur(e);
|
|
19
|
+
e.stopPropagation();
|
|
20
|
+
}, [onBlur]);
|
|
21
|
+
/// change handler
|
|
22
|
+
var change = React.useCallback(function (e) {
|
|
23
|
+
setValue(e.target.value);
|
|
24
|
+
onChange === null || onChange === void 0 || onChange(e.target.value);
|
|
25
|
+
}, [setValue, onChange]);
|
|
26
|
+
/// click handler
|
|
27
|
+
var click = React.useCallback(function (e) {
|
|
28
|
+
onClick === null || onClick === void 0 || onClick(e);
|
|
29
|
+
e.stopPropagation();
|
|
30
|
+
}, [onClick]);
|
|
31
|
+
return {
|
|
32
|
+
focus: focus,
|
|
33
|
+
blur: blur,
|
|
34
|
+
change: change,
|
|
35
|
+
click: click
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @description
|
|
40
|
+
* wrapper events
|
|
41
|
+
*/
|
|
42
|
+
var useWrapperEvents = function useWrapperEvents(props) {
|
|
43
|
+
/// focus
|
|
44
|
+
var focus = React.useCallback(function () {
|
|
45
|
+
var _props$inputRef$curre;
|
|
46
|
+
(_props$inputRef$curre = props.inputRef.current) === null || _props$inputRef$curre === void 0 || _props$inputRef$curre.focus();
|
|
47
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
|
+
}, []);
|
|
49
|
+
/// blur
|
|
50
|
+
var blur = React.useCallback(function () {
|
|
51
|
+
var _props$inputRef$curre2;
|
|
52
|
+
(_props$inputRef$curre2 = props.inputRef.current) === null || _props$inputRef$curre2 === void 0 || _props$inputRef$curre2.blur();
|
|
53
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
54
|
+
}, []);
|
|
55
|
+
/// click
|
|
56
|
+
var click = React.useCallback(function () {
|
|
57
|
+
var _props$inputRef$curre3;
|
|
58
|
+
(_props$inputRef$curre3 = props.inputRef.current) === null || _props$inputRef$curre3 === void 0 || _props$inputRef$curre3.click();
|
|
59
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
|
+
}, []);
|
|
61
|
+
return {
|
|
62
|
+
focus: focus,
|
|
63
|
+
blur: blur,
|
|
64
|
+
click: click
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
exports.useInputEvents = useInputEvents;
|
|
69
|
+
exports.useWrapperEvents = useWrapperEvents;
|