@tiny-codes/react-easy 1.1.0 → 1.1.2
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 +17 -0
- package/es/components/FloatDrawer/index.js +1 -1
- package/es/components/FloatDrawer/index.js.map +1 -1
- package/es/components/FloatDrawer/style/index.js +1 -3
- package/es/components/FloatDrawer/style/index.js.map +1 -1
- package/es/components/Loading/index.d.ts +71 -0
- package/es/components/Loading/index.js +96 -0
- package/es/components/Loading/index.js.map +1 -0
- package/es/components/Loading/style/index.d.ts +3 -0
- package/es/components/Loading/style/index.js +27 -0
- package/es/components/Loading/style/index.js.map +1 -0
- package/es/components/OverflowTags/index.js +1 -1
- package/es/components/OverflowTags/index.js.map +1 -1
- package/es/components/OverflowTags/style/index.js +2 -3
- package/es/components/OverflowTags/style/index.js.map +1 -1
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +1 -0
- package/es/components/index.js.map +1 -1
- package/lib/components/FloatDrawer/index.js +1 -1
- package/lib/components/FloatDrawer/index.js.map +2 -2
- package/lib/components/FloatDrawer/style/index.js +1 -1
- package/lib/components/FloatDrawer/style/index.js.map +2 -2
- package/lib/components/Loading/index.d.ts +71 -0
- package/lib/components/Loading/index.js +72 -0
- package/lib/components/Loading/index.js.map +7 -0
- package/lib/components/Loading/style/index.d.ts +3 -0
- package/lib/components/Loading/style/index.js +50 -0
- package/lib/components/Loading/style/index.js.map +7 -0
- package/lib/components/OverflowTags/index.js +1 -1
- package/lib/components/OverflowTags/index.js.map +2 -2
- package/lib/components/OverflowTags/style/index.js +2 -1
- package/lib/components/OverflowTags/style/index.js.map +2 -2
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +3 -0
- package/lib/components/index.js.map +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## 1.1.2
|
|
6
|
+
|
|
7
|
+
2025-7-3
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- 🔥 Add `Loading` component
|
|
12
|
+
- 👀 The className prefix is changed to `ant-easy-***`
|
|
13
|
+
|
|
14
|
+
## 1.1.1
|
|
15
|
+
|
|
16
|
+
2025-7-2
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- 🐞 Fix wrong classPrefix of `OverflowTags` component
|
|
21
|
+
|
|
5
22
|
## 1.1.0
|
|
6
23
|
|
|
7
24
|
2025-7-1
|
|
@@ -44,7 +44,7 @@ var FloatDrawer = function FloatDrawer(props) {
|
|
|
44
44
|
onResize = props.onResize;
|
|
45
45
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
46
46
|
getPrefixCls = _useContext.getPrefixCls;
|
|
47
|
-
var prefixCls = getPrefixCls('
|
|
47
|
+
var prefixCls = getPrefixCls('easy-float-drawer');
|
|
48
48
|
var _useStyle = useStyle(prefixCls),
|
|
49
49
|
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
50
50
|
wrapCSSVar = _useStyle2[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useContext","useEffect","useMemo","useRef","useState","Card","ConfigProvider","classNames","DownOutlined","LeftOutlined","RightOutlined","UpOutlined","useRefFunction","useStyle","jsx","_jsx","jsxs","_jsxs","FloatDrawer","props","open","_props$position","position","cardProps","children","className","classNamesInProps","style","styles","cacheKey","_props$defaultSize","defaultSize","_props$minSize","minSize","_props$maxSize","maxSize","Infinity","onOpenChange","onResize","_useContext","ConfigContext","getPrefixCls","prefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","_useState","_useState2","isOpen","setIsOpen","_useState3","localStorage","getItem","Number","_useState4","size","setSize","sizeMap","type","_defineProperty","_useState5","_useState6","isDragging","setIsDragging","dragStartPos","dragStartSize","classString","concat","closeIcon","openIcon","toggleDrawer","handleResizeStart","e","current","clientY","clientX","preventDefault","handleResize","newSize","setItem","String","handleResizeEnd","window","addEventListener","removeEventListener","drawer","_objectSpread","resizeHandle","onMouseDown","content","bordered","variant","card","expandHandle","onClick","handleIcon"],"sources":["../../../src/components/FloatDrawer/index.tsx"],"sourcesContent":["import type { CSSProperties, FC, ReactNode } from 'react';\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport type { CardProps } from 'antd';\nimport { Card, ConfigProvider } from 'antd';\nimport classNames from 'classnames';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '@ant-design/icons';\nimport useRefFunction from '../../hooks/useRefFunction';\nimport useStyle from './style';\n\nexport interface FloatDrawerProps {\n /**\n * **EN:** Whether the drawer is open\n *\n * **CN:** 抽屉是否打开\n */\n open?: boolean;\n /**\n * **EN:** Position of the drawer\n *\n * **CN:** 抽屉的位置\n *\n * @default 'right'\n */\n position?: 'left' | 'right' | 'top' | 'bottom';\n /**\n * **EN:** Default size of the drawer. If the drawer is placed on the left or right, this is the\n * width, otherwise it is the height.\n *\n * **CN:** 抽屉的默认宽度。如果抽屉放在左侧或右侧,则为宽度,否则为高度。\n *\n * @default 300\n */\n defaultSize?: number;\n /**\n * **EN:** Minimum size of the drawer\n *\n * **CN:** 抽屉的最小宽度\n *\n * @default 0\n */\n minSize?: number;\n /**\n * **EN:** Maximum size of the drawer\n *\n * **CN:** 抽屉的最大宽度\n *\n * @default Infinity\n */\n maxSize?: number;\n /**\n * **EN:** Cache key for storing the drawer size in localStorage. If not set, the size will not be\n * cached.\n *\n * **CN:** 指定一个localStorage缓存键,用于记忆抽屉宽度。如果不设置,则不使用缓存。\n */\n cacheKey?: string;\n /**\n * **EN:** Custom class name for the root element\n *\n * **CN:** 根元素的自定义类名\n */\n className?: string;\n /**\n * **EN:** Custom class names for specific elements\n *\n * **CN:** 特定元素的自定义类名\n */\n classNames?: {\n /**\n * **EN:** Class name for the drawer element\n *\n * **CN:** 抽屉元素的类名\n */\n drawer?: string;\n /**\n * **EN:** Class name for the expand handle\n *\n * **CN:** 展开手柄的类名\n */\n expandHandle?: string;\n /**\n * **EN:** Class name for the resize handle\n *\n * **CN:** 调整大小手柄的类名\n */\n resizeHandle?: string;\n /**\n * **EN:** Class name for the handle icon\n *\n * **CN:** 手柄图标的类名\n */\n handleIcon?: string;\n /**\n * **EN:** Class name for the content area\n *\n * **CN:** 内容区域的类名\n */\n content?: string;\n /**\n * **EN:** Class name for the card element\n *\n * **CN:** 卡片元素的类名\n */\n card?: string;\n };\n /**\n * **EN:** Custom styles for the root element\n *\n * **CN:** 根元素的自定义样式\n */\n style?: CSSProperties;\n /**\n * **EN:** Custom styles for specific elements\n *\n * **CN:** 特定元素的自定义样式\n */\n styles?: {\n /**\n * **EN:** Styles for the drawer element\n *\n * **CN:** 抽屉元素的样式\n */\n drawer?: CSSProperties;\n /**\n * **EN:** Styles for the expand handle\n *\n * **CN:** 展开手柄的样式\n */\n expandHandle?: CSSProperties;\n /**\n * **EN:** Styles for the resize handle\n *\n * **CN:** 调整大小手柄的样式\n */\n resizeHandle?: CSSProperties;\n /**\n * **EN:** Styles for the handle icon\n *\n * **CN:** 手柄图标的样式\n */\n handleIcon?: CSSProperties;\n /**\n * **EN:** Styles for the content area\n *\n * **CN:** 内容区域的样式\n */\n content?: CSSProperties;\n /**\n * **EN:** Styles for the card element\n *\n * **CN:** 卡片元素的样式\n */\n card?: CSSProperties;\n };\n /**\n * **EN:** Custom properties for the card element\n *\n * **CN:** 卡片元素的自定义属性\n */\n cardProps?: Omit<CardProps, 'children'>;\n /**\n * **EN:** Content to be rendered inside the drawer\n *\n * **CN:** 抽屉内容\n */\n children?: ReactNode;\n /**\n * **EN:** Callback function when the open state changes\n *\n * **CN:** 打开状态变化时的回调函数\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * **EN:** Callback function when the drawer is resized\n *\n * **CN:** 抽屉调整大小时的回调函数\n */\n onResize?: (size: number) => void;\n}\n\n/**\n * **EN:** FloatDrawer component for creating a draggable, resizable drawer\n *\n * **CN:** FloatDrawer组件,用于创建可拖动、可调整大小的抽屉\n */\nconst FloatDrawer: FC<FloatDrawerProps> = (props) => {\n const {\n open,\n position = 'right',\n cardProps,\n children,\n className,\n classNames: classNamesInProps,\n style,\n styles,\n cacheKey,\n defaultSize = 300,\n minSize = 0,\n maxSize = +Infinity,\n onOpenChange,\n onResize,\n } = props;\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('re-float-drawer');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const [isOpen, setIsOpen] = useState<boolean>();\n const [size, setSize] = useState(\n cacheKey && localStorage.getItem(cacheKey) ? Number(localStorage.getItem(cacheKey)) || defaultSize : defaultSize\n );\n const sizeMap = useMemo(() => {\n const type = position === 'left' || position === 'right' ? 'width' : 'height';\n return {\n [type]: size,\n };\n }, [position, size]);\n const [isDragging, setIsDragging] = useState(false);\n const dragStartPos = useRef<number>(0);\n const dragStartSize = useRef<number>(size);\n const classString = classNames(\n prefixCls,\n className,\n {\n [`${prefixCls}-open`]: isOpen,\n [`${prefixCls}-closed`]: !isOpen,\n [`${prefixCls}-${position}`]: position,\n },\n hashId,\n cssVarCls\n );\n const closeIcon = useMemo(() => {\n return position === 'left' ? (\n <RightOutlined />\n ) : position === 'top' ? (\n <DownOutlined />\n ) : position === 'bottom' ? (\n <UpOutlined />\n ) : (\n <LeftOutlined />\n );\n }, [position]);\n const openIcon = useMemo(() => {\n return position === 'left' ? (\n <LeftOutlined />\n ) : position === 'top' ? (\n <UpOutlined />\n ) : position === 'bottom' ? (\n <DownOutlined />\n ) : (\n <RightOutlined />\n );\n }, [position]);\n\n // Handle drawer visibility\n const toggleDrawer = () => {\n setIsOpen(!isOpen);\n onOpenChange?.(!isOpen);\n };\n\n // Handle resize events\n const handleResizeStart = useRefFunction((e: React.MouseEvent) => {\n setIsDragging(true);\n if (position === 'top' || position === 'bottom') {\n dragStartPos.current = e.clientY;\n } else {\n dragStartPos.current = e.clientX;\n }\n dragStartSize.current = size;\n e.preventDefault();\n });\n const handleResize = useRefFunction((e: MouseEvent) => {\n if (isDragging) {\n let newSize: number;\n if (position === 'left') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientX);\n } else if (position === 'top') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientY);\n } else if (position === 'bottom') {\n newSize = dragStartSize.current - (e.clientY - dragStartPos.current);\n } else {\n newSize = dragStartSize.current - (e.clientX - dragStartPos.current);\n }\n if (newSize >= minSize && newSize <= maxSize) {\n setSize(newSize);\n if (cacheKey) {\n localStorage.setItem(cacheKey, String(newSize));\n }\n onResize?.(newSize);\n }\n }\n });\n const handleResizeEnd = useRefFunction(() => {\n setIsDragging(false);\n });\n\n // Controlled open state\n useEffect(() => {\n setIsOpen(open);\n }, [open]);\n\n // Handle global events\n useEffect(() => {\n if (isDragging) {\n window.addEventListener('mousemove', handleResize);\n window.addEventListener('mouseup', handleResizeEnd);\n } else {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n }\n return () => {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n };\n }, [isDragging]);\n\n return wrapCSSVar(\n <div className={classString} style={style}>\n <div\n className={classNames(`${prefixCls}-drawer`, classNamesInProps?.drawer)}\n style={{ ...sizeMap, ...styles?.drawer }}\n >\n <div\n className={classNames(\n `${prefixCls}-resize-handle`,\n isDragging && `${prefixCls}-resize-handle-dragging`,\n classNamesInProps?.resizeHandle\n )}\n style={styles?.resizeHandle}\n onMouseDown={handleResizeStart}\n />\n <div className={classNames(`${prefixCls}-content`, classNamesInProps?.content)} style={styles?.content}>\n <Card\n bordered={false}\n variant=\"borderless\"\n className={classNames(`${prefixCls}-card`, classNamesInProps?.card)}\n style={styles?.card}\n {...cardProps}\n >\n {children}\n </Card>\n </div>\n <div\n className={classNames(`${prefixCls}-expand-handle`, classNamesInProps?.expandHandle)}\n style={styles?.expandHandle}\n onClick={toggleDrawer}\n >\n <div\n className={classNames(`${prefixCls}-handle-icon`, classNamesInProps?.handleIcon)}\n style={styles?.handleIcon}\n >\n {isOpen ? openIcon : closeIcon}\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default FloatDrawer;\n"],"mappings":";;;;;;;;;;;;AACA,SAASA,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAExE,SAASC,IAAI,EAAEC,cAAc,QAAQ,MAAM;AAC3C,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,YAAY,EAAEC,YAAY,EAAEC,aAAa,EAAEC,UAAU,QAAQ,mBAAmB;AACzF,OAAOC,cAAc;AACrB,OAAOC,QAAQ;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AA6K/B;AACA;AACA;AACA;AACA;AACA,IAAMC,WAAiC,GAAG,SAApCA,WAAiCA,CAAIC,KAAK,EAAK;EACnD,IACEC,IAAI,GAcFD,KAAK,CAdPC,IAAI;IAAAC,eAAA,GAcFF,KAAK,CAbPG,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,OAAO,GAAAA,eAAA;IAClBE,SAAS,GAYPJ,KAAK,CAZPI,SAAS;IACTC,QAAQ,GAWNL,KAAK,CAXPK,QAAQ;IACRC,SAAS,GAUPN,KAAK,CAVPM,SAAS;IACGC,iBAAiB,GAS3BP,KAAK,CATPZ,UAAU;IACVoB,KAAK,GAQHR,KAAK,CARPQ,KAAK;IACLC,MAAM,GAOJT,KAAK,CAPPS,MAAM;IACNC,QAAQ,GAMNV,KAAK,CANPU,QAAQ;IAAAC,kBAAA,GAMNX,KAAK,CALPY,WAAW;IAAXA,WAAW,GAAAD,kBAAA,cAAG,GAAG,GAAAA,kBAAA;IAAAE,cAAA,GAKfb,KAAK,CAJPc,OAAO;IAAPA,OAAO,GAAAD,cAAA,cAAG,CAAC,GAAAA,cAAA;IAA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AAAjD,QAAA,eAEtBT,IAAA;UACEU,SAAS,EAAElB,UAAU,IAAA+D,MAAA,CAAI5B,SAAS,mBAAgBhB,iBAAiB,aAAjBA,iBAAiB,uBAAjBA,iBAAiB,CAAEwE,UAAU,CAAE;UACjFvE,KAAK,EAAEC,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEsE,UAAW;UAAA1E,QAAA,EAEzB2B,MAAM,GAAGqB,QAAQ,GAAGD;QAAS,CAC3B;MAAC,CACH,CAAC;IAAA,CACH;EAAC,CACH,CACP,CAAC;AACH,CAAC;AAED,eAAerD,WAAW"}
|
|
1
|
+
{"version":3,"names":["useContext","useEffect","useMemo","useRef","useState","Card","ConfigProvider","classNames","DownOutlined","LeftOutlined","RightOutlined","UpOutlined","useRefFunction","useStyle","jsx","_jsx","jsxs","_jsxs","FloatDrawer","props","open","_props$position","position","cardProps","children","className","classNamesInProps","style","styles","cacheKey","_props$defaultSize","defaultSize","_props$minSize","minSize","_props$maxSize","maxSize","Infinity","onOpenChange","onResize","_useContext","ConfigContext","getPrefixCls","prefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","_useState","_useState2","isOpen","setIsOpen","_useState3","localStorage","getItem","Number","_useState4","size","setSize","sizeMap","type","_defineProperty","_useState5","_useState6","isDragging","setIsDragging","dragStartPos","dragStartSize","classString","concat","closeIcon","openIcon","toggleDrawer","handleResizeStart","e","current","clientY","clientX","preventDefault","handleResize","newSize","setItem","String","handleResizeEnd","window","addEventListener","removeEventListener","drawer","_objectSpread","resizeHandle","onMouseDown","content","bordered","variant","card","expandHandle","onClick","handleIcon"],"sources":["../../../src/components/FloatDrawer/index.tsx"],"sourcesContent":["import type { CSSProperties, FC, ReactNode } from 'react';\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport type { CardProps } from 'antd';\nimport { Card, ConfigProvider } from 'antd';\nimport classNames from 'classnames';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '@ant-design/icons';\nimport useRefFunction from '../../hooks/useRefFunction';\nimport useStyle from './style';\n\nexport interface FloatDrawerProps {\n /**\n * **EN:** Whether the drawer is open\n *\n * **CN:** 抽屉是否打开\n */\n open?: boolean;\n /**\n * **EN:** Position of the drawer\n *\n * **CN:** 抽屉的位置\n *\n * @default 'right'\n */\n position?: 'left' | 'right' | 'top' | 'bottom';\n /**\n * **EN:** Default size of the drawer. If the drawer is placed on the left or right, this is the\n * width, otherwise it is the height.\n *\n * **CN:** 抽屉的默认宽度。如果抽屉放在左侧或右侧,则为宽度,否则为高度。\n *\n * @default 300\n */\n defaultSize?: number;\n /**\n * **EN:** Minimum size of the drawer\n *\n * **CN:** 抽屉的最小宽度\n *\n * @default 0\n */\n minSize?: number;\n /**\n * **EN:** Maximum size of the drawer\n *\n * **CN:** 抽屉的最大宽度\n *\n * @default Infinity\n */\n maxSize?: number;\n /**\n * **EN:** Cache key for storing the drawer size in localStorage. If not set, the size will not be\n * cached.\n *\n * **CN:** 指定一个localStorage缓存键,用于记忆抽屉宽度。如果不设置,则不使用缓存。\n */\n cacheKey?: string;\n /**\n * **EN:** Custom class name for the root element\n *\n * **CN:** 根元素的自定义类名\n */\n className?: string;\n /**\n * **EN:** Custom class names for specific elements\n *\n * **CN:** 特定元素的自定义类名\n */\n classNames?: {\n /**\n * **EN:** Class name for the drawer element\n *\n * **CN:** 抽屉元素的类名\n */\n drawer?: string;\n /**\n * **EN:** Class name for the expand handle\n *\n * **CN:** 展开手柄的类名\n */\n expandHandle?: string;\n /**\n * **EN:** Class name for the resize handle\n *\n * **CN:** 调整大小手柄的类名\n */\n resizeHandle?: string;\n /**\n * **EN:** Class name for the handle icon\n *\n * **CN:** 手柄图标的类名\n */\n handleIcon?: string;\n /**\n * **EN:** Class name for the content area\n *\n * **CN:** 内容区域的类名\n */\n content?: string;\n /**\n * **EN:** Class name for the card element\n *\n * **CN:** 卡片元素的类名\n */\n card?: string;\n };\n /**\n * **EN:** Custom styles for the root element\n *\n * **CN:** 根元素的自定义样式\n */\n style?: CSSProperties;\n /**\n * **EN:** Custom styles for specific elements\n *\n * **CN:** 特定元素的自定义样式\n */\n styles?: {\n /**\n * **EN:** Styles for the drawer element\n *\n * **CN:** 抽屉元素的样式\n */\n drawer?: CSSProperties;\n /**\n * **EN:** Styles for the expand handle\n *\n * **CN:** 展开手柄的样式\n */\n expandHandle?: CSSProperties;\n /**\n * **EN:** Styles for the resize handle\n *\n * **CN:** 调整大小手柄的样式\n */\n resizeHandle?: CSSProperties;\n /**\n * **EN:** Styles for the handle icon\n *\n * **CN:** 手柄图标的样式\n */\n handleIcon?: CSSProperties;\n /**\n * **EN:** Styles for the content area\n *\n * **CN:** 内容区域的样式\n */\n content?: CSSProperties;\n /**\n * **EN:** Styles for the card element\n *\n * **CN:** 卡片元素的样式\n */\n card?: CSSProperties;\n };\n /**\n * **EN:** Custom properties for the card element\n *\n * **CN:** 卡片元素的自定义属性\n */\n cardProps?: Omit<CardProps, 'children'>;\n /**\n * **EN:** Content to be rendered inside the drawer\n *\n * **CN:** 抽屉内容\n */\n children?: ReactNode;\n /**\n * **EN:** Callback function when the open state changes\n *\n * **CN:** 打开状态变化时的回调函数\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * **EN:** Callback function when the drawer is resized\n *\n * **CN:** 抽屉调整大小时的回调函数\n */\n onResize?: (size: number) => void;\n}\n\n/**\n * **EN:** FloatDrawer component for creating a draggable, resizable drawer\n *\n * **CN:** FloatDrawer组件,用于创建可拖动、可调整大小的抽屉\n */\nconst FloatDrawer: FC<FloatDrawerProps> = (props) => {\n const {\n open,\n position = 'right',\n cardProps,\n children,\n className,\n classNames: classNamesInProps,\n style,\n styles,\n cacheKey,\n defaultSize = 300,\n minSize = 0,\n maxSize = +Infinity,\n onOpenChange,\n onResize,\n } = props;\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-float-drawer');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const [isOpen, setIsOpen] = useState<boolean>();\n const [size, setSize] = useState(\n cacheKey && localStorage.getItem(cacheKey) ? Number(localStorage.getItem(cacheKey)) || defaultSize : defaultSize\n );\n const sizeMap = useMemo(() => {\n const type = position === 'left' || position === 'right' ? 'width' : 'height';\n return {\n [type]: size,\n };\n }, [position, size]);\n const [isDragging, setIsDragging] = useState(false);\n const dragStartPos = useRef<number>(0);\n const dragStartSize = useRef<number>(size);\n const classString = classNames(\n prefixCls,\n className,\n {\n [`${prefixCls}-open`]: isOpen,\n [`${prefixCls}-closed`]: !isOpen,\n [`${prefixCls}-${position}`]: position,\n },\n hashId,\n cssVarCls\n );\n const closeIcon = useMemo(() => {\n return position === 'left' ? (\n <RightOutlined />\n ) : position === 'top' ? (\n <DownOutlined />\n ) : position === 'bottom' ? (\n <UpOutlined />\n ) : (\n <LeftOutlined />\n );\n }, [position]);\n const openIcon = useMemo(() => {\n return position === 'left' ? (\n <LeftOutlined />\n ) : position === 'top' ? (\n <UpOutlined />\n ) : position === 'bottom' ? (\n <DownOutlined />\n ) : (\n <RightOutlined />\n );\n }, [position]);\n\n // Handle drawer visibility\n const toggleDrawer = () => {\n setIsOpen(!isOpen);\n onOpenChange?.(!isOpen);\n };\n\n // Handle resize events\n const handleResizeStart = useRefFunction((e: React.MouseEvent) => {\n setIsDragging(true);\n if (position === 'top' || position === 'bottom') {\n dragStartPos.current = e.clientY;\n } else {\n dragStartPos.current = e.clientX;\n }\n dragStartSize.current = size;\n e.preventDefault();\n });\n const handleResize = useRefFunction((e: MouseEvent) => {\n if (isDragging) {\n let newSize: number;\n if (position === 'left') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientX);\n } else if (position === 'top') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientY);\n } else if (position === 'bottom') {\n newSize = dragStartSize.current - (e.clientY - dragStartPos.current);\n } else {\n newSize = dragStartSize.current - (e.clientX - dragStartPos.current);\n }\n if (newSize >= minSize && newSize <= maxSize) {\n setSize(newSize);\n if (cacheKey) {\n localStorage.setItem(cacheKey, String(newSize));\n }\n onResize?.(newSize);\n }\n }\n });\n const handleResizeEnd = useRefFunction(() => {\n setIsDragging(false);\n });\n\n // Controlled open state\n useEffect(() => {\n setIsOpen(open);\n }, [open]);\n\n // Handle global events\n useEffect(() => {\n if (isDragging) {\n window.addEventListener('mousemove', handleResize);\n window.addEventListener('mouseup', handleResizeEnd);\n } else {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n }\n return () => {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n };\n }, [isDragging]);\n\n return wrapCSSVar(\n <div className={classString} style={style}>\n <div\n className={classNames(`${prefixCls}-drawer`, classNamesInProps?.drawer)}\n style={{ ...sizeMap, ...styles?.drawer }}\n >\n <div\n className={classNames(\n `${prefixCls}-resize-handle`,\n isDragging && `${prefixCls}-resize-handle-dragging`,\n classNamesInProps?.resizeHandle\n )}\n style={styles?.resizeHandle}\n onMouseDown={handleResizeStart}\n />\n <div className={classNames(`${prefixCls}-content`, classNamesInProps?.content)} style={styles?.content}>\n <Card\n bordered={false}\n variant=\"borderless\"\n className={classNames(`${prefixCls}-card`, classNamesInProps?.card)}\n style={styles?.card}\n {...cardProps}\n >\n {children}\n </Card>\n </div>\n <div\n className={classNames(`${prefixCls}-expand-handle`, classNamesInProps?.expandHandle)}\n style={styles?.expandHandle}\n onClick={toggleDrawer}\n >\n <div\n className={classNames(`${prefixCls}-handle-icon`, classNamesInProps?.handleIcon)}\n style={styles?.handleIcon}\n >\n {isOpen ? openIcon : closeIcon}\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default FloatDrawer;\n"],"mappings":";;;;;;;;;;;;AACA,SAASA,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAExE,SAASC,IAAI,EAAEC,cAAc,QAAQ,MAAM;AAC3C,OAAOC,UAAU,MAAM,YAAY;AACn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WAAW"}
|
|
@@ -144,7 +144,5 @@ var genStyle = function genStyle(token) {
|
|
|
144
144
|
overflow: 'auto'
|
|
145
145
|
})))));
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
149
|
-
export default genStyleHooks('re-float-drawer', genStyle);
|
|
147
|
+
export default genStyleHooks('easy-float-drawer', genStyle);
|
|
150
148
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["genStyleHooks","getColorLuminance","genStyle","token","_componentCls","componentCls","_defineProperty","position","display","overflow","left","top","bottom","right","concat","pointerEvents","transition","height","width","transform","boxShadow","colorFill","zIndex","cursor","color","colorTextTertiary","backgroundColor","colorBgBase","alignItems","justifyContent","colorText","borderRadius","userSelect","lineHeight","border","colorBgTextHover","colorBgTextActive","flexDirection","antCls","flex","minHeight"],"sources":["../../../../src/components/FloatDrawer/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\nimport { getColorLuminance } from '../../../utils';\n\ntype REFloatDrawerToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<REFloatDrawerToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n display: 'flex',\n overflow: 'visible',\n ['&-left']: {\n left: 0,\n top: 0,\n bottom: 0,\n },\n ['&-right']: {\n right: 0,\n top: 0,\n bottom: 0,\n },\n ['&-top']: {\n left: 0,\n right: 0,\n top: 0,\n },\n ['&-bottom']: {\n left: 0,\n right: 0,\n bottom: 0,\n },\n\n [`&${componentCls}-open`]: {\n // visibility: 'visible',\n },\n [`&${componentCls}-closed`]: {\n pointerEvents: 'none',\n },\n [`${componentCls}-drawer`]: {\n transition: 'transform 0.3s ease-in-out',\n overflow: 'visible',\n },\n [`&${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-right ${componentCls}-drawer`]: {\n height: '100%',\n },\n [`&${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-bottom ${componentCls}-drawer`]: {\n width: '100%',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-right ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translate(0, 0)',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer`]: {\n boxShadow: `2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-right ${componentCls}-drawer`]: {\n boxShadow: `-2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-top ${componentCls}-drawer`]: {\n boxShadow: `0 2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n boxShadow: `0 -2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-closed${componentCls}-left ${componentCls}-drawer`]: {\n transform: 'translateX(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-right ${componentCls}-drawer`]: {\n transform: 'translateX(100%)',\n },\n [`&${componentCls}-closed${componentCls}-top ${componentCls}-drawer`]: {\n transform: 'translateY(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translateY(100%)',\n },\n [`${componentCls}-expand-handle`]: {\n position: 'absolute',\n zIndex: 2,\n cursor: 'pointer',\n color: token.colorTextTertiary,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#fafafa' : '#141414',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n pointerEvents: 'all',\n '&:hover': {\n color: token.colorText,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#f0f0f0' : '#1a1a1a',\n },\n },\n [`&${componentCls}-left ${componentCls}-expand-handle,\n &${componentCls}-right ${componentCls}-expand-handle`]: {\n top: '50%',\n width: 24,\n height: 60,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle,\n &${componentCls}-bottom ${componentCls}-expand-handle`]: {\n left: '50%',\n width: 60,\n height: 24,\n },\n [`&${componentCls}-left ${componentCls}-expand-handle`]: {\n right: 0,\n transform: 'translate(100%, -50%)',\n borderRadius: '0 8px 8px 0',\n boxShadow: `2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-right ${componentCls}-expand-handle`]: {\n left: 0,\n transform: 'translate(-100%, -50%)',\n borderRadius: '8px 0 0 8px',\n boxShadow: `-2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle`]: {\n bottom: 0,\n transform: 'translate(-50%, 100%)',\n borderRadius: '0 0 8px 8px',\n boxShadow: `0 2px 5px ${token.colorFill}`,\n },\n [`&${componentCls}-bottom ${componentCls}-expand-handle`]: {\n top: 0,\n transform: 'translate(-50%, -100%)',\n borderRadius: '8px 8px 0 0',\n boxShadow: `0 -2px 5px ${token.colorFill}`,\n },\n [`${componentCls}-handle-icon`]: {\n userSelect: 'none',\n lineHeight: 0,\n },\n [`${componentCls}-resize-handle`]: {\n position: 'absolute',\n border: `1px solid transparent`,\n zIndex: 1,\n backgroundColor: token.colorBgTextHover,\n '&:hover': {\n backgroundColor: token.colorBgTextActive,\n },\n '&&-dragging': {\n backgroundColor: token.colorBgTextActive,\n },\n },\n [`&${componentCls}-left ${componentCls}-resize-handle`]: {\n right: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-right ${componentCls}-resize-handle`]: {\n left: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-top ${componentCls}-resize-handle`]: {\n bottom: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`&${componentCls}-bottom ${componentCls}-resize-handle`]: {\n top: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`${componentCls}-content`]: {\n height: '100%',\n [`${componentCls}-card`]: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n\n [`${token.antCls}-card-body`]: {\n flex: 1,\n minHeight: 0,\n overflow: 'auto',\n },\n },\n },\n },\n };\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport default genStyleHooks('re-float-drawer' as any, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAItD,SAASC,iBAAiB;AAI1B,IAAMC,QAA2C,GAAG,SAA9CA,QAA2CA,CAAIC,KAAK,EAAgB;EAAA,IAAAC,aAAA;EACxE,IAAQC,YAAY,GAAKF,KAAK,CAAtBE,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,GAAAD,aAAA;IACXG,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EAAS,GAAAH,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAF,aAAA,EAClB,QAAQ,EAAG;IACVM,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACV,CAAC,GACA,SAAS,EAAG;IACXC,KAAK,EAAE,CAAC;IACRF,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACV,CAAC,GACA,OAAO,EAAG;IACTF,IAAI,EAAE,CAAC;IACPG,KAAK,EAAE,CAAC;IACRF,GAAG,EAAE;EACP,CAAC,GACA,UAAU,EAAG;IACZD,IAAI,EAAE,CAAC;IACPG,KAAK,EAAE,CAAC;IACRD,MAAM,EAAE;EACV,CAAC,OAAAE,MAAA,CAEIT,YAAY,YAAU;IACzB;EAAA,CACD,OAAAS,MAAA,CACIT,YAAY,cAAY;IAC3BU,aAAa,EAAE;EACjB,CAAC,MAAAD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AAM,EAAE;EAAM,MAAAH,MAAA,CACVT,YAAY,YAAAC,eAAA;IACdE,OAAO,EAAE,MAAM;IACf6B,aAAa,EAAE,QAAQ;IACvBpB,MAAM,EAAE;EAAM,MAAAH,MAAA,CAEVX,KAAK,CAACmC,MAAM,iBAAe;IAC7BC,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE,CAAC;IACZ/B,QAAQ,EAAE;EACZ,CAAC;AAKX,CAAC;;AAED;AACA,eAAeT,aAAa,CAAC,iBAAiB,EAASE,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"names":["genStyleHooks","getColorLuminance","genStyle","token","_componentCls","componentCls","_defineProperty","position","display","overflow","left","top","bottom","right","concat","pointerEvents","transition","height","width","transform","boxShadow","colorFill","zIndex","cursor","color","colorTextTertiary","backgroundColor","colorBgBase","alignItems","justifyContent","colorText","borderRadius","userSelect","lineHeight","border","colorBgTextHover","colorBgTextActive","flexDirection","antCls","flex","minHeight"],"sources":["../../../../src/components/FloatDrawer/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\nimport { getColorLuminance } from '../../../utils';\n\ntype REFloatDrawerToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<REFloatDrawerToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n display: 'flex',\n overflow: 'visible',\n ['&-left']: {\n left: 0,\n top: 0,\n bottom: 0,\n },\n ['&-right']: {\n right: 0,\n top: 0,\n bottom: 0,\n },\n ['&-top']: {\n left: 0,\n right: 0,\n top: 0,\n },\n ['&-bottom']: {\n left: 0,\n right: 0,\n bottom: 0,\n },\n\n [`&${componentCls}-open`]: {\n // visibility: 'visible',\n },\n [`&${componentCls}-closed`]: {\n pointerEvents: 'none',\n },\n [`${componentCls}-drawer`]: {\n transition: 'transform 0.3s ease-in-out',\n overflow: 'visible',\n },\n [`&${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-right ${componentCls}-drawer`]: {\n height: '100%',\n },\n [`&${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-bottom ${componentCls}-drawer`]: {\n width: '100%',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-right ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translate(0, 0)',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer`]: {\n boxShadow: `2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-right ${componentCls}-drawer`]: {\n boxShadow: `-2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-top ${componentCls}-drawer`]: {\n boxShadow: `0 2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n boxShadow: `0 -2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-closed${componentCls}-left ${componentCls}-drawer`]: {\n transform: 'translateX(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-right ${componentCls}-drawer`]: {\n transform: 'translateX(100%)',\n },\n [`&${componentCls}-closed${componentCls}-top ${componentCls}-drawer`]: {\n transform: 'translateY(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translateY(100%)',\n },\n [`${componentCls}-expand-handle`]: {\n position: 'absolute',\n zIndex: 2,\n cursor: 'pointer',\n color: token.colorTextTertiary,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#fafafa' : '#141414',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n pointerEvents: 'all',\n '&:hover': {\n color: token.colorText,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#f0f0f0' : '#1a1a1a',\n },\n },\n [`&${componentCls}-left ${componentCls}-expand-handle,\n &${componentCls}-right ${componentCls}-expand-handle`]: {\n top: '50%',\n width: 24,\n height: 60,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle,\n &${componentCls}-bottom ${componentCls}-expand-handle`]: {\n left: '50%',\n width: 60,\n height: 24,\n },\n [`&${componentCls}-left ${componentCls}-expand-handle`]: {\n right: 0,\n transform: 'translate(100%, -50%)',\n borderRadius: '0 8px 8px 0',\n boxShadow: `2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-right ${componentCls}-expand-handle`]: {\n left: 0,\n transform: 'translate(-100%, -50%)',\n borderRadius: '8px 0 0 8px',\n boxShadow: `-2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle`]: {\n bottom: 0,\n transform: 'translate(-50%, 100%)',\n borderRadius: '0 0 8px 8px',\n boxShadow: `0 2px 5px ${token.colorFill}`,\n },\n [`&${componentCls}-bottom ${componentCls}-expand-handle`]: {\n top: 0,\n transform: 'translate(-50%, -100%)',\n borderRadius: '8px 8px 0 0',\n boxShadow: `0 -2px 5px ${token.colorFill}`,\n },\n [`${componentCls}-handle-icon`]: {\n userSelect: 'none',\n lineHeight: 0,\n },\n [`${componentCls}-resize-handle`]: {\n position: 'absolute',\n border: `1px solid transparent`,\n zIndex: 1,\n backgroundColor: token.colorBgTextHover,\n '&:hover': {\n backgroundColor: token.colorBgTextActive,\n },\n '&&-dragging': {\n backgroundColor: token.colorBgTextActive,\n },\n },\n [`&${componentCls}-left ${componentCls}-resize-handle`]: {\n right: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-right ${componentCls}-resize-handle`]: {\n left: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-top ${componentCls}-resize-handle`]: {\n bottom: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`&${componentCls}-bottom ${componentCls}-resize-handle`]: {\n top: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`${componentCls}-content`]: {\n height: '100%',\n [`${componentCls}-card`]: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n\n [`${token.antCls}-card-body`]: {\n flex: 1,\n minHeight: 0,\n overflow: 'auto',\n },\n },\n },\n },\n };\n};\n\nexport default genStyleHooks('easy-float-drawer' as never, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAItD,SAASC,iBAAiB;AAI1B,IAAMC,QAA2C,GAAG,SAA9CA,QAA2CA,CAAIC,KAAK,EAAgB;EAAA,IAAAC,aAAA;EACxE,IAAQC,YAAY,GAAKF,KAAK,CAAtBE,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,GAAAD,aAAA;IACXG,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EAAS,GAAAH,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAAF,aAAA,EAClB,QAAQ,EAAG;IACVM,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACV,CAAC,GACA,SAAS,EAAG;IACXC,KAAK,EAAE,CAAC;IACRF,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACV,CAAC,GACA,OAAO,EAAG;IACTF,IAAI,EAAE,CAAC;IACPG,KAAK,EAAE,CAAC;IACRF,GAAG,EAAE;EACP,CAAC,GACA,UAAU,EAAG;IACZD,IAAI,EAAE,CAAC;IACPG,KAAK,EAAE,CAAC;IACRD,MAAM,EAAE;EACV,CAAC,OAAAE,MAAA,CAEIT,YAAY,YAAU;IACzB;EAAA,CACD,OAAAS,MAAA,CACIT,YAAY,cAAY;IAC3BU,aAAa,EAAE;EACjB,CAAC,MAAAD,M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M,EAAE;EAAM,MAAAH,MAAA,CACVT,YAAY,YAAAC,eAAA;IACdE,OAAO,EAAE,MAAM;IACf6B,aAAa,EAAE,QAAQ;IACvBpB,MAAM,EAAE;EAAM,MAAAH,MAAA,CAEVX,KAAK,CAACmC,MAAM,iBAAe;IAC7BC,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE,CAAC;IACZ/B,QAAQ,EAAE;EACZ,CAAC;AAKX,CAAC;AAED,eAAeT,aAAa,CAAC,mBAAmB,EAAWE,QAAQ,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type CSSProperties, type FC } from 'react';
|
|
2
|
+
import type { SpinProps } from 'antd';
|
|
3
|
+
export type LoadingProps = SpinProps & {
|
|
4
|
+
/**
|
|
5
|
+
* **EN:** When used independently, the positioning method of the animation:
|
|
6
|
+
*
|
|
7
|
+
* - **absolute** - Uses absolute positioning, and the animation will automatically center itself
|
|
8
|
+
* within the parent container.
|
|
9
|
+
* - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container
|
|
10
|
+
* and center itself.
|
|
11
|
+
*
|
|
12
|
+
* **CN:** 独立使用时,动画的定位方式:
|
|
13
|
+
*
|
|
14
|
+
* - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。
|
|
15
|
+
* - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。
|
|
16
|
+
*
|
|
17
|
+
* @default `flex`
|
|
18
|
+
*/
|
|
19
|
+
mode?: 'absolute' | 'flex';
|
|
20
|
+
/**
|
|
21
|
+
* **EN:** When used independently, set the class name for the mask parent container of the
|
|
22
|
+
* animation
|
|
23
|
+
*
|
|
24
|
+
* **CN:** 在独立使用时,设置动画遮罩父容器的样式类名
|
|
25
|
+
*/
|
|
26
|
+
maskClassName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* **EN:** When used independently, set the style for the mask parent container of the animation
|
|
29
|
+
*
|
|
30
|
+
* **CN:** 在独立使用时,设置动画遮罩父容器的样式
|
|
31
|
+
*/
|
|
32
|
+
maskStyle?: CSSProperties;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* **EN:** Page loading animation component, providing two usage methods:
|
|
36
|
+
*
|
|
37
|
+
* - **Spin** - When the component wraps children, it wraps the `Spin` component around the children
|
|
38
|
+
* to provide animation effects.
|
|
39
|
+
* - **Independent** - Directly render a loading animation that automatically fills the parent
|
|
40
|
+
* container and is centered.
|
|
41
|
+
*
|
|
42
|
+
* **CN:** 页面加载动画组件,提供两种使用方式:
|
|
43
|
+
*
|
|
44
|
+
* - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。
|
|
45
|
+
* - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* 1. Spin surrounding children
|
|
49
|
+
*
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <PageLoading spinning={loading}>
|
|
52
|
+
* <div>This is content</div>
|
|
53
|
+
* </PageLoading>;
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* 2. Independent usage (inline layout)
|
|
57
|
+
*
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <PageLoading />;
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* 3. Centered display within container (absolute layout)
|
|
63
|
+
*
|
|
64
|
+
* ```tsx
|
|
65
|
+
* <div className="container" style={{ position: 'relative' }}>
|
|
66
|
+
* <PageLoading absolute />
|
|
67
|
+
* </div>;
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
declare const Loading: FC<LoadingProps>;
|
|
71
|
+
export default Loading;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["maskClassName", "maskStyle", "mode", "children", "spinning", "className"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
|
+
import { useContext } from 'react';
|
|
17
|
+
import { ConfigProvider, Spin } from 'antd';
|
|
18
|
+
import classNames from 'classnames';
|
|
19
|
+
import useStyle from "./style";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
/**
|
|
22
|
+
* **EN:** Page loading animation component, providing two usage methods:
|
|
23
|
+
*
|
|
24
|
+
* - **Spin** - When the component wraps children, it wraps the `Spin` component around the children
|
|
25
|
+
* to provide animation effects.
|
|
26
|
+
* - **Independent** - Directly render a loading animation that automatically fills the parent
|
|
27
|
+
* container and is centered.
|
|
28
|
+
*
|
|
29
|
+
* **CN:** 页面加载动画组件,提供两种使用方式:
|
|
30
|
+
*
|
|
31
|
+
* - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。
|
|
32
|
+
* - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* 1. Spin surrounding children
|
|
36
|
+
*
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <PageLoading spinning={loading}>
|
|
39
|
+
* <div>This is content</div>
|
|
40
|
+
* </PageLoading>;
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* 2. Independent usage (inline layout)
|
|
44
|
+
*
|
|
45
|
+
* ```tsx
|
|
46
|
+
* <PageLoading />;
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* 3. Centered display within container (absolute layout)
|
|
50
|
+
*
|
|
51
|
+
* ```tsx
|
|
52
|
+
* <div className="container" style={{ position: 'relative' }}>
|
|
53
|
+
* <PageLoading absolute />
|
|
54
|
+
* </div>;
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
var Loading = function Loading(props) {
|
|
58
|
+
var maskClassName = props.maskClassName,
|
|
59
|
+
maskStyle = props.maskStyle,
|
|
60
|
+
_props$mode = props.mode,
|
|
61
|
+
mode = _props$mode === void 0 ? 'flex' : _props$mode,
|
|
62
|
+
children = props.children,
|
|
63
|
+
_props$spinning = props.spinning,
|
|
64
|
+
spinning = _props$spinning === void 0 ? true : _props$spinning,
|
|
65
|
+
className = props.className,
|
|
66
|
+
spinProps = _objectWithoutProperties(props, _excluded);
|
|
67
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
68
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
69
|
+
var prefixCls = getPrefixCls('easy-loading');
|
|
70
|
+
var _useStyle = useStyle(prefixCls),
|
|
71
|
+
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
72
|
+
wrapCSSVar = _useStyle2[0],
|
|
73
|
+
hashId = _useStyle2[1],
|
|
74
|
+
cssVarCls = _useStyle2[2];
|
|
75
|
+
return children ?
|
|
76
|
+
// Use spin to wrap children when children is provided,
|
|
77
|
+
// and control the animation display with the spinning prop.
|
|
78
|
+
wrapCSSVar( /*#__PURE__*/_jsx(Spin, _objectSpread(_objectSpread({
|
|
79
|
+
className: classNames(hashId, cssVarCls, prefixCls, className),
|
|
80
|
+
spinning: spinning
|
|
81
|
+
}, spinProps), {}, {
|
|
82
|
+
children: children
|
|
83
|
+
}))) :
|
|
84
|
+
// Show the loading animation in a wrapper that fills the parent container and centers the animation,
|
|
85
|
+
// and hides the entire component when the animation is off.
|
|
86
|
+
spinning && wrapCSSVar( /*#__PURE__*/_jsx("div", {
|
|
87
|
+
className: classNames(hashId, cssVarCls, prefixCls, maskClassName, mode === 'absolute' ? "".concat(prefixCls, "-absolute") : "".concat(prefixCls, "-flex")),
|
|
88
|
+
style: maskStyle,
|
|
89
|
+
children: /*#__PURE__*/_jsx(Spin, _objectSpread({
|
|
90
|
+
className: className,
|
|
91
|
+
spinning: spinning
|
|
92
|
+
}, spinProps))
|
|
93
|
+
}));
|
|
94
|
+
};
|
|
95
|
+
export default Loading;
|
|
96
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useContext","ConfigProvider","Spin","classNames","useStyle","jsx","_jsx","Loading","props","maskClassName","maskStyle","_props$mode","mode","children","_props$spinning","spinning","className","spinProps","_objectWithoutProperties","_excluded","_useContext","ConfigContext","getPrefixCls","prefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","_objectSpread","concat","style"],"sources":["../../../src/components/Loading/index.tsx"],"sourcesContent":["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * **EN:** When used independently, the positioning method of the animation:\n *\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n *\n * **CN:** 独立使用时,动画的定位方式:\n *\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n *\n * **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n maskClassName?: string;\n /**\n * **EN:** When used independently, set the style for the mask parent container of the animation\n *\n * **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n maskStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const { maskClassName, maskStyle, mode = 'flex', children, spinning = true, className, ...spinProps } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n maskClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={maskStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAsCA,UAAU,QAAQ,OAAO;AAE/D,SAASC,cAAc,EAAEC,IAAI,QAAQ,MAAM;AAC3C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AAkC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,OAAyB,GAAG,SAA5BA,OAAyBA,CAAIC,KAAK,EAAK;EAC3C,IAAQC,aAAa,GAAmFD,KAAK,CAArGC,aAAa;IAAEC,SAAS,GAAwEF,KAAK,CAAtFE,SAAS;IAAAC,WAAA,GAAwEH,KAAK,CAA3EI,IAAI;IAAJA,IAAI,GAAAD,WAAA,cAAG,MAAM,GAAAA,WAAA;IAAEE,QAAQ,GAA+CL,KAAK,CAA5DK,QAAQ;IAAAC,eAAA,GAA+CN,K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|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: (prefixCls: string, rootCls?: string | undefined) => readonly [(node: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, string, string];
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { genStyleHooks } from 'antd/es/theme/internal';
|
|
6
|
+
var genStyle = function genStyle(token) {
|
|
7
|
+
var componentCls = token.componentCls;
|
|
8
|
+
return _defineProperty({}, componentCls, _defineProperty({
|
|
9
|
+
'&-flex': {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
width: '100%',
|
|
14
|
+
height: '100%'
|
|
15
|
+
},
|
|
16
|
+
'&-absolute': {
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
top: '50%',
|
|
19
|
+
left: '50%',
|
|
20
|
+
transform: 'translate(-50%, -50%)'
|
|
21
|
+
}
|
|
22
|
+
}, ":global(.".concat(token.antCls, "-spin)"), {
|
|
23
|
+
lineHeight: 0
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
export default genStyleHooks('easy-loading', genStyle);
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["genStyleHooks","genStyle","token","componentCls","_defineProperty","display","alignItems","justifyContent","width","height","position","top","left","transform","concat","antCls","lineHeight"],"sources":["../../../../src/components/Loading/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-flex': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100%',\n },\n '&-absolute': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n [`:global(.${token.antCls}-spin)`]: {\n lineHeight: 0,\n },\n },\n };\n};\n\nexport default genStyleHooks('easy-loading' as never, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAOtD,IAAMC,QAA0C,GAAG,SAA7CA,QAA0CA,CAAIC,KAAK,EAAgB;EACvE,IAAQC,YAAY,GAAKD,KAAK,CAAtBC,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,EAAAC,eAAA;IACX,QAAQ,EAAE;MACRC,OAAO,EAAE,MAAM;MACfC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE,QAAQ;MACxBC,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE;IACV,CAAC;IACD,YAAY,EAAE;MACZC,QAAQ,EAAE,UAAU;MACpBC,GAAG,EAAE,KAAK;MACVC,IAAI,EAAE,KAAK;MACXC,SAAS,EAAE;IACb;EAAC,eAAAC,MAAA,CACYZ,KAAK,CAACa,MAAM,aAAW;IAClCC,UAAU,EAAE;EACd,CAAC;AAGP,CAAC;AAED,eAAehB,aAAa,CAAC,cAAc,EAAWC,QAAQ,CAAC"}
|
|
@@ -38,7 +38,7 @@ var OverflowTags = function OverflowTags(props) {
|
|
|
38
38
|
token = _theme$useToken.token;
|
|
39
39
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
40
40
|
getPrefixCls = _useContext.getPrefixCls;
|
|
41
|
-
var prefixCls = getPrefixCls('
|
|
41
|
+
var prefixCls = getPrefixCls('easy-float-drawer');
|
|
42
42
|
var _useStyle = useStyle(prefixCls),
|
|
43
43
|
_useStyle2 = _slicedToArray(_useStyle, 3),
|
|
44
44
|
wrapCSSVar = _useStyle2[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useContext","useMemo","ConfigProvider","Dropdown","Tag","theme","PresetColors","classNames","Overflow","random","useStyle","jsx","_jsx","jsxs","_jsxs","OverflowTags","props","_props$tags","tags","randomColors","getTagNameInProps","getTagName","getTagKey","renderTagInProps","renderTag","tagProps","ellipsisTagProps","className","restProps","_objectWithoutProperties","_excluded","_theme$useToken","useToken","token","_useContext","ConfigContext","getPrefixCls","prefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","colors","filter","c","includes","map","color","concat","tag","name","item","_item$color","customProps","_objectSpread","length","children","data","maxCount","renderItem","renderRest","omittedItems","menu","items","_tag$id","type","key","id","label"],"sources":["../../../src/components/OverflowTags/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { useCallback, useContext, useMemo } from 'react';\nimport type { TagProps } from 'antd';\nimport { ConfigProvider, Dropdown, Tag, theme } from 'antd';\nimport { PresetColors } from 'antd/es/theme/internal';\nimport classNames from 'classnames';\nimport type { OverflowProps } from 'rc-overflow';\nimport Overflow from 'rc-overflow';\nimport { random } from '../../utils/math';\nimport useStyle from './style';\n\nexport interface OverflowTagsProps<T extends Record<string, unknown> = Record<string, unknown>>\n extends OverflowProps<T> {\n /**\n * **CN**: 标签集合的数据\n *\n * **EN**: Data collection of tags\n */\n tags: T[] | undefined;\n /**\n * **EN**: Function to get the tag name, default is `tag.name`\n *\n * **CN**: 获取标签名称的函数,默认取`tag.name`\n */\n getTagName?: (tag: T) => ReactNode;\n /**\n * **EN**: Function to get the unique identifier of the tag, default is `tag.id`\n *\n * **CN**: 获取标签唯一标识的函数,默认取`tag.id`\n */\n getTagKey?: (tag: T) => React.Key;\n /**\n * **EN**: Function to render the tag, returns `TagProps`\n *\n * **CN**: 渲染标签的函数,返回`TagProps`\n */\n renderTag?: (tag: T, tags: T[]) => TagProps;\n /**\n * **EN**: Custom properties for the tag component, if `renderTag` is also specified, the latter\n * will override the former\n *\n * **CN**: 自定义标签的组件属性,如果同时指定了`renderTag`,则后者会覆盖前者\n */\n tagProps?: TagProps;\n /**\n * **EN**: When the number of tags exceeds the maximum display count, an ellipsis tag will be\n * shown. This property is used to set the style of the ellipsis tag.\n *\n * **CN**: 当标签数量超过最大显示数量时,会显示省略号的标签,此属性用于设置省略号标签的样式\n */\n ellipsisTagProps?: TagProps;\n /**\n * **EN**: Whether to use random colors, default is `false`. Note that the tag object can also\n * contain a `color` property to specify the color, and the latter takes precedence.\n *\n * **CN**: 是否使用随机颜色,默认`false`。注意,tag对象还可以包含`color`属性来指定颜色,而且后者优先级更高。\n */\n randomColors?: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst OverflowTags = <T extends Record<string, any>>(props: OverflowTagsProps<T>) => {\n const {\n tags = [],\n randomColors,\n getTagName: getTagNameInProps,\n getTagKey,\n renderTag: renderTagInProps,\n tagProps,\n ellipsisTagProps,\n className,\n ...restProps\n } = props;\n const { token } = theme.useToken();\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('
|
|
1
|
+
{"version":3,"names":["useCallback","useContext","useMemo","ConfigProvider","Dropdown","Tag","theme","PresetColors","classNames","Overflow","random","useStyle","jsx","_jsx","jsxs","_jsxs","OverflowTags","props","_props$tags","tags","randomColors","getTagNameInProps","getTagName","getTagKey","renderTagInProps","renderTag","tagProps","ellipsisTagProps","className","restProps","_objectWithoutProperties","_excluded","_theme$useToken","useToken","token","_useContext","ConfigContext","getPrefixCls","prefixCls","_useStyle","_useStyle2","_slicedToArray","wrapCSSVar","hashId","cssVarCls","colors","filter","c","includes","map","color","concat","tag","name","item","_item$color","customProps","_objectSpread","length","children","data","maxCount","renderItem","renderRest","omittedItems","menu","items","_tag$id","type","key","id","label"],"sources":["../../../src/components/OverflowTags/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { useCallback, useContext, useMemo } from 'react';\nimport type { TagProps } from 'antd';\nimport { ConfigProvider, Dropdown, Tag, theme } from 'antd';\nimport { PresetColors } from 'antd/es/theme/internal';\nimport classNames from 'classnames';\nimport type { OverflowProps } from 'rc-overflow';\nimport Overflow from 'rc-overflow';\nimport { random } from '../../utils/math';\nimport useStyle from './style';\n\nexport interface OverflowTagsProps<T extends Record<string, unknown> = Record<string, unknown>>\n extends OverflowProps<T> {\n /**\n * **CN**: 标签集合的数据\n *\n * **EN**: Data collection of tags\n */\n tags: T[] | undefined;\n /**\n * **EN**: Function to get the tag name, default is `tag.name`\n *\n * **CN**: 获取标签名称的函数,默认取`tag.name`\n */\n getTagName?: (tag: T) => ReactNode;\n /**\n * **EN**: Function to get the unique identifier of the tag, default is `tag.id`\n *\n * **CN**: 获取标签唯一标识的函数,默认取`tag.id`\n */\n getTagKey?: (tag: T) => React.Key;\n /**\n * **EN**: Function to render the tag, returns `TagProps`\n *\n * **CN**: 渲染标签的函数,返回`TagProps`\n */\n renderTag?: (tag: T, tags: T[]) => TagProps;\n /**\n * **EN**: Custom properties for the tag component, if `renderTag` is also specified, the latter\n * will override the former\n *\n * **CN**: 自定义标签的组件属性,如果同时指定了`renderTag`,则后者会覆盖前者\n */\n tagProps?: TagProps;\n /**\n * **EN**: When the number of tags exceeds the maximum display count, an ellipsis tag will be\n * shown. This property is used to set the style of the ellipsis tag.\n *\n * **CN**: 当标签数量超过最大显示数量时,会显示省略号的标签,此属性用于设置省略号标签的样式\n */\n ellipsisTagProps?: TagProps;\n /**\n * **EN**: Whether to use random colors, default is `false`. Note that the tag object can also\n * contain a `color` property to specify the color, and the latter takes precedence.\n *\n * **CN**: 是否使用随机颜色,默认`false`。注意,tag对象还可以包含`color`属性来指定颜色,而且后者优先级更高。\n */\n randomColors?: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst OverflowTags = <T extends Record<string, any>>(props: OverflowTagsProps<T>) => {\n const {\n tags = [],\n randomColors,\n getTagName: getTagNameInProps,\n getTagKey,\n renderTag: renderTagInProps,\n tagProps,\n ellipsisTagProps,\n className,\n ...restProps\n } = props;\n const { token } = theme.useToken();\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-float-drawer');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n const colors = useMemo(\n () => PresetColors.filter((c) => !['lime', 'yellow', 'magenta'].includes(c)).map((color) => token[`${color}-3`]),\n [token]\n );\n const getTagName = useCallback(\n (tag: T) => {\n return getTagNameInProps ? getTagNameInProps(tag) : tag.name;\n },\n [getTagNameInProps]\n );\n const renderTag = (item: T) => {\n const customProps = renderTagInProps?.(item, tags);\n return (\n <Tag\n {...tagProps}\n color={randomColors ? colors[random(0, colors.length - 1)] : (item.color ?? 'default')}\n {...customProps}\n >\n {getTagName(item)}\n </Tag>\n );\n };\n\n return wrapCSSVar(\n <Overflow<T>\n className={classNames(hashId, cssVarCls, prefixCls, className)}\n data={tags}\n maxCount=\"responsive\"\n renderItem={renderTag}\n renderRest={(omittedItems) => (\n <Dropdown\n menu={{\n items: omittedItems.map((tag) => ({\n type: 'item',\n key: getTagKey ? getTagKey(tag) : (tag.id ?? getTagName(tag)),\n label: getTagName(tag),\n })),\n }}\n >\n <Tag {...ellipsisTagProps}>+ {omittedItems.length}...</Tag>\n </Dropdown>\n )}\n {...restProps}\n />\n );\n};\n\nexport default OverflowTags;\n"],"mappings":";;;;;;;;;;;;;;;AACA,SAASA,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAExD,SAASC,cAAc,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,MAAM;AAC3D,SAASC,YAAY,QAAQ,wBAAwB;AACrD,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,MAAM;AACf,OAAOC,QAAQ;AAAgB,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAmD/B;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAmCC,KAA2B,EAAK;EACnF,IAAAC,WAAA,GAUID,KAAK,CATPE,IAAI;IAAJA,IAAI,GAAAD,WAAA,cAAG,EAAE,GAAAA,WAAA;IACTE,YAAY,GAQVH,KAAK,CARPG,YAAY;IACAC,iBAAiB,GAO3BJ,KAAK,CAPPK,UAAU;IACVC,SAAS,GAMPN,KAAK,CANPM,SAAS;IACEC,gBAAgB,GAKzBP,KAAK,CALPQ,SAAS;IACTC,QAAQ,GAINT,KAAK,CAJPS,QAAQ;IACRC,gBAAgB,GAGdV,KAAK,CAHPU,gBAAgB;IAChBC,SAAS,GAEPX,KAAK,CAFPW,SAAS;IACNC,SAAS,GAAAC,wBAAA,CACVb,KAAK,EAAAc,SAAA;EACT,IAAAC,eAAA,GAAkB1B,KAAK,CAAC2B,QAAQ,CAAC,CAAC;IAA1BC,KAAK,GAAAF,eAAA,CAALE,KAAK;EACb,IAAAC,WAAA,GAAyBlC,UAAU,CAACE,cAAc,CAACiC,aAAa,CAAC;IAAzDC,YAAY,GAAAF,WAAA,CAAZE,YAAY;EACpB,IAAMC,SAAS,GAAGD,YAA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AI;IAAC,EACd,CAAC;EAEV,CAAC;EAED,OAAOZ,UAAU,eACf7B,IAAA,CAACJ,QAAQ,EAAAgD,aAAA;IACP7B,SAAS,EAAEpB,UAAU,CAACmC,MAAM,EAAEC,SAAS,EAAEN,SAAS,EAAEV,SAAS,CAAE;IAC/DgC,IAAI,EAAEzC,IAAK;IACX0C,QAAQ,EAAC,YAAY;IACrBC,UAAU,EAAErC,SAAU;IACtBsC,UAAU,EAAE,SAAAA,WAACC,YAAY;MAAA,oBACvBnD,IAAA,CAACT,QAAQ;QACP6D,IAAI,EAAE;UACJC,KAAK,EAAEF,YAAY,CAACf,GAAG,CAAC,UAACG,GAAG;YAAA,IAAAe,OAAA;YAAA,OAAM;cAChCC,IAAI,EAAE,MAAM;cACZC,GAAG,EAAE9C,SAAS,GAAGA,SAAS,CAAC6B,GAAG,CAAC,IAAAe,OAAA,GAAIf,GAAG,CAACkB,EAAE,cAAAH,OAAA,cAAAA,OAAA,GAAI7C,UAAU,CAAC8B,GAAG,CAAE;cAC7DmB,KAAK,EAAEjD,UAAU,CAAC8B,GAAG;YACvB,CAAC;UAAA,CAAC;QACJ,CAAE;QAAAO,QAAA,eAEF5C,KAAA,CAACV,GAAG,EAAAoD,aAAA,CAAAA,aAAA,KAAK9B,gBAAgB;UAAAgC,QAAA,GAAE,IAAE,EAACK,YAAY,CAACN,MAAM,EAAC,KAAG;QAAA,EAAK;MAAC,CACnD,CAAC;IAAA;EACX,GACE7B,SAAS,CACd,CACH,CAAC;AACH,CAAC;AAED,eAAeb,YAAY"}
|
|
@@ -8,11 +8,10 @@ var genStyle = function genStyle(token) {
|
|
|
8
8
|
return _defineProperty({}, componentCls, {
|
|
9
9
|
display: 'flex',
|
|
10
10
|
flexWrap: 'wrap',
|
|
11
|
+
width: '100%',
|
|
11
12
|
maxWidth: '100%',
|
|
12
13
|
position: 'relative'
|
|
13
14
|
});
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
export default genStyleHooks('re-overflow-tags', genStyle);
|
|
16
|
+
export default genStyleHooks('easy-overflow-tags', genStyle);
|
|
18
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["genStyleHooks","genStyle","token","componentCls","_defineProperty","display","flexWrap","maxWidth","position"],"sources":["../../../../src/components/OverflowTags/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n display: 'flex',\n flexWrap: 'wrap',\n maxWidth: '100%',\n position: 'relative',\n },\n };\n};\n\
|
|
1
|
+
{"version":3,"names":["genStyleHooks","genStyle","token","componentCls","_defineProperty","display","flexWrap","width","maxWidth","position"],"sources":["../../../../src/components/OverflowTags/style/index.ts"],"sourcesContent":["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n maxWidth: '100%',\n position: 'relative',\n },\n };\n};\n\nexport default genStyleHooks('easy-overflow-tags' as never, genStyle);\n"],"mappings":";;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAOtD,IAAMC,QAA0C,GAAG,SAA7CA,QAA0CA,CAAIC,KAAK,EAAgB;EACvE,IAAQC,YAAY,GAAKD,KAAK,CAAtBC,YAAY;EACpB,OAAAC,eAAA,KACGD,YAAY,EAAG;IACdE,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE,MAAM;IAChBC,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE,MAAM;IAChBC,QAAQ,EAAE;EACZ,CAAC;AAEL,CAAC;AAED,eAAeT,aAAa,CAAC,oBAAoB,EAAWC,QAAQ,CAAC"}
|
package/es/components/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { default as ConfirmAction } from './ConfirmAction';
|
|
|
10
10
|
export { default as DeleteConfirmAction } from './DeleteConfirmAction';
|
|
11
11
|
export type { FloatDrawerProps } from './FloatDrawer';
|
|
12
12
|
export { default as FloatDrawer } from './FloatDrawer';
|
|
13
|
+
export type { LoadingProps } from './Loading';
|
|
14
|
+
export { default as Loading } from './Loading';
|
|
13
15
|
export type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';
|
|
14
16
|
export { withDefaultModalActionProps, withModalAction } from './ModalAction';
|
|
15
17
|
export { default as ModalAction } from './ModalAction';
|
package/es/components/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { default as ConfirmAction } from "./ConfirmAction";
|
|
|
7
7
|
// export * from './DeleteConfirmAction';
|
|
8
8
|
export { default as DeleteConfirmAction } from "./DeleteConfirmAction";
|
|
9
9
|
export { default as FloatDrawer } from "./FloatDrawer";
|
|
10
|
+
export { default as Loading } from "./Loading";
|
|
10
11
|
export { withDefaultModalActionProps, withModalAction } from "./ModalAction";
|
|
11
12
|
export { default as ModalAction } from "./ModalAction";
|
|
12
13
|
export { default as OverflowTags } from "./OverflowTags";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","BreakLines","ConfigProvider","ReactEasyContext","withDefaultConfirmActionProps","ConfirmAction","DeleteConfirmAction","FloatDrawer","withDefaultModalActionProps","withModalAction","ModalAction","OverflowTags"],"sources":["../../src/components/index.tsx"],"sourcesContent":["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],"mappings":"AACA,SAASA,OAAO,IAAIC,UAAU;AAG9B,SAASD,OAAO,IAAIE,cAAc;AAElC,SAASF,OAAO,IAAIG,gBAAgB;AAGpC,SAASC,6BAA6B;AACtC,SAASJ,OAAO,IAAIK,aAAa;;AAEjC;AACA,SAASL,OAAO,IAAIM,mBAAmB;AAGvC,SAASN,OAAO,IAAIO,WAAW;AAG/B,SAASC,2BAA2B,EAAEC,eAAe;AACrD,
|
|
1
|
+
{"version":3,"names":["default","BreakLines","ConfigProvider","ReactEasyContext","withDefaultConfirmActionProps","ConfirmAction","DeleteConfirmAction","FloatDrawer","Loading","withDefaultModalActionProps","withModalAction","ModalAction","OverflowTags"],"sources":["../../src/components/index.tsx"],"sourcesContent":["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { LoadingProps } from './Loading';\nexport { default as Loading } from './Loading';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],"mappings":"AACA,SAASA,OAAO,IAAIC,UAAU;AAG9B,SAASD,OAAO,IAAIE,cAAc;AAElC,SAASF,OAAO,IAAIG,gBAAgB;AAGpC,SAASC,6BAA6B;AACtC,SAASJ,OAAO,IAAIK,aAAa;;AAEjC;AACA,SAASL,OAAO,IAAIM,mBAAmB;AAGvC,SAASN,OAAO,IAAIO,WAAW;AAG/B,SAASP,OAAO,IAAIQ,OAAO;AAG3B,SAASC,2BAA2B,EAAEC,eAAe;AACrD,SAASV,OAAO,IAAIW,WAAW;AAG/B,SAASX,OAAO,IAAIY,YAAY"}
|
|
@@ -56,7 +56,7 @@ var FloatDrawer = (props) => {
|
|
|
56
56
|
onResize
|
|
57
57
|
} = props;
|
|
58
58
|
const { getPrefixCls } = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
|
|
59
|
-
const prefixCls = getPrefixCls("
|
|
59
|
+
const prefixCls = getPrefixCls("easy-float-drawer");
|
|
60
60
|
const [wrapCSSVar, hashId, cssVarCls] = (0, import_style.default)(prefixCls);
|
|
61
61
|
const [isOpen, setIsOpen] = (0, import_react.useState)();
|
|
62
62
|
const [size, setSize] = (0, import_react.useState)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/FloatDrawer/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { CSSProperties, FC, ReactNode } from 'react';\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport type { CardProps } from 'antd';\nimport { Card, ConfigProvider } from 'antd';\nimport classNames from 'classnames';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '@ant-design/icons';\nimport useRefFunction from '../../hooks/useRefFunction';\nimport useStyle from './style';\n\nexport interface FloatDrawerProps {\n /**\n * **EN:** Whether the drawer is open\n *\n * **CN:** 抽屉是否打开\n */\n open?: boolean;\n /**\n * **EN:** Position of the drawer\n *\n * **CN:** 抽屉的位置\n *\n * @default 'right'\n */\n position?: 'left' | 'right' | 'top' | 'bottom';\n /**\n * **EN:** Default size of the drawer. If the drawer is placed on the left or right, this is the\n * width, otherwise it is the height.\n *\n * **CN:** 抽屉的默认宽度。如果抽屉放在左侧或右侧,则为宽度,否则为高度。\n *\n * @default 300\n */\n defaultSize?: number;\n /**\n * **EN:** Minimum size of the drawer\n *\n * **CN:** 抽屉的最小宽度\n *\n * @default 0\n */\n minSize?: number;\n /**\n * **EN:** Maximum size of the drawer\n *\n * **CN:** 抽屉的最大宽度\n *\n * @default Infinity\n */\n maxSize?: number;\n /**\n * **EN:** Cache key for storing the drawer size in localStorage. If not set, the size will not be\n * cached.\n *\n * **CN:** 指定一个localStorage缓存键,用于记忆抽屉宽度。如果不设置,则不使用缓存。\n */\n cacheKey?: string;\n /**\n * **EN:** Custom class name for the root element\n *\n * **CN:** 根元素的自定义类名\n */\n className?: string;\n /**\n * **EN:** Custom class names for specific elements\n *\n * **CN:** 特定元素的自定义类名\n */\n classNames?: {\n /**\n * **EN:** Class name for the drawer element\n *\n * **CN:** 抽屉元素的类名\n */\n drawer?: string;\n /**\n * **EN:** Class name for the expand handle\n *\n * **CN:** 展开手柄的类名\n */\n expandHandle?: string;\n /**\n * **EN:** Class name for the resize handle\n *\n * **CN:** 调整大小手柄的类名\n */\n resizeHandle?: string;\n /**\n * **EN:** Class name for the handle icon\n *\n * **CN:** 手柄图标的类名\n */\n handleIcon?: string;\n /**\n * **EN:** Class name for the content area\n *\n * **CN:** 内容区域的类名\n */\n content?: string;\n /**\n * **EN:** Class name for the card element\n *\n * **CN:** 卡片元素的类名\n */\n card?: string;\n };\n /**\n * **EN:** Custom styles for the root element\n *\n * **CN:** 根元素的自定义样式\n */\n style?: CSSProperties;\n /**\n * **EN:** Custom styles for specific elements\n *\n * **CN:** 特定元素的自定义样式\n */\n styles?: {\n /**\n * **EN:** Styles for the drawer element\n *\n * **CN:** 抽屉元素的样式\n */\n drawer?: CSSProperties;\n /**\n * **EN:** Styles for the expand handle\n *\n * **CN:** 展开手柄的样式\n */\n expandHandle?: CSSProperties;\n /**\n * **EN:** Styles for the resize handle\n *\n * **CN:** 调整大小手柄的样式\n */\n resizeHandle?: CSSProperties;\n /**\n * **EN:** Styles for the handle icon\n *\n * **CN:** 手柄图标的样式\n */\n handleIcon?: CSSProperties;\n /**\n * **EN:** Styles for the content area\n *\n * **CN:** 内容区域的样式\n */\n content?: CSSProperties;\n /**\n * **EN:** Styles for the card element\n *\n * **CN:** 卡片元素的样式\n */\n card?: CSSProperties;\n };\n /**\n * **EN:** Custom properties for the card element\n *\n * **CN:** 卡片元素的自定义属性\n */\n cardProps?: Omit<CardProps, 'children'>;\n /**\n * **EN:** Content to be rendered inside the drawer\n *\n * **CN:** 抽屉内容\n */\n children?: ReactNode;\n /**\n * **EN:** Callback function when the open state changes\n *\n * **CN:** 打开状态变化时的回调函数\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * **EN:** Callback function when the drawer is resized\n *\n * **CN:** 抽屉调整大小时的回调函数\n */\n onResize?: (size: number) => void;\n}\n\n/**\n * **EN:** FloatDrawer component for creating a draggable, resizable drawer\n *\n * **CN:** FloatDrawer组件,用于创建可拖动、可调整大小的抽屉\n */\nconst FloatDrawer: FC<FloatDrawerProps> = (props) => {\n const {\n open,\n position = 'right',\n cardProps,\n children,\n className,\n classNames: classNamesInProps,\n style,\n styles,\n cacheKey,\n defaultSize = 300,\n minSize = 0,\n maxSize = +Infinity,\n onOpenChange,\n onResize,\n } = props;\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiE;AAEjE,kBAAqC;AACrC,wBAAuB;AACvB,mBAAsE;AACtE,4BAA2B;AAC3B,mBAAqB;AAkLrB,IAAM,cAAoC,CAAC,UAAU;AACnD,QAAM;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,UAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,aAAa,QAAI,yBAAW,2BAAe,aAAa;AAChE,QAAM,YAAY,aAAa,
|
|
4
|
+
"sourcesContent": ["import type { CSSProperties, FC, ReactNode } from 'react';\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport type { CardProps } from 'antd';\nimport { Card, ConfigProvider } from 'antd';\nimport classNames from 'classnames';\nimport { DownOutlined, LeftOutlined, RightOutlined, UpOutlined } from '@ant-design/icons';\nimport useRefFunction from '../../hooks/useRefFunction';\nimport useStyle from './style';\n\nexport interface FloatDrawerProps {\n /**\n * **EN:** Whether the drawer is open\n *\n * **CN:** 抽屉是否打开\n */\n open?: boolean;\n /**\n * **EN:** Position of the drawer\n *\n * **CN:** 抽屉的位置\n *\n * @default 'right'\n */\n position?: 'left' | 'right' | 'top' | 'bottom';\n /**\n * **EN:** Default size of the drawer. If the drawer is placed on the left or right, this is the\n * width, otherwise it is the height.\n *\n * **CN:** 抽屉的默认宽度。如果抽屉放在左侧或右侧,则为宽度,否则为高度。\n *\n * @default 300\n */\n defaultSize?: number;\n /**\n * **EN:** Minimum size of the drawer\n *\n * **CN:** 抽屉的最小宽度\n *\n * @default 0\n */\n minSize?: number;\n /**\n * **EN:** Maximum size of the drawer\n *\n * **CN:** 抽屉的最大宽度\n *\n * @default Infinity\n */\n maxSize?: number;\n /**\n * **EN:** Cache key for storing the drawer size in localStorage. If not set, the size will not be\n * cached.\n *\n * **CN:** 指定一个localStorage缓存键,用于记忆抽屉宽度。如果不设置,则不使用缓存。\n */\n cacheKey?: string;\n /**\n * **EN:** Custom class name for the root element\n *\n * **CN:** 根元素的自定义类名\n */\n className?: string;\n /**\n * **EN:** Custom class names for specific elements\n *\n * **CN:** 特定元素的自定义类名\n */\n classNames?: {\n /**\n * **EN:** Class name for the drawer element\n *\n * **CN:** 抽屉元素的类名\n */\n drawer?: string;\n /**\n * **EN:** Class name for the expand handle\n *\n * **CN:** 展开手柄的类名\n */\n expandHandle?: string;\n /**\n * **EN:** Class name for the resize handle\n *\n * **CN:** 调整大小手柄的类名\n */\n resizeHandle?: string;\n /**\n * **EN:** Class name for the handle icon\n *\n * **CN:** 手柄图标的类名\n */\n handleIcon?: string;\n /**\n * **EN:** Class name for the content area\n *\n * **CN:** 内容区域的类名\n */\n content?: string;\n /**\n * **EN:** Class name for the card element\n *\n * **CN:** 卡片元素的类名\n */\n card?: string;\n };\n /**\n * **EN:** Custom styles for the root element\n *\n * **CN:** 根元素的自定义样式\n */\n style?: CSSProperties;\n /**\n * **EN:** Custom styles for specific elements\n *\n * **CN:** 特定元素的自定义样式\n */\n styles?: {\n /**\n * **EN:** Styles for the drawer element\n *\n * **CN:** 抽屉元素的样式\n */\n drawer?: CSSProperties;\n /**\n * **EN:** Styles for the expand handle\n *\n * **CN:** 展开手柄的样式\n */\n expandHandle?: CSSProperties;\n /**\n * **EN:** Styles for the resize handle\n *\n * **CN:** 调整大小手柄的样式\n */\n resizeHandle?: CSSProperties;\n /**\n * **EN:** Styles for the handle icon\n *\n * **CN:** 手柄图标的样式\n */\n handleIcon?: CSSProperties;\n /**\n * **EN:** Styles for the content area\n *\n * **CN:** 内容区域的样式\n */\n content?: CSSProperties;\n /**\n * **EN:** Styles for the card element\n *\n * **CN:** 卡片元素的样式\n */\n card?: CSSProperties;\n };\n /**\n * **EN:** Custom properties for the card element\n *\n * **CN:** 卡片元素的自定义属性\n */\n cardProps?: Omit<CardProps, 'children'>;\n /**\n * **EN:** Content to be rendered inside the drawer\n *\n * **CN:** 抽屉内容\n */\n children?: ReactNode;\n /**\n * **EN:** Callback function when the open state changes\n *\n * **CN:** 打开状态变化时的回调函数\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * **EN:** Callback function when the drawer is resized\n *\n * **CN:** 抽屉调整大小时的回调函数\n */\n onResize?: (size: number) => void;\n}\n\n/**\n * **EN:** FloatDrawer component for creating a draggable, resizable drawer\n *\n * **CN:** FloatDrawer组件,用于创建可拖动、可调整大小的抽屉\n */\nconst FloatDrawer: FC<FloatDrawerProps> = (props) => {\n const {\n open,\n position = 'right',\n cardProps,\n children,\n className,\n classNames: classNamesInProps,\n style,\n styles,\n cacheKey,\n defaultSize = 300,\n minSize = 0,\n maxSize = +Infinity,\n onOpenChange,\n onResize,\n } = props;\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-float-drawer');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const [isOpen, setIsOpen] = useState<boolean>();\n const [size, setSize] = useState(\n cacheKey && localStorage.getItem(cacheKey) ? Number(localStorage.getItem(cacheKey)) || defaultSize : defaultSize\n );\n const sizeMap = useMemo(() => {\n const type = position === 'left' || position === 'right' ? 'width' : 'height';\n return {\n [type]: size,\n };\n }, [position, size]);\n const [isDragging, setIsDragging] = useState(false);\n const dragStartPos = useRef<number>(0);\n const dragStartSize = useRef<number>(size);\n const classString = classNames(\n prefixCls,\n className,\n {\n [`${prefixCls}-open`]: isOpen,\n [`${prefixCls}-closed`]: !isOpen,\n [`${prefixCls}-${position}`]: position,\n },\n hashId,\n cssVarCls\n );\n const closeIcon = useMemo(() => {\n return position === 'left' ? (\n <RightOutlined />\n ) : position === 'top' ? (\n <DownOutlined />\n ) : position === 'bottom' ? (\n <UpOutlined />\n ) : (\n <LeftOutlined />\n );\n }, [position]);\n const openIcon = useMemo(() => {\n return position === 'left' ? (\n <LeftOutlined />\n ) : position === 'top' ? (\n <UpOutlined />\n ) : position === 'bottom' ? (\n <DownOutlined />\n ) : (\n <RightOutlined />\n );\n }, [position]);\n\n // Handle drawer visibility\n const toggleDrawer = () => {\n setIsOpen(!isOpen);\n onOpenChange?.(!isOpen);\n };\n\n // Handle resize events\n const handleResizeStart = useRefFunction((e: React.MouseEvent) => {\n setIsDragging(true);\n if (position === 'top' || position === 'bottom') {\n dragStartPos.current = e.clientY;\n } else {\n dragStartPos.current = e.clientX;\n }\n dragStartSize.current = size;\n e.preventDefault();\n });\n const handleResize = useRefFunction((e: MouseEvent) => {\n if (isDragging) {\n let newSize: number;\n if (position === 'left') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientX);\n } else if (position === 'top') {\n newSize = dragStartSize.current - (dragStartPos.current - e.clientY);\n } else if (position === 'bottom') {\n newSize = dragStartSize.current - (e.clientY - dragStartPos.current);\n } else {\n newSize = dragStartSize.current - (e.clientX - dragStartPos.current);\n }\n if (newSize >= minSize && newSize <= maxSize) {\n setSize(newSize);\n if (cacheKey) {\n localStorage.setItem(cacheKey, String(newSize));\n }\n onResize?.(newSize);\n }\n }\n });\n const handleResizeEnd = useRefFunction(() => {\n setIsDragging(false);\n });\n\n // Controlled open state\n useEffect(() => {\n setIsOpen(open);\n }, [open]);\n\n // Handle global events\n useEffect(() => {\n if (isDragging) {\n window.addEventListener('mousemove', handleResize);\n window.addEventListener('mouseup', handleResizeEnd);\n } else {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n }\n return () => {\n window.removeEventListener('mousemove', handleResize);\n window.removeEventListener('mouseup', handleResizeEnd);\n };\n }, [isDragging]);\n\n return wrapCSSVar(\n <div className={classString} style={style}>\n <div\n className={classNames(`${prefixCls}-drawer`, classNamesInProps?.drawer)}\n style={{ ...sizeMap, ...styles?.drawer }}\n >\n <div\n className={classNames(\n `${prefixCls}-resize-handle`,\n isDragging && `${prefixCls}-resize-handle-dragging`,\n classNamesInProps?.resizeHandle\n )}\n style={styles?.resizeHandle}\n onMouseDown={handleResizeStart}\n />\n <div className={classNames(`${prefixCls}-content`, classNamesInProps?.content)} style={styles?.content}>\n <Card\n bordered={false}\n variant=\"borderless\"\n className={classNames(`${prefixCls}-card`, classNamesInProps?.card)}\n style={styles?.card}\n {...cardProps}\n >\n {children}\n </Card>\n </div>\n <div\n className={classNames(`${prefixCls}-expand-handle`, classNamesInProps?.expandHandle)}\n style={styles?.expandHandle}\n onClick={toggleDrawer}\n >\n <div\n className={classNames(`${prefixCls}-handle-icon`, classNamesInProps?.handleIcon)}\n style={styles?.handleIcon}\n >\n {isOpen ? openIcon : closeIcon}\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default FloatDrawer;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiE;AAEjE,kBAAqC;AACrC,wBAAuB;AACvB,mBAAsE;AACtE,4BAA2B;AAC3B,mBAAqB;AAkLrB,IAAM,cAAoC,CAAC,UAAU;AACnD,QAAM;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,UAAU;AAAA,IACV,UAAU;AAAA,IACV;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,aAAa,QAAI,yBAA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207
|
};
|
|
208
208
|
};
|
|
209
|
-
var style_default = (0, import_internal.genStyleHooks)("
|
|
209
|
+
var style_default = (0, import_internal.genStyleHooks)("easy-float-drawer", genStyle);
|
|
210
210
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/FloatDrawer/style/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\nimport { getColorLuminance } from '../../../utils';\n\ntype REFloatDrawerToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<REFloatDrawerToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n display: 'flex',\n overflow: 'visible',\n ['&-left']: {\n left: 0,\n top: 0,\n bottom: 0,\n },\n ['&-right']: {\n right: 0,\n top: 0,\n bottom: 0,\n },\n ['&-top']: {\n left: 0,\n right: 0,\n top: 0,\n },\n ['&-bottom']: {\n left: 0,\n right: 0,\n bottom: 0,\n },\n\n [`&${componentCls}-open`]: {\n // visibility: 'visible',\n },\n [`&${componentCls}-closed`]: {\n pointerEvents: 'none',\n },\n [`${componentCls}-drawer`]: {\n transition: 'transform 0.3s ease-in-out',\n overflow: 'visible',\n },\n [`&${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-right ${componentCls}-drawer`]: {\n height: '100%',\n },\n [`&${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-bottom ${componentCls}-drawer`]: {\n width: '100%',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-right ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translate(0, 0)',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer`]: {\n boxShadow: `2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-right ${componentCls}-drawer`]: {\n boxShadow: `-2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-top ${componentCls}-drawer`]: {\n boxShadow: `0 2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n boxShadow: `0 -2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-closed${componentCls}-left ${componentCls}-drawer`]: {\n transform: 'translateX(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-right ${componentCls}-drawer`]: {\n transform: 'translateX(100%)',\n },\n [`&${componentCls}-closed${componentCls}-top ${componentCls}-drawer`]: {\n transform: 'translateY(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translateY(100%)',\n },\n [`${componentCls}-expand-handle`]: {\n position: 'absolute',\n zIndex: 2,\n cursor: 'pointer',\n color: token.colorTextTertiary,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#fafafa' : '#141414',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n pointerEvents: 'all',\n '&:hover': {\n color: token.colorText,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#f0f0f0' : '#1a1a1a',\n },\n },\n [`&${componentCls}-left ${componentCls}-expand-handle,\n &${componentCls}-right ${componentCls}-expand-handle`]: {\n top: '50%',\n width: 24,\n height: 60,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle,\n &${componentCls}-bottom ${componentCls}-expand-handle`]: {\n left: '50%',\n width: 60,\n height: 24,\n },\n [`&${componentCls}-left ${componentCls}-expand-handle`]: {\n right: 0,\n transform: 'translate(100%, -50%)',\n borderRadius: '0 8px 8px 0',\n boxShadow: `2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-right ${componentCls}-expand-handle`]: {\n left: 0,\n transform: 'translate(-100%, -50%)',\n borderRadius: '8px 0 0 8px',\n boxShadow: `-2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle`]: {\n bottom: 0,\n transform: 'translate(-50%, 100%)',\n borderRadius: '0 0 8px 8px',\n boxShadow: `0 2px 5px ${token.colorFill}`,\n },\n [`&${componentCls}-bottom ${componentCls}-expand-handle`]: {\n top: 0,\n transform: 'translate(-50%, -100%)',\n borderRadius: '8px 8px 0 0',\n boxShadow: `0 -2px 5px ${token.colorFill}`,\n },\n [`${componentCls}-handle-icon`]: {\n userSelect: 'none',\n lineHeight: 0,\n },\n [`${componentCls}-resize-handle`]: {\n position: 'absolute',\n border: `1px solid transparent`,\n zIndex: 1,\n backgroundColor: token.colorBgTextHover,\n '&:hover': {\n backgroundColor: token.colorBgTextActive,\n },\n '&&-dragging': {\n backgroundColor: token.colorBgTextActive,\n },\n },\n [`&${componentCls}-left ${componentCls}-resize-handle`]: {\n right: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-right ${componentCls}-resize-handle`]: {\n left: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-top ${componentCls}-resize-handle`]: {\n bottom: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`&${componentCls}-bottom ${componentCls}-resize-handle`]: {\n top: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`${componentCls}-content`]: {\n height: '100%',\n [`${componentCls}-card`]: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n\n [`${token.antCls}-card-body`]: {\n flex: 1,\n minHeight: 0,\n overflow: 'auto',\n },\n },\n },\n },\n };\n};\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAI9B,mBAAkC;AAIlC,IAAM,WAA8C,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AC,IAAI,uBAAuB,4BAA4B,GAAG;AAAA,QACzD,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,MACA,CAAC,GAAG,sBAAsB,GAAG;AAAA,QAC3B,QAAQ;AAAA,QACR,CAAC,GAAG,mBAAmB,GAAG;AAAA,UACxB,SAAS;AAAA,UACT,eAAe;AAAA,UACf,QAAQ;AAAA,UAER,CAAC,GAAG,MAAM,kBAAkB,GAAG;AAAA,YAC7B,MAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU;AAAA,UACZ;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;
|
|
4
|
+
"sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\nimport { getColorLuminance } from '../../../utils';\n\ntype REFloatDrawerToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<REFloatDrawerToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n display: 'flex',\n overflow: 'visible',\n ['&-left']: {\n left: 0,\n top: 0,\n bottom: 0,\n },\n ['&-right']: {\n right: 0,\n top: 0,\n bottom: 0,\n },\n ['&-top']: {\n left: 0,\n right: 0,\n top: 0,\n },\n ['&-bottom']: {\n left: 0,\n right: 0,\n bottom: 0,\n },\n\n [`&${componentCls}-open`]: {\n // visibility: 'visible',\n },\n [`&${componentCls}-closed`]: {\n pointerEvents: 'none',\n },\n [`${componentCls}-drawer`]: {\n transition: 'transform 0.3s ease-in-out',\n overflow: 'visible',\n },\n [`&${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-right ${componentCls}-drawer`]: {\n height: '100%',\n },\n [`&${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-bottom ${componentCls}-drawer`]: {\n width: '100%',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-right ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-top ${componentCls}-drawer,\n &${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translate(0, 0)',\n },\n [`&${componentCls}-open${componentCls}-left ${componentCls}-drawer`]: {\n boxShadow: `2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-right ${componentCls}-drawer`]: {\n boxShadow: `-2px 0 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-top ${componentCls}-drawer`]: {\n boxShadow: `0 2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-open${componentCls}-bottom ${componentCls}-drawer`]: {\n boxShadow: `0 -2px 10px ${token.colorFill}`,\n },\n [`&${componentCls}-closed${componentCls}-left ${componentCls}-drawer`]: {\n transform: 'translateX(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-right ${componentCls}-drawer`]: {\n transform: 'translateX(100%)',\n },\n [`&${componentCls}-closed${componentCls}-top ${componentCls}-drawer`]: {\n transform: 'translateY(-100%)',\n },\n [`&${componentCls}-closed${componentCls}-bottom ${componentCls}-drawer`]: {\n transform: 'translateY(100%)',\n },\n [`${componentCls}-expand-handle`]: {\n position: 'absolute',\n zIndex: 2,\n cursor: 'pointer',\n color: token.colorTextTertiary,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#fafafa' : '#141414',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n pointerEvents: 'all',\n '&:hover': {\n color: token.colorText,\n backgroundColor: getColorLuminance(token.colorBgBase) > 0.5 ? '#f0f0f0' : '#1a1a1a',\n },\n },\n [`&${componentCls}-left ${componentCls}-expand-handle,\n &${componentCls}-right ${componentCls}-expand-handle`]: {\n top: '50%',\n width: 24,\n height: 60,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle,\n &${componentCls}-bottom ${componentCls}-expand-handle`]: {\n left: '50%',\n width: 60,\n height: 24,\n },\n [`&${componentCls}-left ${componentCls}-expand-handle`]: {\n right: 0,\n transform: 'translate(100%, -50%)',\n borderRadius: '0 8px 8px 0',\n boxShadow: `2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-right ${componentCls}-expand-handle`]: {\n left: 0,\n transform: 'translate(-100%, -50%)',\n borderRadius: '8px 0 0 8px',\n boxShadow: `-2px 0 5px ${token.colorFill}`,\n },\n [`&${componentCls}-top ${componentCls}-expand-handle`]: {\n bottom: 0,\n transform: 'translate(-50%, 100%)',\n borderRadius: '0 0 8px 8px',\n boxShadow: `0 2px 5px ${token.colorFill}`,\n },\n [`&${componentCls}-bottom ${componentCls}-expand-handle`]: {\n top: 0,\n transform: 'translate(-50%, -100%)',\n borderRadius: '8px 8px 0 0',\n boxShadow: `0 -2px 5px ${token.colorFill}`,\n },\n [`${componentCls}-handle-icon`]: {\n userSelect: 'none',\n lineHeight: 0,\n },\n [`${componentCls}-resize-handle`]: {\n position: 'absolute',\n border: `1px solid transparent`,\n zIndex: 1,\n backgroundColor: token.colorBgTextHover,\n '&:hover': {\n backgroundColor: token.colorBgTextActive,\n },\n '&&-dragging': {\n backgroundColor: token.colorBgTextActive,\n },\n },\n [`&${componentCls}-left ${componentCls}-resize-handle`]: {\n right: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-right ${componentCls}-resize-handle`]: {\n left: 0,\n width: 1,\n height: '100%',\n cursor: 'col-resize',\n },\n [`&${componentCls}-top ${componentCls}-resize-handle`]: {\n bottom: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`&${componentCls}-bottom ${componentCls}-resize-handle`]: {\n top: 0,\n height: 1,\n width: '100%',\n cursor: 'row-resize',\n },\n [`${componentCls}-content`]: {\n height: '100%',\n [`${componentCls}-card`]: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n\n [`${token.antCls}-card-body`]: {\n flex: 1,\n minHeight: 0,\n over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ACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,QAAQ;AAAA,MACV;AAAA,MACA,CAAC,IAAI,oBAAoB,4BAA4B,GAAG;AAAA,QACtD,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,MACA,CAAC,IAAI,uBAAuB,4BAA4B,GAAG;AAAA,QACzD,KAAK;AAAA,QACL,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,MACA,CAAC,GAAG,sBAAsB,GAAG;AAAA,QAC3B,QAAQ;AAAA,QACR,CAAC,GAAG,mBAAmB,GAAG;AAAA,UACxB,SAAS;AAAA,UACT,eAAe;AAAA,UACf,QAAQ;AAAA,UAER,CAAC,GAAG,MAAM,kBAAkB,GAAG;AAAA,YAC7B,MAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU;AAAA,UACZ;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,qBAA8B,QAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type CSSProperties, type FC } from 'react';
|
|
2
|
+
import type { SpinProps } from 'antd';
|
|
3
|
+
export type LoadingProps = SpinProps & {
|
|
4
|
+
/**
|
|
5
|
+
* **EN:** When used independently, the positioning method of the animation:
|
|
6
|
+
*
|
|
7
|
+
* - **absolute** - Uses absolute positioning, and the animation will automatically center itself
|
|
8
|
+
* within the parent container.
|
|
9
|
+
* - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container
|
|
10
|
+
* and center itself.
|
|
11
|
+
*
|
|
12
|
+
* **CN:** 独立使用时,动画的定位方式:
|
|
13
|
+
*
|
|
14
|
+
* - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。
|
|
15
|
+
* - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。
|
|
16
|
+
*
|
|
17
|
+
* @default `flex`
|
|
18
|
+
*/
|
|
19
|
+
mode?: 'absolute' | 'flex';
|
|
20
|
+
/**
|
|
21
|
+
* **EN:** When used independently, set the class name for the mask parent container of the
|
|
22
|
+
* animation
|
|
23
|
+
*
|
|
24
|
+
* **CN:** 在独立使用时,设置动画遮罩父容器的样式类名
|
|
25
|
+
*/
|
|
26
|
+
maskClassName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* **EN:** When used independently, set the style for the mask parent container of the animation
|
|
29
|
+
*
|
|
30
|
+
* **CN:** 在独立使用时,设置动画遮罩父容器的样式
|
|
31
|
+
*/
|
|
32
|
+
maskStyle?: CSSProperties;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* **EN:** Page loading animation component, providing two usage methods:
|
|
36
|
+
*
|
|
37
|
+
* - **Spin** - When the component wraps children, it wraps the `Spin` component around the children
|
|
38
|
+
* to provide animation effects.
|
|
39
|
+
* - **Independent** - Directly render a loading animation that automatically fills the parent
|
|
40
|
+
* container and is centered.
|
|
41
|
+
*
|
|
42
|
+
* **CN:** 页面加载动画组件,提供两种使用方式:
|
|
43
|
+
*
|
|
44
|
+
* - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。
|
|
45
|
+
* - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* 1. Spin surrounding children
|
|
49
|
+
*
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <PageLoading spinning={loading}>
|
|
52
|
+
* <div>This is content</div>
|
|
53
|
+
* </PageLoading>;
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* 2. Independent usage (inline layout)
|
|
57
|
+
*
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <PageLoading />;
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* 3. Centered display within container (absolute layout)
|
|
63
|
+
*
|
|
64
|
+
* ```tsx
|
|
65
|
+
* <div className="container" style={{ position: 'relative' }}>
|
|
66
|
+
* <PageLoading absolute />
|
|
67
|
+
* </div>;
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
declare const Loading: FC<LoadingProps>;
|
|
71
|
+
export default Loading;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/Loading/index.tsx
|
|
30
|
+
var Loading_exports = {};
|
|
31
|
+
__export(Loading_exports, {
|
|
32
|
+
default: () => Loading_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Loading_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_style = __toESM(require("./style"));
|
|
39
|
+
var Loading = (props) => {
|
|
40
|
+
const { maskClassName, maskStyle, mode = "flex", children, spinning = true, className, ...spinProps } = props;
|
|
41
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
|
|
42
|
+
const prefixCls = getPrefixCls("easy-loading");
|
|
43
|
+
const [wrapCSSVar, hashId, cssVarCls] = (0, import_style.default)(prefixCls);
|
|
44
|
+
return children ? (
|
|
45
|
+
// Use spin to wrap children when children is provided,
|
|
46
|
+
// and control the animation display with the spinning prop.
|
|
47
|
+
wrapCSSVar(
|
|
48
|
+
/* @__PURE__ */ React.createElement(import_antd.Spin, { className: (0, import_classnames.default)(hashId, cssVarCls, prefixCls, className), spinning, ...spinProps }, children)
|
|
49
|
+
)
|
|
50
|
+
) : (
|
|
51
|
+
// Show the loading animation in a wrapper that fills the parent container and centers the animation,
|
|
52
|
+
// and hides the entire component when the animation is off.
|
|
53
|
+
spinning && wrapCSSVar(
|
|
54
|
+
/* @__PURE__ */ React.createElement(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
className: (0, import_classnames.default)(
|
|
58
|
+
hashId,
|
|
59
|
+
cssVarCls,
|
|
60
|
+
prefixCls,
|
|
61
|
+
maskClassName,
|
|
62
|
+
mode === "absolute" ? `${prefixCls}-absolute` : `${prefixCls}-flex`
|
|
63
|
+
),
|
|
64
|
+
style: maskStyle
|
|
65
|
+
},
|
|
66
|
+
/* @__PURE__ */ React.createElement(import_antd.Spin, { className, spinning, ...spinProps })
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
var Loading_default = Loading;
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/Loading/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { type CSSProperties, type FC, useContext } from 'react';\nimport type { SpinProps } from 'antd';\nimport { ConfigProvider, Spin } from 'antd';\nimport classNames from 'classnames';\nimport useStyle from './style';\n\nexport type LoadingProps = SpinProps & {\n /**\n * **EN:** When used independently, the positioning method of the animation:\n *\n * - **absolute** - Uses absolute positioning, and the animation will automatically center itself\n * within the parent container.\n * - **flex** - Uses flexbox layout, and the animation will automatically fill the parent container\n * and center itself.\n *\n * **CN:** 独立使用时,动画的定位方式:\n *\n * - **absolute** - 使用绝对定位,动画会自动居中显示在父容器中。\n * - **flex** - 使用弹性布局,动画会自动填充父容器并居中显示。\n *\n * @default `flex`\n */\n mode?: 'absolute' | 'flex';\n /**\n * **EN:** When used independently, set the class name for the mask parent container of the\n * animation\n *\n * **CN:** 在独立使用时,设置动画遮罩父容器的样式类名\n */\n maskClassName?: string;\n /**\n * **EN:** When used independently, set the style for the mask parent container of the animation\n *\n * **CN:** 在独立使用时,设置动画遮罩父容器的样式\n */\n maskStyle?: CSSProperties;\n};\n\n/**\n * **EN:** Page loading animation component, providing two usage methods:\n *\n * - **Spin** - When the component wraps children, it wraps the `Spin` component around the children\n * to provide animation effects.\n * - **Independent** - Directly render a loading animation that automatically fills the parent\n * container and is centered.\n *\n * **CN:** 页面加载动画组件,提供两种使用方式:\n *\n * - **Spin** - 组件包裹children时,在children外层包裹 `Spin` 组件,提供动画效果。\n * - **独立使用** - 直接渲染一个加载动画,自动撑满父容器,且显示在居中位置。\n *\n * @example\n * 1. Spin surrounding children\n *\n * ```tsx\n * <PageLoading spinning={loading}>\n * <div>This is content</div>\n * </PageLoading>;\n * ```\n *\n * 2. Independent usage (inline layout)\n *\n * ```tsx\n * <PageLoading />;\n * ```\n *\n * 3. Centered display within container (absolute layout)\n *\n * ```tsx\n * <div className=\"container\" style={{ position: 'relative' }}>\n * <PageLoading absolute />\n * </div>;\n * ```\n */\nconst Loading: FC<LoadingProps> = (props) => {\n const { maskClassName, maskStyle, mode = 'flex', children, spinning = true, className, ...spinProps } = props;\n\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-loading');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n return children\n ? // Use spin to wrap children when children is provided,\n // and control the animation display with the spinning prop.\n wrapCSSVar(\n <Spin className={classNames(hashId, cssVarCls, prefixCls, className)} spinning={spinning} {...spinProps}>\n {children}\n </Spin>\n )\n : // Show the loading animation in a wrapper that fills the parent container and centers the animation,\n // and hides the entire component when the animation is off.\n spinning &&\n wrapCSSVar(\n <div\n className={classNames(\n hashId,\n cssVarCls,\n prefixCls,\n maskClassName,\n mode === 'absolute' ? `${prefixCls}-absolute` : `${prefixCls}-flex`\n )}\n style={maskStyle}\n >\n <Spin className={className} spinning={spinning} {...spinProps} />\n </div>\n );\n};\n\nexport default Loading;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAwD;AAExD,kBAAqC;AACrC,wBAAuB;AACvB,mBAAqB;AAsErB,IAAM,UAA4B,CAAC,UAAU;AAC3C,QAAM,EAAE,eAAe,WAAW,OAAO,QAAQ,UAAU,WAAW,MAAM,WAAW,GAAG,UAAU,IAAI;AAExG,QAAM,EAAE,aAAa,QAAI,yBAAW,2BAAe,aAAa;AAChE,QAAM,YAAY,aAAa,cAAc;AAC7C,QAAM,CAAC,YAAY,QAAQ,SAAS,QAAI,aAAAA,SAAS,SAAS;AAE1D,SAAO;AAAA;AAAA;AAAA,IAGH;AAAA,MACE,oCAAC,oBAAK,eAAW,kBAAAC,SAAW,QAAQ,WAAW,WAAW,SAAS,GAAG,UAAqB,GAAG,aAC3F,QACH;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAGA,YACE;AAAA,MACE;AAAA,QAAC;AAAA;AAAA,UACC,eAAW,kBAAAA;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,aAAa,GAAG,uBAAuB,GAAG;AAAA,UACrD;AAAA,UACA,OAAO;AAAA;AAAA,QAEP,oCAAC,oBAAK,WAAsB,UAAqB,GAAG,WAAW;AAAA,MACjE;AAAA,IACF;AAAA;AACR;AAEA,IAAO,kBAAQ;",
|
|
6
|
+
"names": ["useStyle", "classNames"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: (prefixCls: string, rootCls?: string | undefined) => readonly [(node: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>, string, string];
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/Loading/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(style_exports);
|
|
25
|
+
var import_internal = require("antd/es/theme/internal");
|
|
26
|
+
var genStyle = (token) => {
|
|
27
|
+
const { componentCls } = token;
|
|
28
|
+
return {
|
|
29
|
+
[componentCls]: {
|
|
30
|
+
"&-flex": {
|
|
31
|
+
display: "flex",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
width: "100%",
|
|
35
|
+
height: "100%"
|
|
36
|
+
},
|
|
37
|
+
"&-absolute": {
|
|
38
|
+
position: "absolute",
|
|
39
|
+
top: "50%",
|
|
40
|
+
left: "50%",
|
|
41
|
+
transform: "translate(-50%, -50%)"
|
|
42
|
+
},
|
|
43
|
+
[`:global(.${token.antCls}-spin)`]: {
|
|
44
|
+
lineHeight: 0
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
var style_default = (0, import_internal.genStyleHooks)("easy-loading", genStyle);
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/components/Loading/style/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n '&-flex': {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n height: '100%',\n },\n '&-absolute': {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n [`:global(.${token.antCls}-spin)`]: {\n lineHeight: 0,\n },\n },\n };\n};\n\nexport default genStyleHooks('easy-loading' as never, genStyle);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,UAAU;AAAA,QACR,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA,MACA,cAAc;AAAA,QACZ,UAAU;AAAA,QACV,KAAK;AAAA,QACL,MAAM;AAAA,QACN,WAAW;AAAA,MACb;AAAA,MACA,CAAC,YAAY,MAAM,cAAc,GAAG;AAAA,QAClC,YAAY;AAAA,MACd;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,gBAAyB,QAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -53,7 +53,7 @@ var OverflowTags = (props) => {
|
|
|
53
53
|
} = props;
|
|
54
54
|
const { token } = import_antd.theme.useToken();
|
|
55
55
|
const { getPrefixCls } = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
|
|
56
|
-
const prefixCls = getPrefixCls("
|
|
56
|
+
const prefixCls = getPrefixCls("easy-float-drawer");
|
|
57
57
|
const [wrapCSSVar, hashId, cssVarCls] = (0, import_style.default)(prefixCls);
|
|
58
58
|
const colors = (0, import_react.useMemo)(
|
|
59
59
|
() => import_internal.PresetColors.filter((c) => !["lime", "yellow", "magenta"].includes(c)).map((color) => token[`${color}-3`]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/OverflowTags/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { ReactNode } from 'react';\nimport { useCallback, useContext, useMemo } from 'react';\nimport type { TagProps } from 'antd';\nimport { ConfigProvider, Dropdown, Tag, theme } from 'antd';\nimport { PresetColors } from 'antd/es/theme/internal';\nimport classNames from 'classnames';\nimport type { OverflowProps } from 'rc-overflow';\nimport Overflow from 'rc-overflow';\nimport { random } from '../../utils/math';\nimport useStyle from './style';\n\nexport interface OverflowTagsProps<T extends Record<string, unknown> = Record<string, unknown>>\n extends OverflowProps<T> {\n /**\n * **CN**: 标签集合的数据\n *\n * **EN**: Data collection of tags\n */\n tags: T[] | undefined;\n /**\n * **EN**: Function to get the tag name, default is `tag.name`\n *\n * **CN**: 获取标签名称的函数,默认取`tag.name`\n */\n getTagName?: (tag: T) => ReactNode;\n /**\n * **EN**: Function to get the unique identifier of the tag, default is `tag.id`\n *\n * **CN**: 获取标签唯一标识的函数,默认取`tag.id`\n */\n getTagKey?: (tag: T) => React.Key;\n /**\n * **EN**: Function to render the tag, returns `TagProps`\n *\n * **CN**: 渲染标签的函数,返回`TagProps`\n */\n renderTag?: (tag: T, tags: T[]) => TagProps;\n /**\n * **EN**: Custom properties for the tag component, if `renderTag` is also specified, the latter\n * will override the former\n *\n * **CN**: 自定义标签的组件属性,如果同时指定了`renderTag`,则后者会覆盖前者\n */\n tagProps?: TagProps;\n /**\n * **EN**: When the number of tags exceeds the maximum display count, an ellipsis tag will be\n * shown. This property is used to set the style of the ellipsis tag.\n *\n * **CN**: 当标签数量超过最大显示数量时,会显示省略号的标签,此属性用于设置省略号标签的样式\n */\n ellipsisTagProps?: TagProps;\n /**\n * **EN**: Whether to use random colors, default is `false`. Note that the tag object can also\n * contain a `color` property to specify the color, and the latter takes precedence.\n *\n * **CN**: 是否使用随机颜色,默认`false`。注意,tag对象还可以包含`color`属性来指定颜色,而且后者优先级更高。\n */\n randomColors?: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst OverflowTags = <T extends Record<string, any>>(props: OverflowTagsProps<T>) => {\n const {\n tags = [],\n randomColors,\n getTagName: getTagNameInProps,\n getTagKey,\n renderTag: renderTagInProps,\n tagProps,\n ellipsisTagProps,\n className,\n ...restProps\n } = props;\n const { token } = theme.useToken();\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiD;AAEjD,kBAAqD;AACrD,sBAA6B;AAC7B,wBAAuB;AAEvB,yBAAqB;AACrB,kBAAuB;AACvB,mBAAqB;AAoDrB,IAAM,eAAe,CAAgC,UAAgC;AACnF,QAAM;AAAA,IACJ,OAAO,CAAC;AAAA,IACR;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,EAAE,MAAM,IAAI,kBAAM,SAAS;AACjC,QAAM,EAAE,aAAa,QAAI,yBAAW,2BAAe,aAAa;AAChE,QAAM,YAAY,aAAa,
|
|
4
|
+
"sourcesContent": ["import type { ReactNode } from 'react';\nimport { useCallback, useContext, useMemo } from 'react';\nimport type { TagProps } from 'antd';\nimport { ConfigProvider, Dropdown, Tag, theme } from 'antd';\nimport { PresetColors } from 'antd/es/theme/internal';\nimport classNames from 'classnames';\nimport type { OverflowProps } from 'rc-overflow';\nimport Overflow from 'rc-overflow';\nimport { random } from '../../utils/math';\nimport useStyle from './style';\n\nexport interface OverflowTagsProps<T extends Record<string, unknown> = Record<string, unknown>>\n extends OverflowProps<T> {\n /**\n * **CN**: 标签集合的数据\n *\n * **EN**: Data collection of tags\n */\n tags: T[] | undefined;\n /**\n * **EN**: Function to get the tag name, default is `tag.name`\n *\n * **CN**: 获取标签名称的函数,默认取`tag.name`\n */\n getTagName?: (tag: T) => ReactNode;\n /**\n * **EN**: Function to get the unique identifier of the tag, default is `tag.id`\n *\n * **CN**: 获取标签唯一标识的函数,默认取`tag.id`\n */\n getTagKey?: (tag: T) => React.Key;\n /**\n * **EN**: Function to render the tag, returns `TagProps`\n *\n * **CN**: 渲染标签的函数,返回`TagProps`\n */\n renderTag?: (tag: T, tags: T[]) => TagProps;\n /**\n * **EN**: Custom properties for the tag component, if `renderTag` is also specified, the latter\n * will override the former\n *\n * **CN**: 自定义标签的组件属性,如果同时指定了`renderTag`,则后者会覆盖前者\n */\n tagProps?: TagProps;\n /**\n * **EN**: When the number of tags exceeds the maximum display count, an ellipsis tag will be\n * shown. This property is used to set the style of the ellipsis tag.\n *\n * **CN**: 当标签数量超过最大显示数量时,会显示省略号的标签,此属性用于设置省略号标签的样式\n */\n ellipsisTagProps?: TagProps;\n /**\n * **EN**: Whether to use random colors, default is `false`. Note that the tag object can also\n * contain a `color` property to specify the color, and the latter takes precedence.\n *\n * **CN**: 是否使用随机颜色,默认`false`。注意,tag对象还可以包含`color`属性来指定颜色,而且后者优先级更高。\n */\n randomColors?: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst OverflowTags = <T extends Record<string, any>>(props: OverflowTagsProps<T>) => {\n const {\n tags = [],\n randomColors,\n getTagName: getTagNameInProps,\n getTagKey,\n renderTag: renderTagInProps,\n tagProps,\n ellipsisTagProps,\n className,\n ...restProps\n } = props;\n const { token } = theme.useToken();\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const prefixCls = getPrefixCls('easy-float-drawer');\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n\n const colors = useMemo(\n () => PresetColors.filter((c) => !['lime', 'yellow', 'magenta'].includes(c)).map((color) => token[`${color}-3`]),\n [token]\n );\n const getTagName = useCallback(\n (tag: T) => {\n return getTagNameInProps ? getTagNameInProps(tag) : tag.name;\n },\n [getTagNameInProps]\n );\n const renderTag = (item: T) => {\n const customProps = renderTagInProps?.(item, tags);\n return (\n <Tag\n {...tagProps}\n color={randomColors ? colors[random(0, colors.length - 1)] : (item.color ?? 'default')}\n {...customProps}\n >\n {getTagName(item)}\n </Tag>\n );\n };\n\n return wrapCSSVar(\n <Overflow<T>\n className={classNames(hashId, cssVarCls, prefixCls, className)}\n data={tags}\n maxCount=\"responsive\"\n renderItem={renderTag}\n renderRest={(omittedItems) => (\n <Dropdown\n menu={{\n items: omittedItems.map((tag) => ({\n type: 'item',\n key: getTagKey ? getTagKey(tag) : (tag.id ?? getTagName(tag)),\n label: getTagName(tag),\n })),\n }}\n >\n <Tag {...ellipsisTagProps}>+ {omittedItems.length}...</Tag>\n </Dropdown>\n )}\n {...restProps}\n />\n );\n};\n\nexport default OverflowTags;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiD;AAEjD,kBAAqD;AACrD,sBAA6B;AAC7B,wBAAuB;AAEvB,yBAAqB;AACrB,kBAAuB;AACvB,mBAAqB;AAoDrB,IAAM,eAAe,CAAgC,UAAgC;AACnF,QAAM;AAAA,IACJ,OAAO,CAAC;AAAA,IACR;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,EAAE,MAAM,IAAI,kBAAM,SAAS;AACjC,QAAM,EAAE,aAAa,QAAI,yBAAW,2BAAe,aAAa;AAChE,QAAM,YAAY,aAAa,mBAAmB;AAClD,QAAM,CAAC,YAAY,QAAQ,SAAS,QAAI,aAAAA,SAAS,SAAS;AAE1D,QAAM,aAAS;AAAA,IACb,MAAM,6BAAa,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,UAAU,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,MAAM,GAAG,SAAS,CAAC;AAAA,IAC/G,CAAC,KAAK;AAAA,EACR;AACA,QAAM,iBAAa;AAAA,IACjB,CAAC,QAAW;AACV,aAAO,oBAAoB,kBAAkB,GAAG,IAAI,IAAI;AAAA,IAC1D;AAAA,IACA,CAAC,iBAAiB;AAAA,EACpB;AACA,QAAM,YAAY,CAAC,SAAY;AAC7B,UAAM,cAAc,qDAAmB,MAAM;AAC7C,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,OAAO,eAAe,WAAO,oBAAO,GAAG,OAAO,SAAS,CAAC,CAAC,IAAK,KAAK,SAAS;AAAA,QAC3E,GAAG;AAAA;AAAA,MAEH,WAAW,IAAI;AAAA,IAClB;AAAA,EAEJ;AAEA,SAAO;AAAA,IACL;AAAA,MAAC,mBAAAC;AAAA,MAAA;AAAA,QACC,eAAW,kBAAAC,SAAW,QAAQ,WAAW,WAAW,SAAS;AAAA,QAC7D,MAAM;AAAA,QACN,UAAS;AAAA,QACT,YAAY;AAAA,QACZ,YAAY,CAAC,iBACX;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,cACJ,OAAO,aAAa,IAAI,CAAC,SAAS;AAAA,gBAChC,MAAM;AAAA,gBACN,KAAK,YAAY,UAAU,GAAG,IAAK,IAAI,MAAM,WAAW,GAAG;AAAA,gBAC3D,OAAO,WAAW,GAAG;AAAA,cACvB,EAAE;AAAA,YACJ;AAAA;AAAA,UAEA,oCAAC,mBAAK,GAAG,oBAAkB,MAAG,aAAa,QAAO,KAAG;AAAA,QACvD;AAAA,QAED,GAAG;AAAA;AAAA,IACN;AAAA,EACF;AACF;AAEA,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["useStyle", "Overflow", "classNames"]
|
|
7
7
|
}
|
|
@@ -29,10 +29,11 @@ var genStyle = (token) => {
|
|
|
29
29
|
[componentCls]: {
|
|
30
30
|
display: "flex",
|
|
31
31
|
flexWrap: "wrap",
|
|
32
|
+
width: "100%",
|
|
32
33
|
maxWidth: "100%",
|
|
33
34
|
position: "relative"
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
|
-
var style_default = (0, import_internal.genStyleHooks)("
|
|
38
|
+
var style_default = (0, import_internal.genStyleHooks)("easy-overflow-tags", genStyle);
|
|
38
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/OverflowTags/style/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n display: 'flex',\n flexWrap: 'wrap',\n maxWidth: '100%',\n position: 'relative',\n },\n };\n};\n\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,IACZ;AAAA,EACF;AACF;
|
|
4
|
+
"sourcesContent": ["import { genStyleHooks } from 'antd/es/theme/internal';\nimport type { AliasToken, GenerateStyle } from 'antd/es/theme/internal';\nimport type { CSSObject } from '@ant-design/cssinjs';\nimport type { FullToken } from '@ant-design/cssinjs-utils';\n\ntype OverflowTagsToken = FullToken<{ ''?: object }, AliasToken, ''>;\n\nconst genStyle: GenerateStyle<OverflowTagsToken> = (token): CSSObject => {\n const { componentCls } = token;\n return {\n [componentCls]: {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n maxWidth: '100%',\n position: 'relative',\n },\n };\n};\n\nexport default genStyleHooks('easy-overflow-tags' as never, genStyle);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA8B;AAO9B,IAAM,WAA6C,CAAC,UAAqB;AACvE,QAAM,EAAE,aAAa,IAAI;AACzB,SAAO;AAAA,IACL,CAAC,YAAY,GAAG;AAAA,MACd,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,UAAU;AAAA,IACZ;AAAA,EACF;AACF;AAEA,IAAO,oBAAQ,+BAAc,sBAA+B,QAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -10,6 +10,8 @@ export { default as ConfirmAction } from './ConfirmAction';
|
|
|
10
10
|
export { default as DeleteConfirmAction } from './DeleteConfirmAction';
|
|
11
11
|
export type { FloatDrawerProps } from './FloatDrawer';
|
|
12
12
|
export { default as FloatDrawer } from './FloatDrawer';
|
|
13
|
+
export type { LoadingProps } from './Loading';
|
|
14
|
+
export { default as Loading } from './Loading';
|
|
13
15
|
export type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';
|
|
14
16
|
export { withDefaultModalActionProps, withModalAction } from './ModalAction';
|
|
15
17
|
export { default as ModalAction } from './ModalAction';
|
package/lib/components/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(components_exports, {
|
|
|
34
34
|
ConfirmAction: () => import_ConfirmAction2.default,
|
|
35
35
|
DeleteConfirmAction: () => import_DeleteConfirmAction.default,
|
|
36
36
|
FloatDrawer: () => import_FloatDrawer.default,
|
|
37
|
+
Loading: () => import_Loading.default,
|
|
37
38
|
ModalAction: () => import_ModalAction2.default,
|
|
38
39
|
OverflowTags: () => import_OverflowTags.default,
|
|
39
40
|
ReactEasyContext: () => import_context.default,
|
|
@@ -49,6 +50,7 @@ var import_ConfirmAction = require("./ConfirmAction");
|
|
|
49
50
|
var import_ConfirmAction2 = __toESM(require("./ConfirmAction"));
|
|
50
51
|
var import_DeleteConfirmAction = __toESM(require("./DeleteConfirmAction"));
|
|
51
52
|
var import_FloatDrawer = __toESM(require("./FloatDrawer"));
|
|
53
|
+
var import_Loading = __toESM(require("./Loading"));
|
|
52
54
|
var import_ModalAction = require("./ModalAction");
|
|
53
55
|
var import_ModalAction2 = __toESM(require("./ModalAction"));
|
|
54
56
|
var import_OverflowTags = __toESM(require("./OverflowTags"));
|
|
@@ -59,6 +61,7 @@ var import_OverflowTags = __toESM(require("./OverflowTags"));
|
|
|
59
61
|
ConfirmAction,
|
|
60
62
|
DeleteConfirmAction,
|
|
61
63
|
FloatDrawer,
|
|
64
|
+
Loading,
|
|
62
65
|
ModalAction,
|
|
63
66
|
OverflowTags,
|
|
64
67
|
ReactEasyContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AAGtC,4BAA0C;AAE1C,qBAA4C;AAG5C,2BAA8C;AAC9C,IAAAA,wBAAyC;AAGzC,iCAA+C;AAG/C,yBAAuC;AAGvC,yBAA6D;AAC7D,IAAAC,sBAAuC;AAGvC,0BAAwC;",
|
|
4
|
+
"sourcesContent": ["export type { BreakLinesProps } from './BreakLines';\nexport { default as BreakLines } from './BreakLines';\n\nexport type { ConfigProviderProps } from './ConfigProvider';\nexport { default as ConfigProvider } from './ConfigProvider';\nexport type { ReactEasyContextProps } from './ConfigProvider/context';\nexport { default as ReactEasyContext } from './ConfigProvider/context';\n\nexport type { ConfirmActionProps, ConfirmActionTrigger, ConfirmActionRef } from './ConfirmAction';\nexport { withDefaultConfirmActionProps } from './ConfirmAction';\nexport { default as ConfirmAction } from './ConfirmAction';\n\n// export * from './DeleteConfirmAction';\nexport { default as DeleteConfirmAction } from './DeleteConfirmAction';\n\nexport type { FloatDrawerProps } from './FloatDrawer';\nexport { default as FloatDrawer } from './FloatDrawer';\n\nexport type { LoadingProps } from './Loading';\nexport { default as Loading } from './Loading';\n\nexport type { ModalActionProps, FormCompPropsConstraint, ModalActionTrigger, ModalActionRef } from './ModalAction';\nexport { withDefaultModalActionProps, withModalAction } from './ModalAction';\nexport { default as ModalAction } from './ModalAction';\n\nexport type { OverflowTagsProps } from './OverflowTags';\nexport { default as OverflowTags } from './OverflowTags';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AAGtC,4BAA0C;AAE1C,qBAA4C;AAG5C,2BAA8C;AAC9C,IAAAA,wBAAyC;AAGzC,iCAA+C;AAG/C,yBAAuC;AAGvC,qBAAmC;AAGnC,yBAA6D;AAC7D,IAAAC,sBAAuC;AAGvC,0BAAwC;",
|
|
6
6
|
"names": ["import_ConfirmAction", "import_ModalAction"]
|
|
7
7
|
}
|