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
|
@@ -1,17 +1,19 @@
|
|
|
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 { ConfigContext, useComponentConfig } from "../config-provider/context.js";
|
|
5
6
|
import RefIcon from "../../../@ant-design/icons/es/icons/CloseOutlined.js";
|
|
7
|
+
import { isNonNullable, isNumber, isPlainObject } from "../_util/is.js";
|
|
8
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
6
9
|
import "../_util/warning.js";
|
|
10
|
+
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
11
|
+
import "../config-provider/index.js";
|
|
7
12
|
import { pickClosable, useClosable } from "../_util/hooks/useClosable.js";
|
|
8
13
|
import { useMergedMask } from "../_util/hooks/useMergedMask.js";
|
|
9
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
10
14
|
import ZIndexContext from "../_util/zindexContext.js";
|
|
11
15
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
12
16
|
import "../_util/hooks/index.js";
|
|
13
|
-
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
14
|
-
import "../config-provider/index.js";
|
|
15
17
|
import { getTransitionName } from "../_util/motion.js";
|
|
16
18
|
import es_default from "../../../@rc-component/dialog/es/index.js";
|
|
17
19
|
import ContextIsolator from "../_util/ContextIsolator.js";
|
|
@@ -36,7 +38,7 @@ const getClickPosition = (e) => {
|
|
|
36
38
|
if (canUseDocElement()) document.documentElement.addEventListener("click", getClickPosition, true);
|
|
37
39
|
const Modal = (props) => {
|
|
38
40
|
const { prefixCls: customizePrefixCls, className, rootClassName, open, wrapClassName, centered, getContainer, style, width = 520, footer, classNames, styles, children, loading, confirmLoading, zIndex: customizeZIndex, mousePosition: customizeMousePosition, onOk, onCancel, okButtonProps, cancelButtonProps, destroyOnHidden, destroyOnClose, panelRef = null, closable, mask: modalMask, modalRender, maskClosable, focusTriggerAfterClose, focusable, ...restProps } = props;
|
|
39
|
-
const { getPopupContainer: getContextPopupContainer, getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, centered: contextCentered, cancelButtonProps: contextCancelButtonProps, okButtonProps: contextOkButtonProps, mask: contextMask } = useComponentConfig("modal");
|
|
41
|
+
const { getPopupContainer: getContextPopupContainer, getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, centered: contextCentered, cancelButtonProps: contextCancelButtonProps, okButtonProps: contextOkButtonProps, mask: contextMask, focusable: contextFocusable } = useComponentConfig("modal");
|
|
40
42
|
const { modal: modalContext } = React$1.useContext(ConfigContext);
|
|
41
43
|
const [closableAfterClose, onClose] = React$1.useMemo(() => {
|
|
42
44
|
if (typeof closable === "boolean") return [void 0, void 0];
|
|
@@ -45,7 +47,10 @@ const Modal = (props) => {
|
|
|
45
47
|
const prefixCls = getPrefixCls("modal", customizePrefixCls);
|
|
46
48
|
const rootPrefixCls = getPrefixCls();
|
|
47
49
|
const [mergedMask, maskBlurClassName, mergeMaskClosable] = useMergedMask(modalMask, contextMask, prefixCls, maskClosable);
|
|
48
|
-
const mergedFocusable = useFocusable(
|
|
50
|
+
const mergedFocusable = useFocusable({
|
|
51
|
+
...contextFocusable,
|
|
52
|
+
...focusable
|
|
53
|
+
}, mergedMask, focusTriggerAfterClose);
|
|
49
54
|
const handleCancel = (e) => {
|
|
50
55
|
if (confirmLoading) return;
|
|
51
56
|
onCancel?.(e);
|
|
@@ -106,14 +111,14 @@ const Modal = (props) => {
|
|
|
106
111
|
maskBlurClassName
|
|
107
112
|
], [contextStyles, styles], { props: mergedProps });
|
|
108
113
|
const [numWidth, responsiveWidth] = React$1.useMemo(() => {
|
|
109
|
-
if (width
|
|
114
|
+
if (isPlainObject(width)) return [void 0, width];
|
|
110
115
|
return [width, void 0];
|
|
111
116
|
}, [width]);
|
|
112
117
|
const responsiveWidthVars = React$1.useMemo(() => {
|
|
113
118
|
const vars = {};
|
|
114
119
|
if (responsiveWidth) Object.keys(responsiveWidth).forEach((breakpoint) => {
|
|
115
120
|
const breakpointWidth = responsiveWidth[breakpoint];
|
|
116
|
-
if (breakpointWidth
|
|
121
|
+
if (isNonNullable(breakpointWidth)) vars[`--${prefixCls}-${breakpoint}-width`] = isNumber(breakpointWidth) ? `${breakpointWidth}px` : breakpointWidth;
|
|
117
122
|
});
|
|
118
123
|
return vars;
|
|
119
124
|
}, [prefixCls, responsiveWidth]);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
3
|
import { ConfigContext, useComponentConfig } from "../config-provider/context.js";
|
|
4
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
5
|
-
import "../_util/hooks/index.js";
|
|
4
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
6
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
7
6
|
import "../config-provider/index.js";
|
|
8
7
|
import Panel from "../../../@rc-component/dialog/es/Dialog/Content/Panel.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { render, unmount } from "../../../@rc-component/util/es/React/render.js";
|
|
3
3
|
import { ConfigContext } from "../config-provider/context.js";
|
|
4
|
+
import { isFunction } from "../_util/is.js";
|
|
4
5
|
import "../_util/warning.js";
|
|
5
6
|
import { getConfirmLocale } from "./locale.js";
|
|
6
7
|
import ConfigProvider, { globalConfig } from "../config-provider/index.js";
|
|
@@ -64,7 +65,7 @@ function confirm(config) {
|
|
|
64
65
|
prefixCls: rootPrefixCls,
|
|
65
66
|
iconPrefixCls,
|
|
66
67
|
theme
|
|
67
|
-
},
|
|
68
|
+
}, isFunction(global.holderRender) ? global.holderRender(dom) : dom), container);
|
|
68
69
|
});
|
|
69
70
|
};
|
|
70
71
|
function close(...args) {
|
|
@@ -72,14 +73,14 @@ function confirm(config) {
|
|
|
72
73
|
...currentConfig,
|
|
73
74
|
open: false,
|
|
74
75
|
afterClose: () => {
|
|
75
|
-
if (
|
|
76
|
+
if (isFunction(config.afterClose)) config.afterClose();
|
|
76
77
|
destroy.apply(this, args);
|
|
77
78
|
}
|
|
78
79
|
};
|
|
79
80
|
scheduleRender(currentConfig);
|
|
80
81
|
}
|
|
81
82
|
function update(configUpdate) {
|
|
82
|
-
if (
|
|
83
|
+
if (isFunction(configUpdate)) currentConfig = configUpdate(currentConfig);
|
|
83
84
|
else currentConfig = {
|
|
84
85
|
...currentConfig,
|
|
85
86
|
...configUpdate
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import RefIcon from "../../../@ant-design/icons/es/icons/CloseOutlined.js";
|
|
3
|
+
import { isFunction } from "../_util/is.js";
|
|
3
4
|
import { getConfirmLocale } from "./locale.js";
|
|
4
5
|
import useLocale from "../locale/useLocale.js";
|
|
5
6
|
import "../locale/index.js";
|
|
@@ -39,9 +40,9 @@ const Footer = (props) => {
|
|
|
39
40
|
onCancel
|
|
40
41
|
]);
|
|
41
42
|
let footerNode;
|
|
42
|
-
if (
|
|
43
|
+
if (isFunction(footer) || typeof footer === "undefined") {
|
|
43
44
|
footerNode = /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(NormalCancelBtn, null), /*#__PURE__*/ React.createElement(NormalOkBtn, null));
|
|
44
|
-
if (
|
|
45
|
+
if (isFunction(footer)) footerNode = footer(footerNode, {
|
|
45
46
|
OkBtn: NormalOkBtn,
|
|
46
47
|
CancelBtn: NormalCancelBtn
|
|
47
48
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ConfigContext } from "../../config-provider/context.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 "../../config-provider/index.js";
|
|
@@ -25,7 +26,7 @@ const HookModal = /*#__PURE__*/ React$1.forwardRef((props, ref) => {
|
|
|
25
26
|
destroy: close,
|
|
26
27
|
update: (newConfig) => {
|
|
27
28
|
setInnerConfig((originConfig) => {
|
|
28
|
-
const nextConfig =
|
|
29
|
+
const nextConfig = isFunction(newConfig) ? newConfig(originConfig) : newConfig;
|
|
29
30
|
return {
|
|
30
31
|
...originConfig,
|
|
31
32
|
...nextConfig
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { clsx } from "../../../clsx/dist/clsx.js";
|
|
3
|
+
import { useComponentConfig } from "../config-provider/context.js";
|
|
4
|
+
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
5
|
+
import NotificationList from "../../../@rc-component/notification/es/NotificationList/index.js";
|
|
6
|
+
import "../../../@rc-component/notification/es/index.js";
|
|
7
|
+
import style_default from "./style/index.js";
|
|
8
|
+
import { TypeIcon, getCloseIcon } from "./PurePanel.js";
|
|
9
|
+
import * as React$1 from "../../../react/index.js";
|
|
10
|
+
//#region node_modules/antd/es/notification/PureList.js
|
|
11
|
+
/** @private Internal Component. Do not use in your production. */
|
|
12
|
+
const PureList = (props) => {
|
|
13
|
+
const { items, classNames, placement = "topRight", style } = props;
|
|
14
|
+
const { getPrefixCls } = useComponentConfig("notification");
|
|
15
|
+
const prefixCls = getPrefixCls("notification");
|
|
16
|
+
const rootCls = useCSSVarCls(prefixCls);
|
|
17
|
+
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
18
|
+
const noticePrefixCls = `${prefixCls}-notice`;
|
|
19
|
+
const configList = items.map((item) => {
|
|
20
|
+
const { actions, description, duration, key, showProgress, title, type } = item;
|
|
21
|
+
const typeIconCls = `${noticePrefixCls}-icon-${type}`;
|
|
22
|
+
return {
|
|
23
|
+
key,
|
|
24
|
+
actions,
|
|
25
|
+
closable: { closeIcon: getCloseIcon(noticePrefixCls) },
|
|
26
|
+
description,
|
|
27
|
+
duration,
|
|
28
|
+
icon: TypeIcon[type],
|
|
29
|
+
showProgress,
|
|
30
|
+
title,
|
|
31
|
+
className: `${noticePrefixCls}-${type}`,
|
|
32
|
+
classNames: { icon: typeIconCls }
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
return /*#__PURE__*/ React$1.createElement(NotificationList, {
|
|
36
|
+
prefixCls,
|
|
37
|
+
placement,
|
|
38
|
+
configList,
|
|
39
|
+
className: clsx(hashId, cssVarCls, rootCls),
|
|
40
|
+
classNames,
|
|
41
|
+
style,
|
|
42
|
+
stack: false
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { PureList as default };
|
|
@@ -6,63 +6,45 @@ import RefIcon$1 from "../../../@ant-design/icons/es/icons/CloseCircleFilled.js"
|
|
|
6
6
|
import RefIcon$2 from "../../../@ant-design/icons/es/icons/CloseOutlined.js";
|
|
7
7
|
import RefIcon$3 from "../../../@ant-design/icons/es/icons/ExclamationCircleFilled.js";
|
|
8
8
|
import RefIcon$4 from "../../../@ant-design/icons/es/icons/InfoCircleFilled.js";
|
|
9
|
+
import { isNonNullable, isPlainObject } from "../_util/is.js";
|
|
10
|
+
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic/index.js";
|
|
9
11
|
import "../_util/warning.js";
|
|
10
|
-
import { pickClosable, useClosable } from "../_util/hooks/useClosable.js";
|
|
11
|
-
import { useMergeSemantic } from "../_util/hooks/useMergeSemantic.js";
|
|
12
|
-
import "../_util/hooks/index.js";
|
|
13
12
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
14
13
|
import "../config-provider/index.js";
|
|
15
|
-
import
|
|
14
|
+
import Notification from "../../../@rc-component/notification/es/Notification.js";
|
|
16
15
|
import "../../../@rc-component/notification/es/index.js";
|
|
17
|
-
import "../../../@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
16
|
+
import RefIcon$5 from "../../../@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
17
|
+
import { pickClosable, useClosable } from "../_util/hooks/useClosable.js";
|
|
18
|
+
import "../_util/hooks/index.js";
|
|
19
|
+
import style_default, { PurePanelStyle } from "./style/index.js";
|
|
20
20
|
import * as React$1 from "../../../react/index.js";
|
|
21
|
+
//#region node_modules/antd/es/notification/PurePanel.js
|
|
22
|
+
const TypeIcon = {
|
|
23
|
+
info: /*#__PURE__*/ React$1.createElement(RefIcon$4, null),
|
|
24
|
+
success: /*#__PURE__*/ React$1.createElement(RefIcon, null),
|
|
25
|
+
error: /*#__PURE__*/ React$1.createElement(RefIcon$1, null),
|
|
26
|
+
warning: /*#__PURE__*/ React$1.createElement(RefIcon$3, null),
|
|
27
|
+
loading: /*#__PURE__*/ React$1.createElement(RefIcon$5, null)
|
|
28
|
+
};
|
|
21
29
|
function getCloseIcon(prefixCls, closeIcon) {
|
|
22
30
|
if (closeIcon === null || closeIcon === false) return null;
|
|
23
31
|
return closeIcon || /*#__PURE__*/ React$1.createElement(RefIcon$2, { className: `${prefixCls}-close-icon` });
|
|
24
32
|
}
|
|
25
|
-
const typeToIcon = {
|
|
26
|
-
success: RefIcon,
|
|
27
|
-
info: RefIcon$4,
|
|
28
|
-
error: RefIcon$1,
|
|
29
|
-
warning: RefIcon$3
|
|
30
|
-
};
|
|
31
|
-
const PureContent = (props) => {
|
|
32
|
-
const { prefixCls, icon, type, title, description, actions, role = "alert", styles, classNames: pureContentCls } = props;
|
|
33
|
-
let iconNode = null;
|
|
34
|
-
if (icon) iconNode = /*#__PURE__*/ React$1.createElement("span", {
|
|
35
|
-
className: clsx(`${prefixCls}-icon`, pureContentCls.icon),
|
|
36
|
-
style: styles.icon
|
|
37
|
-
}, icon);
|
|
38
|
-
else if (type) iconNode = /*#__PURE__*/ React$1.createElement(typeToIcon[type] || null, {
|
|
39
|
-
className: clsx(`${prefixCls}-icon`, pureContentCls.icon, `${prefixCls}-icon-${type}`),
|
|
40
|
-
style: styles.icon
|
|
41
|
-
});
|
|
42
|
-
return /*#__PURE__*/ React$1.createElement("div", {
|
|
43
|
-
className: clsx({ [`${prefixCls}-with-icon`]: iconNode }),
|
|
44
|
-
role
|
|
45
|
-
}, iconNode, /*#__PURE__*/ React$1.createElement("div", {
|
|
46
|
-
className: clsx(`${prefixCls}-title`, pureContentCls.title),
|
|
47
|
-
style: styles.title
|
|
48
|
-
}, title), description && /*#__PURE__*/ React$1.createElement("div", {
|
|
49
|
-
className: clsx(`${prefixCls}-description`, pureContentCls.description),
|
|
50
|
-
style: styles.description
|
|
51
|
-
}, description), actions && /*#__PURE__*/ React$1.createElement("div", {
|
|
52
|
-
className: clsx(`${prefixCls}-actions`, pureContentCls.actions),
|
|
53
|
-
style: styles.actions
|
|
54
|
-
}, actions));
|
|
55
|
-
};
|
|
56
33
|
/** @private Internal Component. Do not use in your production. */
|
|
57
34
|
const PurePanel = (props) => {
|
|
58
|
-
const { prefixCls: staticPrefixCls, icon, type, message, title, description, btn, actions, closeIcon: _closeIcon, className: notificationClassName, style, styles, classNames: notificationClassNames, closable, ...restProps } = props;
|
|
35
|
+
const { prefixCls: staticPrefixCls, icon, type, message, title, description, btn, actions, closeIcon: _closeIcon, className: notificationClassName, style, styles, classNames: notificationClassNames, closable, role, ...restProps } = props;
|
|
59
36
|
const { getPrefixCls, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig("notification");
|
|
60
37
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, notificationClassNames], [contextStyles, styles], { props });
|
|
61
38
|
const { notification: notificationContext } = React$1.useContext(ConfigContext);
|
|
62
39
|
const mergedActions = actions ?? btn;
|
|
63
40
|
const mergedTitle = title ?? message;
|
|
41
|
+
const hasTitle = isNonNullable(mergedTitle) && mergedTitle !== false && mergedTitle !== "";
|
|
64
42
|
const prefixCls = staticPrefixCls || getPrefixCls("notification");
|
|
65
43
|
const noticePrefixCls = `${prefixCls}-notice`;
|
|
44
|
+
const iconNode = icon || (type ? TypeIcon[type] : null);
|
|
45
|
+
const typeIconCls = !icon && type ? `${noticePrefixCls}-icon-${type}` : void 0;
|
|
46
|
+
const { root: rootClassName, ...contentClassNames } = mergedClassNames;
|
|
47
|
+
const { root: rootStyle, ...contentStyles } = mergedStyles;
|
|
66
48
|
const rootCls = useCSSVarCls(prefixCls);
|
|
67
49
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
68
50
|
const [rawClosable, mergedCloseIcon, , ariaProps] = useClosable(pickClosable(props), pickClosable(notificationContext), {
|
|
@@ -71,35 +53,34 @@ const PurePanel = (props) => {
|
|
|
71
53
|
closeIconRender: (icon) => getCloseIcon(prefixCls, icon)
|
|
72
54
|
});
|
|
73
55
|
const mergedClosable = rawClosable ? {
|
|
74
|
-
onClose: closable
|
|
56
|
+
onClose: isPlainObject(closable) ? closable?.onClose : void 0,
|
|
75
57
|
closeIcon: mergedCloseIcon,
|
|
76
58
|
...ariaProps
|
|
77
59
|
} : false;
|
|
78
60
|
return /*#__PURE__*/ React$1.createElement("div", {
|
|
79
|
-
className: clsx(`${noticePrefixCls}-pure-panel`, hashId, notificationClassName, cssVarCls, rootCls,
|
|
80
|
-
style:
|
|
81
|
-
}, /*#__PURE__*/ React$1.createElement(
|
|
61
|
+
className: clsx(`${noticePrefixCls}-pure-panel`, hashId, notificationClassName, cssVarCls, rootCls, rootClassName),
|
|
62
|
+
style: rootStyle
|
|
63
|
+
}, /*#__PURE__*/ React$1.createElement(PurePanelStyle, { prefixCls }), /*#__PURE__*/ React$1.createElement(Notification, {
|
|
82
64
|
style: {
|
|
83
65
|
...contextStyle,
|
|
84
66
|
...style
|
|
85
67
|
},
|
|
86
68
|
...restProps,
|
|
87
69
|
prefixCls,
|
|
88
|
-
eventKey: "pure",
|
|
89
70
|
duration: null,
|
|
90
71
|
closable: mergedClosable,
|
|
91
|
-
className:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
72
|
+
className: contextClassName,
|
|
73
|
+
title: hasTitle ? mergedTitle : null,
|
|
74
|
+
description,
|
|
75
|
+
icon: iconNode,
|
|
76
|
+
actions: mergedActions,
|
|
77
|
+
role,
|
|
78
|
+
classNames: {
|
|
79
|
+
...contentClassNames,
|
|
80
|
+
icon: clsx(typeIconCls, contentClassNames.icon)
|
|
81
|
+
},
|
|
82
|
+
styles: contentStyles
|
|
102
83
|
}));
|
|
103
84
|
};
|
|
104
85
|
//#endregion
|
|
105
|
-
export {
|
|
86
|
+
export { TypeIcon, PurePanel as default, getCloseIcon };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isPlainObject } from "../../_util/is.js";
|
|
2
|
+
import * as React$1 from "../../../../react/index.js";
|
|
3
|
+
//#region node_modules/antd/es/notification/hooks/useStackConfig.js
|
|
4
|
+
const useStackConfig = (stackConfig, defaultStackConfig) => React$1.useMemo(() => {
|
|
5
|
+
const mergedStackConfig = stackConfig ?? defaultStackConfig;
|
|
6
|
+
if (!mergedStackConfig) return false;
|
|
7
|
+
return {
|
|
8
|
+
...isPlainObject(defaultStackConfig) ? defaultStackConfig : {},
|
|
9
|
+
...isPlainObject(mergedStackConfig) ? mergedStackConfig : {}
|
|
10
|
+
};
|
|
11
|
+
}, [stackConfig, defaultStackConfig]);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { useStackConfig as default };
|
|
@@ -5,6 +5,7 @@ import ConfigProvider, { globalConfig } from "../config-provider/index.js";
|
|
|
5
5
|
import PurePanel from "./PurePanel.js";
|
|
6
6
|
import useNotification, { useInternalNotification } from "./useNotification.js";
|
|
7
7
|
import { AppConfigContext } from "../app/context.js";
|
|
8
|
+
import PureList from "./PureList.js";
|
|
8
9
|
import React, { useContext } from "../../../react/index.js";
|
|
9
10
|
//#region node_modules/antd/es/notification/index.js
|
|
10
11
|
let notification = null;
|
|
@@ -143,7 +144,8 @@ const staticMethods = {
|
|
|
143
144
|
destroy,
|
|
144
145
|
config: setNotificationGlobalConfig,
|
|
145
146
|
useNotification,
|
|
146
|
-
_InternalPanelDoNotUseOrYouWillBeFired: PurePanel
|
|
147
|
+
_InternalPanelDoNotUseOrYouWillBeFired: PurePanel,
|
|
148
|
+
_InternalListDoNotUseOrYouWillBeFired: PureList
|
|
147
149
|
};
|
|
148
150
|
methods.forEach((type) => {
|
|
149
151
|
staticMethods[type] = (config) => open({
|
|
@@ -1,172 +1,16 @@
|
|
|
1
1
|
import { unit } from "../../../../@ant-design/cssinjs/es/util/index.js";
|
|
2
|
-
import Keyframe from "../../../../@ant-design/cssinjs/es/Keyframes.js";
|
|
3
2
|
import "../../../../@ant-design/cssinjs/es/index.js";
|
|
4
3
|
import { merge } from "../../../../@ant-design/cssinjs-utils/es/util/statistic.js";
|
|
5
|
-
import {
|
|
6
|
-
import { genStyleHooks } from "../../theme/util/genStyleUtils.js";
|
|
4
|
+
import { resetComponent } from "../../style/index.js";
|
|
5
|
+
import { genStyleHooks, genSubStyleComponent } from "../../theme/util/genStyleUtils.js";
|
|
7
6
|
import "../../theme/internal.js";
|
|
8
7
|
import { CONTAINER_MAX_OFFSET } from "../../_util/hooks/useZIndex.js";
|
|
9
8
|
import "../../_util/hooks/index.js";
|
|
9
|
+
import genNotificationStyle, { genPurePanelStyle } from "./notification.js";
|
|
10
10
|
import genNotificationPlacementStyle from "./placement.js";
|
|
11
|
-
import genStackStyle from "./stack.js";
|
|
12
11
|
//#region node_modules/antd/es/notification/style/index.js
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const noticeCls = `${componentCls}-notice`;
|
|
16
|
-
return {
|
|
17
|
-
position: "relative",
|
|
18
|
-
marginBottom: notificationMarginBottom,
|
|
19
|
-
marginInlineStart: "auto",
|
|
20
|
-
background: notificationBg,
|
|
21
|
-
borderRadius: borderRadiusLG,
|
|
22
|
-
boxShadow,
|
|
23
|
-
[noticeCls]: {
|
|
24
|
-
padding: notificationPadding,
|
|
25
|
-
width,
|
|
26
|
-
maxWidth: `calc(100vw - ${unit(token.calc(notificationMarginEdge).mul(2).equal())})`,
|
|
27
|
-
lineHeight,
|
|
28
|
-
wordWrap: "break-word",
|
|
29
|
-
borderRadius: borderRadiusLG,
|
|
30
|
-
overflow: "hidden",
|
|
31
|
-
"&-success": colorSuccessBg ? { background: colorSuccessBg } : {},
|
|
32
|
-
"&-error": colorErrorBg ? { background: colorErrorBg } : {},
|
|
33
|
-
"&-info": colorInfoBg ? { background: colorInfoBg } : {},
|
|
34
|
-
"&-warning": colorWarningBg ? { background: colorWarningBg } : {}
|
|
35
|
-
},
|
|
36
|
-
[`${noticeCls}-title`]: {
|
|
37
|
-
marginBottom: token.marginXS,
|
|
38
|
-
color: colorTextHeading,
|
|
39
|
-
fontSize: fontSizeLG,
|
|
40
|
-
lineHeight: token.lineHeightLG
|
|
41
|
-
},
|
|
42
|
-
[`${noticeCls}-description`]: {
|
|
43
|
-
fontSize,
|
|
44
|
-
color: colorText,
|
|
45
|
-
marginTop: token.marginXS
|
|
46
|
-
},
|
|
47
|
-
[`${noticeCls}-closable ${noticeCls}-title`]: { paddingInlineEnd: token.paddingLG },
|
|
48
|
-
[`${noticeCls}-with-icon ${noticeCls}-title`]: {
|
|
49
|
-
marginBottom: token.marginXS,
|
|
50
|
-
marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),
|
|
51
|
-
fontSize: fontSizeLG
|
|
52
|
-
},
|
|
53
|
-
[`${noticeCls}-with-icon ${noticeCls}-description`]: {
|
|
54
|
-
marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),
|
|
55
|
-
fontSize
|
|
56
|
-
},
|
|
57
|
-
[`${noticeCls}-icon`]: {
|
|
58
|
-
position: "absolute",
|
|
59
|
-
fontSize: notificationIconSize,
|
|
60
|
-
lineHeight: 1,
|
|
61
|
-
[`&-success${iconCls}`]: { color: colorSuccess },
|
|
62
|
-
[`&-info${iconCls}`]: { color: colorInfo },
|
|
63
|
-
[`&-warning${iconCls}`]: { color: colorWarning },
|
|
64
|
-
[`&-error${iconCls}`]: { color: colorError }
|
|
65
|
-
},
|
|
66
|
-
[`${noticeCls}-close`]: {
|
|
67
|
-
position: "absolute",
|
|
68
|
-
top: token.notificationPaddingVertical,
|
|
69
|
-
insetInlineEnd: token.notificationPaddingHorizontal,
|
|
70
|
-
color: token.colorIcon,
|
|
71
|
-
outline: "none",
|
|
72
|
-
width: token.notificationCloseButtonSize,
|
|
73
|
-
height: token.notificationCloseButtonSize,
|
|
74
|
-
borderRadius: token.borderRadiusSM,
|
|
75
|
-
transition: ["color", "background-color"].map((prop) => `${prop} ${motionDurationMid}`).join(", "),
|
|
76
|
-
display: "flex",
|
|
77
|
-
alignItems: "center",
|
|
78
|
-
justifyContent: "center",
|
|
79
|
-
background: "none",
|
|
80
|
-
border: "none",
|
|
81
|
-
"&:hover": {
|
|
82
|
-
color: token.colorIconHover,
|
|
83
|
-
backgroundColor: token.colorBgTextHover
|
|
84
|
-
},
|
|
85
|
-
"&:active": { backgroundColor: token.colorBgTextActive },
|
|
86
|
-
...genFocusStyle(token)
|
|
87
|
-
},
|
|
88
|
-
[`${noticeCls}-progress`]: {
|
|
89
|
-
position: "absolute",
|
|
90
|
-
display: "block",
|
|
91
|
-
appearance: "none",
|
|
92
|
-
inlineSize: `calc(100% - ${unit(borderRadiusLG)} * 2)`,
|
|
93
|
-
left: {
|
|
94
|
-
_skip_check_: true,
|
|
95
|
-
value: borderRadiusLG
|
|
96
|
-
},
|
|
97
|
-
right: {
|
|
98
|
-
_skip_check_: true,
|
|
99
|
-
value: borderRadiusLG
|
|
100
|
-
},
|
|
101
|
-
bottom: 0,
|
|
102
|
-
blockSize: notificationProgressHeight,
|
|
103
|
-
border: 0,
|
|
104
|
-
"&, &::-webkit-progress-bar": {
|
|
105
|
-
borderRadius: borderRadiusLG,
|
|
106
|
-
backgroundColor: `rgba(0, 0, 0, 0.04)`
|
|
107
|
-
},
|
|
108
|
-
"&::-moz-progress-bar": { background: progressBg },
|
|
109
|
-
"&::-webkit-progress-value": {
|
|
110
|
-
borderRadius: borderRadiusLG,
|
|
111
|
-
background: progressBg
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
[`${noticeCls}-actions`]: {
|
|
115
|
-
float: "right",
|
|
116
|
-
marginTop: token.marginSM
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
const genNotificationStyle = (token) => {
|
|
121
|
-
const { componentCls, notificationMarginBottom, notificationMarginEdge, motionDurationMid, motionEaseInOut } = token;
|
|
122
|
-
const noticeCls = `${componentCls}-notice`;
|
|
123
|
-
const fadeOut = new Keyframe("antNotificationFadeOut", {
|
|
124
|
-
"0%": {
|
|
125
|
-
maxHeight: token.animationMaxHeight,
|
|
126
|
-
marginBottom: notificationMarginBottom
|
|
127
|
-
},
|
|
128
|
-
"100%": {
|
|
129
|
-
maxHeight: 0,
|
|
130
|
-
marginBottom: 0,
|
|
131
|
-
paddingTop: 0,
|
|
132
|
-
paddingBottom: 0,
|
|
133
|
-
opacity: 0
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
return [{ [componentCls]: {
|
|
137
|
-
...resetComponent(token),
|
|
138
|
-
position: "fixed",
|
|
139
|
-
zIndex: token.zIndexPopup,
|
|
140
|
-
marginRight: {
|
|
141
|
-
value: notificationMarginEdge,
|
|
142
|
-
_skip_check_: true
|
|
143
|
-
},
|
|
144
|
-
[`${componentCls}-hook-holder`]: { position: "relative" },
|
|
145
|
-
[`${componentCls}-fade-appear-prepare`]: { opacity: "0 !important" },
|
|
146
|
-
[`${componentCls}-fade-enter, ${componentCls}-fade-appear`]: {
|
|
147
|
-
animationDuration: token.motionDurationMid,
|
|
148
|
-
animationTimingFunction: motionEaseInOut,
|
|
149
|
-
animationFillMode: "both",
|
|
150
|
-
opacity: 0,
|
|
151
|
-
animationPlayState: "paused"
|
|
152
|
-
},
|
|
153
|
-
[`${componentCls}-fade-leave`]: {
|
|
154
|
-
animationTimingFunction: motionEaseInOut,
|
|
155
|
-
animationFillMode: "both",
|
|
156
|
-
animationDuration: motionDurationMid,
|
|
157
|
-
animationPlayState: "paused"
|
|
158
|
-
},
|
|
159
|
-
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: { animationPlayState: "running" },
|
|
160
|
-
[`${componentCls}-fade-leave${componentCls}-fade-leave-active`]: {
|
|
161
|
-
animationName: fadeOut,
|
|
162
|
-
animationPlayState: "running"
|
|
163
|
-
},
|
|
164
|
-
"&-rtl": {
|
|
165
|
-
direction: "rtl",
|
|
166
|
-
[`${noticeCls}-actions`]: { float: "left" }
|
|
167
|
-
}
|
|
168
|
-
} }, { [componentCls]: { [`${noticeCls}-wrapper`]: genNoticeStyle(token) } }];
|
|
169
|
-
};
|
|
12
|
+
const DEFAULT_COLLAPSED_STACK_VISIBLE_COUNT = 3;
|
|
13
|
+
/** Provide default public ComponentToken values for Notification. */
|
|
170
14
|
const prepareComponentToken = (token) => ({
|
|
171
15
|
zIndexPopup: token.zIndexPopupBase + CONTAINER_MAX_OFFSET + 50,
|
|
172
16
|
width: 384,
|
|
@@ -176,6 +20,7 @@ const prepareComponentToken = (token) => ({
|
|
|
176
20
|
colorInfoBg: void 0,
|
|
177
21
|
colorWarningBg: void 0
|
|
178
22
|
});
|
|
23
|
+
/** Derive internal Notification style tokens from alias and component tokens. */
|
|
179
24
|
const prepareNotificationToken = (token) => {
|
|
180
25
|
const notificationPaddingVertical = token.paddingMD;
|
|
181
26
|
const notificationPaddingHorizontal = token.paddingLG;
|
|
@@ -188,18 +33,106 @@ const prepareNotificationToken = (token) => {
|
|
|
188
33
|
notificationMarginBottom: token.margin,
|
|
189
34
|
notificationPadding: `${unit(token.paddingMD)} ${unit(token.paddingContentHorizontalLG)}`,
|
|
190
35
|
notificationMarginEdge: token.marginLG,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
notificationProgressHeight: 2
|
|
36
|
+
notificationProgressHeight: 2,
|
|
37
|
+
notificationMotionOffset: 64
|
|
194
38
|
});
|
|
195
39
|
};
|
|
196
|
-
|
|
197
|
-
|
|
40
|
+
/** Build a clip-path inset that keeps stack shadows visible. */
|
|
41
|
+
const getStackNoticeClipPath = (offset) => `inset(${offset} ${offset} ${offset} ${offset})`;
|
|
42
|
+
/** Generate shared list content and motion base styles. */
|
|
43
|
+
const genNotificationListContentStyle = (token) => {
|
|
44
|
+
const { componentCls, motionDurationMid, motionDurationSlow, motionEaseInOut } = token;
|
|
45
|
+
const listContentCls = `${`${componentCls}-list`}-content`;
|
|
46
|
+
return {
|
|
47
|
+
[listContentCls]: {
|
|
48
|
+
position: "relative",
|
|
49
|
+
display: "flex",
|
|
50
|
+
flexShrink: 0,
|
|
51
|
+
flexDirection: "column",
|
|
52
|
+
gap: token.notificationMarginBottom,
|
|
53
|
+
width: "100%",
|
|
54
|
+
willChange: "height, transform",
|
|
55
|
+
transition: "none",
|
|
56
|
+
[`&${listContentCls}-decrease`]: { transition: `height calc(${motionDurationSlow} * 2) ${motionEaseInOut} ${motionDurationMid}` }
|
|
57
|
+
},
|
|
58
|
+
[`${componentCls}-fade`]: {
|
|
59
|
+
backfaceVisibility: "hidden",
|
|
60
|
+
willChange: "transform, opacity"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/** Generate the root holder, list, stack, and RTL styles for notifications. */
|
|
65
|
+
const genNotificationListStyle = (token, config) => {
|
|
66
|
+
const { componentCls, notificationMarginEdge } = token;
|
|
67
|
+
const notificationMarginEdgeVar = "--notification-margin-edge";
|
|
68
|
+
const noticeCls = `${componentCls}-notice`;
|
|
69
|
+
const listCls = `${componentCls}-list`;
|
|
70
|
+
const listWidth = config.listWidthKey ? token.calc(token[config.listWidthKey]).add(token.calc(notificationMarginEdge).mul(2)).equal() : "100%";
|
|
71
|
+
const noticeBeyondStackVisibleCountCls = `${noticeCls}:nth-last-child(n + ${(config.stackVisibleCount ?? DEFAULT_COLLAPSED_STACK_VISIBLE_COUNT) + 1})`;
|
|
72
|
+
const stackShadowClipOffset = unit(token.calc(token.marginXXL).mul(-1).equal());
|
|
73
|
+
const stackNoticeClipPath = getStackNoticeClipPath(stackShadowClipOffset);
|
|
74
|
+
return { [componentCls]: {
|
|
75
|
+
...resetComponent(token),
|
|
76
|
+
[notificationMarginEdgeVar]: unit(notificationMarginEdge),
|
|
77
|
+
position: "fixed",
|
|
78
|
+
zIndex: token.zIndexPopup,
|
|
79
|
+
width: listWidth,
|
|
80
|
+
maxWidth: "100vw",
|
|
81
|
+
height: "100vh",
|
|
82
|
+
overflow: "hidden",
|
|
83
|
+
overscrollBehavior: "contain",
|
|
84
|
+
[`${componentCls}-hook-holder`]: { position: "relative" },
|
|
85
|
+
[`&${listCls}`]: {
|
|
86
|
+
maxHeight: "100vh",
|
|
87
|
+
padding: `var(${notificationMarginEdgeVar})`,
|
|
88
|
+
overflowX: "hidden",
|
|
89
|
+
overflowY: "auto",
|
|
90
|
+
overscrollBehavior: "contain",
|
|
91
|
+
scrollbarWidth: "none",
|
|
92
|
+
msOverflowStyle: "none",
|
|
93
|
+
pointerEvents: "none",
|
|
94
|
+
"&::-webkit-scrollbar": {
|
|
95
|
+
display: "none",
|
|
96
|
+
width: 0,
|
|
97
|
+
height: 0
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
...genNotificationListContentStyle(token),
|
|
101
|
+
[`&${componentCls}-stack`]: {
|
|
102
|
+
[noticeCls]: { clipPath: stackNoticeClipPath },
|
|
103
|
+
[`&:not(${componentCls}-stack-expanded)`]: {
|
|
104
|
+
[noticeCls]: { "--notification-scale": "calc(1 - min(var(--notification-index, 0), 2) * 0.06)" },
|
|
105
|
+
[`${noticeCls}:not(${noticeCls}-stack-in-threshold)`]: {
|
|
106
|
+
opacity: 0,
|
|
107
|
+
pointerEvents: "none"
|
|
108
|
+
},
|
|
109
|
+
[noticeBeyondStackVisibleCountCls]: {
|
|
110
|
+
opacity: 0,
|
|
111
|
+
pointerEvents: "none"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"&-rtl": {
|
|
116
|
+
direction: "rtl",
|
|
117
|
+
[`${noticeCls}-actions`]: { float: "left" }
|
|
118
|
+
}
|
|
119
|
+
} };
|
|
120
|
+
};
|
|
121
|
+
/** Register the PurePanel sub-style component for Notification. */
|
|
122
|
+
const PurePanelStyle = genSubStyleComponent(["Notification", "PurePanel"], (token) => genPurePanelStyle(prepareNotificationToken(token)), prepareComponentToken);
|
|
123
|
+
/** Compose the shared list, item, and placement styles. */
|
|
124
|
+
const sharedGenerateStyle = (token, config) => {
|
|
125
|
+
const itemStyle = config.itemStyle ?? genNotificationStyle;
|
|
198
126
|
return [
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
127
|
+
genNotificationListStyle(token, config),
|
|
128
|
+
itemStyle(token),
|
|
129
|
+
genNotificationPlacementStyle(token)
|
|
202
130
|
];
|
|
131
|
+
};
|
|
132
|
+
/** Register the main style hook for Notification. */
|
|
133
|
+
var style_default = genStyleHooks("Notification", (token) => {
|
|
134
|
+
const notificationToken = prepareNotificationToken(token);
|
|
135
|
+
return sharedGenerateStyle(notificationToken, { listWidthKey: "width" });
|
|
203
136
|
}, prepareComponentToken);
|
|
204
137
|
//#endregion
|
|
205
|
-
export { style_default as default,
|
|
138
|
+
export { PurePanelStyle, style_default as default, prepareNotificationToken, sharedGenerateStyle };
|