useblocks 1.1.85-dev.10 → 1.1.85-dev.11
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/README.md +70 -40
- package/compat-globals.js +1 -1
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/js/discussHandlers.sDXLf5I7.js +88 -0
- package/iframe/js/{iframe-eblock.body.js → iframe-eblock.body.714faf8a.js} +1 -1
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/{iframe.body.js → iframe.body.714faf8a.js} +35 -35
- package/iframe/js/iframe.js +2 -2
- package/package.json +4 -1
- package/runtime/THIRD_PARTY_LICENSES.txt +49 -42
- package/runtime/package.json +4 -1
- package/runtime/react/index.js +1 -1
- package/runtime/uuid/index.js +21 -0
- package/static/core/11bc33e0.js +1 -0
- package/static/core/1ed86ed3.js +1 -0
- package/static/core/248de796.js +1 -0
- package/static/core/{e50b6f57.js → 274b5d7a.js} +1 -1
- package/static/core/4067c5be.js +1 -0
- package/static/core/453596ac.js +27 -0
- package/static/core/4b12ae50.js +1 -0
- package/static/core/{db82c42b.js → 50d547f6.js} +1 -1
- package/static/core/549c0ef1.js +1 -0
- package/static/core/{b29146b3.js → 563a690f.js} +5 -5
- package/static/core/{c1bf6439.js → 5c62f38b.js} +1 -1
- package/static/core/5f949f39.js +1 -0
- package/static/core/{e0d71533.js → 60aa31a3.js} +6 -6
- package/static/core/{79749848.js → 66619f08.js} +7 -7
- package/static/core/7052d050.js +28 -0
- package/static/core/{984e936f.js → 7555e955.js} +1 -1
- package/static/core/{55a38638.js → 7c89682e.js} +7 -7
- package/static/core/83c17079.js +2 -0
- package/static/core/{4c83d06a.js → 8c5284f6.js} +1 -1
- package/static/core/{e0e5c9b9.js → 958fe93e.js} +2 -2
- package/static/core/{6fcb3c31.js → a3f7b4c9.js} +1 -1
- package/static/core/{9560f31a.js → a494cc9f.js} +1 -1
- package/static/core/{a5996860.js → a6303cb2.js} +1 -1
- package/static/core/b8a0f663.js +1 -0
- package/static/core/bb65f553.js +1 -0
- package/static/core/{4c3f5897.js → c2f990cf.js} +2 -2
- package/static/core/{72d350ea.js → c8d6258e.js} +1 -1
- package/static/core/{3ece766f.js → d58ae4ac.js} +2 -2
- package/static/core/d61988e0.js +7 -0
- package/static/core/d887672a.js +1 -0
- package/static/core/dcc37768.js +1 -0
- package/static/core/{30841c46.js → e50f64f6.js} +1 -1
- package/static/core/{175b5b0f.js → ff7d14e8.js} +1 -1
- package/static/esm/2490dab8.js +1 -0
- package/static/esm/971f1b2c.js +1 -0
- package/static/esm/ad8c16a9.js +1 -0
- package/static/esm/f76c9d9d.js +1 -0
- package/static/umd/6639d610.js +1 -0
- package/static/umd-runtime/B7h7P1Np.js +1 -0
- package/static/umd-runtime/{DHIkHsbq.js → BAqQTgiL.js} +1 -1
- package/static/umd-runtime/{DiNHpyis.js → BB6AXfHj.js} +1 -1
- package/static/umd-runtime/{CnUGCoaH.js → BauvM4c_.js} +1 -1
- package/static/umd-runtime/{cL_ha9ef.js → CgVJ4rE0.js} +1 -1
- package/static/umd-runtime/Cvm7BS4_.js +341 -0
- package/static/umd-runtime/{BnE05QKl.js → D7DggGzi.js} +1 -1
- package/static/umd-runtime/{2iAslXEF.js → DBbch1O-.js} +1 -1
- package/static/umd-runtime/{Bcqtk2f7.js → Dqoi-pC_.js} +2 -2
- package/static/umd-runtime/{CDTBLHGd.js → G2k8ELiO.js} +3 -3
- package/static/umd-runtime/{CVtPwspX.js → SFp4nbvq.js} +1 -1
- package/static/umd-runtime/{DVB_-O4B.js → UsRzAWs2.js} +1 -1
- package/static/umd-runtime/runtime.js +1 -1
- package/static/umd-runtime/ui-kit-icons.js +1 -1
- package/static/umd-runtime/ui-kit.js +2 -2
- package/static/umd-runtime/{DP3QTW77.js → uk9LyZos.js} +1 -1
- package/useblocks-core.714faf8a.js +859 -0
- package/useblocks-esm.js +11 -11
- package/{useblocks-po.8098d114.js → useblocks-po.714faf8a.js} +1 -1
- package/useblocks.d.ts +109 -25
- package/useblocks.js +39 -15
- package/vendor/@rc-component/cascader/package.json +1 -1
- package/vendor/@rc-component/dialog/es/Dialog/Content/Panel.js +3 -2
- package/vendor/@rc-component/dialog/package.json +1 -1
- package/vendor/@rc-component/image/es/Preview/index.js +3 -3
- package/vendor/@rc-component/image/package.json +1 -1
- package/vendor/@rc-component/input/es/BaseInput.js +3 -3
- package/vendor/@rc-component/input/es/Input.js +20 -27
- package/vendor/@rc-component/{textarea → input}/es/ResizableTextArea.js +5 -4
- package/vendor/@rc-component/{textarea → input}/es/TextArea.js +30 -40
- package/vendor/@rc-component/{textarea → input}/es/calculateNodeHeight.js +4 -4
- package/vendor/@rc-component/input/es/hooks/useCountDisplay.js +25 -0
- package/vendor/@rc-component/input/es/hooks/useCountExceed.js +25 -0
- package/vendor/@rc-component/input/es/hooks/useMergedValue.js +13 -0
- package/vendor/@rc-component/input/es/index.js +3 -1
- package/vendor/@rc-component/input/package.json +1 -1
- package/vendor/@rc-component/mentions/es/DropdownMenu.js +1 -1
- package/vendor/@rc-component/mentions/es/Mentions.js +35 -8
- package/vendor/@rc-component/mentions/package.json +1 -1
- package/vendor/@rc-component/menu/es/Menu.js +1 -0
- package/vendor/@rc-component/menu/es/MenuItem.js +1 -0
- package/vendor/@rc-component/menu/es/MenuItemGroup.js +1 -0
- package/vendor/@rc-component/menu/es/SubMenu/PopupTrigger.js +1 -0
- package/vendor/@rc-component/menu/es/SubMenu/index.js +1 -0
- package/vendor/@rc-component/menu/es/context/MenuContext.js +1 -0
- package/vendor/@rc-component/menu/es/hooks/useAccessibility.js +1 -0
- package/vendor/@rc-component/menu/es/hooks/useKeyRecords.js +1 -0
- package/vendor/@rc-component/menu/es/utils/commonUtil.js +1 -0
- package/vendor/@rc-component/menu/es/utils/nodeUtil.js +2 -1
- package/vendor/@rc-component/menu/es/utils/warnUtil.js +1 -0
- package/vendor/@rc-component/menu/package.json +1 -1
- package/vendor/@rc-component/notification/LICENSE +21 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/LICENSE +22 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Children/toArray.js +15 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/canUseDom.js +6 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/contains.js +13 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/dynamicCSS.js +94 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/findDOMNode.js +14 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/focus.js +99 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/isVisible.js +18 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/shadow.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/styleChecker.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/KeyCode.js +499 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Portal.js +28 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/React/isFragment.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/React/render.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/getScrollBarSize.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useControlledState.js +3 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useDelayState.js +4 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useEvent.js +9 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useId.js +23 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useLayoutEffect.js +26 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMemo.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMergedState.js +4 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useState.js +24 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useSyncState.js +20 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/index.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/is.js +21 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/isEqual.js +35 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/isMobile.js +11 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/mergeProps.js +14 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/omit.js +1 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/pickAttrs.js +50 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/proxyObject.js +1 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/raf.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/ref.js +38 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/test/domHook.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/get.js +11 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/set.js +58 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/warning.js +46 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/package.json +6 -0
- package/vendor/@rc-component/notification/es/Notification.js +129 -0
- package/vendor/@rc-component/notification/es/NotificationList/Content.js +33 -0
- package/vendor/@rc-component/notification/es/NotificationList/index.js +174 -0
- package/vendor/@rc-component/notification/es/NotificationProvider.js +4 -3
- package/vendor/@rc-component/notification/es/Notifications.js +28 -31
- package/vendor/@rc-component/notification/es/Progress.js +10 -0
- package/vendor/@rc-component/notification/es/hooks/useClosable.js +30 -0
- package/vendor/@rc-component/notification/es/hooks/useListPosition/index.js +50 -0
- package/vendor/@rc-component/notification/es/hooks/useListPosition/useSizes.js +33 -0
- package/vendor/@rc-component/notification/es/hooks/useNoticeTimer.js +58 -0
- package/vendor/@rc-component/notification/es/hooks/useNotification.js +27 -18
- package/vendor/@rc-component/notification/es/hooks/useStack.js +4 -4
- package/vendor/@rc-component/notification/es/index.js +4 -2
- package/vendor/@rc-component/notification/package.json +1 -1
- package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/MultipleDates.js +13 -3
- package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/index.js +3 -1
- package/vendor/@rc-component/picker/es/PickerInput/SinglePicker.js +2 -1
- package/vendor/@rc-component/picker/package.json +1 -1
- package/vendor/@rc-component/table/LICENSE +21 -0
- package/vendor/@rc-component/table/es/Body/MeasureCell.js +1 -0
- package/vendor/@rc-component/table/es/Body/MeasureRow.js +1 -0
- package/vendor/@rc-component/table/es/Cell/useCellRender.js +1 -0
- package/vendor/@rc-component/table/es/FixedHolder/index.js +1 -0
- package/vendor/@rc-component/table/es/Table.js +17 -9
- package/vendor/@rc-component/table/es/VirtualTable/BodyGrid.js +10 -4
- package/vendor/@rc-component/table/es/VirtualTable/BodyLine.js +13 -5
- package/vendor/@rc-component/table/es/hooks/useColumns/index.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useExpand.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useFixedInfo.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useSticky.js +1 -0
- package/vendor/@rc-component/table/es/index.js +2 -1
- package/vendor/@rc-component/table/es/stickyScrollBar.js +1 -0
- package/vendor/@rc-component/table/es/utils/legacyUtil.js +1 -0
- package/vendor/@rc-component/table/es/utils/offsetUtil.js +1 -0
- package/vendor/@rc-component/table/package.json +1 -1
- package/vendor/@rc-component/tabs/es/TabNavList/OperationNode.js +4 -2
- package/vendor/@rc-component/tabs/es/TabNavList/TabNode.js +5 -4
- package/vendor/@rc-component/tabs/es/TabNavList/index.js +11 -4
- package/vendor/@rc-component/tabs/es/Tabs.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useAnimateConfig.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useIndicator.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useUpdate.js +1 -0
- package/vendor/@rc-component/tabs/package.json +1 -1
- package/vendor/@rc-component/tour/es/TourStep/DefaultPanel.js +4 -1
- package/vendor/@rc-component/tour/package.json +1 -1
- package/vendor/@rc-component/tree/es/MotionTreeNode.js +1 -0
- package/vendor/@rc-component/tree/es/NodeList.js +2 -2
- package/vendor/@rc-component/tree/es/Tree.js +4 -5
- package/vendor/@rc-component/tree/es/TreeNode.js +7 -2
- package/vendor/@rc-component/tree/es/index.js +3 -0
- package/vendor/@rc-component/tree/es/useUnmount.js +1 -0
- package/vendor/@rc-component/tree/es/util.js +1 -0
- package/vendor/@rc-component/tree/es/utils/conductUtil.js +1 -0
- package/vendor/@rc-component/tree/es/utils/treeUtil.js +1 -0
- package/vendor/@rc-component/tree/package.json +1 -1
- package/vendor/@rc-component/tree-select/package.json +1 -1
- package/vendor/@rc-component/util/es/index.js +10 -10
- package/vendor/antd/es/_util/ActionButton.js +2 -3
- package/vendor/antd/es/_util/ContextIsolator.js +1 -1
- package/vendor/antd/es/_util/PurePanel.js +7 -4
- package/vendor/antd/es/_util/convertToTooltipProps.js +2 -2
- package/vendor/antd/es/_util/fallbackProp.js +15 -0
- package/vendor/antd/es/_util/gapSize.js +2 -1
- package/vendor/antd/es/_util/getRenderPropValue.js +2 -1
- package/vendor/antd/es/_util/getScroll.js +4 -4
- package/vendor/antd/es/_util/hooks/index.js +2 -2
- package/vendor/antd/es/_util/hooks/useAllowClear.js +25 -0
- package/vendor/antd/es/_util/hooks/useClosable.js +6 -5
- package/vendor/antd/es/_util/hooks/{useMergeSemantic.js → useMergeSemantic/index.js} +14 -24
- package/vendor/antd/es/_util/hooks/useMergeSemantic/utils.js +14 -0
- package/vendor/antd/es/_util/hooks/useMergedMask.js +2 -1
- package/vendor/antd/es/_util/is.js +27 -0
- package/vendor/antd/es/_util/motion.js +8 -8
- package/vendor/antd/es/_util/normalizeIcon.js +9 -0
- package/vendor/antd/es/_util/placements.js +2 -1
- package/vendor/antd/es/_util/reactNode.js +2 -1
- package/vendor/antd/es/_util/responsiveObserver.js +3 -2
- package/vendor/antd/es/_util/scrollTo.js +3 -1
- package/vendor/antd/es/_util/styleChecker.js +1 -0
- package/vendor/antd/es/_util/throttleByAnimationFrame.js +1 -0
- package/vendor/antd/es/_util/toList.js +1 -1
- package/vendor/antd/es/_util/wave/WaveEffect.js +3 -1
- package/vendor/antd/es/_util/wave/index.js +14 -4
- package/vendor/antd/es/_util/wave/util.js +5 -3
- package/vendor/antd/es/alert/Alert.js +12 -10
- package/vendor/antd/es/alert/ErrorBoundary.js +1 -1
- package/vendor/antd/es/alert/style/index.js +16 -10
- package/vendor/antd/es/anchor/Anchor.js +23 -16
- package/vendor/antd/es/anchor/AnchorLink.js +4 -4
- package/vendor/antd/es/app/App.js +7 -3
- package/vendor/antd/es/auto-complete/AutoComplete.js +7 -8
- package/vendor/antd/es/avatar/Avatar.js +5 -3
- package/vendor/antd/es/back-top/index.js +1 -0
- package/vendor/antd/es/badge/Badge.js +5 -6
- package/vendor/antd/es/badge/Ribbon.js +1 -2
- package/vendor/antd/es/badge/style/index.js +4 -3
- package/vendor/antd/es/border-beam/BorderBeam.js +42 -0
- package/vendor/antd/es/border-beam/BorderBeamEffect.js +24 -0
- package/vendor/antd/es/border-beam/hooks/useBorderSize.js +37 -0
- package/vendor/antd/es/border-beam/hooks/useChildDom.js +24 -0
- package/vendor/antd/es/border-beam/index.js +7 -0
- package/vendor/antd/es/border-beam/style/index.js +60 -0
- package/vendor/antd/es/border-beam/util.js +26 -0
- package/vendor/antd/es/breadcrumb/Breadcrumb.js +1 -2
- package/vendor/antd/es/breadcrumb/BreadcrumbItem.js +1 -1
- package/vendor/antd/es/breadcrumb/useItemRender.js +3 -2
- package/vendor/antd/es/button/Button.js +7 -6
- package/vendor/antd/es/button/buttonHelpers.js +4 -8
- package/vendor/antd/es/button/index.js +2 -2
- package/vendor/antd/es/button/style/index.js +5 -0
- package/vendor/antd/es/calendar/generateCalendar.js +20 -8
- package/vendor/antd/es/card/Card.js +5 -7
- package/vendor/antd/es/card/CardMeta.js +1 -2
- package/vendor/antd/es/carousel/index.js +2 -1
- package/vendor/antd/es/cascader/Panel.js +1 -1
- package/vendor/antd/es/cascader/index.js +23 -16
- package/vendor/antd/es/cascader/style/columns.js +6 -2
- package/vendor/antd/es/checkbox/Checkbox.js +2 -3
- package/vendor/antd/es/checkbox/Group.js +2 -1
- package/vendor/antd/es/checkbox/style/index.js +1 -5
- package/vendor/antd/es/checkbox/useBubbleLock.js +1 -0
- package/vendor/antd/es/collapse/Collapse.js +3 -3
- package/vendor/antd/es/collapse/style/index.js +1 -4
- package/vendor/antd/es/color-picker/ColorPicker.js +1 -2
- package/vendor/antd/es/color-picker/ColorPickerPanel.js +2 -1
- package/vendor/antd/es/color-picker/components/ColorTrigger.js +3 -1
- package/vendor/antd/es/color-picker/components/PanelPicker/index.js +1 -0
- package/vendor/antd/es/config-provider/hooks/useSize.js +3 -2
- package/vendor/antd/es/config-provider/hooks/useTheme.js +2 -0
- package/vendor/antd/es/config-provider/index.js +11 -3
- package/vendor/antd/es/date-picker/generatePicker/generateRangePicker.js +20 -10
- package/vendor/antd/es/date-picker/generatePicker/generateSinglePicker.js +17 -8
- package/vendor/antd/es/date-picker/generatePicker/useSuffixIcon.js +1 -1
- package/vendor/antd/es/date-picker/hooks/useMergedPickerSemantic.js +1 -2
- package/vendor/antd/es/date-picker/style/index.js +13 -3
- package/vendor/antd/es/date-picker/style/multiple.js +3 -4
- package/vendor/antd/es/date-picker/style/panel.js +5 -20
- package/vendor/antd/es/date-picker/util.js +14 -13
- package/vendor/antd/es/descriptions/Cell.js +2 -3
- package/vendor/antd/es/descriptions/hooks/useItems.js +2 -1
- package/vendor/antd/es/descriptions/index.js +3 -3
- package/vendor/antd/es/divider/index.js +3 -2
- package/vendor/antd/es/drawer/Drawer.js +10 -5
- package/vendor/antd/es/drawer/DrawerPanel.js +3 -2
- package/vendor/antd/es/dropdown/dropdown.js +11 -8
- package/vendor/antd/es/dropdown/style/index.js +2 -6
- package/vendor/antd/es/empty/index.js +1 -2
- package/vendor/antd/es/flex/index.js +2 -2
- package/vendor/antd/es/float-button/BackTop.js +1 -0
- package/vendor/antd/es/float-button/FloatButton.js +3 -3
- package/vendor/antd/es/float-button/FloatButtonGroup.js +2 -2
- package/vendor/antd/es/form/ErrorList.js +13 -6
- package/vendor/antd/es/form/Form.js +7 -6
- package/vendor/antd/es/form/FormItem/ItemHolder.js +1 -1
- package/vendor/antd/es/form/FormItem/index.js +6 -6
- package/vendor/antd/es/form/FormItemInput.js +5 -3
- package/vendor/antd/es/form/FormItemLabel.js +2 -1
- package/vendor/antd/es/form/FormList.js +1 -0
- package/vendor/antd/es/form/hooks/useChildren.js +4 -3
- package/vendor/antd/es/form/hooks/useForm.js +3 -1
- package/vendor/antd/es/form/hooks/useFrameState.js +1 -0
- package/vendor/antd/es/form/hooks/useItemRef.js +7 -5
- package/vendor/antd/es/form/style/index.js +1 -3
- package/vendor/antd/es/grid/col.js +5 -7
- package/vendor/antd/es/grid/hooks/useBreakpoint.js +1 -0
- package/vendor/antd/es/grid/hooks/useGutter.js +2 -1
- package/vendor/antd/es/grid/row.js +7 -6
- package/vendor/antd/es/image/PreviewGroup.js +1 -2
- package/vendor/antd/es/image/Progress.js +58 -0
- package/vendor/antd/es/image/hooks/useMergedPreviewConfig.js +3 -1
- package/vendor/antd/es/image/hooks/usePlaceholderConfig.js +15 -0
- package/vendor/antd/es/image/hooks/usePreviewConfig.js +3 -2
- package/vendor/antd/es/image/index.js +36 -5
- package/vendor/antd/es/image/style/index.js +114 -4
- package/vendor/antd/es/image/style/progressAnimation.js +26 -0
- package/vendor/antd/es/index.js +2 -1
- package/vendor/antd/es/input/Input.js +9 -4
- package/vendor/antd/es/input/OTP/OTPInput.js +1 -0
- package/vendor/antd/es/input/OTP/index.js +3 -3
- package/vendor/antd/es/input/Password.js +45 -26
- package/vendor/antd/es/input/Search.js +6 -5
- package/vendor/antd/es/input/TextArea.js +13 -7
- package/vendor/antd/es/input/style/index.js +17 -11
- package/vendor/antd/es/input/style/otp.js +2 -1
- package/vendor/antd/es/input/style/variants.js +16 -10
- package/vendor/antd/es/input-number/index.js +3 -3
- package/vendor/antd/es/input-number/style/index.js +9 -9
- package/vendor/antd/es/layout/Sider.js +3 -2
- package/vendor/antd/es/list/index.js +5 -3
- package/vendor/antd/es/locale/en_US.js +3 -1
- package/vendor/antd/es/locale/ru_RU.js +3 -1
- package/vendor/antd/es/locale/useLocale.js +2 -1
- package/vendor/antd/es/masonry/Masonry.js +4 -3
- package/vendor/antd/es/mentions/index.js +28 -14
- package/vendor/antd/es/menu/MenuItem.js +2 -1
- package/vendor/antd/es/menu/OverrideContext.js +1 -0
- package/vendor/antd/es/menu/SubMenu.js +1 -1
- package/vendor/antd/es/menu/menu.js +5 -5
- package/vendor/antd/es/menu/style/index.js +21 -36
- package/vendor/antd/es/menu/style/vertical.js +2 -1
- package/vendor/antd/es/message/PureList.js +49 -0
- package/vendor/antd/es/message/PurePanel.js +28 -36
- package/vendor/antd/es/message/index.js +6 -3
- package/vendor/antd/es/message/style/index.js +102 -99
- package/vendor/antd/es/message/useMessage.js +29 -33
- package/vendor/antd/es/message/util.js +1 -1
- package/vendor/antd/es/modal/ConfirmDialog.js +11 -9
- package/vendor/antd/es/modal/Modal.js +12 -7
- package/vendor/antd/es/modal/PurePanel.js +1 -2
- package/vendor/antd/es/modal/confirm.js +4 -3
- package/vendor/antd/es/modal/shared.js +3 -2
- package/vendor/antd/es/modal/useModal/HookModal.js +2 -1
- package/vendor/antd/es/notification/PureList.js +46 -0
- package/vendor/antd/es/notification/PurePanel.js +37 -56
- package/vendor/antd/es/notification/hooks/useStackConfig.js +13 -0
- package/vendor/antd/es/notification/index.js +3 -1
- package/vendor/antd/es/notification/style/index.js +103 -170
- package/vendor/antd/es/notification/style/notification.js +191 -0
- package/vendor/antd/es/notification/style/placement.js +117 -60
- package/vendor/antd/es/notification/useNotification.js +37 -40
- package/vendor/antd/es/notification/util.js +9 -50
- package/vendor/antd/es/pagination/Pagination.js +1 -2
- package/vendor/antd/es/pagination/useShowSizeChanger.js +2 -1
- package/vendor/antd/es/popconfirm/PurePanel.js +4 -1
- package/vendor/antd/es/popconfirm/index.js +1 -2
- package/vendor/antd/es/popover/PurePanel.js +1 -2
- package/vendor/antd/es/popover/index.js +1 -2
- package/vendor/antd/es/progress/Circle.js +2 -1
- package/vendor/antd/es/progress/progress.js +3 -3
- package/vendor/antd/es/progress/utils.js +4 -3
- package/vendor/antd/es/qr-code/index.js +4 -4
- package/vendor/antd/es/radio/group.js +4 -3
- package/vendor/antd/es/radio/radio.js +2 -2
- package/vendor/antd/es/radio/style/index.js +1 -1
- package/vendor/antd/es/rate/index.js +2 -4
- package/vendor/antd/es/result/index.js +6 -5
- package/vendor/antd/es/result/style/index.js +10 -6
- package/vendor/antd/es/segmented/index.js +5 -3
- package/vendor/antd/es/select/index.js +23 -12
- package/vendor/antd/es/select/style/dropdown.js +1 -1
- package/vendor/antd/es/select/style/select-input.js +23 -15
- package/vendor/antd/es/select/useIcons.js +43 -26
- package/vendor/antd/es/skeleton/Element.js +2 -1
- package/vendor/antd/es/skeleton/Skeleton.js +3 -3
- package/vendor/antd/es/slider/SliderTooltip.js +1 -0
- package/vendor/antd/es/slider/index.js +5 -3
- package/vendor/antd/es/slider/useRafLock.js +1 -0
- package/vendor/antd/es/space/Compact.js +1 -1
- package/vendor/antd/es/space/Item.js +1 -1
- package/vendor/antd/es/space/index.js +2 -2
- package/vendor/antd/es/space/style/addon.js +5 -2
- package/vendor/antd/es/spin/Indicator/Progress.js +2 -1
- package/vendor/antd/es/spin/index.js +1 -2
- package/vendor/antd/es/splitter/Panel.js +7 -3
- package/vendor/antd/es/splitter/SplitBar.js +5 -4
- package/vendor/antd/es/splitter/Splitter.js +9 -6
- package/vendor/antd/es/splitter/hooks/useItems.js +2 -1
- package/vendor/antd/es/splitter/hooks/useSizes.js +1 -1
- package/vendor/antd/es/splitter/style/index.js +8 -6
- package/vendor/antd/es/statistic/Number.js +8 -4
- package/vendor/antd/es/statistic/Statistic.js +14 -10
- package/vendor/antd/es/steps/index.js +4 -4
- package/vendor/antd/es/style/compact-item-vertical.js +2 -1
- package/vendor/antd/es/style/compact-item.js +6 -6
- package/vendor/antd/es/switch/index.js +1 -2
- package/vendor/antd/es/table/InternalTable.js +23 -14
- package/vendor/antd/es/table/hooks/useFilledColumns.js +23 -0
- package/vendor/antd/es/table/hooks/useFilter/FilterDropdown.js +22 -16
- package/vendor/antd/es/table/hooks/useFilter/FilterWrapper.js +1 -0
- package/vendor/antd/es/table/hooks/useFilter/index.js +34 -18
- package/vendor/antd/es/table/hooks/useLazyKVMap.js +2 -1
- package/vendor/antd/es/table/hooks/usePagination.js +7 -4
- package/vendor/antd/es/table/hooks/useSelection.js +32 -21
- package/vendor/antd/es/table/hooks/useSorter.js +10 -5
- package/vendor/antd/es/table/style/bordered.js +5 -27
- package/vendor/antd/es/table/style/empty.js +1 -4
- package/vendor/antd/es/table/style/index.js +1 -4
- package/vendor/antd/es/table/util.js +6 -6
- package/vendor/antd/es/tabs/hooks/useAnimateConfig.js +2 -1
- package/vendor/antd/es/tabs/index.js +1 -2
- package/vendor/antd/es/tag/CheckableTagGroup.js +8 -5
- package/vendor/antd/es/tag/hooks/useColor.js +4 -3
- package/vendor/antd/es/tag/index.js +13 -7
- package/vendor/antd/es/theme/themes/dark/colors.js +2 -1
- package/vendor/antd/es/theme/themes/default/colors.js +2 -1
- package/vendor/antd/es/theme/useToken.js +2 -2
- package/vendor/antd/es/theme/util/alias.js +34 -29
- package/vendor/antd/es/timeline/Timeline.js +3 -4
- package/vendor/antd/es/tooltip/PurePanel.js +1 -2
- package/vendor/antd/es/tooltip/UniqueProvider/index.js +2 -1
- package/vendor/antd/es/tooltip/index.js +9 -7
- package/vendor/antd/es/tour/PurePanel.js +2 -2
- package/vendor/antd/es/tour/index.js +1 -1
- package/vendor/antd/es/tour/panelRender.js +4 -2
- package/vendor/antd/es/transfer/ListBody.js +3 -1
- package/vendor/antd/es/transfer/ListItem.js +2 -1
- package/vendor/antd/es/transfer/Section.js +17 -8
- package/vendor/antd/es/transfer/index.js +51 -16
- package/vendor/antd/es/transfer/style/index.js +5 -1
- package/vendor/antd/es/tree/Tree.js +1 -2
- package/vendor/antd/es/tree/style/index.js +5 -1
- package/vendor/antd/es/tree/utils/iconUtil.js +5 -4
- package/vendor/antd/es/tree-select/index.js +3 -3
- package/vendor/antd/es/typography/Base/CopyBtn.js +3 -2
- package/vendor/antd/es/typography/Base/Ellipsis.js +3 -3
- package/vendor/antd/es/typography/Base/index.js +38 -31
- package/vendor/antd/es/typography/Editable.js +10 -4
- package/vendor/antd/es/typography/Link.js +1 -0
- package/vendor/antd/es/typography/Text.js +2 -1
- package/vendor/antd/es/typography/Typography.js +20 -10
- package/vendor/antd/es/typography/hooks/useCopyClick.js +2 -1
- package/vendor/antd/es/typography/hooks/useMergedConfig.js +13 -7
- package/vendor/antd/es/typography/hooks/useTooltipProps.js +2 -1
- package/vendor/antd/es/typography/hooks/useTypographySemantic.js +33 -0
- package/vendor/antd/es/typography/style/index.js +12 -27
- package/vendor/antd/es/typography/style/mixins.js +46 -13
- package/vendor/antd/es/upload/Upload.js +13 -7
- package/vendor/antd/es/upload/UploadList/ListItem.js +6 -5
- package/vendor/antd/es/upload/UploadList/index.js +4 -3
- package/vendor/antd/es/upload/utils.js +18 -1
- package/vendor/antd/es/version/version.js +1 -1
- package/vendor/antd/es/watermark/index.js +6 -4
- package/vendor/antd/es/watermark/useSingletonCache.js +1 -0
- package/vendor/antd/es/watermark/useWatermark.js +3 -3
- package/vendor/antd/package.json +1 -1
- package/vendor/useblocks-ui-kit/es/components/DataEntry/Input/index.js +1 -1
- package/vendor/useblocks-ui-kit/package.json +1 -1
- package/iframe/js/discussHandlers.CCCXIEaO.js +0 -88
- package/static/core/1f101241.js +0 -1
- package/static/core/1fa93ad8.js +0 -28
- package/static/core/2007bc93.js +0 -1
- package/static/core/30ab7b1d.js +0 -1
- package/static/core/440a91be.js +0 -1
- package/static/core/44e96a78.js +0 -1
- package/static/core/823aedee.js +0 -1
- package/static/core/828583e1.js +0 -2
- package/static/core/8cc6e392.js +0 -1
- package/static/core/9aefcefb.js +0 -1
- package/static/core/a4f90443.js +0 -27
- package/static/core/a7ac37cd.js +0 -1
- package/static/core/df41de18.js +0 -7
- package/static/esm/349f9e2c.js +0 -1
- package/static/esm/50fbfdf6.js +0 -1
- package/static/media/icon-sets/lucide.json +0 -6275
- package/static/media/icon-sets/tabler.json +0 -19336
- package/static/umd-runtime/Cl8heeC3.js +0 -1
- package/static/umd-runtime/D0xo8o9c.js +0 -335
- package/useblocks-core.8098d114.js +0 -859
- package/vendor/@rc-component/notification/es/Notice.js +0 -106
- package/vendor/@rc-component/notification/es/NoticeList.js +0 -98
- package/vendor/@rc-component/textarea/LICENSE.md +0 -9
- package/vendor/@rc-component/textarea/es/index.js +0 -6
- package/vendor/@rc-component/textarea/package.json +0 -6
- package/vendor/antd/es/_util/extendsObject.js +0 -12
- package/vendor/antd/es/_util/getAllowClear.js +0 -12
- package/vendor/antd/es/_util/isNonNullable.js +0 -6
- package/vendor/antd/es/_util/isPrimitive.js +0 -4
- package/vendor/antd/es/notification/style/pure-panel.js +0 -18
- package/vendor/antd/es/notification/style/stack.js +0 -85
- /package/iframe/{iframe-eblock.8098d114.html → iframe-eblock.714faf8a.html} +0 -0
- /package/iframe/{iframe.8098d114.html → iframe.714faf8a.html} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { isFunction } from "../_util/is.js";
|
|
2
3
|
import Divider from "../divider/index.js";
|
|
3
4
|
import { PanelPickerContext, PanelPresetsContext } from "./context.js";
|
|
4
5
|
import PanelPicker from "./components/PanelPicker/index.js";
|
|
@@ -57,7 +58,7 @@ const ColorPickerPanel = (props) => {
|
|
|
57
58
|
onChange
|
|
58
59
|
]);
|
|
59
60
|
const innerPanel = /*#__PURE__*/ React.createElement("div", { className: `${colorPickerPanelPrefixCls}-content` }, /*#__PURE__*/ React.createElement(PanelPicker, null), Array.isArray(presets) && /*#__PURE__*/ React.createElement(Divider, null), /*#__PURE__*/ React.createElement(PanelPresets, null));
|
|
60
|
-
return /*#__PURE__*/ React.createElement(PanelPickerContext.Provider, { value: panelContext }, /*#__PURE__*/ React.createElement(PanelPresetsContext.Provider, { value: presetContext }, /*#__PURE__*/ React.createElement("div", { className: colorPickerPanelPrefixCls },
|
|
61
|
+
return /*#__PURE__*/ React.createElement(PanelPickerContext.Provider, { value: panelContext }, /*#__PURE__*/ React.createElement(PanelPresetsContext.Provider, { value: presetContext }, /*#__PURE__*/ React.createElement("div", { className: colorPickerPanelPrefixCls }, isFunction(panelRender) ? panelRender(innerPanel, { components: {
|
|
61
62
|
Picker: PanelPicker,
|
|
62
63
|
Presets: PanelPresets
|
|
63
64
|
} }) : innerPanel)));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import pickAttrs from "../../../../@rc-component/util/es/pickAttrs.js";
|
|
3
|
+
import "../../../../@rc-component/util/es/index.js";
|
|
3
4
|
import { clsx } from "../../../../clsx/dist/clsx.js";
|
|
5
|
+
import { isFunction } from "../../_util/is.js";
|
|
4
6
|
import useLocale from "../../locale/useLocale.js";
|
|
5
7
|
import "../../locale/index.js";
|
|
6
8
|
import ColorBlock from "../../../../@rc-component/color-picker/es/components/ColorBlock.js";
|
|
@@ -17,7 +19,7 @@ const ColorTrigger = /*#__PURE__*/ forwardRef((props, ref) => {
|
|
|
17
19
|
const [locale] = useLocale("ColorPicker");
|
|
18
20
|
const desc = React.useMemo(() => {
|
|
19
21
|
if (!showText) return "";
|
|
20
|
-
if (
|
|
22
|
+
if (isFunction(showText)) return showText(color);
|
|
21
23
|
if (color.cleared) return locale.transparent;
|
|
22
24
|
if (color.isGradient()) return color.getColors().map((c, index) => {
|
|
23
25
|
const inactive = activeIndex !== -1 && activeIndex !== index;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import useLayoutEffect$1 from "../../../../../@rc-component/util/es/hooks/useLayoutEffect.js";
|
|
3
|
+
import "../../../../../@rc-component/util/es/index.js";
|
|
3
4
|
import _toConsumableArray from "../../../../../@babel/runtime/helpers/esm/toConsumableArray.js";
|
|
4
5
|
import { useForceUpdate } from "../../../_util/hooks/useForceUpdate.js";
|
|
5
6
|
import "../../../_util/hooks/index.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isFunction, isString } from "../../_util/is.js";
|
|
1
2
|
import SizeContext from "../SizeContext.js";
|
|
2
3
|
import React from "../../../../react/index.js";
|
|
3
4
|
//#region node_modules/antd/es/config-provider/hooks/useSize.js
|
|
@@ -5,8 +6,8 @@ const useSize = (customSize) => {
|
|
|
5
6
|
const size = React.useContext(SizeContext);
|
|
6
7
|
return React.useMemo(() => {
|
|
7
8
|
if (!customSize) return size;
|
|
8
|
-
if (
|
|
9
|
-
if (
|
|
9
|
+
if (isString(customSize)) return customSize ?? size;
|
|
10
|
+
if (isFunction(customSize)) return customSize(size);
|
|
10
11
|
return size;
|
|
11
12
|
}, [customSize, size]);
|
|
12
13
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import useMemo$1 from "../../../../@rc-component/util/es/hooks/useMemo.js";
|
|
2
2
|
import isEqual from "../../../../@rc-component/util/es/isEqual.js";
|
|
3
|
+
import "../../../../@rc-component/util/es/index.js";
|
|
3
4
|
import { defaultConfig } from "../../theme/context.js";
|
|
4
5
|
import "../../theme/internal.js";
|
|
6
|
+
import "../../_util/is.js";
|
|
5
7
|
import { devUseWarning } from "../../_util/warning.js";
|
|
6
8
|
import { useId } from "../../../../react/index.js";
|
|
7
9
|
//#region node_modules/antd/es/config-provider/hooks/useTheme.js
|
|
@@ -11,11 +11,12 @@ import defaultTheme from "../theme/themes/default/theme.js";
|
|
|
11
11
|
import { DesignTokenContext } from "../theme/context.js";
|
|
12
12
|
import useResetIconStyle from "../theme/util/useResetIconStyle.js";
|
|
13
13
|
import IconContext from "../../../@ant-design/icons/es/components/Context.js";
|
|
14
|
+
import { isFunction, isPlainObject } from "../_util/is.js";
|
|
14
15
|
import { WarningContext } from "../_util/warning.js";
|
|
16
|
+
import validateMessagesContext_default from "../form/validateMessagesContext.js";
|
|
15
17
|
import localeValues from "../locale/en_US.js";
|
|
16
18
|
import LocaleContext from "../locale/context.js";
|
|
17
19
|
import LocaleProvider, { ANT_MARK } from "../locale/index.js";
|
|
18
|
-
import validateMessagesContext_default from "../form/validateMessagesContext.js";
|
|
19
20
|
import UniqueProvider from "../tooltip/UniqueProvider/index.js";
|
|
20
21
|
import { DisabledContextProvider } from "./DisabledContext.js";
|
|
21
22
|
import SizeContext, { SizeContextProvider } from "./SizeContext.js";
|
|
@@ -86,7 +87,11 @@ const globalConfig = () => ({
|
|
|
86
87
|
holderRender: globalHolderRender
|
|
87
88
|
});
|
|
88
89
|
const ProviderChildren = (props) => {
|
|
89
|
-
const { children, csp: customCsp, autoInsertSpaceInButton, alert, affix, anchor, app, form, locale, componentSize, direction, space, splitter, virtual, dropdownMatchSelectWidth, popupMatchSelectWidth, popupOverflow, legacyLocale, parentContext, iconPrefixCls: customIconPrefixCls, theme, componentDisabled, segmented, statistic, spin, calendar, carousel, cascader, collapse, typography, checkbox, descriptions, divider, drawer, skeleton, steps, image, layout, list, mentions, modal, progress, result, slider, breadcrumb, masonry, menu, pagination, input, textArea, otp, empty, badge, radio, rate, ribbon, switch: SWITCH, transfer, avatar, message, tag, table, card, cardMeta, tabs, timeline, timePicker, upload, notification, tree, colorPicker, datePicker, rangePicker, flex, wave, dropdown, warning: warningConfig, tour, tooltip, popover, popconfirm, qrcode, floatButton, floatButtonGroup, variant, inputNumber, treeSelect, watermark } = props;
|
|
90
|
+
const { children, csp: customCsp, autoInsertSpaceInButton, alert, affix, anchor, app, form, locale: rawLocale, componentSize, direction, space, splitter, virtual, dropdownMatchSelectWidth, popupMatchSelectWidth, popupOverflow, legacyLocale, parentContext, iconPrefixCls: customIconPrefixCls, theme, componentDisabled, segmented, statistic, spin, calendar, carousel, cascader, collapse, typography, checkbox, descriptions, divider, drawer, skeleton, steps, image, layout, list, mentions, modal, progress, result, slider, breadcrumb, masonry, menu, pagination, input, inputPassword, inputSearch, textArea, otp, empty, badge, borderBeam, radio, rate, ribbon, switch: SWITCH, transfer, avatar, message, tag, table, card, cardMeta, tabs, timeline, timePicker, upload, notification, tree, colorPicker, datePicker, rangePicker, flex, wave, dropdown, warning: warningConfig, tour, tooltip, popover, popconfirm, qrcode, floatButton, floatButtonGroup, variant, inputNumber, treeSelect, watermark } = props;
|
|
91
|
+
const locale = React$1.useMemo(() => {
|
|
92
|
+
if (isPlainObject(rawLocale) && Object.prototype.hasOwnProperty.call(rawLocale, "default") && rawLocale.default?.locale) return rawLocale.default;
|
|
93
|
+
return rawLocale;
|
|
94
|
+
}, [rawLocale]);
|
|
90
95
|
const getPrefixCls = React$1.useCallback((suffixCls, customizePrefixCls) => {
|
|
91
96
|
const { prefixCls } = props;
|
|
92
97
|
if (customizePrefixCls) return customizePrefixCls;
|
|
@@ -129,6 +134,8 @@ const ProviderChildren = (props) => {
|
|
|
129
134
|
steps,
|
|
130
135
|
image,
|
|
131
136
|
input,
|
|
137
|
+
inputPassword,
|
|
138
|
+
inputSearch,
|
|
132
139
|
textArea,
|
|
133
140
|
otp,
|
|
134
141
|
layout,
|
|
@@ -144,6 +151,7 @@ const ProviderChildren = (props) => {
|
|
|
144
151
|
pagination,
|
|
145
152
|
empty,
|
|
146
153
|
badge,
|
|
154
|
+
borderBeam,
|
|
147
155
|
radio,
|
|
148
156
|
rate,
|
|
149
157
|
ribbon,
|
|
@@ -229,7 +237,7 @@ const ProviderChildren = (props) => {
|
|
|
229
237
|
const parsedToken = { ...componentToken };
|
|
230
238
|
if ("algorithm" in parsedToken) {
|
|
231
239
|
if (parsedToken.algorithm === true) parsedToken.theme = themeObj;
|
|
232
|
-
else if (Array.isArray(parsedToken.algorithm) ||
|
|
240
|
+
else if (Array.isArray(parsedToken.algorithm) || isFunction(parsedToken.algorithm)) parsedToken.theme = createTheme(parsedToken.algorithm);
|
|
233
241
|
delete parsedToken.algorithm;
|
|
234
242
|
}
|
|
235
243
|
parsedComponents[componentName] = parsedToken;
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
import { merge } from "../../../../@rc-component/util/es/utils/set.js";
|
|
3
3
|
import "../../../../@rc-component/util/es/index.js";
|
|
4
4
|
import { clsx } from "../../../../clsx/dist/clsx.js";
|
|
5
|
-
import { ConfigContext } from "../../config-provider/context.js";
|
|
5
|
+
import { ConfigContext, useComponentConfig } from "../../config-provider/context.js";
|
|
6
6
|
import "../../_util/warning.js";
|
|
7
|
+
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
7
8
|
import locale from "../locale/en_US.js";
|
|
8
9
|
import useLocale from "../../locale/useLocale.js";
|
|
9
10
|
import "../../locale/index.js";
|
|
10
|
-
import { useZIndex } from "../../_util/hooks/useZIndex.js";
|
|
11
|
-
import "../../_util/hooks/index.js";
|
|
12
|
-
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
13
11
|
import DisabledContext from "../../config-provider/DisabledContext.js";
|
|
14
12
|
import "../../config-provider/index.js";
|
|
13
|
+
import { useAllowClear } from "../../_util/hooks/useAllowClear.js";
|
|
14
|
+
import { useZIndex } from "../../_util/hooks/useZIndex.js";
|
|
15
|
+
import "../../_util/hooks/index.js";
|
|
15
16
|
import useSize from "../../config-provider/hooks/useSize.js";
|
|
16
17
|
import { useCompactItemContext } from "../../space/Compact.js";
|
|
17
18
|
import { FormItemInputContext } from "../../form/context.js";
|
|
@@ -23,17 +24,19 @@ import "../../../../@rc-component/picker/es/index.js";
|
|
|
23
24
|
import style_default from "../style/index.js";
|
|
24
25
|
import RefIcon from "../../../../@ant-design/icons/es/icons/SwapRightOutlined.js";
|
|
25
26
|
import useMergedPickerSemantic from "../hooks/useMergedPickerSemantic.js";
|
|
26
|
-
import { getRangePlaceholder
|
|
27
|
+
import { getRangePlaceholder } from "../util.js";
|
|
27
28
|
import { TIME } from "./constant.js";
|
|
28
|
-
import useSuffixIcon from "./useSuffixIcon.js";
|
|
29
29
|
import useComponents from "./useComponents.js";
|
|
30
|
+
import useSuffixIcon from "./useSuffixIcon.js";
|
|
30
31
|
import * as React$1 from "../../../../react/index.js";
|
|
31
32
|
import { forwardRef, useContext, useImperativeHandle } from "../../../../react/index.js";
|
|
32
33
|
//#region node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js
|
|
33
34
|
const generateRangePicker = (generateConfig) => {
|
|
34
35
|
return /* @__PURE__ */ forwardRef((props, ref) => {
|
|
35
|
-
const { prefixCls: customizePrefixCls, getPopupContainer: customGetPopupContainer, components, className, style, classNames, styles, placement, size: customizeSize, disabled: customDisabled, bordered = true, placeholder, status: customStatus, variant: customVariant, picker, dropdownClassName, popupClassName, popupStyle, rootClassName, suffixIcon, separator, ...restProps } = props;
|
|
36
|
-
const
|
|
36
|
+
const { prefixCls: customizePrefixCls, getPopupContainer: customGetPopupContainer, components, className, style, classNames, styles, placement, size: customizeSize, disabled: customDisabled, bordered = true, placeholder, status: customStatus, variant: customVariant, picker, dropdownClassName, popupClassName, popupStyle, rootClassName, suffixIcon, separator, allowClear, clearIcon, ...restProps } = props;
|
|
37
|
+
const pickerType = picker === TIME ? "timePicker" : "datePicker";
|
|
38
|
+
const { suffixIcon: contextSuffixIcon, clearIcon: contextClearIcon, allowClear: contextAllowClear } = useComponentConfig(pickerType);
|
|
39
|
+
const [mergedClassNames, mergedStyles] = useMergedPickerSemantic(pickerType, classNames, styles, popupClassName || dropdownClassName, popupStyle);
|
|
37
40
|
const innerRef = React$1.useRef(null);
|
|
38
41
|
const { getPrefixCls, direction, getPopupContainer, rangePicker } = useContext(ConfigContext);
|
|
39
42
|
const prefixCls = getPrefixCls("picker", customizePrefixCls);
|
|
@@ -44,7 +47,14 @@ const generateRangePicker = (generateConfig) => {
|
|
|
44
47
|
const rootCls = useCSSVarCls(prefixCls);
|
|
45
48
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
46
49
|
const mergedRootClassName = clsx(hashId, cssVarCls, rootCls, rootClassName);
|
|
47
|
-
const
|
|
50
|
+
const mergedAllowClear = useAllowClear({
|
|
51
|
+
componentName: "RangePicker",
|
|
52
|
+
allowClear,
|
|
53
|
+
clearIcon,
|
|
54
|
+
contextAllowClear,
|
|
55
|
+
contextClearIcon,
|
|
56
|
+
defaultAllowClear: true
|
|
57
|
+
});
|
|
48
58
|
const mergedComponents = useComponents(components);
|
|
49
59
|
const mergedSize = useSize((ctx) => customizeSize ?? compactSize ?? ctx);
|
|
50
60
|
const disabled = React$1.useContext(DisabledContext);
|
|
@@ -54,7 +64,7 @@ const generateRangePicker = (generateConfig) => {
|
|
|
54
64
|
picker,
|
|
55
65
|
hasFeedback,
|
|
56
66
|
feedbackIcon,
|
|
57
|
-
suffixIcon
|
|
67
|
+
suffixIcon: suffixIcon === void 0 ? contextSuffixIcon : suffixIcon
|
|
58
68
|
});
|
|
59
69
|
useImperativeHandle(ref, () => innerRef.current);
|
|
60
70
|
const [contextLocale] = useLocale("Calendar", locale);
|
|
@@ -4,14 +4,15 @@ import "../../../../@rc-component/util/es/index.js";
|
|
|
4
4
|
import { clsx } from "../../../../clsx/dist/clsx.js";
|
|
5
5
|
import { ConfigContext, useComponentConfig } from "../../config-provider/context.js";
|
|
6
6
|
import "../../_util/warning.js";
|
|
7
|
+
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
7
8
|
import locale from "../locale/en_US.js";
|
|
8
9
|
import useLocale from "../../locale/useLocale.js";
|
|
9
10
|
import "../../locale/index.js";
|
|
10
|
-
import { useZIndex } from "../../_util/hooks/useZIndex.js";
|
|
11
|
-
import "../../_util/hooks/index.js";
|
|
12
|
-
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
13
11
|
import DisabledContext from "../../config-provider/DisabledContext.js";
|
|
14
12
|
import "../../config-provider/index.js";
|
|
13
|
+
import { useAllowClear } from "../../_util/hooks/useAllowClear.js";
|
|
14
|
+
import { useZIndex } from "../../_util/hooks/useZIndex.js";
|
|
15
|
+
import "../../_util/hooks/index.js";
|
|
15
16
|
import useSize from "../../config-provider/hooks/useSize.js";
|
|
16
17
|
import { useCompactItemContext } from "../../space/Compact.js";
|
|
17
18
|
import { FormItemInputContext } from "../../form/context.js";
|
|
@@ -23,17 +24,17 @@ import style_default from "../style/index.js";
|
|
|
23
24
|
import useMergedPickerSemantic from "../hooks/useMergedPickerSemantic.js";
|
|
24
25
|
import { getPlaceholder, useIcons } from "../util.js";
|
|
25
26
|
import { MONTH, MONTHPICKER, QUARTER, QUARTERPICKER, TIME, TIMEPICKER, WEEK, WEEKPICKER, YEAR, YEARPICKER } from "./constant.js";
|
|
26
|
-
import useSuffixIcon from "./useSuffixIcon.js";
|
|
27
27
|
import useComponents from "./useComponents.js";
|
|
28
|
+
import useSuffixIcon from "./useSuffixIcon.js";
|
|
28
29
|
import * as React$1 from "../../../../react/index.js";
|
|
29
30
|
import { forwardRef, useContext, useImperativeHandle } from "../../../../react/index.js";
|
|
30
31
|
//#region node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js
|
|
31
32
|
const generatePicker = (generateConfig) => {
|
|
32
|
-
const getPicker = (picker, displayName) => {
|
|
33
|
+
const getPicker = (picker, displayName = "DatePicker") => {
|
|
33
34
|
const pickerType = displayName === TIMEPICKER ? "timePicker" : "datePicker";
|
|
34
35
|
return /* @__PURE__ */ forwardRef((props, ref) => {
|
|
35
|
-
const { prefixCls: customizePrefixCls, getPopupContainer: customizeGetPopupContainer, components, style, className, size: customizeSize, bordered, placement, placeholder, disabled: customDisabled, status: customStatus, variant: customVariant, onCalendarChange, classNames, styles, dropdownClassName, popupClassName, popupStyle, rootClassName, suffixIcon, ...restProps } = props;
|
|
36
|
-
const { suffixIcon: contextSuffixIcon } = useComponentConfig(displayName === TIMEPICKER ? "timePicker" : "datePicker");
|
|
36
|
+
const { prefixCls: customizePrefixCls, getPopupContainer: customizeGetPopupContainer, components, style, className, size: customizeSize, bordered, placement, placeholder, disabled: customDisabled, status: customStatus, variant: customVariant, onCalendarChange, classNames, styles, dropdownClassName, popupClassName, popupStyle, rootClassName, suffixIcon, allowClear, clearIcon, ...restProps } = props;
|
|
37
|
+
const { suffixIcon: contextSuffixIcon, clearIcon: contextClearIcon, allowClear: contextAllowClear } = useComponentConfig(displayName === TIMEPICKER ? "timePicker" : "datePicker");
|
|
37
38
|
const { getPrefixCls, direction, getPopupContainer, [pickerType]: contextPickerConfig } = useContext(ConfigContext);
|
|
38
39
|
const prefixCls = getPrefixCls("picker", customizePrefixCls);
|
|
39
40
|
const { compactSize, compactItemClassnames } = useCompactItemContext(prefixCls, direction);
|
|
@@ -63,7 +64,15 @@ const generatePicker = (generateConfig) => {
|
|
|
63
64
|
onCalendarChange?.(date, dateStr, info);
|
|
64
65
|
if (hasLegacyOnSelect) onSelect(date);
|
|
65
66
|
};
|
|
66
|
-
const [
|
|
67
|
+
const [, removeIcon] = useIcons(props, prefixCls);
|
|
68
|
+
const mergedAllowClear = useAllowClear({
|
|
69
|
+
componentName: displayName,
|
|
70
|
+
allowClear,
|
|
71
|
+
clearIcon,
|
|
72
|
+
contextAllowClear,
|
|
73
|
+
contextClearIcon,
|
|
74
|
+
defaultAllowClear: true
|
|
75
|
+
});
|
|
67
76
|
const mergedComponents = useComponents(components);
|
|
68
77
|
const { hasFeedback, status: contextStatus, feedbackIcon } = useContext(FormItemInputContext);
|
|
69
78
|
const mergedSuffixIcon = useSuffixIcon({
|
|
@@ -6,7 +6,7 @@ import React from "../../../../react/index.js";
|
|
|
6
6
|
//#region node_modules/antd/es/date-picker/generatePicker/useSuffixIcon.js
|
|
7
7
|
const useSuffixIcon = ({ picker, hasFeedback, feedbackIcon, suffixIcon }) => {
|
|
8
8
|
if (suffixIcon === null || suffixIcon === false) return null;
|
|
9
|
-
if (suffixIcon === true || suffixIcon === void 0) return /*#__PURE__*/ React.createElement(React.Fragment, null, picker === TIME ? /*#__PURE__*/ React.createElement(RefIcon$1,
|
|
9
|
+
if (suffixIcon === true || suffixIcon === void 0) return /*#__PURE__*/ React.createElement(React.Fragment, null, picker === TIME ? /*#__PURE__*/ React.createElement(RefIcon$1, { "aria-hidden": "true" }) : /*#__PURE__*/ React.createElement(RefIcon, { "aria-hidden": "true" }), hasFeedback && feedbackIcon);
|
|
10
10
|
return suffixIcon;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { clsx } from "../../../../clsx/dist/clsx.js";
|
|
2
2
|
import { useComponentConfig } from "../../config-provider/context.js";
|
|
3
|
-
import { useMergeSemantic } from "../../_util/hooks/useMergeSemantic.js";
|
|
4
|
-
import "../../_util/hooks/index.js";
|
|
3
|
+
import { useMergeSemantic } from "../../_util/hooks/useMergeSemantic/index.js";
|
|
5
4
|
import * as React$1 from "../../../../react/index.js";
|
|
6
5
|
//#region node_modules/antd/es/date-picker/hooks/useMergedPickerSemantic.js
|
|
7
6
|
const useMergedPickerSemantic = (pickerType, classNames, styles, popupClassName, popupStyle, mergedProps) => {
|
|
@@ -2,7 +2,7 @@ import { unit } from "../../../../@ant-design/cssinjs/es/util/index.js";
|
|
|
2
2
|
import "../../../../@ant-design/cssinjs/es/index.js";
|
|
3
3
|
import { merge } from "../../../../@ant-design/cssinjs-utils/es/util/statistic.js";
|
|
4
4
|
import { resetComponent, textEllipsis } from "../../style/index.js";
|
|
5
|
-
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
5
|
+
import { genCssVar, genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
6
6
|
import "../../theme/internal.js";
|
|
7
7
|
import { initMoveMotion } from "../../style/motion/move.js";
|
|
8
8
|
import { initSlideMotion, slideDownIn, slideDownOut, slideUpIn, slideUpOut } from "../../style/motion/slide.js";
|
|
@@ -21,15 +21,24 @@ const genPickerPadding = (paddingBlock, paddingInline) => {
|
|
|
21
21
|
};
|
|
22
22
|
const genPickerStatusStyle = (token) => {
|
|
23
23
|
const { componentCls, colorError, colorWarning } = token;
|
|
24
|
+
const [varName] = genCssVar(token.antCls, "date-picker");
|
|
24
25
|
return { [`${componentCls}:not(${componentCls}-disabled):not([disabled])`]: {
|
|
25
|
-
[`&${componentCls}-status-error`]: {
|
|
26
|
-
|
|
26
|
+
[`&${componentCls}-status-error`]: {
|
|
27
|
+
[varName("affix-color")]: token.colorErrorAffix,
|
|
28
|
+
[`${componentCls}-active-bar`]: { background: colorError }
|
|
29
|
+
},
|
|
30
|
+
[`&${componentCls}-status-warning`]: {
|
|
31
|
+
[varName("affix-color")]: token.colorWarningAffix,
|
|
32
|
+
[`${componentCls}-active-bar`]: { background: colorWarning }
|
|
33
|
+
}
|
|
27
34
|
} };
|
|
28
35
|
};
|
|
29
36
|
const genPickerStyle = (token) => {
|
|
30
37
|
const { componentCls, antCls, paddingInline, lineWidth, lineType, colorBorder, borderRadius, motionDurationMid, colorTextDisabled, colorTextPlaceholder, colorTextQuaternary, fontSizeLG, inputFontSizeLG, fontSizeSM, inputFontSizeSM, controlHeightSM, paddingInlineSM, paddingXS, marginXS, colorIcon, lineWidthBold, colorPrimary, motionDurationSlow, zIndexPopup, paddingXXS, sizePopupArrow, colorBgElevated, borderRadiusLG, boxShadowSecondary, borderRadiusSM, colorSplit, cellHoverBg, presetsWidth, presetsMaxWidth, boxShadowPopoverArrow, fontHeight, lineHeightLG } = token;
|
|
38
|
+
const [varName, varRef] = genCssVar(antCls, "date-picker");
|
|
31
39
|
return [
|
|
32
40
|
{ [componentCls]: {
|
|
41
|
+
[varName("affix-color")]: "inherit",
|
|
33
42
|
...resetComponent(token),
|
|
34
43
|
...genPickerPadding(token.paddingBlock, token.paddingInline),
|
|
35
44
|
position: "relative",
|
|
@@ -43,6 +52,7 @@ const genPickerStyle = (token) => {
|
|
|
43
52
|
`background-color`
|
|
44
53
|
].map((prop) => `${prop} ${motionDurationMid}`).join(", "),
|
|
45
54
|
[`${componentCls}-prefix`]: {
|
|
55
|
+
color: varRef("affix-color"),
|
|
46
56
|
flex: "0 0 auto",
|
|
47
57
|
marginInlineEnd: token.inputAffixPadding
|
|
48
58
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { unit } from "../../../../@ant-design/cssinjs/es/util/index.js";
|
|
2
2
|
import "../../../../@ant-design/cssinjs/es/index.js";
|
|
3
3
|
import { merge } from "../../../../@ant-design/cssinjs-utils/es/util/statistic.js";
|
|
4
|
+
import { textEllipsis } from "../../style/index.js";
|
|
4
5
|
import "../../theme/internal.js";
|
|
5
6
|
import { genOverflowStyle, getMultipleSelectorUnit } from "./util.js";
|
|
6
7
|
//#region node_modules/antd/es/date-picker/style/multiple.js
|
|
@@ -56,12 +57,10 @@ const genPickerMultipleStyle = (token) => {
|
|
|
56
57
|
insetInlineEnd: 0,
|
|
57
58
|
transform: "translateY(-50%)",
|
|
58
59
|
transition: `all ${token.motionDurationSlow}`,
|
|
59
|
-
overflow: "hidden",
|
|
60
|
-
whiteSpace: "nowrap",
|
|
61
|
-
textOverflow: "ellipsis",
|
|
62
60
|
flex: 1,
|
|
63
61
|
color: token.colorTextPlaceholder,
|
|
64
|
-
pointerEvents: "none"
|
|
62
|
+
pointerEvents: "none",
|
|
63
|
+
...textEllipsis
|
|
65
64
|
}
|
|
66
65
|
},
|
|
67
66
|
...genOverflowStyle(token),
|
|
@@ -101,13 +101,7 @@ const genPanelStyle = (token) => {
|
|
|
101
101
|
} }
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
-
|
|
105
|
-
&-year-panel,
|
|
106
|
-
&-quarter-panel,
|
|
107
|
-
&-month-panel,
|
|
108
|
-
&-week-panel,
|
|
109
|
-
&-date-panel,
|
|
110
|
-
&-time-panel`]: {
|
|
104
|
+
"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel": {
|
|
111
105
|
display: "flex",
|
|
112
106
|
flexDirection: "column",
|
|
113
107
|
width: pickerPanelWidth
|
|
@@ -154,10 +148,7 @@ const genPanelStyle = (token) => {
|
|
|
154
148
|
}
|
|
155
149
|
}
|
|
156
150
|
},
|
|
157
|
-
|
|
158
|
-
&-next-icon,
|
|
159
|
-
&-super-prev-icon,
|
|
160
|
-
&-super-next-icon`]: {
|
|
151
|
+
"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon": {
|
|
161
152
|
position: "relative",
|
|
162
153
|
width: pickerControlIconSize,
|
|
163
154
|
height: pickerControlIconSize,
|
|
@@ -173,8 +164,7 @@ const genPanelStyle = (token) => {
|
|
|
173
164
|
content: "\"\""
|
|
174
165
|
}
|
|
175
166
|
},
|
|
176
|
-
|
|
177
|
-
&-super-next-icon`]: { "&::after": {
|
|
167
|
+
"&-super-prev-icon, &-super-next-icon": { "&::after": {
|
|
178
168
|
position: "absolute",
|
|
179
169
|
top: pickerControlIconMargin,
|
|
180
170
|
insetInlineStart: pickerControlIconMargin,
|
|
@@ -210,10 +200,7 @@ const genPanelStyle = (token) => {
|
|
|
210
200
|
"&-in-view": { color: colorText },
|
|
211
201
|
...genPickerCellInnerStyle(token)
|
|
212
202
|
},
|
|
213
|
-
|
|
214
|
-
&-year-panel,
|
|
215
|
-
&-quarter-panel,
|
|
216
|
-
&-month-panel`]: {
|
|
203
|
+
"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel": {
|
|
217
204
|
[`${componentCls}-content`]: { height: token.calc(withoutTimeCellHeight).mul(4).equal() },
|
|
218
205
|
[pickerCellInnerCls]: { padding: `0 ${unit(paddingXS)}` }
|
|
219
206
|
},
|
|
@@ -222,9 +209,7 @@ const genPanelStyle = (token) => {
|
|
|
222
209
|
[pickerCellInnerCls]: { padding: `0 ${unit(token.calc(paddingXS).div(2).equal())}` },
|
|
223
210
|
[`${componentCls}-cell::before`]: { display: "none" }
|
|
224
211
|
},
|
|
225
|
-
|
|
226
|
-
&-quarter-panel,
|
|
227
|
-
&-month-panel`]: {
|
|
212
|
+
"&-year-panel, &-quarter-panel, &-month-panel": {
|
|
228
213
|
[`${componentCls}-body`]: { padding: `0 ${unit(paddingXS)}` },
|
|
229
214
|
[pickerCellInnerCls]: { width: pickerYearMonthCellWidth }
|
|
230
215
|
},
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
+
import { isNonNullable } from "../_util/is.js";
|
|
1
2
|
import useIcons$1 from "../select/useIcons.js";
|
|
2
3
|
import * as React$1 from "../../../react/index.js";
|
|
3
4
|
//#region node_modules/antd/es/date-picker/util.js
|
|
4
|
-
|
|
5
|
-
if (customizePlaceholder
|
|
5
|
+
const getPlaceholder = (locale, picker, customizePlaceholder) => {
|
|
6
|
+
if (isNonNullable(customizePlaceholder)) return customizePlaceholder;
|
|
6
7
|
if (picker === "year" && locale.lang.yearPlaceholder) return locale.lang.yearPlaceholder;
|
|
7
8
|
if (picker === "quarter" && locale.lang.quarterPlaceholder) return locale.lang.quarterPlaceholder;
|
|
8
9
|
if (picker === "month" && locale.lang.monthPlaceholder) return locale.lang.monthPlaceholder;
|
|
9
10
|
if (picker === "week" && locale.lang.weekPlaceholder) return locale.lang.weekPlaceholder;
|
|
10
11
|
if (picker === "time" && locale.timePickerLocale.placeholder) return locale.timePickerLocale.placeholder;
|
|
11
12
|
return locale.lang.placeholder;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (customizePlaceholder
|
|
15
|
-
if (picker === "year" && locale.lang.
|
|
16
|
-
if (picker === "quarter" && locale.lang.
|
|
17
|
-
if (picker === "month" && locale.lang.
|
|
18
|
-
if (picker === "week" && locale.lang.
|
|
19
|
-
if (picker === "time" && locale.timePickerLocale.
|
|
13
|
+
};
|
|
14
|
+
const getRangePlaceholder = (locale, picker, customizePlaceholder) => {
|
|
15
|
+
if (isNonNullable(customizePlaceholder)) return customizePlaceholder;
|
|
16
|
+
if (picker === "year" && locale.lang.rangeYearPlaceholder) return locale.lang.rangeYearPlaceholder;
|
|
17
|
+
if (picker === "quarter" && locale.lang.rangeQuarterPlaceholder) return locale.lang.rangeQuarterPlaceholder;
|
|
18
|
+
if (picker === "month" && locale.lang.rangeMonthPlaceholder) return locale.lang.rangeMonthPlaceholder;
|
|
19
|
+
if (picker === "week" && locale.lang.rangeWeekPlaceholder) return locale.lang.rangeWeekPlaceholder;
|
|
20
|
+
if (picker === "time" && locale.timePickerLocale.rangePlaceholder) return locale.timePickerLocale.rangePlaceholder;
|
|
20
21
|
return locale.lang.rangePlaceholder;
|
|
21
|
-
}
|
|
22
|
-
|
|
22
|
+
};
|
|
23
|
+
const useIcons = (props, prefixCls) => {
|
|
23
24
|
const { allowClear = true } = props;
|
|
24
25
|
const { clearIcon, removeIcon } = useIcons$1({
|
|
25
26
|
...props,
|
|
@@ -33,6 +34,6 @@ function useIcons(props, prefixCls) {
|
|
|
33
34
|
...allowClear === true ? {} : allowClear
|
|
34
35
|
};
|
|
35
36
|
}, [allowClear, clearIcon]), removeIcon];
|
|
36
|
-
}
|
|
37
|
+
};
|
|
37
38
|
//#endregion
|
|
38
39
|
export { getPlaceholder, getRangePlaceholder, useIcons };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
|
-
import isNonNullable from "../_util/
|
|
4
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
5
|
-
import "../_util/hooks/index.js";
|
|
3
|
+
import { isNonNullable } from "../_util/is.js";
|
|
4
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
6
5
|
import DescriptionsContext from "./DescriptionsContext.js";
|
|
7
6
|
import React from "../../../react/index.js";
|
|
8
7
|
//#region node_modules/antd/es/descriptions/Cell.js
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import toArray from "../../../../@rc-component/util/es/Children/toArray.js";
|
|
2
2
|
import "../../../../@rc-component/util/es/index.js";
|
|
3
|
+
import { isNumber } from "../../_util/is.js";
|
|
3
4
|
import { matchScreen } from "../../_util/responsiveObserver.js";
|
|
4
5
|
import * as React$1 from "../../../../react/index.js";
|
|
5
6
|
//#region node_modules/antd/es/descriptions/hooks/useItems.js
|
|
@@ -16,7 +17,7 @@ function useItems(screens, items, children) {
|
|
|
16
17
|
};
|
|
17
18
|
return {
|
|
18
19
|
...restItem,
|
|
19
|
-
span:
|
|
20
|
+
span: isNumber(span) ? span : matchScreen(screens, span)
|
|
20
21
|
};
|
|
21
22
|
}), [mergedItems, screens]);
|
|
22
23
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
4
|
+
import { isNumber } from "../_util/is.js";
|
|
5
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
4
6
|
import "../_util/warning.js";
|
|
5
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
6
|
-
import "../_util/hooks/index.js";
|
|
7
7
|
import useSize from "../config-provider/hooks/useSize.js";
|
|
8
8
|
import { matchScreen } from "../_util/responsiveObserver.js";
|
|
9
9
|
import useBreakpoint from "../grid/hooks/useBreakpoint.js";
|
|
@@ -22,7 +22,7 @@ const Descriptions = (props) => {
|
|
|
22
22
|
const prefixCls = getPrefixCls("descriptions", customizePrefixCls);
|
|
23
23
|
const screens = useBreakpoint();
|
|
24
24
|
const mergedColumn = React$1.useMemo(() => {
|
|
25
|
-
if (
|
|
25
|
+
if (isNumber(column)) return column;
|
|
26
26
|
return matchScreen(screens, {
|
|
27
27
|
...DEFAULT_COLUMN_MAP,
|
|
28
28
|
...column
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
4
|
+
import { isNumber } from "../_util/is.js";
|
|
5
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
4
6
|
import "../_util/warning.js";
|
|
5
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
6
7
|
import { useOrientation } from "../_util/hooks/useOrientation.js";
|
|
7
8
|
import "../_util/hooks/index.js";
|
|
8
9
|
import useSize from "../config-provider/hooks/useSize.js";
|
|
@@ -61,7 +62,7 @@ const Divider = (props) => {
|
|
|
61
62
|
[mergedClassNames.rail]: mergedClassNames.rail && !children
|
|
62
63
|
}, className, rootClassName, mergedClassNames.root);
|
|
63
64
|
const memoizedPlacementMargin = React$1.useMemo(() => {
|
|
64
|
-
if (
|
|
65
|
+
if (isNumber(orientationMargin)) return orientationMargin;
|
|
65
66
|
if (/^\d+$/.test(orientationMargin)) return Number(orientationMargin);
|
|
66
67
|
return orientationMargin;
|
|
67
68
|
}, [orientationMargin]);
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { composeRef } from "../../../@rc-component/util/es/ref.js";
|
|
3
3
|
import useId_default from "../../../@rc-component/util/es/hooks/useId.js";
|
|
4
|
+
import "../../../@rc-component/util/es/index.js";
|
|
4
5
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
5
6
|
import { ConfigContext, useComponentConfig } from "../config-provider/context.js";
|
|
7
|
+
import { isNumber } from "../_util/is.js";
|
|
8
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
6
9
|
import "../_util/warning.js";
|
|
10
|
+
import "../config-provider/index.js";
|
|
7
11
|
import { useMergedMask } from "../_util/hooks/useMergedMask.js";
|
|
8
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
9
12
|
import ZIndexContext from "../_util/zindexContext.js";
|
|
10
13
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
11
14
|
import "../_util/hooks/index.js";
|
|
12
|
-
import "../config-provider/index.js";
|
|
13
15
|
import { getTransitionName } from "../_util/motion.js";
|
|
14
16
|
import ContextIsolator from "../_util/ContextIsolator.js";
|
|
15
17
|
import useFocusable from "./useFocusable.js";
|
|
@@ -31,12 +33,12 @@ const Drawer = (props) => {
|
|
|
31
33
|
const { placement } = rest;
|
|
32
34
|
const id = useId_default();
|
|
33
35
|
const ariaId = rest.title ? id : void 0;
|
|
34
|
-
const { getPopupContainer, getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, mask: contextMask } = useComponentConfig("drawer");
|
|
36
|
+
const { getPopupContainer, getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, mask: contextMask, focusable: contextFocusable } = useComponentConfig("drawer");
|
|
35
37
|
const prefixCls = getPrefixCls("drawer", customizePrefixCls);
|
|
36
38
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
37
39
|
const getContainer = customizeGetContainer === void 0 && getPopupContainer ? () => getPopupContainer(document.body) : customizeGetContainer;
|
|
38
40
|
const drawerSize = React$1.useMemo(() => {
|
|
39
|
-
if (
|
|
41
|
+
if (isNumber(size)) return size;
|
|
40
42
|
if (size === "large") return 736;
|
|
41
43
|
if (size === "default") return DEFAULT_SIZE;
|
|
42
44
|
if (typeof size === "string") {
|
|
@@ -63,7 +65,10 @@ const Drawer = (props) => {
|
|
|
63
65
|
const mergedPanelRef = composeRef(panelRef, innerPanelRef);
|
|
64
66
|
const [zIndex, contextZIndex] = useZIndex("Drawer", rest.zIndex);
|
|
65
67
|
const [mergedMask, maskBlurClassName, mergedMaskClosable] = useMergedMask(drawerMask, contextMask, prefixCls, maskClosable);
|
|
66
|
-
const mergedFocusable = useFocusable(
|
|
68
|
+
const mergedFocusable = useFocusable({
|
|
69
|
+
...contextFocusable,
|
|
70
|
+
...focusable
|
|
71
|
+
}, getContainer !== false && mergedMask);
|
|
67
72
|
const { classNames, styles, rootStyle } = rest;
|
|
68
73
|
const mergedProps = {
|
|
69
74
|
...props,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
4
|
+
import { isPlainObject } from "../_util/is.js";
|
|
5
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
4
6
|
import { pickClosable, useClosable } from "../_util/hooks/useClosable.js";
|
|
5
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
6
7
|
import "../_util/hooks/index.js";
|
|
7
8
|
import skeleton_default from "../skeleton/index.js";
|
|
8
9
|
import * as React$1 from "../../../react/index.js";
|
|
@@ -18,7 +19,7 @@ const DrawerPanel = (props) => {
|
|
|
18
19
|
const closablePlacement = React$1.useMemo(() => {
|
|
19
20
|
const merged = closable ?? contextClosable;
|
|
20
21
|
if (merged === false) return;
|
|
21
|
-
if (
|
|
22
|
+
if (isPlainObject(merged) && merged?.placement === "end") return "end";
|
|
22
23
|
return "start";
|
|
23
24
|
}, [closable, contextClosable]);
|
|
24
25
|
const customCloseIconRender = React$1.useCallback((icon) => /*#__PURE__*/ React$1.createElement("button", {
|