one-design-next 0.0.4-alpha.57
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 +32 -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 +656 -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/alert/index.d.ts +63 -0
- package/dist/alert/index.js +137 -0
- package/dist/alert/style/index.css +199 -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 +51 -0
- package/dist/auto-complete/index.js +104 -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 +79 -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 +347 -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 +3 -0
- package/dist/calendar/style/index.d.ts +2 -0
- package/dist/calendar/style/index.js +2 -0
- package/dist/cascader/CascaderOptionContent.d.ts +20 -0
- package/dist/cascader/CascaderOptionContent.js +75 -0
- package/dist/cascader/Panel.d.ts +53 -0
- package/dist/cascader/Panel.js +116 -0
- package/dist/cascader/index.d.ts +54 -0
- package/dist/cascader/index.js +314 -0
- package/dist/cascader/style/index.css +458 -0
- package/dist/cascader/style/index.d.ts +2 -0
- package/dist/cascader/style/index.js +2 -0
- package/dist/cascader/utils.d.ts +12 -0
- package/dist/cascader/utils.js +85 -0
- package/dist/chart/index.d.ts +14 -0
- package/dist/chart/index.js +11 -0
- package/dist/chart/style/index.css +0 -0
- package/dist/chart/style/index.d.ts +2 -0
- package/dist/chart/style/index.js +2 -0
- package/dist/checkbox/Checkbox.d.ts +69 -0
- package/dist/checkbox/Checkbox.js +148 -0
- package/dist/checkbox/Context.d.ts +21 -0
- package/dist/checkbox/Context.js +2 -0
- package/dist/checkbox/Group.d.ts +49 -0
- package/dist/checkbox/Group.js +125 -0
- package/dist/checkbox/index.d.ts +5 -0
- package/dist/checkbox/index.js +3 -0
- package/dist/checkbox/style/index.css +306 -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 +107 -0
- package/dist/collapse/style/index.css +63 -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 +153 -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 +15 -0
- package/dist/date-picker/MonthPicker.js +134 -0
- package/dist/date-picker/QuarterPicker.d.ts +15 -0
- package/dist/date-picker/QuarterPicker.js +135 -0
- package/dist/date-picker/YearPicker.d.ts +13 -0
- package/dist/date-picker/YearPicker.js +81 -0
- package/dist/date-picker/index.d.ts +172 -0
- package/dist/date-picker/index.js +1138 -0
- package/dist/date-picker/style/index.css +548 -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 +46 -0
- package/dist/date-range-picker/index.js +1034 -0
- package/dist/dialog/index.d.ts +132 -0
- package/dist/dialog/index.js +282 -0
- package/dist/dialog/style/index.css +252 -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 +76 -0
- package/dist/drawer/index.js +186 -0
- package/dist/drawer/style/index.css +235 -0
- package/dist/drawer/style/index.d.ts +2 -0
- package/dist/drawer/style/index.js +2 -0
- package/dist/dropdown/index.d.ts +86 -0
- package/dist/dropdown/index.js +836 -0
- package/dist/dropdown/style/index.css +236 -0
- package/dist/dropdown/style/index.d.ts +2 -0
- package/dist/dropdown/style/index.js +2 -0
- package/dist/hover-fill/index.d.ts +43 -0
- package/dist/hover-fill/index.js +222 -0
- package/dist/hover-fill/style/index.css +38 -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 +95 -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/channels-square-filled.svg +1 -0
- package/dist/icon/svg/product/channels.svg +1 -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/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-circle.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 +221 -0
- package/dist/icon/svg-data.js +224 -0
- package/dist/icon/test-icons.html +122 -0
- package/dist/icon/types.d.ts +3 -0
- package/dist/icon/types.js +10 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +46 -0
- package/dist/input/index.d.ts +80 -0
- package/dist/input/index.js +437 -0
- package/dist/input/style/index.css +256 -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 +36 -0
- package/dist/input-number/index.js +429 -0
- package/dist/input-number/style/index.css +70 -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 +114 -0
- package/dist/input-otp/style/index.d.ts +2 -0
- package/dist/input-otp/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 +133 -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 +110 -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 +0 -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 +38 -0
- package/dist/pagination/index.js +349 -0
- package/dist/pagination/style/index.css +128 -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 +123 -0
- package/dist/pop-base/index.js +349 -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 +150 -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 +21 -0
- package/dist/radio/index.js +45 -0
- package/dist/radio/primitive.d.ts +5 -0
- package/dist/radio/primitive.js +28 -0
- package/dist/radio/style/index.css +219 -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 +24 -0
- package/dist/scroll-area/index.js +96 -0
- package/dist/scroll-area/style/index.css +77 -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 +85 -0
- package/dist/select/index.js +262 -0
- package/dist/select/style/index.css +1736 -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/slider/index.d.ts +69 -0
- package/dist/slider/index.js +264 -0
- package/dist/slider/style/index.css +237 -0
- package/dist/slider/style/index.d.ts +2 -0
- package/dist/slider/style/index.js +2 -0
- package/dist/style/base.css +298 -0
- package/dist/style/index.d.ts +6 -0
- package/dist/style/index.js +17 -0
- package/dist/switch/index.d.ts +12 -0
- package/dist/switch/index.js +55 -0
- package/dist/switch/style/index.css +152 -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 +77 -0
- package/dist/table/index.d.ts +97 -0
- package/dist/table/index.js +791 -0
- package/dist/table/style/index.css +320 -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 +259 -0
- package/dist/tabs/index.d.ts +51 -0
- package/dist/tabs/index.js +617 -0
- package/dist/tabs/style/index.css +369 -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 +32 -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 +166 -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 +204 -0
- package/dist/tree-select/style/index.d.ts +1 -0
- package/dist/tree-select/style/index.js +1 -0
- package/package.json +124 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
[data-odn-dropdown-content] {
|
|
2
|
+
z-index: 50;
|
|
3
|
+
min-width: 8rem;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
animation-duration: 0.12s;
|
|
6
|
+
animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
7
|
+
will-change: transform, opacity;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
font-size: var(--odn-font-size);
|
|
11
|
+
line-height: var(--odn-line-height);
|
|
12
|
+
background-color: var(--odn-color-white);
|
|
13
|
+
border: var(--odn-popup-border);
|
|
14
|
+
border-radius: var(--odn-popup-border-radius);
|
|
15
|
+
box-shadow: var(--odn-popup-box-shadow);
|
|
16
|
+
filter: var(--odn-popup-filter);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[data-odn-dropdown-content][data-odn-dropdown-match-width=true] {
|
|
20
|
+
min-width: var(--radix-dropdown-menu-trigger-width);
|
|
21
|
+
width: var(--radix-dropdown-menu-trigger-width);
|
|
22
|
+
}
|
|
23
|
+
[data-odn-dropdown-content][data-odn-dropdown-match-width=true] [data-odn-dropdown-sub-trigger],
|
|
24
|
+
[data-odn-dropdown-content][data-odn-dropdown-match-width=true] [data-odn-dropdown-item] {
|
|
25
|
+
width: var(--radix-dropdown-menu-trigger-width);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-odn-dropdown-content][data-state=open] {
|
|
29
|
+
animation-name: fadeIn, slideInFromTop;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-odn-dropdown-content][data-state=closed] {
|
|
33
|
+
animation-name: fadeOut;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-odn-dropdown-content][data-side=bottom] {
|
|
37
|
+
animation-name: fadeIn, slideInFromTop;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-odn-dropdown-content][data-side=left] {
|
|
41
|
+
animation-name: fadeIn, slideInFromRight;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-odn-dropdown-content][data-side=right] {
|
|
45
|
+
animation-name: fadeIn, slideInFromLeft;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-odn-dropdown-content][data-side=top] {
|
|
49
|
+
animation-name: fadeIn, slideInFromBottom;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[data-odn-dropdown-item] {
|
|
53
|
+
position: relative;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
padding: 0 16px;
|
|
57
|
+
min-height: var(--odn-popup-control-height);
|
|
58
|
+
outline: none;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-odn-dropdown-item][data-disabled] {
|
|
63
|
+
cursor: not-allowed;
|
|
64
|
+
color: var(--odn-color-black-8);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[data-odn-dropdown-item][data-highlighted] {
|
|
68
|
+
background-color: var(--odn-color-black-1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-odn-dropdown-label] {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
padding: 0 16px;
|
|
75
|
+
height: calc(var(--odn-popup-control-height) - 8px);
|
|
76
|
+
font-size: 12px;
|
|
77
|
+
color: var(--odn-color-black-9);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-odn-dropdown-label][data-inset] {
|
|
81
|
+
padding-left: 32px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-odn-dropdown-separator] {
|
|
85
|
+
margin: 4px 0;
|
|
86
|
+
height: 1px;
|
|
87
|
+
background-color: var(--odn-color-black-5);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[data-odn-dropdown-shortcut] {
|
|
91
|
+
margin-left: auto;
|
|
92
|
+
font-size: 12px;
|
|
93
|
+
color: var(--odn-color-black-9);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-odn-dropdown-item-indicator] {
|
|
97
|
+
position: absolute;
|
|
98
|
+
left: 8px;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
width: 16px;
|
|
103
|
+
height: 16px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-odn-dropdown-sub-trigger] {
|
|
107
|
+
position: relative;
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
padding: 0 16px;
|
|
111
|
+
min-height: var(--odn-popup-control-height);
|
|
112
|
+
outline: none;
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-odn-dropdown-sub-trigger][data-state=open] {
|
|
117
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-odn-dropdown-sub-trigger][data-highlighted] {
|
|
121
|
+
background-color: var(--odn-color-black-1);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-odn-dropdown-sub-trigger][data-inset] {
|
|
125
|
+
padding-left: 32px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[data-odn-dropdown-chevron] {
|
|
129
|
+
margin-left: auto;
|
|
130
|
+
color: var(--odn-color-black-9);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-odn-dropdown-sub-content] {
|
|
134
|
+
font-size: var(--odn-font-size);
|
|
135
|
+
line-height: var(--odn-line-height);
|
|
136
|
+
background-color: var(--odn-color-white);
|
|
137
|
+
border: var(--odn-popup-border);
|
|
138
|
+
border-radius: var(--odn-popup-border-radius);
|
|
139
|
+
box-shadow: var(--odn-popup-box-shadow);
|
|
140
|
+
filter: var(--odn-popup-filter);
|
|
141
|
+
padding: 8px 0;
|
|
142
|
+
min-width: 8rem;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
z-index: 50;
|
|
145
|
+
animation-duration: 0.12s;
|
|
146
|
+
animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
147
|
+
will-change: transform, opacity;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[data-odn-dropdown-item][data-variant=destructive] {
|
|
151
|
+
color: #dc2626;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[data-odn-dropdown-item][data-variant=destructive][data-highlighted] {
|
|
155
|
+
background-color: var(--odn-color-black-1);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[data-odn-dropdown-item][data-inset] {
|
|
159
|
+
padding-left: 32px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
[data-odn-dropdown-scroll-area] {
|
|
163
|
+
flex: 1;
|
|
164
|
+
max-height: calc(var(--radix-dropdown-menu-content-available-height) - 8px);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
[data-odn-dropdown-scroll-area] [data-odn-scroll-area-viewport] {
|
|
168
|
+
padding: 8px 0;
|
|
169
|
+
max-height: inherit;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
[data-odn-dropdown-item-icon] {
|
|
173
|
+
margin-right: 8px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
[data-odn-dropdown-radio],
|
|
177
|
+
[data-odn-dropdown-checkbox] {
|
|
178
|
+
margin-right: 8px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
[data-odn-dropdown-item-label] {
|
|
182
|
+
flex: 1;
|
|
183
|
+
min-width: 0;
|
|
184
|
+
text-overflow: ellipsis;
|
|
185
|
+
white-space: nowrap;
|
|
186
|
+
overflow: hidden;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@keyframes fadeIn {
|
|
190
|
+
from {
|
|
191
|
+
opacity: 0;
|
|
192
|
+
}
|
|
193
|
+
to {
|
|
194
|
+
opacity: 1;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
@keyframes fadeOut {
|
|
198
|
+
from {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
}
|
|
201
|
+
to {
|
|
202
|
+
opacity: 0;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
@keyframes slideInFromTop {
|
|
206
|
+
from {
|
|
207
|
+
transform: translateY(-4px);
|
|
208
|
+
}
|
|
209
|
+
to {
|
|
210
|
+
transform: translateY(0);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
@keyframes slideInFromBottom {
|
|
214
|
+
from {
|
|
215
|
+
transform: translateY(4px);
|
|
216
|
+
}
|
|
217
|
+
to {
|
|
218
|
+
transform: translateY(0);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
@keyframes slideInFromLeft {
|
|
222
|
+
from {
|
|
223
|
+
transform: translateX(-4px);
|
|
224
|
+
}
|
|
225
|
+
to {
|
|
226
|
+
transform: translateX(0);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
@keyframes slideInFromRight {
|
|
230
|
+
from {
|
|
231
|
+
transform: translateX(4px);
|
|
232
|
+
}
|
|
233
|
+
to {
|
|
234
|
+
transform: translateX(0);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
export interface HoverFillProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* @description hover 颜色
|
|
6
|
+
* @default 'rgba(33, 34, 38, 0.05)'
|
|
7
|
+
*/
|
|
8
|
+
hoverColor?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @description active 颜色
|
|
11
|
+
* @default 'rgba(33, 34, 38, 0.08)'
|
|
12
|
+
*/
|
|
13
|
+
activeColor?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description 背景类名,在这里加圆角
|
|
16
|
+
*/
|
|
17
|
+
bgClassName?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @description 背景样式,在这里加圆角
|
|
20
|
+
*/
|
|
21
|
+
bgStyle?: React.CSSProperties;
|
|
22
|
+
/**
|
|
23
|
+
* @description 是否禁用
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface HoverFillState {
|
|
29
|
+
timer: number;
|
|
30
|
+
bgVisible: boolean;
|
|
31
|
+
baseNode?: HTMLDivElement | null;
|
|
32
|
+
bgNode?: HTMLDivElement | null;
|
|
33
|
+
bgX: number;
|
|
34
|
+
bgY: number;
|
|
35
|
+
bgScale: number;
|
|
36
|
+
}
|
|
37
|
+
declare global {
|
|
38
|
+
interface Window {
|
|
39
|
+
odnHoverFillState: HoverFillState;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
declare const HoverFill: React.ForwardRefExoticComponent<HoverFillProps & React.RefAttributes<unknown>>;
|
|
43
|
+
export default HoverFill;
|
|
@@ -0,0 +1,222 @@
|
|
|
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
|
+
var _excluded = ["bgClassName", "bgStyle", "children", "onMouseEnter", "onMouseLeave", "onMouseDown", "hoverColor", "activeColor", "disabled"];
|
|
5
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
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); }
|
|
11
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
|
+
import React, { forwardRef, useContext, useEffect, useRef } from 'react';
|
|
14
|
+
import { ConfigContext } from "../config-provider";
|
|
15
|
+
import "./style";
|
|
16
|
+
var DEFAULT_HOVER_COLOR = 'rgba(33, 34, 38, 0.05)';
|
|
17
|
+
var DEFAULT_ACTIVE_COLOR = 'rgba(33, 34, 38, 0.08)';
|
|
18
|
+
var HoverFill = /*#__PURE__*/forwardRef(function (_ref, outerRef) {
|
|
19
|
+
var _ref$bgClassName = _ref.bgClassName,
|
|
20
|
+
bgClassName = _ref$bgClassName === void 0 ? '' : _ref$bgClassName,
|
|
21
|
+
_ref$bgStyle = _ref.bgStyle,
|
|
22
|
+
bgStyle = _ref$bgStyle === void 0 ? {} : _ref$bgStyle,
|
|
23
|
+
children = _ref.children,
|
|
24
|
+
onMouseEnter = _ref.onMouseEnter,
|
|
25
|
+
onMouseLeave = _ref.onMouseLeave,
|
|
26
|
+
onMouseDown = _ref.onMouseDown,
|
|
27
|
+
_ref$hoverColor = _ref.hoverColor,
|
|
28
|
+
hoverColor = _ref$hoverColor === void 0 ? DEFAULT_HOVER_COLOR : _ref$hoverColor,
|
|
29
|
+
_ref$activeColor = _ref.activeColor,
|
|
30
|
+
activeColor = _ref$activeColor === void 0 ? DEFAULT_ACTIVE_COLOR : _ref$activeColor,
|
|
31
|
+
_ref$disabled = _ref.disabled,
|
|
32
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
33
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
+
var _useContext = useContext(ConfigContext),
|
|
35
|
+
_useContext$hoverFill = _useContext.hoverFill,
|
|
36
|
+
hoverFillConfig = _useContext$hoverFill === void 0 ? {} : _useContext$hoverFill;
|
|
37
|
+
var innerRef = useRef(null);
|
|
38
|
+
var ref = outerRef || innerRef;
|
|
39
|
+
var bgRef = useRef(null);
|
|
40
|
+
var handleMouseEnter = function handleMouseEnter(e) {
|
|
41
|
+
var _window$odnHoverFillS, _window$odnHoverFillS2;
|
|
42
|
+
e.persist();
|
|
43
|
+
if (disabled) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if ((_window$odnHoverFillS = window.odnHoverFillState) !== null && _window$odnHoverFillS !== void 0 && _window$odnHoverFillS.timer) {
|
|
47
|
+
clearTimeout(window.odnHoverFillState.timer);
|
|
48
|
+
}
|
|
49
|
+
var root = ref.current || e.currentTarget;
|
|
50
|
+
if (onMouseEnter) {
|
|
51
|
+
onMouseEnter(e);
|
|
52
|
+
}
|
|
53
|
+
if (!root) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
var _root$getBoundingClie = root.getBoundingClientRect(),
|
|
57
|
+
x = _root$getBoundingClie.x,
|
|
58
|
+
y = _root$getBoundingClie.y;
|
|
59
|
+
if (window.odnHoverFillState && window.odnHoverFillState.bgVisible && window.odnHoverFillState.bgNode && window.odnHoverFillState.baseNode && window.odnHoverFillState.baseNode !== root && ((_window$odnHoverFillS2 = window.odnHoverFillState.baseNode) === null || _window$odnHoverFillS2 === void 0 ? void 0 : _window$odnHoverFillS2.parentNode) === root.parentNode && hoverFillConfig.sharable) {
|
|
60
|
+
var _window$odnHoverFillS3 = window.odnHoverFillState,
|
|
61
|
+
bgX = _window$odnHoverFillS3.bgX,
|
|
62
|
+
bgY = _window$odnHoverFillS3.bgY,
|
|
63
|
+
bgScale = _window$odnHoverFillS3.bgScale,
|
|
64
|
+
baseNode = _window$odnHoverFillS3.baseNode;
|
|
65
|
+
var _baseNode$getBounding = baseNode.getBoundingClientRect(),
|
|
66
|
+
originX = _baseNode$getBounding.x,
|
|
67
|
+
originY = _baseNode$getBounding.y;
|
|
68
|
+
window.odnHoverFillState.bgNode.style.transformOrigin = '0 0';
|
|
69
|
+
window.odnHoverFillState.bgNode.style.width = root.offsetWidth + 'px';
|
|
70
|
+
window.odnHoverFillState.bgNode.style.transform = "translate3d(".concat(x - originX, "px, ").concat(y - originY, "px, 0) scale(").concat(bgScale, ")");
|
|
71
|
+
window.odnHoverFillState.bgNode.style.background = hoverColor;
|
|
72
|
+
} else {
|
|
73
|
+
if (window.odnHoverFillState && window.odnHoverFillState.bgVisible && window.odnHoverFillState.bgNode) {
|
|
74
|
+
window.odnHoverFillState.bgNode.style.background = 'transparent';
|
|
75
|
+
// window.odnHoverFillState.bgNode.style.transform = 'scale(var(--odn-hoverfill-scale-start))';
|
|
76
|
+
window.odnHoverFillState.bgNode.style.transition = '';
|
|
77
|
+
}
|
|
78
|
+
var clientX = e.clientX,
|
|
79
|
+
clientY = e.clientY;
|
|
80
|
+
if (bgRef.current) {
|
|
81
|
+
var diagonal = Math.sqrt(Math.pow(root.offsetWidth, 2) + Math.pow(root.offsetHeight, 2));
|
|
82
|
+
var k = 8;
|
|
83
|
+
var scaleStart = Math.min(Math.max(0.92, 1 - k / diagonal), 1);
|
|
84
|
+
bgRef.current.style.setProperty('--odn-hoverfill-scale-start', scaleStart.toString());
|
|
85
|
+
if (!bgRef.current) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
bgRef.current.style.width = root.offsetWidth + 'px';
|
|
89
|
+
bgRef.current.style.transformOrigin = "".concat(clientX - x, "px ").concat(clientY - y, "px");
|
|
90
|
+
bgRef.current.style.background = hoverColor;
|
|
91
|
+
bgRef.current.style.transform = 'scale(1)';
|
|
92
|
+
bgRef.current.style.transition = '';
|
|
93
|
+
}
|
|
94
|
+
window.odnHoverFillState = {
|
|
95
|
+
bgVisible: true,
|
|
96
|
+
bgX: clientX - x,
|
|
97
|
+
bgY: clientY - y,
|
|
98
|
+
bgScale: 1,
|
|
99
|
+
baseNode: root,
|
|
100
|
+
bgNode: bgRef.current,
|
|
101
|
+
timer: 0
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var handleMouseLeave = function handleMouseLeave(e) {
|
|
106
|
+
var _window$odnHoverFillS4;
|
|
107
|
+
e.persist();
|
|
108
|
+
if (disabled) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if ((_window$odnHoverFillS4 = window.odnHoverFillState) !== null && _window$odnHoverFillS4 !== void 0 && _window$odnHoverFillS4.timer) {
|
|
112
|
+
clearTimeout(window.odnHoverFillState.timer);
|
|
113
|
+
}
|
|
114
|
+
var root = ref.current || e.currentTarget;
|
|
115
|
+
if (onMouseLeave) {
|
|
116
|
+
onMouseLeave(e);
|
|
117
|
+
}
|
|
118
|
+
if (!root) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
window.odnHoverFillState.timer = window.setTimeout(function () {
|
|
122
|
+
if (window.odnHoverFillState.bgNode) {
|
|
123
|
+
window.odnHoverFillState.bgNode.style.transformOrigin = '';
|
|
124
|
+
window.odnHoverFillState.bgNode.style.background = 'transparent';
|
|
125
|
+
window.odnHoverFillState.bgNode.style.width = '';
|
|
126
|
+
window.odnHoverFillState.bgNode.style.transform = '';
|
|
127
|
+
window.odnHoverFillState.bgNode.style.transition = '0s';
|
|
128
|
+
}
|
|
129
|
+
if (bgRef.current) {
|
|
130
|
+
bgRef.current.style.background = hoverColor;
|
|
131
|
+
bgRef.current.style.transform = 'scale(1)';
|
|
132
|
+
bgRef.current.style.transition = '0s';
|
|
133
|
+
}
|
|
134
|
+
setTimeout(function () {
|
|
135
|
+
var clientX = e.clientX,
|
|
136
|
+
clientY = e.clientY;
|
|
137
|
+
var _root$getBoundingClie2 = root.getBoundingClientRect(),
|
|
138
|
+
x = _root$getBoundingClie2.x,
|
|
139
|
+
y = _root$getBoundingClie2.y;
|
|
140
|
+
var originX = clientX - x;
|
|
141
|
+
var originY = clientY - y;
|
|
142
|
+
if (originX < 0) {
|
|
143
|
+
originX = 0;
|
|
144
|
+
} else if (originX > root.offsetWidth) {
|
|
145
|
+
originX = root.offsetWidth;
|
|
146
|
+
}
|
|
147
|
+
if (originY < 0) {
|
|
148
|
+
originY = 0;
|
|
149
|
+
} else if (originY > root.offsetHeight) {
|
|
150
|
+
originY = root.offsetHeight;
|
|
151
|
+
}
|
|
152
|
+
if (bgRef.current) {
|
|
153
|
+
bgRef.current.style.transformOrigin = "".concat(originX, "px ").concat(originY, "px");
|
|
154
|
+
bgRef.current.style.background = 'transparent';
|
|
155
|
+
bgRef.current.style.transform = 'scale(var(--odn-hoverfill-scale-start))';
|
|
156
|
+
bgRef.current.style.transition = '';
|
|
157
|
+
}
|
|
158
|
+
window.odnHoverFillState = {
|
|
159
|
+
timer: 0,
|
|
160
|
+
bgVisible: false,
|
|
161
|
+
bgX: 0,
|
|
162
|
+
bgY: 0,
|
|
163
|
+
bgScale: 0,
|
|
164
|
+
baseNode: null,
|
|
165
|
+
bgNode: null
|
|
166
|
+
};
|
|
167
|
+
}, 0);
|
|
168
|
+
}, 100);
|
|
169
|
+
};
|
|
170
|
+
var handleMouseDown = function handleMouseDown(e) {
|
|
171
|
+
e.persist();
|
|
172
|
+
if (disabled) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (window.odnHoverFillState.bgVisible && window.odnHoverFillState.bgNode) {
|
|
176
|
+
window.odnHoverFillState.bgNode.style.background = hoverColor === DEFAULT_HOVER_COLOR || activeColor !== DEFAULT_ACTIVE_COLOR ? activeColor : hoverColor;
|
|
177
|
+
}
|
|
178
|
+
if (onMouseDown) {
|
|
179
|
+
onMouseDown(e);
|
|
180
|
+
}
|
|
181
|
+
window.addEventListener('mouseup', handleMouseUp, false);
|
|
182
|
+
};
|
|
183
|
+
var handleMouseUp = function handleMouseUp() {
|
|
184
|
+
window.removeEventListener('mouseup', handleMouseUp, false);
|
|
185
|
+
if (window.odnHoverFillState.bgNode) {
|
|
186
|
+
window.odnHoverFillState.bgNode.style.background = window.odnHoverFillState.bgVisible ? hoverColor : 'transparent';
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
useEffect(function () {
|
|
190
|
+
if (!window.odnHoverFillState) {
|
|
191
|
+
window.odnHoverFillState = {
|
|
192
|
+
bgVisible: false,
|
|
193
|
+
bgX: 0,
|
|
194
|
+
bgY: 0,
|
|
195
|
+
bgScale: 0,
|
|
196
|
+
baseNode: null,
|
|
197
|
+
bgNode: null,
|
|
198
|
+
timer: 0
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
return function () {
|
|
202
|
+
window.removeEventListener('mouseup', handleMouseUp, false);
|
|
203
|
+
};
|
|
204
|
+
}, []);
|
|
205
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
206
|
+
ref: ref,
|
|
207
|
+
"data-odn-hover-fill": true,
|
|
208
|
+
"data-odn-hover-fill-disabled": disabled,
|
|
209
|
+
onMouseEnter: handleMouseEnter,
|
|
210
|
+
onMouseLeave: handleMouseLeave,
|
|
211
|
+
onMouseDown: handleMouseDown
|
|
212
|
+
}, props), /*#__PURE__*/React.createElement("div", {
|
|
213
|
+
"data-odn-hover-fill-content": true
|
|
214
|
+
}, children), /*#__PURE__*/React.createElement("i", {
|
|
215
|
+
ref: bgRef,
|
|
216
|
+
"data-odn-hover-fill-bg": true,
|
|
217
|
+
className: bgClassName,
|
|
218
|
+
style: _objectSpread({}, bgStyle || {})
|
|
219
|
+
}));
|
|
220
|
+
});
|
|
221
|
+
HoverFill.displayName = 'HoverFill';
|
|
222
|
+
export default HoverFill;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
html {
|
|
3
|
+
/* HoverFill 的缩放起始 */
|
|
4
|
+
--odn-hoverfill-scale-start: 0.94;
|
|
5
|
+
/* HoverFill 的过渡时间 */
|
|
6
|
+
--odn-hoverfill-duration: 0.25s;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[data-odn-hover-fill] {
|
|
10
|
+
position: relative;
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
border: none;
|
|
13
|
+
outline: none;
|
|
14
|
+
user-select: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[data-odn-hover-fill-bg] {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
transform: scale(var(--odn-hoverfill-scale-start));
|
|
26
|
+
transition: width var(--odn-hoverfill-duration) cubic-bezier(0.32, 0.72, 0, 1), transform var(--odn-hoverfill-duration) cubic-bezier(0.32, 0.72, 0, 1), background var(--odn-hoverfill-duration) cubic-bezier(0.32, 0.72, 0, 1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[data-odn-hover-fill-content] {
|
|
30
|
+
position: relative;
|
|
31
|
+
z-index: 1;
|
|
32
|
+
height: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[data-odn-hover-fill-disabled=false] [data-odn-hover-fill-content] > * {
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
min-width: 100%;
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
import type { SvgIconName } from './types';
|
|
4
|
+
export declare const adqIconNames: ("code" | "data" | "link" | "menu" | "search" | "template" | "time" | "video" | "filter" | "image" | "stop" | "text" | "sort" | "send" | "warning" | "draggable" | "writing" | "wechatSearch" | "wechatBubble" | "wechatBubble-filled" | "wallet" | "viewMask" | "videoBag-filled" | "users" | "users-bold" | "userPack" | "userList" | "user-circle" | "treeStructure" | "templateBag" | "task" | "task-filled" | "targeting" | "target" | "support-bold" | "star" | "star-filled" | "shopping" | "shop" | "shield" | "shield-filled" | "searchAD" | "searchAD-filled" | "ringStruckture" | "quickFile" | "qualification" | "playing" | "offiaccount-filled" | "notepad" | "notepad-bold" | "moments-filled" | "mobilePage" | "minigame-filled" | "miniProgram" | "magic" | "magic-filled" | "lock" | "linkSquare" | "keyword" | "images" | "image-filled" | "image-bold" | "idea" | "idea-bold" | "icon-outlined" | "hosting" | "guideBook" | "folderzip-bold" | "folderZip" | "flag" | "file-filled" | "extendedConfig" | "exposure-filled" | "detect" | "dataRising" | "dataFolder" | "dataBox" | "dataBoard" | "dataAuth" | "container" | "comments" | "checkBadge" | "chatBubble-filled" | "channels" | "channels-square-filled" | "autoAD-square-filled" | "assetProtecting" | "asset-square" | "alarmClock" | "addressBook" | "LandingPage" | "AIFile" | "subdivide" | "plus" | "plus-circle" | "plus-circle-filled" | "play-filled" | "pause-filled" | "mutiSelect" | "mutiSelect-filled" | "multiCreate" | "modify" | "modify-bold" | "minus" | "minus-circle" | "minus-circle-filled" | "import" | "edit" | "deleteAD-filled" | "delete" | "custom" | "custom-filled" | "copy" | "check" | "check-circle" | "check-circle-filled" | "cancel" | "cancel-circle" | "cancel-circle-filled" | "up" | "up-filled" | "up-bold" | "unfold" | "unfold-filled" | "top" | "top-filled" | "rise-filled" | "rightLast" | "rightLast-filled" | "right" | "right-filled" | "right-bold" | "pointerRight-filled" | "pointerLeft-filled" | "more" | "more-vertical" | "menuRight" | "menuRight-bold" | "menuLeft" | "menuLeft-bold" | "logout" | "leftFirst" | "leftFirst-filled" | "left" | "left-filled" | "left-bold" | "fullScreen" | "fold" | "fall-filled" | "down" | "down-filled" | "down-bold" | "doubleRight" | "doubleRight-filled" | "doubleLeft" | "doubleLeft-filled" | "bottom" | "bottom-filled" | "arrowUp" | "arrowUp-filled" | "arrowRight" | "arrowRight-filled" | "arrowLeft" | "arrowLeft-filled" | "arrowDown" | "arrowDown-filled" | "histogram" | "compare" | "warning-filled" | "info-circle" | "info-circle-filled" | "help-circle" | "help-circle-filled" | "alert-circle" | "alert-circle-filled" | "zoomOut" | "zoomIn" | "videoScreenshot" | "verify" | "time-bold" | "thumbUp" | "thumbUp-filled" | "thumbDown" | "thumbDown-filled" | "tag" | "tag-filled" | "sticker" | "sticker-filled" | "sound" | "share" | "setting" | "search-filled" | "search-bold" | "save" | "report" | "refresh" | "mutiImage" | "mutiImage-filled" | "mute" | "mobile" | "mobile-filled" | "maxSize" | "location" | "hot" | "hot-filled" | "filter-filled" | "exchange" | "download" | "download-filled" | "download-1" | "dataReport" | "dataReport-filled" | "customColumn" | "calendar" | "bidding" | "bell" | "bell-filled" | "QRcode")[];
|
|
5
|
+
export interface IconProps extends Omit<React.SVGProps<SVGSVGElement>, 'name'> {
|
|
6
|
+
name: SvgIconName | (string & {});
|
|
7
|
+
size?: number;
|
|
8
|
+
spin?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Icon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
11
|
+
export default Icon;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
var _excluded = ["name", "size", "style", "spin"];
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
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 _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import React, { useContext } from 'react';
|
|
12
|
+
import { ConfigContext } from "../config-provider";
|
|
13
|
+
import "./style";
|
|
14
|
+
import { svgData } from "./svg-data";
|
|
15
|
+
// 从生成的SVG数据中获取图标名称列表
|
|
16
|
+
export var adqIconNames = Object.keys(svgData);
|
|
17
|
+
var Icon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18
|
+
var name = _ref.name,
|
|
19
|
+
_ref$size = _ref.size,
|
|
20
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
21
|
+
style = _ref.style,
|
|
22
|
+
spin = _ref.spin,
|
|
23
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
var _useContext = useContext(ConfigContext),
|
|
25
|
+
icons = _useContext.icons;
|
|
26
|
+
if (!name) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
var props = _objectSpread({
|
|
30
|
+
width: size,
|
|
31
|
+
height: size,
|
|
32
|
+
style: style,
|
|
33
|
+
'data-odn-icon': true,
|
|
34
|
+
'data-odn-icon-name': name,
|
|
35
|
+
'data-odn-icon-spin': spin
|
|
36
|
+
}, otherProps);
|
|
37
|
+
|
|
38
|
+
// 处理特殊图标
|
|
39
|
+
if (name === 'loading') {
|
|
40
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, props, {
|
|
41
|
+
viewBox: "0 0 16 16",
|
|
42
|
+
fill: "none"
|
|
43
|
+
}), /*#__PURE__*/React.createElement("g", {
|
|
44
|
+
clipPath: "url(#paint0_angular_560_6490_clip_path)"
|
|
45
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
46
|
+
transform: "matrix(0.008 1.39876e-09 -1.39876e-09 0.008 8 8)"
|
|
47
|
+
}, /*#__PURE__*/React.createElement("foreignObject", {
|
|
48
|
+
x: "-1125",
|
|
49
|
+
y: "-1125",
|
|
50
|
+
width: "2250",
|
|
51
|
+
height: "2250"
|
|
52
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
"data-odn-icon-loading-background": true
|
|
54
|
+
})))), /*#__PURE__*/React.createElement("path", {
|
|
55
|
+
d: "M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 -7.72509e-07 12.4183 0 8C7.72524e-07 3.58172 3.58172 -7.72516e-07 8 0C12.4183 7.72516e-07 16 3.58172 16 8ZM2.56 8C2.56 11.0044 4.99557 13.44 8 13.44C11.0044 13.44 13.44 11.0044 13.44 8C13.44 4.99557 11.0044 2.56 8 2.56C4.99557 2.56 2.56 4.99557 2.56 8Z"
|
|
56
|
+
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
57
|
+
id: "paint0_angular_560_6490_clip_path"
|
|
58
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
59
|
+
d: "M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 -7.72509e-07 12.4183 0 8C7.72524e-07 3.58172 3.58172 -7.72516e-07 8 0C12.4183 7.72516e-07 16 3.58172 16 8ZM2.56 8C2.56 11.0044 4.99557 13.44 8 13.44C11.0044 13.44 13.44 11.0044 13.44 8C13.44 4.99557 11.0044 2.56 8 2.56C4.99557 2.56 2.56 4.99557 2.56 8Z"
|
|
60
|
+
}))));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 优先使用配置中的图标
|
|
64
|
+
if (icons !== null && icons !== void 0 && icons[name]) {
|
|
65
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
66
|
+
ref: ref
|
|
67
|
+
}, props), icons[name].map(function (icon) {
|
|
68
|
+
return /*#__PURE__*/React.createElement("path", {
|
|
69
|
+
key: icon,
|
|
70
|
+
d: icon,
|
|
71
|
+
fillRule: "evenodd"
|
|
72
|
+
});
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// 使用本地SVG数据(简化版本)
|
|
77
|
+
if (svgData[name]) {
|
|
78
|
+
var paths = svgData[name];
|
|
79
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
80
|
+
ref: ref
|
|
81
|
+
}, props, {
|
|
82
|
+
viewBox: "0 0 16 16",
|
|
83
|
+
fill: "currentColor"
|
|
84
|
+
}), paths.map(function (pathData, index) {
|
|
85
|
+
return /*#__PURE__*/React.createElement("path", {
|
|
86
|
+
key: index,
|
|
87
|
+
d: pathData,
|
|
88
|
+
fillRule: "evenodd"
|
|
89
|
+
});
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
});
|
|
94
|
+
Icon.displayName = 'Icon';
|
|
95
|
+
export default Icon;
|