@gobolt/genesis 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/{AntdIcon-c395a1c4.js → AntdIcon-BoLh1dP8.js} +66 -68
- package/dist/CheckOutlined-CeTKr6II.js +13 -0
- package/dist/{CloseCircleFilled-ddc51e7e.js → CloseCircleFilled-DXCxlIQL.js} +8 -11
- package/dist/{CloseOutlined-14b8bba1.js → CloseOutlined-ClXDNn82.js} +9 -12
- package/dist/{Compact-c39ed20d.js → Compact-CGY560JF.js} +63 -65
- package/dist/ContextIsolator-D5x2Ih51.js +20 -0
- package/dist/{ExclamationCircleFilled-23ef9812.js → ExclamationCircleFilled-C0Kj5KQV.js} +16 -22
- package/dist/KeyCode-DM2sFh3-.js +517 -0
- package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
- package/dist/{Overflow-a570fa69.js → Overflow-PBZD-PFm.js} +63 -64
- package/dist/{DownOutlined-64a4732a.js → PurePanel-BqPLRtc2.js} +67 -70
- package/dist/{SearchOutlined-a9014e08.js → SearchOutlined-BP3Z2K6j.js} +8 -11
- package/dist/{TextArea-20825221.js → TextArea-DKwCct3i.js} +583 -588
- package/dist/Typography-aGoDUl4R.js +710 -0
- package/dist/bundle.css +1204 -0
- package/dist/{button-fa1c119c.js → button-CDQgO1OK.js} +274 -278
- package/dist/{collapse-345bc884.js → collapse-Dtpt-6W_.js} +2 -2
- package/dist/compact-item-DH13cl8A.js +61 -0
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.js +63 -62
- package/dist/components/Badge/__tests__/Badge.test.js +11 -65
- package/dist/components/Badge/index.js +2 -21
- package/dist/components/Badge/styles.js +7 -8
- package/dist/components/Breadcrumb/Breadcrumb.js +8 -24
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +21 -7
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +13 -60
- package/dist/components/Breadcrumb/index.js +2 -25
- package/dist/components/Breadcrumb/styles.d.ts +10 -6
- package/dist/components/Breadcrumb/styles.js +787 -808
- package/dist/components/Button/Button.d.ts +6 -4
- package/dist/components/Button/Button.js +20 -40
- package/dist/components/Button/__tests__/Button.test.js +9 -54
- package/dist/components/Button/index.js +2 -20
- package/dist/components/Button/styles.d.ts +9 -5
- package/dist/components/Button/styles.js +19 -30
- package/dist/components/Checkbox/Checkbox.js +8 -38
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -62
- package/dist/components/Checkbox/index.js +2 -47
- package/dist/components/Checkbox/styles.d.ts +8 -1
- package/dist/components/Checkbox/styles.js +181 -188
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -4
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +19 -51
- package/dist/components/ErrorBoundaryFallback/index.d.ts +1 -0
- package/dist/components/ErrorBoundaryFallback/index.js +2 -49
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +34 -37
- package/dist/components/Form/Form.d.ts +18 -5
- package/dist/components/Form/Form.js +4 -45
- package/dist/components/Form/__stories__/FormStory.js +44 -81
- package/dist/components/Form/__tests__/form.test.d.ts +1 -0
- package/dist/components/Form/__tests__/form.test.js +18 -0
- package/dist/components/Form/index.js +2 -46
- package/dist/components/Form/styles.d.ts +3 -0
- package/dist/components/Form/styles.js +5 -0
- package/dist/components/Input/Input.js +6 -29
- package/dist/components/Input/__tests__/Input.test.js +21 -66
- package/dist/components/Input/index.js +2 -29
- package/dist/components/Input/styles.d.ts +5 -2
- package/dist/components/Input/styles.js +319 -332
- package/dist/components/Message/Message.d.ts +4 -4
- package/dist/components/Message/Message.js +53 -80
- package/dist/components/Message/__tests__/Message.test.js +24 -70
- package/dist/components/Message/index.js +2 -48
- package/dist/components/Message/styles.d.ts +4 -1
- package/dist/components/Message/styles.js +24 -18
- package/dist/components/Notification/Notification.d.ts +11 -10
- package/dist/components/Notification/Notification.js +306 -372
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/NotificationRightChevron.js +23 -0
- package/dist/components/Notification/__tests__/Notification.test.js +8 -69
- package/dist/components/Notification/index.js +2 -59
- package/dist/components/Notification/styles.d.ts +13 -3
- package/dist/components/Notification/styles.js +36 -20
- package/dist/components/Radio/Radio.js +20 -106
- package/dist/components/Radio/RadioGroup.js +18 -71
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +15 -70
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.js +2 -56
- package/dist/components/Select/DropdownChevron.d.ts +2 -0
- package/dist/components/Select/DropdownChevron.js +23 -0
- package/dist/components/Select/Select.d.ts +9 -4
- package/dist/components/Select/Select.js +29 -41
- package/dist/components/Select/__tests__/Select.test.js +10752 -93
- package/dist/components/Select/index.js +2 -28
- package/dist/components/Select/styles.d.ts +20 -6
- package/dist/components/Select/styles.js +1381 -1370
- package/dist/components/Toast/Toast.d.ts +4 -4
- package/dist/components/Toast/Toast.js +8 -37
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +10 -55
- package/dist/components/Toast/index.js +2 -46
- package/dist/components/Toast/styles.d.ts +6 -1
- package/dist/components/Toast/styles.js +36 -21
- package/dist/components/Typography/Typography.d.ts +7 -4
- package/dist/components/Typography/Typography.js +2 -42
- package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +19 -56
- package/dist/components/Typography/index.js +2 -46
- package/dist/components/Typography/styles.d.ts +18 -4
- package/dist/components/Typography/styles.js +36 -43
- package/dist/components/index.d.ts +13 -5
- package/dist/components/index.js +24 -70
- package/dist/{context-3b8a39af.js → context-BMW3aJEf.js} +538 -548
- package/dist/genesis/GenesisThemeBreakdown.js +38 -55
- package/dist/genesis/GenesisThemeDemo.js +3 -53
- package/dist/genesis/styles.d.ts +6 -2
- package/dist/genesis/styles.js +496 -521
- package/dist/{index-e2b72ca8.js → index-1CBpubM3.js} +97 -102
- package/dist/index-BZAhCB_K.js +97 -0
- package/dist/{index-501fc13d.js → index-C0SmxWLS.js} +367 -392
- package/dist/index-C8haFnXI.js +1112 -0
- package/dist/index-CfDY25LP.js +873 -0
- package/dist/index-DPW8XdWj.js +952 -0
- package/dist/{index-8c8d2d0c.js → index-bKlRxQp4.js} +114 -114
- package/dist/index-oK7z6jnz.js +22795 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31 -77
- package/dist/{isVisible-729780f5.js → isVisible-A-IfeFoT.js} +67 -94
- package/dist/{magic-string.es-b7491176.js → magic-string.es-D2FWSwU3.js} +56 -103
- package/dist/{pickAttrs-00ba4687.js → pickAttrs-B0YTfcV1.js} +1 -1
- package/dist/providers/GenesisProvider.d.ts +0 -5
- package/dist/providers/GenesisProvider.js +9 -59
- package/dist/providers/ThemeProvider.d.ts +1 -2
- package/dist/providers/ThemeProvider.js +11 -13
- package/dist/providers/ToastProvider.d.ts +11 -4
- package/dist/providers/ToastProvider.js +10 -39
- package/dist/providers/index.d.ts +2 -3
- package/dist/providers/index.js +4 -51
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/providers/useGenesis.js +6 -0
- package/dist/setup-BvfREoHl.js +33891 -0
- package/dist/{styled-components.browser.esm-02f500bc.js → styled-components.browser.esm-CZ1XM4o4.js} +72 -134
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +15 -45
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +15 -45
- package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
- package/dist/styles/design-tokens/variables.d.ts +10 -10
- package/dist/styles/design-tokens/variables.js +1 -1
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +14 -31
- package/dist/styles/theme/genesis-theme.js +257 -212
- package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
- package/dist/styles/theme/index.js +4 -5
- package/dist/styles-CT_fyXBd.js +1808 -0
- package/dist/test/setup.js +3 -46
- package/dist/useLocale-DT-z_vQ6.js +16 -0
- package/dist/useVariants-DvhXfgJY.js +30 -0
- package/dist/utils/isAllEnglishString.js +1 -2
- package/dist/{presets-83ccb923.js → warning-C63HNL9U.js} +358 -356
- package/package.json +35 -35
- package/dist/CheckOutlined-52d9ac25.js +0 -29
- package/dist/ContextIsolator-b09b2c52.js +0 -20
- package/dist/EllipsisOutlined-60122660.js +0 -1115
- package/dist/InfoCircleFilled-c5f90c20.js +0 -16
- package/dist/RightOutlined-83515eb4.js +0 -16
- package/dist/compact-item-b8f85aa6.js +0 -75
- package/dist/index-0a886e53.js +0 -100
- package/dist/index-0b9ee239.js +0 -955
- package/dist/index-1a33c134.js +0 -1389
- package/dist/index-4003d75b.js +0 -3748
- package/dist/index-89035ea5.js +0 -3242
- package/dist/providers/ToastWrapper.d.ts +0 -7
- package/dist/providers/ToastWrapper.js +0 -56
- package/dist/setup-aaca7b6f.js +0 -21158
- package/dist/styles/theme/global-styles.d.ts +0 -1
- package/dist/styles/theme/global-styles.js +0 -36
- package/dist/useVariants-a0d64298.js +0 -30
- /package/dist/{presetColors-ccf8cb4c.js → presetColors-Cl8UP3Nw.js} +0 -0
- /package/dist/{reactNode-f4391605.js → reactNode-sKPeiqPL.js} +0 -0
|
@@ -1,66 +1,54 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { R as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import { T as ge } from "./index-
|
|
10
|
-
import {
|
|
11
|
-
import { c as
|
|
12
|
-
import { T as
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var o = Array.isArray(t) ? t : [t], n = window.document.documentElement;
|
|
17
|
-
return o.some(function(i) {
|
|
18
|
-
return i in n.style;
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return !1;
|
|
22
|
-
}, wt = function(t, o) {
|
|
23
|
-
if (!Me(t))
|
|
24
|
-
return !1;
|
|
25
|
-
var n = document.createElement("div"), i = n.style[t];
|
|
26
|
-
return n.style[t] = o, n.style[t] !== i;
|
|
27
|
-
};
|
|
28
|
-
function we(e, t) {
|
|
29
|
-
return !Array.isArray(e) && t !== void 0 ? wt(e, t) : Me(e);
|
|
30
|
-
}
|
|
31
|
-
function Tt(e) {
|
|
32
|
-
return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1) && e == null ? [] : Array.isArray(e) ? e : [e];
|
|
33
|
-
}
|
|
34
|
-
var Rt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, name: "copy", theme: "outlined" };
|
|
35
|
-
const $t = Rt;
|
|
36
|
-
var jt = function(t, o) {
|
|
2
|
+
import { useRef as st, useEffect as lt, useMemo as at, isValidElement as ct } from "react";
|
|
3
|
+
import { N as $e, q as dt, g as ut, b as pt, C as De, t as Le, v as Y, n as W, x as ft } from "./index-oK7z6jnz.js";
|
|
4
|
+
import { a as fe, k as mt, l as gt, c as Z, m as yt } from "./warning-C63HNL9U.js";
|
|
5
|
+
import { I as me } from "./AntdIcon-BoLh1dP8.js";
|
|
6
|
+
import { R as bt } from "./index-bKlRxQp4.js";
|
|
7
|
+
import { t as Me, o as ke, u as Oe } from "./isVisible-A-IfeFoT.js";
|
|
8
|
+
import { u as Et } from "./useLocale-DT-z_vQ6.js";
|
|
9
|
+
import { T as ge } from "./index-DPW8XdWj.js";
|
|
10
|
+
import { K as we } from "./KeyCode-DM2sFh3-.js";
|
|
11
|
+
import { c as ht } from "./reactNode-sKPeiqPL.js";
|
|
12
|
+
import { T as vt } from "./TextArea-DKwCct3i.js";
|
|
13
|
+
import { R as xt } from "./CheckOutlined-CeTKr6II.js";
|
|
14
|
+
import { R as St } from "./LoadingOutlined-8EnJdZ7I.js";
|
|
15
|
+
var Ct = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z" } }] }, name: "copy", theme: "outlined" }, Ot = function(t, o) {
|
|
37
16
|
return /* @__PURE__ */ r.createElement(me, fe({}, t, {
|
|
38
17
|
ref: o,
|
|
39
|
-
icon:
|
|
18
|
+
icon: Ct
|
|
40
19
|
}));
|
|
41
|
-
}, Pe = /* @__PURE__ */ r.forwardRef(
|
|
20
|
+
}, Pe = /* @__PURE__ */ r.forwardRef(Ot);
|
|
42
21
|
process.env.NODE_ENV !== "production" && (Pe.displayName = "CopyOutlined");
|
|
43
|
-
|
|
44
|
-
var Nt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, name: "edit", theme: "outlined" };
|
|
45
|
-
const It = Nt;
|
|
46
|
-
var Dt = function(t, o) {
|
|
22
|
+
var wt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" } }] }, name: "edit", theme: "outlined" }, Rt = function(t, o) {
|
|
47
23
|
return /* @__PURE__ */ r.createElement(me, fe({}, t, {
|
|
48
24
|
ref: o,
|
|
49
|
-
icon:
|
|
25
|
+
icon: wt
|
|
50
26
|
}));
|
|
51
|
-
}, Ae = /* @__PURE__ */ r.forwardRef(
|
|
27
|
+
}, Ae = /* @__PURE__ */ r.forwardRef(Rt);
|
|
52
28
|
process.env.NODE_ENV !== "production" && (Ae.displayName = "EditOutlined");
|
|
53
|
-
|
|
54
|
-
var kt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, name: "enter", theme: "outlined" };
|
|
55
|
-
const Mt = kt;
|
|
56
|
-
var Pt = function(t, o) {
|
|
29
|
+
var Tt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z" } }] }, name: "enter", theme: "outlined" }, Nt = function(t, o) {
|
|
57
30
|
return /* @__PURE__ */ r.createElement(me, fe({}, t, {
|
|
58
31
|
ref: o,
|
|
59
|
-
icon:
|
|
32
|
+
icon: Tt
|
|
60
33
|
}));
|
|
61
|
-
}, He = /* @__PURE__ */ r.forwardRef(
|
|
34
|
+
}, He = /* @__PURE__ */ r.forwardRef(Nt);
|
|
62
35
|
process.env.NODE_ENV !== "production" && (He.displayName = "EnterOutlined");
|
|
63
|
-
|
|
36
|
+
var jt = function(t) {
|
|
37
|
+
if (mt() && window.document.documentElement) {
|
|
38
|
+
var o = Array.isArray(t) ? t : [t], n = window.document.documentElement;
|
|
39
|
+
return o.some(function(i) {
|
|
40
|
+
return i in n.style;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return !1;
|
|
44
|
+
};
|
|
45
|
+
function Re(e, t) {
|
|
46
|
+
return jt(e);
|
|
47
|
+
}
|
|
48
|
+
function _t(e) {
|
|
49
|
+
return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1) && e == null ? [] : Array.isArray(e) ? e : [e];
|
|
50
|
+
}
|
|
51
|
+
const It = (e, t, o, n) => {
|
|
64
52
|
const {
|
|
65
53
|
titleMarginBottom: i,
|
|
66
54
|
fontWeightStrong: s
|
|
@@ -72,7 +60,7 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
72
60
|
fontSize: e,
|
|
73
61
|
lineHeight: t
|
|
74
62
|
};
|
|
75
|
-
},
|
|
63
|
+
}, $t = (e) => {
|
|
76
64
|
const t = [1, 2, 3, 4, 5], o = {};
|
|
77
65
|
return t.forEach((n) => {
|
|
78
66
|
o[`
|
|
@@ -80,14 +68,14 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
80
68
|
div&-h${n},
|
|
81
69
|
div&-h${n} > textarea,
|
|
82
70
|
h${n}
|
|
83
|
-
`] =
|
|
71
|
+
`] = It(e[`fontSizeHeading${n}`], e[`lineHeightHeading${n}`], e.colorTextHeading, e);
|
|
84
72
|
}), o;
|
|
85
|
-
},
|
|
73
|
+
}, Dt = (e) => {
|
|
86
74
|
const {
|
|
87
75
|
componentCls: t
|
|
88
76
|
} = e;
|
|
89
77
|
return {
|
|
90
|
-
"a&, a": Object.assign(Object.assign({},
|
|
78
|
+
"a&, a": Object.assign(Object.assign({}, $e(e)), {
|
|
91
79
|
userSelect: "text",
|
|
92
80
|
[`&[disabled], &${t}-disabled`]: {
|
|
93
81
|
color: e.colorTextDisabled,
|
|
@@ -101,7 +89,7 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
101
89
|
}
|
|
102
90
|
})
|
|
103
91
|
};
|
|
104
|
-
},
|
|
92
|
+
}, Lt = (e) => ({
|
|
105
93
|
code: {
|
|
106
94
|
margin: "0 0.2em",
|
|
107
95
|
paddingInline: "0.4em",
|
|
@@ -126,7 +114,7 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
126
114
|
mark: {
|
|
127
115
|
padding: 0,
|
|
128
116
|
// FIXME hardcode in v4
|
|
129
|
-
backgroundColor:
|
|
117
|
+
backgroundColor: gt[2]
|
|
130
118
|
},
|
|
131
119
|
"u, ins": {
|
|
132
120
|
textDecoration: "underline",
|
|
@@ -188,7 +176,7 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
188
176
|
borderInlineStart: "4px solid rgba(100, 100, 100, 0.2)",
|
|
189
177
|
opacity: 0.85
|
|
190
178
|
}
|
|
191
|
-
}),
|
|
179
|
+
}), Mt = (e) => {
|
|
192
180
|
const {
|
|
193
181
|
componentCls: t,
|
|
194
182
|
paddingSM: o
|
|
@@ -220,7 +208,7 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
220
208
|
}
|
|
221
209
|
}
|
|
222
210
|
};
|
|
223
|
-
},
|
|
211
|
+
}, kt = (e) => ({
|
|
224
212
|
[`${e.componentCls}-copy-success`]: {
|
|
225
213
|
"\n &,\n &:hover,\n &:focus": {
|
|
226
214
|
color: e.colorSuccess
|
|
@@ -229,7 +217,7 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
229
217
|
[`${e.componentCls}-copy-icon-only`]: {
|
|
230
218
|
marginInlineStart: 0
|
|
231
219
|
}
|
|
232
|
-
}),
|
|
220
|
+
}), Pt = () => ({
|
|
233
221
|
"\n a&-ellipsis,\n span&-ellipsis\n ": {
|
|
234
222
|
display: "inline-block",
|
|
235
223
|
maxWidth: "100%"
|
|
@@ -259,7 +247,7 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
259
247
|
WebkitLineClamp: 3,
|
|
260
248
|
WebkitBoxOrient: "vertical"
|
|
261
249
|
}
|
|
262
|
-
}),
|
|
250
|
+
}), At = (e) => {
|
|
263
251
|
const {
|
|
264
252
|
componentCls: t,
|
|
265
253
|
titleMarginTop: o
|
|
@@ -295,7 +283,7 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
295
283
|
"\n div&,\n p\n ": {
|
|
296
284
|
marginBottom: "1em"
|
|
297
285
|
}
|
|
298
|
-
},
|
|
286
|
+
}, $t(e)), {
|
|
299
287
|
[`
|
|
300
288
|
& + h1${t},
|
|
301
289
|
& + h2${t},
|
|
@@ -310,108 +298,108 @@ const At = He, Ht = (e, t, o, n) => {
|
|
|
310
298
|
marginTop: o
|
|
311
299
|
}
|
|
312
300
|
}
|
|
313
|
-
}),
|
|
301
|
+
}), Lt(e)), Dt(e)), {
|
|
314
302
|
// Operation
|
|
315
303
|
[`
|
|
316
304
|
${t}-expand,
|
|
317
305
|
${t}-collapse,
|
|
318
306
|
${t}-edit,
|
|
319
307
|
${t}-copy
|
|
320
|
-
`]: Object.assign(Object.assign({},
|
|
308
|
+
`]: Object.assign(Object.assign({}, $e(e)), {
|
|
321
309
|
marginInlineStart: e.marginXXS
|
|
322
310
|
})
|
|
323
|
-
}),
|
|
311
|
+
}), Mt(e)), kt(e)), Pt()), {
|
|
324
312
|
"&-rtl": {
|
|
325
313
|
direction: "rtl"
|
|
326
314
|
}
|
|
327
315
|
})
|
|
328
316
|
};
|
|
329
|
-
},
|
|
317
|
+
}, Ht = () => ({
|
|
330
318
|
titleMarginTop: "1.2em",
|
|
331
319
|
titleMarginBottom: "0.5em"
|
|
332
|
-
}), ze =
|
|
320
|
+
}), ze = ut("Typography", (e) => [At(e)], Ht), zt = (e) => {
|
|
333
321
|
const {
|
|
334
322
|
prefixCls: t,
|
|
335
323
|
"aria-label": o,
|
|
336
324
|
className: n,
|
|
337
325
|
style: i,
|
|
338
326
|
direction: s,
|
|
339
|
-
maxLength:
|
|
327
|
+
maxLength: u,
|
|
340
328
|
autoSize: c = !0,
|
|
341
|
-
value:
|
|
329
|
+
value: d,
|
|
342
330
|
onSave: f,
|
|
343
331
|
onCancel: a,
|
|
344
332
|
onEnd: m,
|
|
345
333
|
component: g,
|
|
346
|
-
enterIcon: b = /* @__PURE__ */ r.createElement(
|
|
347
|
-
} = e,
|
|
334
|
+
enterIcon: b = /* @__PURE__ */ r.createElement(He, null)
|
|
335
|
+
} = e, N = r.useRef(null), S = r.useRef(!1), C = r.useRef(null), [y, I] = r.useState(d);
|
|
348
336
|
r.useEffect(() => {
|
|
349
|
-
|
|
350
|
-
}, [
|
|
351
|
-
var
|
|
352
|
-
if (!((
|
|
337
|
+
I(d);
|
|
338
|
+
}, [d]), r.useEffect(() => {
|
|
339
|
+
var E;
|
|
340
|
+
if (!((E = N.current) === null || E === void 0) && E.resizableTextArea) {
|
|
353
341
|
const {
|
|
354
|
-
textArea:
|
|
355
|
-
} =
|
|
356
|
-
|
|
342
|
+
textArea: h
|
|
343
|
+
} = N.current.resizableTextArea;
|
|
344
|
+
h.focus();
|
|
357
345
|
const {
|
|
358
346
|
length: x
|
|
359
|
-
} =
|
|
360
|
-
|
|
347
|
+
} = h.value;
|
|
348
|
+
h.setSelectionRange(x, x);
|
|
361
349
|
}
|
|
362
350
|
}, []);
|
|
363
|
-
const H = (
|
|
351
|
+
const H = (E) => {
|
|
364
352
|
let {
|
|
365
|
-
target:
|
|
366
|
-
} =
|
|
367
|
-
|
|
368
|
-
},
|
|
353
|
+
target: h
|
|
354
|
+
} = E;
|
|
355
|
+
I(h.value.replace(/[\n\r]/g, ""));
|
|
356
|
+
}, O = () => {
|
|
369
357
|
S.current = !0;
|
|
370
358
|
}, w = () => {
|
|
371
359
|
S.current = !1;
|
|
372
|
-
}, _ = (
|
|
360
|
+
}, _ = (E) => {
|
|
373
361
|
let {
|
|
374
|
-
keyCode:
|
|
375
|
-
} =
|
|
376
|
-
S.current || (
|
|
377
|
-
},
|
|
362
|
+
keyCode: h
|
|
363
|
+
} = E;
|
|
364
|
+
S.current || (C.current = h);
|
|
365
|
+
}, v = () => {
|
|
378
366
|
f(y.trim());
|
|
379
|
-
}, z = (
|
|
367
|
+
}, z = (E) => {
|
|
380
368
|
let {
|
|
381
|
-
keyCode:
|
|
369
|
+
keyCode: h,
|
|
382
370
|
ctrlKey: x,
|
|
383
371
|
altKey: P,
|
|
384
|
-
metaKey:
|
|
385
|
-
shiftKey:
|
|
386
|
-
} =
|
|
387
|
-
|
|
372
|
+
metaKey: T,
|
|
373
|
+
shiftKey: $
|
|
374
|
+
} = E;
|
|
375
|
+
C.current !== h || S.current || x || P || T || $ || (h === we.ENTER ? (v(), m == null || m()) : h === we.ESC && a());
|
|
388
376
|
}, U = () => {
|
|
389
|
-
|
|
390
|
-
}, [
|
|
377
|
+
v();
|
|
378
|
+
}, [B, M, F] = ze(t), k = Z(t, `${t}-edit-content`, {
|
|
391
379
|
[`${t}-rtl`]: s === "rtl",
|
|
392
380
|
[`${t}-${g}`]: !!g
|
|
393
|
-
}, n,
|
|
394
|
-
return
|
|
395
|
-
className:
|
|
381
|
+
}, n, M, F);
|
|
382
|
+
return B(/* @__PURE__ */ r.createElement("div", {
|
|
383
|
+
className: k,
|
|
396
384
|
style: i
|
|
397
|
-
}, /* @__PURE__ */ r.createElement(
|
|
398
|
-
ref:
|
|
399
|
-
maxLength:
|
|
385
|
+
}, /* @__PURE__ */ r.createElement(vt, {
|
|
386
|
+
ref: N,
|
|
387
|
+
maxLength: u,
|
|
400
388
|
value: y,
|
|
401
389
|
onChange: H,
|
|
402
390
|
onKeyDown: _,
|
|
403
391
|
onKeyUp: z,
|
|
404
|
-
onCompositionStart:
|
|
392
|
+
onCompositionStart: O,
|
|
405
393
|
onCompositionEnd: w,
|
|
406
394
|
onBlur: U,
|
|
407
395
|
"aria-label": o,
|
|
408
396
|
rows: 1,
|
|
409
397
|
autoSize: c
|
|
410
|
-
}), b !== null ?
|
|
398
|
+
}), b !== null ? ht(b, {
|
|
411
399
|
className: `${t}-edit-content-confirm`
|
|
412
400
|
}) : null));
|
|
413
|
-
}
|
|
414
|
-
var
|
|
401
|
+
};
|
|
402
|
+
var Vt = function() {
|
|
415
403
|
var e = document.getSelection();
|
|
416
404
|
if (!e.rangeCount)
|
|
417
405
|
return function() {
|
|
@@ -432,20 +420,20 @@ var Gt = function() {
|
|
|
432
420
|
e.addRange(i);
|
|
433
421
|
}), t && t.focus();
|
|
434
422
|
};
|
|
435
|
-
},
|
|
423
|
+
}, Bt = Vt, Te = {
|
|
436
424
|
"text/plain": "Text",
|
|
437
425
|
"text/html": "Url",
|
|
438
426
|
default: "Text"
|
|
439
|
-
},
|
|
440
|
-
function
|
|
427
|
+
}, Wt = "Copy to clipboard: #{key}, Enter";
|
|
428
|
+
function Ut(e) {
|
|
441
429
|
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
442
430
|
return e.replace(/#{\s*key\s*}/g, t);
|
|
443
431
|
}
|
|
444
|
-
function
|
|
445
|
-
var o, n, i, s,
|
|
432
|
+
function Ft(e, t) {
|
|
433
|
+
var o, n, i, s, u, c, d = !1;
|
|
446
434
|
t || (t = {}), o = t.debug || !1;
|
|
447
435
|
try {
|
|
448
|
-
i =
|
|
436
|
+
i = Bt(), s = document.createRange(), u = document.getSelection(), c = document.createElement("span"), c.textContent = e, c.ariaHidden = "true", c.style.all = "unset", c.style.position = "fixed", c.style.top = 0, c.style.clip = "rect(0, 0, 0, 0)", c.style.whiteSpace = "pre", c.style.webkitUserSelect = "text", c.style.MozUserSelect = "text", c.style.msUserSelect = "text", c.style.userSelect = "text", c.addEventListener("copy", function(a) {
|
|
449
437
|
if (a.stopPropagation(), t.format)
|
|
450
438
|
if (a.preventDefault(), typeof a.clipboardData > "u") {
|
|
451
439
|
o && console.warn("unable to use e.clipboardData"), o && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
@@ -454,71 +442,71 @@ function en(e, t) {
|
|
|
454
442
|
} else
|
|
455
443
|
a.clipboardData.clearData(), a.clipboardData.setData(t.format, e);
|
|
456
444
|
t.onCopy && (a.preventDefault(), t.onCopy(a.clipboardData));
|
|
457
|
-
}), document.body.appendChild(c), s.selectNodeContents(c),
|
|
445
|
+
}), document.body.appendChild(c), s.selectNodeContents(c), u.addRange(s);
|
|
458
446
|
var f = document.execCommand("copy");
|
|
459
447
|
if (!f)
|
|
460
448
|
throw new Error("copy command was unsuccessful");
|
|
461
|
-
|
|
449
|
+
d = !0;
|
|
462
450
|
} catch (a) {
|
|
463
451
|
o && console.error("unable to copy using execCommand: ", a), o && console.warn("trying IE specific stuff");
|
|
464
452
|
try {
|
|
465
|
-
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData),
|
|
453
|
+
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), d = !0;
|
|
466
454
|
} catch (m) {
|
|
467
|
-
o && console.error("unable to copy using clipboardData: ", m), o && console.error("falling back to prompt"), n =
|
|
455
|
+
o && console.error("unable to copy using clipboardData: ", m), o && console.error("falling back to prompt"), n = Ut("message" in t ? t.message : Wt), window.prompt(n, e);
|
|
468
456
|
}
|
|
469
457
|
} finally {
|
|
470
|
-
|
|
458
|
+
u && (typeof u.removeRange == "function" ? u.removeRange(s) : u.removeAllRanges()), c && document.body.removeChild(c), i();
|
|
471
459
|
}
|
|
472
|
-
return
|
|
460
|
+
return d;
|
|
473
461
|
}
|
|
474
|
-
var
|
|
475
|
-
const
|
|
476
|
-
var
|
|
462
|
+
var Kt = Ft;
|
|
463
|
+
const qt = /* @__PURE__ */ yt(Kt);
|
|
464
|
+
var Xt = function(e, t, o, n) {
|
|
477
465
|
function i(s) {
|
|
478
|
-
return s instanceof o ? s : new o(function(
|
|
479
|
-
|
|
466
|
+
return s instanceof o ? s : new o(function(u) {
|
|
467
|
+
u(s);
|
|
480
468
|
});
|
|
481
469
|
}
|
|
482
|
-
return new (o || (o = Promise))(function(s,
|
|
470
|
+
return new (o || (o = Promise))(function(s, u) {
|
|
483
471
|
function c(a) {
|
|
484
472
|
try {
|
|
485
473
|
f(n.next(a));
|
|
486
474
|
} catch (m) {
|
|
487
|
-
|
|
475
|
+
u(m);
|
|
488
476
|
}
|
|
489
477
|
}
|
|
490
|
-
function
|
|
478
|
+
function d(a) {
|
|
491
479
|
try {
|
|
492
480
|
f(n.throw(a));
|
|
493
481
|
} catch (m) {
|
|
494
|
-
|
|
482
|
+
u(m);
|
|
495
483
|
}
|
|
496
484
|
}
|
|
497
485
|
function f(a) {
|
|
498
|
-
a.done ? s(a.value) : i(a.value).then(c,
|
|
486
|
+
a.done ? s(a.value) : i(a.value).then(c, d);
|
|
499
487
|
}
|
|
500
488
|
f((n = n.apply(e, t || [])).next());
|
|
501
489
|
});
|
|
502
490
|
};
|
|
503
|
-
const
|
|
491
|
+
const Jt = (e) => {
|
|
504
492
|
let {
|
|
505
493
|
copyConfig: t,
|
|
506
494
|
children: o
|
|
507
495
|
} = e;
|
|
508
|
-
const [n, i] = r.useState(!1), [s,
|
|
496
|
+
const [n, i] = r.useState(!1), [s, u] = r.useState(!1), c = r.useRef(null), d = () => {
|
|
509
497
|
c.current && clearTimeout(c.current);
|
|
510
498
|
}, f = {};
|
|
511
|
-
t.format && (f.format = t.format), r.useEffect(() =>
|
|
512
|
-
const a =
|
|
499
|
+
t.format && (f.format = t.format), r.useEffect(() => d, []);
|
|
500
|
+
const a = pt((m) => Xt(void 0, void 0, void 0, function* () {
|
|
513
501
|
var g;
|
|
514
|
-
m == null || m.preventDefault(), m == null || m.stopPropagation(),
|
|
502
|
+
m == null || m.preventDefault(), m == null || m.stopPropagation(), u(!0);
|
|
515
503
|
try {
|
|
516
504
|
const b = typeof t.text == "function" ? yield t.text() : t.text;
|
|
517
|
-
|
|
505
|
+
qt(b || _t(o, !0).join("") || "", f), u(!1), i(!0), d(), c.current = setTimeout(() => {
|
|
518
506
|
i(!1);
|
|
519
507
|
}, 3e3), (g = t.onCopy) === null || g === void 0 || g.call(t, m);
|
|
520
508
|
} catch (b) {
|
|
521
|
-
throw
|
|
509
|
+
throw u(!1), b;
|
|
522
510
|
}
|
|
523
511
|
}));
|
|
524
512
|
return {
|
|
@@ -526,73 +514,70 @@ const rn = (e) => {
|
|
|
526
514
|
copyLoading: s,
|
|
527
515
|
onClick: a
|
|
528
516
|
};
|
|
529
|
-
}
|
|
517
|
+
};
|
|
530
518
|
function le(e, t) {
|
|
531
519
|
return r.useMemo(() => {
|
|
532
520
|
const o = !!e;
|
|
533
521
|
return [o, Object.assign(Object.assign({}, t), o && typeof e == "object" ? e : null)];
|
|
534
522
|
}, [e]);
|
|
535
523
|
}
|
|
536
|
-
const
|
|
537
|
-
const t =
|
|
538
|
-
return
|
|
524
|
+
const Gt = (e) => {
|
|
525
|
+
const t = st(void 0);
|
|
526
|
+
return lt(() => {
|
|
539
527
|
t.current = e;
|
|
540
528
|
}), t.current;
|
|
541
|
-
},
|
|
529
|
+
}, Qt = (e, t, o) => at(() => e === !0 ? {
|
|
542
530
|
title: t ?? o
|
|
543
|
-
} : /* @__PURE__ */
|
|
531
|
+
} : /* @__PURE__ */ ct(e) ? {
|
|
544
532
|
title: e
|
|
545
533
|
} : typeof e == "object" ? Object.assign({
|
|
546
534
|
title: t ?? o
|
|
547
535
|
}, e) : {
|
|
548
536
|
title: e
|
|
549
|
-
}, [e, t, o])
|
|
550
|
-
var
|
|
537
|
+
}, [e, t, o]);
|
|
538
|
+
var Yt = function(e, t) {
|
|
551
539
|
var o = {};
|
|
552
|
-
for (var n in e)
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
556
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
540
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
541
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
542
|
+
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
557
543
|
return o;
|
|
558
544
|
};
|
|
559
|
-
const
|
|
545
|
+
const ye = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
560
546
|
const {
|
|
561
547
|
prefixCls: o,
|
|
562
548
|
component: n = "article",
|
|
563
549
|
className: i,
|
|
564
550
|
rootClassName: s,
|
|
565
|
-
setContentRef:
|
|
551
|
+
setContentRef: u,
|
|
566
552
|
children: c,
|
|
567
|
-
direction:
|
|
553
|
+
direction: d,
|
|
568
554
|
style: f
|
|
569
|
-
} = e, a =
|
|
555
|
+
} = e, a = Yt(e, ["prefixCls", "component", "className", "rootClassName", "setContentRef", "children", "direction", "style"]), {
|
|
570
556
|
getPrefixCls: m,
|
|
571
557
|
direction: g,
|
|
572
558
|
typography: b
|
|
573
|
-
} = r.useContext(
|
|
574
|
-
process.env.NODE_ENV !== "production" &&
|
|
575
|
-
const [y,
|
|
576
|
-
[`${
|
|
577
|
-
}, i, s,
|
|
559
|
+
} = r.useContext(De), N = d ?? g, S = u ? Le(t, u) : t, C = m("typography", o);
|
|
560
|
+
process.env.NODE_ENV !== "production" && Y("Typography").deprecated(!u, "setContentRef", "ref");
|
|
561
|
+
const [y, I, H] = ze(C), O = Z(C, b == null ? void 0 : b.className, {
|
|
562
|
+
[`${C}-rtl`]: N === "rtl"
|
|
563
|
+
}, i, s, I, H), w = Object.assign(Object.assign({}, b == null ? void 0 : b.style), f);
|
|
578
564
|
return y(
|
|
579
565
|
// @ts-expect-error: Expression produces a union type that is too complex to represent.
|
|
580
566
|
/* @__PURE__ */ r.createElement(n, Object.assign({
|
|
581
|
-
className:
|
|
567
|
+
className: O,
|
|
582
568
|
style: w,
|
|
583
569
|
ref: S
|
|
584
570
|
}, a), c)
|
|
585
571
|
);
|
|
586
572
|
});
|
|
587
|
-
process.env.NODE_ENV !== "production" && (
|
|
588
|
-
|
|
589
|
-
function Re(e) {
|
|
573
|
+
process.env.NODE_ENV !== "production" && (ye.displayName = "Typography");
|
|
574
|
+
function Ne(e) {
|
|
590
575
|
return e === !1 ? [!1, !1] : Array.isArray(e) ? e : [e];
|
|
591
576
|
}
|
|
592
577
|
function ae(e, t, o) {
|
|
593
578
|
return e === !0 || e === void 0 ? t : e || o && t;
|
|
594
579
|
}
|
|
595
|
-
function
|
|
580
|
+
function Zt(e) {
|
|
596
581
|
const t = document.createElement("em");
|
|
597
582
|
e.appendChild(t), process.env.NODE_ENV !== "production" && (t.className = "ant-typography-css-ellipsis-content-measure");
|
|
598
583
|
const o = e.getBoundingClientRect(), n = t.getBoundingClientRect();
|
|
@@ -600,35 +585,35 @@ function dn(e) {
|
|
|
600
585
|
o.left > n.left || n.right > o.right || // Vertical out of range
|
|
601
586
|
o.top > n.top || n.bottom > o.bottom;
|
|
602
587
|
}
|
|
603
|
-
const
|
|
588
|
+
const be = (e) => ["string", "number"].includes(typeof e), en = (e) => {
|
|
604
589
|
let {
|
|
605
590
|
prefixCls: t,
|
|
606
591
|
copied: o,
|
|
607
592
|
locale: n,
|
|
608
593
|
iconOnly: i,
|
|
609
594
|
tooltips: s,
|
|
610
|
-
icon:
|
|
595
|
+
icon: u,
|
|
611
596
|
tabIndex: c,
|
|
612
|
-
onCopy:
|
|
597
|
+
onCopy: d,
|
|
613
598
|
loading: f
|
|
614
599
|
} = e;
|
|
615
|
-
const a =
|
|
600
|
+
const a = Ne(s), m = Ne(u), {
|
|
616
601
|
copied: g,
|
|
617
602
|
copy: b
|
|
618
|
-
} = n ?? {},
|
|
603
|
+
} = n ?? {}, N = o ? g : b, S = ae(a[o ? 1 : 0], N), C = typeof S == "string" ? S : N;
|
|
619
604
|
return /* @__PURE__ */ r.createElement(ge, {
|
|
620
605
|
title: S
|
|
621
606
|
}, /* @__PURE__ */ r.createElement("button", {
|
|
622
607
|
type: "button",
|
|
623
|
-
className:
|
|
608
|
+
className: Z(`${t}-copy`, {
|
|
624
609
|
[`${t}-copy-success`]: o,
|
|
625
610
|
[`${t}-copy-icon-only`]: i
|
|
626
611
|
}),
|
|
627
|
-
onClick:
|
|
628
|
-
"aria-label":
|
|
612
|
+
onClick: d,
|
|
613
|
+
"aria-label": C,
|
|
629
614
|
tabIndex: c
|
|
630
|
-
}, o ? ae(m[1], /* @__PURE__ */ r.createElement(
|
|
631
|
-
},
|
|
615
|
+
}, o ? ae(m[1], /* @__PURE__ */ r.createElement(xt, null), !0) : ae(m[0], f ? /* @__PURE__ */ r.createElement(St, null) : /* @__PURE__ */ r.createElement(Pe, null), !0)));
|
|
616
|
+
}, G = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
632
617
|
let {
|
|
633
618
|
style: o,
|
|
634
619
|
children: n
|
|
@@ -652,113 +637,113 @@ const ye = (e) => ["string", "number"].includes(typeof e), fn = (e) => {
|
|
|
652
637
|
backgroundColor: "rgba(255, 0, 0, 0.65)"
|
|
653
638
|
}, o)
|
|
654
639
|
}, n);
|
|
655
|
-
}),
|
|
656
|
-
function
|
|
640
|
+
}), tn = (e) => e.reduce((t, o) => t + (be(o) ? String(o).length : 1), 0);
|
|
641
|
+
function je(e, t) {
|
|
657
642
|
let o = 0;
|
|
658
643
|
const n = [];
|
|
659
644
|
for (let i = 0; i < e.length; i += 1) {
|
|
660
645
|
if (o === t)
|
|
661
646
|
return n;
|
|
662
|
-
const s = e[i], c =
|
|
663
|
-
if (
|
|
647
|
+
const s = e[i], c = be(s) ? String(s).length : 1, d = o + c;
|
|
648
|
+
if (d > t) {
|
|
664
649
|
const f = t - o;
|
|
665
650
|
return n.push(String(s).slice(0, f)), n;
|
|
666
651
|
}
|
|
667
|
-
n.push(s), o =
|
|
652
|
+
n.push(s), o = d;
|
|
668
653
|
}
|
|
669
654
|
return e;
|
|
670
655
|
}
|
|
671
|
-
const ce = 0,
|
|
656
|
+
const ce = 0, de = 1, ue = 2, pe = 3, _e = 4, Q = {
|
|
672
657
|
display: "-webkit-box",
|
|
673
658
|
overflow: "hidden",
|
|
674
659
|
WebkitBoxOrient: "vertical"
|
|
675
660
|
};
|
|
676
|
-
function
|
|
661
|
+
function nn(e) {
|
|
677
662
|
const {
|
|
678
663
|
enableMeasure: t,
|
|
679
664
|
width: o,
|
|
680
665
|
text: n,
|
|
681
666
|
children: i,
|
|
682
667
|
rows: s,
|
|
683
|
-
expanded:
|
|
668
|
+
expanded: u,
|
|
684
669
|
miscDeps: c,
|
|
685
|
-
onEllipsis:
|
|
686
|
-
} = e, f = r.useMemo(() =>
|
|
670
|
+
onEllipsis: d
|
|
671
|
+
} = e, f = r.useMemo(() => Me(n), [n]), a = r.useMemo(() => tn(f), [n]), m = r.useMemo(() => i(f, !1), [n]), [g, b] = r.useState(null), N = r.useRef(null), S = r.useRef(null), C = r.useRef(null), y = r.useRef(null), I = r.useRef(null), [H, O] = r.useState(!1), [w, _] = r.useState(ce), [v, z] = r.useState(0), [U, B] = r.useState(null);
|
|
687
672
|
W(() => {
|
|
688
|
-
_(t && o && a ?
|
|
673
|
+
_(t && o && a ? de : ce);
|
|
689
674
|
}, [o, n, s, t, f]), W(() => {
|
|
690
|
-
var
|
|
691
|
-
if (w ===
|
|
692
|
-
_(
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
} else if (w ===
|
|
696
|
-
const
|
|
697
|
-
_(
|
|
698
|
-
const
|
|
699
|
-
|
|
675
|
+
var E, h, x, P;
|
|
676
|
+
if (w === de) {
|
|
677
|
+
_(ue);
|
|
678
|
+
const T = S.current && getComputedStyle(S.current).whiteSpace;
|
|
679
|
+
B(T);
|
|
680
|
+
} else if (w === ue) {
|
|
681
|
+
const T = !!(!((E = C.current) === null || E === void 0) && E.isExceed());
|
|
682
|
+
_(T ? pe : _e), b(T ? [0, a] : null), O(T);
|
|
683
|
+
const $ = ((h = C.current) === null || h === void 0 ? void 0 : h.getHeight()) || 0, ne = s === 1 ? 0 : ((x = y.current) === null || x === void 0 ? void 0 : x.getHeight()) || 0, q = ((P = I.current) === null || P === void 0 ? void 0 : P.getHeight()) || 0, oe = Math.max(
|
|
684
|
+
$,
|
|
700
685
|
// height of rows with ellipsis
|
|
701
|
-
ne +
|
|
686
|
+
ne + q
|
|
702
687
|
);
|
|
703
|
-
z(oe + 1),
|
|
688
|
+
z(oe + 1), d(T);
|
|
704
689
|
}
|
|
705
690
|
}, [w]);
|
|
706
|
-
const
|
|
691
|
+
const M = g ? Math.ceil((g[0] + g[1]) / 2) : 0;
|
|
707
692
|
W(() => {
|
|
708
|
-
var
|
|
709
|
-
const [
|
|
710
|
-
if (
|
|
711
|
-
const
|
|
712
|
-
let
|
|
713
|
-
x -
|
|
693
|
+
var E;
|
|
694
|
+
const [h, x] = g || [0, 0];
|
|
695
|
+
if (h !== x) {
|
|
696
|
+
const T = (((E = N.current) === null || E === void 0 ? void 0 : E.getHeight()) || 0) > v;
|
|
697
|
+
let $ = M;
|
|
698
|
+
x - h === 1 && ($ = T ? h : x), b(T ? [h, $] : [$, x]);
|
|
714
699
|
}
|
|
715
|
-
}, [g,
|
|
700
|
+
}, [g, M]);
|
|
716
701
|
const F = r.useMemo(() => {
|
|
717
702
|
if (!t)
|
|
718
703
|
return i(f, !1);
|
|
719
|
-
if (w !==
|
|
720
|
-
const
|
|
721
|
-
return [
|
|
722
|
-
style: Object.assign(Object.assign({},
|
|
704
|
+
if (w !== pe || !g || g[0] !== g[1]) {
|
|
705
|
+
const E = i(f, !1);
|
|
706
|
+
return [_e, ce].includes(w) ? E : /* @__PURE__ */ r.createElement("span", {
|
|
707
|
+
style: Object.assign(Object.assign({}, Q), {
|
|
723
708
|
WebkitLineClamp: s
|
|
724
709
|
})
|
|
725
|
-
},
|
|
710
|
+
}, E);
|
|
726
711
|
}
|
|
727
|
-
return i(
|
|
728
|
-
}, [
|
|
712
|
+
return i(u ? f : je(f, g[0]), H);
|
|
713
|
+
}, [u, w, g, f].concat(ft(c))), k = {
|
|
729
714
|
width: o,
|
|
730
715
|
margin: 0,
|
|
731
716
|
padding: 0,
|
|
732
717
|
whiteSpace: U === "nowrap" ? "normal" : "inherit"
|
|
733
718
|
};
|
|
734
|
-
return /* @__PURE__ */ r.createElement(r.Fragment, null, F, w ===
|
|
735
|
-
style: Object.assign(Object.assign(Object.assign({},
|
|
719
|
+
return /* @__PURE__ */ r.createElement(r.Fragment, null, F, w === ue && /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(G, {
|
|
720
|
+
style: Object.assign(Object.assign(Object.assign({}, k), Q), {
|
|
736
721
|
WebkitLineClamp: s
|
|
737
722
|
}),
|
|
738
|
-
ref:
|
|
739
|
-
}, m), /* @__PURE__ */ r.createElement(
|
|
740
|
-
style: Object.assign(Object.assign(Object.assign({},
|
|
723
|
+
ref: C
|
|
724
|
+
}, m), /* @__PURE__ */ r.createElement(G, {
|
|
725
|
+
style: Object.assign(Object.assign(Object.assign({}, k), Q), {
|
|
741
726
|
WebkitLineClamp: s - 1
|
|
742
727
|
}),
|
|
743
728
|
ref: y
|
|
744
|
-
}, m), /* @__PURE__ */ r.createElement(
|
|
745
|
-
style: Object.assign(Object.assign(Object.assign({},
|
|
729
|
+
}, m), /* @__PURE__ */ r.createElement(G, {
|
|
730
|
+
style: Object.assign(Object.assign(Object.assign({}, k), Q), {
|
|
746
731
|
WebkitLineClamp: 1
|
|
747
732
|
}),
|
|
748
|
-
ref:
|
|
749
|
-
}, i([], !0))), w ===
|
|
750
|
-
style: Object.assign(Object.assign({},
|
|
733
|
+
ref: I
|
|
734
|
+
}, i([], !0))), w === pe && g && g[0] !== g[1] && /* @__PURE__ */ r.createElement(G, {
|
|
735
|
+
style: Object.assign(Object.assign({}, k), {
|
|
751
736
|
top: 400
|
|
752
737
|
}),
|
|
753
|
-
ref:
|
|
754
|
-
}, i(
|
|
738
|
+
ref: N
|
|
739
|
+
}, i(je(f, M), !0)), w === de && /* @__PURE__ */ r.createElement("span", {
|
|
755
740
|
style: {
|
|
756
741
|
whiteSpace: "inherit"
|
|
757
742
|
},
|
|
758
743
|
ref: S
|
|
759
744
|
}));
|
|
760
745
|
}
|
|
761
|
-
const
|
|
746
|
+
const Ve = (e) => {
|
|
762
747
|
let {
|
|
763
748
|
enableEllipsis: t,
|
|
764
749
|
isEllipsis: o,
|
|
@@ -769,315 +754,305 @@ const We = (e) => {
|
|
|
769
754
|
open: o ? void 0 : !1
|
|
770
755
|
}, i), n);
|
|
771
756
|
};
|
|
772
|
-
process.env.NODE_ENV !== "production" && (
|
|
773
|
-
|
|
774
|
-
var vn = globalThis && globalThis.__rest || function(e, t) {
|
|
757
|
+
process.env.NODE_ENV !== "production" && (Ve.displayName = "EllipsisTooltip");
|
|
758
|
+
var on = function(e, t) {
|
|
775
759
|
var o = {};
|
|
776
|
-
for (var n in e)
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
780
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
760
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
761
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
762
|
+
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
781
763
|
return o;
|
|
782
764
|
};
|
|
783
|
-
function
|
|
765
|
+
function rn(e, t) {
|
|
784
766
|
let {
|
|
785
767
|
mark: o,
|
|
786
768
|
code: n,
|
|
787
769
|
underline: i,
|
|
788
770
|
delete: s,
|
|
789
|
-
strong:
|
|
771
|
+
strong: u,
|
|
790
772
|
keyboard: c,
|
|
791
|
-
italic:
|
|
773
|
+
italic: d
|
|
792
774
|
} = e, f = t;
|
|
793
775
|
function a(m, g) {
|
|
794
776
|
g && (f = /* @__PURE__ */ r.createElement(m, {}, f));
|
|
795
777
|
}
|
|
796
|
-
return a("strong",
|
|
778
|
+
return a("strong", u), a("u", i), a("del", s), a("code", n), a("mark", o), a("kbd", c), a("i", d), f;
|
|
797
779
|
}
|
|
798
|
-
const
|
|
780
|
+
const sn = "...", ee = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
799
781
|
var o;
|
|
800
782
|
const {
|
|
801
783
|
prefixCls: n,
|
|
802
784
|
className: i,
|
|
803
785
|
style: s,
|
|
804
|
-
type:
|
|
786
|
+
type: u,
|
|
805
787
|
disabled: c,
|
|
806
|
-
children:
|
|
788
|
+
children: d,
|
|
807
789
|
ellipsis: f,
|
|
808
790
|
editable: a,
|
|
809
791
|
copyable: m,
|
|
810
792
|
component: g,
|
|
811
793
|
title: b
|
|
812
|
-
} = e,
|
|
794
|
+
} = e, N = on(e, ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"]), {
|
|
813
795
|
getPrefixCls: S,
|
|
814
|
-
direction:
|
|
815
|
-
} = r.useContext(
|
|
816
|
-
value:
|
|
796
|
+
direction: C
|
|
797
|
+
} = r.useContext(De), [y] = Et("Text"), I = r.useRef(null), H = r.useRef(null), O = S("typography", n), w = ke(N, ["mark", "code", "delete", "underline", "strong", "keyboard", "italic"]), [_, v] = le(a), [z, U] = Oe(!1, {
|
|
798
|
+
value: v.editing
|
|
817
799
|
}), {
|
|
818
|
-
triggerType:
|
|
819
|
-
} =
|
|
820
|
-
var
|
|
821
|
-
l && ((
|
|
822
|
-
}, F =
|
|
800
|
+
triggerType: B = ["icon"]
|
|
801
|
+
} = v, M = (l) => {
|
|
802
|
+
var p;
|
|
803
|
+
l && ((p = v.onStart) === null || p === void 0 || p.call(v)), U(l);
|
|
804
|
+
}, F = Gt(z);
|
|
823
805
|
W(() => {
|
|
824
806
|
var l;
|
|
825
807
|
!z && F && ((l = H.current) === null || l === void 0 || l.focus());
|
|
826
808
|
}, [z]);
|
|
827
|
-
const
|
|
828
|
-
l == null || l.preventDefault(),
|
|
829
|
-
},
|
|
830
|
-
var
|
|
831
|
-
(
|
|
832
|
-
},
|
|
809
|
+
const k = (l) => {
|
|
810
|
+
l == null || l.preventDefault(), M(!0);
|
|
811
|
+
}, E = (l) => {
|
|
812
|
+
var p;
|
|
813
|
+
(p = v.onChange) === null || p === void 0 || p.call(v, l), M(!1);
|
|
814
|
+
}, h = () => {
|
|
833
815
|
var l;
|
|
834
|
-
(l =
|
|
816
|
+
(l = v.onCancel) === null || l === void 0 || l.call(v), M(!1);
|
|
835
817
|
}, [x, P] = le(m), {
|
|
836
|
-
copied:
|
|
837
|
-
copyLoading:
|
|
818
|
+
copied: T,
|
|
819
|
+
copyLoading: $,
|
|
838
820
|
onClick: ne
|
|
839
|
-
} =
|
|
821
|
+
} = Jt({
|
|
840
822
|
copyConfig: P,
|
|
841
|
-
children:
|
|
842
|
-
}), [
|
|
823
|
+
children: d
|
|
824
|
+
}), [q, oe] = r.useState(!1), [Ee, Be] = r.useState(!1), [he, We] = r.useState(!1), [ve, Ue] = r.useState(!1), [Fe, Ke] = r.useState(!0), [V, R] = le(f, {
|
|
843
825
|
expandable: !1,
|
|
844
826
|
symbol: (l) => l ? y == null ? void 0 : y.collapse : y == null ? void 0 : y.expand
|
|
845
|
-
}), [A,
|
|
846
|
-
value:
|
|
847
|
-
}), j =
|
|
827
|
+
}), [A, qe] = Oe(R.defaultExpanded || !1, {
|
|
828
|
+
value: R.expanded
|
|
829
|
+
}), j = V && (!A || R.expandable === "collapsible"), {
|
|
848
830
|
rows: K = 1
|
|
849
|
-
} =
|
|
831
|
+
} = R, X = r.useMemo(() => (
|
|
850
832
|
// Disable ellipsis
|
|
851
833
|
j && // Provide suffix
|
|
852
|
-
(
|
|
853
|
-
|
|
854
|
-
), [j,
|
|
834
|
+
(R.suffix !== void 0 || R.onEllipsis || // Can't use css ellipsis since we need to provide the place for button
|
|
835
|
+
R.expandable || _ || x)
|
|
836
|
+
), [j, R, _, x]);
|
|
855
837
|
W(() => {
|
|
856
|
-
|
|
857
|
-
}, [
|
|
858
|
-
const [D,
|
|
838
|
+
V && !X && (oe(Re("webkitLineClamp")), Be(Re("textOverflow")));
|
|
839
|
+
}, [X, V]);
|
|
840
|
+
const [D, Xe] = r.useState(j), xe = r.useMemo(() => X ? !1 : K === 1 ? Ee : q, [X, Ee, q]);
|
|
859
841
|
W(() => {
|
|
860
|
-
|
|
861
|
-
}, [
|
|
862
|
-
const
|
|
842
|
+
Xe(xe && j);
|
|
843
|
+
}, [xe, j]);
|
|
844
|
+
const Se = j && (D ? ve : he), Je = j && K === 1 && D, re = j && K > 1 && D, Ge = (l, p) => {
|
|
863
845
|
var L;
|
|
864
|
-
|
|
865
|
-
}, [
|
|
846
|
+
qe(p.expanded), (L = R.onExpand) === null || L === void 0 || L.call(R, l, p);
|
|
847
|
+
}, [Ce, Qe] = r.useState(0), Ye = (l) => {
|
|
866
848
|
let {
|
|
867
|
-
offsetWidth:
|
|
849
|
+
offsetWidth: p
|
|
868
850
|
} = l;
|
|
869
|
-
|
|
870
|
-
},
|
|
871
|
-
var
|
|
872
|
-
|
|
851
|
+
Qe(p);
|
|
852
|
+
}, Ze = (l) => {
|
|
853
|
+
var p;
|
|
854
|
+
We(l), he !== l && ((p = R.onEllipsis) === null || p === void 0 || p.call(R, l));
|
|
873
855
|
};
|
|
874
856
|
r.useEffect(() => {
|
|
875
|
-
const l =
|
|
876
|
-
if (
|
|
877
|
-
const
|
|
878
|
-
|
|
857
|
+
const l = I.current;
|
|
858
|
+
if (V && D && l) {
|
|
859
|
+
const p = Zt(l);
|
|
860
|
+
ve !== p && Ue(p);
|
|
879
861
|
}
|
|
880
|
-
}, [
|
|
881
|
-
const l =
|
|
862
|
+
}, [V, D, d, re, Fe, Ce]), r.useEffect(() => {
|
|
863
|
+
const l = I.current;
|
|
882
864
|
if (typeof IntersectionObserver > "u" || !l || !D || !j)
|
|
883
865
|
return;
|
|
884
|
-
const
|
|
885
|
-
|
|
866
|
+
const p = new IntersectionObserver(() => {
|
|
867
|
+
Ke(!!l.offsetParent);
|
|
886
868
|
});
|
|
887
|
-
return
|
|
888
|
-
|
|
869
|
+
return p.observe(l), () => {
|
|
870
|
+
p.disconnect();
|
|
889
871
|
};
|
|
890
872
|
}, [D, j]);
|
|
891
|
-
const ie =
|
|
892
|
-
if (!(!
|
|
893
|
-
return [
|
|
894
|
-
}, [
|
|
873
|
+
const ie = Qt(R.tooltip, v.text, d), J = r.useMemo(() => {
|
|
874
|
+
if (!(!V || D))
|
|
875
|
+
return [v.text, d, b, ie.title].find(be);
|
|
876
|
+
}, [V, D, b, ie.title, Se]);
|
|
895
877
|
if (z)
|
|
896
|
-
return /* @__PURE__ */ r.createElement(
|
|
897
|
-
value: (o =
|
|
898
|
-
onSave:
|
|
899
|
-
onCancel:
|
|
900
|
-
onEnd:
|
|
901
|
-
prefixCls:
|
|
878
|
+
return /* @__PURE__ */ r.createElement(zt, {
|
|
879
|
+
value: (o = v.text) !== null && o !== void 0 ? o : typeof d == "string" ? d : "",
|
|
880
|
+
onSave: E,
|
|
881
|
+
onCancel: h,
|
|
882
|
+
onEnd: v.onEnd,
|
|
883
|
+
prefixCls: O,
|
|
902
884
|
className: i,
|
|
903
885
|
style: s,
|
|
904
|
-
direction:
|
|
886
|
+
direction: C,
|
|
905
887
|
component: g,
|
|
906
|
-
maxLength:
|
|
907
|
-
autoSize:
|
|
908
|
-
enterIcon:
|
|
888
|
+
maxLength: v.maxLength,
|
|
889
|
+
autoSize: v.autoSize,
|
|
890
|
+
enterIcon: v.enterIcon
|
|
909
891
|
});
|
|
910
|
-
const
|
|
892
|
+
const et = () => {
|
|
911
893
|
const {
|
|
912
894
|
expandable: l,
|
|
913
|
-
symbol:
|
|
914
|
-
} =
|
|
895
|
+
symbol: p
|
|
896
|
+
} = R;
|
|
915
897
|
return l ? /* @__PURE__ */ r.createElement("button", {
|
|
916
898
|
type: "button",
|
|
917
899
|
key: "expand",
|
|
918
|
-
className: `${
|
|
919
|
-
onClick: (L) =>
|
|
900
|
+
className: `${O}-${A ? "collapse" : "expand"}`,
|
|
901
|
+
onClick: (L) => Ge(L, {
|
|
920
902
|
expanded: !A
|
|
921
903
|
}),
|
|
922
904
|
"aria-label": A ? y.collapse : y == null ? void 0 : y.expand
|
|
923
|
-
}, typeof
|
|
924
|
-
},
|
|
905
|
+
}, typeof p == "function" ? p(A) : p) : null;
|
|
906
|
+
}, tt = () => {
|
|
925
907
|
if (!_)
|
|
926
908
|
return;
|
|
927
909
|
const {
|
|
928
910
|
icon: l,
|
|
929
|
-
tooltip:
|
|
911
|
+
tooltip: p,
|
|
930
912
|
tabIndex: L
|
|
931
|
-
} =
|
|
932
|
-
return
|
|
913
|
+
} = v, se = Me(p)[0] || (y == null ? void 0 : y.edit), it = typeof se == "string" ? se : "";
|
|
914
|
+
return B.includes("icon") ? /* @__PURE__ */ r.createElement(ge, {
|
|
933
915
|
key: "edit",
|
|
934
|
-
title:
|
|
916
|
+
title: p === !1 ? "" : se
|
|
935
917
|
}, /* @__PURE__ */ r.createElement("button", {
|
|
936
918
|
type: "button",
|
|
937
919
|
ref: H,
|
|
938
|
-
className: `${
|
|
939
|
-
onClick:
|
|
940
|
-
"aria-label":
|
|
920
|
+
className: `${O}-edit`,
|
|
921
|
+
onClick: k,
|
|
922
|
+
"aria-label": it,
|
|
941
923
|
tabIndex: L
|
|
942
|
-
}, l || /* @__PURE__ */ r.createElement(
|
|
924
|
+
}, l || /* @__PURE__ */ r.createElement(Ae, {
|
|
943
925
|
role: "button"
|
|
944
926
|
}))) : null;
|
|
945
|
-
},
|
|
927
|
+
}, nt = () => x ? /* @__PURE__ */ r.createElement(en, Object.assign({
|
|
946
928
|
key: "copy"
|
|
947
929
|
}, P, {
|
|
948
|
-
prefixCls:
|
|
949
|
-
copied:
|
|
930
|
+
prefixCls: O,
|
|
931
|
+
copied: T,
|
|
950
932
|
locale: y,
|
|
951
933
|
onCopy: ne,
|
|
952
|
-
loading:
|
|
953
|
-
iconOnly:
|
|
954
|
-
})) : null,
|
|
934
|
+
loading: $,
|
|
935
|
+
iconOnly: d == null
|
|
936
|
+
})) : null, ot = (l) => [l && et(), tt(), nt()], rt = (l) => [l && !A && /* @__PURE__ */ r.createElement("span", {
|
|
955
937
|
"aria-hidden": !0,
|
|
956
938
|
key: "ellipsis"
|
|
957
|
-
},
|
|
958
|
-
return /* @__PURE__ */ r.createElement(
|
|
959
|
-
onResize:
|
|
939
|
+
}, sn), R.suffix, ot(l)];
|
|
940
|
+
return /* @__PURE__ */ r.createElement(bt, {
|
|
941
|
+
onResize: Ye,
|
|
960
942
|
disabled: !j
|
|
961
|
-
}, (l) => /* @__PURE__ */ r.createElement(
|
|
943
|
+
}, (l) => /* @__PURE__ */ r.createElement(Ve, {
|
|
962
944
|
tooltipProps: ie,
|
|
963
945
|
enableEllipsis: j,
|
|
964
|
-
isEllipsis:
|
|
965
|
-
}, /* @__PURE__ */ r.createElement(
|
|
966
|
-
className:
|
|
967
|
-
[`${
|
|
968
|
-
[`${
|
|
969
|
-
[`${
|
|
970
|
-
[`${
|
|
971
|
-
[`${
|
|
946
|
+
isEllipsis: Se
|
|
947
|
+
}, /* @__PURE__ */ r.createElement(ye, Object.assign({
|
|
948
|
+
className: Z({
|
|
949
|
+
[`${O}-${u}`]: u,
|
|
950
|
+
[`${O}-disabled`]: c,
|
|
951
|
+
[`${O}-ellipsis`]: V,
|
|
952
|
+
[`${O}-ellipsis-single-line`]: Je,
|
|
953
|
+
[`${O}-ellipsis-multiple-line`]: re
|
|
972
954
|
}, i),
|
|
973
955
|
prefixCls: n,
|
|
974
956
|
style: Object.assign(Object.assign({}, s), {
|
|
975
957
|
WebkitLineClamp: re ? K : void 0
|
|
976
958
|
}),
|
|
977
959
|
component: g,
|
|
978
|
-
ref:
|
|
979
|
-
direction:
|
|
980
|
-
onClick:
|
|
981
|
-
"aria-label":
|
|
960
|
+
ref: Le(l, I, t),
|
|
961
|
+
direction: C,
|
|
962
|
+
onClick: B.includes("text") ? k : void 0,
|
|
963
|
+
"aria-label": J == null ? void 0 : J.toString(),
|
|
982
964
|
title: b
|
|
983
|
-
}, w), /* @__PURE__ */ r.createElement(
|
|
965
|
+
}, w), /* @__PURE__ */ r.createElement(nn, {
|
|
984
966
|
enableMeasure: j && !D,
|
|
985
|
-
text:
|
|
967
|
+
text: d,
|
|
986
968
|
rows: K,
|
|
987
|
-
width:
|
|
988
|
-
onEllipsis:
|
|
969
|
+
width: Ce,
|
|
970
|
+
onEllipsis: Ze,
|
|
989
971
|
expanded: A,
|
|
990
|
-
miscDeps: [
|
|
991
|
-
}, (
|
|
972
|
+
miscDeps: [T, A, $, _, x, y]
|
|
973
|
+
}, (p, L) => rn(e, /* @__PURE__ */ r.createElement(r.Fragment, null, p.length > 0 && L && !A && J ? /* @__PURE__ */ r.createElement("span", {
|
|
992
974
|
key: "show-content",
|
|
993
975
|
"aria-hidden": !0
|
|
994
|
-
},
|
|
995
|
-
})
|
|
996
|
-
var
|
|
976
|
+
}, p) : p, rt(L)))))));
|
|
977
|
+
});
|
|
978
|
+
var ln = function(e, t) {
|
|
997
979
|
var o = {};
|
|
998
|
-
for (var n in e)
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
1002
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
980
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
981
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
982
|
+
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
1003
983
|
return o;
|
|
1004
984
|
};
|
|
1005
|
-
const
|
|
985
|
+
const an = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
1006
986
|
var {
|
|
1007
987
|
ellipsis: o,
|
|
1008
988
|
rel: n
|
|
1009
|
-
} = e, i =
|
|
989
|
+
} = e, i = ln(e, ["ellipsis", "rel"]);
|
|
1010
990
|
if (process.env.NODE_ENV !== "production") {
|
|
1011
|
-
const
|
|
1012
|
-
process.env.NODE_ENV !== "production" &&
|
|
991
|
+
const u = Y("Typography.Link");
|
|
992
|
+
process.env.NODE_ENV !== "production" && u(typeof o != "object", "usage", "`ellipsis` only supports boolean value.");
|
|
1013
993
|
}
|
|
1014
994
|
const s = Object.assign(Object.assign({}, i), {
|
|
1015
995
|
rel: n === void 0 && i.target === "_blank" ? "noopener noreferrer" : n
|
|
1016
996
|
});
|
|
1017
|
-
return delete s.navigate, /* @__PURE__ */ r.createElement(
|
|
997
|
+
return delete s.navigate, /* @__PURE__ */ r.createElement(ee, Object.assign({}, s, {
|
|
1018
998
|
ref: t,
|
|
1019
999
|
ellipsis: !!o,
|
|
1020
1000
|
component: "a"
|
|
1021
1001
|
}));
|
|
1022
|
-
}),
|
|
1002
|
+
}), cn = /* @__PURE__ */ r.forwardRef((e, t) => /* @__PURE__ */ r.createElement(ee, Object.assign({
|
|
1023
1003
|
ref: t
|
|
1024
1004
|
}, e, {
|
|
1025
1005
|
component: "div"
|
|
1026
|
-
})))
|
|
1027
|
-
var
|
|
1006
|
+
})));
|
|
1007
|
+
var dn = function(e, t) {
|
|
1028
1008
|
var o = {};
|
|
1029
|
-
for (var n in e)
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
1033
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
1009
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
1010
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
1011
|
+
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
1034
1012
|
return o;
|
|
1035
1013
|
};
|
|
1036
|
-
const
|
|
1014
|
+
const un = (e, t) => {
|
|
1037
1015
|
var {
|
|
1038
1016
|
ellipsis: o
|
|
1039
|
-
} = e, n =
|
|
1017
|
+
} = e, n = dn(e, ["ellipsis"]);
|
|
1040
1018
|
const i = r.useMemo(() => o && typeof o == "object" ? ke(o, ["expandable", "rows"]) : o, [o]);
|
|
1041
1019
|
if (process.env.NODE_ENV !== "production") {
|
|
1042
|
-
const s =
|
|
1020
|
+
const s = Y("Typography.Text");
|
|
1043
1021
|
process.env.NODE_ENV !== "production" && s(typeof o != "object" || !o || !("expandable" in o) && !("rows" in o), "usage", "`ellipsis` do not support `expandable` or `rows` props.");
|
|
1044
1022
|
}
|
|
1045
|
-
return /* @__PURE__ */ r.createElement(
|
|
1023
|
+
return /* @__PURE__ */ r.createElement(ee, Object.assign({
|
|
1046
1024
|
ref: t
|
|
1047
1025
|
}, n, {
|
|
1048
1026
|
ellipsis: i,
|
|
1049
1027
|
component: "span"
|
|
1050
1028
|
}));
|
|
1051
|
-
},
|
|
1052
|
-
var
|
|
1029
|
+
}, pn = /* @__PURE__ */ r.forwardRef(un);
|
|
1030
|
+
var fn = function(e, t) {
|
|
1053
1031
|
var o = {};
|
|
1054
|
-
for (var n in e)
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
1058
|
-
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
1032
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
1033
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
|
|
1034
|
+
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (o[n[i]] = e[n[i]]);
|
|
1059
1035
|
return o;
|
|
1060
1036
|
};
|
|
1061
|
-
const
|
|
1037
|
+
const Ie = [1, 2, 3, 4, 5], mn = /* @__PURE__ */ r.forwardRef((e, t) => {
|
|
1062
1038
|
const {
|
|
1063
1039
|
level: o = 1
|
|
1064
|
-
} = e, n =
|
|
1040
|
+
} = e, n = fn(e, ["level"]);
|
|
1065
1041
|
if (process.env.NODE_ENV !== "production") {
|
|
1066
|
-
const s =
|
|
1067
|
-
process.env.NODE_ENV !== "production" && s(
|
|
1042
|
+
const s = Y("Typography.Title");
|
|
1043
|
+
process.env.NODE_ENV !== "production" && s(Ie.includes(o), "usage", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.");
|
|
1068
1044
|
}
|
|
1069
|
-
const i =
|
|
1070
|
-
return /* @__PURE__ */ r.createElement(
|
|
1045
|
+
const i = Ie.includes(o) ? `h${o}` : "h1";
|
|
1046
|
+
return /* @__PURE__ */ r.createElement(ee, Object.assign({
|
|
1071
1047
|
ref: t
|
|
1072
1048
|
}, n, {
|
|
1073
1049
|
component: i
|
|
1074
1050
|
}));
|
|
1075
|
-
}),
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
const Fn = q;
|
|
1051
|
+
}), te = ye;
|
|
1052
|
+
te.Text = pn;
|
|
1053
|
+
te.Link = an;
|
|
1054
|
+
te.Title = mn;
|
|
1055
|
+
te.Paragraph = cn;
|
|
1081
1056
|
export {
|
|
1082
|
-
|
|
1057
|
+
te as T
|
|
1083
1058
|
};
|