aristid-ds 20.1.0 → 20.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/dist/Kit/App/index.js +1 -1
- package/dist/Kit/DataDisplay/Card/index.js +1 -1
- package/dist/Kit/DataDisplay/Carousel/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemCard/index.js +1 -1
- package/dist/Kit/DataDisplay/ItemList/index.js +1 -1
- package/dist/Kit/DataDisplay/Kanban/index.js +1 -1
- package/dist/Kit/DataDisplay/RedirectCard/index.js +1 -1
- package/dist/Kit/DataDisplay/Tab/TabDropdownButton.d.ts +7 -0
- package/dist/Kit/DataDisplay/Tab/index.d.ts +6 -1
- package/dist/Kit/DataDisplay/Tab/index.js +1 -1
- package/dist/Kit/DataDisplay/Tab/types.d.ts +8 -0
- package/dist/Kit/DataDisplay/Table/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/index.js +1 -1
- package/dist/Kit/DataDisplay/Tag/types.d.ts +12 -1
- package/dist/Kit/DataEntry/AutoComplete/index.js +1 -1
- package/dist/Kit/DataEntry/ColorPicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/index.js +1 -1
- package/dist/Kit/DataEntry/DatePicker/types.d.ts +2 -0
- package/dist/Kit/DataEntry/Filter/FilterButton.d.ts +0 -1
- package/dist/Kit/DataEntry/Filter/index.js +1 -1
- package/dist/Kit/DataEntry/Filter/types.d.ts +0 -1
- package/dist/Kit/DataEntry/Input/index.js +1 -1
- package/dist/Kit/DataEntry/Input/types.d.ts +1 -0
- package/dist/Kit/DataEntry/InputNumber/index.js +1 -1
- package/dist/Kit/DataEntry/InputNumber/types.d.ts +1 -0
- package/dist/Kit/DataEntry/RichText/MenuBar/LinkButton/index.js +1 -1
- package/dist/Kit/DataEntry/RichText/MenuBar/MenuActionList/index.js +1 -1
- package/dist/Kit/DataEntry/SearchInput/index.js +1 -1
- package/dist/Kit/DataEntry/Select/LoadingSuffix.d.ts +2 -0
- package/dist/Kit/DataEntry/Select/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/index.js +1 -1
- package/dist/Kit/DataEntry/TreeSelect/useIcons.d.ts +4 -2
- package/dist/Kit/DataEntry/Upload/index.js +1 -1
- package/dist/Kit/Feedback/Modal/index.js +1 -1
- package/dist/Kit/Feedback/Notification/index.js +1 -1
- package/dist/Kit/Feedback/SnackBar/index.js +1 -1
- package/dist/Kit/General/Button/index.js +1 -1
- package/dist/Kit/General/DynamicActions/index.js +1 -1
- package/dist/Kit/Layout/PageLayout/index.js +1 -1
- package/dist/Kit/Navigation/DropDown/index.js +52 -38
- package/dist/Kit/Navigation/Header/index.js +1 -1
- package/dist/Kit/Navigation/PageHeader/index.js +1 -1
- package/dist/Kit/Navigation/Pagination/index.js +1 -1
- package/dist/Kit/Navigation/SideMenu/index.js +1 -1
- package/dist/Kit/Navigation/SidePanel/index.js +1 -1
- package/dist/Kit/index.js +28 -28
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ColorPicker.css +1 -1
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/LoadingSuffix.css +1 -0
- package/dist/assets/Tab.css +1 -1
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/icons/loader/faKitLoader.d.ts +2 -0
- package/dist/chunks/{App.BAznFPGK.js → App.DEAyG_cT.js} +1 -1
- package/dist/chunks/{Button.BvMCtuy-.js → Button.Cf2t8x-g.js} +42 -40
- package/dist/chunks/{Card.CPFdoSwO.js → Card.BifWds4Q.js} +1 -1
- package/dist/chunks/{Carousel.CkzT9Z2U.js → Carousel.D_UPa7c6.js} +2 -1
- package/dist/chunks/{ColorPicker.BO3g1Ccr.js → ColorPicker.CXPDOjlD.js} +4 -4
- package/dist/chunks/DatePicker.CZ7uUpci.js +283 -0
- package/dist/chunks/{DynamicActions.D-M49goY.js → DynamicActions.B0RCwP59.js} +1 -1
- package/dist/chunks/Filter.bcFfECQ2.js +91 -0
- package/dist/chunks/{Header.BG7zjt32.js → Header.CjmOOvCM.js} +1 -1
- package/dist/chunks/{Input.DAqyQC25.js → Input.NJ0gxOKB.js} +189 -174
- package/dist/chunks/InputNumber.ArmZWyjD.js +59 -0
- package/dist/chunks/{InternalSizeChanger.CY_UQjgi.js → InternalSizeChanger.4uhUYdQf.js} +1 -1
- package/dist/chunks/{ItemCard.UAMPsAeG.js → ItemCard.I_EZWDr7.js} +2 -2
- package/dist/chunks/{ItemList.DxIrTW2r.js → ItemList.ZRUcXI2B.js} +1 -1
- package/dist/chunks/{Kanban.DMLzdryr.js → Kanban.DlRMF3Pf.js} +3 -3
- package/dist/chunks/{LinkButton.bj3sa3Dz.js → LinkButton.VSCUoTOf.js} +3 -3
- package/dist/chunks/LoadingSuffix.DoHzo7nz.js +13 -0
- package/dist/chunks/{Modal.DhO42LCE.js → Modal.BGfgvCM-.js} +2 -2
- package/dist/chunks/{Notification.CmGBpBnD.js → Notification.BvB2WQpw.js} +1 -1
- package/dist/chunks/{PageHeader.BNe3xCFg.js → PageHeader.CK5neQHJ.js} +2 -2
- package/dist/chunks/{PageLayout.BjZqP-fP.js → PageLayout.CypWl6mK.js} +2 -2
- package/dist/chunks/{Pagination.DoydgcwL.js → Pagination.D2RZjMJN.js} +1 -1
- package/dist/chunks/{RedirectCard.DZz4x-RC.js → RedirectCard.NBOpek7n.js} +1 -1
- package/dist/chunks/{SearchInput.DPSQA6Hk.js → SearchInput.C7EnHTpX.js} +1 -1
- package/dist/chunks/Select.DAAdVERs.js +247 -0
- package/dist/chunks/{SideMenu.BGakreF_.js → SideMenu.Cd2GjK9u.js} +2 -2
- package/dist/chunks/{SidePanel.e4UuckCP.js → SidePanel.C-fXIhny.js} +2 -2
- package/dist/chunks/{SnackBar.Bjp5gpjk.js → SnackBar.CEjyTWJG.js} +2 -2
- package/dist/chunks/Tab.BQDQSuOg.js +281 -0
- package/dist/chunks/{Table.HPOQ6vNr.js → Table.DPRSm9mV.js} +2 -2
- package/dist/chunks/{Tag.8Hoq2HSD.js → Tag.By8jS_2F.js} +8 -8
- package/dist/chunks/{TreeSelect.C0h4AGX4.js → TreeSelect.DD8WhA4W.js} +95 -93
- package/dist/chunks/{Upload.DxOzcNcZ.js → Upload.DxszpKf4.js} +2 -2
- package/dist/chunks/faKitLoader.BJKbv-bm.js +13 -0
- package/dist/chunks/useLoadingWidthLock.CzCPeVNp.js +13 -0
- package/dist/index.es.js +28 -28
- package/dist/index.umd.js +4 -4
- package/dist/theme/aristid/general/utilities/index.js +12 -6
- package/dist/theme/types/utilities/index.d.ts +18 -0
- package/dist/translation/en-US/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/en-US/index.js +32 -30
- package/dist/translation/fr-FR/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/fr-FR/index.js +32 -30
- package/dist/translation/pt-PT/components/DataDisplay/Tab/index.js +5 -1
- package/dist/translation/pt-PT/index.js +32 -30
- package/dist/translation/types/components/DataDisplay/Tab/index.d.ts +2 -0
- package/dist/utils/functions/index.d.ts +1 -2
- package/dist/utils/functions/types.d.ts +6 -0
- package/dist/utils/hooks/useLoadingWidthLock.d.ts +2 -0
- package/package.json +15 -16
- package/dist/assets/styles.css +0 -1
- package/dist/chunks/DatePicker.DlehA8r8.js +0 -273
- package/dist/chunks/Filter.BrhTPGgi.js +0 -85
- package/dist/chunks/InputNumber.BVLzytYW.js +0 -52
- package/dist/chunks/Select.C4L4tjyk.js +0 -248
- package/dist/chunks/Tab.BQlSFTkt.js +0 -188
- package/dist/chunks/styles.module.CAGtUY-F.js +0 -3
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { KitTooltip as e } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
2
|
+
import { t } from "./Button.Cf2t8x-g.js";
|
|
3
|
+
import { n } from "./useKitTheme.P5Q2DIyI.js";
|
|
4
|
+
import { n as r } from "./useKitLocale.Y5XHnnYS.js";
|
|
5
|
+
import { t as i } from "./Typography.dSdY4EZz.js";
|
|
6
|
+
import { t as a } from "./Badge.tu17MdMt.js";
|
|
7
|
+
import { KitDropDown as o } from "../Kit/Navigation/DropDown/index.js";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
import { forwardRef as u, useLayoutEffect as d, useRef as f, useState as p } from "react";
|
|
10
|
+
import m from "classnames";
|
|
11
|
+
import { faEllipsisVertical as h, faPlus as g, faXmark as _ } from "@fortawesome/free-solid-svg-icons";
|
|
12
|
+
import { FontAwesomeIcon as v } from "@fortawesome/react-fontawesome";
|
|
13
|
+
import { useComposeRef as y } from "@rc-component/util/es/ref";
|
|
14
|
+
import '../assets/Tab.css';// src/Kit/DataDisplay/Tab/styles.module.scss
|
|
15
|
+
var b = {
|
|
16
|
+
"kit-tab-list-wrapper": "_kit-tab-list-wrapper_10hla_1",
|
|
17
|
+
"kit-tab-list": "_kit-tab-list_10hla_1"
|
|
18
|
+
}, x = ({ icon: e, label: t, size: n, badgeCount: r, badgeOverflowCount: o, badgeDot: u, badgeColor: d }) => l(s, { children: [e && c("div", {
|
|
19
|
+
className: "kit-tab-icon",
|
|
20
|
+
children: e
|
|
21
|
+
}), l("div", {
|
|
22
|
+
className: "kit-tab-label-wrapper",
|
|
23
|
+
children: [c(i.Text, {
|
|
24
|
+
className: "kit-tab-label",
|
|
25
|
+
size: S(n),
|
|
26
|
+
children: t
|
|
27
|
+
}), u ? c(a, {
|
|
28
|
+
className: "kit-tab-dot",
|
|
29
|
+
dot: !0,
|
|
30
|
+
color: d
|
|
31
|
+
}) : !!r && c(a, {
|
|
32
|
+
className: "kit-tab-count",
|
|
33
|
+
count: r,
|
|
34
|
+
overflowCount: o,
|
|
35
|
+
color: d
|
|
36
|
+
})]
|
|
37
|
+
})] });
|
|
38
|
+
function S(e) {
|
|
39
|
+
switch (e) {
|
|
40
|
+
case "small": return "fontSize7";
|
|
41
|
+
case "medium": return "fontSize6";
|
|
42
|
+
default: return "fontSize4";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// src/Kit/DataDisplay/Tab/TabDropdownButton.tsx
|
|
46
|
+
var C = ({ onOpenChange: e, children: t, ...n }) => {
|
|
47
|
+
let [r, i] = p(!1);
|
|
48
|
+
return c(o, {
|
|
49
|
+
trigger: ["click"],
|
|
50
|
+
...n,
|
|
51
|
+
onOpenChange: (t, n) => {
|
|
52
|
+
i(n.source === "menu" || t), e?.(t, n);
|
|
53
|
+
},
|
|
54
|
+
children: t(n.open ?? r)
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
// src/Kit/DataDisplay/Tab/useOverflowTabs.tsx
|
|
58
|
+
function ee({ items: e, addTab: t, disableOverflow: n }) {
|
|
59
|
+
let r = f(null), i = f({}), a = t ? 56 : 0, [o, s] = p([]), [c, l] = p(!1);
|
|
60
|
+
return d(() => {
|
|
61
|
+
let t = () => {
|
|
62
|
+
if (n) {
|
|
63
|
+
l(!0);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
let t = r.current;
|
|
67
|
+
if (!t) return;
|
|
68
|
+
let o = T(t), c = o ? w(o) : window.innerWidth, u = a, d = [];
|
|
69
|
+
for (let t = 0; t < e.length; t++) {
|
|
70
|
+
let n = e[t], r = i.current[n.key];
|
|
71
|
+
if (!r) return;
|
|
72
|
+
u += r.offsetWidth + 16;
|
|
73
|
+
let a = t === e.length - 1 ? 0 : 40;
|
|
74
|
+
u > c - a + 16 && d.push(n.key);
|
|
75
|
+
}
|
|
76
|
+
s((e) => e.join() === d.join() ? e : d), l(!0);
|
|
77
|
+
}, o, c = () => {
|
|
78
|
+
clearTimeout(o), o = setTimeout(t, 100);
|
|
79
|
+
};
|
|
80
|
+
t(), window.addEventListener("resize", c);
|
|
81
|
+
let u = r.current && T(r.current), d = new ResizeObserver(c);
|
|
82
|
+
return u && d.observe(u), () => {
|
|
83
|
+
window.removeEventListener("resize", c), d.disconnect(), clearTimeout(o);
|
|
84
|
+
};
|
|
85
|
+
}, [
|
|
86
|
+
e,
|
|
87
|
+
a,
|
|
88
|
+
n
|
|
89
|
+
]), {
|
|
90
|
+
containerRef: r,
|
|
91
|
+
tabRefs: i,
|
|
92
|
+
overflowedKeys: o,
|
|
93
|
+
overflowedItems: e.filter((e) => o.includes(e.key)),
|
|
94
|
+
overflowCalculated: c
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function w(e) {
|
|
98
|
+
let { paddingLeft: t, paddingRight: n } = window.getComputedStyle(e);
|
|
99
|
+
return e.clientWidth - parseFloat(t) - parseFloat(n);
|
|
100
|
+
}
|
|
101
|
+
function T(e) {
|
|
102
|
+
let t = e.parentElement;
|
|
103
|
+
for (; t;) {
|
|
104
|
+
let { width: e, display: n } = window.getComputedStyle(t), r = e !== "auto" && e !== "fit-content" && e !== "min-content" && e !== "max-content", i = n.includes("flex") || n.includes("grid");
|
|
105
|
+
if ((r || i) && t.clientWidth > 0) return t;
|
|
106
|
+
t = t.parentElement;
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
// src/Kit/DataDisplay/Tab/index.tsx
|
|
111
|
+
var E = {
|
|
112
|
+
small: "s",
|
|
113
|
+
medium: "m",
|
|
114
|
+
large: "l"
|
|
115
|
+
}, D = (e) => e.key === "Enter" || e.key === " ", te = (e, t) => {
|
|
116
|
+
let n = Math.min(t, e.length - 1), r = e.slice(n).find((e) => !e.disabled), i = e.slice(0, n).reverse().find((e) => !e.disabled);
|
|
117
|
+
return (r ?? i)?.key;
|
|
118
|
+
}, O = u(({ addTab: i, addTabDropdown: a, addTabLabel: o, centered: u, className: S, activeKey: w, defaultKey: T, items: O, onChange: k, removeTab: A, closeText: ne, fullwidthTab: j, size: M = "medium", variant: N = "classic", ...P }, F) => {
|
|
119
|
+
let { appId: I } = n(), { locale: L } = r(), [R, z] = p(T ?? O[0]?.key), B = w ?? R, V = O.find((e) => e.key === B)?.tabContent, re = m(I, S, b["kit-tab-list"], M, N, j ? "fullwidth" : "", V && N === "pill" ? "tab-bottom-spacing" : ""), ie = m(b["kit-tab-list-wrapper"], { centered: u }), { containerRef: ae, tabRefs: H, overflowedKeys: U, overflowedItems: oe, overflowCalculated: se } = ee({
|
|
120
|
+
items: O,
|
|
121
|
+
addTab: !!(i || a),
|
|
122
|
+
disableOverflow: !!j
|
|
123
|
+
}), ce = y(ae, F), W = f(null), G = f({}), K = (e) => {
|
|
124
|
+
W.current = null, z(e), k?.(e);
|
|
125
|
+
}, q = ({ closable: e }) => !!A && e !== !1, J = f(null), Y = w === void 0, X = (e, t) => {
|
|
126
|
+
J.current = {
|
|
127
|
+
key: e,
|
|
128
|
+
index: O.findIndex((t) => t.key === e),
|
|
129
|
+
wasActive: e === B,
|
|
130
|
+
fromKeyboard: t
|
|
131
|
+
}, A?.(e);
|
|
132
|
+
};
|
|
133
|
+
d(() => {
|
|
134
|
+
let e = J.current;
|
|
135
|
+
if (!e || O.some((t) => t.key === e.key)) return;
|
|
136
|
+
J.current = null;
|
|
137
|
+
let t = te(O, e.index);
|
|
138
|
+
if (e.wasActive && Y && t !== void 0 && (z(t), k?.(t)), e.fromKeyboard) {
|
|
139
|
+
let n = e.wasActive && Y ? t : O[Math.min(e.index, O.length - 1)]?.key;
|
|
140
|
+
W.current = n ?? null;
|
|
141
|
+
}
|
|
142
|
+
}, [O]), d(() => {
|
|
143
|
+
var e;
|
|
144
|
+
let t = W.current;
|
|
145
|
+
t !== null && (O.some((e) => e.key === t) ? U.includes(t) || (W.current = null, (e = G.current[t]) == null || e.focus()) : W.current = null);
|
|
146
|
+
}, [O, U]);
|
|
147
|
+
let le = (e, t, n) => {
|
|
148
|
+
W.current = null, e.code === "Enter" && (z(t), k?.(t)), n && (e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), X(t, !0));
|
|
149
|
+
}, Z = (t, { focusable: n = !0, disabled: r = !1 } = {}) => {
|
|
150
|
+
let i = ne ?? L.Tab?.remove ?? L.General?.remove;
|
|
151
|
+
return c("span", {
|
|
152
|
+
className: "kit-tab-close",
|
|
153
|
+
role: "button",
|
|
154
|
+
tabIndex: n && !r ? 0 : void 0,
|
|
155
|
+
"aria-label": i,
|
|
156
|
+
"aria-disabled": r || void 0,
|
|
157
|
+
onClick: (e) => {
|
|
158
|
+
e.stopPropagation(), r || X(t, !1);
|
|
159
|
+
},
|
|
160
|
+
onKeyDown: (e) => {
|
|
161
|
+
!r && D(e) && (e.preventDefault(), e.stopPropagation(), X(t, !0));
|
|
162
|
+
},
|
|
163
|
+
children: c(e, {
|
|
164
|
+
title: i,
|
|
165
|
+
children: c(v, { icon: _ })
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
}, Q = o ?? L.Tab?.addTab, $ = (n) => c(e, {
|
|
169
|
+
title: Q,
|
|
170
|
+
placement: "bottom",
|
|
171
|
+
open: !n && void 0,
|
|
172
|
+
children: c(t, {
|
|
173
|
+
disableSecureClick: !0,
|
|
174
|
+
type: "tertiary",
|
|
175
|
+
icon: c(v, { icon: g }),
|
|
176
|
+
onClick: a ? void 0 : i,
|
|
177
|
+
"aria-label": Q,
|
|
178
|
+
"aria-expanded": n,
|
|
179
|
+
active: n,
|
|
180
|
+
size: E[M]
|
|
181
|
+
})
|
|
182
|
+
});
|
|
183
|
+
return l(s, { children: [c("div", {
|
|
184
|
+
className: ie,
|
|
185
|
+
ref: ce,
|
|
186
|
+
children: l("div", {
|
|
187
|
+
...P,
|
|
188
|
+
className: re,
|
|
189
|
+
role: "tablist",
|
|
190
|
+
children: [
|
|
191
|
+
O.map(({ icon: e, label: t, badgeCount: n, badgeOverflowCount: r, badgeDot: i, badgeColor: a, key: o, disabled: s, closable: u }) => {
|
|
192
|
+
let d = U.includes(o), f = B === o, p = q({ closable: u }), h = m("kit-tab", `kit-tab-${M}`, N, {
|
|
193
|
+
visible: se && !d,
|
|
194
|
+
disabled: s,
|
|
195
|
+
active: f,
|
|
196
|
+
fullwidth: j
|
|
197
|
+
}), g = c(x, {
|
|
198
|
+
icon: e,
|
|
199
|
+
label: t,
|
|
200
|
+
size: M,
|
|
201
|
+
badgeCount: n,
|
|
202
|
+
badgeOverflowCount: r,
|
|
203
|
+
badgeDot: i,
|
|
204
|
+
badgeColor: a
|
|
205
|
+
}), _ = s ? void 0 : (e) => le(e, o, p);
|
|
206
|
+
return p ? l("div", {
|
|
207
|
+
ref: (e) => {
|
|
208
|
+
H.current[o] = e;
|
|
209
|
+
},
|
|
210
|
+
className: h,
|
|
211
|
+
role: "presentation",
|
|
212
|
+
onClick: s ? void 0 : () => K(o),
|
|
213
|
+
children: [c("div", {
|
|
214
|
+
ref: (e) => {
|
|
215
|
+
G.current[o] = e;
|
|
216
|
+
},
|
|
217
|
+
className: "kit-tab-control",
|
|
218
|
+
role: "tab",
|
|
219
|
+
tabIndex: 0,
|
|
220
|
+
"aria-disabled": s,
|
|
221
|
+
"aria-keyshortcuts": s ? void 0 : "Delete",
|
|
222
|
+
onKeyDown: _,
|
|
223
|
+
children: g
|
|
224
|
+
}), Z(o, { disabled: s })]
|
|
225
|
+
}, o) : c("div", {
|
|
226
|
+
ref: (e) => {
|
|
227
|
+
H.current[o] = e, G.current[o] = e;
|
|
228
|
+
},
|
|
229
|
+
className: h,
|
|
230
|
+
role: "tab",
|
|
231
|
+
tabIndex: 0,
|
|
232
|
+
"aria-disabled": s,
|
|
233
|
+
onClick: s ? void 0 : () => K(o),
|
|
234
|
+
onKeyDown: _,
|
|
235
|
+
children: g
|
|
236
|
+
}, o);
|
|
237
|
+
}),
|
|
238
|
+
U.length > 0 && c(C, {
|
|
239
|
+
menu: {
|
|
240
|
+
items: oe.map((e) => ({
|
|
241
|
+
label: l("div", {
|
|
242
|
+
className: m("kit-tab-dropdown", `kit-tab-dropdown-${M}`),
|
|
243
|
+
children: [c(x, {
|
|
244
|
+
icon: e.icon,
|
|
245
|
+
label: e.label,
|
|
246
|
+
size: M,
|
|
247
|
+
badgeCount: e.badgeCount,
|
|
248
|
+
badgeOverflowCount: e.badgeOverflowCount,
|
|
249
|
+
badgeDot: e.badgeDot,
|
|
250
|
+
badgeColor: e.badgeColor
|
|
251
|
+
}), q(e) && Z(e.key, {
|
|
252
|
+
focusable: !1,
|
|
253
|
+
disabled: e.disabled
|
|
254
|
+
})]
|
|
255
|
+
}),
|
|
256
|
+
type: "item",
|
|
257
|
+
key: e.key,
|
|
258
|
+
disabled: e.disabled,
|
|
259
|
+
onClick: () => !e.disabled && K(e.key)
|
|
260
|
+
})),
|
|
261
|
+
selectedKeys: [B]
|
|
262
|
+
},
|
|
263
|
+
children: (e) => c(t, {
|
|
264
|
+
icon: c(v, { icon: h }),
|
|
265
|
+
type: U.includes(B) ? "primary" : "tertiary",
|
|
266
|
+
"aria-label": L.Tab?.moreOptions,
|
|
267
|
+
"aria-expanded": e,
|
|
268
|
+
active: e,
|
|
269
|
+
size: E[M]
|
|
270
|
+
})
|
|
271
|
+
}),
|
|
272
|
+
a ? c(C, {
|
|
273
|
+
...a,
|
|
274
|
+
children: $
|
|
275
|
+
}) : i && $()
|
|
276
|
+
]
|
|
277
|
+
})
|
|
278
|
+
}), V] });
|
|
279
|
+
});
|
|
280
|
+
O.displayName = "KitTab";
|
|
281
|
+
export { O as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./Button.
|
|
2
|
-
import { n as t, t as n } from "./InternalSizeChanger.
|
|
1
|
+
import { t as e } from "./Button.Cf2t8x-g.js";
|
|
2
|
+
import { n as t, t as n } from "./InternalSizeChanger.4uhUYdQf.js";
|
|
3
3
|
import { n as r } from "./useKitTheme.P5Q2DIyI.js";
|
|
4
4
|
import { n as i } from "./useKitLocale.Y5XHnnYS.js";
|
|
5
5
|
import { t as a } from "./Icon.DbHbt0HM.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Modal.
|
|
1
|
+
import { t as e } from "./Modal.BGfgvCM-.js";
|
|
2
2
|
import { n as t } from "./useKitTheme.P5Q2DIyI.js";
|
|
3
3
|
import { n } from "./useKitLocale.Y5XHnnYS.js";
|
|
4
4
|
import { KitTooltip as r } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
@@ -11,13 +11,13 @@ import { faXmark as m } from "@fortawesome/free-solid-svg-icons";
|
|
|
11
11
|
import { FontAwesomeIcon as h } from "@fortawesome/react-fontawesome";
|
|
12
12
|
import '../assets/Tag.css';// src/Kit/DataDisplay/Tag/styles.module.scss
|
|
13
13
|
var g = {
|
|
14
|
-
"kit-tag": "_kit-
|
|
15
|
-
"kit-tag-group": "_kit-tag-
|
|
16
|
-
"kit-tag-group-measure": "_kit-tag-group-
|
|
17
|
-
"kit-tag-group-item": "_kit-tag-group-
|
|
18
|
-
"kit-tag-group-modal-list": "_kit-tag-group-modal-
|
|
19
|
-
"kit-tag-group-container": "_kit-tag-group-
|
|
20
|
-
"kit-tag-group-tooltip-overlay": "_kit-tag-group-tooltip-
|
|
14
|
+
"kit-tag": "_kit-tag_mppkn_1",
|
|
15
|
+
"kit-tag-group": "_kit-tag-group_mppkn_255",
|
|
16
|
+
"kit-tag-group-measure": "_kit-tag-group-measure_mppkn_256",
|
|
17
|
+
"kit-tag-group-item": "_kit-tag-group-item_mppkn_268",
|
|
18
|
+
"kit-tag-group-modal-list": "_kit-tag-group-modal-list_mppkn_283",
|
|
19
|
+
"kit-tag-group-container": "_kit-tag-group-container_mppkn_299",
|
|
20
|
+
"kit-tag-group-tooltip-overlay": "_kit-tag-group-tooltip-overlay_mppkn_306"
|
|
21
21
|
}, _ = c(({ className: e, closeIcon: s, type: c = "neutral", disabled: l, onClick: u, onKeyDown: d, onKeyUp: f, idCardProps: _, size: v = "medium", children: y, closeText: b, ...x }, S) => {
|
|
22
22
|
let { appId: C } = t(), { locale: w } = n(), T = p(C, g["kit-tag"], e, {
|
|
23
23
|
[`kit-tag-${c}`]: c,
|
|
@@ -4,40 +4,41 @@ import { n } from "./Breadcrumb.DUEiho8q.js";
|
|
|
4
4
|
import { n as r } from "./useKitLocale.Y5XHnnYS.js";
|
|
5
5
|
import { t as i } from "./useDeprecatedInputWrapper.CZ2-c80o.js";
|
|
6
6
|
import { t as a } from "./useGetPopupContainer.Bcn4zw7O.js";
|
|
7
|
-
import { t as o } from "./
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import _ from "
|
|
15
|
-
import
|
|
7
|
+
import { t as o } from "./useLoadingWidthLock.CzCPeVNp.js";
|
|
8
|
+
import { n as s, t as c } from "./LoadingSuffix.DoHzo7nz.js";
|
|
9
|
+
import { t as l } from "./IdCard.DcdzxJ6s.js";
|
|
10
|
+
import { t as u } from "./Tag.By8jS_2F.js";
|
|
11
|
+
import { t as d } from "./Icon.DbHbt0HM.js";
|
|
12
|
+
import { TreeSelect as f } from "antd";
|
|
13
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
14
|
+
import { forwardRef as m, useEffect as ee, useMemo as h, useRef as g, useState as _ } from "react";
|
|
15
|
+
import v from "classnames";
|
|
16
|
+
import { faCaretRight as te, faCheck as y, faChevronDown as b, faCircleXmark as x } from "@fortawesome/free-solid-svg-icons";
|
|
16
17
|
import { FontAwesomeIcon as S } from "@fortawesome/react-fontawesome";
|
|
17
|
-
import { useDebouncedCallback as
|
|
18
|
+
import { useDebouncedCallback as ne } from "use-debounce";
|
|
18
19
|
import C from "short-unique-id";
|
|
19
20
|
// src/Kit/DataEntry/TreeSelect/renders.tsx
|
|
20
|
-
var w = (e, t, n) => e === "onDuplicate" ? typeof t == "string" && n.has(t) : !!e,
|
|
21
|
-
let
|
|
22
|
-
description:
|
|
23
|
-
descriptionPrefix: w(a,
|
|
24
|
-
},
|
|
25
|
-
return
|
|
26
|
-
type: T(
|
|
27
|
-
disabled:
|
|
21
|
+
var w = (e, t, n) => e === "onDuplicate" ? typeof t == "string" && n.has(t) : !!e, re = (e, t, n, r, i, a, o) => {
|
|
22
|
+
let s = i.get(e.value), c = s?.ancestorTitles ?? [], d = {
|
|
23
|
+
description: s?.node.title ?? e?.label,
|
|
24
|
+
descriptionPrefix: w(a, s?.node.title, o) && c.length > 0 ? `${c.join(" > ")} > ` : void 0
|
|
25
|
+
}, f = t || !!s?.node.disabled, m = e.closable && !r;
|
|
26
|
+
return p(u, {
|
|
27
|
+
type: T(f, n),
|
|
28
|
+
disabled: f,
|
|
28
29
|
onClose: m ? (t) => {
|
|
29
30
|
e.onClose(t);
|
|
30
31
|
} : void 0,
|
|
31
32
|
onMouseDown: (e) => {
|
|
32
33
|
e.preventDefault(), e.stopPropagation();
|
|
33
34
|
},
|
|
34
|
-
children:
|
|
35
|
-
disabled:
|
|
36
|
-
description:
|
|
37
|
-
descriptionPrefix:
|
|
35
|
+
children: p(l, {
|
|
36
|
+
disabled: f,
|
|
37
|
+
description: d.description,
|
|
38
|
+
descriptionPrefix: d.descriptionPrefix
|
|
38
39
|
})
|
|
39
40
|
});
|
|
40
|
-
}, T = (e, t) => e || t === "warning" ? "neutral" : t === "error" ? "error" : "secondary",
|
|
41
|
+
}, T = (e, t) => e || t === "warning" ? "neutral" : t === "error" ? "error" : "secondary", ie = (e, t) => p("div", {
|
|
41
42
|
className: "kit-select-dropdown-content",
|
|
42
43
|
children: t ? t(e) : e
|
|
43
44
|
}), E = (e) => {
|
|
@@ -48,19 +49,16 @@ var w = (e, t, n) => e === "onDuplicate" ? typeof t == "string" && n.has(t) : !!
|
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
// src/Kit/DataEntry/TreeSelect/useIcons.tsx
|
|
51
|
-
function
|
|
52
|
-
let { locale:
|
|
52
|
+
function ae({ allowClear: e = !0, loading: t = !1, suffix: n }) {
|
|
53
|
+
let { locale: i } = r(), a = e ? p(S, {
|
|
54
|
+
"aria-label": i.General?.clear,
|
|
55
|
+
icon: x
|
|
56
|
+
}) : null, o = n ?? p(S, { icon: b });
|
|
53
57
|
return {
|
|
54
|
-
clearIcon:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
_suffixIcon: t ? d(S, {
|
|
59
|
-
icon: b,
|
|
60
|
-
spin: !0
|
|
61
|
-
}) : d(S, { icon: y }),
|
|
62
|
-
selectedItemIcon: d(l, {
|
|
63
|
-
icon: d(S, { icon: v }),
|
|
58
|
+
clearIcon: a,
|
|
59
|
+
_suffixIcon: t ? c(o) : o,
|
|
60
|
+
selectedItemIcon: p(d, {
|
|
61
|
+
icon: p(S, { icon: y }),
|
|
64
62
|
on: !0
|
|
65
63
|
})
|
|
66
64
|
};
|
|
@@ -73,13 +71,13 @@ var D = (e, t = /* @__PURE__ */ new Map(), n = []) => (e?.forEach((e) => {
|
|
|
73
71
|
});
|
|
74
72
|
let r = typeof e.title == "string" ? [...n, e.title] : n;
|
|
75
73
|
D(e.children, t, r);
|
|
76
|
-
}), t), O = (e) => e.closable === !1 && !e.disabled, k = "kitFullPathLabel",
|
|
74
|
+
}), t), O = (e) => e.closable === !1 && !e.disabled, k = "kitFullPathLabel", oe = (e) => {
|
|
77
75
|
let t = /* @__PURE__ */ new Map(), n = (e) => e?.forEach((e) => {
|
|
78
76
|
typeof e.title == "string" && t.set(e.title, (t.get(e.title) ?? 0) + 1), n(e.children);
|
|
79
77
|
});
|
|
80
78
|
return n(e), new Set([...t].filter(([, e]) => e > 1).map(([e]) => e));
|
|
81
79
|
}, A = (e, t, r, i = []) => e?.map((e) => {
|
|
82
|
-
let a = typeof e.title == "string" ? [...i, e.title] : i, o = w(t, e.title, r) && typeof e.title == "string" && i.length > 0 ?
|
|
80
|
+
let a = typeof e.title == "string" ? [...i, e.title] : i, o = w(t, e.title, r) && typeof e.title == "string" && i.length > 0 ? p(n.Path, {
|
|
83
81
|
separator: ">",
|
|
84
82
|
ancestorTitles: i,
|
|
85
83
|
children: e.title
|
|
@@ -90,48 +88,51 @@ var D = (e, t = /* @__PURE__ */ new Map(), n = []) => (e?.forEach((e) => {
|
|
|
90
88
|
[k]: o,
|
|
91
89
|
...O(e) ? { disabled: !0 } : {}
|
|
92
90
|
};
|
|
93
|
-
}),
|
|
91
|
+
}), se = (e, t, n, r, i) => {
|
|
94
92
|
let a = n?.includes("top");
|
|
95
|
-
return
|
|
93
|
+
return v(e, s["kit-select"], t, {
|
|
96
94
|
"ant-select-top": a,
|
|
97
95
|
"ant-select-bottom": !a,
|
|
98
96
|
"kit-select-readonly-light": r,
|
|
99
97
|
"kit-select-readonly": i
|
|
100
98
|
});
|
|
101
|
-
},
|
|
99
|
+
}, ce = (e, t, n, r, i) => {
|
|
102
100
|
let a = n?.includes("top");
|
|
103
|
-
return
|
|
101
|
+
return v(e, t, "kit-select-dropdown-content", {
|
|
104
102
|
"kit-select-dropdown-top": a,
|
|
105
103
|
"kit-select-dropdown-bottom": !a,
|
|
106
104
|
"kit-select-dropdown-focus": r,
|
|
107
105
|
"kit-select-dropdown-error": i === "error",
|
|
108
106
|
"kit-select-dropdown-warning": i === "warning"
|
|
109
107
|
});
|
|
110
|
-
},
|
|
108
|
+
}, le = new C({
|
|
111
109
|
length: 10,
|
|
112
110
|
dictionary: "alpha"
|
|
113
|
-
}), j =
|
|
114
|
-
let { appId: z } = t(), { locale: B } = r(), [V, H] =
|
|
111
|
+
}), j = m(({ id: n, treeData: s, htmlFor: c, label: l, extra: u, actions: d, helper: m, open: y, disabled: b, status: x, className: C, placement: w, readonlyLight: T = !1, readonly: O = !1, wrapperClassName: j, popupClassName: ue, required: M, allowClear: de, loading: N, suffixIcon: fe, suffix: pe, multiple: P, placeholder: me, getPopupContainer: he, dropdownRender: ge, popupRender: _e, onFocus: F, onBlur: I, onClick: ve, onClear: ye, onSearch: be, onSelect: xe, size: Se = "large", showFullPath: L = !1, treeNodeFilterProp: Ce = "title", treeNodeLabelProp: we = k, ...R }, Te) => {
|
|
112
|
+
let { appId: z } = t(), { locale: B } = r(), [V, H] = _(!1), [U, W] = _(!1), G = n ?? c ?? le.rnd(), Ee = g(null), K = g(!1), q = g("");
|
|
115
113
|
i("TreeSelect", {
|
|
116
|
-
htmlFor:
|
|
117
|
-
label:
|
|
118
|
-
extra:
|
|
119
|
-
actions:
|
|
120
|
-
helper:
|
|
114
|
+
htmlFor: c,
|
|
115
|
+
label: l,
|
|
116
|
+
extra: u,
|
|
117
|
+
actions: d,
|
|
118
|
+
helper: m,
|
|
121
119
|
className: j,
|
|
122
120
|
...R
|
|
123
121
|
});
|
|
124
|
-
let J =
|
|
125
|
-
allowClear:
|
|
126
|
-
loading: N
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
let J = Te ?? Ee, De = a(J, he), { clearIcon: Y, _suffixIcon: Oe } = ae({
|
|
123
|
+
allowClear: de,
|
|
124
|
+
loading: N,
|
|
125
|
+
suffix: pe ?? fe
|
|
126
|
+
});
|
|
127
|
+
o(N, () => J?.current?.nativeElement);
|
|
128
|
+
let ke = h(() => D(s), [s]), X = h(() => L === "onDuplicate" ? oe(s) : /* @__PURE__ */ new Set(), [s, L]), Ae = h(() => A(s, L, X), [
|
|
129
|
+
s,
|
|
129
130
|
L,
|
|
130
131
|
X
|
|
131
|
-
]), Z =
|
|
132
|
+
]), Z = ne(() => {
|
|
132
133
|
E(G);
|
|
133
134
|
}, 15);
|
|
134
|
-
|
|
135
|
+
ee(() => (V && (requestAnimationFrame(() => {
|
|
135
136
|
E(G);
|
|
136
137
|
}), document.addEventListener("scroll", Z)), () => {
|
|
137
138
|
document.removeEventListener("scroll", Z);
|
|
@@ -140,7 +141,7 @@ var D = (e, t = /* @__PURE__ */ new Map(), n = []) => (e?.forEach((e) => {
|
|
|
140
141
|
V,
|
|
141
142
|
G
|
|
142
143
|
]);
|
|
143
|
-
let
|
|
144
|
+
let je = (e) => {
|
|
144
145
|
var t;
|
|
145
146
|
(t = J?.current) == null || t.focus(), U || W(!0);
|
|
146
147
|
let n = e.target;
|
|
@@ -148,43 +149,43 @@ var D = (e, t = /* @__PURE__ */ new Map(), n = []) => (e?.forEach((e) => {
|
|
|
148
149
|
let e = q.current.length > 0;
|
|
149
150
|
n.closest(".ant-select-clear") || !e && (!P && V || P && V && n.closest(".ant-select")) ? H(!1) : H(!0);
|
|
150
151
|
}
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
q.current = e,
|
|
154
|
-
},
|
|
155
|
-
P || H(!1),
|
|
156
|
-
},
|
|
157
|
-
H(!1),
|
|
158
|
-
}, Ne = (e) => {
|
|
159
|
-
K.current || (H(!1), W(!1), F?.(e)), K.current = !1;
|
|
152
|
+
ve?.(e);
|
|
153
|
+
}, Q = (e) => {
|
|
154
|
+
q.current = e, be?.(e);
|
|
155
|
+
}, Me = (...e) => {
|
|
156
|
+
P || H(!1), xe?.(...e);
|
|
157
|
+
}, Ne = () => {
|
|
158
|
+
H(!1), ye?.();
|
|
160
159
|
}, Pe = (e) => {
|
|
161
|
-
W(!
|
|
160
|
+
K.current || (H(!1), W(!1), I?.(e)), K.current = !1;
|
|
161
|
+
}, Fe = (e) => {
|
|
162
|
+
W(!0), F?.(e);
|
|
162
163
|
}, $ = typeof R.classNames == "function" ? void 0 : R.classNames;
|
|
163
|
-
return
|
|
164
|
-
label:
|
|
165
|
-
extra:
|
|
166
|
-
helper:
|
|
167
|
-
htmlFor:
|
|
164
|
+
return p(e, {
|
|
165
|
+
label: l,
|
|
166
|
+
extra: u ?? d,
|
|
167
|
+
helper: m,
|
|
168
|
+
htmlFor: c,
|
|
168
169
|
disabled: b,
|
|
169
170
|
status: x,
|
|
170
171
|
className: j,
|
|
171
172
|
required: M,
|
|
172
|
-
children:
|
|
173
|
+
children: p(f, {
|
|
173
174
|
...R,
|
|
174
175
|
virtual: !1,
|
|
175
|
-
size:
|
|
176
|
+
size: Se,
|
|
176
177
|
ref: J,
|
|
177
|
-
switcherIcon: (e) =>
|
|
178
|
+
switcherIcon: (e) => p("span", {
|
|
178
179
|
role: "img",
|
|
179
180
|
"aria-label": e.expanded ? B.General?.close : B.General?.open,
|
|
180
|
-
children:
|
|
181
|
-
icon:
|
|
181
|
+
children: p(S, {
|
|
182
|
+
icon: te,
|
|
182
183
|
rotation: e.expanded ? 90 : void 0
|
|
183
184
|
})
|
|
184
185
|
}),
|
|
185
|
-
getPopupContainer:
|
|
186
|
+
getPopupContainer: De,
|
|
186
187
|
id: G,
|
|
187
|
-
suffix:
|
|
188
|
+
suffix: Oe,
|
|
188
189
|
allowClear: Y ? {
|
|
189
190
|
clearIcon: Y,
|
|
190
191
|
label: B.General?.clear
|
|
@@ -193,32 +194,33 @@ var D = (e, t = /* @__PURE__ */ new Map(), n = []) => (e?.forEach((e) => {
|
|
|
193
194
|
loading: N,
|
|
194
195
|
"aria-required": R["aria-required"] ?? M,
|
|
195
196
|
"aria-disabled": b,
|
|
196
|
-
|
|
197
|
+
"aria-busy": N || void 0,
|
|
198
|
+
className: v(se(z, C, w, T, O), { "kit-select-loading": N }),
|
|
197
199
|
classNames: {
|
|
198
200
|
...$,
|
|
199
201
|
popup: {
|
|
200
202
|
...$?.popup,
|
|
201
|
-
root:
|
|
203
|
+
root: v($?.popup?.root, ce(z, ue, w, U, x))
|
|
202
204
|
}
|
|
203
205
|
},
|
|
204
206
|
placement: w,
|
|
205
|
-
treeNodeFilterProp:
|
|
206
|
-
treeNodeLabelProp:
|
|
207
|
+
treeNodeFilterProp: Ce,
|
|
208
|
+
treeNodeLabelProp: we,
|
|
207
209
|
multiple: P,
|
|
208
210
|
treeCheckable: P,
|
|
209
211
|
disabled: b || T || O,
|
|
210
212
|
variant: T ? "borderless" : void 0,
|
|
211
213
|
open: y === void 0 ? V : y,
|
|
212
|
-
popupRender: (e) =>
|
|
213
|
-
tagRender: (e) =>
|
|
214
|
-
placeholder: !T && !O ?
|
|
215
|
-
treeData:
|
|
216
|
-
onFocus:
|
|
217
|
-
onBlur:
|
|
218
|
-
onClear:
|
|
219
|
-
onClick:
|
|
220
|
-
onSearch:
|
|
221
|
-
onSelect:
|
|
214
|
+
popupRender: (e) => ie(e, _e ?? ge),
|
|
215
|
+
tagRender: (e) => re(e, b, x, T || O, ke, L, X),
|
|
216
|
+
placeholder: !T && !O ? me : void 0,
|
|
217
|
+
treeData: Ae,
|
|
218
|
+
onFocus: Fe,
|
|
219
|
+
onBlur: Pe,
|
|
220
|
+
onClear: Ne,
|
|
221
|
+
onClick: je,
|
|
222
|
+
onSearch: Q,
|
|
223
|
+
onSelect: Me
|
|
222
224
|
})
|
|
223
225
|
});
|
|
224
226
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Button.
|
|
1
|
+
import { t as e } from "./Button.Cf2t8x-g.js";
|
|
2
2
|
import { t } from "./Typography.dSdY4EZz.js";
|
|
3
3
|
import { n } from "./useKitTheme.P5Q2DIyI.js";
|
|
4
4
|
import { n as r } from "./useKitLocale.Y5XHnnYS.js";
|
|
@@ -6,7 +6,7 @@ import { KitTooltip as i } from "../Kit/DataDisplay/Tooltip/index.js";
|
|
|
6
6
|
import { t as a } from "./Progress.DGZSgm84.js";
|
|
7
7
|
import { t as o } from "./getBase64.o9rtRKzl.js";
|
|
8
8
|
import { t as s } from "./Avatar.CHhPAXNx.js";
|
|
9
|
-
import { t as c } from "./ItemList.
|
|
9
|
+
import { t as c } from "./ItemList.ZRUcXI2B.js";
|
|
10
10
|
import { Upload as l } from "antd";
|
|
11
11
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
12
|
import { forwardRef as p, useEffect as m, useState as h } from "react";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/assets/icons/loader/faKitLoader.ts
|
|
2
|
+
var e = {
|
|
3
|
+
prefix: "fas",
|
|
4
|
+
iconName: "loader",
|
|
5
|
+
icon: [
|
|
6
|
+
512,
|
|
7
|
+
512,
|
|
8
|
+
[],
|
|
9
|
+
"",
|
|
10
|
+
"M288 128L288 64A32 32 0 0 0 224 64L224 128A32 32 0 0 0 288 128ZM369.1 188.1L414.4 142.9A32 32 0 0 0 369.1 97.6L323.9 142.9A32 32 0 0 0 369.1 188.1ZM384 288L448 288A32 32 0 0 0 448 224L384 224A32 32 0 0 0 384 288ZM323.9 369.1L369.1 414.4A32 32 0 0 0 414.4 369.1L369.1 323.9A32 32 0 0 0 323.9 369.1ZM224 384L224 448A32 32 0 0 0 288 448L288 384A32 32 0 0 0 224 384ZM142.9 323.9L97.6 369.1A32 32 0 0 0 142.9 414.4L188.1 369.1A32 32 0 0 0 142.9 323.9ZM128 224L64 224A32 32 0 0 0 64 288L128 288A32 32 0 0 0 128 224ZM188.1 142.9L142.9 97.6A32 32 0 0 0 97.6 142.9L142.9 188.1A32 32 0 0 0 188.1 142.9Z"
|
|
11
|
+
]
|
|
12
|
+
};
|
|
13
|
+
export { e as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useLayoutEffect as e } from "react";
|
|
2
|
+
// src/utils/hooks/useLoadingWidthLock.ts
|
|
3
|
+
var t = "data-kit-loading-reserve", n = (n, r) => {
|
|
4
|
+
e(() => {
|
|
5
|
+
let e = n ? r() : null;
|
|
6
|
+
if (!e) return;
|
|
7
|
+
let i = e.style.width;
|
|
8
|
+
return e.style.width = `${e.getBoundingClientRect().width}px`, e.setAttribute(t, "true"), () => {
|
|
9
|
+
e.style.width = i, e.removeAttribute(t);
|
|
10
|
+
};
|
|
11
|
+
}, [n]);
|
|
12
|
+
};
|
|
13
|
+
export { n as t };
|