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,148 @@
|
|
|
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 = ["checked", "children", "className", "disabled", "helper", "helperIcon", "helperProps", "indeterminate", "onChange", "onClick", "onMouseDown", "size", "value"];
|
|
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 _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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
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
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
import clsx from 'clsx';
|
|
16
|
+
import React, { forwardRef, useContext, useRef, useState } from 'react';
|
|
17
|
+
import { useActive } from "../_util/useActive";
|
|
18
|
+
import { getComputedSize } from "../config-provider";
|
|
19
|
+
import Icon from "../icon";
|
|
20
|
+
import Popover from "../popover";
|
|
21
|
+
import { GroupContext } from "./Context";
|
|
22
|
+
import Group from "./Group";
|
|
23
|
+
var prefix = 'odn-checkbox';
|
|
24
|
+
/**
|
|
25
|
+
* 勾选提供用户在多个选项中,对选项的内容进行单或多个选择。
|
|
26
|
+
*/
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
var Checkbox = /*#__PURE__*/forwardRef(function (_ref, refProp) {
|
|
29
|
+
var _ref$checked = _ref.checked,
|
|
30
|
+
checkedProp = _ref$checked === void 0 ? null : _ref$checked,
|
|
31
|
+
_ref$children = _ref.children,
|
|
32
|
+
children = _ref$children === void 0 ? '' : _ref$children,
|
|
33
|
+
_ref$className = _ref.className,
|
|
34
|
+
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
35
|
+
_ref$disabled = _ref.disabled,
|
|
36
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
37
|
+
_ref$helper = _ref.helper,
|
|
38
|
+
helper = _ref$helper === void 0 ? null : _ref$helper,
|
|
39
|
+
_ref$helperIcon = _ref.helperIcon,
|
|
40
|
+
helperIcon = _ref$helperIcon === void 0 ? 'help-circle' : _ref$helperIcon,
|
|
41
|
+
_ref$helperProps = _ref.helperProps,
|
|
42
|
+
helperProps = _ref$helperProps === void 0 ? {
|
|
43
|
+
popup: helper
|
|
44
|
+
} : _ref$helperProps,
|
|
45
|
+
_ref$indeterminate = _ref.indeterminate,
|
|
46
|
+
indeterminate = _ref$indeterminate === void 0 ? false : _ref$indeterminate,
|
|
47
|
+
_ref$onChange = _ref.onChange,
|
|
48
|
+
onChange = _ref$onChange === void 0 ? null : _ref$onChange,
|
|
49
|
+
_ref$onClick = _ref.onClick,
|
|
50
|
+
onClick = _ref$onClick === void 0 ? null : _ref$onClick,
|
|
51
|
+
_ref$onMouseDown = _ref.onMouseDown,
|
|
52
|
+
onMouseDown = _ref$onMouseDown === void 0 ? undefined : _ref$onMouseDown,
|
|
53
|
+
sizeProp = _ref.size,
|
|
54
|
+
_ref$value = _ref.value,
|
|
55
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
56
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
57
|
+
var _useState = useState(!!checkedProp),
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
checked = _useState2[0],
|
|
60
|
+
setChecked = _useState2[1];
|
|
61
|
+
var _useContext = useContext(GroupContext),
|
|
62
|
+
disabledContext = _useContext.disabled,
|
|
63
|
+
handleGroupValueChange = _useContext.handleGroupValueChange,
|
|
64
|
+
sizeContext = _useContext.size,
|
|
65
|
+
valueContext = _useContext.value;
|
|
66
|
+
var labelRef = useRef(null);
|
|
67
|
+
var ref = refProp || labelRef;
|
|
68
|
+
var _useActive = useActive({
|
|
69
|
+
ref: ref
|
|
70
|
+
}),
|
|
71
|
+
handleMouseDown = _useActive.handleMouseDown;
|
|
72
|
+
|
|
73
|
+
// 相当于生命周期 getDerivedStateFromProps
|
|
74
|
+
if (checkedProp !== null && checked !== !!checkedProp) {
|
|
75
|
+
setChecked(!!checkedProp);
|
|
76
|
+
}
|
|
77
|
+
var size = getComputedSize(sizeProp, sizeContext);
|
|
78
|
+
var valueComputed = value !== null ? value : children === null || children === void 0 ? void 0 : children.toString();
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 当有 context context 时,使用 value:
|
|
82
|
+
* 如果存在 value prop,则直接使用 value;
|
|
83
|
+
* 如果不存在,就 string 化 children 作为 value。
|
|
84
|
+
*/
|
|
85
|
+
var classSet = clsx(className, "".concat(prefix, "-base"), "".concat(prefix, "-").concat(size), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefix, "-checked"), indeterminate || (valueContext ? valueComputed !== null && valueComputed !== undefined && valueContext.includes(valueComputed) : checked)), "".concat(prefix, "-noChildren"), !children), "".concat(prefix, "-disabled"), disabledContext || disabled), "".concat(prefix, "-indeterminate"), indeterminate));
|
|
86
|
+
var popover = helper ? /*#__PURE__*/React.createElement("span", {
|
|
87
|
+
role: "none",
|
|
88
|
+
onClick: function onClick(e) {
|
|
89
|
+
e.stopPropagation();
|
|
90
|
+
}
|
|
91
|
+
}, /*#__PURE__*/React.createElement(Popover, helperProps, /*#__PURE__*/React.createElement(Icon, {
|
|
92
|
+
name: helperIcon || 'help-circle',
|
|
93
|
+
color: "var(--gray-600)",
|
|
94
|
+
className: "".concat(prefix, "-helper")
|
|
95
|
+
}))) : null;
|
|
96
|
+
var handleClick = function handleClick(e) {
|
|
97
|
+
if (onClick) {
|
|
98
|
+
onClick(e);
|
|
99
|
+
}
|
|
100
|
+
if (disabled || disabledContext) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (handleGroupValueChange && valueComputed !== null && valueComputed !== undefined) {
|
|
104
|
+
handleGroupValueChange(valueComputed);
|
|
105
|
+
} else {
|
|
106
|
+
if (checkedProp === null) {
|
|
107
|
+
setChecked(!checked);
|
|
108
|
+
}
|
|
109
|
+
if (onChange) {
|
|
110
|
+
onChange(!checked, {
|
|
111
|
+
e: e
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
117
|
+
if (e.key === 'Enter') {
|
|
118
|
+
handleClick(e);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
var handleLabelMouseDown = function handleLabelMouseDown(e) {
|
|
122
|
+
if (onMouseDown) {
|
|
123
|
+
onMouseDown(e);
|
|
124
|
+
}
|
|
125
|
+
handleMouseDown();
|
|
126
|
+
};
|
|
127
|
+
return /*#__PURE__*/React.createElement("label", _extends({
|
|
128
|
+
"aria-checked": checked,
|
|
129
|
+
"data-odn-checkbox-size": size,
|
|
130
|
+
className: classSet,
|
|
131
|
+
onClick: handleClick,
|
|
132
|
+
onKeyDown: handleKeyDown,
|
|
133
|
+
ref: ref,
|
|
134
|
+
role: "checkbox",
|
|
135
|
+
onMouseDown: handleLabelMouseDown
|
|
136
|
+
}, otherProps), /*#__PURE__*/React.createElement("span", {
|
|
137
|
+
className: "".concat(prefix, "-input"),
|
|
138
|
+
"data-odn-checkbox-input": true
|
|
139
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
140
|
+
className: "".concat(prefix, "-indicator"),
|
|
141
|
+
"data-odn-checkbox-indicator": true
|
|
142
|
+
})), !!children && /*#__PURE__*/React.createElement("span", {
|
|
143
|
+
"data-odn-checkbox-label": true
|
|
144
|
+
}, children), popover);
|
|
145
|
+
});
|
|
146
|
+
Checkbox.Group = Group;
|
|
147
|
+
Checkbox.displayName = 'Checkbox';
|
|
148
|
+
export default Checkbox;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type ContextProps = {
|
|
3
|
+
/**
|
|
4
|
+
* 是否禁用
|
|
5
|
+
*/
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* 值改变的 handler,传递下去由子组件触发
|
|
9
|
+
*/
|
|
10
|
+
handleGroupValueChange?: (checkboxValue: string | number) => void;
|
|
11
|
+
/**
|
|
12
|
+
* 设置尺寸
|
|
13
|
+
*/
|
|
14
|
+
size?: 'small' | 'medium' | 'large';
|
|
15
|
+
/**
|
|
16
|
+
* 已选中的值
|
|
17
|
+
*/
|
|
18
|
+
value?: null | Array<string | number>;
|
|
19
|
+
};
|
|
20
|
+
export declare const GroupContext: React.Context<ContextProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ValueType = string | number;
|
|
3
|
+
export interface CheckboxGroupProps<T extends ValueType = ValueType> {
|
|
4
|
+
/**
|
|
5
|
+
* 子节点
|
|
6
|
+
*/
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* 附加类名
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 默认已选中的值
|
|
14
|
+
*/
|
|
15
|
+
defaultValue?: null | Array<T>;
|
|
16
|
+
/**
|
|
17
|
+
* 是否禁用
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 选中态变化时的 handler
|
|
22
|
+
*/
|
|
23
|
+
onChange?: null | ((value: Array<T>) => void);
|
|
24
|
+
/**
|
|
25
|
+
* 设置尺寸
|
|
26
|
+
*/
|
|
27
|
+
size?: 'small' | 'medium' | 'large';
|
|
28
|
+
/**
|
|
29
|
+
* 已选中的值
|
|
30
|
+
*/
|
|
31
|
+
value?: null | Array<T>;
|
|
32
|
+
/**
|
|
33
|
+
* 选项列表
|
|
34
|
+
*/
|
|
35
|
+
options?: Array<{
|
|
36
|
+
label: string;
|
|
37
|
+
value: T;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* 是否垂直排列
|
|
42
|
+
*/
|
|
43
|
+
vertical?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 勾选组
|
|
47
|
+
*/
|
|
48
|
+
declare function Group<T extends ValueType = ValueType>({ children, className, defaultValue, disabled, onChange, size, value: valueProp, options, vertical, ...otherProps }: CheckboxGroupProps<T>): React.JSX.Element;
|
|
49
|
+
export default Group;
|
|
@@ -0,0 +1,125 @@
|
|
|
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 = ["children", "className", "defaultValue", "disabled", "onChange", "size", "value", "options", "vertical"],
|
|
3
|
+
_excluded2 = ["value", "label"];
|
|
4
|
+
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); }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
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."); }
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
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."); }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
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; } }
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
import clsx from 'clsx';
|
|
21
|
+
import React, { useState } from 'react';
|
|
22
|
+
import Checkbox from "./Checkbox";
|
|
23
|
+
import { GroupContext } from "./Context";
|
|
24
|
+
var prefix = 'odn-checkbox';
|
|
25
|
+
/**
|
|
26
|
+
* 勾选组
|
|
27
|
+
*/
|
|
28
|
+
function Group(_ref) {
|
|
29
|
+
var children = _ref.children,
|
|
30
|
+
_ref$className = _ref.className,
|
|
31
|
+
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
32
|
+
_ref$defaultValue = _ref.defaultValue,
|
|
33
|
+
defaultValue = _ref$defaultValue === void 0 ? null : _ref$defaultValue,
|
|
34
|
+
_ref$disabled = _ref.disabled,
|
|
35
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
36
|
+
_ref$onChange = _ref.onChange,
|
|
37
|
+
onChange = _ref$onChange === void 0 ? null : _ref$onChange,
|
|
38
|
+
_ref$size = _ref.size,
|
|
39
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
40
|
+
_ref$value = _ref.value,
|
|
41
|
+
valueProp = _ref$value === void 0 ? null : _ref$value,
|
|
42
|
+
_ref$options = _ref.options,
|
|
43
|
+
options = _ref$options === void 0 ? [] : _ref$options,
|
|
44
|
+
_ref$vertical = _ref.vertical,
|
|
45
|
+
vertical = _ref$vertical === void 0 ? false : _ref$vertical,
|
|
46
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
+
/**
|
|
48
|
+
* 初始化 value state
|
|
49
|
+
* 1. 优先判断 Prop value,如果存在 Prop value,则 Group 完全交由外部控制,内部状态无效;
|
|
50
|
+
* 2. 再判断 Prop defaultValue,如果存在默认值,则 Group 状态为此默认值;
|
|
51
|
+
* 3. 最后判断 Checkbox children 是否自身存在 Prop checked。
|
|
52
|
+
*
|
|
53
|
+
* 以上三个判断可能存在冲突,所以在此说明条件判断的优先级。
|
|
54
|
+
*/
|
|
55
|
+
var _useState = useState(function () {
|
|
56
|
+
var checkedValue;
|
|
57
|
+
if (valueProp !== null) {
|
|
58
|
+
checkedValue = valueProp;
|
|
59
|
+
} else if (defaultValue !== null) {
|
|
60
|
+
checkedValue = defaultValue;
|
|
61
|
+
}
|
|
62
|
+
return checkedValue;
|
|
63
|
+
}),
|
|
64
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
+
value = _useState2[0],
|
|
66
|
+
setValue = _useState2[1];
|
|
67
|
+
|
|
68
|
+
// 相当于生命周期 getDerivedStateFromProps
|
|
69
|
+
if (Array.isArray(valueProp) && value !== valueProp) {
|
|
70
|
+
setValue(valueProp);
|
|
71
|
+
}
|
|
72
|
+
var handleChange = function handleChange(val) {
|
|
73
|
+
if (onChange) {
|
|
74
|
+
onChange(val);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var handleGroupValueChange = function handleGroupValueChange(checkboxValue) {
|
|
78
|
+
if (value) {
|
|
79
|
+
/**
|
|
80
|
+
* 不要直接在 value 上进行数组操作,这样会在 setState 之前就改变了 value 的值。
|
|
81
|
+
* shouldComponentUpdate 将会 return false
|
|
82
|
+
*/
|
|
83
|
+
var valueDuplicate = _toConsumableArray(value);
|
|
84
|
+
var index = valueDuplicate.indexOf(checkboxValue);
|
|
85
|
+
if (index !== -1) {
|
|
86
|
+
valueDuplicate.splice(index, 1);
|
|
87
|
+
} else {
|
|
88
|
+
valueDuplicate.push(checkboxValue);
|
|
89
|
+
}
|
|
90
|
+
if (valueProp === null) {
|
|
91
|
+
setValue(valueDuplicate);
|
|
92
|
+
}
|
|
93
|
+
handleChange(valueDuplicate);
|
|
94
|
+
} else {
|
|
95
|
+
if (valueProp === null) {
|
|
96
|
+
setValue([checkboxValue]);
|
|
97
|
+
}
|
|
98
|
+
handleChange([checkboxValue]);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
var classSet = clsx(className, "".concat(prefix, "-group"), _defineProperty({}, "".concat(prefix, "-disabled"), disabled));
|
|
102
|
+
return /*#__PURE__*/React.createElement(GroupContext.Provider, {
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
value: {
|
|
105
|
+
disabled: disabled,
|
|
106
|
+
handleGroupValueChange: handleGroupValueChange,
|
|
107
|
+
size: size,
|
|
108
|
+
value: value
|
|
109
|
+
}
|
|
110
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
111
|
+
className: classSet,
|
|
112
|
+
"data-odn-checkbox-group-size": size,
|
|
113
|
+
"data-value": value,
|
|
114
|
+
"data-odn-checkbox-group-vertical": vertical
|
|
115
|
+
}, otherProps), (options === null || options === void 0 ? void 0 : options.length) > 0 ? options.map(function (_ref2) {
|
|
116
|
+
var value = _ref2.value,
|
|
117
|
+
label = _ref2.label,
|
|
118
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
119
|
+
return /*#__PURE__*/React.createElement(Checkbox, _extends({
|
|
120
|
+
key: value,
|
|
121
|
+
value: value
|
|
122
|
+
}, otherProps), label);
|
|
123
|
+
}) : children));
|
|
124
|
+
}
|
|
125
|
+
export default Group;
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
html {
|
|
2
|
+
--odn-checkbox-gap-small: 24px;
|
|
3
|
+
--odn-checkbox-gap-small-vertical: 12px;
|
|
4
|
+
--odn-checkbox-height-small: 20px;
|
|
5
|
+
--odn-checkbox-label-font-size-small: 12px;
|
|
6
|
+
--odn-checkbox-label-line-height-small: 1.66666667;
|
|
7
|
+
--odn-checkbox-input-gap-small: 6px;
|
|
8
|
+
--odn-checkbox-input-size-small: 14px;
|
|
9
|
+
--odn-checkbox-input-border-radius-small: 4px;
|
|
10
|
+
--odn-checkbox-indicator-scale-small: 0.875;
|
|
11
|
+
--odn-checkbox-gap-medium: 24px;
|
|
12
|
+
--odn-checkbox-gap-medium-vertical: 12px;
|
|
13
|
+
--odn-checkbox-height-medium: 22px;
|
|
14
|
+
--odn-checkbox-label-font-size-medium: 14px;
|
|
15
|
+
--odn-checkbox-label-line-height-medium: 1.57142857;
|
|
16
|
+
--odn-checkbox-input-gap-medium: 8px;
|
|
17
|
+
--odn-checkbox-input-size-medium: 16px;
|
|
18
|
+
--odn-checkbox-input-border-radius-medium: 4px;
|
|
19
|
+
--odn-checkbox-indicator-scale-medium: 1;
|
|
20
|
+
--odn-checkbox-gap-large: 24px;
|
|
21
|
+
--odn-checkbox-gap-large-vertical: 12px;
|
|
22
|
+
--odn-checkbox-height-large: 24px;
|
|
23
|
+
--odn-checkbox-label-font-size-large: 16px;
|
|
24
|
+
--odn-checkbox-label-line-height-large: 1.5;
|
|
25
|
+
--odn-checkbox-input-gap-large: 8px;
|
|
26
|
+
--odn-checkbox-input-size-large: 18px;
|
|
27
|
+
--odn-checkbox-input-border-radius-large: 4px;
|
|
28
|
+
--odn-checkbox-indicator-scale-large: 1.125;
|
|
29
|
+
--odn-checkbox-indicator-bg: var(--odn-color-white);
|
|
30
|
+
--odn-checkbox-color: var(--odn-color-black-12);
|
|
31
|
+
--odn-checkbox-input-bg: var(--odn-color-white);
|
|
32
|
+
--odn-checkbox-input-border: 1px solid var(--odn-color-black-6);
|
|
33
|
+
--odn-checkbox-input-shadow: none;
|
|
34
|
+
--odn-checkbox-input-bg-hover: var(--odn-color-white);
|
|
35
|
+
--odn-checkbox-input-border-hover: 1px solid var(--odn-color-black-7);
|
|
36
|
+
--odn-checkbox-input-shadow-hover: none;
|
|
37
|
+
--odn-checkbox-color-checked: var(--odn-color-black-12);
|
|
38
|
+
--odn-checkbox-input-bg-checked: var(--odn-color-blue-6);
|
|
39
|
+
--odn-checkbox-input-border-checked: 1px solid var(--odn-color-blue-6);
|
|
40
|
+
--odn-checkbox-input-shadow-checked: none;
|
|
41
|
+
--odn-checkbox-input-bg-checked-hover: var(--odn-color-blue-7);
|
|
42
|
+
--odn-checkbox-input-border-checked-hover: 1px solid var(--odn-color-blue-7);
|
|
43
|
+
--odn-checkbox-input-shadow-checked-hover: none;
|
|
44
|
+
--odn-checkbox-input-bg-checked-focus: var(--odn-color-white);
|
|
45
|
+
--odn-checkbox-input-border-checked-focus: 1px solid var(--odn-color-blue-6);
|
|
46
|
+
--odn-checkbox-input-shadow-checked-focus: 0 0 0 2px var(--odn-color-blue-2);
|
|
47
|
+
--odn-checkbox-color-disabled: var(--odn-color-black-8);
|
|
48
|
+
--odn-checkbox-input-bg-disabled: var(--odn-color-black-3);
|
|
49
|
+
--odn-checkbox-input-border-disabled: 1px solid var(--odn-color-black-6);
|
|
50
|
+
--odn-checkbox-input-shadow-disabled: none;
|
|
51
|
+
--odn-checkbox-color-checked-disabled: var(--odn-color-black-8);
|
|
52
|
+
--odn-checkbox-input-bg-checked-disabled: var(--odn-color-blue-2);
|
|
53
|
+
--odn-checkbox-input-border-checked-disabled: 1px solid
|
|
54
|
+
var(--odn-color-blue-2);
|
|
55
|
+
--odn-checkbox-input-shadow-checked-disabled: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.odn-checkbox-base {
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
}
|
|
62
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled) {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
color: var(--odn-checkbox-color);
|
|
65
|
+
}
|
|
66
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled):not(.odn-checkbox-checked, .odn-checkbox-indeterminate):hover .odn-checkbox-input {
|
|
67
|
+
background: var(--odn-checkbox-input-bg-hover);
|
|
68
|
+
border: var(--odn-checkbox-input-border-hover);
|
|
69
|
+
box-shadow: var(--odn-checkbox-input-shadow-hover);
|
|
70
|
+
}
|
|
71
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled):not(.odn-checkbox-checked, .odn-checkbox-indeterminate):hover:active[data-actived=true] .odn-checkbox-input {
|
|
72
|
+
background: var(--odn-color-white);
|
|
73
|
+
border: var(--odn-checkbox-input-border-checked-focus);
|
|
74
|
+
box-shadow: var(--odn-checkbox-input-shadow-checked-focus);
|
|
75
|
+
}
|
|
76
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled):not(.odn-checkbox-checked, .odn-checkbox-indeterminate):hover:active[data-actived=true] .odn-checkbox-indicator {
|
|
77
|
+
transform: rotate(45deg) scale(1);
|
|
78
|
+
transition: 0s ease;
|
|
79
|
+
}
|
|
80
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled):not(.odn-checkbox-checked, .odn-checkbox-indeterminate):hover:active[data-actived=true] .odn-checkbox-indicator::before {
|
|
81
|
+
background: var(--odn-checkbox-input-bg-checked);
|
|
82
|
+
transform: scale(1, 1);
|
|
83
|
+
transition: 0.1s ease transform;
|
|
84
|
+
}
|
|
85
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled):not(.odn-checkbox-checked, .odn-checkbox-indeterminate):hover:active[data-actived=true] .odn-checkbox-indicator::after {
|
|
86
|
+
background: var(--odn-checkbox-input-bg-checked);
|
|
87
|
+
transition: 0.1s ease background-color;
|
|
88
|
+
}
|
|
89
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled).odn-checkbox-checked .odn-checkbox-input {
|
|
90
|
+
background: var(--odn-checkbox-input-bg-checked);
|
|
91
|
+
border: var(--odn-checkbox-input-border-checked);
|
|
92
|
+
box-shadow: var(--odn-checkbox-input-shadow-checked);
|
|
93
|
+
}
|
|
94
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled).odn-checkbox-checked .odn-checkbox-indicator::after {
|
|
95
|
+
transition: 0.25s cubic-bezier(0.32, 0.72, 0, 1) transform;
|
|
96
|
+
}
|
|
97
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled).odn-checkbox-checked:hover .odn-checkbox-input {
|
|
98
|
+
background: var(--odn-checkbox-input-bg-checked-hover);
|
|
99
|
+
border: var(--odn-checkbox-input-border-checked-hover);
|
|
100
|
+
box-shadow: var(--odn-checkbox-input-shadow-checked-hover);
|
|
101
|
+
}
|
|
102
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled).odn-checkbox-checked:hover:active .odn-checkbox-input {
|
|
103
|
+
background: var(--odn-checkbox-input-bg-checked-focus);
|
|
104
|
+
border: var(--odn-checkbox-input-border-checked-focus);
|
|
105
|
+
box-shadow: var(--odn-checkbox-input-shadow-checked-focus);
|
|
106
|
+
animation: none;
|
|
107
|
+
}
|
|
108
|
+
.odn-checkbox-base:not(.odn-checkbox-disabled).odn-checkbox-checked:hover:active[data-actived=true] .odn-checkbox-indicator::after {
|
|
109
|
+
transform: scale(1, 0);
|
|
110
|
+
transition: 0.25s cubic-bezier(0.32, 0.72, 0, 1) transform;
|
|
111
|
+
}
|
|
112
|
+
.odn-checkbox-base.odn-checkbox-disabled.odn-checkbox-checked .odn-checkbox-input {
|
|
113
|
+
background: var(--odn-checkbox-input-bg-checked-disabled);
|
|
114
|
+
border: var(--odn-checkbox-input-border-checked-disabled);
|
|
115
|
+
box-shadow: var(--odn-checkbox-input-shadow-checked-disabled);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.odn-checkbox-input {
|
|
119
|
+
position: relative;
|
|
120
|
+
display: inline-block;
|
|
121
|
+
background: var(--odn-checkbox-input-bg);
|
|
122
|
+
border: var(--odn-checkbox-input-border);
|
|
123
|
+
box-shadow: var(--odn-checkbox-input-shadow);
|
|
124
|
+
border-radius: 2px;
|
|
125
|
+
transition: all cubic-bezier(0.32, 0.72, 0, 1) 0.25s;
|
|
126
|
+
animation: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.odn-checkbox-indicator {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: calc(50% - 5px);
|
|
132
|
+
left: calc(50% - 2.5px);
|
|
133
|
+
width: 5px;
|
|
134
|
+
height: 8px;
|
|
135
|
+
transform: rotate(45deg) scale(0);
|
|
136
|
+
}
|
|
137
|
+
.odn-checkbox-indicator::before, .odn-checkbox-indicator::after {
|
|
138
|
+
content: "";
|
|
139
|
+
position: absolute;
|
|
140
|
+
bottom: 0;
|
|
141
|
+
background: #fff;
|
|
142
|
+
transition: 0.25s ease opacity, 0s ease 0.25s transform, 0s ease 0.25s background-color;
|
|
143
|
+
}
|
|
144
|
+
.odn-checkbox-indicator::before {
|
|
145
|
+
left: 0;
|
|
146
|
+
width: 100%;
|
|
147
|
+
height: 2px;
|
|
148
|
+
transform-origin: 0 50%;
|
|
149
|
+
transform: scale(0, 1);
|
|
150
|
+
}
|
|
151
|
+
.odn-checkbox-indicator::after {
|
|
152
|
+
right: 0;
|
|
153
|
+
width: 2px;
|
|
154
|
+
height: 100%;
|
|
155
|
+
transform-origin: 50% 100%;
|
|
156
|
+
transform: scale(1, 0);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Checkbox.Group
|
|
161
|
+
*/
|
|
162
|
+
.odn-checkbox-group {
|
|
163
|
+
display: flex;
|
|
164
|
+
flex-wrap: wrap;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.odn-checkbox-noChildren {
|
|
168
|
+
line-height: 0;
|
|
169
|
+
}
|
|
170
|
+
.odn-checkbox-noChildren .odn-checkbox-input {
|
|
171
|
+
margin-right: 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.odn-checkbox-checked:not([data-actived=true]) .odn-checkbox-input {
|
|
175
|
+
animation: aduiCheckboxIndicatorScale ease 0.25s both;
|
|
176
|
+
}
|
|
177
|
+
@keyframes aduiCheckboxIndicatorScale {
|
|
178
|
+
0% {
|
|
179
|
+
transform: scale(1, 1);
|
|
180
|
+
}
|
|
181
|
+
60% {
|
|
182
|
+
transform: scale(1.05, 1.05);
|
|
183
|
+
}
|
|
184
|
+
100% {
|
|
185
|
+
transform: scale(1, 1);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
.odn-checkbox-checked:not([data-actived=true]):not(.odn-checkbox-indeterminate) .odn-checkbox-indicator {
|
|
189
|
+
transform: rotate(45deg) scale(1);
|
|
190
|
+
transition: 0.25s cubic-bezier(0.32, 0.72, 0, 1) all;
|
|
191
|
+
}
|
|
192
|
+
.odn-checkbox-checked:not([data-actived=true]):not(.odn-checkbox-indeterminate) .odn-checkbox-indicator::before, .odn-checkbox-checked:not([data-actived=true]):not(.odn-checkbox-indeterminate) .odn-checkbox-indicator::after {
|
|
193
|
+
transform: scale(1, 1);
|
|
194
|
+
transition: 0s ease all !important;
|
|
195
|
+
}
|
|
196
|
+
.odn-checkbox-checked .odn-checkbox-indicator {
|
|
197
|
+
transform: rotate(45deg) scale(1);
|
|
198
|
+
transition: 0s;
|
|
199
|
+
}
|
|
200
|
+
.odn-checkbox-checked .odn-checkbox-indicator::before, .odn-checkbox-checked .odn-checkbox-indicator::after {
|
|
201
|
+
background: var(--odn-color-white);
|
|
202
|
+
transform: scale(1, 1);
|
|
203
|
+
transition: 0.25s cubic-bezier(0.32, 0.72, 0, 1) transform;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.odn-checkbox-indeterminate .odn-checkbox-input {
|
|
207
|
+
background: var(--odn-checkbox-bg-checked);
|
|
208
|
+
border: var(--odn-checkbox-input-border-checked);
|
|
209
|
+
box-shadow: var(--odn-checkbox-input-shadow-checked);
|
|
210
|
+
}
|
|
211
|
+
.odn-checkbox-indeterminate .odn-checkbox-indicator {
|
|
212
|
+
position: absolute;
|
|
213
|
+
top: 50%;
|
|
214
|
+
left: 50%;
|
|
215
|
+
width: 10px;
|
|
216
|
+
height: 2px;
|
|
217
|
+
background: #fff;
|
|
218
|
+
transform: translate(-50%, -50%);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.odn-checkbox-disabled {
|
|
222
|
+
cursor: not-allowed;
|
|
223
|
+
}
|
|
224
|
+
.odn-checkbox-disabled .odn-checkbox-input {
|
|
225
|
+
background: var(--odn-checkbox-input-bg-disabled);
|
|
226
|
+
border: var(--odn-checkbox-input-border-disabled);
|
|
227
|
+
box-shadow: var(--odn-checkbox-input-shadow-disabled);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
[data-odn-checkbox-group-size=small] {
|
|
231
|
+
gap: var(--odn-checkbox-gap-small);
|
|
232
|
+
}
|
|
233
|
+
[data-odn-checkbox-group-size=small][data-odn-checkbox-group-vertical=true] {
|
|
234
|
+
flex-direction: column;
|
|
235
|
+
gap: var(--odn-checkbox-gap-small-vertical);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
[data-odn-checkbox-size=small] {
|
|
239
|
+
height: var(--odn-checkbox-height-small);
|
|
240
|
+
font-size: var(--odn-checkbox-label-font-size-small);
|
|
241
|
+
line-height: var(--odn-checkbox-label-line-height-small);
|
|
242
|
+
}
|
|
243
|
+
[data-odn-checkbox-size=small] [data-odn-checkbox-input] {
|
|
244
|
+
width: var(--odn-checkbox-input-size-small);
|
|
245
|
+
height: var(--odn-checkbox-input-size-small);
|
|
246
|
+
border-radius: var(--odn-checkbox-input-border-radius-small);
|
|
247
|
+
}
|
|
248
|
+
[data-odn-checkbox-size=small] [data-odn-checkbox-label] {
|
|
249
|
+
padding-inline-start: var(--odn-checkbox-input-gap-small);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.odn-checkbox-checked .odn-checkbox-input::after {
|
|
253
|
+
transform: scale(var(--odn-checkbox-indicator-scale-small));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
[data-odn-checkbox-group-size=medium] {
|
|
257
|
+
gap: var(--odn-checkbox-gap-medium);
|
|
258
|
+
}
|
|
259
|
+
[data-odn-checkbox-group-size=medium][data-odn-checkbox-group-vertical=true] {
|
|
260
|
+
flex-direction: column;
|
|
261
|
+
gap: var(--odn-checkbox-gap-medium-vertical);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
[data-odn-checkbox-size=medium] {
|
|
265
|
+
height: var(--odn-checkbox-height-medium);
|
|
266
|
+
font-size: var(--odn-checkbox-label-font-size-medium);
|
|
267
|
+
line-height: var(--odn-checkbox-label-line-height-medium);
|
|
268
|
+
}
|
|
269
|
+
[data-odn-checkbox-size=medium] [data-odn-checkbox-input] {
|
|
270
|
+
width: var(--odn-checkbox-input-size-medium);
|
|
271
|
+
height: var(--odn-checkbox-input-size-medium);
|
|
272
|
+
border-radius: var(--odn-checkbox-input-border-radius-medium);
|
|
273
|
+
}
|
|
274
|
+
[data-odn-checkbox-size=medium] [data-odn-checkbox-label] {
|
|
275
|
+
padding-inline-start: var(--odn-checkbox-input-gap-medium);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.odn-checkbox-checked .odn-checkbox-input::after {
|
|
279
|
+
transform: scale(var(--odn-checkbox-indicator-scale-medium));
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
[data-odn-checkbox-group-size=large] {
|
|
283
|
+
gap: var(--odn-checkbox-gap-large);
|
|
284
|
+
}
|
|
285
|
+
[data-odn-checkbox-group-size=large][data-odn-checkbox-group-vertical=true] {
|
|
286
|
+
flex-direction: column;
|
|
287
|
+
gap: var(--odn-checkbox-gap-large-vertical);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
[data-odn-checkbox-size=large] {
|
|
291
|
+
height: var(--odn-checkbox-height-large);
|
|
292
|
+
font-size: var(--odn-checkbox-label-font-size-large);
|
|
293
|
+
line-height: var(--odn-checkbox-label-line-height-large);
|
|
294
|
+
}
|
|
295
|
+
[data-odn-checkbox-size=large] [data-odn-checkbox-input] {
|
|
296
|
+
width: var(--odn-checkbox-input-size-large);
|
|
297
|
+
height: var(--odn-checkbox-input-size-large);
|
|
298
|
+
border-radius: var(--odn-checkbox-input-border-radius-large);
|
|
299
|
+
}
|
|
300
|
+
[data-odn-checkbox-size=large] [data-odn-checkbox-label] {
|
|
301
|
+
padding-inline-start: var(--odn-checkbox-input-gap-large);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.odn-checkbox-checked .odn-checkbox-input::after {
|
|
305
|
+
transform: scale(var(--odn-checkbox-indicator-scale-large));
|
|
306
|
+
}
|