@stella-source/stellasource-dsl 3.5.2 → 4.0.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/dist/cjs/index.js +920 -532
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/CheckBox/CheckBox.d.ts +4 -0
- package/dist/cjs/types/components/CheckBox/CheckBox.stories.d.ts +30 -0
- package/dist/cjs/types/components/CheckBox/styles.d.ts +20 -0
- package/dist/cjs/types/components/CheckBox/types.d.ts +19 -0
- package/dist/cjs/types/components/CheckBoxGroup/CheckBoxGroup.d.ts +4 -0
- package/dist/cjs/types/components/CheckBoxGroup/CheckBoxGroup.stories.d.ts +63 -0
- package/dist/cjs/types/components/CheckBoxGroup/styles.d.ts +4 -0
- package/dist/cjs/types/components/CheckBoxGroup/types.d.ts +28 -0
- package/dist/cjs/types/components/Label/Label.d.ts +1 -1
- package/dist/cjs/types/components/Label/Label.stories.d.ts +1 -1
- package/dist/cjs/types/components/Label/styles.d.ts +2 -1
- package/dist/cjs/types/components/Label/types.d.ts +2 -0
- package/dist/cjs/types/components/StellaIcon/types.d.ts +1 -1
- package/dist/cjs/types/components/Sync/styles.d.ts +1 -1
- package/dist/cjs/types/components/Table/Table.d.ts +1 -1
- package/dist/cjs/types/components/Table/TableComponents/CheckboxDropdownMenu.d.ts +26 -0
- package/dist/cjs/types/components/Table/styles.d.ts +3 -1
- package/dist/cjs/types/components/Table/types.d.ts +9 -3
- package/dist/cjs/types/components/Table/useTableState.d.ts +9 -0
- package/dist/cjs/types/index.d.ts +3 -1
- package/dist/esm/index.esm.js +1276 -890
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/types/components/CheckBox/CheckBox.d.ts +4 -0
- package/dist/esm/types/components/CheckBox/CheckBox.stories.d.ts +30 -0
- package/dist/esm/types/components/CheckBox/styles.d.ts +20 -0
- package/dist/esm/types/components/CheckBox/types.d.ts +19 -0
- package/dist/esm/types/components/CheckBoxGroup/CheckBoxGroup.d.ts +4 -0
- package/dist/esm/types/components/CheckBoxGroup/CheckBoxGroup.stories.d.ts +63 -0
- package/dist/esm/types/components/CheckBoxGroup/styles.d.ts +4 -0
- package/dist/esm/types/components/CheckBoxGroup/types.d.ts +28 -0
- package/dist/esm/types/components/Label/Label.d.ts +1 -1
- package/dist/esm/types/components/Label/Label.stories.d.ts +1 -1
- package/dist/esm/types/components/Label/styles.d.ts +2 -1
- package/dist/esm/types/components/Label/types.d.ts +2 -0
- package/dist/esm/types/components/StellaIcon/types.d.ts +1 -1
- package/dist/esm/types/components/Sync/styles.d.ts +1 -1
- package/dist/esm/types/components/Table/Table.d.ts +1 -1
- package/dist/esm/types/components/Table/TableComponents/CheckboxDropdownMenu.d.ts +26 -0
- package/dist/esm/types/components/Table/styles.d.ts +3 -1
- package/dist/esm/types/components/Table/types.d.ts +9 -3
- package/dist/esm/types/components/Table/useTableState.d.ts +9 -0
- package/dist/esm/types/index.d.ts +3 -1
- package/dist/index.d.ts +64 -6
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var a$
|
|
3
|
+
var a$n = require('react');
|
|
4
4
|
var styled = require('styled-components');
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ function _interopNamespaceDefault(e) {
|
|
|
21
21
|
return Object.freeze(n);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
var a__namespace = /*#__PURE__*/_interopNamespaceDefault(a$
|
|
24
|
+
var a__namespace = /*#__PURE__*/_interopNamespaceDefault(a$n);
|
|
25
25
|
|
|
26
26
|
const colorTokens = {
|
|
27
27
|
white: "var(--white)",
|
|
@@ -127,7 +127,7 @@ const Styles = {
|
|
|
127
127
|
font: fontTokens,
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
const a$
|
|
130
|
+
const a$m = /* @__PURE__ */ new Map([
|
|
131
131
|
[
|
|
132
132
|
"bold",
|
|
133
133
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm40.49-100.49a12,12,0,0,1-17,17L140,117v51a12,12,0,0,1-24,0V117l-11.51,11.52a12,12,0,0,1-17-17l32-32a12,12,0,0,1,17,0Z" }))
|
|
@@ -154,7 +154,7 @@ const a$l = /* @__PURE__ */ new Map([
|
|
|
154
154
|
]
|
|
155
155
|
]);
|
|
156
156
|
|
|
157
|
-
const a$
|
|
157
|
+
const a$l = /* @__PURE__ */ new Map([
|
|
158
158
|
[
|
|
159
159
|
"bold",
|
|
160
160
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z" }))
|
|
@@ -181,7 +181,7 @@ const a$k = /* @__PURE__ */ new Map([
|
|
|
181
181
|
]
|
|
182
182
|
]);
|
|
183
183
|
|
|
184
|
-
const e$
|
|
184
|
+
const e$H = /* @__PURE__ */ new Map([
|
|
185
185
|
[
|
|
186
186
|
"bold",
|
|
187
187
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z" }))
|
|
@@ -208,7 +208,7 @@ const e$G = /* @__PURE__ */ new Map([
|
|
|
208
208
|
]
|
|
209
209
|
]);
|
|
210
210
|
|
|
211
|
-
const e$
|
|
211
|
+
const e$G = /* @__PURE__ */ new Map([
|
|
212
212
|
[
|
|
213
213
|
"bold",
|
|
214
214
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M140,104V64a12,12,0,0,1,24,0V75l35.51-35.52a12,12,0,0,1,17,17L181,92h11a12,12,0,0,1,0,24H152A12,12,0,0,1,140,104Zm-36,36H64a12,12,0,0,0,0,24H75L39.51,199.51a12,12,0,0,0,17,17L92,181v11a12,12,0,0,0,24,0V152A12,12,0,0,0,104,140Zm77,24h11a12,12,0,0,0,0-24H152a12,12,0,0,0-12,12v40a12,12,0,0,0,24,0V181l35.51,35.52a12,12,0,0,0,17-17ZM104,52A12,12,0,0,0,92,64V75L56.49,39.51a12,12,0,0,0-17,17L75,92H64a12,12,0,0,0,0,24h40a12,12,0,0,0,12-12V64A12,12,0,0,0,104,52Z" }))
|
|
@@ -241,7 +241,7 @@ const e$F = /* @__PURE__ */ new Map([
|
|
|
241
241
|
]
|
|
242
242
|
]);
|
|
243
243
|
|
|
244
|
-
const e$
|
|
244
|
+
const e$F = /* @__PURE__ */ new Map([
|
|
245
245
|
[
|
|
246
246
|
"bold",
|
|
247
247
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM104.49,56.48,116,45V88a12,12,0,0,0,24,0V45l11.51,11.51a12,12,0,0,0,17-17l-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17Zm47,143L140,211V168a12,12,0,0,0-24,0v43l-11.51-11.52a12,12,0,0,0-17,17l32,32a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Z" }))
|
|
@@ -274,7 +274,7 @@ const e$E = /* @__PURE__ */ new Map([
|
|
|
274
274
|
]
|
|
275
275
|
]);
|
|
276
276
|
|
|
277
|
-
const e$
|
|
277
|
+
const e$E = /* @__PURE__ */ new Map([
|
|
278
278
|
[
|
|
279
279
|
"bold",
|
|
280
280
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M218.29,182.17a12,12,0,0,1-16.47,4.12L140,149.19V216a12,12,0,0,1-24,0V149.19l-61.82,37.1a12,12,0,1,1-12.35-20.58L104.68,128,41.83,90.29A12,12,0,1,1,54.18,69.71L116,106.81V40a12,12,0,0,1,24,0v66.81l61.82-37.1a12,12,0,1,1,12.35,20.58L151.32,128l62.85,37.71A12,12,0,0,1,218.29,182.17Z" }))
|
|
@@ -301,7 +301,7 @@ const e$D = /* @__PURE__ */ new Map([
|
|
|
301
301
|
]
|
|
302
302
|
]);
|
|
303
303
|
|
|
304
|
-
const e$
|
|
304
|
+
const e$D = /* @__PURE__ */ new Map([
|
|
305
305
|
[
|
|
306
306
|
"bold",
|
|
307
307
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M24,108H44v48H32a12,12,0,0,0,0,24H224a12,12,0,0,0,0-24H212V108h20a12,12,0,0,0,6.29-22.22l-104-64a12,12,0,0,0-12.58,0l-104,64A12,12,0,0,0,24,108Zm44,0H92v48H68Zm72,0v48H116V108Zm48,48H164V108h24ZM128,46.09,189.6,84H66.4ZM252,208a12,12,0,0,1-12,12H16a12,12,0,0,1,0-24H240A12,12,0,0,1,252,208Z" }))
|
|
@@ -328,7 +328,7 @@ const e$C = /* @__PURE__ */ new Map([
|
|
|
328
328
|
]
|
|
329
329
|
]);
|
|
330
330
|
|
|
331
|
-
const e$
|
|
331
|
+
const e$C = /* @__PURE__ */ new Map([
|
|
332
332
|
[
|
|
333
333
|
"bold",
|
|
334
334
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Zm77.39,12.7A83.94,83.94,0,0,1,190.61,184a12,12,0,0,1-17.89-16,59.92,59.92,0,0,0,0-80,12,12,0,0,1,17.89-16,84.07,84.07,0,0,1,14.78,88.7ZM83.28,168a12,12,0,0,1-17.89,16,83.94,83.94,0,0,1,0-112A12,12,0,0,1,83.28,88a59.92,59.92,0,0,0,0,80ZM252,128a123.63,123.63,0,0,1-35.43,86.78A12,12,0,1,1,199.43,198a99.88,99.88,0,0,0,0-140,12,12,0,0,1,17.14-16.8A123.63,123.63,0,0,1,252,128ZM56.57,198a12,12,0,0,1-17.14,16.8,123.89,123.89,0,0,1,0-173.56A12,12,0,0,1,56.57,58a99.88,99.88,0,0,0,0,140Z" }))
|
|
@@ -355,7 +355,7 @@ const e$B = /* @__PURE__ */ new Map([
|
|
|
355
355
|
]
|
|
356
356
|
]);
|
|
357
357
|
|
|
358
|
-
const e$
|
|
358
|
+
const e$B = /* @__PURE__ */ new Map([
|
|
359
359
|
[
|
|
360
360
|
"bold",
|
|
361
361
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M200,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V40A20,20,0,0,0,200,20Zm-4,192H60V44H196ZM80,76A12,12,0,0,1,92,64h72a12,12,0,0,1,0,24H92A12,12,0,0,1,80,76Zm40,52a16,16,0,1,1-16-16A16,16,0,0,1,120,128Zm48,0a16,16,0,1,1-16-16A16,16,0,0,1,168,128Zm-48,48a16,16,0,1,1-16-16A16,16,0,0,1,120,176Zm48,0a16,16,0,1,1-16-16A16,16,0,0,1,168,176Z" }))
|
|
@@ -382,7 +382,7 @@ const e$A = /* @__PURE__ */ new Map([
|
|
|
382
382
|
]
|
|
383
383
|
]);
|
|
384
384
|
|
|
385
|
-
const e$
|
|
385
|
+
const e$A = /* @__PURE__ */ new Map([
|
|
386
386
|
[
|
|
387
387
|
"bold",
|
|
388
388
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Z" }))
|
|
@@ -442,7 +442,7 @@ const t$6 = /* @__PURE__ */ new Map([
|
|
|
442
442
|
]
|
|
443
443
|
]);
|
|
444
444
|
|
|
445
|
-
const a$
|
|
445
|
+
const a$k = /* @__PURE__ */ new Map([
|
|
446
446
|
[
|
|
447
447
|
"bold",
|
|
448
448
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z" }))
|
|
@@ -496,7 +496,7 @@ const t$5 = /* @__PURE__ */ new Map([
|
|
|
496
496
|
]
|
|
497
497
|
]);
|
|
498
498
|
|
|
499
|
-
const e$
|
|
499
|
+
const e$z = /* @__PURE__ */ new Map([
|
|
500
500
|
[
|
|
501
501
|
"bold",
|
|
502
502
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,92H188V56a12,12,0,0,0-12-12H60V40a12,12,0,0,0-24,0V216a12,12,0,0,0,24,0v-4h84a12,12,0,0,0,12-12V164h68a12,12,0,0,0,12-12V104A12,12,0,0,0,224,92ZM164,68V92H60V68ZM132,188H60V164h72Zm80-48H60V116H212Z" }))
|
|
@@ -523,7 +523,7 @@ const e$y = /* @__PURE__ */ new Map([
|
|
|
523
523
|
]
|
|
524
524
|
]);
|
|
525
525
|
|
|
526
|
-
const a$
|
|
526
|
+
const a$j = /* @__PURE__ */ new Map([
|
|
527
527
|
[
|
|
528
528
|
"bold",
|
|
529
529
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z" }))
|
|
@@ -583,7 +583,7 @@ const l$6 = /* @__PURE__ */ new Map([
|
|
|
583
583
|
]
|
|
584
584
|
]);
|
|
585
585
|
|
|
586
|
-
const e$
|
|
586
|
+
const e$y = /* @__PURE__ */ new Map([
|
|
587
587
|
[
|
|
588
588
|
"bold",
|
|
589
589
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M79.51,144.49a12,12,0,1,1,17-17L112,143l47.51-47.52a12,12,0,0,1,17,17l-56,56a12,12,0,0,1-17,0ZM228,48V208a20,20,0,0,1-20,20H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28H208A20,20,0,0,1,228,48Zm-24,4H52V204H204Z" }))
|
|
@@ -616,7 +616,7 @@ const e$x = /* @__PURE__ */ new Map([
|
|
|
616
616
|
]
|
|
617
617
|
]);
|
|
618
618
|
|
|
619
|
-
const a$
|
|
619
|
+
const a$i = /* @__PURE__ */ new Map([
|
|
620
620
|
[
|
|
621
621
|
"bold",
|
|
622
622
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm12,24.87a83.53,83.53,0,0,1,24,7.25V203.88a83.53,83.53,0,0,1-24,7.25ZM44,128a84.12,84.12,0,0,1,72-83.13V211.13A84.12,84.12,0,0,1,44,128Zm144,58.71V69.29a83.81,83.81,0,0,1,0,117.42Z" }))
|
|
@@ -649,7 +649,7 @@ const a$h = /* @__PURE__ */ new Map([
|
|
|
649
649
|
]
|
|
650
650
|
]);
|
|
651
651
|
|
|
652
|
-
const e$
|
|
652
|
+
const e$x = /* @__PURE__ */ new Map([
|
|
653
653
|
[
|
|
654
654
|
"bold",
|
|
655
655
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm44-64a32,32,0,0,1-32,32v4a12,12,0,0,1-24,0v-4H104a12,12,0,0,1,0-24h36a8,8,0,0,0,0-16H116a32,32,0,0,1,0-64V72a12,12,0,0,1,24,0v4h12a12,12,0,0,1,0,24H116a8,8,0,0,0,0,16h24A32,32,0,0,1,172,148Z" }))
|
|
@@ -676,7 +676,7 @@ const e$w = /* @__PURE__ */ new Map([
|
|
|
676
676
|
]
|
|
677
677
|
]);
|
|
678
678
|
|
|
679
|
-
const e$
|
|
679
|
+
const e$w = /* @__PURE__ */ new Map([
|
|
680
680
|
[
|
|
681
681
|
"bold",
|
|
682
682
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M238.16,113.89,142.1,17.83a20,20,0,0,0-28.21,0l-96,96.06a20,20,0,0,0,0,28.22l96.05,96.06h0a20,20,0,0,0,28.21,0l96-96.06a20,20,0,0,0,0-28.22ZM128,218.33,37.68,128,128,37.67,218.32,128Z" }))
|
|
@@ -709,7 +709,7 @@ const e$v = /* @__PURE__ */ new Map([
|
|
|
709
709
|
]
|
|
710
710
|
]);
|
|
711
711
|
|
|
712
|
-
const e$
|
|
712
|
+
const e$v = /* @__PURE__ */ new Map([
|
|
713
713
|
[
|
|
714
714
|
"bold",
|
|
715
715
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M128,96a32,32,0,1,0,32,32A32,32,0,0,0,128,96Zm0,40a8,8,0,1,1,8-8A8,8,0,0,1,128,136Zm0-56A32,32,0,1,0,96,48,32,32,0,0,0,128,80Zm0-40a8,8,0,1,1-8,8A8,8,0,0,1,128,40Zm0,136a32,32,0,1,0,32,32A32,32,0,0,0,128,176Zm0,40a8,8,0,1,1,8-8A8,8,0,0,1,128,216Z" }))
|
|
@@ -742,7 +742,7 @@ const e$u = /* @__PURE__ */ new Map([
|
|
|
742
742
|
]
|
|
743
743
|
]);
|
|
744
744
|
|
|
745
|
-
const a$
|
|
745
|
+
const a$h = /* @__PURE__ */ new Map([
|
|
746
746
|
[
|
|
747
747
|
"bold",
|
|
748
748
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M203.63,62.65l13.25-14.58a12,12,0,0,0-17.76-16.14L185.88,46.49A100,100,0,0,0,52.37,193.35L39.12,207.93a12,12,0,1,0,17.76,16.14l13.24-14.56A100,100,0,0,0,203.63,62.65ZM52,128A75.94,75.94,0,0,1,169.58,64.43l-100.91,111A75.6,75.6,0,0,1,52,128Zm76,76a75.52,75.52,0,0,1-41.58-12.43l100.91-111A75.94,75.94,0,0,1,128,204Z" }))
|
|
@@ -769,7 +769,7 @@ const a$g = /* @__PURE__ */ new Map([
|
|
|
769
769
|
]
|
|
770
770
|
]);
|
|
771
771
|
|
|
772
|
-
const a$
|
|
772
|
+
const a$g = /* @__PURE__ */ new Map([
|
|
773
773
|
[
|
|
774
774
|
"bold",
|
|
775
775
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z" }))
|
|
@@ -802,7 +802,7 @@ const a$f = /* @__PURE__ */ new Map([
|
|
|
802
802
|
]
|
|
803
803
|
]);
|
|
804
804
|
|
|
805
|
-
const e$
|
|
805
|
+
const e$u = /* @__PURE__ */ new Map([
|
|
806
806
|
[
|
|
807
807
|
"bold",
|
|
808
808
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M56.88,31.93A12,12,0,1,0,39.12,48.07l16,17.65C20.67,88.66,5.72,121.58,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212a131.34,131.34,0,0,0,51-10l20.09,22.1a12,12,0,0,0,17.76-16.14ZM128,188c-29.59,0-55.47-10.73-76.91-31.88A130.69,130.69,0,0,1,29.52,128c5.27-9.31,18.79-29.9,42-44.29l90.09,99.11A109.33,109.33,0,0,1,128,188Zm123-55.12c-.36.81-9,20-28,39.16a12,12,0,1,1-17-16.9A130.48,130.48,0,0,0,226.48,128a130.36,130.36,0,0,0-21.57-28.12C183.46,78.73,157.59,68,128,68c-3.35,0-6.7.14-10,.42a12,12,0,1,1-2-23.91c3.93-.34,8-.51,12-.51,36,0,68.63,13.67,94.49,39.52,19.35,19.35,28.11,38.8,28.48,39.61A12.08,12.08,0,0,1,251,132.88Z" }))
|
|
@@ -934,7 +934,7 @@ const l$3 = /* @__PURE__ */ new Map([
|
|
|
934
934
|
]
|
|
935
935
|
]);
|
|
936
936
|
|
|
937
|
-
const a$
|
|
937
|
+
const a$f = /* @__PURE__ */ new Map([
|
|
938
938
|
[
|
|
939
939
|
"bold",
|
|
940
940
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z" }))
|
|
@@ -961,7 +961,7 @@ const a$e = /* @__PURE__ */ new Map([
|
|
|
961
961
|
]
|
|
962
962
|
]);
|
|
963
963
|
|
|
964
|
-
const H = /* @__PURE__ */ new Map([
|
|
964
|
+
const H$1 = /* @__PURE__ */ new Map([
|
|
965
965
|
[
|
|
966
966
|
"bold",
|
|
967
967
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M28,132a12,12,0,0,1,0-24H56a4,4,0,0,0,0-8H40a28,28,0,0,1-3.38-55.79A12,12,0,0,1,59.3,44H64a12,12,0,0,1,0,24H40a4,4,0,0,0,0,8H56a28,28,0,0,1,3.38,55.79A12,12,0,0,1,36.7,132ZM236,56V192a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V164a12,12,0,0,1,24,0v24H156V164H88a12,12,0,0,1,0-24h68V116H112a12,12,0,0,1,0-24H212V68H104a12,12,0,0,1,0-24H224A12,12,0,0,1,236,56Zm-56,84h32V116H180Zm32,48V164H180v24Z" }))
|
|
@@ -988,7 +988,7 @@ const H = /* @__PURE__ */ new Map([
|
|
|
988
988
|
]
|
|
989
989
|
]);
|
|
990
990
|
|
|
991
|
-
const a$
|
|
991
|
+
const a$e = /* @__PURE__ */ new Map([
|
|
992
992
|
[
|
|
993
993
|
"bold",
|
|
994
994
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm0-144a44,44,0,0,0-33.61,72.41l-9.86,32.06A12,12,0,0,0,96,188h64a12,12,0,0,0,11.47-15.53l-9.86-32.06A44,44,0,0,0,128,68Zm8.53,72.51L143.75,164h-31.5l7.22-23.49a12,12,0,0,0-4-12.89,20,20,0,1,1,25,0A12,12,0,0,0,136.53,140.51Z" }))
|
|
@@ -1048,7 +1048,7 @@ const l$2 = /* @__PURE__ */ new Map([
|
|
|
1048
1048
|
]
|
|
1049
1049
|
]);
|
|
1050
1050
|
|
|
1051
|
-
const e$
|
|
1051
|
+
const e$t = /* @__PURE__ */ new Map([
|
|
1052
1052
|
[
|
|
1053
1053
|
"bold",
|
|
1054
1054
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,76H100V56a28,28,0,0,1,28-28c13.51,0,25.65,9.62,28.24,22.39a12,12,0,1,0,23.52-4.78C174.87,21.5,153.1,4,128,4A52.06,52.06,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76Zm-4,128H52V100H204Z" }))
|
|
@@ -1081,7 +1081,7 @@ const e$s = /* @__PURE__ */ new Map([
|
|
|
1081
1081
|
]
|
|
1082
1082
|
]);
|
|
1083
1083
|
|
|
1084
|
-
const a$
|
|
1084
|
+
const a$d = /* @__PURE__ */ new Map([
|
|
1085
1085
|
[
|
|
1086
1086
|
"bold",
|
|
1087
1087
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z" }))
|
|
@@ -1108,6 +1108,39 @@ const a$c = /* @__PURE__ */ new Map([
|
|
|
1108
1108
|
]
|
|
1109
1109
|
]);
|
|
1110
1110
|
|
|
1111
|
+
const e$s = /* @__PURE__ */ new Map([
|
|
1112
|
+
[
|
|
1113
|
+
"bold",
|
|
1114
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,176H52V52H204ZM76,128a12,12,0,0,1,12-12h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,128Z" }))
|
|
1115
|
+
],
|
|
1116
|
+
[
|
|
1117
|
+
"duotone",
|
|
1118
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement(
|
|
1119
|
+
"path",
|
|
1120
|
+
{
|
|
1121
|
+
d: "M216,48V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",
|
|
1122
|
+
opacity: "0.2"
|
|
1123
|
+
}
|
|
1124
|
+
), /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Zm-32-80a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,128Z" }))
|
|
1125
|
+
],
|
|
1126
|
+
[
|
|
1127
|
+
"fill",
|
|
1128
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM168,136H88a8,8,0,0,1,0-16h80a8,8,0,0,1,0,16Z" }))
|
|
1129
|
+
],
|
|
1130
|
+
[
|
|
1131
|
+
"light",
|
|
1132
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34Zm2,174a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-36-80a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h80A6,6,0,0,1,174,128Z" }))
|
|
1133
|
+
],
|
|
1134
|
+
[
|
|
1135
|
+
"regular",
|
|
1136
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Zm-32-80a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,128Z" }))
|
|
1137
|
+
],
|
|
1138
|
+
[
|
|
1139
|
+
"thin",
|
|
1140
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36Zm4,172a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40-80a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h80A4,4,0,0,1,172,128Z" }))
|
|
1141
|
+
]
|
|
1142
|
+
]);
|
|
1143
|
+
|
|
1111
1144
|
const e$r = /* @__PURE__ */ new Map([
|
|
1112
1145
|
[
|
|
1113
1146
|
"bold",
|
|
@@ -1234,7 +1267,7 @@ const e$o = /* @__PURE__ */ new Map([
|
|
|
1234
1267
|
]
|
|
1235
1268
|
]);
|
|
1236
1269
|
|
|
1237
|
-
const a$
|
|
1270
|
+
const a$c = /* @__PURE__ */ new Map([
|
|
1238
1271
|
[
|
|
1239
1272
|
"bold",
|
|
1240
1273
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z" }))
|
|
@@ -1267,7 +1300,7 @@ const a$b = /* @__PURE__ */ new Map([
|
|
|
1267
1300
|
]
|
|
1268
1301
|
]);
|
|
1269
1302
|
|
|
1270
|
-
const a$
|
|
1303
|
+
const a$b = /* @__PURE__ */ new Map([
|
|
1271
1304
|
[
|
|
1272
1305
|
"bold",
|
|
1273
1306
|
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M144,180a16,16,0,1,1-16-16A16,16,0,0,1,144,180Zm92-52A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128ZM128,64c-24.26,0-44,17.94-44,40v4a12,12,0,0,0,24,0v-4c0-8.82,9-16,20-16s20,7.18,20,16-9,16-20,16a12,12,0,0,0-12,12v8a12,12,0,0,0,23.73,2.56C158.31,137.88,172,122.37,172,104,172,81.94,152.26,64,128,64Z" }))
|
|
@@ -1420,6 +1453,39 @@ const e$k = /* @__PURE__ */ new Map([
|
|
|
1420
1453
|
]
|
|
1421
1454
|
]);
|
|
1422
1455
|
|
|
1456
|
+
const a$a = /* @__PURE__ */ new Map([
|
|
1457
|
+
[
|
|
1458
|
+
"bold",
|
|
1459
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,176H52V52H204Z" }))
|
|
1460
|
+
],
|
|
1461
|
+
[
|
|
1462
|
+
"duotone",
|
|
1463
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement(
|
|
1464
|
+
"path",
|
|
1465
|
+
{
|
|
1466
|
+
d: "M216,48V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",
|
|
1467
|
+
opacity: "0.2"
|
|
1468
|
+
}
|
|
1469
|
+
), /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Z" }))
|
|
1470
|
+
],
|
|
1471
|
+
[
|
|
1472
|
+
"fill",
|
|
1473
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z" }))
|
|
1474
|
+
],
|
|
1475
|
+
[
|
|
1476
|
+
"light",
|
|
1477
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34Zm2,174a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z" }))
|
|
1478
|
+
],
|
|
1479
|
+
[
|
|
1480
|
+
"regular",
|
|
1481
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Z" }))
|
|
1482
|
+
],
|
|
1483
|
+
[
|
|
1484
|
+
"thin",
|
|
1485
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36Zm4,172a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z" }))
|
|
1486
|
+
]
|
|
1487
|
+
]);
|
|
1488
|
+
|
|
1423
1489
|
const a$9 = /* @__PURE__ */ new Map([
|
|
1424
1490
|
[
|
|
1425
1491
|
"bold",
|
|
@@ -1507,6 +1573,33 @@ const e$j = /* @__PURE__ */ new Map([
|
|
|
1507
1573
|
]
|
|
1508
1574
|
]);
|
|
1509
1575
|
|
|
1576
|
+
const H = /* @__PURE__ */ new Map([
|
|
1577
|
+
[
|
|
1578
|
+
"bold",
|
|
1579
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM44,116H76v24H44Zm56,0H212v24H100ZM212,68V92H44V68ZM44,164H76v24H44Zm56,24V164H212v24Z" }))
|
|
1580
|
+
],
|
|
1581
|
+
[
|
|
1582
|
+
"duotone",
|
|
1583
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M88,104v96H32V104Z", opacity: "0.2" }), /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM216,64V96H40V64ZM40,160H80v32H40Zm176,32H96V160H216v32Z" }))
|
|
1584
|
+
],
|
|
1585
|
+
[
|
|
1586
|
+
"fill",
|
|
1587
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM40,160H80v32H40Zm176,32H96V160H216v32Z" }))
|
|
1588
|
+
],
|
|
1589
|
+
[
|
|
1590
|
+
"light",
|
|
1591
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM38,110H82v36H38Zm56,0H218v36H94ZM218,62V98H38V62ZM38,192V158H82v36H40A2,2,0,0,1,38,192Zm178,2H94V158H218v34A2,2,0,0,1,216,194Z" }))
|
|
1592
|
+
],
|
|
1593
|
+
[
|
|
1594
|
+
"regular",
|
|
1595
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM216,64V96H40V64ZM40,160H80v32H40Zm176,32H96V160H216v32Z" }))
|
|
1596
|
+
],
|
|
1597
|
+
[
|
|
1598
|
+
"thin",
|
|
1599
|
+
/* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52ZM36,108H84v40H36Zm56,0H220v40H92ZM220,60v40H36V60ZM36,192V156H84v40H40A4,4,0,0,1,36,192Zm180,4H92V156H220v36A4,4,0,0,1,216,196Z" }))
|
|
1600
|
+
]
|
|
1601
|
+
]);
|
|
1602
|
+
|
|
1510
1603
|
const e$i = /* @__PURE__ */ new Map([
|
|
1511
1604
|
[
|
|
1512
1605
|
"bold",
|
|
@@ -1780,7 +1873,7 @@ const a$5 = /* @__PURE__ */ new Map([
|
|
|
1780
1873
|
]
|
|
1781
1874
|
]);
|
|
1782
1875
|
|
|
1783
|
-
const o$
|
|
1876
|
+
const o$n = a$n.createContext({
|
|
1784
1877
|
color: "currentColor",
|
|
1785
1878
|
size: "1em",
|
|
1786
1879
|
weight: "regular",
|
|
@@ -1804,7 +1897,7 @@ const p$2 = a__namespace.forwardRef(
|
|
|
1804
1897
|
weight: f = "regular",
|
|
1805
1898
|
mirrored: g = false,
|
|
1806
1899
|
...w
|
|
1807
|
-
} = a__namespace.useContext(o$
|
|
1900
|
+
} = a__namespace.useContext(o$n);
|
|
1808
1901
|
return /* @__PURE__ */ a__namespace.createElement(
|
|
1809
1902
|
"svg",
|
|
1810
1903
|
{
|
|
@@ -1826,41 +1919,41 @@ const p$2 = a__namespace.forwardRef(
|
|
|
1826
1919
|
);
|
|
1827
1920
|
p$2.displayName = "IconBase";
|
|
1828
1921
|
|
|
1829
|
-
const o$
|
|
1830
|
-
o$
|
|
1831
|
-
const p$1 = o$
|
|
1922
|
+
const o$m = a__namespace.forwardRef((e, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...e, weights: a$m }));
|
|
1923
|
+
o$m.displayName = "ArrowCircleUpIcon";
|
|
1924
|
+
const p$1 = o$m;
|
|
1832
1925
|
|
|
1833
|
-
const r$7 = a__namespace.forwardRef((e, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...e, weights: a$
|
|
1926
|
+
const r$7 = a__namespace.forwardRef((e, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...e, weights: a$l }));
|
|
1834
1927
|
r$7.displayName = "ArrowUpIcon";
|
|
1835
1928
|
const s$7 = r$7;
|
|
1836
1929
|
|
|
1837
|
-
const r$6 = a__namespace.forwardRef((e, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...e, weights: e$
|
|
1930
|
+
const r$6 = a__namespace.forwardRef((e, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...e, weights: e$H }));
|
|
1838
1931
|
r$6.displayName = "ArrowsClockwiseIcon";
|
|
1839
1932
|
|
|
1840
|
-
const r$5 = a__namespace.forwardRef((e, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...e, weights: e$
|
|
1933
|
+
const r$5 = a__namespace.forwardRef((e, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...e, weights: e$G }));
|
|
1841
1934
|
r$5.displayName = "ArrowsInIcon";
|
|
1842
1935
|
const c$a = r$5;
|
|
1843
1936
|
|
|
1844
|
-
const e$d = a__namespace.forwardRef((o, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...o, weights: e$
|
|
1937
|
+
const e$d = a__namespace.forwardRef((o, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...o, weights: e$F }));
|
|
1845
1938
|
e$d.displayName = "ArrowsOutLineVerticalIcon";
|
|
1846
1939
|
const n$c = e$d;
|
|
1847
1940
|
|
|
1848
|
-
const o$
|
|
1849
|
-
o$
|
|
1850
|
-
const c$9 = o$
|
|
1941
|
+
const o$l = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: e$E }));
|
|
1942
|
+
o$l.displayName = "AsteriskIcon";
|
|
1943
|
+
const c$9 = o$l;
|
|
1851
1944
|
|
|
1852
|
-
const a$4 = a__namespace.forwardRef((e, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...e, weights: e$
|
|
1945
|
+
const a$4 = a__namespace.forwardRef((e, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...e, weights: e$D }));
|
|
1853
1946
|
a$4.displayName = "BankIcon";
|
|
1854
1947
|
const s$6 = a$4;
|
|
1855
1948
|
|
|
1856
|
-
const a$3 = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: e$
|
|
1949
|
+
const a$3 = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: e$C }));
|
|
1857
1950
|
a$3.displayName = "BroadcastIcon";
|
|
1858
1951
|
|
|
1859
|
-
const a$2 = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: e$
|
|
1952
|
+
const a$2 = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: e$B }));
|
|
1860
1953
|
a$2.displayName = "CalculatorIcon";
|
|
1861
1954
|
const s$5 = a$2;
|
|
1862
1955
|
|
|
1863
|
-
const e$c = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: e$
|
|
1956
|
+
const e$c = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: e$A }));
|
|
1864
1957
|
e$c.displayName = "CalendarBlankIcon";
|
|
1865
1958
|
const c$8 = e$c;
|
|
1866
1959
|
|
|
@@ -1868,125 +1961,131 @@ const e$b = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.creat
|
|
|
1868
1961
|
e$b.displayName = "CaretDownIcon";
|
|
1869
1962
|
const s$4 = e$b;
|
|
1870
1963
|
|
|
1871
|
-
const t$4 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: a$
|
|
1964
|
+
const t$4 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: a$k }));
|
|
1872
1965
|
t$4.displayName = "CaretLeftIcon";
|
|
1873
1966
|
|
|
1874
1967
|
const e$a = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: t$5 }));
|
|
1875
1968
|
e$a.displayName = "CaretRightIcon";
|
|
1876
1969
|
const s$3 = e$a;
|
|
1877
1970
|
|
|
1878
|
-
const r$4 = a__namespace.forwardRef((a, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...a, weights: e$
|
|
1971
|
+
const r$4 = a__namespace.forwardRef((a, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...a, weights: e$z }));
|
|
1879
1972
|
r$4.displayName = "ChartBarHorizontalIcon";
|
|
1880
1973
|
const c$7 = r$4;
|
|
1881
1974
|
|
|
1882
|
-
const c$6 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: a$
|
|
1975
|
+
const c$6 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: a$j }));
|
|
1883
1976
|
c$6.displayName = "CheckCircleIcon";
|
|
1884
1977
|
const s$2 = c$6;
|
|
1885
1978
|
|
|
1886
|
-
const o$
|
|
1887
|
-
o$
|
|
1888
|
-
const n$b = o$
|
|
1979
|
+
const o$k = a__namespace.forwardRef((t, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...t, weights: l$6 }));
|
|
1980
|
+
o$k.displayName = "CheckFatIcon";
|
|
1981
|
+
const n$b = o$k;
|
|
1889
1982
|
|
|
1890
|
-
const o$
|
|
1891
|
-
o$
|
|
1983
|
+
const o$j = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$y }));
|
|
1984
|
+
o$j.displayName = "CheckSquareIcon";
|
|
1892
1985
|
|
|
1893
|
-
const o$
|
|
1894
|
-
o$
|
|
1895
|
-
const l = o$
|
|
1986
|
+
const o$i = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: a$i }));
|
|
1987
|
+
o$i.displayName = "CircleHalfIcon";
|
|
1988
|
+
const l = o$i;
|
|
1896
1989
|
|
|
1897
|
-
const e$9 = a__namespace.forwardRef((o, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...o, weights: e$
|
|
1990
|
+
const e$9 = a__namespace.forwardRef((o, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...o, weights: e$x }));
|
|
1898
1991
|
e$9.displayName = "CurrencyCircleDollarIcon";
|
|
1899
1992
|
|
|
1900
|
-
const a$1 = a__namespace.forwardRef((m, e) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: e, ...m, weights: e$
|
|
1993
|
+
const a$1 = a__namespace.forwardRef((m, e) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: e, ...m, weights: e$w }));
|
|
1901
1994
|
a$1.displayName = "DiamondIcon";
|
|
1902
1995
|
const c$5 = a$1;
|
|
1903
1996
|
|
|
1904
|
-
const t$3 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: e$
|
|
1997
|
+
const t$3 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...o, weights: e$v }));
|
|
1905
1998
|
t$3.displayName = "DotsThreeOutlineVerticalIcon";
|
|
1906
1999
|
const n$a = t$3;
|
|
1907
2000
|
|
|
1908
|
-
const t$2 = a__namespace.forwardRef((m, e) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: e, ...m, weights: a$
|
|
2001
|
+
const t$2 = a__namespace.forwardRef((m, e) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: e, ...m, weights: a$h }));
|
|
1909
2002
|
t$2.displayName = "EmptyIcon";
|
|
1910
2003
|
|
|
1911
|
-
const o$
|
|
1912
|
-
o$
|
|
1913
|
-
const n$9 = o$
|
|
2004
|
+
const o$h = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: a$g }));
|
|
2005
|
+
o$h.displayName = "EyeIcon";
|
|
2006
|
+
const n$9 = o$h;
|
|
1914
2007
|
|
|
1915
|
-
const o$
|
|
1916
|
-
o$
|
|
1917
|
-
const n$8 = o$
|
|
2008
|
+
const o$g = a__namespace.forwardRef((a, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...a, weights: e$u }));
|
|
2009
|
+
o$g.displayName = "EyeSlashIcon";
|
|
2010
|
+
const n$8 = o$g;
|
|
1918
2011
|
|
|
1919
|
-
const o$
|
|
1920
|
-
o$
|
|
1921
|
-
const s$1 = o$
|
|
2012
|
+
const o$f = a__namespace.forwardRef((n, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...n, weights: l$5 }));
|
|
2013
|
+
o$f.displayName = "FunnelIcon";
|
|
2014
|
+
const s$1 = o$f;
|
|
1922
2015
|
|
|
1923
|
-
const o$
|
|
1924
|
-
o$
|
|
1925
|
-
const n$7 = o$
|
|
2016
|
+
const o$e = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: l$4 }));
|
|
2017
|
+
o$e.displayName = "GearIcon";
|
|
2018
|
+
const n$7 = o$e;
|
|
1926
2019
|
|
|
1927
2020
|
const e$8 = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: l$3 }));
|
|
1928
2021
|
e$8.displayName = "HourglassSimpleLowIcon";
|
|
1929
2022
|
|
|
1930
|
-
const e$7 = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: a$
|
|
2023
|
+
const e$7 = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: a$f }));
|
|
1931
2024
|
e$7.displayName = "InfoIcon";
|
|
1932
2025
|
const c$4 = e$7;
|
|
1933
2026
|
|
|
1934
|
-
const e$6 = a__namespace.forwardRef((c, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...c, weights: H }));
|
|
2027
|
+
const e$6 = a__namespace.forwardRef((c, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...c, weights: H$1 }));
|
|
1935
2028
|
e$6.displayName = "InvoiceIcon";
|
|
1936
2029
|
const m$8 = e$6;
|
|
1937
2030
|
|
|
1938
|
-
const o$
|
|
1939
|
-
o$
|
|
1940
|
-
const n$6 = o$
|
|
2031
|
+
const o$d = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: a$e }));
|
|
2032
|
+
o$d.displayName = "KeyholeIcon";
|
|
2033
|
+
const n$6 = o$d;
|
|
1941
2034
|
|
|
1942
|
-
const o$
|
|
1943
|
-
o$
|
|
2035
|
+
const o$c = a__namespace.forwardRef((s, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...s, weights: l$2 }));
|
|
2036
|
+
o$c.displayName = "ListChecksIcon";
|
|
1944
2037
|
|
|
1945
|
-
const o$
|
|
1946
|
-
o$
|
|
1947
|
-
const a = o$
|
|
2038
|
+
const o$b = a__namespace.forwardRef((m, p) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: p, ...m, weights: e$t }));
|
|
2039
|
+
o$b.displayName = "LockSimpleOpenIcon";
|
|
2040
|
+
const a = o$b;
|
|
1948
2041
|
|
|
1949
|
-
const o$
|
|
1950
|
-
o$
|
|
1951
|
-
const f = o$
|
|
2042
|
+
const o$a = a__namespace.forwardRef((s, n) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: n, ...s, weights: a$d }));
|
|
2043
|
+
o$a.displayName = "MagnifyingGlassIcon";
|
|
2044
|
+
const f = o$a;
|
|
2045
|
+
|
|
2046
|
+
const o$9 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$s }));
|
|
2047
|
+
o$9.displayName = "MinusSquareIcon";
|
|
1952
2048
|
|
|
1953
2049
|
const e$5 = a__namespace.forwardRef((a, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...a, weights: e$r }));
|
|
1954
2050
|
e$5.displayName = "MoneyWavyIcon";
|
|
1955
2051
|
|
|
1956
|
-
const o$
|
|
1957
|
-
o$
|
|
2052
|
+
const o$8 = a__namespace.forwardRef((t, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...t, weights: e$q }));
|
|
2053
|
+
o$8.displayName = "NotePencilIcon";
|
|
1958
2054
|
|
|
1959
2055
|
const t$1 = a__namespace.forwardRef((o, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...o, weights: e$p }));
|
|
1960
2056
|
t$1.displayName = "PaletteIcon";
|
|
1961
2057
|
const n$5 = t$1;
|
|
1962
2058
|
|
|
1963
|
-
const o$
|
|
1964
|
-
o$
|
|
1965
|
-
const m$7 = o$
|
|
2059
|
+
const o$7 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$o }));
|
|
2060
|
+
o$7.displayName = "PaperclipIcon";
|
|
2061
|
+
const m$7 = o$7;
|
|
1966
2062
|
|
|
1967
|
-
const e$4 = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: a$
|
|
2063
|
+
const e$4 = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: a$c }));
|
|
1968
2064
|
e$4.displayName = "PlusIcon";
|
|
1969
2065
|
const n$4 = e$4;
|
|
1970
2066
|
|
|
1971
|
-
const e$3 = a__namespace.forwardRef((t, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...t, weights: a$
|
|
2067
|
+
const e$3 = a__namespace.forwardRef((t, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...t, weights: a$b }));
|
|
1972
2068
|
e$3.displayName = "QuestionIcon";
|
|
1973
2069
|
const m$6 = e$3;
|
|
1974
2070
|
|
|
1975
|
-
const o$
|
|
1976
|
-
o$
|
|
1977
|
-
const h = o$
|
|
2071
|
+
const o$6 = a__namespace.forwardRef((c, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...c, weights: e$n }));
|
|
2072
|
+
o$6.displayName = "ShieldCheckIcon";
|
|
2073
|
+
const h = o$6;
|
|
1978
2074
|
|
|
1979
2075
|
const p = a__namespace.forwardRef((e, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...e, weights: e$m }));
|
|
1980
2076
|
p.displayName = "ShoppingCartSimpleIcon";
|
|
1981
2077
|
const n$3 = p;
|
|
1982
2078
|
|
|
1983
|
-
const o$
|
|
1984
|
-
o$
|
|
1985
|
-
const c$3 = o$
|
|
2079
|
+
const o$5 = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: e$l }));
|
|
2080
|
+
o$5.displayName = "SlidersIcon";
|
|
2081
|
+
const c$3 = o$5;
|
|
2082
|
+
|
|
2083
|
+
const o$4 = a__namespace.forwardRef((r, n) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: n, ...r, weights: e$k }));
|
|
2084
|
+
o$4.displayName = "SpinnerGapIcon";
|
|
2085
|
+
const m$5 = o$4;
|
|
1986
2086
|
|
|
1987
|
-
const o$
|
|
1988
|
-
o$
|
|
1989
|
-
const m$5 = o$2;
|
|
2087
|
+
const o$3 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: a$a }));
|
|
2088
|
+
o$3.displayName = "SquareIcon";
|
|
1990
2089
|
|
|
1991
2090
|
const t = a__namespace.forwardRef((a, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...a, weights: a$9 }));
|
|
1992
2091
|
t.displayName = "StackIcon";
|
|
@@ -2000,6 +2099,9 @@ const e$2 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.creat
|
|
|
2000
2099
|
e$2.displayName = "StudentIcon";
|
|
2001
2100
|
const s = e$2;
|
|
2002
2101
|
|
|
2102
|
+
const o$2 = a__namespace.forwardRef((a, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...a, weights: H }));
|
|
2103
|
+
o$2.displayName = "TableIcon";
|
|
2104
|
+
|
|
2003
2105
|
const m$4 = a__namespace.forwardRef((e, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...e, weights: e$i }));
|
|
2004
2106
|
m$4.displayName = "ThumbsDownIcon";
|
|
2005
2107
|
const c$2 = m$4;
|
|
@@ -2067,7 +2169,7 @@ const selectIcon = (iconName) => {
|
|
|
2067
2169
|
return { icon: n$4, color: Styles.color.core.primary };
|
|
2068
2170
|
case "stella-logo":
|
|
2069
2171
|
return {
|
|
2070
|
-
icon: ({ size, color, id, className, dataTestId }) => (a$
|
|
2172
|
+
icon: ({ size, color, id, className, dataTestId }) => (a$n.createElement(StellaIcon$1, { size: size, color: color, id: id, className: className, "data-testid": dataTestId })),
|
|
2071
2173
|
color: Styles.color.core.primary,
|
|
2072
2174
|
};
|
|
2073
2175
|
case "chevron-right":
|
|
@@ -2143,7 +2245,7 @@ const selectIcon = (iconName) => {
|
|
|
2143
2245
|
case "sync":
|
|
2144
2246
|
return { icon: r$6, color: Styles.color.blue.primary };
|
|
2145
2247
|
case "check-square":
|
|
2146
|
-
return { icon: o$
|
|
2248
|
+
return { icon: o$j, color: Styles.color.blue.primary };
|
|
2147
2249
|
case "empty":
|
|
2148
2250
|
return { icon: t$2, color: Styles.color.states.error };
|
|
2149
2251
|
case "money":
|
|
@@ -2162,12 +2264,14 @@ const selectIcon = (iconName) => {
|
|
|
2162
2264
|
case "truck":
|
|
2163
2265
|
return { icon: r$2, color: Styles.color.grey.shadow };
|
|
2164
2266
|
case "list-checks":
|
|
2165
|
-
return { icon: o$
|
|
2267
|
+
return { icon: o$c, color: Styles.color.blue.primary };
|
|
2166
2268
|
case "note-pencil":
|
|
2167
|
-
return { icon: o$
|
|
2269
|
+
return { icon: o$8, color: Styles.color.grey.charcoal };
|
|
2270
|
+
case "table":
|
|
2271
|
+
return { icon: o$2, color: Styles.color.grey.charcoal };
|
|
2168
2272
|
default:
|
|
2169
2273
|
return {
|
|
2170
|
-
icon: ({ size, color, id, className, dataTestId }) => (a$
|
|
2274
|
+
icon: ({ size, color, id, className, dataTestId }) => (a$n.createElement(StellaIcon$1, { size: size, color: color, id: id, className: className, "data-testid": dataTestId })),
|
|
2171
2275
|
color: Styles.color.core.primary,
|
|
2172
2276
|
};
|
|
2173
2277
|
}
|
|
@@ -2209,6 +2313,7 @@ const getFill = (iconName) => {
|
|
|
2209
2313
|
"list-checks",
|
|
2210
2314
|
"broadcast",
|
|
2211
2315
|
"eye",
|
|
2316
|
+
"table",
|
|
2212
2317
|
];
|
|
2213
2318
|
if (boldIcons.includes(iconName)) {
|
|
2214
2319
|
return "bold";
|
|
@@ -2219,12 +2324,12 @@ const getFill = (iconName) => {
|
|
|
2219
2324
|
};
|
|
2220
2325
|
|
|
2221
2326
|
const StellaIcon = ({ iconName, size = 18, color, className, id, dataTestId, }) => {
|
|
2222
|
-
const iconInfo = a$
|
|
2327
|
+
const iconInfo = a$n.useMemo(() => {
|
|
2223
2328
|
const icon = selectIcon(iconName);
|
|
2224
2329
|
const fill = getFill(iconName);
|
|
2225
2330
|
return { icon, fill };
|
|
2226
2331
|
}, [iconName]);
|
|
2227
|
-
return (a$
|
|
2332
|
+
return (a$n.createElement(iconInfo.icon.icon, { size: size, weight: iconInfo.fill, color: color || iconInfo.icon.color, className: className, id: id, "data-testid": dataTestId }));
|
|
2228
2333
|
};
|
|
2229
2334
|
|
|
2230
2335
|
var TooltipIconType;
|
|
@@ -2358,7 +2463,7 @@ function isFragment$1(object) {
|
|
|
2358
2463
|
function toArray$2(children) {
|
|
2359
2464
|
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2360
2465
|
var ret = [];
|
|
2361
|
-
a$
|
|
2466
|
+
a$n.Children.forEach(children, function (child) {
|
|
2362
2467
|
if ((child === undefined || child === null) && !option.keepEmpty) {
|
|
2363
2468
|
return;
|
|
2364
2469
|
}
|
|
@@ -2515,7 +2620,7 @@ function findDOMNode(node) {
|
|
|
2515
2620
|
if (domNode) {
|
|
2516
2621
|
return domNode;
|
|
2517
2622
|
}
|
|
2518
|
-
if (node instanceof a$
|
|
2623
|
+
if (node instanceof a$n.Component) {
|
|
2519
2624
|
var _ReactDOM$findDOMNode;
|
|
2520
2625
|
return (_ReactDOM$findDOMNode = ReactDOM.findDOMNode) === null || _ReactDOM$findDOMNode === void 0 ? void 0 : _ReactDOM$findDOMNode.call(ReactDOM, node);
|
|
2521
2626
|
}
|
|
@@ -2795,7 +2900,7 @@ function useMemo(getValue, condition, shouldUpdate) {
|
|
|
2795
2900
|
return cacheRef.current.value;
|
|
2796
2901
|
}
|
|
2797
2902
|
|
|
2798
|
-
var ReactMajorVersion = Number(a$
|
|
2903
|
+
var ReactMajorVersion = Number(a$n.version.split('.')[0]);
|
|
2799
2904
|
var fillRef = function fillRef(ref, node) {
|
|
2800
2905
|
if (typeof ref === 'function') {
|
|
2801
2906
|
ref(node);
|
|
@@ -2857,7 +2962,7 @@ var supportRef = function supportRef(nodeOrComponent) {
|
|
|
2857
2962
|
return true;
|
|
2858
2963
|
};
|
|
2859
2964
|
function isReactElement(node) {
|
|
2860
|
-
return /*#__PURE__*/a$
|
|
2965
|
+
return /*#__PURE__*/a$n.isValidElement(node) && !isFragment$1(node);
|
|
2861
2966
|
}
|
|
2862
2967
|
|
|
2863
2968
|
/**
|
|
@@ -5181,7 +5286,7 @@ var TOKEN_PREFIX = 'token';
|
|
|
5181
5286
|
*/
|
|
5182
5287
|
function useCacheToken(theme, tokens) {
|
|
5183
5288
|
var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
5184
|
-
var _useContext = a$
|
|
5289
|
+
var _useContext = a$n.useContext(StyleContext),
|
|
5185
5290
|
instanceId = _useContext.cache.instanceId,
|
|
5186
5291
|
container = _useContext.container;
|
|
5187
5292
|
var _option$salt = option.salt,
|
|
@@ -6368,7 +6473,7 @@ var useCSSVarRegister = function useCSSVarRegister(config, fn) {
|
|
|
6368
6473
|
token = config.token,
|
|
6369
6474
|
_config$scope = config.scope,
|
|
6370
6475
|
scope = _config$scope === void 0 ? '' : _config$scope;
|
|
6371
|
-
var _useContext = a$
|
|
6476
|
+
var _useContext = a$n.useContext(StyleContext),
|
|
6372
6477
|
instanceId = _useContext.cache.instanceId,
|
|
6373
6478
|
container = _useContext.container;
|
|
6374
6479
|
var tokenKey = token._tokenKey;
|
|
@@ -7730,7 +7835,7 @@ const defaultConfig = {
|
|
|
7730
7835
|
},
|
|
7731
7836
|
hashed: true
|
|
7732
7837
|
};
|
|
7733
|
-
const DesignTokenContext = /*#__PURE__*/a$
|
|
7838
|
+
const DesignTokenContext = /*#__PURE__*/a$n.createContext(defaultConfig);
|
|
7734
7839
|
|
|
7735
7840
|
const defaultPrefixCls = 'ant';
|
|
7736
7841
|
const defaultIconPrefixCls = 'anticon';
|
|
@@ -8284,7 +8389,7 @@ var uniqueMap = new ArrayKeyMap();
|
|
|
8284
8389
|
* Like `useMemo`, but this hook result will be shared across all instances.
|
|
8285
8390
|
*/
|
|
8286
8391
|
function useUniqueMemo(memoFn, deps) {
|
|
8287
|
-
return a$
|
|
8392
|
+
return a$n.useMemo(function () {
|
|
8288
8393
|
var cachedValue = uniqueMap.get(deps);
|
|
8289
8394
|
if (cachedValue) {
|
|
8290
8395
|
return cachedValue;
|
|
@@ -8383,7 +8488,7 @@ function genStyleUtils(config) {
|
|
|
8383
8488
|
var _useToken2 = useToken(),
|
|
8384
8489
|
cssVar = _useToken2.cssVar;
|
|
8385
8490
|
return [function (node) {
|
|
8386
|
-
return injectStyle && cssVar ? /*#__PURE__*/a$
|
|
8491
|
+
return injectStyle && cssVar ? /*#__PURE__*/a$n.createElement(a$n.Fragment, null, /*#__PURE__*/a$n.createElement(CSSVarRegister, {
|
|
8387
8492
|
rootCls: rootCls,
|
|
8388
8493
|
cssVar: cssVar,
|
|
8389
8494
|
component: component
|
|
@@ -8835,7 +8940,7 @@ function useToken() {
|
|
|
8835
8940
|
theme,
|
|
8836
8941
|
override,
|
|
8837
8942
|
cssVar
|
|
8838
|
-
} = a$
|
|
8943
|
+
} = a$n.useContext(DesignTokenContext);
|
|
8839
8944
|
const salt = `${version}-${hashed || ''}`;
|
|
8840
8945
|
const mergedTheme = theme || defaultTheme;
|
|
8841
8946
|
const [token, hashId, realToken] = useCacheToken(mergedTheme, [seedToken, rootDesignToken], {
|
|
@@ -8956,7 +9061,7 @@ const {
|
|
|
8956
9061
|
const {
|
|
8957
9062
|
getPrefixCls,
|
|
8958
9063
|
iconPrefixCls
|
|
8959
|
-
} = a$
|
|
9064
|
+
} = a$n.useContext(ConfigContext);
|
|
8960
9065
|
const rootPrefixCls = getPrefixCls();
|
|
8961
9066
|
return {
|
|
8962
9067
|
rootPrefixCls,
|
|
@@ -8976,7 +9081,7 @@ const {
|
|
|
8976
9081
|
useCSP: () => {
|
|
8977
9082
|
const {
|
|
8978
9083
|
csp
|
|
8979
|
-
} = a$
|
|
9084
|
+
} = a$n.useContext(ConfigContext);
|
|
8980
9085
|
return csp !== null && csp !== void 0 ? csp : {};
|
|
8981
9086
|
},
|
|
8982
9087
|
getResetStyles: (token, config) => {
|
|
@@ -9128,7 +9233,7 @@ function getTransitionName$1(transitionName, transitionType) {
|
|
|
9128
9233
|
}
|
|
9129
9234
|
|
|
9130
9235
|
var useDomMotionEvents = (function (onInternalMotionEnd) {
|
|
9131
|
-
var cacheElementRef = a$
|
|
9236
|
+
var cacheElementRef = a$n.useRef();
|
|
9132
9237
|
|
|
9133
9238
|
// Remove events
|
|
9134
9239
|
function removeMotionEvents(element) {
|
|
@@ -9162,7 +9267,7 @@ var useDomMotionEvents = (function (onInternalMotionEnd) {
|
|
|
9162
9267
|
});
|
|
9163
9268
|
|
|
9164
9269
|
// It's safe to use `useLayoutEffect` but the warning is annoying
|
|
9165
|
-
var useIsomorphicLayoutEffect = canUseDom() ? a$
|
|
9270
|
+
var useIsomorphicLayoutEffect = canUseDom() ? a$n.useLayoutEffect : a$n.useEffect;
|
|
9166
9271
|
|
|
9167
9272
|
var useNextFrame = (function () {
|
|
9168
9273
|
var nextFrameRef = a__namespace.useRef(null);
|
|
@@ -9286,8 +9391,8 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
9286
9391
|
style = _useState4[0],
|
|
9287
9392
|
setStyle = _useState4[1];
|
|
9288
9393
|
var currentStatus = getStatus();
|
|
9289
|
-
var mountedRef = a$
|
|
9290
|
-
var deadlineRef = a$
|
|
9394
|
+
var mountedRef = a$n.useRef(false);
|
|
9395
|
+
var deadlineRef = a$n.useRef(null);
|
|
9291
9396
|
|
|
9292
9397
|
// =========================== Dom Node ===========================
|
|
9293
9398
|
function getDomElement() {
|
|
@@ -9295,7 +9400,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
9295
9400
|
}
|
|
9296
9401
|
|
|
9297
9402
|
// ========================== Motion End ==========================
|
|
9298
|
-
var activeRef = a$
|
|
9403
|
+
var activeRef = a$n.useRef(false);
|
|
9299
9404
|
|
|
9300
9405
|
/**
|
|
9301
9406
|
* Clean up status & style
|
|
@@ -9392,7 +9497,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
9392
9497
|
activeRef.current = active;
|
|
9393
9498
|
|
|
9394
9499
|
// ============================ Status ============================
|
|
9395
|
-
var visibleRef = a$
|
|
9500
|
+
var visibleRef = a$n.useRef(null);
|
|
9396
9501
|
|
|
9397
9502
|
// Update with new status
|
|
9398
9503
|
useIsomorphicLayoutEffect(function () {
|
|
@@ -9441,7 +9546,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
9441
9546
|
|
|
9442
9547
|
// ============================ Effect ============================
|
|
9443
9548
|
// Reset when motion changed
|
|
9444
|
-
a$
|
|
9549
|
+
a$n.useEffect(function () {
|
|
9445
9550
|
if (
|
|
9446
9551
|
// Cancel appear
|
|
9447
9552
|
currentStatus === STATUS_APPEAR && !motionAppear ||
|
|
@@ -9452,7 +9557,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
9452
9557
|
setStatus(STATUS_NONE);
|
|
9453
9558
|
}
|
|
9454
9559
|
}, [motionAppear, motionEnter, motionLeave]);
|
|
9455
|
-
a$
|
|
9560
|
+
a$n.useEffect(function () {
|
|
9456
9561
|
return function () {
|
|
9457
9562
|
mountedRef.current = false;
|
|
9458
9563
|
clearTimeout(deadlineRef.current);
|
|
@@ -9461,7 +9566,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
9461
9566
|
|
|
9462
9567
|
// Trigger `onVisibleChanged`
|
|
9463
9568
|
var firstMountChangeRef = a__namespace.useRef(false);
|
|
9464
|
-
a$
|
|
9569
|
+
a$n.useEffect(function () {
|
|
9465
9570
|
// [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged
|
|
9466
9571
|
if (asyncVisible) {
|
|
9467
9572
|
firstMountChangeRef.current = true;
|
|
@@ -9512,9 +9617,9 @@ function genCSSMotion(config) {
|
|
|
9512
9617
|
var supportMotion = isSupportTransition(props, contextMotion);
|
|
9513
9618
|
|
|
9514
9619
|
// Ref to the react node, it may be a HTMLElement
|
|
9515
|
-
var nodeRef = a$
|
|
9620
|
+
var nodeRef = a$n.useRef();
|
|
9516
9621
|
// Ref to the dom wrapper in case ref can not pass to HTMLElement
|
|
9517
|
-
var wrapperNodeRef = a$
|
|
9622
|
+
var wrapperNodeRef = a$n.useRef();
|
|
9518
9623
|
function getDomElement() {
|
|
9519
9624
|
try {
|
|
9520
9625
|
// Here we're avoiding call for findDOMNode since it's deprecated
|
|
@@ -9850,19 +9955,19 @@ function getShadowRoot(ele) {
|
|
|
9850
9955
|
}
|
|
9851
9956
|
|
|
9852
9957
|
function isFragment(child) {
|
|
9853
|
-
return child && /*#__PURE__*/a$
|
|
9958
|
+
return child && /*#__PURE__*/a$n.isValidElement(child) && child.type === a$n.Fragment;
|
|
9854
9959
|
}
|
|
9855
9960
|
const replaceElement = (element, replacement, props) => {
|
|
9856
|
-
if (! /*#__PURE__*/a$
|
|
9961
|
+
if (! /*#__PURE__*/a$n.isValidElement(element)) {
|
|
9857
9962
|
return replacement;
|
|
9858
9963
|
}
|
|
9859
|
-
return /*#__PURE__*/a$
|
|
9964
|
+
return /*#__PURE__*/a$n.cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);
|
|
9860
9965
|
};
|
|
9861
9966
|
function cloneElement(element, props) {
|
|
9862
9967
|
return replaceElement(element, element, props);
|
|
9863
9968
|
}
|
|
9864
9969
|
|
|
9865
|
-
const zIndexContext = /*#__PURE__*/a$
|
|
9970
|
+
const zIndexContext = /*#__PURE__*/a$n.createContext(undefined);
|
|
9866
9971
|
if (process.env.NODE_ENV !== 'production') {
|
|
9867
9972
|
zIndexContext.displayName = 'zIndexContext';
|
|
9868
9973
|
}
|
|
@@ -9901,7 +10006,7 @@ function isContainerType(type) {
|
|
|
9901
10006
|
}
|
|
9902
10007
|
const useZIndex = (componentType, customZIndex) => {
|
|
9903
10008
|
const [, token] = useToken();
|
|
9904
|
-
const parentZIndex = a$
|
|
10009
|
+
const parentZIndex = a$n.useContext(zIndexContext);
|
|
9905
10010
|
const isContainer = isContainerType(componentType);
|
|
9906
10011
|
let result;
|
|
9907
10012
|
if (customZIndex !== undefined) {
|
|
@@ -10392,11 +10497,11 @@ var ColorBlock = function ColorBlock(_ref) {
|
|
|
10392
10497
|
style = _ref.style,
|
|
10393
10498
|
onClick = _ref.onClick;
|
|
10394
10499
|
var colorBlockCls = "".concat(prefixCls, "-color-block");
|
|
10395
|
-
return /*#__PURE__*/a$
|
|
10500
|
+
return /*#__PURE__*/a$n.createElement("div", {
|
|
10396
10501
|
className: classNames(colorBlockCls, className),
|
|
10397
10502
|
style: style,
|
|
10398
10503
|
onClick: onClick
|
|
10399
|
-
}, /*#__PURE__*/a$
|
|
10504
|
+
}, /*#__PURE__*/a$n.createElement("div", {
|
|
10400
10505
|
className: "".concat(colorBlockCls, "-inner"),
|
|
10401
10506
|
style: {
|
|
10402
10507
|
background: color
|
|
@@ -10422,21 +10527,21 @@ function useColorDrag(props) {
|
|
|
10422
10527
|
calculate = props.calculate,
|
|
10423
10528
|
color = props.color,
|
|
10424
10529
|
disabledDrag = props.disabledDrag;
|
|
10425
|
-
var _useState = a$
|
|
10530
|
+
var _useState = a$n.useState({
|
|
10426
10531
|
x: 0,
|
|
10427
10532
|
y: 0
|
|
10428
10533
|
}),
|
|
10429
10534
|
_useState2 = _slicedToArray(_useState, 2),
|
|
10430
10535
|
offsetValue = _useState2[0],
|
|
10431
10536
|
setOffsetValue = _useState2[1];
|
|
10432
|
-
var mouseMoveRef = a$
|
|
10433
|
-
var mouseUpRef = a$
|
|
10537
|
+
var mouseMoveRef = a$n.useRef(null);
|
|
10538
|
+
var mouseUpRef = a$n.useRef(null);
|
|
10434
10539
|
|
|
10435
10540
|
// Always get position from `color`
|
|
10436
|
-
a$
|
|
10541
|
+
a$n.useEffect(function () {
|
|
10437
10542
|
setOffsetValue(calculate());
|
|
10438
10543
|
}, [color]);
|
|
10439
|
-
a$
|
|
10544
|
+
a$n.useEffect(function () {
|
|
10440
10545
|
return function () {
|
|
10441
10546
|
document.removeEventListener('mousemove', mouseMoveRef.current);
|
|
10442
10547
|
document.removeEventListener('mouseup', mouseUpRef.current);
|
|
@@ -10510,7 +10615,7 @@ var Handler = function Handler(_ref) {
|
|
|
10510
10615
|
size = _ref$size === void 0 ? 'default' : _ref$size,
|
|
10511
10616
|
color = _ref.color,
|
|
10512
10617
|
prefixCls = _ref.prefixCls;
|
|
10513
|
-
return /*#__PURE__*/a$
|
|
10618
|
+
return /*#__PURE__*/a$n.createElement("div", {
|
|
10514
10619
|
className: classNames("".concat(prefixCls, "-handler"), _defineProperty({}, "".concat(prefixCls, "-handler-sm"), size === 'small')),
|
|
10515
10620
|
style: {
|
|
10516
10621
|
backgroundColor: color
|
|
@@ -10522,7 +10627,7 @@ var Palette = function Palette(_ref) {
|
|
|
10522
10627
|
var children = _ref.children,
|
|
10523
10628
|
style = _ref.style,
|
|
10524
10629
|
prefixCls = _ref.prefixCls;
|
|
10525
|
-
return /*#__PURE__*/a$
|
|
10630
|
+
return /*#__PURE__*/a$n.createElement("div", {
|
|
10526
10631
|
className: "".concat(prefixCls, "-palette"),
|
|
10527
10632
|
style: _objectSpread2({
|
|
10528
10633
|
position: 'relative'
|
|
@@ -10530,11 +10635,11 @@ var Palette = function Palette(_ref) {
|
|
|
10530
10635
|
}, children);
|
|
10531
10636
|
};
|
|
10532
10637
|
|
|
10533
|
-
var Transform = /*#__PURE__*/a$
|
|
10638
|
+
var Transform = /*#__PURE__*/a$n.forwardRef(function (props, ref) {
|
|
10534
10639
|
var children = props.children,
|
|
10535
10640
|
x = props.x,
|
|
10536
10641
|
y = props.y;
|
|
10537
|
-
return /*#__PURE__*/a$
|
|
10642
|
+
return /*#__PURE__*/a$n.createElement("div", {
|
|
10538
10643
|
ref: ref,
|
|
10539
10644
|
style: {
|
|
10540
10645
|
position: 'absolute',
|
|
@@ -10552,9 +10657,9 @@ var Picker = function Picker(_ref) {
|
|
|
10552
10657
|
prefixCls = _ref.prefixCls,
|
|
10553
10658
|
onChangeComplete = _ref.onChangeComplete,
|
|
10554
10659
|
disabled = _ref.disabled;
|
|
10555
|
-
var pickerRef = a$
|
|
10556
|
-
var transformRef = a$
|
|
10557
|
-
var colorRef = a$
|
|
10660
|
+
var pickerRef = a$n.useRef();
|
|
10661
|
+
var transformRef = a$n.useRef();
|
|
10662
|
+
var colorRef = a$n.useRef(color);
|
|
10558
10663
|
var onDragChange = useEvent(function (offsetValue) {
|
|
10559
10664
|
var calcColor = calculateColor({
|
|
10560
10665
|
offset: offsetValue,
|
|
@@ -10581,21 +10686,21 @@ var Picker = function Picker(_ref) {
|
|
|
10581
10686
|
_useColorDrag2 = _slicedToArray(_useColorDrag, 2),
|
|
10582
10687
|
offset = _useColorDrag2[0],
|
|
10583
10688
|
dragStartHandle = _useColorDrag2[1];
|
|
10584
|
-
return /*#__PURE__*/a$
|
|
10689
|
+
return /*#__PURE__*/a$n.createElement("div", {
|
|
10585
10690
|
ref: pickerRef,
|
|
10586
10691
|
className: "".concat(prefixCls, "-select"),
|
|
10587
10692
|
onMouseDown: dragStartHandle,
|
|
10588
10693
|
onTouchStart: dragStartHandle
|
|
10589
|
-
}, /*#__PURE__*/a$
|
|
10694
|
+
}, /*#__PURE__*/a$n.createElement(Palette, {
|
|
10590
10695
|
prefixCls: prefixCls
|
|
10591
|
-
}, /*#__PURE__*/a$
|
|
10696
|
+
}, /*#__PURE__*/a$n.createElement(Transform, {
|
|
10592
10697
|
x: offset.x,
|
|
10593
10698
|
y: offset.y,
|
|
10594
10699
|
ref: transformRef
|
|
10595
|
-
}, /*#__PURE__*/a$
|
|
10700
|
+
}, /*#__PURE__*/a$n.createElement(Handler, {
|
|
10596
10701
|
color: color.toRgbString(),
|
|
10597
10702
|
prefixCls: prefixCls
|
|
10598
|
-
})), /*#__PURE__*/a$
|
|
10703
|
+
})), /*#__PURE__*/a$n.createElement("div", {
|
|
10599
10704
|
className: "".concat(prefixCls, "-saturation"),
|
|
10600
10705
|
style: {
|
|
10601
10706
|
backgroundColor: "hsl(".concat(color.toHsb().h, ",100%, 50%)"),
|
|
@@ -10611,7 +10716,7 @@ var useColorState = function useColorState(defaultValue, value) {
|
|
|
10611
10716
|
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
10612
10717
|
mergedValue = _useMergedState2[0],
|
|
10613
10718
|
setValue = _useMergedState2[1];
|
|
10614
|
-
var color = a$
|
|
10719
|
+
var color = a$n.useMemo(function () {
|
|
10615
10720
|
return generateColor$1(mergedValue);
|
|
10616
10721
|
}, [mergedValue]);
|
|
10617
10722
|
return [color, setValue];
|
|
@@ -10624,7 +10729,7 @@ var Gradient = function Gradient(_ref) {
|
|
|
10624
10729
|
direction = _ref$direction === void 0 ? 'to right' : _ref$direction,
|
|
10625
10730
|
type = _ref.type,
|
|
10626
10731
|
prefixCls = _ref.prefixCls;
|
|
10627
|
-
var gradientColors = a$
|
|
10732
|
+
var gradientColors = a$n.useMemo(function () {
|
|
10628
10733
|
return colors.map(function (color, idx) {
|
|
10629
10734
|
var result = generateColor$1(color);
|
|
10630
10735
|
if (type === 'alpha' && idx === colors.length - 1) {
|
|
@@ -10633,7 +10738,7 @@ var Gradient = function Gradient(_ref) {
|
|
|
10633
10738
|
return result.toRgbString();
|
|
10634
10739
|
}).join(',');
|
|
10635
10740
|
}, [colors, type]);
|
|
10636
|
-
return /*#__PURE__*/a$
|
|
10741
|
+
return /*#__PURE__*/a$n.createElement("div", {
|
|
10637
10742
|
className: "".concat(prefixCls, "-gradient"),
|
|
10638
10743
|
style: {
|
|
10639
10744
|
position: 'absolute',
|
|
@@ -10651,9 +10756,9 @@ var Slider = function Slider(props) {
|
|
|
10651
10756
|
onChangeComplete = props.onChangeComplete,
|
|
10652
10757
|
color = props.color,
|
|
10653
10758
|
type = props.type;
|
|
10654
|
-
var sliderRef = a$
|
|
10655
|
-
var transformRef = a$
|
|
10656
|
-
var colorRef = a$
|
|
10759
|
+
var sliderRef = a$n.useRef();
|
|
10760
|
+
var transformRef = a$n.useRef();
|
|
10761
|
+
var colorRef = a$n.useRef(color);
|
|
10657
10762
|
var getValue = function getValue(c) {
|
|
10658
10763
|
return type === 'hue' ? c.getHue() : c.a * 100;
|
|
10659
10764
|
};
|
|
@@ -10685,7 +10790,7 @@ var Slider = function Slider(props) {
|
|
|
10685
10790
|
_useColorDrag2 = _slicedToArray(_useColorDrag, 2),
|
|
10686
10791
|
offset = _useColorDrag2[0],
|
|
10687
10792
|
dragStartHandle = _useColorDrag2[1];
|
|
10688
|
-
var handleColor = a$
|
|
10793
|
+
var handleColor = a$n.useMemo(function () {
|
|
10689
10794
|
if (type === 'hue') {
|
|
10690
10795
|
var hsb = color.toHsb();
|
|
10691
10796
|
hsb.s = 1;
|
|
@@ -10698,29 +10803,29 @@ var Slider = function Slider(props) {
|
|
|
10698
10803
|
}, [color, type]);
|
|
10699
10804
|
|
|
10700
10805
|
// ========================= Gradient =========================
|
|
10701
|
-
var gradientList = a$
|
|
10806
|
+
var gradientList = a$n.useMemo(function () {
|
|
10702
10807
|
return colors.map(function (info) {
|
|
10703
10808
|
return "".concat(info.color, " ").concat(info.percent, "%");
|
|
10704
10809
|
});
|
|
10705
10810
|
}, [colors]);
|
|
10706
10811
|
|
|
10707
10812
|
// ========================== Render ==========================
|
|
10708
|
-
return /*#__PURE__*/a$
|
|
10813
|
+
return /*#__PURE__*/a$n.createElement("div", {
|
|
10709
10814
|
ref: sliderRef,
|
|
10710
10815
|
className: classNames("".concat(prefixCls, "-slider"), "".concat(prefixCls, "-slider-").concat(type)),
|
|
10711
10816
|
onMouseDown: dragStartHandle,
|
|
10712
10817
|
onTouchStart: dragStartHandle
|
|
10713
|
-
}, /*#__PURE__*/a$
|
|
10818
|
+
}, /*#__PURE__*/a$n.createElement(Palette, {
|
|
10714
10819
|
prefixCls: prefixCls
|
|
10715
|
-
}, /*#__PURE__*/a$
|
|
10820
|
+
}, /*#__PURE__*/a$n.createElement(Transform, {
|
|
10716
10821
|
x: offset.x,
|
|
10717
10822
|
y: offset.y,
|
|
10718
10823
|
ref: transformRef
|
|
10719
|
-
}, /*#__PURE__*/a$
|
|
10824
|
+
}, /*#__PURE__*/a$n.createElement(Handler, {
|
|
10720
10825
|
size: "small",
|
|
10721
10826
|
color: handleColor.toHexString(),
|
|
10722
10827
|
prefixCls: prefixCls
|
|
10723
|
-
})), /*#__PURE__*/a$
|
|
10828
|
+
})), /*#__PURE__*/a$n.createElement(Gradient, {
|
|
10724
10829
|
colors: gradientList,
|
|
10725
10830
|
type: type,
|
|
10726
10831
|
prefixCls: prefixCls
|
|
@@ -10757,7 +10862,7 @@ var HUE_COLORS = [{
|
|
|
10757
10862
|
color: 'rgb(255, 0, 0)',
|
|
10758
10863
|
percent: 100
|
|
10759
10864
|
}];
|
|
10760
|
-
var ColorPicker = /*#__PURE__*/a$
|
|
10865
|
+
var ColorPicker = /*#__PURE__*/a$n.forwardRef(function (props, ref) {
|
|
10761
10866
|
var value = props.value,
|
|
10762
10867
|
defaultValue = props.defaultValue,
|
|
10763
10868
|
_props$prefixCls = props.prefixCls,
|
|
@@ -10783,7 +10888,7 @@ var ColorPicker = /*#__PURE__*/a$m.forwardRef(function (props, ref) {
|
|
|
10783
10888
|
_useColorState2 = _slicedToArray(_useColorState, 2),
|
|
10784
10889
|
colorValue = _useColorState2[0],
|
|
10785
10890
|
setColorValue = _useColorState2[1];
|
|
10786
|
-
var alphaColor = a$
|
|
10891
|
+
var alphaColor = a$n.useMemo(function () {
|
|
10787
10892
|
return colorValue.setA(1).toRgbString();
|
|
10788
10893
|
}, [colorValue]);
|
|
10789
10894
|
|
|
@@ -10836,15 +10941,15 @@ var ColorPicker = /*#__PURE__*/a$m.forwardRef(function (props, ref) {
|
|
|
10836
10941
|
disabled: disabled,
|
|
10837
10942
|
color: colorValue
|
|
10838
10943
|
};
|
|
10839
|
-
var defaultPanel = /*#__PURE__*/a$
|
|
10944
|
+
var defaultPanel = /*#__PURE__*/a$n.createElement(a$n.Fragment, null, /*#__PURE__*/a$n.createElement(Picker, _extends({
|
|
10840
10945
|
onChange: handleChange
|
|
10841
10946
|
}, sharedSliderProps, {
|
|
10842
10947
|
onChangeComplete: onChangeComplete
|
|
10843
|
-
})), /*#__PURE__*/a$
|
|
10948
|
+
})), /*#__PURE__*/a$n.createElement("div", {
|
|
10844
10949
|
className: "".concat(prefixCls, "-slider-container")
|
|
10845
|
-
}, /*#__PURE__*/a$
|
|
10950
|
+
}, /*#__PURE__*/a$n.createElement("div", {
|
|
10846
10951
|
className: classNames("".concat(prefixCls, "-slider-group"), _defineProperty({}, "".concat(prefixCls, "-slider-group-disabled-alpha"), disabledAlpha))
|
|
10847
|
-
}, /*#__PURE__*/a$
|
|
10952
|
+
}, /*#__PURE__*/a$n.createElement(Slider, _extends({}, sharedSliderProps, {
|
|
10848
10953
|
type: "hue",
|
|
10849
10954
|
colors: HUE_COLORS,
|
|
10850
10955
|
min: 0,
|
|
@@ -10852,7 +10957,7 @@ var ColorPicker = /*#__PURE__*/a$m.forwardRef(function (props, ref) {
|
|
|
10852
10957
|
value: colorValue.getHue(),
|
|
10853
10958
|
onChange: onHueChange,
|
|
10854
10959
|
onChangeComplete: onHueChangeComplete
|
|
10855
|
-
})), !disabledAlpha && /*#__PURE__*/a$
|
|
10960
|
+
})), !disabledAlpha && /*#__PURE__*/a$n.createElement(Slider, _extends({}, sharedSliderProps, {
|
|
10856
10961
|
type: "alpha",
|
|
10857
10962
|
colors: [{
|
|
10858
10963
|
percent: 0,
|
|
@@ -10866,11 +10971,11 @@ var ColorPicker = /*#__PURE__*/a$m.forwardRef(function (props, ref) {
|
|
|
10866
10971
|
value: colorValue.a * 100,
|
|
10867
10972
|
onChange: onAlphaChange,
|
|
10868
10973
|
onChangeComplete: onAlphaChangeComplete
|
|
10869
|
-
}))), /*#__PURE__*/a$
|
|
10974
|
+
}))), /*#__PURE__*/a$n.createElement(ColorBlock, {
|
|
10870
10975
|
color: colorValue.toRgbString(),
|
|
10871
10976
|
prefixCls: prefixCls
|
|
10872
10977
|
})));
|
|
10873
|
-
return /*#__PURE__*/a$
|
|
10978
|
+
return /*#__PURE__*/a$n.createElement("div", {
|
|
10874
10979
|
className: mergeCls,
|
|
10875
10980
|
style: style,
|
|
10876
10981
|
ref: ref
|
|
@@ -15080,7 +15185,7 @@ function stringify(value) {
|
|
|
15080
15185
|
}
|
|
15081
15186
|
var useWatchWarning = process.env.NODE_ENV !== 'production' ? function (namePath) {
|
|
15082
15187
|
var fullyStr = namePath.join('__RC_FIELD_FORM_SPLIT__');
|
|
15083
|
-
var nameStrRef = a$
|
|
15188
|
+
var nameStrRef = a$n.useRef(fullyStr);
|
|
15084
15189
|
warningOnce(nameStrRef.current === fullyStr, '`useWatch` is not support dynamic `namePath`. Please provide static instead.');
|
|
15085
15190
|
} : function () {};
|
|
15086
15191
|
|
|
@@ -15099,16 +15204,16 @@ function useWatch$1() {
|
|
|
15099
15204
|
form: _form
|
|
15100
15205
|
} : _form;
|
|
15101
15206
|
var form = options.form;
|
|
15102
|
-
var _useState = a$
|
|
15207
|
+
var _useState = a$n.useState(),
|
|
15103
15208
|
_useState2 = _slicedToArray(_useState, 2),
|
|
15104
15209
|
value = _useState2[0],
|
|
15105
15210
|
setValue = _useState2[1];
|
|
15106
|
-
var valueStr = a$
|
|
15211
|
+
var valueStr = a$n.useMemo(function () {
|
|
15107
15212
|
return stringify(value);
|
|
15108
15213
|
}, [value]);
|
|
15109
|
-
var valueStrRef = a$
|
|
15214
|
+
var valueStrRef = a$n.useRef(valueStr);
|
|
15110
15215
|
valueStrRef.current = valueStr;
|
|
15111
|
-
var fieldContext = a$
|
|
15216
|
+
var fieldContext = a$n.useContext(Context);
|
|
15112
15217
|
var formInstance = form || fieldContext;
|
|
15113
15218
|
var isValidForm = formInstance && formInstance._init;
|
|
15114
15219
|
|
|
@@ -15117,10 +15222,10 @@ function useWatch$1() {
|
|
|
15117
15222
|
warningOnce(args.length === 2 ? form ? isValidForm : true : isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');
|
|
15118
15223
|
}
|
|
15119
15224
|
var namePath = getNamePath(dependencies);
|
|
15120
|
-
var namePathRef = a$
|
|
15225
|
+
var namePathRef = a$n.useRef(namePath);
|
|
15121
15226
|
namePathRef.current = namePath;
|
|
15122
15227
|
useWatchWarning(namePath);
|
|
15123
|
-
a$
|
|
15228
|
+
a$n.useEffect(function () {
|
|
15124
15229
|
// Skip if not exist form instance
|
|
15125
15230
|
if (!isValidForm) {
|
|
15126
15231
|
return;
|
|
@@ -15206,13 +15311,13 @@ const ContextIsolator = props => {
|
|
|
15206
15311
|
}
|
|
15207
15312
|
let result = children;
|
|
15208
15313
|
if (form) {
|
|
15209
|
-
result = /*#__PURE__*/a$
|
|
15314
|
+
result = /*#__PURE__*/a$n.createElement(NoFormStyle, {
|
|
15210
15315
|
override: true,
|
|
15211
15316
|
status: true
|
|
15212
15317
|
}, result);
|
|
15213
15318
|
}
|
|
15214
15319
|
if (space) {
|
|
15215
|
-
result = /*#__PURE__*/a$
|
|
15320
|
+
result = /*#__PURE__*/a$n.createElement(NoCompactStyle, null, result);
|
|
15216
15321
|
}
|
|
15217
15322
|
return result;
|
|
15218
15323
|
};
|
|
@@ -16959,8 +17064,8 @@ var Tooltip$2 = function Tooltip(props, ref) {
|
|
|
16959
17064
|
tooltipStyles = props.styles,
|
|
16960
17065
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
16961
17066
|
var mergedId = useId(id);
|
|
16962
|
-
var triggerRef = a$
|
|
16963
|
-
a$
|
|
17067
|
+
var triggerRef = a$n.useRef(null);
|
|
17068
|
+
a$n.useImperativeHandle(ref, function () {
|
|
16964
17069
|
return triggerRef.current;
|
|
16965
17070
|
});
|
|
16966
17071
|
var extraProps = _objectSpread2({}, restProps);
|
|
@@ -17007,7 +17112,7 @@ var Tooltip$2 = function Tooltip(props, ref) {
|
|
|
17007
17112
|
arrow: showArrow
|
|
17008
17113
|
}, extraProps), getChildren());
|
|
17009
17114
|
};
|
|
17010
|
-
var Tooltip$3 = /*#__PURE__*/a$
|
|
17115
|
+
var Tooltip$3 = /*#__PURE__*/a$n.forwardRef(Tooltip$2);
|
|
17011
17116
|
|
|
17012
17117
|
function getArrowToken(token) {
|
|
17013
17118
|
const {
|
|
@@ -17790,15 +17895,15 @@ const Tooltip = ({ title, placement, type = TooltipIconType.INFO, ariaLabel, ico
|
|
|
17790
17895
|
const renderIcon = (type) => {
|
|
17791
17896
|
switch (type) {
|
|
17792
17897
|
case TooltipIconType.INFO:
|
|
17793
|
-
return (a$
|
|
17898
|
+
return (a$n.createElement(StellaIcon, { iconName: "help", size: iconSize, dataTestId: "info-icon" }));
|
|
17794
17899
|
case TooltipIconType.WARNING:
|
|
17795
|
-
return (a$
|
|
17900
|
+
return (a$n.createElement(StellaIcon, { iconName: "warning", size: iconSize, dataTestId: "warning-icon" }));
|
|
17796
17901
|
default:
|
|
17797
|
-
return a$
|
|
17902
|
+
return a$n.createElement(StellaIcon, { iconName: "help", size: iconSize });
|
|
17798
17903
|
}
|
|
17799
17904
|
};
|
|
17800
|
-
return (a$
|
|
17801
|
-
a$
|
|
17905
|
+
return (a$n.createElement(Tooltip$1, { title: title, placement: placement, trigger: ["hover", "focus"], classNames: { body: "DSL-custom-tooltip" }, className: className, arrow: false, id: id, ...htmlProps },
|
|
17906
|
+
a$n.createElement("button", { className: "DSL-tooltip-button", type: "button", "aria-label": ariaLabel ?? title }, renderIcon(type))));
|
|
17802
17907
|
};
|
|
17803
17908
|
|
|
17804
17909
|
const RequiredIcon = styled(StellaIcon) `
|
|
@@ -17825,18 +17930,24 @@ const LabelComponent = styled.label `
|
|
|
17825
17930
|
font-size: 0px;
|
|
17826
17931
|
height: 0px;
|
|
17827
17932
|
`};
|
|
17933
|
+
${({ $isPointerOnHover }) => $isPointerOnHover &&
|
|
17934
|
+
styled.css `
|
|
17935
|
+
:hover {
|
|
17936
|
+
cursor: pointer;
|
|
17937
|
+
}
|
|
17938
|
+
`}
|
|
17828
17939
|
`;
|
|
17829
17940
|
const LabelContainer = styled.span `
|
|
17830
17941
|
display: flex;
|
|
17831
17942
|
align-items: center;
|
|
17832
17943
|
`;
|
|
17833
17944
|
|
|
17834
|
-
const Label = ({ hideLabel, labelValue, required = false, tooltipText, children, htmlFor, htmlProps, id, className, }) => {
|
|
17835
|
-
return (a$
|
|
17836
|
-
a$
|
|
17945
|
+
const Label = ({ hideLabel, labelValue, required = false, tooltipText, children, htmlFor, htmlProps, id, isPointerOnHover = false, className, }) => {
|
|
17946
|
+
return (a$n.createElement(LabelComponent, { "$hideLabel": hideLabel, "$isPointerOnHover": isPointerOnHover, htmlFor: htmlFor, className: className, id: id, ...htmlProps },
|
|
17947
|
+
a$n.createElement(LabelContainer, null,
|
|
17837
17948
|
labelValue,
|
|
17838
|
-
required && (a$
|
|
17839
|
-
!!tooltipText && (a$
|
|
17949
|
+
required && (a$n.createElement(RequiredIcon, { size: 11, iconName: "required", dataTestId: "required-icon" })),
|
|
17950
|
+
!!tooltipText && (a$n.createElement(ToolTipIcon, { iconSize: 14, title: tooltipText, placement: "right" }))),
|
|
17840
17951
|
children));
|
|
17841
17952
|
};
|
|
17842
17953
|
|
|
@@ -18003,21 +18114,21 @@ const CustomLoader = styled(m$5) `
|
|
|
18003
18114
|
`;
|
|
18004
18115
|
|
|
18005
18116
|
const Loader = ({ size = 14, dataTestId, color, className, id, }) => {
|
|
18006
|
-
return (a$
|
|
18117
|
+
return (a$n.createElement(CustomLoader, { "data-testid": dataTestId, size: size, weight: "bold", color: color ?? "var(--primary)", className: className, id: id }));
|
|
18007
18118
|
};
|
|
18008
18119
|
|
|
18009
|
-
const StellaButton = a$
|
|
18120
|
+
const StellaButton = a$n.forwardRef(({ disabled, variant = "primary", label, startIcon, endIcon, isLoading = false, className, id, htmlProps, onClick, preventDefault = true, type = "button", }, ref) => {
|
|
18010
18121
|
const getIcon = (iconType, dataTestId) => {
|
|
18011
|
-
return (a$
|
|
18122
|
+
return (a$n.createElement(StellaIcon, { iconName: iconType, dataTestId: dataTestId, size: 14 }));
|
|
18012
18123
|
};
|
|
18013
18124
|
const handleClick = (e) => {
|
|
18014
18125
|
preventDefault && e.preventDefault();
|
|
18015
18126
|
onClick?.(e);
|
|
18016
18127
|
};
|
|
18017
|
-
return (a$
|
|
18128
|
+
return (a$n.createElement(ButtonComponent, { "$variant": variant, "$isLoading": isLoading, type: type, disabled: disabled, className: className, ref: ref, id: id, onClick: handleClick, ...htmlProps },
|
|
18018
18129
|
startIcon && getIcon(startIcon, "start-icon"),
|
|
18019
18130
|
label.toUpperCase(),
|
|
18020
|
-
isLoading && a$
|
|
18131
|
+
isLoading && a$n.createElement(Loader, { dataTestId: "loader", size: 14 }),
|
|
18021
18132
|
endIcon && !isLoading && getIcon(endIcon, "end-icon")));
|
|
18022
18133
|
});
|
|
18023
18134
|
|
|
@@ -18045,9 +18156,9 @@ const Icon = styled.div `
|
|
|
18045
18156
|
`;
|
|
18046
18157
|
|
|
18047
18158
|
const HelperText = ({ id, className, affectLayout = true, text, type = "info", htmlProps, }) => {
|
|
18048
|
-
return (a$
|
|
18049
|
-
a$
|
|
18050
|
-
a$
|
|
18159
|
+
return (a$n.createElement(Wrapper$1, { id: id, "$affectLayout": affectLayout, className: className, ...htmlProps },
|
|
18160
|
+
a$n.createElement(Icon, null, type === "info" ? (a$n.createElement(StellaIcon, { iconName: "info" })) : (a$n.createElement(StellaIcon, { iconName: "error" }))),
|
|
18161
|
+
a$n.createElement(Text, { "$type": type }, text)));
|
|
18051
18162
|
};
|
|
18052
18163
|
|
|
18053
18164
|
const IconButtonComponent = styled(ButtonComponent) `
|
|
@@ -18056,12 +18167,12 @@ const IconButtonComponent = styled(ButtonComponent) `
|
|
|
18056
18167
|
min-width: fit-content;
|
|
18057
18168
|
`;
|
|
18058
18169
|
|
|
18059
|
-
const IconButton = a$
|
|
18170
|
+
const IconButton = a$n.forwardRef(({ iconName, onClick, disabled, variant = "primary", isLoading = false, ariaLabel, preventDefault = true, className, dataTestId, id, htmlProps, size = 18, }, ref) => {
|
|
18060
18171
|
const handleClick = (e) => {
|
|
18061
18172
|
preventDefault && e.preventDefault();
|
|
18062
18173
|
onClick?.(e);
|
|
18063
18174
|
};
|
|
18064
|
-
return (a$
|
|
18175
|
+
return (a$n.createElement(IconButtonComponent, { "$variant": variant, "$isLoading": isLoading, ref: ref, disabled: disabled, className: className, "aria-label": ariaLabel, id: id, onClick: handleClick, ...htmlProps }, isLoading ? (a$n.createElement(Loader, { size: size, dataTestId: `${id ?? ""}-loader` })) : (a$n.createElement(StellaIcon, { iconName: iconName, size: size, dataTestId: dataTestId }))));
|
|
18065
18176
|
});
|
|
18066
18177
|
|
|
18067
18178
|
const Wrapper = styled.div `
|
|
@@ -18143,17 +18254,17 @@ const IconContainer = styled.div `
|
|
|
18143
18254
|
`;
|
|
18144
18255
|
|
|
18145
18256
|
const TextFieldContainer = ({ id, label, children, tooltipText, endIcon, className, rightCategory, leftCategory, helperText, dataTestId, helperTextAffectLayout = true, disabled = false, hideLabel = false, isLoading = false, hasError = false, isRequired = false, }) => {
|
|
18146
|
-
return (a$
|
|
18147
|
-
a$
|
|
18148
|
-
a$
|
|
18149
|
-
leftCategory && a$
|
|
18257
|
+
return (a$n.createElement(Wrapper, { "data-testid": dataTestId, className: className },
|
|
18258
|
+
a$n.createElement(Label, { tooltipText: tooltipText, required: isRequired, labelValue: label, hideLabel: hideLabel, id: `${id}-label`, htmlFor: `${id}-text-field` }),
|
|
18259
|
+
a$n.createElement(TextFieldWrapper, { id: id, "$hasError": hasError, "$isDisabled": disabled, "$isLoading": isLoading, "data-testid": "text-input-wrapper" },
|
|
18260
|
+
leftCategory && a$n.createElement(Category, null, leftCategory),
|
|
18150
18261
|
children,
|
|
18151
|
-
isLoading && (a$
|
|
18152
|
-
a$
|
|
18153
|
-
endIcon && !isLoading && (a$
|
|
18154
|
-
a$
|
|
18155
|
-
rightCategory && a$
|
|
18156
|
-
helperText && (a$
|
|
18262
|
+
isLoading && (a$n.createElement(IconContainer, null,
|
|
18263
|
+
a$n.createElement(Loader, { dataTestId: "textfield-loader", size: 25 }))),
|
|
18264
|
+
endIcon && !isLoading && (a$n.createElement(IconContainer, null,
|
|
18265
|
+
a$n.createElement(StellaIcon, { dataTestId: "end-icon", iconName: endIcon }))),
|
|
18266
|
+
rightCategory && a$n.createElement(Category, null, rightCategory)),
|
|
18267
|
+
helperText && (a$n.createElement(HelperText, { id: `${id}-helper-text`, text: helperText, affectLayout: helperTextAffectLayout, type: hasError ? "error" : "info" }))));
|
|
18157
18268
|
};
|
|
18158
18269
|
|
|
18159
18270
|
const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus, value, isRequired, maxLength, tooltipText, helperText, endIcon, placeholder = "", textAlign = "left", helperTextAffectLayout = true, hideLabel = false, disabled = false, hasError = false, isLoading = false, ariaDescribedBy, enableAutocomplete = false, }) => {
|
|
@@ -18173,15 +18284,15 @@ const TextInput = ({ id, className, htmlProps, label, onChange, onBlur, onFocus,
|
|
|
18173
18284
|
disabled,
|
|
18174
18285
|
isLoading,
|
|
18175
18286
|
};
|
|
18176
|
-
const [inputValue, setInputValue] = a$
|
|
18287
|
+
const [inputValue, setInputValue] = a$n.useState("");
|
|
18177
18288
|
const valueToUse = value ?? inputValue;
|
|
18178
18289
|
const handleChange = (e) => {
|
|
18179
18290
|
const value = e.target.value;
|
|
18180
18291
|
setInputValue(value);
|
|
18181
18292
|
onChange(value);
|
|
18182
18293
|
};
|
|
18183
|
-
return (a$
|
|
18184
|
-
a$
|
|
18294
|
+
return (a$n.createElement(TextFieldContainer, { ...containerProps },
|
|
18295
|
+
a$n.createElement(TextFieldInput, { autoComplete: enableAutocomplete ? "on" : "off", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", id: `${id}-text-field`, disabled: disabled, placeholder: placeholder, onChange: handleChange, onBlur: (e) => onBlur?.(e.target.value), onFocus: (e) => onFocus?.(e.target.value), value: valueToUse, maxLength: maxLength, "$textAlign": textAlign, "$isDisabled": disabled, "$isLoading": isLoading, ...htmlProps })));
|
|
18185
18296
|
};
|
|
18186
18297
|
|
|
18187
18298
|
const CustomIconButton$2 = styled(IconButton) `
|
|
@@ -18203,17 +18314,17 @@ const PasswordInput = ({ id, className, htmlProps, label, placeholder = "Enter P
|
|
|
18203
18314
|
hideLabel,
|
|
18204
18315
|
disabled,
|
|
18205
18316
|
};
|
|
18206
|
-
const [inputValue, setInputValue] = a$
|
|
18207
|
-
const [show, setShow] = a$
|
|
18317
|
+
const [inputValue, setInputValue] = a$n.useState("");
|
|
18318
|
+
const [show, setShow] = a$n.useState(!isHidden);
|
|
18208
18319
|
const valueToUse = value ?? inputValue;
|
|
18209
18320
|
const handleChange = (e) => {
|
|
18210
18321
|
const value = e.target.value;
|
|
18211
18322
|
setInputValue(value);
|
|
18212
18323
|
onChange(value);
|
|
18213
18324
|
};
|
|
18214
|
-
return (a$
|
|
18215
|
-
a$
|
|
18216
|
-
a$
|
|
18325
|
+
return (a$n.createElement(TextFieldContainer, { ...containerProps },
|
|
18326
|
+
a$n.createElement(TextFieldInput, { autoComplete: enableAutocomplete ? "on" : "off", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: show ? "text" : "password", id: `${id}-text-field`, disabled: disabled, placeholder: placeholder, onChange: handleChange, onBlur: (e) => onBlur?.(e.target.value), onFocus: (e) => onFocus?.(e.target.value), value: valueToUse, maxLength: maxLength, "$textAlign": textAlign, "$isDisabled": disabled, ...htmlProps }),
|
|
18327
|
+
a$n.createElement(CustomIconButton$2, { variant: "tertiary", iconName: show ? "eye" : "eye-slash", ariaLabel: show ? "Hide" : "Show", onClick: () => setShow(!show), disabled: disabled })));
|
|
18217
18328
|
};
|
|
18218
18329
|
|
|
18219
18330
|
const formatDynamicNumbersWithCommas = (num, decimalPlaces, isDegrees) => {
|
|
@@ -18257,9 +18368,9 @@ const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, la
|
|
|
18257
18368
|
hideLabel,
|
|
18258
18369
|
disabled,
|
|
18259
18370
|
};
|
|
18260
|
-
const [inputValue, setInputValue] = a$
|
|
18261
|
-
const [placeholderText, setPlaceholderText] = a$
|
|
18262
|
-
const ref = a$
|
|
18371
|
+
const [inputValue, setInputValue] = a$n.useState("");
|
|
18372
|
+
const [placeholderText, setPlaceholderText] = a$n.useState(placeholder);
|
|
18373
|
+
const ref = a$n.useRef(null);
|
|
18263
18374
|
const valueToUse = value ?? inputValue;
|
|
18264
18375
|
const moveCursorBeforeDegree = () => {
|
|
18265
18376
|
const pos = ref.current?.selectionStart ?? 0;
|
|
@@ -18312,8 +18423,8 @@ const NumberInput = ({ id, className, htmlProps, leftCategory, rightCategory, la
|
|
|
18312
18423
|
!onFocus && setPlaceholderText("");
|
|
18313
18424
|
isDegrees && moveCursorBeforeDegree();
|
|
18314
18425
|
};
|
|
18315
|
-
return (a$
|
|
18316
|
-
a$
|
|
18426
|
+
return (a$n.createElement(TextFieldContainer, { ...containerProps },
|
|
18427
|
+
a$n.createElement(TextFieldInput, { ref: ref, autoComplete: enableAutocomplete ? "on" : "off", "aria-describedby": `${id}-helper-text ${ariaDescribedBy}`, type: "text", inputMode: "numeric", pattern: allowNegativeNumbers ? "^[\\d,.\\-°]*$" : "^[\\d,.°]*$", id: `${id}-text-field`, disabled: disabled || isLoading, placeholder: placeholderText, onChange: handleChange, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, onClick: isDegrees ? moveCursorBeforeDegree : undefined, onKeyUp: isDegrees ? moveCursorBeforeDegree : undefined, onSelect: handleSelect, value: thousandSeparator
|
|
18317
18428
|
? formatDynamicNumbersWithCommas(valueToUse, decimalPlaces, isDegrees)
|
|
18318
18429
|
: valueToUse, maxLength: maxLength &&
|
|
18319
18430
|
maxLength +
|
|
@@ -21710,6 +21821,54 @@ function useReactTable(options) {
|
|
|
21710
21821
|
return tableRef.current;
|
|
21711
21822
|
}
|
|
21712
21823
|
|
|
21824
|
+
const TABLE_STORAGE_PREFIX = "ds-table-state";
|
|
21825
|
+
function loadTableState(tableId) {
|
|
21826
|
+
try {
|
|
21827
|
+
const raw = localStorage.getItem(`${TABLE_STORAGE_PREFIX}:${tableId}`);
|
|
21828
|
+
return raw ? JSON.parse(raw) : {};
|
|
21829
|
+
}
|
|
21830
|
+
catch {
|
|
21831
|
+
return {};
|
|
21832
|
+
}
|
|
21833
|
+
}
|
|
21834
|
+
function saveTableState(tableId, state) {
|
|
21835
|
+
try {
|
|
21836
|
+
localStorage.setItem(`${TABLE_STORAGE_PREFIX}:${tableId}`, JSON.stringify(state));
|
|
21837
|
+
}
|
|
21838
|
+
catch { }
|
|
21839
|
+
}
|
|
21840
|
+
function usePersistTableState(tableId, state, sizingDebounceMs = 300) {
|
|
21841
|
+
const debounceTimer = a$n.useRef(null);
|
|
21842
|
+
const latestSizing = a$n.useRef(state.columnSizing);
|
|
21843
|
+
a$n.useEffect(() => {
|
|
21844
|
+
latestSizing.current = state.columnSizing;
|
|
21845
|
+
}, [state.columnSizing]);
|
|
21846
|
+
// Persist visibility and sorting immediately
|
|
21847
|
+
a$n.useEffect(() => {
|
|
21848
|
+
saveTableState(tableId, {
|
|
21849
|
+
columnVisibility: state.columnVisibility,
|
|
21850
|
+
columnSizing: latestSizing.current,
|
|
21851
|
+
sorting: state.sorting,
|
|
21852
|
+
});
|
|
21853
|
+
}, [tableId, state.columnVisibility, state.sorting]);
|
|
21854
|
+
// Persist sizing debounced
|
|
21855
|
+
a$n.useEffect(() => {
|
|
21856
|
+
if (debounceTimer.current)
|
|
21857
|
+
clearTimeout(debounceTimer.current);
|
|
21858
|
+
debounceTimer.current = setTimeout(() => {
|
|
21859
|
+
saveTableState(tableId, {
|
|
21860
|
+
columnVisibility: state.columnVisibility,
|
|
21861
|
+
columnSizing: latestSizing.current,
|
|
21862
|
+
sorting: state.sorting,
|
|
21863
|
+
});
|
|
21864
|
+
}, sizingDebounceMs);
|
|
21865
|
+
return () => {
|
|
21866
|
+
if (debounceTimer.current)
|
|
21867
|
+
clearTimeout(debounceTimer.current);
|
|
21868
|
+
};
|
|
21869
|
+
}, [tableId, state.columnSizing]);
|
|
21870
|
+
}
|
|
21871
|
+
|
|
21713
21872
|
const getSelectWidth = (digits) => {
|
|
21714
21873
|
if (digits >= 10 && digits <= 99)
|
|
21715
21874
|
return "36px";
|
|
@@ -21819,17 +21978,17 @@ const PageTotals = styled.span `
|
|
|
21819
21978
|
`;
|
|
21820
21979
|
|
|
21821
21980
|
const Pagination = ({ isLoading, rowsPerPage = 100, totalRows, ariaLabel = "Pagination", onPageChange, startingPage = 1, id, className, htmlProps, }) => {
|
|
21822
|
-
const [pageNumber, setPageNumber] = a$
|
|
21823
|
-
const [total, setTotal] = a$
|
|
21824
|
-
const totalPages = a$
|
|
21981
|
+
const [pageNumber, setPageNumber] = a$n.useState(startingPage || 1);
|
|
21982
|
+
const [total, setTotal] = a$n.useState(totalRows || 5);
|
|
21983
|
+
const totalPages = a$n.useMemo(() => {
|
|
21825
21984
|
return Math.ceil(total / rowsPerPage);
|
|
21826
21985
|
}, [rowsPerPage, total]);
|
|
21827
|
-
const currentRows = a$
|
|
21986
|
+
const currentRows = a$n.useMemo(() => {
|
|
21828
21987
|
const startRow = (pageNumber - 1) * rowsPerPage + 1;
|
|
21829
21988
|
const endRow = Math.min(startRow + rowsPerPage - 1, total);
|
|
21830
21989
|
return { startRow, endRow };
|
|
21831
21990
|
}, [pageNumber, rowsPerPage, total]);
|
|
21832
|
-
a$
|
|
21991
|
+
a$n.useEffect(() => {
|
|
21833
21992
|
setPageNumber(startingPage);
|
|
21834
21993
|
setTotal(totalRows);
|
|
21835
21994
|
}, [totalRows, startingPage]);
|
|
@@ -21839,29 +21998,29 @@ const Pagination = ({ isLoading, rowsPerPage = 100, totalRows, ariaLabel = "Pagi
|
|
|
21839
21998
|
onPageChange?.(newPage, rowsPerPage);
|
|
21840
21999
|
}
|
|
21841
22000
|
};
|
|
21842
|
-
return isLoading ? (a$
|
|
21843
|
-
a$
|
|
21844
|
-
a$
|
|
21845
|
-
a$
|
|
22001
|
+
return isLoading ? (a$n.createElement(LoadingContainer, { "data-testid": "loading-container" })) : (a$n.createElement(a$n.Fragment, null,
|
|
22002
|
+
a$n.createElement(PaginationContainer, { id: id, className: className, "aria-label": ariaLabel, ...htmlProps },
|
|
22003
|
+
a$n.createElement(RowInfo, null,
|
|
22004
|
+
a$n.createElement(DarkText, null,
|
|
21846
22005
|
"Rows per page \u00A0",
|
|
21847
22006
|
rowsPerPage),
|
|
21848
|
-
a$
|
|
22007
|
+
a$n.createElement(LightText, null,
|
|
21849
22008
|
"Rows ",
|
|
21850
22009
|
currentRows.startRow,
|
|
21851
22010
|
" - ",
|
|
21852
22011
|
currentRows.endRow,
|
|
21853
22012
|
" of ",
|
|
21854
22013
|
totalRows)),
|
|
21855
|
-
a$
|
|
21856
|
-
a$
|
|
21857
|
-
a$
|
|
21858
|
-
totalPages > 1 ? (a$
|
|
21859
|
-
a$
|
|
21860
|
-
a$
|
|
21861
|
-
a$
|
|
22014
|
+
a$n.createElement(PageInfo, null,
|
|
22015
|
+
a$n.createElement(PageText, null, "Page"),
|
|
22016
|
+
a$n.createElement(IconButton, { iconName: "chevron-left", ariaLabel: "previous page", size: 10, disabled: pageNumber === 1, onClick: () => handlePageChange(pageNumber - 1), variant: "tertiary" }),
|
|
22017
|
+
totalPages > 1 ? (a$n.createElement(CustomSelectContainer, { "$currentPageCount": pageNumber },
|
|
22018
|
+
a$n.createElement(CustomSelect, { name: "page-number", id: "page-number-select", value: pageNumber, onChange: (e) => handlePageChange(Number(e.target.value)) }, Array.from({ length: totalPages }, (_, i) => (a$n.createElement("option", { key: i + 1, value: i + 1 }, i + 1)))),
|
|
22019
|
+
a$n.createElement(SelectCaret, { iconName: "chevron-down", size: 16 }))) : (a$n.createElement(DarkText, null, "1")),
|
|
22020
|
+
a$n.createElement(PageTotals, null,
|
|
21862
22021
|
"of \u00A0",
|
|
21863
22022
|
totalPages),
|
|
21864
|
-
a$
|
|
22023
|
+
a$n.createElement(IconButton, { iconName: "chevron-right", ariaLabel: "next page", size: 10, disabled: pageNumber === totalPages, onClick: () => handlePageChange(pageNumber + 1), variant: "tertiary" })))));
|
|
21865
22024
|
};
|
|
21866
22025
|
|
|
21867
22026
|
const HeaderCell = styled.th `
|
|
@@ -22219,23 +22378,35 @@ const ClearFilterButtonRow = styled.div `
|
|
|
22219
22378
|
align-items: "center";
|
|
22220
22379
|
text-align: "center";
|
|
22221
22380
|
`;
|
|
22381
|
+
const ActionBar = styled.div `
|
|
22382
|
+
display: flex;
|
|
22383
|
+
justify-content: space-between;
|
|
22384
|
+
height: fit-content;
|
|
22385
|
+
width: 100%;
|
|
22386
|
+
`;
|
|
22387
|
+
const GlobalActionWrapper = styled.div `
|
|
22388
|
+
display: flex;
|
|
22389
|
+
gap: 10px;
|
|
22390
|
+
width: fit-content;
|
|
22391
|
+
padding-bottom: 5px;
|
|
22392
|
+
`;
|
|
22222
22393
|
|
|
22223
22394
|
const IndeterminateCheckbox = ({ isIndeterminate, isChecked, onChange, }) => {
|
|
22224
|
-
const ref = a$
|
|
22225
|
-
a$
|
|
22395
|
+
const ref = a$n.useRef(null);
|
|
22396
|
+
a$n.useEffect(() => {
|
|
22226
22397
|
if (ref.current)
|
|
22227
22398
|
ref.current.indeterminate = !!isIndeterminate;
|
|
22228
22399
|
}, [isIndeterminate]);
|
|
22229
|
-
return (a$
|
|
22400
|
+
return (a$n.createElement(Checkbox, { ref: ref, checked: isChecked, onChange: (e) => onChange?.(e) }));
|
|
22230
22401
|
};
|
|
22231
22402
|
|
|
22232
22403
|
/**
|
|
22233
22404
|
* Returns a debounced version of a callback, along with flush and cancel methods.
|
|
22234
22405
|
*/
|
|
22235
22406
|
function useDebounceCallback(callback, delay) {
|
|
22236
|
-
const timeoutRef = a$
|
|
22237
|
-
const lastArgsRef = a$
|
|
22238
|
-
const debounced = a$
|
|
22407
|
+
const timeoutRef = a$n.useRef(null);
|
|
22408
|
+
const lastArgsRef = a$n.useRef(null);
|
|
22409
|
+
const debounced = a$n.useCallback((...args) => {
|
|
22239
22410
|
lastArgsRef.current = args;
|
|
22240
22411
|
if (timeoutRef.current)
|
|
22241
22412
|
clearTimeout(timeoutRef.current);
|
|
@@ -22245,14 +22416,14 @@ function useDebounceCallback(callback, delay) {
|
|
|
22245
22416
|
timeoutRef.current = null;
|
|
22246
22417
|
}, delay);
|
|
22247
22418
|
}, [callback, delay]);
|
|
22248
|
-
const flush = a$
|
|
22419
|
+
const flush = a$n.useCallback(() => {
|
|
22249
22420
|
if (timeoutRef.current && lastArgsRef.current) {
|
|
22250
22421
|
clearTimeout(timeoutRef.current);
|
|
22251
22422
|
callback(...lastArgsRef.current);
|
|
22252
22423
|
timeoutRef.current = null;
|
|
22253
22424
|
}
|
|
22254
22425
|
}, [callback]);
|
|
22255
|
-
const cancel = a$
|
|
22426
|
+
const cancel = a$n.useCallback(() => {
|
|
22256
22427
|
if (timeoutRef.current) {
|
|
22257
22428
|
clearTimeout(timeoutRef.current);
|
|
22258
22429
|
timeoutRef.current = null;
|
|
@@ -22261,6 +22432,40 @@ function useDebounceCallback(callback, delay) {
|
|
|
22261
22432
|
return [debounced, { flush, cancel }];
|
|
22262
22433
|
}
|
|
22263
22434
|
|
|
22435
|
+
const CheckboxDropdownMenu = ({ options, selected, mode = "multiSelect", coords, menuRef, onApply, onClear, showSelectAll = true, showClear = false, searchInputId = "search", searchInputLabel = "Search", onSearch, onSearchBlur, serverSide = false, }) => {
|
|
22436
|
+
const [tempSelected, setTempSelected] = a$n.useState(selected);
|
|
22437
|
+
const toggleItem = (key) => {
|
|
22438
|
+
setTempSelected((prev) => prev.includes(key) ? prev.filter((i) => i !== key) : [...prev, key]);
|
|
22439
|
+
};
|
|
22440
|
+
const toggleAll = () => {
|
|
22441
|
+
setTempSelected((prev) => prev.length === options.length ? [] : options.map((o) => o.key));
|
|
22442
|
+
};
|
|
22443
|
+
const showApplyButton = mode === "multiSelect" || (mode === "search" && serverSide);
|
|
22444
|
+
return ReactDOM.createPortal(a$n.createElement(FilterMenu, { style: { top: coords.top, left: coords.left, position: "absolute" }, ref: menuRef },
|
|
22445
|
+
a$n.createElement(MenuItemGroup, null,
|
|
22446
|
+
mode === "search" && (a$n.createElement("div", { style: { padding: "4px 10px" } },
|
|
22447
|
+
a$n.createElement(TextInput, { id: searchInputId, label: searchInputLabel, placeholder: "Search", hideLabel: true, onChange: (value) => {
|
|
22448
|
+
setTempSelected(value === "" ? [] : [value]);
|
|
22449
|
+
if (!serverSide)
|
|
22450
|
+
onSearch?.(value);
|
|
22451
|
+
}, onBlur: () => !serverSide && onSearchBlur?.(), endIcon: "search", value: tempSelected?.[0] }))),
|
|
22452
|
+
mode === "multiSelect" && showSelectAll && (a$n.createElement(MenuItem, { key: "select-all" },
|
|
22453
|
+
a$n.createElement(Checkbox, { id: "all-checkbox", name: "all-checkbox", checked: options.every((opt) => tempSelected.includes(opt.key)), onChange: toggleAll }),
|
|
22454
|
+
a$n.createElement(FilterBoxLabel, { htmlFor: "all-checkbox" }, "Select All"))),
|
|
22455
|
+
mode !== "search" &&
|
|
22456
|
+
options.map(({ key, value }, index) => {
|
|
22457
|
+
if (mode === "singleSelect") {
|
|
22458
|
+
return (a$n.createElement(MenuItemOption, { key: `${key}-${index}`, id: `${key}-button`, onClick: () => onApply([key]), "$applied": selected.includes(key) }, value));
|
|
22459
|
+
}
|
|
22460
|
+
return (a$n.createElement(MenuItem, { key: key },
|
|
22461
|
+
a$n.createElement(Checkbox, { id: `${key}-checkbox`, name: `${key}-checkbox`, checked: tempSelected.includes(key), onChange: () => toggleItem(key) }),
|
|
22462
|
+
a$n.createElement(FilterLabelTransparent, null, value),
|
|
22463
|
+
a$n.createElement(FilterBoxLabel, { htmlFor: `${key}-checkbox` }, value)));
|
|
22464
|
+
})),
|
|
22465
|
+
showApplyButton && (a$n.createElement(MenuButton, { onClick: () => onApply(tempSelected) }, "Apply Selection")),
|
|
22466
|
+
showClear && a$n.createElement(MenuButton, { onClick: onClear }, "Clear Filter")), document.body);
|
|
22467
|
+
};
|
|
22468
|
+
|
|
22264
22469
|
const normalizeOptions = (raw) => {
|
|
22265
22470
|
return raw
|
|
22266
22471
|
.map((item) => {
|
|
@@ -22277,27 +22482,29 @@ const TableHeaderCell = ({ header, serverSide, filters, sorting, scrollPosition,
|
|
|
22277
22482
|
const column = header.column;
|
|
22278
22483
|
const columnDef = column.columnDef;
|
|
22279
22484
|
const meta = columnDef.meta;
|
|
22280
|
-
|
|
22281
|
-
const
|
|
22282
|
-
const
|
|
22283
|
-
const [
|
|
22284
|
-
const [
|
|
22285
|
-
const [
|
|
22286
|
-
const [currentAppliedFilters, setCurrentAppliedFilters] = a$m.useState([]);
|
|
22287
|
-
const [filterOptions, setFilterOptions] = a$m.useState([]);
|
|
22288
|
-
const displayOptions = serverSide
|
|
22289
|
-
? filterOptions
|
|
22290
|
-
: normalizeOptions(Array.from(header.column.getFacetedUniqueValues().keys()));
|
|
22291
|
-
const [textAlign, setTextAlign] = a$m.useState("left");
|
|
22485
|
+
const menuRef = a$n.useRef(null);
|
|
22486
|
+
const buttonRef = a$n.useRef(null);
|
|
22487
|
+
const [showFilter, setShowFilter] = a$n.useState(false);
|
|
22488
|
+
const [coords, setCoords] = a$n.useState({ top: 0, left: 0 });
|
|
22489
|
+
const [filterOptions, setFilterOptions] = a$n.useState([]);
|
|
22490
|
+
const [textAlign, setTextAlign] = a$n.useState("left");
|
|
22292
22491
|
const [handleSave, { flush }] = useDebounceCallback((value) => {
|
|
22293
|
-
column?.setFilterValue([value]);
|
|
22294
|
-
if (value === "")
|
|
22295
|
-
column?.setFilterValue([]);
|
|
22492
|
+
column?.setFilterValue(value === "" ? [] : [value]);
|
|
22296
22493
|
onFilterApply?.();
|
|
22297
22494
|
}, 300);
|
|
22298
|
-
|
|
22495
|
+
const displayOptions = serverSide
|
|
22496
|
+
? filterOptions
|
|
22497
|
+
: normalizeOptions(Array.from(header.column.getFacetedUniqueValues().keys()));
|
|
22498
|
+
a$n.useEffect(() => {
|
|
22299
22499
|
setFilterOptions(normalizeOptions(meta?.filterOptions || []));
|
|
22300
22500
|
}, [meta]);
|
|
22501
|
+
a$n.useEffect(() => {
|
|
22502
|
+
setTextAlign(meta?.headerAlign || (meta?.dataType === "number" ? "right" : "left"));
|
|
22503
|
+
}, [meta]);
|
|
22504
|
+
a$n.useEffect(() => {
|
|
22505
|
+
if (meta?.pin)
|
|
22506
|
+
column.pin(meta.pin);
|
|
22507
|
+
}, []);
|
|
22301
22508
|
const toggleMenu = (e) => {
|
|
22302
22509
|
e.stopPropagation();
|
|
22303
22510
|
if (buttonRef.current) {
|
|
@@ -22307,41 +22514,29 @@ const TableHeaderCell = ({ header, serverSide, filters, sorting, scrollPosition,
|
|
|
22307
22514
|
left: rect.right + window.scrollX - 25,
|
|
22308
22515
|
});
|
|
22309
22516
|
}
|
|
22310
|
-
|
|
22517
|
+
const next = !showFilter;
|
|
22518
|
+
onFilterMenuInteraction?.(column.id, next);
|
|
22519
|
+
setShowFilter(next);
|
|
22311
22520
|
};
|
|
22312
|
-
const
|
|
22313
|
-
onFilterMenuInteraction?.(column.id,
|
|
22314
|
-
setShowFilter(
|
|
22521
|
+
const closeMenu = () => {
|
|
22522
|
+
onFilterMenuInteraction?.(column.id, false);
|
|
22523
|
+
setShowFilter(false);
|
|
22315
22524
|
};
|
|
22316
22525
|
// Close on outside click
|
|
22317
|
-
a$
|
|
22526
|
+
a$n.useEffect(() => {
|
|
22318
22527
|
if (!showFilter)
|
|
22319
22528
|
return;
|
|
22320
22529
|
const handleClickOutside = (e) => {
|
|
22321
22530
|
const target = e.target;
|
|
22322
|
-
|
|
22323
|
-
|
|
22324
|
-
if (!insideButton && !insideMenu) {
|
|
22325
|
-
setTempFilters(filters?.[header.id] || currentAppliedFilters);
|
|
22326
|
-
showFilterMenu(false);
|
|
22531
|
+
if (!buttonRef.current?.contains(target) && !menuRef.current?.contains(target)) {
|
|
22532
|
+
closeMenu();
|
|
22327
22533
|
}
|
|
22328
22534
|
};
|
|
22329
22535
|
document.addEventListener("click", handleClickOutside, true);
|
|
22330
22536
|
return () => document.removeEventListener("click", handleClickOutside, true);
|
|
22331
22537
|
}, [showFilter]);
|
|
22332
|
-
|
|
22333
|
-
|
|
22334
|
-
}, [meta]);
|
|
22335
|
-
a$m.useEffect(() => {
|
|
22336
|
-
const currentFilters = filters?.[header.id];
|
|
22337
|
-
setTempFilters(currentFilters ? currentFilters : []);
|
|
22338
|
-
}, [filters]);
|
|
22339
|
-
a$m.useEffect(() => {
|
|
22340
|
-
if (meta?.pin) {
|
|
22341
|
-
column.pin(meta?.pin);
|
|
22342
|
-
}
|
|
22343
|
-
}, []);
|
|
22344
|
-
return (a$m.createElement(HeaderCell, { "$isPinnedLeft": column.getIsPinned() === "left", "$isPinnedRight": column.getIsPinned() === "right", "$columnInfo": column, "$filterMenuOpen": showFilter, style: {
|
|
22538
|
+
const appliedFilters = filters?.[header.id] ?? [];
|
|
22539
|
+
return (a$n.createElement(HeaderCell, { "$isPinnedLeft": column.getIsPinned() === "left", "$isPinnedRight": column.getIsPinned() === "right", "$columnInfo": column, "$filterMenuOpen": showFilter, style: {
|
|
22345
22540
|
textAlign: meta?.headerAlign || (meta?.dataType === "number" ? "right" : "left"),
|
|
22346
22541
|
width: header.getSize(),
|
|
22347
22542
|
minWidth: header.getSize(),
|
|
@@ -22351,90 +22546,27 @@ const TableHeaderCell = ({ header, serverSide, filters, sorting, scrollPosition,
|
|
|
22351
22546
|
? "none"
|
|
22352
22547
|
: undefined,
|
|
22353
22548
|
} },
|
|
22354
|
-
a$
|
|
22355
|
-
|
|
22356
|
-
} },
|
|
22357
|
-
|
|
22358
|
-
|
|
22359
|
-
|
|
22360
|
-
|
|
22361
|
-
|
|
22362
|
-
|
|
22363
|
-
|
|
22364
|
-
|
|
22365
|
-
|
|
22366
|
-
|
|
22367
|
-
|
|
22368
|
-
|
|
22369
|
-
}, ref: menuRef },
|
|
22370
|
-
a$m.createElement(MenuItemGroup, null,
|
|
22371
|
-
meta?.filterMode === "search" && (a$m.createElement("div", { style: { padding: "4px 10px" } },
|
|
22372
|
-
a$m.createElement(TextInput, { id: `${columnDef.header}-search`, label: `${columnDef.header} search`, placeholder: "Search", hideLabel: true, onChange: (value) => {
|
|
22373
|
-
value === ""
|
|
22374
|
-
? setTempFilters([])
|
|
22375
|
-
: setTempFilters([value]);
|
|
22376
|
-
!serverSide && handleSave(value);
|
|
22377
|
-
}, onBlur: () => !serverSide && flush(), endIcon: "search", value: tempFilters?.[0] }))),
|
|
22378
|
-
(meta?.filterMode === "multiSelect" ||
|
|
22379
|
-
!meta?.filterMode) && (a$m.createElement(MenuItem, { key: "select-all" },
|
|
22380
|
-
a$m.createElement(Checkbox, { id: "all-checkbox", name: "all-checkbox", checked: displayOptions?.every((opt) => tempFilters?.includes(opt.key)), onChange: () => {
|
|
22381
|
-
setTempFilters((prev) => {
|
|
22382
|
-
if (prev?.length === displayOptions?.length) {
|
|
22383
|
-
return [];
|
|
22384
|
-
}
|
|
22385
|
-
else {
|
|
22386
|
-
return displayOptions.map((opt) => opt.key);
|
|
22387
|
-
}
|
|
22388
|
-
});
|
|
22389
|
-
} }),
|
|
22390
|
-
a$m.createElement(FilterBoxLabel, { htmlFor: "all-checkbox" }, "Select All"))),
|
|
22391
|
-
displayOptions?.map(({ key, value }, index) => {
|
|
22392
|
-
if (meta?.filterMode === "singleSelect") {
|
|
22393
|
-
return (a$m.createElement(MenuItemOption, { key: `${key}-${index}`, id: `${key}-button`, onClick: () => {
|
|
22394
|
-
setCurrentAppliedFilters([key]);
|
|
22395
|
-
column?.setFilterValue([key]);
|
|
22396
|
-
showFilterMenu(false);
|
|
22397
|
-
onFilterApply?.();
|
|
22398
|
-
}, "$applied": tempFilters?.includes(key) }, value));
|
|
22399
|
-
}
|
|
22400
|
-
if (meta?.filterMode === "multiSelect" ||
|
|
22401
|
-
!meta?.filterMode) {
|
|
22402
|
-
return (a$m.createElement(MenuItem, { key: key },
|
|
22403
|
-
a$m.createElement(Checkbox, { id: `${key}-checkbox`, name: `${key}-checkbox`, checked: tempFilters?.includes(key), onChange: () => {
|
|
22404
|
-
setTempFilters((prev) => {
|
|
22405
|
-
if (prev?.includes(key))
|
|
22406
|
-
return prev.filter((i) => i !== key);
|
|
22407
|
-
else
|
|
22408
|
-
return [...prev, key];
|
|
22409
|
-
});
|
|
22410
|
-
} }),
|
|
22411
|
-
a$m.createElement(FilterLabelTransparent, null, value),
|
|
22412
|
-
a$m.createElement(FilterBoxLabel, { htmlFor: `${key}-checkbox` }, value)));
|
|
22413
|
-
}
|
|
22414
|
-
})),
|
|
22415
|
-
(meta?.filterMode === "multiSelect" ||
|
|
22416
|
-
(meta?.filterMode === "search" && serverSide) ||
|
|
22417
|
-
!meta?.filterMode) && (a$m.createElement(MenuButton, { key: "apply", onClick: () => {
|
|
22418
|
-
setCurrentAppliedFilters(tempFilters);
|
|
22419
|
-
column?.setFilterValue(tempFilters?.length > 0 ? tempFilters : []);
|
|
22420
|
-
showFilterMenu(false);
|
|
22421
|
-
onFilterApply?.();
|
|
22422
|
-
} }, "Apply Selection")),
|
|
22423
|
-
filters?.[header.id]?.length > 0 && (a$m.createElement(MenuButton, { key: "clear", onClick: () => {
|
|
22424
|
-
column?.setFilterValue([]);
|
|
22425
|
-
showFilterMenu(false);
|
|
22426
|
-
setTempFilters([]);
|
|
22427
|
-
setCurrentAppliedFilters([]);
|
|
22428
|
-
onFilterApply?.();
|
|
22429
|
-
} }, "Clear Filter"))), document.body))),
|
|
22430
|
-
header.column.getCanSort() && (a$m.createElement(SortButton, { className: "icon", iconName: "sort", ariaLabel: "Sort Button", variant: "tertiary", "$active": sorting.some((s) => s.id === header.column.id), "$sort": column.getIsSorted(), onClick: (e) => header.column.getToggleSortingHandler()?.(e) })),
|
|
22431
|
-
textAlign === "right" && (a$m.createElement("span", { style: { fontWeight: 600 } }, flexRender(columnDef.header, header.getContext()))))));
|
|
22549
|
+
a$n.createElement(HeaderCellPosition, { style: { justifyContent: textAlign === "left" ? "start" : "end" } },
|
|
22550
|
+
textAlign === "left" && (a$n.createElement("span", { style: { fontWeight: 600 } }, flexRender(columnDef.header, header.getContext()))),
|
|
22551
|
+
header.column.getCanFilter() && (a$n.createElement("div", { style: { display: "flex", alignItems: "center", position: "relative" } },
|
|
22552
|
+
a$n.createElement(CustomIconButton$1, { className: "icon", iconName: "filter", ariaLabel: "Filter Button", variant: "tertiary", "$active": appliedFilters.length > 0 || showFilter, onClick: (e) => toggleMenu(e), ref: buttonRef }),
|
|
22553
|
+
showFilter && (a$n.createElement(CheckboxDropdownMenu, { options: displayOptions, selected: appliedFilters, mode: meta?.filterMode ?? "multiSelect", coords: coords, menuRef: menuRef, showSelectAll: meta?.filterMode !== "singleSelect", showClear: appliedFilters.length > 0, onApply: (selected) => {
|
|
22554
|
+
column?.setFilterValue(selected.length > 0 ? selected : []);
|
|
22555
|
+
closeMenu();
|
|
22556
|
+
onFilterApply?.();
|
|
22557
|
+
}, onClear: () => {
|
|
22558
|
+
column?.setFilterValue([]);
|
|
22559
|
+
closeMenu();
|
|
22560
|
+
onFilterApply?.();
|
|
22561
|
+
}, serverSide: serverSide, onSearch: handleSave, onSearchBlur: flush, searchInputId: `${String(columnDef.header)}-search`, searchInputLabel: `${String(columnDef.header)} search` })))),
|
|
22562
|
+
header.column.getCanSort() && (a$n.createElement(SortButton, { className: "icon", iconName: "sort", ariaLabel: "Sort Button", variant: "tertiary", "$active": sorting.some((s) => s.id === header.column.id), "$sort": column.getIsSorted(), onClick: (e) => header.column.getToggleSortingHandler()?.(e) })),
|
|
22563
|
+
textAlign === "right" && (a$n.createElement("span", { style: { fontWeight: 600 } }, flexRender(columnDef.header, header.getContext()))))));
|
|
22432
22564
|
};
|
|
22433
22565
|
|
|
22434
22566
|
const RowOptions = ({ row, selectionMenuItems }) => {
|
|
22435
|
-
const [open, setOpen] = a$
|
|
22436
|
-
const buttonRef = a$
|
|
22437
|
-
const [coords, setCoords] = a$
|
|
22567
|
+
const [open, setOpen] = a$n.useState(false);
|
|
22568
|
+
const buttonRef = a$n.useRef(null);
|
|
22569
|
+
const [coords, setCoords] = a$n.useState({ top: 0, left: 0 });
|
|
22438
22570
|
const toggleMenu = (e) => {
|
|
22439
22571
|
e.stopPropagation();
|
|
22440
22572
|
if (buttonRef.current) {
|
|
@@ -22447,7 +22579,7 @@ const RowOptions = ({ row, selectionMenuItems }) => {
|
|
|
22447
22579
|
setOpen((p) => !p);
|
|
22448
22580
|
};
|
|
22449
22581
|
// Close menu when clicking outside
|
|
22450
|
-
a$
|
|
22582
|
+
a$n.useEffect(() => {
|
|
22451
22583
|
if (!open)
|
|
22452
22584
|
return;
|
|
22453
22585
|
const handleClick = (e) => {
|
|
@@ -22457,16 +22589,16 @@ const RowOptions = ({ row, selectionMenuItems }) => {
|
|
|
22457
22589
|
document.addEventListener("click", handleClick);
|
|
22458
22590
|
return () => document.removeEventListener("click", handleClick);
|
|
22459
22591
|
}, [open]);
|
|
22460
|
-
return (a$
|
|
22461
|
-
a$
|
|
22462
|
-
a$
|
|
22592
|
+
return (a$n.createElement(a$n.Fragment, null,
|
|
22593
|
+
a$n.createElement(KebabAlign, null,
|
|
22594
|
+
a$n.createElement(IconButton, { ariaLabel: "Options", iconName: "kebab-menu", variant: "tertiary", onClick: (e) => toggleMenu(e), ref: buttonRef })),
|
|
22463
22595
|
open &&
|
|
22464
|
-
ReactDOM.createPortal(a$
|
|
22596
|
+
ReactDOM.createPortal(a$n.createElement(FilterMenu, { style: {
|
|
22465
22597
|
top: coords.top,
|
|
22466
22598
|
left: coords.left,
|
|
22467
22599
|
position: "absolute",
|
|
22468
22600
|
} }, selectionMenuItems?.map((item) => {
|
|
22469
|
-
return ((!item.conditional || item.conditional()) && (a$
|
|
22601
|
+
return ((!item.conditional || item.conditional()) && (a$n.createElement(MenuItem, { key: item.label, onClick: () => {
|
|
22470
22602
|
item.onClick(row);
|
|
22471
22603
|
setOpen(false);
|
|
22472
22604
|
} }, item.label)));
|
|
@@ -22474,33 +22606,44 @@ const RowOptions = ({ row, selectionMenuItems }) => {
|
|
|
22474
22606
|
};
|
|
22475
22607
|
|
|
22476
22608
|
const EmptyTableState = ({ id, className, header, subHeader, showClearFilterButton, colSpan, size = "large", onClearFilters, }) => {
|
|
22477
|
-
return (a$
|
|
22478
|
-
a$
|
|
22479
|
-
a$
|
|
22480
|
-
a$
|
|
22481
|
-
a$
|
|
22482
|
-
a$
|
|
22609
|
+
return (a$n.createElement("tr", null,
|
|
22610
|
+
a$n.createElement(EmptyTableCell, { colSpan: colSpan },
|
|
22611
|
+
a$n.createElement(EmptyTableSection, { "$size": size, id: id, className: className },
|
|
22612
|
+
a$n.createElement(EmptyTableHeader, null, header),
|
|
22613
|
+
a$n.createElement(EmptyTableSubHeader, null, subHeader),
|
|
22614
|
+
a$n.createElement(ClearFilterButtonRow, null, showClearFilterButton && (a$n.createElement(StellaButton, { label: "Clear Filters", onClick: () => onClearFilters?.(), variant: "secondary" })))))));
|
|
22483
22615
|
};
|
|
22484
22616
|
|
|
22485
22617
|
function Table({ columns, data, isLoading, serverSide = false, onPageChange, onSortChange, onFilterChange, onRowSelect, onRowClick, rowStatuses, showSelection = false, showRowOptions = false, showPagination = true, variant, paginationDetails = {
|
|
22486
22618
|
startingPage: 1,
|
|
22487
22619
|
rowsPerPage: 10,
|
|
22488
22620
|
totalRows: data.length,
|
|
22489
|
-
}, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, defaultFilters, staticFilters, }) {
|
|
22490
|
-
const [rowSelection, setRowSelection] = a$
|
|
22491
|
-
const [selectedRows] = a$
|
|
22492
|
-
const [pageIndex, setPageIndex] = a$
|
|
22493
|
-
const [pagination, setPagination] = a$
|
|
22621
|
+
}, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, defaultFilters, staticFilters, enableShowHide, globalActions, }) {
|
|
22622
|
+
const [rowSelection, setRowSelection] = a$n.useState({});
|
|
22623
|
+
const [selectedRows] = a$n.useState({});
|
|
22624
|
+
const [pageIndex, setPageIndex] = a$n.useState(paginationDetails?.startingPage);
|
|
22625
|
+
const [pagination, setPagination] = a$n.useState({
|
|
22494
22626
|
pageIndex: paginationDetails?.startingPage - 1,
|
|
22495
22627
|
pageSize: paginationDetails?.rowsPerPage || 10,
|
|
22496
22628
|
});
|
|
22497
|
-
const [localData, setLocalData] = a$
|
|
22498
|
-
const [localColumns, setLocalColumns] = a$
|
|
22499
|
-
const [totalData, setTotalData] = a$
|
|
22500
|
-
const [sorting, setSorting] = a$
|
|
22501
|
-
const [filters, setFilters] = a$
|
|
22502
|
-
const [rowState, setRowState] = a$
|
|
22503
|
-
const [
|
|
22629
|
+
const [localData, setLocalData] = a$n.useState(data);
|
|
22630
|
+
const [localColumns, setLocalColumns] = a$n.useState(columns);
|
|
22631
|
+
const [totalData, setTotalData] = a$n.useState(paginationDetails?.totalRows);
|
|
22632
|
+
const [sorting, setSorting] = a$n.useState(() => loadTableState(id).sorting ?? []);
|
|
22633
|
+
const [filters, setFilters] = a$n.useState({});
|
|
22634
|
+
const [rowState, setRowState] = a$n.useState({});
|
|
22635
|
+
const [columnVisibility, setColumnVisibility] = a$n.useState(() => {
|
|
22636
|
+
const persisted = loadTableState(id);
|
|
22637
|
+
if (persisted.columnVisibility)
|
|
22638
|
+
return persisted.columnVisibility;
|
|
22639
|
+
return Object.fromEntries(columns
|
|
22640
|
+
.filter((col) => col.meta?.defaultHidden)
|
|
22641
|
+
.map((col) => [
|
|
22642
|
+
"accessorKey" in col ? col.accessorKey : col.id,
|
|
22643
|
+
false,
|
|
22644
|
+
]));
|
|
22645
|
+
});
|
|
22646
|
+
const [columnFilters, setColumnFilters] = a$n.useState(() => {
|
|
22504
22647
|
const base = defaultFilters ?? [];
|
|
22505
22648
|
if (!staticFilters?.length)
|
|
22506
22649
|
return base;
|
|
@@ -22520,18 +22663,25 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22520
22663
|
});
|
|
22521
22664
|
return merged;
|
|
22522
22665
|
});
|
|
22523
|
-
const [columnPinning, setColumnPinning] = a$
|
|
22524
|
-
const scrollRef = a$
|
|
22525
|
-
const
|
|
22666
|
+
const [columnPinning, setColumnPinning] = a$n.useState({ left: ["select"], right: ["options"] });
|
|
22667
|
+
const scrollRef = a$n.useRef(null);
|
|
22668
|
+
const visibilityButtonRef = a$n.useRef(null);
|
|
22669
|
+
const visibilityMenuRef = a$n.useRef(null);
|
|
22670
|
+
const [showVisibilityMenu, setShowVisibilityMenu] = a$n.useState(false);
|
|
22671
|
+
const [visibilityMenuCoords, setVisibilityMenuCoords] = a$n.useState({
|
|
22672
|
+
top: 0,
|
|
22673
|
+
left: 0,
|
|
22674
|
+
});
|
|
22675
|
+
const [scrollState, setScrollState] = a$n.useState({
|
|
22526
22676
|
atLeft: true,
|
|
22527
22677
|
atRight: false,
|
|
22528
22678
|
});
|
|
22529
|
-
const [rowStatusesState, setRowStatusesState] = a$
|
|
22530
|
-
const [filterMenuOpen, setFilterMenuOpen] = a$
|
|
22531
|
-
a$
|
|
22679
|
+
const [rowStatusesState, setRowStatusesState] = a$n.useState(rowStatuses || {});
|
|
22680
|
+
const [filterMenuOpen, setFilterMenuOpen] = a$n.useState({});
|
|
22681
|
+
a$n.useEffect(() => {
|
|
22532
22682
|
setRowStatusesState(rowStatuses || {});
|
|
22533
22683
|
}, [rowStatuses]);
|
|
22534
|
-
a$
|
|
22684
|
+
a$n.useEffect(() => {
|
|
22535
22685
|
setTotalData(paginationDetails?.totalRows);
|
|
22536
22686
|
setPagination({
|
|
22537
22687
|
pageIndex: paginationDetails?.startingPage - 1,
|
|
@@ -22542,7 +22692,20 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22542
22692
|
if (paginationDetails && paginationDetails.startingPage !== pageIndex)
|
|
22543
22693
|
setPageIndex(paginationDetails?.startingPage);
|
|
22544
22694
|
}, [paginationDetails, data, columns]);
|
|
22545
|
-
a$
|
|
22695
|
+
a$n.useEffect(() => {
|
|
22696
|
+
if (!showVisibilityMenu)
|
|
22697
|
+
return;
|
|
22698
|
+
const handleClickOutside = (e) => {
|
|
22699
|
+
const target = e.target;
|
|
22700
|
+
if (!visibilityButtonRef.current?.contains(target) &&
|
|
22701
|
+
!visibilityMenuRef.current?.contains(target)) {
|
|
22702
|
+
setShowVisibilityMenu(false);
|
|
22703
|
+
}
|
|
22704
|
+
};
|
|
22705
|
+
document.addEventListener("click", handleClickOutside, true);
|
|
22706
|
+
return () => document.removeEventListener("click", handleClickOutside, true);
|
|
22707
|
+
}, [showVisibilityMenu]);
|
|
22708
|
+
a$n.useLayoutEffect(() => {
|
|
22546
22709
|
const el = scrollRef.current;
|
|
22547
22710
|
if (!el)
|
|
22548
22711
|
return;
|
|
@@ -22586,7 +22749,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22586
22749
|
[rowId]: { ...prev[rowId], [field]: value },
|
|
22587
22750
|
}));
|
|
22588
22751
|
};
|
|
22589
|
-
const enhancedColumns = a$
|
|
22752
|
+
const enhancedColumns = a$n.useMemo(() => {
|
|
22590
22753
|
const cols = [];
|
|
22591
22754
|
if (showSelection) {
|
|
22592
22755
|
cols.push({
|
|
@@ -22594,9 +22757,9 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22594
22757
|
header: () => {
|
|
22595
22758
|
const isIndeterminate = table.getIsSomePageRowsSelected() &&
|
|
22596
22759
|
!table.getIsAllPageRowsSelected();
|
|
22597
|
-
return (a$
|
|
22760
|
+
return (a$n.createElement(IndeterminateCheckbox, { isIndeterminate: isIndeterminate, isChecked: table.getIsAllPageRowsSelected(), onChange: table.getToggleAllPageRowsSelectedHandler() }));
|
|
22598
22761
|
},
|
|
22599
|
-
cell: ({ row }) => (a$
|
|
22762
|
+
cell: ({ row }) => (a$n.createElement(Checkbox, { checked: row.getIsSelected(), onChange: row.getToggleSelectedHandler() })),
|
|
22600
22763
|
size: 20,
|
|
22601
22764
|
});
|
|
22602
22765
|
}
|
|
@@ -22606,7 +22769,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22606
22769
|
id: "options",
|
|
22607
22770
|
header: "",
|
|
22608
22771
|
cell: ({ row }) => {
|
|
22609
|
-
return (a$
|
|
22772
|
+
return (a$n.createElement(RowOptions, { row: row, selectionMenuItems: selectionMenuItems }));
|
|
22610
22773
|
},
|
|
22611
22774
|
size: 30,
|
|
22612
22775
|
});
|
|
@@ -22624,6 +22787,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22624
22787
|
data: localData,
|
|
22625
22788
|
columns: enhancedColumns,
|
|
22626
22789
|
state: {
|
|
22790
|
+
columnVisibility,
|
|
22627
22791
|
pagination,
|
|
22628
22792
|
sorting,
|
|
22629
22793
|
columnFilters,
|
|
@@ -22639,6 +22803,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22639
22803
|
enableRowSelection: showSelection,
|
|
22640
22804
|
rowCount: serverSide ? paginationDetails?.totalRows : undefined,
|
|
22641
22805
|
enableColumnPinning: true,
|
|
22806
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
22642
22807
|
getCoreRowModel: getCoreRowModel(),
|
|
22643
22808
|
getFacetedRowModel: !serverSide ? getFacetedRowModel() : undefined,
|
|
22644
22809
|
getFacetedUniqueValues: !serverSide ? getFacetedUniqueValues() : undefined,
|
|
@@ -22692,7 +22857,8 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22692
22857
|
},
|
|
22693
22858
|
},
|
|
22694
22859
|
});
|
|
22695
|
-
|
|
22860
|
+
usePersistTableState(id, { columnVisibility, sorting });
|
|
22861
|
+
a$n.useEffect(() => {
|
|
22696
22862
|
if (onRowSelect) {
|
|
22697
22863
|
const selectedData = table
|
|
22698
22864
|
.getSelectedRowModel()
|
|
@@ -22700,8 +22866,8 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22700
22866
|
onRowSelect?.(selectedData);
|
|
22701
22867
|
}
|
|
22702
22868
|
}, [rowSelection]);
|
|
22703
|
-
const isMounted = a$
|
|
22704
|
-
a$
|
|
22869
|
+
const isMounted = a$n.useRef(false);
|
|
22870
|
+
a$n.useEffect(() => {
|
|
22705
22871
|
if (!isMounted.current) {
|
|
22706
22872
|
isMounted.current = true;
|
|
22707
22873
|
return;
|
|
@@ -22719,95 +22885,133 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
|
|
|
22719
22885
|
});
|
|
22720
22886
|
table.toggleAllRowsSelected(false);
|
|
22721
22887
|
};
|
|
22722
|
-
return (a$
|
|
22723
|
-
|
|
22724
|
-
a$
|
|
22725
|
-
|
|
22726
|
-
|
|
22727
|
-
|
|
22728
|
-
|
|
22729
|
-
|
|
22730
|
-
|
|
22731
|
-
|
|
22732
|
-
|
|
22733
|
-
|
|
22734
|
-
|
|
22735
|
-
|
|
22736
|
-
|
|
22737
|
-
|
|
22738
|
-
|
|
22739
|
-
|
|
22740
|
-
|
|
22741
|
-
|
|
22742
|
-
|
|
22743
|
-
|
|
22744
|
-
|
|
22745
|
-
|
|
22746
|
-
|
|
22747
|
-
|
|
22748
|
-
|
|
22749
|
-
|
|
22750
|
-
|
|
22751
|
-
|
|
22752
|
-
|
|
22753
|
-
|
|
22754
|
-
|
|
22755
|
-
|
|
22756
|
-
|
|
22757
|
-
|
|
22758
|
-
|
|
22759
|
-
|
|
22760
|
-
|
|
22761
|
-
|
|
22762
|
-
|
|
22763
|
-
|
|
22764
|
-
|
|
22765
|
-
|
|
22766
|
-
|
|
22767
|
-
|
|
22768
|
-
|
|
22769
|
-
|
|
22770
|
-
|
|
22771
|
-
|
|
22772
|
-
|
|
22773
|
-
|
|
22774
|
-
|
|
22775
|
-
|
|
22776
|
-
|
|
22777
|
-
|
|
22778
|
-
|
|
22779
|
-
|
|
22780
|
-
|
|
22781
|
-
|
|
22782
|
-
|
|
22783
|
-
|
|
22784
|
-
|
|
22888
|
+
return (a$n.createElement(a$n.Fragment, null,
|
|
22889
|
+
!isLoading && (a$n.createElement(ActionBar, null,
|
|
22890
|
+
a$n.createElement(GlobalActionWrapper, null, globalActions?.map((action) => action.element)),
|
|
22891
|
+
a$n.createElement(GlobalActionWrapper, null, enableShowHide && (a$n.createElement(a$n.Fragment, null,
|
|
22892
|
+
a$n.createElement(IconButton, { ref: visibilityButtonRef, ariaLabel: "Column show hide button", variant: "tertiary", iconName: "table", onClick: () => {
|
|
22893
|
+
const rect = visibilityButtonRef.current?.getBoundingClientRect();
|
|
22894
|
+
if (rect) {
|
|
22895
|
+
setVisibilityMenuCoords({
|
|
22896
|
+
top: rect.bottom + window.scrollY + 4,
|
|
22897
|
+
left: rect.right + window.scrollX - 140,
|
|
22898
|
+
});
|
|
22899
|
+
}
|
|
22900
|
+
setShowVisibilityMenu((prev) => !prev);
|
|
22901
|
+
} }),
|
|
22902
|
+
showVisibilityMenu && (a$n.createElement(CheckboxDropdownMenu, { options: table
|
|
22903
|
+
.getAllLeafColumns()
|
|
22904
|
+
.filter((col) => col.id !== "select" && col.id !== "options")
|
|
22905
|
+
.map((col) => ({
|
|
22906
|
+
key: col.id,
|
|
22907
|
+
value: typeof col.columnDef.header === "string"
|
|
22908
|
+
? col.columnDef.header
|
|
22909
|
+
: col.id,
|
|
22910
|
+
})), selected: table
|
|
22911
|
+
.getAllLeafColumns()
|
|
22912
|
+
.filter((col) => col.getIsVisible())
|
|
22913
|
+
.map((col) => col.id), mode: "multiSelect", coords: visibilityMenuCoords, menuRef: visibilityMenuRef, showSelectAll: true, showClear: false, onApply: (selected) => {
|
|
22914
|
+
const next = {};
|
|
22915
|
+
table
|
|
22916
|
+
.getAllLeafColumns()
|
|
22917
|
+
.filter((col) => col.id !== "select" && col.id !== "options")
|
|
22918
|
+
.forEach((col) => {
|
|
22919
|
+
next[col.id] = selected.includes(col.id);
|
|
22920
|
+
});
|
|
22921
|
+
setColumnVisibility(next);
|
|
22922
|
+
setShowVisibilityMenu(false);
|
|
22923
|
+
}, onClear: () => { } }))))))),
|
|
22924
|
+
a$n.createElement(TableWrapper, { className: className, id: id, "data-testid": dataTestId, "data-auto": dataAuto },
|
|
22925
|
+
a$n.createElement(TableWrapperScroll, { "$stopScroll": Object.values(filterMenuOpen).some((value) => value), ref: scrollRef }, isLoading ? (a$n.createElement("div", null,
|
|
22926
|
+
a$n.createElement("div", { style: {
|
|
22927
|
+
width: "100%",
|
|
22928
|
+
maxWidth: "100%",
|
|
22929
|
+
height: "100%",
|
|
22930
|
+
marginBottom: "4px",
|
|
22931
|
+
backgroundColor: "#f9f9f9",
|
|
22932
|
+
display: "flex",
|
|
22933
|
+
flexDirection: "column",
|
|
22934
|
+
overflow: "hidden",
|
|
22935
|
+
boxSizing: "border-box",
|
|
22936
|
+
} }, Array.from({
|
|
22937
|
+
length: pagination?.pageSize,
|
|
22938
|
+
}).map((_, index) => (a$n.createElement("div", { style: {
|
|
22939
|
+
position: "relative",
|
|
22940
|
+
display: "flex",
|
|
22941
|
+
flexDirection: "row",
|
|
22942
|
+
gap: "90px",
|
|
22943
|
+
padding: "10px 25px",
|
|
22944
|
+
backgroundColor: index === 0 ? "#ededed" : "transparent",
|
|
22945
|
+
borderBottom: "1px solid #e0e0e0",
|
|
22946
|
+
alignItems: "center",
|
|
22947
|
+
height: "50px",
|
|
22948
|
+
minHeight: "50px",
|
|
22949
|
+
}, key: index + "loading-row" }, Array.from({
|
|
22950
|
+
length: 10,
|
|
22951
|
+
}).map((_, i) => (a$n.createElement(LoadingShimmer, { key: `${i}-loading`, "$width": "110px", "$height": "25px" }))))))))) : (a$n.createElement(StyledTable, { id: `${id}-table`, ...htmlProps },
|
|
22952
|
+
a$n.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a$n.createElement(HeaderRow, { key: headerGroup.id }, headerGroup.headers.map((header, i) => {
|
|
22953
|
+
return (a$n.createElement(TableHeaderCell, { key: header.id, serverSide: serverSide, header: header, filters: filters, sorting: sorting, scrollPosition: scrollState, onFilterMenuInteraction: (id, active) => {
|
|
22954
|
+
setFilterMenuOpen((prev) => ({
|
|
22955
|
+
...prev,
|
|
22956
|
+
[id]: active,
|
|
22957
|
+
}));
|
|
22958
|
+
}, onFilterApply: () => {
|
|
22959
|
+
setPageIndex(1);
|
|
22960
|
+
setPagination((prev) => ({
|
|
22961
|
+
...prev,
|
|
22962
|
+
pageIndex: 0,
|
|
22963
|
+
}));
|
|
22964
|
+
} }));
|
|
22965
|
+
}))))),
|
|
22966
|
+
a$n.createElement("tbody", null,
|
|
22967
|
+
table.getRowModel().rows.length === 0 && (a$n.createElement(EmptyTableState, { header: emptyTableState?.header || "No data available.", subHeader: emptyTableState?.subHeader, showClearFilterButton: emptyTableState?.showClearFilterButton, onClearFilters: resetTable, colSpan: table.getVisibleLeafColumns().length, size: "large" })),
|
|
22968
|
+
table.getRowModel().rows.map((row) => (a$n.createElement(CellRow, { key: row.id, onClick: () => onRowClick?.(row.original), "$isClickable": !!onRowClick }, row.getVisibleCells().map((cell) => {
|
|
22969
|
+
const value = flexRender(cell.column.columnDef.cell, {
|
|
22970
|
+
...cell.getContext(),
|
|
22971
|
+
localValue: rowState[row.id]?.[cell.column.id],
|
|
22972
|
+
onLocalChange: (val) => handleInputChange(row.id, cell.column.id, val),
|
|
22973
|
+
});
|
|
22974
|
+
const meta = cell.column.columnDef
|
|
22975
|
+
.meta;
|
|
22976
|
+
return (a$n.createElement(BodyCell, { key: cell.id, style: {
|
|
22977
|
+
width: cell.column.getSize(),
|
|
22978
|
+
textAlign: meta?.cellAlign ||
|
|
22979
|
+
(typeof cell.getValue() === "number" ||
|
|
22980
|
+
meta?.dataType === "number"
|
|
22981
|
+
? "right"
|
|
22982
|
+
: "left"),
|
|
22983
|
+
boxShadow: scrollState.atLeft &&
|
|
22984
|
+
cell.column.getIsPinned() === "left"
|
|
22785
22985
|
? "none"
|
|
22786
|
-
:
|
|
22787
|
-
|
|
22788
|
-
|
|
22789
|
-
|
|
22790
|
-
|
|
22791
|
-
|
|
22792
|
-
|
|
22793
|
-
|
|
22794
|
-
|
|
22795
|
-
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
|
|
22800
|
-
|
|
22801
|
-
|
|
22802
|
-
|
|
22803
|
-
|
|
22804
|
-
|
|
22805
|
-
|
|
22806
|
-
|
|
22807
|
-
|
|
22808
|
-
|
|
22809
|
-
|
|
22810
|
-
|
|
22986
|
+
: scrollState.atRight &&
|
|
22987
|
+
cell.column.getIsPinned() === "right"
|
|
22988
|
+
? "none"
|
|
22989
|
+
: undefined,
|
|
22990
|
+
backgroundColor: table
|
|
22991
|
+
.getSelectedRowModel()
|
|
22992
|
+
.rows.find((r) => r.id === row.id)
|
|
22993
|
+
? "#EBF0FA"
|
|
22994
|
+
: rowStatusesState?.[row.id] === "action-pending"
|
|
22995
|
+
? "#FFFDEB"
|
|
22996
|
+
: rowStatusesState?.[row.id] === "completed"
|
|
22997
|
+
? "#F5F5F5"
|
|
22998
|
+
: "",
|
|
22999
|
+
}, "$isPinnedLeft": cell.column.getIsPinned() === "left", "$isPinnedRight": cell.column.getIsPinned() === "right", "$columnInfo": cell.column, "$isLastRow": serverSide
|
|
23000
|
+
? row.index ===
|
|
23001
|
+
table.getRowModel().rows.length - 1
|
|
23002
|
+
: row.index -
|
|
23003
|
+
pagination.pageSize * pagination.pageIndex ===
|
|
23004
|
+
table.getRowModel().rows.length - 1 }, value));
|
|
23005
|
+
})))))))),
|
|
23006
|
+
showPagination && paginationDetails?.totalRows > 0 && (a$n.createElement(CustomPagination, { "$hasData": table.getRowModel().rows.length > 0, totalRows: serverSide ? totalData : table.getFilteredRowModel().rows.length, isLoading: isLoading, rowsPerPage: paginationDetails?.rowsPerPage, startingPage: pageIndex, onPageChange: (page, pageSize) => {
|
|
23007
|
+
table.toggleAllRowsSelected(false);
|
|
23008
|
+
setPageIndex(page);
|
|
23009
|
+
setPagination((prev) => ({
|
|
23010
|
+
...prev,
|
|
23011
|
+
pageIndex: page - 1,
|
|
23012
|
+
}));
|
|
23013
|
+
onPageChange?.(page, pageSize);
|
|
23014
|
+
}, resetTrigger: resetTrigger })))));
|
|
22811
23015
|
}
|
|
22812
23016
|
|
|
22813
23017
|
const SyncContainer = styled.div `
|
|
@@ -22853,7 +23057,7 @@ function convertUTCDateForClient(providedDate) {
|
|
|
22853
23057
|
}
|
|
22854
23058
|
|
|
22855
23059
|
const Sync = ({ dataTestId, onClick, className, id, showTime = false, labelPosition = "left", }) => {
|
|
22856
|
-
const [time, setTime] = a$
|
|
23060
|
+
const [time, setTime] = a$n.useState(formatDateToTime(new Date()));
|
|
22857
23061
|
const handleClick = (e) => {
|
|
22858
23062
|
const svg = e?.currentTarget?.children?.[0];
|
|
22859
23063
|
const button = e?.currentTarget;
|
|
@@ -22866,9 +23070,9 @@ const Sync = ({ dataTestId, onClick, className, id, showTime = false, labelPosit
|
|
|
22866
23070
|
setTime(formatDateToTime(new Date()));
|
|
22867
23071
|
onClick?.(e, time);
|
|
22868
23072
|
};
|
|
22869
|
-
return (a$
|
|
22870
|
-
a$
|
|
22871
|
-
a$
|
|
23073
|
+
return (a$n.createElement(SyncContainer, { "$labelPosition": labelPosition },
|
|
23074
|
+
a$n.createElement(CustomIconButton, { variant: "tertiary", iconName: "sync", size: 16, id: id, className: className, dataTestId: dataTestId, ariaLabel: "Sync Button", onClick: (e) => handleClick(e) }),
|
|
23075
|
+
a$n.createElement(CustomLabel, { htmlFor: id, id: `${id}-label`, labelValue: showTime ? `Last Updated at ${time}` : "" })));
|
|
22872
23076
|
};
|
|
22873
23077
|
|
|
22874
23078
|
const Container = styled.div `
|
|
@@ -22888,7 +23092,7 @@ const HeaderText = styled.span `
|
|
|
22888
23092
|
color: #4d4d4d;
|
|
22889
23093
|
text-align: right;
|
|
22890
23094
|
font-family: Inter;
|
|
22891
|
-
font-size:
|
|
23095
|
+
font-size: 14px;
|
|
22892
23096
|
font-style: normal;
|
|
22893
23097
|
font-weight: 500;
|
|
22894
23098
|
line-height: normal;
|
|
@@ -22897,7 +23101,7 @@ const SubHeaderText = styled.span `
|
|
|
22897
23101
|
color: #9f9f9f;
|
|
22898
23102
|
text-align: right;
|
|
22899
23103
|
font-family: Inter;
|
|
22900
|
-
font-size:
|
|
23104
|
+
font-size: 11px;
|
|
22901
23105
|
font-style: normal;
|
|
22902
23106
|
font-weight: 500;
|
|
22903
23107
|
line-height: normal;
|
|
@@ -22910,10 +23114,10 @@ const TableUnitsAndTotals = ({ id, className, value, subValue, valueRightCategor
|
|
|
22910
23114
|
let subHeader = subValueLeftCategory ?? "";
|
|
22911
23115
|
subHeader += subValue;
|
|
22912
23116
|
subHeader += subValueRightCategory ? ` ${subValueRightCategory}` : "";
|
|
22913
|
-
return (a$
|
|
22914
|
-
a$
|
|
22915
|
-
a$
|
|
22916
|
-
subValue && a$
|
|
23117
|
+
return (a$n.createElement(Container, { id: id, className: className },
|
|
23118
|
+
a$n.createElement(Column, { "$align": "right" },
|
|
23119
|
+
a$n.createElement(HeaderText, null, header),
|
|
23120
|
+
subValue && a$n.createElement(SubHeaderText, null, subHeader))));
|
|
22917
23121
|
};
|
|
22918
23122
|
|
|
22919
23123
|
const PaymentStatusComponent = styled.div `
|
|
@@ -22967,9 +23171,9 @@ const PaymentStatus = ({ variant, id, className }) => {
|
|
|
22967
23171
|
label = "Paid";
|
|
22968
23172
|
if (variant === PaymentStatusVariant.PAYMENT_CANCELED)
|
|
22969
23173
|
label = "Canceled";
|
|
22970
|
-
return (a$
|
|
22971
|
-
iconName ? a$
|
|
22972
|
-
a$
|
|
23174
|
+
return (a$n.createElement(PaymentStatusComponent, { id: id, className: className },
|
|
23175
|
+
iconName ? a$n.createElement(PaymentStatusIcon, { iconName: iconName, size: 16 }) : "",
|
|
23176
|
+
a$n.createElement(PaymentStatusLabel, null, label)));
|
|
22973
23177
|
};
|
|
22974
23178
|
|
|
22975
23179
|
const tabButtonVariantSelector = (variant) => {
|
|
@@ -23070,18 +23274,18 @@ const Tab = ({ id, className, onClick, htmlProps, label, variant = "light", acti
|
|
|
23070
23274
|
const notificationText = typeof notifications === "number" && notifications <= 0
|
|
23071
23275
|
? undefined
|
|
23072
23276
|
: notifications;
|
|
23073
|
-
return (a$
|
|
23277
|
+
return (a$n.createElement(TabButton, { id: id, "$variant": variant, className: `${className} ${active && "active"}`, onClick: () => onClick?.(label), ...htmlProps },
|
|
23074
23278
|
label,
|
|
23075
|
-
!!notificationText && (a$
|
|
23279
|
+
!!notificationText && (a$n.createElement(NotificationBubble, { "$isActive": active }, notificationText))));
|
|
23076
23280
|
};
|
|
23077
23281
|
|
|
23078
23282
|
const Tabs = ({ id, className, tabs, htmlProps, onTabClick, defaultActiveTab, variant = "light", isPill, }) => {
|
|
23079
|
-
const [activeTab, setActiveTab] = a$
|
|
23283
|
+
const [activeTab, setActiveTab] = a$n.useState(defaultActiveTab ?? tabs[0]);
|
|
23080
23284
|
const handleClick = (label) => {
|
|
23081
23285
|
setActiveTab(label);
|
|
23082
23286
|
onTabClick(label);
|
|
23083
23287
|
};
|
|
23084
|
-
return (a$
|
|
23288
|
+
return (a$n.createElement(TabsBar, { "$variant": variant, "$isPill": isPill, id: id, className: className, ...htmlProps }, tabs.map((tab) => (a$n.createElement(Tab, { key: `${id}-${tab.label}`, id: `${id}-${tab.label}`, label: tab.label, active: tab.label === activeTab, variant: variant, onClick: () => handleClick(tab.label), notifications: tab.notifications })))));
|
|
23085
23289
|
};
|
|
23086
23290
|
|
|
23087
23291
|
const SelectorChipWrapper = styled.div `
|
|
@@ -23143,13 +23347,13 @@ const SelectorChipClose = styled.button `
|
|
|
23143
23347
|
`;
|
|
23144
23348
|
|
|
23145
23349
|
const SelectorChip = ({ id, className, label, selected = false, disabled = false, onClick, onClose, }) => {
|
|
23146
|
-
return (a$
|
|
23147
|
-
a$
|
|
23148
|
-
a$
|
|
23149
|
-
selected && (a$
|
|
23350
|
+
return (a$n.createElement(SelectorChipWrapper, { className: className, "$selected": selected, "$disabled": disabled, onClick: onClick, id: id },
|
|
23351
|
+
a$n.createElement(SelectorChipComponent, { "$selected": selected, id: id, type: "button" },
|
|
23352
|
+
a$n.createElement(SelectorChipLabel, { "$selected": selected }, label)),
|
|
23353
|
+
selected && (a$n.createElement(SelectorChipClose, { type: "button", "aria-label": "Remove chip", disabled: disabled, onClick: (e) => {
|
|
23150
23354
|
onClose?.();
|
|
23151
23355
|
} },
|
|
23152
|
-
a$
|
|
23356
|
+
a$n.createElement(e, { size: 16 })))));
|
|
23153
23357
|
};
|
|
23154
23358
|
|
|
23155
23359
|
const OrderStatusComponent = styled.div `
|
|
@@ -23226,12 +23430,196 @@ const OrderStatus = ({ variant = "", id, className, isPurchaser, }) => {
|
|
|
23226
23430
|
};
|
|
23227
23431
|
const iconName = variant ? STATUS_ICON_MAP[variant] : null;
|
|
23228
23432
|
const label = getOrderStatusLabel(variant, isPurchaser);
|
|
23229
|
-
return (a$
|
|
23230
|
-
iconName && a$
|
|
23231
|
-
!iconName && label !== "--" && (a$
|
|
23232
|
-
a$
|
|
23433
|
+
return (a$n.createElement(OrderStatusComponent, { id: id, className: className },
|
|
23434
|
+
iconName && a$n.createElement(OrderStatusIcon, { iconName: iconName, size: 16 }),
|
|
23435
|
+
!iconName && label !== "--" && (a$n.createElement(OrderStatusIcon, { iconName: "warning", size: 16 })),
|
|
23436
|
+
a$n.createElement(OrderStatusLabel, null, label)));
|
|
23437
|
+
};
|
|
23438
|
+
|
|
23439
|
+
const GroupWrapper = styled.fieldset `
|
|
23440
|
+
display: inline-flex;
|
|
23441
|
+
flex-direction: column;
|
|
23442
|
+
border: none;
|
|
23443
|
+
padding: 0;
|
|
23444
|
+
margin: 0;
|
|
23445
|
+
`;
|
|
23446
|
+
const HeadingRow = styled.div `
|
|
23447
|
+
display: flex;
|
|
23448
|
+
align-items: center;
|
|
23449
|
+
margin-bottom: 10px;
|
|
23450
|
+
gap: 10px;
|
|
23451
|
+
|
|
23452
|
+
& > label {
|
|
23453
|
+
margin-bottom: 0;
|
|
23454
|
+
margin-top: 0;
|
|
23455
|
+
font-weight: 600;
|
|
23456
|
+
}
|
|
23457
|
+
`;
|
|
23458
|
+
const Legend = styled.legend `
|
|
23459
|
+
position: absolute;
|
|
23460
|
+
width: 1px;
|
|
23461
|
+
height: 1px;
|
|
23462
|
+
padding: 0;
|
|
23463
|
+
margin: -1px;
|
|
23464
|
+
overflow: hidden;
|
|
23465
|
+
clip: rect(0, 0, 0, 0);
|
|
23466
|
+
white-space: nowrap;
|
|
23467
|
+
border: 0;
|
|
23468
|
+
`;
|
|
23469
|
+
|
|
23470
|
+
var CheckBoxFontSizeVariant;
|
|
23471
|
+
(function (CheckBoxFontSizeVariant) {
|
|
23472
|
+
CheckBoxFontSizeVariant["SIZE_12"] = "12px";
|
|
23473
|
+
CheckBoxFontSizeVariant["SIZE_14"] = "14px";
|
|
23474
|
+
CheckBoxFontSizeVariant["SIZE_16"] = "16px";
|
|
23475
|
+
})(CheckBoxFontSizeVariant || (CheckBoxFontSizeVariant = {}));
|
|
23476
|
+
|
|
23477
|
+
const IconWrapper = styled.span `
|
|
23478
|
+
display: flex;
|
|
23479
|
+
align-items: center;
|
|
23480
|
+
flex-shrink: 0;
|
|
23481
|
+
padding-right: ${({ $hasLabel }) => ($hasLabel ? "9px" : "0px")};
|
|
23482
|
+
padding-top: 1px;
|
|
23483
|
+
position: relative;
|
|
23484
|
+
|
|
23485
|
+
& > svg {
|
|
23486
|
+
display: block;
|
|
23487
|
+
position: relative;
|
|
23488
|
+
z-index: 1;
|
|
23489
|
+
}
|
|
23490
|
+
|
|
23491
|
+
&::before {
|
|
23492
|
+
content: "";
|
|
23493
|
+
position: absolute;
|
|
23494
|
+
top: 3px;
|
|
23495
|
+
left: 2px;
|
|
23496
|
+
width: 14px;
|
|
23497
|
+
height: 14px;
|
|
23498
|
+
background-color: transparent;
|
|
23499
|
+
border-radius: 2px;
|
|
23500
|
+
z-index: 0;
|
|
23501
|
+
transition: background-color 0.15s ease;
|
|
23502
|
+
}
|
|
23503
|
+
`;
|
|
23504
|
+
const CheckBoxWrapper = styled.label `
|
|
23505
|
+
display: inline-flex;
|
|
23506
|
+
width: fit-content;
|
|
23507
|
+
font-weight: 500;
|
|
23508
|
+
font-size: ${({ $fontSize }) => $fontSize};
|
|
23509
|
+
align-items: ${({ $align }) => $align === "center" ? "center" : "flex-start"};
|
|
23510
|
+
cursor: ${({ $disabled }) => ($disabled ? "not-allowed" : "pointer")};
|
|
23511
|
+
color: ${({ $disabled }) => $disabled ? Styles.color.grey.smoke : Styles.color.grey.charcoal};
|
|
23512
|
+
user-select: none;
|
|
23513
|
+
margin-bottom: 10px;
|
|
23514
|
+
margin-top: 0px;
|
|
23515
|
+
${({ $disabled }) => !$disabled &&
|
|
23516
|
+
styled.css `
|
|
23517
|
+
&:hover ${IconWrapper}::before {
|
|
23518
|
+
background-color: ${Styles.color.blue.light};
|
|
23519
|
+
}
|
|
23520
|
+
`}
|
|
23521
|
+
`;
|
|
23522
|
+
const HiddenInput = styled.input.attrs({ type: "checkbox" }) `
|
|
23523
|
+
position: absolute;
|
|
23524
|
+
opacity: 0;
|
|
23525
|
+
width: 0;
|
|
23526
|
+
height: 0;
|
|
23527
|
+
`;
|
|
23528
|
+
const LabelGroup = styled.div `
|
|
23529
|
+
display: flex;
|
|
23530
|
+
flex-direction: column;
|
|
23531
|
+
`;
|
|
23532
|
+
const MainLabel = styled.span `
|
|
23533
|
+
font-family: ${Styles.font.fontFamily.primary};
|
|
23534
|
+
line-height: 1.4;
|
|
23535
|
+
margin-bottom: 0px;
|
|
23536
|
+
`;
|
|
23537
|
+
|
|
23538
|
+
const CheckBox = ({ id, className, label, checked, indeterminate = false, disabled = false, defaultChecked = false, align = "top", fontSize = CheckBoxFontSizeVariant.SIZE_14, onChange, htmlProps, }) => {
|
|
23539
|
+
const [internalChecked, setInternalChecked] = a$n.useState(defaultChecked);
|
|
23540
|
+
const isChecked = checked ?? internalChecked;
|
|
23541
|
+
const [isIndeterminate, setIsIndeterminate] = a$n.useState(indeterminate);
|
|
23542
|
+
const [prevIndeterminate, setPrevIndeterminate] = a$n.useState(indeterminate);
|
|
23543
|
+
const inputRef = a$n.useRef(null);
|
|
23544
|
+
if (prevIndeterminate !== indeterminate) {
|
|
23545
|
+
setPrevIndeterminate(indeterminate);
|
|
23546
|
+
setIsIndeterminate(indeterminate);
|
|
23547
|
+
}
|
|
23548
|
+
a$n.useEffect(() => {
|
|
23549
|
+
if (inputRef.current) {
|
|
23550
|
+
inputRef.current.indeterminate = isIndeterminate;
|
|
23551
|
+
}
|
|
23552
|
+
}, [isIndeterminate]);
|
|
23553
|
+
const handleChange = (e) => {
|
|
23554
|
+
setIsIndeterminate(false);
|
|
23555
|
+
if (!checked)
|
|
23556
|
+
setInternalChecked(e.target.checked);
|
|
23557
|
+
onChange?.(id, e.target.checked);
|
|
23558
|
+
};
|
|
23559
|
+
const getIcon = () => {
|
|
23560
|
+
const color = disabled
|
|
23561
|
+
? Styles.color.grey.medium
|
|
23562
|
+
: Styles.color.core.primary;
|
|
23563
|
+
if (isIndeterminate)
|
|
23564
|
+
return (a$n.createElement(o$9, { "data-testid": "indeterminate-icon", className: "checkbox-icon", size: 18, weight: "fill", color: color }));
|
|
23565
|
+
if (isChecked)
|
|
23566
|
+
return (a$n.createElement(o$j, { "data-testid": "check-icon", className: "checkbox-icon", size: 18, weight: "fill", color: color }));
|
|
23567
|
+
return (a$n.createElement(o$3, { "data-testid": "square-icon", className: "checkbox-icon", size: 18, weight: "regular", color: color }));
|
|
23568
|
+
};
|
|
23569
|
+
return (a$n.createElement(CheckBoxWrapper, { id: `${id}-label`, className: className, "$disabled": disabled, "$align": align, "$fontSize": fontSize },
|
|
23570
|
+
a$n.createElement(HiddenInput, { id: id, ref: inputRef, checked: isChecked, disabled: disabled, onChange: handleChange, ...htmlProps }),
|
|
23571
|
+
a$n.createElement(IconWrapper, { "$disabled": disabled, "$hasLabel": !!label }, getIcon()),
|
|
23572
|
+
label && (a$n.createElement(LabelGroup, null,
|
|
23573
|
+
a$n.createElement(MainLabel, null, label)))));
|
|
23574
|
+
};
|
|
23575
|
+
|
|
23576
|
+
const CheckBoxGroup = ({ defaultOptions, onChange, heading, required, tooltipText, disabled, isSelectAllEnabled, fontSize, className, }) => {
|
|
23577
|
+
const [options, setOptions] = a$n.useState(defaultOptions);
|
|
23578
|
+
const selectableOptions = options.filter((o) => !o.disabled);
|
|
23579
|
+
const allSelected = selectableOptions.length > 0 && selectableOptions.every((o) => o.checked);
|
|
23580
|
+
const someSelected = selectableOptions.some((o) => o.checked);
|
|
23581
|
+
const mergeOptions = (prev, updated) => prev.map((o) => {
|
|
23582
|
+
const u = updated.find((x) => x.id === o.id);
|
|
23583
|
+
return u ? { ...o, checked: u.isChecked } : o;
|
|
23584
|
+
});
|
|
23585
|
+
const buildPayload = (updatedOptions) => {
|
|
23586
|
+
const optionsPayload = options.map((o) => {
|
|
23587
|
+
const updated = updatedOptions.find((u) => u.id === o.id);
|
|
23588
|
+
return (updated ?? {
|
|
23589
|
+
id: o.id,
|
|
23590
|
+
isChecked: !!o.checked,
|
|
23591
|
+
isSelectAllClicked: false,
|
|
23592
|
+
});
|
|
23593
|
+
});
|
|
23594
|
+
setOptions((prev) => mergeOptions(prev, optionsPayload));
|
|
23595
|
+
return { options: optionsPayload };
|
|
23596
|
+
};
|
|
23597
|
+
const handleSelectAll = (id, checked) => {
|
|
23598
|
+
const updatedOptions = selectableOptions.map((o) => ({
|
|
23599
|
+
id: o.id,
|
|
23600
|
+
isChecked: checked,
|
|
23601
|
+
isSelectAllClicked: true,
|
|
23602
|
+
}));
|
|
23603
|
+
onChange(buildPayload(updatedOptions));
|
|
23604
|
+
};
|
|
23605
|
+
return (a$n.createElement(GroupWrapper, { className: className },
|
|
23606
|
+
heading && a$n.createElement(Legend, null, heading),
|
|
23607
|
+
heading && (a$n.createElement(HeadingRow, null,
|
|
23608
|
+
isSelectAllEnabled && (a$n.createElement(CheckBox, { id: "select-all", checked: allSelected, indeterminate: someSelected && !allSelected, disabled: disabled, fontSize: fontSize, onChange: handleSelectAll })),
|
|
23609
|
+
a$n.createElement(Label, { id: "checkbox-group-label", labelValue: heading, required: required, tooltipText: tooltipText, htmlFor: isSelectAllEnabled ? "select-all" : "", isPointerOnHover: true }))),
|
|
23610
|
+
options.map((option) => (a$n.createElement(CheckBox, { key: option.id, id: option.id, label: option.label, checked: option.checked, disabled: disabled || option.disabled, indeterminate: option.indeterminate, fontSize: fontSize, onChange: (clickedId, checked) => {
|
|
23611
|
+
onChange(buildPayload([
|
|
23612
|
+
{
|
|
23613
|
+
id: clickedId,
|
|
23614
|
+
isChecked: checked,
|
|
23615
|
+
isSelectAllClicked: false,
|
|
23616
|
+
},
|
|
23617
|
+
]));
|
|
23618
|
+
} })))));
|
|
23233
23619
|
};
|
|
23234
23620
|
|
|
23621
|
+
exports.CheckBox = CheckBox;
|
|
23622
|
+
exports.CheckBoxGroup = CheckBoxGroup;
|
|
23235
23623
|
exports.HelperText = HelperText;
|
|
23236
23624
|
exports.IconButton = IconButton;
|
|
23237
23625
|
exports.Label = Label;
|