@unicom-cloud/ui 0.8.67 → 0.8.68
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/Affix.js +15 -124
- package/Alert.js +13 -110
- package/Anchor.js +2 -2
- package/AutoComplete.js +15 -146
- package/Avatar.js +4 -154
- package/BackTop.js +14 -83
- package/Badge.js +12 -176
- package/Breadcrumb.js +12 -138
- package/Button.js +12 -149
- package/Calendar.js +12 -569
- package/Card.js +10 -136
- package/Carousel.js +13 -380
- package/Cascader.js +2 -2
- package/Checkbox.js +2 -2
- package/Collapse.js +2 -2
- package/ColorPicker.js +14 -582
- package/Comment.js +10 -71
- package/ConfigProvider.js +5 -6
- package/Copy.js +12 -61
- package/DatePicker.js +11 -2043
- package/Descriptions.js +11 -176
- package/Divider.js +7 -38
- package/Draggable.js +7 -90
- package/Drawer.js +2 -2
- package/Dropdown.js +15 -199
- package/Empty.js +2 -2
- package/Form.js +16 -1455
- package/Grid.js +9 -252
- package/Icon.js +7 -55
- package/IconHover.js +1 -1
- package/Image.js +6 -5
- package/Input.js +12 -12
- package/InputNumber.js +7 -5
- package/InputTag.js +2 -2
- package/Layout.js +16 -56
- package/Link.js +9 -60
- package/List.js +18 -312
- package/Loading.js +4 -59
- package/Mentions.js +12 -164
- package/Menu.js +8 -7
- package/Message.js +6 -5
- package/Modal.js +2 -2
- package/Notice.js +5 -6
- package/Notification.js +7 -6
- package/OverflowEllipsis.js +8 -98
- package/PageHeader.js +13 -113
- package/Pagination.js +2 -2
- package/Picker.js +4 -3
- package/Popconfirm.js +13 -128
- package/Popover.js +10 -76
- package/Portal.js +5 -25
- package/Progress.js +11 -363
- package/Radio.js +5 -6
- package/Rate.js +14 -125
- package/ResizeBox.js +16 -558
- package/Result.js +14 -1434
- package/Select.js +5 -4
- package/SelectView.js +9 -425
- package/Skeleton.js +11 -94
- package/Slider.js +21 -776
- package/Space.js +11 -94
- package/SpeechSynthesis.js +48 -64
- package/Spin.js +11 -94
- package/Statistic.js +15 -192
- package/Steps.js +11 -148
- package/SuspenseFallbackTest.js +3 -10
- package/Switch.js +13 -114
- package/Table.js +16 -2097
- package/Tabs.js +6 -6
- package/Tag.js +13 -134
- package/TimePicker.js +7 -274
- package/Timeline.js +4 -4
- package/Tooltip.js +12 -137
- package/Transfer.js +14 -450
- package/Tree.js +3 -2
- package/TreeSelect.js +3 -4
- package/Trigger.js +21 -809
- package/Typography.js +10 -756
- package/Upload.js +4 -4
- package/VerificationCode.js +2 -2
- package/VirtualList.js +2 -2
- package/Watermark.js +2 -2
- package/affix/index.js +126 -0
- package/affix/interface.js +1 -0
- package/alert/index.js +112 -0
- package/alert/interface.js +1 -0
- package/anchor/Anchor.js +198 -0
- package/anchor/Link.js +52 -0
- package/anchor/context.js +14 -0
- package/anchor/index.js +4 -0
- package/anchor/interface.js +1 -0
- package/anchor/util.js +50 -0
- package/auto-complete/index.js +149 -0
- package/auto-complete/interface.js +1 -0
- package/avatar/Avatar.js +83 -0
- package/avatar/Group.js +82 -0
- package/avatar/context.js +5 -0
- package/avatar/index.js +7 -0
- package/avatar/interface.js +1 -0
- package/back-top/index.js +85 -0
- package/back-top/interface.js +1 -0
- package/badge/Count.js +35 -0
- package/badge/index.js +151 -0
- package/badge/interface.js +1 -0
- package/breadcrumb/Item.js +67 -0
- package/breadcrumb/index.js +81 -0
- package/breadcrumb/interface.js +1 -0
- package/button/Group.js +13 -0
- package/button/index.js +146 -0
- package/button/interface.js +1 -0
- package/calendar/Month.js +12 -0
- package/calendar/WeekList.js +24 -0
- package/calendar/Year.js +74 -0
- package/calendar/index.js +320 -0
- package/calendar/interface.js +1 -0
- package/card/Grid.js +25 -0
- package/card/Meta.js +30 -0
- package/card/index.js +99 -0
- package/card/interface.js +1 -0
- package/carousel/Arrow.js +55 -0
- package/carousel/Indicator.js +66 -0
- package/carousel/index.js +278 -0
- package/carousel/interface.js +1 -0
- package/cascader/Cascader.js +26 -0
- package/cascader/index.js +4 -0
- package/cascader/interface.js +1 -0
- package/cascader/util.js +14 -0
- package/checkbox/Checkbox.js +16 -0
- package/checkbox/Group.js +14 -0
- package/checkbox/IconCheck.js +19 -0
- package/checkbox/index.js +4 -0
- package/checkbox/interface.js +1 -0
- package/checkbox/useCheckbox.js +45 -0
- package/chunk/{qFf1w_Jq.js → 5_U1CBIu.js} +2 -2
- package/chunk/B2yFlXke.js +6 -0
- package/chunk/B4JiMp8I.js +764 -0
- package/chunk/B4YRLi8r.js +11 -0
- package/chunk/B5RFT17G.js +15 -0
- package/chunk/{CNmmhbCn.js → B6X4lnd0.js} +32 -32
- package/chunk/B7M-FGia.js +41 -0
- package/chunk/{B7FlazNB.js → BBkdXHrJ.js} +7 -7
- package/chunk/{BHF15Dog.js → BDB0LByj.js} +20 -20
- package/chunk/BFTV6myl.js +19 -0
- package/chunk/BJ1soa2K.js +178 -0
- package/chunk/BKKEev13.js +11 -0
- package/chunk/BKT9BFf4.js +11 -0
- package/chunk/BSCrLtfQ.js +10 -0
- package/chunk/{WpO_DsK4.js → BSaQv6mx.js} +62 -60
- package/chunk/BXAeh0_V.js +16 -0
- package/chunk/Bfq4YEcr.js +23 -0
- package/chunk/Bg3uJGPu.js +10 -0
- package/chunk/{C_gJWGGh.js → Bi4UkwOR.js} +180 -168
- package/chunk/BibHFOCF.js +34 -0
- package/chunk/Biupwn8l.js +24 -0
- package/chunk/{BCftTxEy.js → BjpUSKM3.js} +184 -181
- package/chunk/{Cf5QNhkG.js → Bl7BnD1R.js} +15 -15
- package/chunk/BsY85n3_.js +14 -0
- package/chunk/C48SmsN-.js +38 -0
- package/chunk/C4OrxKE6.js +18 -0
- package/chunk/C98ks5S8.js +473 -0
- package/chunk/CC---6jO.js +110 -0
- package/chunk/{DleQ5HwG.js → CCv-5KFt.js} +58 -58
- package/chunk/CD3AUpzo.js +166 -0
- package/chunk/CIRG541s.js +22 -0
- package/chunk/CKyu68pu.js +312 -0
- package/chunk/CQ_WOOmf.js +8 -0
- package/chunk/{CKNyIitu.js → CVYWxu00.js} +10 -10
- package/chunk/CYhxqVkn.js +9 -0
- package/chunk/CbLaCJmG.js +26 -0
- package/chunk/CdaT1b_F.js +20 -0
- package/chunk/CftuXmo_.js +6 -0
- package/chunk/CgurXnoy.js +569 -0
- package/chunk/{DKr2_PYd.js → Clo26EcR.js} +10 -10
- package/chunk/ClqoGc3r.js +17 -0
- package/chunk/CmZzBtA4.js +16 -0
- package/chunk/CpGBWmuz.js +1461 -0
- package/chunk/CzQObzKd.js +1817 -0
- package/chunk/D-TPB2Do.js +56 -0
- package/chunk/D090jlwP.js +38 -0
- package/chunk/{CJ_o9tZM.js → D0ZWT7db.js} +1 -1
- package/chunk/DH7HTOV_.js +11 -0
- package/chunk/DKHXj8Kf.js +9 -0
- package/chunk/Dh7Osrvr.js +27 -0
- package/chunk/DonYzv30.js +14 -0
- package/chunk/DpoumMDw.js +50 -0
- package/chunk/Duezix3m.js +25 -0
- package/chunk/DxVvggX2.js +11 -0
- package/chunk/DzVH9IBy.js +1413 -0
- package/chunk/SSK90wgo.js +209 -0
- package/chunk/{CSC_V_25.js → URXCKjXr.js} +8 -8
- package/chunk/VSe_Wq1g.js +10 -0
- package/chunk/XTEsYGuF.js +17 -0
- package/chunk/b1e8awfs.js +31 -0
- package/chunk/hEWZQ8Zi.js +16 -0
- package/chunk/k-OUstoD.js +58 -0
- package/chunk/ll867Bf3.js +730 -0
- package/chunk/{CLiqJm_T.js → oopARUrq.js} +2 -2
- package/chunk/tamGhTJp.js +186 -0
- package/chunk/{CANgSlh3.js → uKZyjtff.js} +31 -31
- package/chunk/vmgkWLYf.js +843 -0
- package/chunk/yl4BU7Sd.js +1068 -0
- package/chunk/zmmqLCF4.js +20 -0
- package/collapse/Collapse.js +15 -0
- package/collapse/Item.js +11 -0
- package/collapse/index.js +4 -0
- package/collapse/interface.js +1 -0
- package/color-picker/ControlBar.js +63 -0
- package/color-picker/InputAlpha.js +22 -0
- package/color-picker/InputHex.js +55 -0
- package/color-picker/InputRgb.js +61 -0
- package/color-picker/Mode.js +10 -0
- package/color-picker/Palette.js +34 -0
- package/color-picker/Panel.js +268 -0
- package/color-picker/colors.js +37 -0
- package/color-picker/index.js +270 -0
- package/color-picker/interface.js +4 -0
- package/color-picker/utils.js +89 -0
- package/comment/index.js +73 -0
- package/comment/interface.js +1 -0
- package/config-provider/ConfigProvider.js +15 -0
- package/config-provider/context.js +8 -0
- package/config-provider/index.js +8 -0
- package/config-provider/interface.js +1 -0
- package/copy/index.js +63 -0
- package/copy/interface.js +1 -0
- package/date-picker/Picker.js +410 -0
- package/date-picker/PickerRange.js +24 -0
- package/date-picker/context.js +5 -0
- package/date-picker/index.js +50 -0
- package/date-picker/interface.js +1 -0
- package/date-picker/util.js +76 -0
- package/descriptions/index.js +178 -0
- package/descriptions/interface.js +1 -0
- package/divider/index.js +40 -0
- package/divider/interface.js +1 -0
- package/draggable/Item.js +67 -0
- package/draggable/index.js +32 -0
- package/draggable/interface.js +1 -0
- package/{chunk/CP0odX99.js → drawer/Drawer.js} +71 -71
- package/drawer/index.js +4 -0
- package/drawer/interface.js +1 -0
- package/dropdown/Button.js +11 -0
- package/dropdown/index.js +201 -0
- package/dropdown/interface.js +1 -0
- package/empty/index.js +9 -0
- package/empty/interface.js +1 -0
- package/form/Control.js +262 -0
- package/form/Form.js +160 -0
- package/form/FormItem.js +239 -0
- package/form/FormLabel.js +54 -0
- package/form/FormList.js +100 -0
- package/form/FormProvider.js +48 -0
- package/form/IconSymbol.js +20 -0
- package/form/context.js +43 -0
- package/form/index.js +107 -0
- package/form/interface.js +11 -0
- package/form/promisify.js +32 -0
- package/form/store.js +360 -0
- package/form/useForm.js +53 -0
- package/form/util.js +75 -0
- package/grid/Col.js +85 -0
- package/grid/Row.js +86 -0
- package/grid/context.js +9 -0
- package/grid/grid-item.js +75 -0
- package/grid/grid.js +103 -0
- package/grid/index.js +15 -0
- package/grid/interface.js +1 -0
- package/grid/util.js +51 -0
- package/hooks/index.js +38 -38
- package/hooks/useComputedState.js +2 -2
- package/hooks/useCreate.js +2 -2
- package/hooks/useForceUpdate.js +1 -1
- package/hooks/useId.js +1 -1
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useInterval.js +2 -2
- package/hooks/useIsFirstRender.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useMedia.js +1 -1
- package/hooks/useMergeProps.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOnlineStatus.js +2 -2
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePersistCallback.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/usePrevious.js +1 -1
- package/hooks/useRefs.js +1 -1
- package/hooks/useResizeObserver.js +2 -2
- package/hooks/useStateCallback.js +1 -1
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useUpdateEffect.js +1 -1
- package/hooks/useVerificationCode.js +10 -10
- package/hooks/useWatch.js +1 -1
- package/hooks/useWatermark.js +25 -25
- package/hooks/useWindowSize.js +1 -1
- package/icon/addFromIconFontCn.js +7 -0
- package/icon/index.js +57 -0
- package/icon-hover/index.js +7 -0
- package/image/Image.js +191 -0
- package/image/ImageFooter.js +8 -0
- package/image/ImagePreview.js +41 -0
- package/image/ImagePreviewArrow.js +46 -0
- package/image/ImagePreviewGroup.js +125 -0
- package/image/ImagePreviewToolbar.js +99 -0
- package/image/TriggerForToolbar.js +10 -0
- package/image/index.js +8 -0
- package/image/interface.js +1 -0
- package/image/previewGroupContext.js +17 -0
- package/index.js +592 -560
- package/input/Group.js +18 -0
- package/input/Input.js +688 -0
- package/input/InputElement.js +235 -0
- package/input/Number.js +4 -0
- package/input/Password.js +13 -0
- package/input/Search.js +14 -0
- package/input/Tag.js +4 -0
- package/input/Textarea.js +16 -0
- package/input/autoSizeTextAreaHeight.js +65 -0
- package/input/index.js +15 -0
- package/input/interface.js +1 -0
- package/input/useComposition.js +39 -0
- package/input-number/decimal.js +154 -0
- package/input-number/index.js +18 -0
- package/input-number/interface.js +1 -0
- package/input-number/useSelectionRange.js +26 -0
- package/input-number/util.js +57 -0
- package/input-tag/InputTag.js +384 -0
- package/input-tag/index.js +4 -0
- package/input-tag/interface.js +1 -0
- package/layout/Content.js +13 -0
- package/layout/Footer.js +13 -0
- package/layout/Header.js +13 -0
- package/{chunk/pZoNQ75H.js → layout/Sider.js} +31 -31
- package/layout/index.js +43 -0
- package/layout/interface.js +1 -0
- package/link/index.js +62 -0
- package/link/interface.js +1 -0
- package/list/Item.js +44 -0
- package/list/Meta.js +19 -0
- package/list/index.js +269 -0
- package/list/interface.js +1 -0
- package/loading/index.js +61 -0
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +146 -0
- package/mentions/interface.js +1 -0
- package/mentions/util.js +26 -0
- package/menu/Indent.js +17 -0
- package/menu/Item.js +125 -0
- package/menu/ItemGroup.js +39 -0
- package/menu/Menu.js +26 -0
- package/menu/OverflowWrap.js +10 -0
- package/menu/context.js +5 -0
- package/menu/index.js +11 -0
- package/menu/interface.js +1 -0
- package/menu/util.js +80 -0
- package/message/index.js +14 -0
- package/message/interface.js +1 -0
- package/message/useMessage.js +7 -0
- package/modal/Confirm.js +13 -0
- package/modal/Modal.js +21 -0
- package/modal/config.js +25 -0
- package/modal/index.js +4 -0
- package/modal/interface.js +1 -0
- package/notice/index.js +24 -0
- package/notification/index.js +16 -0
- package/notification/interface.js +1 -0
- package/notification/useNotification.js +6 -0
- package/notification/withNotification.js +49 -0
- package/overflow-ellipsis/OverflowItem.js +35 -0
- package/overflow-ellipsis/index.js +74 -0
- package/package.json +1 -1
- package/page-header/index.js +115 -0
- package/page-header/interface.js +1 -0
- package/pagination/PageItem.js +119 -0
- package/pagination/PageJumper.js +60 -0
- package/pagination/PageOption.js +47 -0
- package/pagination/Pagination.js +245 -0
- package/pagination/index.js +4 -0
- package/pagination/interface.js +1 -0
- package/picker/Input.js +130 -0
- package/picker/InputRange.js +158 -0
- package/picker/index.js +6 -0
- package/popconfirm/index.js +130 -0
- package/popconfirm/interface.js +1 -0
- package/popover/index.js +78 -0
- package/popover/interface.js +1 -0
- package/portal/Portal.js +15 -0
- package/portal/index.js +17 -0
- package/progress/CircleProgress.js +117 -0
- package/progress/LineProgess.js +103 -0
- package/progress/StepProgress.js +74 -0
- package/progress/index.js +99 -0
- package/progress/interface.js +1 -0
- package/radio/Group.js +16 -0
- package/radio/Radio.js +15 -0
- package/radio/index.js +8 -0
- package/radio/interface.js +1 -0
- package/rate/index.js +127 -0
- package/rate/interface.js +1 -0
- package/resize-box/ResizeTrigger.js +78 -0
- package/resize-box/Split.js +130 -0
- package/resize-box/SplitGroup.js +202 -0
- package/resize-box/index.js +182 -0
- package/resize-box/interface.js +1 -0
- package/result/403.js +695 -0
- package/result/404.js +513 -0
- package/result/500.js +166 -0
- package/result/index.js +77 -0
- package/result/interface.js +1 -0
- package/select/OptGroup.js +20 -0
- package/select/Option.js +95 -0
- package/select/Select.js +549 -0
- package/select/index.js +8 -0
- package/select/interface.js +1 -0
- package/select/util.js +141 -0
- package/select-view/Core.js +370 -0
- package/select-view/index.js +67 -0
- package/select-view/interface.js +1 -0
- package/skeleton/Image.js +24 -0
- package/skeleton/Text.js +27 -0
- package/skeleton/index.js +57 -0
- package/skeleton/interface.js +1 -0
- package/slider/Button.js +159 -0
- package/slider/Dot.js +43 -0
- package/slider/Input.js +75 -0
- package/slider/Mark.js +28 -0
- package/slider/Tick.js +44 -0
- package/slider/index.js +429 -0
- package/slider/interface.js +1 -0
- package/slider/util.js +63 -0
- package/space/index.js +90 -0
- package/space/interface.js +1 -0
- package/space/toArray.js +11 -0
- package/speech-synthesis/index.js +109 -0
- package/spin/DotLoading.js +24 -0
- package/spin/index.js +79 -0
- package/spin/interface.js +1 -0
- package/statistic/Countdown.js +55 -0
- package/statistic/index.js +120 -0
- package/statistic/interface.js +1 -0
- package/statistic/util.js +33 -0
- package/steps/Step.js +68 -0
- package/steps/index.js +89 -0
- package/steps/interface.js +1 -0
- package/style.css +1 -1
- package/suspense-fallback-test/index.js +12 -0
- package/switch/index.js +116 -0
- package/switch/interface.js +1 -0
- package/table/ColGroup.js +59 -0
- package/table/Table.js +24 -0
- package/table/constant.js +42 -0
- package/table/index.js +103 -0
- package/table/interface.js +1 -0
- package/table/util.js +121 -0
- package/tabs/Tab.js +18 -0
- package/tabs/TabContent.js +8 -0
- package/tabs/TabPane.js +24 -0
- package/tabs/index.js +9 -0
- package/tabs/interface.js +1 -0
- package/tabs/util.js +22 -0
- package/tag/index.js +136 -0
- package/tag/interface.js +1 -0
- package/time-picker/Picker.js +219 -0
- package/time-picker/RangePicker.js +56 -0
- package/time-picker/TimeColumn.js +65 -0
- package/time-picker/TimePicker.js +240 -0
- package/time-picker/context.js +5 -0
- package/time-picker/index.js +20 -0
- package/time-picker/interface.js +1 -0
- package/time-picker/util.js +43 -0
- package/timeline/Item.js +92 -0
- package/timeline/Timeline.js +79 -0
- package/timeline/index.js +6 -0
- package/timeline/interface.js +1 -0
- package/tooltip/index.js +140 -0
- package/tooltip/interface.js +1 -0
- package/transfer/Item.js +106 -0
- package/transfer/List.js +186 -0
- package/transfer/index.js +182 -0
- package/transfer/interface.js +1 -0
- package/tree/Animation.js +11 -0
- package/tree/Context.js +5 -0
- package/tree/Node.js +16 -0
- package/tree/NodeList.js +82 -0
- package/tree/Tree.js +580 -0
- package/tree/index.js +6 -0
- package/tree/interface.js +1 -0
- package/tree/util.js +76 -0
- package/tree-select/List.js +124 -0
- package/tree-select/Select.js +395 -0
- package/tree-select/index.js +6 -0
- package/tree-select/interface.js +13 -0
- package/tree-select/util.js +9 -0
- package/trigger/getPopupStyle.js +192 -0
- package/trigger/index.js +626 -0
- package/trigger/interface.js +1 -0
- package/types/color-picker/ControlBar.d.ts +12 -5
- package/types/color-picker/Mode.d.ts +7 -0
- package/types/color-picker/Panel.d.ts +10 -2
- package/types/color-picker/hooks/useColorPicker.d.ts +13 -11
- package/types/color-picker/hooks/useControlBlock.d.ts +10 -3
- package/types/color-picker/index.d.ts +1 -1
- package/types/color-picker/interface.d.ts +19 -7
- package/types/color-picker/utils.d.ts +23 -0
- package/types/form/Control.d.ts +54 -5
- package/types/index.d.ts +1 -2
- package/types/table/hook/useThResizable.d.ts +1 -1
- package/typography/Base.js +189 -0
- package/typography/EditContent.js +46 -0
- package/typography/Ellipsis.js +124 -0
- package/typography/Operations.js +78 -0
- package/typography/Paragraph.js +24 -0
- package/typography/Text.js +11 -0
- package/typography/Title.js +12 -0
- package/typography/Typography.js +13 -0
- package/typography/index.js +278 -0
- package/typography/interface.js +1 -0
- package/typography/useCssEllipsis.js +37 -0
- package/typography/useEllipsis.js +150 -0
- package/upload/TriggerNode.js +116 -0
- package/upload/Upload.js +627 -0
- package/upload/Uploader.js +206 -0
- package/upload/index.js +8 -0
- package/upload/interface.js +9 -0
- package/upload/request.js +51 -0
- package/upload/request_.js +64 -0
- package/upload/util.js +61 -0
- package/utils/CSSTransition.js +2 -2
- package/utils/constant.js +3 -3
- package/utils/contextHolder.js +1 -1
- package/utils/dayjs.js +11 -11
- package/utils/dom.js +32 -32
- package/utils/fillNBSP.js +2 -2
- package/utils/getHighlightText.js +2 -2
- package/utils/getHotkeyHandler.js +2 -2
- package/utils/getStringLength.js +2 -2
- package/utils/include.js +2 -2
- package/utils/index.js +96 -96
- package/utils/is.js +53 -53
- package/utils/mergeProps.js +2 -2
- package/utils/mergedToString.js +2 -2
- package/utils/omit.js +2 -2
- package/utils/pad.js +12 -12
- package/utils/pick.js +4 -4
- package/utils/reactDOM.js +3 -3
- package/utils/resizeObserverEffect.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoView.js +2 -2
- package/utils/style.js +11 -11
- package/utils/throttleByRaf.js +8 -8
- package/utils/warning.js +5 -5
- package/{chunk/-UuKKT0Z.js → verification-code/VerificationCode.js} +32 -31
- package/verification-code/index.js +4 -0
- package/verification-code/interface.js +1 -0
- package/{Version.js → version/index.js} +1 -1
- package/virtual-list/Filler.js +31 -0
- package/virtual-list/VirtualList.js +493 -0
- package/virtual-list/index.js +4 -0
- package/{chunk/CaasmWg_.js → watermark/Watermark.js} +11 -10
- package/watermark/index.js +4 -0
- package/watermark/interface.js +1 -0
- package/chunk/B5gK1Idp.js +0 -19
- package/chunk/BBvWDeuZ.js +0 -334
- package/chunk/BGny4zSb.js +0 -166
- package/chunk/BJQ5UNa-.js +0 -1585
- package/chunk/BP9sYyk9.js +0 -8
- package/chunk/BUdtVdnv.js +0 -38
- package/chunk/BVQlOzTS.js +0 -11
- package/chunk/B__a_gb_.js +0 -519
- package/chunk/BbEYToV1.js +0 -10
- package/chunk/BbdDQAnm.js +0 -15
- package/chunk/BdUcgWdu.js +0 -11
- package/chunk/BfbXSG70.js +0 -26
- package/chunk/BndfNLK4.js +0 -186
- package/chunk/BoMCZV6K.js +0 -1098
- package/chunk/Br0B6y1T.js +0 -18
- package/chunk/BxUs8_Cr.js +0 -9
- package/chunk/C42LIMP9.js +0 -970
- package/chunk/C4YkFMzC.js +0 -778
- package/chunk/C9Wcraj7.js +0 -162
- package/chunk/CK5m7rLl.js +0 -166
- package/chunk/CPT-OZH2.js +0 -14
- package/chunk/CVSF8p0O.js +0 -698
- package/chunk/C_agcwLN.js +0 -31
- package/chunk/CkNSv2U7.js +0 -56
- package/chunk/Cp2f70gB.js +0 -9
- package/chunk/CpegYjdC.js +0 -16
- package/chunk/CucI3KZr.js +0 -20
- package/chunk/CwoFBTYz.js +0 -11
- package/chunk/D2KPqPhV.js +0 -17
- package/chunk/D7NyvE5f.js +0 -17
- package/chunk/D8oTPQ2H.js +0 -384
- package/chunk/DC1iHEiy.js +0 -912
- package/chunk/DFrfrmfK.js +0 -519
- package/chunk/DGTIZ_0O.js +0 -6
- package/chunk/DJfpiZn_.js +0 -25
- package/chunk/DNUz6zgo.js +0 -11
- package/chunk/DRtM649q.js +0 -11
- package/chunk/DS_mUWn6.js +0 -41
- package/chunk/DU6bs_19.js +0 -10
- package/chunk/DWdbwz22.js +0 -10
- package/chunk/DcveZuqd.js +0 -6
- package/chunk/DdVFknul.js +0 -24
- package/chunk/DgRfikwe.js +0 -16
- package/chunk/DkyR2EfG.js +0 -243
- package/chunk/DnrZEnQ_.js +0 -27
- package/chunk/DsRSHWtX.js +0 -1025
- package/chunk/Dz5BdmXo.js +0 -270
- package/chunk/EANe01DF.js +0 -1030
- package/chunk/GoNx5R4F.js +0 -873
- package/chunk/HDUQku8d.js +0 -20
- package/chunk/HrAP__Hi.js +0 -25
- package/chunk/SLWP34OR.js +0 -229
- package/chunk/VVKtwaGf.js +0 -278
- package/chunk/WPNpLxSI.js +0 -16
- package/chunk/fdU3ang6.js +0 -14
- package/chunk/fkclKOAL.js +0 -830
- package/chunk/flvYlqx3.js +0 -22
- package/chunk/kTDayEpF.js +0 -288
- package/chunk/w-kM1L5W.js +0 -445
- package/types/form/Control-old.d.ts +0 -56
- package/types/style/index.d.ts +0 -1
package/chunk/BJQ5UNa-.js
DELETED
|
@@ -1,1585 +0,0 @@
|
|
|
1
|
-
import et, { forwardRef as nt, useContext as G, createContext as se, useRef as j, useImperativeHandle as rt, useEffect as E, useState as Ft } from "react";
|
|
2
|
-
import { jsx as f, jsxs as tt, Fragment as Nt } from "react/jsx-runtime";
|
|
3
|
-
import ut from "@unicom-cloud/icons/context";
|
|
4
|
-
import ce from "lodash/isPlainObject";
|
|
5
|
-
import { c as xt } from "./B5gK1Idp.js";
|
|
6
|
-
import { _ as qt, N as Ut } from "./DC1iHEiy.js";
|
|
7
|
-
import V from "lodash/isNumber";
|
|
8
|
-
import B from "lodash/isUndefined";
|
|
9
|
-
import { createRoot as jt } from "react-dom/client";
|
|
10
|
-
import le from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
11
|
-
import St from "@unicom-cloud/icons/IconUiClose";
|
|
12
|
-
import fe from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
13
|
-
import he from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
14
|
-
import ue from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
15
|
-
import de from "@unicom-cloud/icons/IconUiLoading";
|
|
16
|
-
import ge from "@unicom-cloud/icons/IconUiEmpty";
|
|
17
|
-
import { m as K } from "./JPPo5nY_.js";
|
|
18
|
-
import me from "../locale/zh-CN.js";
|
|
19
|
-
import "lodash/isEqualWith";
|
|
20
|
-
import "./CkNSv2U7.js";
|
|
21
|
-
import "./CSC_V_25.js";
|
|
22
|
-
import "lodash/merge";
|
|
23
|
-
import "../utils/dom.js";
|
|
24
|
-
import "./HrAP__Hi.js";
|
|
25
|
-
import { createPortal as be } from "react-dom";
|
|
26
|
-
import "./Ce1j9KTi.js";
|
|
27
|
-
import "lodash/debounce";
|
|
28
|
-
import xe from "lodash/isString";
|
|
29
|
-
import { c as pe } from "./BdUcgWdu.js";
|
|
30
|
-
var ye = Object.defineProperty, Ce = (t, n, e) => n in t ? ye(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, P = (t, n, e) => Ce(t, typeof n != "symbol" ? n + "" : n, e);
|
|
31
|
-
function w(t, n) {
|
|
32
|
-
ve(t) && (t = "100%");
|
|
33
|
-
const e = $e(t);
|
|
34
|
-
return t = n === 360 ? t : Math.min(n, Math.max(0, parseFloat(t))), e && (t = parseInt(String(t * n), 10) / 100), Math.abs(t - n) < 1e-6 ? 1 : (n === 360 ? t = (t < 0 ? t % n + n : t % n) / parseFloat(String(n)) : t = t % n / parseFloat(String(n)), t);
|
|
35
|
-
}
|
|
36
|
-
function Y(t) {
|
|
37
|
-
return Math.min(1, Math.max(0, t));
|
|
38
|
-
}
|
|
39
|
-
function ve(t) {
|
|
40
|
-
return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
|
|
41
|
-
}
|
|
42
|
-
function $e(t) {
|
|
43
|
-
return typeof t == "string" && t.indexOf("%") !== -1;
|
|
44
|
-
}
|
|
45
|
-
function Ot(t) {
|
|
46
|
-
return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
|
|
47
|
-
}
|
|
48
|
-
function Z(t) {
|
|
49
|
-
return Number(t) <= 1 ? `${Number(t) * 100}%` : t;
|
|
50
|
-
}
|
|
51
|
-
function I(t) {
|
|
52
|
-
return t.length === 1 ? "0" + t : String(t);
|
|
53
|
-
}
|
|
54
|
-
function we(t, n, e) {
|
|
55
|
-
return {
|
|
56
|
-
r: w(t, 255) * 255,
|
|
57
|
-
g: w(n, 255) * 255,
|
|
58
|
-
b: w(e, 255) * 255
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function Rt(t, n, e) {
|
|
62
|
-
t = w(t, 255), n = w(n, 255), e = w(e, 255);
|
|
63
|
-
const r = Math.max(t, n, e), o = Math.min(t, n, e);
|
|
64
|
-
let i = 0, a = 0;
|
|
65
|
-
const s = (r + o) / 2;
|
|
66
|
-
if (r === o)
|
|
67
|
-
a = 0, i = 0;
|
|
68
|
-
else {
|
|
69
|
-
const c = r - o;
|
|
70
|
-
switch (a = s > 0.5 ? c / (2 - r - o) : c / (r + o), r) {
|
|
71
|
-
case t:
|
|
72
|
-
i = (n - e) / c + (n < e ? 6 : 0);
|
|
73
|
-
break;
|
|
74
|
-
case n:
|
|
75
|
-
i = (e - t) / c + 2;
|
|
76
|
-
break;
|
|
77
|
-
case e:
|
|
78
|
-
i = (t - n) / c + 4;
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
i /= 6;
|
|
82
|
-
}
|
|
83
|
-
return { h: i, s: a, l: s };
|
|
84
|
-
}
|
|
85
|
-
function ct(t, n, e) {
|
|
86
|
-
return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? t + (n - t) * (6 * e) : e < 1 / 2 ? n : e < 2 / 3 ? t + (n - t) * (2 / 3 - e) * 6 : t;
|
|
87
|
-
}
|
|
88
|
-
function ke(t, n, e) {
|
|
89
|
-
let r, o, i;
|
|
90
|
-
if (t = w(t, 360), n = w(n, 100), e = w(e, 100), n === 0)
|
|
91
|
-
o = e, i = e, r = e;
|
|
92
|
-
else {
|
|
93
|
-
const a = e < 0.5 ? e * (1 + n) : e + n - e * n, s = 2 * e - a;
|
|
94
|
-
r = ct(s, a, t + 1 / 3), o = ct(s, a, t), i = ct(s, a, t - 1 / 3);
|
|
95
|
-
}
|
|
96
|
-
return { r: r * 255, g: o * 255, b: i * 255 };
|
|
97
|
-
}
|
|
98
|
-
function lt(t, n, e) {
|
|
99
|
-
t = w(t, 255), n = w(n, 255), e = w(e, 255);
|
|
100
|
-
const r = Math.max(t, n, e), o = Math.min(t, n, e);
|
|
101
|
-
let i = 0;
|
|
102
|
-
const a = r, s = r - o, c = r === 0 ? 0 : s / r;
|
|
103
|
-
if (r === o)
|
|
104
|
-
i = 0;
|
|
105
|
-
else {
|
|
106
|
-
switch (r) {
|
|
107
|
-
case t:
|
|
108
|
-
i = (n - e) / s + (n < e ? 6 : 0);
|
|
109
|
-
break;
|
|
110
|
-
case n:
|
|
111
|
-
i = (e - t) / s + 2;
|
|
112
|
-
break;
|
|
113
|
-
case e:
|
|
114
|
-
i = (t - n) / s + 4;
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
i /= 6;
|
|
118
|
-
}
|
|
119
|
-
return { h: i, s: c, v: a };
|
|
120
|
-
}
|
|
121
|
-
function Me(t, n, e) {
|
|
122
|
-
t = w(t, 360) * 6, n = w(n, 100), e = w(e, 100);
|
|
123
|
-
const r = Math.floor(t), o = t - r, i = e * (1 - n), a = e * (1 - o * n), s = e * (1 - (1 - o) * n), c = r % 6, h = [e, a, i, i, s, e][c], d = [s, e, e, a, i, i][c], u = [i, i, s, e, e, a][c];
|
|
124
|
-
return { r: h * 255, g: d * 255, b: u * 255 };
|
|
125
|
-
}
|
|
126
|
-
function Et(t, n, e, r) {
|
|
127
|
-
const o = [
|
|
128
|
-
I(Math.round(t).toString(16)),
|
|
129
|
-
I(Math.round(n).toString(16)),
|
|
130
|
-
I(Math.round(e).toString(16))
|
|
131
|
-
];
|
|
132
|
-
return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
|
|
133
|
-
}
|
|
134
|
-
function Ne(t, n, e, r, o) {
|
|
135
|
-
const i = [
|
|
136
|
-
I(Math.round(t).toString(16)),
|
|
137
|
-
I(Math.round(n).toString(16)),
|
|
138
|
-
I(Math.round(e).toString(16)),
|
|
139
|
-
I(Dt(r))
|
|
140
|
-
];
|
|
141
|
-
return o && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) && i[3].startsWith(i[3].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
|
|
142
|
-
}
|
|
143
|
-
function Rn(t, n, e, r) {
|
|
144
|
-
return [
|
|
145
|
-
I(Dt(r)),
|
|
146
|
-
I(Math.round(t).toString(16)),
|
|
147
|
-
I(Math.round(n).toString(16)),
|
|
148
|
-
I(Math.round(e).toString(16))
|
|
149
|
-
].join("");
|
|
150
|
-
}
|
|
151
|
-
function Se(t, n, e, r) {
|
|
152
|
-
const o = t / 100, i = n / 100, a = e / 100, s = r / 100, c = 255 * (1 - o) * (1 - s), h = 255 * (1 - i) * (1 - s), d = 255 * (1 - a) * (1 - s);
|
|
153
|
-
return { r: c, g: h, b: d };
|
|
154
|
-
}
|
|
155
|
-
function It(t, n, e) {
|
|
156
|
-
let r = 1 - t / 255, o = 1 - n / 255, i = 1 - e / 255, a = Math.min(r, o, i);
|
|
157
|
-
return a === 1 ? (r = 0, o = 0, i = 0) : (r = (r - a) / (1 - a) * 100, o = (o - a) / (1 - a) * 100, i = (i - a) / (1 - a) * 100), a *= 100, {
|
|
158
|
-
c: Math.round(r),
|
|
159
|
-
m: Math.round(o),
|
|
160
|
-
y: Math.round(i),
|
|
161
|
-
k: Math.round(a)
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
function Dt(t) {
|
|
165
|
-
return Math.round(parseFloat(t) * 255).toString(16);
|
|
166
|
-
}
|
|
167
|
-
function At(t) {
|
|
168
|
-
return N(t) / 255;
|
|
169
|
-
}
|
|
170
|
-
function N(t) {
|
|
171
|
-
return parseInt(t, 16);
|
|
172
|
-
}
|
|
173
|
-
function Re(t) {
|
|
174
|
-
return {
|
|
175
|
-
r: t >> 16,
|
|
176
|
-
g: (t & 65280) >> 8,
|
|
177
|
-
b: t & 255
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
const dt = {
|
|
181
|
-
aliceblue: "#f0f8ff",
|
|
182
|
-
antiquewhite: "#faebd7",
|
|
183
|
-
aqua: "#00ffff",
|
|
184
|
-
aquamarine: "#7fffd4",
|
|
185
|
-
azure: "#f0ffff",
|
|
186
|
-
beige: "#f5f5dc",
|
|
187
|
-
bisque: "#ffe4c4",
|
|
188
|
-
black: "#000000",
|
|
189
|
-
blanchedalmond: "#ffebcd",
|
|
190
|
-
blue: "#0000ff",
|
|
191
|
-
blueviolet: "#8a2be2",
|
|
192
|
-
brown: "#a52a2a",
|
|
193
|
-
burlywood: "#deb887",
|
|
194
|
-
cadetblue: "#5f9ea0",
|
|
195
|
-
chartreuse: "#7fff00",
|
|
196
|
-
chocolate: "#d2691e",
|
|
197
|
-
coral: "#ff7f50",
|
|
198
|
-
cornflowerblue: "#6495ed",
|
|
199
|
-
cornsilk: "#fff8dc",
|
|
200
|
-
crimson: "#dc143c",
|
|
201
|
-
cyan: "#00ffff",
|
|
202
|
-
darkblue: "#00008b",
|
|
203
|
-
darkcyan: "#008b8b",
|
|
204
|
-
darkgoldenrod: "#b8860b",
|
|
205
|
-
darkgray: "#a9a9a9",
|
|
206
|
-
darkgreen: "#006400",
|
|
207
|
-
darkgrey: "#a9a9a9",
|
|
208
|
-
darkkhaki: "#bdb76b",
|
|
209
|
-
darkmagenta: "#8b008b",
|
|
210
|
-
darkolivegreen: "#556b2f",
|
|
211
|
-
darkorange: "#ff8c00",
|
|
212
|
-
darkorchid: "#9932cc",
|
|
213
|
-
darkred: "#8b0000",
|
|
214
|
-
darksalmon: "#e9967a",
|
|
215
|
-
darkseagreen: "#8fbc8f",
|
|
216
|
-
darkslateblue: "#483d8b",
|
|
217
|
-
darkslategray: "#2f4f4f",
|
|
218
|
-
darkslategrey: "#2f4f4f",
|
|
219
|
-
darkturquoise: "#00ced1",
|
|
220
|
-
darkviolet: "#9400d3",
|
|
221
|
-
deeppink: "#ff1493",
|
|
222
|
-
deepskyblue: "#00bfff",
|
|
223
|
-
dimgray: "#696969",
|
|
224
|
-
dimgrey: "#696969",
|
|
225
|
-
dodgerblue: "#1e90ff",
|
|
226
|
-
firebrick: "#b22222",
|
|
227
|
-
floralwhite: "#fffaf0",
|
|
228
|
-
forestgreen: "#228b22",
|
|
229
|
-
fuchsia: "#ff00ff",
|
|
230
|
-
gainsboro: "#dcdcdc",
|
|
231
|
-
ghostwhite: "#f8f8ff",
|
|
232
|
-
goldenrod: "#daa520",
|
|
233
|
-
gold: "#ffd700",
|
|
234
|
-
gray: "#808080",
|
|
235
|
-
green: "#008000",
|
|
236
|
-
greenyellow: "#adff2f",
|
|
237
|
-
grey: "#808080",
|
|
238
|
-
honeydew: "#f0fff0",
|
|
239
|
-
hotpink: "#ff69b4",
|
|
240
|
-
indianred: "#cd5c5c",
|
|
241
|
-
indigo: "#4b0082",
|
|
242
|
-
ivory: "#fffff0",
|
|
243
|
-
khaki: "#f0e68c",
|
|
244
|
-
lavenderblush: "#fff0f5",
|
|
245
|
-
lavender: "#e6e6fa",
|
|
246
|
-
lawngreen: "#7cfc00",
|
|
247
|
-
lemonchiffon: "#fffacd",
|
|
248
|
-
lightblue: "#add8e6",
|
|
249
|
-
lightcoral: "#f08080",
|
|
250
|
-
lightcyan: "#e0ffff",
|
|
251
|
-
lightgoldenrodyellow: "#fafad2",
|
|
252
|
-
lightgray: "#d3d3d3",
|
|
253
|
-
lightgreen: "#90ee90",
|
|
254
|
-
lightgrey: "#d3d3d3",
|
|
255
|
-
lightpink: "#ffb6c1",
|
|
256
|
-
lightsalmon: "#ffa07a",
|
|
257
|
-
lightseagreen: "#20b2aa",
|
|
258
|
-
lightskyblue: "#87cefa",
|
|
259
|
-
lightslategray: "#778899",
|
|
260
|
-
lightslategrey: "#778899",
|
|
261
|
-
lightsteelblue: "#b0c4de",
|
|
262
|
-
lightyellow: "#ffffe0",
|
|
263
|
-
lime: "#00ff00",
|
|
264
|
-
limegreen: "#32cd32",
|
|
265
|
-
linen: "#faf0e6",
|
|
266
|
-
magenta: "#ff00ff",
|
|
267
|
-
maroon: "#800000",
|
|
268
|
-
mediumaquamarine: "#66cdaa",
|
|
269
|
-
mediumblue: "#0000cd",
|
|
270
|
-
mediumorchid: "#ba55d3",
|
|
271
|
-
mediumpurple: "#9370db",
|
|
272
|
-
mediumseagreen: "#3cb371",
|
|
273
|
-
mediumslateblue: "#7b68ee",
|
|
274
|
-
mediumspringgreen: "#00fa9a",
|
|
275
|
-
mediumturquoise: "#48d1cc",
|
|
276
|
-
mediumvioletred: "#c71585",
|
|
277
|
-
midnightblue: "#191970",
|
|
278
|
-
mintcream: "#f5fffa",
|
|
279
|
-
mistyrose: "#ffe4e1",
|
|
280
|
-
moccasin: "#ffe4b5",
|
|
281
|
-
navajowhite: "#ffdead",
|
|
282
|
-
navy: "#000080",
|
|
283
|
-
oldlace: "#fdf5e6",
|
|
284
|
-
olive: "#808000",
|
|
285
|
-
olivedrab: "#6b8e23",
|
|
286
|
-
orange: "#ffa500",
|
|
287
|
-
orangered: "#ff4500",
|
|
288
|
-
orchid: "#da70d6",
|
|
289
|
-
palegoldenrod: "#eee8aa",
|
|
290
|
-
palegreen: "#98fb98",
|
|
291
|
-
paleturquoise: "#afeeee",
|
|
292
|
-
palevioletred: "#db7093",
|
|
293
|
-
papayawhip: "#ffefd5",
|
|
294
|
-
peachpuff: "#ffdab9",
|
|
295
|
-
peru: "#cd853f",
|
|
296
|
-
pink: "#ffc0cb",
|
|
297
|
-
plum: "#dda0dd",
|
|
298
|
-
powderblue: "#b0e0e6",
|
|
299
|
-
purple: "#800080",
|
|
300
|
-
rebeccapurple: "#663399",
|
|
301
|
-
red: "#ff0000",
|
|
302
|
-
rosybrown: "#bc8f8f",
|
|
303
|
-
royalblue: "#4169e1",
|
|
304
|
-
saddlebrown: "#8b4513",
|
|
305
|
-
salmon: "#fa8072",
|
|
306
|
-
sandybrown: "#f4a460",
|
|
307
|
-
seagreen: "#2e8b57",
|
|
308
|
-
seashell: "#fff5ee",
|
|
309
|
-
sienna: "#a0522d",
|
|
310
|
-
silver: "#c0c0c0",
|
|
311
|
-
skyblue: "#87ceeb",
|
|
312
|
-
slateblue: "#6a5acd",
|
|
313
|
-
slategray: "#708090",
|
|
314
|
-
slategrey: "#708090",
|
|
315
|
-
snow: "#fffafa",
|
|
316
|
-
springgreen: "#00ff7f",
|
|
317
|
-
steelblue: "#4682b4",
|
|
318
|
-
tan: "#d2b48c",
|
|
319
|
-
teal: "#008080",
|
|
320
|
-
thistle: "#d8bfd8",
|
|
321
|
-
tomato: "#ff6347",
|
|
322
|
-
turquoise: "#40e0d0",
|
|
323
|
-
violet: "#ee82ee",
|
|
324
|
-
wheat: "#f5deb3",
|
|
325
|
-
white: "#ffffff",
|
|
326
|
-
whitesmoke: "#f5f5f5",
|
|
327
|
-
yellow: "#ffff00",
|
|
328
|
-
yellowgreen: "#9acd32"
|
|
329
|
-
};
|
|
330
|
-
function Ee(t) {
|
|
331
|
-
let n = { r: 0, g: 0, b: 0 }, e = 1, r = null, o = null, i = null, a = !1, s = !1;
|
|
332
|
-
return typeof t == "string" && (t = He(t)), typeof t == "object" && (M(t.r) && M(t.g) && M(t.b) ? (n = we(t.r, t.g, t.b), a = !0, s = String(t.r).slice(-1) === "%" ? "prgb" : "rgb") : M(t.h) && M(t.s) && M(t.v) ? (r = Z(t.s), o = Z(t.v), n = Me(t.h, r, o), a = !0, s = "hsv") : M(t.h) && M(t.s) && M(t.l) ? (r = Z(t.s), i = Z(t.l), n = ke(t.h, r, i), a = !0, s = "hsl") : M(t.c) && M(t.m) && M(t.y) && M(t.k) && (n = Se(t.c, t.m, t.y, t.k), a = !0, s = "cmyk"), Object.prototype.hasOwnProperty.call(t, "a") && (e = t.a)), e = Ot(e), {
|
|
333
|
-
ok: a,
|
|
334
|
-
format: t.format || s,
|
|
335
|
-
r: Math.min(255, Math.max(n.r, 0)),
|
|
336
|
-
g: Math.min(255, Math.max(n.g, 0)),
|
|
337
|
-
b: Math.min(255, Math.max(n.b, 0)),
|
|
338
|
-
a: e
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
const Ie = "[-\\+]?\\d+%?", Ae = "[-\\+]?\\d*\\.\\d+%?", q = "(?:" + Ae + ")|(?:" + Ie + ")", ft = "[\\s|\\(]+(" + q + ")[,|\\s]+(" + q + ")[,|\\s]+(" + q + ")\\s*\\)?", _ = (
|
|
342
|
-
// eslint-disable-next-line prettier/prettier
|
|
343
|
-
"[\\s|\\(]+(" + q + ")[,|\\s]+(" + q + ")[,|\\s]+(" + q + ")[,|\\s]+(" + q + ")\\s*\\)?"
|
|
344
|
-
), R = {
|
|
345
|
-
CSS_UNIT: new RegExp(q),
|
|
346
|
-
rgb: new RegExp("rgb" + ft),
|
|
347
|
-
rgba: new RegExp("rgba" + _),
|
|
348
|
-
hsl: new RegExp("hsl" + ft),
|
|
349
|
-
hsla: new RegExp("hsla" + _),
|
|
350
|
-
hsv: new RegExp("hsv" + ft),
|
|
351
|
-
hsva: new RegExp("hsva" + _),
|
|
352
|
-
cmyk: new RegExp("cmyk" + _),
|
|
353
|
-
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
354
|
-
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
355
|
-
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
356
|
-
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
357
|
-
};
|
|
358
|
-
function He(t) {
|
|
359
|
-
if (t = t.trim().toLowerCase(), t.length === 0)
|
|
360
|
-
return !1;
|
|
361
|
-
let n = !1;
|
|
362
|
-
if (dt[t])
|
|
363
|
-
t = dt[t], n = !0;
|
|
364
|
-
else if (t === "transparent")
|
|
365
|
-
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
366
|
-
let e = R.rgb.exec(t);
|
|
367
|
-
return e ? { r: e[1], g: e[2], b: e[3] } : (e = R.rgba.exec(t), e ? { r: e[1], g: e[2], b: e[3], a: e[4] } : (e = R.hsl.exec(t), e ? { h: e[1], s: e[2], l: e[3] } : (e = R.hsla.exec(t), e ? { h: e[1], s: e[2], l: e[3], a: e[4] } : (e = R.hsv.exec(t), e ? { h: e[1], s: e[2], v: e[3] } : (e = R.hsva.exec(t), e ? { h: e[1], s: e[2], v: e[3], a: e[4] } : (e = R.cmyk.exec(t), e ? {
|
|
368
|
-
c: e[1],
|
|
369
|
-
m: e[2],
|
|
370
|
-
y: e[3],
|
|
371
|
-
k: e[4]
|
|
372
|
-
} : (e = R.hex8.exec(t), e ? {
|
|
373
|
-
r: N(e[1]),
|
|
374
|
-
g: N(e[2]),
|
|
375
|
-
b: N(e[3]),
|
|
376
|
-
a: At(e[4]),
|
|
377
|
-
format: n ? "name" : "hex8"
|
|
378
|
-
} : (e = R.hex6.exec(t), e ? {
|
|
379
|
-
r: N(e[1]),
|
|
380
|
-
g: N(e[2]),
|
|
381
|
-
b: N(e[3]),
|
|
382
|
-
format: n ? "name" : "hex"
|
|
383
|
-
} : (e = R.hex4.exec(t), e ? {
|
|
384
|
-
r: N(e[1] + e[1]),
|
|
385
|
-
g: N(e[2] + e[2]),
|
|
386
|
-
b: N(e[3] + e[3]),
|
|
387
|
-
a: At(e[4] + e[4]),
|
|
388
|
-
format: n ? "name" : "hex8"
|
|
389
|
-
} : (e = R.hex3.exec(t), e ? {
|
|
390
|
-
r: N(e[1] + e[1]),
|
|
391
|
-
g: N(e[2] + e[2]),
|
|
392
|
-
b: N(e[3] + e[3]),
|
|
393
|
-
format: n ? "name" : "hex"
|
|
394
|
-
} : !1))))))))));
|
|
395
|
-
}
|
|
396
|
-
function M(t) {
|
|
397
|
-
return typeof t == "number" ? !Number.isNaN(t) : R.CSS_UNIT.test(t);
|
|
398
|
-
}
|
|
399
|
-
class C {
|
|
400
|
-
constructor(n = "", e = {}) {
|
|
401
|
-
if (P(this, "r"), P(this, "g"), P(this, "b"), P(this, "a"), P(this, "format"), P(this, "originalInput"), P(this, "isValid"), P(this, "gradientType"), P(this, "roundA"), n instanceof C)
|
|
402
|
-
return n;
|
|
403
|
-
typeof n == "number" && (n = Re(n)), this.originalInput = n;
|
|
404
|
-
const r = Ee(n);
|
|
405
|
-
this.originalInput = n, this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this.roundA = Math.round(100 * this.a) / 100, this.format = e.format ?? r.format, this.gradientType = e.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = r.ok;
|
|
406
|
-
}
|
|
407
|
-
get ok() {
|
|
408
|
-
return this.isValid;
|
|
409
|
-
}
|
|
410
|
-
isDark() {
|
|
411
|
-
return this.getBrightness() < 128;
|
|
412
|
-
}
|
|
413
|
-
isLight() {
|
|
414
|
-
return !this.isDark();
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Returns the perceived brightness of the color, from 0-255.
|
|
418
|
-
*/
|
|
419
|
-
getBrightness() {
|
|
420
|
-
const n = this.toRgb();
|
|
421
|
-
return (n.r * 299 + n.g * 587 + n.b * 114) / 1e3;
|
|
422
|
-
}
|
|
423
|
-
/**
|
|
424
|
-
* Returns the perceived luminance of a color, from 0-1.
|
|
425
|
-
*/
|
|
426
|
-
getLuminance() {
|
|
427
|
-
const n = this.toRgb();
|
|
428
|
-
let e, r, o;
|
|
429
|
-
const i = n.r / 255, a = n.g / 255, s = n.b / 255;
|
|
430
|
-
return i <= 0.03928 ? e = i / 12.92 : e = Math.pow((i + 0.055) / 1.055, 2.4), a <= 0.03928 ? r = a / 12.92 : r = Math.pow((a + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * e + 0.7152 * r + 0.0722 * o;
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* Returns the alpha value of a color, from 0-1.
|
|
434
|
-
*/
|
|
435
|
-
getAlpha() {
|
|
436
|
-
return this.a;
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* Sets the alpha value on the current color.
|
|
440
|
-
*
|
|
441
|
-
* @param alpha - The new alpha value. The accepted range is 0-1.
|
|
442
|
-
*/
|
|
443
|
-
setAlpha(n) {
|
|
444
|
-
return this.a = Ot(n), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* Returns whether the color is monochrome.
|
|
448
|
-
*/
|
|
449
|
-
isMonochrome() {
|
|
450
|
-
const { s: n } = this.toHsl();
|
|
451
|
-
return n === 0;
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* Returns the object as a HSVA object.
|
|
455
|
-
*/
|
|
456
|
-
toHsv() {
|
|
457
|
-
const n = lt(this.r, this.g, this.b);
|
|
458
|
-
return { h: n.h * 360, s: n.s, v: n.v, a: this.a };
|
|
459
|
-
}
|
|
460
|
-
toHsv_() {
|
|
461
|
-
const n = lt(this.r, this.g, this.b);
|
|
462
|
-
return { h: n.h, s: n.s, v: n.v, a: this.a };
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Returns the hsva values interpolated into a string with the following format:
|
|
466
|
-
* "hsva(xxx, xxx, xxx, xx)".
|
|
467
|
-
*/
|
|
468
|
-
toHsvString() {
|
|
469
|
-
const n = lt(this.r, this.g, this.b), e = Math.round(n.h * 360), r = Math.round(n.s * 100), o = Math.round(n.v * 100);
|
|
470
|
-
return this.a === 1 ? `hsv(${e}, ${r}%, ${o}%)` : `hsva(${e}, ${r}%, ${o}%, ${this.roundA})`;
|
|
471
|
-
}
|
|
472
|
-
/**
|
|
473
|
-
* Returns the object as a HSLA object.
|
|
474
|
-
*/
|
|
475
|
-
toHsl() {
|
|
476
|
-
const n = Rt(this.r, this.g, this.b);
|
|
477
|
-
return { h: n.h * 360, s: n.s, l: n.l, a: this.a };
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* Returns the hsla values interpolated into a string with the following format:
|
|
481
|
-
* "hsla(xxx, xxx, xxx, xx)".
|
|
482
|
-
*/
|
|
483
|
-
toHslString() {
|
|
484
|
-
const n = Rt(this.r, this.g, this.b), e = Math.round(n.h * 360), r = Math.round(n.s * 100), o = Math.round(n.l * 100);
|
|
485
|
-
return this.a === 1 ? `hsl(${e}, ${r}%, ${o}%)` : `hsla(${e}, ${r}%, ${o}%, ${this.roundA})`;
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* Returns the hex value of the color.
|
|
489
|
-
* @param allow3Char will shorten hex value to 3 char if possible
|
|
490
|
-
*/
|
|
491
|
-
toHex(n = !1) {
|
|
492
|
-
return Et(this.r, this.g, this.b, n);
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* Returns the hex value of the color -with a # prefixed.
|
|
496
|
-
* @param allow3Char will shorten hex value to 3 char if possible
|
|
497
|
-
*/
|
|
498
|
-
toHexString(n = !1) {
|
|
499
|
-
return `#${this.toHex(n)}`;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Returns the hex 8 value of the color.
|
|
503
|
-
* @param allow4Char will shorten hex value to 4 char if possible
|
|
504
|
-
*/
|
|
505
|
-
toHex8(n = !1) {
|
|
506
|
-
return Ne(this.r, this.g, this.b, this.a, n);
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* Returns the hex 8 value of the color -with a # prefixed.
|
|
510
|
-
* @param allow4Char will shorten hex value to 4 char if possible
|
|
511
|
-
*/
|
|
512
|
-
toHex8String(n = !1) {
|
|
513
|
-
return `#${this.toHex8(n)}`;
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Returns the shorter hex value of the color depends on its alpha -with a # prefixed.
|
|
517
|
-
* @param allowShortChar will shorten hex value to 3 or 4 char if possible
|
|
518
|
-
*/
|
|
519
|
-
toHexShortString(n = !1) {
|
|
520
|
-
return this.a === 1 ? this.toHexString(n) : this.toHex8String(n);
|
|
521
|
-
}
|
|
522
|
-
/**
|
|
523
|
-
* Returns the object as a RGBA object.
|
|
524
|
-
*/
|
|
525
|
-
toRgb() {
|
|
526
|
-
return {
|
|
527
|
-
r: Math.round(this.r),
|
|
528
|
-
g: Math.round(this.g),
|
|
529
|
-
b: Math.round(this.b),
|
|
530
|
-
a: this.a
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
toRgbArray() {
|
|
534
|
-
const n = this.toRgb();
|
|
535
|
-
return [n.r, n.g, n.b];
|
|
536
|
-
}
|
|
537
|
-
toRgbArrayString() {
|
|
538
|
-
const n = this.toRgb();
|
|
539
|
-
return `${n.r},${n.g},${n.b}`;
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* Returns the RGBA values interpolated into a string with the following format:
|
|
543
|
-
* "RGBA(xxx, xxx, xxx, xx)".
|
|
544
|
-
*/
|
|
545
|
-
toRgbString() {
|
|
546
|
-
const n = Math.round(this.r), e = Math.round(this.g), r = Math.round(this.b);
|
|
547
|
-
return this.a === 1 ? `rgb(${n}, ${e}, ${r})` : `rgba(${n}, ${e}, ${r}, ${this.roundA})`;
|
|
548
|
-
}
|
|
549
|
-
/**
|
|
550
|
-
* Returns the object as a RGBA object.
|
|
551
|
-
*/
|
|
552
|
-
toPercentageRgb() {
|
|
553
|
-
const n = (e) => `${Math.round(w(e, 255) * 100)}%`;
|
|
554
|
-
return {
|
|
555
|
-
r: n(this.r),
|
|
556
|
-
g: n(this.g),
|
|
557
|
-
b: n(this.b),
|
|
558
|
-
a: this.a
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
/**
|
|
562
|
-
* Returns the RGBA relative values interpolated into a string
|
|
563
|
-
*/
|
|
564
|
-
toPercentageRgbString() {
|
|
565
|
-
const n = (e) => Math.round(w(e, 255) * 100);
|
|
566
|
-
return this.a === 1 ? `rgb(${n(this.r)}%, ${n(this.g)}%, ${n(this.b)}%)` : `rgba(${n(this.r)}%, ${n(this.g)}%, ${n(this.b)}%, ${this.roundA})`;
|
|
567
|
-
}
|
|
568
|
-
toCmyk() {
|
|
569
|
-
return {
|
|
570
|
-
...It(this.r, this.g, this.b)
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
toCmykString() {
|
|
574
|
-
const { c: n, m: e, y: r, k: o } = It(this.r, this.g, this.b);
|
|
575
|
-
return `cmyk(${n}, ${e}, ${r}, ${o})`;
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* The 'real' name of the color -if there is one.
|
|
579
|
-
*/
|
|
580
|
-
toName() {
|
|
581
|
-
if (this.a === 0)
|
|
582
|
-
return "transparent";
|
|
583
|
-
if (this.a < 1)
|
|
584
|
-
return !1;
|
|
585
|
-
const n = `#${Et(this.r, this.g, this.b, !1)}`;
|
|
586
|
-
for (const [e, r] of Object.entries(dt))
|
|
587
|
-
if (n === r)
|
|
588
|
-
return e;
|
|
589
|
-
return !1;
|
|
590
|
-
}
|
|
591
|
-
toString(n) {
|
|
592
|
-
const e = !!n;
|
|
593
|
-
n = n ?? this.format;
|
|
594
|
-
let r = !1;
|
|
595
|
-
const o = this.a < 1 && this.a >= 0;
|
|
596
|
-
return !e && o && (n.startsWith("hex") || n === "name") ? n === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (n === "rgb" && (r = this.toRgbString()), n === "prgb" && (r = this.toPercentageRgbString()), (n === "hex" || n === "hex6") && (r = this.toHexString()), n === "hex3" && (r = this.toHexString(!0)), n === "hex4" && (r = this.toHex8String(!0)), n === "hex8" && (r = this.toHex8String()), n === "name" && (r = this.toName()), n === "hsl" && (r = this.toHslString()), n === "hsv" && (r = this.toHsvString()), n === "cmyk" && (r = this.toCmykString()), r || this.toHexString());
|
|
597
|
-
}
|
|
598
|
-
toNumber() {
|
|
599
|
-
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
600
|
-
}
|
|
601
|
-
clone() {
|
|
602
|
-
return new C(this.toString());
|
|
603
|
-
}
|
|
604
|
-
/**
|
|
605
|
-
* Lighten the color a given amount. Providing 100 will always return white.
|
|
606
|
-
* @param amount - valid between 1-100
|
|
607
|
-
*/
|
|
608
|
-
lighten(n = 10) {
|
|
609
|
-
const e = this.toHsl();
|
|
610
|
-
return e.l += n / 100, e.l = Y(e.l), new C(e);
|
|
611
|
-
}
|
|
612
|
-
/**
|
|
613
|
-
* Brighten the color a given amount, from 0 to 100.
|
|
614
|
-
* @param amount - valid between 1-100
|
|
615
|
-
*/
|
|
616
|
-
brighten(n = 10) {
|
|
617
|
-
const e = this.toRgb();
|
|
618
|
-
return e.r = Math.max(
|
|
619
|
-
0,
|
|
620
|
-
Math.min(255, e.r - Math.round(255 * -(n / 100)))
|
|
621
|
-
), e.g = Math.max(
|
|
622
|
-
0,
|
|
623
|
-
Math.min(255, e.g - Math.round(255 * -(n / 100)))
|
|
624
|
-
), e.b = Math.max(
|
|
625
|
-
0,
|
|
626
|
-
Math.min(255, e.b - Math.round(255 * -(n / 100)))
|
|
627
|
-
), new C(e);
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* Darken the color a given amount, from 0 to 100.
|
|
631
|
-
* Providing 100 will always return black.
|
|
632
|
-
* @param amount - valid between 1-100
|
|
633
|
-
*/
|
|
634
|
-
darken(n = 10) {
|
|
635
|
-
const e = this.toHsl();
|
|
636
|
-
return e.l -= n / 100, e.l = Y(e.l), new C(e);
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* Mix the color with pure white, from 0 to 100.
|
|
640
|
-
* Providing 0 will do nothing, providing 100 will always return white.
|
|
641
|
-
* @param amount - valid between 1-100
|
|
642
|
-
*/
|
|
643
|
-
tint(n = 10) {
|
|
644
|
-
return this.mix("white", n);
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Mix the color with pure black, from 0 to 100.
|
|
648
|
-
* Providing 0 will do nothing, providing 100 will always return black.
|
|
649
|
-
* @param amount - valid between 1-100
|
|
650
|
-
*/
|
|
651
|
-
shade(n = 10) {
|
|
652
|
-
return this.mix("black", n);
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Desaturate the color a given amount, from 0 to 100.
|
|
656
|
-
* Providing 100 will is the same as calling greyscale
|
|
657
|
-
* @param amount - valid between 1-100
|
|
658
|
-
*/
|
|
659
|
-
desaturate(n = 10) {
|
|
660
|
-
const e = this.toHsl();
|
|
661
|
-
return e.s -= n / 100, e.s = Y(e.s), new C(e);
|
|
662
|
-
}
|
|
663
|
-
/**
|
|
664
|
-
* Saturate the color a given amount, from 0 to 100.
|
|
665
|
-
* @param amount - valid between 1-100
|
|
666
|
-
*/
|
|
667
|
-
saturate(n = 10) {
|
|
668
|
-
const e = this.toHsl();
|
|
669
|
-
return e.s += n / 100, e.s = Y(e.s), new C(e);
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* Completely desaturates a color into greyscale.
|
|
673
|
-
* Same as calling `desaturate(100)`
|
|
674
|
-
*/
|
|
675
|
-
greyscale() {
|
|
676
|
-
return this.desaturate(100);
|
|
677
|
-
}
|
|
678
|
-
/**
|
|
679
|
-
* Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
680
|
-
* Values outside of this range will be wrapped into this range.
|
|
681
|
-
*/
|
|
682
|
-
spin(n) {
|
|
683
|
-
const e = this.toHsl(), r = (e.h + n) % 360;
|
|
684
|
-
return e.h = r < 0 ? 360 + r : r, new C(e);
|
|
685
|
-
}
|
|
686
|
-
/**
|
|
687
|
-
* Mix the current color a given amount with another color, from 0 to 100.
|
|
688
|
-
* 0 means no mixing (return current color).
|
|
689
|
-
*/
|
|
690
|
-
mix(n, e = 50) {
|
|
691
|
-
const r = this.toRgb(), o = new C(n).toRgb(), i = e / 100, a = {
|
|
692
|
-
r: (o.r - r.r) * i + r.r,
|
|
693
|
-
g: (o.g - r.g) * i + r.g,
|
|
694
|
-
b: (o.b - r.b) * i + r.b,
|
|
695
|
-
a: (o.a - r.a) * i + r.a
|
|
696
|
-
};
|
|
697
|
-
return new C(a);
|
|
698
|
-
}
|
|
699
|
-
analogous(n = 6, e = 30) {
|
|
700
|
-
const r = this.toHsl(), o = 360 / e, i = [this];
|
|
701
|
-
for (r.h = (r.h - (o * n >> 1) + 720) % 360; --n; )
|
|
702
|
-
r.h = (r.h + o) % 360, i.push(new C(r));
|
|
703
|
-
return i;
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js
|
|
707
|
-
*/
|
|
708
|
-
complement() {
|
|
709
|
-
const n = this.toHsl();
|
|
710
|
-
return n.h = (n.h + 180) % 360, new C(n);
|
|
711
|
-
}
|
|
712
|
-
monochromatic(n = 6) {
|
|
713
|
-
const e = this.toHsv(), { h: r } = e, { s: o } = e;
|
|
714
|
-
let { v: i } = e;
|
|
715
|
-
const a = [], s = 1 / n;
|
|
716
|
-
for (; n--; )
|
|
717
|
-
a.push(new C({ h: r, s: o, v: i })), i = (i + s) % 1;
|
|
718
|
-
return a;
|
|
719
|
-
}
|
|
720
|
-
splitcomplement() {
|
|
721
|
-
const n = this.toHsl(), { h: e } = n;
|
|
722
|
-
return [
|
|
723
|
-
this,
|
|
724
|
-
new C({ h: (e + 72) % 360, s: n.s, l: n.l }),
|
|
725
|
-
new C({ h: (e + 216) % 360, s: n.s, l: n.l })
|
|
726
|
-
];
|
|
727
|
-
}
|
|
728
|
-
/**
|
|
729
|
-
* Compute how the color would appear on a background
|
|
730
|
-
*/
|
|
731
|
-
onBackground(n) {
|
|
732
|
-
const e = this.toRgb(), r = new C(n).toRgb(), o = e.a + r.a * (1 - e.a);
|
|
733
|
-
return new C({
|
|
734
|
-
r: (e.r * e.a + r.r * r.a * (1 - e.a)) / o,
|
|
735
|
-
g: (e.g * e.a + r.g * r.a * (1 - e.a)) / o,
|
|
736
|
-
b: (e.b * e.a + r.b * r.a * (1 - e.a)) / o,
|
|
737
|
-
a: o
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* Alias for `polyad(3)`
|
|
742
|
-
*/
|
|
743
|
-
triad() {
|
|
744
|
-
return this.polyad(3);
|
|
745
|
-
}
|
|
746
|
-
/**
|
|
747
|
-
* Alias for `polyad(4)`
|
|
748
|
-
*/
|
|
749
|
-
tetrad() {
|
|
750
|
-
return this.polyad(4);
|
|
751
|
-
}
|
|
752
|
-
/**
|
|
753
|
-
* Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)
|
|
754
|
-
* monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...
|
|
755
|
-
*/
|
|
756
|
-
polyad(n) {
|
|
757
|
-
const e = this.toHsl(), { h: r } = e, o = [this], i = 360 / n;
|
|
758
|
-
for (let a = 1; a < n; a++)
|
|
759
|
-
o.push(
|
|
760
|
-
new C({ h: (r + a * i) % 360, s: e.s, l: e.l })
|
|
761
|
-
);
|
|
762
|
-
return o;
|
|
763
|
-
}
|
|
764
|
-
/**
|
|
765
|
-
* compare color vs current color
|
|
766
|
-
*/
|
|
767
|
-
equals(n) {
|
|
768
|
-
const e = new C(n);
|
|
769
|
-
return this.format === "cmyk" || e.format === "cmyk" ? this.toCmykString() === e.toCmykString() : this.toRgbString() === e.toRgbString();
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
function Pe(t, n) {
|
|
773
|
-
const {
|
|
774
|
-
getPrefixCls: e,
|
|
775
|
-
locale: r,
|
|
776
|
-
componentConfig: o
|
|
777
|
-
} = G(U), i = xt(
|
|
778
|
-
t,
|
|
779
|
-
{},
|
|
780
|
-
o == null ? void 0 : o.Empty
|
|
781
|
-
), { style: a, className: s, description: c, icon: h, imgSrc: d, ...u } = i, g = e("empty"), x = K(g, s), b = r.Empty.noData, l = typeof c == "string" ? c : "empty";
|
|
782
|
-
return /* @__PURE__ */ f("div", { ref: n, className: x, style: a, ...u, children: /* @__PURE__ */ tt("div", { className: `${g}-wrapper`, children: [
|
|
783
|
-
/* @__PURE__ */ f("div", { className: `${g}-image`, children: d ? /* @__PURE__ */ f("img", { alt: l, src: d }) : h || /* @__PURE__ */ f(ge, {}) }),
|
|
784
|
-
/* @__PURE__ */ f("div", { className: `${g}-description`, children: c || b })
|
|
785
|
-
] }) });
|
|
786
|
-
}
|
|
787
|
-
const Tt = nt(Pe);
|
|
788
|
-
Tt.displayName = "Empty";
|
|
789
|
-
const Fe = et.memo(Tt);
|
|
790
|
-
function qe(t) {
|
|
791
|
-
return /* @__PURE__ */ f(Fe, {});
|
|
792
|
-
}
|
|
793
|
-
const Lt = {
|
|
794
|
-
locale: me,
|
|
795
|
-
prefixCls: "pqb",
|
|
796
|
-
getPopupContainer: () => document.body,
|
|
797
|
-
size: "default",
|
|
798
|
-
renderEmpty: qe
|
|
799
|
-
}, U = se({
|
|
800
|
-
getPrefixCls: (t, n) => `${n || "pqb"}-${t}`,
|
|
801
|
-
...Lt
|
|
802
|
-
});
|
|
803
|
-
function Ue(t, n) {
|
|
804
|
-
const {
|
|
805
|
-
children: e,
|
|
806
|
-
className: r,
|
|
807
|
-
disabled: o,
|
|
808
|
-
prefix: i,
|
|
809
|
-
size: a = "default",
|
|
810
|
-
...s
|
|
811
|
-
} = t, { getPrefixCls: c } = G(U), h = c("icon-hover"), d = j();
|
|
812
|
-
return rt(n, () => ({
|
|
813
|
-
getRootDOMNode: () => d.current
|
|
814
|
-
})), /* @__PURE__ */ f(
|
|
815
|
-
"span",
|
|
816
|
-
{
|
|
817
|
-
ref: d,
|
|
818
|
-
className: K(
|
|
819
|
-
h,
|
|
820
|
-
{
|
|
821
|
-
[`${i}-icon-hover`]: i,
|
|
822
|
-
[`${h}-size-${a}`]: a && a !== "default",
|
|
823
|
-
[`${h}-disabled`]: o
|
|
824
|
-
},
|
|
825
|
-
r
|
|
826
|
-
),
|
|
827
|
-
onClick: t.onClick,
|
|
828
|
-
...s,
|
|
829
|
-
children: e
|
|
830
|
-
}
|
|
831
|
-
);
|
|
832
|
-
}
|
|
833
|
-
const Ht = et.forwardRef(Ue), je = {
|
|
834
|
-
type: "info",
|
|
835
|
-
showIcon: !0,
|
|
836
|
-
noticeType: "message",
|
|
837
|
-
duration: 3e3
|
|
838
|
-
};
|
|
839
|
-
function Oe(t, n) {
|
|
840
|
-
const {
|
|
841
|
-
getPrefixCls: e,
|
|
842
|
-
componentConfig: r,
|
|
843
|
-
rtl: o
|
|
844
|
-
} = G(U), i = xt(
|
|
845
|
-
t,
|
|
846
|
-
je,
|
|
847
|
-
r == null ? void 0 : r.Notice
|
|
848
|
-
), a = G(U), s = e("notice");
|
|
849
|
-
j();
|
|
850
|
-
const c = j(), h = j(), d = j(), {
|
|
851
|
-
title: u,
|
|
852
|
-
content: g,
|
|
853
|
-
showIcon: x,
|
|
854
|
-
className: b,
|
|
855
|
-
style: l,
|
|
856
|
-
type: m,
|
|
857
|
-
btn: p,
|
|
858
|
-
icon: v,
|
|
859
|
-
prefixCls: y,
|
|
860
|
-
closable: k,
|
|
861
|
-
noticeType: D,
|
|
862
|
-
iconPrefix: vt,
|
|
863
|
-
rtl: ne = o,
|
|
864
|
-
closeIcon: Q,
|
|
865
|
-
classPrefixCls: $t
|
|
866
|
-
} = i, re = K(
|
|
867
|
-
y,
|
|
868
|
-
`${y}-${m}`,
|
|
869
|
-
{
|
|
870
|
-
[`${y}-closable`]: k,
|
|
871
|
-
[`${y}-rtl`]: ne
|
|
872
|
-
},
|
|
873
|
-
b
|
|
874
|
-
);
|
|
875
|
-
let ot = "closable" in i ? k : !0, it = x;
|
|
876
|
-
m === "normal" && !v && (it = !1);
|
|
877
|
-
const wt = { ...a };
|
|
878
|
-
$t && (wt.prefixCls = $t);
|
|
879
|
-
function oe() {
|
|
880
|
-
return h.current;
|
|
881
|
-
}
|
|
882
|
-
function at() {
|
|
883
|
-
const { duration: S, onClose: L, id: st } = i;
|
|
884
|
-
S !== 0 && (c.current = window.setTimeout(() => {
|
|
885
|
-
L == null || L(st), z();
|
|
886
|
-
}, S));
|
|
887
|
-
}
|
|
888
|
-
function z() {
|
|
889
|
-
c.current && (window.clearTimeout(c.current), c.current = null);
|
|
890
|
-
}
|
|
891
|
-
function X() {
|
|
892
|
-
var S;
|
|
893
|
-
(S = i.onClose) == null || S.call(i, i.id);
|
|
894
|
-
}
|
|
895
|
-
function kt() {
|
|
896
|
-
const { showIcon: S, icon: L, type: st, iconPrefix: Mt } = i;
|
|
897
|
-
let H;
|
|
898
|
-
if (L)
|
|
899
|
-
H = L;
|
|
900
|
-
else if (S) {
|
|
901
|
-
switch (st) {
|
|
902
|
-
case "info":
|
|
903
|
-
H = /* @__PURE__ */ f(ue, {});
|
|
904
|
-
break;
|
|
905
|
-
case "success":
|
|
906
|
-
H = /* @__PURE__ */ f(le, {});
|
|
907
|
-
break;
|
|
908
|
-
case "error":
|
|
909
|
-
H = /* @__PURE__ */ f(fe, {});
|
|
910
|
-
break;
|
|
911
|
-
case "warning":
|
|
912
|
-
H = /* @__PURE__ */ f(he, {});
|
|
913
|
-
break;
|
|
914
|
-
case "loading":
|
|
915
|
-
H = /* @__PURE__ */ f(de, {});
|
|
916
|
-
break;
|
|
917
|
-
}
|
|
918
|
-
H = /* @__PURE__ */ f(
|
|
919
|
-
ut.Provider,
|
|
920
|
-
{
|
|
921
|
-
value: Mt ? { prefixCls: Mt } : {},
|
|
922
|
-
children: H
|
|
923
|
-
}
|
|
924
|
-
);
|
|
925
|
-
}
|
|
926
|
-
return /* @__PURE__ */ f("span", { className: `${y}-icon`, children: H });
|
|
927
|
-
}
|
|
928
|
-
function ie() {
|
|
929
|
-
z();
|
|
930
|
-
}
|
|
931
|
-
function ae() {
|
|
932
|
-
z(), at();
|
|
933
|
-
}
|
|
934
|
-
rt(n, () => ({
|
|
935
|
-
getRootDOMNode: oe
|
|
936
|
-
}), []), E(() => {
|
|
937
|
-
const S = d.current;
|
|
938
|
-
return (S && (S == null ? void 0 : S.duration) !== i.duration || i.update) && (z(), at()), d.current = i, () => {
|
|
939
|
-
};
|
|
940
|
-
}, [i.duration, i.update]), E(() => (at(), () => {
|
|
941
|
-
z();
|
|
942
|
-
}), []);
|
|
943
|
-
let T;
|
|
944
|
-
return D === "message" && (ot = k, T = /* @__PURE__ */ tt(Nt, { children: [
|
|
945
|
-
it && kt(),
|
|
946
|
-
/* @__PURE__ */ f("span", { className: `${y}-content`, children: g }),
|
|
947
|
-
ot && (Q !== void 0 ? /* @__PURE__ */ f("span", { onClick: X, className: `${y}-close-btn`, children: Q }) : /* @__PURE__ */ f(
|
|
948
|
-
Ht,
|
|
949
|
-
{
|
|
950
|
-
prefix: y,
|
|
951
|
-
className: `${y}-close-btn`,
|
|
952
|
-
onClick: X,
|
|
953
|
-
children: /* @__PURE__ */ f(St, {})
|
|
954
|
-
}
|
|
955
|
-
))
|
|
956
|
-
] })), D === "notification" && (T = /* @__PURE__ */ tt(Nt, { children: [
|
|
957
|
-
it && /* @__PURE__ */ f("div", { className: `${y}-left`, children: kt() }),
|
|
958
|
-
/* @__PURE__ */ tt("div", { className: `${y}-right`, children: [
|
|
959
|
-
u && /* @__PURE__ */ f("div", { className: `${y}-title`, children: u }),
|
|
960
|
-
/* @__PURE__ */ f("div", { className: `${y}-content`, children: g }),
|
|
961
|
-
p && /* @__PURE__ */ f("div", { className: `${y}-btn-wrapper`, children: p })
|
|
962
|
-
] }),
|
|
963
|
-
ot && (Q !== void 0 ? /* @__PURE__ */ f("span", { onClick: X, className: `${y}-close-btn`, children: Q }) : /* @__PURE__ */ f(
|
|
964
|
-
Ht,
|
|
965
|
-
{
|
|
966
|
-
prefix: y,
|
|
967
|
-
className: `${y}-close-btn`,
|
|
968
|
-
onClick: X,
|
|
969
|
-
children: /* @__PURE__ */ f(
|
|
970
|
-
ut.Provider,
|
|
971
|
-
{
|
|
972
|
-
value: vt ? { prefixCls: vt } : {},
|
|
973
|
-
children: /* @__PURE__ */ f(St, {})
|
|
974
|
-
}
|
|
975
|
-
)
|
|
976
|
-
}
|
|
977
|
-
))
|
|
978
|
-
] })), T && (T = /* @__PURE__ */ f(Ct, { ...wt, children: /* @__PURE__ */ f(
|
|
979
|
-
"div",
|
|
980
|
-
{
|
|
981
|
-
ref: h,
|
|
982
|
-
className: `${s}-${D}`,
|
|
983
|
-
onMouseEnter: ie,
|
|
984
|
-
onMouseLeave: ae,
|
|
985
|
-
children: /* @__PURE__ */ f("div", { className: re, style: l, role: "alert", children: T })
|
|
986
|
-
}
|
|
987
|
-
) })), T;
|
|
988
|
-
}
|
|
989
|
-
const Wt = nt(Oe);
|
|
990
|
-
function De(t = {}) {
|
|
991
|
-
const {
|
|
992
|
-
maxCount: n,
|
|
993
|
-
duration: e = 3e3,
|
|
994
|
-
prefixCls: r,
|
|
995
|
-
getContainer: o
|
|
996
|
-
} = t, i = j(), a = /* @__PURE__ */ f(ee, { ref: i }), s = {};
|
|
997
|
-
let c;
|
|
998
|
-
function h(u) {
|
|
999
|
-
let g, x;
|
|
1000
|
-
if (i.current) {
|
|
1001
|
-
const v = i.current.getContextConfig();
|
|
1002
|
-
x = v.rtl, g = v.prefixCls;
|
|
1003
|
-
}
|
|
1004
|
-
const b = r || g, l = yt(u.position, x), m = {
|
|
1005
|
-
duration: e,
|
|
1006
|
-
...u
|
|
1007
|
-
}, p = s[l];
|
|
1008
|
-
if (p) {
|
|
1009
|
-
if (p.notices.length >= n) {
|
|
1010
|
-
const v = p.notices[0];
|
|
1011
|
-
m.id = v.id, p.shift();
|
|
1012
|
-
}
|
|
1013
|
-
p.add({ ...m });
|
|
1014
|
-
} else
|
|
1015
|
-
c = /* @__PURE__ */ f(
|
|
1016
|
-
A,
|
|
1017
|
-
{
|
|
1018
|
-
...m,
|
|
1019
|
-
prefixCls: b,
|
|
1020
|
-
rtl: x,
|
|
1021
|
-
getContainer: o,
|
|
1022
|
-
callback: (v) => {
|
|
1023
|
-
s[l] = v;
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
), i.current.addInstance(c);
|
|
1027
|
-
return s[l];
|
|
1028
|
-
}
|
|
1029
|
-
const d = {};
|
|
1030
|
-
return pt.forEach((u) => {
|
|
1031
|
-
d[u] = (g) => h({
|
|
1032
|
-
...g,
|
|
1033
|
-
type: u
|
|
1034
|
-
});
|
|
1035
|
-
}), [d, a];
|
|
1036
|
-
}
|
|
1037
|
-
const Te = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Pt = { randomUUID: Te };
|
|
1038
|
-
let ht;
|
|
1039
|
-
const Le = new Uint8Array(16);
|
|
1040
|
-
function We() {
|
|
1041
|
-
if (!ht) {
|
|
1042
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1043
|
-
throw new Error(
|
|
1044
|
-
"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"
|
|
1045
|
-
);
|
|
1046
|
-
ht = crypto.getRandomValues.bind(crypto);
|
|
1047
|
-
}
|
|
1048
|
-
return ht(Le);
|
|
1049
|
-
}
|
|
1050
|
-
const $ = [];
|
|
1051
|
-
for (let t = 0; t < 256; ++t)
|
|
1052
|
-
$.push((t + 256).toString(16).slice(1));
|
|
1053
|
-
function Ve(t, n = 0) {
|
|
1054
|
-
return ($[t[n + 0]] + $[t[n + 1]] + $[t[n + 2]] + $[t[n + 3]] + "-" + $[t[n + 4]] + $[t[n + 5]] + "-" + $[t[n + 6]] + $[t[n + 7]] + "-" + $[t[n + 8]] + $[t[n + 9]] + "-" + $[t[n + 10]] + $[t[n + 11]] + $[t[n + 12]] + $[t[n + 13]] + $[t[n + 14]] + $[t[n + 15]]).toLowerCase();
|
|
1055
|
-
}
|
|
1056
|
-
function ze(t, n, e) {
|
|
1057
|
-
var r;
|
|
1058
|
-
if (Pt.randomUUID && !n && !t)
|
|
1059
|
-
return Pt.randomUUID();
|
|
1060
|
-
t = t || {};
|
|
1061
|
-
const o = t.random ?? ((r = t.rng) == null ? void 0 : r.call(t)) ?? We();
|
|
1062
|
-
if (o.length < 16)
|
|
1063
|
-
throw new Error("Random bytes length must be >= 16");
|
|
1064
|
-
if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, n) {
|
|
1065
|
-
if (e = e || 0, e < 0 || e + 16 > n.length)
|
|
1066
|
-
throw new RangeError(
|
|
1067
|
-
`UUID byte range ${e}:${e + 15} is out of buffer bounds`
|
|
1068
|
-
);
|
|
1069
|
-
for (let i = 0; i < 16; ++i)
|
|
1070
|
-
n[e + i] = o[i];
|
|
1071
|
-
return n;
|
|
1072
|
-
}
|
|
1073
|
-
return Ve(o);
|
|
1074
|
-
}
|
|
1075
|
-
function Vt(t) {
|
|
1076
|
-
function n(e, r) {
|
|
1077
|
-
const [o, i] = Ft(
|
|
1078
|
-
(e == null ? void 0 : e.notices) ?? []
|
|
1079
|
-
);
|
|
1080
|
-
function a(u) {
|
|
1081
|
-
const g = (u == null ? void 0 : u.id) ?? `pqb_notice_id_${ze()}`;
|
|
1082
|
-
return u.id && o.findIndex((x) => x.id === u.id) !== -1 ? s(u) : i((x) => [].concat(x, {
|
|
1083
|
-
...u,
|
|
1084
|
-
id: g
|
|
1085
|
-
})), g;
|
|
1086
|
-
}
|
|
1087
|
-
function s(u) {
|
|
1088
|
-
i((g) => g.map((x) => u.id === x.id ? (delete x.update, u) : x));
|
|
1089
|
-
}
|
|
1090
|
-
function c() {
|
|
1091
|
-
i((u) => {
|
|
1092
|
-
const g = [].concat(u);
|
|
1093
|
-
return g.shift(), g;
|
|
1094
|
-
});
|
|
1095
|
-
}
|
|
1096
|
-
function h(u) {
|
|
1097
|
-
i((g) => g.filter((x) => x.id !== u));
|
|
1098
|
-
}
|
|
1099
|
-
function d() {
|
|
1100
|
-
i((u) => []);
|
|
1101
|
-
}
|
|
1102
|
-
return rt(r, () => ({ notices: o, add: a, update: s, shift: c, remove: h, clear: d }), [o, a, s, c, h, d]), E(() => () => {
|
|
1103
|
-
}, [o]), /* @__PURE__ */ f(
|
|
1104
|
-
t,
|
|
1105
|
-
{
|
|
1106
|
-
...e,
|
|
1107
|
-
notices: o,
|
|
1108
|
-
add: a,
|
|
1109
|
-
update: s,
|
|
1110
|
-
shift: c,
|
|
1111
|
-
remove: h,
|
|
1112
|
-
clear: d
|
|
1113
|
-
}
|
|
1114
|
-
);
|
|
1115
|
-
}
|
|
1116
|
-
return nt(n);
|
|
1117
|
-
}
|
|
1118
|
-
const pt = [
|
|
1119
|
-
"info",
|
|
1120
|
-
"success",
|
|
1121
|
-
"error",
|
|
1122
|
-
"warning",
|
|
1123
|
-
"loading",
|
|
1124
|
-
"normal"
|
|
1125
|
-
];
|
|
1126
|
-
let O = {}, zt, Bt, Gt, gt, J;
|
|
1127
|
-
function yt(t, n) {
|
|
1128
|
-
return B(t) && (t = n || J ? "topLeft" : "topRight"), t;
|
|
1129
|
-
}
|
|
1130
|
-
function Be(t) {
|
|
1131
|
-
const { prefixCls: n, rtl: e, getContainer: r, notices: o } = t, i = B(e) ? J : e, a = yt(t.position, i), s = n || Bt, c = s ? `${s}-notification` : "pqb-notification";
|
|
1132
|
-
let h;
|
|
1133
|
-
a === "topLeft" || a === "bottomLeft" ? h = "slideNoticeLeft" : h = "slideNoticeRight";
|
|
1134
|
-
const d = K(
|
|
1135
|
-
`${c}-wrapper`,
|
|
1136
|
-
`${c}-wrapper-${a}`,
|
|
1137
|
-
{ [`${c}-wrapper-rtl`]: J }
|
|
1138
|
-
), u = r == null ? void 0 : r();
|
|
1139
|
-
function g(b) {
|
|
1140
|
-
const l = o.find((m) => m.id === b);
|
|
1141
|
-
l && t.update({
|
|
1142
|
-
...l,
|
|
1143
|
-
style: { ...l.style, opacity: 0 }
|
|
1144
|
-
}), setTimeout(() => {
|
|
1145
|
-
t.remove(b);
|
|
1146
|
-
}, 200);
|
|
1147
|
-
}
|
|
1148
|
-
E(() => (t.add(t), () => {
|
|
1149
|
-
t.clear();
|
|
1150
|
-
}), []), E(() => {
|
|
1151
|
-
var l;
|
|
1152
|
-
const b = {
|
|
1153
|
-
...t,
|
|
1154
|
-
add: t.add,
|
|
1155
|
-
update: t.update,
|
|
1156
|
-
clear: t.clear,
|
|
1157
|
-
remove: g
|
|
1158
|
-
};
|
|
1159
|
-
return (l = t.callback) == null || l.call(t, b), () => {
|
|
1160
|
-
var m;
|
|
1161
|
-
(m = t.callback) == null || m.call(t, null);
|
|
1162
|
-
};
|
|
1163
|
-
}, [t, t.notices]);
|
|
1164
|
-
const x = /* @__PURE__ */ f("div", { className: d, children: /* @__PURE__ */ f(qt, { component: null, children: o.map((b) => /* @__PURE__ */ f(
|
|
1165
|
-
Ut,
|
|
1166
|
-
{
|
|
1167
|
-
timeout: {
|
|
1168
|
-
enter: 400,
|
|
1169
|
-
exit: 300
|
|
1170
|
-
},
|
|
1171
|
-
classNames: h,
|
|
1172
|
-
onExit: (l) => {
|
|
1173
|
-
l && (l.style.height = `${l.scrollHeight}px`);
|
|
1174
|
-
},
|
|
1175
|
-
onExiting: (l) => {
|
|
1176
|
-
l && (l.style.height = 0);
|
|
1177
|
-
},
|
|
1178
|
-
onExited: (l) => {
|
|
1179
|
-
var m;
|
|
1180
|
-
l && (l.style.height = 0, (m = b.onClose) == null || m.call(b));
|
|
1181
|
-
},
|
|
1182
|
-
children: /* @__PURE__ */ f(
|
|
1183
|
-
Wt,
|
|
1184
|
-
{
|
|
1185
|
-
...b,
|
|
1186
|
-
onClose: g,
|
|
1187
|
-
prefixCls: c,
|
|
1188
|
-
iconPrefix: s,
|
|
1189
|
-
classPrefixCls: s,
|
|
1190
|
-
noticeType: "notification",
|
|
1191
|
-
rtl: i
|
|
1192
|
-
}
|
|
1193
|
-
)
|
|
1194
|
-
},
|
|
1195
|
-
b.id
|
|
1196
|
-
)) }) });
|
|
1197
|
-
return u ? be(x, u) : x;
|
|
1198
|
-
}
|
|
1199
|
-
const A = Vt(Be);
|
|
1200
|
-
A.useNotification = De;
|
|
1201
|
-
A.config = (t = {}) => {
|
|
1202
|
-
var n;
|
|
1203
|
-
V(t.maxCount) && (zt = t.maxCount), t.prefixCls && (Bt = t.prefixCls), V(t.duration) && (Gt = t.duration), typeof t.rtl == "boolean" && (J = t.rtl), t.getContainer && ((n = t.getContainer) == null ? void 0 : n.call(t)) !== gt && (gt = t.getContainer(), Object.values(O).forEach(
|
|
1204
|
-
(e) => {
|
|
1205
|
-
var r;
|
|
1206
|
-
return (r = e == null ? void 0 : e.clear) == null ? void 0 : r.call(e);
|
|
1207
|
-
}
|
|
1208
|
-
), O = {});
|
|
1209
|
-
};
|
|
1210
|
-
A.clear = () => {
|
|
1211
|
-
Object.values(O).forEach((t) => {
|
|
1212
|
-
t == null || t.clear();
|
|
1213
|
-
});
|
|
1214
|
-
};
|
|
1215
|
-
A.remove = (t) => {
|
|
1216
|
-
Object.values(O).forEach((n) => {
|
|
1217
|
-
n == null || n.remove(t);
|
|
1218
|
-
});
|
|
1219
|
-
};
|
|
1220
|
-
A.addInstance = (t) => {
|
|
1221
|
-
const n = yt(t.position, J), e = O[n], r = {
|
|
1222
|
-
duration: Gt,
|
|
1223
|
-
...t
|
|
1224
|
-
};
|
|
1225
|
-
if (e) {
|
|
1226
|
-
const a = e.notices.find(
|
|
1227
|
-
(c) => c.id === t.id
|
|
1228
|
-
), s = {
|
|
1229
|
-
...r,
|
|
1230
|
-
update: a
|
|
1231
|
-
};
|
|
1232
|
-
return e.notices.length >= zt && (a ? s.id = a.id : e.shift()), e.add({ ...s }), e;
|
|
1233
|
-
}
|
|
1234
|
-
const o = document.createElement("div");
|
|
1235
|
-
return (gt || document.body).appendChild(o), jt(o).render(
|
|
1236
|
-
/* @__PURE__ */ f(
|
|
1237
|
-
A,
|
|
1238
|
-
{
|
|
1239
|
-
...r,
|
|
1240
|
-
callback: (a) => {
|
|
1241
|
-
O[n] = a;
|
|
1242
|
-
},
|
|
1243
|
-
ref: (a) => () => {
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
)
|
|
1247
|
-
), O[n];
|
|
1248
|
-
};
|
|
1249
|
-
pt.forEach((t) => {
|
|
1250
|
-
A[t] = (n) => A.addInstance({
|
|
1251
|
-
...n,
|
|
1252
|
-
type: t
|
|
1253
|
-
});
|
|
1254
|
-
});
|
|
1255
|
-
function Ge(t = {}) {
|
|
1256
|
-
const { maxCount: n, duration: e = 3e3, prefixCls: r } = t, o = j(), i = /* @__PURE__ */ f(ee, { ref: o }), a = {};
|
|
1257
|
-
let s;
|
|
1258
|
-
function c(d) {
|
|
1259
|
-
let u, g;
|
|
1260
|
-
if (o.current) {
|
|
1261
|
-
const k = o.current.getContextConfig();
|
|
1262
|
-
g = k.rtl, u = k.prefixCls;
|
|
1263
|
-
}
|
|
1264
|
-
const x = r || u, b = {
|
|
1265
|
-
position: "top",
|
|
1266
|
-
duration: e,
|
|
1267
|
-
...d
|
|
1268
|
-
}, { position: l, transitionClassNames: m } = b;
|
|
1269
|
-
let p;
|
|
1270
|
-
const v = a[l];
|
|
1271
|
-
return v ? v.notices.length >= n ? (p = v.notices[0].id, v.shift(), v.add({ ...b, id: p })) : p = v.add(b) : (s = /* @__PURE__ */ f(
|
|
1272
|
-
F,
|
|
1273
|
-
{
|
|
1274
|
-
...b,
|
|
1275
|
-
transitionClassNames: m,
|
|
1276
|
-
prefixCls: x,
|
|
1277
|
-
rtl: g,
|
|
1278
|
-
callback: (k) => {
|
|
1279
|
-
a[l] = k;
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
), o.current.addInstance(s)), () => {
|
|
1283
|
-
var k, D;
|
|
1284
|
-
(D = (k = a[l]) == null ? void 0 : k.remove) == null || D.call(k, p);
|
|
1285
|
-
};
|
|
1286
|
-
}
|
|
1287
|
-
const h = {};
|
|
1288
|
-
return Jt.forEach((d) => {
|
|
1289
|
-
h[d] = (u) => {
|
|
1290
|
-
const g = xe(u) ? { content: u } : u;
|
|
1291
|
-
return c({
|
|
1292
|
-
...g,
|
|
1293
|
-
type: d
|
|
1294
|
-
});
|
|
1295
|
-
};
|
|
1296
|
-
}), [h, i];
|
|
1297
|
-
}
|
|
1298
|
-
const Jt = [...pt];
|
|
1299
|
-
let W = {}, Kt, Qt, Xt, mt, Yt, Zt;
|
|
1300
|
-
function Je(t) {
|
|
1301
|
-
const {
|
|
1302
|
-
transitionClassNames: n,
|
|
1303
|
-
transitionTimeout: e,
|
|
1304
|
-
prefixCls: r,
|
|
1305
|
-
rtl: o,
|
|
1306
|
-
closable: i,
|
|
1307
|
-
notices: a,
|
|
1308
|
-
position: s
|
|
1309
|
-
} = t;
|
|
1310
|
-
function c(l) {
|
|
1311
|
-
const m = t.notices.find((p) => p.id === l);
|
|
1312
|
-
m && t.update({
|
|
1313
|
-
...m,
|
|
1314
|
-
style: { ...m.style, opacity: 0 }
|
|
1315
|
-
}), setTimeout(() => {
|
|
1316
|
-
t.remove(l);
|
|
1317
|
-
}, 100);
|
|
1318
|
-
}
|
|
1319
|
-
E(() => (t.add(t), () => {
|
|
1320
|
-
t.clear();
|
|
1321
|
-
}), []), E(() => {
|
|
1322
|
-
var m;
|
|
1323
|
-
const l = {
|
|
1324
|
-
...t,
|
|
1325
|
-
add: t.add,
|
|
1326
|
-
update: t.update,
|
|
1327
|
-
clear: t.clear,
|
|
1328
|
-
remove: c
|
|
1329
|
-
};
|
|
1330
|
-
return (m = t.callback) == null || m.call(t, l), () => {
|
|
1331
|
-
var p;
|
|
1332
|
-
(p = t.callback) == null || p.call(t, null);
|
|
1333
|
-
};
|
|
1334
|
-
}, [t, t.notices]);
|
|
1335
|
-
const h = r || Qt, d = B(o) ? Yt : o, u = B(i) ? Zt : i, g = h ? `${h}-message` : "pqb-message", x = {
|
|
1336
|
-
enter: V(e == null ? void 0 : e.enter) ? e == null ? void 0 : e.enter : 100,
|
|
1337
|
-
exit: V(e == null ? void 0 : e.exit) ? e == null ? void 0 : e.exit : 300
|
|
1338
|
-
}, b = K(
|
|
1339
|
-
`${g}-wrapper`,
|
|
1340
|
-
`${g}-wrapper-${s}`
|
|
1341
|
-
);
|
|
1342
|
-
return /* @__PURE__ */ f("div", { className: b, children: /* @__PURE__ */ f(qt, { component: null, children: a.map((l) => /* @__PURE__ */ f(
|
|
1343
|
-
Ut,
|
|
1344
|
-
{
|
|
1345
|
-
timeout: x,
|
|
1346
|
-
classNames: n || "fadeMessage",
|
|
1347
|
-
onExit: (m) => {
|
|
1348
|
-
m && (m.style.height = `${m.scrollHeight}px`);
|
|
1349
|
-
},
|
|
1350
|
-
onExiting: (m) => {
|
|
1351
|
-
m && (m.style.height = 0);
|
|
1352
|
-
},
|
|
1353
|
-
onExited: (m) => {
|
|
1354
|
-
var p;
|
|
1355
|
-
m && (m.style.height = 0, (p = l.onClose) == null || p.call(l));
|
|
1356
|
-
},
|
|
1357
|
-
children: /* @__PURE__ */ f(
|
|
1358
|
-
Wt,
|
|
1359
|
-
{
|
|
1360
|
-
...l,
|
|
1361
|
-
prefixCls: g,
|
|
1362
|
-
classPrefixCls: h,
|
|
1363
|
-
iconPrefix: h,
|
|
1364
|
-
onClose: c,
|
|
1365
|
-
noticeType: "message",
|
|
1366
|
-
rtl: d,
|
|
1367
|
-
...B(u) ? {} : { closable: u }
|
|
1368
|
-
}
|
|
1369
|
-
)
|
|
1370
|
-
},
|
|
1371
|
-
l.id
|
|
1372
|
-
)) }) });
|
|
1373
|
-
}
|
|
1374
|
-
const F = Vt(Je);
|
|
1375
|
-
F.config = (t = {}) => {
|
|
1376
|
-
var n;
|
|
1377
|
-
V(t.maxCount) && (Kt = t.maxCount), t.prefixCls && (Qt = t.prefixCls), V(t.duration) && (Xt = t.duration), typeof t.rtl == "boolean" && (Yt = t.rtl), typeof t.closable == "boolean" && (Zt = t.closable), ((n = t.getContainer) == null ? void 0 : n.call(t)) !== mt && (mt = t.getContainer(), Object.values(W).forEach((e) => e == null ? void 0 : e.clear()), W = {});
|
|
1378
|
-
};
|
|
1379
|
-
F.clear = () => {
|
|
1380
|
-
Object.values(W).forEach((t) => {
|
|
1381
|
-
t == null || t.clear();
|
|
1382
|
-
});
|
|
1383
|
-
};
|
|
1384
|
-
F.addInstance = (t) => {
|
|
1385
|
-
const n = {
|
|
1386
|
-
position: "top",
|
|
1387
|
-
duration: Xt,
|
|
1388
|
-
...t
|
|
1389
|
-
}, { position: e, transitionClassNames: r, transitionTimeout: o } = n;
|
|
1390
|
-
let i;
|
|
1391
|
-
const a = W[e];
|
|
1392
|
-
if (a) {
|
|
1393
|
-
const c = a.notices.find(
|
|
1394
|
-
(d) => d.id === t.id
|
|
1395
|
-
), h = {
|
|
1396
|
-
...n,
|
|
1397
|
-
update: c
|
|
1398
|
-
};
|
|
1399
|
-
a.notices.length >= Kt ? c ? a.add({
|
|
1400
|
-
...h,
|
|
1401
|
-
id: c.id
|
|
1402
|
-
}) : (a.shift(), a.add(h)) : i = a.add(h);
|
|
1403
|
-
} else {
|
|
1404
|
-
const c = document.createElement("div");
|
|
1405
|
-
(mt || document.body).appendChild(c), jt(c).render(
|
|
1406
|
-
/* @__PURE__ */ f(
|
|
1407
|
-
F,
|
|
1408
|
-
{
|
|
1409
|
-
transitionClassNames: r,
|
|
1410
|
-
transitionTimeout: o,
|
|
1411
|
-
...n,
|
|
1412
|
-
callback: (d) => {
|
|
1413
|
-
W[e] = d;
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
)
|
|
1417
|
-
);
|
|
1418
|
-
}
|
|
1419
|
-
return () => {
|
|
1420
|
-
var c;
|
|
1421
|
-
(c = W[e]) == null || c.remove(i);
|
|
1422
|
-
};
|
|
1423
|
-
};
|
|
1424
|
-
Jt.forEach((t) => {
|
|
1425
|
-
F[t] = (n) => {
|
|
1426
|
-
const e = typeof n == "string" ? { content: n } : n;
|
|
1427
|
-
return F.addInstance({
|
|
1428
|
-
...e,
|
|
1429
|
-
type: t
|
|
1430
|
-
});
|
|
1431
|
-
};
|
|
1432
|
-
});
|
|
1433
|
-
F.useMessage = Ge;
|
|
1434
|
-
let _t = {};
|
|
1435
|
-
function Ke(t) {
|
|
1436
|
-
_t = {
|
|
1437
|
-
...t
|
|
1438
|
-
};
|
|
1439
|
-
}
|
|
1440
|
-
function En() {
|
|
1441
|
-
return _t;
|
|
1442
|
-
}
|
|
1443
|
-
let bt = {
|
|
1444
|
-
simple: !0
|
|
1445
|
-
};
|
|
1446
|
-
const In = (t) => {
|
|
1447
|
-
bt = {
|
|
1448
|
-
...bt,
|
|
1449
|
-
...t
|
|
1450
|
-
};
|
|
1451
|
-
}, An = () => bt, Hn = [], Qe = {
|
|
1452
|
-
primaryColor: {
|
|
1453
|
-
default: "--pqbblue-6",
|
|
1454
|
-
hover: "--pqbblue-5",
|
|
1455
|
-
active: "--pqbblue-7"
|
|
1456
|
-
},
|
|
1457
|
-
successColor: {
|
|
1458
|
-
default: "--green-6",
|
|
1459
|
-
hover: "--green-5",
|
|
1460
|
-
active: "--green-7"
|
|
1461
|
-
},
|
|
1462
|
-
infoColor: {
|
|
1463
|
-
default: "--pqbblue-6",
|
|
1464
|
-
hover: "--pqbblue-5",
|
|
1465
|
-
active: "--pqbblue-7"
|
|
1466
|
-
},
|
|
1467
|
-
warningColor: {
|
|
1468
|
-
default: "--orangered-6",
|
|
1469
|
-
hover: "--orangered-5",
|
|
1470
|
-
active: "--orangered-7"
|
|
1471
|
-
},
|
|
1472
|
-
dangerColor: {
|
|
1473
|
-
default: "--red-6",
|
|
1474
|
-
hover: "--red-5",
|
|
1475
|
-
active: "--red-7"
|
|
1476
|
-
}
|
|
1477
|
-
}, Xe = Lt, Ye = {};
|
|
1478
|
-
function Ct(t) {
|
|
1479
|
-
const n = xt(
|
|
1480
|
-
t,
|
|
1481
|
-
Xe,
|
|
1482
|
-
Ye
|
|
1483
|
-
), {
|
|
1484
|
-
theme: e,
|
|
1485
|
-
themeMode: r,
|
|
1486
|
-
prefixCls: o,
|
|
1487
|
-
children: i,
|
|
1488
|
-
locale: a,
|
|
1489
|
-
rtl: s,
|
|
1490
|
-
effectGlobalNotice: c = !0,
|
|
1491
|
-
effectGlobalModal: h = !0
|
|
1492
|
-
} = n, d = window.document.body;
|
|
1493
|
-
E(() => {
|
|
1494
|
-
e && ce(e) && Object.entries(Qe).forEach(([b, l], m, p) => {
|
|
1495
|
-
const v = e[b];
|
|
1496
|
-
if (!v) return;
|
|
1497
|
-
const y = new C(v);
|
|
1498
|
-
d.style.setProperty(l.default, y.lighten(0).toRgbArrayString()), e[`${b}Hover`] || d.style.setProperty(l.hover, y.lighten(10).toRgbArrayString()), e[`${b}Active`] || d.style.setProperty(l.active, y.lighten(-10).toRgbArrayString());
|
|
1499
|
-
});
|
|
1500
|
-
}, [e]), E(() => {
|
|
1501
|
-
const b = ["pqb-theme"];
|
|
1502
|
-
return r ? b.forEach((l) => {
|
|
1503
|
-
d.setAttribute(l, r);
|
|
1504
|
-
}) : b.forEach((l) => {
|
|
1505
|
-
d.removeAttribute(l);
|
|
1506
|
-
}), () => {
|
|
1507
|
-
};
|
|
1508
|
-
}, [r]), E(() => {
|
|
1509
|
-
c && (F.config({ prefixCls: o, rtl: s }), A.config({ prefixCls: o, rtl: s }));
|
|
1510
|
-
}, [o, s, c]);
|
|
1511
|
-
function u(b, l) {
|
|
1512
|
-
return `${l || o}-${b}`;
|
|
1513
|
-
}
|
|
1514
|
-
const g = {
|
|
1515
|
-
...pe(n, ["children"]),
|
|
1516
|
-
getPrefixCls: u
|
|
1517
|
-
};
|
|
1518
|
-
E(() => {
|
|
1519
|
-
h && Ke({ locale: a, prefixCls: o, rtl: s });
|
|
1520
|
-
}, [a, o, s, h]);
|
|
1521
|
-
let x = i;
|
|
1522
|
-
return o && o !== "pqb" && (x = /* @__PURE__ */ f(ut.Provider, { value: { prefixCls: o }, children: i })), /* @__PURE__ */ f(U.Provider, { value: g, children: x });
|
|
1523
|
-
}
|
|
1524
|
-
Ct.ConfigContext = U;
|
|
1525
|
-
Ct.displayName = "ConfigProvider";
|
|
1526
|
-
const Pn = U.Consumer;
|
|
1527
|
-
function te(t, n) {
|
|
1528
|
-
const e = G(U), [r, o] = Ft([]);
|
|
1529
|
-
function i(c) {
|
|
1530
|
-
o((h) => [...h, c]);
|
|
1531
|
-
}
|
|
1532
|
-
function a(c) {
|
|
1533
|
-
o(
|
|
1534
|
-
(h) => h.filter((d) => c !== d)
|
|
1535
|
-
);
|
|
1536
|
-
}
|
|
1537
|
-
function s() {
|
|
1538
|
-
return e;
|
|
1539
|
-
}
|
|
1540
|
-
return rt(n, () => ({
|
|
1541
|
-
addInstance: i,
|
|
1542
|
-
removeInstance: a,
|
|
1543
|
-
getContextConfig: s
|
|
1544
|
-
})), et.Children.map(
|
|
1545
|
-
r,
|
|
1546
|
-
(c, h) => et.cloneElement(c, { key: h })
|
|
1547
|
-
);
|
|
1548
|
-
}
|
|
1549
|
-
te.displayName = "ContextHolderElement";
|
|
1550
|
-
const ee = nt(te);
|
|
1551
|
-
export {
|
|
1552
|
-
Rt as $,
|
|
1553
|
-
Pn as C,
|
|
1554
|
-
Fe as E,
|
|
1555
|
-
At as F,
|
|
1556
|
-
Ne as G,
|
|
1557
|
-
Et as H,
|
|
1558
|
-
Ht as I,
|
|
1559
|
-
Rn as J,
|
|
1560
|
-
F as M,
|
|
1561
|
-
Dt as N,
|
|
1562
|
-
we as O,
|
|
1563
|
-
ke as T,
|
|
1564
|
-
Re as U,
|
|
1565
|
-
Me as W,
|
|
1566
|
-
U as a,
|
|
1567
|
-
Ct as b,
|
|
1568
|
-
N as c,
|
|
1569
|
-
A as d,
|
|
1570
|
-
De as e,
|
|
1571
|
-
C as f,
|
|
1572
|
-
ee as g,
|
|
1573
|
-
Qe as h,
|
|
1574
|
-
Hn as i,
|
|
1575
|
-
En as j,
|
|
1576
|
-
An as k,
|
|
1577
|
-
ze as l,
|
|
1578
|
-
Wt as m,
|
|
1579
|
-
pt as n,
|
|
1580
|
-
yt as o,
|
|
1581
|
-
Jt as p,
|
|
1582
|
-
In as s,
|
|
1583
|
-
Ge as u,
|
|
1584
|
-
lt as y
|
|
1585
|
-
};
|