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