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 { useComposeRef } from "../../../@rc-component/util/es/ref.js";
|
|
2
3
|
import useEvent from "../../../@rc-component/util/es/hooks/useEvent.js";
|
|
3
4
|
import useControlledState from "../../../@rc-component/util/es/hooks/useControlledState.js";
|
|
4
5
|
import omit from "../../../@rc-component/util/es/omit.js";
|
|
@@ -7,24 +8,24 @@ import { clsx } from "../../../clsx/dist/clsx.js";
|
|
|
7
8
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
8
9
|
import useToken from "../theme/useToken.js";
|
|
9
10
|
import "../theme/internal.js";
|
|
11
|
+
import { isPlainObject, isPrimitive } from "../_util/is.js";
|
|
12
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
10
13
|
import { devUseWarning } from "../_util/warning.js";
|
|
11
|
-
import
|
|
14
|
+
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
15
|
+
import { cloneElement as cloneElement$1 } from "../_util/reactNode.js";
|
|
12
16
|
import ZIndexContext from "../_util/zindexContext.js";
|
|
13
17
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
14
18
|
import "../_util/hooks/index.js";
|
|
15
|
-
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
16
|
-
import { cloneElement as cloneElement$1 } from "../_util/reactNode.js";
|
|
17
19
|
import RefIcon from "../../../@ant-design/icons/es/icons/RightOutlined.js";
|
|
18
20
|
import genPurePanel from "../_util/PurePanel.js";
|
|
19
21
|
import getPlacements from "../_util/placements.js";
|
|
20
22
|
import RefIcon$1 from "../../../@ant-design/icons/es/icons/LeftOutlined.js";
|
|
21
23
|
import es_default from "../../../@rc-component/dropdown/es/index.js";
|
|
22
|
-
import isPrimitive from "../_util/isPrimitive.js";
|
|
23
24
|
import { OverrideProvider } from "../menu/OverrideContext.js";
|
|
24
25
|
import Menu from "../menu/index.js";
|
|
25
26
|
import style_default from "./style/index.js";
|
|
26
27
|
import * as React$1 from "../../../react/index.js";
|
|
27
|
-
const Dropdown = (props) => {
|
|
28
|
+
const Dropdown = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
28
29
|
const { menu, arrow, prefixCls: customizePrefixCls, children, trigger, disabled, dropdownRender, popupRender, getPopupContainer, overlayClassName, rootClassName, overlayStyle, open, onOpenChange, mouseEnterDelay = .15, mouseLeaveDelay = .1, autoAdjustOverflow = true, placement = "", transitionName, classNames, styles, destroyPopupOnHide, destroyOnHidden } = props;
|
|
29
30
|
const { getPrefixCls, direction, getPopupContainer: getContextPopupContainer, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig("dropdown");
|
|
30
31
|
const mergedProps = {
|
|
@@ -61,9 +62,11 @@ const Dropdown = (props) => {
|
|
|
61
62
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
62
63
|
const [, token] = useToken();
|
|
63
64
|
const child = React$1.Children.only(isPrimitive(children) ? /*#__PURE__*/ React$1.createElement("span", null, children) : children);
|
|
65
|
+
const composedRef = useComposeRef(ref, child.ref);
|
|
64
66
|
const popupTrigger = cloneElement$1(child, {
|
|
65
67
|
className: clsx(`${prefixCls}-trigger`, { [`${prefixCls}-rtl`]: direction === "rtl" }, child.props.className),
|
|
66
|
-
disabled: child.props.disabled ?? disabled
|
|
68
|
+
disabled: child.props.disabled ?? disabled,
|
|
69
|
+
ref: composedRef
|
|
67
70
|
});
|
|
68
71
|
const triggerActions = disabled ? [] : trigger;
|
|
69
72
|
const alignPoint = !!triggerActions?.includes("contextMenu");
|
|
@@ -74,7 +77,7 @@ const Dropdown = (props) => {
|
|
|
74
77
|
});
|
|
75
78
|
const overlayClassNameCustomized = clsx(overlayClassName, rootClassName, hashId, cssVarCls, rootCls, contextClassName, mergedClassNames.root, { [`${prefixCls}-rtl`]: direction === "rtl" });
|
|
76
79
|
const builtinPlacements = getPlacements({
|
|
77
|
-
arrowPointAtCenter:
|
|
80
|
+
arrowPointAtCenter: isPlainObject(arrow) && arrow.pointAtCenter,
|
|
78
81
|
autoAdjustOverflow,
|
|
79
82
|
offset: token.marginXXS,
|
|
80
83
|
arrowWidth: arrow ? token.sizePopupArrow : 0,
|
|
@@ -137,7 +140,7 @@ const Dropdown = (props) => {
|
|
|
137
140
|
}, popupTrigger);
|
|
138
141
|
if (zIndex) renderNode = /*#__PURE__*/ React$1.createElement(ZIndexContext.Provider, { value: contextZIndex }, renderNode);
|
|
139
142
|
return renderNode;
|
|
140
|
-
};
|
|
143
|
+
});
|
|
141
144
|
const PurePanel = genPurePanel(Dropdown, "align", void 0, "dropdown", (prefixCls) => prefixCls);
|
|
142
145
|
/* istanbul ignore next */
|
|
143
146
|
const WrapPurePanel = (props) => /*#__PURE__*/ React$1.createElement(PurePanel, { ...props }, /*#__PURE__*/ React$1.createElement("span", null));
|
|
@@ -42,11 +42,7 @@ const genBaseStyle = (token) => {
|
|
|
42
42
|
[`${iconCls}-down::before`]: { transition: `transform ${motionDurationMid}` }
|
|
43
43
|
},
|
|
44
44
|
[`${componentCls}-wrap-open`]: { [`${iconCls}-down::before`]: { transform: `rotate(180deg)` } },
|
|
45
|
-
|
|
46
|
-
&-hidden,
|
|
47
|
-
&-menu-hidden,
|
|
48
|
-
&-menu-submenu-hidden
|
|
49
|
-
`]: { display: "none" },
|
|
45
|
+
"&-hidden, &-menu-hidden, &-menu-submenu-hidden": { display: "none" },
|
|
50
46
|
[`&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomLeft,
|
|
51
47
|
&${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomLeft,
|
|
52
48
|
&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottom,
|
|
@@ -123,7 +119,7 @@ const genBaseStyle = (token) => {
|
|
|
123
119
|
alignItems: "center",
|
|
124
120
|
width: "100%"
|
|
125
121
|
},
|
|
126
|
-
|
|
122
|
+
[`> a, > ${menuCls}-item-label > a`]: {
|
|
127
123
|
color: "inherit",
|
|
128
124
|
transition: `all ${motionDurationMid}`,
|
|
129
125
|
"&:hover": { color: "inherit" },
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
4
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
4
5
|
import "../_util/warning.js";
|
|
5
6
|
import useLocale from "../locale/useLocale.js";
|
|
6
7
|
import "../locale/index.js";
|
|
7
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
8
|
-
import "../_util/hooks/index.js";
|
|
9
8
|
import Empty$1 from "./empty.js";
|
|
10
9
|
import Simple from "./simple.js";
|
|
11
10
|
import style_default from "./style/index.js";
|
|
@@ -3,10 +3,10 @@ import omit from "../../../@rc-component/util/es/omit.js";
|
|
|
3
3
|
import "../../../@rc-component/util/es/index.js";
|
|
4
4
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
5
5
|
import { ConfigContext } from "../config-provider/context.js";
|
|
6
|
-
import isNonNullable from "../_util/
|
|
6
|
+
import { isNonNullable } from "../_util/is.js";
|
|
7
|
+
import "../config-provider/index.js";
|
|
7
8
|
import { useOrientation } from "../_util/hooks/useOrientation.js";
|
|
8
9
|
import "../_util/hooks/index.js";
|
|
9
|
-
import "../config-provider/index.js";
|
|
10
10
|
import { isPresetSize } from "../_util/gapSize.js";
|
|
11
11
|
import createFlexClassNames from "./utils.js";
|
|
12
12
|
import style_default from "./style/index.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { composeRef } from "../../../@rc-component/util/es/ref.js";
|
|
3
|
+
import "../../../@rc-component/util/es/index.js";
|
|
3
4
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
4
5
|
import throttleByAnimationFrame from "../_util/throttleByAnimationFrame.js";
|
|
5
6
|
import { ConfigContext, useComponentConfig } from "../config-provider/context.js";
|
|
@@ -3,12 +3,12 @@ import omit from "../../../@rc-component/util/es/omit.js";
|
|
|
3
3
|
import "../../../@rc-component/util/es/index.js";
|
|
4
4
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
5
5
|
import { ConfigContext } from "../config-provider/context.js";
|
|
6
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
6
7
|
import "../_util/warning.js";
|
|
7
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
8
|
-
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
9
|
-
import "../_util/hooks/index.js";
|
|
10
8
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
11
9
|
import "../config-provider/index.js";
|
|
10
|
+
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
11
|
+
import "../_util/hooks/index.js";
|
|
12
12
|
import Button from "../button/Button.js";
|
|
13
13
|
import Tooltip from "../tooltip/index.js";
|
|
14
14
|
import Badge from "../badge/index.js";
|
|
@@ -6,11 +6,11 @@ import { clsx } from "../../../clsx/dist/clsx.js";
|
|
|
6
6
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
7
7
|
import RefIcon from "../../../@ant-design/icons/es/icons/CloseOutlined.js";
|
|
8
8
|
import es_default from "../../../@rc-component/motion/es/index.js";
|
|
9
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
9
10
|
import "../_util/warning.js";
|
|
10
|
-
import
|
|
11
|
+
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
11
12
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
12
13
|
import "../_util/hooks/index.js";
|
|
13
|
-
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
14
14
|
import Space from "../space/index.js";
|
|
15
15
|
import Flex from "../flex/index.js";
|
|
16
16
|
import { GroupContext } from "./context.js";
|
|
@@ -3,10 +3,10 @@ import { clsx } from "../../../clsx/dist/clsx.js";
|
|
|
3
3
|
import _toConsumableArray from "../../../@babel/runtime/helpers/esm/toConsumableArray.js";
|
|
4
4
|
import CSSMotionList_default from "../../../@rc-component/motion/es/CSSMotionList.js";
|
|
5
5
|
import es_default from "../../../@rc-component/motion/es/index.js";
|
|
6
|
-
import isNonNullable from "../_util/
|
|
6
|
+
import { isNonNullable } from "../_util/is.js";
|
|
7
7
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
8
8
|
import initCollapseMotion from "../_util/motion.js";
|
|
9
|
-
import { FormItemPrefixContext } from "./context.js";
|
|
9
|
+
import { FormContext, FormItemPrefixContext } from "./context.js";
|
|
10
10
|
import useDebounce from "./hooks/useDebounce.js";
|
|
11
11
|
import style_default from "./style/index.js";
|
|
12
12
|
import * as React$1 from "../../../react/index.js";
|
|
@@ -21,6 +21,7 @@ function toErrorEntity(error, prefix, errorStatus, index = 0) {
|
|
|
21
21
|
}
|
|
22
22
|
const ErrorList = ({ help, helpStatus, errors = EMPTY_LIST, warnings = EMPTY_LIST, className: rootClassName, fieldId, onVisibleChanged }) => {
|
|
23
23
|
const { prefixCls } = React$1.useContext(FormItemPrefixContext);
|
|
24
|
+
const { classNames: contextClassNames, styles: contextStyles } = React$1.useContext(FormContext);
|
|
24
25
|
const baseClassName = `${prefixCls}-item-explain`;
|
|
25
26
|
const rootCls = useCSSVarCls(prefixCls);
|
|
26
27
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
@@ -57,8 +58,11 @@ const ErrorList = ({ help, helpStatus, errors = EMPTY_LIST, warnings = EMPTY_LIS
|
|
|
57
58
|
const { className: holderClassName, style: holderStyle } = holderProps;
|
|
58
59
|
return /*#__PURE__*/ React$1.createElement("div", {
|
|
59
60
|
...helpProps,
|
|
60
|
-
className: clsx(baseClassName, holderClassName, cssVarCls, rootCls, rootClassName, hashId),
|
|
61
|
-
style:
|
|
61
|
+
className: clsx(baseClassName, holderClassName, contextClassNames?.help, cssVarCls, rootCls, rootClassName, hashId),
|
|
62
|
+
style: {
|
|
63
|
+
...contextStyles?.help,
|
|
64
|
+
...holderStyle
|
|
65
|
+
}
|
|
62
66
|
}, /*#__PURE__*/ React$1.createElement(CSSMotionList_default, {
|
|
63
67
|
keys: filledKeyFullKeyList,
|
|
64
68
|
...initCollapseMotion(prefixCls),
|
|
@@ -68,8 +72,11 @@ const ErrorList = ({ help, helpStatus, errors = EMPTY_LIST, warnings = EMPTY_LIS
|
|
|
68
72
|
const { key, error, errorStatus, className: itemClassName, style: itemStyle } = itemProps;
|
|
69
73
|
return /*#__PURE__*/ React$1.createElement("div", {
|
|
70
74
|
key,
|
|
71
|
-
className: clsx(itemClassName, { [`${baseClassName}-${errorStatus}`]: errorStatus }),
|
|
72
|
-
style:
|
|
75
|
+
className: clsx(itemClassName, contextClassNames?.helpItem, { [`${baseClassName}-${errorStatus}`]: errorStatus }),
|
|
76
|
+
style: {
|
|
77
|
+
...contextStyles?.helpItem,
|
|
78
|
+
...itemStyle
|
|
79
|
+
}
|
|
73
80
|
}, error);
|
|
74
81
|
}));
|
|
75
82
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
4
|
-
import {
|
|
5
|
-
import "../_util/hooks/index.js";
|
|
4
|
+
import { isPlainObject } from "../_util/is.js";
|
|
5
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
6
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
7
7
|
import validateMessagesContext_default from "./validateMessagesContext.js";
|
|
8
8
|
import DisabledContext, { DisabledContextProvider } from "../config-provider/DisabledContext.js";
|
|
@@ -19,7 +19,7 @@ import * as React$1 from "../../../react/index.js";
|
|
|
19
19
|
//#region node_modules/antd/es/form/Form.js
|
|
20
20
|
const InternalForm = (props, ref) => {
|
|
21
21
|
const contextDisabled = React$1.useContext(DisabledContext);
|
|
22
|
-
const { getPrefixCls, direction, requiredMark: contextRequiredMark, colon: contextColon, scrollToFirstError: contextScrollToFirstError, className: contextClassName, style: contextStyle, styles: contextStyles, classNames: contextClassNames, tooltip: contextTooltip } = useComponentConfig("form");
|
|
22
|
+
const { getPrefixCls, direction, requiredMark: contextRequiredMark, colon: contextColon, scrollToFirstError: contextScrollToFirstError, className: contextClassName, style: contextStyle, styles: contextStyles, classNames: contextClassNames, tooltip: contextTooltip, labelAlign: contextLabelAlign } = useComponentConfig("form");
|
|
23
23
|
const { prefixCls: customizePrefixCls, className, rootClassName, size, disabled = contextDisabled, form, colon, labelAlign, labelWrap, labelCol, wrapperCol, layout = "horizontal", scrollToFirstError, requiredMark, onFinishFailed, name, style, feedbackIcons, variant, classNames, styles, tooltip, ...restFormProps } = props;
|
|
24
24
|
const mergedSize = useSize(size);
|
|
25
25
|
const contextValidateMessages = React$1.useContext(validateMessagesContext_default);
|
|
@@ -29,6 +29,7 @@ const InternalForm = (props, ref) => {
|
|
|
29
29
|
return true;
|
|
30
30
|
}, [requiredMark, contextRequiredMark]);
|
|
31
31
|
const mergedColon = colon ?? contextColon;
|
|
32
|
+
const mergedLabelAlign = labelAlign ?? contextLabelAlign;
|
|
32
33
|
const mergedTooltip = {
|
|
33
34
|
...contextTooltip,
|
|
34
35
|
...tooltip
|
|
@@ -56,7 +57,7 @@ const InternalForm = (props, ref) => {
|
|
|
56
57
|
__INTERNAL__.name = name;
|
|
57
58
|
const formContextValue = React$1.useMemo(() => ({
|
|
58
59
|
name,
|
|
59
|
-
labelAlign,
|
|
60
|
+
labelAlign: mergedLabelAlign,
|
|
60
61
|
labelCol,
|
|
61
62
|
labelWrap,
|
|
62
63
|
wrapperCol,
|
|
@@ -71,7 +72,7 @@ const InternalForm = (props, ref) => {
|
|
|
71
72
|
styles: mergedStyles
|
|
72
73
|
}), [
|
|
73
74
|
name,
|
|
74
|
-
|
|
75
|
+
mergedLabelAlign,
|
|
75
76
|
labelCol,
|
|
76
77
|
wrapperCol,
|
|
77
78
|
layout,
|
|
@@ -91,7 +92,7 @@ const InternalForm = (props, ref) => {
|
|
|
91
92
|
const scrollToField = (options, fieldName) => {
|
|
92
93
|
if (options) {
|
|
93
94
|
let defaultScrollToFirstError = { block: "nearest" };
|
|
94
|
-
if (
|
|
95
|
+
if (isPlainObject(options)) defaultScrollToFirstError = {
|
|
95
96
|
...defaultScrollToFirstError,
|
|
96
97
|
...options
|
|
97
98
|
};
|
|
@@ -4,7 +4,7 @@ import isVisible_default from "../../../../@rc-component/util/es/Dom/isVisible.j
|
|
|
4
4
|
import omit from "../../../../@rc-component/util/es/omit.js";
|
|
5
5
|
import "../../../../@rc-component/util/es/index.js";
|
|
6
6
|
import { clsx } from "../../../../clsx/dist/clsx.js";
|
|
7
|
-
import isNonNullable from "../../_util/
|
|
7
|
+
import { isNonNullable } from "../../_util/is.js";
|
|
8
8
|
import { FormContext, NoStyleItemContext } from "../context.js";
|
|
9
9
|
import { getStatus } from "../util.js";
|
|
10
10
|
import Row from "../../grid/row.js";
|
|
@@ -5,8 +5,8 @@ import "../../../../@rc-component/util/es/index.js";
|
|
|
5
5
|
import { clsx } from "../../../../clsx/dist/clsx.js";
|
|
6
6
|
import _toConsumableArray from "../../../../@babel/runtime/helpers/esm/toConsumableArray.js";
|
|
7
7
|
import { ConfigContext } from "../../config-provider/context.js";
|
|
8
|
+
import { isFunction, isNonNullable, isPlainObject } from "../../_util/is.js";
|
|
8
9
|
import { devUseWarning } from "../../_util/warning.js";
|
|
9
|
-
import isNonNullable from "../../_util/isNonNullable.js";
|
|
10
10
|
import useCSSVarCls from "../../config-provider/hooks/useCSSVarCls.js";
|
|
11
11
|
import { cloneElement as cloneElement$1 } from "../../_util/reactNode.js";
|
|
12
12
|
import "../../config-provider/index.js";
|
|
@@ -32,7 +32,7 @@ function isSimilarControl(a, b) {
|
|
|
32
32
|
return keysA.length === keysB.length && keysA.every((key) => {
|
|
33
33
|
const propValueA = a[key];
|
|
34
34
|
const propValueB = b[key];
|
|
35
|
-
return propValueA === propValueB ||
|
|
35
|
+
return propValueA === propValueB || isFunction(propValueA) || isFunction(propValueB);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
const MemoInput = /*#__PURE__*/ React$1.memo((props) => props.children, (prev, next) => isSimilarControl(prev.control, next.control) && prev.update === next.update && prev.childProps.length === next.childProps.length && prev.childProps.every((value, index) => value === next.childProps[index]));
|
|
@@ -51,7 +51,7 @@ function InternalFormItem(props) {
|
|
|
51
51
|
const { getPrefixCls } = React$1.useContext(ConfigContext);
|
|
52
52
|
const { name: formName } = React$1.useContext(FormContext);
|
|
53
53
|
const mergedChildren = useChildren(children);
|
|
54
|
-
const isRenderProps =
|
|
54
|
+
const isRenderProps = isFunction(mergedChildren);
|
|
55
55
|
const notifyParentMetaChange = React$1.useContext(NoStyleItemContext);
|
|
56
56
|
const { validateTrigger: contextValidateTrigger } = React$1.useContext(Context);
|
|
57
57
|
const mergedValidateTrigger = isNonNullable(validateTrigger) ? validateTrigger : contextValidateTrigger;
|
|
@@ -145,9 +145,9 @@ function InternalFormItem(props) {
|
|
|
145
145
|
}, (control, renderMeta, context) => {
|
|
146
146
|
const mergedName = toArray(name).length && renderMeta ? renderMeta.name : [];
|
|
147
147
|
const fieldId = getFieldId(mergedName, formName);
|
|
148
|
-
const isRequired = required !== void 0 ? required :
|
|
149
|
-
if (rule &&
|
|
150
|
-
if (
|
|
148
|
+
const isRequired = required !== void 0 ? required : rules?.some((rule) => {
|
|
149
|
+
if (isPlainObject(rule) && rule.required && !rule.warningOnly) return true;
|
|
150
|
+
if (isFunction(rule)) {
|
|
151
151
|
const ruleEntity = rule(context);
|
|
152
152
|
return ruleEntity?.required && !ruleEntity?.warningOnly;
|
|
153
153
|
}
|
|
@@ -5,6 +5,7 @@ import set from "../../../@rc-component/util/es/utils/set.js";
|
|
|
5
5
|
import "../../../@rc-component/util/es/index.js";
|
|
6
6
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
7
7
|
import _toConsumableArray from "../../../@babel/runtime/helpers/esm/toConsumableArray.js";
|
|
8
|
+
import { isPlainObject } from "../_util/is.js";
|
|
8
9
|
import { FormContext, FormItemPrefixContext } from "./context.js";
|
|
9
10
|
import { responsiveArrayReversed } from "../_util/responsiveObserver.js";
|
|
10
11
|
import Col from "../grid/col.js";
|
|
@@ -23,9 +24,9 @@ const FormItemInput = (props) => {
|
|
|
23
24
|
if (label === null && !labelCol && !wrapperCol && formContext.labelCol) [void 0].concat(_toConsumableArray(responsiveArrayReversed)).forEach((size) => {
|
|
24
25
|
const _size = size ? [size] : [];
|
|
25
26
|
const formLabel = get(formContext.labelCol, _size);
|
|
26
|
-
const formLabelObj =
|
|
27
|
+
const formLabelObj = isPlainObject(formLabel) ? formLabel : {};
|
|
27
28
|
const wrapper = get(mergedWrapper, _size);
|
|
28
|
-
const wrapperObj =
|
|
29
|
+
const wrapperObj = isPlainObject(wrapper) ? wrapper : {};
|
|
29
30
|
if ("span" in formLabelObj && !("offset" in wrapperObj) && formLabelObj.span < GRID_MAX) mergedWrapper = set(mergedWrapper, [].concat(_size, ["offset"]), formLabelObj.span);
|
|
30
31
|
});
|
|
31
32
|
return mergedWrapper;
|
|
@@ -68,7 +69,8 @@ const FormItemInput = (props) => {
|
|
|
68
69
|
if (fieldId) extraProps.id = `${fieldId}_extra`;
|
|
69
70
|
const extraDom = extra ? /*#__PURE__*/ React$1.createElement("div", {
|
|
70
71
|
...extraProps,
|
|
71
|
-
className: `${baseClassName}-extra`,
|
|
72
|
+
className: clsx(`${baseClassName}-extra`, contextClassNames?.extra),
|
|
73
|
+
style: contextStyles?.extra,
|
|
72
74
|
ref: extraRef
|
|
73
75
|
}, extra) : null;
|
|
74
76
|
const additionalDom = errorListDom || extraDom ? /*#__PURE__*/ React$1.createElement("div", {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
|
+
import { isFunction } from "../_util/is.js";
|
|
3
4
|
import localeValues from "../locale/en_US.js";
|
|
4
5
|
import useLocale from "../locale/useLocale.js";
|
|
5
6
|
import "../locale/index.js";
|
|
@@ -33,7 +34,7 @@ const FormItemLabel = ({ prefixCls, label, htmlFor, labelCol, labelAlign, colon,
|
|
|
33
34
|
labelChildren = /*#__PURE__*/ React$1.createElement(React$1.Fragment, null, labelChildren, tooltipNode);
|
|
34
35
|
}
|
|
35
36
|
const isOptionalMark = requiredMark === "optional";
|
|
36
|
-
const isRenderMark =
|
|
37
|
+
const isRenderMark = isFunction(requiredMark);
|
|
37
38
|
const hideRequiredMark = requiredMark === false;
|
|
38
39
|
if (isRenderMark) labelChildren = requiredMark(labelChildren, { required: !!required });
|
|
39
40
|
else if (isOptionalMark && !required) labelChildren = /*#__PURE__*/ React$1.createElement(React$1.Fragment, null, labelChildren, /*#__PURE__*/ React$1.createElement("span", {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import toArray from "../../../../@rc-component/util/es/Children/toArray.js";
|
|
2
2
|
import "../../../../@rc-component/util/es/index.js";
|
|
3
|
+
import { isFunction } from "../../_util/is.js";
|
|
3
4
|
//#region node_modules/antd/es/form/hooks/useChildren.js
|
|
4
|
-
|
|
5
|
-
if (
|
|
5
|
+
const useChildren = (children) => {
|
|
6
|
+
if (isFunction(children)) return children;
|
|
6
7
|
const childList = toArray(children);
|
|
7
8
|
return childList.length <= 1 ? childList[0] : childList;
|
|
8
|
-
}
|
|
9
|
+
};
|
|
9
10
|
//#endregion
|
|
10
11
|
export { useChildren as default };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { getDOM } from "../../../../@rc-component/util/es/Dom/findDOMNode.js";
|
|
2
|
+
import "../../../../@rc-component/util/es/index.js";
|
|
3
|
+
import { isFunction } from "../../_util/is.js";
|
|
2
4
|
import e from "../../../../scroll-into-view-if-needed/dist/index.js";
|
|
3
5
|
import useForm$1 from "../../../../@rc-component/form/es/hooks/useForm.js";
|
|
4
6
|
import "../../../../@rc-component/form/es/index.js";
|
|
@@ -39,7 +41,7 @@ function useForm(form) {
|
|
|
39
41
|
},
|
|
40
42
|
focusField: (name) => {
|
|
41
43
|
const itemRef = wrapForm.getFieldInstance(name);
|
|
42
|
-
if (
|
|
44
|
+
if (isFunction(itemRef?.focus)) itemRef.focus();
|
|
43
45
|
else getFieldDOMNode(name, wrapForm)?.focus?.();
|
|
44
46
|
},
|
|
45
47
|
getFieldInstance: (name) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import wrapperRaf from "../../../../@rc-component/util/es/raf.js";
|
|
2
|
+
import "../../../../@rc-component/util/es/index.js";
|
|
2
3
|
import * as React$1 from "../../../../react/index.js";
|
|
3
4
|
//#region node_modules/antd/es/form/hooks/useFrameState.js
|
|
4
5
|
function useFrameState(defaultValue) {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { composeRef, getNodeRef } from "../../../../@rc-component/util/es/ref.js";
|
|
2
|
+
import "../../../../@rc-component/util/es/index.js";
|
|
3
|
+
import { isPlainObject } from "../../_util/is.js";
|
|
2
4
|
import { FormContext } from "../context.js";
|
|
3
5
|
import * as React$1 from "../../../../react/index.js";
|
|
4
6
|
//#region node_modules/antd/es/form/hooks/useItemRef.js
|
|
5
|
-
|
|
7
|
+
const useItemRef = () => {
|
|
6
8
|
const { itemRef } = React$1.useContext(FormContext);
|
|
7
9
|
const cacheRef = React$1.useRef({});
|
|
8
|
-
|
|
9
|
-
const childrenRef = children &&
|
|
10
|
+
const getRef = (name, children) => {
|
|
11
|
+
const childrenRef = children && isPlainObject(children) && getNodeRef(children);
|
|
10
12
|
const nameStr = name.join("_");
|
|
11
13
|
if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) {
|
|
12
14
|
cacheRef.current.name = nameStr;
|
|
@@ -14,8 +16,8 @@ function useItemRef() {
|
|
|
14
16
|
cacheRef.current.ref = composeRef(itemRef(name), childrenRef);
|
|
15
17
|
}
|
|
16
18
|
return cacheRef.current.ref;
|
|
17
|
-
}
|
|
19
|
+
};
|
|
18
20
|
return getRef;
|
|
19
|
-
}
|
|
21
|
+
};
|
|
20
22
|
//#endregion
|
|
21
23
|
export { useItemRef as default };
|
|
@@ -29,9 +29,7 @@ const resetForm = (token) => ({
|
|
|
29
29
|
width: "100%"
|
|
30
30
|
},
|
|
31
31
|
"select[multiple], select[size]": { height: "auto" },
|
|
32
|
-
|
|
33
|
-
input[type='radio']:focus,
|
|
34
|
-
input[type='checkbox']:focus`]: {
|
|
32
|
+
"input[type='file']:focus, input[type='radio']:focus, input[type='checkbox']:focus": {
|
|
35
33
|
outline: 0,
|
|
36
34
|
boxShadow: `0 0 0 ${unit(token.controlOutlineWidth)} ${token.controlOutline}`
|
|
37
35
|
},
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { ConfigContext } from "../config-provider/context.js";
|
|
4
4
|
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
5
|
+
import { isNonNullable, isNumber, isPlainObject } from "../_util/is.js";
|
|
5
6
|
import "../config-provider/index.js";
|
|
6
7
|
import { useColStyle } from "./style/index.js";
|
|
7
8
|
import { responsiveArrayReversed } from "../_util/responsiveObserver.js";
|
|
8
9
|
import RowContext from "./RowContext.js";
|
|
9
10
|
import * as React$1 from "../../../react/index.js";
|
|
10
11
|
//#region node_modules/antd/es/grid/col.js
|
|
11
|
-
const isNumber = (value) => {
|
|
12
|
-
return typeof value === "number" && !Number.isNaN(value);
|
|
13
|
-
};
|
|
14
12
|
function parseFlex(flex) {
|
|
15
13
|
if (flex === "auto") return "1 1 auto";
|
|
16
14
|
if (isNumber(flex)) return `${flex} ${flex} auto`;
|
|
@@ -30,12 +28,12 @@ const Col = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
|
30
28
|
responsiveArrayReversed.forEach((size) => {
|
|
31
29
|
let sizeProps = {};
|
|
32
30
|
const propSize = props[size];
|
|
33
|
-
if (
|
|
34
|
-
else if (
|
|
31
|
+
if (isNumber(propSize)) sizeProps.span = propSize;
|
|
32
|
+
else if (isPlainObject(propSize)) sizeProps = propSize || {};
|
|
35
33
|
delete others[size];
|
|
36
34
|
sizeClassObj = {
|
|
37
35
|
...sizeClassObj,
|
|
38
|
-
[`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span
|
|
36
|
+
[`${prefixCls}-${size}-${sizeProps.span}`]: isNonNullable(sizeProps.span),
|
|
39
37
|
[`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,
|
|
40
38
|
[`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,
|
|
41
39
|
[`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,
|
|
@@ -55,7 +53,7 @@ const Col = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
|
55
53
|
[`${prefixCls}-pull-${pull}`]: pull
|
|
56
54
|
}, className, sizeClassObj, hashId, cssVarCls);
|
|
57
55
|
const mergedStyle = {};
|
|
58
|
-
if (gutter?.[0]) mergedStyle.paddingInline =
|
|
56
|
+
if (gutter?.[0]) mergedStyle.paddingInline = isNumber(gutter[0]) ? `${gutter[0] / 2}px` : `calc(${gutter[0]} / 2)`;
|
|
59
57
|
if (flex) {
|
|
60
58
|
mergedStyle.flex = parseFlex(flex);
|
|
61
59
|
if (wrap === false && !mergedStyle.minWidth) mergedStyle.minWidth = 0;
|
|
@@ -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 { useForceUpdate } from "../../_util/hooks/useForceUpdate.js";
|
|
4
5
|
import "../../_util/hooks/index.js";
|
|
5
6
|
import useResponsiveObserver from "../../_util/responsiveObserver.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isPlainObject } from "../../_util/is.js";
|
|
1
2
|
import { responsiveArray } from "../../_util/responsiveObserver.js";
|
|
2
3
|
//#region node_modules/antd/es/grid/hooks/useGutter.js
|
|
3
4
|
function useGutter(gutter, screens) {
|
|
@@ -13,7 +14,7 @@ function useGutter(gutter, screens) {
|
|
|
13
14
|
xxxl: true
|
|
14
15
|
};
|
|
15
16
|
normalizedGutter.forEach((g, index) => {
|
|
16
|
-
if (
|
|
17
|
+
if (isPlainObject(g)) for (let i = 0; i < responsiveArray.length; i++) {
|
|
17
18
|
const breakpoint = responsiveArray[i];
|
|
18
19
|
if (mergedScreens[breakpoint] && g[breakpoint] !== void 0) {
|
|
19
20
|
results[index] = g[breakpoint];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { ConfigContext } from "../config-provider/context.js";
|
|
4
|
+
import { isNumber, isPlainObject, isString } from "../_util/is.js";
|
|
4
5
|
import "../config-provider/index.js";
|
|
5
6
|
import { useRowStyle } from "./style/index.js";
|
|
6
7
|
import { responsiveArray } from "../_util/responsiveObserver.js";
|
|
@@ -8,11 +9,11 @@ import useBreakpoint from "./hooks/useBreakpoint.js";
|
|
|
8
9
|
import RowContext from "./RowContext.js";
|
|
9
10
|
import useGutter from "./hooks/useGutter.js";
|
|
10
11
|
import * as React$1 from "../../../react/index.js";
|
|
11
|
-
|
|
12
|
-
const [prop, setProp] = React$1.useState(
|
|
12
|
+
const useMergedPropByScreen = (oriProp, screen) => {
|
|
13
|
+
const [prop, setProp] = React$1.useState(() => isString(oriProp) ? oriProp : "");
|
|
13
14
|
const calcMergedAlignOrJustify = () => {
|
|
14
|
-
if (
|
|
15
|
-
if (
|
|
15
|
+
if (isString(oriProp)) setProp(oriProp);
|
|
16
|
+
if (!isPlainObject(oriProp)) return;
|
|
16
17
|
for (let i = 0; i < responsiveArray.length; i++) {
|
|
17
18
|
const breakpoint = responsiveArray[i];
|
|
18
19
|
if (!screen || !screen[breakpoint]) continue;
|
|
@@ -27,7 +28,7 @@ function useMergedPropByScreen(oriProp, screen) {
|
|
|
27
28
|
calcMergedAlignOrJustify();
|
|
28
29
|
}, [JSON.stringify(oriProp), screen]);
|
|
29
30
|
return prop;
|
|
30
|
-
}
|
|
31
|
+
};
|
|
31
32
|
const Row = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
32
33
|
const { prefixCls: customizePrefixCls, justify, align, className, style, children, gutter = 0, wrap, ...others } = props;
|
|
33
34
|
const { getPrefixCls, direction } = React$1.useContext(ConfigContext);
|
|
@@ -44,7 +45,7 @@ const Row = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
|
44
45
|
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
45
46
|
}, className, hashId, cssVarCls);
|
|
46
47
|
const rowStyle = {};
|
|
47
|
-
if (gutters?.[0]) rowStyle.marginInline =
|
|
48
|
+
if (gutters?.[0]) rowStyle.marginInline = isNumber(gutters[0]) ? `${gutters[0] / -2}px` : `calc(${gutters[0]} / -2)`;
|
|
48
49
|
const [gutterH, gutterV] = gutters;
|
|
49
50
|
rowStyle.rowGap = gutterV;
|
|
50
51
|
const rowContext = React$1.useMemo(() => ({
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
4
4
|
import RefIcon from "../../../@ant-design/icons/es/icons/CloseOutlined.js";
|
|
5
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
6
|
-
import "../_util/hooks/index.js";
|
|
5
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
7
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
8
7
|
import RefIcon$1 from "../../../@ant-design/icons/es/icons/RightOutlined.js";
|
|
9
8
|
import RefIcon$2 from "../../../@ant-design/icons/es/icons/LeftOutlined.js";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
|
+
import { isNumber } from "../_util/is.js";
|
|
4
|
+
import * as React$1 from "../../../react/index.js";
|
|
5
|
+
//#region node_modules/antd/es/image/Progress.js
|
|
6
|
+
const VISUALLY_HIDDEN_STYLE = {
|
|
7
|
+
position: "absolute",
|
|
8
|
+
width: 1,
|
|
9
|
+
height: 1,
|
|
10
|
+
padding: 0,
|
|
11
|
+
margin: -1,
|
|
12
|
+
overflow: "hidden",
|
|
13
|
+
clip: "rect(0, 0, 0, 0)",
|
|
14
|
+
whiteSpace: "nowrap",
|
|
15
|
+
border: 0
|
|
16
|
+
};
|
|
17
|
+
const Progress = (props) => {
|
|
18
|
+
const { prefixCls, percent, render: progressRender, classNames: progressClassNames, styles: progressStyles, rootClassName, rootStyle, width, height } = props;
|
|
19
|
+
const hasPercent = isNumber(percent) && Number.isFinite(percent);
|
|
20
|
+
const percentValue = hasPercent ? Math.max(0, Math.min(100, Math.round(percent))) : 0;
|
|
21
|
+
const ariaProps = hasPercent ? {
|
|
22
|
+
role: "progressbar",
|
|
23
|
+
"aria-valuemin": 0,
|
|
24
|
+
"aria-valuemax": 100,
|
|
25
|
+
"aria-valuenow": percentValue,
|
|
26
|
+
"aria-label": `${percentValue}%`
|
|
27
|
+
} : { "aria-busy": true };
|
|
28
|
+
const progressBar = hasPercent ? /*#__PURE__*/ React$1.createElement("div", {
|
|
29
|
+
className: clsx(`${prefixCls}-progress-rail`, progressClassNames?.rail),
|
|
30
|
+
style: {
|
|
31
|
+
...progressStyles?.rail,
|
|
32
|
+
"--progress-percent": `${percentValue}%`
|
|
33
|
+
}
|
|
34
|
+
}) : null;
|
|
35
|
+
const progressContent = progressRender ? progressRender(progressBar, percentValue) : /*#__PURE__*/ React$1.createElement(React$1.Fragment, null, progressBar, hasPercent && /*#__PURE__*/ React$1.createElement("div", {
|
|
36
|
+
className: clsx(`${prefixCls}-progress-indicator`, progressClassNames?.indicator),
|
|
37
|
+
style: progressStyles?.indicator
|
|
38
|
+
}, `${percentValue}%`));
|
|
39
|
+
return /*#__PURE__*/ React$1.createElement("div", {
|
|
40
|
+
className: clsx(prefixCls, `${prefixCls}-progress-wrapper`, progressClassNames?.root, rootClassName),
|
|
41
|
+
style: {
|
|
42
|
+
width,
|
|
43
|
+
height,
|
|
44
|
+
...rootStyle,
|
|
45
|
+
...progressStyles?.root
|
|
46
|
+
},
|
|
47
|
+
...ariaProps
|
|
48
|
+
}, !hasPercent && /*#__PURE__*/ React$1.createElement("span", {
|
|
49
|
+
role: "status",
|
|
50
|
+
"aria-live": "polite",
|
|
51
|
+
style: VISUALLY_HIDDEN_STYLE
|
|
52
|
+
}, "Loading"), /*#__PURE__*/ React$1.createElement("div", { className: `${prefixCls}-progress-ink-1` }), /*#__PURE__*/ React$1.createElement("div", { className: `${prefixCls}-progress-ink-2` }), /*#__PURE__*/ React$1.createElement("div", {
|
|
53
|
+
className: clsx(`${prefixCls}-progress-content`, progressClassNames?.content),
|
|
54
|
+
style: progressStyles?.content
|
|
55
|
+
}, progressContent));
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { Progress as default };
|