@ufal-lccv/gpsub-ds 0.0.2 → 0.0.3
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/{Table.view-UCmWpeaZ.js → Table.view-7jml1TLc.js} +701 -671
- package/dist/{Table.view-BVUfCC2F.cjs → Table.view-C2cfRt6f.cjs} +26 -26
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/organisms/Table/Table.types.d.ts +1 -0
- package/dist/components/organisms/Table/Table.view.d.ts +1 -1
- package/dist/components/organisms/index.cjs.js +1 -1
- package/dist/components/organisms/index.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { G as pe, l as n, C as
|
|
2
|
-
import Ce, { useCallback as de, useMemo as
|
|
3
|
-
import { sg as e, Icon as
|
|
4
|
-
import { v as Q, r as
|
|
1
|
+
import { G as pe, l as n, C as G, j as me, c as Se, H as C, J as F, s as $e, T as se, i as ae, S as be, I as xe, K as we, E as ye } from "./Checkbox.view-DCFdmWxN.js";
|
|
2
|
+
import Ce, { useCallback as de, useMemo as q, useState as D, useRef as J, useEffect as K, forwardRef as ce, isValidElement as ie, useLayoutEffect as ke } from "react";
|
|
3
|
+
import { sg as e, Icon as Y } from "sbwb-ds";
|
|
4
|
+
import { v as Q, r as U, b as ze } from "./index-_v6RoRxb.js";
|
|
5
5
|
import { Controller as ne } from "react-hook-form";
|
|
6
|
-
function te(o, t,
|
|
7
|
-
var
|
|
6
|
+
function te(o, t, i) {
|
|
7
|
+
var l, c, d, a, b;
|
|
8
8
|
t == null && (t = 100);
|
|
9
|
-
function
|
|
10
|
-
var m = Date.now() -
|
|
11
|
-
m < t && m >= 0 ?
|
|
9
|
+
function h() {
|
|
10
|
+
var m = Date.now() - a;
|
|
11
|
+
m < t && m >= 0 ? l = setTimeout(h, t - m) : (l = null, i || (b = o.apply(d, c), d = c = null));
|
|
12
12
|
}
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var m =
|
|
16
|
-
return
|
|
13
|
+
var p = function() {
|
|
14
|
+
d = this, c = arguments, a = Date.now();
|
|
15
|
+
var m = i && !l;
|
|
16
|
+
return l || (l = setTimeout(h, t)), m && (b = o.apply(d, c), d = c = null), b;
|
|
17
17
|
};
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
},
|
|
18
|
+
return p.clear = function() {
|
|
19
|
+
l && (clearTimeout(l), l = null);
|
|
20
|
+
}, p.flush = function() {
|
|
21
|
+
l && (b = o.apply(d, c), d = c = null, clearTimeout(l), l = null);
|
|
22
|
+
}, p;
|
|
23
23
|
}
|
|
24
24
|
te.debounce = te;
|
|
25
25
|
var Be = te;
|
|
@@ -27,103 +27,103 @@ const We = /* @__PURE__ */ pe(Be);
|
|
|
27
27
|
function re({
|
|
28
28
|
form: o,
|
|
29
29
|
fieldName: t,
|
|
30
|
-
triggerType:
|
|
31
|
-
debounceTime:
|
|
30
|
+
triggerType: i = null,
|
|
31
|
+
debounceTime: l = 500
|
|
32
32
|
}) {
|
|
33
33
|
const c = de(() => {
|
|
34
34
|
o.trigger(t);
|
|
35
|
-
}, [o, t]),
|
|
36
|
-
() => We(() => c(),
|
|
37
|
-
[c,
|
|
38
|
-
),
|
|
39
|
-
() => ["all", "onChange"].includes(
|
|
40
|
-
[
|
|
41
|
-
),
|
|
42
|
-
() => ["all", "onBlur"].includes(
|
|
43
|
-
[
|
|
35
|
+
}, [o, t]), d = q(
|
|
36
|
+
() => We(() => c(), l),
|
|
37
|
+
[c, l]
|
|
38
|
+
), a = q(
|
|
39
|
+
() => ["all", "onChange"].includes(i) ? d : null,
|
|
40
|
+
[d, i]
|
|
41
|
+
), b = q(
|
|
42
|
+
() => ["all", "onBlur"].includes(i) ? c : null,
|
|
43
|
+
[i]
|
|
44
44
|
);
|
|
45
|
-
return
|
|
45
|
+
return q(
|
|
46
46
|
() => ({
|
|
47
|
-
onChangeTrigger:
|
|
48
|
-
onBlurTrigger:
|
|
47
|
+
onChangeTrigger: a,
|
|
48
|
+
onBlurTrigger: b
|
|
49
49
|
}),
|
|
50
|
-
[
|
|
50
|
+
[a, b]
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
const go = ({
|
|
54
54
|
form: o,
|
|
55
55
|
name: t,
|
|
56
|
-
label:
|
|
57
|
-
options:
|
|
56
|
+
label: i,
|
|
57
|
+
options: l,
|
|
58
58
|
readonly: c = !1,
|
|
59
|
-
disabled:
|
|
60
|
-
optionsMap:
|
|
61
|
-
width:
|
|
62
|
-
flex:
|
|
63
|
-
placeholder:
|
|
59
|
+
disabled: d = !1,
|
|
60
|
+
optionsMap: a,
|
|
61
|
+
width: b = "100%",
|
|
62
|
+
flex: h,
|
|
63
|
+
placeholder: p,
|
|
64
64
|
onSelect: m,
|
|
65
65
|
parser: f,
|
|
66
|
-
filter:
|
|
67
|
-
tooltipProps:
|
|
68
|
-
infoProps:
|
|
69
|
-
maxHeigthMenu:
|
|
70
|
-
isRequired:
|
|
71
|
-
onRemoveSelected:
|
|
72
|
-
triggerFormField:
|
|
73
|
-
...
|
|
66
|
+
filter: x,
|
|
67
|
+
tooltipProps: M = {},
|
|
68
|
+
infoProps: W = {},
|
|
69
|
+
maxHeigthMenu: B,
|
|
70
|
+
isRequired: y = !1,
|
|
71
|
+
onRemoveSelected: R,
|
|
72
|
+
triggerFormField: S = null,
|
|
73
|
+
...j
|
|
74
74
|
}) => {
|
|
75
|
-
const { onChangeTrigger:
|
|
75
|
+
const { onChangeTrigger: I } = re({
|
|
76
76
|
form: o,
|
|
77
77
|
fieldName: t,
|
|
78
|
-
triggerType:
|
|
78
|
+
triggerType: S,
|
|
79
79
|
debounceTime: 0
|
|
80
|
-
}),
|
|
80
|
+
}), g = {
|
|
81
81
|
position: "top",
|
|
82
|
-
...
|
|
83
|
-
},
|
|
84
|
-
...
|
|
82
|
+
...M
|
|
83
|
+
}, P = {
|
|
84
|
+
...W,
|
|
85
85
|
tooltipProps: {
|
|
86
86
|
position: "top",
|
|
87
87
|
maxWidth: "300px",
|
|
88
|
-
...
|
|
88
|
+
...W == null ? void 0 : W.tooltipProps
|
|
89
89
|
}
|
|
90
|
-
},
|
|
91
|
-
let
|
|
92
|
-
f && (
|
|
93
|
-
},
|
|
94
|
-
return /* @__PURE__ */ n.jsx(
|
|
90
|
+
}, A = (u, v) => {
|
|
91
|
+
let N = u;
|
|
92
|
+
f && (N = f == null ? void 0 : f(u)), v(N), m == null || m(N), I == null || I();
|
|
93
|
+
}, T = q(() => Q(a) ? a : Object.fromEntries(l.map((u) => [u.value, u])), [l, a]);
|
|
94
|
+
return /* @__PURE__ */ n.jsx(G, { width: b, flex: h, children: /* @__PURE__ */ n.jsx(
|
|
95
95
|
ne,
|
|
96
96
|
{
|
|
97
97
|
name: t,
|
|
98
98
|
control: o.control,
|
|
99
99
|
render: ({
|
|
100
|
-
field: { onChange:
|
|
101
|
-
fieldState: { error:
|
|
100
|
+
field: { onChange: u, value: v },
|
|
101
|
+
fieldState: { error: N = null }
|
|
102
102
|
}) => {
|
|
103
|
-
let
|
|
103
|
+
let L = T[v];
|
|
104
104
|
return /* @__PURE__ */ n.jsx(
|
|
105
105
|
fe,
|
|
106
106
|
{
|
|
107
|
-
label:
|
|
107
|
+
label: i,
|
|
108
108
|
width: "100%",
|
|
109
109
|
size: "Small",
|
|
110
|
-
disabled:
|
|
110
|
+
disabled: d,
|
|
111
111
|
readonly: c,
|
|
112
|
-
filter:
|
|
113
|
-
errorMessage:
|
|
114
|
-
placeholder:
|
|
115
|
-
value:
|
|
116
|
-
handleOption: (
|
|
117
|
-
|
|
112
|
+
filter: x,
|
|
113
|
+
errorMessage: N == null ? void 0 : N.message,
|
|
114
|
+
placeholder: p,
|
|
115
|
+
value: L,
|
|
116
|
+
handleOption: (w) => {
|
|
117
|
+
A(w.value, u);
|
|
118
118
|
},
|
|
119
|
-
tooltipProps:
|
|
120
|
-
options:
|
|
121
|
-
maxHeigthMenu:
|
|
122
|
-
infoProps:
|
|
123
|
-
maxHeightMenu:
|
|
124
|
-
isRequired:
|
|
125
|
-
onRemoveSelected:
|
|
126
|
-
...
|
|
119
|
+
tooltipProps: g,
|
|
120
|
+
options: l,
|
|
121
|
+
maxHeigthMenu: B,
|
|
122
|
+
infoProps: P,
|
|
123
|
+
maxHeightMenu: B,
|
|
124
|
+
isRequired: y,
|
|
125
|
+
onRemoveSelected: R,
|
|
126
|
+
...j
|
|
127
127
|
}
|
|
128
128
|
);
|
|
129
129
|
}
|
|
@@ -132,55 +132,55 @@ const go = ({
|
|
|
132
132
|
}, je = ({
|
|
133
133
|
form: o,
|
|
134
134
|
name: t,
|
|
135
|
-
label:
|
|
136
|
-
readonly:
|
|
135
|
+
label: i,
|
|
136
|
+
readonly: l = !1,
|
|
137
137
|
disabled: c = !1,
|
|
138
|
-
width:
|
|
139
|
-
height:
|
|
140
|
-
flex:
|
|
141
|
-
placeholder:
|
|
142
|
-
charactersCounter:
|
|
138
|
+
width: d = "100%",
|
|
139
|
+
height: a = "100%",
|
|
140
|
+
flex: b,
|
|
141
|
+
placeholder: h,
|
|
142
|
+
charactersCounter: p = !0,
|
|
143
143
|
maxlength: m = 1e3,
|
|
144
144
|
resize: f = !0,
|
|
145
|
-
triggerFormField:
|
|
146
|
-
minHeight:
|
|
147
|
-
maxHeight:
|
|
148
|
-
...
|
|
145
|
+
triggerFormField: x = null,
|
|
146
|
+
minHeight: M,
|
|
147
|
+
maxHeight: W,
|
|
148
|
+
...B
|
|
149
149
|
}) => {
|
|
150
|
-
const { onChangeTrigger:
|
|
150
|
+
const { onChangeTrigger: y } = re({
|
|
151
151
|
form: o,
|
|
152
152
|
fieldName: t,
|
|
153
|
-
triggerType:
|
|
154
|
-
}),
|
|
155
|
-
|
|
153
|
+
triggerType: x
|
|
154
|
+
}), R = (S, j) => {
|
|
155
|
+
j(S), y == null || y();
|
|
156
156
|
};
|
|
157
|
-
return /* @__PURE__ */ n.jsx(
|
|
157
|
+
return /* @__PURE__ */ n.jsx(G, { width: d, flex: b, height: a, children: /* @__PURE__ */ n.jsx(
|
|
158
158
|
ne,
|
|
159
159
|
{
|
|
160
160
|
name: t,
|
|
161
161
|
control: o.control,
|
|
162
162
|
render: ({
|
|
163
|
-
field: { onChange:
|
|
164
|
-
fieldState: { error:
|
|
163
|
+
field: { onChange: S, value: j },
|
|
164
|
+
fieldState: { error: I = null }
|
|
165
165
|
}) => /* @__PURE__ */ n.jsx(
|
|
166
166
|
me,
|
|
167
167
|
{
|
|
168
|
-
label:
|
|
169
|
-
value:
|
|
168
|
+
label: i,
|
|
169
|
+
value: j || "",
|
|
170
170
|
width: "100%",
|
|
171
171
|
disabled: c,
|
|
172
|
-
readonly:
|
|
173
|
-
height:
|
|
174
|
-
minHeight:
|
|
175
|
-
maxHeight:
|
|
176
|
-
errorMessage:
|
|
177
|
-
placeholder:
|
|
178
|
-
onChange: (
|
|
179
|
-
charactersCounter:
|
|
172
|
+
readonly: l,
|
|
173
|
+
height: a,
|
|
174
|
+
minHeight: M,
|
|
175
|
+
maxHeight: W,
|
|
176
|
+
errorMessage: I == null ? void 0 : I.message,
|
|
177
|
+
placeholder: h,
|
|
178
|
+
onChange: (g) => R(g.target.value, S),
|
|
179
|
+
charactersCounter: p,
|
|
180
180
|
maxlength: m,
|
|
181
181
|
size: "Small",
|
|
182
182
|
resize: f,
|
|
183
|
-
...
|
|
183
|
+
...B
|
|
184
184
|
}
|
|
185
185
|
)
|
|
186
186
|
}
|
|
@@ -190,60 +190,60 @@ je.displayName = "TextareaField";
|
|
|
190
190
|
const po = ({
|
|
191
191
|
form: o,
|
|
192
192
|
name: t,
|
|
193
|
-
id:
|
|
194
|
-
label:
|
|
193
|
+
id: i = t,
|
|
194
|
+
label: l,
|
|
195
195
|
readonly: c = !1,
|
|
196
|
-
disabled:
|
|
197
|
-
afterCheck:
|
|
198
|
-
width:
|
|
199
|
-
formatter:
|
|
200
|
-
parser:
|
|
196
|
+
disabled: d = !1,
|
|
197
|
+
afterCheck: a,
|
|
198
|
+
width: b = "100%",
|
|
199
|
+
formatter: h,
|
|
200
|
+
parser: p,
|
|
201
201
|
flex: m,
|
|
202
202
|
size: f = "Medium",
|
|
203
|
-
triggerFormField:
|
|
204
|
-
...
|
|
203
|
+
triggerFormField: x = null,
|
|
204
|
+
...M
|
|
205
205
|
}) => {
|
|
206
|
-
const { onChangeTrigger:
|
|
206
|
+
const { onChangeTrigger: W } = re({
|
|
207
207
|
form: o,
|
|
208
208
|
fieldName: t,
|
|
209
|
-
triggerType:
|
|
209
|
+
triggerType: x,
|
|
210
210
|
debounceTime: 0
|
|
211
|
-
}),
|
|
212
|
-
|
|
211
|
+
}), B = (y, R) => {
|
|
212
|
+
R(y), a == null || a(y), W == null || W();
|
|
213
213
|
};
|
|
214
|
-
return /* @__PURE__ */ n.jsx(
|
|
214
|
+
return /* @__PURE__ */ n.jsx(G, { width: b, flex: m, children: /* @__PURE__ */ n.jsx(
|
|
215
215
|
ne,
|
|
216
216
|
{
|
|
217
217
|
name: t,
|
|
218
218
|
control: o.control,
|
|
219
219
|
render: ({
|
|
220
|
-
field: { onChange:
|
|
221
|
-
fieldState: { error:
|
|
220
|
+
field: { onChange: y, value: R },
|
|
221
|
+
fieldState: { error: S = null }
|
|
222
222
|
}) => {
|
|
223
|
-
const
|
|
224
|
-
return
|
|
223
|
+
const j = S == null ? void 0 : S.message;
|
|
224
|
+
return j && console.log("Error on checkbox!", j), /* @__PURE__ */ n.jsx(
|
|
225
225
|
Se,
|
|
226
226
|
{
|
|
227
|
-
id: `form-checkbox-${
|
|
228
|
-
checked: (
|
|
227
|
+
id: `form-checkbox-${i}`,
|
|
228
|
+
checked: (h == null ? void 0 : h(R)) ?? R,
|
|
229
229
|
name: t,
|
|
230
|
-
label:
|
|
231
|
-
disabled:
|
|
232
|
-
onChange: (
|
|
233
|
-
|
|
234
|
-
(
|
|
235
|
-
|
|
230
|
+
label: l,
|
|
231
|
+
disabled: d || c,
|
|
232
|
+
onChange: (I) => {
|
|
233
|
+
B(
|
|
234
|
+
(p == null ? void 0 : p(I.target.checked, R)) ?? I.target.checked,
|
|
235
|
+
y
|
|
236
236
|
);
|
|
237
237
|
},
|
|
238
238
|
size: f,
|
|
239
|
-
...
|
|
239
|
+
...M
|
|
240
240
|
}
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
) });
|
|
245
|
-
}, Ne =
|
|
246
|
-
${
|
|
245
|
+
}, Ne = C.ul`
|
|
246
|
+
${U}
|
|
247
247
|
position: fixed;
|
|
248
248
|
margin-top: ${({ marginTop: o }) => o};
|
|
249
249
|
padding: ${e.spacings.spacingStack.spacingStackXs} 4px
|
|
@@ -272,16 +272,16 @@ const po = ({
|
|
|
272
272
|
background: ${e.colors.neutralColors.colorNeutralClean};
|
|
273
273
|
border-radius: ${e.borders.borderRadius.borderRadiusPill};
|
|
274
274
|
}
|
|
275
|
-
`, Ie =
|
|
276
|
-
${
|
|
275
|
+
`, Ie = C.li`
|
|
276
|
+
${U}
|
|
277
277
|
font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
|
|
278
278
|
font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodyMd : e.fonts.fontSize.fontSizeBodyLg};
|
|
279
279
|
padding: ${e.spacings.spacingInline.spacingInlineXs};
|
|
280
280
|
margin: 0 ${e.spacings.spacingInline.spacingInlineXs};
|
|
281
281
|
cursor: default;
|
|
282
282
|
color: ${e.colors.neutralColors.colorNeutralDark};
|
|
283
|
-
`, ve =
|
|
284
|
-
${
|
|
283
|
+
`, ve = C.li`
|
|
284
|
+
${U}
|
|
285
285
|
display: flex;
|
|
286
286
|
flex: 2;
|
|
287
287
|
flex-direction: ${({ menuOptionFlexDirection: o }) => o};
|
|
@@ -295,7 +295,7 @@ const po = ({
|
|
|
295
295
|
min-width: 0;
|
|
296
296
|
& > p {
|
|
297
297
|
display: -webkit-box;
|
|
298
|
-
${({ truncateText: o }) => o &&
|
|
298
|
+
${({ truncateText: o }) => o && F`
|
|
299
299
|
-webkit-line-clamp: 2;
|
|
300
300
|
-webkit-box-orient: vertical;
|
|
301
301
|
overflow: hidden;
|
|
@@ -303,7 +303,7 @@ const po = ({
|
|
|
303
303
|
text-overflow: ellipsis;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
${({ hasDescription: o }) => o &&
|
|
306
|
+
${({ hasDescription: o }) => o && F`
|
|
307
307
|
line-height: ${e.fonts.lineHeight.lineHeightMd(
|
|
308
308
|
e.fonts.fontSize.fontSizeBodyMd
|
|
309
309
|
)};
|
|
@@ -314,8 +314,8 @@ const po = ({
|
|
|
314
314
|
color: ${({ disabled: t }) => t ? e.colors.neutralColors.colorNeutralCleanest : e.colors.neutralColors.colorNeutralCloudy};
|
|
315
315
|
}
|
|
316
316
|
`}
|
|
317
|
-
`,
|
|
318
|
-
${
|
|
317
|
+
`, Me = C.li`
|
|
318
|
+
${U}
|
|
319
319
|
font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodySm : e.fonts.fontSize.fontSizeBodyMd};
|
|
320
320
|
font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
|
|
321
321
|
font-weight: ${e.fonts.fontWeight.fontWeightSemiBold};
|
|
@@ -325,20 +325,20 @@ const po = ({
|
|
|
325
325
|
margin: ${({ size: o }) => o === "Small" ? `${e.spacings.spacingStack.spacingStackSm} ${e.spacings.spacingInline.spacingInlineXs}
|
|
326
326
|
${e.spacings.spacingStack.spacingStackNano}` : `${e.spacings.spacingStack.spacingStackSm} ${e.spacings.spacingInline.spacingInlineXs}
|
|
327
327
|
${e.spacings.spacingStack.spacingStackXs}`};
|
|
328
|
-
`,
|
|
329
|
-
${
|
|
328
|
+
`, He = C.span`
|
|
329
|
+
${U}
|
|
330
330
|
font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
|
|
331
331
|
font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodyMd : e.fonts.fontSize.fontSizeBodyLg};
|
|
332
332
|
font-weight: ${e.fonts.fontWeight.fontWeightSemiBold};
|
|
333
333
|
line-height: ${({ size: o }) => o === "Small" ? e.fonts.lineHeight.lineHeightSm(e.fonts.fontSize.fontSizeBodyMd) : e.fonts.lineHeight.lineHeightMd(e.fonts.fontSize.fontSizeBodyLg)};
|
|
334
|
-
`,
|
|
335
|
-
${
|
|
334
|
+
`, Re = C.div`
|
|
335
|
+
${U}
|
|
336
336
|
display: flex;
|
|
337
337
|
font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
|
|
338
338
|
|
|
339
339
|
& > p {
|
|
340
340
|
width: 100%;
|
|
341
|
-
${({ truncateText: o }) => o &&
|
|
341
|
+
${({ truncateText: o }) => o && F`
|
|
342
342
|
display: -webkit-box;
|
|
343
343
|
-webkit-line-clamp: 2;
|
|
344
344
|
-webkit-box-orient: vertical;
|
|
@@ -347,8 +347,8 @@ const po = ({
|
|
|
347
347
|
text-overflow: ellipsis;
|
|
348
348
|
text-align: start;
|
|
349
349
|
}
|
|
350
|
-
`, Fe =
|
|
351
|
-
${
|
|
350
|
+
`, Fe = C.div`
|
|
351
|
+
${U}
|
|
352
352
|
display: flex;
|
|
353
353
|
flex-direction: row;
|
|
354
354
|
align-items: center;
|
|
@@ -358,161 +358,161 @@ const po = ({
|
|
|
358
358
|
background-color: ${({ highlightedIndex: o, disabled: t }) => o ? t ? e.colors.backgroundColors.colorBackgroundSnow : e.colors.neutralColors.colorNeutralLight : e.colors.backgroundColors.colorBackgroundSnow};
|
|
359
359
|
border-radius: ${e.borders.borderRadius.borderRadiusSm};
|
|
360
360
|
min-height: ${({ size: o }) => o === "Small" ? "28px" : "40px"};
|
|
361
|
-
`, Ee =
|
|
362
|
-
${
|
|
361
|
+
`, Ee = C.div`
|
|
362
|
+
${U}
|
|
363
363
|
padding: ${({ iconPosition: o }) => o === "left" ? `0 ${e.spacings.spacingInline.spacingInlineNano} 0 0` : `0 0 0 ${e.spacings.spacingInline.spacingInlineNano}`};
|
|
364
364
|
margin: 0;
|
|
365
365
|
display: flex;
|
|
366
366
|
align-self: center;
|
|
367
|
-
`, Le = (o, t,
|
|
368
|
-
const [
|
|
369
|
-
if (!o.current || !
|
|
370
|
-
const f = o.current.getBoundingClientRect(),
|
|
371
|
-
let
|
|
372
|
-
|
|
373
|
-
let
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
const
|
|
377
|
-
Object.assign(
|
|
367
|
+
`, Le = (o, t, i = 0, l = 0, c = "left") => {
|
|
368
|
+
const [d, a] = D(0), [b, h] = D(), p = J(null), m = de(() => {
|
|
369
|
+
if (!o.current || !p.current) return;
|
|
370
|
+
const f = o.current.getBoundingClientRect(), x = p.current.getBoundingClientRect(), M = window.innerHeight, W = window.innerWidth, B = f.top, y = M - f.bottom, R = y < x.height + l && B > y;
|
|
371
|
+
let S;
|
|
372
|
+
R ? (S = f.top - x.height - i, p.current.style.maxHeight = `${B - i}px`) : (S = f.bottom + l, p.current.style.maxHeight = `${y - l}px`);
|
|
373
|
+
let j = f.left;
|
|
374
|
+
const I = j + x.width - W;
|
|
375
|
+
I > 0 && (j -= I), j < 0 && (j = 0);
|
|
376
|
+
const g = W - f.right;
|
|
377
|
+
Object.assign(p.current.style, {
|
|
378
378
|
position: "fixed",
|
|
379
|
-
top: `${
|
|
380
|
-
...c === "left" ? { left: `${
|
|
381
|
-
width: `${Math.max(f.width,
|
|
379
|
+
top: `${S}px`,
|
|
380
|
+
...c === "left" ? { left: `${j}px` } : { right: `${g}px` },
|
|
381
|
+
width: `${Math.max(f.width, x.width)}px`,
|
|
382
382
|
overflowY: "auto"
|
|
383
383
|
});
|
|
384
|
-
}, [
|
|
385
|
-
return
|
|
386
|
-
var
|
|
387
|
-
|
|
384
|
+
}, [i, l, c]);
|
|
385
|
+
return K(() => {
|
|
386
|
+
var x;
|
|
387
|
+
a(0), h((x = o.current) == null ? void 0 : x.clientWidth), m();
|
|
388
388
|
const f = () => m();
|
|
389
389
|
return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
390
390
|
window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
391
391
|
};
|
|
392
392
|
}, [o, m]), {
|
|
393
|
-
highlightedIndex:
|
|
394
|
-
setHighlightedIndex:
|
|
393
|
+
highlightedIndex: d,
|
|
394
|
+
setHighlightedIndex: a,
|
|
395
395
|
isOptionSelected: (f) => f.label === (t == null ? void 0 : t.label),
|
|
396
|
-
optionsRef:
|
|
397
|
-
parentWidth:
|
|
396
|
+
optionsRef: p,
|
|
397
|
+
parentWidth: b
|
|
398
398
|
};
|
|
399
399
|
}, le = ce(
|
|
400
400
|
({
|
|
401
401
|
selectContainerRef: o,
|
|
402
402
|
optionsSelect: t,
|
|
403
|
-
size:
|
|
404
|
-
selectOption:
|
|
403
|
+
size: i,
|
|
404
|
+
selectOption: l,
|
|
405
405
|
value: c,
|
|
406
|
-
inputValue:
|
|
407
|
-
widthMenu:
|
|
408
|
-
maxHeightMenu:
|
|
409
|
-
menuIsOpen:
|
|
410
|
-
onEnter:
|
|
406
|
+
inputValue: d,
|
|
407
|
+
widthMenu: a,
|
|
408
|
+
maxHeightMenu: b = "180px",
|
|
409
|
+
menuIsOpen: h,
|
|
410
|
+
onEnter: p,
|
|
411
411
|
marginTop: m = "4px",
|
|
412
412
|
iconName: f,
|
|
413
|
-
iconColor:
|
|
414
|
-
iconPosition:
|
|
415
|
-
topOffset:
|
|
416
|
-
bottomOffset:
|
|
417
|
-
truncateText:
|
|
418
|
-
menuJustifyContent:
|
|
419
|
-
tableActionButton:
|
|
420
|
-
menuLateralPadding:
|
|
421
|
-
menuOptionFlexDirection:
|
|
422
|
-
confirmSelection:
|
|
423
|
-
menuAlign:
|
|
424
|
-
},
|
|
413
|
+
iconColor: x,
|
|
414
|
+
iconPosition: M,
|
|
415
|
+
topOffset: W = 0,
|
|
416
|
+
bottomOffset: B = 0,
|
|
417
|
+
truncateText: y = !0,
|
|
418
|
+
menuJustifyContent: R = "flex-start",
|
|
419
|
+
tableActionButton: S,
|
|
420
|
+
menuLateralPadding: j = "8px",
|
|
421
|
+
menuOptionFlexDirection: I = "column",
|
|
422
|
+
confirmSelection: g,
|
|
423
|
+
menuAlign: P = "left"
|
|
424
|
+
}, A) => {
|
|
425
425
|
Q(f) && (f += "Ant");
|
|
426
426
|
const {
|
|
427
|
-
highlightedIndex:
|
|
428
|
-
setHighlightedIndex:
|
|
429
|
-
isOptionSelected:
|
|
430
|
-
optionsRef:
|
|
431
|
-
parentWidth:
|
|
427
|
+
highlightedIndex: T,
|
|
428
|
+
setHighlightedIndex: u,
|
|
429
|
+
isOptionSelected: v,
|
|
430
|
+
optionsRef: N,
|
|
431
|
+
parentWidth: L
|
|
432
432
|
} = Le(
|
|
433
433
|
o,
|
|
434
434
|
c,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
435
|
+
W,
|
|
436
|
+
B,
|
|
437
|
+
P
|
|
438
438
|
);
|
|
439
|
-
|
|
440
|
-
const r = (
|
|
441
|
-
if (
|
|
442
|
-
if (
|
|
443
|
-
|
|
444
|
-
(
|
|
439
|
+
K(() => {
|
|
440
|
+
const r = (E) => {
|
|
441
|
+
if (h) {
|
|
442
|
+
if (E.key === "ArrowDown")
|
|
443
|
+
E.preventDefault(), u(
|
|
444
|
+
(k) => k < t.length - 1 ? k + 1 : k
|
|
445
445
|
);
|
|
446
|
-
else if (
|
|
447
|
-
|
|
448
|
-
(
|
|
446
|
+
else if (E.key === "ArrowUp")
|
|
447
|
+
E.preventDefault(), u(
|
|
448
|
+
(k) => k > 0 ? k - 1 : 0
|
|
449
449
|
);
|
|
450
|
-
else if (
|
|
451
|
-
|
|
452
|
-
const
|
|
453
|
-
|
|
450
|
+
else if (E.key === "Enter" && t[T]) {
|
|
451
|
+
E.preventDefault();
|
|
452
|
+
const k = t[T];
|
|
453
|
+
l(k), p && p(k);
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
};
|
|
457
457
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
458
458
|
}, [
|
|
459
|
-
u,
|
|
460
|
-
t,
|
|
461
459
|
h,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
460
|
+
t,
|
|
461
|
+
T,
|
|
462
|
+
p,
|
|
463
|
+
l,
|
|
464
|
+
g
|
|
465
465
|
]);
|
|
466
|
-
const
|
|
467
|
-
var
|
|
468
|
-
if (
|
|
469
|
-
const
|
|
466
|
+
const w = (r) => typeof r == "string" ? r : Ce.isValidElement(r) && typeof r.props.children == "string" ? r.props.children : String(r), s = (r, E) => {
|
|
467
|
+
var H, $;
|
|
468
|
+
if (M !== E) return null;
|
|
469
|
+
const k = Q((H = r.tooltipProps) == null ? void 0 : H.label), z = r.iconName || f || "InfoFill0Sm", O = /* @__PURE__ */ n.jsx(
|
|
470
470
|
Ee,
|
|
471
471
|
{
|
|
472
|
-
iconPosition: (
|
|
472
|
+
iconPosition: ($ = r.tooltipProps) == null ? void 0 : $.position,
|
|
473
473
|
id: `iconContainer-${r.value}`,
|
|
474
474
|
children: /* @__PURE__ */ n.jsx(
|
|
475
|
-
|
|
475
|
+
Y,
|
|
476
476
|
{
|
|
477
|
-
iconName:
|
|
478
|
-
color: r.disabled ? e.colors.neutralColors.colorNeutralCleanest :
|
|
477
|
+
iconName: z,
|
|
478
|
+
color: r.disabled ? e.colors.neutralColors.colorNeutralCleanest : v(r) ? e.colors.brandColors.colorBrandSoft : x ?? e.colors.neutralColors.colorNeutralDark
|
|
479
479
|
}
|
|
480
480
|
)
|
|
481
481
|
}
|
|
482
482
|
);
|
|
483
|
-
return
|
|
483
|
+
return k ? /* @__PURE__ */ n.jsx(se, { ...r == null ? void 0 : r.tooltipProps, isActive: !0, children: O }) : O;
|
|
484
484
|
};
|
|
485
485
|
return /* @__PURE__ */ n.jsx(
|
|
486
486
|
Ne,
|
|
487
487
|
{
|
|
488
488
|
marginTop: m,
|
|
489
|
-
width:
|
|
490
|
-
maxHeight:
|
|
489
|
+
width: a ?? `${L}px`,
|
|
490
|
+
maxHeight: b,
|
|
491
491
|
height: "fit-content",
|
|
492
492
|
ref: (r) => {
|
|
493
|
-
|
|
493
|
+
N.current = r, typeof A == "function" ? A(r) : A && (A.current = r);
|
|
494
494
|
},
|
|
495
495
|
"data-testid": "MenuSelect",
|
|
496
496
|
id: "MenuSelect",
|
|
497
|
-
children: t.length === 0 ? /* @__PURE__ */ n.jsx(Ie, { size:
|
|
498
|
-
var
|
|
499
|
-
const
|
|
497
|
+
children: t.length === 0 ? /* @__PURE__ */ n.jsx(Ie, { size: i, children: "Sem opções" }) : t.map((r, E) => {
|
|
498
|
+
var O, H;
|
|
499
|
+
const k = typeof r.render == "function" ? r.render() : null, z = w(r.label);
|
|
500
500
|
if (r.isSection)
|
|
501
|
-
return /* @__PURE__ */ n.jsx(
|
|
501
|
+
return /* @__PURE__ */ n.jsx(Me, { size: i, children: z }, z);
|
|
502
502
|
{
|
|
503
|
-
const
|
|
503
|
+
const $ = z.toLowerCase().indexOf((d == null ? void 0 : d.toLowerCase()) || "");
|
|
504
504
|
return /* @__PURE__ */ n.jsxs(
|
|
505
505
|
Fe,
|
|
506
506
|
{
|
|
507
|
-
isOptionSelected:
|
|
508
|
-
highlightedIndex:
|
|
509
|
-
onClick: (
|
|
510
|
-
|
|
507
|
+
isOptionSelected: v(r),
|
|
508
|
+
highlightedIndex: E === T,
|
|
509
|
+
onClick: (X) => {
|
|
510
|
+
X.stopPropagation(), r.disabled || (g ? $e({
|
|
511
511
|
id: "select-option",
|
|
512
|
-
title:
|
|
513
|
-
description:
|
|
514
|
-
icon:
|
|
515
|
-
iconColor:
|
|
512
|
+
title: g.title,
|
|
513
|
+
description: g.description,
|
|
514
|
+
icon: g.icon,
|
|
515
|
+
iconColor: g.iconColor,
|
|
516
516
|
leftButtonProps: {
|
|
517
517
|
name: "Cancelar",
|
|
518
518
|
variant: "tertiary",
|
|
@@ -522,58 +522,58 @@ const po = ({
|
|
|
522
522
|
rightButtonProps: {
|
|
523
523
|
name: "Confirmar",
|
|
524
524
|
variant: "secondary",
|
|
525
|
-
onClick: () =>
|
|
525
|
+
onClick: () => l(r)
|
|
526
526
|
}
|
|
527
|
-
}) :
|
|
527
|
+
}) : l(r));
|
|
528
528
|
},
|
|
529
|
-
onMouseEnter: () =>
|
|
529
|
+
onMouseEnter: () => u(E),
|
|
530
530
|
disabled: r.disabled,
|
|
531
|
-
size:
|
|
532
|
-
menuLateralPadding:
|
|
531
|
+
size: i,
|
|
532
|
+
menuLateralPadding: j,
|
|
533
533
|
children: [
|
|
534
|
-
|
|
534
|
+
s(r, "left"),
|
|
535
535
|
/* @__PURE__ */ n.jsxs(
|
|
536
536
|
ve,
|
|
537
537
|
{
|
|
538
|
-
menuOptionFlexDirection:
|
|
539
|
-
menuJustifyContent:
|
|
538
|
+
menuOptionFlexDirection: I,
|
|
539
|
+
menuJustifyContent: R,
|
|
540
540
|
iconName: f,
|
|
541
|
-
isOptionSelected:
|
|
542
|
-
highlightedIndex:
|
|
541
|
+
isOptionSelected: v(r),
|
|
542
|
+
highlightedIndex: E === T,
|
|
543
543
|
"data-testid": r.value,
|
|
544
|
-
size:
|
|
544
|
+
size: i,
|
|
545
545
|
hasDescription: !!r.description,
|
|
546
546
|
optionValue: r.value,
|
|
547
547
|
disabled: r.disabled,
|
|
548
|
-
truncateText:
|
|
549
|
-
tableActionButton:
|
|
548
|
+
truncateText: y,
|
|
549
|
+
tableActionButton: S,
|
|
550
550
|
children: [
|
|
551
551
|
/* @__PURE__ */ n.jsxs(
|
|
552
|
-
|
|
552
|
+
Re,
|
|
553
553
|
{
|
|
554
|
-
truncateText: !ie(r.label) &&
|
|
554
|
+
truncateText: !ie(r.label) && y,
|
|
555
555
|
children: [
|
|
556
|
-
|
|
556
|
+
k,
|
|
557
557
|
ie(r.label) ? /* @__PURE__ */ n.jsx(
|
|
558
558
|
"p",
|
|
559
559
|
{
|
|
560
|
-
title: ((
|
|
560
|
+
title: ((O = r == null ? void 0 : r.tooltipProps) == null ? void 0 : O.label) ?? w(r.label),
|
|
561
561
|
children: r.label
|
|
562
562
|
}
|
|
563
563
|
) : /* @__PURE__ */ n.jsx(
|
|
564
564
|
"p",
|
|
565
565
|
{
|
|
566
|
-
title: ((
|
|
567
|
-
children:
|
|
568
|
-
|
|
569
|
-
/* @__PURE__ */ n.jsx(
|
|
570
|
-
|
|
571
|
-
|
|
566
|
+
title: ((H = r == null ? void 0 : r.tooltipProps) == null ? void 0 : H.label) ?? z,
|
|
567
|
+
children: d && $ >= 0 ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
568
|
+
z.substring(0, $),
|
|
569
|
+
/* @__PURE__ */ n.jsx(He, { size: i, children: z.substring(
|
|
570
|
+
$,
|
|
571
|
+
$ + ((d == null ? void 0 : d.length) || 0)
|
|
572
572
|
) }),
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
z.substring(
|
|
574
|
+
$ + ((d == null ? void 0 : d.length) || 0)
|
|
575
575
|
)
|
|
576
|
-
] }) :
|
|
576
|
+
] }) : z
|
|
577
577
|
}
|
|
578
578
|
)
|
|
579
579
|
]
|
|
@@ -583,7 +583,7 @@ const po = ({
|
|
|
583
583
|
]
|
|
584
584
|
}
|
|
585
585
|
),
|
|
586
|
-
|
|
586
|
+
s(r, "right")
|
|
587
587
|
]
|
|
588
588
|
},
|
|
589
589
|
String(r.value)
|
|
@@ -598,59 +598,59 @@ le.displayName = "MenuSelect";
|
|
|
598
598
|
const Ae = ({
|
|
599
599
|
title: o,
|
|
600
600
|
iconName: t,
|
|
601
|
-
onClickIcon:
|
|
602
|
-
width:
|
|
601
|
+
onClickIcon: i,
|
|
602
|
+
width: l,
|
|
603
603
|
height: c,
|
|
604
|
-
flex:
|
|
605
|
-
children:
|
|
606
|
-
wrapperCustomStyles:
|
|
607
|
-
contentCustomStyles:
|
|
608
|
-
titleCustomStyles:
|
|
604
|
+
flex: d,
|
|
605
|
+
children: a,
|
|
606
|
+
wrapperCustomStyles: b = {},
|
|
607
|
+
contentCustomStyles: h = {},
|
|
608
|
+
titleCustomStyles: p = {}
|
|
609
609
|
}) => /* @__PURE__ */ n.jsxs(
|
|
610
|
-
|
|
610
|
+
G,
|
|
611
611
|
{
|
|
612
|
-
width:
|
|
612
|
+
width: l,
|
|
613
613
|
height: c,
|
|
614
|
-
flex:
|
|
614
|
+
flex: d,
|
|
615
615
|
direction: "vertical",
|
|
616
616
|
padding: e.spacings.spacingStack.spacingStackSm,
|
|
617
617
|
customStyles: {
|
|
618
618
|
backgroundColor: e.colors.backgroundColors.colorBackgroundSnow,
|
|
619
619
|
border: `1px solid ${e.colors.neutralColors.colorNeutralSoft}`,
|
|
620
620
|
borderRadius: "8px",
|
|
621
|
-
|
|
621
|
+
...b
|
|
622
622
|
},
|
|
623
623
|
children: [
|
|
624
624
|
/* @__PURE__ */ n.jsxs(
|
|
625
|
-
|
|
625
|
+
G,
|
|
626
626
|
{
|
|
627
627
|
width: "100%",
|
|
628
628
|
direction: "horizontal",
|
|
629
|
-
customStyles:
|
|
629
|
+
customStyles: h,
|
|
630
630
|
children: [
|
|
631
|
-
o ? /* @__PURE__ */ n.jsx(
|
|
631
|
+
o ? /* @__PURE__ */ n.jsx(G, { width: "fit-content", customStyles: p, children: /* @__PURE__ */ n.jsx(ae, { title: o, divider: !1 }) }) : null,
|
|
632
632
|
t ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
633
633
|
/* @__PURE__ */ n.jsx(be, { size: "auto", direction: "horizontal" }),
|
|
634
634
|
/* @__PURE__ */ n.jsx(
|
|
635
|
-
|
|
635
|
+
Y,
|
|
636
636
|
{
|
|
637
637
|
iconName: t,
|
|
638
|
-
onClick: () =>
|
|
639
|
-
color: Q(
|
|
640
|
-
cursorPointer: Q(
|
|
638
|
+
onClick: () => i == null ? void 0 : i(),
|
|
639
|
+
color: Q(i) ? e.colors.neutralColors.colorNeutralDark : e.colors.neutralColors.colorNeutralCloudy,
|
|
640
|
+
cursorPointer: Q(i)
|
|
641
641
|
}
|
|
642
642
|
)
|
|
643
643
|
] }) : null
|
|
644
644
|
]
|
|
645
645
|
}
|
|
646
646
|
),
|
|
647
|
-
/* @__PURE__ */ n.jsx(
|
|
647
|
+
/* @__PURE__ */ n.jsx(G, { width: "100%", flex: "1", children: a })
|
|
648
648
|
]
|
|
649
649
|
}
|
|
650
650
|
);
|
|
651
651
|
Ae.displayName = "Section";
|
|
652
|
-
const Te =
|
|
653
|
-
${
|
|
652
|
+
const Te = C.div`
|
|
653
|
+
${U}
|
|
654
654
|
display: flex;
|
|
655
655
|
flex-direction: column;
|
|
656
656
|
width: ${({ width: o }) => o};
|
|
@@ -658,22 +658,22 @@ const Te = z.div`
|
|
|
658
658
|
&:hover {
|
|
659
659
|
cursor: ${({ disabled: o, readonly: t }) => o || t ? "default" : "pointer"};
|
|
660
660
|
}
|
|
661
|
-
`, Pe =
|
|
661
|
+
`, Pe = C.div`
|
|
662
662
|
width: 100%;
|
|
663
|
-
${({ variant: o }) => o === "default" ?
|
|
663
|
+
${({ variant: o }) => o === "default" ? F`
|
|
664
664
|
min-height: ${({ size: t }) => t === "Small" ? "3.2rem" : "4rem"};
|
|
665
665
|
max-height: ${({ size: t }) => t === "Small" ? "3.2rem" : "4rem"};
|
|
666
|
-
` :
|
|
666
|
+
` : F`
|
|
667
667
|
min-height: ${({ size: t }) => t === "Small" ? "1rem" : "3.2rem"};
|
|
668
668
|
max-height: ${({ size: t }) => t === "Small" ? "1rem" : "3.2rem"};
|
|
669
669
|
`}
|
|
670
670
|
|
|
671
671
|
display: flex;
|
|
672
672
|
align-items: center;
|
|
673
|
-
${({ variant: o }) => o === "default" &&
|
|
673
|
+
${({ variant: o }) => o === "default" && F`
|
|
674
674
|
border: ${e.borders.borderWidth.borderWidthThinner} solid;
|
|
675
675
|
border-radius: ${e.borders.borderRadius.borderRadiusSm};
|
|
676
|
-
border-color: ${({ isOpen: t, hasError:
|
|
676
|
+
border-color: ${({ isOpen: t, hasError: i, readonly: l, disabled: c }) => i ? e.colors.feedbackColors.colorFeedbackError : l || c ? e.colors.neutralColors.colorNeutralClean : t ? e.colors.neutralColors.colorNeutralCloudy : e.colors.neutralColors.colorNeutralClean};
|
|
677
677
|
`}
|
|
678
678
|
|
|
679
679
|
background-color: ${({ variant: o }) => o === "default" ? e.colors.backgroundColors.colorBackgroundSnow : "transparent"};
|
|
@@ -683,28 +683,28 @@ const Te = z.div`
|
|
|
683
683
|
if (t === "default")
|
|
684
684
|
return o !== "Small" ? `0 ${e.spacings.spacingInline.spacingInlineSm}` : `0 ${e.spacings.spacingInline.spacingInlineAnt}`;
|
|
685
685
|
}};
|
|
686
|
-
${({ size: o, variant: t }) => o === "Small" ? t === "default" ?
|
|
686
|
+
${({ size: o, variant: t }) => o === "Small" ? t === "default" ? F`
|
|
687
687
|
font-size: ${e.fonts.fontSize.fontSizeBodyMd};
|
|
688
688
|
line-height: ${e.fonts.lineHeight.lineHeightSm(
|
|
689
689
|
e.fonts.fontSize.fontSizeBodyMd
|
|
690
690
|
)};
|
|
691
|
-
` :
|
|
691
|
+
` : F`
|
|
692
692
|
font-size: ${e.fonts.fontSize.fontSizeBodySm};
|
|
693
693
|
line-height: ${e.fonts.lineHeight.lineHeightSm(
|
|
694
694
|
e.fonts.fontSize.fontSizeBodySm
|
|
695
695
|
)};
|
|
696
|
-
` : t === "default" ?
|
|
696
|
+
` : t === "default" ? F`
|
|
697
697
|
font-size: ${e.fonts.fontSize.fontSizeBodyLg};
|
|
698
698
|
line-height: ${e.fonts.lineHeight.lineHeightMd(
|
|
699
699
|
e.fonts.fontSize.fontSizeBodyLg
|
|
700
700
|
)};
|
|
701
|
-
` :
|
|
701
|
+
` : F`
|
|
702
702
|
font-size: ${e.fonts.fontSize.fontSizeBodyMd};
|
|
703
703
|
line-height: ${e.fonts.lineHeight.lineHeightSm(
|
|
704
704
|
e.fonts.fontSize.fontSizeBodyMd
|
|
705
705
|
)};
|
|
706
706
|
`};
|
|
707
|
-
${({ disabled: o, readonly: t }) => (o || t) &&
|
|
707
|
+
${({ disabled: o, readonly: t }) => (o || t) && F`
|
|
708
708
|
background-color: ${e.colors.brandColors.colorBrandSeSoft};
|
|
709
709
|
border-style: solid;
|
|
710
710
|
`};
|
|
@@ -718,7 +718,7 @@ const Te = z.div`
|
|
|
718
718
|
fill: ${({ disabled: o, readonly: t }) => o || t ? e.colors.neutralColors.colorNeutralCloudy : e.colors.neutralColors.colorNeutralCloudy};
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
`, Oe =
|
|
721
|
+
`, Oe = C.div`
|
|
722
722
|
align-items: center;
|
|
723
723
|
display: flex;
|
|
724
724
|
flex: 1 1 0%;
|
|
@@ -727,7 +727,7 @@ const Te = z.div`
|
|
|
727
727
|
overflow: hidden;
|
|
728
728
|
min-height: 1em;
|
|
729
729
|
box-sizing: border-box;
|
|
730
|
-
`, De =
|
|
730
|
+
`, De = C.span`
|
|
731
731
|
display: flex;
|
|
732
732
|
flex-wrap: wrap;
|
|
733
733
|
width: fit-content;
|
|
@@ -744,7 +744,7 @@ const Te = z.div`
|
|
|
744
744
|
overflow: hidden;
|
|
745
745
|
width: fit-content;
|
|
746
746
|
}
|
|
747
|
-
`, Xe =
|
|
747
|
+
`, Xe = C.span`
|
|
748
748
|
color: ${e.colors.neutralColors.colorNeutralCleanest};
|
|
749
749
|
font-size: ${({ size: o, variant: t }) => t === "default" ? o === "Small" ? e.fonts.fontSize.fontSizeBodyMd : e.fonts.fontSize.fontSizeBodyLg : o === "Small" ? e.fonts.fontSize.fontSizeBodySm : e.fonts.fontSize.fontSizeBodyMd};
|
|
750
750
|
font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
|
|
@@ -753,7 +753,7 @@ const Te = z.div`
|
|
|
753
753
|
white-space: nowrap;
|
|
754
754
|
overflow: hidden;
|
|
755
755
|
width: fit-content;
|
|
756
|
-
`, _e =
|
|
756
|
+
`, _e = C.input`
|
|
757
757
|
flex: 1;
|
|
758
758
|
min-width: 0.1rem;
|
|
759
759
|
border: none;
|
|
@@ -767,14 +767,14 @@ const Te = z.div`
|
|
|
767
767
|
outline: none;
|
|
768
768
|
cursor: ${({ disabled: o, readOnly: t }) => o || t ? "default" : "pointer"};
|
|
769
769
|
}
|
|
770
|
-
`, Ue =
|
|
770
|
+
`, Ue = C.div`
|
|
771
771
|
width: 100%;
|
|
772
772
|
display: flex;
|
|
773
773
|
flex-direction: row;
|
|
774
774
|
gap: 4px;
|
|
775
775
|
justify-content: flex-start;
|
|
776
776
|
margin-bottom: ${e.spacings.spacingStack.spacingStackNano};
|
|
777
|
-
`, Ge =
|
|
777
|
+
`, Ge = C.label`
|
|
778
778
|
font-size: ${e.fonts.fontSize.fontSizeBodyMd};
|
|
779
779
|
font-weight: ${e.fonts.fontWeight.fontWeightRegular};
|
|
780
780
|
font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
|
|
@@ -783,7 +783,7 @@ const Te = z.div`
|
|
|
783
783
|
)};
|
|
784
784
|
color: ${e.colors.neutralColors.colorNeutralCloudy};
|
|
785
785
|
margin-bottom: ${e.spacings.spacingStack.spacingStackNano};
|
|
786
|
-
`, qe =
|
|
786
|
+
`, qe = C.label`
|
|
787
787
|
font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
|
|
788
788
|
font-size: ${e.fonts.fontSize.fontSizeBodyMd};
|
|
789
789
|
font-weight: ${e.fonts.fontWeight.fontWeightRegular};
|
|
@@ -792,7 +792,7 @@ const Te = z.div`
|
|
|
792
792
|
)};
|
|
793
793
|
color: ${e.colors.feedbackColors.colorFeedbackError};
|
|
794
794
|
`;
|
|
795
|
-
|
|
795
|
+
C.p`
|
|
796
796
|
display: inline-block;
|
|
797
797
|
font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodySm : e.fonts.fontSize.fontSizeBodyMd};
|
|
798
798
|
font-weight: ${e.fonts.fontWeight.fontWeightRegular};
|
|
@@ -800,193 +800,193 @@ z.p`
|
|
|
800
800
|
margin-top: ${e.spacings.spacingInline.spacingInlineNano};
|
|
801
801
|
width: 100%;
|
|
802
802
|
`;
|
|
803
|
-
const Je =
|
|
803
|
+
const Je = C.p`
|
|
804
804
|
display: inline-block;
|
|
805
805
|
font-size: ${({ size: o }) => o === "Small" ? e.fonts.fontSize.fontSizeBodySm : e.fonts.fontSize.fontSizeBodyMd};
|
|
806
806
|
font-weight: ${e.fonts.fontWeight.fontWeightRegular};
|
|
807
807
|
color: ${e.colors.neutralColors.colorNeutralDark};
|
|
808
808
|
margin-top: ${e.spacings.spacingInline.spacingInlineNano};
|
|
809
809
|
width: 100%;
|
|
810
|
-
`, Ye = (o, { value: t, options:
|
|
811
|
-
const [
|
|
812
|
-
|
|
813
|
-
const
|
|
814
|
-
|
|
810
|
+
`, Ye = (o, { value: t, options: i }) => {
|
|
811
|
+
const [l, c] = D(!1), [d, a] = D(!1), [b, h] = D(""), [p, m] = D(i), f = J(null), x = J(null), M = J(null), W = J(null);
|
|
812
|
+
K(() => {
|
|
813
|
+
const S = () => {
|
|
814
|
+
a(!1);
|
|
815
815
|
};
|
|
816
|
-
return window.addEventListener("scroll",
|
|
817
|
-
window.removeEventListener("scroll",
|
|
816
|
+
return window.addEventListener("scroll", S, { passive: !0 }), window.addEventListener("resize", S, { passive: !0 }), () => {
|
|
817
|
+
window.removeEventListener("scroll", S), window.removeEventListener("resize", S);
|
|
818
818
|
};
|
|
819
819
|
}, []);
|
|
820
|
-
function
|
|
821
|
-
|
|
820
|
+
function B(S) {
|
|
821
|
+
h(""), a(!1), c(!0), M != null && M.current && M.current.focus(), S !== t && o(S);
|
|
822
822
|
}
|
|
823
|
-
const
|
|
824
|
-
if (
|
|
825
|
-
const
|
|
826
|
-
(
|
|
823
|
+
const y = (S) => {
|
|
824
|
+
if (S) {
|
|
825
|
+
const j = new RegExp(S, "i"), I = i.filter(
|
|
826
|
+
(g) => j.exec(g.label)
|
|
827
827
|
);
|
|
828
|
-
m(
|
|
828
|
+
m(I);
|
|
829
829
|
} else
|
|
830
|
-
m(
|
|
830
|
+
m(i);
|
|
831
831
|
};
|
|
832
|
-
function
|
|
833
|
-
return !
|
|
832
|
+
function R(S) {
|
|
833
|
+
return !S;
|
|
834
834
|
}
|
|
835
835
|
return {
|
|
836
|
-
isOpen:
|
|
836
|
+
isOpen: l,
|
|
837
837
|
setIsOpen: c,
|
|
838
|
-
expanded:
|
|
839
|
-
setExpanded:
|
|
840
|
-
inputValue:
|
|
841
|
-
setInputValue:
|
|
842
|
-
optionsSelect:
|
|
838
|
+
expanded: d,
|
|
839
|
+
setExpanded: a,
|
|
840
|
+
inputValue: b,
|
|
841
|
+
setInputValue: h,
|
|
842
|
+
optionsSelect: p,
|
|
843
843
|
setOptionSelect: m,
|
|
844
844
|
selectContainerRef: f,
|
|
845
|
-
containerRef:
|
|
846
|
-
inputContainerRef:
|
|
847
|
-
optionsRef:
|
|
848
|
-
selectOption:
|
|
849
|
-
handlerFilterOptions:
|
|
850
|
-
isValue:
|
|
845
|
+
containerRef: x,
|
|
846
|
+
inputContainerRef: M,
|
|
847
|
+
optionsRef: W,
|
|
848
|
+
selectOption: B,
|
|
849
|
+
handlerFilterOptions: y,
|
|
850
|
+
isValue: R
|
|
851
851
|
};
|
|
852
852
|
}, fe = ce(
|
|
853
853
|
({
|
|
854
854
|
value: o,
|
|
855
855
|
handleOption: t,
|
|
856
|
-
options:
|
|
857
|
-
filter:
|
|
856
|
+
options: i,
|
|
857
|
+
filter: l = !0,
|
|
858
858
|
placeholder: c,
|
|
859
|
-
label:
|
|
860
|
-
size:
|
|
861
|
-
width:
|
|
862
|
-
disabled:
|
|
863
|
-
helpText:
|
|
859
|
+
label: d,
|
|
860
|
+
size: a = "Medium",
|
|
861
|
+
width: b = "100%",
|
|
862
|
+
disabled: h,
|
|
863
|
+
helpText: p,
|
|
864
864
|
readonly: m,
|
|
865
865
|
errorMessage: f,
|
|
866
|
-
tooltipProps:
|
|
867
|
-
onBlur:
|
|
868
|
-
onEnter:
|
|
869
|
-
variant:
|
|
870
|
-
infoProps:
|
|
871
|
-
maxHeightMenu:
|
|
872
|
-
isRequired:
|
|
873
|
-
onRemoveSelected:
|
|
874
|
-
},
|
|
866
|
+
tooltipProps: x = {},
|
|
867
|
+
onBlur: M,
|
|
868
|
+
onEnter: W,
|
|
869
|
+
variant: B = "default",
|
|
870
|
+
infoProps: y = {},
|
|
871
|
+
maxHeightMenu: R,
|
|
872
|
+
isRequired: S = !1,
|
|
873
|
+
onRemoveSelected: j
|
|
874
|
+
}, I) => {
|
|
875
875
|
const {
|
|
876
|
-
isOpen:
|
|
877
|
-
setIsOpen:
|
|
878
|
-
expanded:
|
|
879
|
-
setExpanded:
|
|
880
|
-
inputValue:
|
|
881
|
-
setInputValue:
|
|
882
|
-
optionsSelect:
|
|
883
|
-
selectContainerRef:
|
|
884
|
-
containerRef:
|
|
885
|
-
inputContainerRef:
|
|
876
|
+
isOpen: g,
|
|
877
|
+
setIsOpen: P,
|
|
878
|
+
expanded: A,
|
|
879
|
+
setExpanded: T,
|
|
880
|
+
inputValue: u,
|
|
881
|
+
setInputValue: v,
|
|
882
|
+
optionsSelect: N,
|
|
883
|
+
selectContainerRef: L,
|
|
884
|
+
containerRef: w,
|
|
885
|
+
inputContainerRef: s,
|
|
886
886
|
selectOption: r,
|
|
887
|
-
setOptionSelect:
|
|
888
|
-
handlerFilterOptions:
|
|
889
|
-
isValue:
|
|
890
|
-
} = Ye(t, { value: o, options:
|
|
887
|
+
setOptionSelect: E,
|
|
888
|
+
handlerFilterOptions: k,
|
|
889
|
+
isValue: z
|
|
890
|
+
} = Ye(t, { value: o, options: i }), O = !!f, H = {
|
|
891
891
|
label: f,
|
|
892
|
-
...
|
|
892
|
+
...x,
|
|
893
893
|
wrapperWidth: "auto",
|
|
894
|
-
isActive:
|
|
894
|
+
isActive: O,
|
|
895
895
|
isErrorTooltip: !0
|
|
896
|
-
},
|
|
897
|
-
...
|
|
898
|
-
size:
|
|
899
|
-
},
|
|
900
|
-
|
|
896
|
+
}, $ = {
|
|
897
|
+
...y,
|
|
898
|
+
size: a
|
|
899
|
+
}, X = /* @__PURE__ */ n.jsx(
|
|
900
|
+
Y,
|
|
901
901
|
{
|
|
902
|
-
iconName: `Close${
|
|
902
|
+
iconName: `Close${a === "Small" ? "Sm" : "Ant"}`,
|
|
903
903
|
onClick: (_) => {
|
|
904
|
-
_.stopPropagation(),
|
|
904
|
+
_.stopPropagation(), j(o);
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
|
-
), V = /* @__PURE__ */ n.jsx(
|
|
907
|
+
), V = /* @__PURE__ */ n.jsx(Y, { iconName: `ExpandLess${a === "Small" ? "Sm" : "Ant"}` }), Z = /* @__PURE__ */ n.jsx(Y, { iconName: `ExpandMore${a === "Small" ? "Sm" : "Ant"}` });
|
|
908
908
|
return /* @__PURE__ */ n.jsxs(
|
|
909
909
|
Te,
|
|
910
910
|
{
|
|
911
|
-
ref:
|
|
912
|
-
width:
|
|
913
|
-
size:
|
|
914
|
-
disabled:
|
|
911
|
+
ref: L,
|
|
912
|
+
width: b,
|
|
913
|
+
size: a,
|
|
914
|
+
disabled: h,
|
|
915
915
|
readonly: m,
|
|
916
916
|
children: [
|
|
917
|
-
|
|
918
|
-
/* @__PURE__ */ n.jsxs(Ge, { "data-testid": "label", ref:
|
|
919
|
-
|
|
920
|
-
|
|
917
|
+
d && /* @__PURE__ */ n.jsxs(Ue, { children: [
|
|
918
|
+
/* @__PURE__ */ n.jsxs(Ge, { "data-testid": "label", ref: I, children: [
|
|
919
|
+
d,
|
|
920
|
+
S && !h ? /* @__PURE__ */ n.jsx(qe, { children: " *" }) : null
|
|
921
921
|
] }),
|
|
922
|
-
((
|
|
922
|
+
(($ == null ? void 0 : $.message) || ($ == null ? void 0 : $.render)) && /* @__PURE__ */ n.jsx(xe, { ...$ })
|
|
923
923
|
] }),
|
|
924
|
-
/* @__PURE__ */ n.jsx(se, { ...
|
|
924
|
+
/* @__PURE__ */ n.jsx(se, { ...H, children: /* @__PURE__ */ n.jsxs(
|
|
925
925
|
Pe,
|
|
926
926
|
{
|
|
927
|
-
hasError:
|
|
927
|
+
hasError: O,
|
|
928
928
|
readonly: m,
|
|
929
|
-
ref:
|
|
929
|
+
ref: w,
|
|
930
930
|
onBlur: () => {
|
|
931
931
|
setTimeout(() => {
|
|
932
|
-
(
|
|
932
|
+
(g || A) && s.current !== document.activeElement && (M && M(o), P(!1), T(!1));
|
|
933
933
|
}, 250);
|
|
934
934
|
},
|
|
935
935
|
onClick: () => {
|
|
936
|
-
!
|
|
936
|
+
!h && !m && (g && !A ? (T(!0), s != null && s.current && s.current.focus()) : !g && !A ? (P(!0), T(!0), s != null && s.current && s.current.focus()) : (P(!1), T(!1), s != null && s.current && s.current.blur()), !u && E(i));
|
|
937
937
|
},
|
|
938
938
|
tabIndex: 0,
|
|
939
|
-
width:
|
|
940
|
-
size:
|
|
941
|
-
isOpen:
|
|
939
|
+
width: b,
|
|
940
|
+
size: a,
|
|
941
|
+
isOpen: g || A,
|
|
942
942
|
"data-testid": "select",
|
|
943
|
-
disabled:
|
|
944
|
-
helpText:
|
|
945
|
-
variant:
|
|
943
|
+
disabled: h,
|
|
944
|
+
helpText: p,
|
|
945
|
+
variant: B,
|
|
946
946
|
children: [
|
|
947
947
|
/* @__PURE__ */ n.jsxs(Oe, { children: [
|
|
948
|
-
/* @__PURE__ */ n.jsxs(De, { size:
|
|
949
|
-
c &&
|
|
948
|
+
/* @__PURE__ */ n.jsxs(De, { size: a, variant: B, children: [
|
|
949
|
+
c && z(o) && !u && !g ? /* @__PURE__ */ n.jsx(Xe, { size: a, variant: B, children: c }) : null,
|
|
950
950
|
(o == null ? void 0 : o.label) && /* @__PURE__ */ n.jsx("p", { title: (o == null ? void 0 : o.hint) ?? (o == null ? void 0 : o.label), children: o == null ? void 0 : o.label })
|
|
951
951
|
] }),
|
|
952
|
-
|
|
952
|
+
l && /* @__PURE__ */ n.jsx(
|
|
953
953
|
_e,
|
|
954
954
|
{
|
|
955
|
-
ref:
|
|
956
|
-
value:
|
|
955
|
+
ref: s,
|
|
956
|
+
value: u,
|
|
957
957
|
onChange: (_) => {
|
|
958
|
-
|
|
958
|
+
v(_.target.value), _.target.value.length > 0 && (P(!0), T(!0)), k(_.target.value);
|
|
959
959
|
},
|
|
960
960
|
readOnly: m,
|
|
961
|
-
width:
|
|
962
|
-
size:
|
|
963
|
-
disabled:
|
|
964
|
-
variant:
|
|
961
|
+
width: u.length,
|
|
962
|
+
size: a,
|
|
963
|
+
disabled: h,
|
|
964
|
+
variant: B
|
|
965
965
|
}
|
|
966
966
|
)
|
|
967
967
|
] }),
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
968
|
+
j && o ? X : null,
|
|
969
|
+
A ? V : Z,
|
|
970
|
+
A && /* @__PURE__ */ n.jsx(
|
|
971
971
|
le,
|
|
972
972
|
{
|
|
973
973
|
onEnter: (_) => {
|
|
974
|
-
t && t(_),
|
|
974
|
+
t && t(_), P(!1), T(!1), W && W(_);
|
|
975
975
|
},
|
|
976
|
-
menuIsOpen:
|
|
977
|
-
selectContainerRef:
|
|
976
|
+
menuIsOpen: g,
|
|
977
|
+
selectContainerRef: L,
|
|
978
978
|
value: o,
|
|
979
|
-
optionsSelect:
|
|
979
|
+
optionsSelect: N,
|
|
980
980
|
selectOption: r,
|
|
981
|
-
size:
|
|
982
|
-
inputValue:
|
|
983
|
-
maxHeightMenu:
|
|
981
|
+
size: a,
|
|
982
|
+
inputValue: u,
|
|
983
|
+
maxHeightMenu: R
|
|
984
984
|
}
|
|
985
985
|
)
|
|
986
986
|
]
|
|
987
987
|
}
|
|
988
988
|
) }),
|
|
989
|
-
|
|
989
|
+
p && /* @__PURE__ */ n.jsx(Je, { size: a, children: p })
|
|
990
990
|
]
|
|
991
991
|
}
|
|
992
992
|
);
|
|
@@ -1000,7 +1000,7 @@ const ue = we`
|
|
|
1000
1000
|
to {
|
|
1001
1001
|
transform: rotate(360deg);
|
|
1002
1002
|
}
|
|
1003
|
-
`, Qe =
|
|
1003
|
+
`, Qe = C.button`
|
|
1004
1004
|
display: flex;
|
|
1005
1005
|
justify-content: space-between;
|
|
1006
1006
|
align-items: center;
|
|
@@ -1008,7 +1008,7 @@ const ue = we`
|
|
|
1008
1008
|
padding: ${({ size: o }) => o === "Small" ? `0 ${e.spacings.spacingInline.spacingInlineAnt}` : `0 ${e.spacings.spacingInline.spacingInlineSm}`};
|
|
1009
1009
|
${({ variant: o }) => {
|
|
1010
1010
|
if (o === "primary")
|
|
1011
|
-
return
|
|
1011
|
+
return F`
|
|
1012
1012
|
background-color: ${e.colors.brandColors.colorBrandPrimary};
|
|
1013
1013
|
color: ${e.colors.backgroundColors.colorBackgroundSnow};
|
|
1014
1014
|
transition: filter 0.2s;
|
|
@@ -1019,7 +1019,7 @@ const ue = we`
|
|
|
1019
1019
|
}
|
|
1020
1020
|
`;
|
|
1021
1021
|
if (o === "secondary")
|
|
1022
|
-
return
|
|
1022
|
+
return F`
|
|
1023
1023
|
background-color: rgba(
|
|
1024
1024
|
${ze(e.colors.neutralColors.colorNeutralSoft)},
|
|
1025
1025
|
${e.opacityLevels.light}
|
|
@@ -1034,7 +1034,7 @@ const ue = we`
|
|
|
1034
1034
|
}
|
|
1035
1035
|
`;
|
|
1036
1036
|
if (o === "tertiary")
|
|
1037
|
-
return
|
|
1037
|
+
return F`
|
|
1038
1038
|
background-color: transparent;
|
|
1039
1039
|
color: ${e.colors.neutralColors.colorNeutralDark};
|
|
1040
1040
|
border: ${e.borders.borderWidth.borderWidthNone};
|
|
@@ -1046,7 +1046,7 @@ const ue = we`
|
|
|
1046
1046
|
}
|
|
1047
1047
|
`;
|
|
1048
1048
|
}};
|
|
1049
|
-
${({ disabled: o }) => o &&
|
|
1049
|
+
${({ disabled: o }) => o && F`
|
|
1050
1050
|
background-color: ${e.colors.backgroundColors.colorBackgroundGrass};
|
|
1051
1051
|
color: ${e.colors.neutralColors.colorNeutralCloudy};
|
|
1052
1052
|
transition: filter 0.2s;
|
|
@@ -1075,7 +1075,7 @@ const ue = we`
|
|
|
1075
1075
|
min-width: ${({ size: o }) => o === "Small" ? e.icons.iconSizeSm : e.icons.iconSizeAnt};
|
|
1076
1076
|
height: ${({ size: o }) => o === "Small" ? e.icons.iconSizeSm : e.icons.iconSizeAnt};
|
|
1077
1077
|
|
|
1078
|
-
${({ isLoading: o }) => o &&
|
|
1078
|
+
${({ isLoading: o }) => o && F`
|
|
1079
1079
|
animation: ${ue} 2s linear infinite;
|
|
1080
1080
|
`}
|
|
1081
1081
|
|
|
@@ -1083,7 +1083,7 @@ const ue = we`
|
|
|
1083
1083
|
fill: ${({ variant: o, disabled: t }) => t ? e.colors.neutralColors.colorNeutralCloudy : o === "primary" ? e.colors.backgroundColors.colorBackgroundSnow : e.colors.neutralColors.colorNeutralDark};
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
|
-
`, Ve =
|
|
1086
|
+
`, Ve = C.div`
|
|
1087
1087
|
display: flex;
|
|
1088
1088
|
flex-direction: column;
|
|
1089
1089
|
width: ${({ width: o }) => o};
|
|
@@ -1091,7 +1091,7 @@ const ue = we`
|
|
|
1091
1091
|
&:hover {
|
|
1092
1092
|
cursor: ${({ disabled: o }) => o && "not-allowed"};
|
|
1093
1093
|
}
|
|
1094
|
-
`, Ze =
|
|
1094
|
+
`, Ze = C.label`
|
|
1095
1095
|
font-size: ${e.fonts.fontSize.fontSizeBodyMd};
|
|
1096
1096
|
font-weight: ${e.fonts.fontWeight.fontWeightRegular};
|
|
1097
1097
|
font-family: ${e.fonts.fontFamily.fontFamilyPrimary};
|
|
@@ -1101,7 +1101,7 @@ const ue = we`
|
|
|
1101
1101
|
color: ${({ hasError: o }) => o ? `${e.colors.feedbackColors.colorFeedbackError}` : `${e.colors.neutralColors.colorNeutralCloudy}`};
|
|
1102
1102
|
margin-bottom: ${e.spacings.spacingStack.spacingStackNano};
|
|
1103
1103
|
`;
|
|
1104
|
-
|
|
1104
|
+
C.p`
|
|
1105
1105
|
display: inline-block;
|
|
1106
1106
|
font-size: ${e.fonts.fontSize.fontSizeBodyMd};
|
|
1107
1107
|
font-weight: ${e.fonts.fontWeight.fontWeightRegular};
|
|
@@ -1109,7 +1109,7 @@ z.p`
|
|
|
1109
1109
|
margin-top: ${e.spacings.spacingInline.spacingInlineNano};
|
|
1110
1110
|
width: 100%;
|
|
1111
1111
|
`;
|
|
1112
|
-
const Ke =
|
|
1112
|
+
const Ke = C.div`
|
|
1113
1113
|
width: 100%;
|
|
1114
1114
|
|
|
1115
1115
|
& > svg {
|
|
@@ -1127,96 +1127,96 @@ const Ke = z.div`
|
|
|
1127
1127
|
cursor: not-allowed;
|
|
1128
1128
|
}
|
|
1129
1129
|
`, eo = (o) => {
|
|
1130
|
-
const [t,
|
|
1131
|
-
return
|
|
1130
|
+
const [t, i] = D(!1), [l, c] = D(o), d = J(null);
|
|
1131
|
+
return K(() => {
|
|
1132
1132
|
c(o);
|
|
1133
1133
|
}, [o]), {
|
|
1134
|
-
setIsOpen:
|
|
1134
|
+
setIsOpen: i,
|
|
1135
1135
|
isOpen: t,
|
|
1136
1136
|
setOptionsSelect: c,
|
|
1137
|
-
optionsSelect:
|
|
1138
|
-
selectContainerRef:
|
|
1137
|
+
optionsSelect: l,
|
|
1138
|
+
selectContainerRef: d
|
|
1139
1139
|
};
|
|
1140
1140
|
}, oo = 200, mo = ({
|
|
1141
1141
|
name: o,
|
|
1142
1142
|
variant: t = "primary",
|
|
1143
|
-
width:
|
|
1144
|
-
size:
|
|
1143
|
+
width: i = "100%",
|
|
1144
|
+
size: l = "Medium",
|
|
1145
1145
|
disabled: c = !1,
|
|
1146
|
-
isLoading:
|
|
1147
|
-
onClick:
|
|
1148
|
-
options:
|
|
1149
|
-
label:
|
|
1150
|
-
menuSelectProps:
|
|
1146
|
+
isLoading: d = !1,
|
|
1147
|
+
onClick: a,
|
|
1148
|
+
options: b,
|
|
1149
|
+
label: h,
|
|
1150
|
+
menuSelectProps: p = {},
|
|
1151
1151
|
iconName: m,
|
|
1152
1152
|
optionsIconPosition: f
|
|
1153
1153
|
}) => {
|
|
1154
|
-
const { isOpen:
|
|
1155
|
-
let
|
|
1156
|
-
c ?
|
|
1157
|
-
const
|
|
1158
|
-
...
|
|
1154
|
+
const { isOpen: x, setIsOpen: M, selectContainerRef: W, optionsSelect: B } = eo(b);
|
|
1155
|
+
let y = e.colors.backgroundColors.colorBackgroundSnow;
|
|
1156
|
+
c ? y = e.colors.neutralColors.colorNeutralCloudy : t !== "primary" && (y = e.colors.neutralColors.colorNeutralDark);
|
|
1157
|
+
const R = {
|
|
1158
|
+
...p
|
|
1159
1159
|
};
|
|
1160
1160
|
return /* @__PURE__ */ n.jsxs(
|
|
1161
1161
|
Ve,
|
|
1162
1162
|
{
|
|
1163
|
-
ref:
|
|
1164
|
-
width:
|
|
1165
|
-
size:
|
|
1163
|
+
ref: W,
|
|
1164
|
+
width: i,
|
|
1165
|
+
size: l,
|
|
1166
1166
|
disabled: c,
|
|
1167
|
-
onBlur: () => setTimeout(() =>
|
|
1167
|
+
onBlur: () => setTimeout(() => M(!1), oo),
|
|
1168
1168
|
children: [
|
|
1169
|
-
|
|
1169
|
+
h && /* @__PURE__ */ n.jsx(Ze, { children: h }),
|
|
1170
1170
|
/* @__PURE__ */ n.jsxs(
|
|
1171
1171
|
Qe,
|
|
1172
1172
|
{
|
|
1173
1173
|
type: "button",
|
|
1174
|
-
size:
|
|
1174
|
+
size: l,
|
|
1175
1175
|
disabled: c,
|
|
1176
1176
|
variant: t,
|
|
1177
|
-
isLoading:
|
|
1178
|
-
onClick: () => !
|
|
1177
|
+
isLoading: d,
|
|
1178
|
+
onClick: () => !d && M(!x),
|
|
1179
1179
|
id: `button-component-${o}`,
|
|
1180
1180
|
children: [
|
|
1181
|
-
|
|
1182
|
-
|
|
1181
|
+
d && /* @__PURE__ */ n.jsx(Ke, { size: l, disabled: c, variant: t, children: /* @__PURE__ */ n.jsx(
|
|
1182
|
+
Y,
|
|
1183
1183
|
{
|
|
1184
|
-
iconName: `ProgressActivity${
|
|
1185
|
-
color:
|
|
1184
|
+
iconName: `ProgressActivity${l === "Small" ? "Ant" : "Sm"}`,
|
|
1185
|
+
color: y,
|
|
1186
1186
|
"data-testid": "icon-loading"
|
|
1187
1187
|
}
|
|
1188
1188
|
) }),
|
|
1189
|
-
!
|
|
1190
|
-
!
|
|
1191
|
-
|
|
1189
|
+
!d && /* @__PURE__ */ n.jsx("p", { title: o, children: o }),
|
|
1190
|
+
!d && (x ? /* @__PURE__ */ n.jsx(
|
|
1191
|
+
Y,
|
|
1192
1192
|
{
|
|
1193
|
-
iconName: `ExpandLess${
|
|
1194
|
-
color:
|
|
1193
|
+
iconName: `ExpandLess${l === "Small" ? "Ant" : "Sm"}`,
|
|
1194
|
+
color: y,
|
|
1195
1195
|
"data-testid": "icon-button-less"
|
|
1196
1196
|
}
|
|
1197
1197
|
) : /* @__PURE__ */ n.jsx(
|
|
1198
|
-
|
|
1198
|
+
Y,
|
|
1199
1199
|
{
|
|
1200
|
-
iconName: `ExpandMore${
|
|
1201
|
-
color:
|
|
1200
|
+
iconName: `ExpandMore${l === "Small" ? "Ant" : "Sm"}`,
|
|
1201
|
+
color: y,
|
|
1202
1202
|
"data-testid": "icon-button-more"
|
|
1203
1203
|
}
|
|
1204
1204
|
))
|
|
1205
1205
|
]
|
|
1206
1206
|
}
|
|
1207
1207
|
),
|
|
1208
|
-
|
|
1208
|
+
x && /* @__PURE__ */ n.jsx(
|
|
1209
1209
|
le,
|
|
1210
1210
|
{
|
|
1211
|
-
selectContainerRef:
|
|
1211
|
+
selectContainerRef: W,
|
|
1212
1212
|
value: null,
|
|
1213
|
-
optionsSelect:
|
|
1214
|
-
selectOption:
|
|
1215
|
-
size:
|
|
1213
|
+
optionsSelect: B,
|
|
1214
|
+
selectOption: a,
|
|
1215
|
+
size: l,
|
|
1216
1216
|
inputValue: null,
|
|
1217
1217
|
iconPosition: f,
|
|
1218
1218
|
iconName: m,
|
|
1219
|
-
...
|
|
1219
|
+
...R
|
|
1220
1220
|
}
|
|
1221
1221
|
)
|
|
1222
1222
|
]
|
|
@@ -1225,29 +1225,29 @@ const Ke = z.div`
|
|
|
1225
1225
|
}, So = ({
|
|
1226
1226
|
title: o,
|
|
1227
1227
|
children: t,
|
|
1228
|
-
endAdornment:
|
|
1229
|
-
marginBottom:
|
|
1228
|
+
endAdornment: i = null,
|
|
1229
|
+
marginBottom: l = "16px",
|
|
1230
1230
|
customStyles: c = {}
|
|
1231
1231
|
}) => {
|
|
1232
|
-
const [
|
|
1233
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1232
|
+
const [d, a] = D(!1);
|
|
1233
|
+
return /* @__PURE__ */ n.jsxs(G, { width: "100%", flex: "1", gap: "8px", children: [
|
|
1234
1234
|
/* @__PURE__ */ n.jsx(
|
|
1235
1235
|
ae,
|
|
1236
1236
|
{
|
|
1237
1237
|
title: o,
|
|
1238
1238
|
divider: !0,
|
|
1239
|
-
marginBottom:
|
|
1239
|
+
marginBottom: l,
|
|
1240
1240
|
collapse: {
|
|
1241
|
-
collapsed:
|
|
1242
|
-
setCollapsed:
|
|
1241
|
+
collapsed: d,
|
|
1242
|
+
setCollapsed: a
|
|
1243
1243
|
},
|
|
1244
|
-
endAdornment:
|
|
1244
|
+
endAdornment: i,
|
|
1245
1245
|
customStyles: c
|
|
1246
1246
|
}
|
|
1247
1247
|
),
|
|
1248
|
-
|
|
1248
|
+
d ? null : t
|
|
1249
1249
|
] });
|
|
1250
|
-
}, he =
|
|
1250
|
+
}, he = F`
|
|
1251
1251
|
svg:not([color]):not([data-testid='icon']) {
|
|
1252
1252
|
path {
|
|
1253
1253
|
fill: ${e.colors.neutralColors.colorNeutralDarkest};
|
|
@@ -1259,14 +1259,14 @@ const Ke = z.div`
|
|
|
1259
1259
|
fill: ${e.colors.neutralColors.colorNeutralDarkest};
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
|
-
`, to =
|
|
1262
|
+
`, to = C.div`
|
|
1263
1263
|
width: 100%;
|
|
1264
1264
|
max-height: ${({ maxHeight: o }) => o};
|
|
1265
1265
|
overflow: auto;
|
|
1266
1266
|
position: relative;
|
|
1267
1267
|
border: ${e.borders.borderWidth.borderWidthThinner} solid
|
|
1268
1268
|
${e.colors.neutralColors.colorNeutralSoft};
|
|
1269
|
-
border-radius: ${({ withBorderRadius: o }) => o ? e.borders.borderRadius.borderExtraSmall : "none"};
|
|
1269
|
+
border-radius: ${({ withBorderRadius: o, borderRadius: t }) => t || (o ? e.borders.borderRadius.borderExtraSmall : "none")};
|
|
1270
1270
|
|
|
1271
1271
|
::-webkit-scrollbar {
|
|
1272
1272
|
width: 6px;
|
|
@@ -1281,12 +1281,12 @@ const Ke = z.div`
|
|
|
1281
1281
|
background: ${e.colors.neutralColors.colorNeutralClean};
|
|
1282
1282
|
border-radius: ${e.borders.borderRadius.borderRadiusPill};
|
|
1283
1283
|
}
|
|
1284
|
-
`, no =
|
|
1284
|
+
`, no = C.table`
|
|
1285
1285
|
border-collapse: separate;
|
|
1286
1286
|
border-spacing: 0;
|
|
1287
1287
|
width: 100%;
|
|
1288
|
-
`, ro = `${e.borders.borderRadius.borderExtraSmall} ${e.borders.borderRadius.borderExtraSmall} 0 0`, lo = `0 0 ${e.borders.borderRadius.borderExtraSmall} ${e.borders.borderRadius.borderExtraSmall}`,
|
|
1289
|
-
${({ isHeader: o, size: t }) => o &&
|
|
1288
|
+
`, ro = `${e.borders.borderRadius.borderExtraSmall} ${e.borders.borderRadius.borderExtraSmall} 0 0`, lo = `0 0 ${e.borders.borderRadius.borderExtraSmall} ${e.borders.borderRadius.borderExtraSmall}`, ee = C.tr`
|
|
1289
|
+
${({ isHeader: o, size: t }) => o && F`
|
|
1290
1290
|
position: sticky;
|
|
1291
1291
|
background-color: ${e.colors.backgroundColors.colorBackgroundSnow};
|
|
1292
1292
|
|
|
@@ -1304,15 +1304,15 @@ const Ke = z.div`
|
|
|
1304
1304
|
height: ${({ fit: o, size: t }) => o ? "fit-content" : t === "Large" ? "4rem" : "3.2rem"};
|
|
1305
1305
|
min-height: ${({ size: o }) => o === "Large" ? "4rem" : "3.2rem"};
|
|
1306
1306
|
|
|
1307
|
-
${({ isHeader: o, isSelected: t, striped:
|
|
1308
|
-
background-color: ${t ? e.colors.neutralColors.colorNeutralClean :
|
|
1307
|
+
${({ isHeader: o, isSelected: t, striped: i }) => !o && F`
|
|
1308
|
+
background-color: ${t ? e.colors.neutralColors.colorNeutralClean : i ? "#F5F9FE" : e.colors.backgroundColors.colorBackgroundSnow};
|
|
1309
1309
|
`}
|
|
1310
1310
|
|
|
1311
|
-
border-radius: ${({ isFirst: o, isLast: t, isHeader: l }) => {
|
|
1312
|
-
if (o && !
|
|
1313
|
-
return ro;
|
|
1311
|
+
border-radius: ${({ isFirst: o, isLast: t, isHeader: i, borderRadius: l }) => {
|
|
1312
|
+
if (o && !i)
|
|
1313
|
+
return l ? `${l} ${l} 0 0` : ro;
|
|
1314
1314
|
if (t)
|
|
1315
|
-
return lo;
|
|
1315
|
+
return l ? `0 0 ${l} ${l}` : lo;
|
|
1316
1316
|
}};
|
|
1317
1317
|
transition: background-color 0.2s 0s;
|
|
1318
1318
|
|
|
@@ -1324,7 +1324,7 @@ const Ke = z.div`
|
|
|
1324
1324
|
border-bottom: none !important;
|
|
1325
1325
|
}
|
|
1326
1326
|
|
|
1327
|
-
${({ isHeader: o }) => !o &&
|
|
1327
|
+
${({ isHeader: o }) => !o && F`
|
|
1328
1328
|
&:hover {
|
|
1329
1329
|
background-color: ${e.colors.backgroundColors.colorBackgroundCarpet};
|
|
1330
1330
|
|
|
@@ -1336,10 +1336,10 @@ const Ke = z.div`
|
|
|
1336
1336
|
`}
|
|
1337
1337
|
`, ge = ({ width: o }) => {
|
|
1338
1338
|
if (Q(o))
|
|
1339
|
-
return
|
|
1339
|
+
return F`
|
|
1340
1340
|
width: ${o};
|
|
1341
1341
|
`;
|
|
1342
|
-
},
|
|
1342
|
+
}, oe = C.th`
|
|
1343
1343
|
text-align: ${({ horizontalAlign: o, headerAlign: t }) => o ?? t ?? "left"};
|
|
1344
1344
|
vertical-align: middle;
|
|
1345
1345
|
min-width: ${({ minWidth: o }) => o || "auto"};
|
|
@@ -1363,7 +1363,7 @@ const Ke = z.div`
|
|
|
1363
1363
|
word-break: normal;
|
|
1364
1364
|
|
|
1365
1365
|
&:last-child {
|
|
1366
|
-
${({ isTopRow: o }) => o &&
|
|
1366
|
+
${({ isTopRow: o }) => o && F`
|
|
1367
1367
|
border-right: none;
|
|
1368
1368
|
`}
|
|
1369
1369
|
}
|
|
@@ -1383,7 +1383,7 @@ const Ke = z.div`
|
|
|
1383
1383
|
&:hover {
|
|
1384
1384
|
cursor: default;
|
|
1385
1385
|
}
|
|
1386
|
-
`, io =
|
|
1386
|
+
`, io = C.td`
|
|
1387
1387
|
text-align: ${({ horizontalAlign: o }) => o || "left"};
|
|
1388
1388
|
vertical-align: ${({ verticalAlign: o }) => o || "middle"};
|
|
1389
1389
|
|
|
@@ -1420,14 +1420,14 @@ function so(o) {
|
|
|
1420
1420
|
function $o({
|
|
1421
1421
|
id: o,
|
|
1422
1422
|
rowKey: t = "id",
|
|
1423
|
-
size:
|
|
1424
|
-
onRowClick:
|
|
1423
|
+
size: i = "Small",
|
|
1424
|
+
onRowClick: l,
|
|
1425
1425
|
fit: c = !1,
|
|
1426
|
-
maxHeight:
|
|
1427
|
-
columns:
|
|
1428
|
-
dataSource:
|
|
1429
|
-
columnsTextSize:
|
|
1430
|
-
emptyProps:
|
|
1426
|
+
maxHeight: d = "40rem",
|
|
1427
|
+
columns: a,
|
|
1428
|
+
dataSource: b,
|
|
1429
|
+
columnsTextSize: h = i,
|
|
1430
|
+
emptyProps: p = {
|
|
1431
1431
|
width: "100%",
|
|
1432
1432
|
height: "100%",
|
|
1433
1433
|
title: "Nenhum dado a ser mostrado.",
|
|
@@ -1437,240 +1437,270 @@ function $o({
|
|
|
1437
1437
|
},
|
|
1438
1438
|
selectedRow: m = !1,
|
|
1439
1439
|
hideHeader: f = !1,
|
|
1440
|
-
withBorder:
|
|
1441
|
-
withBorderRadius:
|
|
1442
|
-
striped:
|
|
1440
|
+
withBorder: x = !0,
|
|
1441
|
+
withBorderRadius: M = !0,
|
|
1442
|
+
striped: W = !1,
|
|
1443
|
+
borderRadius: B = e.borders.borderRadius.borderRadiusSm
|
|
1443
1444
|
}) {
|
|
1444
|
-
const
|
|
1445
|
+
const y = q(() => so(t), [t]), [R, S] = D(null), j = J(null), I = J(null), [g, P] = D(a);
|
|
1445
1446
|
ke(() => {
|
|
1446
|
-
if (!
|
|
1447
|
-
|
|
1447
|
+
if (!I.current || a.length === 0) {
|
|
1448
|
+
P(a);
|
|
1448
1449
|
return;
|
|
1449
1450
|
}
|
|
1450
|
-
const
|
|
1451
|
-
var
|
|
1452
|
-
const
|
|
1453
|
-
if (
|
|
1454
|
-
let
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1451
|
+
const u = () => {
|
|
1452
|
+
var O;
|
|
1453
|
+
const N = ((O = I.current) == null ? void 0 : O.clientWidth) || 0;
|
|
1454
|
+
if (N === 0) return;
|
|
1455
|
+
let L = 0, w = 0;
|
|
1456
|
+
const s = [], r = [];
|
|
1457
|
+
a.forEach((H) => {
|
|
1458
|
+
const $ = Number(H.flex);
|
|
1459
|
+
H.width ? L += parseInt(H.width, 10) || 0 : H.flex && $ > 0 ? (w += $, s.push(H)) : r.push(H);
|
|
1459
1460
|
});
|
|
1460
|
-
const
|
|
1461
|
-
let
|
|
1462
|
-
if (
|
|
1463
|
-
if (
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
const
|
|
1467
|
-
if (
|
|
1468
|
-
const
|
|
1469
|
-
return {
|
|
1461
|
+
const E = N - L, k = "80";
|
|
1462
|
+
let z = [...a];
|
|
1463
|
+
if (E > 0) {
|
|
1464
|
+
if (s.length > 0) {
|
|
1465
|
+
const H = E / w;
|
|
1466
|
+
z = a.map(($) => {
|
|
1467
|
+
const X = Number($.flex);
|
|
1468
|
+
if (X && X > 0) {
|
|
1469
|
+
const V = parseInt($.minWidth || k, 10), Z = X * H, _ = Math.max(Z, V);
|
|
1470
|
+
return { ...$, width: `${Math.floor(_)}px` };
|
|
1470
1471
|
}
|
|
1471
|
-
return
|
|
1472
|
-
|
|
1473
|
-
width:
|
|
1474
|
-
} :
|
|
1472
|
+
return !$.width && !X ? {
|
|
1473
|
+
...$,
|
|
1474
|
+
width: $.minWidth || `${k}px`
|
|
1475
|
+
} : $;
|
|
1475
1476
|
});
|
|
1476
|
-
} else if (
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
1481
|
-
const
|
|
1482
|
-
return {
|
|
1477
|
+
} else if (r.length > 0) {
|
|
1478
|
+
const H = E / r.length;
|
|
1479
|
+
z = a.map(($) => {
|
|
1480
|
+
const X = Number($.flex);
|
|
1481
|
+
if (!$.width && !X) {
|
|
1482
|
+
const V = parseInt($.minWidth || k, 10), Z = Math.max(H, V);
|
|
1483
|
+
return { ...$, width: `${Math.floor(Z)}px` };
|
|
1483
1484
|
}
|
|
1484
|
-
return
|
|
1485
|
+
return $;
|
|
1485
1486
|
});
|
|
1486
1487
|
}
|
|
1487
1488
|
} else
|
|
1488
|
-
|
|
1489
|
-
|
|
1489
|
+
z = a.map((H) => H.width ? H : { ...H, width: H.minWidth || `${k}px` });
|
|
1490
|
+
P(z);
|
|
1490
1491
|
};
|
|
1491
|
-
|
|
1492
|
-
const
|
|
1493
|
-
return
|
|
1494
|
-
}, [
|
|
1495
|
-
const
|
|
1496
|
-
|
|
1492
|
+
u();
|
|
1493
|
+
const v = new ResizeObserver(u);
|
|
1494
|
+
return v.observe(I.current), () => v.disconnect();
|
|
1495
|
+
}, [a]), K(() => {
|
|
1496
|
+
const u = (v) => {
|
|
1497
|
+
j.current && !j.current.contains(v.target) && S(null);
|
|
1497
1498
|
};
|
|
1498
|
-
return document.addEventListener("mousedown",
|
|
1499
|
-
document.removeEventListener("mousedown",
|
|
1499
|
+
return document.addEventListener("mousedown", u), () => {
|
|
1500
|
+
document.removeEventListener("mousedown", u);
|
|
1500
1501
|
};
|
|
1501
1502
|
}, []);
|
|
1502
|
-
const
|
|
1503
|
-
(
|
|
1504
|
-
) : !1, [
|
|
1505
|
-
var
|
|
1506
|
-
if (f || !
|
|
1503
|
+
const A = q(() => g ? g.some(
|
|
1504
|
+
(u) => u.mergeHeaderId && u.mergeHeaderLabel
|
|
1505
|
+
) : !1, [g]), T = q(() => {
|
|
1506
|
+
var L, w;
|
|
1507
|
+
if (f || !g || g.length === 0)
|
|
1507
1508
|
return null;
|
|
1508
|
-
if (!
|
|
1509
|
-
return /* @__PURE__ */ n.jsx(
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1509
|
+
if (!A)
|
|
1510
|
+
return /* @__PURE__ */ n.jsx(
|
|
1511
|
+
ee,
|
|
1512
|
+
{
|
|
1513
|
+
isHeader: !0,
|
|
1514
|
+
size: i,
|
|
1515
|
+
numRows: 1,
|
|
1516
|
+
borderRadius: B,
|
|
1517
|
+
children: g.map((s) => {
|
|
1518
|
+
var r;
|
|
1519
|
+
return /* @__PURE__ */ n.jsx(
|
|
1520
|
+
oe,
|
|
1521
|
+
{
|
|
1522
|
+
width: s.width,
|
|
1523
|
+
minWidth: s.minWidth,
|
|
1524
|
+
maxWidth: s.maxWidth,
|
|
1525
|
+
horizontalAlign: s.horizontalAlign,
|
|
1526
|
+
size: i,
|
|
1527
|
+
columnsTextSize: h,
|
|
1528
|
+
withBorder: x,
|
|
1529
|
+
headerAlign: s.headerAlign,
|
|
1530
|
+
children: ((r = s.columnRender) == null ? void 0 : r.call(s)) || /* @__PURE__ */ n.jsx("span", { title: s.label, children: s.label })
|
|
1531
|
+
},
|
|
1532
|
+
s.dataIndex
|
|
1533
|
+
);
|
|
1534
|
+
})
|
|
1535
|
+
}
|
|
1536
|
+
);
|
|
1537
|
+
const u = [], v = [];
|
|
1538
|
+
let N = 0;
|
|
1539
|
+
for (; N < g.length; ) {
|
|
1540
|
+
const s = g[N];
|
|
1541
|
+
if (s.mergeHeaderId && s.mergeHeaderLabel) {
|
|
1542
|
+
let r = 0;
|
|
1543
|
+
const E = s.mergeHeaderId;
|
|
1544
|
+
for (let k = N; k < g.length && g[k].mergeHeaderId === E; k++)
|
|
1545
|
+
r++;
|
|
1546
|
+
u.push(
|
|
1537
1547
|
/* @__PURE__ */ n.jsx(
|
|
1538
|
-
|
|
1548
|
+
oe,
|
|
1539
1549
|
{
|
|
1540
|
-
colSpan:
|
|
1550
|
+
colSpan: r,
|
|
1541
1551
|
horizontalAlign: "center",
|
|
1542
|
-
size:
|
|
1543
|
-
columnsTextSize:
|
|
1544
|
-
withBorder:
|
|
1545
|
-
width:
|
|
1546
|
-
minWidth:
|
|
1547
|
-
maxWidth:
|
|
1548
|
-
headerAlign:
|
|
1552
|
+
size: i,
|
|
1553
|
+
columnsTextSize: h,
|
|
1554
|
+
withBorder: x,
|
|
1555
|
+
width: s.width,
|
|
1556
|
+
minWidth: s.minWidth,
|
|
1557
|
+
maxWidth: s.maxWidth,
|
|
1558
|
+
headerAlign: s.headerAlign,
|
|
1549
1559
|
isTopRow: !0,
|
|
1550
|
-
children: /* @__PURE__ */ n.jsx("span", { title:
|
|
1560
|
+
children: /* @__PURE__ */ n.jsx("span", { title: s.mergeHeaderLabel, children: s.mergeHeaderLabel })
|
|
1551
1561
|
},
|
|
1552
|
-
`${
|
|
1562
|
+
`${s.mergeHeaderId}-merged`
|
|
1553
1563
|
)
|
|
1554
1564
|
);
|
|
1555
|
-
for (let
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1565
|
+
for (let k = 0; k < r; k++) {
|
|
1566
|
+
const z = g[N + k];
|
|
1567
|
+
v.push(
|
|
1558
1568
|
/* @__PURE__ */ n.jsx(
|
|
1559
|
-
|
|
1569
|
+
oe,
|
|
1560
1570
|
{
|
|
1561
|
-
width:
|
|
1562
|
-
minWidth:
|
|
1563
|
-
maxWidth:
|
|
1564
|
-
horizontalAlign:
|
|
1565
|
-
size:
|
|
1566
|
-
columnsTextSize:
|
|
1567
|
-
withBorder:
|
|
1568
|
-
headerAlign:
|
|
1569
|
-
children: ((
|
|
1571
|
+
width: z.width,
|
|
1572
|
+
minWidth: z.minWidth,
|
|
1573
|
+
maxWidth: z.maxWidth,
|
|
1574
|
+
horizontalAlign: z.horizontalAlign,
|
|
1575
|
+
size: i,
|
|
1576
|
+
columnsTextSize: h,
|
|
1577
|
+
withBorder: x,
|
|
1578
|
+
headerAlign: s.headerAlign,
|
|
1579
|
+
children: ((L = z.columnRender) == null ? void 0 : L.call(z)) || /* @__PURE__ */ n.jsx("span", { title: z.label, children: z.label })
|
|
1570
1580
|
},
|
|
1571
|
-
|
|
1581
|
+
z.dataIndex + "-individual"
|
|
1572
1582
|
)
|
|
1573
1583
|
);
|
|
1574
1584
|
}
|
|
1575
|
-
|
|
1585
|
+
N += r;
|
|
1576
1586
|
} else
|
|
1577
|
-
|
|
1587
|
+
u.push(
|
|
1578
1588
|
/* @__PURE__ */ n.jsx(
|
|
1579
|
-
|
|
1589
|
+
oe,
|
|
1580
1590
|
{
|
|
1581
1591
|
rowSpan: 2,
|
|
1582
|
-
width:
|
|
1583
|
-
minWidth:
|
|
1584
|
-
maxWidth:
|
|
1585
|
-
horizontalAlign:
|
|
1586
|
-
size:
|
|
1587
|
-
columnsTextSize:
|
|
1588
|
-
withBorder:
|
|
1589
|
-
headerAlign:
|
|
1592
|
+
width: s.width,
|
|
1593
|
+
minWidth: s.minWidth,
|
|
1594
|
+
maxWidth: s.maxWidth,
|
|
1595
|
+
horizontalAlign: s.horizontalAlign,
|
|
1596
|
+
size: i,
|
|
1597
|
+
columnsTextSize: h,
|
|
1598
|
+
withBorder: x,
|
|
1599
|
+
headerAlign: s.headerAlign,
|
|
1590
1600
|
isTopRow: !0,
|
|
1591
|
-
children: ((
|
|
1601
|
+
children: ((w = s.columnRender) == null ? void 0 : w.call(s)) || /* @__PURE__ */ n.jsx("span", { title: s.label, children: s.label })
|
|
1592
1602
|
},
|
|
1593
|
-
|
|
1603
|
+
s.dataIndex
|
|
1594
1604
|
)
|
|
1595
|
-
),
|
|
1605
|
+
), N++;
|
|
1596
1606
|
}
|
|
1597
1607
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1598
|
-
/* @__PURE__ */ n.jsx(
|
|
1599
|
-
|
|
1608
|
+
/* @__PURE__ */ n.jsx(
|
|
1609
|
+
ee,
|
|
1610
|
+
{
|
|
1611
|
+
isHeader: !0,
|
|
1612
|
+
size: i,
|
|
1613
|
+
numRows: 2,
|
|
1614
|
+
borderRadius: B,
|
|
1615
|
+
children: u
|
|
1616
|
+
}
|
|
1617
|
+
),
|
|
1618
|
+
v.length > 0 && /* @__PURE__ */ n.jsx(
|
|
1619
|
+
ee,
|
|
1620
|
+
{
|
|
1621
|
+
isHeader: !0,
|
|
1622
|
+
size: i,
|
|
1623
|
+
numRows: 2,
|
|
1624
|
+
borderRadius: B,
|
|
1625
|
+
children: v
|
|
1626
|
+
}
|
|
1627
|
+
)
|
|
1600
1628
|
] });
|
|
1601
|
-
}, [
|
|
1602
|
-
return
|
|
1629
|
+
}, [g, f, i, h, A]);
|
|
1630
|
+
return !b || b.length === 0 ? /* @__PURE__ */ n.jsx(
|
|
1603
1631
|
ye,
|
|
1604
1632
|
{
|
|
1605
1633
|
backgroundColor: e.colors.backgroundColors.colorBackgroundSnow,
|
|
1606
1634
|
borders: !0,
|
|
1607
1635
|
mode: "table",
|
|
1608
|
-
...
|
|
1636
|
+
...p
|
|
1609
1637
|
}
|
|
1610
1638
|
) : /* @__PURE__ */ n.jsx(
|
|
1611
1639
|
to,
|
|
1612
1640
|
{
|
|
1613
|
-
maxHeight:
|
|
1614
|
-
withBorderRadius:
|
|
1615
|
-
ref:
|
|
1616
|
-
|
|
1641
|
+
maxHeight: d,
|
|
1642
|
+
withBorderRadius: M,
|
|
1643
|
+
ref: I,
|
|
1644
|
+
borderRadius: B,
|
|
1645
|
+
children: /* @__PURE__ */ n.jsxs(no, { id: o, ref: j, children: [
|
|
1617
1646
|
/* @__PURE__ */ n.jsx("thead", { children: T }),
|
|
1618
|
-
/* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children:
|
|
1619
|
-
const
|
|
1647
|
+
/* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children: b == null ? void 0 : b.map((u, v, N) => {
|
|
1648
|
+
const L = y(u);
|
|
1620
1649
|
return /* @__PURE__ */ n.jsx(
|
|
1621
|
-
|
|
1650
|
+
ee,
|
|
1622
1651
|
{
|
|
1623
|
-
isLast:
|
|
1652
|
+
isLast: v === N.length - 1,
|
|
1624
1653
|
fit: c,
|
|
1625
|
-
size:
|
|
1626
|
-
withBorder:
|
|
1627
|
-
isSelected:
|
|
1628
|
-
striped:
|
|
1629
|
-
|
|
1630
|
-
|
|
1654
|
+
size: i,
|
|
1655
|
+
withBorder: x,
|
|
1656
|
+
isSelected: L === R && m,
|
|
1657
|
+
striped: W && v % 2 !== 0,
|
|
1658
|
+
borderRadius: B,
|
|
1659
|
+
children: g.map((w) => {
|
|
1660
|
+
var s, r;
|
|
1631
1661
|
return /* @__PURE__ */ n.jsx(
|
|
1632
1662
|
io,
|
|
1633
1663
|
{
|
|
1634
|
-
width:
|
|
1635
|
-
minWidth:
|
|
1636
|
-
maxWidth:
|
|
1637
|
-
size:
|
|
1638
|
-
isClickable: Q(
|
|
1664
|
+
width: w.width,
|
|
1665
|
+
minWidth: w.minWidth,
|
|
1666
|
+
maxWidth: w.maxWidth,
|
|
1667
|
+
size: i,
|
|
1668
|
+
isClickable: Q(l),
|
|
1639
1669
|
onClick: () => {
|
|
1640
|
-
|
|
1641
|
-
|
|
1670
|
+
l && l(u, w, v), m && S(
|
|
1671
|
+
R === L ? null : L
|
|
1642
1672
|
);
|
|
1643
1673
|
},
|
|
1644
|
-
horizontalAlign:
|
|
1645
|
-
verticalAlign:
|
|
1646
|
-
rowPadding:
|
|
1647
|
-
withBorder:
|
|
1648
|
-
isLast:
|
|
1649
|
-
children: ((
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1674
|
+
horizontalAlign: w.horizontalAlign,
|
|
1675
|
+
verticalAlign: w.verticalAlign,
|
|
1676
|
+
rowPadding: w.rowPadding,
|
|
1677
|
+
withBorder: x,
|
|
1678
|
+
isLast: v === N.length - 1,
|
|
1679
|
+
children: ((s = w.render) == null ? void 0 : s.call(
|
|
1680
|
+
w,
|
|
1681
|
+
u[w.dataIndex],
|
|
1682
|
+
u,
|
|
1683
|
+
v,
|
|
1684
|
+
N
|
|
1655
1685
|
)) || /* @__PURE__ */ n.jsx(
|
|
1656
1686
|
"span",
|
|
1657
1687
|
{
|
|
1658
|
-
title:
|
|
1688
|
+
title: u[w.dataIndex],
|
|
1659
1689
|
style: {
|
|
1660
1690
|
textOverflow: "ellipsis",
|
|
1661
1691
|
whiteSpace: "nowrap",
|
|
1662
1692
|
overflow: "hidden",
|
|
1663
|
-
...(
|
|
1693
|
+
...(r = w.rowCss) == null ? void 0 : r.call(w, u)
|
|
1664
1694
|
},
|
|
1665
|
-
children:
|
|
1695
|
+
children: u[w.dataIndex]
|
|
1666
1696
|
}
|
|
1667
1697
|
) || ""
|
|
1668
1698
|
},
|
|
1669
|
-
`${
|
|
1699
|
+
`${L}::${w.dataIndex}`
|
|
1670
1700
|
);
|
|
1671
1701
|
})
|
|
1672
1702
|
},
|
|
1673
|
-
|
|
1703
|
+
L
|
|
1674
1704
|
);
|
|
1675
1705
|
}) })
|
|
1676
1706
|
] })
|