@ufal-lccv/gpsub-ds 0.0.17 → 0.0.19-alpha
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-CoB9izFp.js → Table.view-B2Rfbg5X.js} +541 -537
- package/dist/{Table.view-DHmGitoG.cjs → Table.view-Bb0QYYNi.cjs} +35 -27
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/organisms/TabInfo/TabInfo.style.d.ts +1 -0
- 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,9 +1,9 @@
|
|
|
1
|
-
import { l as n, C as _, i as ce, K as xe, j as we, c as ye, N as
|
|
2
|
-
import je, { useState as P, useEffect as Z, useCallback as
|
|
1
|
+
import { l as n, C as _, i as ce, K as xe, j as we, c as ye, N as x, O as M, s as Ce, T as fe, S as ke, I as ze, P as Be, E as ue } from "./Checkbox.view-D75146I3.js";
|
|
2
|
+
import je, { useState as P, useEffect as Z, useCallback as he, useMemo as Q, useRef as U, forwardRef as ge, isValidElement as se, useLayoutEffect as Ne } from "react";
|
|
3
3
|
import { sg as o, Icon as V } from "sbwb-ds";
|
|
4
4
|
import { v as G, r as q, b as We } from "./index-_v6RoRxb.js";
|
|
5
5
|
import { Controller as re } from "react-hook-form";
|
|
6
|
-
const ae = 350,
|
|
6
|
+
const ae = 350, wo = ({
|
|
7
7
|
title: e,
|
|
8
8
|
children: t,
|
|
9
9
|
endAdornment: i = null,
|
|
@@ -11,22 +11,22 @@ const ae = 350, yo = ({
|
|
|
11
11
|
customStyles: s = {},
|
|
12
12
|
wrapperCustomStyles: d = {},
|
|
13
13
|
hideAdornmentOnCollapse: a = !1,
|
|
14
|
-
maxHeight:
|
|
14
|
+
maxHeight: g = "none"
|
|
15
15
|
// Default to 'none' to allow full expansion
|
|
16
16
|
}) => {
|
|
17
|
-
const [
|
|
17
|
+
const [h, m] = P(!1), [u, f] = P(!0);
|
|
18
18
|
Z(() => {
|
|
19
19
|
if (a)
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
() =>
|
|
20
|
+
if (h) {
|
|
21
|
+
const I = setTimeout(
|
|
22
|
+
() => f(!1),
|
|
23
23
|
ae
|
|
24
24
|
);
|
|
25
|
-
return () => clearTimeout(
|
|
25
|
+
return () => clearTimeout(I);
|
|
26
26
|
} else
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
const
|
|
27
|
+
f(!0);
|
|
28
|
+
}, [h, a]);
|
|
29
|
+
const $ = a && !u ? null : i;
|
|
30
30
|
return /* @__PURE__ */ n.jsxs(
|
|
31
31
|
_,
|
|
32
32
|
{
|
|
@@ -42,10 +42,10 @@ const ae = 350, yo = ({
|
|
|
42
42
|
divider: !0,
|
|
43
43
|
marginBottom: l,
|
|
44
44
|
collapse: {
|
|
45
|
-
collapsed:
|
|
46
|
-
setCollapsed:
|
|
45
|
+
collapsed: h,
|
|
46
|
+
setCollapsed: m
|
|
47
47
|
},
|
|
48
|
-
endAdornment:
|
|
48
|
+
endAdornment: $,
|
|
49
49
|
customStyles: s
|
|
50
50
|
}
|
|
51
51
|
),
|
|
@@ -55,7 +55,7 @@ const ae = 350, yo = ({
|
|
|
55
55
|
gap: "8px",
|
|
56
56
|
width: "100%",
|
|
57
57
|
customStyles: {
|
|
58
|
-
maxHeight:
|
|
58
|
+
maxHeight: h ? "0" : g,
|
|
59
59
|
transition: `max-height ${ae}ms ease-in-out`
|
|
60
60
|
},
|
|
61
61
|
children: t
|
|
@@ -66,22 +66,22 @@ const ae = 350, yo = ({
|
|
|
66
66
|
);
|
|
67
67
|
};
|
|
68
68
|
function ne(e, t, i) {
|
|
69
|
-
var l, s, d, a,
|
|
69
|
+
var l, s, d, a, g;
|
|
70
70
|
t == null && (t = 100);
|
|
71
|
-
function
|
|
72
|
-
var
|
|
73
|
-
|
|
71
|
+
function h() {
|
|
72
|
+
var u = Date.now() - a;
|
|
73
|
+
u < t && u >= 0 ? l = setTimeout(h, t - u) : (l = null, i || (g = e.apply(d, s), d = s = null));
|
|
74
74
|
}
|
|
75
|
-
var
|
|
75
|
+
var m = function() {
|
|
76
76
|
d = this, s = arguments, a = Date.now();
|
|
77
|
-
var
|
|
78
|
-
return l || (l = setTimeout(
|
|
77
|
+
var u = i && !l;
|
|
78
|
+
return l || (l = setTimeout(h, t)), u && (g = e.apply(d, s), d = s = null), g;
|
|
79
79
|
};
|
|
80
|
-
return
|
|
80
|
+
return m.clear = function() {
|
|
81
81
|
l && (clearTimeout(l), l = null);
|
|
82
|
-
},
|
|
83
|
-
l && (
|
|
84
|
-
},
|
|
82
|
+
}, m.flush = function() {
|
|
83
|
+
l && (g = e.apply(d, s), d = s = null, clearTimeout(l), l = null);
|
|
84
|
+
}, m;
|
|
85
85
|
}
|
|
86
86
|
ne.debounce = ne;
|
|
87
87
|
var Ie = ne;
|
|
@@ -92,7 +92,7 @@ function le({
|
|
|
92
92
|
triggerType: i = null,
|
|
93
93
|
debounceTime: l = 500
|
|
94
94
|
}) {
|
|
95
|
-
const s =
|
|
95
|
+
const s = he(() => {
|
|
96
96
|
e.trigger(t);
|
|
97
97
|
}, [e, t]), d = Q(
|
|
98
98
|
() => ve(() => s(), l),
|
|
@@ -100,19 +100,19 @@ function le({
|
|
|
100
100
|
), a = Q(
|
|
101
101
|
() => ["all", "onChange"].includes(i) ? d : null,
|
|
102
102
|
[d, i]
|
|
103
|
-
),
|
|
103
|
+
), g = Q(
|
|
104
104
|
() => ["all", "onBlur"].includes(i) ? s : null,
|
|
105
105
|
[i]
|
|
106
106
|
);
|
|
107
107
|
return Q(
|
|
108
108
|
() => ({
|
|
109
109
|
onChangeTrigger: a,
|
|
110
|
-
onBlurTrigger:
|
|
110
|
+
onBlurTrigger: g
|
|
111
111
|
}),
|
|
112
|
-
[a,
|
|
112
|
+
[a, g]
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const yo = ({
|
|
116
116
|
form: e,
|
|
117
117
|
name: t,
|
|
118
118
|
label: i,
|
|
@@ -120,41 +120,41 @@ const Co = ({
|
|
|
120
120
|
readonly: s = !1,
|
|
121
121
|
disabled: d = !1,
|
|
122
122
|
optionsMap: a,
|
|
123
|
-
width:
|
|
124
|
-
flex:
|
|
125
|
-
placeholder:
|
|
126
|
-
onSelect:
|
|
127
|
-
parser:
|
|
128
|
-
filter:
|
|
129
|
-
tooltipProps:
|
|
130
|
-
infoProps:
|
|
131
|
-
maxHeigthMenu:
|
|
132
|
-
isRequired:
|
|
133
|
-
onRemoveSelected:
|
|
134
|
-
triggerFormField:
|
|
135
|
-
displayText:
|
|
136
|
-
...
|
|
123
|
+
width: g = "100%",
|
|
124
|
+
flex: h,
|
|
125
|
+
placeholder: m,
|
|
126
|
+
onSelect: u,
|
|
127
|
+
parser: f,
|
|
128
|
+
filter: $,
|
|
129
|
+
tooltipProps: I = {},
|
|
130
|
+
infoProps: p = {},
|
|
131
|
+
maxHeigthMenu: k,
|
|
132
|
+
isRequired: z = !1,
|
|
133
|
+
onRemoveSelected: L,
|
|
134
|
+
triggerFormField: C = null,
|
|
135
|
+
displayText: R,
|
|
136
|
+
...H
|
|
137
137
|
}) => {
|
|
138
|
-
const { onChangeTrigger:
|
|
138
|
+
const { onChangeTrigger: B } = le({
|
|
139
139
|
form: e,
|
|
140
140
|
fieldName: t,
|
|
141
|
-
triggerType:
|
|
141
|
+
triggerType: C,
|
|
142
142
|
debounceTime: 0
|
|
143
143
|
}), J = {
|
|
144
144
|
position: "top",
|
|
145
|
-
...
|
|
145
|
+
...I
|
|
146
146
|
}, A = {
|
|
147
|
-
...
|
|
147
|
+
...p,
|
|
148
148
|
tooltipProps: {
|
|
149
149
|
position: "top",
|
|
150
150
|
maxWidth: "300px",
|
|
151
|
-
...
|
|
151
|
+
...p == null ? void 0 : p.tooltipProps
|
|
152
152
|
}
|
|
153
153
|
}, T = (w, v) => {
|
|
154
154
|
let E = w;
|
|
155
|
-
|
|
156
|
-
},
|
|
157
|
-
return /* @__PURE__ */ n.jsx(_, { width:
|
|
155
|
+
f && (E = f == null ? void 0 : f(w)), v(E), u == null || u(E), B == null || B();
|
|
156
|
+
}, b = Q(() => G(a) ? a : Object.fromEntries(l.map((w) => [w.value, w])), [l, a]);
|
|
157
|
+
return /* @__PURE__ */ n.jsx(_, { width: g, flex: h, children: /* @__PURE__ */ n.jsx(
|
|
158
158
|
re,
|
|
159
159
|
{
|
|
160
160
|
name: t,
|
|
@@ -163,7 +163,7 @@ const Co = ({
|
|
|
163
163
|
field: { onChange: w, value: v },
|
|
164
164
|
fieldState: { error: E = null }
|
|
165
165
|
}) => {
|
|
166
|
-
let y =
|
|
166
|
+
let y = b[v];
|
|
167
167
|
return /* @__PURE__ */ n.jsx(
|
|
168
168
|
me,
|
|
169
169
|
{
|
|
@@ -172,22 +172,22 @@ const Co = ({
|
|
|
172
172
|
size: "Small",
|
|
173
173
|
disabled: d,
|
|
174
174
|
readonly: s,
|
|
175
|
-
filter:
|
|
175
|
+
filter: $,
|
|
176
176
|
errorMessage: E == null ? void 0 : E.message,
|
|
177
|
-
placeholder:
|
|
177
|
+
placeholder: m,
|
|
178
178
|
value: y,
|
|
179
179
|
handleOption: (c) => {
|
|
180
180
|
T(c.value, w);
|
|
181
181
|
},
|
|
182
182
|
tooltipProps: J,
|
|
183
183
|
options: l,
|
|
184
|
-
maxHeigthMenu:
|
|
184
|
+
maxHeigthMenu: k,
|
|
185
185
|
infoProps: A,
|
|
186
|
-
maxHeightMenu:
|
|
187
|
-
isRequired:
|
|
188
|
-
onRemoveSelected:
|
|
189
|
-
displayText:
|
|
190
|
-
...
|
|
186
|
+
maxHeightMenu: k,
|
|
187
|
+
isRequired: z,
|
|
188
|
+
onRemoveSelected: L,
|
|
189
|
+
displayText: R,
|
|
190
|
+
...H
|
|
191
191
|
}
|
|
192
192
|
);
|
|
193
193
|
}
|
|
@@ -201,57 +201,57 @@ const Co = ({
|
|
|
201
201
|
disabled: s = !1,
|
|
202
202
|
width: d = "100%",
|
|
203
203
|
height: a = "100%",
|
|
204
|
-
flex:
|
|
205
|
-
placeholder:
|
|
206
|
-
charactersCounter:
|
|
207
|
-
maxlength:
|
|
208
|
-
resize:
|
|
209
|
-
triggerFormField:
|
|
210
|
-
minHeight:
|
|
211
|
-
maxHeight:
|
|
212
|
-
...
|
|
204
|
+
flex: g,
|
|
205
|
+
placeholder: h,
|
|
206
|
+
charactersCounter: m = !0,
|
|
207
|
+
maxlength: u = 1e3,
|
|
208
|
+
resize: f = !0,
|
|
209
|
+
triggerFormField: $ = null,
|
|
210
|
+
minHeight: I,
|
|
211
|
+
maxHeight: p,
|
|
212
|
+
...k
|
|
213
213
|
}) => {
|
|
214
|
-
const { onChangeTrigger:
|
|
214
|
+
const { onChangeTrigger: z } = le({
|
|
215
215
|
form: e,
|
|
216
216
|
fieldName: t,
|
|
217
|
-
triggerType:
|
|
218
|
-
}),
|
|
219
|
-
|
|
217
|
+
triggerType: $
|
|
218
|
+
}), L = (C, R) => {
|
|
219
|
+
R(C), z == null || z();
|
|
220
220
|
};
|
|
221
|
-
return /* @__PURE__ */ n.jsx(_, { width: d, flex:
|
|
221
|
+
return /* @__PURE__ */ n.jsx(_, { width: d, flex: g, height: a, children: /* @__PURE__ */ n.jsx(
|
|
222
222
|
re,
|
|
223
223
|
{
|
|
224
224
|
name: t,
|
|
225
225
|
control: e.control,
|
|
226
226
|
render: ({
|
|
227
|
-
field: { onChange:
|
|
228
|
-
fieldState: { error:
|
|
227
|
+
field: { onChange: C, value: R },
|
|
228
|
+
fieldState: { error: H = null }
|
|
229
229
|
}) => /* @__PURE__ */ n.jsx(
|
|
230
230
|
we,
|
|
231
231
|
{
|
|
232
232
|
label: i,
|
|
233
|
-
value:
|
|
233
|
+
value: R || "",
|
|
234
234
|
width: "100%",
|
|
235
235
|
disabled: s,
|
|
236
236
|
readonly: l,
|
|
237
237
|
height: a,
|
|
238
|
-
minHeight:
|
|
239
|
-
maxHeight:
|
|
240
|
-
errorMessage:
|
|
241
|
-
placeholder:
|
|
242
|
-
onChange: (
|
|
243
|
-
charactersCounter:
|
|
244
|
-
maxlength:
|
|
238
|
+
minHeight: I,
|
|
239
|
+
maxHeight: p,
|
|
240
|
+
errorMessage: H == null ? void 0 : H.message,
|
|
241
|
+
placeholder: h,
|
|
242
|
+
onChange: (B) => L(B.target.value, C),
|
|
243
|
+
charactersCounter: m,
|
|
244
|
+
maxlength: u,
|
|
245
245
|
size: "Small",
|
|
246
|
-
resize:
|
|
247
|
-
...
|
|
246
|
+
resize: f,
|
|
247
|
+
...k
|
|
248
248
|
}
|
|
249
249
|
)
|
|
250
250
|
}
|
|
251
251
|
) });
|
|
252
252
|
};
|
|
253
253
|
Re.displayName = "TextareaField";
|
|
254
|
-
const
|
|
254
|
+
const Co = ({
|
|
255
255
|
form: e,
|
|
256
256
|
name: t,
|
|
257
257
|
id: i = t,
|
|
@@ -259,54 +259,54 @@ const ko = ({
|
|
|
259
259
|
readonly: s = !1,
|
|
260
260
|
disabled: d = !1,
|
|
261
261
|
afterCheck: a,
|
|
262
|
-
width:
|
|
263
|
-
formatter:
|
|
264
|
-
parser:
|
|
265
|
-
flex:
|
|
266
|
-
size:
|
|
267
|
-
triggerFormField:
|
|
268
|
-
...
|
|
262
|
+
width: g = "100%",
|
|
263
|
+
formatter: h,
|
|
264
|
+
parser: m,
|
|
265
|
+
flex: u,
|
|
266
|
+
size: f = "Medium",
|
|
267
|
+
triggerFormField: $ = null,
|
|
268
|
+
...I
|
|
269
269
|
}) => {
|
|
270
|
-
const { onChangeTrigger:
|
|
270
|
+
const { onChangeTrigger: p } = le({
|
|
271
271
|
form: e,
|
|
272
272
|
fieldName: t,
|
|
273
|
-
triggerType:
|
|
273
|
+
triggerType: $,
|
|
274
274
|
debounceTime: 0
|
|
275
|
-
}),
|
|
276
|
-
|
|
275
|
+
}), k = (z, L) => {
|
|
276
|
+
L(z), a == null || a(z), p == null || p();
|
|
277
277
|
};
|
|
278
|
-
return /* @__PURE__ */ n.jsx(_, { width:
|
|
278
|
+
return /* @__PURE__ */ n.jsx(_, { width: g, flex: u, children: /* @__PURE__ */ n.jsx(
|
|
279
279
|
re,
|
|
280
280
|
{
|
|
281
281
|
name: t,
|
|
282
282
|
control: e.control,
|
|
283
283
|
render: ({
|
|
284
|
-
field: { onChange:
|
|
285
|
-
fieldState: { error:
|
|
284
|
+
field: { onChange: z, value: L },
|
|
285
|
+
fieldState: { error: C = null }
|
|
286
286
|
}) => {
|
|
287
|
-
const
|
|
288
|
-
return
|
|
287
|
+
const R = C == null ? void 0 : C.message;
|
|
288
|
+
return R && console.log("Error on checkbox!", R), /* @__PURE__ */ n.jsx(
|
|
289
289
|
ye,
|
|
290
290
|
{
|
|
291
291
|
id: `form-checkbox-${i}`,
|
|
292
|
-
checked: (
|
|
292
|
+
checked: (h == null ? void 0 : h(L)) ?? L,
|
|
293
293
|
name: t,
|
|
294
294
|
label: l,
|
|
295
295
|
disabled: d || s,
|
|
296
|
-
onChange: (
|
|
297
|
-
|
|
298
|
-
(
|
|
299
|
-
|
|
296
|
+
onChange: (H) => {
|
|
297
|
+
k(
|
|
298
|
+
(m == null ? void 0 : m(H.target.checked, L)) ?? H.target.checked,
|
|
299
|
+
z
|
|
300
300
|
);
|
|
301
301
|
},
|
|
302
|
-
size:
|
|
303
|
-
...
|
|
302
|
+
size: f,
|
|
303
|
+
...I
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
) });
|
|
309
|
-
}, Me =
|
|
309
|
+
}, Me = x.ul`
|
|
310
310
|
${q}
|
|
311
311
|
position: fixed;
|
|
312
312
|
margin-top: ${({ marginTop: e }) => e};
|
|
@@ -336,7 +336,7 @@ const ko = ({
|
|
|
336
336
|
background: ${o.colors.neutralColors.colorNeutralClean};
|
|
337
337
|
border-radius: ${o.borders.borderRadius.borderRadiusPill};
|
|
338
338
|
}
|
|
339
|
-
`, He =
|
|
339
|
+
`, He = x.li`
|
|
340
340
|
${q}
|
|
341
341
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
342
342
|
font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodyMd : o.fonts.fontSize.fontSizeBodyLg};
|
|
@@ -344,7 +344,7 @@ const ko = ({
|
|
|
344
344
|
margin: 0 ${o.spacings.spacingInline.spacingInlineXs};
|
|
345
345
|
cursor: default;
|
|
346
346
|
color: ${o.colors.neutralColors.colorNeutralDark};
|
|
347
|
-
`,
|
|
347
|
+
`, Ee = x.li`
|
|
348
348
|
${q}
|
|
349
349
|
display: flex;
|
|
350
350
|
flex: 2;
|
|
@@ -359,7 +359,7 @@ const ko = ({
|
|
|
359
359
|
min-width: 0;
|
|
360
360
|
& > p {
|
|
361
361
|
display: -webkit-box;
|
|
362
|
-
${({ truncateText: e }) => e &&
|
|
362
|
+
${({ truncateText: e }) => e && M`
|
|
363
363
|
-webkit-line-clamp: 2;
|
|
364
364
|
-webkit-box-orient: vertical;
|
|
365
365
|
overflow: hidden;
|
|
@@ -367,7 +367,7 @@ const ko = ({
|
|
|
367
367
|
text-overflow: ellipsis;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
${({ hasDescription: e }) => e &&
|
|
370
|
+
${({ hasDescription: e }) => e && M`
|
|
371
371
|
line-height: ${o.fonts.lineHeight.lineHeightMd(
|
|
372
372
|
o.fonts.fontSize.fontSizeBodyMd
|
|
373
373
|
)};
|
|
@@ -378,7 +378,7 @@ const ko = ({
|
|
|
378
378
|
color: ${({ disabled: t }) => t ? o.colors.neutralColors.colorNeutralCleanest : o.colors.neutralColors.colorNeutralCloudy};
|
|
379
379
|
}
|
|
380
380
|
`}
|
|
381
|
-
`,
|
|
381
|
+
`, Fe = x.li`
|
|
382
382
|
${q}
|
|
383
383
|
font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodySm : o.fonts.fontSize.fontSizeBodyMd};
|
|
384
384
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
@@ -389,20 +389,20 @@ const ko = ({
|
|
|
389
389
|
margin: ${({ size: e }) => e === "Small" ? `${o.spacings.spacingStack.spacingStackSm} ${o.spacings.spacingInline.spacingInlineXs}
|
|
390
390
|
${o.spacings.spacingStack.spacingStackNano}` : `${o.spacings.spacingStack.spacingStackSm} ${o.spacings.spacingInline.spacingInlineXs}
|
|
391
391
|
${o.spacings.spacingStack.spacingStackXs}`};
|
|
392
|
-
`, Le =
|
|
392
|
+
`, Le = x.span`
|
|
393
393
|
${q}
|
|
394
394
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
395
395
|
font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodyMd : o.fonts.fontSize.fontSizeBodyLg};
|
|
396
396
|
font-weight: ${o.fonts.fontWeight.fontWeightSemiBold};
|
|
397
397
|
line-height: ${({ size: e }) => e === "Small" ? o.fonts.lineHeight.lineHeightSm(o.fonts.fontSize.fontSizeBodyMd) : o.fonts.lineHeight.lineHeightMd(o.fonts.fontSize.fontSizeBodyLg)};
|
|
398
|
-
`, Ae =
|
|
398
|
+
`, Ae = x.div`
|
|
399
399
|
${q}
|
|
400
400
|
display: flex;
|
|
401
401
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
402
402
|
|
|
403
403
|
& > p {
|
|
404
404
|
width: 100%;
|
|
405
|
-
${({ truncateText: e }) => e &&
|
|
405
|
+
${({ truncateText: e }) => e && M`
|
|
406
406
|
display: -webkit-box;
|
|
407
407
|
-webkit-line-clamp: 2;
|
|
408
408
|
-webkit-box-orient: vertical;
|
|
@@ -411,7 +411,7 @@ const ko = ({
|
|
|
411
411
|
text-overflow: ellipsis;
|
|
412
412
|
text-align: start;
|
|
413
413
|
}
|
|
414
|
-
`, Te =
|
|
414
|
+
`, Te = x.div`
|
|
415
415
|
${q}
|
|
416
416
|
display: flex;
|
|
417
417
|
flex-direction: row;
|
|
@@ -422,43 +422,43 @@ const ko = ({
|
|
|
422
422
|
background-color: ${({ highlightedIndex: e, disabled: t }) => e ? t ? o.colors.backgroundColors.colorBackgroundSnow : o.colors.neutralColors.colorNeutralLight : o.colors.backgroundColors.colorBackgroundSnow};
|
|
423
423
|
border-radius: ${o.borders.borderRadius.borderRadiusSm};
|
|
424
424
|
min-height: ${({ size: e }) => e === "Small" ? "28px" : "40px"};
|
|
425
|
-
`, Pe =
|
|
425
|
+
`, Pe = x.div`
|
|
426
426
|
${q}
|
|
427
427
|
padding: ${({ iconPosition: e }) => e === "left" ? `0 ${o.spacings.spacingInline.spacingInlineNano} 0 0` : `0 0 0 ${o.spacings.spacingInline.spacingInlineNano}`};
|
|
428
428
|
margin: 0;
|
|
429
429
|
display: flex;
|
|
430
430
|
align-self: center;
|
|
431
431
|
`, Oe = (e, t, i = 0, l = 0, s = "left") => {
|
|
432
|
-
const [d, a] = P(0), [
|
|
433
|
-
if (!e.current || !
|
|
434
|
-
const
|
|
435
|
-
let
|
|
436
|
-
|
|
437
|
-
let
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
Object.assign(
|
|
432
|
+
const [d, a] = P(0), [g, h] = P(), m = U(null), u = he(() => {
|
|
433
|
+
if (!e.current || !m.current) return;
|
|
434
|
+
const f = e.current.getBoundingClientRect(), $ = m.current.getBoundingClientRect(), I = window.innerHeight, p = window.innerWidth, k = f.top, z = I - f.bottom, L = z < $.height + l && k > z;
|
|
435
|
+
let C;
|
|
436
|
+
L ? (C = f.top - $.height - i, m.current.style.maxHeight = `${k - i}px`) : (C = f.bottom + l, m.current.style.maxHeight = `${z - l}px`);
|
|
437
|
+
let R = f.left;
|
|
438
|
+
const H = R + $.width - p;
|
|
439
|
+
H > 0 && (R -= H), R < 0 && (R = 0);
|
|
440
|
+
const B = p - f.right;
|
|
441
|
+
Object.assign(m.current.style, {
|
|
442
442
|
position: "fixed",
|
|
443
|
-
top: `${
|
|
444
|
-
...s === "left" ? { left: `${
|
|
445
|
-
width: `${Math.max(
|
|
443
|
+
top: `${C}px`,
|
|
444
|
+
...s === "left" ? { left: `${R}px` } : { right: `${B}px` },
|
|
445
|
+
width: `${Math.max(f.width, $.width)}px`,
|
|
446
446
|
overflowY: "auto"
|
|
447
447
|
});
|
|
448
448
|
}, [i, l, s]);
|
|
449
449
|
return Z(() => {
|
|
450
|
-
var
|
|
451
|
-
a(0),
|
|
452
|
-
const
|
|
453
|
-
return window.addEventListener("scroll",
|
|
454
|
-
window.removeEventListener("scroll",
|
|
450
|
+
var $;
|
|
451
|
+
a(0), h(($ = e.current) == null ? void 0 : $.clientWidth), u();
|
|
452
|
+
const f = () => u();
|
|
453
|
+
return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
454
|
+
window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
455
455
|
};
|
|
456
|
-
}, [e,
|
|
456
|
+
}, [e, u]), {
|
|
457
457
|
highlightedIndex: d,
|
|
458
458
|
setHighlightedIndex: a,
|
|
459
|
-
isOptionSelected: (
|
|
460
|
-
optionsRef:
|
|
461
|
-
parentWidth:
|
|
459
|
+
isOptionSelected: (f) => f.label === (t == null ? void 0 : t.label),
|
|
460
|
+
optionsRef: m,
|
|
461
|
+
parentWidth: g
|
|
462
462
|
};
|
|
463
463
|
}, ie = ge(
|
|
464
464
|
({
|
|
@@ -469,114 +469,114 @@ const ko = ({
|
|
|
469
469
|
value: s,
|
|
470
470
|
inputValue: d,
|
|
471
471
|
widthMenu: a,
|
|
472
|
-
maxHeightMenu:
|
|
473
|
-
menuIsOpen:
|
|
474
|
-
onEnter:
|
|
475
|
-
marginTop:
|
|
476
|
-
iconName:
|
|
477
|
-
iconColor:
|
|
478
|
-
iconPosition:
|
|
479
|
-
topOffset:
|
|
480
|
-
bottomOffset:
|
|
481
|
-
truncateText:
|
|
482
|
-
menuJustifyContent:
|
|
483
|
-
tableActionButton:
|
|
484
|
-
menuLateralPadding:
|
|
485
|
-
menuOptionFlexDirection:
|
|
486
|
-
confirmSelection:
|
|
472
|
+
maxHeightMenu: g = "180px",
|
|
473
|
+
menuIsOpen: h,
|
|
474
|
+
onEnter: m,
|
|
475
|
+
marginTop: u = "4px",
|
|
476
|
+
iconName: f,
|
|
477
|
+
iconColor: $,
|
|
478
|
+
iconPosition: I,
|
|
479
|
+
topOffset: p = 0,
|
|
480
|
+
bottomOffset: k = 0,
|
|
481
|
+
truncateText: z = !0,
|
|
482
|
+
menuJustifyContent: L = "flex-start",
|
|
483
|
+
tableActionButton: C,
|
|
484
|
+
menuLateralPadding: R = "8px",
|
|
485
|
+
menuOptionFlexDirection: H = "column",
|
|
486
|
+
confirmSelection: B,
|
|
487
487
|
menuAlign: J = "left"
|
|
488
488
|
}, A) => {
|
|
489
|
-
G(
|
|
489
|
+
G(f) && (f += "Ant");
|
|
490
490
|
const {
|
|
491
491
|
highlightedIndex: T,
|
|
492
|
-
setHighlightedIndex:
|
|
492
|
+
setHighlightedIndex: b,
|
|
493
493
|
isOptionSelected: w,
|
|
494
494
|
optionsRef: v,
|
|
495
495
|
parentWidth: E
|
|
496
496
|
} = Oe(
|
|
497
497
|
e,
|
|
498
498
|
s,
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
p,
|
|
500
|
+
k,
|
|
501
501
|
J
|
|
502
502
|
);
|
|
503
503
|
Z(() => {
|
|
504
|
-
const r = (
|
|
505
|
-
if (
|
|
506
|
-
if (
|
|
507
|
-
|
|
508
|
-
(
|
|
504
|
+
const r = (S) => {
|
|
505
|
+
if (h) {
|
|
506
|
+
if (S.key === "ArrowDown")
|
|
507
|
+
S.preventDefault(), b(
|
|
508
|
+
(j) => j < t.length - 1 ? j + 1 : j
|
|
509
509
|
);
|
|
510
|
-
else if (
|
|
511
|
-
|
|
512
|
-
(
|
|
510
|
+
else if (S.key === "ArrowUp")
|
|
511
|
+
S.preventDefault(), b(
|
|
512
|
+
(j) => j > 0 ? j - 1 : 0
|
|
513
513
|
);
|
|
514
|
-
else if (
|
|
515
|
-
|
|
516
|
-
const
|
|
517
|
-
l(
|
|
514
|
+
else if (S.key === "Enter" && t[T]) {
|
|
515
|
+
S.preventDefault();
|
|
516
|
+
const j = t[T];
|
|
517
|
+
l(j), m && m(j);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
522
522
|
}, [
|
|
523
|
-
|
|
523
|
+
h,
|
|
524
524
|
t,
|
|
525
525
|
T,
|
|
526
|
-
|
|
526
|
+
m,
|
|
527
527
|
l,
|
|
528
|
-
|
|
528
|
+
B
|
|
529
529
|
]);
|
|
530
|
-
const y = (r) => typeof r == "string" ? r : je.isValidElement(r) && typeof r.props.children == "string" ? r.props.children : String(r), c = (r,
|
|
531
|
-
var
|
|
532
|
-
if (
|
|
533
|
-
const
|
|
530
|
+
const y = (r) => typeof r == "string" ? r : je.isValidElement(r) && typeof r.props.children == "string" ? r.props.children : String(r), c = (r, S) => {
|
|
531
|
+
var F, W;
|
|
532
|
+
if (I !== S) return null;
|
|
533
|
+
const j = G((F = r.tooltipProps) == null ? void 0 : F.label), N = r.iconName || f || "InfoFill0Sm", D = /* @__PURE__ */ n.jsx(
|
|
534
534
|
Pe,
|
|
535
535
|
{
|
|
536
|
-
iconPosition: (
|
|
536
|
+
iconPosition: (W = r.tooltipProps) == null ? void 0 : W.position,
|
|
537
537
|
id: `iconContainer-${r.value}`,
|
|
538
538
|
children: /* @__PURE__ */ n.jsx(
|
|
539
539
|
V,
|
|
540
540
|
{
|
|
541
|
-
iconName:
|
|
542
|
-
color: r.disabled ? o.colors.neutralColors.colorNeutralCleanest : w(r) ? o.colors.brandColors.colorBrandSoft :
|
|
541
|
+
iconName: N,
|
|
542
|
+
color: r.disabled ? o.colors.neutralColors.colorNeutralCleanest : w(r) ? o.colors.brandColors.colorBrandSoft : $ ?? o.colors.neutralColors.colorNeutralDark
|
|
543
543
|
}
|
|
544
544
|
)
|
|
545
545
|
}
|
|
546
546
|
);
|
|
547
|
-
return
|
|
547
|
+
return j ? /* @__PURE__ */ n.jsx(fe, { ...r == null ? void 0 : r.tooltipProps, isActive: !0, children: D }) : D;
|
|
548
548
|
};
|
|
549
549
|
return /* @__PURE__ */ n.jsx(
|
|
550
550
|
Me,
|
|
551
551
|
{
|
|
552
|
-
marginTop:
|
|
552
|
+
marginTop: u,
|
|
553
553
|
width: a ?? `${E}px`,
|
|
554
|
-
maxHeight:
|
|
554
|
+
maxHeight: g,
|
|
555
555
|
height: "fit-content",
|
|
556
556
|
ref: (r) => {
|
|
557
557
|
v.current = r, typeof A == "function" ? A(r) : A && (A.current = r);
|
|
558
558
|
},
|
|
559
559
|
"data-testid": "MenuSelect",
|
|
560
560
|
id: "MenuSelect",
|
|
561
|
-
children: t.length === 0 ? /* @__PURE__ */ n.jsx(He, { size: i, children: "Sem opções" }) : t.map((r,
|
|
562
|
-
var D,
|
|
563
|
-
const
|
|
561
|
+
children: t.length === 0 ? /* @__PURE__ */ n.jsx(He, { size: i, children: "Sem opções" }) : t.map((r, S) => {
|
|
562
|
+
var D, F;
|
|
563
|
+
const j = typeof r.render == "function" ? r.render() : null, N = y(r.label);
|
|
564
564
|
if (r.isSection)
|
|
565
|
-
return /* @__PURE__ */ n.jsx(
|
|
565
|
+
return /* @__PURE__ */ n.jsx(Fe, { size: i, children: N }, N);
|
|
566
566
|
{
|
|
567
|
-
const
|
|
567
|
+
const W = N.toLowerCase().indexOf((d == null ? void 0 : d.toLowerCase()) || "");
|
|
568
568
|
return /* @__PURE__ */ n.jsxs(
|
|
569
569
|
Te,
|
|
570
570
|
{
|
|
571
571
|
isOptionSelected: w(r),
|
|
572
|
-
highlightedIndex:
|
|
572
|
+
highlightedIndex: S === T,
|
|
573
573
|
onClick: (X) => {
|
|
574
|
-
X.stopPropagation(), r.disabled || (
|
|
574
|
+
X.stopPropagation(), r.disabled || (B ? Ce({
|
|
575
575
|
id: "select-option",
|
|
576
|
-
title:
|
|
577
|
-
description:
|
|
578
|
-
icon:
|
|
579
|
-
iconColor:
|
|
576
|
+
title: B.title,
|
|
577
|
+
description: B.description,
|
|
578
|
+
icon: B.icon,
|
|
579
|
+
iconColor: B.iconColor,
|
|
580
580
|
leftButtonProps: {
|
|
581
581
|
name: "Cancelar",
|
|
582
582
|
variant: "tertiary",
|
|
@@ -590,34 +590,34 @@ const ko = ({
|
|
|
590
590
|
}
|
|
591
591
|
}) : l(r));
|
|
592
592
|
},
|
|
593
|
-
onMouseEnter: () =>
|
|
593
|
+
onMouseEnter: () => b(S),
|
|
594
594
|
disabled: r.disabled,
|
|
595
595
|
size: i,
|
|
596
|
-
menuLateralPadding:
|
|
596
|
+
menuLateralPadding: R,
|
|
597
597
|
children: [
|
|
598
598
|
c(r, "left"),
|
|
599
599
|
/* @__PURE__ */ n.jsxs(
|
|
600
|
-
|
|
600
|
+
Ee,
|
|
601
601
|
{
|
|
602
|
-
menuOptionFlexDirection:
|
|
603
|
-
menuJustifyContent:
|
|
604
|
-
iconName:
|
|
602
|
+
menuOptionFlexDirection: H,
|
|
603
|
+
menuJustifyContent: L,
|
|
604
|
+
iconName: f,
|
|
605
605
|
isOptionSelected: w(r),
|
|
606
|
-
highlightedIndex:
|
|
606
|
+
highlightedIndex: S === T,
|
|
607
607
|
"data-testid": r.value,
|
|
608
608
|
size: i,
|
|
609
609
|
hasDescription: !!r.description,
|
|
610
610
|
optionValue: r.value,
|
|
611
611
|
disabled: r.disabled,
|
|
612
|
-
truncateText:
|
|
613
|
-
tableActionButton:
|
|
612
|
+
truncateText: z,
|
|
613
|
+
tableActionButton: C,
|
|
614
614
|
children: [
|
|
615
615
|
/* @__PURE__ */ n.jsxs(
|
|
616
616
|
Ae,
|
|
617
617
|
{
|
|
618
|
-
truncateText: !se(r.label) &&
|
|
618
|
+
truncateText: !se(r.label) && z,
|
|
619
619
|
children: [
|
|
620
|
-
|
|
620
|
+
j,
|
|
621
621
|
se(r.label) ? /* @__PURE__ */ n.jsx(
|
|
622
622
|
"p",
|
|
623
623
|
{
|
|
@@ -627,17 +627,17 @@ const ko = ({
|
|
|
627
627
|
) : /* @__PURE__ */ n.jsx(
|
|
628
628
|
"p",
|
|
629
629
|
{
|
|
630
|
-
title: ((
|
|
631
|
-
children: d &&
|
|
632
|
-
|
|
633
|
-
/* @__PURE__ */ n.jsx(Le, { size: i, children:
|
|
634
|
-
|
|
635
|
-
|
|
630
|
+
title: ((F = r == null ? void 0 : r.tooltipProps) == null ? void 0 : F.label) ?? N,
|
|
631
|
+
children: d && W >= 0 ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
632
|
+
N.substring(0, W),
|
|
633
|
+
/* @__PURE__ */ n.jsx(Le, { size: i, children: N.substring(
|
|
634
|
+
W,
|
|
635
|
+
W + ((d == null ? void 0 : d.length) || 0)
|
|
636
636
|
) }),
|
|
637
|
-
|
|
638
|
-
|
|
637
|
+
N.substring(
|
|
638
|
+
W + ((d == null ? void 0 : d.length) || 0)
|
|
639
639
|
)
|
|
640
|
-
] }) :
|
|
640
|
+
] }) : N
|
|
641
641
|
}
|
|
642
642
|
)
|
|
643
643
|
]
|
|
@@ -667,9 +667,9 @@ const De = ({
|
|
|
667
667
|
height: s,
|
|
668
668
|
flex: d,
|
|
669
669
|
children: a,
|
|
670
|
-
wrapperCustomStyles:
|
|
671
|
-
contentCustomStyles:
|
|
672
|
-
titleCustomStyles:
|
|
670
|
+
wrapperCustomStyles: g = {},
|
|
671
|
+
contentCustomStyles: h = {},
|
|
672
|
+
titleCustomStyles: m = {}
|
|
673
673
|
}) => /* @__PURE__ */ n.jsxs(
|
|
674
674
|
_,
|
|
675
675
|
{
|
|
@@ -682,7 +682,7 @@ const De = ({
|
|
|
682
682
|
backgroundColor: o.colors.backgroundColors.colorBackgroundSnow,
|
|
683
683
|
border: `1px solid ${o.colors.neutralColors.colorNeutralSoft}`,
|
|
684
684
|
borderRadius: "8px",
|
|
685
|
-
...
|
|
685
|
+
...g
|
|
686
686
|
},
|
|
687
687
|
children: [
|
|
688
688
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -690,9 +690,9 @@ const De = ({
|
|
|
690
690
|
{
|
|
691
691
|
width: "100%",
|
|
692
692
|
direction: "horizontal",
|
|
693
|
-
customStyles:
|
|
693
|
+
customStyles: h,
|
|
694
694
|
children: [
|
|
695
|
-
e ? /* @__PURE__ */ n.jsx(_, { width: "fit-content", customStyles:
|
|
695
|
+
e ? /* @__PURE__ */ n.jsx(_, { width: "fit-content", customStyles: m, children: /* @__PURE__ */ n.jsx(ce, { title: e, divider: !1 }) }) : null,
|
|
696
696
|
t ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
697
697
|
/* @__PURE__ */ n.jsx(ke, { size: "auto", direction: "horizontal" }),
|
|
698
698
|
/* @__PURE__ */ n.jsx(
|
|
@@ -713,7 +713,7 @@ const De = ({
|
|
|
713
713
|
}
|
|
714
714
|
);
|
|
715
715
|
De.displayName = "Section";
|
|
716
|
-
const Xe =
|
|
716
|
+
const Xe = x.div`
|
|
717
717
|
${q}
|
|
718
718
|
display: flex;
|
|
719
719
|
flex-direction: column;
|
|
@@ -722,19 +722,19 @@ const Xe = C.div`
|
|
|
722
722
|
&:hover {
|
|
723
723
|
cursor: ${({ disabled: e, readonly: t }) => e || t ? "default" : "pointer"};
|
|
724
724
|
}
|
|
725
|
-
`, _e =
|
|
725
|
+
`, _e = x.div`
|
|
726
726
|
width: 100%;
|
|
727
|
-
${({ variant: e }) => e === "default" ?
|
|
727
|
+
${({ variant: e }) => e === "default" ? M`
|
|
728
728
|
min-height: ${({ size: t }) => t === "Small" ? "3.2rem" : "4rem"};
|
|
729
729
|
max-height: ${({ size: t }) => t === "Small" ? "3.2rem" : "4rem"};
|
|
730
|
-
` :
|
|
730
|
+
` : M`
|
|
731
731
|
min-height: ${({ size: t }) => t === "Small" ? "1rem" : "3.2rem"};
|
|
732
732
|
max-height: ${({ size: t }) => t === "Small" ? "1rem" : "3.2rem"};
|
|
733
733
|
`}
|
|
734
734
|
|
|
735
735
|
display: flex;
|
|
736
736
|
align-items: center;
|
|
737
|
-
${({ variant: e }) => e === "default" &&
|
|
737
|
+
${({ variant: e }) => e === "default" && M`
|
|
738
738
|
border: ${o.borders.borderWidth.borderWidthThinner} solid;
|
|
739
739
|
border-radius: ${o.borders.borderRadius.borderRadiusSm};
|
|
740
740
|
border-color: ${({ isOpen: t, hasError: i, readonly: l, disabled: s }) => i ? o.colors.feedbackColors.colorFeedbackError : l || s ? o.colors.neutralColors.colorNeutralClean : t ? o.colors.neutralColors.colorNeutralCloudy : o.colors.neutralColors.colorNeutralClean};
|
|
@@ -747,28 +747,28 @@ const Xe = C.div`
|
|
|
747
747
|
if (t === "default")
|
|
748
748
|
return e !== "Small" ? `0 ${o.spacings.spacingInline.spacingInlineSm}` : `0 ${o.spacings.spacingInline.spacingInlineAnt}`;
|
|
749
749
|
}};
|
|
750
|
-
${({ size: e, variant: t }) => e === "Small" ? t === "default" ?
|
|
750
|
+
${({ size: e, variant: t }) => e === "Small" ? t === "default" ? M`
|
|
751
751
|
font-size: ${o.fonts.fontSize.fontSizeBodyMd};
|
|
752
752
|
line-height: ${o.fonts.lineHeight.lineHeightSm(
|
|
753
753
|
o.fonts.fontSize.fontSizeBodyMd
|
|
754
754
|
)};
|
|
755
|
-
` :
|
|
755
|
+
` : M`
|
|
756
756
|
font-size: ${o.fonts.fontSize.fontSizeBodySm};
|
|
757
757
|
line-height: ${o.fonts.lineHeight.lineHeightSm(
|
|
758
758
|
o.fonts.fontSize.fontSizeBodySm
|
|
759
759
|
)};
|
|
760
|
-
` : t === "default" ?
|
|
760
|
+
` : t === "default" ? M`
|
|
761
761
|
font-size: ${o.fonts.fontSize.fontSizeBodyLg};
|
|
762
762
|
line-height: ${o.fonts.lineHeight.lineHeightMd(
|
|
763
763
|
o.fonts.fontSize.fontSizeBodyLg
|
|
764
764
|
)};
|
|
765
|
-
` :
|
|
765
|
+
` : M`
|
|
766
766
|
font-size: ${o.fonts.fontSize.fontSizeBodyMd};
|
|
767
767
|
line-height: ${o.fonts.lineHeight.lineHeightSm(
|
|
768
768
|
o.fonts.fontSize.fontSizeBodyMd
|
|
769
769
|
)};
|
|
770
770
|
`};
|
|
771
|
-
${({ disabled: e, readonly: t }) => (e || t) &&
|
|
771
|
+
${({ disabled: e, readonly: t }) => (e || t) && M`
|
|
772
772
|
background-color: ${o.colors.brandColors.colorBrandSeSoft};
|
|
773
773
|
border-style: solid;
|
|
774
774
|
`};
|
|
@@ -782,7 +782,7 @@ const Xe = C.div`
|
|
|
782
782
|
fill: ${({ disabled: e, readonly: t }) => e || t ? o.colors.neutralColors.colorNeutralCloudy : o.colors.neutralColors.colorNeutralCloudy};
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
`, Ue =
|
|
785
|
+
`, Ue = x.div`
|
|
786
786
|
align-items: center;
|
|
787
787
|
display: flex;
|
|
788
788
|
flex: 1 1 0%;
|
|
@@ -791,7 +791,7 @@ const Xe = C.div`
|
|
|
791
791
|
overflow: hidden;
|
|
792
792
|
min-height: 1em;
|
|
793
793
|
box-sizing: border-box;
|
|
794
|
-
`, de =
|
|
794
|
+
`, de = x.span`
|
|
795
795
|
display: flex;
|
|
796
796
|
flex-wrap: wrap;
|
|
797
797
|
width: ${({ isDisplayText: e }) => e ? "100%" : "fit-content"};
|
|
@@ -809,7 +809,7 @@ const Xe = C.div`
|
|
|
809
809
|
width: ${({ isDisplayText: e }) => e ? "100%" : "fit-content"};
|
|
810
810
|
font-style: ${({ isDisplayText: e }) => e ? "italic" : "normal"};
|
|
811
811
|
}
|
|
812
|
-
`, Ge =
|
|
812
|
+
`, Ge = x.span`
|
|
813
813
|
color: ${o.colors.neutralColors.colorNeutralCleanest};
|
|
814
814
|
font-size: ${({ size: e, variant: t }) => t === "default" ? e === "Small" ? o.fonts.fontSize.fontSizeBodyMd : o.fonts.fontSize.fontSizeBodyLg : e === "Small" ? o.fonts.fontSize.fontSizeBodySm : o.fonts.fontSize.fontSizeBodyMd};
|
|
815
815
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
@@ -818,7 +818,7 @@ const Xe = C.div`
|
|
|
818
818
|
white-space: nowrap;
|
|
819
819
|
overflow: hidden;
|
|
820
820
|
width: fit-content;
|
|
821
|
-
`, qe =
|
|
821
|
+
`, qe = x.input`
|
|
822
822
|
flex: 1;
|
|
823
823
|
min-width: 0.1rem;
|
|
824
824
|
border: none;
|
|
@@ -832,14 +832,14 @@ const Xe = C.div`
|
|
|
832
832
|
outline: none;
|
|
833
833
|
cursor: ${({ disabled: e, readOnly: t }) => e || t ? "default" : "pointer"};
|
|
834
834
|
}
|
|
835
|
-
`, Je =
|
|
835
|
+
`, Je = x.div`
|
|
836
836
|
width: 100%;
|
|
837
837
|
display: flex;
|
|
838
838
|
flex-direction: row;
|
|
839
839
|
gap: 4px;
|
|
840
840
|
justify-content: flex-start;
|
|
841
841
|
margin-bottom: ${o.spacings.spacingStack.spacingStackNano};
|
|
842
|
-
`, Ye =
|
|
842
|
+
`, Ye = x.label`
|
|
843
843
|
font-size: ${o.fonts.fontSize.fontSizeBodyMd};
|
|
844
844
|
font-weight: ${o.fonts.fontWeight.fontWeightRegular};
|
|
845
845
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
@@ -848,7 +848,7 @@ const Xe = C.div`
|
|
|
848
848
|
)};
|
|
849
849
|
color: ${o.colors.neutralColors.colorNeutralCloudy};
|
|
850
850
|
margin-bottom: ${o.spacings.spacingStack.spacingStackNano};
|
|
851
|
-
`, Qe =
|
|
851
|
+
`, Qe = x.label`
|
|
852
852
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
853
853
|
font-size: ${o.fonts.fontSize.fontSizeBodyMd};
|
|
854
854
|
font-weight: ${o.fonts.fontWeight.fontWeightRegular};
|
|
@@ -857,7 +857,7 @@ const Xe = C.div`
|
|
|
857
857
|
)};
|
|
858
858
|
color: ${o.colors.feedbackColors.colorFeedbackError};
|
|
859
859
|
`;
|
|
860
|
-
|
|
860
|
+
x.p`
|
|
861
861
|
display: inline-block;
|
|
862
862
|
font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodySm : o.fonts.fontSize.fontSizeBodyMd};
|
|
863
863
|
font-weight: ${o.fonts.fontWeight.fontWeightRegular};
|
|
@@ -865,7 +865,7 @@ C.p`
|
|
|
865
865
|
margin-top: ${o.spacings.spacingInline.spacingInlineNano};
|
|
866
866
|
width: 100%;
|
|
867
867
|
`;
|
|
868
|
-
const Ve =
|
|
868
|
+
const Ve = x.p`
|
|
869
869
|
display: inline-block;
|
|
870
870
|
font-size: ${({ size: e }) => e === "Small" ? o.fonts.fontSize.fontSizeBodySm : o.fonts.fontSize.fontSizeBodyMd};
|
|
871
871
|
font-weight: ${o.fonts.fontWeight.fontWeightRegular};
|
|
@@ -873,46 +873,46 @@ const Ve = C.p`
|
|
|
873
873
|
margin-top: ${o.spacings.spacingInline.spacingInlineNano};
|
|
874
874
|
width: 100%;
|
|
875
875
|
`, Ze = (e, { value: t, options: i }) => {
|
|
876
|
-
const [l, s] = P(!1), [d, a] = P(!1), [
|
|
876
|
+
const [l, s] = P(!1), [d, a] = P(!1), [g, h] = P(""), [m, u] = P(i), f = U(null), $ = U(null), I = U(null), p = U(null);
|
|
877
877
|
Z(() => {
|
|
878
|
-
const
|
|
878
|
+
const C = () => {
|
|
879
879
|
a(!1);
|
|
880
880
|
};
|
|
881
|
-
return window.addEventListener("scroll",
|
|
882
|
-
window.removeEventListener("scroll",
|
|
881
|
+
return window.addEventListener("scroll", C, { passive: !0 }), window.addEventListener("resize", C, { passive: !0 }), () => {
|
|
882
|
+
window.removeEventListener("scroll", C), window.removeEventListener("resize", C);
|
|
883
883
|
};
|
|
884
884
|
}, []);
|
|
885
|
-
function
|
|
886
|
-
|
|
885
|
+
function k(C) {
|
|
886
|
+
h(""), a(!1), s(!0), I != null && I.current && I.current.focus(), C !== t && e(C);
|
|
887
887
|
}
|
|
888
|
-
const
|
|
889
|
-
if (
|
|
890
|
-
const
|
|
891
|
-
(
|
|
888
|
+
const z = (C) => {
|
|
889
|
+
if (C) {
|
|
890
|
+
const R = new RegExp(C, "i"), H = i.filter(
|
|
891
|
+
(B) => R.exec(B.label)
|
|
892
892
|
);
|
|
893
|
-
|
|
893
|
+
u(H);
|
|
894
894
|
} else
|
|
895
|
-
|
|
895
|
+
u(i);
|
|
896
896
|
};
|
|
897
|
-
function
|
|
898
|
-
return !
|
|
897
|
+
function L(C) {
|
|
898
|
+
return !C;
|
|
899
899
|
}
|
|
900
900
|
return {
|
|
901
901
|
isOpen: l,
|
|
902
902
|
setIsOpen: s,
|
|
903
903
|
expanded: d,
|
|
904
904
|
setExpanded: a,
|
|
905
|
-
inputValue:
|
|
906
|
-
setInputValue:
|
|
907
|
-
optionsSelect:
|
|
908
|
-
setOptionSelect:
|
|
909
|
-
selectContainerRef:
|
|
910
|
-
containerRef:
|
|
911
|
-
inputContainerRef:
|
|
912
|
-
optionsRef:
|
|
913
|
-
selectOption:
|
|
914
|
-
handlerFilterOptions:
|
|
915
|
-
isValue:
|
|
905
|
+
inputValue: g,
|
|
906
|
+
setInputValue: h,
|
|
907
|
+
optionsSelect: m,
|
|
908
|
+
setOptionSelect: u,
|
|
909
|
+
selectContainerRef: f,
|
|
910
|
+
containerRef: $,
|
|
911
|
+
inputContainerRef: I,
|
|
912
|
+
optionsRef: p,
|
|
913
|
+
selectOption: k,
|
|
914
|
+
handlerFilterOptions: z,
|
|
915
|
+
isValue: L
|
|
916
916
|
};
|
|
917
917
|
}, me = ge(
|
|
918
918
|
({
|
|
@@ -923,52 +923,52 @@ const Ve = C.p`
|
|
|
923
923
|
placeholder: s,
|
|
924
924
|
label: d,
|
|
925
925
|
size: a = "Medium",
|
|
926
|
-
width:
|
|
927
|
-
disabled:
|
|
928
|
-
helpText:
|
|
929
|
-
readonly:
|
|
930
|
-
errorMessage:
|
|
931
|
-
tooltipProps:
|
|
932
|
-
onBlur:
|
|
933
|
-
onEnter:
|
|
934
|
-
variant:
|
|
935
|
-
infoProps:
|
|
936
|
-
maxHeightMenu:
|
|
937
|
-
isRequired:
|
|
938
|
-
onRemoveSelected:
|
|
939
|
-
displayText:
|
|
940
|
-
displayTextProps:
|
|
926
|
+
width: g = "100%",
|
|
927
|
+
disabled: h,
|
|
928
|
+
helpText: m,
|
|
929
|
+
readonly: u,
|
|
930
|
+
errorMessage: f,
|
|
931
|
+
tooltipProps: $ = {},
|
|
932
|
+
onBlur: I,
|
|
933
|
+
onEnter: p,
|
|
934
|
+
variant: k = "default",
|
|
935
|
+
infoProps: z = {},
|
|
936
|
+
maxHeightMenu: L,
|
|
937
|
+
isRequired: C = !1,
|
|
938
|
+
onRemoveSelected: R,
|
|
939
|
+
displayText: H,
|
|
940
|
+
displayTextProps: B = {}
|
|
941
941
|
}, J) => {
|
|
942
942
|
const {
|
|
943
943
|
isOpen: A,
|
|
944
944
|
setIsOpen: T,
|
|
945
|
-
expanded:
|
|
945
|
+
expanded: b,
|
|
946
946
|
setExpanded: w,
|
|
947
947
|
inputValue: v,
|
|
948
948
|
setInputValue: E,
|
|
949
949
|
optionsSelect: y,
|
|
950
950
|
selectContainerRef: c,
|
|
951
951
|
containerRef: r,
|
|
952
|
-
inputContainerRef:
|
|
953
|
-
selectOption:
|
|
954
|
-
setOptionSelect:
|
|
952
|
+
inputContainerRef: S,
|
|
953
|
+
selectOption: j,
|
|
954
|
+
setOptionSelect: N,
|
|
955
955
|
handlerFilterOptions: D,
|
|
956
|
-
isValue:
|
|
957
|
-
} = Ze(t, { value: e, options: i }),
|
|
958
|
-
label:
|
|
959
|
-
|
|
956
|
+
isValue: F
|
|
957
|
+
} = Ze(t, { value: e, options: i }), W = !!f, X = {
|
|
958
|
+
label: f,
|
|
959
|
+
...$,
|
|
960
960
|
wrapperWidth: "auto",
|
|
961
|
-
isActive:
|
|
961
|
+
isActive: W,
|
|
962
962
|
isErrorTooltip: !0
|
|
963
963
|
}, O = {
|
|
964
|
-
...
|
|
964
|
+
...z,
|
|
965
965
|
size: a
|
|
966
966
|
}, K = /* @__PURE__ */ n.jsx(
|
|
967
967
|
V,
|
|
968
968
|
{
|
|
969
969
|
iconName: `Close${a === "Small" ? "Sm" : "Ant"}`,
|
|
970
970
|
onClick: (Y) => {
|
|
971
|
-
Y.stopPropagation(),
|
|
971
|
+
Y.stopPropagation(), R(e);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
), te = /* @__PURE__ */ n.jsx(V, { iconName: `ExpandLess${a === "Small" ? "Sm" : "Ant"}` }), be = /* @__PURE__ */ n.jsx(V, { iconName: `ExpandMore${a === "Small" ? "Sm" : "Ant"}` });
|
|
@@ -976,98 +976,98 @@ const Ve = C.p`
|
|
|
976
976
|
Xe,
|
|
977
977
|
{
|
|
978
978
|
ref: c,
|
|
979
|
-
width:
|
|
979
|
+
width: g,
|
|
980
980
|
size: a,
|
|
981
|
-
disabled:
|
|
982
|
-
readonly:
|
|
981
|
+
disabled: h,
|
|
982
|
+
readonly: u,
|
|
983
983
|
children: [
|
|
984
984
|
d && /* @__PURE__ */ n.jsxs(Je, { children: [
|
|
985
985
|
/* @__PURE__ */ n.jsxs(Ye, { "data-testid": "label", ref: J, children: [
|
|
986
986
|
d,
|
|
987
|
-
|
|
987
|
+
C && !h ? /* @__PURE__ */ n.jsx(Qe, { children: " *" }) : null
|
|
988
988
|
] }),
|
|
989
989
|
((O == null ? void 0 : O.message) || (O == null ? void 0 : O.render)) && /* @__PURE__ */ n.jsx(ze, { ...O })
|
|
990
990
|
] }),
|
|
991
991
|
/* @__PURE__ */ n.jsx(fe, { ...X, children: /* @__PURE__ */ n.jsxs(
|
|
992
992
|
_e,
|
|
993
993
|
{
|
|
994
|
-
hasError:
|
|
995
|
-
readonly:
|
|
994
|
+
hasError: W,
|
|
995
|
+
readonly: u,
|
|
996
996
|
ref: r,
|
|
997
997
|
onBlur: () => {
|
|
998
998
|
setTimeout(() => {
|
|
999
|
-
(A ||
|
|
999
|
+
(A || b) && S.current !== document.activeElement && (I && I(e), T(!1), w(!1));
|
|
1000
1000
|
}, 250);
|
|
1001
1001
|
},
|
|
1002
1002
|
onClick: () => {
|
|
1003
|
-
!
|
|
1003
|
+
!h && !u && (A && !b ? (w(!0), S != null && S.current && S.current.focus()) : !A && !b ? (T(!0), w(!0), S != null && S.current && S.current.focus()) : (T(!1), w(!1), S != null && S.current && S.current.blur()), !v && N(i));
|
|
1004
1004
|
},
|
|
1005
1005
|
tabIndex: 0,
|
|
1006
|
-
width:
|
|
1006
|
+
width: g,
|
|
1007
1007
|
size: a,
|
|
1008
|
-
isOpen: A ||
|
|
1008
|
+
isOpen: A || b,
|
|
1009
1009
|
"data-testid": "select",
|
|
1010
|
-
disabled:
|
|
1011
|
-
helpText:
|
|
1012
|
-
variant:
|
|
1010
|
+
disabled: h,
|
|
1011
|
+
helpText: m,
|
|
1012
|
+
variant: k,
|
|
1013
1013
|
children: [
|
|
1014
1014
|
/* @__PURE__ */ n.jsxs(Ue, { children: [
|
|
1015
|
-
G(
|
|
1016
|
-
s &&
|
|
1015
|
+
G(H) ? /* @__PURE__ */ n.jsx(de, { size: a, variant: k, isDisplayText: !0, children: /* @__PURE__ */ n.jsx("p", { title: e == null ? void 0 : e.label, ...B, children: H }) }) : /* @__PURE__ */ n.jsxs(de, { size: a, variant: k, children: [
|
|
1016
|
+
s && F(e) && !v && !A ? /* @__PURE__ */ n.jsx(Ge, { size: a, variant: k, children: s }) : null,
|
|
1017
1017
|
(e == null ? void 0 : e.label) && /* @__PURE__ */ n.jsx("p", { title: (e == null ? void 0 : e.hint) ?? (e == null ? void 0 : e.label), children: e == null ? void 0 : e.label })
|
|
1018
1018
|
] }),
|
|
1019
|
-
l && !G(
|
|
1019
|
+
l && !G(H) && /* @__PURE__ */ n.jsx(
|
|
1020
1020
|
qe,
|
|
1021
1021
|
{
|
|
1022
|
-
ref:
|
|
1022
|
+
ref: S,
|
|
1023
1023
|
value: v,
|
|
1024
1024
|
onChange: (Y) => {
|
|
1025
1025
|
E(Y.target.value), Y.target.value.length > 0 && (T(!0), w(!0)), D(Y.target.value);
|
|
1026
1026
|
},
|
|
1027
|
-
readOnly:
|
|
1027
|
+
readOnly: u,
|
|
1028
1028
|
width: v.length,
|
|
1029
1029
|
size: a,
|
|
1030
|
-
disabled:
|
|
1031
|
-
variant:
|
|
1030
|
+
disabled: h,
|
|
1031
|
+
variant: k
|
|
1032
1032
|
}
|
|
1033
1033
|
)
|
|
1034
1034
|
] }),
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1035
|
+
R && e ? K : null,
|
|
1036
|
+
b ? te : be,
|
|
1037
|
+
b && /* @__PURE__ */ n.jsx(
|
|
1038
1038
|
ie,
|
|
1039
1039
|
{
|
|
1040
1040
|
onEnter: (Y) => {
|
|
1041
|
-
t && t(Y), T(!1), w(!1),
|
|
1041
|
+
t && t(Y), T(!1), w(!1), p && p(Y);
|
|
1042
1042
|
},
|
|
1043
1043
|
menuIsOpen: A,
|
|
1044
1044
|
selectContainerRef: c,
|
|
1045
1045
|
value: e,
|
|
1046
1046
|
optionsSelect: y,
|
|
1047
|
-
selectOption:
|
|
1047
|
+
selectOption: j,
|
|
1048
1048
|
size: a,
|
|
1049
1049
|
inputValue: v,
|
|
1050
|
-
maxHeightMenu:
|
|
1050
|
+
maxHeightMenu: L
|
|
1051
1051
|
}
|
|
1052
1052
|
)
|
|
1053
1053
|
]
|
|
1054
1054
|
}
|
|
1055
1055
|
) }),
|
|
1056
|
-
|
|
1056
|
+
m && /* @__PURE__ */ n.jsx(Ve, { size: a, children: m })
|
|
1057
1057
|
]
|
|
1058
1058
|
}
|
|
1059
1059
|
);
|
|
1060
1060
|
}
|
|
1061
1061
|
);
|
|
1062
1062
|
me.displayName = "Select";
|
|
1063
|
-
const
|
|
1063
|
+
const pe = Be`
|
|
1064
1064
|
from {
|
|
1065
1065
|
transform: rotate(0deg);
|
|
1066
1066
|
}
|
|
1067
1067
|
to {
|
|
1068
1068
|
transform: rotate(360deg);
|
|
1069
1069
|
}
|
|
1070
|
-
`, Ke =
|
|
1070
|
+
`, Ke = x.button`
|
|
1071
1071
|
display: flex;
|
|
1072
1072
|
justify-content: space-between;
|
|
1073
1073
|
align-items: center;
|
|
@@ -1075,7 +1075,7 @@ const Se = Be`
|
|
|
1075
1075
|
padding: ${({ size: e }) => e === "Small" ? `0 ${o.spacings.spacingInline.spacingInlineAnt}` : `0 ${o.spacings.spacingInline.spacingInlineSm}`};
|
|
1076
1076
|
${({ variant: e }) => {
|
|
1077
1077
|
if (e === "primary")
|
|
1078
|
-
return
|
|
1078
|
+
return M`
|
|
1079
1079
|
background-color: ${o.colors.brandColors.colorBrandPrimary};
|
|
1080
1080
|
color: ${o.colors.backgroundColors.colorBackgroundSnow};
|
|
1081
1081
|
transition: filter 0.2s;
|
|
@@ -1086,7 +1086,7 @@ const Se = Be`
|
|
|
1086
1086
|
}
|
|
1087
1087
|
`;
|
|
1088
1088
|
if (e === "secondary")
|
|
1089
|
-
return
|
|
1089
|
+
return M`
|
|
1090
1090
|
background-color: rgba(
|
|
1091
1091
|
${We(o.colors.neutralColors.colorNeutralSoft)},
|
|
1092
1092
|
${o.opacityLevels.light}
|
|
@@ -1101,7 +1101,7 @@ const Se = Be`
|
|
|
1101
1101
|
}
|
|
1102
1102
|
`;
|
|
1103
1103
|
if (e === "tertiary")
|
|
1104
|
-
return
|
|
1104
|
+
return M`
|
|
1105
1105
|
background-color: transparent;
|
|
1106
1106
|
color: ${o.colors.neutralColors.colorNeutralDark};
|
|
1107
1107
|
border: ${o.borders.borderWidth.borderWidthNone};
|
|
@@ -1113,7 +1113,7 @@ const Se = Be`
|
|
|
1113
1113
|
}
|
|
1114
1114
|
`;
|
|
1115
1115
|
}};
|
|
1116
|
-
${({ disabled: e }) => e &&
|
|
1116
|
+
${({ disabled: e }) => e && M`
|
|
1117
1117
|
background-color: ${o.colors.backgroundColors.colorBackgroundGrass};
|
|
1118
1118
|
color: ${o.colors.neutralColors.colorNeutralCloudy};
|
|
1119
1119
|
transition: filter 0.2s;
|
|
@@ -1142,15 +1142,15 @@ const Se = Be`
|
|
|
1142
1142
|
min-width: ${({ size: e }) => e === "Small" ? o.icons.iconSizeSm : o.icons.iconSizeAnt};
|
|
1143
1143
|
height: ${({ size: e }) => e === "Small" ? o.icons.iconSizeSm : o.icons.iconSizeAnt};
|
|
1144
1144
|
|
|
1145
|
-
${({ isLoading: e }) => e &&
|
|
1146
|
-
animation: ${
|
|
1145
|
+
${({ isLoading: e }) => e && M`
|
|
1146
|
+
animation: ${pe} 2s linear infinite;
|
|
1147
1147
|
`}
|
|
1148
1148
|
|
|
1149
1149
|
path {
|
|
1150
1150
|
fill: ${({ variant: e, disabled: t }) => t ? o.colors.neutralColors.colorNeutralCloudy : e === "primary" ? o.colors.backgroundColors.colorBackgroundSnow : o.colors.neutralColors.colorNeutralDark};
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
|
-
`, eo =
|
|
1153
|
+
`, eo = x.div`
|
|
1154
1154
|
display: flex;
|
|
1155
1155
|
flex-direction: column;
|
|
1156
1156
|
width: ${({ width: e }) => e};
|
|
@@ -1158,7 +1158,7 @@ const Se = Be`
|
|
|
1158
1158
|
&:hover {
|
|
1159
1159
|
cursor: ${({ disabled: e }) => e && "not-allowed"};
|
|
1160
1160
|
}
|
|
1161
|
-
`, oo =
|
|
1161
|
+
`, oo = x.label`
|
|
1162
1162
|
font-size: ${o.fonts.fontSize.fontSizeBodyMd};
|
|
1163
1163
|
font-weight: ${o.fonts.fontWeight.fontWeightRegular};
|
|
1164
1164
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
@@ -1168,7 +1168,7 @@ const Se = Be`
|
|
|
1168
1168
|
color: ${({ hasError: e }) => e ? `${o.colors.feedbackColors.colorFeedbackError}` : `${o.colors.neutralColors.colorNeutralCloudy}`};
|
|
1169
1169
|
margin-bottom: ${o.spacings.spacingStack.spacingStackNano};
|
|
1170
1170
|
`;
|
|
1171
|
-
|
|
1171
|
+
x.p`
|
|
1172
1172
|
display: inline-block;
|
|
1173
1173
|
font-size: ${o.fonts.fontSize.fontSizeBodyMd};
|
|
1174
1174
|
font-weight: ${o.fonts.fontWeight.fontWeightRegular};
|
|
@@ -1176,14 +1176,14 @@ C.p`
|
|
|
1176
1176
|
margin-top: ${o.spacings.spacingInline.spacingInlineNano};
|
|
1177
1177
|
width: 100%;
|
|
1178
1178
|
`;
|
|
1179
|
-
const to =
|
|
1179
|
+
const to = x.div`
|
|
1180
1180
|
width: 100%;
|
|
1181
1181
|
|
|
1182
1182
|
& > svg {
|
|
1183
1183
|
min-width: ${({ size: e }) => e === "Small" ? o.icons.iconSizeSm : o.icons.iconSizeAnt};
|
|
1184
1184
|
height: ${({ size: e }) => e === "Small" ? o.icons.iconSizeSm : o.icons.iconSizeAnt};
|
|
1185
1185
|
|
|
1186
|
-
animation: ${
|
|
1186
|
+
animation: ${pe} 2s linear infinite;
|
|
1187
1187
|
|
|
1188
1188
|
path {
|
|
1189
1189
|
fill: ${({ variant: e, disabled: t }) => t ? o.colors.neutralColors.colorNeutralCloudy : e === "primary" ? o.colors.backgroundColors.colorBackgroundSnow : o.colors.neutralColors.colorNeutralDark};
|
|
@@ -1204,7 +1204,7 @@ const to = C.div`
|
|
|
1204
1204
|
optionsSelect: l,
|
|
1205
1205
|
selectContainerRef: d
|
|
1206
1206
|
};
|
|
1207
|
-
}, ro = 200,
|
|
1207
|
+
}, ro = 200, ko = ({
|
|
1208
1208
|
name: e,
|
|
1209
1209
|
variant: t = "primary",
|
|
1210
1210
|
width: i = "100%",
|
|
@@ -1212,28 +1212,28 @@ const to = C.div`
|
|
|
1212
1212
|
disabled: s = !1,
|
|
1213
1213
|
isLoading: d = !1,
|
|
1214
1214
|
onClick: a,
|
|
1215
|
-
options:
|
|
1216
|
-
label:
|
|
1217
|
-
menuSelectProps:
|
|
1218
|
-
iconName:
|
|
1219
|
-
optionsIconPosition:
|
|
1215
|
+
options: g,
|
|
1216
|
+
label: h,
|
|
1217
|
+
menuSelectProps: m = {},
|
|
1218
|
+
iconName: u,
|
|
1219
|
+
optionsIconPosition: f
|
|
1220
1220
|
}) => {
|
|
1221
|
-
const { isOpen:
|
|
1222
|
-
let
|
|
1223
|
-
s ?
|
|
1224
|
-
const
|
|
1225
|
-
...
|
|
1221
|
+
const { isOpen: $, setIsOpen: I, selectContainerRef: p, optionsSelect: k } = no(g);
|
|
1222
|
+
let z = o.colors.backgroundColors.colorBackgroundSnow;
|
|
1223
|
+
s ? z = o.colors.neutralColors.colorNeutralCloudy : t !== "primary" && (z = o.colors.neutralColors.colorNeutralDark);
|
|
1224
|
+
const L = {
|
|
1225
|
+
...m
|
|
1226
1226
|
};
|
|
1227
1227
|
return /* @__PURE__ */ n.jsxs(
|
|
1228
1228
|
eo,
|
|
1229
1229
|
{
|
|
1230
|
-
ref:
|
|
1230
|
+
ref: p,
|
|
1231
1231
|
width: i,
|
|
1232
1232
|
size: l,
|
|
1233
1233
|
disabled: s,
|
|
1234
|
-
onBlur: () => setTimeout(() =>
|
|
1234
|
+
onBlur: () => setTimeout(() => I(!1), ro),
|
|
1235
1235
|
children: [
|
|
1236
|
-
|
|
1236
|
+
h && /* @__PURE__ */ n.jsx(oo, { children: h }),
|
|
1237
1237
|
/* @__PURE__ */ n.jsxs(
|
|
1238
1238
|
Ke,
|
|
1239
1239
|
{
|
|
@@ -1242,100 +1242,112 @@ const to = C.div`
|
|
|
1242
1242
|
disabled: s,
|
|
1243
1243
|
variant: t,
|
|
1244
1244
|
isLoading: d,
|
|
1245
|
-
onClick: () => !d &&
|
|
1245
|
+
onClick: () => !d && I(!$),
|
|
1246
1246
|
id: `button-component-${e}`,
|
|
1247
1247
|
children: [
|
|
1248
1248
|
d && /* @__PURE__ */ n.jsx(to, { size: l, disabled: s, variant: t, children: /* @__PURE__ */ n.jsx(
|
|
1249
1249
|
V,
|
|
1250
1250
|
{
|
|
1251
1251
|
iconName: `ProgressActivity${l === "Small" ? "Ant" : "Sm"}`,
|
|
1252
|
-
color:
|
|
1252
|
+
color: z,
|
|
1253
1253
|
"data-testid": "icon-loading"
|
|
1254
1254
|
}
|
|
1255
1255
|
) }),
|
|
1256
1256
|
!d && /* @__PURE__ */ n.jsx("p", { title: e, children: e }),
|
|
1257
|
-
!d && (
|
|
1257
|
+
!d && ($ ? /* @__PURE__ */ n.jsx(
|
|
1258
1258
|
V,
|
|
1259
1259
|
{
|
|
1260
1260
|
iconName: `ExpandLess${l === "Small" ? "Ant" : "Sm"}`,
|
|
1261
|
-
color:
|
|
1261
|
+
color: z,
|
|
1262
1262
|
"data-testid": "icon-button-less"
|
|
1263
1263
|
}
|
|
1264
1264
|
) : /* @__PURE__ */ n.jsx(
|
|
1265
1265
|
V,
|
|
1266
1266
|
{
|
|
1267
1267
|
iconName: `ExpandMore${l === "Small" ? "Ant" : "Sm"}`,
|
|
1268
|
-
color:
|
|
1268
|
+
color: z,
|
|
1269
1269
|
"data-testid": "icon-button-more"
|
|
1270
1270
|
}
|
|
1271
1271
|
))
|
|
1272
1272
|
]
|
|
1273
1273
|
}
|
|
1274
1274
|
),
|
|
1275
|
-
|
|
1275
|
+
$ && /* @__PURE__ */ n.jsx(
|
|
1276
1276
|
ie,
|
|
1277
1277
|
{
|
|
1278
|
-
selectContainerRef:
|
|
1278
|
+
selectContainerRef: p,
|
|
1279
1279
|
value: null,
|
|
1280
|
-
optionsSelect:
|
|
1280
|
+
optionsSelect: k,
|
|
1281
1281
|
selectOption: a,
|
|
1282
1282
|
size: l,
|
|
1283
1283
|
inputValue: null,
|
|
1284
|
-
iconPosition:
|
|
1285
|
-
iconName:
|
|
1286
|
-
...
|
|
1284
|
+
iconPosition: f,
|
|
1285
|
+
iconName: u,
|
|
1286
|
+
...L
|
|
1287
1287
|
}
|
|
1288
1288
|
)
|
|
1289
1289
|
]
|
|
1290
1290
|
}
|
|
1291
1291
|
);
|
|
1292
|
-
}, lo =
|
|
1292
|
+
}, lo = x.div`
|
|
1293
1293
|
min-width: ${({ widthItems: e }) => e};
|
|
1294
1294
|
max-width: ${({ widthItems: e }) => e};
|
|
1295
1295
|
height: 100%;
|
|
1296
1296
|
overflow: hidden;
|
|
1297
|
+
display: flex;
|
|
1298
|
+
flex-direction: column;
|
|
1297
1299
|
|
|
1298
1300
|
&:hover {
|
|
1299
1301
|
overflow: auto;
|
|
1300
1302
|
scroll-padding-top: 10px;
|
|
1301
1303
|
}
|
|
1302
|
-
`, io =
|
|
1304
|
+
`, io = x.div`
|
|
1303
1305
|
width: 100%;
|
|
1304
1306
|
min-height: ${({ heightItems: e }) => e};
|
|
1305
1307
|
max-height: ${({ heightItems: e }) => e};
|
|
1306
1308
|
background-color: ${({ selected: e }) => e ? o.colors.backgroundColors.colorBackgroundSnow : "transparent"};
|
|
1307
1309
|
border-bottom: ${`1px solid ${o.colors.neutralColors.colorNeutralSoft}`};
|
|
1308
1310
|
padding: 8px;
|
|
1309
|
-
${({ withBorderRight: e }) => e &&
|
|
1311
|
+
${({ withBorderRight: e }) => e && M`
|
|
1310
1312
|
border-right: ${({ selected: t }) => t ? "none" : `1px solid ${o.colors.neutralColors.colorNeutralSoft}`};
|
|
1311
1313
|
`}
|
|
1312
1314
|
cursor: pointer;
|
|
1313
|
-
${({ customStyles: e }) => e &&
|
|
1314
|
-
|
|
1315
|
+
${({ customStyles: e }) => e && M(e)}
|
|
1316
|
+
`;
|
|
1317
|
+
x.div`
|
|
1315
1318
|
max-width: 4px;
|
|
1316
1319
|
min-width: 4px;
|
|
1317
1320
|
min-height: ${({ heightItems: e }) => e};
|
|
1318
1321
|
max-height: ${({ heightItems: e }) => e};
|
|
1319
|
-
background-color: ${({ selected: e }) => e ?
|
|
1322
|
+
background-color: ${({ selected: e }) => e ? o.colors.backgroundColors.colorBackgroundSnow : "transparent"};
|
|
1320
1323
|
border-bottom: ${`1px solid ${o.colors.neutralColors.colorNeutralSoft}`};
|
|
1321
1324
|
padding: 8px;
|
|
1322
|
-
${({ withBorderRight: e }) => e &&
|
|
1325
|
+
${({ withBorderRight: e }) => e && M`
|
|
1323
1326
|
border-right: ${({ selected: t }) => t ? "none" : `1px solid ${o.colors.neutralColors.colorNeutralSoft}`};
|
|
1324
1327
|
`}
|
|
1325
1328
|
cursor: pointer;
|
|
1326
|
-
|
|
1329
|
+
`;
|
|
1330
|
+
const so = x.div`
|
|
1327
1331
|
display: flex;
|
|
1328
1332
|
min-width: 0;
|
|
1329
1333
|
height: 100%;
|
|
1330
1334
|
flex: 1;
|
|
1331
1335
|
background-color: ${o.colors.backgroundColors.colorBackgroundSnow};
|
|
1332
|
-
|
|
1336
|
+
`;
|
|
1337
|
+
x.div`
|
|
1333
1338
|
max-width: 4px;
|
|
1334
1339
|
min-width: 4px;
|
|
1335
1340
|
height: 100%;
|
|
1336
1341
|
background-color: 'transparent';
|
|
1337
1342
|
overflow: hidden;
|
|
1338
|
-
|
|
1343
|
+
`;
|
|
1344
|
+
const ao = x.div`
|
|
1345
|
+
flex: 1;
|
|
1346
|
+
width: 100%;
|
|
1347
|
+
background-color: 'transparent';
|
|
1348
|
+
border-right: 1px solid ${o.colors.neutralColors.colorNeutralSoft};
|
|
1349
|
+
overflow: hidden;
|
|
1350
|
+
`, zo = ({
|
|
1339
1351
|
width: e = "100%",
|
|
1340
1352
|
height: t = "fit-content",
|
|
1341
1353
|
flex: i,
|
|
@@ -1343,29 +1355,28 @@ const to = C.div`
|
|
|
1343
1355
|
options: s = [],
|
|
1344
1356
|
heightItems: d = "60px",
|
|
1345
1357
|
widthItems: a = "155px",
|
|
1346
|
-
emptyProps:
|
|
1358
|
+
emptyProps: g = {
|
|
1347
1359
|
title: "Nenhum dado a ser mostrado",
|
|
1348
1360
|
body: null
|
|
1349
1361
|
},
|
|
1350
|
-
customWrapperStyles:
|
|
1351
|
-
customItemStyles:
|
|
1362
|
+
customWrapperStyles: h = {},
|
|
1363
|
+
customItemStyles: m = {}
|
|
1352
1364
|
}) => {
|
|
1353
|
-
|
|
1354
|
-
const [f, h] = P(s[0] || null), b = U(null), B = U(null);
|
|
1365
|
+
const [u, f] = P(s[0] || null), $ = U(null), I = U(null);
|
|
1355
1366
|
return Z(() => {
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1367
|
+
const p = $.current, k = I.current, z = () => {
|
|
1368
|
+
p && k && (k.scrollTop = p.scrollTop);
|
|
1358
1369
|
};
|
|
1359
|
-
return
|
|
1360
|
-
|
|
1370
|
+
return p == null || p.addEventListener("scroll", z), () => {
|
|
1371
|
+
p == null || p.removeEventListener("scroll", z);
|
|
1361
1372
|
};
|
|
1362
1373
|
}, []), Z(() => {
|
|
1363
|
-
|
|
1374
|
+
f(s[(s == null ? void 0 : s.length) - 1] || null);
|
|
1364
1375
|
}, [s == null ? void 0 : s.length]), (s == null ? void 0 : s.length) === 0 ? /* @__PURE__ */ n.jsx(
|
|
1365
|
-
|
|
1376
|
+
ue,
|
|
1366
1377
|
{
|
|
1367
|
-
title:
|
|
1368
|
-
body:
|
|
1378
|
+
title: g.title,
|
|
1379
|
+
body: g.body,
|
|
1369
1380
|
flex: "1",
|
|
1370
1381
|
mode: "table"
|
|
1371
1382
|
}
|
|
@@ -1380,36 +1391,29 @@ const to = C.div`
|
|
|
1380
1391
|
customStyles: {
|
|
1381
1392
|
border: `1px solid ${o.colors.neutralColors.colorNeutralSoft}`,
|
|
1382
1393
|
borderRadius: o.borders.borderRadius.borderRadiusSm,
|
|
1383
|
-
...
|
|
1394
|
+
...h
|
|
1384
1395
|
},
|
|
1385
1396
|
children: [
|
|
1386
|
-
/* @__PURE__ */ n.
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
onClick: () => h(u),
|
|
1403
|
-
withBorderRight: !0,
|
|
1404
|
-
heightItems: d
|
|
1405
|
-
},
|
|
1406
|
-
p
|
|
1407
|
-
)) }),
|
|
1408
|
-
/* @__PURE__ */ n.jsx(ao, { children: f && (f == null ? void 0 : f.contentItem) })
|
|
1397
|
+
/* @__PURE__ */ n.jsxs(lo, { ref: $, widthItems: a, children: [
|
|
1398
|
+
s == null ? void 0 : s.map((p, k) => /* @__PURE__ */ n.jsx(
|
|
1399
|
+
io,
|
|
1400
|
+
{
|
|
1401
|
+
selected: (u == null ? void 0 : u.key) === p.key,
|
|
1402
|
+
onClick: () => f(p),
|
|
1403
|
+
withBorderRight: !0,
|
|
1404
|
+
heightItems: d,
|
|
1405
|
+
customStyles: m,
|
|
1406
|
+
children: p.item
|
|
1407
|
+
},
|
|
1408
|
+
k
|
|
1409
|
+
)),
|
|
1410
|
+
/* @__PURE__ */ n.jsx(ao, {})
|
|
1411
|
+
] }),
|
|
1412
|
+
/* @__PURE__ */ n.jsx(so, { children: u && (u == null ? void 0 : u.contentItem) })
|
|
1409
1413
|
]
|
|
1410
1414
|
}
|
|
1411
1415
|
);
|
|
1412
|
-
},
|
|
1416
|
+
}, Se = M`
|
|
1413
1417
|
svg:not([color]):not([data-testid='icon']) {
|
|
1414
1418
|
path {
|
|
1415
1419
|
fill: ${o.colors.neutralColors.colorNeutralDarkest};
|
|
@@ -1421,7 +1425,7 @@ const to = C.div`
|
|
|
1421
1425
|
fill: ${o.colors.neutralColors.colorNeutralDarkest};
|
|
1422
1426
|
}
|
|
1423
1427
|
}
|
|
1424
|
-
`,
|
|
1428
|
+
`, co = x.div`
|
|
1425
1429
|
width: 100%;
|
|
1426
1430
|
max-height: ${({ maxHeight: e }) => e};
|
|
1427
1431
|
overflow: auto;
|
|
@@ -1443,12 +1447,12 @@ const to = C.div`
|
|
|
1443
1447
|
background: ${o.colors.neutralColors.colorNeutralClean};
|
|
1444
1448
|
border-radius: ${o.borders.borderRadius.borderRadiusPill};
|
|
1445
1449
|
}
|
|
1446
|
-
`,
|
|
1450
|
+
`, fo = x.table`
|
|
1447
1451
|
border-collapse: separate;
|
|
1448
1452
|
border-spacing: 0;
|
|
1449
1453
|
width: 100%;
|
|
1450
|
-
`, uo = `${o.borders.borderRadius.borderExtraSmall} ${o.borders.borderRadius.borderExtraSmall} 0 0`,
|
|
1451
|
-
${({ isHeader: e, size: t }) => e &&
|
|
1454
|
+
`, uo = `${o.borders.borderRadius.borderExtraSmall} ${o.borders.borderRadius.borderExtraSmall} 0 0`, ho = `0 0 ${o.borders.borderRadius.borderExtraSmall} ${o.borders.borderRadius.borderExtraSmall}`, ee = x.tr`
|
|
1455
|
+
${({ isHeader: e, size: t }) => e && M`
|
|
1452
1456
|
position: sticky;
|
|
1453
1457
|
background-color: ${o.colors.backgroundColors.colorBackgroundSnow};
|
|
1454
1458
|
|
|
@@ -1466,7 +1470,7 @@ const to = C.div`
|
|
|
1466
1470
|
height: ${({ fit: e, size: t }) => e ? "fit-content" : t === "Large" ? "4rem" : "3.2rem"};
|
|
1467
1471
|
min-height: ${({ size: e }) => e === "Large" ? "4rem" : "3.2rem"};
|
|
1468
1472
|
|
|
1469
|
-
${({ isHeader: e, isSelected: t, striped: i }) => !e &&
|
|
1473
|
+
${({ isHeader: e, isSelected: t, striped: i }) => !e && M`
|
|
1470
1474
|
background-color: ${t ? o.colors.neutralColors.colorNeutralClean : i ? "#F5F9FE" : o.colors.backgroundColors.colorBackgroundSnow};
|
|
1471
1475
|
`}
|
|
1472
1476
|
|
|
@@ -1474,7 +1478,7 @@ const to = C.div`
|
|
|
1474
1478
|
if (e && !i)
|
|
1475
1479
|
return l ? `${l} ${l} 0 0` : uo;
|
|
1476
1480
|
if (t)
|
|
1477
|
-
return l ? `0 0 ${l} ${l}` :
|
|
1481
|
+
return l ? `0 0 ${l} ${l}` : ho;
|
|
1478
1482
|
}};
|
|
1479
1483
|
transition: background-color 0.2s 0s;
|
|
1480
1484
|
|
|
@@ -1486,22 +1490,22 @@ const to = C.div`
|
|
|
1486
1490
|
border-bottom: none !important;
|
|
1487
1491
|
}
|
|
1488
1492
|
|
|
1489
|
-
${({ isHeader: e }) => !e &&
|
|
1493
|
+
${({ isHeader: e }) => !e && M`
|
|
1490
1494
|
&:hover {
|
|
1491
1495
|
background-color: ${o.colors.backgroundColors.colorBackgroundCarpet};
|
|
1492
1496
|
|
|
1493
1497
|
/* Target direct SVGs without color (sbwb-icons), but exclude sbwb-ds Icons ([data-testid='icon'])
|
|
1494
1498
|
* This is because sbwb-ds Icons have a color prop on the wrapper, not the SVG
|
|
1495
1499
|
*/
|
|
1496
|
-
${
|
|
1500
|
+
${Se}
|
|
1497
1501
|
}
|
|
1498
1502
|
`}
|
|
1499
1503
|
`, $e = ({ width: e }) => {
|
|
1500
1504
|
if (G(e))
|
|
1501
|
-
return
|
|
1505
|
+
return M`
|
|
1502
1506
|
width: ${e};
|
|
1503
1507
|
`;
|
|
1504
|
-
}, oe =
|
|
1508
|
+
}, oe = x.th`
|
|
1505
1509
|
text-align: ${({ horizontalAlign: e, headerAlign: t }) => e ?? t ?? "left"};
|
|
1506
1510
|
vertical-align: middle;
|
|
1507
1511
|
min-width: ${({ minWidth: e }) => e || "auto"};
|
|
@@ -1525,7 +1529,7 @@ const to = C.div`
|
|
|
1525
1529
|
word-break: normal;
|
|
1526
1530
|
|
|
1527
1531
|
&:last-child {
|
|
1528
|
-
${({ isTopRow: e }) => e &&
|
|
1532
|
+
${({ isTopRow: e }) => e && M`
|
|
1529
1533
|
border-right: none;
|
|
1530
1534
|
`}
|
|
1531
1535
|
}
|
|
@@ -1545,7 +1549,7 @@ const to = C.div`
|
|
|
1545
1549
|
&:hover {
|
|
1546
1550
|
cursor: default;
|
|
1547
1551
|
}
|
|
1548
|
-
`,
|
|
1552
|
+
`, go = x.td`
|
|
1549
1553
|
text-align: ${({ horizontalAlign: e }) => e || "left"};
|
|
1550
1554
|
vertical-align: ${({ verticalAlign: e }) => e || "middle"};
|
|
1551
1555
|
|
|
@@ -1572,16 +1576,16 @@ const to = C.div`
|
|
|
1572
1576
|
border-right: none;
|
|
1573
1577
|
}
|
|
1574
1578
|
|
|
1575
|
-
${
|
|
1579
|
+
${Se}
|
|
1576
1580
|
|
|
1577
1581
|
&:hover {
|
|
1578
1582
|
cursor: ${(e) => e.isClickable ? "pointer" : "default"};
|
|
1579
1583
|
}
|
|
1580
1584
|
`;
|
|
1581
|
-
function
|
|
1585
|
+
function mo(e) {
|
|
1582
1586
|
return (t) => typeof e == "string" ? t[e] : typeof e == "function" ? e(t) : (console.warn("Please, setup a rowKey for table."), JSON.stringify(t));
|
|
1583
1587
|
}
|
|
1584
|
-
function
|
|
1588
|
+
function Bo({
|
|
1585
1589
|
id: e,
|
|
1586
1590
|
rowKey: t = "id",
|
|
1587
1591
|
size: i = "Small",
|
|
@@ -1589,9 +1593,9 @@ function jo({
|
|
|
1589
1593
|
fit: s = !1,
|
|
1590
1594
|
maxHeight: d = "40rem",
|
|
1591
1595
|
columns: a,
|
|
1592
|
-
dataSource:
|
|
1593
|
-
columnsTextSize:
|
|
1594
|
-
emptyProps:
|
|
1596
|
+
dataSource: g,
|
|
1597
|
+
columnsTextSize: h = i,
|
|
1598
|
+
emptyProps: m = {
|
|
1595
1599
|
width: "100%",
|
|
1596
1600
|
height: "100%",
|
|
1597
1601
|
title: "Nenhum dado a ser mostrado.",
|
|
@@ -1599,76 +1603,76 @@ function jo({
|
|
|
1599
1603
|
borders: !0,
|
|
1600
1604
|
backgroundColor: o.colors.backgroundColors.colorBackgroundSnow
|
|
1601
1605
|
},
|
|
1602
|
-
selectedRow:
|
|
1603
|
-
hideHeader:
|
|
1604
|
-
withBorder:
|
|
1605
|
-
withBorderRadius:
|
|
1606
|
-
striped:
|
|
1607
|
-
borderRadius:
|
|
1606
|
+
selectedRow: u = !1,
|
|
1607
|
+
hideHeader: f = !1,
|
|
1608
|
+
withBorder: $ = !0,
|
|
1609
|
+
withBorderRadius: I = !0,
|
|
1610
|
+
striped: p = !1,
|
|
1611
|
+
borderRadius: k = o.borders.borderRadius.borderRadiusSm
|
|
1608
1612
|
}) {
|
|
1609
|
-
const
|
|
1613
|
+
const z = Q(() => mo(t), [t]), [L, C] = P(null), R = U(null), H = U(null), [B, J] = P(a);
|
|
1610
1614
|
Ne(() => {
|
|
1611
|
-
if (!
|
|
1615
|
+
if (!H.current || a.length === 0) {
|
|
1612
1616
|
J(a);
|
|
1613
1617
|
return;
|
|
1614
1618
|
}
|
|
1615
|
-
const
|
|
1619
|
+
const b = () => {
|
|
1616
1620
|
var D;
|
|
1617
|
-
const v = ((D =
|
|
1621
|
+
const v = ((D = H.current) == null ? void 0 : D.clientWidth) || 0;
|
|
1618
1622
|
if (v === 0) return;
|
|
1619
1623
|
let E = 0, y = 0;
|
|
1620
1624
|
const c = [], r = [];
|
|
1621
|
-
a.forEach((
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1625
|
+
a.forEach((F) => {
|
|
1626
|
+
const W = Number(F.flex);
|
|
1627
|
+
F.width ? E += parseInt(F.width, 10) || 0 : F.flex && W > 0 ? (y += W, c.push(F)) : r.push(F);
|
|
1624
1628
|
});
|
|
1625
|
-
const
|
|
1626
|
-
let
|
|
1627
|
-
if (
|
|
1629
|
+
const S = v - E, j = "80";
|
|
1630
|
+
let N = [...a];
|
|
1631
|
+
if (S > 0) {
|
|
1628
1632
|
if (c.length > 0) {
|
|
1629
|
-
const
|
|
1630
|
-
|
|
1631
|
-
const X = Number(
|
|
1633
|
+
const F = S / y;
|
|
1634
|
+
N = a.map((W) => {
|
|
1635
|
+
const X = Number(W.flex);
|
|
1632
1636
|
if (X && X > 0) {
|
|
1633
|
-
const O = parseInt(
|
|
1634
|
-
return { ...
|
|
1637
|
+
const O = parseInt(W.minWidth || j, 10), K = X * F, te = Math.max(K, O);
|
|
1638
|
+
return { ...W, width: `${Math.floor(te)}px` };
|
|
1635
1639
|
}
|
|
1636
|
-
return !
|
|
1637
|
-
...
|
|
1638
|
-
width:
|
|
1639
|
-
} :
|
|
1640
|
+
return !W.width && !X ? {
|
|
1641
|
+
...W,
|
|
1642
|
+
width: W.minWidth || `${j}px`
|
|
1643
|
+
} : W;
|
|
1640
1644
|
});
|
|
1641
1645
|
} else if (r.length > 0) {
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1644
|
-
const X = Number(
|
|
1645
|
-
if (!
|
|
1646
|
-
const O = parseInt(
|
|
1647
|
-
return { ...
|
|
1646
|
+
const F = S / r.length;
|
|
1647
|
+
N = a.map((W) => {
|
|
1648
|
+
const X = Number(W.flex);
|
|
1649
|
+
if (!W.width && !X) {
|
|
1650
|
+
const O = parseInt(W.minWidth || j, 10), K = Math.max(F, O);
|
|
1651
|
+
return { ...W, width: `${Math.floor(K)}px` };
|
|
1648
1652
|
}
|
|
1649
|
-
return
|
|
1653
|
+
return W;
|
|
1650
1654
|
});
|
|
1651
1655
|
}
|
|
1652
1656
|
} else
|
|
1653
|
-
|
|
1654
|
-
J(
|
|
1657
|
+
N = a.map((F) => F.width ? F : { ...F, width: F.minWidth || `${j}px` });
|
|
1658
|
+
J(N);
|
|
1655
1659
|
};
|
|
1656
|
-
|
|
1657
|
-
const w = new ResizeObserver(
|
|
1658
|
-
return w.observe(
|
|
1660
|
+
b();
|
|
1661
|
+
const w = new ResizeObserver(b);
|
|
1662
|
+
return w.observe(H.current), () => w.disconnect();
|
|
1659
1663
|
}, [a]), Z(() => {
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1664
|
+
const b = (w) => {
|
|
1665
|
+
R.current && !R.current.contains(w.target) && C(null);
|
|
1662
1666
|
};
|
|
1663
|
-
return document.addEventListener("mousedown",
|
|
1664
|
-
document.removeEventListener("mousedown",
|
|
1667
|
+
return document.addEventListener("mousedown", b), () => {
|
|
1668
|
+
document.removeEventListener("mousedown", b);
|
|
1665
1669
|
};
|
|
1666
1670
|
}, []);
|
|
1667
|
-
const A = Q(() =>
|
|
1668
|
-
(
|
|
1669
|
-
) : !1, [
|
|
1671
|
+
const A = Q(() => B ? B.some(
|
|
1672
|
+
(b) => b.mergeHeaderId && b.mergeHeaderLabel
|
|
1673
|
+
) : !1, [B]), T = Q(() => {
|
|
1670
1674
|
var E, y;
|
|
1671
|
-
if (
|
|
1675
|
+
if (f || !B || B.length === 0)
|
|
1672
1676
|
return null;
|
|
1673
1677
|
if (!A)
|
|
1674
1678
|
return /* @__PURE__ */ n.jsx(
|
|
@@ -1677,8 +1681,8 @@ function jo({
|
|
|
1677
1681
|
isHeader: !0,
|
|
1678
1682
|
size: i,
|
|
1679
1683
|
numRows: 1,
|
|
1680
|
-
borderRadius:
|
|
1681
|
-
children:
|
|
1684
|
+
borderRadius: k,
|
|
1685
|
+
children: B.map((c) => {
|
|
1682
1686
|
var r;
|
|
1683
1687
|
return /* @__PURE__ */ n.jsx(
|
|
1684
1688
|
oe,
|
|
@@ -1688,34 +1692,34 @@ function jo({
|
|
|
1688
1692
|
maxWidth: c.maxWidth,
|
|
1689
1693
|
horizontalAlign: c.horizontalAlign,
|
|
1690
1694
|
size: i,
|
|
1691
|
-
columnsTextSize:
|
|
1692
|
-
withBorder:
|
|
1695
|
+
columnsTextSize: h,
|
|
1696
|
+
withBorder: $,
|
|
1693
1697
|
headerAlign: c.headerAlign,
|
|
1694
|
-
children: ((r = c.columnRender) == null ? void 0 : r.call(c,
|
|
1698
|
+
children: ((r = c.columnRender) == null ? void 0 : r.call(c, g)) || /* @__PURE__ */ n.jsx("span", { title: c.label, children: c.label })
|
|
1695
1699
|
},
|
|
1696
1700
|
c.dataIndex
|
|
1697
1701
|
);
|
|
1698
1702
|
})
|
|
1699
1703
|
}
|
|
1700
1704
|
);
|
|
1701
|
-
const
|
|
1705
|
+
const b = [], w = [];
|
|
1702
1706
|
let v = 0;
|
|
1703
|
-
for (; v <
|
|
1704
|
-
const c =
|
|
1707
|
+
for (; v < B.length; ) {
|
|
1708
|
+
const c = B[v];
|
|
1705
1709
|
if (c.mergeHeaderId && c.mergeHeaderLabel) {
|
|
1706
1710
|
let r = 0;
|
|
1707
|
-
const
|
|
1708
|
-
for (let
|
|
1711
|
+
const S = c.mergeHeaderId;
|
|
1712
|
+
for (let j = v; j < B.length && B[j].mergeHeaderId === S; j++)
|
|
1709
1713
|
r++;
|
|
1710
|
-
|
|
1714
|
+
b.push(
|
|
1711
1715
|
/* @__PURE__ */ n.jsx(
|
|
1712
1716
|
oe,
|
|
1713
1717
|
{
|
|
1714
1718
|
colSpan: r,
|
|
1715
1719
|
horizontalAlign: "center",
|
|
1716
1720
|
size: i,
|
|
1717
|
-
columnsTextSize:
|
|
1718
|
-
withBorder:
|
|
1721
|
+
columnsTextSize: h,
|
|
1722
|
+
withBorder: $,
|
|
1719
1723
|
width: c.width,
|
|
1720
1724
|
minWidth: c.minWidth,
|
|
1721
1725
|
maxWidth: c.maxWidth,
|
|
@@ -1726,29 +1730,29 @@ function jo({
|
|
|
1726
1730
|
`${c.mergeHeaderId}-merged`
|
|
1727
1731
|
)
|
|
1728
1732
|
);
|
|
1729
|
-
for (let
|
|
1730
|
-
const
|
|
1733
|
+
for (let j = 0; j < r; j++) {
|
|
1734
|
+
const N = B[v + j];
|
|
1731
1735
|
w.push(
|
|
1732
1736
|
/* @__PURE__ */ n.jsx(
|
|
1733
1737
|
oe,
|
|
1734
1738
|
{
|
|
1735
|
-
width:
|
|
1736
|
-
minWidth:
|
|
1737
|
-
maxWidth:
|
|
1738
|
-
horizontalAlign:
|
|
1739
|
+
width: N.width,
|
|
1740
|
+
minWidth: N.minWidth,
|
|
1741
|
+
maxWidth: N.maxWidth,
|
|
1742
|
+
horizontalAlign: N.horizontalAlign,
|
|
1739
1743
|
size: i,
|
|
1740
|
-
columnsTextSize:
|
|
1741
|
-
withBorder:
|
|
1744
|
+
columnsTextSize: h,
|
|
1745
|
+
withBorder: $,
|
|
1742
1746
|
headerAlign: c.headerAlign,
|
|
1743
|
-
children: ((E =
|
|
1747
|
+
children: ((E = N.columnRender) == null ? void 0 : E.call(N, g)) || /* @__PURE__ */ n.jsx("span", { title: N.label, children: N.label })
|
|
1744
1748
|
},
|
|
1745
|
-
|
|
1749
|
+
N.dataIndex + "-individual"
|
|
1746
1750
|
)
|
|
1747
1751
|
);
|
|
1748
1752
|
}
|
|
1749
1753
|
v += r;
|
|
1750
1754
|
} else
|
|
1751
|
-
|
|
1755
|
+
b.push(
|
|
1752
1756
|
/* @__PURE__ */ n.jsx(
|
|
1753
1757
|
oe,
|
|
1754
1758
|
{
|
|
@@ -1758,11 +1762,11 @@ function jo({
|
|
|
1758
1762
|
maxWidth: c.maxWidth,
|
|
1759
1763
|
horizontalAlign: c.horizontalAlign,
|
|
1760
1764
|
size: i,
|
|
1761
|
-
columnsTextSize:
|
|
1762
|
-
withBorder:
|
|
1765
|
+
columnsTextSize: h,
|
|
1766
|
+
withBorder: $,
|
|
1763
1767
|
headerAlign: c.headerAlign,
|
|
1764
1768
|
isTopRow: !0,
|
|
1765
|
-
children: ((y = c.columnRender) == null ? void 0 : y.call(c,
|
|
1769
|
+
children: ((y = c.columnRender) == null ? void 0 : y.call(c, g)) || /* @__PURE__ */ n.jsx("span", { title: c.label, children: c.label })
|
|
1766
1770
|
},
|
|
1767
1771
|
c.dataIndex
|
|
1768
1772
|
)
|
|
@@ -1775,8 +1779,8 @@ function jo({
|
|
|
1775
1779
|
isHeader: !0,
|
|
1776
1780
|
size: i,
|
|
1777
1781
|
numRows: 2,
|
|
1778
|
-
borderRadius:
|
|
1779
|
-
children:
|
|
1782
|
+
borderRadius: k,
|
|
1783
|
+
children: b
|
|
1780
1784
|
}
|
|
1781
1785
|
),
|
|
1782
1786
|
w.length > 0 && /* @__PURE__ */ n.jsx(
|
|
@@ -1785,45 +1789,45 @@ function jo({
|
|
|
1785
1789
|
isHeader: !0,
|
|
1786
1790
|
size: i,
|
|
1787
1791
|
numRows: 2,
|
|
1788
|
-
borderRadius:
|
|
1792
|
+
borderRadius: k,
|
|
1789
1793
|
children: w
|
|
1790
1794
|
}
|
|
1791
1795
|
)
|
|
1792
1796
|
] });
|
|
1793
|
-
}, [
|
|
1794
|
-
return !
|
|
1795
|
-
|
|
1797
|
+
}, [B, f, i, h, A]);
|
|
1798
|
+
return !g || g.length === 0 ? /* @__PURE__ */ n.jsx(
|
|
1799
|
+
ue,
|
|
1796
1800
|
{
|
|
1797
1801
|
backgroundColor: o.colors.backgroundColors.colorBackgroundSnow,
|
|
1798
1802
|
borders: !0,
|
|
1799
1803
|
mode: "table",
|
|
1800
|
-
...
|
|
1804
|
+
...m
|
|
1801
1805
|
}
|
|
1802
1806
|
) : /* @__PURE__ */ n.jsx(
|
|
1803
|
-
|
|
1807
|
+
co,
|
|
1804
1808
|
{
|
|
1805
1809
|
maxHeight: d,
|
|
1806
|
-
withBorderRadius:
|
|
1807
|
-
ref:
|
|
1808
|
-
borderRadius:
|
|
1809
|
-
children: /* @__PURE__ */ n.jsxs(
|
|
1810
|
+
withBorderRadius: I,
|
|
1811
|
+
ref: H,
|
|
1812
|
+
borderRadius: k,
|
|
1813
|
+
children: /* @__PURE__ */ n.jsxs(fo, { id: e, ref: R, children: [
|
|
1810
1814
|
/* @__PURE__ */ n.jsx("thead", { children: T }),
|
|
1811
|
-
/* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children:
|
|
1812
|
-
const E =
|
|
1815
|
+
/* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children: g == null ? void 0 : g.map((b, w, v) => {
|
|
1816
|
+
const E = z(b);
|
|
1813
1817
|
return /* @__PURE__ */ n.jsx(
|
|
1814
1818
|
ee,
|
|
1815
1819
|
{
|
|
1816
1820
|
isLast: w === v.length - 1,
|
|
1817
1821
|
fit: s,
|
|
1818
1822
|
size: i,
|
|
1819
|
-
withBorder:
|
|
1820
|
-
isSelected: E ===
|
|
1821
|
-
striped:
|
|
1822
|
-
borderRadius:
|
|
1823
|
-
children:
|
|
1824
|
-
var c, r,
|
|
1823
|
+
withBorder: $,
|
|
1824
|
+
isSelected: E === L && u,
|
|
1825
|
+
striped: p && w % 2 !== 0,
|
|
1826
|
+
borderRadius: k,
|
|
1827
|
+
children: B.map((y) => {
|
|
1828
|
+
var c, r, S;
|
|
1825
1829
|
return /* @__PURE__ */ n.jsx(
|
|
1826
|
-
|
|
1830
|
+
go,
|
|
1827
1831
|
{
|
|
1828
1832
|
width: y.width,
|
|
1829
1833
|
minWidth: y.minWidth,
|
|
@@ -1831,39 +1835,39 @@ function jo({
|
|
|
1831
1835
|
size: i,
|
|
1832
1836
|
isClickable: G(l),
|
|
1833
1837
|
onClick: () => {
|
|
1834
|
-
l && l(
|
|
1835
|
-
|
|
1838
|
+
l && l(b, y, w), u && C(
|
|
1839
|
+
L === E ? null : E
|
|
1836
1840
|
);
|
|
1837
1841
|
},
|
|
1838
1842
|
horizontalAlign: y.horizontalAlign,
|
|
1839
1843
|
verticalAlign: y.verticalAlign,
|
|
1840
1844
|
rowPadding: y.rowPadding,
|
|
1841
|
-
withBorder:
|
|
1845
|
+
withBorder: $,
|
|
1842
1846
|
isLast: w === v.length - 1,
|
|
1843
1847
|
backgroundColor: (c = y.paint) == null ? void 0 : c.call(
|
|
1844
1848
|
y,
|
|
1845
|
-
|
|
1846
|
-
|
|
1849
|
+
b[y.dataIndex],
|
|
1850
|
+
b,
|
|
1847
1851
|
w,
|
|
1848
1852
|
v
|
|
1849
1853
|
),
|
|
1850
1854
|
children: ((r = y.render) == null ? void 0 : r.call(
|
|
1851
1855
|
y,
|
|
1852
|
-
|
|
1853
|
-
|
|
1856
|
+
b[y.dataIndex],
|
|
1857
|
+
b,
|
|
1854
1858
|
w,
|
|
1855
1859
|
v
|
|
1856
1860
|
)) || /* @__PURE__ */ n.jsx(
|
|
1857
1861
|
"span",
|
|
1858
1862
|
{
|
|
1859
|
-
title:
|
|
1863
|
+
title: b[y.dataIndex],
|
|
1860
1864
|
style: {
|
|
1861
1865
|
textOverflow: "ellipsis",
|
|
1862
1866
|
whiteSpace: "nowrap",
|
|
1863
1867
|
overflow: "hidden",
|
|
1864
|
-
...(
|
|
1868
|
+
...(S = y.rowCss) == null ? void 0 : S.call(y, b)
|
|
1865
1869
|
},
|
|
1866
|
-
children:
|
|
1870
|
+
children: b[y.dataIndex]
|
|
1867
1871
|
}
|
|
1868
1872
|
) || ""
|
|
1869
1873
|
},
|
|
@@ -1879,14 +1883,14 @@ function jo({
|
|
|
1879
1883
|
);
|
|
1880
1884
|
}
|
|
1881
1885
|
export {
|
|
1882
|
-
|
|
1886
|
+
wo as C,
|
|
1883
1887
|
ie as M,
|
|
1884
|
-
|
|
1888
|
+
yo as S,
|
|
1885
1889
|
Re as T,
|
|
1886
|
-
|
|
1890
|
+
Co as a,
|
|
1887
1891
|
De as b,
|
|
1888
1892
|
me as c,
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1893
|
+
ko as d,
|
|
1894
|
+
zo as e,
|
|
1895
|
+
Bo as f
|
|
1892
1896
|
};
|