@commercetools/nimbus 0.0.0-canary-20250822165148 → 0.0.0-canary-20250822171412
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/chunks/data-table-BRjRsTel.cjs.js.map +1 -1
- package/dist/chunks/data-table-DR210vqX.es.js.map +1 -1
- package/dist/chunks/progress-bar-BkJEnG2U.es.js.map +1 -1
- package/dist/chunks/progress-bar-BsWBRJc2.cjs.js.map +1 -1
- package/dist/chunks/{select-DUhCYblF.cjs.js → select-oXXKo_nv.cjs.js} +2 -2
- package/dist/chunks/{select-DUhCYblF.cjs.js.map → select-oXXKo_nv.cjs.js.map} +1 -1
- package/dist/chunks/{select-N8FpTFMk.es.js → select-ruNS6UXv.es.js} +59 -59
- package/dist/chunks/{select-N8FpTFMk.es.js.map → select-ruNS6UXv.es.js.map} +1 -1
- package/dist/chunks/toolbar-BxIQI626.cjs.js.map +1 -1
- package/dist/chunks/toolbar-D2CqoZzL.es.js.map +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components.d.ts +13 -8
- package/dist/data-table.d.ts +6 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +13 -8
- package/dist/index.es.js +1 -1
- package/dist/progress-bar.d.ts +2 -1
- package/dist/select.d.ts +3 -3
- package/dist/toolbar.d.ts +2 -1
- package/package.json +5 -5
|
@@ -34,11 +34,11 @@ import { F as V } from "./flex-9fkV4bsm.es.js";
|
|
|
34
34
|
import { e as Qe } from "./Separator-BUmWfQvi.es.js";
|
|
35
35
|
const H = /* @__PURE__ */ new WeakMap();
|
|
36
36
|
function Ye(e, t, r) {
|
|
37
|
-
let { keyboardDelegate:
|
|
37
|
+
let { keyboardDelegate: o, isDisabled: l, isRequired: n, name: c, form: i, validationBehavior: s = "aria" } = e, b = We({
|
|
38
38
|
usage: "search",
|
|
39
39
|
sensitivity: "base"
|
|
40
|
-
}),
|
|
41
|
-
|
|
40
|
+
}), a = z(() => o || new Ke(t.collection, t.disabledKeys, r, b), [
|
|
41
|
+
o,
|
|
42
42
|
t.collection,
|
|
43
43
|
t.disabledKeys,
|
|
44
44
|
b,
|
|
@@ -51,20 +51,20 @@ function Ye(e, t, r) {
|
|
|
51
51
|
case "ArrowLeft": {
|
|
52
52
|
var g, x;
|
|
53
53
|
u.preventDefault();
|
|
54
|
-
let R = t.selectedKey != null ? (g =
|
|
54
|
+
let R = t.selectedKey != null ? (g = a.getKeyAbove) === null || g === void 0 ? void 0 : g.call(a, t.selectedKey) : (x = a.getFirstKey) === null || x === void 0 ? void 0 : x.call(a);
|
|
55
55
|
R && t.setSelectedKey(R);
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
58
|
case "ArrowRight": {
|
|
59
59
|
var q, M;
|
|
60
60
|
u.preventDefault();
|
|
61
|
-
let R = t.selectedKey != null ? (q =
|
|
61
|
+
let R = t.selectedKey != null ? (q = a.getKeyBelow) === null || q === void 0 ? void 0 : q.call(a, t.selectedKey) : (M = a.getFirstKey) === null || M === void 0 ? void 0 : M.call(a);
|
|
62
62
|
R && t.setSelectedKey(R);
|
|
63
63
|
break;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}, { typeSelectProps: v } = Be({
|
|
67
|
-
keyboardDelegate:
|
|
67
|
+
keyboardDelegate: a,
|
|
68
68
|
selectionManager: t.selectionManager,
|
|
69
69
|
onTypeSelect(u) {
|
|
70
70
|
t.setSelectedKey(u);
|
|
@@ -146,7 +146,7 @@ function Ye(e, t, r) {
|
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
148
|
function Ze(e, t, r) {
|
|
149
|
-
let
|
|
149
|
+
let o = H.get(t) || {}, { autoComplete: l, name: n = o.name, form: c = o.form, isDisabled: i = o.isDisabled } = e, { validationBehavior: s, isRequired: b } = o, { visuallyHiddenProps: a } = Le({
|
|
150
150
|
style: {
|
|
151
151
|
// Prevent page scrolling.
|
|
152
152
|
position: "fixed",
|
|
@@ -167,7 +167,7 @@ function Ze(e, t, r) {
|
|
|
167
167
|
var $;
|
|
168
168
|
return {
|
|
169
169
|
containerProps: {
|
|
170
|
-
...
|
|
170
|
+
...a,
|
|
171
171
|
"aria-hidden": !0,
|
|
172
172
|
// @ts-ignore
|
|
173
173
|
"data-react-aria-prevent-focus": !0,
|
|
@@ -193,15 +193,15 @@ function Ze(e, t, r) {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
function et(e) {
|
|
196
|
-
let { state: t, triggerRef: r, label:
|
|
196
|
+
let { state: t, triggerRef: r, label: o, name: l, form: n, isDisabled: c } = e, i = I(null), s = I(null), { containerProps: b, selectProps: a } = Ze({
|
|
197
197
|
...e,
|
|
198
198
|
selectRef: t.collection.size <= 300 ? i : s
|
|
199
199
|
}, t, r);
|
|
200
200
|
if (t.collection.size <= 300) return /* @__PURE__ */ m.createElement("div", {
|
|
201
201
|
...b,
|
|
202
202
|
"data-testid": "hidden-select-container"
|
|
203
|
-
}, /* @__PURE__ */ m.createElement("label", null,
|
|
204
|
-
...
|
|
203
|
+
}, /* @__PURE__ */ m.createElement("label", null, o, /* @__PURE__ */ m.createElement("select", {
|
|
204
|
+
...a,
|
|
205
205
|
ref: i
|
|
206
206
|
}, /* @__PURE__ */ m.createElement("option", null), [
|
|
207
207
|
...t.collection.getKeys()
|
|
@@ -217,7 +217,7 @@ function et(e) {
|
|
|
217
217
|
var p;
|
|
218
218
|
let v = {
|
|
219
219
|
type: "hidden",
|
|
220
|
-
autoComplete:
|
|
220
|
+
autoComplete: a.autoComplete,
|
|
221
221
|
name: l,
|
|
222
222
|
form: n,
|
|
223
223
|
disabled: c,
|
|
@@ -230,7 +230,7 @@ function et(e) {
|
|
|
230
230
|
display: "none"
|
|
231
231
|
},
|
|
232
232
|
type: "text",
|
|
233
|
-
required:
|
|
233
|
+
required: a.required,
|
|
234
234
|
onChange: () => {
|
|
235
235
|
}
|
|
236
236
|
}) : /* @__PURE__ */ m.createElement("input", {
|
|
@@ -241,10 +241,10 @@ function et(e) {
|
|
|
241
241
|
return null;
|
|
242
242
|
}
|
|
243
243
|
function tt(e) {
|
|
244
|
-
let t = Te(e), [r,
|
|
244
|
+
let t = Te(e), [r, o] = B(null), l = ze({
|
|
245
245
|
...e,
|
|
246
|
-
onSelectionChange: (
|
|
247
|
-
e.onSelectionChange != null && e.onSelectionChange(
|
|
246
|
+
onSelectionChange: (a) => {
|
|
247
|
+
e.onSelectionChange != null && e.onSelectionChange(a), t.close(), n.commitValidation();
|
|
248
248
|
}
|
|
249
249
|
}), n = Ve({
|
|
250
250
|
...e,
|
|
@@ -257,11 +257,11 @@ function tt(e) {
|
|
|
257
257
|
...t,
|
|
258
258
|
defaultSelectedKey: (b = e.defaultSelectedKey) !== null && b !== void 0 ? b : s,
|
|
259
259
|
focusStrategy: r,
|
|
260
|
-
open(
|
|
261
|
-
l.collection.size !== 0 && (a
|
|
260
|
+
open(a = null) {
|
|
261
|
+
l.collection.size !== 0 && (o(a), t.open());
|
|
262
262
|
},
|
|
263
|
-
toggle(
|
|
264
|
-
l.collection.size !== 0 && (a
|
|
263
|
+
toggle(a = null) {
|
|
264
|
+
l.collection.size !== 0 && (o(a), t.toggle());
|
|
265
265
|
},
|
|
266
266
|
isFocused: c,
|
|
267
267
|
setFocused: i
|
|
@@ -270,9 +270,9 @@ function tt(e) {
|
|
|
270
270
|
function lt(e) {
|
|
271
271
|
return e && e.__esModule ? e.default : e;
|
|
272
272
|
}
|
|
273
|
-
const L = /* @__PURE__ */ G(null), A = /* @__PURE__ */ G(null),
|
|
273
|
+
const L = /* @__PURE__ */ G(null), A = /* @__PURE__ */ G(null), at = /* @__PURE__ */ N(function(t, r) {
|
|
274
274
|
[t, r] = Q(t, r, L);
|
|
275
|
-
let { children:
|
|
275
|
+
let { children: o, isDisabled: l = !1, isInvalid: n = !1, isRequired: c = !1 } = t, i = z(() => typeof o == "function" ? o({
|
|
276
276
|
isOpen: !1,
|
|
277
277
|
isDisabled: l,
|
|
278
278
|
isInvalid: n,
|
|
@@ -280,8 +280,8 @@ const L = /* @__PURE__ */ G(null), A = /* @__PURE__ */ G(null), ot = /* @__PURE_
|
|
|
280
280
|
isFocused: !1,
|
|
281
281
|
isFocusVisible: !1,
|
|
282
282
|
defaultChildren: null
|
|
283
|
-
}) :
|
|
284
|
-
|
|
283
|
+
}) : o, [
|
|
284
|
+
o,
|
|
285
285
|
l,
|
|
286
286
|
n,
|
|
287
287
|
c
|
|
@@ -293,32 +293,32 @@ const L = /* @__PURE__ */ G(null), A = /* @__PURE__ */ G(null), ot = /* @__PURE_
|
|
|
293
293
|
collection: s,
|
|
294
294
|
selectRef: r
|
|
295
295
|
}));
|
|
296
|
-
}),
|
|
296
|
+
}), ot = [
|
|
297
297
|
ee,
|
|
298
298
|
J,
|
|
299
299
|
W
|
|
300
300
|
];
|
|
301
301
|
function it({ props: e, selectRef: t, collection: r }) {
|
|
302
|
-
let { validationBehavior:
|
|
302
|
+
let { validationBehavior: o } = Y(xe) || {};
|
|
303
303
|
var l, n;
|
|
304
|
-
let c = (n = (l = e.validationBehavior) !== null && l !== void 0 ? l :
|
|
304
|
+
let c = (n = (l = e.validationBehavior) !== null && l !== void 0 ? l : o) !== null && n !== void 0 ? n : "native", i = tt({
|
|
305
305
|
...e,
|
|
306
306
|
collection: r,
|
|
307
307
|
children: void 0,
|
|
308
308
|
validationBehavior: c
|
|
309
309
|
}), { isFocusVisible: s, focusProps: b } = Ne({
|
|
310
310
|
within: !0
|
|
311
|
-
}),
|
|
311
|
+
}), a = I(null), [p, $] = ve(!e["aria-label"] && !e["aria-labelledby"]), { labelProps: f, triggerProps: v, valueProps: P, menuProps: S, descriptionProps: w, errorMessageProps: E, hiddenSelectProps: C, ...y } = Ye({
|
|
312
312
|
...he(e),
|
|
313
313
|
label: $,
|
|
314
314
|
validationBehavior: c
|
|
315
|
-
}, i,
|
|
316
|
-
|
|
315
|
+
}, i, a), [O, k] = B(null), h = X(() => {
|
|
316
|
+
a.current && k(a.current.offsetWidth + "px");
|
|
317
317
|
}, [
|
|
318
|
-
|
|
318
|
+
a
|
|
319
319
|
]);
|
|
320
320
|
ke({
|
|
321
|
-
ref:
|
|
321
|
+
ref: a,
|
|
322
322
|
onResize: h
|
|
323
323
|
});
|
|
324
324
|
let F = z(() => ({
|
|
@@ -370,7 +370,7 @@ function it({ props: e, selectRef: t, collection: r }) {
|
|
|
370
370
|
J,
|
|
371
371
|
{
|
|
372
372
|
...v,
|
|
373
|
-
ref:
|
|
373
|
+
ref: a,
|
|
374
374
|
isPressed: i.isOpen,
|
|
375
375
|
autoFocus: e.autoFocus
|
|
376
376
|
}
|
|
@@ -383,14 +383,14 @@ function it({ props: e, selectRef: t, collection: r }) {
|
|
|
383
383
|
$e,
|
|
384
384
|
{
|
|
385
385
|
trigger: "Select",
|
|
386
|
-
triggerRef:
|
|
386
|
+
triggerRef: a,
|
|
387
387
|
scrollRef: x,
|
|
388
388
|
placement: "bottom start",
|
|
389
389
|
style: {
|
|
390
390
|
"--trigger-width": O
|
|
391
391
|
},
|
|
392
392
|
"aria-labelledby": S["aria-labelledby"],
|
|
393
|
-
clearContexts:
|
|
393
|
+
clearContexts: ot
|
|
394
394
|
}
|
|
395
395
|
],
|
|
396
396
|
[
|
|
@@ -434,7 +434,7 @@ function it({ props: e, selectRef: t, collection: r }) {
|
|
|
434
434
|
})));
|
|
435
435
|
}
|
|
436
436
|
const le = /* @__PURE__ */ G(null), rt = /* @__PURE__ */ N(function(t, r) {
|
|
437
|
-
var
|
|
437
|
+
var o, l;
|
|
438
438
|
[t, r] = Q(t, r, le);
|
|
439
439
|
let n = _(A), { placeholder: c } = Y(L), i = n.selectedKey != null ? n.collection.getItem(n.selectedKey) : null, s = i?.props.children;
|
|
440
440
|
typeof s == "function" && (s = s({
|
|
@@ -448,13 +448,13 @@ const le = /* @__PURE__ */ G(null), rt = /* @__PURE__ */ N(function(t, r) {
|
|
|
448
448
|
selectionBehavior: "toggle"
|
|
449
449
|
}));
|
|
450
450
|
let b = qe(lt(Pe), "react-aria-components");
|
|
451
|
-
var
|
|
451
|
+
var a, p, $;
|
|
452
452
|
let f = Z({
|
|
453
453
|
...t,
|
|
454
|
-
defaultChildren: (
|
|
454
|
+
defaultChildren: (a = s ?? c) !== null && a !== void 0 ? a : b.format("selectPlaceholder"),
|
|
455
455
|
defaultClassName: "react-aria-SelectValue",
|
|
456
456
|
values: {
|
|
457
|
-
selectedItem: (p = (
|
|
457
|
+
selectedItem: (p = (o = n.selectedItem) === null || o === void 0 ? void 0 : o.value) !== null && p !== void 0 ? p : null,
|
|
458
458
|
selectedText: ($ = (l = n.selectedItem) === null || l === void 0 ? void 0 : l.textValue) !== null && $ !== void 0 ? $ : null,
|
|
459
459
|
isPlaceholder: !i
|
|
460
460
|
}
|
|
@@ -474,7 +474,7 @@ const le = /* @__PURE__ */ G(null), rt = /* @__PURE__ */ N(function(t, r) {
|
|
|
474
474
|
}), st = /* @__PURE__ */ nt(
|
|
475
475
|
"div",
|
|
476
476
|
"root"
|
|
477
|
-
), dt = /* @__PURE__ */ D("button", "trigger"), ct = /* @__PURE__ */ D("span", "triggerLabel"), ft = /* @__PURE__ */ D("div", "options"), ut = /* @__PURE__ */ D("div", "option"), bt = /* @__PURE__ */ D("div", "optionGroup"),
|
|
477
|
+
), dt = /* @__PURE__ */ D("button", "trigger"), ct = /* @__PURE__ */ D("span", "triggerLabel"), ft = /* @__PURE__ */ D("div", "options"), ut = /* @__PURE__ */ D("div", "option"), bt = /* @__PURE__ */ D("div", "optionGroup"), ae = () => {
|
|
478
478
|
const e = _(A);
|
|
479
479
|
return e?.selectedKey ? /* @__PURE__ */ d(pe, { children: /* @__PURE__ */ d(
|
|
480
480
|
Xe,
|
|
@@ -491,14 +491,14 @@ const le = /* @__PURE__ */ G(null), rt = /* @__PURE__ */ N(function(t, r) {
|
|
|
491
491
|
}
|
|
492
492
|
) }) : null;
|
|
493
493
|
};
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
({ children: e, isLoading: t, isDisabled: r, ...
|
|
497
|
-
const n = Ue({ recipe: _e }), [c, i] = n.splitVariantProps(
|
|
494
|
+
ae.displayName = "Select.ClearButton";
|
|
495
|
+
const oe = /* @__PURE__ */ N(
|
|
496
|
+
({ children: e, isLoading: t, isDisabled: r, ...o }, l) => {
|
|
497
|
+
const n = Ue({ recipe: _e }), [c, i] = n.splitVariantProps(o), [s, b] = te(i), a = {
|
|
498
498
|
...b,
|
|
499
499
|
isDisabled: t || r
|
|
500
500
|
};
|
|
501
|
-
return /* @__PURE__ */ d(st, { asChild: !0, ref: l, ...c, ...s, children: /* @__PURE__ */ K(
|
|
501
|
+
return /* @__PURE__ */ d(st, { asChild: !0, ref: l, ...c, ...s, children: /* @__PURE__ */ K(at, { ...a, children: [
|
|
502
502
|
/* @__PURE__ */ K(Je.div, { position: "relative", children: [
|
|
503
503
|
/* @__PURE__ */ d(dt, { zIndex: 0, asChild: !0, children: /* @__PURE__ */ d(fe, { children: /* @__PURE__ */ d(ct, { asChild: !0, children: /* @__PURE__ */ d(rt, {}) }) }) }),
|
|
504
504
|
/* @__PURE__ */ K(
|
|
@@ -511,7 +511,7 @@ const ae = /* @__PURE__ */ N(
|
|
|
511
511
|
right: "400",
|
|
512
512
|
pointerEvents: "none",
|
|
513
513
|
children: [
|
|
514
|
-
/* @__PURE__ */ d(V, { width: "600", my: "auto", children: /* @__PURE__ */ d(
|
|
514
|
+
/* @__PURE__ */ d(V, { width: "600", my: "auto", children: /* @__PURE__ */ d(ae, {}) }),
|
|
515
515
|
/* @__PURE__ */ d(V, { my: "auto", w: "600", h: "600", pointerEvents: "none", children: /* @__PURE__ */ d(U, { color: "neutral.9", asChild: !0, m: "auto", w: "400", h: "400", children: t ? /* @__PURE__ */ d(U, { asChild: !0, animation: "spin", animationDuration: "slowest", children: /* @__PURE__ */ d(de, {}) }) : /* @__PURE__ */ d(ce, {}) }) })
|
|
516
516
|
]
|
|
517
517
|
}
|
|
@@ -521,40 +521,40 @@ const ae = /* @__PURE__ */ N(
|
|
|
521
521
|
] }) });
|
|
522
522
|
}
|
|
523
523
|
);
|
|
524
|
-
|
|
524
|
+
oe.displayName = "Select.Root";
|
|
525
525
|
const ie = (e) => {
|
|
526
|
-
const { ref: t, ...r } = e, [
|
|
527
|
-
return /* @__PURE__ */ d(ft, { asChild: !0, ...
|
|
526
|
+
const { ref: t, ...r } = e, [o, l] = te(r);
|
|
527
|
+
return /* @__PURE__ */ d(ft, { asChild: !0, ...o, children: /* @__PURE__ */ d(Re, { ref: t, ...l }) });
|
|
528
528
|
};
|
|
529
529
|
ie.displayName = "Select.Options";
|
|
530
|
-
const re = (
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
};
|
|
530
|
+
const re = ({
|
|
531
|
+
ref: e,
|
|
532
|
+
...t
|
|
533
|
+
}) => /* @__PURE__ */ d(ut, { asChild: !0, ref: e, children: /* @__PURE__ */ d(De, { ...t }) });
|
|
534
534
|
re.displayName = "Select.Option";
|
|
535
535
|
const ne = (e) => {
|
|
536
|
-
const { ref: t, label: r, items:
|
|
537
|
-
if (
|
|
536
|
+
const { ref: t, label: r, items: o, children: l, ...n } = e;
|
|
537
|
+
if (o && typeof l != "function")
|
|
538
538
|
throw new Error(
|
|
539
539
|
'SelectOptionGroup: When "items" is provided, "children" must be a function'
|
|
540
540
|
);
|
|
541
541
|
return /* @__PURE__ */ K(Fe, { ref: t, ...n, children: [
|
|
542
542
|
/* @__PURE__ */ d(bt, { asChild: !0, children: /* @__PURE__ */ d(Qe, { children: r }) }),
|
|
543
|
-
|
|
543
|
+
o ? /* @__PURE__ */ d(we, { items: o, children: (c) => typeof l == "function" ? l(c) : null }) : l
|
|
544
544
|
] });
|
|
545
545
|
};
|
|
546
546
|
ne.displayName = "Select.OptionGroup";
|
|
547
547
|
const Xt = {
|
|
548
|
-
Root:
|
|
548
|
+
Root: oe,
|
|
549
549
|
Options: ie,
|
|
550
550
|
Option: re,
|
|
551
551
|
OptionGroup: ne
|
|
552
552
|
};
|
|
553
553
|
export {
|
|
554
554
|
Xt as S,
|
|
555
|
-
|
|
555
|
+
oe as a,
|
|
556
556
|
ie as b,
|
|
557
557
|
re as c,
|
|
558
558
|
ne as d
|
|
559
559
|
};
|
|
560
|
-
//# sourceMappingURL=select-
|
|
560
|
+
//# sourceMappingURL=select-ruNS6UXv.es.js.map
|