prometeo-design-system 7.3.0 → 7.3.1
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/Button.es.js +35 -32
- package/dist/IconButton.es.js +32 -27
- package/dist/Select.es.js +127 -127
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/IconButton/IconButton.d.ts +2 -2
- package/package.json +1 -1
package/dist/Button.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as J, forwardRef as K, useMemo as O, createElement as P, isValidElement as Q } from "react";
|
|
3
3
|
import { c as V } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { c as g } from "./index-BOQuZ0gG.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import U from "./Spinner.es.js";
|
|
6
|
+
const W = (r) => Q(r), B = {
|
|
7
7
|
primary: "brand",
|
|
8
8
|
secondary: "neutral"
|
|
9
|
-
},
|
|
9
|
+
}, X = (r) => r in B, Y = (r) => X(r) ? B[r] : r, o = {
|
|
10
10
|
small: {
|
|
11
11
|
container: "h-8 px-3 py-1.5 spacing-x-2 radius-small",
|
|
12
12
|
icon: ""
|
|
@@ -156,7 +156,7 @@ const P = (r) => K(r), B = {
|
|
|
156
156
|
false: {
|
|
157
157
|
icon: ""
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, Z = g(f.icon, {
|
|
160
160
|
variants: {
|
|
161
161
|
size: {
|
|
162
162
|
small: `${n.small.icon} ${o.small.icon}`,
|
|
@@ -207,7 +207,7 @@ const P = (r) => K(r), B = {
|
|
|
207
207
|
color: "brand",
|
|
208
208
|
animateIcon: !0
|
|
209
209
|
}
|
|
210
|
-
}),
|
|
210
|
+
}), _ = g(f.container, {
|
|
211
211
|
variants: {
|
|
212
212
|
size: {
|
|
213
213
|
small: `${n.small.container} ${o.small.container}`,
|
|
@@ -304,36 +304,36 @@ const P = (r) => K(r), B = {
|
|
|
304
304
|
variant: "fill",
|
|
305
305
|
color: "brand"
|
|
306
306
|
}
|
|
307
|
-
}),
|
|
307
|
+
}), I = K(({
|
|
308
308
|
label: r,
|
|
309
|
-
onClick:
|
|
309
|
+
onClick: z,
|
|
310
310
|
icon: h,
|
|
311
|
-
contentClassName:
|
|
311
|
+
contentClassName: T,
|
|
312
312
|
loadingText: x = "Cargando...",
|
|
313
|
-
animate:
|
|
314
|
-
animateIcon:
|
|
313
|
+
animate: N = !1,
|
|
314
|
+
animateIcon: S = !1,
|
|
315
315
|
isLoading: d = !1,
|
|
316
316
|
children: s,
|
|
317
317
|
hideSpinner: y = !1,
|
|
318
318
|
spinner: b,
|
|
319
|
-
type:
|
|
320
|
-
className:
|
|
321
|
-
disabled:
|
|
319
|
+
type: E = "button",
|
|
320
|
+
className: M,
|
|
321
|
+
disabled: F,
|
|
322
322
|
variant: l = "fill",
|
|
323
|
-
form:
|
|
323
|
+
form: R,
|
|
324
324
|
size: t = "medium",
|
|
325
325
|
color: A = "brand",
|
|
326
326
|
...D
|
|
327
|
-
}) => {
|
|
328
|
-
const c = !!(
|
|
327
|
+
}, L) => {
|
|
328
|
+
const c = !!(F || d), w = S && !c, k = N && !c, i = c ? "disabled" : Y(A), v = typeof s == "string" ? s : r, p = typeof s != "string" ? s : void 0, q = O(() => {
|
|
329
329
|
if (d) {
|
|
330
|
-
const
|
|
330
|
+
const H = {
|
|
331
331
|
small: "small",
|
|
332
332
|
medium: "medium",
|
|
333
333
|
large: "medium"
|
|
334
334
|
};
|
|
335
335
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
336
|
-
!y && b ? b : /* @__PURE__ */ a.jsx(
|
|
336
|
+
!y && b ? b : /* @__PURE__ */ a.jsx(U, { size: H[t], variant: "clip", color: "brand" }),
|
|
337
337
|
/* @__PURE__ */ a.jsx(
|
|
338
338
|
"span",
|
|
339
339
|
{
|
|
@@ -354,18 +354,18 @@ const P = (r) => K(r), B = {
|
|
|
354
354
|
return p;
|
|
355
355
|
const u = h;
|
|
356
356
|
let m = null;
|
|
357
|
-
const
|
|
357
|
+
const G = {
|
|
358
358
|
small: 20,
|
|
359
359
|
medium: 24,
|
|
360
360
|
large: 24
|
|
361
361
|
};
|
|
362
|
-
return u && (m =
|
|
363
|
-
size:
|
|
362
|
+
return u && (m = W(u) ? u : P(u, {
|
|
363
|
+
size: G[t]
|
|
364
364
|
})), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
365
365
|
m && /* @__PURE__ */ a.jsx(
|
|
366
366
|
"span",
|
|
367
367
|
{
|
|
368
|
-
className:
|
|
368
|
+
className: Z({
|
|
369
369
|
size: t,
|
|
370
370
|
variant: l,
|
|
371
371
|
color: i,
|
|
@@ -402,25 +402,28 @@ const P = (r) => K(r), B = {
|
|
|
402
402
|
return /* @__PURE__ */ a.jsx(
|
|
403
403
|
"button",
|
|
404
404
|
{
|
|
405
|
-
|
|
405
|
+
ref: L,
|
|
406
|
+
type: E,
|
|
406
407
|
className: V(
|
|
407
408
|
"group",
|
|
408
|
-
|
|
409
|
+
_({
|
|
409
410
|
size: t,
|
|
410
411
|
variant: l,
|
|
411
412
|
color: i,
|
|
412
|
-
animation:
|
|
413
|
+
animation: k
|
|
413
414
|
}),
|
|
414
|
-
|
|
415
|
+
M
|
|
415
416
|
),
|
|
416
417
|
disabled: c,
|
|
417
|
-
form:
|
|
418
|
-
onClick:
|
|
418
|
+
form: R,
|
|
419
|
+
onClick: z,
|
|
419
420
|
...D,
|
|
420
|
-
children:
|
|
421
|
+
children: q
|
|
421
422
|
}
|
|
422
423
|
);
|
|
423
|
-
}
|
|
424
|
+
});
|
|
425
|
+
I.displayName = "Button";
|
|
426
|
+
const oe = J(I);
|
|
424
427
|
export {
|
|
425
|
-
|
|
428
|
+
oe as default
|
|
426
429
|
};
|
package/dist/IconButton.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as F, forwardRef as G, useMemo as H, isValidElement as I } from "react";
|
|
3
3
|
import { i as m } from "./iconUtils-rTOfKDxE.js";
|
|
4
|
-
import
|
|
4
|
+
import J from "./Spinner.es.js";
|
|
5
5
|
import { c as x } from "./index-BOQuZ0gG.js";
|
|
6
6
|
import { c as h } from "./cn-B6yFEsav.js";
|
|
7
7
|
const u = {
|
|
@@ -117,21 +117,21 @@ const u = {
|
|
|
117
117
|
}, w = {
|
|
118
118
|
container: "flex justify-center items-center gap-1 w-max bg-transparent cursor-pointer transition-all ease-in-out duration-300 relative",
|
|
119
119
|
icon: "w-max transition-all ease-in-out duration-300 flex justify-center items-center overflow-hidden"
|
|
120
|
-
},
|
|
120
|
+
}, V = {
|
|
121
121
|
true: {
|
|
122
122
|
container: "hover:scale-105 active:scale-95 disabled:scale-100"
|
|
123
123
|
},
|
|
124
124
|
false: {
|
|
125
125
|
container: ""
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, N = {
|
|
128
128
|
true: {
|
|
129
129
|
icon: "group-hover:rotate-90 group-active:rotate-0 group-disabled:rotate-0"
|
|
130
130
|
},
|
|
131
131
|
false: {
|
|
132
132
|
icon: ""
|
|
133
133
|
}
|
|
134
|
-
},
|
|
134
|
+
}, K = x(w.container, {
|
|
135
135
|
variants: {
|
|
136
136
|
size: {
|
|
137
137
|
small: `${y.small.container} ${u.small.container}`,
|
|
@@ -147,7 +147,7 @@ const u = {
|
|
|
147
147
|
size: "medium",
|
|
148
148
|
disabled: !1
|
|
149
149
|
}
|
|
150
|
-
}),
|
|
150
|
+
}), O = x(w.container, {
|
|
151
151
|
variants: {
|
|
152
152
|
size: {
|
|
153
153
|
small: "radius-small",
|
|
@@ -167,8 +167,8 @@ const u = {
|
|
|
167
167
|
warning: ""
|
|
168
168
|
},
|
|
169
169
|
animation: {
|
|
170
|
-
true:
|
|
171
|
-
false:
|
|
170
|
+
true: V.true.container,
|
|
171
|
+
false: V.false.container
|
|
172
172
|
},
|
|
173
173
|
disabled: {
|
|
174
174
|
true: "cursor-default!",
|
|
@@ -221,8 +221,8 @@ const u = {
|
|
|
221
221
|
warning: ""
|
|
222
222
|
},
|
|
223
223
|
animateIcon: {
|
|
224
|
-
true:
|
|
225
|
-
false:
|
|
224
|
+
true: N.true.icon,
|
|
225
|
+
false: N.false.icon
|
|
226
226
|
},
|
|
227
227
|
disabled: {
|
|
228
228
|
true: "",
|
|
@@ -256,34 +256,35 @@ const u = {
|
|
|
256
256
|
animateIcon: !0,
|
|
257
257
|
disabled: !1
|
|
258
258
|
}
|
|
259
|
-
}),
|
|
259
|
+
}), $ = G(({
|
|
260
260
|
onClick: z,
|
|
261
261
|
icon: b,
|
|
262
262
|
contentClassName: p,
|
|
263
|
-
animate:
|
|
264
|
-
animateIcon:
|
|
263
|
+
animate: S = !1,
|
|
264
|
+
animateIcon: B = !1,
|
|
265
265
|
isLoading: f = !1,
|
|
266
266
|
children: r,
|
|
267
267
|
hideSpinner: j = !1,
|
|
268
268
|
spinner: g,
|
|
269
|
-
type:
|
|
269
|
+
type: R = "button",
|
|
270
270
|
className: E,
|
|
271
271
|
disabled: i,
|
|
272
272
|
variant: s = "fill",
|
|
273
273
|
form: M,
|
|
274
274
|
size: o = "medium",
|
|
275
|
-
color:
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
color: A = "brand",
|
|
276
|
+
...C
|
|
277
|
+
}, D) => {
|
|
278
|
+
const l = !!(i || f), d = !!(B && !l), T = !!(S && !l), c = A, k = {
|
|
278
279
|
small: "small",
|
|
279
280
|
medium: "medium",
|
|
280
281
|
large: "medium"
|
|
281
|
-
},
|
|
282
|
+
}, q = H(() => {
|
|
282
283
|
if (f)
|
|
283
|
-
return /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center", children: !j && (g || /* @__PURE__ */ n.jsx(
|
|
284
|
+
return /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center", children: !j && (g || /* @__PURE__ */ n.jsx(J, { size: k[o], color: "brand" })) });
|
|
284
285
|
let a = null;
|
|
285
286
|
if (r)
|
|
286
|
-
if (
|
|
287
|
+
if (I(r))
|
|
287
288
|
m(r.type) ? a = /* @__PURE__ */ n.jsx(
|
|
288
289
|
"span",
|
|
289
290
|
{
|
|
@@ -300,7 +301,7 @@ const u = {
|
|
|
300
301
|
else if (typeof r == "function")
|
|
301
302
|
try {
|
|
302
303
|
const t = r();
|
|
303
|
-
|
|
304
|
+
I(t) && (m(t.type) ? a = /* @__PURE__ */ n.jsx(
|
|
304
305
|
"span",
|
|
305
306
|
{
|
|
306
307
|
className: v({
|
|
@@ -362,10 +363,11 @@ const u = {
|
|
|
362
363
|
return /* @__PURE__ */ n.jsx(
|
|
363
364
|
"button",
|
|
364
365
|
{
|
|
365
|
-
|
|
366
|
+
ref: D,
|
|
367
|
+
type: R,
|
|
366
368
|
className: h(
|
|
367
369
|
"group",
|
|
368
|
-
|
|
370
|
+
K({
|
|
369
371
|
size: o,
|
|
370
372
|
disabled: l
|
|
371
373
|
}),
|
|
@@ -374,16 +376,19 @@ const u = {
|
|
|
374
376
|
disabled: l,
|
|
375
377
|
form: M,
|
|
376
378
|
onClick: z,
|
|
379
|
+
...C,
|
|
377
380
|
children: /* @__PURE__ */ n.jsx("div", { className: h(
|
|
378
381
|
"flex items-center gap-1",
|
|
379
382
|
l && "pointer-events-none",
|
|
380
|
-
|
|
383
|
+
O({ size: o, variant: s, color: c, animation: T, disabled: l }),
|
|
381
384
|
"w-full h-full grid place-items-center",
|
|
382
385
|
p
|
|
383
|
-
), children:
|
|
386
|
+
), children: q })
|
|
384
387
|
}
|
|
385
388
|
);
|
|
386
|
-
}
|
|
389
|
+
});
|
|
390
|
+
$.displayName = "IconButton";
|
|
391
|
+
const Z = F($);
|
|
387
392
|
export {
|
|
388
|
-
|
|
393
|
+
Z as default
|
|
389
394
|
};
|
package/dist/Select.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { u as Fe } from "./useDevice-S7cYqLVh.js";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as L } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { g as S, h as we } from "./utils-X4-h3cum.js";
|
|
5
|
-
import { memo as ge, forwardRef as
|
|
5
|
+
import { memo as ge, forwardRef as Ie, useCallback as j, useMemo as Z, useRef as J, useState as Oe, useEffect as se, useLayoutEffect as Ue } from "react";
|
|
6
6
|
import de, { useMenuControl as $e, useMenuState as We } from "./Menu.es.js";
|
|
7
7
|
import Te from "./Input.es.js";
|
|
8
8
|
import Ne from "./MenuList.es.js";
|
|
@@ -90,7 +90,7 @@ function tt(t) {
|
|
|
90
90
|
function ae(t, e) {
|
|
91
91
|
return e ? S(t, e) !== !1 : !0;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function re(t, e, n) {
|
|
94
94
|
const r = S(t, n);
|
|
95
95
|
return {
|
|
96
96
|
id: r,
|
|
@@ -99,7 +99,7 @@ function te(t, e, n) {
|
|
|
99
99
|
originalOption: t
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
const rt =
|
|
102
|
+
const rt = Ie(
|
|
103
103
|
function({ value: e, onChange: n, onClear: r, onKeyDown: a, placeholder: c, ...s }, l) {
|
|
104
104
|
return /* @__PURE__ */ o.jsx(
|
|
105
105
|
Te,
|
|
@@ -140,15 +140,15 @@ function Ee({
|
|
|
140
140
|
closeDropdown: D,
|
|
141
141
|
createOptionKeyHandler: i
|
|
142
142
|
}) {
|
|
143
|
-
const d = S(t, n), G = S(t, e), p = a.has(d),
|
|
144
|
-
|
|
145
|
-
}, K =
|
|
143
|
+
const d = S(t, n), G = S(t, e), p = a.has(d), O = ae(t, r), T = () => {
|
|
144
|
+
O && u(d);
|
|
145
|
+
}, K = Z(
|
|
146
146
|
() => i(d),
|
|
147
147
|
[i, d]
|
|
148
148
|
), A = {
|
|
149
149
|
role: "option",
|
|
150
150
|
"aria-selected": p,
|
|
151
|
-
"aria-disabled": !
|
|
151
|
+
"aria-disabled": !O,
|
|
152
152
|
"data-option-value": d,
|
|
153
153
|
tabIndex: -1,
|
|
154
154
|
onKeyDown: K,
|
|
@@ -162,12 +162,12 @@ function Ee({
|
|
|
162
162
|
{
|
|
163
163
|
option: t,
|
|
164
164
|
isSelected: p,
|
|
165
|
-
onSelect: (
|
|
166
|
-
u(d),
|
|
165
|
+
onSelect: (I) => {
|
|
166
|
+
u(d), I && D();
|
|
167
167
|
},
|
|
168
168
|
multiple: c,
|
|
169
169
|
disabled: s,
|
|
170
|
-
isOptionActive:
|
|
170
|
+
isOptionActive: O,
|
|
171
171
|
isLoading: !1,
|
|
172
172
|
renderContext: w
|
|
173
173
|
}
|
|
@@ -180,7 +180,7 @@ function Ee({
|
|
|
180
180
|
isSelected: p,
|
|
181
181
|
multiple: c,
|
|
182
182
|
disabled: s,
|
|
183
|
-
isOptionActive:
|
|
183
|
+
isOptionActive: O,
|
|
184
184
|
size: l
|
|
185
185
|
}
|
|
186
186
|
) });
|
|
@@ -237,12 +237,12 @@ function at({
|
|
|
237
237
|
onSelect: d,
|
|
238
238
|
onSelectGroup: G,
|
|
239
239
|
closeDropdown: p,
|
|
240
|
-
createOptionKeyHandler:
|
|
240
|
+
createOptionKeyHandler: O,
|
|
241
241
|
navigateNext: T,
|
|
242
242
|
navigatePrev: K,
|
|
243
243
|
hasActiveSearch: A
|
|
244
244
|
}) {
|
|
245
|
-
const k = S(t, r),
|
|
245
|
+
const k = S(t, r), I = S(t, n), z = w?.enableGroupToggle !== !1, $ = e.filter(
|
|
246
246
|
(R) => ae(R, a)
|
|
247
247
|
), H = $.filter(
|
|
248
248
|
(R) => c.has(S(R, r))
|
|
@@ -264,7 +264,7 @@ function at({
|
|
|
264
264
|
y,
|
|
265
265
|
{
|
|
266
266
|
group: t,
|
|
267
|
-
label:
|
|
267
|
+
label: I,
|
|
268
268
|
groupOptions: e,
|
|
269
269
|
groupSelectedIds: H.map(
|
|
270
270
|
(f) => S(f, r)
|
|
@@ -289,7 +289,7 @@ function at({
|
|
|
289
289
|
m = /* @__PURE__ */ o.jsx(
|
|
290
290
|
Le,
|
|
291
291
|
{
|
|
292
|
-
label:
|
|
292
|
+
label: I,
|
|
293
293
|
expanded: h,
|
|
294
294
|
onToggle: g,
|
|
295
295
|
onSelectGroup: P,
|
|
@@ -333,7 +333,7 @@ function at({
|
|
|
333
333
|
renderOptionContext: i,
|
|
334
334
|
onSelect: d,
|
|
335
335
|
closeDropdown: p,
|
|
336
|
-
createOptionKeyHandler:
|
|
336
|
+
createOptionKeyHandler: O
|
|
337
337
|
},
|
|
338
338
|
S(R, r)
|
|
339
339
|
))
|
|
@@ -389,12 +389,12 @@ function it({
|
|
|
389
389
|
renderOptionContext: d,
|
|
390
390
|
onSelect: G,
|
|
391
391
|
onSelectGroup: p,
|
|
392
|
-
closeDropdown:
|
|
392
|
+
closeDropdown: O,
|
|
393
393
|
searchValue: T,
|
|
394
394
|
onSearchChange: K,
|
|
395
395
|
onSearchClear: A,
|
|
396
396
|
searchInputRef: k,
|
|
397
|
-
dropdownOptions:
|
|
397
|
+
dropdownOptions: I,
|
|
398
398
|
onSearchKeyDown: z,
|
|
399
399
|
createOptionKeyHandler: $,
|
|
400
400
|
navigateNext: H,
|
|
@@ -425,34 +425,34 @@ function it({
|
|
|
425
425
|
snapPoints: r === "drawer" ? ["60%", "90%"] : void 0,
|
|
426
426
|
className: C,
|
|
427
427
|
children: [
|
|
428
|
-
!
|
|
428
|
+
!I?.hideSearchBar && /* @__PURE__ */ o.jsx(de.Header, { className: L(r === "drawer" && "px-3"), children: /* @__PURE__ */ o.jsx(
|
|
429
429
|
rt,
|
|
430
430
|
{
|
|
431
431
|
ref: k,
|
|
432
432
|
value: T,
|
|
433
433
|
onClear: A,
|
|
434
434
|
onKeyDown: z,
|
|
435
|
-
placeholder:
|
|
436
|
-
...
|
|
435
|
+
placeholder: I?.searchPlaceholder ?? "Buscar opciones",
|
|
436
|
+
...I?.inputProps,
|
|
437
437
|
onChange: K
|
|
438
438
|
}
|
|
439
439
|
) }),
|
|
440
|
-
/* @__PURE__ */ o.jsx(de.Content, { className:
|
|
440
|
+
/* @__PURE__ */ o.jsx(de.Content, { className: L(r === "drawer" && "flex flex-col px-3"), children: /* @__PURE__ */ o.jsx(
|
|
441
441
|
"div",
|
|
442
442
|
{
|
|
443
443
|
ref: W,
|
|
444
444
|
role: "listbox",
|
|
445
445
|
"aria-label": m,
|
|
446
446
|
"aria-multiselectable": u,
|
|
447
|
-
className:
|
|
447
|
+
className: L(
|
|
448
448
|
"overflow-y-auto w-full",
|
|
449
449
|
r === "drawer" && "min-h-0 flex-1",
|
|
450
|
-
|
|
450
|
+
I?.optionContainerClassName
|
|
451
451
|
),
|
|
452
452
|
style: r === "drawer" ? void 0 : {
|
|
453
|
-
maxHeight:
|
|
453
|
+
maxHeight: I?.dropdownHeight ?? "min(320px, 60vh)"
|
|
454
454
|
},
|
|
455
|
-
children: F ? /* @__PURE__ */ o.jsx(ct, { loadingComponent:
|
|
455
|
+
children: F ? /* @__PURE__ */ o.jsx(ct, { loadingComponent: I?.loadingComponent }) : /* @__PURE__ */ o.jsx(
|
|
456
456
|
ot,
|
|
457
457
|
{
|
|
458
458
|
filteredOptions: c,
|
|
@@ -464,13 +464,13 @@ function it({
|
|
|
464
464
|
multiple: u,
|
|
465
465
|
disabled: h,
|
|
466
466
|
size: g,
|
|
467
|
-
dropdownOptions:
|
|
467
|
+
dropdownOptions: I,
|
|
468
468
|
renderOption: D,
|
|
469
469
|
renderOptionGroupHeader: i,
|
|
470
470
|
renderOptionContext: d,
|
|
471
471
|
onSelect: G,
|
|
472
472
|
onSelectGroup: p,
|
|
473
|
-
closeDropdown:
|
|
473
|
+
closeDropdown: O,
|
|
474
474
|
createOptionKeyHandler: $,
|
|
475
475
|
navigateNext: H,
|
|
476
476
|
navigatePrev: P,
|
|
@@ -479,7 +479,7 @@ function it({
|
|
|
479
479
|
)
|
|
480
480
|
}
|
|
481
481
|
) }),
|
|
482
|
-
|
|
482
|
+
I?.footer && /* @__PURE__ */ o.jsx(de.Footer, { children: I.footer })
|
|
483
483
|
]
|
|
484
484
|
}
|
|
485
485
|
);
|
|
@@ -501,7 +501,7 @@ const lt = ge(function({
|
|
|
501
501
|
] }) : /* @__PURE__ */ o.jsx(
|
|
502
502
|
"div",
|
|
503
503
|
{
|
|
504
|
-
className:
|
|
504
|
+
className: L(
|
|
505
505
|
"flex gap-1",
|
|
506
506
|
a === "wrap" ? "flex-wrap" : "flex-nowrap"
|
|
507
507
|
),
|
|
@@ -545,7 +545,7 @@ function ft({
|
|
|
545
545
|
return /* @__PURE__ */ o.jsx(
|
|
546
546
|
Ze,
|
|
547
547
|
{
|
|
548
|
-
className:
|
|
548
|
+
className: L(
|
|
549
549
|
"transition-transform duration-200 shrink-0",
|
|
550
550
|
t && "rotate-180",
|
|
551
551
|
e ? "text-neutral-disabled" : "text-neutral-secondary-default"
|
|
@@ -553,7 +553,7 @@ function ft({
|
|
|
553
553
|
}
|
|
554
554
|
);
|
|
555
555
|
}
|
|
556
|
-
const dt =
|
|
556
|
+
const dt = Ie(function({
|
|
557
557
|
label: e,
|
|
558
558
|
size: n,
|
|
559
559
|
variant: r,
|
|
@@ -569,12 +569,12 @@ const dt = Oe(function({
|
|
|
569
569
|
optionValue: d,
|
|
570
570
|
renderSelection: G,
|
|
571
571
|
onRemoveOption: p,
|
|
572
|
-
onRemoveGroup:
|
|
572
|
+
onRemoveGroup: O,
|
|
573
573
|
onClear: T,
|
|
574
574
|
onClick: K,
|
|
575
575
|
onFocus: A,
|
|
576
576
|
isOpen: k,
|
|
577
|
-
onKeyDown:
|
|
577
|
+
onKeyDown: I,
|
|
578
578
|
className: z,
|
|
579
579
|
containerClassName: $,
|
|
580
580
|
buttonClassName: H,
|
|
@@ -615,7 +615,7 @@ const dt = Oe(function({
|
|
|
615
615
|
}
|
|
616
616
|
);
|
|
617
617
|
}
|
|
618
|
-
const
|
|
618
|
+
const Q = /* @__PURE__ */ o.jsx(
|
|
619
619
|
lt,
|
|
620
620
|
{
|
|
621
621
|
chipItems: b,
|
|
@@ -625,7 +625,7 @@ const dt = Oe(function({
|
|
|
625
625
|
disabled: E.disabled,
|
|
626
626
|
placeholder: s,
|
|
627
627
|
onRemoveOption: p,
|
|
628
|
-
onRemoveGroup:
|
|
628
|
+
onRemoveGroup: O,
|
|
629
629
|
resolveOptionId: (_) => S(_, d)
|
|
630
630
|
}
|
|
631
631
|
);
|
|
@@ -635,9 +635,9 @@ const dt = Oe(function({
|
|
|
635
635
|
ref: f,
|
|
636
636
|
...y,
|
|
637
637
|
className: "flex overflow-x-auto pyrion-scrollbar-none w-full",
|
|
638
|
-
children:
|
|
638
|
+
children: Q
|
|
639
639
|
}
|
|
640
|
-
) :
|
|
640
|
+
) : Q;
|
|
641
641
|
},
|
|
642
642
|
[
|
|
643
643
|
G,
|
|
@@ -653,7 +653,7 @@ const dt = Oe(function({
|
|
|
653
653
|
y,
|
|
654
654
|
f
|
|
655
655
|
]
|
|
656
|
-
),
|
|
656
|
+
), V = j(
|
|
657
657
|
(E) => /* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
658
658
|
c && /* @__PURE__ */ o.jsx(Xe, { size: "small", variant: "sync", className: "opacity-90" }),
|
|
659
659
|
T && l.length > 0 && /* @__PURE__ */ o.jsx(
|
|
@@ -664,8 +664,8 @@ const dt = Oe(function({
|
|
|
664
664
|
variant: "text",
|
|
665
665
|
color: "neutral",
|
|
666
666
|
tabIndex: -1,
|
|
667
|
-
onClick: (
|
|
668
|
-
|
|
667
|
+
onClick: (Q) => {
|
|
668
|
+
Q.stopPropagation(), T();
|
|
669
669
|
},
|
|
670
670
|
disabled: a,
|
|
671
671
|
"aria-label": "Clear selection"
|
|
@@ -687,8 +687,8 @@ const dt = Oe(function({
|
|
|
687
687
|
E.preventDefault(), a || K();
|
|
688
688
|
},
|
|
689
689
|
onFocus: A,
|
|
690
|
-
onKeyDown:
|
|
691
|
-
className:
|
|
690
|
+
onKeyDown: I,
|
|
691
|
+
className: L("w-full outline-none", $, H),
|
|
692
692
|
style: P ? { width: P } : W ? { height: W } : void 0,
|
|
693
693
|
children: /* @__PURE__ */ o.jsx(
|
|
694
694
|
Te,
|
|
@@ -701,9 +701,9 @@ const dt = Oe(function({
|
|
|
701
701
|
readOnly: !0,
|
|
702
702
|
hideClearButton: !0,
|
|
703
703
|
flexibleHeight: m,
|
|
704
|
-
className:
|
|
704
|
+
className: L(g?.className, z),
|
|
705
705
|
renderValue: B,
|
|
706
|
-
slotActions:
|
|
706
|
+
slotActions: V,
|
|
707
707
|
helperComponent: R,
|
|
708
708
|
errorComponent: h,
|
|
709
709
|
value: ""
|
|
@@ -744,7 +744,7 @@ function mt({
|
|
|
744
744
|
optionsContainerRef: n,
|
|
745
745
|
onSelect: r
|
|
746
746
|
}) {
|
|
747
|
-
const a =
|
|
747
|
+
const a = J(-1), c = j(
|
|
748
748
|
(i) => {
|
|
749
749
|
const d = n.current;
|
|
750
750
|
if (!d) return !1;
|
|
@@ -830,7 +830,7 @@ function St({
|
|
|
830
830
|
optionLabel: e,
|
|
831
831
|
dropdownOptions: n
|
|
832
832
|
}) {
|
|
833
|
-
const [r, a] =
|
|
833
|
+
const [r, a] = Oe(""), c = n?.controlledSearchValue != null, s = c ? n.controlledSearchValue : r, l = Z(
|
|
834
834
|
() => xt(t, s, e),
|
|
835
835
|
[t, s, e]
|
|
836
836
|
), b = j(
|
|
@@ -875,31 +875,31 @@ function vt({
|
|
|
875
875
|
onRemoveOption: D,
|
|
876
876
|
name: i
|
|
877
877
|
}) {
|
|
878
|
-
const d =
|
|
878
|
+
const d = J(
|
|
879
879
|
w
|
|
880
880
|
);
|
|
881
881
|
d.current = w;
|
|
882
|
-
const [G, p] =
|
|
882
|
+
const [G, p] = Oe(() => {
|
|
883
883
|
if (!r)
|
|
884
884
|
return n ?? (a ? [] : void 0);
|
|
885
|
-
}),
|
|
886
|
-
() => T.map((h) =>
|
|
885
|
+
}), O = r ? e : G, T = Z(() => Ae(t), [t]), K = Z(
|
|
886
|
+
() => T.map((h) => re(h, c, s)),
|
|
887
887
|
[T, c, s]
|
|
888
|
-
), A =
|
|
889
|
-
if (
|
|
890
|
-
const h = Array.isArray(
|
|
888
|
+
), A = Z(() => {
|
|
889
|
+
if (O == null || O === "") return [];
|
|
890
|
+
const h = Array.isArray(O) ? O : [O], g = new Map(
|
|
891
891
|
T.map((C) => [
|
|
892
892
|
S(C, s),
|
|
893
893
|
C
|
|
894
894
|
])
|
|
895
895
|
);
|
|
896
896
|
return h.map((C) => g.get(C)).filter((C) => C != null);
|
|
897
|
-
}, [T,
|
|
897
|
+
}, [T, O, s]), k = Z(
|
|
898
898
|
() => new Set(A.map((h) => S(h, s))),
|
|
899
899
|
[A, s]
|
|
900
|
-
),
|
|
901
|
-
|
|
902
|
-
const z =
|
|
900
|
+
), I = J(A);
|
|
901
|
+
I.current = A;
|
|
902
|
+
const z = Z(() => {
|
|
903
903
|
if (!a) return [];
|
|
904
904
|
if (!b)
|
|
905
905
|
return A.map((m) => ({
|
|
@@ -966,8 +966,8 @@ function vt({
|
|
|
966
966
|
r || p(g.id), d.current?.(g, i);
|
|
967
967
|
return;
|
|
968
968
|
}
|
|
969
|
-
const C =
|
|
970
|
-
(f) =>
|
|
969
|
+
const C = I.current.map(
|
|
970
|
+
(f) => re(f, c, s)
|
|
971
971
|
), y = C.some((f) => f.id === h) ? C.filter((f) => f.id !== h) : [...C, g];
|
|
972
972
|
r || p(y.map((f) => f.id)), d.current?.(y, i);
|
|
973
973
|
},
|
|
@@ -993,23 +993,23 @@ function vt({
|
|
|
993
993
|
);
|
|
994
994
|
if (y.length === 0) return;
|
|
995
995
|
const f = y.map(
|
|
996
|
-
(x) =>
|
|
997
|
-
), B =
|
|
998
|
-
(x) =>
|
|
996
|
+
(x) => re(x, c, s)
|
|
997
|
+
), B = I.current.map(
|
|
998
|
+
(x) => re(x, c, s)
|
|
999
999
|
);
|
|
1000
1000
|
if (!a) {
|
|
1001
1001
|
const x = f[0];
|
|
1002
1002
|
if (!x) return;
|
|
1003
|
-
const
|
|
1003
|
+
const ee = B.some((Y) => Y.id === x.id), ue = g ?? "toggle", U = ue === "select" || ue === "toggle" && !ee;
|
|
1004
1004
|
r || p(U ? x.id : void 0), d.current?.(U ? x : void 0, i);
|
|
1005
1005
|
return;
|
|
1006
1006
|
}
|
|
1007
|
-
const
|
|
1008
|
-
(x) =>
|
|
1007
|
+
const V = new Set(B.map((x) => x.id)), E = new Set(f.map((x) => x.id)), Q = f.every(
|
|
1008
|
+
(x) => V.has(x.id)
|
|
1009
1009
|
), _ = g ?? "toggle";
|
|
1010
|
-
if (!(_ === "select" || _ === "toggle" && !
|
|
1011
|
-
const x = B.filter((
|
|
1012
|
-
r || p(x.map((
|
|
1010
|
+
if (!(_ === "select" || _ === "toggle" && !Q)) {
|
|
1011
|
+
const x = B.filter((ee) => !E.has(ee.id));
|
|
1012
|
+
r || p(x.map((ee) => ee.id)), d.current?.(x, i);
|
|
1013
1013
|
return;
|
|
1014
1014
|
}
|
|
1015
1015
|
const ie = new Map(
|
|
@@ -1036,13 +1036,13 @@ function vt({
|
|
|
1036
1036
|
(f) => S(f, s) === h
|
|
1037
1037
|
);
|
|
1038
1038
|
if (!g) return;
|
|
1039
|
-
const C =
|
|
1039
|
+
const C = re(g, c, s);
|
|
1040
1040
|
if (u?.(C, i), D?.(g), !a) {
|
|
1041
1041
|
r || p(void 0), d.current?.(void 0, i);
|
|
1042
1042
|
return;
|
|
1043
1043
|
}
|
|
1044
|
-
const y =
|
|
1045
|
-
(f) =>
|
|
1044
|
+
const y = I.current.map(
|
|
1045
|
+
(f) => re(f, c, s)
|
|
1046
1046
|
).filter((f) => f.id !== h);
|
|
1047
1047
|
r || p(y.map((f) => f.id)), d.current?.(y, i);
|
|
1048
1048
|
},
|
|
@@ -1059,8 +1059,8 @@ function vt({
|
|
|
1059
1059
|
), W = j(
|
|
1060
1060
|
(h) => {
|
|
1061
1061
|
if (!a) return;
|
|
1062
|
-
const g = new Set(h), m =
|
|
1063
|
-
(y) =>
|
|
1062
|
+
const g = new Set(h), m = I.current.map(
|
|
1063
|
+
(y) => re(y, c, s)
|
|
1064
1064
|
).filter((y) => !g.has(y.id));
|
|
1065
1065
|
r || p(m.map((y) => y.id)), d.current?.(m, i);
|
|
1066
1066
|
},
|
|
@@ -1099,7 +1099,7 @@ function yt(t) {
|
|
|
1099
1099
|
return document.documentElement;
|
|
1100
1100
|
}
|
|
1101
1101
|
function Ct(t) {
|
|
1102
|
-
const e =
|
|
1102
|
+
const e = J({
|
|
1103
1103
|
renderOptionContext: !1,
|
|
1104
1104
|
attachToParent: !1,
|
|
1105
1105
|
onOptionClick: !1
|
|
@@ -1143,12 +1143,12 @@ function Ut(t) {
|
|
|
1143
1143
|
overflow: d = "wrap",
|
|
1144
1144
|
groupSelection: G,
|
|
1145
1145
|
optionLabel: p,
|
|
1146
|
-
optionValue:
|
|
1146
|
+
optionValue: O,
|
|
1147
1147
|
optionActive: T,
|
|
1148
1148
|
renderOption: K,
|
|
1149
1149
|
renderOptionGroupHeader: A,
|
|
1150
1150
|
renderSelection: k,
|
|
1151
|
-
renderOptionContext:
|
|
1151
|
+
renderOptionContext: I,
|
|
1152
1152
|
dropdownOptions: z,
|
|
1153
1153
|
onChange: $,
|
|
1154
1154
|
onClose: H,
|
|
@@ -1163,47 +1163,47 @@ function Ut(t) {
|
|
|
1163
1163
|
helperComponent: y,
|
|
1164
1164
|
errorComponent: f,
|
|
1165
1165
|
inputProps: B,
|
|
1166
|
-
className:
|
|
1166
|
+
className: V,
|
|
1167
1167
|
containerClassName: E,
|
|
1168
|
-
buttonClassName:
|
|
1168
|
+
buttonClassName: Q,
|
|
1169
1169
|
dropdownClassName: _,
|
|
1170
1170
|
width: oe,
|
|
1171
1171
|
height: ie,
|
|
1172
1172
|
tabIndex: le,
|
|
1173
1173
|
name: x,
|
|
1174
|
-
id:
|
|
1174
|
+
id: ee
|
|
1175
1175
|
} = t;
|
|
1176
1176
|
Ct(t);
|
|
1177
|
-
const ue = Fe(), U = t.mobileDropdown === "drawer" && ue ? "drawer" : "list",
|
|
1177
|
+
const ue = Fe(), U = t.mobileDropdown === "drawer" && ue ? "drawer" : "list", Y = Z(
|
|
1178
1178
|
() => gt(z),
|
|
1179
1179
|
[z]
|
|
1180
|
-
), he =
|
|
1180
|
+
), he = J(null), pe = J(null), me = J(!1), xe = J(!1), N = $e(), te = We(N.ref, U), M = vt({
|
|
1181
1181
|
options: a,
|
|
1182
1182
|
value: n,
|
|
1183
1183
|
defaultValue: r,
|
|
1184
1184
|
isControlled: e,
|
|
1185
1185
|
multiple: !!c,
|
|
1186
1186
|
optionLabel: p,
|
|
1187
|
-
optionValue:
|
|
1187
|
+
optionValue: O,
|
|
1188
1188
|
optionActive: T,
|
|
1189
1189
|
groupSelection: c ? G : void 0,
|
|
1190
1190
|
onChange: $,
|
|
1191
1191
|
onOptionClick: R,
|
|
1192
1192
|
onRemoveOption: W,
|
|
1193
1193
|
name: x
|
|
1194
|
-
}),
|
|
1194
|
+
}), ne = St({
|
|
1195
1195
|
options: a,
|
|
1196
1196
|
optionLabel: p,
|
|
1197
|
-
dropdownOptions:
|
|
1197
|
+
dropdownOptions: Y
|
|
1198
1198
|
}), Se = j(
|
|
1199
|
-
(v) => {
|
|
1200
|
-
M.toggleOption(v), c || N.close();
|
|
1199
|
+
(v, q) => {
|
|
1200
|
+
M.toggleOption(v), (!c && q !== void 0 && q !== !1 || q) && N.close();
|
|
1201
1201
|
},
|
|
1202
1202
|
[M.toggleOption, c, N]
|
|
1203
1203
|
), ye = j(
|
|
1204
|
-
(v,
|
|
1204
|
+
(v, q) => {
|
|
1205
1205
|
const ce = M.flatOptions.find(
|
|
1206
|
-
(fe) => S(fe,
|
|
1206
|
+
(fe) => S(fe, O) === v
|
|
1207
1207
|
);
|
|
1208
1208
|
if (!(!ce || !ae(ce, T))) {
|
|
1209
1209
|
if (!F) {
|
|
@@ -1215,7 +1215,7 @@ function Ut(t) {
|
|
|
1215
1215
|
value: v,
|
|
1216
1216
|
isSelected: M.selectedIds.has(v),
|
|
1217
1217
|
multiple: !!c,
|
|
1218
|
-
source:
|
|
1218
|
+
source: q,
|
|
1219
1219
|
commit: () => Se(v),
|
|
1220
1220
|
close: () => N.close()
|
|
1221
1221
|
});
|
|
@@ -1223,7 +1223,7 @@ function Ut(t) {
|
|
|
1223
1223
|
},
|
|
1224
1224
|
[
|
|
1225
1225
|
F,
|
|
1226
|
-
|
|
1226
|
+
O,
|
|
1227
1227
|
T,
|
|
1228
1228
|
c,
|
|
1229
1229
|
Se,
|
|
@@ -1231,30 +1231,30 @@ function Ut(t) {
|
|
|
1231
1231
|
M.flatOptions,
|
|
1232
1232
|
M.selectedIds
|
|
1233
1233
|
]
|
|
1234
|
-
),
|
|
1234
|
+
), X = mt({
|
|
1235
1235
|
menuRef: N.ref,
|
|
1236
1236
|
searchInputRef: he,
|
|
1237
1237
|
optionsContainerRef: pe,
|
|
1238
1238
|
onSelect: (v) => ye(v, "keyboard")
|
|
1239
1239
|
});
|
|
1240
|
-
se(() => N.subscribeOpenChange((
|
|
1241
|
-
|
|
1242
|
-
}), [N,
|
|
1243
|
-
!
|
|
1240
|
+
se(() => N.subscribeOpenChange((q) => {
|
|
1241
|
+
q || (me.current = !0, ne.resetSearch(), X.resetFocus(), H?.());
|
|
1242
|
+
}), [N, ne.resetSearch, X.resetFocus, H]), se(() => {
|
|
1243
|
+
!te || Y?.focusSearchInputOnOpen === !1 || Y?.hideSearchBar && pe.current?.querySelector(
|
|
1244
1244
|
'[role="option"]'
|
|
1245
1245
|
)?.focus();
|
|
1246
1246
|
}, [
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1247
|
+
te,
|
|
1248
|
+
Y?.focusSearchInputOnOpen,
|
|
1249
|
+
Y?.hideSearchBar
|
|
1250
1250
|
]);
|
|
1251
1251
|
const Ge = j(() => {
|
|
1252
1252
|
xe.current = !0, !u && (U === "drawer" ? N.toggle(void 0, "60%") : N.toggle());
|
|
1253
1253
|
}, [u, N, U]), Ke = j(
|
|
1254
1254
|
(v) => {
|
|
1255
|
-
xe.current = !0, !(v.target !== v.currentTarget && (v.key === "Enter" || v.key === " ")) &&
|
|
1255
|
+
xe.current = !0, !(v.target !== v.currentTarget && (v.key === "Enter" || v.key === " ")) && X.handleTriggerKeyDown(v);
|
|
1256
1256
|
},
|
|
1257
|
-
[
|
|
1257
|
+
[X.handleTriggerKeyDown]
|
|
1258
1258
|
), Me = j(() => {
|
|
1259
1259
|
M.clearSelection(), P?.();
|
|
1260
1260
|
}, [M.clearSelection, P]), ze = j(
|
|
@@ -1265,37 +1265,37 @@ function Ut(t) {
|
|
|
1265
1265
|
return;
|
|
1266
1266
|
}
|
|
1267
1267
|
if (!xe.current) return;
|
|
1268
|
-
v.target.matches(":focus-visible") && !g && !
|
|
1268
|
+
v.target.matches(":focus-visible") && !g && !te && !u && (U === "drawer" ? N.open(void 0, "60%") : N.open());
|
|
1269
1269
|
},
|
|
1270
|
-
[g,
|
|
1270
|
+
[g, te, u, N, U]
|
|
1271
1271
|
);
|
|
1272
1272
|
se(() => {
|
|
1273
|
-
if (!
|
|
1273
|
+
if (!te || U !== "drawer") return;
|
|
1274
1274
|
const v = N.triggerRef.current;
|
|
1275
1275
|
if (!v) return;
|
|
1276
|
-
const
|
|
1276
|
+
const q = setTimeout(() => {
|
|
1277
1277
|
const ce = window.innerHeight * 0.33, fe = v.getBoundingClientRect(), be = fe.top + fe.height / 2;
|
|
1278
1278
|
if (be > ce) {
|
|
1279
1279
|
const Pe = yt(v), He = be - ce;
|
|
1280
1280
|
Pe.scrollBy({ top: He, behavior: "smooth" });
|
|
1281
1281
|
}
|
|
1282
1282
|
}, 250);
|
|
1283
|
-
return () => clearTimeout(
|
|
1284
|
-
}, [
|
|
1283
|
+
return () => clearTimeout(q);
|
|
1284
|
+
}, [te, U, N.triggerRef]), bt(h, {
|
|
1285
1285
|
menu: N,
|
|
1286
1286
|
selectState: M,
|
|
1287
1287
|
searchInputRef: he
|
|
1288
1288
|
});
|
|
1289
|
-
const Be = c ? i ?? "compact" : "compact", Ce =
|
|
1289
|
+
const Be = c ? i ?? "compact" : "compact", Ce = J(null);
|
|
1290
1290
|
return Ue(() => {
|
|
1291
1291
|
const v = N.triggerRef.current;
|
|
1292
1292
|
Ce.current = v ? v.querySelector("[data-input-content]") : null;
|
|
1293
1293
|
}), /* @__PURE__ */ o.jsxs(
|
|
1294
1294
|
"div",
|
|
1295
1295
|
{
|
|
1296
|
-
className:
|
|
1296
|
+
className: L("relative inline-flex w-full flex-col", V),
|
|
1297
1297
|
style: oe ? { width: oe } : void 0,
|
|
1298
|
-
id:
|
|
1298
|
+
id: ee,
|
|
1299
1299
|
children: [
|
|
1300
1300
|
/* @__PURE__ */ o.jsx(
|
|
1301
1301
|
dt,
|
|
@@ -1314,18 +1314,18 @@ function Ut(t) {
|
|
|
1314
1314
|
displayMode: Be,
|
|
1315
1315
|
overflow: d,
|
|
1316
1316
|
optionLabel: p,
|
|
1317
|
-
optionValue:
|
|
1317
|
+
optionValue: O,
|
|
1318
1318
|
renderSelection: k,
|
|
1319
1319
|
onRemoveOption: M.removeOption,
|
|
1320
1320
|
onRemoveGroup: M.removeOptions,
|
|
1321
1321
|
onClear: P ? Me : void 0,
|
|
1322
1322
|
onClick: Ge,
|
|
1323
1323
|
onFocus: ze,
|
|
1324
|
-
isOpen:
|
|
1324
|
+
isOpen: te,
|
|
1325
1325
|
onKeyDown: Ke,
|
|
1326
|
-
className:
|
|
1326
|
+
className: V,
|
|
1327
1327
|
containerClassName: E,
|
|
1328
|
-
buttonClassName:
|
|
1328
|
+
buttonClassName: Q,
|
|
1329
1329
|
width: oe,
|
|
1330
1330
|
height: ie,
|
|
1331
1331
|
tabIndex: le,
|
|
@@ -1342,29 +1342,29 @@ function Ut(t) {
|
|
|
1342
1342
|
anchorRef: Ce,
|
|
1343
1343
|
dropdownVariant: U,
|
|
1344
1344
|
attachToParent: t.attachToParent,
|
|
1345
|
-
filteredOptions:
|
|
1345
|
+
filteredOptions: ne.filteredOptions,
|
|
1346
1346
|
selectedIds: M.selectedIds,
|
|
1347
1347
|
optionLabel: p,
|
|
1348
|
-
optionValue:
|
|
1348
|
+
optionValue: O,
|
|
1349
1349
|
optionActive: T,
|
|
1350
1350
|
multiple: !!c,
|
|
1351
1351
|
renderOption: K,
|
|
1352
1352
|
renderOptionGroupHeader: A,
|
|
1353
|
-
renderOptionContext:
|
|
1353
|
+
renderOptionContext: I,
|
|
1354
1354
|
onSelect: (v) => ye(v, "mouse"),
|
|
1355
1355
|
closeDropdown: N.close,
|
|
1356
1356
|
onSelectGroup: M.selectGroup,
|
|
1357
|
-
searchValue:
|
|
1358
|
-
onSearchChange:
|
|
1359
|
-
onSearchClear:
|
|
1357
|
+
searchValue: ne.searchValue,
|
|
1358
|
+
onSearchChange: ne.handleSearchChange,
|
|
1359
|
+
onSearchClear: ne.handleSearchClear,
|
|
1360
1360
|
searchInputRef: he,
|
|
1361
|
-
dropdownOptions:
|
|
1362
|
-
onSearchKeyDown:
|
|
1363
|
-
createOptionKeyHandler:
|
|
1364
|
-
navigateNext:
|
|
1365
|
-
navigatePrev:
|
|
1361
|
+
dropdownOptions: Y,
|
|
1362
|
+
onSearchKeyDown: X.handleSearchKeyDown,
|
|
1363
|
+
createOptionKeyHandler: X.createOptionKeyHandler,
|
|
1364
|
+
navigateNext: X.navigateNext,
|
|
1365
|
+
navigatePrev: X.navigatePrev,
|
|
1366
1366
|
optionsContainerRef: pe,
|
|
1367
|
-
isLoading: D || !!
|
|
1367
|
+
isLoading: D || !!Y?.isLoading,
|
|
1368
1368
|
emptyMessage: C,
|
|
1369
1369
|
disabled: u,
|
|
1370
1370
|
size: b,
|
|
@@ -3,7 +3,7 @@ import { IconProps } from '../../Icons/iconUtils';
|
|
|
3
3
|
import { ButtonColor, ButtonVariant, SizeVariant } from '../Shared/types';
|
|
4
4
|
type ButtonIconElement = React.ReactElement<IconProps, IconComponent>;
|
|
5
5
|
type ButtonIcon = IconComponent | ButtonIconElement;
|
|
6
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {
|
|
7
7
|
label?: string;
|
|
8
8
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
9
9
|
icon?: ButtonIcon;
|
|
@@ -27,5 +27,5 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
27
27
|
color?: ButtonColor;
|
|
28
28
|
hideSpinner?: boolean;
|
|
29
29
|
}
|
|
30
|
-
declare const _default: import('react').
|
|
30
|
+
declare const _default: import('react').NamedExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
31
31
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PyrionColor, ButtonVariant, SizeVariant } from '../Shared/types';
|
|
2
2
|
import { IconComponent } from '../../Icons/types';
|
|
3
|
-
export interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
3
|
+
export interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'color'> {
|
|
4
4
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
5
5
|
icon?: IconComponent;
|
|
6
6
|
contentClassName?: string;
|
|
@@ -18,5 +18,5 @@ export interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
|
|
|
18
18
|
color?: PyrionColor;
|
|
19
19
|
hideSpinner?: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare const _default: import('react').
|
|
21
|
+
declare const _default: import('react').NamedExoticComponent<IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
22
22
|
export default _default;
|