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,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
type CollapseItem = {
|
|
4
|
+
key: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
interface CollapseProps {
|
|
10
|
+
/**
|
|
11
|
+
* 折叠面板项目
|
|
12
|
+
*/
|
|
13
|
+
items: CollapseItem[];
|
|
14
|
+
/**
|
|
15
|
+
* 默认展开的面板,支持多个
|
|
16
|
+
*/
|
|
17
|
+
defaultActiveKey?: string | string[];
|
|
18
|
+
/**
|
|
19
|
+
* 当前展开的面板,支持多个
|
|
20
|
+
*/
|
|
21
|
+
activeKey?: string | string[];
|
|
22
|
+
/**
|
|
23
|
+
* 切换面板的回调
|
|
24
|
+
*/
|
|
25
|
+
onChange?: (activeKeys: string[]) => void;
|
|
26
|
+
/**
|
|
27
|
+
* 是否手风琴模式,只允许展开一个面板
|
|
28
|
+
*/
|
|
29
|
+
accordion?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 自定义类名
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
/**
|
|
35
|
+
* 自定义样式
|
|
36
|
+
*/
|
|
37
|
+
style?: React.CSSProperties;
|
|
38
|
+
}
|
|
39
|
+
declare const Collapse: React.FC<CollapseProps>;
|
|
40
|
+
export default Collapse;
|
|
41
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './primitive';
|
|
42
|
+
export type { CollapseItem, CollapseProps };
|
|
43
|
+
export type { CollapsibleContentProps, CollapsibleProps, CollapsibleTriggerProps, } from './primitive';
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./primitive";
|
|
15
|
+
import Icon from "../icon";
|
|
16
|
+
import "./style";
|
|
17
|
+
var Collapse = function Collapse(_ref) {
|
|
18
|
+
var items = _ref.items,
|
|
19
|
+
_ref$defaultActiveKey = _ref.defaultActiveKey,
|
|
20
|
+
defaultActiveKey = _ref$defaultActiveKey === void 0 ? [] : _ref$defaultActiveKey,
|
|
21
|
+
activeKey = _ref.activeKey,
|
|
22
|
+
onChange = _ref.onChange,
|
|
23
|
+
_ref$accordion = _ref.accordion,
|
|
24
|
+
accordion = _ref$accordion === void 0 ? false : _ref$accordion,
|
|
25
|
+
className = _ref.className,
|
|
26
|
+
style = _ref.style;
|
|
27
|
+
// 标准化 activeKey 为数组
|
|
28
|
+
var normalizeKeys = function normalizeKeys(keys) {
|
|
29
|
+
if (keys === undefined) return [];
|
|
30
|
+
return Array.isArray(keys) ? keys : [keys];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// 内部状态管理
|
|
34
|
+
var _React$useState = React.useState(function () {
|
|
35
|
+
var defaultKeys = normalizeKeys(defaultActiveKey);
|
|
36
|
+
if (accordion && defaultKeys.length > 1) {
|
|
37
|
+
return [defaultKeys[0]]; // 手风琴模式只保留第一个
|
|
38
|
+
}
|
|
39
|
+
return defaultKeys;
|
|
40
|
+
}),
|
|
41
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
42
|
+
internalActiveKeys = _React$useState2[0],
|
|
43
|
+
setInternalActiveKeys = _React$useState2[1];
|
|
44
|
+
|
|
45
|
+
// 获取当前活动的 keys
|
|
46
|
+
var currentActiveKeys = activeKey !== undefined ? normalizeKeys(activeKey) : internalActiveKeys;
|
|
47
|
+
|
|
48
|
+
// 处理面板切换
|
|
49
|
+
var handleToggle = function handleToggle(key, disabled) {
|
|
50
|
+
// 如果项目被禁用,阻止切换
|
|
51
|
+
if (disabled) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
var newActiveKeys;
|
|
55
|
+
if (accordion) {
|
|
56
|
+
// 手风琴模式:只允许一个展开
|
|
57
|
+
newActiveKeys = currentActiveKeys.includes(key) ? [] : [key];
|
|
58
|
+
} else {
|
|
59
|
+
// 普通模式:可以多个展开
|
|
60
|
+
if (currentActiveKeys.includes(key)) {
|
|
61
|
+
newActiveKeys = currentActiveKeys.filter(function (k) {
|
|
62
|
+
return k !== key;
|
|
63
|
+
});
|
|
64
|
+
} else {
|
|
65
|
+
newActiveKeys = [].concat(_toConsumableArray(currentActiveKeys), [key]);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 如果是非受控模式,更新内部状态
|
|
70
|
+
if (activeKey === undefined) {
|
|
71
|
+
setInternalActiveKeys(newActiveKeys);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// 触发回调
|
|
75
|
+
onChange === null || onChange === void 0 || onChange(newActiveKeys);
|
|
76
|
+
};
|
|
77
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: className,
|
|
79
|
+
style: style,
|
|
80
|
+
"data-odn-collapse": true
|
|
81
|
+
}, items.map(function (item) {
|
|
82
|
+
var isOpen = currentActiveKeys.includes(item.key);
|
|
83
|
+
return /*#__PURE__*/React.createElement(Collapsible, {
|
|
84
|
+
key: item.key,
|
|
85
|
+
open: isOpen,
|
|
86
|
+
onOpenChange: function onOpenChange() {
|
|
87
|
+
return handleToggle(item.key, item.disabled);
|
|
88
|
+
}
|
|
89
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
90
|
+
"data-odn-collapse-item": true
|
|
91
|
+
}, /*#__PURE__*/React.createElement(CollapsibleTrigger, {
|
|
92
|
+
asChild: true
|
|
93
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
"data-odn-collapse-header": true,
|
|
95
|
+
"data-odn-collapse-header-disabled": item.disabled
|
|
96
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
97
|
+
"data-odn-collapse-header-icon": true,
|
|
98
|
+
name: "right"
|
|
99
|
+
}), item.label)), /*#__PURE__*/React.createElement(CollapsibleContent, {
|
|
100
|
+
"data-odn-collapse-content": true
|
|
101
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
102
|
+
"data-odn-collapse-content-inner": true
|
|
103
|
+
}, item.children))));
|
|
104
|
+
}));
|
|
105
|
+
};
|
|
106
|
+
export default Collapse;
|
|
107
|
+
|
|
108
|
+
// 导出 primitives 供高级用户使用
|
|
109
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./primitive";
|
|
110
|
+
|
|
111
|
+
// 从 primitive 重新导出类型
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
+
import { Transition } from 'motion/react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
type CollapsibleContextType = {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const useCollapsible: () => CollapsibleContextType;
|
|
9
|
+
type CollapsibleProps = React.ComponentProps<typeof CollapsiblePrimitive.Root>;
|
|
10
|
+
declare function Collapsible(props: CollapsibleProps): React.JSX.Element;
|
|
11
|
+
type CollapsibleTriggerProps = Omit<React.ComponentProps<typeof CollapsiblePrimitive.Trigger>, 'children'> & {
|
|
12
|
+
children?: React.ReactNode | ((props: {
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
}) => React.ReactNode);
|
|
15
|
+
};
|
|
16
|
+
declare function CollapsibleTrigger({ children, ...props }: CollapsibleTriggerProps): React.JSX.Element;
|
|
17
|
+
type CollapsibleContentProps = Omit<React.ComponentProps<typeof CollapsiblePrimitive.Content>, 'asChild' | 'forceMount' | 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onDragCapture' | 'onDragStartCapture' | 'onDragEndCapture' | 'onAnimationStart' | 'onAnimationStartCapture'> & {
|
|
18
|
+
transition?: Transition;
|
|
19
|
+
};
|
|
20
|
+
declare function CollapsibleContent({ transition, ...props }: CollapsibleContentProps): React.JSX.Element;
|
|
21
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger, useCollapsible, type CollapsibleContentProps, type CollapsibleContextType, type CollapsibleProps, type CollapsibleTriggerProps, };
|
|
@@ -0,0 +1,107 @@
|
|
|
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 = ["children"],
|
|
5
|
+
_excluded2 = ["transition"];
|
|
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
|
+
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); }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
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."); }
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
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; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
21
|
+
import { AnimatePresence, motion } from 'motion/react';
|
|
22
|
+
import * as React from 'react';
|
|
23
|
+
var CollapsibleContext = /*#__PURE__*/React.createContext(null);
|
|
24
|
+
var useCollapsible = function useCollapsible() {
|
|
25
|
+
var context = React.useContext(CollapsibleContext);
|
|
26
|
+
if (!context) {
|
|
27
|
+
throw new Error('useCollapsible must be used within a CollapsibleProvider');
|
|
28
|
+
}
|
|
29
|
+
return context;
|
|
30
|
+
};
|
|
31
|
+
function Collapsible(props) {
|
|
32
|
+
var _props$defaultOpen;
|
|
33
|
+
var _React$useState = React.useState((_props$defaultOpen = props.defaultOpen) !== null && _props$defaultOpen !== void 0 ? _props$defaultOpen : false),
|
|
34
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35
|
+
isOpen = _React$useState2[0],
|
|
36
|
+
setIsOpen = _React$useState2[1];
|
|
37
|
+
|
|
38
|
+
// 处理受控状态
|
|
39
|
+
var controlledIsOpen = props.open !== undefined ? props.open : isOpen;
|
|
40
|
+
var handleOpenChange = function handleOpenChange(open) {
|
|
41
|
+
var _props$onOpenChange;
|
|
42
|
+
if (props.open === undefined) {
|
|
43
|
+
setIsOpen(open);
|
|
44
|
+
}
|
|
45
|
+
(_props$onOpenChange = props.onOpenChange) === null || _props$onOpenChange === void 0 || _props$onOpenChange.call(props, open);
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/React.createElement(CollapsibleContext.Provider, {
|
|
48
|
+
value: {
|
|
49
|
+
isOpen: controlledIsOpen,
|
|
50
|
+
setIsOpen: handleOpenChange
|
|
51
|
+
}
|
|
52
|
+
}, /*#__PURE__*/React.createElement(CollapsiblePrimitive.Root, _extends({
|
|
53
|
+
"data-slot": "collapsible",
|
|
54
|
+
"data-odn-collapsible-item-root": true
|
|
55
|
+
}, props, {
|
|
56
|
+
open: controlledIsOpen,
|
|
57
|
+
onOpenChange: handleOpenChange
|
|
58
|
+
})));
|
|
59
|
+
}
|
|
60
|
+
function CollapsibleTrigger(_ref) {
|
|
61
|
+
var children = _ref.children,
|
|
62
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
63
|
+
var _useCollapsible = useCollapsible(),
|
|
64
|
+
isOpen = _useCollapsible.isOpen;
|
|
65
|
+
var content = typeof children === 'function' ? children({
|
|
66
|
+
isOpen: isOpen
|
|
67
|
+
}) : children;
|
|
68
|
+
return /*#__PURE__*/React.createElement(CollapsiblePrimitive.Trigger, _extends({
|
|
69
|
+
"data-slot": "collapsible-trigger"
|
|
70
|
+
}, props), content);
|
|
71
|
+
}
|
|
72
|
+
function CollapsibleContent(_ref2) {
|
|
73
|
+
var transition = _ref2.transition,
|
|
74
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
75
|
+
var _useCollapsible2 = useCollapsible(),
|
|
76
|
+
isOpen = _useCollapsible2.isOpen;
|
|
77
|
+
var defaultTransition = {
|
|
78
|
+
type: 'spring',
|
|
79
|
+
visualDuration: 0.2,
|
|
80
|
+
bounce: 0
|
|
81
|
+
};
|
|
82
|
+
var finalTransition = transition ? _objectSpread(_objectSpread({}, defaultTransition), transition) : defaultTransition;
|
|
83
|
+
return /*#__PURE__*/React.createElement(AnimatePresence, null, /*#__PURE__*/React.createElement(CollapsiblePrimitive.Content, {
|
|
84
|
+
asChild: true,
|
|
85
|
+
forceMount: true
|
|
86
|
+
}, /*#__PURE__*/React.createElement(motion.div, _extends({
|
|
87
|
+
key: "collapsible-content",
|
|
88
|
+
"data-slot": "collapsible-content",
|
|
89
|
+
layout: true,
|
|
90
|
+
initial: {
|
|
91
|
+
opacity: 0,
|
|
92
|
+
height: 0,
|
|
93
|
+
overflow: 'hidden'
|
|
94
|
+
},
|
|
95
|
+
animate: isOpen ? {
|
|
96
|
+
opacity: 1,
|
|
97
|
+
height: 'auto',
|
|
98
|
+
overflow: 'hidden'
|
|
99
|
+
} : {
|
|
100
|
+
opacity: 0,
|
|
101
|
+
height: 0,
|
|
102
|
+
overflow: 'hidden'
|
|
103
|
+
},
|
|
104
|
+
transition: finalTransition
|
|
105
|
+
}, props))));
|
|
106
|
+
}
|
|
107
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger, useCollapsible };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
html {
|
|
2
|
+
--odn-collapse-header-padding: 12px 16px;
|
|
3
|
+
--odn-collapse-content-padding: 16px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
[data-odn-collapse] {
|
|
7
|
+
position: relative;
|
|
8
|
+
font-size: var(--odn-font-size);
|
|
9
|
+
line-height: var(--odn-line-height);
|
|
10
|
+
border: var(--odn-line-width) var(--odn-line-type) var(--odn-color-border);
|
|
11
|
+
border-radius: var(--odn-border-radius);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[data-odn-collapsible-item-root] [data-odn-collapse-item] {
|
|
15
|
+
border-bottom: var(--odn-line-width) var(--odn-line-type) var(--odn-color-border);
|
|
16
|
+
}
|
|
17
|
+
[data-odn-collapsible-item-root]:first-child [data-odn-collapse-content-inner],
|
|
18
|
+
[data-odn-collapsible-item-root]:first-child [data-odn-collapse-header] {
|
|
19
|
+
border-radius: var(--odn-border-radius) var(--odn-border-radius) 0 0;
|
|
20
|
+
}
|
|
21
|
+
[data-odn-collapsible-item-root]:last-child [data-odn-collapse-item] {
|
|
22
|
+
border-bottom: 0;
|
|
23
|
+
}
|
|
24
|
+
[data-odn-collapsible-item-root]:last-child [data-odn-collapse-content-inner],
|
|
25
|
+
[data-odn-collapsible-item-root]:last-child [data-odn-collapse-header] {
|
|
26
|
+
border-radius: 0 0 var(--odn-border-radius) var(--odn-border-radius);
|
|
27
|
+
}
|
|
28
|
+
[data-odn-collapsible-item-root][data-state=open] [data-odn-collapse-header-icon] {
|
|
29
|
+
transform: rotate(90deg);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-odn-collapse-header] {
|
|
33
|
+
position: relative;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-wrap: nowrap;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: 4px;
|
|
38
|
+
padding: var(--odn-collapse-header-padding);
|
|
39
|
+
background-color: var(--odn-color-black-1);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
transition: 0.2s cubic-bezier(0.32, 0.72, 0, 1) all, visibility 0s;
|
|
42
|
+
}
|
|
43
|
+
[data-odn-collapse-header][data-odn-collapse-header-disabled=true] {
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
opacity: 0.4;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-odn-collapse-header-icon] {
|
|
49
|
+
transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[data-odn-collapse-content] {
|
|
53
|
+
border-top: var(--odn-line-width) var(--odn-line-type) var(--odn-color-border);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[data-odn-collapse-content-inner] {
|
|
57
|
+
padding: var(--odn-collapse-content-padding);
|
|
58
|
+
background-color: #fff;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[data-odn-cp-popup-collpase-panel] {
|
|
62
|
+
border-bottom: var(--odn-line-width) var(--odn-line-type) var(--odn-color-border);
|
|
63
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
interface ColorPickerBaseProps {
|
|
4
|
+
/**
|
|
5
|
+
* 默认颜色值
|
|
6
|
+
*/
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 占位符
|
|
10
|
+
*/
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 禁用状态
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 调色板
|
|
18
|
+
*/
|
|
19
|
+
palettes?: {
|
|
20
|
+
title: string;
|
|
21
|
+
colors: string[];
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
interface ColorPickerWithClearProps extends ColorPickerBaseProps {
|
|
25
|
+
/**
|
|
26
|
+
* 是否可清空
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
allowClear?: true;
|
|
30
|
+
/**
|
|
31
|
+
* 当前颜色值(hex格式,不含#)
|
|
32
|
+
*/
|
|
33
|
+
value?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* 颜色变化回调
|
|
36
|
+
*/
|
|
37
|
+
onChange?: (value: string | null) => void;
|
|
38
|
+
}
|
|
39
|
+
interface ColorPickerWithoutClearProps extends ColorPickerBaseProps {
|
|
40
|
+
/**
|
|
41
|
+
* 是否可清空
|
|
42
|
+
*/
|
|
43
|
+
allowClear?: false;
|
|
44
|
+
/**
|
|
45
|
+
* 当前颜色值(hex格式,不含#)
|
|
46
|
+
*/
|
|
47
|
+
value?: string;
|
|
48
|
+
/**
|
|
49
|
+
* 颜色变化回调
|
|
50
|
+
*/
|
|
51
|
+
onChange?: (value: string) => void;
|
|
52
|
+
}
|
|
53
|
+
export type ColorPickerProps = ColorPickerWithClearProps | ColorPickerWithoutClearProps;
|
|
54
|
+
declare const ColorPicker: React.FC<ColorPickerProps>;
|
|
55
|
+
export default ColorPicker;
|