useblocks 1.1.85-dev.9 → 1.1.102
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/CHANGELOG.md +91 -0
- package/README.md +74 -41
- package/compat-globals.js +1 -1
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/css/sandbox.css +35 -1
- package/iframe/{iframe.bb6d921f.html → iframe-eblock.1c4e77a0.html} +2 -2
- package/iframe/{iframe-eblock.bb6d921f.html → iframe.1c4e77a0.html} +2 -2
- package/iframe/js/discussHandlers.Xh4-JUcT.js +88 -0
- package/iframe/js/{iframe-eblock.body.js → iframe-eblock.body.1c4e77a0.js} +1 -1
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/iframe.body.1c4e77a0.js +319 -0
- package/iframe/js/iframe.js +2 -2
- package/package.json +8 -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/11b821ed.js +1 -0
- package/static/core/160bf060.js +104 -0
- package/static/core/1b68c0f0.js +1 -0
- package/static/core/1ed86ed3.js +1 -0
- package/static/core/26cc947d.js +1 -0
- package/static/core/{67f78cad.js → 3ec42945.js} +7 -7
- package/static/core/3fb172c7.js +1 -0
- package/static/core/448f03f8.js +1 -0
- package/static/core/44d2c046.js +1 -0
- package/static/core/{79749848.js → 4c8d0155.js} +5 -5
- package/static/core/53103851.js +4 -0
- package/static/core/{a767f327.js → 5d849eef.js} +1 -1
- package/static/core/5e7c221f.js +28 -0
- package/static/core/64be048b.js +27 -0
- package/static/core/{de07cade.js → 6a671446.js} +3 -3
- package/static/core/{db82c42b.js → 756874c6.js} +1 -1
- package/static/core/{4c3f5897.js → 847338a8.js} +2 -2
- package/static/core/91e07171.js +2 -0
- package/static/core/a2e57e5f.js +1 -0
- package/static/core/{a5996860.js → a6303cb2.js} +1 -1
- package/static/core/{9f137764.js → a98b6879.js} +1 -1
- package/static/core/ae22b7f6.js +93 -0
- package/static/core/{44a83e21.js → b653f9c5.js} +1 -1
- package/static/core/{cb46784e.js → b7aa9fec.js} +1 -1
- package/static/core/{d8bbcfbd.js → ca4dad9b.js} +2 -2
- package/static/core/{6faa23a1.js → cc180859.js} +1 -1
- package/static/core/d7666ad0.js +291 -0
- package/static/core/dcc37768.js +1 -0
- package/static/core/edf450a1.js +7 -0
- package/static/core/f1ee2bef.js +1 -0
- package/static/core/{1e3078da.js → f323e60e.js} +1 -1
- package/static/core/{175b5b0f.js → ff7d14e8.js} +1 -1
- package/static/esm/2490dab8.js +1 -0
- package/static/esm/668ee399.js +1 -0
- package/static/esm/971f1b2c.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.2paN090q.js +1 -0
- package/static/umd-runtime/{ui-kit-icons.js → ui-kit-icons.DqlZwgBU.js} +1 -1
- package/static/umd-runtime/{ui-kit.js → ui-kit.CoVNet0I.js} +2 -2
- package/static/umd-runtime/{DP3QTW77.js → uk9LyZos.js} +1 -1
- package/ui-kit/icons.js +2 -0
- package/useblocks-core.1c4e77a0.js +859 -0
- package/useblocks-esm.js +11 -10
- package/{useblocks-po.bb6d921f.js → useblocks-po.1c4e77a0.js} +1 -1
- package/useblocks.d.ts +162 -28
- 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/es/components/General/EmIcons/deprecationNotice.js +1 -1
- package/vendor/useblocks-ui-kit/package.json +1 -1
- package/vite/index.cjs +2 -2
- package/vite/index.js +2 -2
- package/iframe/js/discussHandlers.ozU2Hn_l.js +0 -87
- package/iframe/js/iframe.body.js +0 -319
- package/static/core/1c535081.js +0 -1
- package/static/core/1cee0d36.js +0 -1
- package/static/core/4fbdd8b6.js +0 -2
- package/static/core/55a38638.js +0 -93
- package/static/core/605c665e.js +0 -28
- package/static/core/68cbe23d.js +0 -1
- package/static/core/89431649.js +0 -7
- package/static/core/8b821a61.js +0 -1
- package/static/core/9718977a.js +0 -1
- package/static/core/b7e9202e.js +0 -27
- package/static/core/b877f7b4.js +0 -1
- package/static/core/baded0c1.js +0 -1
- package/static/core/c6cc104d.js +0 -4
- package/static/core/d70aac44.js +0 -291
- package/static/core/e0d71533.js +0 -100
- package/static/core/fb57f60b.js +0 -1
- package/static/core/fe756e4d.js +0 -1
- 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/static/umd-runtime/runtime.js +0 -1
- package/useblocks-core.bb6d921f.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/static/monaco/{index.js → index.CO7s5UdA.js} +0 -0
- /package/static/umd-runtime/{delivery-libs.js → delivery-libs.3Svr0avG.js} +0 -0
|
@@ -7,7 +7,7 @@ import React from "../../../../react/index.js";
|
|
|
7
7
|
//#region node_modules/antd/es/image/hooks/useMergedPreviewConfig.js
|
|
8
8
|
const useMergedPreviewConfig = (previewConfig, contextPreviewConfig, prefixCls, mergedRootClassName, getContextPopupContainer, icons, defaultCover) => {
|
|
9
9
|
const [zIndex] = useZIndex("ImagePreview", previewConfig?.zIndex);
|
|
10
|
-
const [mergedPreviewMask, blurClassName] = useMergedMask(previewConfig?.mask, contextPreviewConfig?.mask, `${prefixCls}-preview`);
|
|
10
|
+
const [mergedPreviewMask, blurClassName, mergedMaskClosable] = useMergedMask(previewConfig?.mask, contextPreviewConfig?.mask, `${prefixCls}-preview`);
|
|
11
11
|
return React.useMemo(() => {
|
|
12
12
|
if (!previewConfig) return previewConfig;
|
|
13
13
|
const { cover, getContainer, closeIcon, rootClassName: previewRootClassName } = previewConfig;
|
|
@@ -22,6 +22,7 @@ const useMergedPreviewConfig = (previewConfig, contextPreviewConfig, prefixCls,
|
|
|
22
22
|
closeIcon: closeIcon ?? contextCloseIcon,
|
|
23
23
|
rootClassName: clsx(mergedRootClassName, previewRootClassName),
|
|
24
24
|
mask: mergedPreviewMask,
|
|
25
|
+
maskClosable: mergedMaskClosable,
|
|
25
26
|
blurClassName: blurClassName.mask
|
|
26
27
|
};
|
|
27
28
|
}, [
|
|
@@ -34,6 +35,7 @@ const useMergedPreviewConfig = (previewConfig, contextPreviewConfig, prefixCls,
|
|
|
34
35
|
icons,
|
|
35
36
|
zIndex,
|
|
36
37
|
mergedPreviewMask,
|
|
38
|
+
mergedMaskClosable,
|
|
37
39
|
blurClassName
|
|
38
40
|
]);
|
|
39
41
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isPlainObject } from "../../_util/is.js";
|
|
2
|
+
import { isValidElement, useMemo } from "../../../../react/index.js";
|
|
3
|
+
//#region node_modules/antd/es/image/hooks/usePlaceholderConfig.js
|
|
4
|
+
function isPlaceholderConfig(placeholder) {
|
|
5
|
+
return isPlainObject(placeholder) && !/*#__PURE__*/ isValidElement(placeholder);
|
|
6
|
+
}
|
|
7
|
+
function usePlaceholderConfig(placeholder) {
|
|
8
|
+
return useMemo(() => {
|
|
9
|
+
if (!placeholder || !isPlaceholderConfig(placeholder)) return {};
|
|
10
|
+
if (typeof placeholder.progress === "boolean") return { progressConfig: placeholder.progress ? {} : void 0 };
|
|
11
|
+
return { progressConfig: placeholder.progress };
|
|
12
|
+
}, [placeholder]);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { usePlaceholderConfig as default, isPlaceholderConfig };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { isPlainObject } from "../../_util/is.js";
|
|
1
2
|
import "../../_util/warning.js";
|
|
2
3
|
import { isValidElement, useMemo } from "../../../../react/index.js";
|
|
3
4
|
//#region node_modules/antd/es/image/hooks/usePreviewConfig.js
|
|
4
5
|
function normalizeMask(mask) {
|
|
5
6
|
if (/*#__PURE__*/ isValidElement(mask)) return [mask, void 0];
|
|
6
|
-
if (typeof mask === "boolean" || mask
|
|
7
|
+
if (typeof mask === "boolean" || isPlainObject(mask)) return [void 0, mask];
|
|
7
8
|
return [void 0, void 0];
|
|
8
9
|
}
|
|
9
10
|
function usePreviewConfig(preview) {
|
|
10
11
|
const rawPreviewConfig = useMemo(() => {
|
|
11
12
|
if (typeof preview === "boolean") return preview ? {} : null;
|
|
12
|
-
return preview
|
|
13
|
+
return isPlainObject(preview) ? preview : {};
|
|
13
14
|
}, [preview]);
|
|
14
15
|
return useMemo(() => {
|
|
15
16
|
if (!rawPreviewConfig) return [
|
|
@@ -1,19 +1,20 @@
|
|
|
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
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
6
|
-
import "../_util/hooks/index.js";
|
|
7
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
8
7
|
import es_default from "../../../@rc-component/image/es/index.js";
|
|
9
8
|
import useMergedPreviewConfig from "./hooks/useMergedPreviewConfig.js";
|
|
9
|
+
import usePlaceholderConfig, { isPlaceholderConfig } from "./hooks/usePlaceholderConfig.js";
|
|
10
10
|
import usePreviewConfig from "./hooks/usePreviewConfig.js";
|
|
11
11
|
import style_default from "./style/index.js";
|
|
12
12
|
import InternalPreviewGroup, { icons } from "./PreviewGroup.js";
|
|
13
|
+
import Progress from "./Progress.js";
|
|
13
14
|
import * as React$1 from "../../../react/index.js";
|
|
14
15
|
//#region node_modules/antd/es/image/index.js
|
|
15
16
|
const Image = (props) => {
|
|
16
|
-
const { prefixCls: customizePrefixCls, preview, className, rootClassName, style, styles, classNames, wrapperStyle, fallback, ...otherProps } = props;
|
|
17
|
+
const { prefixCls: customizePrefixCls, preview, className, rootClassName, style, styles, classNames, wrapperStyle, fallback, placeholder, ...otherProps } = props;
|
|
17
18
|
const { getPrefixCls, getPopupContainer: getContextPopupContainer, className: contextClassName, style: contextStyle, preview: contextPreview, styles: contextStyles, classNames: contextClassNames, fallback: contextFallback } = useComponentConfig("image");
|
|
18
19
|
const prefixCls = getPrefixCls("image", customizePrefixCls);
|
|
19
20
|
const rootCls = useCSSVarCls(prefixCls);
|
|
@@ -57,12 +58,38 @@ const Image = (props) => {
|
|
|
57
58
|
contextStyles,
|
|
58
59
|
{ root: wrapperStyle },
|
|
59
60
|
styles
|
|
60
|
-
], { props: mergedProps }, {
|
|
61
|
+
], { props: mergedProps }, {
|
|
62
|
+
popup: { _default: "root" },
|
|
63
|
+
placeholder: {}
|
|
64
|
+
});
|
|
61
65
|
const mergedStyle = {
|
|
62
66
|
...contextStyle,
|
|
63
67
|
...style
|
|
64
68
|
};
|
|
65
69
|
const mergedFallback = fallback ?? contextFallback;
|
|
70
|
+
const { progressConfig } = usePlaceholderConfig(placeholder);
|
|
71
|
+
const showProgressOverlay = progressConfig !== void 0;
|
|
72
|
+
const { percent, render: progressRender } = progressConfig || {};
|
|
73
|
+
const progressClassNames = mergedClassNames?.placeholder?.progress;
|
|
74
|
+
const progressStyles = mergedStyles?.placeholder?.progress;
|
|
75
|
+
const { width, height, src, ...restOtherProps } = otherProps;
|
|
76
|
+
const placeholderNode = isPlaceholderConfig(placeholder) ? void 0 : placeholder;
|
|
77
|
+
const shouldRenderPlaceholderOverlay = placeholderNode && !src;
|
|
78
|
+
const mergedProgressRender = shouldRenderPlaceholderOverlay ? (_progress) => placeholderNode : progressRender;
|
|
79
|
+
if (showProgressOverlay || shouldRenderPlaceholderOverlay) return /*#__PURE__*/ React$1.createElement(Progress, {
|
|
80
|
+
prefixCls,
|
|
81
|
+
percent,
|
|
82
|
+
render: mergedProgressRender,
|
|
83
|
+
classNames: progressClassNames,
|
|
84
|
+
styles: progressStyles,
|
|
85
|
+
rootClassName: clsx(mergedRootClassName, mergedClassName),
|
|
86
|
+
rootStyle: {
|
|
87
|
+
...mergedStyle,
|
|
88
|
+
...mergedStyles?.root
|
|
89
|
+
},
|
|
90
|
+
width,
|
|
91
|
+
height
|
|
92
|
+
});
|
|
66
93
|
return /*#__PURE__*/ React$1.createElement(es_default, {
|
|
67
94
|
prefixCls,
|
|
68
95
|
preview: mergedPreviewConfig || false,
|
|
@@ -70,7 +97,11 @@ const Image = (props) => {
|
|
|
70
97
|
className: mergedClassName,
|
|
71
98
|
style: mergedStyle,
|
|
72
99
|
fallback: mergedFallback,
|
|
73
|
-
|
|
100
|
+
placeholder: placeholderNode,
|
|
101
|
+
width,
|
|
102
|
+
height,
|
|
103
|
+
src,
|
|
104
|
+
...restOtherProps,
|
|
74
105
|
classNames: mergedClassNames,
|
|
75
106
|
styles: mergedStyles
|
|
76
107
|
});
|
|
@@ -3,8 +3,10 @@ import "../../../../@ant-design/cssinjs/es/index.js";
|
|
|
3
3
|
import { merge } from "../../../../@ant-design/cssinjs-utils/es/util/statistic.js";
|
|
4
4
|
import { FastColor } from "../../../../@ant-design/fast-color/es/FastColor.js";
|
|
5
5
|
import "../../../../@ant-design/fast-color/es/index.js";
|
|
6
|
+
import { genFocusOutline, genFocusStyle } from "../../style/index.js";
|
|
6
7
|
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
7
8
|
import "../../theme/internal.js";
|
|
9
|
+
import { inkFlow1, inkFlow2, inkFlow3, progressActive } from "./progressAnimation.js";
|
|
8
10
|
//#region node_modules/antd/es/image/style/index.js
|
|
9
11
|
const genBoxStyle = (position) => ({
|
|
10
12
|
position: position || "absolute",
|
|
@@ -25,7 +27,7 @@ const genImageCoverStyle = (token) => {
|
|
|
25
27
|
opacity: 0,
|
|
26
28
|
transition: `opacity ${motionDurationSlow}`
|
|
27
29
|
},
|
|
28
|
-
"&:hover": { [`${componentCls}-cover`]: { opacity: 1 } },
|
|
30
|
+
"&:hover, &:focus-visible": { [`${componentCls}-cover`]: { opacity: 1 } },
|
|
29
31
|
[`${componentCls}-cover-top`]: {
|
|
30
32
|
inset: "0 0 auto 0",
|
|
31
33
|
justifyContent: "center"
|
|
@@ -36,6 +38,109 @@ const genImageCoverStyle = (token) => {
|
|
|
36
38
|
}
|
|
37
39
|
} };
|
|
38
40
|
};
|
|
41
|
+
const genImageProgressStyle = (token) => {
|
|
42
|
+
const { componentCls, motionDurationMid, motionEaseInOut, progressAnimationDuration } = token;
|
|
43
|
+
const inkBaseStyle = {
|
|
44
|
+
position: "absolute",
|
|
45
|
+
width: "150%",
|
|
46
|
+
height: "150%",
|
|
47
|
+
left: "-25%",
|
|
48
|
+
top: "-25%",
|
|
49
|
+
animationTimingFunction: motionEaseInOut,
|
|
50
|
+
animationIterationCount: "infinite",
|
|
51
|
+
pointerEvents: "none",
|
|
52
|
+
willChange: "transform, opacity"
|
|
53
|
+
};
|
|
54
|
+
return { [`${componentCls}-progress-wrapper`]: {
|
|
55
|
+
position: "relative",
|
|
56
|
+
display: "inline-block",
|
|
57
|
+
overflow: "hidden",
|
|
58
|
+
borderRadius: "inherit",
|
|
59
|
+
backgroundColor: token.colorBgBase,
|
|
60
|
+
backdropFilter: "blur(8px)",
|
|
61
|
+
[`${componentCls}-progress-ink-1`]: {
|
|
62
|
+
...inkBaseStyle,
|
|
63
|
+
background: `radial-gradient(ellipse 65% 55% at 25% 30%, rgba(100, 180, 255, 0.98) 0%, transparent 55%)`,
|
|
64
|
+
animationName: inkFlow1,
|
|
65
|
+
animationDuration: progressAnimationDuration,
|
|
66
|
+
filter: "blur(40px)",
|
|
67
|
+
"&::before": {
|
|
68
|
+
content: "\"\"",
|
|
69
|
+
...inkBaseStyle,
|
|
70
|
+
background: `radial-gradient(ellipse 60% 65% at 75% 45%, rgba(180, 140, 255, 0.95) 0%, transparent 50%)`,
|
|
71
|
+
animationName: inkFlow2,
|
|
72
|
+
animationDuration: `calc(${progressAnimationDuration} + 2s)`,
|
|
73
|
+
animationDelay: "-1s",
|
|
74
|
+
filter: "blur(45px)"
|
|
75
|
+
},
|
|
76
|
+
"&::after": {
|
|
77
|
+
content: "\"\"",
|
|
78
|
+
...inkBaseStyle,
|
|
79
|
+
background: `radial-gradient(ellipse 55% 50% at 50% 70%, rgba(100, 220, 220, 0.9) 0%, transparent 45%)`,
|
|
80
|
+
animationName: inkFlow3,
|
|
81
|
+
animationDuration: `calc(${progressAnimationDuration} + 0.5s)`,
|
|
82
|
+
animationDelay: "-2s",
|
|
83
|
+
filter: "blur(38px)"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
[`${componentCls}-progress-ink-2`]: {
|
|
87
|
+
...inkBaseStyle,
|
|
88
|
+
background: `radial-gradient(ellipse 45% 40% at 60% 20%, rgba(255, 150, 200, 0.88) 0%, transparent 45%)`,
|
|
89
|
+
animationName: inkFlow3,
|
|
90
|
+
animationDuration: `calc(${progressAnimationDuration} + 1.5s)`,
|
|
91
|
+
animationDelay: "-3s",
|
|
92
|
+
filter: "blur(42px)",
|
|
93
|
+
"&::before": {
|
|
94
|
+
content: "\"\"",
|
|
95
|
+
...inkBaseStyle,
|
|
96
|
+
background: `radial-gradient(ellipse 50% 55% at 20% 75%, rgba(160, 190, 255, 0.88) 0%, transparent 50%)`,
|
|
97
|
+
animationName: inkFlow1,
|
|
98
|
+
animationDuration: `calc(${progressAnimationDuration} + 2.5s)`,
|
|
99
|
+
animationDelay: "-2.5s",
|
|
100
|
+
filter: "blur(35px)"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
[`${componentCls}-progress-content`]: {
|
|
104
|
+
position: "absolute",
|
|
105
|
+
top: "50%",
|
|
106
|
+
left: 0,
|
|
107
|
+
transform: "translateY(-50%)",
|
|
108
|
+
display: "flex",
|
|
109
|
+
flexDirection: "column",
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
width: "100%",
|
|
112
|
+
paddingInline: token.paddingLG,
|
|
113
|
+
textAlign: "center",
|
|
114
|
+
fontSize: token.fontSize,
|
|
115
|
+
color: token.colorTextSecondary,
|
|
116
|
+
zIndex: 1
|
|
117
|
+
},
|
|
118
|
+
[`${componentCls}-progress-rail`]: {
|
|
119
|
+
width: "100%",
|
|
120
|
+
height: 6,
|
|
121
|
+
marginTop: token.marginSM,
|
|
122
|
+
backgroundColor: "rgba(255, 255, 255, 0.5)",
|
|
123
|
+
borderRadius: token.borderRadiusXS,
|
|
124
|
+
overflow: "hidden",
|
|
125
|
+
backdropFilter: "blur(4px)",
|
|
126
|
+
"&::before": {
|
|
127
|
+
content: "\"\"",
|
|
128
|
+
display: "block",
|
|
129
|
+
height: "100%",
|
|
130
|
+
width: "var(--progress-percent, 0%)",
|
|
131
|
+
background: "linear-gradient(90deg, rgba(120, 170, 255, 0.85) 0%, rgba(160, 150, 245, 0.85) 40%, rgba(130, 200, 220, 0.85) 60%, rgba(120, 170, 255, 0.85) 100%)",
|
|
132
|
+
backgroundSize: "200% 100%",
|
|
133
|
+
borderRadius: token.borderRadiusXS / 2,
|
|
134
|
+
transition: `width ${motionDurationMid} ease`,
|
|
135
|
+
animationName: progressActive,
|
|
136
|
+
animationDuration: progressAnimationDuration,
|
|
137
|
+
animationTimingFunction: "linear",
|
|
138
|
+
animationIterationCount: "infinite"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
[`${componentCls}-progress-indicator`]: { marginTop: token.marginXS }
|
|
142
|
+
} };
|
|
143
|
+
};
|
|
39
144
|
const genImagePreviewStyle = (token) => {
|
|
40
145
|
const { motionEaseOut, previewCls, motionDurationSlow, componentCls, colorBgMask, marginXL, marginSM, margin, colorTextLightSolid, paddingSM, paddingLG, previewOperationHoverColor, previewOperationColorDisabled, previewOperationSize, zIndexPopup } = token;
|
|
41
146
|
const operationBg = new FastColor(colorBgMask).setA(.1);
|
|
@@ -53,7 +158,8 @@ const genImagePreviewStyle = (token) => {
|
|
|
53
158
|
display: "flex",
|
|
54
159
|
fontSize: previewOperationSize,
|
|
55
160
|
"&:hover": { backgroundColor: operationBgHover.toRgbString() },
|
|
56
|
-
"&:active": { backgroundColor: operationBg.toRgbString() }
|
|
161
|
+
"&:active": { backgroundColor: operationBg.toRgbString() },
|
|
162
|
+
"&:focus-visible": genFocusOutline(token)
|
|
57
163
|
};
|
|
58
164
|
return { [`${componentCls}-preview`]: {
|
|
59
165
|
textAlign: "center",
|
|
@@ -135,6 +241,7 @@ const genImagePreviewStyle = (token) => {
|
|
|
135
241
|
transition: `all ${motionDurationSlow}`,
|
|
136
242
|
display: "flex",
|
|
137
243
|
[`&:not(${previewCls}-actions-action-disabled):hover`]: { color: previewOperationHoverColor },
|
|
244
|
+
"&:focus-visible": genFocusOutline(token),
|
|
138
245
|
"&-disabled": {
|
|
139
246
|
color: previewOperationColorDisabled,
|
|
140
247
|
cursor: "not-allowed"
|
|
@@ -148,6 +255,7 @@ const genImageStyle = (token) => {
|
|
|
148
255
|
return { [componentCls]: {
|
|
149
256
|
position: "relative",
|
|
150
257
|
display: "inline-block",
|
|
258
|
+
...genFocusStyle(token),
|
|
151
259
|
[`${componentCls}-img`]: {
|
|
152
260
|
width: "100%",
|
|
153
261
|
height: "auto",
|
|
@@ -195,7 +303,8 @@ const prepareComponentToken = (token) => ({
|
|
|
195
303
|
previewOperationColor: new FastColor(token.colorTextLightSolid).setA(.65).toRgbString(),
|
|
196
304
|
previewOperationHoverColor: new FastColor(token.colorTextLightSolid).setA(.85).toRgbString(),
|
|
197
305
|
previewOperationColorDisabled: new FastColor(token.colorTextLightSolid).setA(.25).toRgbString(),
|
|
198
|
-
previewOperationSize: token.fontSizeIcon * 1.5
|
|
306
|
+
previewOperationSize: token.fontSizeIcon * 1.5,
|
|
307
|
+
progressAnimationDuration: "3s"
|
|
199
308
|
});
|
|
200
309
|
var style_default = genStyleHooks("Image", (token) => {
|
|
201
310
|
const previewCls = `${token.componentCls}-preview`;
|
|
@@ -206,9 +315,10 @@ var style_default = genStyleHooks("Image", (token) => {
|
|
|
206
315
|
return [
|
|
207
316
|
genImageStyle(imageToken),
|
|
208
317
|
genImageCoverStyle(imageToken),
|
|
318
|
+
genImageProgressStyle(imageToken),
|
|
209
319
|
genImagePreviewStyle(imageToken),
|
|
210
320
|
genPreviewMotion(imageToken)
|
|
211
321
|
];
|
|
212
322
|
}, prepareComponentToken);
|
|
213
323
|
//#endregion
|
|
214
|
-
export { style_default as default, genBoxStyle, genImageCoverStyle, genImagePreviewStyle, prepareComponentToken };
|
|
324
|
+
export { style_default as default, genBoxStyle, genImageCoverStyle, genImagePreviewStyle, genImageProgressStyle, prepareComponentToken };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Keyframe from "../../../../@ant-design/cssinjs/es/Keyframes.js";
|
|
2
|
+
import "../../../../@ant-design/cssinjs/es/index.js";
|
|
3
|
+
//#region node_modules/antd/es/image/style/progressAnimation.js
|
|
4
|
+
const progressActive = new Keyframe("antImageProgressActive", {
|
|
5
|
+
"0%": { backgroundPosition: "200% 0" },
|
|
6
|
+
"100%": { backgroundPosition: "-200% 0" }
|
|
7
|
+
});
|
|
8
|
+
const createInkFlow = (name, midTransform, midOpacity, startTransform = "translate(0%, 0%)", startOpacity = .8) => new Keyframe(name, {
|
|
9
|
+
"0%": {
|
|
10
|
+
transform: startTransform,
|
|
11
|
+
opacity: startOpacity
|
|
12
|
+
},
|
|
13
|
+
"50%": {
|
|
14
|
+
transform: midTransform,
|
|
15
|
+
opacity: midOpacity
|
|
16
|
+
},
|
|
17
|
+
"100%": {
|
|
18
|
+
transform: startTransform,
|
|
19
|
+
opacity: startOpacity
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const inkFlow1 = createInkFlow("antImageInkFlow1", "translate(15%, -20%) scale(1.25)", .5);
|
|
23
|
+
const inkFlow2 = createInkFlow("antImageInkFlow2", "translate(-18%, 15%) scale(0.85)", .9, "translate(0%, 0%) scale(1.1)", .7);
|
|
24
|
+
const inkFlow3 = createInkFlow("antImageInkFlow3", "translate(8%, 10%) scale(1.15)", .8, "translate(0%, 0%) scale(0.85)", .65);
|
|
25
|
+
//#endregion
|
|
26
|
+
export { inkFlow1, inkFlow2, inkFlow3, progressActive };
|
package/vendor/antd/es/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import Popover from "./popover/index.js";
|
|
|
16
16
|
import Avatar from "./avatar/index.js";
|
|
17
17
|
import BackTop from "./back-top/index.js";
|
|
18
18
|
import Badge from "./badge/index.js";
|
|
19
|
+
import border_beam_default from "./border-beam/index.js";
|
|
19
20
|
import Menu from "./menu/index.js";
|
|
20
21
|
import Breadcrumb from "./breadcrumb/index.js";
|
|
21
22
|
import button_default from "./button/index.js";
|
|
@@ -78,4 +79,4 @@ import Watermark from "./watermark/index.js";
|
|
|
78
79
|
//#region node_modules/antd/es/index.js
|
|
79
80
|
const unstableSetRender = () => {};
|
|
80
81
|
//#endregion
|
|
81
|
-
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, button_default as Button, Calendar, Card, Carousel, Cascader, Checkbox, col_default as Col, collapse_default as Collapse, color_picker_default as ColorPicker, ConfigProvider, DatePicker, Descriptions, Divider, drawer_default as Drawer, Dropdown, Empty, Flex, float_button_default as FloatButton, Form, grid_default as Grid, Image, Input, TypedInputNumber as InputNumber, Layout, List, masonry_default as Masonry, Mentions, Menu, Modal, pagination_default as Pagination, Popconfirm, Popover, progress_default as Progress, QRCode, Radio, Rate, Result, row_default as Row, Segmented, Select, skeleton_default as Skeleton, Slider, Space, Spin, Splitter, statistic_default as Statistic, Steps, Switch, table_default as Table, Tabs, Tag, TimePicker, timeline_default as Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, staticMethods as message, staticMethods$1 as notification, theme_default as theme, unstableSetRender, version_default as version };
|
|
82
|
+
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BackTop, Badge, border_beam_default as BorderBeam, Breadcrumb, button_default as Button, Calendar, Card, Carousel, Cascader, Checkbox, col_default as Col, collapse_default as Collapse, color_picker_default as ColorPicker, ConfigProvider, DatePicker, Descriptions, Divider, drawer_default as Drawer, Dropdown, Empty, Flex, float_button_default as FloatButton, Form, grid_default as Grid, Image, Input, TypedInputNumber as InputNumber, Layout, List, masonry_default as Masonry, Mentions, Menu, Modal, pagination_default as Pagination, Popconfirm, Popover, progress_default as Progress, QRCode, Radio, Rate, Result, row_default as Row, Segmented, Select, skeleton_default as Skeleton, Slider, Space, Spin, Splitter, statistic_default as Statistic, Steps, Switch, table_default as Table, Tabs, Tag, TimePicker, timeline_default as Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, staticMethods as message, staticMethods$1 as notification, theme_default as theme, unstableSetRender, version_default as version };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { composeRef } from "../../../@rc-component/util/es/ref.js";
|
|
3
3
|
import { triggerFocus } from "../../../@rc-component/util/es/Dom/focus.js";
|
|
4
|
+
import "../../../@rc-component/util/es/index.js";
|
|
4
5
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
5
6
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
7
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
6
8
|
import "../_util/warning.js";
|
|
7
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
8
|
-
import "../_util/hooks/index.js";
|
|
9
9
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
10
10
|
import DisabledContext from "../config-provider/DisabledContext.js";
|
|
11
|
+
import { useAllowClear } from "../_util/hooks/useAllowClear.js";
|
|
12
|
+
import "../_util/hooks/index.js";
|
|
11
13
|
import useSize from "../config-provider/hooks/useSize.js";
|
|
12
14
|
import { useCompactItemContext } from "../space/Compact.js";
|
|
13
15
|
import { FormItemInputContext } from "../form/context.js";
|
|
@@ -16,7 +18,6 @@ import { getMergedStatus, getStatusClassNames } from "../_util/statusUtils.js";
|
|
|
16
18
|
import useVariant from "../form/hooks/useVariants.js";
|
|
17
19
|
import style_default, { useSharedStyle } from "./style/index.js";
|
|
18
20
|
import es_default from "../../../@rc-component/input/es/index.js";
|
|
19
|
-
import getAllowClear from "../_util/getAllowClear.js";
|
|
20
21
|
import useRemovePasswordTimeout from "./hooks/useRemovePasswordTimeout.js";
|
|
21
22
|
import { hasPrefixSuffix } from "./utils.js";
|
|
22
23
|
import React, { forwardRef, useContext, useRef } from "../../../react/index.js";
|
|
@@ -57,7 +58,11 @@ const Input = /*#__PURE__*/ forwardRef((props, ref) => {
|
|
|
57
58
|
onChange?.(e);
|
|
58
59
|
};
|
|
59
60
|
const suffixNode = (hasFeedback || suffix) && /*#__PURE__*/ React.createElement(React.Fragment, null, suffix, hasFeedback && feedbackIcon);
|
|
60
|
-
const mergedAllowClear =
|
|
61
|
+
const mergedAllowClear = useAllowClear({
|
|
62
|
+
allowClear,
|
|
63
|
+
contextAllowClear,
|
|
64
|
+
componentName: "Input"
|
|
65
|
+
});
|
|
61
66
|
const [variant, enableVariantCls] = useVariant("input", customVariant, bordered);
|
|
62
67
|
return /*#__PURE__*/ React.createElement(es_default, {
|
|
63
68
|
ref: composeRef(ref, inputRef),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import wrapperRaf from "../../../../@rc-component/util/es/raf.js";
|
|
3
|
+
import "../../../../@rc-component/util/es/index.js";
|
|
3
4
|
import { clsx } from "../../../../clsx/dist/clsx.js";
|
|
4
5
|
import { ConfigContext } from "../../config-provider/context.js";
|
|
5
6
|
import "../../config-provider/index.js";
|
|
@@ -5,9 +5,9 @@ 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 { useComponentConfig } from "../../config-provider/context.js";
|
|
8
|
+
import { isFunction } from "../../_util/is.js";
|
|
9
|
+
import { useMergeSemantic } from "../../_util/hooks/useMergeSemantic/index.js";
|
|
8
10
|
import "../../_util/warning.js";
|
|
9
|
-
import { useMergeSemantic } from "../../_util/hooks/useMergeSemantic.js";
|
|
10
|
-
import "../../_util/hooks/index.js";
|
|
11
11
|
import useSize from "../../config-provider/hooks/useSize.js";
|
|
12
12
|
import { FormItemInputContext } from "../../form/context.js";
|
|
13
13
|
import { getMergedStatus } from "../../_util/statusUtils.js";
|
|
@@ -20,7 +20,7 @@ function strToArr(str) {
|
|
|
20
20
|
}
|
|
21
21
|
const Separator = (props) => {
|
|
22
22
|
const { index, prefixCls, separator, className: semanticClassName, style: semanticStyle } = props;
|
|
23
|
-
const separatorNode =
|
|
23
|
+
const separatorNode = isFunction(separator) ? separator(index) : separator;
|
|
24
24
|
if (!separatorNode) return null;
|
|
25
25
|
return /*#__PURE__*/ React$1.createElement("span", {
|
|
26
26
|
className: clsx(`${prefixCls}-separator`, semanticClassName),
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { composeRef } from "../../../@rc-component/util/es/ref.js";
|
|
3
|
-
import omit from "../../../@rc-component/util/es/omit.js";
|
|
4
3
|
import "../../../@rc-component/util/es/index.js";
|
|
5
4
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
6
|
-
import {
|
|
5
|
+
import { useComponentConfig } from "../config-provider/context.js";
|
|
6
|
+
import { isPlainObject } from "../_util/is.js";
|
|
7
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
8
|
+
import useLocale from "../locale/useLocale.js";
|
|
9
|
+
import "../locale/index.js";
|
|
7
10
|
import DisabledContext from "../config-provider/DisabledContext.js";
|
|
8
|
-
import "../config-provider/index.js";
|
|
9
11
|
import useRemovePasswordTimeout from "./hooks/useRemovePasswordTimeout.js";
|
|
10
12
|
import Input from "./Input.js";
|
|
11
13
|
import RefIcon from "../../../@ant-design/icons/es/icons/EyeInvisibleOutlined.js";
|
|
@@ -19,10 +21,17 @@ const actionMap = {
|
|
|
19
21
|
hover: "onMouseOver"
|
|
20
22
|
};
|
|
21
23
|
const Password = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
22
|
-
const { disabled: customDisabled, action = "click", visibilityToggle = true, iconRender
|
|
24
|
+
const { disabled: customDisabled, action = "click", visibilityToggle = true, iconRender, prefixCls: customizePrefixCls, inputPrefixCls: customizeInputPrefixCls, suffix, className, style, classNames, styles, ...restProps } = props;
|
|
25
|
+
const { getPrefixCls, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, iconRender: contextIconRender } = useComponentConfig("inputPassword");
|
|
26
|
+
const [locale] = useLocale("global");
|
|
23
27
|
const disabled = React$1.useContext(DisabledContext);
|
|
24
28
|
const mergedDisabled = customDisabled ?? disabled;
|
|
25
|
-
const
|
|
29
|
+
const mergedProps = {
|
|
30
|
+
...props,
|
|
31
|
+
disabled: mergedDisabled
|
|
32
|
+
};
|
|
33
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, styles], { props: mergedProps });
|
|
34
|
+
const visibilityControlled = isPlainObject(visibilityToggle) && visibilityToggle.visible !== void 0;
|
|
26
35
|
const [visible, setVisible] = useState(() => visibilityControlled ? visibilityToggle.visible : false);
|
|
27
36
|
const inputRef = useRef(null);
|
|
28
37
|
React$1.useEffect(() => {
|
|
@@ -34,45 +43,55 @@ const Password = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
|
34
43
|
if (visible) removePasswordTimeout();
|
|
35
44
|
const nextVisible = !visible;
|
|
36
45
|
setVisible(nextVisible);
|
|
37
|
-
if (
|
|
46
|
+
if (isPlainObject(visibilityToggle)) visibilityToggle.onVisibleChange?.(nextVisible);
|
|
38
47
|
};
|
|
39
48
|
const getIcon = (prefixCls) => {
|
|
40
49
|
const iconTrigger = actionMap[action] || "";
|
|
41
|
-
const icon = iconRender(visible);
|
|
42
|
-
|
|
43
|
-
[iconTrigger]: onVisibleChange,
|
|
44
|
-
className: `${prefixCls}-icon`,
|
|
50
|
+
const icon = (iconRender || contextIconRender || defaultIconRender)(visible);
|
|
51
|
+
return /*#__PURE__*/ React$1.createElement("span", {
|
|
45
52
|
key: "passwordIcon",
|
|
53
|
+
role: "button",
|
|
54
|
+
tabIndex: mergedDisabled ? -1 : 0,
|
|
55
|
+
className: `${prefixCls}-icon`,
|
|
56
|
+
"aria-disabled": mergedDisabled,
|
|
57
|
+
"aria-pressed": visible,
|
|
58
|
+
"aria-label": visible ? locale.hide : locale.show,
|
|
46
59
|
onMouseDown: (e) => {
|
|
47
60
|
e.preventDefault();
|
|
48
61
|
},
|
|
49
62
|
onMouseUp: (e) => {
|
|
50
63
|
e.preventDefault();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
},
|
|
65
|
+
onKeyDown: (e) => {
|
|
66
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
onVisibleChange();
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
[iconTrigger]: onVisibleChange
|
|
72
|
+
}, icon);
|
|
54
73
|
};
|
|
55
|
-
const { className, prefixCls: customizePrefixCls, inputPrefixCls: customizeInputPrefixCls, size, ...restProps } = props;
|
|
56
|
-
const { getPrefixCls } = React$1.useContext(ConfigContext);
|
|
57
74
|
const inputPrefixCls = getPrefixCls("input", customizeInputPrefixCls);
|
|
58
75
|
const prefixCls = getPrefixCls("input-password", customizePrefixCls);
|
|
59
76
|
const suffixIcon = visibilityToggle && getIcon(prefixCls);
|
|
60
|
-
const inputClassName = clsx(prefixCls, className, { [`${prefixCls}-${size}`]: !!size });
|
|
61
|
-
const
|
|
62
|
-
...
|
|
63
|
-
"suffix",
|
|
64
|
-
"iconRender",
|
|
65
|
-
"visibilityToggle"
|
|
66
|
-
]),
|
|
77
|
+
const inputClassName = clsx(prefixCls, contextClassName, className, { [`${prefixCls}-${props.size}`]: !!props.size });
|
|
78
|
+
const inputProps = {
|
|
79
|
+
...restProps,
|
|
67
80
|
type: visible ? "text" : "password",
|
|
68
|
-
className: inputClassName,
|
|
69
81
|
prefixCls: inputPrefixCls,
|
|
70
|
-
suffix: /*#__PURE__*/ React$1.createElement(React$1.Fragment, null, suffixIcon, suffix)
|
|
82
|
+
suffix: /*#__PURE__*/ React$1.createElement(React$1.Fragment, null, suffixIcon, suffix),
|
|
83
|
+
disabled: mergedDisabled,
|
|
84
|
+
className: inputClassName,
|
|
85
|
+
style: {
|
|
86
|
+
...contextStyle,
|
|
87
|
+
...style
|
|
88
|
+
},
|
|
89
|
+
classNames: mergedClassNames,
|
|
90
|
+
styles: mergedStyles
|
|
71
91
|
};
|
|
72
|
-
if (size) omittedProps.size = size;
|
|
73
92
|
return /*#__PURE__*/ React$1.createElement(Input, {
|
|
74
93
|
ref: composeRef(ref, inputRef),
|
|
75
|
-
...
|
|
94
|
+
...inputProps
|
|
76
95
|
});
|
|
77
96
|
});
|
|
78
97
|
//#endregion
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import { composeRef } from "../../../@rc-component/util/es/ref.js";
|
|
3
3
|
import omit from "../../../@rc-component/util/es/omit.js";
|
|
4
4
|
import pickAttrs from "../../../@rc-component/util/es/pickAttrs.js";
|
|
5
|
+
import "../../../@rc-component/util/es/index.js";
|
|
5
6
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
6
7
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
7
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
8
|
-
import "../_util/hooks/index.js";
|
|
8
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
9
9
|
import { cloneElement as cloneElement$1 } from "../_util/reactNode.js";
|
|
10
|
+
import fallbackProp from "../_util/fallbackProp.js";
|
|
10
11
|
import useSize from "../config-provider/hooks/useSize.js";
|
|
11
12
|
import Compact, { useCompactItemContext } from "../space/Compact.js";
|
|
12
13
|
import Button from "../button/Button.js";
|
|
@@ -16,8 +17,8 @@ import search_default from "./style/search.js";
|
|
|
16
17
|
import * as React$1 from "../../../react/index.js";
|
|
17
18
|
//#region node_modules/antd/es/input/Search.js
|
|
18
19
|
const Search = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
19
|
-
const { prefixCls: customizePrefixCls, inputPrefixCls: customizeInputPrefixCls, className, size: customizeSize, style, enterButton = false, addonAfter, loading, disabled, onSearch: customOnSearch, onChange: customOnChange, onCompositionStart, onCompositionEnd, variant, onPressEnter: customOnPressEnter, classNames, styles, hidden, ...restProps } = props;
|
|
20
|
-
const { direction, getPrefixCls, classNames: contextClassNames, styles: contextStyles } = useComponentConfig("inputSearch");
|
|
20
|
+
const { prefixCls: customizePrefixCls, inputPrefixCls: customizeInputPrefixCls, className, size: customizeSize, style, enterButton = false, searchIcon: customizeSearchIcon, addonAfter, loading, disabled, onSearch: customOnSearch, onChange: customOnChange, onCompositionStart, onCompositionEnd, variant, onPressEnter: customOnPressEnter, classNames, styles, hidden, ...restProps } = props;
|
|
21
|
+
const { direction, getPrefixCls, classNames: contextClassNames, styles: contextStyles, searchIcon: contextSearchIcon } = useComponentConfig("inputSearch");
|
|
21
22
|
const mergedProps = {
|
|
22
23
|
...props,
|
|
23
24
|
enterButton
|
|
@@ -45,7 +46,7 @@ const Search = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
|
45
46
|
customOnPressEnter?.(e);
|
|
46
47
|
onSearch(e);
|
|
47
48
|
};
|
|
48
|
-
const searchIcon = typeof enterButton === "boolean" ? /*#__PURE__*/ React$1.createElement(RefIcon, null) : null;
|
|
49
|
+
const searchIcon = typeof enterButton === "boolean" ? fallbackProp(customizeSearchIcon, contextSearchIcon, /*#__PURE__*/ React$1.createElement(RefIcon, null)) : null;
|
|
49
50
|
const btnPrefixCls = `${prefixCls}-btn`;
|
|
50
51
|
const btnClassName = clsx(btnPrefixCls, { [`${btnPrefixCls}-${variant}`]: variant });
|
|
51
52
|
let button;
|
|
@@ -2,20 +2,22 @@
|
|
|
2
2
|
import { triggerFocus } from "../../../@rc-component/util/es/Dom/focus.js";
|
|
3
3
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
4
4
|
import { useComponentConfig } from "../config-provider/context.js";
|
|
5
|
+
import { isFunction } from "../_util/is.js";
|
|
6
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
5
7
|
import "../_util/warning.js";
|
|
6
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
7
|
-
import "../_util/hooks/index.js";
|
|
8
8
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
9
9
|
import DisabledContext from "../config-provider/DisabledContext.js";
|
|
10
|
+
import { useAllowClear } from "../_util/hooks/useAllowClear.js";
|
|
11
|
+
import "../_util/hooks/index.js";
|
|
10
12
|
import useSize from "../config-provider/hooks/useSize.js";
|
|
11
13
|
import { useCompactItemContext } from "../space/Compact.js";
|
|
12
14
|
import { FormItemInputContext } from "../form/context.js";
|
|
13
15
|
import { getMergedStatus, getStatusClassNames } from "../_util/statusUtils.js";
|
|
14
16
|
import useVariant from "../form/hooks/useVariants.js";
|
|
15
17
|
import { useSharedStyle } from "./style/index.js";
|
|
16
|
-
import
|
|
18
|
+
import TextArea$1 from "../../../@rc-component/input/es/TextArea.js";
|
|
19
|
+
import "../../../@rc-component/input/es/index.js";
|
|
17
20
|
import "./Input.js";
|
|
18
|
-
import es_default from "../../../@rc-component/textarea/es/index.js";
|
|
19
21
|
import textarea_default from "./style/textarea.js";
|
|
20
22
|
import * as React$1 from "../../../react/index.js";
|
|
21
23
|
import { forwardRef } from "../../../react/index.js";
|
|
@@ -44,7 +46,11 @@ const TextArea = /*#__PURE__*/ forwardRef((props, ref) => {
|
|
|
44
46
|
const { compactSize, compactItemClassnames } = useCompactItemContext(prefixCls, direction);
|
|
45
47
|
const mergedSize = useSize((ctx) => customizeSize ?? compactSize ?? ctx);
|
|
46
48
|
const [variant, enableVariantCls] = useVariant("textArea", customVariant, bordered);
|
|
47
|
-
const mergedAllowClear =
|
|
49
|
+
const mergedAllowClear = useAllowClear({
|
|
50
|
+
allowClear,
|
|
51
|
+
contextAllowClear,
|
|
52
|
+
componentName: "TextArea"
|
|
53
|
+
});
|
|
48
54
|
const [isMouseDown, setIsMouseDown] = React$1.useState(false);
|
|
49
55
|
const [resizeDirty, setResizeDirty] = React$1.useState(false);
|
|
50
56
|
const onInternalMouseDown = (e) => {
|
|
@@ -58,12 +64,12 @@ const TextArea = /*#__PURE__*/ forwardRef((props, ref) => {
|
|
|
58
64
|
};
|
|
59
65
|
const onInternalResize = (size) => {
|
|
60
66
|
onResize?.(size);
|
|
61
|
-
if (isMouseDown &&
|
|
67
|
+
if (isMouseDown && isFunction(getComputedStyle)) {
|
|
62
68
|
const ele = innerRef.current?.nativeElement?.querySelector("textarea");
|
|
63
69
|
if (ele && getComputedStyle(ele).resize === "both") setResizeDirty(true);
|
|
64
70
|
}
|
|
65
71
|
};
|
|
66
|
-
return /*#__PURE__*/ React$1.createElement(
|
|
72
|
+
return /*#__PURE__*/ React$1.createElement(TextArea$1, {
|
|
67
73
|
autoComplete: contextAutoComplete,
|
|
68
74
|
...rest,
|
|
69
75
|
style: {
|