@chaoswise/ui 3.0.23 → 3.1.0
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/lib/Antd5/_util/ActionButton.js +4 -2
- package/lib/Antd5/_util/ContextIsolator.js +27 -0
- package/lib/Antd5/_util/easings.js +2 -2
- package/lib/Antd5/_util/getScroll.js +9 -8
- package/lib/Antd5/_util/hooks/useClosable.js +3 -2
- package/lib/Antd5/_util/hooks/useUniqueMemo.js +123 -0
- package/lib/Antd5/_util/hooks/useZIndex.js +31 -15
- package/lib/Antd5/_util/motion.js +3 -2
- package/lib/Antd5/_util/placements.js +2 -2
- package/lib/Antd5/_util/scrollTo.js +1 -1
- package/lib/Antd5/_util/statusUtils.js +1 -1
- package/lib/Antd5/_util/toList.js +5 -0
- package/lib/Antd5/_util/warning.js +0 -1
- package/lib/Antd5/_util/wave/WaveEffect.js +2 -2
- package/lib/Antd5/_util/wave/interface.js +2 -1
- package/lib/Antd5/_util/wave/useWave.js +1 -1
- package/lib/Antd5/_util/wave/util.js +1 -9
- package/lib/Antd5/alert/Alert.js +1 -2
- package/lib/Antd5/alert/ErrorBoundary.js +1 -1
- package/lib/Antd5/alert/design/behavior-pattern.js +3 -3
- package/lib/Antd5/alert/style/index.js +6 -4
- package/lib/Antd5/anchor/Anchor.js +8 -7
- package/lib/Antd5/anchor/AnchorLink.js +4 -4
- package/lib/Antd5/app/index.js +2 -1
- package/lib/Antd5/app/style/index.js +5 -4
- package/lib/Antd5/auto-complete/index.js +1 -1
- package/lib/Antd5/avatar/group.js +35 -17
- package/lib/Antd5/avatar/style/index.js +18 -13
- package/lib/Antd5/back-top/index.js +3 -2
- package/lib/Antd5/badge/ScrollNumber.js +1 -1
- package/lib/Antd5/badge/SingleNumber.js +17 -16
- package/lib/Antd5/badge/style/index.js +6 -7
- package/lib/Antd5/badge/style/ribbon.js +3 -3
- package/lib/Antd5/breadcrumb/design/behavior-pattern.js +4 -4
- package/lib/Antd5/breadcrumb/style/index.js +2 -2
- package/lib/Antd5/button/LoadingIcon.js +5 -10
- package/lib/Antd5/button/button-group.js +0 -1
- package/lib/Antd5/button/button.js +70 -41
- package/lib/Antd5/button/buttonHelpers.js +7 -5
- package/lib/Antd5/button/style/{compactCmp.js → compact.js} +20 -27
- package/lib/Antd5/button/style/group.js +9 -7
- package/lib/Antd5/button/style/index.js +150 -110
- package/lib/Antd5/button/style/token.js +8 -1
- package/lib/Antd5/calendar/generateCalendar.js +25 -28
- package/lib/Antd5/calendar/style/index.js +4 -4
- package/lib/Antd5/card/Card.js +3 -3
- package/lib/Antd5/card/style/index.js +6 -9
- package/lib/Antd5/carousel/index.js +3 -3
- package/lib/Antd5/carousel/style/index.js +1 -1
- package/lib/Antd5/cascader/Panel.js +7 -2
- package/lib/Antd5/cascader/hooks/useBase.js +3 -2
- package/lib/Antd5/cascader/hooks/useColumnIcons.js +6 -3
- package/lib/Antd5/cascader/index.js +1 -1
- package/lib/Antd5/cascader/style/columns.js +6 -4
- package/lib/Antd5/checkbox/Checkbox.js +11 -5
- package/lib/Antd5/checkbox/style/index.js +6 -3
- package/lib/Antd5/collapse/Collapse.js +2 -1
- package/lib/Antd5/collapse/style/index.js +20 -13
- package/lib/Antd5/color-picker/ColorPicker.js +120 -78
- package/lib/Antd5/color-picker/ColorPickerPanel.js +44 -26
- package/lib/Antd5/color-picker/color.js +82 -10
- package/lib/Antd5/color-picker/components/ColorAlphaInput.js +2 -2
- package/lib/Antd5/color-picker/components/ColorClear.js +2 -2
- package/lib/Antd5/color-picker/components/ColorHexInput.js +5 -4
- package/lib/Antd5/color-picker/components/ColorInput.js +4 -3
- package/lib/Antd5/color-picker/components/ColorPresets.js +1 -1
- package/lib/Antd5/color-picker/components/ColorSlider.js +139 -0
- package/lib/Antd5/color-picker/components/ColorTrigger.js +52 -26
- package/lib/Antd5/color-picker/components/PanelPicker/GradientColorBar.js +130 -0
- package/lib/Antd5/color-picker/components/PanelPicker/index.js +194 -0
- package/lib/Antd5/color-picker/context.js +1 -5
- package/lib/Antd5/color-picker/hooks/useModeColor.js +87 -0
- package/lib/Antd5/color-picker/style/color-block.js +3 -2
- package/lib/Antd5/color-picker/style/index.js +33 -15
- package/lib/Antd5/color-picker/style/input.js +1 -1
- package/lib/Antd5/color-picker/style/picker.js +6 -33
- package/lib/Antd5/color-picker/style/slider.js +87 -0
- package/lib/Antd5/color-picker/util.js +53 -7
- package/lib/Antd5/config-provider/context.js +3 -1
- package/lib/Antd5/config-provider/cssVariables.js +0 -1
- package/lib/Antd5/config-provider/defaultRenderEmpty.js +8 -1
- package/lib/Antd5/config-provider/index.js +13 -5
- package/lib/Antd5/config-provider/style/index.js +0 -1
- package/lib/Antd5/date-picker/PickerButton.js +3 -2
- package/lib/Antd5/date-picker/design/behavior-pattern.js +15 -15
- package/lib/Antd5/date-picker/generatePicker/constant.js +15 -0
- package/lib/Antd5/date-picker/generatePicker/generateRangePicker.js +16 -11
- package/lib/Antd5/date-picker/generatePicker/generateSinglePicker.js +19 -15
- package/lib/Antd5/date-picker/generatePicker/index.js +2 -2
- package/lib/Antd5/date-picker/generatePicker/interface.js +1 -1
- package/lib/Antd5/date-picker/index.js +2 -17
- package/lib/Antd5/date-picker/locale/ar_EG.js +9 -1
- package/lib/Antd5/date-picker/locale/az_AZ.js +9 -1
- package/lib/Antd5/date-picker/locale/el_GR.js +9 -1
- package/lib/Antd5/date-picker/locale/ja_JP.js +11 -1
- package/lib/Antd5/date-picker/locale/kn_IN.js +9 -1
- package/lib/Antd5/date-picker/locale/pl_PL.js +9 -1
- package/lib/Antd5/date-picker/locale/uk_UA.js +10 -1
- package/lib/Antd5/date-picker/style/index.js +13 -10
- package/lib/Antd5/date-picker/style/panel.js +36 -32
- package/lib/Antd5/date-picker/style/token.js +1 -1
- package/lib/Antd5/date-picker/util.js +0 -48
- package/lib/Antd5/descriptions/hooks/useItems.js +5 -0
- package/lib/Antd5/descriptions/hooks/useRow.js +42 -34
- package/lib/Antd5/descriptions/style/index.js +20 -8
- package/lib/Antd5/divider/index.js +4 -3
- package/lib/Antd5/divider/style/index.js +19 -4
- package/lib/Antd5/drawer/DrawerPanel.js +11 -20
- package/lib/Antd5/drawer/index.js +39 -42
- package/lib/Antd5/drawer/style/index.js +10 -11
- package/lib/Antd5/dropdown/dropdown.js +5 -7
- package/lib/Antd5/dropdown/style/index.js +27 -11
- package/lib/Antd5/empty/empty.js +9 -3
- package/lib/Antd5/empty/simple.js +9 -3
- package/lib/Antd5/empty/style/index.js +1 -1
- package/lib/Antd5/float-button/BackTop.js +3 -2
- package/lib/Antd5/float-button/FloatButton.js +16 -5
- package/lib/Antd5/float-button/FloatButtonGroup.js +76 -52
- package/lib/Antd5/float-button/style/index.js +117 -76
- package/lib/Antd5/float-button/style/keyframes.js +118 -0
- package/lib/Antd5/form/ErrorList.js +14 -2
- package/lib/Antd5/form/Form.js +11 -3
- package/lib/Antd5/form/FormItem/ItemHolder.js +8 -4
- package/lib/Antd5/form/FormItem/index.js +6 -4
- package/lib/Antd5/form/FormItemInput.js +68 -28
- package/lib/Antd5/form/FormItemLabel.js +3 -3
- package/lib/Antd5/form/hooks/useForm.js +8 -1
- package/lib/Antd5/form/hooks/useVariants.js +10 -4
- package/lib/Antd5/form/style/explain.js +9 -8
- package/lib/Antd5/form/style/index.js +30 -18
- package/lib/Antd5/grid/row.js +2 -2
- package/lib/Antd5/image/index.js +3 -1
- package/lib/Antd5/image/style/index.js +17 -20
- package/lib/Antd5/index.js +2 -1
- package/lib/Antd5/input/Input.js +18 -38
- package/lib/Antd5/input/OTP/OTPInput.js +10 -5
- package/lib/Antd5/input/OTP/index.js +12 -4
- package/lib/Antd5/input/Password.js +6 -2
- package/lib/Antd5/input/Search.js +2 -4
- package/lib/Antd5/input/TextArea.js +1 -1
- package/lib/Antd5/input/style/index.js +72 -63
- package/lib/Antd5/input/style/otp.js +1 -1
- package/lib/Antd5/input/style/variants.js +38 -23
- package/lib/Antd5/input/utils.js +0 -1
- package/lib/Antd5/input-number/index.js +19 -22
- package/lib/Antd5/input-number/style/index.js +26 -16
- package/lib/Antd5/layout/Sider.js +15 -8
- package/lib/Antd5/layout/style/index.js +6 -96
- package/lib/Antd5/layout/style/sider.js +115 -0
- package/lib/Antd5/list/Item.js +18 -5
- package/lib/Antd5/list/index.js +15 -10
- package/lib/Antd5/list/style/index.js +40 -41
- package/lib/Antd5/locale/ar_EG.js +14 -1
- package/lib/Antd5/locale/az_AZ.js +78 -28
- package/lib/Antd5/locale/bn_BD.js +0 -1
- package/lib/Antd5/locale/by_BY.js +0 -1
- package/lib/Antd5/locale/ca_ES.js +0 -1
- package/lib/Antd5/locale/cs_CZ.js +0 -1
- package/lib/Antd5/locale/de_DE.js +0 -1
- package/lib/Antd5/locale/el_GR.js +104 -3
- package/lib/Antd5/locale/en_GB.js +0 -1
- package/lib/Antd5/locale/en_US.js +4 -2
- package/lib/Antd5/locale/es_ES.js +10 -6
- package/lib/Antd5/locale/et_EE.js +0 -1
- package/lib/Antd5/locale/eu_ES.js +4 -2
- package/lib/Antd5/locale/fa_IR.js +0 -1
- package/lib/Antd5/locale/fr_BE.js +5 -1
- package/lib/Antd5/locale/fr_CA.js +0 -1
- package/lib/Antd5/locale/fr_FR.js +5 -6
- package/lib/Antd5/locale/ga_IE.js +0 -1
- package/lib/Antd5/locale/gl_ES.js +0 -1
- package/lib/Antd5/locale/he_IL.js +0 -1
- package/lib/Antd5/locale/hi_IN.js +0 -1
- package/lib/Antd5/locale/hr_HR.js +0 -1
- package/lib/Antd5/locale/id_ID.js +4 -2
- package/lib/Antd5/locale/index.js +1 -1
- package/lib/Antd5/locale/it_IT.js +0 -1
- package/lib/Antd5/locale/ja_JP.js +4 -2
- package/lib/Antd5/locale/ka_GE.js +0 -1
- package/lib/Antd5/locale/kk_KZ.js +0 -1
- package/lib/Antd5/locale/km_KH.js +0 -1
- package/lib/Antd5/locale/kn_IN.js +82 -4
- package/lib/Antd5/locale/ko_KR.js +4 -2
- package/lib/Antd5/locale/lt_LT.js +4 -2
- package/lib/Antd5/locale/ml_IN.js +0 -1
- package/lib/Antd5/locale/mn_MN.js +86 -2
- package/lib/Antd5/locale/ms_MY.js +101 -18
- package/lib/Antd5/locale/my_MM.js +0 -1
- package/lib/Antd5/locale/nb_NO.js +0 -1
- package/lib/Antd5/locale/ne_NP.js +104 -2
- package/lib/Antd5/locale/nl_BE.js +5 -1
- package/lib/Antd5/locale/nl_NL.js +5 -1
- package/lib/Antd5/locale/pl_PL.js +0 -1
- package/lib/Antd5/locale/pt_BR.js +0 -1
- package/lib/Antd5/locale/pt_PT.js +55 -38
- package/lib/Antd5/locale/ro_RO.js +0 -1
- package/lib/Antd5/locale/ru_RU.js +9 -2
- package/lib/Antd5/locale/si_LK.js +0 -1
- package/lib/Antd5/locale/sk_SK.js +0 -1
- package/lib/Antd5/locale/sr_RS.js +0 -1
- package/lib/Antd5/locale/sv_SE.js +0 -1
- package/lib/Antd5/locale/th_TH.js +11 -3
- package/lib/Antd5/locale/tk_TK.js +0 -1
- package/lib/Antd5/locale/tr_TR.js +2 -1
- package/lib/Antd5/locale/uk_UA.js +1 -1
- package/lib/Antd5/locale/ur_PK.js +0 -1
- package/lib/Antd5/locale/uz_UZ.js +6 -7
- package/lib/Antd5/locale/zh_CN.js +4 -2
- package/lib/Antd5/locale/zh_HK.js +0 -1
- package/lib/Antd5/locale/zh_TW.js +0 -1
- package/lib/Antd5/mentions/index.js +4 -4
- package/lib/Antd5/menu/MenuItem.js +6 -5
- package/lib/Antd5/menu/OverrideContext.js +4 -3
- package/lib/Antd5/menu/SubMenu.js +2 -2
- package/lib/Antd5/menu/menu.js +2 -2
- package/lib/Antd5/menu/style/index.js +58 -40
- package/lib/Antd5/menu/style/theme.js +24 -20
- package/lib/Antd5/menu/style/vertical.js +10 -7
- package/lib/Antd5/message/PurePanel.js +22 -40
- package/lib/Antd5/message/style/index.js +8 -47
- package/lib/Antd5/message/useMessage.js +3 -15
- package/lib/Antd5/modal/Modal.js +50 -38
- package/lib/Antd5/modal/PurePanel.js +0 -1
- package/lib/Antd5/modal/confirm.js +4 -5
- package/lib/Antd5/modal/style/confirm.js +1 -2
- package/lib/Antd5/modal/style/index.js +13 -3
- package/lib/Antd5/modal/useModal/HookModal.js +4 -3
- package/lib/Antd5/modal/useModal/index.js +0 -1
- package/lib/Antd5/notification/index.js +6 -3
- package/lib/Antd5/notification/style/index.js +35 -3
- package/lib/Antd5/notification/useNotification.js +6 -1
- package/lib/Antd5/pagination/Pagination.js +10 -5
- package/lib/Antd5/pagination/design/behavior-pattern.js +3 -3
- package/lib/Antd5/pagination/style/bordered.js +1 -1
- package/lib/Antd5/pagination/style/index.js +27 -18
- package/lib/Antd5/popconfirm/PurePanel.js +7 -7
- package/lib/Antd5/popover/PurePanel.js +16 -6
- package/lib/Antd5/popover/index.js +7 -19
- package/lib/Antd5/popover/style/index.js +3 -1
- package/lib/Antd5/progress/Line.js +27 -19
- package/lib/Antd5/progress/design/behavior-pattern.js +3 -3
- package/lib/Antd5/progress/progress.js +37 -11
- package/lib/Antd5/progress/style/index.js +46 -11
- package/lib/Antd5/progress/utils.js +20 -18
- package/lib/Antd5/qr-code/QrcodeStatus.js +42 -0
- package/lib/Antd5/qr-code/index.js +31 -31
- package/lib/Antd5/rate/index.js +8 -2
- package/lib/Antd5/result/noFound.js +3 -1
- package/lib/Antd5/result/serverError.js +3 -1
- package/lib/Antd5/result/unauthorized.js +5 -3
- package/lib/Antd5/segmented/index.js +5 -3
- package/lib/Antd5/segmented/style/index.js +11 -3
- package/lib/Antd5/select/index.js +4 -2
- package/lib/Antd5/select/style/dropdown.js +1 -1
- package/lib/Antd5/select/style/index.js +21 -8
- package/lib/Antd5/select/style/multiple.js +18 -9
- package/lib/Antd5/select/style/single.js +8 -10
- package/lib/Antd5/select/style/token.js +9 -2
- package/lib/Antd5/select/style/variants.js +20 -11
- package/lib/Antd5/skeleton/Image.js +6 -4
- package/lib/Antd5/skeleton/Node.js +1 -3
- package/lib/Antd5/skeleton/Paragraph.js +1 -1
- package/lib/Antd5/skeleton/Title.js +9 -6
- package/lib/Antd5/skeleton/style/index.js +13 -13
- package/lib/Antd5/slider/Context.js +4 -0
- package/lib/Antd5/slider/SliderTooltip.js +9 -5
- package/lib/Antd5/slider/index.js +32 -31
- package/lib/Antd5/slider/style/index.js +60 -44
- package/lib/Antd5/space/Compact.js +1 -1
- package/lib/Antd5/space/index.js +3 -3
- package/lib/Antd5/spin/Indicator/Looper.js +29 -0
- package/lib/Antd5/spin/Indicator/Progress.js +78 -0
- package/lib/Antd5/spin/Indicator/index.js +21 -0
- package/lib/Antd5/spin/index.js +27 -45
- package/lib/Antd5/spin/style/index.js +54 -17
- package/lib/Antd5/spin/usePercent.js +40 -0
- package/lib/Antd5/splitter/Panel.js +36 -0
- package/lib/Antd5/splitter/SplitBar.js +124 -0
- package/lib/Antd5/splitter/Splitter.js +194 -0
- package/lib/Antd5/{_util/transButton.js → splitter/hooks/useItems.js} +28 -54
- package/lib/Antd5/splitter/hooks/useResizable.js +43 -0
- package/lib/Antd5/splitter/hooks/useResize.js +138 -0
- package/lib/Antd5/splitter/hooks/useSizes.js +109 -0
- package/lib/Antd5/splitter/index.js +5 -0
- package/lib/Antd5/splitter/interface.js +1 -0
- package/lib/Antd5/splitter/style/index.js +219 -0
- package/lib/Antd5/statistic/style/index.js +1 -1
- package/lib/Antd5/steps/style/custom-icon.js +1 -1
- package/lib/Antd5/steps/style/index.js +11 -8
- package/lib/Antd5/steps/style/inline.js +5 -4
- package/lib/Antd5/steps/style/progress-dot.js +2 -2
- package/lib/Antd5/steps/style/small.js +3 -3
- package/lib/Antd5/steps/style/vertical.js +2 -2
- package/lib/Antd5/style/index.js +37 -13
- package/lib/Antd5/style/motion/slide.js +6 -5
- package/lib/Antd5/style/placementArrow.js +15 -6
- package/lib/Antd5/switch/style/index.js +1 -1
- package/lib/Antd5/table/Column.js +2 -3
- package/lib/Antd5/table/ColumnGroup.js +2 -3
- package/lib/Antd5/table/ExpandIcon.js +6 -6
- package/lib/Antd5/table/InternalTable.js +6 -6
- package/lib/Antd5/table/RcTable/VirtualTable.js +3 -2
- package/lib/Antd5/table/RcTable/index.js +3 -2
- package/lib/Antd5/table/hooks/useFilter/FilterDropdown.js +82 -61
- package/lib/Antd5/table/hooks/useFilter/FilterSearch.js +7 -7
- package/lib/Antd5/table/hooks/useFilter/index.js +28 -26
- package/lib/Antd5/table/hooks/useLazyKVMap.js +5 -5
- package/lib/Antd5/table/hooks/useSelection.js +21 -11
- package/lib/Antd5/table/hooks/useSorter.js +66 -42
- package/lib/Antd5/table/hooks/useTitleColumns.js +9 -7
- package/lib/Antd5/table/interface.js +1 -1
- package/lib/Antd5/table/style/bordered.js +5 -3
- package/lib/Antd5/table/style/expand.js +44 -38
- package/lib/Antd5/table/style/filter.js +1 -1
- package/lib/Antd5/table/style/index.js +26 -21
- package/lib/Antd5/table/style/selection.js +3 -1
- package/lib/Antd5/table/style/sorter.js +3 -1
- package/lib/Antd5/table/style/virtual.js +2 -2
- package/lib/Antd5/table/util.js +9 -8
- package/lib/Antd5/tabs/style/index.js +2 -2
- package/lib/Antd5/tag/style/index.js +2 -2
- package/lib/Antd5/theme/index.js +12 -5
- package/lib/Antd5/theme/interface/cssinjs-utils.js +1 -0
- package/lib/Antd5/theme/internal.js +10 -5
- package/lib/Antd5/theme/themes/dark/colors.js +3 -0
- package/lib/Antd5/theme/themes/dark/index.js +1 -0
- package/lib/Antd5/theme/themes/default/colors.js +3 -0
- package/lib/Antd5/theme/themes/default/index.js +6 -2
- package/lib/Antd5/theme/themes/seed.js +5 -2
- package/lib/Antd5/theme/themes/shared/genColorMapToken.js +2 -0
- package/lib/Antd5/theme/themes/shared/genFontSizes.js +1 -1
- package/lib/Antd5/theme/useToken.js +2 -1
- package/lib/Antd5/theme/util/alias.js +1 -1
- package/lib/Antd5/theme/util/genStyleUtils.js +61 -0
- package/lib/Antd5/time-picker/index.js +15 -2
- package/lib/Antd5/time-picker/locale/az_AZ.js +2 -1
- package/lib/Antd5/time-picker/locale/it_IT.js +2 -1
- package/lib/Antd5/time-picker/locale/uk_UA.js +2 -1
- package/lib/Antd5/timeline/TimelineItemList.js +0 -1
- package/lib/Antd5/timeline/style/index.js +1 -1
- package/lib/Antd5/tooltip/index.js +3 -2
- package/lib/Antd5/tooltip/style/index.js +3 -1
- package/lib/Antd5/tooltip/util.js +0 -1
- package/lib/Antd5/tour/panelRender.js +7 -13
- package/lib/Antd5/tour/style/index.js +6 -13
- package/lib/Antd5/transfer/ListItem.js +3 -3
- package/lib/Antd5/transfer/hooks/useData.js +1 -1
- package/lib/Antd5/transfer/hooks/useSelection.js +26 -21
- package/lib/Antd5/transfer/style/index.js +12 -22
- package/lib/Antd5/tree/Tree.js +2 -0
- package/lib/Antd5/tree/style/directory.js +39 -0
- package/lib/Antd5/tree/style/index.js +115 -166
- package/lib/Antd5/tree/utils/dropIndicator.js +3 -2
- package/lib/Antd5/tree/utils/iconUtil.js +5 -1
- package/lib/Antd5/tree-select/index.js +47 -43
- package/lib/Antd5/typography/Base/CopyBtn.js +17 -17
- package/lib/Antd5/typography/Base/Ellipsis.js +48 -40
- package/lib/Antd5/typography/Base/index.js +20 -60
- package/lib/Antd5/typography/Base/util.js +31 -1
- package/lib/Antd5/typography/Editable.js +11 -10
- package/lib/Antd5/typography/Title.js +1 -6
- package/lib/Antd5/typography/Typography.js +2 -6
- package/lib/Antd5/typography/hooks/useCopyClick.js +3 -2
- package/lib/Antd5/typography/hooks/usePrevious.js +1 -1
- package/lib/Antd5/{message/assets/Close.js → typography/hooks/useTooltipProps.js} +24 -16
- package/lib/Antd5/typography/style/mixins.js +3 -9
- package/lib/Antd5/upload/Upload.js +55 -83
- package/lib/Antd5/upload/UploadList/ListItem.js +15 -9
- package/lib/Antd5/upload/UploadList/index.js +33 -47
- package/lib/Antd5/upload/style/dragger.js +5 -26
- package/lib/Antd5/upload/style/list.js +2 -7
- package/lib/Antd5/version/version.js +1 -1
- package/lib/Antd5/watermark/context.js +1 -1
- package/lib/Antd5/watermark/index.js +35 -18
- package/lib/Antd5/watermark/useClips.js +2 -1
- package/lib/Antd5/watermark/useRafDebounce.js +1 -1
- package/lib/Antd5/watermark/utils.js +1 -1
- package/lib/CWSelect/index.js +39 -1
- package/lib/CWSelect/index.style.js +39 -0
- package/lib/CWTree/index.js +3 -9
- package/lib/CWTree/index.style.js +2 -0
- package/lib/ConfigProvider/ConfigProvider.js +9 -10
- package/lib/ConfigProvider/customTheme.js +6 -0
- package/lib/ConfigProvider/theme/common.js +140 -0
- package/lib/ConfigProvider/theme/dark.js +2 -0
- package/lib/ConfigProvider/theme/default.js +115 -0
- package/lib/ConfigProvider/theme/utils.js +49 -0
- package/lib/QuickTransfer/index.js +45 -59
- package/lib/Splitter/index.js +2 -0
- package/package.json +37 -35
- package/lib/Antd5/color-picker/components/PanelPicker.js +0 -53
- package/lib/Antd5/color-picker/hooks/useColorState.js +0 -53
- package/lib/Antd5/layout/style/light.js +0 -24
- package/lib/Antd5/style/operationUnit.js +0 -18
- package/lib/Antd5/theme/util/calc/CSSCalculator.js +0 -119
- package/lib/Antd5/theme/util/calc/NumCalculator.js +0 -81
- package/lib/Antd5/theme/util/calc/calculator.js +0 -10
- package/lib/Antd5/theme/util/calc/index.js +0 -9
- package/lib/Antd5/theme/util/genComponentStyleHook.js +0 -243
- package/lib/Antd5/theme/util/maxmin.js +0 -27
- package/lib/Antd5/theme/util/statistic.js +0 -74
- package/lib/Antd5/typography/hooks/useUpdatedEffect.js +0 -13
- package/lib/Antd5/version/token-meta.json +0 -1
- package/lib/Antd5/version/token.json +0 -1
- package/lib/ConfigProvider/customTheme.json +0 -163
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
+
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); }
|
|
5
|
+
import { unit } from '@ant-design/cssinjs';
|
|
6
|
+
import { getTransBg } from './color-block';
|
|
7
|
+
var genSliderStyle = function genSliderStyle(token) {
|
|
8
|
+
var componentCls = token.componentCls,
|
|
9
|
+
colorPickerInsetShadow = token.colorPickerInsetShadow,
|
|
10
|
+
colorBgElevated = token.colorBgElevated,
|
|
11
|
+
colorFillSecondary = token.colorFillSecondary,
|
|
12
|
+
lineWidthBold = token.lineWidthBold,
|
|
13
|
+
colorPickerHandlerSizeSM = token.colorPickerHandlerSizeSM,
|
|
14
|
+
colorPickerSliderHeight = token.colorPickerSliderHeight,
|
|
15
|
+
marginSM = token.marginSM,
|
|
16
|
+
marginXS = token.marginXS;
|
|
17
|
+
var handleInnerSize = token.calc(colorPickerHandlerSizeSM).sub(token.calc(lineWidthBold).mul(2).equal()).equal();
|
|
18
|
+
var handleHoverSize = token.calc(colorPickerHandlerSizeSM).add(token.calc(lineWidthBold).mul(2).equal()).equal();
|
|
19
|
+
var activeHandleStyle = {
|
|
20
|
+
'&:after': {
|
|
21
|
+
transform: 'scale(1)',
|
|
22
|
+
boxShadow: "".concat(colorPickerInsetShadow, ", 0 0 0 1px ").concat(token.colorPrimaryActive)
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-slider"), [getTransBg(unit(colorPickerSliderHeight), token.colorFillSecondary), _defineProperty({
|
|
26
|
+
margin: 0,
|
|
27
|
+
padding: 0,
|
|
28
|
+
height: colorPickerSliderHeight,
|
|
29
|
+
borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),
|
|
30
|
+
'&-rail': {
|
|
31
|
+
height: colorPickerSliderHeight,
|
|
32
|
+
borderRadius: token.calc(colorPickerSliderHeight).div(2).equal(),
|
|
33
|
+
boxShadow: colorPickerInsetShadow
|
|
34
|
+
}
|
|
35
|
+
}, "& ".concat(componentCls, "-slider-handle"), {
|
|
36
|
+
width: handleInnerSize,
|
|
37
|
+
height: handleInnerSize,
|
|
38
|
+
top: 0,
|
|
39
|
+
borderRadius: '100%',
|
|
40
|
+
'&:before': {
|
|
41
|
+
display: 'block',
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
background: 'transparent',
|
|
44
|
+
left: {
|
|
45
|
+
_skip_check_: true,
|
|
46
|
+
value: '50%'
|
|
47
|
+
},
|
|
48
|
+
top: '50%',
|
|
49
|
+
transform: 'translate(-50%, -50%)',
|
|
50
|
+
width: handleHoverSize,
|
|
51
|
+
height: handleHoverSize,
|
|
52
|
+
borderRadius: '100%'
|
|
53
|
+
},
|
|
54
|
+
'&:after': {
|
|
55
|
+
width: colorPickerHandlerSizeSM,
|
|
56
|
+
height: colorPickerHandlerSizeSM,
|
|
57
|
+
border: "".concat(unit(lineWidthBold), " solid ").concat(colorBgElevated),
|
|
58
|
+
boxShadow: "".concat(colorPickerInsetShadow, ", 0 0 0 1px ").concat(colorFillSecondary),
|
|
59
|
+
outline: 'none',
|
|
60
|
+
insetInlineStart: token.calc(lineWidthBold).mul(-1).equal(),
|
|
61
|
+
top: token.calc(lineWidthBold).mul(-1).equal(),
|
|
62
|
+
background: 'transparent',
|
|
63
|
+
transition: 'none'
|
|
64
|
+
},
|
|
65
|
+
'&:focus': activeHandleStyle
|
|
66
|
+
})]), "".concat(componentCls, "-slider-container"), _defineProperty({
|
|
67
|
+
display: 'flex',
|
|
68
|
+
gap: marginSM,
|
|
69
|
+
marginBottom: marginSM
|
|
70
|
+
}, "".concat(componentCls, "-slider-group"), {
|
|
71
|
+
flex: 1,
|
|
72
|
+
flexDirection: 'column',
|
|
73
|
+
justifyContent: 'space-between',
|
|
74
|
+
display: 'flex',
|
|
75
|
+
'&-disabled-alpha': {
|
|
76
|
+
justifyContent: 'center'
|
|
77
|
+
}
|
|
78
|
+
})), "".concat(componentCls, "-gradient-slider"), _defineProperty({
|
|
79
|
+
marginBottom: marginXS
|
|
80
|
+
}, "& ".concat(componentCls, "-slider-handle"), {
|
|
81
|
+
'&:after': {
|
|
82
|
+
transform: 'scale(0.8)'
|
|
83
|
+
},
|
|
84
|
+
'&-active, &:focus': activeHandleStyle
|
|
85
|
+
}));
|
|
86
|
+
};
|
|
87
|
+
export default genSliderStyle;
|
|
@@ -1,18 +1,64 @@
|
|
|
1
|
-
|
|
1
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
|
+
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."); }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
5
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
|
+
import { Color as RcColor } from '@rc-component/color-picker';
|
|
8
|
+
import { AggregationColor } from './color';
|
|
2
9
|
export var generateColor = function generateColor(color) {
|
|
3
|
-
if (color instanceof
|
|
10
|
+
if (color instanceof AggregationColor) {
|
|
4
11
|
return color;
|
|
5
12
|
}
|
|
6
|
-
return new
|
|
13
|
+
return new AggregationColor(color);
|
|
7
14
|
};
|
|
8
15
|
export var getRoundNumber = function getRoundNumber(value) {
|
|
9
16
|
return Math.round(Number(value || 0));
|
|
10
17
|
};
|
|
11
|
-
export var
|
|
18
|
+
export var getColorAlpha = function getColorAlpha(color) {
|
|
12
19
|
return getRoundNumber(color.toHsb().a * 100);
|
|
13
20
|
};
|
|
21
|
+
/** Return the color whose `alpha` is 1 */
|
|
14
22
|
export var genAlphaColor = function genAlphaColor(color, alpha) {
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
var rgba = color.toRgb();
|
|
24
|
+
// Color from hsb input may get `rgb` is (0/0/0) when `hsb.b` is 0
|
|
25
|
+
// So if rgb is empty, we should get from hsb
|
|
26
|
+
if (!rgba.r && !rgba.g && !rgba.b) {
|
|
27
|
+
var hsba = color.toHsb();
|
|
28
|
+
hsba.a = alpha || 1;
|
|
29
|
+
return generateColor(hsba);
|
|
30
|
+
}
|
|
31
|
+
rgba.a = alpha || 1;
|
|
32
|
+
return generateColor(rgba);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Get percent position color. e.g. [10%-#fff, 20%-#000], 15% => #888
|
|
36
|
+
*/
|
|
37
|
+
export var getGradientPercentColor = function getGradientPercentColor(colors, percent) {
|
|
38
|
+
var filledColors = [{
|
|
39
|
+
percent: 0,
|
|
40
|
+
color: colors[0].color
|
|
41
|
+
}].concat(_toConsumableArray(colors), [{
|
|
42
|
+
percent: 100,
|
|
43
|
+
color: colors[colors.length - 1].color
|
|
44
|
+
}]);
|
|
45
|
+
for (var i = 0; i < filledColors.length - 1; i += 1) {
|
|
46
|
+
var startPtg = filledColors[i].percent;
|
|
47
|
+
var endPtg = filledColors[i + 1].percent;
|
|
48
|
+
var startColor = filledColors[i].color;
|
|
49
|
+
var endColor = filledColors[i + 1].color;
|
|
50
|
+
if (startPtg <= percent && percent <= endPtg) {
|
|
51
|
+
var dist = endPtg - startPtg;
|
|
52
|
+
if (dist === 0) {
|
|
53
|
+
return startColor;
|
|
54
|
+
}
|
|
55
|
+
var ratio = (percent - startPtg) / dist * 100;
|
|
56
|
+
var startRcColor = new RcColor(startColor);
|
|
57
|
+
var endRcColor = new RcColor(endColor);
|
|
58
|
+
return startRcColor.mix(endRcColor, ratio).toRgbString();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// This will never reach
|
|
62
|
+
/* istanbul ignore next */
|
|
63
|
+
return '';
|
|
18
64
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
export var defaultPrefixCls = 'ant';
|
|
2
3
|
export var defaultIconPrefixCls = 'anticon';
|
|
4
|
+
export var Variants = ['outlined', 'borderless', 'filled'];
|
|
3
5
|
var defaultGetPrefixCls = function defaultGetPrefixCls(suffixCls, customizePrefixCls) {
|
|
4
6
|
if (customizePrefixCls) {
|
|
5
7
|
return customizePrefixCls;
|
|
6
8
|
}
|
|
7
|
-
return suffixCls ? "
|
|
9
|
+
return suffixCls ? "".concat(defaultPrefixCls, "-").concat(suffixCls) : defaultPrefixCls;
|
|
8
10
|
};
|
|
9
11
|
// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will cause circular dependency.
|
|
10
12
|
export var ConfigContext = /*#__PURE__*/React.createContext({
|
|
@@ -22,7 +22,14 @@ var DefaultRenderEmpty = function DefaultRenderEmpty(props) {
|
|
|
22
22
|
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
23
23
|
className: "".concat(prefix, "-small")
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* This type of component should satisfy the nullish coalescing operator(??) on the left-hand side.
|
|
27
|
+
* to let the component itself implement the logic.
|
|
28
|
+
* For example `Table.filter`.
|
|
29
|
+
*/
|
|
30
|
+
case 'Table.filter':
|
|
31
|
+
// why `null`? legacy react16 node type `undefined` is not allowed.
|
|
32
|
+
return null;
|
|
26
33
|
default:
|
|
27
34
|
// Should never hit if we take all the component into consider.
|
|
28
35
|
return _jsx(Empty, {});
|
|
@@ -26,7 +26,7 @@ import LocaleContext from '../locale/context';
|
|
|
26
26
|
import defaultLocale from '../locale/en_US';
|
|
27
27
|
import { defaultTheme, DesignTokenContext } from '../theme/context';
|
|
28
28
|
import defaultSeedToken from '../theme/themes/seed';
|
|
29
|
-
import { ConfigConsumer, ConfigContext, defaultIconPrefixCls } from './context';
|
|
29
|
+
import { ConfigConsumer, ConfigContext, defaultIconPrefixCls, defaultPrefixCls, Variants } from './context';
|
|
30
30
|
import { registerTheme } from './cssVariables';
|
|
31
31
|
import { DisabledContextProvider } from './DisabledContext';
|
|
32
32
|
import useConfig from './hooks/useConfig';
|
|
@@ -35,6 +35,7 @@ import MotionWrapper from './MotionWrapper';
|
|
|
35
35
|
import PropWarning from './PropWarning';
|
|
36
36
|
import SizeContext, { SizeContextProvider } from './SizeContext';
|
|
37
37
|
import useStyle from './style';
|
|
38
|
+
export { Variants };
|
|
38
39
|
/**
|
|
39
40
|
* Since too many feedback using static method like `Modal.confirm` not getting theme, we record the
|
|
40
41
|
* theme register info here to help developer get warning info.
|
|
@@ -44,11 +45,10 @@ export var warnContext = process.env.NODE_ENV !== 'production' ? function (compo
|
|
|
44
45
|
warning(!existThemeConfig, componentName, "Static function can not consume context like dynamic theme. Please use 'App' component instead.");
|
|
45
46
|
} : /* istanbul ignore next */
|
|
46
47
|
null;
|
|
47
|
-
export { ConfigConsumer, ConfigContext, defaultIconPrefixCls };
|
|
48
|
+
export { ConfigConsumer, ConfigContext, defaultPrefixCls, defaultIconPrefixCls };
|
|
48
49
|
export var configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale'];
|
|
49
50
|
// These props is used by `useContext` directly in sub component
|
|
50
51
|
var PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'input', 'pagination', 'form', 'select', 'button'];
|
|
51
|
-
export var defaultPrefixCls = 'ant';
|
|
52
52
|
var globalPrefixCls;
|
|
53
53
|
var globalIconPrefixCls;
|
|
54
54
|
var globalTheme;
|
|
@@ -121,6 +121,7 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
121
121
|
componentSize = props.componentSize,
|
|
122
122
|
direction = props.direction,
|
|
123
123
|
space = props.space,
|
|
124
|
+
splitter = props.splitter,
|
|
124
125
|
virtual = props.virtual,
|
|
125
126
|
dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,
|
|
126
127
|
popupMatchSelectWidth = props.popupMatchSelectWidth,
|
|
@@ -182,7 +183,10 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
182
183
|
dropdown = props.dropdown,
|
|
183
184
|
warningConfig = props.warning,
|
|
184
185
|
tour = props.tour,
|
|
185
|
-
floatButtonGroup = props.floatButtonGroup
|
|
186
|
+
floatButtonGroup = props.floatButtonGroup,
|
|
187
|
+
variant = props.variant,
|
|
188
|
+
inputNumber = props.inputNumber,
|
|
189
|
+
treeSelect = props.treeSelect;
|
|
186
190
|
// =================================== Context ===================================
|
|
187
191
|
var getPrefixCls = React.useCallback(function (suffixCls, customizePrefixCls) {
|
|
188
192
|
var prefixCls = props.prefixCls;
|
|
@@ -209,6 +213,7 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
209
213
|
locale: locale || legacyLocale,
|
|
210
214
|
direction: direction,
|
|
211
215
|
space: space,
|
|
216
|
+
splitter: splitter,
|
|
212
217
|
virtual: virtual,
|
|
213
218
|
popupMatchSelectWidth: popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth,
|
|
214
219
|
popupOverflow: popupOverflow,
|
|
@@ -267,7 +272,10 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
267
272
|
dropdown: dropdown,
|
|
268
273
|
warning: warningConfig,
|
|
269
274
|
tour: tour,
|
|
270
|
-
floatButtonGroup: floatButtonGroup
|
|
275
|
+
floatButtonGroup: floatButtonGroup,
|
|
276
|
+
variant: variant,
|
|
277
|
+
inputNumber: inputNumber,
|
|
278
|
+
treeSelect: treeSelect
|
|
271
279
|
};
|
|
272
280
|
if (process.env.NODE_ENV !== 'production') {
|
|
273
281
|
var warningFn = devUseWarning('ConfigProvider');
|
|
@@ -7,9 +7,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import Button from '../button';
|
|
10
|
-
|
|
10
|
+
var PickerButton = function PickerButton(props) {
|
|
11
11
|
return _jsx(Button, _objectSpread({
|
|
12
12
|
size: "small",
|
|
13
13
|
type: "primary"
|
|
14
14
|
}, props));
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
export default PickerButton;
|
|
@@ -13,27 +13,27 @@ var BehaviorPattern = function BehaviorPattern() {
|
|
|
13
13
|
children: [{
|
|
14
14
|
id: '707000085',
|
|
15
15
|
label: '选择某天',
|
|
16
|
-
link: '
|
|
16
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-date'
|
|
17
17
|
}, {
|
|
18
18
|
id: '707000086',
|
|
19
19
|
label: '选择某周',
|
|
20
|
-
link: '
|
|
20
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-week'
|
|
21
21
|
}, {
|
|
22
22
|
id: '707000087',
|
|
23
23
|
label: '选择某月',
|
|
24
|
-
link: '
|
|
24
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-month'
|
|
25
25
|
}, {
|
|
26
26
|
id: '707000088',
|
|
27
27
|
label: '选择某季度',
|
|
28
|
-
link: '
|
|
28
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-quarter'
|
|
29
29
|
}, {
|
|
30
30
|
id: '707000089',
|
|
31
31
|
label: '选择某年',
|
|
32
|
-
link: '
|
|
32
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-year'
|
|
33
33
|
}, {
|
|
34
34
|
id: '707000090',
|
|
35
35
|
label: '选择某时间',
|
|
36
|
-
link: '
|
|
36
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-time'
|
|
37
37
|
}]
|
|
38
38
|
}, {
|
|
39
39
|
id: '200000005',
|
|
@@ -42,27 +42,27 @@ var BehaviorPattern = function BehaviorPattern() {
|
|
|
42
42
|
children: [{
|
|
43
43
|
id: '7070000851',
|
|
44
44
|
label: '选择某天至某天',
|
|
45
|
-
link: '
|
|
45
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-date-range'
|
|
46
46
|
}, {
|
|
47
47
|
id: '7070000861',
|
|
48
48
|
label: '选择某周至某周',
|
|
49
|
-
link: '
|
|
49
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-week-range'
|
|
50
50
|
}, {
|
|
51
51
|
id: '7070000871',
|
|
52
52
|
label: '选择某月至某月',
|
|
53
|
-
link: '
|
|
53
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-month-range'
|
|
54
54
|
}, {
|
|
55
55
|
id: '7070000881',
|
|
56
56
|
label: '选择某季度至某季度',
|
|
57
|
-
link: '
|
|
57
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-quarter-range'
|
|
58
58
|
}, {
|
|
59
59
|
id: '7070000891',
|
|
60
60
|
label: '选择某年至某年',
|
|
61
|
-
link: '
|
|
61
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-year-range'
|
|
62
62
|
}, {
|
|
63
63
|
id: '7070000901',
|
|
64
64
|
label: '选择某时间至某时间',
|
|
65
|
-
link: '
|
|
65
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-pick-time-range'
|
|
66
66
|
}]
|
|
67
67
|
}, {
|
|
68
68
|
id: '200000006',
|
|
@@ -71,17 +71,17 @@ var BehaviorPattern = function BehaviorPattern() {
|
|
|
71
71
|
children: [{
|
|
72
72
|
id: '70700008912',
|
|
73
73
|
label: '快捷选择时间点',
|
|
74
|
-
link: '
|
|
74
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-preset-time'
|
|
75
75
|
}, {
|
|
76
76
|
id: '70700009012',
|
|
77
77
|
label: '快捷选择时间段',
|
|
78
|
-
link: '
|
|
78
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-preset-range'
|
|
79
79
|
}]
|
|
80
80
|
}, {
|
|
81
81
|
id: '200000007',
|
|
82
82
|
label: '查看日期附属信息',
|
|
83
83
|
targetType: 'extension',
|
|
84
|
-
link: '
|
|
84
|
+
link: 'date-picker-index-tab-design-zh-cn-demo-date-extra-info'
|
|
85
85
|
}]
|
|
86
86
|
}
|
|
87
87
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var WEEK = 'week',
|
|
2
|
+
WEEKPICKER = 'WeekPicker';
|
|
3
|
+
export { WEEK, WEEKPICKER };
|
|
4
|
+
var MONTH = 'month',
|
|
5
|
+
MONTHPICKER = 'MonthPicker';
|
|
6
|
+
export { MONTH, MONTHPICKER };
|
|
7
|
+
var YEAR = 'year',
|
|
8
|
+
YEARPICKER = 'YearPicker';
|
|
9
|
+
export { YEAR, YEARPICKER };
|
|
10
|
+
var QUARTER = 'quarter',
|
|
11
|
+
QUARTERPICKER = 'QuarterPicker';
|
|
12
|
+
export { QUARTER, QUARTERPICKER };
|
|
13
|
+
var TIME = 'time',
|
|
14
|
+
TIMEPICKER = 'TimePicker';
|
|
15
|
+
export { TIME, TIMEPICKER };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 = ["prefixCls", "getPopupContainer", "components", "className", "style", "placement", "size", "disabled", "bordered", "placeholder", "popupClassName", "dropdownClassName", "status", "rootClassName", "variant"];
|
|
2
|
+
var _excluded = ["prefixCls", "getPopupContainer", "components", "className", "style", "placement", "size", "disabled", "bordered", "placeholder", "popupClassName", "dropdownClassName", "status", "rootClassName", "variant", "picker"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -21,6 +21,7 @@ import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined';
|
|
|
21
21
|
import SwapRightOutlined from '@ant-design/icons/SwapRightOutlined';
|
|
22
22
|
import classNames from 'classnames';
|
|
23
23
|
import { RangePicker as RCRangePicker } from 'rc-picker';
|
|
24
|
+
import ContextIsolator from '../../_util/ContextIsolator';
|
|
24
25
|
import { useZIndex } from '../../_util/hooks/useZIndex';
|
|
25
26
|
import { getMergedStatus, getStatusClassNames } from '../../_util/statusUtils';
|
|
26
27
|
import { devUseWarning } from '../../_util/warning';
|
|
@@ -31,12 +32,13 @@ import useSize from '../../config-provider/hooks/useSize';
|
|
|
31
32
|
import { FormItemInputContext } from '../../form/context';
|
|
32
33
|
import useVariant from '../../form/hooks/useVariants';
|
|
33
34
|
import { useLocale } from '../../locale';
|
|
34
|
-
import {
|
|
35
|
+
import { useCompactItemContext } from '../../space/Compact';
|
|
35
36
|
import enUS from '../locale/en_US';
|
|
36
37
|
import useStyle from '../style';
|
|
37
|
-
import { getRangePlaceholder,
|
|
38
|
+
import { getRangePlaceholder, useIcons } from '../util';
|
|
39
|
+
import { TIME } from './constant';
|
|
38
40
|
import useComponents from './useComponents';
|
|
39
|
-
|
|
41
|
+
var generateRangePicker = function generateRangePicker(generateConfig) {
|
|
40
42
|
var RangePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
41
43
|
var _props$popupStyle;
|
|
42
44
|
var customizePrefixCls = props.prefixCls,
|
|
@@ -55,6 +57,7 @@ export default function generateRangePicker(generateConfig) {
|
|
|
55
57
|
customStatus = props.status,
|
|
56
58
|
rootClassName = props.rootClassName,
|
|
57
59
|
customVariant = props.variant,
|
|
60
|
+
picker = props.picker,
|
|
58
61
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
59
62
|
var innerRef = React.useRef(null);
|
|
60
63
|
var _useContext = useContext(ConfigContext),
|
|
@@ -66,9 +69,8 @@ export default function generateRangePicker(generateConfig) {
|
|
|
66
69
|
var _useCompactItemContex = useCompactItemContext(prefixCls, direction),
|
|
67
70
|
compactSize = _useCompactItemContex.compactSize,
|
|
68
71
|
compactItemClassnames = _useCompactItemContex.compactItemClassnames;
|
|
69
|
-
var picker = props.picker;
|
|
70
72
|
var rootPrefixCls = getPrefixCls();
|
|
71
|
-
var _useVariant = useVariant(customVariant, bordered),
|
|
73
|
+
var _useVariant = useVariant('rangePicker', customVariant, bordered),
|
|
72
74
|
_useVariant2 = _slicedToArray(_useVariant, 2),
|
|
73
75
|
variant = _useVariant2[0],
|
|
74
76
|
enableVariantCls = _useVariant2[1];
|
|
@@ -104,7 +106,7 @@ export default function generateRangePicker(generateConfig) {
|
|
|
104
106
|
contextStatus = formItemContext.status,
|
|
105
107
|
feedbackIcon = formItemContext.feedbackIcon;
|
|
106
108
|
var suffixNode = _jsxs(_Fragment, {
|
|
107
|
-
children: [picker ===
|
|
109
|
+
children: [picker === TIME ? _jsx(ClockCircleOutlined, {}) : _jsx(CalendarOutlined, {}), hasFeedback && feedbackIcon]
|
|
108
110
|
});
|
|
109
111
|
useImperativeHandle(ref, function () {
|
|
110
112
|
return innerRef.current;
|
|
@@ -117,7 +119,8 @@ export default function generateRangePicker(generateConfig) {
|
|
|
117
119
|
var _useZIndex = useZIndex('DatePicker', (_props$popupStyle = props.popupStyle) === null || _props$popupStyle === void 0 ? void 0 : _props$popupStyle.zIndex),
|
|
118
120
|
_useZIndex2 = _slicedToArray(_useZIndex, 1),
|
|
119
121
|
zIndex = _useZIndex2[0];
|
|
120
|
-
return wrapCSSVar(_jsx(
|
|
122
|
+
return wrapCSSVar(_jsx(ContextIsolator, {
|
|
123
|
+
space: true,
|
|
121
124
|
children: _jsx(RCRangePicker, _objectSpread(_objectSpread({
|
|
122
125
|
separator: _jsx("span", {
|
|
123
126
|
"aria-label": "to",
|
|
@@ -126,7 +129,7 @@ export default function generateRangePicker(generateConfig) {
|
|
|
126
129
|
}),
|
|
127
130
|
disabled: mergedDisabled,
|
|
128
131
|
ref: innerRef,
|
|
129
|
-
|
|
132
|
+
placement: placement,
|
|
130
133
|
placeholder: getRangePlaceholder(locale, picker, placeholder),
|
|
131
134
|
suffixIcon: suffixNode,
|
|
132
135
|
prevIcon: _jsx("span", {
|
|
@@ -141,7 +144,8 @@ export default function generateRangePicker(generateConfig) {
|
|
|
141
144
|
superNextIcon: _jsx("span", {
|
|
142
145
|
className: "".concat(prefixCls, "-super-next-icon")
|
|
143
146
|
}),
|
|
144
|
-
transitionName: "".concat(rootPrefixCls, "-slide-up")
|
|
147
|
+
transitionName: "".concat(rootPrefixCls, "-slide-up"),
|
|
148
|
+
picker: picker
|
|
145
149
|
}, restProps), {}, {
|
|
146
150
|
className: classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-").concat(mergedSize), mergedSize), "".concat(prefixCls, "-").concat(variant), enableVariantCls), getStatusClassNames(prefixCls, getMergedStatus(contextStatus, customStatus), hasFeedback), hashId, compactItemClassnames, className, rangePicker === null || rangePicker === void 0 ? void 0 : rangePicker.className, cssVarCls, rootCls, rootClassName),
|
|
147
151
|
style: _objectSpread(_objectSpread({}, rangePicker === null || rangePicker === void 0 ? void 0 : rangePicker.style), style),
|
|
@@ -167,4 +171,5 @@ export default function generateRangePicker(generateConfig) {
|
|
|
167
171
|
RangePicker.displayName = 'RangePicker';
|
|
168
172
|
}
|
|
169
173
|
return RangePicker;
|
|
170
|
-
}
|
|
174
|
+
};
|
|
175
|
+
export default generateRangePicker;
|
|
@@ -20,6 +20,7 @@ import CalendarOutlined from '@ant-design/icons/CalendarOutlined';
|
|
|
20
20
|
import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
22
|
import RCPicker from 'rc-picker';
|
|
23
|
+
import ContextIsolator from '../../_util/ContextIsolator';
|
|
23
24
|
import { useZIndex } from '../../_util/hooks/useZIndex';
|
|
24
25
|
import { getMergedStatus, getStatusClassNames } from '../../_util/statusUtils';
|
|
25
26
|
import { devUseWarning } from '../../_util/warning';
|
|
@@ -30,14 +31,15 @@ import useSize from '../../config-provider/hooks/useSize';
|
|
|
30
31
|
import { FormItemInputContext } from '../../form/context';
|
|
31
32
|
import useVariant from '../../form/hooks/useVariants';
|
|
32
33
|
import { useLocale } from '../../locale';
|
|
33
|
-
import {
|
|
34
|
+
import { useCompactItemContext } from '../../space/Compact';
|
|
34
35
|
import enUS from '../locale/en_US';
|
|
35
36
|
import useStyle from '../style';
|
|
36
|
-
import { getPlaceholder,
|
|
37
|
+
import { getPlaceholder, useIcons } from '../util';
|
|
38
|
+
import { MONTH, MONTHPICKER, QUARTER, QUARTERPICKER, TIME, TIMEPICKER, WEEK, WEEKPICKER, YEAR, YEARPICKER } from './constant';
|
|
37
39
|
import useComponents from './useComponents';
|
|
38
|
-
|
|
39
|
-
function getPicker(picker, displayName) {
|
|
40
|
-
var consumerName = displayName ===
|
|
40
|
+
var generatePicker = function generatePicker(generateConfig) {
|
|
41
|
+
var getPicker = function getPicker(picker, displayName) {
|
|
42
|
+
var consumerName = displayName === TIMEPICKER ? 'timePicker' : 'datePicker';
|
|
41
43
|
var Picker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
42
44
|
var _props$popupStyle;
|
|
43
45
|
var customizePrefixCls = props.prefixCls,
|
|
@@ -67,7 +69,7 @@ export default function generatePicker(generateConfig) {
|
|
|
67
69
|
compactSize = _useCompactItemContex.compactSize,
|
|
68
70
|
compactItemClassnames = _useCompactItemContex.compactItemClassnames;
|
|
69
71
|
var innerRef = React.useRef(null);
|
|
70
|
-
var _useVariant = useVariant(customVariant, bordered),
|
|
72
|
+
var _useVariant = useVariant('datePicker', customVariant, bordered),
|
|
71
73
|
_useVariant2 = _slicedToArray(_useVariant, 2),
|
|
72
74
|
variant = _useVariant2[0],
|
|
73
75
|
enableVariantCls = _useVariant2[1];
|
|
@@ -134,12 +136,13 @@ export default function generatePicker(generateConfig) {
|
|
|
134
136
|
var _useZIndex = useZIndex('DatePicker', (_props$popupStyle = props.popupStyle) === null || _props$popupStyle === void 0 ? void 0 : _props$popupStyle.zIndex),
|
|
135
137
|
_useZIndex2 = _slicedToArray(_useZIndex, 1),
|
|
136
138
|
zIndex = _useZIndex2[0];
|
|
137
|
-
return wrapCSSVar(_jsx(
|
|
139
|
+
return wrapCSSVar(_jsx(ContextIsolator, {
|
|
140
|
+
space: true,
|
|
138
141
|
children: _jsx(RCPicker, _objectSpread(_objectSpread(_objectSpread({
|
|
139
142
|
ref: innerRef,
|
|
140
143
|
placeholder: getPlaceholder(locale, mergedPicker, placeholder),
|
|
141
144
|
suffixIcon: suffixNode,
|
|
142
|
-
|
|
145
|
+
placement: placement,
|
|
143
146
|
prevIcon: _jsx("span", {
|
|
144
147
|
className: "".concat(prefixCls, "-prev-icon")
|
|
145
148
|
}),
|
|
@@ -182,13 +185,13 @@ export default function generatePicker(generateConfig) {
|
|
|
182
185
|
Picker.displayName = displayName;
|
|
183
186
|
}
|
|
184
187
|
return Picker;
|
|
185
|
-
}
|
|
188
|
+
};
|
|
186
189
|
var DatePicker = getPicker();
|
|
187
|
-
var WeekPicker = getPicker(
|
|
188
|
-
var MonthPicker = getPicker(
|
|
189
|
-
var YearPicker = getPicker(
|
|
190
|
-
var QuarterPicker = getPicker(
|
|
191
|
-
var TimePicker = getPicker(
|
|
190
|
+
var WeekPicker = getPicker(WEEK, WEEKPICKER);
|
|
191
|
+
var MonthPicker = getPicker(MONTH, MONTHPICKER);
|
|
192
|
+
var YearPicker = getPicker(YEAR, YEARPICKER);
|
|
193
|
+
var QuarterPicker = getPicker(QUARTER, QUARTERPICKER);
|
|
194
|
+
var TimePicker = getPicker(TIME, TIMEPICKER);
|
|
192
195
|
return {
|
|
193
196
|
DatePicker: DatePicker,
|
|
194
197
|
WeekPicker: WeekPicker,
|
|
@@ -197,4 +200,5 @@ export default function generatePicker(generateConfig) {
|
|
|
197
200
|
TimePicker: TimePicker,
|
|
198
201
|
QuarterPicker: QuarterPicker
|
|
199
202
|
};
|
|
200
|
-
}
|
|
203
|
+
};
|
|
204
|
+
export default generatePicker;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import generateRangePicker from './generateRangePicker';
|
|
2
2
|
import generateSinglePicker from './generateSinglePicker';
|
|
3
|
-
function generatePicker(generateConfig) {
|
|
3
|
+
var generatePicker = function generatePicker(generateConfig) {
|
|
4
4
|
// =========================== Picker ===========================
|
|
5
5
|
var _generateSinglePicker = generateSinglePicker(generateConfig),
|
|
6
6
|
DatePicker = _generateSinglePicker.DatePicker,
|
|
@@ -22,5 +22,5 @@ function generatePicker(generateConfig) {
|
|
|
22
22
|
MergedDatePicker.displayName = 'DatePicker';
|
|
23
23
|
}
|
|
24
24
|
return MergedDatePicker;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
export default generatePicker;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];
|
|
2
2
|
export {};
|
|
@@ -1,27 +1,12 @@
|
|
|
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
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : 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
1
|
import dayjsGenerateConfig from 'rc-picker/lib/generate/dayjs';
|
|
8
2
|
import genPurePanel from '../_util/PurePanel';
|
|
9
3
|
import generatePicker from './generatePicker';
|
|
10
|
-
import { transPlacement2DropdownAlign } from './util';
|
|
11
4
|
var DatePicker = generatePicker(dayjsGenerateConfig);
|
|
12
|
-
function postPureProps(props) {
|
|
13
|
-
var dropdownAlign = transPlacement2DropdownAlign(props.direction, props.placement);
|
|
14
|
-
dropdownAlign.overflow.adjustY = false;
|
|
15
|
-
dropdownAlign.overflow.adjustX = false;
|
|
16
|
-
return _objectSpread(_objectSpread({}, props), {}, {
|
|
17
|
-
dropdownAlign: dropdownAlign
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
5
|
// We don't care debug panel
|
|
21
6
|
/* istanbul ignore next */
|
|
22
|
-
var PurePanel = genPurePanel(DatePicker, 'picker', null
|
|
7
|
+
var PurePanel = genPurePanel(DatePicker, 'picker', null);
|
|
23
8
|
DatePicker._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
|
|
24
|
-
var PureRangePanel = genPurePanel(DatePicker.RangePicker, 'picker', null
|
|
9
|
+
var PureRangePanel = genPurePanel(DatePicker.RangePicker, 'picker', null);
|
|
25
10
|
DatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = PureRangePanel;
|
|
26
11
|
DatePicker.generatePicker = generatePicker;
|
|
27
12
|
export default DatePicker;
|
|
@@ -10,7 +10,15 @@ import TimePickerLocale from '../../time-picker/locale/ar_EG';
|
|
|
10
10
|
var locale = {
|
|
11
11
|
lang: _objectSpread({
|
|
12
12
|
placeholder: 'اختيار التاريخ',
|
|
13
|
-
rangePlaceholder: ['البداية', 'النهاية']
|
|
13
|
+
rangePlaceholder: ['البداية', 'النهاية'],
|
|
14
|
+
yearFormat: 'YYYY',
|
|
15
|
+
dateFormat: 'D/M/YYYY',
|
|
16
|
+
dayFormat: 'D',
|
|
17
|
+
dateTimeFormat: 'DD/MM/YYYY HH:mm:ss',
|
|
18
|
+
monthFormat: 'MMMM',
|
|
19
|
+
monthBeforeYear: true,
|
|
20
|
+
shortWeekDays: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
|
21
|
+
shortMonths: ['يناير', 'فبراير', 'مارس', 'إبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']
|
|
14
22
|
}, CalendarLocale),
|
|
15
23
|
timePickerLocale: _objectSpread({}, TimePickerLocale),
|
|
16
24
|
dateFormat: 'DD-MM-YYYY',
|