@ufal-lccv/gpsub-ds 0.0.14 → 0.0.15
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-C9k9e2Jm.js → Table.view-CKAOAcZD.js} +463 -458
- package/dist/{Table.view-C0mvbkdK.cjs → Table.view-Cy3fYD98.cjs} +9 -8
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +1 -1
- package/dist/components/organisms/TabInfo/TabInfo.view.d.ts +4 -2
- 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,4 +1,4 @@
|
|
|
1
|
-
import { l as n, C as _, i as ce, K as xe, j as we, c as ye, N as
|
|
1
|
+
import { l as n, C as _, i as ce, K as xe, j as we, c as ye, N as C, O as F, s as Ce, T as fe, S as ke, I as ze, P as Be, E as he } from "./Checkbox.view-D75146I3.js";
|
|
2
2
|
import je, { useState as P, useEffect as Z, useCallback as ue, 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";
|
|
@@ -11,22 +11,22 @@ const ae = 350, yo = ({
|
|
|
11
11
|
customStyles: a = {},
|
|
12
12
|
wrapperCustomStyles: d = {},
|
|
13
13
|
hideAdornmentOnCollapse: s = !1,
|
|
14
|
-
maxHeight:
|
|
14
|
+
maxHeight: m = "none"
|
|
15
15
|
// Default to 'none' to allow full expansion
|
|
16
16
|
}) => {
|
|
17
|
-
const [
|
|
17
|
+
const [g, p] = P(!1), [f, h] = P(!0);
|
|
18
18
|
Z(() => {
|
|
19
19
|
if (s)
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
20
|
+
if (g) {
|
|
21
|
+
const B = setTimeout(
|
|
22
22
|
() => h(!1),
|
|
23
23
|
ae
|
|
24
24
|
);
|
|
25
|
-
return () => clearTimeout(
|
|
25
|
+
return () => clearTimeout(B);
|
|
26
26
|
} else
|
|
27
27
|
h(!0);
|
|
28
|
-
}, [
|
|
29
|
-
const
|
|
28
|
+
}, [g, s]);
|
|
29
|
+
const b = s && !f ? 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: g,
|
|
46
|
+
setCollapsed: p
|
|
47
47
|
},
|
|
48
|
-
endAdornment:
|
|
48
|
+
endAdornment: b,
|
|
49
49
|
customStyles: a
|
|
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: g ? "0" : m,
|
|
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, a, d, s,
|
|
69
|
+
var l, a, d, s, m;
|
|
70
70
|
t == null && (t = 100);
|
|
71
|
-
function
|
|
72
|
-
var
|
|
73
|
-
|
|
71
|
+
function g() {
|
|
72
|
+
var f = Date.now() - s;
|
|
73
|
+
f < t && f >= 0 ? l = setTimeout(g, t - f) : (l = null, i || (m = e.apply(d, a), d = a = null));
|
|
74
74
|
}
|
|
75
|
-
var
|
|
75
|
+
var p = function() {
|
|
76
76
|
d = this, a = arguments, s = Date.now();
|
|
77
|
-
var
|
|
78
|
-
return l || (l = setTimeout(
|
|
77
|
+
var f = i && !l;
|
|
78
|
+
return l || (l = setTimeout(g, t)), f && (m = e.apply(d, a), d = a = null), m;
|
|
79
79
|
};
|
|
80
|
-
return
|
|
80
|
+
return p.clear = function() {
|
|
81
81
|
l && (clearTimeout(l), l = null);
|
|
82
|
-
},
|
|
83
|
-
l && (
|
|
84
|
-
},
|
|
82
|
+
}, p.flush = function() {
|
|
83
|
+
l && (m = e.apply(d, a), d = a = null, clearTimeout(l), l = null);
|
|
84
|
+
}, p;
|
|
85
85
|
}
|
|
86
86
|
ne.debounce = ne;
|
|
87
87
|
var Ie = ne;
|
|
@@ -100,16 +100,16 @@ function le({
|
|
|
100
100
|
), s = Q(
|
|
101
101
|
() => ["all", "onChange"].includes(i) ? d : null,
|
|
102
102
|
[d, i]
|
|
103
|
-
),
|
|
103
|
+
), m = Q(
|
|
104
104
|
() => ["all", "onBlur"].includes(i) ? a : null,
|
|
105
105
|
[i]
|
|
106
106
|
);
|
|
107
107
|
return Q(
|
|
108
108
|
() => ({
|
|
109
109
|
onChangeTrigger: s,
|
|
110
|
-
onBlurTrigger:
|
|
110
|
+
onBlurTrigger: m
|
|
111
111
|
}),
|
|
112
|
-
[s,
|
|
112
|
+
[s, m]
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
const Co = ({
|
|
@@ -120,50 +120,50 @@ const Co = ({
|
|
|
120
120
|
readonly: a = !1,
|
|
121
121
|
disabled: d = !1,
|
|
122
122
|
optionsMap: s,
|
|
123
|
-
width:
|
|
124
|
-
flex:
|
|
125
|
-
placeholder:
|
|
126
|
-
onSelect:
|
|
123
|
+
width: m = "100%",
|
|
124
|
+
flex: g,
|
|
125
|
+
placeholder: p,
|
|
126
|
+
onSelect: f,
|
|
127
127
|
parser: h,
|
|
128
|
-
filter:
|
|
129
|
-
tooltipProps:
|
|
130
|
-
infoProps:
|
|
131
|
-
maxHeigthMenu:
|
|
132
|
-
isRequired:
|
|
133
|
-
onRemoveSelected:
|
|
134
|
-
triggerFormField:
|
|
135
|
-
displayText:
|
|
136
|
-
...
|
|
128
|
+
filter: b,
|
|
129
|
+
tooltipProps: B = {},
|
|
130
|
+
infoProps: j = {},
|
|
131
|
+
maxHeigthMenu: u,
|
|
132
|
+
isRequired: S = !1,
|
|
133
|
+
onRemoveSelected: R,
|
|
134
|
+
triggerFormField: k = null,
|
|
135
|
+
displayText: M,
|
|
136
|
+
...H
|
|
137
137
|
}) => {
|
|
138
138
|
const { onChangeTrigger: z } = le({
|
|
139
139
|
form: e,
|
|
140
140
|
fieldName: t,
|
|
141
|
-
triggerType:
|
|
141
|
+
triggerType: k,
|
|
142
142
|
debounceTime: 0
|
|
143
143
|
}), J = {
|
|
144
144
|
position: "top",
|
|
145
|
-
...
|
|
145
|
+
...B
|
|
146
146
|
}, A = {
|
|
147
|
-
...
|
|
147
|
+
...j,
|
|
148
148
|
tooltipProps: {
|
|
149
149
|
position: "top",
|
|
150
150
|
maxWidth: "300px",
|
|
151
|
-
...
|
|
151
|
+
...j == null ? void 0 : j.tooltipProps
|
|
152
152
|
}
|
|
153
|
-
}, T = (
|
|
154
|
-
let
|
|
155
|
-
h && (
|
|
156
|
-
},
|
|
157
|
-
return /* @__PURE__ */ n.jsx(_, { width:
|
|
153
|
+
}, T = (w, v) => {
|
|
154
|
+
let E = w;
|
|
155
|
+
h && (E = h == null ? void 0 : h(w)), v(E), f == null || f(E), z == null || z();
|
|
156
|
+
}, x = Q(() => G(s) ? s : Object.fromEntries(l.map((w) => [w.value, w])), [l, s]);
|
|
157
|
+
return /* @__PURE__ */ n.jsx(_, { width: m, flex: g, children: /* @__PURE__ */ n.jsx(
|
|
158
158
|
re,
|
|
159
159
|
{
|
|
160
160
|
name: t,
|
|
161
161
|
control: e.control,
|
|
162
162
|
render: ({
|
|
163
|
-
field: { onChange:
|
|
164
|
-
fieldState: { error:
|
|
163
|
+
field: { onChange: w, value: v },
|
|
164
|
+
fieldState: { error: E = null }
|
|
165
165
|
}) => {
|
|
166
|
-
let
|
|
166
|
+
let y = x[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: a,
|
|
175
|
-
filter:
|
|
176
|
-
errorMessage:
|
|
177
|
-
placeholder:
|
|
178
|
-
value:
|
|
179
|
-
handleOption: (
|
|
180
|
-
T(
|
|
175
|
+
filter: b,
|
|
176
|
+
errorMessage: E == null ? void 0 : E.message,
|
|
177
|
+
placeholder: p,
|
|
178
|
+
value: y,
|
|
179
|
+
handleOption: (c) => {
|
|
180
|
+
T(c.value, w);
|
|
181
181
|
},
|
|
182
182
|
tooltipProps: J,
|
|
183
183
|
options: l,
|
|
184
|
-
maxHeigthMenu:
|
|
184
|
+
maxHeigthMenu: u,
|
|
185
185
|
infoProps: A,
|
|
186
|
-
maxHeightMenu:
|
|
187
|
-
isRequired:
|
|
188
|
-
onRemoveSelected:
|
|
189
|
-
displayText:
|
|
190
|
-
...
|
|
186
|
+
maxHeightMenu: u,
|
|
187
|
+
isRequired: S,
|
|
188
|
+
onRemoveSelected: R,
|
|
189
|
+
displayText: M,
|
|
190
|
+
...H
|
|
191
191
|
}
|
|
192
192
|
);
|
|
193
193
|
}
|
|
@@ -201,50 +201,50 @@ const Co = ({
|
|
|
201
201
|
disabled: a = !1,
|
|
202
202
|
width: d = "100%",
|
|
203
203
|
height: s = "100%",
|
|
204
|
-
flex:
|
|
205
|
-
placeholder:
|
|
206
|
-
charactersCounter:
|
|
207
|
-
maxlength:
|
|
204
|
+
flex: m,
|
|
205
|
+
placeholder: g,
|
|
206
|
+
charactersCounter: p = !0,
|
|
207
|
+
maxlength: f = 1e3,
|
|
208
208
|
resize: h = !0,
|
|
209
|
-
triggerFormField:
|
|
210
|
-
minHeight:
|
|
211
|
-
maxHeight:
|
|
212
|
-
...
|
|
209
|
+
triggerFormField: b = null,
|
|
210
|
+
minHeight: B,
|
|
211
|
+
maxHeight: j,
|
|
212
|
+
...u
|
|
213
213
|
}) => {
|
|
214
|
-
const { onChangeTrigger:
|
|
214
|
+
const { onChangeTrigger: S } = le({
|
|
215
215
|
form: e,
|
|
216
216
|
fieldName: t,
|
|
217
|
-
triggerType:
|
|
218
|
-
}),
|
|
219
|
-
|
|
217
|
+
triggerType: b
|
|
218
|
+
}), R = (k, M) => {
|
|
219
|
+
M(k), S == null || S();
|
|
220
220
|
};
|
|
221
|
-
return /* @__PURE__ */ n.jsx(_, { width: d, flex:
|
|
221
|
+
return /* @__PURE__ */ n.jsx(_, { width: d, flex: m, height: s, 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: k, value: M },
|
|
228
|
+
fieldState: { error: H = null }
|
|
229
229
|
}) => /* @__PURE__ */ n.jsx(
|
|
230
230
|
we,
|
|
231
231
|
{
|
|
232
232
|
label: i,
|
|
233
|
-
value:
|
|
233
|
+
value: M || "",
|
|
234
234
|
width: "100%",
|
|
235
235
|
disabled: a,
|
|
236
236
|
readonly: l,
|
|
237
237
|
height: s,
|
|
238
|
-
minHeight:
|
|
239
|
-
maxHeight:
|
|
240
|
-
errorMessage:
|
|
241
|
-
placeholder:
|
|
242
|
-
onChange: (z) =>
|
|
243
|
-
charactersCounter:
|
|
244
|
-
maxlength:
|
|
238
|
+
minHeight: B,
|
|
239
|
+
maxHeight: j,
|
|
240
|
+
errorMessage: H == null ? void 0 : H.message,
|
|
241
|
+
placeholder: g,
|
|
242
|
+
onChange: (z) => R(z.target.value, k),
|
|
243
|
+
charactersCounter: p,
|
|
244
|
+
maxlength: f,
|
|
245
245
|
size: "Small",
|
|
246
246
|
resize: h,
|
|
247
|
-
...
|
|
247
|
+
...u
|
|
248
248
|
}
|
|
249
249
|
)
|
|
250
250
|
}
|
|
@@ -259,54 +259,54 @@ const ko = ({
|
|
|
259
259
|
readonly: a = !1,
|
|
260
260
|
disabled: d = !1,
|
|
261
261
|
afterCheck: s,
|
|
262
|
-
width:
|
|
263
|
-
formatter:
|
|
264
|
-
parser:
|
|
265
|
-
flex:
|
|
262
|
+
width: m = "100%",
|
|
263
|
+
formatter: g,
|
|
264
|
+
parser: p,
|
|
265
|
+
flex: f,
|
|
266
266
|
size: h = "Medium",
|
|
267
|
-
triggerFormField:
|
|
268
|
-
...
|
|
267
|
+
triggerFormField: b = null,
|
|
268
|
+
...B
|
|
269
269
|
}) => {
|
|
270
|
-
const { onChangeTrigger:
|
|
270
|
+
const { onChangeTrigger: j } = le({
|
|
271
271
|
form: e,
|
|
272
272
|
fieldName: t,
|
|
273
|
-
triggerType:
|
|
273
|
+
triggerType: b,
|
|
274
274
|
debounceTime: 0
|
|
275
|
-
}),
|
|
276
|
-
|
|
275
|
+
}), u = (S, R) => {
|
|
276
|
+
R(S), s == null || s(S), j == null || j();
|
|
277
277
|
};
|
|
278
|
-
return /* @__PURE__ */ n.jsx(_, { width:
|
|
278
|
+
return /* @__PURE__ */ n.jsx(_, { width: m, flex: f, 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: S, value: R },
|
|
285
|
+
fieldState: { error: k = null }
|
|
286
286
|
}) => {
|
|
287
|
-
const
|
|
288
|
-
return
|
|
287
|
+
const M = k == null ? void 0 : k.message;
|
|
288
|
+
return M && console.log("Error on checkbox!", M), /* @__PURE__ */ n.jsx(
|
|
289
289
|
ye,
|
|
290
290
|
{
|
|
291
291
|
id: `form-checkbox-${i}`,
|
|
292
|
-
checked: (
|
|
292
|
+
checked: (g == null ? void 0 : g(R)) ?? R,
|
|
293
293
|
name: t,
|
|
294
294
|
label: l,
|
|
295
295
|
disabled: d || a,
|
|
296
|
-
onChange: (
|
|
297
|
-
|
|
298
|
-
(
|
|
299
|
-
|
|
296
|
+
onChange: (H) => {
|
|
297
|
+
u(
|
|
298
|
+
(p == null ? void 0 : p(H.target.checked, R)) ?? H.target.checked,
|
|
299
|
+
S
|
|
300
300
|
);
|
|
301
301
|
},
|
|
302
302
|
size: h,
|
|
303
|
-
...
|
|
303
|
+
...B
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
) });
|
|
309
|
-
}, Me =
|
|
309
|
+
}, Me = C.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
|
-
`, Fe =
|
|
339
|
+
`, Fe = C.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
|
-
`, He =
|
|
347
|
+
`, He = C.li`
|
|
348
348
|
${q}
|
|
349
349
|
display: flex;
|
|
350
350
|
flex: 2;
|
|
@@ -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
|
-
`, Ee =
|
|
381
|
+
`, Ee = C.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,13 +389,13 @@ 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 = C.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 = C.div`
|
|
399
399
|
${q}
|
|
400
400
|
display: flex;
|
|
401
401
|
font-family: ${o.fonts.fontFamily.fontFamilyPrimary};
|
|
@@ -411,7 +411,7 @@ const ko = ({
|
|
|
411
411
|
text-overflow: ellipsis;
|
|
412
412
|
text-align: start;
|
|
413
413
|
}
|
|
414
|
-
`, Te =
|
|
414
|
+
`, Te = C.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 = C.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, a = "left") => {
|
|
432
|
-
const [d, s] = P(0), [
|
|
433
|
-
if (!e.current || !
|
|
434
|
-
const h = e.current.getBoundingClientRect(),
|
|
435
|
-
let
|
|
436
|
-
|
|
437
|
-
let
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
const z =
|
|
441
|
-
Object.assign(
|
|
432
|
+
const [d, s] = P(0), [m, g] = P(), p = U(null), f = ue(() => {
|
|
433
|
+
if (!e.current || !p.current) return;
|
|
434
|
+
const h = e.current.getBoundingClientRect(), b = p.current.getBoundingClientRect(), B = window.innerHeight, j = window.innerWidth, u = h.top, S = B - h.bottom, R = S < b.height + l && u > S;
|
|
435
|
+
let k;
|
|
436
|
+
R ? (k = h.top - b.height - i, p.current.style.maxHeight = `${u - i}px`) : (k = h.bottom + l, p.current.style.maxHeight = `${S - l}px`);
|
|
437
|
+
let M = h.left;
|
|
438
|
+
const H = M + b.width - j;
|
|
439
|
+
H > 0 && (M -= H), M < 0 && (M = 0);
|
|
440
|
+
const z = j - h.right;
|
|
441
|
+
Object.assign(p.current.style, {
|
|
442
442
|
position: "fixed",
|
|
443
|
-
top: `${
|
|
444
|
-
...a === "left" ? { left: `${
|
|
445
|
-
width: `${Math.max(h.width,
|
|
443
|
+
top: `${k}px`,
|
|
444
|
+
...a === "left" ? { left: `${M}px` } : { right: `${z}px` },
|
|
445
|
+
width: `${Math.max(h.width, b.width)}px`,
|
|
446
446
|
overflowY: "auto"
|
|
447
447
|
});
|
|
448
448
|
}, [i, l, a]);
|
|
449
449
|
return Z(() => {
|
|
450
|
-
var
|
|
451
|
-
s(0),
|
|
452
|
-
const h = () =>
|
|
450
|
+
var b;
|
|
451
|
+
s(0), g((b = e.current) == null ? void 0 : b.clientWidth), f();
|
|
452
|
+
const h = () => f();
|
|
453
453
|
return window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
|
|
454
454
|
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
455
455
|
};
|
|
456
|
-
}, [e,
|
|
456
|
+
}, [e, f]), {
|
|
457
457
|
highlightedIndex: d,
|
|
458
458
|
setHighlightedIndex: s,
|
|
459
459
|
isOptionSelected: (h) => h.label === (t == null ? void 0 : t.label),
|
|
460
|
-
optionsRef:
|
|
461
|
-
parentWidth:
|
|
460
|
+
optionsRef: p,
|
|
461
|
+
parentWidth: m
|
|
462
462
|
};
|
|
463
463
|
}, ie = ge(
|
|
464
464
|
({
|
|
@@ -469,68 +469,68 @@ const ko = ({
|
|
|
469
469
|
value: a,
|
|
470
470
|
inputValue: d,
|
|
471
471
|
widthMenu: s,
|
|
472
|
-
maxHeightMenu:
|
|
473
|
-
menuIsOpen:
|
|
474
|
-
onEnter:
|
|
475
|
-
marginTop:
|
|
472
|
+
maxHeightMenu: m = "180px",
|
|
473
|
+
menuIsOpen: g,
|
|
474
|
+
onEnter: p,
|
|
475
|
+
marginTop: f = "4px",
|
|
476
476
|
iconName: h,
|
|
477
|
-
iconColor:
|
|
478
|
-
iconPosition:
|
|
479
|
-
topOffset:
|
|
480
|
-
bottomOffset:
|
|
481
|
-
truncateText:
|
|
482
|
-
menuJustifyContent:
|
|
483
|
-
tableActionButton:
|
|
484
|
-
menuLateralPadding:
|
|
485
|
-
menuOptionFlexDirection:
|
|
477
|
+
iconColor: b,
|
|
478
|
+
iconPosition: B,
|
|
479
|
+
topOffset: j = 0,
|
|
480
|
+
bottomOffset: u = 0,
|
|
481
|
+
truncateText: S = !0,
|
|
482
|
+
menuJustifyContent: R = "flex-start",
|
|
483
|
+
tableActionButton: k,
|
|
484
|
+
menuLateralPadding: M = "8px",
|
|
485
|
+
menuOptionFlexDirection: H = "column",
|
|
486
486
|
confirmSelection: z,
|
|
487
487
|
menuAlign: J = "left"
|
|
488
488
|
}, A) => {
|
|
489
489
|
G(h) && (h += "Ant");
|
|
490
490
|
const {
|
|
491
491
|
highlightedIndex: T,
|
|
492
|
-
setHighlightedIndex:
|
|
493
|
-
isOptionSelected:
|
|
492
|
+
setHighlightedIndex: x,
|
|
493
|
+
isOptionSelected: w,
|
|
494
494
|
optionsRef: v,
|
|
495
|
-
parentWidth:
|
|
495
|
+
parentWidth: E
|
|
496
496
|
} = Oe(
|
|
497
497
|
e,
|
|
498
498
|
a,
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
j,
|
|
500
|
+
u,
|
|
501
501
|
J
|
|
502
502
|
);
|
|
503
503
|
Z(() => {
|
|
504
|
-
const r = (
|
|
505
|
-
if (
|
|
506
|
-
if (
|
|
507
|
-
|
|
504
|
+
const r = ($) => {
|
|
505
|
+
if (g) {
|
|
506
|
+
if ($.key === "ArrowDown")
|
|
507
|
+
$.preventDefault(), x(
|
|
508
508
|
(N) => N < t.length - 1 ? N + 1 : N
|
|
509
509
|
);
|
|
510
|
-
else if (
|
|
511
|
-
|
|
510
|
+
else if ($.key === "ArrowUp")
|
|
511
|
+
$.preventDefault(), x(
|
|
512
512
|
(N) => N > 0 ? N - 1 : 0
|
|
513
513
|
);
|
|
514
|
-
else if (
|
|
515
|
-
|
|
514
|
+
else if ($.key === "Enter" && t[T]) {
|
|
515
|
+
$.preventDefault();
|
|
516
516
|
const N = t[T];
|
|
517
|
-
l(N),
|
|
517
|
+
l(N), p && p(N);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
522
522
|
}, [
|
|
523
|
-
|
|
523
|
+
g,
|
|
524
524
|
t,
|
|
525
525
|
T,
|
|
526
|
-
|
|
526
|
+
p,
|
|
527
527
|
l,
|
|
528
528
|
z
|
|
529
529
|
]);
|
|
530
|
-
const
|
|
531
|
-
var
|
|
532
|
-
if (
|
|
533
|
-
const N = G((
|
|
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 L, I;
|
|
532
|
+
if (B !== $) return null;
|
|
533
|
+
const N = G((L = r.tooltipProps) == null ? void 0 : L.label), W = r.iconName || h || "InfoFill0Sm", D = /* @__PURE__ */ n.jsx(
|
|
534
534
|
Pe,
|
|
535
535
|
{
|
|
536
536
|
iconPosition: (I = r.tooltipProps) == null ? void 0 : I.position,
|
|
@@ -539,7 +539,7 @@ const ko = ({
|
|
|
539
539
|
V,
|
|
540
540
|
{
|
|
541
541
|
iconName: W,
|
|
542
|
-
color: r.disabled ? o.colors.neutralColors.colorNeutralCleanest :
|
|
542
|
+
color: r.disabled ? o.colors.neutralColors.colorNeutralCleanest : w(r) ? o.colors.brandColors.colorBrandSoft : b ?? o.colors.neutralColors.colorNeutralDark
|
|
543
543
|
}
|
|
544
544
|
)
|
|
545
545
|
}
|
|
@@ -549,18 +549,18 @@ const ko = ({
|
|
|
549
549
|
return /* @__PURE__ */ n.jsx(
|
|
550
550
|
Me,
|
|
551
551
|
{
|
|
552
|
-
marginTop:
|
|
553
|
-
width: s ?? `${
|
|
554
|
-
maxHeight:
|
|
552
|
+
marginTop: f,
|
|
553
|
+
width: s ?? `${E}px`,
|
|
554
|
+
maxHeight: m,
|
|
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(Fe, { size: i, children: "Sem opções" }) : t.map((r,
|
|
562
|
-
var D,
|
|
563
|
-
const N = typeof r.render == "function" ? r.render() : null, W =
|
|
561
|
+
children: t.length === 0 ? /* @__PURE__ */ n.jsx(Fe, { size: i, children: "Sem opções" }) : t.map((r, $) => {
|
|
562
|
+
var D, L;
|
|
563
|
+
const N = typeof r.render == "function" ? r.render() : null, W = y(r.label);
|
|
564
564
|
if (r.isSection)
|
|
565
565
|
return /* @__PURE__ */ n.jsx(Ee, { size: i, children: W }, W);
|
|
566
566
|
{
|
|
@@ -568,8 +568,8 @@ const ko = ({
|
|
|
568
568
|
return /* @__PURE__ */ n.jsxs(
|
|
569
569
|
Te,
|
|
570
570
|
{
|
|
571
|
-
isOptionSelected:
|
|
572
|
-
highlightedIndex:
|
|
571
|
+
isOptionSelected: w(r),
|
|
572
|
+
highlightedIndex: $ === T,
|
|
573
573
|
onClick: (X) => {
|
|
574
574
|
X.stopPropagation(), r.disabled || (z ? Ce({
|
|
575
575
|
id: "select-option",
|
|
@@ -590,44 +590,44 @@ const ko = ({
|
|
|
590
590
|
}
|
|
591
591
|
}) : l(r));
|
|
592
592
|
},
|
|
593
|
-
onMouseEnter: () =>
|
|
593
|
+
onMouseEnter: () => x($),
|
|
594
594
|
disabled: r.disabled,
|
|
595
595
|
size: i,
|
|
596
|
-
menuLateralPadding:
|
|
596
|
+
menuLateralPadding: M,
|
|
597
597
|
children: [
|
|
598
|
-
|
|
598
|
+
c(r, "left"),
|
|
599
599
|
/* @__PURE__ */ n.jsxs(
|
|
600
600
|
He,
|
|
601
601
|
{
|
|
602
|
-
menuOptionFlexDirection:
|
|
603
|
-
menuJustifyContent:
|
|
602
|
+
menuOptionFlexDirection: H,
|
|
603
|
+
menuJustifyContent: R,
|
|
604
604
|
iconName: h,
|
|
605
|
-
isOptionSelected:
|
|
606
|
-
highlightedIndex:
|
|
605
|
+
isOptionSelected: w(r),
|
|
606
|
+
highlightedIndex: $ === 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: S,
|
|
613
|
+
tableActionButton: k,
|
|
614
614
|
children: [
|
|
615
615
|
/* @__PURE__ */ n.jsxs(
|
|
616
616
|
Ae,
|
|
617
617
|
{
|
|
618
|
-
truncateText: !se(r.label) &&
|
|
618
|
+
truncateText: !se(r.label) && S,
|
|
619
619
|
children: [
|
|
620
620
|
N,
|
|
621
621
|
se(r.label) ? /* @__PURE__ */ n.jsx(
|
|
622
622
|
"p",
|
|
623
623
|
{
|
|
624
|
-
title: ((D = r == null ? void 0 : r.tooltipProps) == null ? void 0 : D.label) ??
|
|
624
|
+
title: ((D = r == null ? void 0 : r.tooltipProps) == null ? void 0 : D.label) ?? y(r.label),
|
|
625
625
|
children: r.label
|
|
626
626
|
}
|
|
627
627
|
) : /* @__PURE__ */ n.jsx(
|
|
628
628
|
"p",
|
|
629
629
|
{
|
|
630
|
-
title: ((
|
|
630
|
+
title: ((L = r == null ? void 0 : r.tooltipProps) == null ? void 0 : L.label) ?? W,
|
|
631
631
|
children: d && I >= 0 ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
632
632
|
W.substring(0, I),
|
|
633
633
|
/* @__PURE__ */ n.jsx(Le, { size: i, children: W.substring(
|
|
@@ -647,7 +647,7 @@ const ko = ({
|
|
|
647
647
|
]
|
|
648
648
|
}
|
|
649
649
|
),
|
|
650
|
-
|
|
650
|
+
c(r, "right")
|
|
651
651
|
]
|
|
652
652
|
},
|
|
653
653
|
String(r.value)
|
|
@@ -667,9 +667,9 @@ const De = ({
|
|
|
667
667
|
height: a,
|
|
668
668
|
flex: d,
|
|
669
669
|
children: s,
|
|
670
|
-
wrapperCustomStyles:
|
|
671
|
-
contentCustomStyles:
|
|
672
|
-
titleCustomStyles:
|
|
670
|
+
wrapperCustomStyles: m = {},
|
|
671
|
+
contentCustomStyles: g = {},
|
|
672
|
+
titleCustomStyles: p = {}
|
|
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
|
+
...m
|
|
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: g,
|
|
694
694
|
children: [
|
|
695
|
-
e ? /* @__PURE__ */ n.jsx(_, { width: "fit-content", customStyles:
|
|
695
|
+
e ? /* @__PURE__ */ n.jsx(_, { width: "fit-content", customStyles: p, 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 = C.div`
|
|
717
717
|
${q}
|
|
718
718
|
display: flex;
|
|
719
719
|
flex-direction: column;
|
|
@@ -722,7 +722,7 @@ const Xe = y.div`
|
|
|
722
722
|
&:hover {
|
|
723
723
|
cursor: ${({ disabled: e, readonly: t }) => e || t ? "default" : "pointer"};
|
|
724
724
|
}
|
|
725
|
-
`, _e =
|
|
725
|
+
`, _e = C.div`
|
|
726
726
|
width: 100%;
|
|
727
727
|
${({ variant: e }) => e === "default" ? F`
|
|
728
728
|
min-height: ${({ size: t }) => t === "Small" ? "3.2rem" : "4rem"};
|
|
@@ -782,7 +782,7 @@ const Xe = y.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 = C.div`
|
|
786
786
|
align-items: center;
|
|
787
787
|
display: flex;
|
|
788
788
|
flex: 1 1 0%;
|
|
@@ -791,7 +791,7 @@ const Xe = y.div`
|
|
|
791
791
|
overflow: hidden;
|
|
792
792
|
min-height: 1em;
|
|
793
793
|
box-sizing: border-box;
|
|
794
|
-
`, de =
|
|
794
|
+
`, de = C.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 = y.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 = C.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 = y.div`
|
|
|
818
818
|
white-space: nowrap;
|
|
819
819
|
overflow: hidden;
|
|
820
820
|
width: fit-content;
|
|
821
|
-
`, qe =
|
|
821
|
+
`, qe = C.input`
|
|
822
822
|
flex: 1;
|
|
823
823
|
min-width: 0.1rem;
|
|
824
824
|
border: none;
|
|
@@ -832,14 +832,14 @@ const Xe = y.div`
|
|
|
832
832
|
outline: none;
|
|
833
833
|
cursor: ${({ disabled: e, readOnly: t }) => e || t ? "default" : "pointer"};
|
|
834
834
|
}
|
|
835
|
-
`, Je =
|
|
835
|
+
`, Je = C.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 = C.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 = y.div`
|
|
|
848
848
|
)};
|
|
849
849
|
color: ${o.colors.neutralColors.colorNeutralCloudy};
|
|
850
850
|
margin-bottom: ${o.spacings.spacingStack.spacingStackNano};
|
|
851
|
-
`, Qe =
|
|
851
|
+
`, Qe = C.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 = y.div`
|
|
|
857
857
|
)};
|
|
858
858
|
color: ${o.colors.feedbackColors.colorFeedbackError};
|
|
859
859
|
`;
|
|
860
|
-
|
|
860
|
+
C.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 @@ y.p`
|
|
|
865
865
|
margin-top: ${o.spacings.spacingInline.spacingInlineNano};
|
|
866
866
|
width: 100%;
|
|
867
867
|
`;
|
|
868
|
-
const Ve =
|
|
868
|
+
const Ve = C.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 = y.p`
|
|
|
873
873
|
margin-top: ${o.spacings.spacingInline.spacingInlineNano};
|
|
874
874
|
width: 100%;
|
|
875
875
|
`, Ze = (e, { value: t, options: i }) => {
|
|
876
|
-
const [l, a] = P(!1), [d, s] = P(!1), [
|
|
876
|
+
const [l, a] = P(!1), [d, s] = P(!1), [m, g] = P(""), [p, f] = P(i), h = U(null), b = U(null), B = U(null), j = U(null);
|
|
877
877
|
Z(() => {
|
|
878
|
-
const
|
|
878
|
+
const k = () => {
|
|
879
879
|
s(!1);
|
|
880
880
|
};
|
|
881
|
-
return window.addEventListener("scroll",
|
|
882
|
-
window.removeEventListener("scroll",
|
|
881
|
+
return window.addEventListener("scroll", k, { passive: !0 }), window.addEventListener("resize", k, { passive: !0 }), () => {
|
|
882
|
+
window.removeEventListener("scroll", k), window.removeEventListener("resize", k);
|
|
883
883
|
};
|
|
884
884
|
}, []);
|
|
885
|
-
function
|
|
886
|
-
|
|
885
|
+
function u(k) {
|
|
886
|
+
g(""), s(!1), a(!0), B != null && B.current && B.current.focus(), k !== t && e(k);
|
|
887
887
|
}
|
|
888
|
-
const
|
|
889
|
-
if (
|
|
890
|
-
const
|
|
891
|
-
(z) =>
|
|
888
|
+
const S = (k) => {
|
|
889
|
+
if (k) {
|
|
890
|
+
const M = new RegExp(k, "i"), H = i.filter(
|
|
891
|
+
(z) => M.exec(z.label)
|
|
892
892
|
);
|
|
893
|
-
|
|
893
|
+
f(H);
|
|
894
894
|
} else
|
|
895
|
-
|
|
895
|
+
f(i);
|
|
896
896
|
};
|
|
897
|
-
function
|
|
898
|
-
return !
|
|
897
|
+
function R(k) {
|
|
898
|
+
return !k;
|
|
899
899
|
}
|
|
900
900
|
return {
|
|
901
901
|
isOpen: l,
|
|
902
902
|
setIsOpen: a,
|
|
903
903
|
expanded: d,
|
|
904
904
|
setExpanded: s,
|
|
905
|
-
inputValue:
|
|
906
|
-
setInputValue:
|
|
907
|
-
optionsSelect:
|
|
908
|
-
setOptionSelect:
|
|
905
|
+
inputValue: m,
|
|
906
|
+
setInputValue: g,
|
|
907
|
+
optionsSelect: p,
|
|
908
|
+
setOptionSelect: f,
|
|
909
909
|
selectContainerRef: h,
|
|
910
|
-
containerRef:
|
|
911
|
-
inputContainerRef:
|
|
912
|
-
optionsRef:
|
|
913
|
-
selectOption:
|
|
914
|
-
handlerFilterOptions:
|
|
915
|
-
isValue:
|
|
910
|
+
containerRef: b,
|
|
911
|
+
inputContainerRef: B,
|
|
912
|
+
optionsRef: j,
|
|
913
|
+
selectOption: u,
|
|
914
|
+
handlerFilterOptions: S,
|
|
915
|
+
isValue: R
|
|
916
916
|
};
|
|
917
917
|
}, me = ge(
|
|
918
918
|
({
|
|
@@ -923,68 +923,68 @@ const Ve = y.p`
|
|
|
923
923
|
placeholder: a,
|
|
924
924
|
label: d,
|
|
925
925
|
size: s = "Medium",
|
|
926
|
-
width:
|
|
927
|
-
disabled:
|
|
928
|
-
helpText:
|
|
929
|
-
readonly:
|
|
926
|
+
width: m = "100%",
|
|
927
|
+
disabled: g,
|
|
928
|
+
helpText: p,
|
|
929
|
+
readonly: f,
|
|
930
930
|
errorMessage: h,
|
|
931
|
-
tooltipProps:
|
|
932
|
-
onBlur:
|
|
933
|
-
onEnter:
|
|
934
|
-
variant:
|
|
935
|
-
infoProps:
|
|
936
|
-
maxHeightMenu:
|
|
937
|
-
isRequired:
|
|
938
|
-
onRemoveSelected:
|
|
939
|
-
displayText:
|
|
931
|
+
tooltipProps: b = {},
|
|
932
|
+
onBlur: B,
|
|
933
|
+
onEnter: j,
|
|
934
|
+
variant: u = "default",
|
|
935
|
+
infoProps: S = {},
|
|
936
|
+
maxHeightMenu: R,
|
|
937
|
+
isRequired: k = !1,
|
|
938
|
+
onRemoveSelected: M,
|
|
939
|
+
displayText: H,
|
|
940
940
|
displayTextProps: z = {}
|
|
941
941
|
}, J) => {
|
|
942
942
|
const {
|
|
943
943
|
isOpen: A,
|
|
944
944
|
setIsOpen: T,
|
|
945
|
-
expanded:
|
|
946
|
-
setExpanded:
|
|
945
|
+
expanded: x,
|
|
946
|
+
setExpanded: w,
|
|
947
947
|
inputValue: v,
|
|
948
|
-
setInputValue:
|
|
949
|
-
optionsSelect:
|
|
950
|
-
selectContainerRef:
|
|
948
|
+
setInputValue: E,
|
|
949
|
+
optionsSelect: y,
|
|
950
|
+
selectContainerRef: c,
|
|
951
951
|
containerRef: r,
|
|
952
|
-
inputContainerRef:
|
|
952
|
+
inputContainerRef: $,
|
|
953
953
|
selectOption: N,
|
|
954
954
|
setOptionSelect: W,
|
|
955
955
|
handlerFilterOptions: D,
|
|
956
|
-
isValue:
|
|
956
|
+
isValue: L
|
|
957
957
|
} = Ze(t, { value: e, options: i }), I = !!h, X = {
|
|
958
958
|
label: h,
|
|
959
|
-
|
|
959
|
+
...b,
|
|
960
960
|
wrapperWidth: "auto",
|
|
961
961
|
isActive: I,
|
|
962
962
|
isErrorTooltip: !0
|
|
963
963
|
}, O = {
|
|
964
|
-
...
|
|
964
|
+
...S,
|
|
965
965
|
size: s
|
|
966
966
|
}, K = /* @__PURE__ */ n.jsx(
|
|
967
967
|
V,
|
|
968
968
|
{
|
|
969
969
|
iconName: `Close${s === "Small" ? "Sm" : "Ant"}`,
|
|
970
970
|
onClick: (Y) => {
|
|
971
|
-
Y.stopPropagation(),
|
|
971
|
+
Y.stopPropagation(), M(e);
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
), te = /* @__PURE__ */ n.jsx(V, { iconName: `ExpandLess${s === "Small" ? "Sm" : "Ant"}` }), be = /* @__PURE__ */ n.jsx(V, { iconName: `ExpandMore${s === "Small" ? "Sm" : "Ant"}` });
|
|
975
975
|
return /* @__PURE__ */ n.jsxs(
|
|
976
976
|
Xe,
|
|
977
977
|
{
|
|
978
|
-
ref:
|
|
979
|
-
width:
|
|
978
|
+
ref: c,
|
|
979
|
+
width: m,
|
|
980
980
|
size: s,
|
|
981
|
-
disabled:
|
|
982
|
-
readonly:
|
|
981
|
+
disabled: g,
|
|
982
|
+
readonly: f,
|
|
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
|
+
k && !g ? /* @__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
|
] }),
|
|
@@ -992,68 +992,68 @@ const Ve = y.p`
|
|
|
992
992
|
_e,
|
|
993
993
|
{
|
|
994
994
|
hasError: I,
|
|
995
|
-
readonly:
|
|
995
|
+
readonly: f,
|
|
996
996
|
ref: r,
|
|
997
997
|
onBlur: () => {
|
|
998
998
|
setTimeout(() => {
|
|
999
|
-
(A ||
|
|
999
|
+
(A || x) && $.current !== document.activeElement && (B && B(e), T(!1), w(!1));
|
|
1000
1000
|
}, 250);
|
|
1001
1001
|
},
|
|
1002
1002
|
onClick: () => {
|
|
1003
|
-
!
|
|
1003
|
+
!g && !f && (A && !x ? (w(!0), $ != null && $.current && $.current.focus()) : !A && !x ? (T(!0), w(!0), $ != null && $.current && $.current.focus()) : (T(!1), w(!1), $ != null && $.current && $.current.blur()), !v && W(i));
|
|
1004
1004
|
},
|
|
1005
1005
|
tabIndex: 0,
|
|
1006
|
-
width:
|
|
1006
|
+
width: m,
|
|
1007
1007
|
size: s,
|
|
1008
|
-
isOpen: A ||
|
|
1008
|
+
isOpen: A || x,
|
|
1009
1009
|
"data-testid": "select",
|
|
1010
|
-
disabled:
|
|
1011
|
-
helpText:
|
|
1012
|
-
variant:
|
|
1010
|
+
disabled: g,
|
|
1011
|
+
helpText: p,
|
|
1012
|
+
variant: u,
|
|
1013
1013
|
children: [
|
|
1014
1014
|
/* @__PURE__ */ n.jsxs(Ue, { children: [
|
|
1015
|
-
G(
|
|
1016
|
-
a &&
|
|
1015
|
+
G(H) ? /* @__PURE__ */ n.jsx(de, { size: s, variant: u, isDisplayText: !0, children: /* @__PURE__ */ n.jsx("p", { title: e == null ? void 0 : e.label, ...z, children: H }) }) : /* @__PURE__ */ n.jsxs(de, { size: s, variant: u, children: [
|
|
1016
|
+
a && L(e) && !v && !A ? /* @__PURE__ */ n.jsx(Ge, { size: s, variant: u, children: a }) : 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: $,
|
|
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: f,
|
|
1028
1028
|
width: v.length,
|
|
1029
1029
|
size: s,
|
|
1030
|
-
disabled:
|
|
1031
|
-
variant:
|
|
1030
|
+
disabled: g,
|
|
1031
|
+
variant: u
|
|
1032
1032
|
}
|
|
1033
1033
|
)
|
|
1034
1034
|
] }),
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1035
|
+
M && e ? K : null,
|
|
1036
|
+
x ? te : be,
|
|
1037
|
+
x && /* @__PURE__ */ n.jsx(
|
|
1038
1038
|
ie,
|
|
1039
1039
|
{
|
|
1040
1040
|
onEnter: (Y) => {
|
|
1041
|
-
t && t(Y), T(!1),
|
|
1041
|
+
t && t(Y), T(!1), w(!1), j && j(Y);
|
|
1042
1042
|
},
|
|
1043
1043
|
menuIsOpen: A,
|
|
1044
|
-
selectContainerRef:
|
|
1044
|
+
selectContainerRef: c,
|
|
1045
1045
|
value: e,
|
|
1046
|
-
optionsSelect:
|
|
1046
|
+
optionsSelect: y,
|
|
1047
1047
|
selectOption: N,
|
|
1048
1048
|
size: s,
|
|
1049
1049
|
inputValue: v,
|
|
1050
|
-
maxHeightMenu:
|
|
1050
|
+
maxHeightMenu: R
|
|
1051
1051
|
}
|
|
1052
1052
|
)
|
|
1053
1053
|
]
|
|
1054
1054
|
}
|
|
1055
1055
|
) }),
|
|
1056
|
-
|
|
1056
|
+
p && /* @__PURE__ */ n.jsx(Ve, { size: s, children: p })
|
|
1057
1057
|
]
|
|
1058
1058
|
}
|
|
1059
1059
|
);
|
|
@@ -1067,7 +1067,7 @@ const pe = Be`
|
|
|
1067
1067
|
to {
|
|
1068
1068
|
transform: rotate(360deg);
|
|
1069
1069
|
}
|
|
1070
|
-
`, Ke =
|
|
1070
|
+
`, Ke = C.button`
|
|
1071
1071
|
display: flex;
|
|
1072
1072
|
justify-content: space-between;
|
|
1073
1073
|
align-items: center;
|
|
@@ -1150,7 +1150,7 @@ const pe = Be`
|
|
|
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 = C.div`
|
|
1154
1154
|
display: flex;
|
|
1155
1155
|
flex-direction: column;
|
|
1156
1156
|
width: ${({ width: e }) => e};
|
|
@@ -1158,7 +1158,7 @@ const pe = Be`
|
|
|
1158
1158
|
&:hover {
|
|
1159
1159
|
cursor: ${({ disabled: e }) => e && "not-allowed"};
|
|
1160
1160
|
}
|
|
1161
|
-
`, oo =
|
|
1161
|
+
`, oo = C.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 pe = 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
|
+
C.p`
|
|
1172
1172
|
display: inline-block;
|
|
1173
1173
|
font-size: ${o.fonts.fontSize.fontSizeBodyMd};
|
|
1174
1174
|
font-weight: ${o.fonts.fontWeight.fontWeightRegular};
|
|
@@ -1176,7 +1176,7 @@ y.p`
|
|
|
1176
1176
|
margin-top: ${o.spacings.spacingInline.spacingInlineNano};
|
|
1177
1177
|
width: 100%;
|
|
1178
1178
|
`;
|
|
1179
|
-
const to =
|
|
1179
|
+
const to = C.div`
|
|
1180
1180
|
width: 100%;
|
|
1181
1181
|
|
|
1182
1182
|
& > svg {
|
|
@@ -1212,28 +1212,28 @@ const to = y.div`
|
|
|
1212
1212
|
disabled: a = !1,
|
|
1213
1213
|
isLoading: d = !1,
|
|
1214
1214
|
onClick: s,
|
|
1215
|
-
options:
|
|
1216
|
-
label:
|
|
1217
|
-
menuSelectProps:
|
|
1218
|
-
iconName:
|
|
1215
|
+
options: m,
|
|
1216
|
+
label: g,
|
|
1217
|
+
menuSelectProps: p = {},
|
|
1218
|
+
iconName: f,
|
|
1219
1219
|
optionsIconPosition: h
|
|
1220
1220
|
}) => {
|
|
1221
|
-
const { isOpen:
|
|
1222
|
-
let
|
|
1223
|
-
a ?
|
|
1224
|
-
const
|
|
1225
|
-
...
|
|
1221
|
+
const { isOpen: b, setIsOpen: B, selectContainerRef: j, optionsSelect: u } = no(m);
|
|
1222
|
+
let S = o.colors.backgroundColors.colorBackgroundSnow;
|
|
1223
|
+
a ? S = o.colors.neutralColors.colorNeutralCloudy : t !== "primary" && (S = o.colors.neutralColors.colorNeutralDark);
|
|
1224
|
+
const R = {
|
|
1225
|
+
...p
|
|
1226
1226
|
};
|
|
1227
1227
|
return /* @__PURE__ */ n.jsxs(
|
|
1228
1228
|
eo,
|
|
1229
1229
|
{
|
|
1230
|
-
ref:
|
|
1230
|
+
ref: j,
|
|
1231
1231
|
width: i,
|
|
1232
1232
|
size: l,
|
|
1233
1233
|
disabled: a,
|
|
1234
|
-
onBlur: () => setTimeout(() =>
|
|
1234
|
+
onBlur: () => setTimeout(() => B(!1), ro),
|
|
1235
1235
|
children: [
|
|
1236
|
-
|
|
1236
|
+
g && /* @__PURE__ */ n.jsx(oo, { children: g }),
|
|
1237
1237
|
/* @__PURE__ */ n.jsxs(
|
|
1238
1238
|
Ke,
|
|
1239
1239
|
{
|
|
@@ -1242,54 +1242,54 @@ const to = y.div`
|
|
|
1242
1242
|
disabled: a,
|
|
1243
1243
|
variant: t,
|
|
1244
1244
|
isLoading: d,
|
|
1245
|
-
onClick: () => !d &&
|
|
1245
|
+
onClick: () => !d && B(!b),
|
|
1246
1246
|
id: `button-component-${e}`,
|
|
1247
1247
|
children: [
|
|
1248
1248
|
d && /* @__PURE__ */ n.jsx(to, { size: l, disabled: a, variant: t, children: /* @__PURE__ */ n.jsx(
|
|
1249
1249
|
V,
|
|
1250
1250
|
{
|
|
1251
1251
|
iconName: `ProgressActivity${l === "Small" ? "Ant" : "Sm"}`,
|
|
1252
|
-
color:
|
|
1252
|
+
color: S,
|
|
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 && (b ? /* @__PURE__ */ n.jsx(
|
|
1258
1258
|
V,
|
|
1259
1259
|
{
|
|
1260
1260
|
iconName: `ExpandLess${l === "Small" ? "Ant" : "Sm"}`,
|
|
1261
|
-
color:
|
|
1261
|
+
color: S,
|
|
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: S,
|
|
1269
1269
|
"data-testid": "icon-button-more"
|
|
1270
1270
|
}
|
|
1271
1271
|
))
|
|
1272
1272
|
]
|
|
1273
1273
|
}
|
|
1274
1274
|
),
|
|
1275
|
-
|
|
1275
|
+
b && /* @__PURE__ */ n.jsx(
|
|
1276
1276
|
ie,
|
|
1277
1277
|
{
|
|
1278
|
-
selectContainerRef:
|
|
1278
|
+
selectContainerRef: j,
|
|
1279
1279
|
value: null,
|
|
1280
|
-
optionsSelect:
|
|
1280
|
+
optionsSelect: u,
|
|
1281
1281
|
selectOption: s,
|
|
1282
1282
|
size: l,
|
|
1283
1283
|
inputValue: null,
|
|
1284
1284
|
iconPosition: h,
|
|
1285
|
-
iconName:
|
|
1286
|
-
...
|
|
1285
|
+
iconName: f,
|
|
1286
|
+
...R
|
|
1287
1287
|
}
|
|
1288
1288
|
)
|
|
1289
1289
|
]
|
|
1290
1290
|
}
|
|
1291
1291
|
);
|
|
1292
|
-
}, lo =
|
|
1292
|
+
}, lo = C.div`
|
|
1293
1293
|
min-width: ${({ widthItems: e }) => e};
|
|
1294
1294
|
max-width: ${({ widthItems: e }) => e};
|
|
1295
1295
|
height: 100%;
|
|
@@ -1299,7 +1299,7 @@ const to = y.div`
|
|
|
1299
1299
|
overflow: auto;
|
|
1300
1300
|
scroll-padding-top: 10px;
|
|
1301
1301
|
}
|
|
1302
|
-
`, io =
|
|
1302
|
+
`, io = C.div`
|
|
1303
1303
|
width: 100%;
|
|
1304
1304
|
min-height: ${({ heightItems: e }) => e};
|
|
1305
1305
|
max-height: ${({ heightItems: e }) => e};
|
|
@@ -1310,7 +1310,8 @@ const to = y.div`
|
|
|
1310
1310
|
border-right: ${({ selected: t }) => t ? "none" : `1px solid ${o.colors.neutralColors.colorNeutralSoft}`};
|
|
1311
1311
|
`}
|
|
1312
1312
|
cursor: pointer;
|
|
1313
|
-
|
|
1313
|
+
${({ customStyles: e }) => e && F(e)}
|
|
1314
|
+
`, so = C.div`
|
|
1314
1315
|
max-width: 4px;
|
|
1315
1316
|
min-width: 4px;
|
|
1316
1317
|
min-height: ${({ heightItems: e }) => e};
|
|
@@ -1322,13 +1323,13 @@ const to = y.div`
|
|
|
1322
1323
|
border-right: ${({ selected: t }) => t ? "none" : `1px solid ${o.colors.neutralColors.colorNeutralSoft}`};
|
|
1323
1324
|
`}
|
|
1324
1325
|
cursor: pointer;
|
|
1325
|
-
`, ao =
|
|
1326
|
+
`, ao = C.div`
|
|
1326
1327
|
display: flex;
|
|
1327
1328
|
min-width: 0;
|
|
1328
1329
|
height: 100%;
|
|
1329
1330
|
flex: 1;
|
|
1330
1331
|
background-color: #e8f3ff;
|
|
1331
|
-
`, co =
|
|
1332
|
+
`, co = C.div`
|
|
1332
1333
|
max-width: 4px;
|
|
1333
1334
|
min-width: 4px;
|
|
1334
1335
|
height: 100%;
|
|
@@ -1342,25 +1343,27 @@ const to = y.div`
|
|
|
1342
1343
|
options: a = [],
|
|
1343
1344
|
heightItems: d = "60px",
|
|
1344
1345
|
widthItems: s = "155px",
|
|
1345
|
-
emptyProps:
|
|
1346
|
+
emptyProps: m = {
|
|
1346
1347
|
title: "Nenhum dado a ser mostrado",
|
|
1347
1348
|
body: null
|
|
1348
|
-
}
|
|
1349
|
+
},
|
|
1350
|
+
customWrapperStyles: g = {},
|
|
1351
|
+
customItemStyles: p = {}
|
|
1349
1352
|
}) => {
|
|
1350
|
-
var
|
|
1351
|
-
const [
|
|
1353
|
+
var j;
|
|
1354
|
+
const [f, h] = P(a[0] || null), b = U(null), B = U(null);
|
|
1352
1355
|
return Z(() => {
|
|
1353
|
-
const u =
|
|
1354
|
-
u &&
|
|
1356
|
+
const u = b.current, S = B.current, R = () => {
|
|
1357
|
+
u && S && (S.scrollTop = u.scrollTop);
|
|
1355
1358
|
};
|
|
1356
|
-
return u == null || u.addEventListener("scroll",
|
|
1357
|
-
u == null || u.removeEventListener("scroll",
|
|
1359
|
+
return u == null || u.addEventListener("scroll", R), () => {
|
|
1360
|
+
u == null || u.removeEventListener("scroll", R);
|
|
1358
1361
|
};
|
|
1359
1362
|
}, []), (a == null ? void 0 : a.length) === 0 ? /* @__PURE__ */ n.jsx(
|
|
1360
1363
|
he,
|
|
1361
1364
|
{
|
|
1362
|
-
title:
|
|
1363
|
-
body:
|
|
1365
|
+
title: m.title,
|
|
1366
|
+
body: m.body,
|
|
1364
1367
|
flex: "1",
|
|
1365
1368
|
mode: "table"
|
|
1366
1369
|
}
|
|
@@ -1374,31 +1377,33 @@ const to = y.div`
|
|
|
1374
1377
|
direction: "horizontal",
|
|
1375
1378
|
customStyles: {
|
|
1376
1379
|
border: `1px solid ${o.colors.neutralColors.colorNeutralSoft}`,
|
|
1377
|
-
borderRadius: o.borders.borderRadius.borderRadiusSm
|
|
1380
|
+
borderRadius: o.borders.borderRadius.borderRadiusSm,
|
|
1381
|
+
...g
|
|
1378
1382
|
},
|
|
1379
1383
|
children: [
|
|
1380
|
-
/* @__PURE__ */ n.jsx(lo, { ref:
|
|
1384
|
+
/* @__PURE__ */ n.jsx(lo, { ref: b, widthItems: s, children: a == null ? void 0 : a.map((u, S) => /* @__PURE__ */ n.jsx(
|
|
1381
1385
|
io,
|
|
1382
1386
|
{
|
|
1383
|
-
selected: (
|
|
1384
|
-
onClick: () =>
|
|
1387
|
+
selected: (f == null ? void 0 : f.key) === u.key,
|
|
1388
|
+
onClick: () => h(u),
|
|
1385
1389
|
withBorderRight: !1,
|
|
1386
1390
|
heightItems: d,
|
|
1391
|
+
customStyles: p,
|
|
1387
1392
|
children: u.item
|
|
1388
1393
|
},
|
|
1389
|
-
|
|
1394
|
+
S
|
|
1390
1395
|
)) }),
|
|
1391
|
-
/* @__PURE__ */ n.jsx(co, { ref:
|
|
1396
|
+
/* @__PURE__ */ n.jsx(co, { ref: B, children: (j = a == null ? void 0 : a.concat({ key: "last", item: /* @__PURE__ */ n.jsx(n.Fragment, {}), contentItem: /* @__PURE__ */ n.jsx(n.Fragment, {}) })) == null ? void 0 : j.map((u, S) => /* @__PURE__ */ n.jsx(
|
|
1392
1397
|
so,
|
|
1393
1398
|
{
|
|
1394
|
-
selected: (
|
|
1395
|
-
onClick: () =>
|
|
1399
|
+
selected: (f == null ? void 0 : f.key) === u.key,
|
|
1400
|
+
onClick: () => h(u),
|
|
1396
1401
|
withBorderRight: !0,
|
|
1397
1402
|
heightItems: d
|
|
1398
1403
|
},
|
|
1399
|
-
|
|
1404
|
+
S
|
|
1400
1405
|
)) }),
|
|
1401
|
-
/* @__PURE__ */ n.jsx(ao, { children:
|
|
1406
|
+
/* @__PURE__ */ n.jsx(ao, { children: f && (f == null ? void 0 : f.contentItem) })
|
|
1402
1407
|
]
|
|
1403
1408
|
}
|
|
1404
1409
|
);
|
|
@@ -1414,7 +1419,7 @@ const to = y.div`
|
|
|
1414
1419
|
fill: ${o.colors.neutralColors.colorNeutralDarkest};
|
|
1415
1420
|
}
|
|
1416
1421
|
}
|
|
1417
|
-
`, fo =
|
|
1422
|
+
`, fo = C.div`
|
|
1418
1423
|
width: 100%;
|
|
1419
1424
|
max-height: ${({ maxHeight: e }) => e};
|
|
1420
1425
|
overflow: auto;
|
|
@@ -1436,11 +1441,11 @@ const to = y.div`
|
|
|
1436
1441
|
background: ${o.colors.neutralColors.colorNeutralClean};
|
|
1437
1442
|
border-radius: ${o.borders.borderRadius.borderRadiusPill};
|
|
1438
1443
|
}
|
|
1439
|
-
`, ho =
|
|
1444
|
+
`, ho = C.table`
|
|
1440
1445
|
border-collapse: separate;
|
|
1441
1446
|
border-spacing: 0;
|
|
1442
1447
|
width: 100%;
|
|
1443
|
-
`, uo = `${o.borders.borderRadius.borderExtraSmall} ${o.borders.borderRadius.borderExtraSmall} 0 0`, go = `0 0 ${o.borders.borderRadius.borderExtraSmall} ${o.borders.borderRadius.borderExtraSmall}`, ee =
|
|
1448
|
+
`, uo = `${o.borders.borderRadius.borderExtraSmall} ${o.borders.borderRadius.borderExtraSmall} 0 0`, go = `0 0 ${o.borders.borderRadius.borderExtraSmall} ${o.borders.borderRadius.borderExtraSmall}`, ee = C.tr`
|
|
1444
1449
|
${({ isHeader: e, size: t }) => e && F`
|
|
1445
1450
|
position: sticky;
|
|
1446
1451
|
background-color: ${o.colors.backgroundColors.colorBackgroundSnow};
|
|
@@ -1494,7 +1499,7 @@ const to = y.div`
|
|
|
1494
1499
|
return F`
|
|
1495
1500
|
width: ${e};
|
|
1496
1501
|
`;
|
|
1497
|
-
}, oe =
|
|
1502
|
+
}, oe = C.th`
|
|
1498
1503
|
text-align: ${({ horizontalAlign: e, headerAlign: t }) => e ?? t ?? "left"};
|
|
1499
1504
|
vertical-align: middle;
|
|
1500
1505
|
min-width: ${({ minWidth: e }) => e || "auto"};
|
|
@@ -1538,7 +1543,7 @@ const to = y.div`
|
|
|
1538
1543
|
&:hover {
|
|
1539
1544
|
cursor: default;
|
|
1540
1545
|
}
|
|
1541
|
-
`, mo =
|
|
1546
|
+
`, mo = C.td`
|
|
1542
1547
|
text-align: ${({ horizontalAlign: e }) => e || "left"};
|
|
1543
1548
|
vertical-align: ${({ verticalAlign: e }) => e || "middle"};
|
|
1544
1549
|
|
|
@@ -1582,9 +1587,9 @@ function jo({
|
|
|
1582
1587
|
fit: a = !1,
|
|
1583
1588
|
maxHeight: d = "40rem",
|
|
1584
1589
|
columns: s,
|
|
1585
|
-
dataSource:
|
|
1586
|
-
columnsTextSize:
|
|
1587
|
-
emptyProps:
|
|
1590
|
+
dataSource: m,
|
|
1591
|
+
columnsTextSize: g = i,
|
|
1592
|
+
emptyProps: p = {
|
|
1588
1593
|
width: "100%",
|
|
1589
1594
|
height: "100%",
|
|
1590
1595
|
title: "Nenhum dado a ser mostrado.",
|
|
@@ -1592,38 +1597,38 @@ function jo({
|
|
|
1592
1597
|
borders: !0,
|
|
1593
1598
|
backgroundColor: o.colors.backgroundColors.colorBackgroundSnow
|
|
1594
1599
|
},
|
|
1595
|
-
selectedRow:
|
|
1600
|
+
selectedRow: f = !1,
|
|
1596
1601
|
hideHeader: h = !1,
|
|
1597
|
-
withBorder:
|
|
1598
|
-
withBorderRadius:
|
|
1599
|
-
striped:
|
|
1600
|
-
borderRadius:
|
|
1602
|
+
withBorder: b = !0,
|
|
1603
|
+
withBorderRadius: B = !0,
|
|
1604
|
+
striped: j = !1,
|
|
1605
|
+
borderRadius: u = o.borders.borderRadius.borderRadiusSm
|
|
1601
1606
|
}) {
|
|
1602
|
-
const
|
|
1607
|
+
const S = Q(() => po(t), [t]), [R, k] = P(null), M = U(null), H = U(null), [z, J] = P(s);
|
|
1603
1608
|
Ne(() => {
|
|
1604
|
-
if (!
|
|
1609
|
+
if (!H.current || s.length === 0) {
|
|
1605
1610
|
J(s);
|
|
1606
1611
|
return;
|
|
1607
1612
|
}
|
|
1608
|
-
const
|
|
1613
|
+
const x = () => {
|
|
1609
1614
|
var D;
|
|
1610
|
-
const v = ((D =
|
|
1615
|
+
const v = ((D = H.current) == null ? void 0 : D.clientWidth) || 0;
|
|
1611
1616
|
if (v === 0) return;
|
|
1612
|
-
let
|
|
1613
|
-
const
|
|
1614
|
-
s.forEach((
|
|
1615
|
-
const I = Number(
|
|
1616
|
-
|
|
1617
|
+
let E = 0, y = 0;
|
|
1618
|
+
const c = [], r = [];
|
|
1619
|
+
s.forEach((L) => {
|
|
1620
|
+
const I = Number(L.flex);
|
|
1621
|
+
L.width ? E += parseInt(L.width, 10) || 0 : L.flex && I > 0 ? (y += I, c.push(L)) : r.push(L);
|
|
1617
1622
|
});
|
|
1618
|
-
const
|
|
1623
|
+
const $ = v - E, N = "80";
|
|
1619
1624
|
let W = [...s];
|
|
1620
|
-
if (
|
|
1621
|
-
if (
|
|
1622
|
-
const
|
|
1625
|
+
if ($ > 0) {
|
|
1626
|
+
if (c.length > 0) {
|
|
1627
|
+
const L = $ / y;
|
|
1623
1628
|
W = s.map((I) => {
|
|
1624
1629
|
const X = Number(I.flex);
|
|
1625
1630
|
if (X && X > 0) {
|
|
1626
|
-
const O = parseInt(I.minWidth || N, 10), K = X *
|
|
1631
|
+
const O = parseInt(I.minWidth || N, 10), K = X * L, te = Math.max(K, O);
|
|
1627
1632
|
return { ...I, width: `${Math.floor(te)}px` };
|
|
1628
1633
|
}
|
|
1629
1634
|
return !I.width && !X ? {
|
|
@@ -1632,35 +1637,35 @@ function jo({
|
|
|
1632
1637
|
} : I;
|
|
1633
1638
|
});
|
|
1634
1639
|
} else if (r.length > 0) {
|
|
1635
|
-
const
|
|
1640
|
+
const L = $ / r.length;
|
|
1636
1641
|
W = s.map((I) => {
|
|
1637
1642
|
const X = Number(I.flex);
|
|
1638
1643
|
if (!I.width && !X) {
|
|
1639
|
-
const O = parseInt(I.minWidth || N, 10), K = Math.max(
|
|
1644
|
+
const O = parseInt(I.minWidth || N, 10), K = Math.max(L, O);
|
|
1640
1645
|
return { ...I, width: `${Math.floor(K)}px` };
|
|
1641
1646
|
}
|
|
1642
1647
|
return I;
|
|
1643
1648
|
});
|
|
1644
1649
|
}
|
|
1645
1650
|
} else
|
|
1646
|
-
W = s.map((
|
|
1651
|
+
W = s.map((L) => L.width ? L : { ...L, width: L.minWidth || `${N}px` });
|
|
1647
1652
|
J(W);
|
|
1648
1653
|
};
|
|
1649
|
-
|
|
1650
|
-
const
|
|
1651
|
-
return
|
|
1654
|
+
x();
|
|
1655
|
+
const w = new ResizeObserver(x);
|
|
1656
|
+
return w.observe(H.current), () => w.disconnect();
|
|
1652
1657
|
}, [s]), Z(() => {
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1658
|
+
const x = (w) => {
|
|
1659
|
+
M.current && !M.current.contains(w.target) && k(null);
|
|
1655
1660
|
};
|
|
1656
|
-
return document.addEventListener("mousedown",
|
|
1657
|
-
document.removeEventListener("mousedown",
|
|
1661
|
+
return document.addEventListener("mousedown", x), () => {
|
|
1662
|
+
document.removeEventListener("mousedown", x);
|
|
1658
1663
|
};
|
|
1659
1664
|
}, []);
|
|
1660
1665
|
const A = Q(() => z ? z.some(
|
|
1661
|
-
(
|
|
1666
|
+
(x) => x.mergeHeaderId && x.mergeHeaderLabel
|
|
1662
1667
|
) : !1, [z]), T = Q(() => {
|
|
1663
|
-
var
|
|
1668
|
+
var E, y;
|
|
1664
1669
|
if (h || !z || z.length === 0)
|
|
1665
1670
|
return null;
|
|
1666
1671
|
if (!A)
|
|
@@ -1670,58 +1675,58 @@ function jo({
|
|
|
1670
1675
|
isHeader: !0,
|
|
1671
1676
|
size: i,
|
|
1672
1677
|
numRows: 1,
|
|
1673
|
-
borderRadius:
|
|
1674
|
-
children: z.map((
|
|
1678
|
+
borderRadius: u,
|
|
1679
|
+
children: z.map((c) => {
|
|
1675
1680
|
var r;
|
|
1676
1681
|
return /* @__PURE__ */ n.jsx(
|
|
1677
1682
|
oe,
|
|
1678
1683
|
{
|
|
1679
|
-
width:
|
|
1680
|
-
minWidth:
|
|
1681
|
-
maxWidth:
|
|
1682
|
-
horizontalAlign:
|
|
1684
|
+
width: c.width,
|
|
1685
|
+
minWidth: c.minWidth,
|
|
1686
|
+
maxWidth: c.maxWidth,
|
|
1687
|
+
horizontalAlign: c.horizontalAlign,
|
|
1683
1688
|
size: i,
|
|
1684
|
-
columnsTextSize:
|
|
1685
|
-
withBorder:
|
|
1686
|
-
headerAlign:
|
|
1687
|
-
children: ((r =
|
|
1689
|
+
columnsTextSize: g,
|
|
1690
|
+
withBorder: b,
|
|
1691
|
+
headerAlign: c.headerAlign,
|
|
1692
|
+
children: ((r = c.columnRender) == null ? void 0 : r.call(c, m)) || /* @__PURE__ */ n.jsx("span", { title: c.label, children: c.label })
|
|
1688
1693
|
},
|
|
1689
|
-
|
|
1694
|
+
c.dataIndex
|
|
1690
1695
|
);
|
|
1691
1696
|
})
|
|
1692
1697
|
}
|
|
1693
1698
|
);
|
|
1694
|
-
const
|
|
1699
|
+
const x = [], w = [];
|
|
1695
1700
|
let v = 0;
|
|
1696
1701
|
for (; v < z.length; ) {
|
|
1697
|
-
const
|
|
1698
|
-
if (
|
|
1702
|
+
const c = z[v];
|
|
1703
|
+
if (c.mergeHeaderId && c.mergeHeaderLabel) {
|
|
1699
1704
|
let r = 0;
|
|
1700
|
-
const
|
|
1701
|
-
for (let N = v; N < z.length && z[N].mergeHeaderId ===
|
|
1705
|
+
const $ = c.mergeHeaderId;
|
|
1706
|
+
for (let N = v; N < z.length && z[N].mergeHeaderId === $; N++)
|
|
1702
1707
|
r++;
|
|
1703
|
-
|
|
1708
|
+
x.push(
|
|
1704
1709
|
/* @__PURE__ */ n.jsx(
|
|
1705
1710
|
oe,
|
|
1706
1711
|
{
|
|
1707
1712
|
colSpan: r,
|
|
1708
1713
|
horizontalAlign: "center",
|
|
1709
1714
|
size: i,
|
|
1710
|
-
columnsTextSize:
|
|
1711
|
-
withBorder:
|
|
1712
|
-
width:
|
|
1713
|
-
minWidth:
|
|
1714
|
-
maxWidth:
|
|
1715
|
-
headerAlign:
|
|
1715
|
+
columnsTextSize: g,
|
|
1716
|
+
withBorder: b,
|
|
1717
|
+
width: c.width,
|
|
1718
|
+
minWidth: c.minWidth,
|
|
1719
|
+
maxWidth: c.maxWidth,
|
|
1720
|
+
headerAlign: c.headerAlign,
|
|
1716
1721
|
isTopRow: !0,
|
|
1717
|
-
children: /* @__PURE__ */ n.jsx("span", { title:
|
|
1722
|
+
children: /* @__PURE__ */ n.jsx("span", { title: c.mergeHeaderLabel, children: c.mergeHeaderLabel })
|
|
1718
1723
|
},
|
|
1719
|
-
`${
|
|
1724
|
+
`${c.mergeHeaderId}-merged`
|
|
1720
1725
|
)
|
|
1721
1726
|
);
|
|
1722
1727
|
for (let N = 0; N < r; N++) {
|
|
1723
1728
|
const W = z[v + N];
|
|
1724
|
-
|
|
1729
|
+
w.push(
|
|
1725
1730
|
/* @__PURE__ */ n.jsx(
|
|
1726
1731
|
oe,
|
|
1727
1732
|
{
|
|
@@ -1730,10 +1735,10 @@ function jo({
|
|
|
1730
1735
|
maxWidth: W.maxWidth,
|
|
1731
1736
|
horizontalAlign: W.horizontalAlign,
|
|
1732
1737
|
size: i,
|
|
1733
|
-
columnsTextSize:
|
|
1734
|
-
withBorder:
|
|
1735
|
-
headerAlign:
|
|
1736
|
-
children: ((
|
|
1738
|
+
columnsTextSize: g,
|
|
1739
|
+
withBorder: b,
|
|
1740
|
+
headerAlign: c.headerAlign,
|
|
1741
|
+
children: ((E = W.columnRender) == null ? void 0 : E.call(W, m)) || /* @__PURE__ */ n.jsx("span", { title: W.label, children: W.label })
|
|
1737
1742
|
},
|
|
1738
1743
|
W.dataIndex + "-individual"
|
|
1739
1744
|
)
|
|
@@ -1741,23 +1746,23 @@ function jo({
|
|
|
1741
1746
|
}
|
|
1742
1747
|
v += r;
|
|
1743
1748
|
} else
|
|
1744
|
-
|
|
1749
|
+
x.push(
|
|
1745
1750
|
/* @__PURE__ */ n.jsx(
|
|
1746
1751
|
oe,
|
|
1747
1752
|
{
|
|
1748
1753
|
rowSpan: 2,
|
|
1749
|
-
width:
|
|
1750
|
-
minWidth:
|
|
1751
|
-
maxWidth:
|
|
1752
|
-
horizontalAlign:
|
|
1754
|
+
width: c.width,
|
|
1755
|
+
minWidth: c.minWidth,
|
|
1756
|
+
maxWidth: c.maxWidth,
|
|
1757
|
+
horizontalAlign: c.horizontalAlign,
|
|
1753
1758
|
size: i,
|
|
1754
|
-
columnsTextSize:
|
|
1755
|
-
withBorder:
|
|
1756
|
-
headerAlign:
|
|
1759
|
+
columnsTextSize: g,
|
|
1760
|
+
withBorder: b,
|
|
1761
|
+
headerAlign: c.headerAlign,
|
|
1757
1762
|
isTopRow: !0,
|
|
1758
|
-
children: ((
|
|
1763
|
+
children: ((y = c.columnRender) == null ? void 0 : y.call(c, m)) || /* @__PURE__ */ n.jsx("span", { title: c.label, children: c.label })
|
|
1759
1764
|
},
|
|
1760
|
-
|
|
1765
|
+
c.dataIndex
|
|
1761
1766
|
)
|
|
1762
1767
|
), v++;
|
|
1763
1768
|
}
|
|
@@ -1768,103 +1773,103 @@ function jo({
|
|
|
1768
1773
|
isHeader: !0,
|
|
1769
1774
|
size: i,
|
|
1770
1775
|
numRows: 2,
|
|
1771
|
-
borderRadius:
|
|
1772
|
-
children:
|
|
1776
|
+
borderRadius: u,
|
|
1777
|
+
children: x
|
|
1773
1778
|
}
|
|
1774
1779
|
),
|
|
1775
|
-
|
|
1780
|
+
w.length > 0 && /* @__PURE__ */ n.jsx(
|
|
1776
1781
|
ee,
|
|
1777
1782
|
{
|
|
1778
1783
|
isHeader: !0,
|
|
1779
1784
|
size: i,
|
|
1780
1785
|
numRows: 2,
|
|
1781
|
-
borderRadius:
|
|
1782
|
-
children:
|
|
1786
|
+
borderRadius: u,
|
|
1787
|
+
children: w
|
|
1783
1788
|
}
|
|
1784
1789
|
)
|
|
1785
1790
|
] });
|
|
1786
|
-
}, [z, h, i,
|
|
1787
|
-
return !
|
|
1791
|
+
}, [z, h, i, g, A]);
|
|
1792
|
+
return !m || m.length === 0 ? /* @__PURE__ */ n.jsx(
|
|
1788
1793
|
he,
|
|
1789
1794
|
{
|
|
1790
1795
|
backgroundColor: o.colors.backgroundColors.colorBackgroundSnow,
|
|
1791
1796
|
borders: !0,
|
|
1792
1797
|
mode: "table",
|
|
1793
|
-
...
|
|
1798
|
+
...p
|
|
1794
1799
|
}
|
|
1795
1800
|
) : /* @__PURE__ */ n.jsx(
|
|
1796
1801
|
fo,
|
|
1797
1802
|
{
|
|
1798
1803
|
maxHeight: d,
|
|
1799
|
-
withBorderRadius:
|
|
1800
|
-
ref:
|
|
1801
|
-
borderRadius:
|
|
1802
|
-
children: /* @__PURE__ */ n.jsxs(ho, { id: e, ref:
|
|
1804
|
+
withBorderRadius: B,
|
|
1805
|
+
ref: H,
|
|
1806
|
+
borderRadius: u,
|
|
1807
|
+
children: /* @__PURE__ */ n.jsxs(ho, { id: e, ref: M, children: [
|
|
1803
1808
|
/* @__PURE__ */ n.jsx("thead", { children: T }),
|
|
1804
|
-
/* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children:
|
|
1805
|
-
const
|
|
1809
|
+
/* @__PURE__ */ n.jsx("tbody", { style: { width: "100%" }, children: m == null ? void 0 : m.map((x, w, v) => {
|
|
1810
|
+
const E = S(x);
|
|
1806
1811
|
return /* @__PURE__ */ n.jsx(
|
|
1807
1812
|
ee,
|
|
1808
1813
|
{
|
|
1809
|
-
isLast:
|
|
1814
|
+
isLast: w === v.length - 1,
|
|
1810
1815
|
fit: a,
|
|
1811
1816
|
size: i,
|
|
1812
|
-
withBorder:
|
|
1813
|
-
isSelected:
|
|
1814
|
-
striped:
|
|
1815
|
-
borderRadius:
|
|
1816
|
-
children: z.map((
|
|
1817
|
-
var
|
|
1817
|
+
withBorder: b,
|
|
1818
|
+
isSelected: E === R && f,
|
|
1819
|
+
striped: j && w % 2 !== 0,
|
|
1820
|
+
borderRadius: u,
|
|
1821
|
+
children: z.map((y) => {
|
|
1822
|
+
var c, r, $;
|
|
1818
1823
|
return /* @__PURE__ */ n.jsx(
|
|
1819
1824
|
mo,
|
|
1820
1825
|
{
|
|
1821
|
-
width:
|
|
1822
|
-
minWidth:
|
|
1823
|
-
maxWidth:
|
|
1826
|
+
width: y.width,
|
|
1827
|
+
minWidth: y.minWidth,
|
|
1828
|
+
maxWidth: y.maxWidth,
|
|
1824
1829
|
size: i,
|
|
1825
1830
|
isClickable: G(l),
|
|
1826
1831
|
onClick: () => {
|
|
1827
|
-
l && l(
|
|
1828
|
-
|
|
1832
|
+
l && l(x, y, w), f && k(
|
|
1833
|
+
R === E ? null : E
|
|
1829
1834
|
);
|
|
1830
1835
|
},
|
|
1831
|
-
horizontalAlign:
|
|
1832
|
-
verticalAlign:
|
|
1833
|
-
rowPadding:
|
|
1834
|
-
withBorder:
|
|
1835
|
-
isLast:
|
|
1836
|
-
backgroundColor: (
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
b,
|
|
1836
|
+
horizontalAlign: y.horizontalAlign,
|
|
1837
|
+
verticalAlign: y.verticalAlign,
|
|
1838
|
+
rowPadding: y.rowPadding,
|
|
1839
|
+
withBorder: b,
|
|
1840
|
+
isLast: w === v.length - 1,
|
|
1841
|
+
backgroundColor: (c = y.paint) == null ? void 0 : c.call(
|
|
1842
|
+
y,
|
|
1843
|
+
x[y.dataIndex],
|
|
1840
1844
|
x,
|
|
1845
|
+
w,
|
|
1841
1846
|
v
|
|
1842
1847
|
),
|
|
1843
|
-
children: ((r =
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
b,
|
|
1848
|
+
children: ((r = y.render) == null ? void 0 : r.call(
|
|
1849
|
+
y,
|
|
1850
|
+
x[y.dataIndex],
|
|
1847
1851
|
x,
|
|
1852
|
+
w,
|
|
1848
1853
|
v
|
|
1849
1854
|
)) || /* @__PURE__ */ n.jsx(
|
|
1850
1855
|
"span",
|
|
1851
1856
|
{
|
|
1852
|
-
title:
|
|
1857
|
+
title: x[y.dataIndex],
|
|
1853
1858
|
style: {
|
|
1854
1859
|
textOverflow: "ellipsis",
|
|
1855
1860
|
whiteSpace: "nowrap",
|
|
1856
1861
|
overflow: "hidden",
|
|
1857
|
-
...(
|
|
1862
|
+
...($ = y.rowCss) == null ? void 0 : $.call(y, x)
|
|
1858
1863
|
},
|
|
1859
|
-
children:
|
|
1864
|
+
children: x[y.dataIndex]
|
|
1860
1865
|
}
|
|
1861
1866
|
) || ""
|
|
1862
1867
|
},
|
|
1863
|
-
`${
|
|
1868
|
+
`${E}::${y.dataIndex}`
|
|
1864
1869
|
);
|
|
1865
1870
|
})
|
|
1866
1871
|
},
|
|
1867
|
-
|
|
1872
|
+
E
|
|
1868
1873
|
);
|
|
1869
1874
|
}) })
|
|
1870
1875
|
] })
|