@box-kite/react 2.3.1 → 2.4.0
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/.claude/rules/box-kite-rules.md +58 -94
- package/.claude/skills/box-kite/SKILL.md +69 -104
- package/.claude/skills/box-kite/references/components.md +1 -1
- package/.claude/skills/box-kite/references/patterns.md +1 -1
- package/.claude/skills/box-kite/references/rules.md +115 -0
- package/.cursor/rules/box-kite.mdc +60 -96
- package/AGENTS.md +61 -97
- package/BOX_AI_CONTEXT.md +39 -38
- package/BOX_KITE_AI_CONTEXT.md +39 -38
- package/README.md +200 -721
- package/client.cjs +1 -1
- package/client.mjs +81 -81
- package/components/combobox/comboboxListbox.d.ts +2 -1
- package/components/combobox.cjs +1 -1
- package/components/combobox.d.ts +1 -1
- package/components/combobox.mjs +199 -188
- package/components/dataGrid/contracts/dataGridContract.d.ts +2 -1
- package/components/dataGrid/useListLayout.d.ts +1 -1
- package/components/dataGrid.cjs +3 -3
- package/components/dataGrid.mjs +453 -453
- package/components/radioGroup.cjs +1 -1
- package/components/radioGroup.mjs +1 -0
- package/components/semantics.d.ts +29 -29
- package/components/skeleton.cjs +1 -1
- package/components/skeleton.d.ts +1 -1
- package/components/skeleton.mjs +2 -1
- package/components/textarea.d.ts +1 -1
- package/components/textbox.d.ts +1 -1
- package/components/timeZoneSelect.d.ts +1 -1
- package/components/toaster.cjs +1 -1
- package/components/toaster.mjs +13 -14
- package/docs/a11y.md +1 -2
- package/docs/index.md +1 -1
- package/effects.cjs +1 -1
- package/effects.mjs +2 -2
- package/identity.cjs +1 -1
- package/identity.mjs +5 -7
- package/package.json +9 -9
- package/react/effects.d.ts +5 -6
- package/react/identity/useIdentifier.d.ts +0 -3
package/components/combobox.mjs
CHANGED
|
@@ -83,7 +83,7 @@ var S;
|
|
|
83
83
|
var C = S;
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region src/components/combobox/comboboxChips.tsx
|
|
86
|
-
function
|
|
86
|
+
function w(e) {
|
|
87
87
|
let { selection: t, def: n, display: r, removeLabel: i, onRemove: a, disabled: o, variant: s } = e;
|
|
88
88
|
return /* @__PURE__ */ b(y, { children: t.map((e) => {
|
|
89
89
|
let t = C.labelOf(n, e);
|
|
@@ -124,7 +124,7 @@ function ee(e) {
|
|
|
124
124
|
}
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region src/utils/virtual/virtualUtils.ts
|
|
127
|
-
var
|
|
127
|
+
var T;
|
|
128
128
|
(function(e) {
|
|
129
129
|
let t = e.DEFAULT_OVERSCAN = 4, n = e.DEFAULT_THRESHOLD = 100;
|
|
130
130
|
e.DEFAULT_ITEM_HEIGHT = 36, e.DEFAULT_VIEW_HEIGHT = 248;
|
|
@@ -152,11 +152,11 @@ var w;
|
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
154
|
e.windowFor = a;
|
|
155
|
-
})(
|
|
156
|
-
var
|
|
155
|
+
})(T ||= {});
|
|
156
|
+
var E = T;
|
|
157
157
|
//#endregion
|
|
158
158
|
//#region src/react/hooks/useVirtualization.ts
|
|
159
|
-
function
|
|
159
|
+
function ee(e) {
|
|
160
160
|
let { count: n, scrollerRef: i, itemHeight: a, viewHeight: o, overscan: s, threshold: c, enabled: l, activeIndex: u } = e, [d, f] = v({
|
|
161
161
|
top: 0,
|
|
162
162
|
at: -1
|
|
@@ -165,7 +165,7 @@ function te(e) {
|
|
|
165
165
|
viewHeight: 0
|
|
166
166
|
}), g = _(null), y = h((e) => {
|
|
167
167
|
g.current = e;
|
|
168
|
-
}, []), b =
|
|
168
|
+
}, []), b = E.shouldVirtualize(n, l, c), x = r(() => {
|
|
169
169
|
let e = i.current, t = g.current;
|
|
170
170
|
if (!e || !t) return;
|
|
171
171
|
let n = t.children, r = n[0], a = n[1], o = a ? a.offsetTop - r.offsetTop : r?.offsetHeight ?? 0, s = e.clientHeight;
|
|
@@ -191,10 +191,10 @@ function te(e) {
|
|
|
191
191
|
top: e.currentTarget.scrollTop,
|
|
192
192
|
at: u ?? -1
|
|
193
193
|
});
|
|
194
|
-
}), C =
|
|
194
|
+
}), C = E.windowFor({
|
|
195
195
|
count: n,
|
|
196
|
-
itemHeight: a ?? (p.itemHeight > 0 ? p.itemHeight :
|
|
197
|
-
viewHeight: o ?? (p.viewHeight > 0 ? p.viewHeight :
|
|
196
|
+
itemHeight: a ?? (p.itemHeight > 0 ? p.itemHeight : E.DEFAULT_ITEM_HEIGHT),
|
|
197
|
+
viewHeight: o ?? (p.viewHeight > 0 ? p.viewHeight : E.DEFAULT_VIEW_HEIGHT),
|
|
198
198
|
scrollTop: d.top,
|
|
199
199
|
overscan: s,
|
|
200
200
|
activeIndex: u === d.at ? -1 : u
|
|
@@ -216,29 +216,29 @@ function te(e) {
|
|
|
216
216
|
}
|
|
217
217
|
//#endregion
|
|
218
218
|
//#region src/components/combobox/comboboxListbox.tsx
|
|
219
|
-
function
|
|
219
|
+
function te(e, t, n, r) {
|
|
220
220
|
return e ? {
|
|
221
221
|
role: "listbox",
|
|
222
|
-
|
|
222
|
+
...r,
|
|
223
223
|
...t ? { "aria-multiselectable": !0 } : {},
|
|
224
224
|
...n ? { "aria-busy": !0 } : {}
|
|
225
225
|
} : { role: "status" };
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
let { presence: t, rows: r, def: i, display: a, selection: o, multiple: s, activeIndex: c, optionId: l, rowRef: u, onSelect: p } = e, { anchorRef: m, popupRef: g, listboxId: y,
|
|
229
|
-
|
|
230
|
-
}, [
|
|
227
|
+
function ne(e) {
|
|
228
|
+
let { presence: t, rows: r, def: i, display: a, selection: o, multiple: s, activeIndex: c, optionId: l, rowRef: u, onSelect: p } = e, { anchorRef: m, popupRef: g, listboxId: y, name: S, loading: w, loadingText: T, emptyText: E, createLabel: ne, variant: D, itemsProps: O } = e, { virtualize: k } = e, { present: A, ref: re, props: ie } = t, j = (e) => C.keyOf(i, e), [M, ae] = v(!1), N = h((e) => ae(e === "top"), []), P = _(null), oe = h((e) => {
|
|
229
|
+
P.current = e, re(e);
|
|
230
|
+
}, [re]), se = typeof k == "object" ? k : {}, { virtualized: F, startIndex: I, endIndex: ce, offsetY: le, totalHeight: ue, contentRef: de, onScroll: fe } = ee({
|
|
231
231
|
count: r.length,
|
|
232
|
-
scrollerRef:
|
|
233
|
-
enabled: typeof
|
|
232
|
+
scrollerRef: P,
|
|
233
|
+
enabled: typeof k == "boolean" ? k : void 0,
|
|
234
234
|
activeIndex: c,
|
|
235
|
-
...
|
|
236
|
-
}),
|
|
237
|
-
let n =
|
|
235
|
+
...se
|
|
236
|
+
}), L = F ? r.slice(I, ce) : r, R = (e, t) => {
|
|
237
|
+
let n = F ? I + t : t, s = e.kind === "option" && C.isSelected(o, e.row, j), f = C.isRowDisabled(i, e);
|
|
238
238
|
return /* @__PURE__ */ b(d, {
|
|
239
239
|
ref: u(n),
|
|
240
240
|
component: "combobox.item",
|
|
241
|
-
variant: [
|
|
241
|
+
variant: [D, {
|
|
242
242
|
create: e.kind === "create",
|
|
243
243
|
highlighted: n === c
|
|
244
244
|
}],
|
|
@@ -248,7 +248,7 @@ function re(e) {
|
|
|
248
248
|
id: l(n),
|
|
249
249
|
props: {
|
|
250
250
|
role: "option",
|
|
251
|
-
...
|
|
251
|
+
...F ? {
|
|
252
252
|
"aria-setsize": r.length,
|
|
253
253
|
"aria-posinset": n + 1
|
|
254
254
|
} : {},
|
|
@@ -256,8 +256,8 @@ function re(e) {
|
|
|
256
256
|
onMouseDown: (e) => e.preventDefault(),
|
|
257
257
|
onClick: (e) => !f && p(n, e)
|
|
258
258
|
},
|
|
259
|
-
children: e.kind === "create" ?
|
|
260
|
-
}, e.kind === "option" ?
|
|
259
|
+
children: e.kind === "create" ? ne(e.query) : a?.(e.row) ?? C.labelOf(i, e.row)
|
|
260
|
+
}, e.kind === "option" ? j(e.row) : "create");
|
|
261
261
|
};
|
|
262
262
|
return /* @__PURE__ */ b(f, {
|
|
263
263
|
ref: g,
|
|
@@ -266,222 +266,233 @@ function re(e) {
|
|
|
266
266
|
align: "start",
|
|
267
267
|
offset: .5,
|
|
268
268
|
matchWidth: !0,
|
|
269
|
-
onSideChange:
|
|
269
|
+
onSideChange: N,
|
|
270
270
|
children: /* @__PURE__ */ x(n, {
|
|
271
|
-
ref:
|
|
271
|
+
ref: oe,
|
|
272
272
|
component: "combobox.items",
|
|
273
|
-
...
|
|
274
|
-
variant: [
|
|
275
|
-
closed: !
|
|
276
|
-
closedUp: !
|
|
273
|
+
...O,
|
|
274
|
+
variant: [D, {
|
|
275
|
+
closed: !A && !M,
|
|
276
|
+
closedUp: !A && M
|
|
277
277
|
}],
|
|
278
278
|
id: y,
|
|
279
279
|
props: {
|
|
280
|
-
...
|
|
281
|
-
...
|
|
282
|
-
...
|
|
280
|
+
...te(r.length > 0, s, w === !0, S),
|
|
281
|
+
...ie,
|
|
282
|
+
...F ? { onScroll: fe } : {}
|
|
283
283
|
},
|
|
284
|
-
children: [
|
|
285
|
-
ref:
|
|
284
|
+
children: [F ? /* @__PURE__ */ b(n, {
|
|
285
|
+
ref: de,
|
|
286
286
|
component: "combobox.window",
|
|
287
|
-
variant:
|
|
287
|
+
variant: D,
|
|
288
288
|
style: {
|
|
289
|
-
height:
|
|
290
|
-
paddingTop:
|
|
289
|
+
height: ue,
|
|
290
|
+
paddingTop: le
|
|
291
291
|
},
|
|
292
|
-
children:
|
|
293
|
-
}) :
|
|
292
|
+
children: L.map(R)
|
|
293
|
+
}) : L.map(R), r.length === 0 && /* @__PURE__ */ b(n, {
|
|
294
294
|
component: "combobox.message",
|
|
295
|
-
variant:
|
|
296
|
-
children:
|
|
295
|
+
variant: D,
|
|
296
|
+
children: w ? T : E
|
|
297
297
|
})]
|
|
298
298
|
})
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
//#endregion
|
|
302
302
|
//#region src/components/combobox.tsx
|
|
303
|
-
var
|
|
303
|
+
var D = /* @__PURE__ */ new Set([
|
|
304
304
|
" ",
|
|
305
305
|
"Home",
|
|
306
306
|
"End",
|
|
307
307
|
"ArrowLeft",
|
|
308
308
|
"ArrowRight"
|
|
309
309
|
]);
|
|
310
|
-
function
|
|
311
|
-
let { data: S, def:
|
|
312
|
-
|
|
313
|
-
}, [m]),
|
|
314
|
-
|
|
315
|
-
}),
|
|
316
|
-
value:
|
|
317
|
-
defaultValue: () => C.toArray(
|
|
318
|
-
onChange:
|
|
310
|
+
function O(f, m) {
|
|
311
|
+
let { data: S, def: T, label: E, labelProps: ee, placeholder: te, name: O, disabled: k, props: A, itemsProps: re, hideIcon: ie, filter: j = C.filterRows, loading: M, loadingText: ae = "Loading...", emptyText: N = "No results", createRow: P, createLabel: oe = (e) => `Create "${e}"`, removeLabel: se = (e) => `Remove ${e}`, virtualize: F, query: I, defaultQuery: ce, onQueryChange: le, open: ue, defaultOpen: de, onOpenChange: fe, multiple: L = !1, value: R, defaultValue: pe, onValueChange: me, ...z } = f, B = s("combobox"), he = z.id ?? A?.id ?? `${B}-field`, ge = `${B}-listbox`, _e = `${B}-label`, ve = E != null && E !== !1, ye = h((e) => `${B}-option-${e}`, [B]), V = _(null), be = _(null), H = _(null), xe = h((t) => {
|
|
312
|
+
H.current = t, e(m, t);
|
|
313
|
+
}, [m]), Se = r((e, t) => {
|
|
314
|
+
me?.(L ? e : e[0] ?? null, t);
|
|
315
|
+
}), Ce = g(() => R === void 0 ? void 0 : C.toArray(R), [R]), [U, we] = c({
|
|
316
|
+
value: Ce,
|
|
317
|
+
defaultValue: () => C.toArray(pe),
|
|
318
|
+
onChange: Se,
|
|
319
319
|
interaction: {
|
|
320
320
|
component: "combobox",
|
|
321
321
|
type: "valueChange",
|
|
322
322
|
content: ["value"]
|
|
323
323
|
}
|
|
324
|
-
}), [
|
|
325
|
-
value:
|
|
326
|
-
defaultValue:
|
|
327
|
-
onChange:
|
|
324
|
+
}), [W, G] = c({
|
|
325
|
+
value: ue,
|
|
326
|
+
defaultValue: de ?? !1,
|
|
327
|
+
onChange: fe,
|
|
328
328
|
interaction: {
|
|
329
329
|
component: "combobox",
|
|
330
330
|
type: "openChange"
|
|
331
331
|
}
|
|
332
|
-
}), [
|
|
333
|
-
value:
|
|
334
|
-
defaultValue:
|
|
335
|
-
onChange:
|
|
336
|
-
}), [
|
|
332
|
+
}), [Te, K] = i({
|
|
333
|
+
value: I,
|
|
334
|
+
defaultValue: ce ?? "",
|
|
335
|
+
onChange: le
|
|
336
|
+
}), [Ee, q] = v(!1), J = h((e) => C.keyOf(T, e), [T]), De = L || U[0] === void 0 ? "" : C.labelOf(T, U[0]), Y = Ee || Te !== "" ? Te : De, X = g(() => C.rowsFor({
|
|
337
337
|
data: S,
|
|
338
|
-
def:
|
|
339
|
-
query:
|
|
340
|
-
filter:
|
|
341
|
-
typed:
|
|
342
|
-
createRow:
|
|
338
|
+
def: T,
|
|
339
|
+
query: Y,
|
|
340
|
+
filter: j,
|
|
341
|
+
typed: Ee,
|
|
342
|
+
createRow: P
|
|
343
343
|
}), [
|
|
344
344
|
S,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
]),
|
|
351
|
-
|
|
345
|
+
T,
|
|
346
|
+
Y,
|
|
347
|
+
j,
|
|
348
|
+
Ee,
|
|
349
|
+
P
|
|
350
|
+
]), Oe = h((e) => X[e] ? C.isRowDisabled(T, X[e]) : !1, [X, T]), ke = r((e, t) => {
|
|
351
|
+
G(!1, {
|
|
352
352
|
reason: e,
|
|
353
353
|
event: t
|
|
354
|
-
}), e !== "escape" && (
|
|
354
|
+
}), e !== "escape" && (q(!1), K("", {
|
|
355
355
|
reason: "close",
|
|
356
356
|
event: t
|
|
357
357
|
}));
|
|
358
|
-
}),
|
|
359
|
-
let n =
|
|
360
|
-
if (!n ||
|
|
361
|
-
let r = n.kind === "create" ?
|
|
358
|
+
}), Z = r((e, t) => {
|
|
359
|
+
let n = X[e];
|
|
360
|
+
if (!n || Oe(e)) return;
|
|
361
|
+
let r = n.kind === "create" ? P?.(n.query) : n.row;
|
|
362
362
|
if (r == null) return;
|
|
363
|
-
let i = C.isSelected(
|
|
364
|
-
|
|
363
|
+
let i = C.isSelected(U, r, J), a = n.kind === "create" ? "create" : i && L ? "deselect" : "select";
|
|
364
|
+
we(C.toggle(U, r, L, J), {
|
|
365
365
|
reason: a,
|
|
366
366
|
event: t
|
|
367
|
-
}),
|
|
367
|
+
}), q(!1), K("", {
|
|
368
368
|
reason: "select",
|
|
369
369
|
event: t
|
|
370
|
-
}),
|
|
370
|
+
}), L || G(!1, {
|
|
371
371
|
reason: "select",
|
|
372
372
|
event: t
|
|
373
373
|
});
|
|
374
|
-
}),
|
|
375
|
-
count:
|
|
374
|
+
}), Ae = o({
|
|
375
|
+
count: X.length,
|
|
376
376
|
focusItems: !1,
|
|
377
377
|
defaultActiveIndex: -1,
|
|
378
|
-
isDisabled:
|
|
379
|
-
onSelect:
|
|
380
|
-
}), { activeIndex:
|
|
378
|
+
isDisabled: Oe,
|
|
379
|
+
onSelect: Z
|
|
380
|
+
}), { activeIndex: Q, setActiveIndex: je, activeItem: Me } = Ae;
|
|
381
381
|
a({
|
|
382
|
-
enabled:
|
|
383
|
-
inside: [
|
|
384
|
-
onDismiss: (e, t) =>
|
|
382
|
+
enabled: W,
|
|
383
|
+
inside: [V, be],
|
|
384
|
+
onDismiss: (e, t) => ke(e === "escape" ? "escape" : "outside-pointer", t)
|
|
385
385
|
}), t(() => {
|
|
386
|
-
!
|
|
386
|
+
!W || Q === -1 || Me()?.scrollIntoView?.({ block: "nearest" });
|
|
387
|
+
}, [
|
|
388
|
+
W,
|
|
389
|
+
Q,
|
|
390
|
+
Me
|
|
391
|
+
]);
|
|
392
|
+
let $ = ve ? _e : A?.["aria-labelledby"], Ne = A?.["aria-label"], [Pe, Fe] = v();
|
|
393
|
+
t(() => {
|
|
394
|
+
if (!W || $ || Ne) return;
|
|
395
|
+
let e = Array.from(H.current?.labels ?? [], (e) => e.textContent?.trim() ?? "").filter(Boolean).join(" ") || void 0;
|
|
396
|
+
e !== Pe && Fe(e);
|
|
387
397
|
}, [
|
|
388
|
-
|
|
398
|
+
W,
|
|
389
399
|
$,
|
|
390
|
-
|
|
400
|
+
Ne,
|
|
401
|
+
Pe
|
|
391
402
|
]);
|
|
392
|
-
let
|
|
393
|
-
|
|
403
|
+
let Ie = $ ? { "aria-labelledby": $ } : { "aria-label": Ne ?? Pe }, Le = (e, t, n) => {
|
|
404
|
+
G(!0, {
|
|
394
405
|
reason: n,
|
|
395
406
|
event: t
|
|
396
407
|
});
|
|
397
|
-
let r = e === "none" ? -1 : C.activeIndexFor(
|
|
398
|
-
|
|
408
|
+
let r = e === "none" ? -1 : C.activeIndexFor(X, U, T, e);
|
|
409
|
+
je(r, {
|
|
399
410
|
reason: "programmatic",
|
|
400
411
|
event: t
|
|
401
412
|
});
|
|
402
|
-
},
|
|
403
|
-
|
|
413
|
+
}, Re = r((e) => {
|
|
414
|
+
q(!0), K(e.target.value, {
|
|
404
415
|
reason: "input",
|
|
405
416
|
event: e
|
|
406
|
-
}),
|
|
417
|
+
}), W || G(!0, {
|
|
407
418
|
reason: "input",
|
|
408
419
|
event: e
|
|
409
|
-
}),
|
|
420
|
+
}), je(-1, {
|
|
410
421
|
reason: "programmatic",
|
|
411
422
|
event: e
|
|
412
423
|
});
|
|
413
|
-
}),
|
|
414
|
-
|
|
424
|
+
}), ze = r((e, t) => {
|
|
425
|
+
we(U.filter((t) => J(t) !== J(e)), {
|
|
415
426
|
reason: "remove",
|
|
416
427
|
event: t
|
|
417
428
|
});
|
|
418
|
-
}),
|
|
429
|
+
}), Be = (e) => {
|
|
419
430
|
let { key: t } = e;
|
|
420
431
|
if (t === "ArrowDown" || t === "ArrowUp") {
|
|
421
|
-
e.preventDefault(),
|
|
432
|
+
e.preventDefault(), Le(t === "ArrowUp" ? "last" : e.altKey ? "none" : "first", e, "trigger");
|
|
422
433
|
return;
|
|
423
434
|
}
|
|
424
|
-
t === "Escape" &&
|
|
435
|
+
t === "Escape" && Y !== "" && (q(!0), K("", {
|
|
425
436
|
reason: "clear",
|
|
426
437
|
event: e
|
|
427
438
|
}));
|
|
428
|
-
},
|
|
429
|
-
if (
|
|
430
|
-
if (e.key === "Backspace" &&
|
|
431
|
-
|
|
439
|
+
}, Ve = r((e) => {
|
|
440
|
+
if (A?.onKeyDown?.(e), !(e.defaultPrevented || k)) {
|
|
441
|
+
if (e.key === "Backspace" && L && Y === "" && U.length > 0) {
|
|
442
|
+
ze(U[U.length - 1], e);
|
|
432
443
|
return;
|
|
433
444
|
}
|
|
434
|
-
if (!
|
|
435
|
-
|
|
445
|
+
if (!W) {
|
|
446
|
+
Be(e);
|
|
436
447
|
return;
|
|
437
448
|
}
|
|
438
449
|
if (e.key === "Tab") {
|
|
439
|
-
|
|
450
|
+
Q !== -1 && Z(Q, e), ke("tab", e);
|
|
440
451
|
return;
|
|
441
452
|
}
|
|
442
453
|
if (e.altKey && e.key === "ArrowUp") {
|
|
443
|
-
e.preventDefault(),
|
|
454
|
+
e.preventDefault(), Q === -1 ? ke("trigger", e) : Z(Q, e);
|
|
444
455
|
return;
|
|
445
456
|
}
|
|
446
|
-
if (
|
|
447
|
-
|
|
457
|
+
if (D.has(e.key)) {
|
|
458
|
+
je(-1, {
|
|
448
459
|
reason: "programmatic",
|
|
449
460
|
event: e
|
|
450
461
|
});
|
|
451
462
|
return;
|
|
452
463
|
}
|
|
453
|
-
|
|
464
|
+
Ae.onKeyDown(e);
|
|
454
465
|
}
|
|
455
|
-
}),
|
|
456
|
-
!
|
|
457
|
-
}),
|
|
458
|
-
|
|
459
|
-
}),
|
|
466
|
+
}), He = r((e) => {
|
|
467
|
+
!k && !W && Le("first", e, "trigger");
|
|
468
|
+
}), Ue = r((e) => {
|
|
469
|
+
k || e.target === H.current || (e.preventDefault(), H.current?.focus(), W || Le("first", e, "trigger"));
|
|
470
|
+
}), We = X.length > 0 || M === !0 || N !== null, Ge = W && Q !== -1 && X.length > 0 ? ye(Q) : void 0, Ke = /* @__PURE__ */ b(n, {
|
|
460
471
|
tag: "input",
|
|
461
472
|
component: "combobox.field",
|
|
462
|
-
ref:
|
|
463
|
-
id:
|
|
464
|
-
disabled:
|
|
473
|
+
ref: xe,
|
|
474
|
+
id: he,
|
|
475
|
+
disabled: k,
|
|
465
476
|
props: {
|
|
466
|
-
...
|
|
477
|
+
...A,
|
|
467
478
|
role: "combobox",
|
|
468
479
|
"aria-autocomplete": "list",
|
|
469
|
-
"aria-expanded":
|
|
470
|
-
"aria-controls":
|
|
471
|
-
"aria-activedescendant":
|
|
472
|
-
"aria-labelledby":
|
|
480
|
+
"aria-expanded": W,
|
|
481
|
+
"aria-controls": W && We ? ge : void 0,
|
|
482
|
+
"aria-activedescendant": Ge,
|
|
483
|
+
"aria-labelledby": $,
|
|
473
484
|
autoComplete: "off",
|
|
474
485
|
spellCheck: !1,
|
|
475
486
|
type: "text",
|
|
476
|
-
value:
|
|
477
|
-
placeholder:
|
|
478
|
-
onChange:
|
|
479
|
-
onKeyDown:
|
|
480
|
-
onClick:
|
|
487
|
+
value: Y,
|
|
488
|
+
placeholder: te,
|
|
489
|
+
onChange: Re,
|
|
490
|
+
onKeyDown: Ve,
|
|
491
|
+
onClick: He
|
|
481
492
|
}
|
|
482
|
-
}),
|
|
493
|
+
}), qe = !ie && /* @__PURE__ */ b(d, {
|
|
483
494
|
component: "combobox.icon",
|
|
484
|
-
rotate:
|
|
495
|
+
rotate: W ? 180 : 0,
|
|
485
496
|
props: { "aria-hidden": !0 },
|
|
486
497
|
children: /* @__PURE__ */ b(u, {
|
|
487
498
|
viewBox: "0 0 10 6",
|
|
@@ -495,62 +506,62 @@ function D(f, m) {
|
|
|
495
506
|
strokeLinejoin: "round"
|
|
496
507
|
})
|
|
497
508
|
})
|
|
498
|
-
}),
|
|
509
|
+
}), Je = O === void 0 ? null : U.map((e) => /* @__PURE__ */ b(n, {
|
|
499
510
|
tag: "input",
|
|
500
511
|
props: {
|
|
501
512
|
type: "hidden",
|
|
502
|
-
name:
|
|
503
|
-
value: String(
|
|
513
|
+
name: O,
|
|
514
|
+
value: String(J(e))
|
|
504
515
|
}
|
|
505
|
-
},
|
|
506
|
-
present:
|
|
507
|
-
children: (e) => /* @__PURE__ */ b(
|
|
516
|
+
}, J(e))), Ye = We && /* @__PURE__ */ b(p, {
|
|
517
|
+
present: W,
|
|
518
|
+
children: (e) => /* @__PURE__ */ b(ne, {
|
|
508
519
|
presence: e,
|
|
509
|
-
rows:
|
|
510
|
-
def:
|
|
511
|
-
display:
|
|
512
|
-
selection:
|
|
513
|
-
multiple:
|
|
514
|
-
activeIndex:
|
|
515
|
-
optionId:
|
|
516
|
-
rowRef: (e) =>
|
|
517
|
-
onSelect:
|
|
518
|
-
anchorRef:
|
|
519
|
-
popupRef:
|
|
520
|
+
rows: X,
|
|
521
|
+
def: T,
|
|
522
|
+
display: T.display,
|
|
523
|
+
selection: U,
|
|
524
|
+
multiple: L,
|
|
525
|
+
activeIndex: Q,
|
|
526
|
+
optionId: ye,
|
|
527
|
+
rowRef: (e) => Ae.itemProps(e).ref,
|
|
528
|
+
onSelect: Z,
|
|
529
|
+
anchorRef: V,
|
|
530
|
+
popupRef: be,
|
|
520
531
|
listboxId: ge,
|
|
521
|
-
|
|
522
|
-
loading:
|
|
523
|
-
loadingText:
|
|
524
|
-
emptyText:
|
|
525
|
-
createLabel:
|
|
526
|
-
virtualize:
|
|
527
|
-
variant:
|
|
528
|
-
itemsProps:
|
|
532
|
+
name: Ie,
|
|
533
|
+
loading: M,
|
|
534
|
+
loadingText: ae,
|
|
535
|
+
emptyText: N,
|
|
536
|
+
createLabel: oe,
|
|
537
|
+
virtualize: F,
|
|
538
|
+
variant: z.variant,
|
|
539
|
+
itemsProps: re
|
|
529
540
|
})
|
|
530
|
-
}),
|
|
531
|
-
ref:
|
|
541
|
+
}), Xe = /* @__PURE__ */ x(d, {
|
|
542
|
+
ref: V,
|
|
532
543
|
component: "combobox",
|
|
533
544
|
ai: "center",
|
|
534
545
|
gap: 1,
|
|
535
546
|
flexWrap: "wrap",
|
|
536
|
-
...
|
|
537
|
-
props: { onPointerDown:
|
|
547
|
+
...z,
|
|
548
|
+
props: { onPointerDown: Ue },
|
|
538
549
|
children: [
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
selection:
|
|
542
|
-
def:
|
|
543
|
-
display:
|
|
544
|
-
removeLabel:
|
|
545
|
-
onRemove:
|
|
546
|
-
disabled:
|
|
547
|
-
variant:
|
|
550
|
+
Je,
|
|
551
|
+
L && /* @__PURE__ */ b(w, {
|
|
552
|
+
selection: U,
|
|
553
|
+
def: T,
|
|
554
|
+
display: T.display,
|
|
555
|
+
removeLabel: se,
|
|
556
|
+
onRemove: ze,
|
|
557
|
+
disabled: k,
|
|
558
|
+
variant: z.variant
|
|
548
559
|
}),
|
|
549
|
-
|
|
550
|
-
|
|
560
|
+
Ke,
|
|
561
|
+
qe
|
|
551
562
|
]
|
|
552
563
|
});
|
|
553
|
-
return
|
|
564
|
+
return ve ? /* @__PURE__ */ x(d, {
|
|
554
565
|
d: "column",
|
|
555
566
|
gap: 1,
|
|
556
567
|
width: "fit-content",
|
|
@@ -558,17 +569,17 @@ function D(f, m) {
|
|
|
558
569
|
/* @__PURE__ */ b(n, {
|
|
559
570
|
tag: "label",
|
|
560
571
|
component: "combobox.label",
|
|
561
|
-
id:
|
|
562
|
-
...
|
|
563
|
-
props: { htmlFor:
|
|
564
|
-
children:
|
|
572
|
+
id: _e,
|
|
573
|
+
...ee,
|
|
574
|
+
props: { htmlFor: he },
|
|
575
|
+
children: E
|
|
565
576
|
}),
|
|
566
|
-
|
|
567
|
-
|
|
577
|
+
Xe,
|
|
578
|
+
Ye
|
|
568
579
|
]
|
|
569
|
-
}) : /* @__PURE__ */ x(y, { children: [
|
|
580
|
+
}) : /* @__PURE__ */ x(y, { children: [Xe, Ye] });
|
|
570
581
|
}
|
|
571
|
-
var
|
|
572
|
-
|
|
582
|
+
var k = m(O);
|
|
583
|
+
k.displayName = "Combobox";
|
|
573
584
|
//#endregion
|
|
574
|
-
export { C as ComboboxUtils,
|
|
585
|
+
export { C as ComboboxUtils, k as default };
|
|
@@ -515,6 +515,7 @@ export interface ColumnType<TRow> {
|
|
|
515
515
|
columns?: ColumnType<TRow>[];
|
|
516
516
|
/** `start`/`end` follow the reading order; `left`/`right` stay on the screen side they name. */
|
|
517
517
|
align?: 'start' | 'end' | 'center' | 'left' | 'right';
|
|
518
|
+
/** Renders the cell's content, edge to edge: the built-in text pads itself `px={3}`, so text of your own should too. */
|
|
518
519
|
Cell?: React.ComponentType<{
|
|
519
520
|
cell: CellModel<TRow>;
|
|
520
521
|
}>;
|
|
@@ -530,7 +531,7 @@ export interface ColumnType<TRow> {
|
|
|
530
531
|
exportValue?: (row: TRow) => string | number | boolean | Date | null;
|
|
531
532
|
/** The number format its values are written with in a spreadsheet, `'#,##0.00'` or `'yyyy-mm-dd'`. */
|
|
532
533
|
exportFormat?: string;
|
|
533
|
-
/** Renders this column's aggregate wherever one appears
|
|
534
|
+
/** Renders this column's aggregate wherever one appears, edge to edge like `Cell`. Without it the value is rendered as it is. */
|
|
534
535
|
AggregateCell?: React.ComponentType<{
|
|
535
536
|
cell: AggregateCellModel<TRow>;
|
|
536
537
|
}>;
|
|
@@ -7,7 +7,7 @@ type ListLayout = typeof DataGridList;
|
|
|
7
7
|
export declare function loadListLayout(): Promise<ListLayout>;
|
|
8
8
|
/**
|
|
9
9
|
* The list layout's component once it has arrived, or `undefined` while the grid should go on drawing its
|
|
10
|
-
* table. No `React.lazy`: a
|
|
10
|
+
* table. No `React.lazy`: a boundary that suspends while hydrating throws the server's HTML away.
|
|
11
11
|
*/
|
|
12
12
|
export default function useListLayout(active: boolean): ListLayout | undefined;
|
|
13
13
|
export {};
|