@bioturing/components 0.15.3 → 0.15.5
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/dist/components/Breadcrumb/style.css +1 -1
- package/dist/components/Breadcrumb/useItemRender.js +17 -16
- package/dist/components/Breadcrumb/useItemRender.js.map +1 -1
- package/dist/components/Collapse/component.js +34 -0
- package/dist/components/Collapse/component.js.map +1 -0
- package/dist/components/Collapse/style.css +1 -0
- package/dist/components/Modal/Modal.js +8 -8
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Table/component.js +90 -50
- package/dist/components/Table/component.js.map +1 -1
- package/dist/components/Table/style.css +1 -1
- package/dist/components/Tag/component.js.map +1 -1
- package/dist/components/Truncate/style.css +1 -1
- package/dist/components/utils/antdUtils.js +31 -28
- package/dist/components/utils/antdUtils.js.map +1 -1
- package/dist/index.d.ts +29 -18
- package/dist/index.js +171 -170
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-breadcrumb{display:flex}.ds-breadcrumb ol{display:inline-flex;flex:1;min-width:0;gap:.25rem 0}.ds-breadcrumb>ol>li{display:inline-flex;align-items:center;flex:0 1 0;max-width:100%}.ds-breadcrumb>ol>li.ds-breadcrumb-separator{flex:0}.ds-breadcrumb>ol>li .ds-breadcrumb-link{display:inline-flex;align-items:center;flex:0 1 auto;min-width:0;
|
|
1
|
+
@layer components{.ds-breadcrumb{display:flex}.ds-breadcrumb ol{display:inline-flex;flex:1;min-width:0;gap:.25rem 0}.ds-breadcrumb>ol>li{display:inline-flex;align-items:center;flex:0 1 0;max-width:100%}.ds-breadcrumb>ol>li.ds-breadcrumb-separator{flex:0}.ds-breadcrumb>ol>li .ds-breadcrumb-link{display:inline-flex;align-items:center;flex:0 1 auto;min-width:0;gap:.5rem}.ds-breadcrumb .ds-breadcrumb-item-name{flex:1 1 auto;min-width:0}.ds-breadcrumb .ds-breadcrumb-item-icon{flex:0 0 auto}.ds-breadcrumb.ds-breadcrumb-nowrap{display:flex;align-items:center;flex-grow:1;min-width:0}.ds-breadcrumb.ds-breadcrumb-nowrap ol{flex-wrap:nowrap}:is(.ds-breadcrumb.ds-breadcrumb-nowrap ol) li:not(.ds-breadcrumb-separator){flex:0 1 auto;min-width:0;display:flex;transition:all .2s ease}:is(:is(.ds-breadcrumb.ds-breadcrumb-nowrap ol) li:not(.ds-breadcrumb-separator)) span.ds-breadcrumb-link{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}:is(.ds-breadcrumb.ds-breadcrumb-nowrap ol) li:not(.ds-breadcrumb-separator){max-width:100%}:is(.ds-breadcrumb.ds-breadcrumb-nowrap ol) li:last-child{flex:0 0 auto}:is(.ds-breadcrumb.ds-breadcrumb-nowrap ol):hover li:last-child{flex-shrink:1}:is(.ds-breadcrumb.ds-breadcrumb-nowrap ol) li:hover{flex-shrink:0}:is(.ds-breadcrumb.ds-breadcrumb-nowrap ol) li:last-child:hover{flex-shrink:0}}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { renderItem as
|
|
1
|
+
import { jsxs as g, Fragment as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { renderItem as u } from "antd/es/breadcrumb/useItemRender";
|
|
3
3
|
import { cn as l } from "../utils/cn.js";
|
|
4
|
-
|
|
4
|
+
import { Truncate as m } from "../Truncate/component.js";
|
|
5
|
+
function h(e, r) {
|
|
5
6
|
if (e.title === void 0 || e.title === null)
|
|
6
7
|
return null;
|
|
7
|
-
const
|
|
8
|
+
const o = Object.keys(r).join("|");
|
|
8
9
|
return typeof e.title == "object" ? e.title : String(e.title).replace(
|
|
9
|
-
new RegExp(`:(${
|
|
10
|
-
(n,
|
|
10
|
+
new RegExp(`:(${o})`, "g"),
|
|
11
|
+
(n, c) => r[c] || n
|
|
11
12
|
);
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
return (n,
|
|
15
|
-
if (
|
|
16
|
-
return
|
|
17
|
-
const
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
] }) : i;
|
|
21
|
-
return
|
|
14
|
+
function N(e, r) {
|
|
15
|
+
return (n, c, s, d, a) => {
|
|
16
|
+
if (r)
|
|
17
|
+
return r(n, c, s, d);
|
|
18
|
+
const t = h(n, c), f = n.icon ? /* @__PURE__ */ g(p, { children: [
|
|
19
|
+
/* @__PURE__ */ i("span", { className: l(`${e}-item-icon`), children: n.icon }),
|
|
20
|
+
/* @__PURE__ */ i("span", { className: l(`${e}-item-name`), children: typeof t == "string" ? /* @__PURE__ */ i(m, { children: t }) : t })
|
|
21
|
+
] }) : typeof t == "string" ? /* @__PURE__ */ i(m, { children: t }) : t;
|
|
22
|
+
return u(e, n, f, a);
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
N as default
|
|
26
27
|
};
|
|
27
28
|
//# sourceMappingURL=useItemRender.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useItemRender.js","sources":["../../../src/components/Breadcrumb/useItemRender.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils\";\nimport { renderItem } from \"antd/es/breadcrumb/useItemRender\";\nimport { InternalRouteType } from \"antd/es/breadcrumb/Breadcrumb\";\nimport type { BreadcrumbProps } from \"./types\";\n\ntype AddParameters<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TFunction extends (...args: any) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TParameters extends [...args: any]\n> = (\n ...args: [...Parameters<TFunction>, ...TParameters]\n) => ReturnType<TFunction>;\n\ntype ItemRender = NonNullable<BreadcrumbProps[\"itemRender\"]>;\ntype InternalItemRenderParams = AddParameters<ItemRender, [href?: string]>;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getBreadcrumbName(route: InternalRouteType, params: any) {\n if (route.title === undefined || route.title === null) {\n return null;\n }\n const paramsKeys = Object.keys(params).join(\"|\");\n return typeof route.title === \"object\"\n ? route.title\n : String(route.title).replace(\n new RegExp(`:(${paramsKeys})`, \"g\"),\n (replacement, key) => params[key] || replacement\n );\n}\n\nexport default function useItemRender(\n prefixCls: string,\n itemRender?: ItemRender\n) {\n const mergedItemRender: InternalItemRenderParams = (\n item,\n params,\n routes,\n path,\n href\n ) => {\n if (itemRender) {\n return itemRender(item, params, routes, path);\n }\n const name = getBreadcrumbName(item, params);\n const child = item.icon ? (\n <>\n <span className={cn(`${prefixCls}-item-icon`)}>{item.icon}</span>\n <span className={cn(`${prefixCls}-item-name`)}>{name}</span>\n </>\n ) : (\n name\n );\n\n return renderItem(prefixCls, item, child, href);\n };\n\n return mergedItemRender;\n}\n"],"names":["getBreadcrumbName","route","params","paramsKeys","replacement","key","useItemRender","prefixCls","itemRender","item","routes","path","href","name","child","jsxs","Fragment","jsx","cn","renderItem"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useItemRender.js","sources":["../../../src/components/Breadcrumb/useItemRender.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils\";\nimport { renderItem } from \"antd/es/breadcrumb/useItemRender\";\nimport { InternalRouteType } from \"antd/es/breadcrumb/Breadcrumb\";\nimport type { BreadcrumbProps } from \"./types\";\nimport { Truncate } from \"../Truncate\";\n\ntype AddParameters<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TFunction extends (...args: any) => any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TParameters extends [...args: any]\n> = (\n ...args: [...Parameters<TFunction>, ...TParameters]\n) => ReturnType<TFunction>;\n\ntype ItemRender = NonNullable<BreadcrumbProps[\"itemRender\"]>;\ntype InternalItemRenderParams = AddParameters<ItemRender, [href?: string]>;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getBreadcrumbName(route: InternalRouteType, params: any) {\n if (route.title === undefined || route.title === null) {\n return null;\n }\n const paramsKeys = Object.keys(params).join(\"|\");\n return typeof route.title === \"object\"\n ? route.title\n : String(route.title).replace(\n new RegExp(`:(${paramsKeys})`, \"g\"),\n (replacement, key) => params[key] || replacement\n );\n}\n\nexport default function useItemRender(\n prefixCls: string,\n itemRender?: ItemRender\n) {\n const mergedItemRender: InternalItemRenderParams = (\n item,\n params,\n routes,\n path,\n href\n ) => {\n if (itemRender) {\n return itemRender(item, params, routes, path);\n }\n const name = getBreadcrumbName(item, params);\n const child = item.icon ? (\n <>\n <span className={cn(`${prefixCls}-item-icon`)}>{item.icon}</span>\n <span className={cn(`${prefixCls}-item-name`)}>\n {typeof name === \"string\" ? <Truncate>{name}</Truncate> : name}\n </span>\n </>\n ) : typeof name === \"string\" ? (\n <Truncate>{name}</Truncate>\n ) : (\n name\n );\n\n return renderItem(prefixCls, item, child, href);\n };\n\n return mergedItemRender;\n}\n"],"names":["getBreadcrumbName","route","params","paramsKeys","replacement","key","useItemRender","prefixCls","itemRender","item","routes","path","href","name","child","jsxs","Fragment","jsx","cn","Truncate","renderItem"],"mappings":";;;;AAoBA,SAASA,EAAkBC,GAA0BC,GAAa;AAChE,MAAID,EAAM,UAAU,UAAaA,EAAM,UAAU;AACxC,WAAA;AAET,QAAME,IAAa,OAAO,KAAKD,CAAM,EAAE,KAAK,GAAG;AACxC,SAAA,OAAOD,EAAM,SAAU,WAC1BA,EAAM,QACN,OAAOA,EAAM,KAAK,EAAE;AAAA,IAClB,IAAI,OAAO,KAAKE,CAAU,KAAK,GAAG;AAAA,IAClC,CAACC,GAAaC,MAAQH,EAAOG,CAAG,KAAKD;AAAA,EACvC;AACN;AAEwB,SAAAE,EACtBC,GACAC,GACA;AA4BO,SA3B4C,CACjDC,GACAP,GACAQ,GACAC,GACAC,MACG;AACH,QAAIJ;AACF,aAAOA,EAAWC,GAAMP,GAAQQ,GAAQC,CAAI;AAExC,UAAAE,IAAOb,EAAkBS,GAAMP,CAAM,GACrCY,IAAQL,EAAK,OAEf,gBAAAM,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAC,gBAAAC,EAAA,QAAA,EAAK,WAAWC,EAAG,GAAGX,CAAS,YAAY,GAAI,YAAK,KAAK,CAAA;AAAA,MACzD,gBAAAU,EAAA,QAAA,EAAK,WAAWC,EAAG,GAAGX,CAAS,YAAY,GACzC,UAAA,OAAOM,KAAS,WAAW,gBAAAI,EAACE,GAAU,EAAA,UAAAN,EAAA,CAAK,IAAcA,EAC5D,CAAA;AAAA,IAAA,GACF,IACE,OAAOA,KAAS,WACjB,gBAAAI,EAAAE,GAAA,EAAU,YAAK,CAAA,IAEhBN;AAGF,WAAOO,EAAWb,GAAWE,GAAMK,GAAOF,CAAI;AAAA,EAChD;AAGF;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Collapse as r } from "antd";
|
|
3
|
+
import { forwardRef as p } from "react";
|
|
4
|
+
import './style.css';/* empty css */
|
|
5
|
+
import { useCls as t } from "../utils/antdUtils.js";
|
|
6
|
+
import { clsx as c } from "../utils/cn.js";
|
|
7
|
+
const m = (s, o) => {
|
|
8
|
+
const { className: e, ...l } = s, n = t();
|
|
9
|
+
return /* @__PURE__ */ a(
|
|
10
|
+
r,
|
|
11
|
+
{
|
|
12
|
+
ref: o,
|
|
13
|
+
className: n("collapse", e),
|
|
14
|
+
...l
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}, i = p(m), f = (s) => {
|
|
18
|
+
const { className: o, ...e } = s, l = t();
|
|
19
|
+
return console.warn(
|
|
20
|
+
"[bioturing-ds] Collapse.Panel is deprecated. Please use items prop instead."
|
|
21
|
+
), /* @__PURE__ */ a(
|
|
22
|
+
r.Panel,
|
|
23
|
+
{
|
|
24
|
+
className: c(l("collapse-panel"), o),
|
|
25
|
+
...e
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}, b = Object.assign(i, {
|
|
29
|
+
Panel: f
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
b as Collapse
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/Collapse/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n Collapse as AntCollapse,\n type CollapseProps as AntCollapseProps,\n type CollapsePanelProps as AntCollapsePanelProps,\n} from \"antd\";\nimport { type ForwardedRef, forwardRef } from \"react\";\nimport { useCls, clsx } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's CollapseProps\nexport interface CollapseProps extends AntCollapseProps {}\n\n// Define props interface extending Ant Design's CollapsePanelProps\nexport interface CollapsePanelProps extends AntCollapsePanelProps {}\n\n// Create inner function with forwarded ref\nconst CollapseInner = (\n props: CollapseProps,\n ref: ForwardedRef<HTMLDivElement>\n) => {\n const { className, ...restProps } = props;\n const cls = useCls();\n return (\n <AntCollapse\n ref={ref}\n className={cls(\"collapse\", className)}\n {...restProps}\n />\n );\n};\n\n// Use forwardRef with type assertion\nconst MainCollapse = forwardRef(CollapseInner) as (\n props: CollapseProps & {\n ref?: React.ForwardedRef<HTMLDivElement>;\n }\n) => ReturnType<typeof CollapseInner>;\n\n// Create the Panel component (deprecated)\nconst Panel = (props: CollapsePanelProps) => {\n const { className, ...restProps } = props;\n const cls = useCls();\n console.warn(\n \"[bioturing-ds] Collapse.Panel is deprecated. Please use items prop instead.\"\n );\n return (\n <AntCollapse.Panel\n className={clsx(cls(\"collapse-panel\"), className)}\n {...restProps}\n />\n );\n};\n\n// Create the final component with Panel property\nexport const Collapse = Object.assign(MainCollapse, {\n Panel: Panel,\n});\n"],"names":["CollapseInner","props","ref","className","restProps","cls","useCls","jsx","AntCollapse","MainCollapse","forwardRef","Panel","clsx","Collapse"],"mappings":";;;;;;AAmBA,MAAMA,IAAgB,CACpBC,GACAC,MACG;AACH,QAAM,EAAE,WAAAC,GAAW,GAAGC,EAAA,IAAcH,GAC9BI,IAAMC,EAAO;AAEjB,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,KAAAN;AAAA,MACA,WAAWG,EAAI,YAAYF,CAAS;AAAA,MACnC,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ,GAGMK,IAAeC,EAAWV,CAAa,GAOvCW,IAAQ,CAACV,MAA8B;AAC3C,QAAM,EAAE,WAAAE,GAAW,GAAGC,EAAA,IAAcH,GAC9BI,IAAMC,EAAO;AACX,iBAAA;AAAA,IACN;AAAA,EACF,GAEE,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,WAAWI,EAAKP,EAAI,gBAAgB,GAAGF,CAAS;AAAA,MAC/C,GAAGC;AAAA,IAAA;AAAA,EACN;AAEJ,GAGaS,IAAW,OAAO,OAAOJ,GAAc;AAAA,EAClD,OAAAE;AACF,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{.ds-collapse .ds-collapse-header{display:flex;align-items:center}.ds-collapse .ds-collapse-expand-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;flex-grow:0}.ds-collapse .ds-collapse-header-text{flex-shrink:1;flex-grow:1;min-width:0;display:flex}}
|
|
@@ -5,8 +5,8 @@ import { useState as R, useRef as ue, useCallback as pe, useEffect as he } from
|
|
|
5
5
|
import { ModalContextProvider as be } from "antd/es/modal/context";
|
|
6
6
|
import L from "antd/es/modal/components/NormalCancelBtn";
|
|
7
7
|
import C from "antd/es/modal/components/NormalOkBtn";
|
|
8
|
-
import { getConfirmLocale as
|
|
9
|
-
import { useLocale as
|
|
8
|
+
import { getConfirmLocale as ge } from "antd/es/modal/locale";
|
|
9
|
+
import { useLocale as ve } from "antd/es/locale";
|
|
10
10
|
import { ModalSize as f } from "./constants.js";
|
|
11
11
|
import { Stack as h } from "../Stack/index.js";
|
|
12
12
|
import { Truncate as ye } from "../Truncate/component.js";
|
|
@@ -14,10 +14,10 @@ import { IconButton as we } from "../IconButton/component.js";
|
|
|
14
14
|
import { useCls as xe } from "../utils/antdUtils.js";
|
|
15
15
|
const We = ({
|
|
16
16
|
open: b,
|
|
17
|
-
closeIcon:
|
|
17
|
+
closeIcon: g,
|
|
18
18
|
children: j,
|
|
19
19
|
size: E,
|
|
20
|
-
footer:
|
|
20
|
+
footer: v,
|
|
21
21
|
width: F,
|
|
22
22
|
style: P,
|
|
23
23
|
styles: c,
|
|
@@ -46,7 +46,7 @@ const We = ({
|
|
|
46
46
|
bodyScrollable: Y = !0,
|
|
47
47
|
...Z
|
|
48
48
|
}) => {
|
|
49
|
-
const _ =
|
|
49
|
+
const _ = g === void 0 ? /* @__PURE__ */ e(fe, { size: 16, weight: "bold" }) : g, t = E || (Q === "default" ? "medium" : "xsmall"), ee = F || f[t], oe = {
|
|
50
50
|
"--ds-modal-bg": `var(--ds-color-bg-${V || (t && t in f && parseInt(f[t]) <= parseInt(f.medium) ? "elevated" : "container")})`,
|
|
51
51
|
...P,
|
|
52
52
|
...t === "fullscreen" ? { top: 0, maxWidth: "100%", height: "100%" } : {}
|
|
@@ -76,7 +76,7 @@ const We = ({
|
|
|
76
76
|
he(() => () => {
|
|
77
77
|
d.current && (d.current.disconnect(), d.current = null);
|
|
78
78
|
}, []);
|
|
79
|
-
const [s] =
|
|
79
|
+
const [s] = ve("Modal", ge()), le = y || (s == null ? void 0 : s.okText), se = x || (s == null ? void 0 : s.cancelText), S = {
|
|
80
80
|
loading: A,
|
|
81
81
|
...$
|
|
82
82
|
}, O = {
|
|
@@ -110,7 +110,7 @@ const We = ({
|
|
|
110
110
|
title: /* @__PURE__ */ m(N, { children: [
|
|
111
111
|
/* @__PURE__ */ m(h, { align: "center", gap: 8, className: a("modal-title-wrapper"), children: [
|
|
112
112
|
/* @__PURE__ */ e(h.Child, { grow: !0, children: typeof u == "string" ? /* @__PURE__ */ e(ye, { children: u }) : u }),
|
|
113
|
-
/* @__PURE__ */ m(h.Child, { stack: !0, hug: !0, align: "center", children: [
|
|
113
|
+
/* @__PURE__ */ m(h.Child, { stack: !0, hug: !0, align: "center", gap: 8, children: [
|
|
114
114
|
D,
|
|
115
115
|
/* @__PURE__ */ e(
|
|
116
116
|
we,
|
|
@@ -148,7 +148,7 @@ const We = ({
|
|
|
148
148
|
cancelText: x,
|
|
149
149
|
okType: "primary",
|
|
150
150
|
confirmLoading: w,
|
|
151
|
-
footer: typeof
|
|
151
|
+
footer: typeof v > "u" ? z && k ? null : ce : v,
|
|
152
152
|
centered: K,
|
|
153
153
|
...Z,
|
|
154
154
|
children: j
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntModal,\n type ModalProps as AntModalProps,\n} from \"antd/es/modal\";\nimport { XIcon } from \"@bioturing/assets\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useCls } from \"../utils\";\nimport { ModalContextProvider } from \"antd/es/modal/context\";\nimport NormalCancelBtn from \"antd/es/modal/components/NormalCancelBtn\";\nimport NormalOkBtn from \"antd/es/modal/components/NormalOkBtn\";\nimport { getConfirmLocale } from \"antd/es/modal/locale\";\nimport { useLocale } from \"antd/es/locale\";\nimport { IconButton } from \"../IconButton\";\nimport { ModalSize } from \"./constants\";\nimport { ModalType } from \"./functions\";\nimport { Truncate } from \"../Truncate\";\nimport { Stack } from \"../Stack\";\n\n// Define props interface extending Ant Design's ModalProps\nexport interface ModalProps extends Omit<AntModalProps, \"centered\"> {\n /**\n * Predefined sizes for the modal\n * - xsmall: 400px\n * - small: 520px\n * - medium: 640px (default)\n * - large: 840px\n * - xlarge: 1024px\n * - fullscreen: 100vw (takes full screen width with margins)\n * @default \"medium\" for default type, \"xsmall\" for other types\n */\n size?:\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"fullscreen\";\n /**\n * Mark modal as loading\n * @default false\n */\n loading?: boolean;\n /**\n * Hide Ok button\n * @default false\n */\n hideOkButton?: boolean;\n /**\n * Hide Cancel button\n * @default false\n */\n hideCancelButton?: boolean;\n /**\n * Custom Content Padding\n * @default \"24px\"\n */\n contentPadding?: number | string | boolean;\n /**\n * Add more content below the title\n */\n afterTitle?: React.ReactNode;\n /**\n * Add more actions before close button\n */\n beforeCloseButton?: React.ReactNode;\n /**\n * Add more actions after close button\n */\n afterCloseButton?: React.ReactNode;\n /**\n * Set header and footer to fixed position\n * @default false\n */\n defaultFixedHeaderFooter?: boolean;\n /**\n * Centered Modal\n * @default true\n */\n centered?: boolean;\n /**\n * Modal type\n * @default \"default\"\n */\n type?: ModalType;\n /**\n * Default open state for uncontrolled modal\n * @default true\n */\n defaultOpen?: boolean;\n /**\n * Modal background\n * @default \"elevated\" if size smaller than \"medium\", otherwise \"container\"\n */\n background?: \"elevated\" | \"container\";\n /**\n * Modal old close callback\n * @deprecated use onCancel instead\n */\n onClose?: () => void;\n /**\n * Make modal body scrollable\n * @default true\n */\n bodyScrollable?: boolean;\n}\n\n// Create Modal component\nexport const Modal = ({\n open: externalOpen,\n closeIcon,\n children,\n size: sizeProp,\n footer,\n width,\n style,\n styles,\n classNames,\n okButtonProps,\n cancelButtonProps,\n loading,\n onOk,\n onCancel,\n okText,\n okType = \"primary\",\n confirmLoading,\n cancelText = \"Close\",\n hideOkButton = false,\n hideCancelButton = false,\n contentPadding,\n title,\n afterTitle,\n beforeCloseButton,\n afterCloseButton,\n defaultFixedHeaderFooter = false,\n centered = true,\n type = \"default\",\n defaultOpen = true,\n background: backgroundProp,\n bodyScrollable = true,\n ...rest\n}: ModalProps) => {\n // Default close icon with Phosphor icon\n const defaultCloseIcon =\n closeIcon === undefined ? <XIcon size={16} weight=\"bold\" /> : closeIcon;\n\n // Use custom width if provided, otherwise use the size from the map\n const defaultModalSize = type === \"default\" ? \"medium\" : \"xsmall\";\n\n const size: keyof typeof ModalSize = sizeProp || defaultModalSize;\n const modalWidth = width || ModalSize[size];\n\n const background =\n backgroundProp ||\n (size &&\n size in ModalSize &&\n parseInt(ModalSize[size]) <= parseInt(ModalSize.medium)\n ? \"elevated\"\n : \"container\");\n\n // Apply additional styles for fullscreen mode\n const modalStyle = {\n \"--ds-modal-bg\": `var(--ds-color-bg-${background})`,\n ...style,\n ...(size === \"fullscreen\"\n ? { top: 0, maxWidth: \"100%\", height: \"100%\" }\n : {}),\n };\n\n const modalStyles = {\n ...styles,\n body: {\n ...((typeof contentPadding != \"undefined\"\n ? {\n \"--ds-modal-content-padding\":\n contentPadding === false || contentPadding === 0\n ? \"0\"\n : typeof contentPadding == \"number\"\n ? `${contentPadding}px`\n : contentPadding,\n }\n : {}) as React.CSSProperties),\n ...styles?.body,\n },\n };\n\n const [isContentOverflow, setIsContentOverflow] = useState(false);\n\n const cls = useCls();\n\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n\n const modalInnerRef = useCallback(\n (node: HTMLElement | null) => {\n // If the node is null (component unmounting), just return\n if (!node) return;\n\n const modalBody = node.querySelector(\".\" + cls(\"modal-body\"));\n if (!(modalBody instanceof HTMLElement)) return;\n\n // Create ResizeObserver to detect overflow\n const resizeObserver = new ResizeObserver(() => {\n const hasOverflow = modalBody.scrollHeight > modalBody.clientHeight;\n setIsContentOverflow(hasOverflow);\n });\n\n // Store reference to the observer\n resizeObserverRef.current = resizeObserver;\n\n // Start observing\n resizeObserver.observe(modalBody);\n\n // Initial check\n const hasOverflow = modalBody.scrollHeight > modalBody.clientHeight;\n setIsContentOverflow(hasOverflow);\n },\n [cls]\n );\n\n // clean up resize observer\n useEffect(() => {\n return () => {\n if (resizeObserverRef.current) {\n resizeObserverRef.current.disconnect();\n resizeObserverRef.current = null;\n }\n };\n }, []);\n\n const [locale] = useLocale(\"Modal\", getConfirmLocale());\n\n const okTextLocale: React.ReactNode = okText || locale?.okText;\n const cancelTextLocale = cancelText || locale?.cancelText;\n\n const modalOkButtonProps = {\n loading: loading,\n ...okButtonProps,\n };\n\n const modalCancelButtonProps = {\n ...cancelButtonProps,\n };\n\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n\n const uncontrolledOpen = typeof externalOpen === \"undefined\";\n\n const open = uncontrolledOpen ? internalOpen : externalOpen;\n\n const defaultFooter = (\n <ModalContextProvider\n value={{\n okButtonProps: modalOkButtonProps,\n cancelButtonProps: modalCancelButtonProps,\n onCancel,\n onOk,\n okType,\n confirmLoading,\n okTextLocale,\n cancelTextLocale,\n }}\n >\n {hideOkButton ? (\n <NormalCancelBtn />\n ) : hideCancelButton ? (\n <NormalOkBtn />\n ) : (\n <>\n <NormalCancelBtn />\n <NormalOkBtn />\n </>\n )}\n </ModalContextProvider>\n );\n const renderTitle = () => {\n return (\n <>\n <Stack align=\"center\" gap={8} className={cls(\"modal-title-wrapper\")}>\n <Stack.Child grow>\n {typeof title === \"string\" ? <Truncate>{title}</Truncate> : title}\n </Stack.Child>\n <Stack.Child stack hug align=\"center\">\n {beforeCloseButton}\n <IconButton\n onClick={(e: React.MouseEvent<HTMLButtonElement>) =>\n onCancel?.(e)\n }\n >\n {defaultCloseIcon}\n </IconButton>\n {afterCloseButton}\n </Stack.Child>\n {}\n </Stack>\n {afterTitle ? afterTitle : null}\n </>\n );\n };\n return (\n <AntModal\n closeIcon={false}\n open={open}\n width={modalWidth}\n style={modalStyle}\n title={renderTitle()}\n classNames={{\n ...classNames,\n wrapper: cls(\n \"modal-wrap\",\n size == \"fullscreen\" && \"modal-fullscreen\",\n isContentOverflow && \"modal-content-overflow\",\n bodyScrollable === false && \"modal-no-body-scroll\",\n defaultFixedHeaderFooter || isContentOverflow || size == \"fullscreen\"\n ? \"modal-fixed\"\n : \"\"\n ),\n }}\n styles={modalStyles}\n modalRender={(modal) => (\n <div ref={modalInnerRef} className={cls(\"modal-inner\")}>\n {modal}\n </div>\n )}\n okButtonProps={modalOkButtonProps}\n cancelButtonProps={modalCancelButtonProps}\n onOk={(e) => {\n if (uncontrolledOpen) setInternalOpen(false);\n onOk?.(e);\n }}\n onCancel={(e) => {\n if (uncontrolledOpen) setInternalOpen(false);\n onCancel?.(e);\n }}\n okText={okText}\n cancelText={cancelText}\n okType=\"primary\"\n confirmLoading={confirmLoading}\n footer={\n typeof footer === \"undefined\"\n ? hideOkButton && hideCancelButton\n ? null\n : defaultFooter\n : footer\n }\n centered={centered}\n {...rest}\n >\n {children}\n </AntModal>\n );\n};\n"],"names":["Modal","externalOpen","closeIcon","children","sizeProp","footer","width","style","styles","classNames","okButtonProps","cancelButtonProps","loading","onOk","onCancel","okText","okType","confirmLoading","cancelText","hideOkButton","hideCancelButton","contentPadding","title","afterTitle","beforeCloseButton","afterCloseButton","defaultFixedHeaderFooter","centered","type","defaultOpen","backgroundProp","bodyScrollable","rest","defaultCloseIcon","jsx","XIcon","size","modalWidth","ModalSize","modalStyle","modalStyles","isContentOverflow","setIsContentOverflow","useState","cls","useCls","resizeObserverRef","useRef","modalInnerRef","useCallback","node","modalBody","resizeObserver","hasOverflow","useEffect","locale","useLocale","getConfirmLocale","okTextLocale","cancelTextLocale","modalOkButtonProps","modalCancelButtonProps","internalOpen","setInternalOpen","uncontrolledOpen","open","defaultFooter","ModalContextProvider","NormalCancelBtn","NormalOkBtn","jsxs","Fragment","AntModal","Stack","Truncate","IconButton","e","modal"],"mappings":";;;;;;;;;;;;;;AA6GO,MAAMA,KAAQ,CAAC;AAAA,EACpB,MAAMC;AAAA,EACN,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAMC;AAAA,EACN,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,gBAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,kBAAAC,IAAmB;AAAA,E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nD,KAAA,QAAAA,EAAO+D;AAAA,MACT;AAAA,MACA,UAAU,CAACA,MAAM;AACX,QAAAZ,OAAkC,EAAK,GAC3ClD,KAAA,QAAAA,EAAW8D;AAAA,MACb;AAAA,MACA,QAAA7D;AAAA,MACA,YAAAG;AAAA,MACA,QAAO;AAAA,MACP,gBAAAD;AAAA,MACA,QACE,OAAOZ,IAAW,MACdc,KAAgBC,IACd,OACA8C,KACF7D;AAAA,MAEN,UAAAsB;AAAA,MACC,GAAGK;AAAA,MAEH,UAAA7B;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntModal,\n type ModalProps as AntModalProps,\n} from \"antd/es/modal\";\nimport { XIcon } from \"@bioturing/assets\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useCls } from \"../utils\";\nimport { ModalContextProvider } from \"antd/es/modal/context\";\nimport NormalCancelBtn from \"antd/es/modal/components/NormalCancelBtn\";\nimport NormalOkBtn from \"antd/es/modal/components/NormalOkBtn\";\nimport { getConfirmLocale } from \"antd/es/modal/locale\";\nimport { useLocale } from \"antd/es/locale\";\nimport { IconButton } from \"../IconButton\";\nimport { ModalSize } from \"./constants\";\nimport { ModalType } from \"./functions\";\nimport { Truncate } from \"../Truncate\";\nimport { Stack } from \"../Stack\";\n\n// Define props interface extending Ant Design's ModalProps\nexport interface ModalProps extends Omit<AntModalProps, \"centered\"> {\n /**\n * Predefined sizes for the modal\n * - xsmall: 400px\n * - small: 520px\n * - medium: 640px (default)\n * - large: 840px\n * - xlarge: 1024px\n * - fullscreen: 100vw (takes full screen width with margins)\n * @default \"medium\" for default type, \"xsmall\" for other types\n */\n size?:\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"fullscreen\";\n /**\n * Mark modal as loading\n * @default false\n */\n loading?: boolean;\n /**\n * Hide Ok button\n * @default false\n */\n hideOkButton?: boolean;\n /**\n * Hide Cancel button\n * @default false\n */\n hideCancelButton?: boolean;\n /**\n * Custom Content Padding\n * @default \"24px\"\n */\n contentPadding?: number | string | boolean;\n /**\n * Add more content below the title\n */\n afterTitle?: React.ReactNode;\n /**\n * Add more actions before close button\n */\n beforeCloseButton?: React.ReactNode;\n /**\n * Add more actions after close button\n */\n afterCloseButton?: React.ReactNode;\n /**\n * Set header and footer to fixed position\n * @default false\n */\n defaultFixedHeaderFooter?: boolean;\n /**\n * Centered Modal\n * @default true\n */\n centered?: boolean;\n /**\n * Modal type\n * @default \"default\"\n */\n type?: ModalType;\n /**\n * Default open state for uncontrolled modal\n * @default true\n */\n defaultOpen?: boolean;\n /**\n * Modal background\n * @default \"elevated\" if size smaller than \"medium\", otherwise \"container\"\n */\n background?: \"elevated\" | \"container\";\n /**\n * Modal old close callback\n * @deprecated use onCancel instead\n */\n onClose?: () => void;\n /**\n * Make modal body scrollable\n * @default true\n */\n bodyScrollable?: boolean;\n}\n\n// Create Modal component\nexport const Modal = ({\n open: externalOpen,\n closeIcon,\n children,\n size: sizeProp,\n footer,\n width,\n style,\n styles,\n classNames,\n okButtonProps,\n cancelButtonProps,\n loading,\n onOk,\n onCancel,\n okText,\n okType = \"primary\",\n confirmLoading,\n cancelText = \"Close\",\n hideOkButton = false,\n hideCancelButton = false,\n contentPadding,\n title,\n afterTitle,\n beforeCloseButton,\n afterCloseButton,\n defaultFixedHeaderFooter = false,\n centered = true,\n type = \"default\",\n defaultOpen = true,\n background: backgroundProp,\n bodyScrollable = true,\n ...rest\n}: ModalProps) => {\n // Default close icon with Phosphor icon\n const defaultCloseIcon =\n closeIcon === undefined ? <XIcon size={16} weight=\"bold\" /> : closeIcon;\n\n // Use custom width if provided, otherwise use the size from the map\n const defaultModalSize = type === \"default\" ? \"medium\" : \"xsmall\";\n\n const size: keyof typeof ModalSize = sizeProp || defaultModalSize;\n const modalWidth = width || ModalSize[size];\n\n const background =\n backgroundProp ||\n (size &&\n size in ModalSize &&\n parseInt(ModalSize[size]) <= parseInt(ModalSize.medium)\n ? \"elevated\"\n : \"container\");\n\n // Apply additional styles for fullscreen mode\n const modalStyle = {\n \"--ds-modal-bg\": `var(--ds-color-bg-${background})`,\n ...style,\n ...(size === \"fullscreen\"\n ? { top: 0, maxWidth: \"100%\", height: \"100%\" }\n : {}),\n };\n\n const modalStyles = {\n ...styles,\n body: {\n ...((typeof contentPadding != \"undefined\"\n ? {\n \"--ds-modal-content-padding\":\n contentPadding === false || contentPadding === 0\n ? \"0\"\n : typeof contentPadding == \"number\"\n ? `${contentPadding}px`\n : contentPadding,\n }\n : {}) as React.CSSProperties),\n ...styles?.body,\n },\n };\n\n const [isContentOverflow, setIsContentOverflow] = useState(false);\n\n const cls = useCls();\n\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n\n const modalInnerRef = useCallback(\n (node: HTMLElement | null) => {\n // If the node is null (component unmounting), just return\n if (!node) return;\n\n const modalBody = node.querySelector(\".\" + cls(\"modal-body\"));\n if (!(modalBody instanceof HTMLElement)) return;\n\n // Create ResizeObserver to detect overflow\n const resizeObserver = new ResizeObserver(() => {\n const hasOverflow = modalBody.scrollHeight > modalBody.clientHeight;\n setIsContentOverflow(hasOverflow);\n });\n\n // Store reference to the observer\n resizeObserverRef.current = resizeObserver;\n\n // Start observing\n resizeObserver.observe(modalBody);\n\n // Initial check\n const hasOverflow = modalBody.scrollHeight > modalBody.clientHeight;\n setIsContentOverflow(hasOverflow);\n },\n [cls]\n );\n\n // clean up resize observer\n useEffect(() => {\n return () => {\n if (resizeObserverRef.current) {\n resizeObserverRef.current.disconnect();\n resizeObserverRef.current = null;\n }\n };\n }, []);\n\n const [locale] = useLocale(\"Modal\", getConfirmLocale());\n\n const okTextLocale: React.ReactNode = okText || locale?.okText;\n const cancelTextLocale = cancelText || locale?.cancelText;\n\n const modalOkButtonProps = {\n loading: loading,\n ...okButtonProps,\n };\n\n const modalCancelButtonProps = {\n ...cancelButtonProps,\n };\n\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n\n const uncontrolledOpen = typeof externalOpen === \"undefined\";\n\n const open = uncontrolledOpen ? internalOpen : externalOpen;\n\n const defaultFooter = (\n <ModalContextProvider\n value={{\n okButtonProps: modalOkButtonProps,\n cancelButtonProps: modalCancelButtonProps,\n onCancel,\n onOk,\n okType,\n confirmLoading,\n okTextLocale,\n cancelTextLocale,\n }}\n >\n {hideOkButton ? (\n <NormalCancelBtn />\n ) : hideCancelButton ? (\n <NormalOkBtn />\n ) : (\n <>\n <NormalCancelBtn />\n <NormalOkBtn />\n </>\n )}\n </ModalContextProvider>\n );\n const renderTitle = () => {\n return (\n <>\n <Stack align=\"center\" gap={8} className={cls(\"modal-title-wrapper\")}>\n <Stack.Child grow>\n {typeof title === \"string\" ? <Truncate>{title}</Truncate> : title}\n </Stack.Child>\n <Stack.Child stack hug align=\"center\" gap={8}>\n {beforeCloseButton}\n <IconButton\n onClick={(e: React.MouseEvent<HTMLButtonElement>) =>\n onCancel?.(e)\n }\n >\n {defaultCloseIcon}\n </IconButton>\n {afterCloseButton}\n </Stack.Child>\n {}\n </Stack>\n {afterTitle ? afterTitle : null}\n </>\n );\n };\n return (\n <AntModal\n closeIcon={false}\n open={open}\n width={modalWidth}\n style={modalStyle}\n title={renderTitle()}\n classNames={{\n ...classNames,\n wrapper: cls(\n \"modal-wrap\",\n size == \"fullscreen\" && \"modal-fullscreen\",\n isContentOverflow && \"modal-content-overflow\",\n bodyScrollable === false && \"modal-no-body-scroll\",\n defaultFixedHeaderFooter || isContentOverflow || size == \"fullscreen\"\n ? \"modal-fixed\"\n : \"\"\n ),\n }}\n styles={modalStyles}\n modalRender={(modal) => (\n <div ref={modalInnerRef} className={cls(\"modal-inner\")}>\n {modal}\n </div>\n )}\n okButtonProps={modalOkButtonProps}\n cancelButtonProps={modalCancelButtonProps}\n onOk={(e) => {\n if (uncontrolledOpen) setInternalOpen(false);\n onOk?.(e);\n }}\n onCancel={(e) => {\n if (uncontrolledOpen) setInternalOpen(false);\n onCancel?.(e);\n }}\n okText={okText}\n cancelText={cancelText}\n okType=\"primary\"\n confirmLoading={confirmLoading}\n footer={\n typeof footer === \"undefined\"\n ? hideOkButton && hideCancelButton\n ? null\n : defaultFooter\n : footer\n }\n centered={centered}\n {...rest}\n >\n {children}\n </AntModal>\n );\n};\n"],"names":["Modal","externalOpen","closeIcon","children","sizeProp","footer","width","style","styles","classNames","okButtonProps","cancelButtonProps","loading","onOk","onCancel","okText","okType","confirmLoading","cancelText","hideOkButton","hideCancelButton","contentPadding","title","afterTitle","beforeCloseButton","afterCloseButton","defaultFixedHeaderFooter","centered","type","defaultOpen","backgroundProp","bodyScrollable","rest","defaultCloseIcon","jsx","XIcon","size","modalWidth","ModalSize","modalStyle","modalStyles","isContentOverflow","setIsContentOverflow","useState","cls","useCls","resizeObserverRef","useRef","modalInnerRef","useCallback","node","modalBody","resizeObserver","hasOverflow","useEffect","locale","useLocale","getConfirmLocale","okTextLocale","cancelTextLocale","modalOkButtonProps","modalCancelButtonProps","internalOpen","setInternalOpen","uncontrolledOpen","open","defaultFooter","ModalContextProvider","NormalCancelBtn","NormalOkBtn","jsxs","Fragment","AntModal","Stack","Truncate","IconButton","e","modal"],"mappings":";;;;;;;;;;;;;;AA6GO,MAAMA,KAAQ,CAAC;AAAA,EACpB,MAAMC;AAAA,EACN,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAMC;AAAA,EACN,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,gBAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,kBAAAC,IAAmB;AAAA,E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AAK,GAC3CnD,KAAA,QAAAA,EAAO+D;AAAA,MACT;AAAA,MACA,UAAU,CAACA,MAAM;AACX,QAAAZ,OAAkC,EAAK,GAC3ClD,KAAA,QAAAA,EAAW8D;AAAA,MACb;AAAA,MACA,QAAA7D;AAAA,MACA,YAAAG;AAAA,MACA,QAAO;AAAA,MACP,gBAAAD;AAAA,MACA,QACE,OAAOZ,IAAW,MACdc,KAAgBC,IACd,OACA8C,KACF7D;AAAA,MAEN,UAAAsB;AAAA,MACC,GAAGK;AAAA,MAEH,UAAA7B;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
@@ -1,68 +1,108 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Empty as
|
|
1
|
+
import { jsx as t, jsxs as j, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import o from "antd/es/table";
|
|
3
|
+
import { FunnelIcon as A, CaretUpIcon as g, CaretDownIcon as L } from "@bioturing/assets";
|
|
4
|
+
import { Empty as U } from "../Empty/component.js";
|
|
5
|
+
import { forwardRef as H, useState as M, useRef as R, useEffect as D, useCallback as P } from "react";
|
|
5
6
|
import './style.css';/* empty css */
|
|
6
|
-
import { useCls as
|
|
7
|
-
const
|
|
8
|
-
columns:
|
|
9
|
-
locale:
|
|
10
|
-
emptyDescription:
|
|
11
|
-
loading:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
import { useCls as $ } from "../utils/antdUtils.js";
|
|
8
|
+
const k = ({
|
|
9
|
+
columns: N,
|
|
10
|
+
locale: S,
|
|
11
|
+
emptyDescription: T,
|
|
12
|
+
loading: c,
|
|
13
|
+
virtual: s,
|
|
14
|
+
scroll: d = {},
|
|
15
|
+
...y
|
|
16
|
+
}, r) => {
|
|
17
|
+
const i = $(), [O, b] = M(
|
|
18
|
+
s ? {} : {
|
|
19
|
+
x: "fit-content"
|
|
20
|
+
}
|
|
21
|
+
), a = R(null);
|
|
22
|
+
D(() => {
|
|
23
|
+
var I;
|
|
24
|
+
if (!a.current || !s) return;
|
|
25
|
+
const e = (I = a.current) == null ? void 0 : I.nativeElement, n = e == null ? void 0 : e.parentElement;
|
|
26
|
+
if (!n) return;
|
|
27
|
+
const l = e == null ? void 0 : e.querySelector(
|
|
28
|
+
`.${i("table-thead")}`
|
|
29
|
+
), m = e == null ? void 0 : e.querySelector(
|
|
30
|
+
`.${i("table-pagination")}`
|
|
31
|
+
);
|
|
32
|
+
let C = 0;
|
|
33
|
+
if (m) {
|
|
34
|
+
const p = getComputedStyle(m).marginTop, u = getComputedStyle(m).marginBottom;
|
|
35
|
+
C = m.offsetHeight + parseInt(p) + parseInt(u);
|
|
36
|
+
}
|
|
37
|
+
const E = new ResizeObserver((p) => {
|
|
38
|
+
for (const u of p)
|
|
39
|
+
u.target && b({
|
|
40
|
+
y: n.offsetHeight - (l ? l == null ? void 0 : l.offsetHeight : 0) - C
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
return n && s && E.observe(n), () => {
|
|
44
|
+
n && s && E.disconnect();
|
|
45
|
+
};
|
|
46
|
+
}, [s, i]);
|
|
47
|
+
const h = N ? N.map((e) => ({
|
|
48
|
+
sortIcon: ({ sortOrder: n }) => /* @__PURE__ */ t(
|
|
17
49
|
"span",
|
|
18
50
|
{
|
|
19
|
-
className:
|
|
51
|
+
className: i(
|
|
20
52
|
"table-column-sort-icon",
|
|
21
|
-
|
|
53
|
+
n ? `table-column-sort-icon-${n}` : "table-column-sort-icon-none"
|
|
22
54
|
),
|
|
23
|
-
children:
|
|
24
|
-
/* @__PURE__ */
|
|
55
|
+
children: n ? n === "ascend" ? /* @__PURE__ */ t(g, { weight: "fill" }) : /* @__PURE__ */ t(L, { weight: "fill" }) : /* @__PURE__ */ j(x, { children: [
|
|
56
|
+
/* @__PURE__ */ t(g, { weight: "fill" }),
|
|
25
57
|
" ",
|
|
26
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ t(L, { weight: "fill" })
|
|
27
59
|
] })
|
|
28
60
|
}
|
|
29
61
|
),
|
|
30
|
-
filterIcon: (
|
|
31
|
-
...
|
|
32
|
-
})) : void 0,
|
|
33
|
-
emptyText: /* @__PURE__ */
|
|
34
|
-
...
|
|
62
|
+
filterIcon: (n) => /* @__PURE__ */ t("span", { className: i("table-column-filter-icon"), children: /* @__PURE__ */ t(A, { weight: "fill" }) }),
|
|
63
|
+
...e
|
|
64
|
+
})) : void 0, _ = {
|
|
65
|
+
emptyText: /* @__PURE__ */ t(U, { description: T }),
|
|
66
|
+
...S
|
|
35
67
|
};
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
spinning:
|
|
39
|
-
indicator: /* @__PURE__ */
|
|
40
|
-
} : typeof
|
|
68
|
+
let f;
|
|
69
|
+
typeof c == "boolean" ? f = {
|
|
70
|
+
spinning: c,
|
|
71
|
+
indicator: /* @__PURE__ */ t("span", { className: i("spin-loader") })
|
|
72
|
+
} : typeof c == "object" && (f = {
|
|
41
73
|
spinning: !0,
|
|
42
|
-
indicator: /* @__PURE__ */
|
|
43
|
-
...
|
|
44
|
-
})
|
|
45
|
-
|
|
74
|
+
indicator: /* @__PURE__ */ t("span", { className: i("spin-loader") }),
|
|
75
|
+
...c
|
|
76
|
+
});
|
|
77
|
+
const w = P(
|
|
78
|
+
(e) => {
|
|
79
|
+
e && (typeof r == "function" && r(e), r && typeof r == "object" && "current" in r && (r.current = e), a.current = e);
|
|
80
|
+
},
|
|
81
|
+
[r]
|
|
82
|
+
);
|
|
83
|
+
return /* @__PURE__ */ t(
|
|
84
|
+
o,
|
|
46
85
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
86
|
+
ref: w,
|
|
87
|
+
columns: h,
|
|
88
|
+
loading: f,
|
|
89
|
+
locale: _,
|
|
90
|
+
virtual: s,
|
|
91
|
+
scroll: { ...O, ...d },
|
|
92
|
+
...y
|
|
52
93
|
}
|
|
53
94
|
);
|
|
54
|
-
},
|
|
55
|
-
Column:
|
|
56
|
-
ColumnGroup:
|
|
57
|
-
SELECTION_COLUMN:
|
|
58
|
-
EXPAND_COLUMN:
|
|
59
|
-
SELECTION_ALL:
|
|
60
|
-
SELECTION_INVERT:
|
|
61
|
-
SELECTION_NONE:
|
|
62
|
-
Summary:
|
|
95
|
+
}, q = H(k), J = Object.assign(q, {
|
|
96
|
+
Column: o.Column,
|
|
97
|
+
ColumnGroup: o.ColumnGroup,
|
|
98
|
+
SELECTION_COLUMN: o.SELECTION_COLUMN,
|
|
99
|
+
EXPAND_COLUMN: o.EXPAND_COLUMN,
|
|
100
|
+
SELECTION_ALL: o.SELECTION_ALL,
|
|
101
|
+
SELECTION_INVERT: o.SELECTION_INVERT,
|
|
102
|
+
SELECTION_NONE: o.SELECTION_NONE,
|
|
103
|
+
Summary: o.Summary
|
|
63
104
|
});
|
|
64
105
|
export {
|
|
65
|
-
|
|
66
|
-
y as default
|
|
106
|
+
J as Table
|
|
67
107
|
};
|
|
68
108
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/Table/component.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/Table/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntTable,\n type ColumnType,\n type TableProps as AntTableProps,\n type TableRef,\n} from \"antd/es/table\";\nimport { CaretDownIcon, CaretUpIcon, FunnelIcon } from \"@bioturing/assets\";\nimport { useCls } from \"../utils\";\nimport Empty from \"../Empty/component\";\nimport { SpinProps } from \"antd/es/spin\";\nimport {\n useState,\n useEffect,\n forwardRef,\n Ref,\n ForwardedRef,\n useCallback,\n useRef,\n} from \"react\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define interface with all the generic type parameters from AntTable without any\nexport interface TableProps<RecordType extends object = object>\n extends AntTableProps<RecordType> {\n /**\n * Add empty description for the table\n */\n emptyDescription?: React.ReactNode;\n /**\n * Table ref\n */\n tableRef?: React.Ref<HTMLDivElement>;\n}\n\n// Simple wrapper component with proper generics\nconst InnerInternalTable = <RecordType extends object = object>(\n {\n columns,\n locale,\n emptyDescription,\n loading,\n virtual,\n scroll: scrollProp = {},\n ...rest\n }: TableProps<RecordType>,\n ref: Ref<TableRef>\n) => {\n const cls = useCls();\n const [scroll, setScroll] = useState<TableProps[\"scroll\"]>(\n virtual\n ? {}\n : {\n x: \"fit-content\",\n }\n );\n\n const innerRef = useRef<TableRef>(null);\n\n useEffect(() => {\n if (!innerRef.current || !virtual) return;\n const tableEl = innerRef.current?.nativeElement;\n const parentEl = tableEl?.parentElement;\n if (!parentEl) return;\n const thead = tableEl?.querySelector(\n `.${cls(\"table-thead\")}`\n ) as HTMLElement;\n const tpagination = tableEl?.querySelector(\n `.${cls(\"table-pagination\")}`\n ) as HTMLElement;\n let tpaginationHeight = 0;\n if (tpagination) {\n const mt = getComputedStyle(tpagination).marginTop;\n const mb = getComputedStyle(tpagination).marginBottom;\n tpaginationHeight =\n tpagination.offsetHeight + parseInt(mt) + parseInt(mb);\n }\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n if (entry.target) {\n setScroll({\n y:\n parentEl.offsetHeight -\n (thead ? thead?.offsetHeight : 0) -\n tpaginationHeight,\n });\n }\n }\n });\n if (parentEl && virtual) {\n resizeObserver.observe(parentEl);\n }\n return () => {\n if (parentEl && virtual) {\n resizeObserver.disconnect();\n }\n };\n }, [virtual, cls]);\n\n const modifiedColumns = columns\n ? columns.map((column: ColumnType<RecordType>): ColumnType<RecordType> => {\n return {\n sortIcon: ({ sortOrder }) => {\n return (\n <span\n className={cls(\n \"table-column-sort-icon\",\n sortOrder\n ? `table-column-sort-icon-${sortOrder}`\n : `table-column-sort-icon-none`\n )}\n >\n {!sortOrder ? (\n <>\n <CaretUpIcon weight=\"fill\" />{\" \"}\n <CaretDownIcon weight=\"fill\" />\n </>\n ) : sortOrder === \"ascend\" ? (\n <CaretUpIcon weight=\"fill\" />\n ) : (\n <CaretDownIcon weight=\"fill\" />\n )}\n </span>\n );\n },\n filterIcon: (_filtered) => {\n return (\n <span className={cls(\"table-column-filter-icon\")}>\n <FunnelIcon weight=\"fill\" />\n </span>\n );\n },\n ...column,\n };\n })\n : undefined;\n const modifiedLocale = {\n emptyText: <Empty description={emptyDescription} />,\n ...locale,\n };\n let spinProps: SpinProps | undefined;\n if (typeof loading === \"boolean\") {\n spinProps = {\n spinning: loading,\n indicator: <span className={cls(\"spin-loader\")} />,\n };\n } else if (typeof loading === \"object\") {\n spinProps = {\n spinning: true,\n indicator: <span className={cls(\"spin-loader\")} />,\n ...loading,\n };\n }\n const callbackRef = useCallback(\n (tableRef: TableRef) => {\n if (tableRef) {\n if (typeof ref === \"function\") {\n ref(tableRef);\n }\n if (ref && typeof ref === \"object\" && \"current\" in ref) {\n ref.current = tableRef;\n }\n innerRef.current = tableRef;\n }\n },\n [ref]\n );\n\n return (\n <AntTable\n ref={callbackRef}\n columns={modifiedColumns}\n loading={spinProps}\n locale={modifiedLocale}\n virtual={virtual}\n scroll={{ ...scroll, ...scrollProp }}\n {...rest}\n />\n );\n};\n\nconst InternalTable = forwardRef(InnerInternalTable) as <\n RecordType extends object = object\n>(\n props: TableProps<RecordType> & { ref?: ForwardedRef<TableRef> }\n) => ReturnType<typeof InnerInternalTable>;\n\n// Create the final component with all static properties\nexport const Table = Object.assign(InternalTable, {\n Column: AntTable.Column,\n ColumnGroup: AntTable.ColumnGroup,\n SELECTION_COLUMN: AntTable.SELECTION_COLUMN,\n EXPAND_COLUMN: AntTable.EXPAND_COLUMN,\n SELECTION_ALL: AntTable.SELECTION_ALL,\n SELECTION_INVERT: AntTable.SELECTION_INVERT,\n SELECTION_NONE: AntTable.SELECTION_NONE,\n Summary: AntTable.Summary,\n}) as typeof InternalTable & {\n Column: typeof AntTable.Column;\n ColumnGroup: typeof AntTable.ColumnGroup;\n SELECTION_COLUMN: typeof AntTable.SELECTION_COLUMN;\n EXPAND_COLUMN: typeof AntTable.EXPAND_COLUMN;\n SELECTION_ALL: typeof AntTable.SELECTION_ALL;\n SELECTION_INVERT: typeof AntTable.SELECTION_INVERT;\n SELECTION_NONE: typeof AntTable.SELECTION_NONE;\n Summary: typeof AntTable.Summary;\n};\n"],"names":["InnerInternalTable","columns","locale","emptyDescription","loading","virtual","scrollProp","rest","ref","cls","useCls","scroll","setScroll","useState","innerRef","useRef","useEffect","tableEl","_a","parentEl","thead","tpagination","tpaginationHeight","mt","mb","resizeObserver","entries","entry","modifiedColumns","column","sortOrder","jsx","CaretUpIcon","CaretDownIcon","jsxs","Fragment","_filtered","FunnelIcon","modifiedLocale","Empty","spinProps","callbackRef","useCallback","tableRef","AntTable","InternalTable","forwardRef","Table"],"mappings":";;;;;;;AAsCA,MAAMA,IAAqB,CACzB;AAAA,EACE,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAQC,IAAa,CAAC;AAAA,EACtB,GAAGC;AACL,GACAC,MACG;AACH,QAAMC,IAAMC,EAAO,GACb,CAACC,GAAQC,CAAS,IAAIC;AAAA,IAC1BR,IACI,CAAA,IACA;AAAA,MACE,GAAG;AAAA,IAAA;AAAA,EAEX,GAEMS,IAAWC,EAAiB,IAAI;AAEtC,EAAAC,EAAU,MAAM;;AACd,QAAI,CAACF,EAAS,WAAW,CAACT,EAAS;AAC7B,UAAAY,KAAUC,IAAAJ,EAAS,YAAT,gBAAAI,EAAkB,eAC5BC,IAAWF,KAAA,gBAAAA,EAAS;AAC1B,QAAI,CAACE,EAAU;AACf,UAAMC,IAAQH,KAAA,gBAAAA,EAAS;AAAA,MACrB,IAAIR,EAAI,aAAa,CAAC;AAAA,OAElBY,IAAcJ,KAAA,gBAAAA,EAAS;AAAA,MAC3B,IAAIR,EAAI,kBAAkB,CAAC;AAAA;AAE7B,QAAIa,IAAoB;AACxB,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|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-table-column-sort-icon{display:flex;flex-direction:column}.ds-table-column-sort-icon svg{color:var(--ds-color-text-disabled);font-size:1rem}:is(.ds-table-column-sort-icon svg):hover{color:var(--ds-color-text-secondary)}.ds-table-column-sort-icon.ds-table-column-sort-icon-none svg{font-size:.75rem}.ds-table-column-sort-icon.ds-table-column-sort-icon-none>svg:first-child{margin-bottom:-2px}.ds-table-column-sort-icon.ds-table-column-sort-icon-none>svg:last-child{margin-top:-2px}.ds-table-column-filter-icon{display:flex;flex-direction:column}.ds-table-column-filter-icon svg{color:var(--ds-color-text-disabled);font-size:.875rem}:is(.ds-table-column-filter-icon svg):hover{color:var(--ds-color-text-secondary)}.ds-table-column-filter-icon.ds-table-column-filter-icon-active svg{color:var(--ds-color-primary)}.ds-table-wrapper .ds-table-ping-left .ds-table-cell-fix-left-first:after,.ds-table-wrapper .ds-table-ping-left .ds-table-cell-fix-left-last:after{box-shadow:inset 10px 0 8px -8px var(--ds-color-table-fixed-column-shadow)}.ds-table-wrapper .ds-table-ping-right .ds-table-cell-fix-right-first:after,.ds-table-wrapper .ds-table-ping-right .ds-table-cell-fix-right-last:after{box-shadow:inset -10px 0 8px -8px var(--ds-color-table-fixed-column-shadow)}.ds-table-wrapper .ds-table-ping-right:not(.ds-table-has-fix-right) .ds-table-container:after{box-shadow:inset -10px 0 8px -8px var(--ds-color-table-fixed-column-shadow)}.ds-table-wrapper .ds-table-ping-left:not(.ds-table-has-fix-left) .ds-table-container:before{box-shadow:inset 10px 0 8px -8px var(--ds-color-table-fixed-column-shadow)}.ds-table-wrapper{display:flex;flex-direction:column}.ds-table-wrapper .ds-spin-nested-loading,.ds-table-wrapper .ds-spin-container{display:flex;flex-direction:column;flex-shrink:1;flex-grow:1;min-height:0}:is(.ds-table-wrapper .ds-spin-container) .ds-table{flex-shrink:1;flex-grow:1;min-height:0}.ds-table{display:flex;flex-direction:column}.ds-table-container{flex-shrink:1;min-height:0;display:flex;flex-direction:column}.ds-table-header{flex-shrink:0}.ds-table-body{flex-shrink:1}}
|
|
1
|
+
@layer components{.ds-table-column-sort-icon{display:flex;flex-direction:column}.ds-table-column-sort-icon svg{color:var(--ds-color-text-disabled);font-size:1rem}:is(.ds-table-column-sort-icon svg):hover{color:var(--ds-color-text-secondary)}.ds-table-column-sort-icon.ds-table-column-sort-icon-none svg{font-size:.75rem}.ds-table-column-sort-icon.ds-table-column-sort-icon-none>svg:first-child{margin-bottom:-2px}.ds-table-column-sort-icon.ds-table-column-sort-icon-none>svg:last-child{margin-top:-2px}.ds-table-column-filter-icon{display:flex;flex-direction:column}.ds-table-column-filter-icon svg{color:var(--ds-color-text-disabled);font-size:.875rem}:is(.ds-table-column-filter-icon svg):hover{color:var(--ds-color-text-secondary)}.ds-table-column-filter-icon.ds-table-column-filter-icon-active svg{color:var(--ds-color-primary)}.ds-table-wrapper .ds-table-ping-left .ds-table-cell-fix-left-first:after,.ds-table-wrapper .ds-table-ping-left .ds-table-cell-fix-left-last:after{box-shadow:inset 10px 0 8px -8px var(--ds-color-table-fixed-column-shadow)}.ds-table-wrapper .ds-table-ping-right .ds-table-cell-fix-right-first:after,.ds-table-wrapper .ds-table-ping-right .ds-table-cell-fix-right-last:after{box-shadow:inset -10px 0 8px -8px var(--ds-color-table-fixed-column-shadow)}.ds-table-wrapper .ds-table-ping-right:not(.ds-table-has-fix-right) .ds-table-container:after{box-shadow:inset -10px 0 8px -8px var(--ds-color-table-fixed-column-shadow)}.ds-table-wrapper .ds-table-ping-left:not(.ds-table-has-fix-left) .ds-table-container:before{box-shadow:inset 10px 0 8px -8px var(--ds-color-table-fixed-column-shadow)}.ds-table-wrapper{display:flex;flex-direction:column}.ds-table-wrapper .ds-spin-nested-loading,.ds-table-wrapper .ds-spin-container{display:flex;flex-direction:column;flex-shrink:1;flex-grow:1;min-height:0}:is(.ds-table-wrapper .ds-spin-container) .ds-table{flex-shrink:1;flex-grow:1;min-height:0}.ds-table{display:flex;flex-direction:column}.ds-table-container{flex-shrink:1;min-height:0;display:flex;flex-direction:column}.ds-table-header{flex-shrink:0}.ds-table-body{flex-shrink:1;min-height:0;min-width:0}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/Tag/component.tsx"],"sourcesContent":["\"use client\";\nimport { X } from \"@bioturing/assets\";\nimport {
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/Tag/component.tsx"],"sourcesContent":["\"use client\";\nimport { X } from \"@bioturing/assets\";\nimport {\n default as AntTag,\n type TagProps as AntTagProps,\n type TagType,\n} from \"antd/es/tag\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport { TagType };\n\n// Define props interface extending Ant Design's TagProps\nexport interface TagProps extends AntTagProps {\n /**\n * Indicates if the tag is active\n * @default false\n */\n active?: boolean;\n}\n\n// Create Tag component\nconst InternalTag = ({\n className,\n active = false,\n color,\n style,\n closeIcon,\n closable,\n ...rest\n}: TagProps) => {\n const renderedCloseIcon = <X weight=\"bold\" />;\n return (\n <AntTag\n className={className}\n color={color}\n style={style}\n closable={closable}\n closeIcon={closable ? closeIcon || renderedCloseIcon : undefined}\n {...(active ? { \"data-active\": \"true\" } : {})}\n {...rest}\n />\n );\n};\n\nexport const Tag = Object.assign(InternalTag, {\n CheckableTag: AntTag.CheckableTag,\n});\n"],"names":["InternalTag","className","active","color","style","closeIcon","closable","rest","jsx","AntTag","X","Tag"],"mappings":";;;;AAuBA,MAAMA,IAAc,CAAC;AAAA,EACnB,WAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAGI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAAR;AAAA,IACA,OAAAE;AAAA,IACA,OAAAC;AAAA,IACA,UAAAE;AAAA,IACA,WAAWA,IAAWD,KAPA,gBAAAG,EAACE,GAAE,EAAA,QAAO,OAAO,CAAA,IAOgB;AAAA,IACtD,GAAIR,IAAS,EAAE,eAAe,WAAW,CAAC;AAAA,IAC1C,GAAGK;AAAA,EAAA;AACN,GAISI,IAAM,OAAO,OAAOX,GAAa;AAAA,EAC5C,cAAcS,EAAO;AACvB,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-truncate{white-space:nowrap;overflow:hidden;
|
|
1
|
+
@layer components{.ds-truncate{white-space:nowrap;overflow:hidden;flex-grow:1;min-width:0;max-width:100%;display:block}.ds-truncate-end{text-overflow:ellipsis}.ds-truncate-middle{text-overflow:clip}.ds-truncate-multiline{display:-webkit-box;-webkit-line-clamp:var(--ds-line-clamp, 2);line-clamp:var(--ds-line-clamp, 2);-webkit-box-orient:vertical;overflow:hidden;white-space:normal;text-overflow:ellipsis;word-break:break-word}}
|
|
@@ -1,58 +1,61 @@
|
|
|
1
1
|
import n from "antd/es/config-provider";
|
|
2
|
-
import
|
|
3
|
-
import { useContext as i } from "react";
|
|
4
|
-
import { cx as
|
|
5
|
-
const
|
|
6
|
-
const { getPrefixCls:
|
|
7
|
-
return { getPrefixCls:
|
|
2
|
+
import c from "antd/es/theme/useToken";
|
|
3
|
+
import { useContext as i, useCallback as a } from "react";
|
|
4
|
+
import { cx as l } from "./cn.js";
|
|
5
|
+
const b = () => {
|
|
6
|
+
const { getPrefixCls: s } = i(n.ConfigContext);
|
|
7
|
+
return { getPrefixCls: s };
|
|
8
8
|
}, g = () => {
|
|
9
9
|
var t;
|
|
10
|
-
return (t =
|
|
11
|
-
},
|
|
12
|
-
const { getPrefixCls:
|
|
13
|
-
return (
|
|
10
|
+
return (t = c()[4]) == null ? void 0 : t.key;
|
|
11
|
+
}, k = () => {
|
|
12
|
+
const { getPrefixCls: s } = i(n.ConfigContext);
|
|
13
|
+
return a(
|
|
14
|
+
(...e) => l(...e).map((o) => s(o)).join(" "),
|
|
15
|
+
[s]
|
|
16
|
+
);
|
|
14
17
|
};
|
|
15
|
-
function f(
|
|
18
|
+
function f(s) {
|
|
16
19
|
const t = [];
|
|
17
20
|
let e = "";
|
|
18
|
-
for (const
|
|
19
|
-
|
|
20
|
-
return e && t.push(e), t.length > 0 ? t : [
|
|
21
|
+
for (const o of s)
|
|
22
|
+
o >= "A" && o <= "Z" ? (e && t.push(e), e = o.toLowerCase()) : e += o;
|
|
23
|
+
return e && t.push(e), t.length > 0 ? t : [s];
|
|
21
24
|
}
|
|
22
|
-
const h = (
|
|
23
|
-
const [t, e] = f(
|
|
24
|
-
let
|
|
25
|
+
const h = (s = "bottomLeft") => {
|
|
26
|
+
const [t, e] = f(s);
|
|
27
|
+
let o, r = "center";
|
|
25
28
|
if (t === "top" || t === "bottom") {
|
|
26
|
-
if (
|
|
29
|
+
if (o = t, e)
|
|
27
30
|
switch (e) {
|
|
28
31
|
case "left":
|
|
29
|
-
|
|
32
|
+
r = "start";
|
|
30
33
|
break;
|
|
31
34
|
case "right":
|
|
32
|
-
|
|
35
|
+
r = "end";
|
|
33
36
|
break;
|
|
34
37
|
}
|
|
35
38
|
} else if (t === "left" || t === "right") {
|
|
36
|
-
if (
|
|
39
|
+
if (o = t, e)
|
|
37
40
|
switch (e) {
|
|
38
41
|
case "top":
|
|
39
|
-
|
|
42
|
+
r = "start";
|
|
40
43
|
break;
|
|
41
44
|
case "bottom":
|
|
42
|
-
|
|
45
|
+
r = "end";
|
|
43
46
|
break;
|
|
44
47
|
}
|
|
45
48
|
} else
|
|
46
|
-
|
|
49
|
+
o = "bottom";
|
|
47
50
|
return {
|
|
48
|
-
placement:
|
|
49
|
-
align:
|
|
51
|
+
placement: o,
|
|
52
|
+
align: r
|
|
50
53
|
};
|
|
51
54
|
};
|
|
52
55
|
export {
|
|
53
56
|
h as parseAntdPlacement,
|
|
54
57
|
g as useAntdCssVarClassname,
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
k as useCls,
|
|
59
|
+
b as useGetPrefixCls
|
|
57
60
|
};
|
|
58
61
|
//# sourceMappingURL=antdUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antdUtils.js","sources":["../../../src/components/utils/antdUtils.ts"],"sourcesContent":["\"use client\";\nimport { default as ConfigProvider } from \"antd/es/config-provider\";\nimport useToken from \"antd/es/theme/useToken\";\nimport { useContext } from \"react\";\nimport type { ClassValue } from \"./types\";\nimport { cx } from \"./cn\";\nimport { PopoverProps } from \"antd/es/popover\";\n\nexport const useGetPrefixCls = () => {\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n return { getPrefixCls };\n};\n\n/**\n *\n * @returns the antd classname providing css variables\n */\nexport const useAntdCssVarClassname = () => {\n const token = useToken();\n return token[4]?.key;\n};\n\nexport const useCls = () => {\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n
|
|
1
|
+
{"version":3,"file":"antdUtils.js","sources":["../../../src/components/utils/antdUtils.ts"],"sourcesContent":["\"use client\";\nimport { default as ConfigProvider } from \"antd/es/config-provider\";\nimport useToken from \"antd/es/theme/useToken\";\nimport { useCallback, useContext } from \"react\";\nimport type { ClassValue } from \"./types\";\nimport { cx } from \"./cn\";\nimport { PopoverProps } from \"antd/es/popover\";\n\nexport const useGetPrefixCls = () => {\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n return { getPrefixCls };\n};\n\n/**\n *\n * @returns the antd classname providing css variables\n */\nexport const useAntdCssVarClassname = () => {\n const token = useToken();\n return token[4]?.key;\n};\n\nexport const useCls = () => {\n const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);\n const cls = useCallback(\n (...args: ClassValue[]) => {\n return cx(...args)\n .map((cls) => getPrefixCls(cls))\n .join(\" \");\n },\n [getPrefixCls]\n );\n return cls;\n};\n\nfunction splitCamelCase(text: string): string[] {\n const result: string[] = [];\n let currentWord = \"\";\n\n for (const char of text) {\n if (char >= \"A\" && char <= \"Z\") {\n if (currentWord) {\n result.push(currentWord);\n }\n currentWord = char.toLowerCase();\n } else {\n currentWord += char;\n }\n }\n\n if (currentWord) {\n result.push(currentWord);\n }\n\n return result.length > 0 ? result : [text];\n}\n\nexport const parseAntdPlacement = (\n placement: PopoverProps[\"placement\"] = \"bottomLeft\"\n): {\n placement: \"top\" | \"bottom\" | \"left\" | \"right\";\n align: \"start\" | \"end\" | \"center\";\n} => {\n const [position1, position2] = splitCamelCase(placement);\n\n // Determine primary placement\n let primaryPlacement: \"top\" | \"bottom\" | \"left\" | \"right\";\n let align: \"start\" | \"end\" | \"center\" = \"center\";\n\n // First check if it's a vertical or horizontal primary placement\n if (position1 === \"top\" || position1 === \"bottom\") {\n primaryPlacement = position1;\n if (position2) {\n switch (position2) {\n case \"left\":\n align = \"start\";\n break;\n case \"right\":\n align = \"end\";\n break;\n // \"top\" or \"bottom\" as second position is invalid, defaults to center\n }\n }\n } else if (position1 === \"left\" || position1 === \"right\") {\n primaryPlacement = position1;\n if (position2) {\n switch (position2) {\n case \"top\":\n align = \"start\";\n break;\n case \"bottom\":\n align = \"end\";\n break;\n // \"left\" or \"right\" as second position is invalid, defaults to center\n }\n }\n } else {\n // Fallback for invalid placement\n primaryPlacement = \"bottom\";\n }\n\n return {\n placement: primaryPlacement,\n align,\n };\n};\n"],"names":["useGetPrefixCls","getPrefixCls","useContext","ConfigProvider","useAntdCssVarClassname","_a","useToken","useCls","useCallback","args","cx","cls","splitCamelCase","text","result","currentWord","char","parseAntdPlacement","placement","position1","position2","primaryPlacement","align"],"mappings":";;;;AAQO,MAAMA,IAAkB,MAAM;AACnC,QAAM,EAAE,cAAAC,EAAiB,IAAAC,EAAWC,EAAe,aAAa;AAChE,SAAO,EAAE,cAAAF,EAAa;AACxB,GAMaG,IAAyB,MAAM;;AAEnC,UAAAC,IADOC,EAAS,EACV,CAAC,MAAP,gBAAAD,EAAU;AACnB,GAEaE,IAAS,MAAM;AAC1B,QAAM,EAAE,cAAAN,EAAiB,IAAAC,EAAWC,EAAe,aAAa;AASzD,SARKK;AAAA,IACV,IAAIC,MACKC,EAAG,GAAGD,CAAI,EACd,IAAI,CAACE,MAAQV,EAAaU,CAAG,CAAC,EAC9B,KAAK,GAAG;AAAA,IAEb,CAACV,CAAY;AAAA,EACf;AAEF;AAEA,SAASW,EAAeC,GAAwB;AAC9C,QAAMC,IAAmB,CAAC;AAC1B,MAAIC,IAAc;AAElB,aAAWC,KAAQH;AACb,IAAAG,KAAQ,OAAOA,KAAQ,OACrBD,KACFD,EAAO,KAAKC,CAAW,GAEzBA,IAAcC,EAAK,YAAY,KAEhBD,KAAAC;AAInB,SAAID,KACFD,EAAO,KAAKC,CAAW,GAGlBD,EAAO,SAAS,IAAIA,IAAS,CAACD,CAAI;AAC3C;AAEa,MAAAI,IAAqB,CAChCC,IAAuC,iBAIpC;AACH,QAAM,CAACC,GAAWC,CAAS,IAAIR,EAAeM,CAAS;AAGnD,MAAAG,GACAC,IAAoC;AAGpC,MAAAH,MAAc,SAASA,MAAc;AAEvC,QADmBE,IAAAF,GACfC;AACF,cAAQA,GAAW;AAAA,QACjB,KAAK;AACK,UAAAE,IAAA;AACR;AAAA,QACF,KAAK;AACK,UAAAA,IAAA;AACR;AAAA,MAAA;AAAA,aAIGH,MAAc,UAAUA,MAAc;AAE/C,QADmBE,IAAAF,GACfC;AACF,cAAQA,GAAW;AAAA,QACjB,KAAK;AACK,UAAAE,IAAA;AACR;AAAA,QACF,KAAK;AACK,UAAAA,IAAA;AACR;AAAA,MAAA;AAAA;AAMa,IAAAD,IAAA;AAGd,SAAA;AAAA,IACL,WAAWA;AAAA,IACX,OAAAC;AAAA,EACF;AACF;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -44,9 +44,8 @@ import { CheckboxOptionType } from 'antd';
|
|
|
44
44
|
import { CheckboxProps as CheckboxProps_2 } from 'antd';
|
|
45
45
|
import { CheckboxRef } from 'antd';
|
|
46
46
|
import { Col } from 'antd';
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import { CollapseProps } from 'antd';
|
|
47
|
+
import { CollapsePanelProps as CollapsePanelProps_2 } from 'antd';
|
|
48
|
+
import { CollapseProps as CollapseProps_2 } from 'antd';
|
|
50
49
|
import { ColorPicker } from 'antd';
|
|
51
50
|
import { ColorPickerProps } from 'antd';
|
|
52
51
|
import { ColProps } from 'antd';
|
|
@@ -160,6 +159,7 @@ import { RcFile } from 'antd/es/upload';
|
|
|
160
159
|
import * as React_2 from 'react';
|
|
161
160
|
import { ReactElement } from 'react';
|
|
162
161
|
import { ReactNode } from 'react';
|
|
162
|
+
import { Ref } from 'react';
|
|
163
163
|
import { RefAttributes } from 'react';
|
|
164
164
|
import { RefObject } from 'react';
|
|
165
165
|
import { RefSelectProps } from 'antd';
|
|
@@ -198,13 +198,12 @@ import { TableColumnProps } from 'antd';
|
|
|
198
198
|
import { TableColumnsType } from 'antd';
|
|
199
199
|
import { TableColumnType } from 'antd';
|
|
200
200
|
import { TablePaginationConfig } from 'antd';
|
|
201
|
-
import { TableProps } from 'antd';
|
|
202
|
-
import {
|
|
201
|
+
import { TableProps as TableProps_2 } from 'antd/es/table';
|
|
202
|
+
import { TableRef } from 'antd/es/table';
|
|
203
203
|
import { TabPaneProps } from 'antd';
|
|
204
204
|
import { Tabs } from 'antd';
|
|
205
205
|
import { TabsProps } from 'antd';
|
|
206
|
-
import { TagProps } from 'antd';
|
|
207
|
-
import { TagProps as TagProps_3 } from 'antd/es/tag';
|
|
206
|
+
import { TagProps as TagProps_2 } from 'antd/es/tag';
|
|
208
207
|
import { TagType } from 'antd';
|
|
209
208
|
import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
|
|
210
209
|
import { Theme } from '@ant-design/cssinjs';
|
|
@@ -473,11 +472,19 @@ export declare interface CodeOption {
|
|
|
473
472
|
|
|
474
473
|
export { Col }
|
|
475
474
|
|
|
476
|
-
export
|
|
475
|
+
export declare const Collapse: ((props: CollapseProps & {
|
|
476
|
+
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
477
|
+
}) => ReturnType<typeof CollapseInner>) & {
|
|
478
|
+
Panel: (props: CollapsePanelProps) => JSX.Element;
|
|
479
|
+
};
|
|
477
480
|
|
|
478
|
-
|
|
481
|
+
declare const CollapseInner: (props: CollapseProps, ref: ForwardedRef<HTMLDivElement>) => JSX.Element;
|
|
479
482
|
|
|
480
|
-
export
|
|
483
|
+
export declare interface CollapsePanelProps extends CollapsePanelProps_2 {
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export declare interface CollapseProps extends CollapseProps_2 {
|
|
487
|
+
}
|
|
481
488
|
|
|
482
489
|
export { ColorPicker }
|
|
483
490
|
|
|
@@ -1107,6 +1114,8 @@ declare type IconButtonOwnProps<E extends ElementType = ElementType> = WithHrefP
|
|
|
1107
1114
|
|
|
1108
1115
|
export declare type IconButtonProps<E extends ElementType = "button"> = IconButtonOwnProps<E> & Omit<ComponentPropsWithoutRef<E>, keyof IconButtonOwnProps<E>>;
|
|
1109
1116
|
|
|
1117
|
+
declare const InnerInternalTable: <RecordType extends object = object>({ columns, locale, emptyDescription, loading, virtual, scroll: scrollProp, ...rest }: TableProps<RecordType>, ref: Ref<TableRef>) => JSX.Element;
|
|
1118
|
+
|
|
1110
1119
|
declare function InnerToast({ toast, }: {
|
|
1111
1120
|
toast: Toast_2.Root.ToastObject<ToastData>;
|
|
1112
1121
|
}): JSX.Element;
|
|
@@ -1140,7 +1149,9 @@ export declare interface InputProps extends InputProps_2 {
|
|
|
1140
1149
|
declare interface InternalFormProps<Values = any> extends React_2.ComponentProps<typeof default_8<Values>> {
|
|
1141
1150
|
}
|
|
1142
1151
|
|
|
1143
|
-
declare const InternalTable: <RecordType extends object = object>(
|
|
1152
|
+
declare const InternalTable: <RecordType extends object = object>(props: TableProps<RecordType> & {
|
|
1153
|
+
ref?: ForwardedRef<TableRef>;
|
|
1154
|
+
}) => ReturnType<typeof InnerInternalTable>;
|
|
1144
1155
|
|
|
1145
1156
|
declare type IntrinsicElement = keyof JSX_2.IntrinsicElements | JSXElementConstructor<any>;
|
|
1146
1157
|
|
|
@@ -2155,13 +2166,15 @@ export { TableColumnType }
|
|
|
2155
2166
|
|
|
2156
2167
|
export { TablePaginationConfig }
|
|
2157
2168
|
|
|
2158
|
-
export
|
|
2159
|
-
|
|
2160
|
-
declare interface TableProps_2<RecordType extends object = object> extends TableProps_3<RecordType> {
|
|
2169
|
+
export declare interface TableProps<RecordType extends object = object> extends TableProps_2<RecordType> {
|
|
2161
2170
|
/**
|
|
2162
2171
|
* Add empty description for the table
|
|
2163
2172
|
*/
|
|
2164
2173
|
emptyDescription?: React.ReactNode;
|
|
2174
|
+
/**
|
|
2175
|
+
* Table ref
|
|
2176
|
+
*/
|
|
2177
|
+
tableRef?: React.Ref<HTMLDivElement>;
|
|
2165
2178
|
}
|
|
2166
2179
|
|
|
2167
2180
|
export { TabPaneProps }
|
|
@@ -2170,13 +2183,11 @@ export { Tabs }
|
|
|
2170
2183
|
|
|
2171
2184
|
export { TabsProps }
|
|
2172
2185
|
|
|
2173
|
-
export declare const Tag: (({ className, active, color, style, closeIcon, closable, ...rest }:
|
|
2186
|
+
export declare const Tag: (({ className, active, color, style, closeIcon, closable, ...rest }: TagProps) => JSX.Element) & {
|
|
2174
2187
|
CheckableTag: ForwardRefExoticComponent<CheckableTagProps & RefAttributes<HTMLSpanElement>>;
|
|
2175
2188
|
};
|
|
2176
2189
|
|
|
2177
|
-
export
|
|
2178
|
-
|
|
2179
|
-
declare interface TagProps_2 extends TagProps_3 {
|
|
2190
|
+
export declare interface TagProps extends TagProps_2 {
|
|
2180
2191
|
/**
|
|
2181
2192
|
* Indicates if the tag is active
|
|
2182
2193
|
* @default false
|
package/dist/index.js
CHANGED
|
@@ -1,59 +1,60 @@
|
|
|
1
1
|
import { componentMetadata as r, getComponentsByCategory as t } from "./metadata.js";
|
|
2
|
-
import { Affix as p, Alert as m, Anchor as s, App as f, AutoComplete as n, Avatar as x, BackTop as l, Calendar as i, Card as c, Carousel as u, Cascader as d, Col as C,
|
|
3
|
-
import { Select as
|
|
4
|
-
import { Modal as
|
|
5
|
-
import { IconButton as
|
|
6
|
-
import { Switch as
|
|
7
|
-
import { Checkbox as
|
|
8
|
-
import { Segmented as
|
|
9
|
-
import { Table as
|
|
10
|
-
import { Tag as
|
|
11
|
-
import { ThemeProvider as
|
|
12
|
-
import { Split as
|
|
13
|
-
import { Truncate as
|
|
14
|
-
import { DropdownMenu as
|
|
15
|
-
import { clsx as
|
|
16
|
-
import { reactNodeToString as
|
|
17
|
-
import { isTracebackError as
|
|
18
|
-
import { parseAntdPlacement as
|
|
19
|
-
import { WithAntdTokens as
|
|
20
|
-
import { Transition as
|
|
21
|
-
import { DefaultUpload as
|
|
22
|
-
import { useUploadItemRender as
|
|
23
|
-
import { ScrollArea as
|
|
24
|
-
import { Popover as
|
|
25
|
-
import { Slider as
|
|
26
|
-
import { Tooltip as
|
|
27
|
-
import { Breadcrumb as
|
|
28
|
-
import { useUniqueKeysTree as
|
|
29
|
-
import { getUniqueKeysFromOriginals as
|
|
30
|
-
import { Tree as
|
|
31
|
-
import { Spin as
|
|
32
|
-
import { Empty as
|
|
33
|
-
import { Form as
|
|
34
|
-
import { Field as
|
|
35
|
-
import { Tour as
|
|
36
|
-
import { Toast as
|
|
37
|
-
import { toast as
|
|
38
|
-
import { VerticalCollapsiblePanel as
|
|
39
|
-
import { PopupPanel as
|
|
40
|
-
import { CodeBlock as
|
|
41
|
-
import { StackChild as
|
|
42
|
-
import { Stack as
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
2
|
+
import { Affix as p, Alert as m, Anchor as s, App as f, AutoComplete as n, Avatar as x, BackTop as l, Calendar as i, Card as c, Carousel as u, Cascader as d, Col as C, ColorPicker as T, ConfigProvider as h, DatePicker as k, Descriptions as g, Divider as S, Drawer as P, Dropdown as A, Flex as y, FloatButton as b, Grid as B, InputNumber as D, Layout as R, List as M, Mentions as v, Menu as F, Pagination as w, Popconfirm as E, Progress as I, QRCode as U, Rate as K, Result as L, Row as W, Skeleton as q, Space as G, Statistic as N, Steps as V, Tabs as O, TimePicker as Q, Timeline as j, Transfer as z, TreeSelect as H, Typography as J, Watermark as X, message as Y, notification as Z, theme as _, unstableSetRender as $, version as oo } from "antd";
|
|
3
|
+
import { Select as ro } from "./components/Select/component.js";
|
|
4
|
+
import { Modal as ao } from "./components/Modal/index.js";
|
|
5
|
+
import { IconButton as mo } from "./components/IconButton/component.js";
|
|
6
|
+
import { Switch as fo } from "./components/Switch/component.js";
|
|
7
|
+
import { Checkbox as xo } from "./components/Checkbox/component.js";
|
|
8
|
+
import { Segmented as io } from "./components/Segmented/component.js";
|
|
9
|
+
import { Table as uo } from "./components/Table/component.js";
|
|
10
|
+
import { Tag as To } from "./components/Tag/component.js";
|
|
11
|
+
import { ThemeProvider as ko } from "./components/ThemeProvider/component.js";
|
|
12
|
+
import { Split as So, Splitter as Po } from "./components/Splitter/component.js";
|
|
13
|
+
import { Truncate as yo } from "./components/Truncate/component.js";
|
|
14
|
+
import { DropdownMenu as Bo } from "./components/DropdownMenu/component.js";
|
|
15
|
+
import { clsx as Ro, cn as Mo, cx as vo } from "./components/utils/cn.js";
|
|
16
|
+
import { reactNodeToString as wo } from "./components/utils/reactToString.js";
|
|
17
|
+
import { isTracebackError as Io } from "./components/utils/isTracebackError.js";
|
|
18
|
+
import { parseAntdPlacement as Ko, useAntdCssVarClassname as Lo, useCls as Wo, useGetPrefixCls as qo } from "./components/utils/antdUtils.js";
|
|
19
|
+
import { WithAntdTokens as No } from "./components/utils/WithAntdTokens.js";
|
|
20
|
+
import { Transition as Oo } from "./components/Transition/component.js";
|
|
21
|
+
import { DefaultUpload as jo, Upload as zo } from "./components/Upload/component.js";
|
|
22
|
+
import { useUploadItemRender as Jo } from "./components/Upload/hooks.js";
|
|
23
|
+
import { ScrollArea as Yo } from "./components/ScrollArea/component.js";
|
|
24
|
+
import { Popover as _o } from "./components/Popover/component.js";
|
|
25
|
+
import { Slider as oe } from "./components/Slider/component.js";
|
|
26
|
+
import { Tooltip as re } from "./components/Tooltip/component.js";
|
|
27
|
+
import { Breadcrumb as ae } from "./components/Breadcrumb/component.js";
|
|
28
|
+
import { useUniqueKeysTree as me } from "./components/Tree/useUniqueKeysTree.js";
|
|
29
|
+
import { getUniqueKeysFromOriginals as fe, processTreeData as ne } from "./components/Tree/helpers.js";
|
|
30
|
+
import { Tree as le } from "./components/Tree/components.js";
|
|
31
|
+
import { Spin as ce } from "./components/Spin/component.js";
|
|
32
|
+
import { Empty as de, EmptyIcon as Ce } from "./components/Empty/component.js";
|
|
33
|
+
import { Form as he } from "./components/Form/component.js";
|
|
34
|
+
import { Field as ge } from "./components/Field/component.js";
|
|
35
|
+
import { Tour as Pe } from "./components/Tour/component.js";
|
|
36
|
+
import { Toast as ye } from "./components/Toast/component.js";
|
|
37
|
+
import { toast as Be, toastManager as De } from "./components/Toast/function.js";
|
|
38
|
+
import { VerticalCollapsiblePanel as Me } from "./components/VerticalCollapsiblePanel/component.js";
|
|
39
|
+
import { PopupPanel as Fe } from "./components/PopupPanel/component.js";
|
|
40
|
+
import { CodeBlock as Ee } from "./components/CodeBlock/component.js";
|
|
41
|
+
import { StackChild as Ue } from "./components/Stack/StackChild.js";
|
|
42
|
+
import { Stack as Le } from "./components/Stack/index.js";
|
|
43
|
+
import { Collapse as qe } from "./components/Collapse/component.js";
|
|
44
|
+
import { Input as Ne } from "./components/Input/component.js";
|
|
45
|
+
import { Badge as Oe } from "./components/Badge/component.js";
|
|
46
|
+
import { Radio as je } from "./components/Radio/component.js";
|
|
47
|
+
import { Button as He } from "./components/Button/component.js";
|
|
48
|
+
import { DSRoot as Xe } from "./components/DSRoot/component.js";
|
|
49
|
+
import { useForm as Ze, useWatch as _e } from "antd/es/form/Form";
|
|
50
|
+
import { useBreakpoint as or, useMessage as er, useModal as rr, useToken as tr } from "./components/hooks/antd.js";
|
|
51
|
+
import { default as pr } from "antd/es/app/useApp";
|
|
52
|
+
import { useAnimationsFinished as sr, useEnhancedEffect as fr, useEventCallback as nr, useLatestRef as xr } from "./components/hooks/base-ui.js";
|
|
53
|
+
import { useControlledState as ir } from "./components/hooks/useControlledState.js";
|
|
54
|
+
import { useCharts as ur } from "./components/hooks/useCharts.js";
|
|
55
|
+
import { antdColorTokens as Cr, darkTheme as Tr, lightTheme as hr } from "./tokens/and-theme/tokens.js";
|
|
56
|
+
import { categoricalChartColorKeys as gr, categoricalChartColorTokens as Sr, categoricalChartsColors as Pr } from "./tokens/charts/index.js";
|
|
57
|
+
import { chartColorTokens as yr, rawChartColorTokens as br } from "./tokens/charts/tokens.js";
|
|
57
58
|
export {
|
|
58
59
|
p as Affix,
|
|
59
60
|
m as Alert,
|
|
@@ -62,127 +63,127 @@ export {
|
|
|
62
63
|
n as AutoComplete,
|
|
63
64
|
x as Avatar,
|
|
64
65
|
l as BackTop,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
Oe as Badge,
|
|
67
|
+
ae as Breadcrumb,
|
|
68
|
+
He as Button,
|
|
68
69
|
i as Calendar,
|
|
69
70
|
c as Card,
|
|
70
71
|
u as Carousel,
|
|
71
72
|
d as Cascader,
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
xo as Checkbox,
|
|
74
|
+
Ee as CodeBlock,
|
|
74
75
|
C as Col,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
76
|
+
qe as Collapse,
|
|
77
|
+
T as ColorPicker,
|
|
78
|
+
h as ConfigProvider,
|
|
79
|
+
Xe as DSRoot,
|
|
80
|
+
k as DatePicker,
|
|
81
|
+
jo as DefaultUpload,
|
|
82
|
+
g as Descriptions,
|
|
83
|
+
S as Divider,
|
|
84
|
+
P as Drawer,
|
|
85
|
+
A as Dropdown,
|
|
86
|
+
Bo as DropdownMenu,
|
|
87
|
+
de as Empty,
|
|
88
|
+
Ce as EmptyIcon,
|
|
89
|
+
ge as Field,
|
|
90
|
+
y as Flex,
|
|
91
|
+
b as FloatButton,
|
|
92
|
+
he as Form,
|
|
93
|
+
B as Grid,
|
|
94
|
+
mo as IconButton,
|
|
95
|
+
Ne as Input,
|
|
96
|
+
D as InputNumber,
|
|
97
|
+
R as Layout,
|
|
98
|
+
M as List,
|
|
99
|
+
v as Mentions,
|
|
100
|
+
F as Menu,
|
|
101
|
+
ao as Modal,
|
|
102
|
+
w as Pagination,
|
|
103
|
+
E as Popconfirm,
|
|
104
|
+
_o as Popover,
|
|
105
|
+
Fe as PopupPanel,
|
|
106
|
+
I as Progress,
|
|
107
|
+
U as QRCode,
|
|
108
|
+
je as Radio,
|
|
109
|
+
K as Rate,
|
|
110
|
+
L as Result,
|
|
111
|
+
W as Row,
|
|
112
|
+
Yo as ScrollArea,
|
|
113
|
+
io as Segmented,
|
|
114
|
+
ro as Select,
|
|
115
|
+
q as Skeleton,
|
|
116
|
+
oe as Slider,
|
|
117
|
+
G as Space,
|
|
118
|
+
ce as Spin,
|
|
119
|
+
So as Split,
|
|
120
|
+
Po as Splitter,
|
|
121
|
+
Le as Stack,
|
|
122
|
+
Ue as StackChild,
|
|
123
|
+
N as Statistic,
|
|
124
|
+
V as Steps,
|
|
125
|
+
fo as Switch,
|
|
126
|
+
uo as Table,
|
|
127
|
+
O as Tabs,
|
|
128
|
+
To as Tag,
|
|
129
|
+
ko as ThemeProvider,
|
|
130
|
+
Q as TimePicker,
|
|
131
|
+
j as Timeline,
|
|
132
|
+
ye as Toast,
|
|
133
|
+
re as Tooltip,
|
|
134
|
+
Pe as Tour,
|
|
135
|
+
z as Transfer,
|
|
136
|
+
Oo as Transition,
|
|
137
|
+
le as Tree,
|
|
138
|
+
H as TreeSelect,
|
|
139
|
+
yo as Truncate,
|
|
140
|
+
J as Typography,
|
|
141
|
+
zo as Upload,
|
|
142
|
+
Me as VerticalCollapsiblePanel,
|
|
143
|
+
X as Watermark,
|
|
144
|
+
No as WithAntdTokens,
|
|
145
|
+
Cr as antdColorTokens,
|
|
146
|
+
gr as categoricalChartColorKeys,
|
|
147
|
+
Sr as categoricalChartColorTokens,
|
|
148
|
+
Pr as categoricalChartsColors,
|
|
149
|
+
yr as chartColorTokens,
|
|
150
|
+
Ro as clsx,
|
|
151
|
+
Mo as cn,
|
|
151
152
|
r as componentMetadata,
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
vo as cx,
|
|
154
|
+
Tr as darkTheme,
|
|
154
155
|
t as getComponentsByCategory,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
156
|
+
fe as getUniqueKeysFromOriginals,
|
|
157
|
+
Io as isTracebackError,
|
|
158
|
+
hr as lightTheme,
|
|
159
|
+
Y as message,
|
|
160
|
+
Z as notification,
|
|
161
|
+
Ko as parseAntdPlacement,
|
|
162
|
+
ne as processTreeData,
|
|
163
|
+
br as rawChartColorTokens,
|
|
164
|
+
wo as reactNodeToString,
|
|
165
|
+
_ as theme,
|
|
166
|
+
Be as toast,
|
|
167
|
+
De as toastManager,
|
|
168
|
+
$ as unstableSetRender,
|
|
169
|
+
sr as useAnimationsFinished,
|
|
170
|
+
Lo as useAntdCssVarClassname,
|
|
171
|
+
pr as useApp,
|
|
172
|
+
or as useBreakpoint,
|
|
173
|
+
ur as useCharts,
|
|
174
|
+
Wo as useCls,
|
|
175
|
+
ir as useControlledState,
|
|
176
|
+
fr as useEnhancedEffect,
|
|
177
|
+
nr as useEventCallback,
|
|
178
|
+
Ze as useForm,
|
|
179
|
+
qo as useGetPrefixCls,
|
|
180
|
+
xr as useLatestRef,
|
|
181
|
+
er as useMessage,
|
|
182
|
+
rr as useModal,
|
|
183
|
+
tr as useToken,
|
|
184
|
+
me as useUniqueKeysTree,
|
|
185
|
+
Jo as useUploadItemRender,
|
|
186
|
+
_e as useWatch,
|
|
187
|
+
oo as version
|
|
187
188
|
};
|
|
188
189
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|