one-design-next 0.0.4-alpha.100
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/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/_util/canUseDom.d.ts +1 -0
- package/dist/_util/canUseDom.js +3 -0
- package/dist/_util/color.d.ts +103 -0
- package/dist/_util/color.js +250 -0
- package/dist/_util/date.d.ts +53 -0
- package/dist/_util/date.js +657 -0
- package/dist/_util/focusManager.d.ts +12 -0
- package/dist/_util/focusManager.js +56 -0
- package/dist/_util/queueMtPolyfill.d.ts +5 -0
- package/dist/_util/queueMtPolyfill.js +19 -0
- package/dist/_util/time.d.ts +44 -0
- package/dist/_util/time.js +150 -0
- package/dist/_util/useActive.d.ts +6 -0
- package/dist/_util/useActive.js +25 -0
- package/dist/_util/useControlledState.d.ts +8 -0
- package/dist/_util/useControlledState.js +30 -0
- package/dist/_util/useLayoutEffect.d.ts +4 -0
- package/dist/_util/useLayoutEffect.js +30 -0
- package/dist/alert/index.d.ts +63 -0
- package/dist/alert/index.js +137 -0
- package/dist/alert/style/index.css +184 -0
- package/dist/alert/style/index.d.ts +2 -0
- package/dist/alert/style/index.js +2 -0
- package/dist/auto-complete/index.d.ts +64 -0
- package/dist/auto-complete/index.js +149 -0
- package/dist/avatar/index.d.ts +68 -0
- package/dist/avatar/index.js +177 -0
- package/dist/avatar/primitive.d.ts +6 -0
- package/dist/avatar/primitive.js +23 -0
- package/dist/avatar/style/index.css +74 -0
- package/dist/avatar/style/index.d.ts +2 -0
- package/dist/avatar/style/index.js +2 -0
- package/dist/button/index.d.ts +15 -0
- package/dist/button/index.js +64 -0
- package/dist/button/style/index.css +338 -0
- package/dist/button/style/index.d.ts +2 -0
- package/dist/button/style/index.js +2 -0
- package/dist/calendar/index.d.ts +25 -0
- package/dist/calendar/index.js +379 -0
- package/dist/calendar/style/index.css +5 -0
- package/dist/calendar/style/index.d.ts +2 -0
- package/dist/calendar/style/index.js +2 -0
- package/dist/card/header.d.ts +26 -0
- package/dist/card/header.js +37 -0
- package/dist/card/index.d.ts +24 -0
- package/dist/card/index.js +31 -0
- package/dist/card/style/index.css +141 -0
- package/dist/card/style/index.d.ts +1 -0
- package/dist/card/style/index.js +1 -0
- package/dist/cascader/CascaderOptionContent.d.ts +20 -0
- package/dist/cascader/CascaderOptionContent.js +85 -0
- package/dist/cascader/Panel.d.ts +53 -0
- package/dist/cascader/Panel.js +131 -0
- package/dist/cascader/index.d.ts +59 -0
- package/dist/cascader/index.js +436 -0
- package/dist/cascader/style/index.css +414 -0
- package/dist/cascader/style/index.d.ts +2 -0
- package/dist/cascader/style/index.js +2 -0
- package/dist/cascader/utils.d.ts +14 -0
- package/dist/cascader/utils.js +109 -0
- package/dist/chart/index.d.ts +14 -0
- package/dist/chart/index.js +11 -0
- package/dist/chart/style/index.css +1 -0
- package/dist/chart/style/index.d.ts +2 -0
- package/dist/chart/style/index.js +2 -0
- package/dist/checkbox/Checkbox.d.ts +77 -0
- package/dist/checkbox/Checkbox.js +178 -0
- package/dist/checkbox/Context.d.ts +35 -0
- package/dist/checkbox/Context.js +2 -0
- package/dist/checkbox/Group.d.ts +68 -0
- package/dist/checkbox/Group.js +151 -0
- package/dist/checkbox/index.d.ts +5 -0
- package/dist/checkbox/index.js +3 -0
- package/dist/checkbox/style/index.css +330 -0
- package/dist/checkbox/style/index.d.ts +2 -0
- package/dist/checkbox/style/index.js +2 -0
- package/dist/collapse/index.d.ts +43 -0
- package/dist/collapse/index.js +111 -0
- package/dist/collapse/primitive.d.ts +21 -0
- package/dist/collapse/primitive.js +103 -0
- package/dist/collapse/style/index.css +59 -0
- package/dist/collapse/style/index.d.ts +2 -0
- package/dist/collapse/style/index.js +2 -0
- package/dist/color-picker/index.d.ts +55 -0
- package/dist/color-picker/index.js +588 -0
- package/dist/color-picker/style/index.css +135 -0
- package/dist/color-picker/style/index.d.ts +2 -0
- package/dist/color-picker/style/index.js +2 -0
- package/dist/config-provider/index.d.ts +46 -0
- package/dist/config-provider/index.js +37 -0
- package/dist/date-picker/MonthPicker.d.ts +31 -0
- package/dist/date-picker/MonthPicker.js +161 -0
- package/dist/date-picker/QuarterPicker.d.ts +36 -0
- package/dist/date-picker/QuarterPicker.js +168 -0
- package/dist/date-picker/YearPicker.d.ts +13 -0
- package/dist/date-picker/YearPicker.js +84 -0
- package/dist/date-picker/index.d.ts +240 -0
- package/dist/date-picker/index.js +1249 -0
- package/dist/date-picker/style/index.css +511 -0
- package/dist/date-picker/style/index.d.ts +2 -0
- package/dist/date-picker/style/index.js +2 -0
- package/dist/date-range-picker/index.d.ts +58 -0
- package/dist/date-range-picker/index.js +1043 -0
- package/dist/dialog/index.d.ts +139 -0
- package/dist/dialog/index.js +300 -0
- package/dist/dialog/style/index.css +228 -0
- package/dist/dialog/style/index.d.ts +2 -0
- package/dist/dialog/style/index.js +2 -0
- package/dist/dialog/useModalPosition.d.ts +6 -0
- package/dist/dialog/useModalPosition.js +34 -0
- package/dist/drawer/index.d.ts +92 -0
- package/dist/drawer/index.js +214 -0
- package/dist/drawer/style/index.css +244 -0
- package/dist/drawer/style/index.d.ts +2 -0
- package/dist/drawer/style/index.js +2 -0
- package/dist/dropdown/index.d.ts +91 -0
- package/dist/dropdown/index.js +846 -0
- package/dist/dropdown/style/index.css +206 -0
- package/dist/dropdown/style/index.d.ts +2 -0
- package/dist/dropdown/style/index.js +2 -0
- package/dist/ellipsis-text/index.d.ts +19 -0
- package/dist/ellipsis-text/index.js +97 -0
- package/dist/ellipsis-text/style/index.css +1 -0
- package/dist/ellipsis-text/style/index.d.ts +2 -0
- package/dist/ellipsis-text/style/index.js +2 -0
- package/dist/empty/index.d.ts +20 -0
- package/dist/empty/index.js +2398 -0
- package/dist/empty/style/index.css +80 -0
- package/dist/empty/style/index.d.ts +2 -0
- package/dist/empty/style/index.js +2 -0
- package/dist/form/index.d.ts +106 -0
- package/dist/form/index.js +272 -0
- package/dist/form/style/index.css +84 -0
- package/dist/form/style/index.d.ts +2 -0
- package/dist/form/style/index.js +2 -0
- package/dist/hover-fill/index.d.ts +50 -0
- package/dist/hover-fill/index.js +258 -0
- package/dist/hover-fill/style/index.css +35 -0
- package/dist/hover-fill/style/index.d.ts +2 -0
- package/dist/hover-fill/style/index.js +2 -0
- package/dist/icon/index.d.ts +11 -0
- package/dist/icon/index.js +102 -0
- package/dist/icon/style/index.css +15 -0
- package/dist/icon/style/index.d.ts +2 -0
- package/dist/icon/style/index.js +2 -0
- package/dist/icon/svg/alert/alert-circle-filled.svg +1 -0
- package/dist/icon/svg/alert/alert-circle.svg +1 -0
- package/dist/icon/svg/alert/help-circle-filled.svg +1 -0
- package/dist/icon/svg/alert/help-circle.svg +1 -0
- package/dist/icon/svg/alert/info-circle-filled.svg +1 -0
- package/dist/icon/svg/alert/info-circle.svg +1 -0
- package/dist/icon/svg/alert/stop.svg +1 -0
- package/dist/icon/svg/alert/warning-filled.svg +1 -0
- package/dist/icon/svg/alert/warning.svg +1 -0
- package/dist/icon/svg/content/QRcode.svg +1 -0
- package/dist/icon/svg/content/bell-filled.svg +1 -0
- package/dist/icon/svg/content/bell.svg +1 -0
- package/dist/icon/svg/content/bidding.svg +1 -0
- package/dist/icon/svg/content/calendar.svg +1 -0
- package/dist/icon/svg/content/code.svg +1 -0
- package/dist/icon/svg/content/customColumn.svg +1 -0
- package/dist/icon/svg/content/data.svg +1 -0
- package/dist/icon/svg/content/dataReport-filled.svg +1 -0
- package/dist/icon/svg/content/dataReport.svg +1 -0
- package/dist/icon/svg/content/download-1.svg +1 -0
- package/dist/icon/svg/content/download-filled.svg +1 -0
- package/dist/icon/svg/content/download.svg +1 -0
- package/dist/icon/svg/content/exchange.svg +1 -0
- package/dist/icon/svg/content/filter-filled.svg +1 -0
- package/dist/icon/svg/content/filter.svg +1 -0
- package/dist/icon/svg/content/hot-filled.svg +1 -0
- package/dist/icon/svg/content/hot.svg +1 -0
- package/dist/icon/svg/content/link.svg +1 -0
- package/dist/icon/svg/content/location.svg +1 -0
- package/dist/icon/svg/content/maxSize.svg +1 -0
- package/dist/icon/svg/content/mobile-filled.svg +1 -0
- package/dist/icon/svg/content/mobile.svg +1 -0
- package/dist/icon/svg/content/mute.svg +1 -0
- package/dist/icon/svg/content/mutiImage-filled.svg +1 -0
- package/dist/icon/svg/content/mutiImage.svg +1 -0
- package/dist/icon/svg/content/refresh.svg +1 -0
- package/dist/icon/svg/content/report.svg +1 -0
- package/dist/icon/svg/content/save.svg +1 -0
- package/dist/icon/svg/content/search-bold.svg +1 -0
- package/dist/icon/svg/content/search-filled.svg +1 -0
- package/dist/icon/svg/content/search.svg +1 -0
- package/dist/icon/svg/content/setting.svg +1 -0
- package/dist/icon/svg/content/share.svg +1 -0
- package/dist/icon/svg/content/sort.svg +1 -0
- package/dist/icon/svg/content/sound.svg +1 -0
- package/dist/icon/svg/content/sticker-filled.svg +1 -0
- package/dist/icon/svg/content/sticker.svg +1 -0
- package/dist/icon/svg/content/tag-filled.svg +1 -0
- package/dist/icon/svg/content/tag.svg +1 -0
- package/dist/icon/svg/content/thumbDown-filled.svg +1 -0
- package/dist/icon/svg/content/thumbDown.svg +1 -0
- package/dist/icon/svg/content/thumbUp-filled.svg +1 -0
- package/dist/icon/svg/content/thumbUp.svg +1 -0
- package/dist/icon/svg/content/time-bold.svg +1 -0
- package/dist/icon/svg/content/time.svg +1 -0
- package/dist/icon/svg/content/verify.svg +1 -0
- package/dist/icon/svg/content/video.svg +1 -0
- package/dist/icon/svg/content/videoScreenshot.svg +1 -0
- package/dist/icon/svg/content/zoomIn.svg +1 -0
- package/dist/icon/svg/content/zoomOut.svg +1 -0
- package/dist/icon/svg/data/compare.svg +1 -0
- package/dist/icon/svg/data/histogram.svg +1 -0
- package/dist/icon/svg/editor/cancel-circle-filled.svg +1 -0
- package/dist/icon/svg/editor/cancel-circle.svg +1 -0
- package/dist/icon/svg/editor/cancel.svg +1 -0
- package/dist/icon/svg/editor/check-circle-filled.svg +1 -0
- package/dist/icon/svg/editor/check-circle.svg +1 -0
- package/dist/icon/svg/editor/check.svg +1 -0
- package/dist/icon/svg/editor/copy.svg +1 -0
- package/dist/icon/svg/editor/custom-filled.svg +1 -0
- package/dist/icon/svg/editor/custom.svg +1 -0
- package/dist/icon/svg/editor/delete.svg +1 -0
- package/dist/icon/svg/editor/deleteAD-filled.svg +1 -0
- package/dist/icon/svg/editor/draggable.svg +1 -0
- package/dist/icon/svg/editor/edit.svg +1 -0
- package/dist/icon/svg/editor/import.svg +1 -0
- package/dist/icon/svg/editor/minus-circle-filled.svg +1 -0
- package/dist/icon/svg/editor/minus-circle.svg +1 -0
- package/dist/icon/svg/editor/minus.svg +1 -0
- package/dist/icon/svg/editor/modify-bold.svg +1 -0
- package/dist/icon/svg/editor/modify.svg +1 -0
- package/dist/icon/svg/editor/multiCreate.svg +1 -0
- package/dist/icon/svg/editor/mutiSelect-filled.svg +1 -0
- package/dist/icon/svg/editor/mutiSelect.svg +1 -0
- package/dist/icon/svg/editor/pause-filled.svg +1 -0
- package/dist/icon/svg/editor/play-filled.svg +1 -0
- package/dist/icon/svg/editor/plus-circle-filled.svg +1 -0
- package/dist/icon/svg/editor/plus-circle.svg +1 -0
- package/dist/icon/svg/editor/plus.svg +1 -0
- package/dist/icon/svg/editor/send.svg +1 -0
- package/dist/icon/svg/editor/subdivide.svg +1 -0
- package/dist/icon/svg/navigation/arrowDown-filled.svg +1 -0
- package/dist/icon/svg/navigation/arrowDown.svg +1 -0
- package/dist/icon/svg/navigation/arrowLeft-filled.svg +1 -0
- package/dist/icon/svg/navigation/arrowLeft.svg +1 -0
- package/dist/icon/svg/navigation/arrowRight-filled.svg +1 -0
- package/dist/icon/svg/navigation/arrowRight.svg +1 -0
- package/dist/icon/svg/navigation/arrowUp-filled.svg +1 -0
- package/dist/icon/svg/navigation/arrowUp.svg +1 -0
- package/dist/icon/svg/navigation/bottom-filled.svg +1 -0
- package/dist/icon/svg/navigation/bottom.svg +1 -0
- package/dist/icon/svg/navigation/doubleLeft-filled.svg +1 -0
- package/dist/icon/svg/navigation/doubleLeft.svg +1 -0
- package/dist/icon/svg/navigation/doubleRight-filled.svg +1 -0
- package/dist/icon/svg/navigation/doubleRight.svg +1 -0
- package/dist/icon/svg/navigation/down-bold.svg +1 -0
- package/dist/icon/svg/navigation/down-filled.svg +1 -0
- package/dist/icon/svg/navigation/down.svg +1 -0
- package/dist/icon/svg/navigation/fall-filled.svg +1 -0
- package/dist/icon/svg/navigation/fold.svg +1 -0
- package/dist/icon/svg/navigation/fullScreen.svg +1 -0
- package/dist/icon/svg/navigation/left-bold.svg +1 -0
- package/dist/icon/svg/navigation/left-filled.svg +1 -0
- package/dist/icon/svg/navigation/left.svg +1 -0
- package/dist/icon/svg/navigation/leftFirst-filled.svg +1 -0
- package/dist/icon/svg/navigation/leftFirst.svg +1 -0
- package/dist/icon/svg/navigation/logout.svg +1 -0
- package/dist/icon/svg/navigation/menu.svg +1 -0
- package/dist/icon/svg/navigation/menuLeft-bold.svg +1 -0
- package/dist/icon/svg/navigation/menuLeft.svg +1 -0
- package/dist/icon/svg/navigation/menuRight-bold.svg +1 -0
- package/dist/icon/svg/navigation/menuRight.svg +1 -0
- package/dist/icon/svg/navigation/more-vertical.svg +1 -0
- package/dist/icon/svg/navigation/more.svg +1 -0
- package/dist/icon/svg/navigation/pointerLeft-filled.svg +1 -0
- package/dist/icon/svg/navigation/pointerRight-filled.svg +1 -0
- package/dist/icon/svg/navigation/right-bold.svg +1 -0
- package/dist/icon/svg/navigation/right-filled.svg +1 -0
- package/dist/icon/svg/navigation/right.svg +1 -0
- package/dist/icon/svg/navigation/rightLast-filled.svg +1 -0
- package/dist/icon/svg/navigation/rightLast.svg +1 -0
- package/dist/icon/svg/navigation/rise-filled.svg +1 -0
- package/dist/icon/svg/navigation/top-filled.svg +1 -0
- package/dist/icon/svg/navigation/top.svg +1 -0
- package/dist/icon/svg/navigation/unfold-filled.svg +1 -0
- package/dist/icon/svg/navigation/unfold.svg +1 -0
- package/dist/icon/svg/navigation/up-bold.svg +1 -0
- package/dist/icon/svg/navigation/up-filled.svg +1 -0
- package/dist/icon/svg/navigation/up.svg +1 -0
- package/dist/icon/svg/product/AIFile.svg +1 -0
- package/dist/icon/svg/product/LandingPage.svg +1 -0
- package/dist/icon/svg/product/addressBook.svg +1 -0
- package/dist/icon/svg/product/alarmClock.svg +1 -0
- package/dist/icon/svg/product/asset-square.svg +1 -0
- package/dist/icon/svg/product/assetProtecting.svg +1 -0
- package/dist/icon/svg/product/autoAD-square-filled.svg +1 -0
- package/dist/icon/svg/product/card-distribute.svg +1 -0
- package/dist/icon/svg/product/channels-square-filled.svg +1 -0
- package/dist/icon/svg/product/channels.svg +1 -0
- package/dist/icon/svg/product/chart.svg +3 -0
- package/dist/icon/svg/product/chatBubble-filled.svg +1 -0
- package/dist/icon/svg/product/checkBadge.svg +1 -0
- package/dist/icon/svg/product/comments.svg +1 -0
- package/dist/icon/svg/product/container.svg +1 -0
- package/dist/icon/svg/product/dataAuth.svg +1 -0
- package/dist/icon/svg/product/dataBoard.svg +1 -0
- package/dist/icon/svg/product/dataBox.svg +1 -0
- package/dist/icon/svg/product/dataFolder.svg +1 -0
- package/dist/icon/svg/product/dataRising.svg +1 -0
- package/dist/icon/svg/product/detect.svg +1 -0
- package/dist/icon/svg/product/exposure-filled.svg +1 -0
- package/dist/icon/svg/product/extendedConfig.svg +1 -0
- package/dist/icon/svg/product/file-filled.svg +1 -0
- package/dist/icon/svg/product/flag.svg +1 -0
- package/dist/icon/svg/product/flame.svg +1 -0
- package/dist/icon/svg/product/folderZip.svg +1 -0
- package/dist/icon/svg/product/folderzip-bold.svg +1 -0
- package/dist/icon/svg/product/guideBook.svg +1 -0
- package/dist/icon/svg/product/hosting.svg +1 -0
- package/dist/icon/svg/product/icon-outlined.svg +1 -0
- package/dist/icon/svg/product/idea-bold.svg +1 -0
- package/dist/icon/svg/product/idea.svg +1 -0
- package/dist/icon/svg/product/image-bold.svg +1 -0
- package/dist/icon/svg/product/image-filled.svg +1 -0
- package/dist/icon/svg/product/image.svg +1 -0
- package/dist/icon/svg/product/images.svg +1 -0
- package/dist/icon/svg/product/keyword.svg +1 -0
- package/dist/icon/svg/product/linkSquare.svg +1 -0
- package/dist/icon/svg/product/lock.svg +1 -0
- package/dist/icon/svg/product/magic-filled.svg +1 -0
- package/dist/icon/svg/product/magic.svg +1 -0
- package/dist/icon/svg/product/miniProgram.svg +1 -0
- package/dist/icon/svg/product/minigame-filled.svg +1 -0
- package/dist/icon/svg/product/mobilePage.svg +1 -0
- package/dist/icon/svg/product/moments-filled.svg +1 -0
- package/dist/icon/svg/product/notepad-bold.svg +1 -0
- package/dist/icon/svg/product/notepad.svg +1 -0
- package/dist/icon/svg/product/offiaccount-filled.svg +1 -0
- package/dist/icon/svg/product/playing.svg +1 -0
- package/dist/icon/svg/product/qualification.svg +1 -0
- package/dist/icon/svg/product/quickFile.svg +1 -0
- package/dist/icon/svg/product/ringStruckture.svg +1 -0
- package/dist/icon/svg/product/searchAD-filled.svg +1 -0
- package/dist/icon/svg/product/searchAD.svg +1 -0
- package/dist/icon/svg/product/shield-filled.svg +1 -0
- package/dist/icon/svg/product/shield.svg +1 -0
- package/dist/icon/svg/product/shop.svg +1 -0
- package/dist/icon/svg/product/shopping.svg +1 -0
- package/dist/icon/svg/product/star-filled.svg +1 -0
- package/dist/icon/svg/product/star.svg +1 -0
- package/dist/icon/svg/product/support-bold.svg +1 -0
- package/dist/icon/svg/product/target.svg +1 -0
- package/dist/icon/svg/product/targeting.svg +1 -0
- package/dist/icon/svg/product/task-filled.svg +1 -0
- package/dist/icon/svg/product/task.svg +1 -0
- package/dist/icon/svg/product/template.svg +1 -0
- package/dist/icon/svg/product/templateBag.svg +1 -0
- package/dist/icon/svg/product/text.svg +1 -0
- package/dist/icon/svg/product/treeStructure.svg +1 -0
- package/dist/icon/svg/product/user-add.svg +3 -0
- package/dist/icon/svg/product/user-circle.svg +1 -0
- package/dist/icon/svg/product/user-edit.svg +1 -0
- package/dist/icon/svg/product/user-pack.svg +1 -0
- package/dist/icon/svg/product/userList.svg +1 -0
- package/dist/icon/svg/product/userPack.svg +1 -0
- package/dist/icon/svg/product/users-bold.svg +1 -0
- package/dist/icon/svg/product/users.svg +1 -0
- package/dist/icon/svg/product/videoBag-filled.svg +1 -0
- package/dist/icon/svg/product/viewMask.svg +1 -0
- package/dist/icon/svg/product/wallet.svg +1 -0
- package/dist/icon/svg/product/wechatBubble-filled.svg +1 -0
- package/dist/icon/svg/product/wechatBubble.svg +1 -0
- package/dist/icon/svg/product/wechatSearch.svg +1 -0
- package/dist/icon/svg/product/writing.svg +1 -0
- package/dist/icon/svg-data.d.ts +479 -0
- package/dist/icon/svg-data.js +481 -0
- package/dist/icon/test-icons.html +122 -0
- package/dist/icon/types.d.ts +3 -0
- package/dist/icon/types.js +5 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +57 -0
- package/dist/input/index.d.ts +82 -0
- package/dist/input/index.js +451 -0
- package/dist/input/style/index.css +244 -0
- package/dist/input/style/index.d.ts +2 -0
- package/dist/input/style/index.js +2 -0
- package/dist/input-number/index.d.ts +41 -0
- package/dist/input-number/index.js +431 -0
- package/dist/input-number/style/index.css +65 -0
- package/dist/input-number/style/index.d.ts +2 -0
- package/dist/input-number/style/index.js +2 -0
- package/dist/input-otp/index.d.ts +71 -0
- package/dist/input-otp/index.js +87 -0
- package/dist/input-otp/style/index.css +110 -0
- package/dist/input-otp/style/index.d.ts +2 -0
- package/dist/input-otp/style/index.js +2 -0
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.js +3 -0
- package/dist/layout/layout.d.ts +32 -0
- package/dist/layout/layout.js +203 -0
- package/dist/layout/mp-layout.d.ts +68 -0
- package/dist/layout/mp-layout.js +204 -0
- package/dist/layout/style/index.css +464 -0
- package/dist/layout/style/index.d.ts +2 -0
- package/dist/layout/style/index.js +2 -0
- package/dist/link/index.d.ts +37 -0
- package/dist/link/index.js +46 -0
- package/dist/link/style/index.css +39 -0
- package/dist/link/style/index.d.ts +2 -0
- package/dist/link/style/index.js +2 -0
- package/dist/loading/index.d.ts +11 -0
- package/dist/loading/index.js +46 -0
- package/dist/loading/style/index.css +84 -0
- package/dist/loading/style/index.d.ts +2 -0
- package/dist/loading/style/index.js +2 -0
- package/dist/message/MessageBase.d.ts +86 -0
- package/dist/message/MessageBase.js +395 -0
- package/dist/message/MessageReact16.d.ts +2 -0
- package/dist/message/MessageReact16.js +86 -0
- package/dist/message/MessageReact18.d.ts +2 -0
- package/dist/message/MessageReact18.js +98 -0
- package/dist/message/index.d.ts +3 -0
- package/dist/message/index.js +7 -0
- package/dist/message/style/index.css +121 -0
- package/dist/message/style/index.d.ts +2 -0
- package/dist/message/style/index.js +2 -0
- package/dist/modal-base/gap.d.ts +14 -0
- package/dist/modal-base/gap.js +31 -0
- package/dist/modal-base/index.d.ts +26 -0
- package/dist/modal-base/index.js +114 -0
- package/dist/number-flow/index.d.ts +13 -0
- package/dist/number-flow/index.js +25 -0
- package/dist/number-flow/style/index.css +1 -0
- package/dist/number-flow/style/index.d.ts +2 -0
- package/dist/number-flow/style/index.js +2 -0
- package/dist/pagination/index.d.ts +63 -0
- package/dist/pagination/index.js +424 -0
- package/dist/pagination/style/index.css +135 -0
- package/dist/pagination/style/index.d.ts +2 -0
- package/dist/pagination/style/index.js +2 -0
- package/dist/pop-base/index.d.ts +143 -0
- package/dist/pop-base/index.js +381 -0
- package/dist/pop-base/mergeProps.d.ts +37 -0
- package/dist/pop-base/mergeProps.js +144 -0
- package/dist/pop-base/style/index.css +123 -0
- package/dist/pop-base/style/index.d.ts +2 -0
- package/dist/pop-base/style/index.js +2 -0
- package/dist/pop-base/useForkRef.d.ts +5 -0
- package/dist/pop-base/useForkRef.js +52 -0
- package/dist/popover/index.d.ts +4 -0
- package/dist/popover/index.js +9 -0
- package/dist/radio/index.d.ts +35 -0
- package/dist/radio/index.js +77 -0
- package/dist/radio/primitive.d.ts +5 -0
- package/dist/radio/primitive.js +28 -0
- package/dist/radio/style/index.css +224 -0
- package/dist/radio/style/index.d.ts +2 -0
- package/dist/radio/style/index.js +2 -0
- package/dist/scroll-area/index.d.ts +29 -0
- package/dist/scroll-area/index.js +118 -0
- package/dist/scroll-area/style/index.css +107 -0
- package/dist/scroll-area/style/index.d.ts +2 -0
- package/dist/scroll-area/style/index.js +2 -0
- package/dist/select/index.d.ts +86 -0
- package/dist/select/index.js +275 -0
- package/dist/select/style/index.css +1473 -0
- package/dist/select/style/index.d.ts +2 -0
- package/dist/select/style/index.js +2 -0
- package/dist/select/useIcons.d.ts +25 -0
- package/dist/select/useIcons.js +80 -0
- package/dist/select/utils.d.ts +9 -0
- package/dist/select/utils.js +40 -0
- package/dist/slider/index.d.ts +69 -0
- package/dist/slider/index.js +264 -0
- package/dist/slider/style/index.css +210 -0
- package/dist/slider/style/index.d.ts +2 -0
- package/dist/slider/style/index.js +2 -0
- package/dist/style/base.css +296 -0
- package/dist/style/index.d.ts +7 -0
- package/dist/style/index.js +18 -0
- package/dist/style/theme-adui.css +352 -0
- package/dist/switch/index.d.ts +12 -0
- package/dist/switch/index.js +55 -0
- package/dist/switch/style/index.css +149 -0
- package/dist/switch/style/index.d.ts +2 -0
- package/dist/switch/style/index.js +2 -0
- package/dist/table/TableCellContent.d.ts +20 -0
- package/dist/table/TableCellContent.js +82 -0
- package/dist/table/index.d.ts +97 -0
- package/dist/table/index.js +796 -0
- package/dist/table/style/index.css +301 -0
- package/dist/table/style/index.d.ts +2 -0
- package/dist/table/style/index.js +2 -0
- package/dist/table/useSelection.d.ts +13 -0
- package/dist/table/useSelection.js +268 -0
- package/dist/tabs/index.d.ts +51 -0
- package/dist/tabs/index.js +697 -0
- package/dist/tabs/style/index.css +305 -0
- package/dist/tabs/style/index.d.ts +2 -0
- package/dist/tabs/style/index.js +2 -0
- package/dist/text-swap/index.d.ts +58 -0
- package/dist/text-swap/index.js +280 -0
- package/dist/text-swap/style/index.css +29 -0
- package/dist/text-swap/style/index.d.ts +2 -0
- package/dist/text-swap/style/index.js +2 -0
- package/dist/time-picker/index.d.ts +67 -0
- package/dist/time-picker/index.js +945 -0
- package/dist/time-picker/style/index.css +153 -0
- package/dist/time-picker/style/index.d.ts +2 -0
- package/dist/time-picker/style/index.js +2 -0
- package/dist/tooltip/index.d.ts +10 -0
- package/dist/tooltip/index.js +178 -0
- package/dist/tree-select/index.d.ts +25 -0
- package/dist/tree-select/index.js +140 -0
- package/dist/tree-select/style/index.css +180 -0
- package/dist/tree-select/style/index.d.ts +1 -0
- package/dist/tree-select/style/index.js +1 -0
- package/dist/virtual-list/index.d.ts +98 -0
- package/dist/virtual-list/index.js +56 -0
- package/dist/virtual-list/style/index.css +9 -0
- package/dist/virtual-list/style/index.d.ts +2 -0
- package/dist/virtual-list/style/index.js +2 -0
- package/package.json +132 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
html {
|
|
2
|
+
--odn-otp-padding-block-medium: 6px;
|
|
3
|
+
--odn-otp-width-medium: 30px;
|
|
4
|
+
--odn-otp-font-size-medium: 14px;
|
|
5
|
+
--odn-otp-line-height-medium: 1.5714285714285714;
|
|
6
|
+
--odn-otp-border-radius-medium: 6px;
|
|
7
|
+
--odn-otp-icon-size-medium: 16px;
|
|
8
|
+
--odn-otp-icon-margin-inline-medium: 4px;
|
|
9
|
+
--odn-otp-padding-block-small: 4px;
|
|
10
|
+
--odn-otp-width-small: 24px;
|
|
11
|
+
--odn-otp-font-size-small: 12px;
|
|
12
|
+
--odn-otp-line-height-small: 1.6666666666666667;
|
|
13
|
+
--odn-otp-border-radius-small: 6px;
|
|
14
|
+
--odn-otp-icon-size-small: 14px;
|
|
15
|
+
--odn-otp-icon-margin-inline-small: 4px;
|
|
16
|
+
--odn-otp-padding-block-large: 8px;
|
|
17
|
+
--odn-otp-width-large: 36px;
|
|
18
|
+
--odn-otp-font-size-large: 16px;
|
|
19
|
+
--odn-otp-line-height-large: 1.5;
|
|
20
|
+
--odn-otp-border-radius-large: 6px;
|
|
21
|
+
--odn-otp-icon-size-large: 18px;
|
|
22
|
+
--odn-otp-icon-margin-inline-large: 4px;
|
|
23
|
+
--odn-otp-bg-normal: #fff;
|
|
24
|
+
--odn-otp-bg-normal-hover: var(--odn-color-black-1);
|
|
25
|
+
--odn-otp-bg-normal-focus: #fff;
|
|
26
|
+
--odn-otp-bg-disabled: var(--odn-color-black-3);
|
|
27
|
+
--odn-otp-color-normal: var(--odn-color-black-12);
|
|
28
|
+
--odn-otp-color-normal-hover: var(--odn-color-black-12);
|
|
29
|
+
--odn-otp-color-normal-focus: var(--odn-color-black-12);
|
|
30
|
+
--odn-otp-color-disabled: var(--odn-color-black-8);
|
|
31
|
+
--odn-otp-border-normal: 1px solid var(--odn-color-black-6);
|
|
32
|
+
--odn-otp-border-normal-hover: 1px solid var(--odn-color-black-7);
|
|
33
|
+
--odn-otp-border-normal-focus: 1px solid var(--odn-color-blue-6);
|
|
34
|
+
--odn-otp-border-disabled: 1px solid var(--odn-color-black-6);
|
|
35
|
+
--odn-otp-shadow-normal: none;
|
|
36
|
+
--odn-otp-shadow-normal-hover: none;
|
|
37
|
+
--odn-otp-shadow-normal-focus: 0 0 0 2px var(--odn-color-blue-2);
|
|
38
|
+
--odn-otp-shadow-disabled: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@layer components {
|
|
42
|
+
[data-odn-otp-root] {
|
|
43
|
+
display: flex;
|
|
44
|
+
gap: 8px;
|
|
45
|
+
flex-wrap: nowrap;
|
|
46
|
+
}
|
|
47
|
+
[data-odn-otp-input] {
|
|
48
|
+
text-align: center;
|
|
49
|
+
position: relative;
|
|
50
|
+
min-width: 0;
|
|
51
|
+
font-size: inherit;
|
|
52
|
+
border: none;
|
|
53
|
+
border-radius: 0;
|
|
54
|
+
outline: none;
|
|
55
|
+
background: transparent;
|
|
56
|
+
color: inherit;
|
|
57
|
+
}
|
|
58
|
+
[data-odn-otp-input-disabled=true] {
|
|
59
|
+
color: var(--odn-otp-color-disabled);
|
|
60
|
+
background: var(--odn-otp-bg-disabled);
|
|
61
|
+
border: var(--odn-otp-border-disabled);
|
|
62
|
+
box-shadow: var(--odn-otp-shadow-disabled);
|
|
63
|
+
cursor: not-allowed;
|
|
64
|
+
}
|
|
65
|
+
[data-odn-otp-input-disabled=true] [data-odn-otp] {
|
|
66
|
+
cursor: not-allowed;
|
|
67
|
+
}
|
|
68
|
+
[data-odn-otp-input-size=small] {
|
|
69
|
+
padding: var(--odn-otp-padding-block-small) 0;
|
|
70
|
+
width: var(--odn-otp-width-small);
|
|
71
|
+
font-size: var(--odn-otp-font-size-small);
|
|
72
|
+
line-height: var(--odn-otp-line-height-small);
|
|
73
|
+
border-radius: var(--odn-otp-border-radius-small);
|
|
74
|
+
}
|
|
75
|
+
[data-odn-otp-input-size=medium] {
|
|
76
|
+
padding: var(--odn-otp-padding-block-medium) 0;
|
|
77
|
+
width: var(--odn-otp-width-medium);
|
|
78
|
+
font-size: var(--odn-otp-font-size-medium);
|
|
79
|
+
line-height: var(--odn-otp-line-height-medium);
|
|
80
|
+
border-radius: var(--odn-otp-border-radius-medium);
|
|
81
|
+
}
|
|
82
|
+
[data-odn-otp-input-size=large] {
|
|
83
|
+
padding: var(--odn-otp-padding-block-large) 0;
|
|
84
|
+
width: var(--odn-otp-width-large);
|
|
85
|
+
font-size: var(--odn-otp-font-size-large);
|
|
86
|
+
line-height: var(--odn-otp-line-height-large);
|
|
87
|
+
border-radius: var(--odn-otp-border-radius-large);
|
|
88
|
+
}
|
|
89
|
+
[data-odn-otp-input-intent=normal]:not([data-odn-otp-input-disabled=true]) {
|
|
90
|
+
color: var(--odn-otp-color-normal);
|
|
91
|
+
background: var(--odn-otp-bg-normal);
|
|
92
|
+
border: var(--odn-otp-border-normal);
|
|
93
|
+
box-shadow: var(--odn-otp-shadow-normal);
|
|
94
|
+
}
|
|
95
|
+
[data-odn-otp-input-intent=normal]:not([data-odn-otp-input-disabled=true]):hover {
|
|
96
|
+
color: var(--odn-otp-color-normal-hover);
|
|
97
|
+
background: var(--odn-otp-bg-normal-hover);
|
|
98
|
+
border: var(--odn-otp-border-normal-hover);
|
|
99
|
+
box-shadow: var(--odn-otp-shadow-normal-hover);
|
|
100
|
+
}
|
|
101
|
+
[data-odn-otp-input-intent=normal]:not([data-odn-otp-input-disabled=true]):focus {
|
|
102
|
+
color: var(--odn-otp-color-normal-focus);
|
|
103
|
+
background: var(--odn-otp-bg-normal-focus);
|
|
104
|
+
border: var(--odn-otp-border-normal-focus);
|
|
105
|
+
box-shadow: var(--odn-otp-shadow-normal-focus);
|
|
106
|
+
}
|
|
107
|
+
[data-odn-otp-input-intent=normal]:not([data-odn-otp-input-disabled=true])::selection {
|
|
108
|
+
background: var(--odn-otp-bg-normal-selection);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type RuyiMenuItem = {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
badge?: string;
|
|
7
|
+
children?: RuyiMenuItem[];
|
|
8
|
+
};
|
|
9
|
+
export type RuyiLayoutProps = {
|
|
10
|
+
navItems?: string[];
|
|
11
|
+
activeNav?: string;
|
|
12
|
+
onNavChange?: (nav: string) => void;
|
|
13
|
+
menuItems: RuyiMenuItem[];
|
|
14
|
+
activeMenu: string;
|
|
15
|
+
onMenuChange: (key: string) => void;
|
|
16
|
+
/** 顶栏右侧自定义内容,默认渲染标准按钮组 */
|
|
17
|
+
headerRight?: React.ReactNode;
|
|
18
|
+
/** 账号名称,如 "香奈儿/Chanel-美妆护肤" */
|
|
19
|
+
accountName?: string;
|
|
20
|
+
/** 账号 ID */
|
|
21
|
+
accountId?: string;
|
|
22
|
+
/** 是否显示侧边栏收起按钮 */
|
|
23
|
+
collapsible?: boolean;
|
|
24
|
+
/** 外层容器 className */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** body 区域(header 下方)className */
|
|
27
|
+
bodyClassName?: string;
|
|
28
|
+
/** 内容区 className */
|
|
29
|
+
contentClassName?: string;
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
export declare function RuyiLayout({ navItems, activeNav, onNavChange, menuItems, activeMenu, onMenuChange, headerRight, accountName, accountId, collapsible, className, bodyClassName, contentClassName, children, }: RuyiLayoutProps): React.JSX.Element;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
import React, { useState } from 'react';
|
|
16
|
+
import Button from "../button";
|
|
17
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../collapse";
|
|
18
|
+
import HoverFill from "../hover-fill";
|
|
19
|
+
import Icon from "../icon";
|
|
20
|
+
import ScrollArea from "../scroll-area";
|
|
21
|
+
var DEFAULT_NAV = ['首页', '洞察诊断', '人群策略', '策略应用', '全域度量', '数据工厂'];
|
|
22
|
+
var RUYI_LOGO = 'https://dmp.gdtimg.com/static/dmp-web/test/images/ruyi-logo.aed6102a.svg';
|
|
23
|
+
export function RuyiLayout(_ref) {
|
|
24
|
+
var _ref$navItems = _ref.navItems,
|
|
25
|
+
navItems = _ref$navItems === void 0 ? DEFAULT_NAV : _ref$navItems,
|
|
26
|
+
activeNav = _ref.activeNav,
|
|
27
|
+
onNavChange = _ref.onNavChange,
|
|
28
|
+
menuItems = _ref.menuItems,
|
|
29
|
+
activeMenu = _ref.activeMenu,
|
|
30
|
+
onMenuChange = _ref.onMenuChange,
|
|
31
|
+
headerRight = _ref.headerRight,
|
|
32
|
+
_ref$accountName = _ref.accountName,
|
|
33
|
+
accountName = _ref$accountName === void 0 ? '品牌名 – 行业' : _ref$accountName,
|
|
34
|
+
_ref$accountId = _ref.accountId,
|
|
35
|
+
accountId = _ref$accountId === void 0 ? '00000' : _ref$accountId,
|
|
36
|
+
_ref$collapsible = _ref.collapsible,
|
|
37
|
+
collapsible = _ref$collapsible === void 0 ? false : _ref$collapsible,
|
|
38
|
+
className = _ref.className,
|
|
39
|
+
bodyClassName = _ref.bodyClassName,
|
|
40
|
+
contentClassName = _ref.contentClassName,
|
|
41
|
+
children = _ref.children;
|
|
42
|
+
var _useState = useState(function () {
|
|
43
|
+
return Object.fromEntries(menuItems.map(function (g) {
|
|
44
|
+
return [g.key, true];
|
|
45
|
+
}));
|
|
46
|
+
}),
|
|
47
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
+
expandedGroups = _useState2[0],
|
|
49
|
+
setExpandedGroups = _useState2[1];
|
|
50
|
+
var _useState3 = useState(false),
|
|
51
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
52
|
+
collapsed = _useState4[0],
|
|
53
|
+
setCollapsed = _useState4[1];
|
|
54
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
"data-odn-ruyi-layout": true,
|
|
56
|
+
className: className
|
|
57
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
"data-odn-ruyi-layout-header": true
|
|
59
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
"data-odn-ruyi-layout-header-left": true
|
|
61
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
"data-odn-ruyi-layout-logo": true,
|
|
63
|
+
style: {
|
|
64
|
+
backgroundImage: "url(".concat(RUYI_LOGO, ")")
|
|
65
|
+
}
|
|
66
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
"data-odn-ruyi-layout-nav": true
|
|
68
|
+
}, navItems.map(function (label) {
|
|
69
|
+
var isActive = activeNav === label;
|
|
70
|
+
return /*#__PURE__*/React.createElement(HoverFill, {
|
|
71
|
+
key: label,
|
|
72
|
+
bgStyle: {
|
|
73
|
+
borderRadius: 8
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
"data-odn-ruyi-layout-nav-item": true,
|
|
77
|
+
"data-active": isActive || undefined,
|
|
78
|
+
style: {
|
|
79
|
+
transition: 'text-shadow 0.3s',
|
|
80
|
+
textShadow: isActive ? '-0.2px 0 0 currentColor, 0.2px 0 0 currentColor, 0 -0.2px 0 currentColor, 0 0.2px 0 currentColor' : 'none'
|
|
81
|
+
},
|
|
82
|
+
onClick: function onClick() {
|
|
83
|
+
return onNavChange === null || onNavChange === void 0 ? void 0 : onNavChange(label);
|
|
84
|
+
}
|
|
85
|
+
}, label));
|
|
86
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
"data-odn-ruyi-layout-header-right": true
|
|
88
|
+
}, headerRight !== null && headerRight !== void 0 ? headerRight : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
89
|
+
light: true,
|
|
90
|
+
icon: "code"
|
|
91
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
92
|
+
light: true,
|
|
93
|
+
icon: "user-pack"
|
|
94
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
95
|
+
light: true,
|
|
96
|
+
icon: "bell"
|
|
97
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
98
|
+
light: true,
|
|
99
|
+
icon: "help-circle"
|
|
100
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
101
|
+
light: true,
|
|
102
|
+
icon: "setting"
|
|
103
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
"data-odn-ruyi-layout-divider": true
|
|
105
|
+
}), /*#__PURE__*/React.createElement(HoverFill, {
|
|
106
|
+
bgStyle: {
|
|
107
|
+
borderRadius: 8
|
|
108
|
+
}
|
|
109
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
"data-odn-ruyi-layout-account": true
|
|
111
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
"data-odn-ruyi-layout-account-name": true
|
|
113
|
+
}, accountName), /*#__PURE__*/React.createElement("div", {
|
|
114
|
+
"data-odn-ruyi-layout-account-id": true
|
|
115
|
+
}, "ID: ", accountId)), /*#__PURE__*/React.createElement(Icon, {
|
|
116
|
+
name: "down-filled"
|
|
117
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
118
|
+
"data-odn-ruyi-layout-body": true,
|
|
119
|
+
className: bodyClassName
|
|
120
|
+
}, !collapsed && /*#__PURE__*/React.createElement(ScrollArea, {
|
|
121
|
+
"data-odn-ruyi-layout-sidebar": true
|
|
122
|
+
}, menuItems.map(function (group) {
|
|
123
|
+
var _group$children2;
|
|
124
|
+
return /*#__PURE__*/React.createElement(Collapsible, {
|
|
125
|
+
key: group.key,
|
|
126
|
+
open: expandedGroups[group.key],
|
|
127
|
+
onOpenChange: function onOpenChange(open) {
|
|
128
|
+
return setExpandedGroups(function (prev) {
|
|
129
|
+
return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, group.key, open));
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}, /*#__PURE__*/React.createElement(CollapsibleTrigger, {
|
|
133
|
+
asChild: true
|
|
134
|
+
}, function (_ref2) {
|
|
135
|
+
var _group$children;
|
|
136
|
+
var isOpen = _ref2.isOpen;
|
|
137
|
+
var groupActive = !isOpen && ((_group$children = group.children) === null || _group$children === void 0 ? void 0 : _group$children.some(function (c) {
|
|
138
|
+
return c.key === activeMenu;
|
|
139
|
+
}));
|
|
140
|
+
return /*#__PURE__*/React.createElement(HoverFill, {
|
|
141
|
+
bgStyle: {
|
|
142
|
+
borderRadius: 36
|
|
143
|
+
}
|
|
144
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
"data-odn-ruyi-layout-menu-group": true,
|
|
146
|
+
"data-active": groupActive || undefined
|
|
147
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
148
|
+
"data-odn-ruyi-layout-menu-group-left": true
|
|
149
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
150
|
+
name: group.icon,
|
|
151
|
+
color: groupActive ? 'var(--odn-color-blue-6)' : undefined
|
|
152
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
"data-odn-ruyi-layout-menu-group-label": true
|
|
154
|
+
}, group.label)), /*#__PURE__*/React.createElement(Icon, {
|
|
155
|
+
name: "up",
|
|
156
|
+
"data-odn-ruyi-layout-menu-arrow": true,
|
|
157
|
+
"data-collapsed": !isOpen || undefined,
|
|
158
|
+
color: groupActive ? 'var(--odn-color-blue-6)' : undefined
|
|
159
|
+
})));
|
|
160
|
+
}), /*#__PURE__*/React.createElement(CollapsibleContent, null, /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
"data-odn-ruyi-layout-menu-children": true
|
|
162
|
+
}, (_group$children2 = group.children) === null || _group$children2 === void 0 ? void 0 : _group$children2.map(function (child) {
|
|
163
|
+
var isActive = activeMenu === child.key;
|
|
164
|
+
return /*#__PURE__*/React.createElement(HoverFill, {
|
|
165
|
+
key: child.key,
|
|
166
|
+
"data-odn-ruyi-layout-menu-item-wrapper": true,
|
|
167
|
+
bgStyle: {
|
|
168
|
+
borderRadius: 30
|
|
169
|
+
}
|
|
170
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
171
|
+
"data-odn-ruyi-layout-menu-item": true,
|
|
172
|
+
"data-active": isActive || undefined,
|
|
173
|
+
onClick: function onClick() {
|
|
174
|
+
return onMenuChange(child.key);
|
|
175
|
+
}
|
|
176
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
177
|
+
"data-odn-ruyi-layout-menu-item-label": true
|
|
178
|
+
}, child.label), child.badge && /*#__PURE__*/React.createElement("div", {
|
|
179
|
+
"data-odn-ruyi-layout-badge": true
|
|
180
|
+
}, child.badge)));
|
|
181
|
+
}))));
|
|
182
|
+
}), collapsible && /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
"data-odn-ruyi-layout-collapse-section": true
|
|
184
|
+
}, /*#__PURE__*/React.createElement(HoverFill, {
|
|
185
|
+
bgStyle: {
|
|
186
|
+
borderRadius: 36
|
|
187
|
+
}
|
|
188
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
189
|
+
"data-odn-ruyi-layout-collapse-btn": true,
|
|
190
|
+
onClick: function onClick() {
|
|
191
|
+
return setCollapsed(true);
|
|
192
|
+
}
|
|
193
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
194
|
+
name: "menu"
|
|
195
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
196
|
+
"data-odn-ruyi-layout-collapse-btn-text": true
|
|
197
|
+
}, "\u6536\u8D77"))))), /*#__PURE__*/React.createElement(ScrollArea, {
|
|
198
|
+
"data-odn-ruyi-layout-content": true,
|
|
199
|
+
"data-sidebar-collapsed": collapsed || undefined
|
|
200
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
201
|
+
className: contentClassName
|
|
202
|
+
}, children))));
|
|
203
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type MpMenuItem = {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
children?: Omit<MpMenuItem, 'icon' | 'children'>[];
|
|
7
|
+
};
|
|
8
|
+
export type MpTabItem = {
|
|
9
|
+
value: string;
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export type MpSubTab = {
|
|
13
|
+
key: string;
|
|
14
|
+
label: string;
|
|
15
|
+
href?: string;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
};
|
|
18
|
+
export type MpLayoutProps = {
|
|
19
|
+
/** Logo 区域,默认为小程序 SVG logo */
|
|
20
|
+
logo?: React.ReactNode;
|
|
21
|
+
/** 顶栏导航链接(文档、社区等) */
|
|
22
|
+
navLinks?: {
|
|
23
|
+
label: string;
|
|
24
|
+
href?: string;
|
|
25
|
+
active?: boolean;
|
|
26
|
+
}[];
|
|
27
|
+
/** 工具下拉菜单项 */
|
|
28
|
+
toolItems?: {
|
|
29
|
+
label: string;
|
|
30
|
+
href?: string;
|
|
31
|
+
}[];
|
|
32
|
+
/** 用户头像 URL */
|
|
33
|
+
avatarUrl?: string;
|
|
34
|
+
/** 用户名 */
|
|
35
|
+
userName?: string;
|
|
36
|
+
/** 退出回调 */
|
|
37
|
+
onLogout?: () => void;
|
|
38
|
+
/** 自定义整个顶栏右侧区域 */
|
|
39
|
+
headerRight?: React.ReactNode;
|
|
40
|
+
/** 侧边栏菜单 */
|
|
41
|
+
menuItems: MpMenuItem[];
|
|
42
|
+
/** 当前激活的菜单项 key */
|
|
43
|
+
activeMenu: string;
|
|
44
|
+
/** 菜单切换回调 */
|
|
45
|
+
onMenuChange: (key: string) => void;
|
|
46
|
+
/** 页面标题 */
|
|
47
|
+
pageTitle?: string;
|
|
48
|
+
/** 主标签页 */
|
|
49
|
+
tabs?: MpTabItem[];
|
|
50
|
+
/** 当前激活的标签页 */
|
|
51
|
+
activeTab?: string;
|
|
52
|
+
/** 标签页切换回调 */
|
|
53
|
+
onTabChange?: (value: string) => void;
|
|
54
|
+
/** 子标签页(标签页下方的链接行) */
|
|
55
|
+
subTabs?: MpSubTab[];
|
|
56
|
+
/** 当前激活的子标签页 key */
|
|
57
|
+
activeSubTab?: string;
|
|
58
|
+
/** 子标签页切换回调 */
|
|
59
|
+
onSubTabChange?: (key: string) => void;
|
|
60
|
+
/** 外层容器 className */
|
|
61
|
+
className?: string;
|
|
62
|
+
/** 侧边栏 className */
|
|
63
|
+
sidebarClassName?: string;
|
|
64
|
+
/** 内容区 className */
|
|
65
|
+
contentClassName?: string;
|
|
66
|
+
children: React.ReactNode;
|
|
67
|
+
};
|
|
68
|
+
export declare function MpLayout({ logo, navLinks, toolItems, avatarUrl, userName, onLogout, headerRight, menuItems, activeMenu, onMenuChange, pageTitle, tabs, activeTab, onTabChange, subTabs, activeSubTab, onSubTabChange, className, sidebarClassName, contentClassName, children, }: MpLayoutProps): React.JSX.Element;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Icon from "../icon";
|
|
5
|
+
import Tabs from "../tabs";
|
|
6
|
+
var MP_LOGO_URL = "data:image/svg+xml;charset=UTF-8,%3csvg version='1.1' xmlns='http://www.w3.org/2000/svg' x='0' y='0' viewBox='0 0 185.4 47' xml:space='preserve'%3e%3cstyle%3e.st1%7bfill:%235e5e5e%7d%3c/style%3e%3cpath d='M50.4 20c-1.8 3-4.8 5.3-8.5 6.3-.1 0-.2.1-.3.1-.6.2-1.1.3-1.7.3-2.5 0-3.9-1.7-3.2-3.8.6-1.5 2-2.8 3.8-3.4 2.8-1 4.7-3.3 4.7-6 0-3.6-3.5-6.5-7.8-6.5s-7.8 2.9-7.8 6.5v20c0 4.8-2.8 9-7 11.4-2.3 1.3-5 2.1-7.8 2.1C6.6 47 0 40.9 0 33.5c0-2.4.7-4.6 1.9-6.5 1.8-3 4.9-5.3 8.5-6.3.6-.2 1.3-.3 1.9-.3 2.5 0 3.9 1.7 3.2 3.8-.5 1.4-1.9 2.6-3.5 3.3-.2.1-.4.1-.6.2-2.7 1-4.4 3.2-4.4 5.8 0 3.6 3.5 6.5 7.8 6.5s7.8-2.9 7.8-6.5v-20c0-4.8 2.8-9 7-11.4C31.9.8 34.6 0 37.4 0c8.2 0 14.8 6.1 14.8 13.5 0 2.4-.7 4.6-1.8 6.5z' fill='%236467ef'/%3e%3cpath class='st1' d='M172.2 9.9c-.7-1.4-1.6-3.3-2.1-4.3l-2.9.9 1.7 3.3h-14.5v12.4c0 8.4-.6 12.2-4 17.7l2.6 1.4c3.5-6 4.3-9.7 4.3-19.3v-9.4h28.1V9.9h-13.2z'/%3e%3cpath class='st1' d='M173.8 25.1l-.5-.3c2.6-1.6 8-5.1 9.5-6.1V16h-22.6v2.6h18.1c-1.5 1-5.1 3.3-7.3 4.6-2.1-1.4-4.4-3-5.9-3.9l-1.8 1.9c1.6 1.1 4.4 2.9 6.7 4.4h-11.7v2.7h11.9V36c0 2.1-.5 2.4-3 2.4h-4.5l.5 2.7h4.5c3.9 0 5.3-.9 5.3-4.5v-8.3h8.6l-3.4 5.5 2.6 1.1 3.8-6.7v-2.6H173l.8-.5zM142.2 8.4h-17.5v10.4h17.5V8.4zm-2.9 8h-11.9V11h11.9v5.4zM123.8 28.6c-1.2-1.5-3.7-4.3-4.7-5.4l-1.1 1V20h5v-2.8h-5v-5.8c1.9-.4 3.8-.8 5.3-1.2l-.6-2.7c-3.5 1-9.1 2-12.6 2.5l.3 2.7c1.4-.2 3.2-.5 5-.8v5.3H110V20h5.2c-1.2 3.9-3.3 8.3-5.9 12l1.7 2.4c1.7-2.5 3.2-5.5 4.4-8.5v15.5h2.6V25.6c1.2 1.4 2.9 3.5 3.8 4.7l2-1.7z'/%3e%3cpath class='st1' d='M134.8 32.2h8v-2.6h-8v-4.5h9v-2.6h-20.4v2.6h8.6v4.5h-8v2.6h8v4.4h-10.7v2.8H145v-2.8h-10.2z'/%3e%3cg%3e%3cpath class='st1' d='M92.4 14.5c2.4 5.1 6.9 15.1 8.9 20.3l3.1-1.3c-2-4.8-6.9-15.5-9.2-20.2l-2.8 1.2zM75.6 13.5c-1.3 5.9-4.4 14-7.5 19.6l2.8 1.4c3.1-5.8 6.1-13.7 7.7-20.3l-3-.7zM84.9 34c0 2.6-.4 3.2-3.2 3.2h-4.9l.7 3.1h5c4.4 0 5.6-1.2 5.6-5.4V6.8H85L84.9 34z'/%3e%3c/g%3e%3c/svg%3e";
|
|
7
|
+
export function MpLayout(_ref) {
|
|
8
|
+
var logo = _ref.logo,
|
|
9
|
+
_ref$navLinks = _ref.navLinks,
|
|
10
|
+
navLinks = _ref$navLinks === void 0 ? [{
|
|
11
|
+
label: '文档',
|
|
12
|
+
href: 'https://developers.weixin.qq.com/miniprogram/dev/framework/'
|
|
13
|
+
}, {
|
|
14
|
+
label: '社区',
|
|
15
|
+
href: 'https://developers.weixin.qq.com/'
|
|
16
|
+
}] : _ref$navLinks,
|
|
17
|
+
_ref$toolItems = _ref.toolItems,
|
|
18
|
+
toolItems = _ref$toolItems === void 0 ? [{
|
|
19
|
+
label: '生成小程序码'
|
|
20
|
+
}] : _ref$toolItems,
|
|
21
|
+
avatarUrl = _ref.avatarUrl,
|
|
22
|
+
_ref$userName = _ref.userName,
|
|
23
|
+
userName = _ref$userName === void 0 ? '账号名称' : _ref$userName,
|
|
24
|
+
onLogout = _ref.onLogout,
|
|
25
|
+
headerRight = _ref.headerRight,
|
|
26
|
+
menuItems = _ref.menuItems,
|
|
27
|
+
activeMenu = _ref.activeMenu,
|
|
28
|
+
onMenuChange = _ref.onMenuChange,
|
|
29
|
+
pageTitle = _ref.pageTitle,
|
|
30
|
+
tabs = _ref.tabs,
|
|
31
|
+
activeTab = _ref.activeTab,
|
|
32
|
+
onTabChange = _ref.onTabChange,
|
|
33
|
+
subTabs = _ref.subTabs,
|
|
34
|
+
activeSubTab = _ref.activeSubTab,
|
|
35
|
+
onSubTabChange = _ref.onSubTabChange,
|
|
36
|
+
className = _ref.className,
|
|
37
|
+
sidebarClassName = _ref.sidebarClassName,
|
|
38
|
+
contentClassName = _ref.contentClassName,
|
|
39
|
+
children = _ref.children;
|
|
40
|
+
var isMenuActive = function isMenuActive(item) {
|
|
41
|
+
var _item$children$some, _item$children;
|
|
42
|
+
if (item.key === activeMenu) return true;
|
|
43
|
+
return (_item$children$some = (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.some(function (c) {
|
|
44
|
+
return c.key === activeMenu;
|
|
45
|
+
})) !== null && _item$children$some !== void 0 ? _item$children$some : false;
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
"data-odn-mp-layout": true,
|
|
49
|
+
className: className
|
|
50
|
+
}, /*#__PURE__*/React.createElement("header", {
|
|
51
|
+
"data-odn-mp-layout-header": true
|
|
52
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
53
|
+
"data-odn-mp-layout-logo-wrapper": true
|
|
54
|
+
}, logo !== null && logo !== void 0 ? logo : /*#__PURE__*/React.createElement("a", {
|
|
55
|
+
href: "/",
|
|
56
|
+
title: "\u5FAE\u4FE1\u516C\u4F17\u5E73\u53F0 \u5C0F\u7A0B\u5E8F",
|
|
57
|
+
"data-odn-mp-layout-logo": true,
|
|
58
|
+
style: {
|
|
59
|
+
backgroundImage: "url(\"".concat(MP_LOGO_URL, "\")"),
|
|
60
|
+
backgroundSize: 'contain'
|
|
61
|
+
}
|
|
62
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
"data-odn-mp-layout-header-controls": true
|
|
64
|
+
}, headerRight !== null && headerRight !== void 0 ? headerRight : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("ul", {
|
|
65
|
+
"data-odn-mp-layout-nav": true
|
|
66
|
+
}, navLinks.map(function (link) {
|
|
67
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
68
|
+
key: link.label,
|
|
69
|
+
"data-odn-mp-layout-nav-item": true,
|
|
70
|
+
"data-active": link.active || undefined
|
|
71
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
72
|
+
href: link.href,
|
|
73
|
+
target: link.href ? '_blank' : undefined,
|
|
74
|
+
rel: link.href ? 'noopener noreferrer' : undefined,
|
|
75
|
+
"data-odn-mp-layout-nav-link": true
|
|
76
|
+
}, link.label));
|
|
77
|
+
})), toolItems.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
"data-odn-mp-layout-tools": true
|
|
79
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
80
|
+
"data-odn-mp-layout-tools-trigger": true
|
|
81
|
+
}, "\u5DE5\u5177")), /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
"data-odn-mp-layout-bell": true
|
|
83
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
84
|
+
"data-odn-mp-layout-bell-link": true
|
|
85
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
86
|
+
name: "bell",
|
|
87
|
+
"data-odn-mp-layout-bell-icon": true
|
|
88
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
"data-odn-mp-layout-user": true
|
|
90
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
91
|
+
"data-odn-mp-layout-user-trigger": true
|
|
92
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
93
|
+
"data-odn-mp-layout-avatar": true,
|
|
94
|
+
src: avatarUrl,
|
|
95
|
+
alt: ""
|
|
96
|
+
}), /*#__PURE__*/React.createElement(Icon, {
|
|
97
|
+
name: "down",
|
|
98
|
+
"data-odn-mp-layout-user-arrow": true
|
|
99
|
+
})))))), /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
"data-odn-mp-layout-body": true
|
|
101
|
+
}, /*#__PURE__*/React.createElement("nav", {
|
|
102
|
+
"data-odn-mp-layout-sidebar": true,
|
|
103
|
+
className: sidebarClassName
|
|
104
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
"data-odn-mp-layout-menu": true
|
|
106
|
+
}, menuItems.map(function (group, groupIndex) {
|
|
107
|
+
var _group$children, _group$children2;
|
|
108
|
+
var isLastGroup = groupIndex === menuItems.length - 1;
|
|
109
|
+
if (!((_group$children = group.children) !== null && _group$children !== void 0 && _group$children.length)) {
|
|
110
|
+
var active = group.key === activeMenu;
|
|
111
|
+
return /*#__PURE__*/React.createElement("dl", {
|
|
112
|
+
key: group.key,
|
|
113
|
+
"data-odn-mp-layout-menu-group": true
|
|
114
|
+
}, /*#__PURE__*/React.createElement("dt", {
|
|
115
|
+
"data-odn-mp-layout-menu-group-title": true,
|
|
116
|
+
"data-active": active || undefined,
|
|
117
|
+
"data-clickable": true,
|
|
118
|
+
onClick: function onClick() {
|
|
119
|
+
return onMenuChange(group.key);
|
|
120
|
+
}
|
|
121
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
122
|
+
"data-odn-mp-layout-menu-group-link": true,
|
|
123
|
+
"data-active": active || undefined
|
|
124
|
+
}, group.icon && /*#__PURE__*/React.createElement("span", {
|
|
125
|
+
"data-odn-mp-layout-menu-icon": true
|
|
126
|
+
}, group.icon), /*#__PURE__*/React.createElement("span", {
|
|
127
|
+
"data-odn-mp-layout-menu-label": true
|
|
128
|
+
}, group.label))), !isLastGroup && /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
"data-odn-mp-layout-separator": true
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
132
|
+
return /*#__PURE__*/React.createElement("dl", {
|
|
133
|
+
key: group.key,
|
|
134
|
+
"data-odn-mp-layout-menu-group": true
|
|
135
|
+
}, /*#__PURE__*/React.createElement("dt", {
|
|
136
|
+
"data-odn-mp-layout-menu-group-title": true,
|
|
137
|
+
"data-has-children": true
|
|
138
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
139
|
+
"data-odn-mp-layout-menu-group-link": true
|
|
140
|
+
}, group.icon && /*#__PURE__*/React.createElement("span", {
|
|
141
|
+
"data-odn-mp-layout-menu-icon": true
|
|
142
|
+
}, group.icon), /*#__PURE__*/React.createElement("span", {
|
|
143
|
+
"data-odn-mp-layout-menu-label": true
|
|
144
|
+
}, group.label))), (_group$children2 = group.children) === null || _group$children2 === void 0 ? void 0 : _group$children2.map(function (child) {
|
|
145
|
+
var childActive = child.key === activeMenu;
|
|
146
|
+
return /*#__PURE__*/React.createElement("dd", {
|
|
147
|
+
key: child.key,
|
|
148
|
+
"data-odn-mp-layout-menu-item": true,
|
|
149
|
+
"data-active": childActive || undefined,
|
|
150
|
+
onClick: function onClick() {
|
|
151
|
+
return onMenuChange(child.key);
|
|
152
|
+
}
|
|
153
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
154
|
+
"data-odn-mp-layout-menu-item-link": true,
|
|
155
|
+
"data-active": childActive || undefined
|
|
156
|
+
}, child.label));
|
|
157
|
+
}), !isLastGroup && /*#__PURE__*/React.createElement("div", {
|
|
158
|
+
"data-odn-mp-layout-separator": true
|
|
159
|
+
}));
|
|
160
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
"data-odn-mp-layout-content": true,
|
|
162
|
+
className: contentClassName
|
|
163
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
164
|
+
"data-odn-mp-layout-content-scroll": true
|
|
165
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
"data-odn-mp-layout-content-inner": true
|
|
167
|
+
}, pageTitle && /*#__PURE__*/React.createElement("h2", {
|
|
168
|
+
"data-odn-mp-layout-page-title": true
|
|
169
|
+
}, pageTitle), tabs && tabs.length > 0 && /*#__PURE__*/React.createElement(Tabs.Default, {
|
|
170
|
+
gap: 20,
|
|
171
|
+
items: tabs,
|
|
172
|
+
value: activeTab,
|
|
173
|
+
onChange: function onChange(_, value) {
|
|
174
|
+
return onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange(value);
|
|
175
|
+
},
|
|
176
|
+
"data-odn-mp-layout-tabs": true,
|
|
177
|
+
style: {
|
|
178
|
+
'--odn-tabs-active-color': '#000',
|
|
179
|
+
'--odn-tabs-active-font-weight': '600',
|
|
180
|
+
'--odn-tabs-item-padding-top': '10px',
|
|
181
|
+
'--odn-tabs-item-padding-bottom': '10px',
|
|
182
|
+
'--odn-tabs-item-padding-left': '10px',
|
|
183
|
+
'--odn-tabs-item-padding-right': '10px'
|
|
184
|
+
}
|
|
185
|
+
}), subTabs && subTabs.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
186
|
+
"data-odn-mp-layout-subtabs": true
|
|
187
|
+
}, subTabs.map(function (sub, i) {
|
|
188
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
189
|
+
key: sub.key,
|
|
190
|
+
href: sub.href,
|
|
191
|
+
"data-odn-mp-layout-subtab": true,
|
|
192
|
+
"data-active": activeSubTab === sub.key || undefined,
|
|
193
|
+
"data-first": i === 0 || undefined,
|
|
194
|
+
onClick: function onClick(e) {
|
|
195
|
+
var _sub$onClick;
|
|
196
|
+
if (!sub.href) e.preventDefault();
|
|
197
|
+
(_sub$onClick = sub.onClick) === null || _sub$onClick === void 0 || _sub$onClick.call(sub);
|
|
198
|
+
onSubTabChange === null || onSubTabChange === void 0 || onSubTabChange(sub.key);
|
|
199
|
+
}
|
|
200
|
+
}, sub.label);
|
|
201
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
202
|
+
"data-odn-mp-layout-children": true
|
|
203
|
+
}, children))))));
|
|
204
|
+
}
|