@deadragdoll/reactnu 0.1.56 → 0.1.74

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/index.js CHANGED
@@ -2,18 +2,21 @@
2
2
  import {
3
3
  Fragment as Fragment4,
4
4
  useContext as useContext8,
5
- useState as useState10
5
+ useState as useState11
6
6
  } from "react";
7
7
 
8
8
  // src/components/MainMenu/MainMenu.tsx
9
- import { useEffect, useRef, useState } from "react";
9
+ import { useEffect, useRef as useRef2, useState as useState2 } from "react";
10
10
 
11
11
  // src/components/MainMenu/MainMenu.types.ts
12
12
  function isMainMenuDivider(item) {
13
13
  return item.type === "divider";
14
14
  }
15
+ function isMainMenuSpacer(item) {
16
+ return item.type === "spacer";
17
+ }
15
18
  function isMainMenuItem(item) {
16
- return item.type !== "divider";
19
+ return item.type === void 0 || item.type === "item";
17
20
  }
18
21
 
19
22
  // src/components/Glyph/NuGlyph.tsx
@@ -239,8 +242,66 @@ function NuGlyph({ className, name, ...props }) {
239
242
  );
240
243
  }
241
244
 
245
+ // src/components/Spacer/Spacer.tsx
246
+ import { jsx as jsx2 } from "react/jsx-runtime";
247
+ function Spacer({ className, ...props }) {
248
+ return /* @__PURE__ */ jsx2(
249
+ "span",
250
+ {
251
+ ...props,
252
+ "aria-hidden": props["aria-hidden"] ?? true,
253
+ className: ["nu-spacer", className].filter(Boolean).join(" ")
254
+ }
255
+ );
256
+ }
257
+
258
+ // src/components/MainMenu/internals/MainMenuSubmenuShell.tsx
259
+ import { useLayoutEffect, useRef, useState } from "react";
260
+ import { jsx as jsx3 } from "react/jsx-runtime";
261
+ function MainMenuSubmenuShell({
262
+ children,
263
+ placement
264
+ }) {
265
+ const shellRef = useRef(null);
266
+ const [opensLeft, setOpensLeft] = useState(false);
267
+ useLayoutEffect(() => {
268
+ const shellNode = shellRef.current;
269
+ if (!shellNode) {
270
+ return;
271
+ }
272
+ const parentNode = shellNode.parentElement;
273
+ if (!parentNode) {
274
+ return;
275
+ }
276
+ const submenuNode = shellNode;
277
+ const ownerNode = parentNode;
278
+ function updateDirection() {
279
+ const parentBounds = ownerNode.getBoundingClientRect();
280
+ const viewportWidth = document.documentElement.clientWidth;
281
+ const shouldOpenLeft = parentBounds.right + submenuNode.offsetWidth > viewportWidth;
282
+ setOpensLeft(
283
+ (currentValue) => currentValue === shouldOpenLeft ? currentValue : shouldOpenLeft
284
+ );
285
+ }
286
+ updateDirection();
287
+ window.addEventListener("resize", updateDirection);
288
+ return () => {
289
+ window.removeEventListener("resize", updateDirection);
290
+ };
291
+ }, []);
292
+ return /* @__PURE__ */ jsx3(
293
+ "div",
294
+ {
295
+ className: `nu-main-menu__submenu-shell nu-main-menu__submenu-shell--${placement}`,
296
+ "data-open-left": opensLeft || void 0,
297
+ ref: shellRef,
298
+ children
299
+ }
300
+ );
301
+ }
302
+
242
303
  // src/utils/renderMnemonicText.tsx
243
- import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
304
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
244
305
  function parseMnemonicText(inputText) {
245
306
  const outputChars = [];
246
307
  let mnemonicIndex = null;
@@ -277,7 +338,7 @@ function renderMnemonicText(text, keyClassName = "nu-mnemonic__key") {
277
338
  }
278
339
  return /* @__PURE__ */ jsxs2(Fragment2, { children: [
279
340
  parsedText.slice(0, mnemonicIndex),
280
- /* @__PURE__ */ jsx2("span", { className: keyClassName, children: parsedText.slice(mnemonicIndex, mnemonicIndex + 1) }),
341
+ /* @__PURE__ */ jsx4("span", { className: keyClassName, children: parsedText.slice(mnemonicIndex, mnemonicIndex + 1) }),
281
342
  parsedText.slice(mnemonicIndex + 1)
282
343
  ] });
283
344
  }
@@ -286,7 +347,7 @@ function renderMnemonicNode(value, keyClassName = "nu-mnemonic__key") {
286
347
  }
287
348
 
288
349
  // src/components/MainMenu/internals/MainMenuList.tsx
289
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
350
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
290
351
  function getVisibleItems(items) {
291
352
  return items.filter((item) => !item.hidden);
292
353
  }
@@ -315,14 +376,14 @@ function MainMenuList({
315
376
  const visibleItems = getVisibleItems(items);
316
377
  const isRootBar = level === 0 && rootVariant === "bar";
317
378
  const isPopupRow = !isRootBar;
318
- return /* @__PURE__ */ jsx3(
379
+ return /* @__PURE__ */ jsx5(
319
380
  "div",
320
381
  {
321
382
  className: isRootBar ? "nu-main-menu__bar" : "nu-main-menu__popup nu-main-menu__popup--submenu",
322
383
  role: "menu",
323
384
  children: visibleItems.map((item) => {
324
385
  if (isMainMenuDivider(item)) {
325
- return /* @__PURE__ */ jsx3(
386
+ return /* @__PURE__ */ jsx5(
326
387
  "div",
327
388
  {
328
389
  className: "nu-main-menu__divider",
@@ -331,10 +392,18 @@ function MainMenuList({
331
392
  item.id
332
393
  );
333
394
  }
334
- const hasChildren = Boolean(item.items?.some((child) => !child.hidden));
395
+ if (isMainMenuSpacer(item)) {
396
+ return isRootBar ? /* @__PURE__ */ jsx5(Spacer, { className: "nu-main-menu__spacer" }, item.id) : null;
397
+ }
398
+ const hasChildren = Boolean(
399
+ item.items?.some((child) => isMainMenuItem(child) && !child.hidden)
400
+ );
335
401
  const isCheckable = item.checkable === true;
336
402
  const isOpen = activePath[level] === item.id;
337
403
  const isChecked = item.checked === true;
404
+ const hasCheckMark = isCheckable || isChecked;
405
+ const hasLeadingAdornment = isPopupRow && (hasCheckMark || Boolean(item.icon));
406
+ const shortcut = isPopupRow && !hasChildren ? resolveItemShortcut(item) : null;
338
407
  return /* @__PURE__ */ jsxs3(
339
408
  "div",
340
409
  {
@@ -353,42 +422,42 @@ function MainMenuList({
353
422
  "aria-expanded": hasChildren ? isOpen : void 0,
354
423
  "aria-haspopup": hasChildren || void 0,
355
424
  className: "nu-main-menu__item-button",
425
+ "data-has-leading": hasLeadingAdornment || void 0,
356
426
  disabled: item.disabled,
357
427
  onClick: () => onActivateItem(item, level),
358
428
  type: "button",
359
429
  children: [
360
- isPopupRow ? /* @__PURE__ */ jsx3(
361
- "span",
362
- {
363
- "aria-hidden": "true",
364
- className: [
365
- "nu-main-menu__check",
366
- isChecked ? "nu-main-menu__check--active" : null
367
- ].filter(Boolean).join(" "),
368
- children: isCheckable ? /* @__PURE__ */ jsx3(
369
- "span",
370
- {
371
- className: "nu-main-menu__check-box",
372
- "data-unchecked-shape": uncheckedShape,
373
- children: isChecked ? /* @__PURE__ */ jsx3(NuGlyph, { name: "check-mark" }) : null
374
- }
375
- ) : isChecked ? /* @__PURE__ */ jsx3(NuGlyph, { name: "check-mark" }) : null
376
- }
377
- ) : null,
378
- isPopupRow ? /* @__PURE__ */ jsx3("span", { "aria-hidden": "true", className: "nu-main-menu__icon", children: item.icon }) : null,
379
- /* @__PURE__ */ jsx3("span", { className: "nu-main-menu__label", children: renderItemLabel(item) }),
380
- isPopupRow ? /* @__PURE__ */ jsx3("span", { className: "nu-main-menu__shortcut", children: resolveItemShortcut(item) }) : null,
381
- isPopupRow ? /* @__PURE__ */ jsx3("span", { className: "nu-main-menu__submenu-arrow", children: hasChildren ? "\u25B6" : "" }) : null
430
+ hasLeadingAdornment ? /* @__PURE__ */ jsxs3("span", { "aria-hidden": "true", className: "nu-main-menu__leading", children: [
431
+ hasCheckMark ? /* @__PURE__ */ jsx5(
432
+ "span",
433
+ {
434
+ className: [
435
+ "nu-main-menu__check",
436
+ isChecked ? "nu-main-menu__check--active" : null
437
+ ].filter(Boolean).join(" "),
438
+ children: isCheckable ? /* @__PURE__ */ jsx5(
439
+ "span",
440
+ {
441
+ className: "nu-main-menu__check-box",
442
+ "data-unchecked-shape": uncheckedShape,
443
+ children: isChecked ? /* @__PURE__ */ jsx5(NuGlyph, { name: "check-mark" }) : null
444
+ }
445
+ ) : /* @__PURE__ */ jsx5(NuGlyph, { name: "check-mark" })
446
+ }
447
+ ) : null,
448
+ item.icon ? /* @__PURE__ */ jsx5("span", { className: "nu-main-menu__icon", children: item.icon }) : null
449
+ ] }) : null,
450
+ /* @__PURE__ */ jsx5("span", { className: "nu-main-menu__label", children: renderItemLabel(item) }),
451
+ shortcut ? /* @__PURE__ */ jsx5("span", { className: "nu-main-menu__shortcut", children: shortcut }) : null,
452
+ isPopupRow && hasChildren ? /* @__PURE__ */ jsx5("span", { className: "nu-main-menu__submenu-arrow", children: "\u25B6" }) : null
382
453
  ]
383
454
  }
384
455
  ),
385
- hasChildren && isOpen && item.items ? /* @__PURE__ */ jsx3(
386
- "div",
456
+ hasChildren && isOpen && item.items ? /* @__PURE__ */ jsx5(
457
+ MainMenuSubmenuShell,
387
458
  {
388
- className: [
389
- isRootBar ? "nu-main-menu__submenu-shell nu-main-menu__submenu-shell--root" : "nu-main-menu__submenu-shell nu-main-menu__submenu-shell--submenu"
390
- ].join(" "),
391
- children: /* @__PURE__ */ jsx3(
459
+ placement: isRootBar ? "root" : "submenu",
460
+ children: /* @__PURE__ */ jsx5(
392
461
  MainMenuList,
393
462
  {
394
463
  activePath,
@@ -411,9 +480,11 @@ function MainMenuList({
411
480
  }
412
481
 
413
482
  // src/components/MainMenu/MainMenu.tsx
414
- import { jsx as jsx4 } from "react/jsx-runtime";
483
+ import { jsx as jsx6 } from "react/jsx-runtime";
415
484
  function hasVisibleChildren(item) {
416
- return Boolean(item.items?.some((child) => !child.hidden));
485
+ return Boolean(
486
+ item.items?.some((child) => isMainMenuItem(child) && !child.hidden)
487
+ );
417
488
  }
418
489
  function MainMenu({
419
490
  className,
@@ -422,8 +493,8 @@ function MainMenu({
422
493
  uncheckedShape = "box",
423
494
  ...props
424
495
  }) {
425
- const rootRef = useRef(null);
426
- const [activePath, setActivePath] = useState([]);
496
+ const rootRef = useRef2(null);
497
+ const [activePath, setActivePath] = useState2([]);
427
498
  useEffect(() => {
428
499
  function handlePointerDown(event) {
429
500
  if (!rootRef.current?.contains(event.target)) {
@@ -467,13 +538,13 @@ function MainMenu({
467
538
  return [...currentPath.slice(0, level), item.id];
468
539
  });
469
540
  }
470
- return /* @__PURE__ */ jsx4(
541
+ return /* @__PURE__ */ jsx6(
471
542
  "div",
472
543
  {
473
544
  ...props,
474
545
  className: ["nu-main-menu", className].filter(Boolean).join(" "),
475
546
  ref: rootRef,
476
- children: /* @__PURE__ */ jsx4(
547
+ children: /* @__PURE__ */ jsx6(
477
548
  MainMenuList,
478
549
  {
479
550
  activePath,
@@ -489,10 +560,10 @@ function MainMenu({
489
560
  }
490
561
 
491
562
  // src/components/MainMenu/menuState.ts
492
- import { useCallback, useMemo, useState as useState2 } from "react";
563
+ import { useCallback, useMemo, useState as useState3 } from "react";
493
564
  function patchMenuItem(items, id, patch) {
494
565
  return items.map((item) => {
495
- if (item.id === id && !isMainMenuDivider(item)) {
566
+ if (item.id === id && isMainMenuItem(item)) {
496
567
  return {
497
568
  ...item,
498
569
  ...patch
@@ -508,10 +579,10 @@ function patchMenuItem(items, id, patch) {
508
579
  });
509
580
  }
510
581
  function hasVisibleMainMenuItems(items) {
511
- return items.some((item) => !item.hidden);
582
+ return items.some((item) => isMainMenuItem(item) && !item.hidden);
512
583
  }
513
584
  function useMainMenuState(initialMainMenu = []) {
514
- const [mainMenu, setMainMenu] = useState2(initialMainMenu);
585
+ const [mainMenu, setMainMenu] = useState3(initialMainMenu);
515
586
  const setMenuItem = useCallback((id, patch) => {
516
587
  setMainMenu((currentMenu) => patchMenuItem(currentMenu, id, patch));
517
588
  }, []);
@@ -578,7 +649,7 @@ function useMainMenuState(initialMainMenu = []) {
578
649
  const toggleMenuChecked = useCallback((id) => {
579
650
  setMainMenu(
580
651
  (currentMenu) => currentMenu.map((item) => {
581
- if (item.id === id && !isMainMenuDivider(item)) {
652
+ if (item.id === id && isMainMenuItem(item)) {
582
653
  return {
583
654
  ...item,
584
655
  checked: !item.checked
@@ -646,7 +717,7 @@ function useMainMenuState(initialMainMenu = []) {
646
717
  }
647
718
  function toggleMenuCheckedInTree(items, id) {
648
719
  return items.map((item) => {
649
- if (item.id === id && !isMainMenuDivider(item)) {
720
+ if (item.id === id && isMainMenuItem(item)) {
650
721
  return {
651
722
  ...item,
652
723
  checked: !item.checked
@@ -663,16 +734,16 @@ function toggleMenuCheckedInTree(items, id) {
663
734
  }
664
735
 
665
736
  // src/appHost/NuAppHostProvider.tsx
666
- import { useMemo as useMemo5, useState as useState6 } from "react";
737
+ import { useMemo as useMemo5, useState as useState7 } from "react";
667
738
 
668
739
  // src/windowing/internals/MdiWindowPickerDialog.tsx
669
- import { useMemo as useMemo4, useState as useState5 } from "react";
740
+ import { useMemo as useMemo4, useState as useState6 } from "react";
670
741
 
671
742
  // src/components/Button/Button.tsx
672
743
  import {
673
744
  useEffect as useEffect2,
674
- useRef as useRef2,
675
- useState as useState3
745
+ useRef as useRef3,
746
+ useState as useState4
676
747
  } from "react";
677
748
 
678
749
  // src/components/_shared/slotProps.ts
@@ -690,7 +761,7 @@ function mergeSlotStyle(baseStyle, slotStyle) {
690
761
  }
691
762
 
692
763
  // src/components/Button/Button.tsx
693
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
764
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
694
765
  function Button({
695
766
  children,
696
767
  className,
@@ -706,8 +777,8 @@ function Button({
706
777
  variant = "primary",
707
778
  ...props
708
779
  }) {
709
- const buttonRef = useRef2(null);
710
- const [uncontrolledFocused, setUncontrolledFocused] = useState3(defaultFocused);
780
+ const buttonRef = useRef3(null);
781
+ const [uncontrolledFocused, setUncontrolledFocused] = useState4(defaultFocused);
711
782
  const isControlled = focused !== void 0;
712
783
  const resolvedFocused = isControlled ? focused : uncontrolledFocused;
713
784
  useEffect2(() => {
@@ -759,7 +830,7 @@ function Button({
759
830
  className: cx("nu-button__face", slotClassNames?.face),
760
831
  style: slotStyles?.face,
761
832
  children: [
762
- /* @__PURE__ */ jsx5(
833
+ /* @__PURE__ */ jsx7(
763
834
  "span",
764
835
  {
765
836
  "aria-hidden": "true",
@@ -771,7 +842,7 @@ function Button({
771
842
  style: slotStyles?.focusIndicatorLeft
772
843
  }
773
844
  ),
774
- /* @__PURE__ */ jsx5(
845
+ /* @__PURE__ */ jsx7(
775
846
  "span",
776
847
  {
777
848
  className: cx("nu-button__label", slotClassNames?.label),
@@ -779,7 +850,7 @@ function Button({
779
850
  children: renderMnemonicNode(children)
780
851
  }
781
852
  ),
782
- /* @__PURE__ */ jsx5(
853
+ /* @__PURE__ */ jsx7(
783
854
  "span",
784
855
  {
785
856
  "aria-hidden": "true",
@@ -794,7 +865,7 @@ function Button({
794
865
  ]
795
866
  }
796
867
  ),
797
- /* @__PURE__ */ jsx5(
868
+ /* @__PURE__ */ jsx7(
798
869
  "span",
799
870
  {
800
871
  "aria-hidden": "true",
@@ -806,7 +877,7 @@ function Button({
806
877
  style: slotStyles?.shadowRight
807
878
  }
808
879
  ),
809
- /* @__PURE__ */ jsx5(
880
+ /* @__PURE__ */ jsx7(
810
881
  "span",
811
882
  {
812
883
  "aria-hidden": "true",
@@ -831,8 +902,8 @@ import {
831
902
  useId,
832
903
  useImperativeHandle,
833
904
  useMemo as useMemo3,
834
- useRef as useRef4,
835
- useState as useState4
905
+ useRef as useRef5,
906
+ useState as useState5
836
907
  } from "react";
837
908
 
838
909
  // src/components/ListBox/internals/helpers.ts
@@ -880,18 +951,18 @@ function getListBoxItemChecked(item, checkedIds) {
880
951
  }
881
952
 
882
953
  // src/components/ListBox/internals/renderLabel.tsx
883
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
954
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
884
955
  function renderLabel(label, className) {
885
956
  return /* @__PURE__ */ jsxs5("span", { className, children: [
886
- label.icon ? /* @__PURE__ */ jsx6("span", { "aria-hidden": "true", className: `${className}-icon`, children: label.icon }) : null,
887
- /* @__PURE__ */ jsx6("span", { className: `${className}-text`, children: label.text })
957
+ label.icon ? /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", className: `${className}-icon`, children: label.icon }) : null,
958
+ /* @__PURE__ */ jsx8("span", { className: `${className}-text`, children: label.text })
888
959
  ] });
889
960
  }
890
961
 
891
962
  // src/components/ListBox/internals/ListBoxCategoryView.tsx
892
- import { jsx as jsx7 } from "react/jsx-runtime";
963
+ import { jsx as jsx9 } from "react/jsx-runtime";
893
964
  function ListBoxCategoryView({ category }) {
894
- return /* @__PURE__ */ jsx7(
965
+ return /* @__PURE__ */ jsx9(
895
966
  "div",
896
967
  {
897
968
  className: ["nu-listbox__category", category.className].filter(Boolean).join(" "),
@@ -909,7 +980,7 @@ import {
909
980
  useContext,
910
981
  useEffect as useEffect3,
911
982
  useMemo as useMemo2,
912
- useRef as useRef3
983
+ useRef as useRef4
913
984
  } from "react";
914
985
 
915
986
  // src/components/_shared/themePortal.ts
@@ -936,7 +1007,7 @@ function getThemePortalStyle(anchor) {
936
1007
  }
937
1008
 
938
1009
  // src/components/DragDrop/NuDragDropProvider.tsx
939
- import { jsx as jsx8 } from "react/jsx-runtime";
1010
+ import { jsx as jsx10 } from "react/jsx-runtime";
940
1011
  var DRAG_THRESHOLD = 3;
941
1012
  function createDragPreview(sourceElement) {
942
1013
  const rect = sourceElement.getBoundingClientRect();
@@ -1038,7 +1109,7 @@ var fallbackController = createController();
1038
1109
  var NuDragDropContext = createContext(null);
1039
1110
  function NuDragDropProvider({ children }) {
1040
1111
  const controller = useMemo2(() => createController(), []);
1041
- return /* @__PURE__ */ jsx8(NuDragDropContext.Provider, { value: controller, children });
1112
+ return /* @__PURE__ */ jsx10(NuDragDropContext.Provider, { value: controller, children });
1042
1113
  }
1043
1114
  function useNuDragDrop() {
1044
1115
  return useContext(NuDragDropContext) ?? fallbackController;
@@ -1059,7 +1130,7 @@ function useNuDragSource({
1059
1130
  sourceType
1060
1131
  }) {
1061
1132
  const controller = useNuDragDrop();
1062
- const stateRef = useRef3({
1133
+ const stateRef = useRef4({
1063
1134
  dragging: false,
1064
1135
  pointerId: -1,
1065
1136
  sourceElement: null,
@@ -1134,14 +1205,14 @@ function useNuDragSource({
1134
1205
  }
1135
1206
 
1136
1207
  // src/components/ListBox/internals/ListBoxCheckControl.tsx
1137
- import { jsx as jsx9 } from "react/jsx-runtime";
1208
+ import { jsx as jsx11 } from "react/jsx-runtime";
1138
1209
  function ListBoxCheckControl({
1139
1210
  isChecked,
1140
1211
  onActivate,
1141
1212
  onToggleCheck,
1142
1213
  uncheckedShape
1143
1214
  }) {
1144
- return /* @__PURE__ */ jsx9(
1215
+ return /* @__PURE__ */ jsx11(
1145
1216
  "button",
1146
1217
  {
1147
1218
  "aria-label": isChecked ? "Uncheck item" : "Check item",
@@ -1153,13 +1224,13 @@ function ListBoxCheckControl({
1153
1224
  onToggleCheck();
1154
1225
  },
1155
1226
  type: "button",
1156
- children: /* @__PURE__ */ jsx9(
1227
+ children: /* @__PURE__ */ jsx11(
1157
1228
  "span",
1158
1229
  {
1159
1230
  "aria-hidden": "true",
1160
1231
  className: "nu-listbox__check-box",
1161
1232
  "data-unchecked-shape": uncheckedShape,
1162
- children: isChecked ? /* @__PURE__ */ jsx9(NuGlyph, { className: "nu-listbox__check-indicator", name: "check-mark" }) : null
1233
+ children: isChecked ? /* @__PURE__ */ jsx11(NuGlyph, { className: "nu-listbox__check-indicator", name: "check-mark" }) : null
1163
1234
  }
1164
1235
  )
1165
1236
  }
@@ -1167,7 +1238,7 @@ function ListBoxCheckControl({
1167
1238
  }
1168
1239
 
1169
1240
  // src/components/ListBox/internals/ListBoxItemView.tsx
1170
- import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
1241
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
1171
1242
  function ListBoxItemViewInner({
1172
1243
  group,
1173
1244
  getDragItem,
@@ -1209,7 +1280,7 @@ function ListBoxItemViewInner({
1209
1280
  function handleToggleCheck() {
1210
1281
  onToggleCheck(itemId);
1211
1282
  }
1212
- const checkControl = item.checkable ? /* @__PURE__ */ jsx10(
1283
+ const checkControl = item.checkable ? /* @__PURE__ */ jsx12(
1213
1284
  ListBoxCheckControl,
1214
1285
  {
1215
1286
  isChecked,
@@ -1247,7 +1318,7 @@ function ListBoxItemViewInner({
1247
1318
  rightCheckBox ? null : checkControl,
1248
1319
  renderLabel(item.name, "nu-listbox__item-label")
1249
1320
  ] }),
1250
- item.details ? /* @__PURE__ */ jsx10("span", { className: "nu-listbox__item-details", children: item.details }) : null,
1321
+ item.details ? /* @__PURE__ */ jsx12("span", { className: "nu-listbox__item-details", children: item.details }) : null,
1251
1322
  rightCheckBox ? checkControl : null
1252
1323
  ]
1253
1324
  }
@@ -1256,7 +1327,7 @@ function ListBoxItemViewInner({
1256
1327
  var ListBoxItemView = memo(ListBoxItemViewInner);
1257
1328
 
1258
1329
  // src/components/ListBox/internals/ListBoxGroupView.tsx
1259
- import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
1330
+ import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
1260
1331
  function ListBoxGroupView({
1261
1332
  group,
1262
1333
  groupIndex,
@@ -1275,7 +1346,7 @@ function ListBoxGroupView({
1275
1346
  uncheckedShape
1276
1347
  }) {
1277
1348
  return /* @__PURE__ */ jsxs7("div", { className: "nu-listbox__group", role: "group", children: [
1278
- group.category ? /* @__PURE__ */ jsx11(ListBoxCategoryView, { category: group.category }) : null,
1349
+ group.category ? /* @__PURE__ */ jsx13(ListBoxCategoryView, { category: group.category }) : null,
1279
1350
  group.items.map((item, itemIndex) => {
1280
1351
  const itemId = buildListBoxItemId(
1281
1352
  listboxId,
@@ -1287,7 +1358,7 @@ function ListBoxGroupView({
1287
1358
  const isSelected = selectedId ? item.id === selectedId : item.selected;
1288
1359
  const isActive = resolvedActiveId === itemId;
1289
1360
  const isChecked = isItemChecked(item);
1290
- return /* @__PURE__ */ jsx11(
1361
+ return /* @__PURE__ */ jsx13(
1291
1362
  ListBoxItemView,
1292
1363
  {
1293
1364
  group,
@@ -1313,7 +1384,7 @@ function ListBoxGroupView({
1313
1384
  }
1314
1385
 
1315
1386
  // src/components/ListBox/ListBox.tsx
1316
- import { jsx as jsx12 } from "react/jsx-runtime";
1387
+ import { jsx as jsx14 } from "react/jsx-runtime";
1317
1388
  function ListBoxInner({
1318
1389
  acceptsDrop,
1319
1390
  className,
@@ -1333,10 +1404,10 @@ function ListBoxInner({
1333
1404
  ...props
1334
1405
  }, ref) {
1335
1406
  const hasItems = data.some((group) => group.items.length > 0);
1336
- const rootRef = useRef4(null);
1337
- const [rootElement, setRootElement] = useState4(null);
1407
+ const rootRef = useRef5(null);
1408
+ const [rootElement, setRootElement] = useState5(null);
1338
1409
  const listboxId = useId();
1339
- const itemRefs = useRef4({});
1410
+ const itemRefs = useRef5({});
1340
1411
  const flattenedItems = useMemo3(
1341
1412
  () => flattenListBoxData(data, listboxId),
1342
1413
  [data, listboxId]
@@ -1345,7 +1416,7 @@ function ListBoxInner({
1345
1416
  () => flattenedItems.filter(({ item }) => !item.disabled),
1346
1417
  [flattenedItems]
1347
1418
  );
1348
- const [activeId, setActiveId] = useState4(
1419
+ const [activeId, setActiveId] = useState5(
1349
1420
  () => getInitialActiveId(selectableItems, selectedId)
1350
1421
  );
1351
1422
  const dropTargetOptions = useMemo3(
@@ -1505,7 +1576,7 @@ function ListBoxInner({
1505
1576
  break;
1506
1577
  }
1507
1578
  }
1508
- return /* @__PURE__ */ jsx12(
1579
+ return /* @__PURE__ */ jsx14(
1509
1580
  "div",
1510
1581
  {
1511
1582
  ...props,
@@ -1516,7 +1587,7 @@ function ListBoxInner({
1516
1587
  ref: setRootRef,
1517
1588
  role: "listbox",
1518
1589
  tabIndex: 0,
1519
- children: hasItems ? data.map((group, groupIndex) => /* @__PURE__ */ jsx12(
1590
+ children: hasItems ? data.map((group, groupIndex) => /* @__PURE__ */ jsx14(
1520
1591
  ListBoxGroupView,
1521
1592
  {
1522
1593
  group,
@@ -1536,14 +1607,14 @@ function ListBoxInner({
1536
1607
  uncheckedShape
1537
1608
  },
1538
1609
  `${group.category?.text ?? "group"}-${groupIndex}`
1539
- )) : /* @__PURE__ */ jsx12("div", { className: "nu-listbox__empty", children: emptyText })
1610
+ )) : /* @__PURE__ */ jsx14("div", { className: "nu-listbox__empty", children: emptyText })
1540
1611
  }
1541
1612
  );
1542
1613
  }
1543
1614
  var ListBox = forwardRef(ListBoxInner);
1544
1615
 
1545
1616
  // src/components/Stack/Stack.tsx
1546
- import { jsx as jsx13 } from "react/jsx-runtime";
1617
+ import { jsx as jsx15 } from "react/jsx-runtime";
1547
1618
  function resolveFlexAlign(align) {
1548
1619
  if (align === "start") {
1549
1620
  return "flex-start";
@@ -1572,7 +1643,7 @@ function Stack({
1572
1643
  style,
1573
1644
  ...props
1574
1645
  }) {
1575
- return /* @__PURE__ */ jsx13(
1646
+ return /* @__PURE__ */ jsx15(
1576
1647
  "div",
1577
1648
  {
1578
1649
  ...props,
@@ -1592,7 +1663,7 @@ function Stack({
1592
1663
  }
1593
1664
 
1594
1665
  // src/windowing/internals/MdiWindowPickerDialog.tsx
1595
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
1666
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
1596
1667
  function isPickerEligibleWindow(windowEntry) {
1597
1668
  if (windowEntry.mode === "window") {
1598
1669
  return true;
@@ -1632,7 +1703,7 @@ function MdiWindowPickerDialog({
1632
1703
  ),
1633
1704
  [domain, windows]
1634
1705
  );
1635
- const [selectedId, setSelectedId] = useState5(
1706
+ const [selectedId, setSelectedId] = useState6(
1636
1707
  activeWindowId ?? resolvedWindows[0]?.id ?? ""
1637
1708
  );
1638
1709
  const resolvedSelectedId = resolvedWindows.some(
@@ -1646,7 +1717,7 @@ function MdiWindowPickerDialog({
1646
1717
  onClose();
1647
1718
  }
1648
1719
  return /* @__PURE__ */ jsxs8(Stack, { gap: "md", children: [
1649
- /* @__PURE__ */ jsx14(
1720
+ /* @__PURE__ */ jsx16(
1650
1721
  ListBox,
1651
1722
  {
1652
1723
  data: [
@@ -1682,14 +1753,14 @@ function MdiWindowPickerDialog({
1682
1753
  }
1683
1754
  ),
1684
1755
  /* @__PURE__ */ jsxs8(Stack, { direction: "row", gap: "sm", children: [
1685
- /* @__PURE__ */ jsx14(Button, { defaultFocused: true, onClick: handleActivate, children: "Activate" }),
1686
- /* @__PURE__ */ jsx14(Button, { onClick: onClose, variant: "secondary", children: "Cancel" })
1756
+ /* @__PURE__ */ jsx16(Button, { defaultFocused: true, onClick: handleActivate, children: "Activate" }),
1757
+ /* @__PURE__ */ jsx16(Button, { onClick: onClose, variant: "secondary", children: "Cancel" })
1687
1758
  ] })
1688
1759
  ] });
1689
1760
  }
1690
1761
 
1691
1762
  // src/windowing/mdiMenu.tsx
1692
- import { jsx as jsx15 } from "react/jsx-runtime";
1763
+ import { jsx as jsx17 } from "react/jsx-runtime";
1693
1764
  var MDI_HOST_ID = "mdi.host";
1694
1765
  function createMdiDivider(id) {
1695
1766
  return {
@@ -1728,7 +1799,7 @@ function openMdiWindowPicker(bridge) {
1728
1799
  bridge.openDialog({
1729
1800
  appModal: true,
1730
1801
  border: "double",
1731
- content: ({ close }) => /* @__PURE__ */ jsx15(
1802
+ content: ({ close }) => /* @__PURE__ */ jsx17(
1732
1803
  MdiWindowPickerDialog,
1733
1804
  {
1734
1805
  activeWindowId,
@@ -1799,7 +1870,7 @@ function resolveMdiMainMenuItems(items, bridge) {
1799
1870
  if (isMainMenuDivider(item)) {
1800
1871
  return item;
1801
1872
  }
1802
- if (item.id === MDI_HOST_ID) {
1873
+ if (isMainMenuItem(item) && item.id === MDI_HOST_ID) {
1803
1874
  return {
1804
1875
  ...item,
1805
1876
  items: mergeMdiMenuItems(item.items, bridge)
@@ -1846,13 +1917,13 @@ function useAppHostMenu() {
1846
1917
  }
1847
1918
 
1848
1919
  // src/appHost/NuAppHostProvider.tsx
1849
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
1920
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
1850
1921
  function NuAppHostProvider({
1851
1922
  children,
1852
1923
  renderMenu = true
1853
1924
  }) {
1854
1925
  const menuState = useMainMenuState();
1855
- const [windowBridge, setWindowBridge] = useState6(
1926
+ const [windowBridge, setWindowBridge] = useState7(
1856
1927
  null
1857
1928
  );
1858
1929
  const resolvedMainMenu = useMemo5(
@@ -1868,7 +1939,7 @@ function NuAppHostProvider({
1868
1939
  [menuState, windowBridge]
1869
1940
  );
1870
1941
  return /* @__PURE__ */ jsxs9(AppHostMenuContext.Provider, { value: contextValue, children: [
1871
- renderMenu && hasVisibleMainMenuItems(resolvedMainMenu) ? /* @__PURE__ */ jsx16(MainMenu, { items: resolvedMainMenu }) : null,
1942
+ renderMenu && hasVisibleMainMenuItems(resolvedMainMenu) ? /* @__PURE__ */ jsx18(MainMenu, { items: resolvedMainMenu }) : null,
1872
1943
  children
1873
1944
  ] });
1874
1945
  }
@@ -1880,24 +1951,24 @@ import {
1880
1951
  useContext as useContext7,
1881
1952
  useEffect as useEffect6,
1882
1953
  useMemo as useMemo7,
1883
- useRef as useRef7,
1884
- useState as useState9
1954
+ useRef as useRef8,
1955
+ useState as useState10
1885
1956
  } from "react";
1886
1957
 
1887
1958
  // src/components/Window/Window.tsx
1888
1959
  import {
1889
1960
  memo as memo2,
1890
1961
  useContext as useContext5,
1891
- useLayoutEffect,
1962
+ useLayoutEffect as useLayoutEffect2,
1892
1963
  useMemo as useMemo6,
1893
- useRef as useRef5
1964
+ useRef as useRef6
1894
1965
  } from "react";
1895
1966
 
1896
1967
  // src/components/Window/internals/WindowStatusBar.tsx
1897
1968
  import { Children } from "react";
1898
1969
 
1899
1970
  // src/components/Window/StatusBarItem.tsx
1900
- import { jsx as jsx17 } from "react/jsx-runtime";
1971
+ import { jsx as jsx19 } from "react/jsx-runtime";
1901
1972
  function StatusBarItem({
1902
1973
  align = "start",
1903
1974
  children,
@@ -1905,7 +1976,7 @@ function StatusBarItem({
1905
1976
  grow = false,
1906
1977
  ...props
1907
1978
  }) {
1908
- return /* @__PURE__ */ jsx17(
1979
+ return /* @__PURE__ */ jsx19(
1909
1980
  "span",
1910
1981
  {
1911
1982
  ...props,
@@ -1921,7 +1992,7 @@ function StatusBarItem({
1921
1992
  }
1922
1993
 
1923
1994
  // src/components/Window/internals/WindowStatusBar.tsx
1924
- import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
1995
+ import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1925
1996
  function WindowStatusBar({
1926
1997
  children,
1927
1998
  onResizeStart,
@@ -1937,15 +2008,15 @@ function WindowStatusBar({
1937
2008
  {
1938
2009
  className: ["nu-window__status-bar", statusBarClassName].filter(Boolean).join(" "),
1939
2010
  children: [
1940
- /* @__PURE__ */ jsx18("span", { className: "nu-window__status-bar-items", children: hasCustomItems ? resolvedChildren : resolvedChildren.map((child, index) => /* @__PURE__ */ jsx18(StatusBarItem, { grow: index === 0, children: child }, `status-item-${index}`)) }),
1941
- resizable ? /* @__PURE__ */ jsx18(
2011
+ /* @__PURE__ */ jsx20("span", { className: "nu-window__status-bar-items", children: hasCustomItems ? resolvedChildren : resolvedChildren.map((child, index) => /* @__PURE__ */ jsx20(StatusBarItem, { grow: index === 0, children: child }, `status-item-${index}`)) }),
2012
+ resizable ? /* @__PURE__ */ jsx20(
1942
2013
  "button",
1943
2014
  {
1944
2015
  "aria-label": "Resize window",
1945
2016
  className: "nu-window__resize-handle",
1946
2017
  onPointerDown: onResizeStart,
1947
2018
  type: "button",
1948
- children: /* @__PURE__ */ jsx18(NuGlyph, { name: "window-resize" })
2019
+ children: /* @__PURE__ */ jsx20(NuGlyph, { name: "window-resize" })
1949
2020
  }
1950
2021
  ) : null
1951
2022
  ]
@@ -1954,18 +2025,18 @@ function WindowStatusBar({
1954
2025
  }
1955
2026
 
1956
2027
  // src/components/Window/WindowTitleButton.tsx
1957
- import { jsx as jsx19 } from "react/jsx-runtime";
2028
+ import { jsx as jsx21 } from "react/jsx-runtime";
1958
2029
  function renderWindowTriangleGlyph(icon) {
1959
2030
  const glyphNameByIcon = {
1960
2031
  maximize: "window-maximize",
1961
2032
  minimize: "window-minimize",
1962
2033
  restore: "window-restore"
1963
2034
  };
1964
- return /* @__PURE__ */ jsx19(NuGlyph, { className: "nu-window__title-glyph", name: glyphNameByIcon[icon] });
2035
+ return /* @__PURE__ */ jsx21(NuGlyph, { className: "nu-window__title-glyph", name: glyphNameByIcon[icon] });
1965
2036
  }
1966
2037
  function renderTitleButtonIcon(icon) {
1967
2038
  if (icon === "close") {
1968
- return /* @__PURE__ */ jsx19(NuGlyph, { className: "nu-window__title-glyph", name: "window-close" });
2039
+ return /* @__PURE__ */ jsx21(NuGlyph, { className: "nu-window__title-glyph", name: "window-close" });
1969
2040
  }
1970
2041
  if (icon === "minimize" || icon === "maximize" || icon === "restore") {
1971
2042
  return renderWindowTriangleGlyph(
@@ -1984,7 +2055,7 @@ function WindowTitleButton({
1984
2055
  variant = icon === "close" ? "close" : "default",
1985
2056
  ...props
1986
2057
  }) {
1987
- return /* @__PURE__ */ jsx19(
2058
+ return /* @__PURE__ */ jsx21(
1988
2059
  "button",
1989
2060
  {
1990
2061
  ...props,
@@ -2006,7 +2077,7 @@ function WindowTitleButton({
2006
2077
  }
2007
2078
 
2008
2079
  // src/components/Window/internals/WindowTitleBar.tsx
2009
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
2080
+ import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
2010
2081
  function WindowTitleBar({
2011
2082
  draggable,
2012
2083
  icon,
@@ -2025,9 +2096,9 @@ function WindowTitleBar({
2025
2096
  "--nu-window-title-controls-width": controlsWidth
2026
2097
  },
2027
2098
  children: [
2028
- /* @__PURE__ */ jsx20("span", { "aria-hidden": true, className: "nu-window__title-icon", children: icon }),
2029
- /* @__PURE__ */ jsx20("span", { className: "nu-window__title", children: renderMnemonicText(title) }),
2030
- titleButtons.length > 0 ? /* @__PURE__ */ jsx20("span", { className: "nu-window__title-controls", children: titleButtons.map((button, index) => /* @__PURE__ */ jsx20(
2099
+ /* @__PURE__ */ jsx22("span", { "aria-hidden": true, className: "nu-window__title-icon", children: icon }),
2100
+ /* @__PURE__ */ jsx22("span", { className: "nu-window__title", children: renderMnemonicText(title) }),
2101
+ titleButtons.length > 0 ? /* @__PURE__ */ jsx22("span", { className: "nu-window__title-controls", children: titleButtons.map((button, index) => /* @__PURE__ */ jsx22(
2031
2102
  WindowTitleButton,
2032
2103
  {
2033
2104
  ariaLabel: button.ariaLabel,
@@ -2108,7 +2179,7 @@ function useWindowMenu() {
2108
2179
  }
2109
2180
 
2110
2181
  // src/components/Window/Window.tsx
2111
- import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
2182
+ import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
2112
2183
  function getWindowLayerBounds(node) {
2113
2184
  const parentNode = node.parentElement;
2114
2185
  if (!parentNode) {
@@ -2163,11 +2234,11 @@ function WindowInner({
2163
2234
  title,
2164
2235
  ...props
2165
2236
  }) {
2166
- const windowRef = useRef5(null);
2167
- const dragFrameRef = useRef5(null);
2168
- const dragPositionRef = useRef5(null);
2169
- const resizeFrameRef = useRef5(null);
2170
- const resizeSizeRef = useRef5(null);
2237
+ const windowRef = useRef6(null);
2238
+ const dragFrameRef = useRef6(null);
2239
+ const dragPositionRef = useRef6(null);
2240
+ const resizeFrameRef = useRef6(null);
2241
+ const resizeSizeRef = useRef6(null);
2171
2242
  const menuState = useMainMenuState();
2172
2243
  const windowManager = useContext5(NuWindowContext);
2173
2244
  const isDraggable = draggable ?? mode === "window";
@@ -2198,7 +2269,7 @@ function WindowInner({
2198
2269
  onToggleMinimized
2199
2270
  });
2200
2271
  const resolvedTitleButtons = titleButtons ?? systemTitleButtons;
2201
- useLayoutEffect(() => {
2272
+ useLayoutEffect2(() => {
2202
2273
  if (!onBoundsChange || !windowRef.current || minimized) {
2203
2274
  return;
2204
2275
  }
@@ -2411,14 +2482,14 @@ function WindowInner({
2411
2482
  minWidth: minWidth ?? style?.minWidth ?? 240
2412
2483
  },
2413
2484
  children: [
2414
- /* @__PURE__ */ jsx21(
2485
+ /* @__PURE__ */ jsx23(
2415
2486
  "span",
2416
2487
  {
2417
2488
  "aria-hidden": true,
2418
2489
  className: "nu-window__shadow nu-window__shadow--right"
2419
2490
  }
2420
2491
  ),
2421
- /* @__PURE__ */ jsx21(
2492
+ /* @__PURE__ */ jsx23(
2422
2493
  "span",
2423
2494
  {
2424
2495
  "aria-hidden": true,
@@ -2426,7 +2497,7 @@ function WindowInner({
2426
2497
  }
2427
2498
  ),
2428
2499
  /* @__PURE__ */ jsxs12(WindowMenuContext.Provider, { value: menuState, children: [
2429
- /* @__PURE__ */ jsx21(
2500
+ /* @__PURE__ */ jsx23(
2430
2501
  WindowTitleBar,
2431
2502
  {
2432
2503
  draggable: isDraggable,
@@ -2436,8 +2507,8 @@ function WindowInner({
2436
2507
  titleButtons: resolvedTitleButtons
2437
2508
  }
2438
2509
  ),
2439
- hasVisibleMainMenuItems(resolvedMainMenu) ? /* @__PURE__ */ jsx21(MainMenu, { items: resolvedMainMenu }) : null,
2440
- /* @__PURE__ */ jsx21(
2510
+ hasVisibleMainMenuItems(resolvedMainMenu) ? /* @__PURE__ */ jsx23(MainMenu, { items: resolvedMainMenu }) : null,
2511
+ /* @__PURE__ */ jsx23(
2441
2512
  "div",
2442
2513
  {
2443
2514
  className: [
@@ -2448,7 +2519,7 @@ function WindowInner({
2448
2519
  children
2449
2520
  }
2450
2521
  ),
2451
- mode === "window" && (statusBar || isResizable) ? /* @__PURE__ */ jsx21(
2522
+ mode === "window" && (statusBar || isResizable) ? /* @__PURE__ */ jsx23(
2452
2523
  WindowStatusBar,
2453
2524
  {
2454
2525
  onResizeStart: handleResizePointerDown,
@@ -2465,9 +2536,9 @@ function WindowInner({
2465
2536
  var Window = memo2(WindowInner);
2466
2537
 
2467
2538
  // src/windowing/AppBarHost.tsx
2468
- import { jsx as jsx22 } from "react/jsx-runtime";
2539
+ import { jsx as jsx24 } from "react/jsx-runtime";
2469
2540
  function AppBarHost({ children, inline = false }) {
2470
- return /* @__PURE__ */ jsx22(
2541
+ return /* @__PURE__ */ jsx24(
2471
2542
  "aside",
2472
2543
  {
2473
2544
  className: [
@@ -2557,7 +2628,7 @@ function AppBarItem(props) {
2557
2628
  }
2558
2629
 
2559
2630
  // src/windowing/WindowBar.tsx
2560
- import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
2631
+ import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
2561
2632
  function buildWindowBarGroups(items) {
2562
2633
  const groups = [];
2563
2634
  const groupsByDomain = /* @__PURE__ */ new Map();
@@ -2617,7 +2688,7 @@ function WindowBar({ items, onActivateWindow }) {
2617
2688
  const dialogDefinition = {
2618
2689
  appModal: true,
2619
2690
  border: "double",
2620
- content: ({ close }) => /* @__PURE__ */ jsx23(
2691
+ content: ({ close }) => /* @__PURE__ */ jsx25(
2621
2692
  MdiWindowPickerDialog,
2622
2693
  {
2623
2694
  activeWindowId: activeGroupWindowId,
@@ -2638,7 +2709,7 @@ function WindowBar({ items, onActivateWindow }) {
2638
2709
  };
2639
2710
  windowManager.openDialog(dialogDefinition);
2640
2711
  }
2641
- return /* @__PURE__ */ jsx23("div", { className: "nu-window-bar", role: "group", "aria-label": "Open windows", children: groups.map((group) => {
2712
+ return /* @__PURE__ */ jsx25("div", { className: "nu-window-bar", role: "group", "aria-label": "Open windows", children: groups.map((group) => {
2642
2713
  const icon = getGroupIcon(group);
2643
2714
  return /* @__PURE__ */ jsxs13(
2644
2715
  AppBarItem,
@@ -2648,7 +2719,7 @@ function WindowBar({ items, onActivateWindow }) {
2648
2719
  interactive: true,
2649
2720
  onClick: () => activateGroup(group),
2650
2721
  children: [
2651
- icon ? /* @__PURE__ */ jsx23("span", { "aria-hidden": true, className: "nu-window-bar__icon", children: icon }) : null,
2722
+ icon ? /* @__PURE__ */ jsx25("span", { "aria-hidden": true, className: "nu-window-bar__icon", children: icon }) : null,
2652
2723
  group.label
2653
2724
  ]
2654
2725
  },
@@ -2658,16 +2729,16 @@ function WindowBar({ items, onActivateWindow }) {
2658
2729
  }
2659
2730
 
2660
2731
  // src/windowing/dialogHelpers.tsx
2661
- import { useState as useState8 } from "react";
2732
+ import { useState as useState9 } from "react";
2662
2733
 
2663
2734
  // src/components/TextField/TextField.tsx
2664
2735
  import {
2665
2736
  useEffect as useEffect5,
2666
2737
  useId as useId2,
2667
- useRef as useRef6,
2668
- useState as useState7
2738
+ useRef as useRef7,
2739
+ useState as useState8
2669
2740
  } from "react";
2670
- import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
2741
+ import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
2671
2742
  function TextField({
2672
2743
  className,
2673
2744
  debounceMs = 0,
@@ -2688,8 +2759,8 @@ function TextField({
2688
2759
  const fieldId = id ?? generatedId;
2689
2760
  const hintId = hint ? `${fieldId}-hint` : void 0;
2690
2761
  const isControlled = value !== void 0;
2691
- const hasMountedRef = useRef6(false);
2692
- const [uncontrolledValue, setUncontrolledValue] = useState7(
2762
+ const hasMountedRef = useRef7(false);
2763
+ const [uncontrolledValue, setUncontrolledValue] = useState8(
2693
2764
  () => defaultValue == null ? "" : String(defaultValue)
2694
2765
  );
2695
2766
  const resolvedValue = isControlled ? value == null ? "" : String(value) : uncontrolledValue;
@@ -2725,7 +2796,7 @@ function TextField({
2725
2796
  htmlFor: fieldId,
2726
2797
  style: slotStyles?.root,
2727
2798
  children: [
2728
- /* @__PURE__ */ jsx24(
2799
+ /* @__PURE__ */ jsx26(
2729
2800
  "span",
2730
2801
  {
2731
2802
  className: cx("nu-text-field__label", slotClassNames?.label),
@@ -2739,7 +2810,7 @@ function TextField({
2739
2810
  className: cx("nu-text-field__slot", slotClassNames?.slot),
2740
2811
  style: slotStyles?.slot,
2741
2812
  children: [
2742
- /* @__PURE__ */ jsx24(
2813
+ /* @__PURE__ */ jsx26(
2743
2814
  "span",
2744
2815
  {
2745
2816
  "aria-hidden": "true",
@@ -2748,7 +2819,7 @@ function TextField({
2748
2819
  children: "["
2749
2820
  }
2750
2821
  ),
2751
- /* @__PURE__ */ jsx24(
2822
+ /* @__PURE__ */ jsx26(
2752
2823
  "span",
2753
2824
  {
2754
2825
  className: cx(
@@ -2756,7 +2827,7 @@ function TextField({
2756
2827
  slotClassNames?.inputShell
2757
2828
  ),
2758
2829
  style: slotStyles?.inputShell,
2759
- children: /* @__PURE__ */ jsx24(
2830
+ children: /* @__PURE__ */ jsx26(
2760
2831
  "input",
2761
2832
  {
2762
2833
  ...props,
@@ -2775,7 +2846,7 @@ function TextField({
2775
2846
  )
2776
2847
  }
2777
2848
  ),
2778
- /* @__PURE__ */ jsx24(
2849
+ /* @__PURE__ */ jsx26(
2779
2850
  "span",
2780
2851
  {
2781
2852
  "aria-hidden": "true",
@@ -2787,7 +2858,7 @@ function TextField({
2787
2858
  ]
2788
2859
  }
2789
2860
  ),
2790
- hint ? /* @__PURE__ */ jsx24(
2861
+ hint ? /* @__PURE__ */ jsx26(
2791
2862
  "span",
2792
2863
  {
2793
2864
  className: cx("nu-text-field__hint", slotClassNames?.hint),
@@ -2802,7 +2873,7 @@ function TextField({
2802
2873
  }
2803
2874
 
2804
2875
  // src/components/View/NuView.tsx
2805
- import { jsx as jsx25 } from "react/jsx-runtime";
2876
+ import { jsx as jsx27 } from "react/jsx-runtime";
2806
2877
  function NuView({
2807
2878
  children,
2808
2879
  className,
@@ -2811,7 +2882,7 @@ function NuView({
2811
2882
  scroll = "auto",
2812
2883
  ...props
2813
2884
  }) {
2814
- return /* @__PURE__ */ jsx25(
2885
+ return /* @__PURE__ */ jsx27(
2815
2886
  "div",
2816
2887
  {
2817
2888
  ...props,
@@ -2825,7 +2896,7 @@ function NuView({
2825
2896
  }
2826
2897
 
2827
2898
  // src/windowing/dialogHelpers.tsx
2828
- import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
2899
+ import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
2829
2900
  function getPresetButtons(preset) {
2830
2901
  switch (preset) {
2831
2902
  case "ok-cancel":
@@ -2928,8 +2999,8 @@ function MessageBoxDialogContent({
2928
2999
  const bodyStyle = kind === "error" ? {
2929
3000
  background: "var(--nu-color-button-danger)"
2930
3001
  } : void 0;
2931
- return /* @__PURE__ */ jsx26(NuView, { padding: "cell", style: bodyStyle, children: /* @__PURE__ */ jsxs15(Stack, { gap: "md", children: [
2932
- /* @__PURE__ */ jsx26(
3002
+ return /* @__PURE__ */ jsx28(NuView, { padding: "cell", style: bodyStyle, children: /* @__PURE__ */ jsxs15(Stack, { gap: "md", children: [
3003
+ /* @__PURE__ */ jsx28(
2933
3004
  "div",
2934
3005
  {
2935
3006
  style: tone ? {
@@ -2939,7 +3010,7 @@ function MessageBoxDialogContent({
2939
3010
  }
2940
3011
  ),
2941
3012
  /* @__PURE__ */ jsxs15(Stack, { direction: "row", gap: "sm", justify: "center", children: [
2942
- ok ? /* @__PURE__ */ jsx26(
3013
+ ok ? /* @__PURE__ */ jsx28(
2943
3014
  Button,
2944
3015
  {
2945
3016
  className: "nu-dialog-helper__button",
@@ -2948,7 +3019,7 @@ function MessageBoxDialogContent({
2948
3019
  children: okLabel
2949
3020
  }
2950
3021
  ) : null,
2951
- yes ? /* @__PURE__ */ jsx26(
3022
+ yes ? /* @__PURE__ */ jsx28(
2952
3023
  Button,
2953
3024
  {
2954
3025
  className: "nu-dialog-helper__button",
@@ -2957,7 +3028,7 @@ function MessageBoxDialogContent({
2957
3028
  children: yesLabel
2958
3029
  }
2959
3030
  ) : null,
2960
- no ? /* @__PURE__ */ jsx26(
3031
+ no ? /* @__PURE__ */ jsx28(
2961
3032
  Button,
2962
3033
  {
2963
3034
  className: "nu-dialog-helper__button",
@@ -2966,7 +3037,7 @@ function MessageBoxDialogContent({
2966
3037
  children: noLabel
2967
3038
  }
2968
3039
  ) : null,
2969
- cancel ? /* @__PURE__ */ jsx26(
3040
+ cancel ? /* @__PURE__ */ jsx28(
2970
3041
  Button,
2971
3042
  {
2972
3043
  className: "nu-dialog-helper__button",
@@ -2987,9 +3058,9 @@ function InputBoxDialogContent({
2987
3058
  onResolve,
2988
3059
  placeholder
2989
3060
  }) {
2990
- const [value, setValue] = useState8(defaultValue ?? "");
2991
- return /* @__PURE__ */ jsx26(NuView, { padding: "cell", children: /* @__PURE__ */ jsxs15(Stack, { gap: "md", children: [
2992
- /* @__PURE__ */ jsx26(
3061
+ const [value, setValue] = useState9(defaultValue ?? "");
3062
+ return /* @__PURE__ */ jsx28(NuView, { padding: "cell", children: /* @__PURE__ */ jsxs15(Stack, { gap: "md", children: [
3063
+ /* @__PURE__ */ jsx28(
2993
3064
  TextField,
2994
3065
  {
2995
3066
  autoFocus: true,
@@ -3001,7 +3072,7 @@ function InputBoxDialogContent({
3001
3072
  }
3002
3073
  ),
3003
3074
  /* @__PURE__ */ jsxs15(Stack, { direction: "row", gap: "sm", justify: "center", children: [
3004
- /* @__PURE__ */ jsx26(
3075
+ /* @__PURE__ */ jsx28(
3005
3076
  Button,
3006
3077
  {
3007
3078
  className: "nu-dialog-helper__button",
@@ -3010,7 +3081,7 @@ function InputBoxDialogContent({
3010
3081
  children: okLabel
3011
3082
  }
3012
3083
  ),
3013
- /* @__PURE__ */ jsx26(
3084
+ /* @__PURE__ */ jsx28(
3014
3085
  Button,
3015
3086
  {
3016
3087
  className: "nu-dialog-helper__button",
@@ -3024,7 +3095,7 @@ function InputBoxDialogContent({
3024
3095
  }
3025
3096
 
3026
3097
  // src/windowing/NuWindowProvider.tsx
3027
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
3098
+ import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
3028
3099
  function getDefaultWindowStyle(mode, index) {
3029
3100
  const offset = index * 18;
3030
3101
  return {
@@ -3169,11 +3240,11 @@ function NuWindowProvider({
3169
3240
  onAppModalChange,
3170
3241
  renderAppBar = false
3171
3242
  }) {
3172
- const creationOrderRef = useRef7(0);
3173
- const idRef = useRef7(0);
3174
- const windowBoundsByIdRef = useRef7({});
3175
- const [windows, setWindows] = useState9([]);
3176
- const [windowBoundsById, setWindowBoundsById] = useState9({});
3243
+ const creationOrderRef = useRef8(0);
3244
+ const idRef = useRef8(0);
3245
+ const windowBoundsByIdRef = useRef8({});
3246
+ const [windows, setWindows] = useState10([]);
3247
+ const [windowBoundsById, setWindowBoundsById] = useState10({});
3177
3248
  const appHostMenuContext = useContext7(AppHostMenuContext);
3178
3249
  const nextId = useCallback3(() => {
3179
3250
  idRef.current += 1;
@@ -3419,7 +3490,7 @@ function NuWindowProvider({
3419
3490
  openDialog({
3420
3491
  appModal: options.appModal ?? true,
3421
3492
  closeable: true,
3422
- content: ({ close }) => /* @__PURE__ */ jsx27(
3493
+ content: ({ close }) => /* @__PURE__ */ jsx29(
3423
3494
  MessageBoxDialogContent,
3424
3495
  {
3425
3496
  cancel: buttons.cancel,
@@ -3462,7 +3533,7 @@ function NuWindowProvider({
3462
3533
  openDialog({
3463
3534
  appModal: options.appModal ?? true,
3464
3535
  closeable: true,
3465
- content: ({ close }) => /* @__PURE__ */ jsx27(
3536
+ content: ({ close }) => /* @__PURE__ */ jsx29(
3466
3537
  InputBoxDialogContent,
3467
3538
  {
3468
3539
  cancelLabel: options.cancelLabel ?? "&Cancel",
@@ -3593,9 +3664,9 @@ function NuWindowProvider({
3593
3664
  useEffect6(() => {
3594
3665
  onAppModalChange?.(hasAppModal);
3595
3666
  }, [hasAppModal, onAppModalChange]);
3596
- return /* @__PURE__ */ jsx27(NuWindowContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs16("div", { className: ["nu-window-host", className].filter(Boolean).join(" "), children: [
3667
+ return /* @__PURE__ */ jsx29(NuWindowContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs16("div", { className: ["nu-window-host", className].filter(Boolean).join(" "), children: [
3597
3668
  children,
3598
- /* @__PURE__ */ jsx27("div", { className: "nu-window-layer", children: renderWindows.map((windowEntry) => {
3669
+ /* @__PURE__ */ jsx29("div", { className: "nu-window-layer", children: renderWindows.map((windowEntry) => {
3599
3670
  const isActiveWindow = isWindowActive(windowEntry);
3600
3671
  const stackIndex = stackIndexById.get(windowEntry.id);
3601
3672
  const isTopmostAppModal = windowEntry.id === topmostAppModalId;
@@ -3625,20 +3696,20 @@ function NuWindowProvider({
3625
3696
  };
3626
3697
  const content = typeof windowEntry.content === "function" ? windowEntry.content(controls) : windowEntry.content;
3627
3698
  return /* @__PURE__ */ jsxs16(Fragment3, { children: [
3628
- isTopmostAppModal ? /* @__PURE__ */ jsx27(
3699
+ isTopmostAppModal ? /* @__PURE__ */ jsx29(
3629
3700
  "div",
3630
3701
  {
3631
3702
  className: "nu-window-layer__modal-backdrop",
3632
3703
  style: { zIndex: visibleWindows.length + 1 }
3633
3704
  }
3634
- ) : ownerBackdropStyle ? /* @__PURE__ */ jsx27(
3705
+ ) : ownerBackdropStyle ? /* @__PURE__ */ jsx29(
3635
3706
  "div",
3636
3707
  {
3637
3708
  className: "nu-window-layer__modal-backdrop",
3638
3709
  style: ownerBackdropStyle
3639
3710
  }
3640
3711
  ) : null,
3641
- /* @__PURE__ */ jsx27(
3712
+ /* @__PURE__ */ jsx29(
3642
3713
  Window,
3643
3714
  {
3644
3715
  active: isActiveWindow,
@@ -3675,7 +3746,7 @@ function NuWindowProvider({
3675
3746
  )
3676
3747
  ] }, windowEntry.id);
3677
3748
  }) }),
3678
- renderAppBar ? /* @__PURE__ */ jsx27(AppBarHost, { children: /* @__PURE__ */ jsx27(
3749
+ renderAppBar ? /* @__PURE__ */ jsx29(AppBarHost, { children: /* @__PURE__ */ jsx29(
3679
3750
  WindowBar,
3680
3751
  {
3681
3752
  items: windowsInfo.map((windowEntry) => ({
@@ -3693,11 +3764,11 @@ function NuWindowProvider({
3693
3764
  }
3694
3765
 
3695
3766
  // src/components/Desktop/Desktop.tsx
3696
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
3767
+ import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
3697
3768
  function DesktopWindowRegion({ appBar, children }) {
3698
3769
  return /* @__PURE__ */ jsxs17(Fragment4, { children: [
3699
- /* @__PURE__ */ jsx28("div", { className: "nu-desktop__workspace", children }),
3700
- appBar ? /* @__PURE__ */ jsx28("div", { className: "nu-desktop__app-bar", children: appBar }) : null
3770
+ /* @__PURE__ */ jsx30("div", { className: "nu-desktop__workspace", children }),
3771
+ appBar ? /* @__PURE__ */ jsx30("div", { className: "nu-desktop__app-bar", children: appBar }) : null
3701
3772
  ] });
3702
3773
  }
3703
3774
  function NuDesktop({
@@ -3707,12 +3778,12 @@ function NuDesktop({
3707
3778
  className,
3708
3779
  ...props
3709
3780
  }) {
3710
- const [hasAppModal, setHasAppModal] = useState10(false);
3781
+ const [hasAppModal, setHasAppModal] = useState11(false);
3711
3782
  const appHostContext = useContext8(AppHostMenuContext);
3712
3783
  if (appHostContext) {
3713
3784
  throw new Error("NuDesktop should not be nested inside another app host.");
3714
3785
  }
3715
- return /* @__PURE__ */ jsx28(NuAppHostProvider, { renderMenu: false, children: /* @__PURE__ */ jsx28(
3786
+ return /* @__PURE__ */ jsx30(NuAppHostProvider, { renderMenu: false, children: /* @__PURE__ */ jsx30(
3716
3787
  NuDesktopShell,
3717
3788
  {
3718
3789
  appBar: appBar ?? appBarContent,
@@ -3747,14 +3818,14 @@ function NuDesktopShell({
3747
3818
  className: ["nu-desktop", className].filter(Boolean).join(" "),
3748
3819
  "data-modal-active": hasAppModal || void 0,
3749
3820
  children: [
3750
- hasVisibleMainMenuItems(resolvedMainMenu) ? /* @__PURE__ */ jsx28("div", { className: "nu-desktop__menu", children: /* @__PURE__ */ jsx28(MainMenu, { items: resolvedMainMenu }) }) : null,
3751
- /* @__PURE__ */ jsx28(
3821
+ hasVisibleMainMenuItems(resolvedMainMenu) ? /* @__PURE__ */ jsx30("div", { className: "nu-desktop__menu", children: /* @__PURE__ */ jsx30(MainMenu, { items: resolvedMainMenu }) }) : null,
3822
+ /* @__PURE__ */ jsx30(
3752
3823
  NuWindowProvider,
3753
3824
  {
3754
3825
  className: "nu-desktop__window-region",
3755
3826
  onAppModalChange,
3756
3827
  renderAppBar: false,
3757
- children: /* @__PURE__ */ jsx28(DesktopWindowRegion, { appBar, children })
3828
+ children: /* @__PURE__ */ jsx30(DesktopWindowRegion, { appBar, children })
3758
3829
  }
3759
3830
  )
3760
3831
  ]
@@ -3763,7 +3834,7 @@ function NuDesktopShell({
3763
3834
  }
3764
3835
 
3765
3836
  // src/components/Dashboard/Dashboard.tsx
3766
- import { jsx as jsx29 } from "react/jsx-runtime";
3837
+ import { jsx as jsx31 } from "react/jsx-runtime";
3767
3838
  function resolveDashboardGap(gap) {
3768
3839
  if (typeof gap === "number") {
3769
3840
  return `${gap}px`;
@@ -3784,7 +3855,7 @@ function Dashboard({
3784
3855
  const resolvedGap = resolveDashboardGap(gap);
3785
3856
  if (layout === "lanes") {
3786
3857
  const lanes = Array.from({ length: laneCount }, (_, index) => index + 1);
3787
- return /* @__PURE__ */ jsx29(
3858
+ return /* @__PURE__ */ jsx31(
3788
3859
  "div",
3789
3860
  {
3790
3861
  ...props,
@@ -3796,7 +3867,7 @@ function Dashboard({
3796
3867
  "--nu-dashboard-gap": resolvedGap,
3797
3868
  "--nu-dashboard-lane-count": laneCount
3798
3869
  },
3799
- children: lanes.map((lane) => /* @__PURE__ */ jsx29("div", { className: "nu-dashboard__lane", children: items.filter((item) => (item.lane ?? 1) === lane).map((item) => /* @__PURE__ */ jsx29(
3870
+ children: lanes.map((lane) => /* @__PURE__ */ jsx31("div", { className: "nu-dashboard__lane", children: items.filter((item) => (item.lane ?? 1) === lane).map((item) => /* @__PURE__ */ jsx31(
3800
3871
  "div",
3801
3872
  {
3802
3873
  className: "nu-dashboard__cell",
@@ -3808,14 +3879,14 @@ function Dashboard({
3808
3879
  minWidth: item.minWidth,
3809
3880
  width: item.width
3810
3881
  },
3811
- children: /* @__PURE__ */ jsx29("div", { className: "nu-dashboard__content", children: item.content })
3882
+ children: /* @__PURE__ */ jsx31("div", { className: "nu-dashboard__content", children: item.content })
3812
3883
  },
3813
3884
  item.id
3814
3885
  )) }, lane))
3815
3886
  }
3816
3887
  );
3817
3888
  }
3818
- return /* @__PURE__ */ jsx29(
3889
+ return /* @__PURE__ */ jsx31(
3819
3890
  "div",
3820
3891
  {
3821
3892
  ...props,
@@ -3826,7 +3897,7 @@ function Dashboard({
3826
3897
  "--nu-dashboard-column-count": columnCount,
3827
3898
  "--nu-dashboard-gap": resolvedGap
3828
3899
  },
3829
- children: items.map((item) => /* @__PURE__ */ jsx29(
3900
+ children: items.map((item) => /* @__PURE__ */ jsx31(
3830
3901
  "div",
3831
3902
  {
3832
3903
  className: "nu-dashboard__cell",
@@ -3840,7 +3911,7 @@ function Dashboard({
3840
3911
  minWidth: item.minWidth,
3841
3912
  width: item.width
3842
3913
  },
3843
- children: /* @__PURE__ */ jsx29("div", { className: "nu-dashboard__content", children: item.content })
3914
+ children: /* @__PURE__ */ jsx31("div", { className: "nu-dashboard__content", children: item.content })
3844
3915
  },
3845
3916
  item.id
3846
3917
  ))
@@ -3849,8 +3920,8 @@ function Dashboard({
3849
3920
  }
3850
3921
 
3851
3922
  // src/components/CheckBox/CheckBox.tsx
3852
- import { useId as useId3, useState as useState11 } from "react";
3853
- import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
3923
+ import { useId as useId3, useState as useState12 } from "react";
3924
+ import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
3854
3925
  function CheckBox({
3855
3926
  checked,
3856
3927
  className,
@@ -3869,7 +3940,7 @@ function CheckBox({
3869
3940
  const inputId = id ?? generatedId;
3870
3941
  const hintId = hint ? `${inputId}-hint` : void 0;
3871
3942
  const isControlled = checked !== void 0;
3872
- const [uncontrolledChecked, setUncontrolledChecked] = useState11(defaultChecked);
3943
+ const [uncontrolledChecked, setUncontrolledChecked] = useState12(defaultChecked);
3873
3944
  const resolvedChecked = isControlled ? checked : uncontrolledChecked;
3874
3945
  function handleChange(event) {
3875
3946
  if (!isControlled) {
@@ -3889,7 +3960,7 @@ function CheckBox({
3889
3960
  className: cx("nu-check-box__main", slotClassNames?.main),
3890
3961
  style: slotStyles?.main,
3891
3962
  children: [
3892
- /* @__PURE__ */ jsx30(
3963
+ /* @__PURE__ */ jsx32(
3893
3964
  "input",
3894
3965
  {
3895
3966
  ...props,
@@ -3903,19 +3974,19 @@ function CheckBox({
3903
3974
  type: "checkbox"
3904
3975
  }
3905
3976
  ),
3906
- /* @__PURE__ */ jsx30(
3977
+ /* @__PURE__ */ jsx32(
3907
3978
  "span",
3908
3979
  {
3909
3980
  "aria-hidden": "true",
3910
3981
  className: cx("nu-check-box__control", slotClassNames?.control),
3911
3982
  style: slotStyles?.control,
3912
- children: /* @__PURE__ */ jsx30(
3983
+ children: /* @__PURE__ */ jsx32(
3913
3984
  "span",
3914
3985
  {
3915
3986
  className: cx("nu-check-box__box", slotClassNames?.box),
3916
3987
  "data-unchecked-shape": uncheckedShape,
3917
3988
  style: slotStyles?.box,
3918
- children: resolvedChecked ? /* @__PURE__ */ jsx30(
3989
+ children: resolvedChecked ? /* @__PURE__ */ jsx32(
3919
3990
  NuGlyph,
3920
3991
  {
3921
3992
  className: cx("nu-check-box__mark", slotClassNames?.mark),
@@ -3927,7 +3998,7 @@ function CheckBox({
3927
3998
  )
3928
3999
  }
3929
4000
  ),
3930
- /* @__PURE__ */ jsx30(
4001
+ /* @__PURE__ */ jsx32(
3931
4002
  "span",
3932
4003
  {
3933
4004
  className: cx("nu-check-box__label", slotClassNames?.label),
@@ -3938,7 +4009,7 @@ function CheckBox({
3938
4009
  ]
3939
4010
  }
3940
4011
  ),
3941
- hint ? /* @__PURE__ */ jsx30(
4012
+ hint ? /* @__PURE__ */ jsx32(
3942
4013
  "span",
3943
4014
  {
3944
4015
  className: cx("nu-check-box__hint", slotClassNames?.hint),
@@ -3957,26 +4028,26 @@ import {
3957
4028
  useEffect as useEffect7,
3958
4029
  useId as useId4,
3959
4030
  useMemo as useMemo8,
3960
- useRef as useRef8,
3961
- useState as useState12
4031
+ useRef as useRef9,
4032
+ useState as useState13
3962
4033
  } from "react";
3963
4034
  import { createPortal } from "react-dom";
3964
4035
 
3965
4036
  // src/components/_shared/ControlOpener.tsx
3966
- import { jsx as jsx31 } from "react/jsx-runtime";
4037
+ import { jsx as jsx33 } from "react/jsx-runtime";
3967
4038
  function ControlOpener(props) {
3968
4039
  const { children, className, glyphClassName, glyphStyle, style } = props;
3969
4040
  if (props.as === "button") {
3970
4041
  const { as: _as2, type = "button", ...buttonProps } = props;
3971
4042
  void _as2;
3972
- return /* @__PURE__ */ jsx31(
4043
+ return /* @__PURE__ */ jsx33(
3973
4044
  "button",
3974
4045
  {
3975
4046
  ...buttonProps,
3976
4047
  className: cx("nu-control-opener", className),
3977
4048
  style,
3978
4049
  type,
3979
- children: children ?? /* @__PURE__ */ jsx31(
4050
+ children: children ?? /* @__PURE__ */ jsx33(
3980
4051
  NuGlyph,
3981
4052
  {
3982
4053
  className: cx("nu-control-opener__glyph", glyphClassName),
@@ -3989,14 +4060,14 @@ function ControlOpener(props) {
3989
4060
  }
3990
4061
  const { ariaHidden = false, as: _as, ...spanProps } = props;
3991
4062
  void _as;
3992
- return /* @__PURE__ */ jsx31(
4063
+ return /* @__PURE__ */ jsx33(
3993
4064
  "span",
3994
4065
  {
3995
4066
  ...spanProps,
3996
4067
  "aria-hidden": ariaHidden,
3997
4068
  className: cx("nu-control-opener", className),
3998
4069
  style,
3999
- children: children ?? /* @__PURE__ */ jsx31(
4070
+ children: children ?? /* @__PURE__ */ jsx33(
4000
4071
  NuGlyph,
4001
4072
  {
4002
4073
  className: cx("nu-control-opener__glyph", glyphClassName),
@@ -4009,7 +4080,7 @@ function ControlOpener(props) {
4009
4080
  }
4010
4081
 
4011
4082
  // src/components/_shared/usePopupPosition.ts
4012
- import { useLayoutEffect as useLayoutEffect2 } from "react";
4083
+ import { useLayoutEffect as useLayoutEffect3 } from "react";
4013
4084
 
4014
4085
  // src/components/_shared/portalPositioning.ts
4015
4086
  function isDocumentViewportRoot(portalRoot) {
@@ -4073,7 +4144,7 @@ function usePopupPosition({
4073
4144
  popupRef,
4074
4145
  portalRoot = defaultPortalRoot()
4075
4146
  }) {
4076
- useLayoutEffect2(() => {
4147
+ useLayoutEffect3(() => {
4077
4148
  const anchor = anchorRef.current;
4078
4149
  const popupNode = popupRef.current;
4079
4150
  if (!open || !anchor || !popupNode) {
@@ -4112,7 +4183,7 @@ function usePopupPosition({
4112
4183
  }
4113
4184
 
4114
4185
  // src/components/Dropdown/Dropdown.tsx
4115
- import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
4186
+ import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
4116
4187
  function flattenDropdownOptions(data) {
4117
4188
  const options = [];
4118
4189
  data.forEach((group) => {
@@ -4161,19 +4232,19 @@ function Dropdown({
4161
4232
  style,
4162
4233
  ...props
4163
4234
  }) {
4164
- const rootRef = useRef8(null);
4165
- const triggerRef = useRef8(null);
4166
- const fieldRef = useRef8(null);
4167
- const popupRef = useRef8(null);
4168
- const popupListRef = useRef8(null);
4169
- const [open, setOpen] = useState12(false);
4235
+ const rootRef = useRef9(null);
4236
+ const triggerRef = useRef9(null);
4237
+ const fieldRef = useRef9(null);
4238
+ const popupRef = useRef9(null);
4239
+ const popupListRef = useRef9(null);
4240
+ const [open, setOpen] = useState13(false);
4170
4241
  const options = useMemo8(() => flattenDropdownOptions(data), [data]);
4171
4242
  const generatedId = useId4();
4172
4243
  const fieldId = `${generatedId}-dropdown`;
4173
4244
  const labelId = `${fieldId}-label`;
4174
4245
  const hintId = hint ? `${fieldId}-hint` : void 0;
4175
4246
  const isControlled = value !== void 0;
4176
- const [uncontrolledValue, setUncontrolledValue] = useState12(() => getInitialValue(options, defaultValue));
4247
+ const [uncontrolledValue, setUncontrolledValue] = useState13(() => getInitialValue(options, defaultValue));
4177
4248
  const resolvedValue = isControlled ? value : uncontrolledValue;
4178
4249
  const selectedOption = useMemo8(
4179
4250
  () => findSelectedOption(options, resolvedValue),
@@ -4286,7 +4357,7 @@ function Dropdown({
4286
4357
  ref: rootRef,
4287
4358
  style: mergeSlotStyle(style, slotStyles?.root),
4288
4359
  children: [
4289
- /* @__PURE__ */ jsx32(
4360
+ /* @__PURE__ */ jsx34(
4290
4361
  "span",
4291
4362
  {
4292
4363
  className: cx("nu-dropdown__label", slotClassNames?.label),
@@ -4295,7 +4366,7 @@ function Dropdown({
4295
4366
  children: renderMnemonicText(label)
4296
4367
  }
4297
4368
  ),
4298
- /* @__PURE__ */ jsx32(
4369
+ /* @__PURE__ */ jsx34(
4299
4370
  "button",
4300
4371
  {
4301
4372
  "aria-describedby": hintId,
@@ -4326,7 +4397,7 @@ function Dropdown({
4326
4397
  ref: fieldRef,
4327
4398
  style: slotStyles?.field,
4328
4399
  children: [
4329
- /* @__PURE__ */ jsx32(
4400
+ /* @__PURE__ */ jsx34(
4330
4401
  "span",
4331
4402
  {
4332
4403
  "aria-hidden": "true",
@@ -4335,7 +4406,7 @@ function Dropdown({
4335
4406
  children: "["
4336
4407
  }
4337
4408
  ),
4338
- /* @__PURE__ */ jsx32(
4409
+ /* @__PURE__ */ jsx34(
4339
4410
  "span",
4340
4411
  {
4341
4412
  className: cx(
@@ -4343,7 +4414,7 @@ function Dropdown({
4343
4414
  slotClassNames?.valueShell
4344
4415
  ),
4345
4416
  style: slotStyles?.valueShell,
4346
- children: /* @__PURE__ */ jsx32(
4417
+ children: /* @__PURE__ */ jsx34(
4347
4418
  "span",
4348
4419
  {
4349
4420
  className: cx("nu-dropdown__value", slotClassNames?.value),
@@ -4353,7 +4424,7 @@ function Dropdown({
4353
4424
  )
4354
4425
  }
4355
4426
  ),
4356
- /* @__PURE__ */ jsx32(
4427
+ /* @__PURE__ */ jsx34(
4357
4428
  "span",
4358
4429
  {
4359
4430
  "aria-hidden": "true",
@@ -4365,7 +4436,7 @@ function Dropdown({
4365
4436
  ]
4366
4437
  }
4367
4438
  ),
4368
- /* @__PURE__ */ jsx32(
4439
+ /* @__PURE__ */ jsx34(
4369
4440
  ControlOpener,
4370
4441
  {
4371
4442
  ariaHidden: true,
@@ -4376,7 +4447,7 @@ function Dropdown({
4376
4447
  slotClassNames?.arrowShell
4377
4448
  ),
4378
4449
  style: slotStyles?.arrowShell,
4379
- children: /* @__PURE__ */ jsx32(
4450
+ children: /* @__PURE__ */ jsx34(
4380
4451
  NuGlyph,
4381
4452
  {
4382
4453
  className: cx(
@@ -4395,7 +4466,7 @@ function Dropdown({
4395
4466
  )
4396
4467
  }
4397
4468
  ),
4398
- hint ? /* @__PURE__ */ jsx32(
4469
+ hint ? /* @__PURE__ */ jsx34(
4399
4470
  "span",
4400
4471
  {
4401
4472
  className: cx("nu-dropdown__hint", slotClassNames?.hint),
@@ -4405,7 +4476,7 @@ function Dropdown({
4405
4476
  }
4406
4477
  ) : null,
4407
4478
  open && typeof document !== "undefined" ? createPortal(
4408
- /* @__PURE__ */ jsx32(
4479
+ /* @__PURE__ */ jsx34(
4409
4480
  "div",
4410
4481
  {
4411
4482
  className: cx("nu-dropdown__popup", slotClassNames?.popup),
@@ -4414,7 +4485,7 @@ function Dropdown({
4414
4485
  { left: 0, top: 0, visibility: "hidden", width: 0 },
4415
4486
  slotStyles?.popup
4416
4487
  ),
4417
- children: /* @__PURE__ */ jsx32(
4488
+ children: /* @__PURE__ */ jsx34(
4418
4489
  "div",
4419
4490
  {
4420
4491
  className: cx(
@@ -4423,7 +4494,7 @@ function Dropdown({
4423
4494
  ),
4424
4495
  ref: popupListRef,
4425
4496
  style: slotStyles?.popupShell,
4426
- children: /* @__PURE__ */ jsx32(
4497
+ children: /* @__PURE__ */ jsx34(
4427
4498
  ListBox,
4428
4499
  {
4429
4500
  className: cx(
@@ -4456,7 +4527,7 @@ function Dropdown({
4456
4527
  }
4457
4528
 
4458
4529
  // src/components/Frame/Frame.tsx
4459
- import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
4530
+ import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
4460
4531
  function Frame({
4461
4532
  children,
4462
4533
  className,
@@ -4500,7 +4571,7 @@ function Frame({
4500
4571
  className: cx("nu-frame__title", slotClassNames?.title),
4501
4572
  style: mergeSlotStyle(titleStyle, slotStyles?.title),
4502
4573
  children: [
4503
- titleStart ? /* @__PURE__ */ jsx33(
4574
+ titleStart ? /* @__PURE__ */ jsx35(
4504
4575
  "span",
4505
4576
  {
4506
4577
  className: cx(
@@ -4511,7 +4582,7 @@ function Frame({
4511
4582
  children: titleStart
4512
4583
  }
4513
4584
  ) : null,
4514
- resolvedTitleContent ? /* @__PURE__ */ jsx33(
4585
+ resolvedTitleContent ? /* @__PURE__ */ jsx35(
4515
4586
  "span",
4516
4587
  {
4517
4588
  className: cx(
@@ -4522,7 +4593,7 @@ function Frame({
4522
4593
  children: resolvedTitleContent
4523
4594
  }
4524
4595
  ) : null,
4525
- titleEnd ? /* @__PURE__ */ jsx33(
4596
+ titleEnd ? /* @__PURE__ */ jsx35(
4526
4597
  "span",
4527
4598
  {
4528
4599
  className: cx("nu-frame__title-end", slotClassNames?.titleEnd),
@@ -4533,7 +4604,7 @@ function Frame({
4533
4604
  ]
4534
4605
  }
4535
4606
  ) : null,
4536
- /* @__PURE__ */ jsx33(
4607
+ /* @__PURE__ */ jsx35(
4537
4608
  "div",
4538
4609
  {
4539
4610
  className: cx("nu-frame__body", slotClassNames?.body),
@@ -4547,7 +4618,7 @@ function Frame({
4547
4618
  }
4548
4619
 
4549
4620
  // src/components/Info/Info.tsx
4550
- import { jsx as jsx34 } from "react/jsx-runtime";
4621
+ import { jsx as jsx36 } from "react/jsx-runtime";
4551
4622
  function Info({
4552
4623
  accentColor,
4553
4624
  children,
@@ -4556,7 +4627,7 @@ function Info({
4556
4627
  style,
4557
4628
  ...props
4558
4629
  }) {
4559
- return /* @__PURE__ */ jsx34(
4630
+ return /* @__PURE__ */ jsx36(
4560
4631
  "div",
4561
4632
  {
4562
4633
  ...props,
@@ -4580,7 +4651,7 @@ function InfoAccent({
4580
4651
  upper = false,
4581
4652
  ...props
4582
4653
  }) {
4583
- return /* @__PURE__ */ jsx34(
4654
+ return /* @__PURE__ */ jsx36(
4584
4655
  "span",
4585
4656
  {
4586
4657
  ...props,
@@ -4597,24 +4668,26 @@ function InfoAccent({
4597
4668
 
4598
4669
  // src/components/IconGrid/NuIconGrid.tsx
4599
4670
  import {
4600
- useLayoutEffect as useLayoutEffect4,
4671
+ useLayoutEffect as useLayoutEffect5,
4601
4672
  useMemo as useMemo9,
4602
- useRef as useRef10,
4603
- useState as useState15
4673
+ useRef as useRef11,
4674
+ useState as useState16
4604
4675
  } from "react";
4605
4676
 
4606
4677
  // src/components/PopupMenu/PopupMenu.tsx
4607
4678
  import {
4608
4679
  useCallback as useCallback4,
4609
4680
  useEffect as useEffect8,
4610
- useLayoutEffect as useLayoutEffect3,
4611
- useRef as useRef9,
4612
- useState as useState13
4681
+ useLayoutEffect as useLayoutEffect4,
4682
+ useRef as useRef10,
4683
+ useState as useState14
4613
4684
  } from "react";
4614
4685
  import { createPortal as createPortal2 } from "react-dom";
4615
- import { jsx as jsx35 } from "react/jsx-runtime";
4686
+ import { jsx as jsx37 } from "react/jsx-runtime";
4616
4687
  function hasVisibleChildren2(item) {
4617
- return Boolean(item.items?.some((child) => !child.hidden));
4688
+ return Boolean(
4689
+ item.items?.some((child) => isMainMenuItem(child) && !child.hidden)
4690
+ );
4618
4691
  }
4619
4692
  function clamp(value, min, max) {
4620
4693
  return Math.min(max, Math.max(min, value));
@@ -4653,9 +4726,9 @@ function PopupMenu({
4653
4726
  uncheckedShape = "box",
4654
4727
  ...props
4655
4728
  }) {
4656
- const rootRef = useRef9(null);
4657
- const [activePath, setActivePath] = useState13([]);
4658
- const [uncontrolledOpen, setUncontrolledOpen] = useState13(defaultOpen);
4729
+ const rootRef = useRef10(null);
4730
+ const [activePath, setActivePath] = useState14([]);
4731
+ const [uncontrolledOpen, setUncontrolledOpen] = useState14(defaultOpen);
4659
4732
  const isControlled = open !== void 0;
4660
4733
  const resolvedOpen = isControlled ? open : uncontrolledOpen;
4661
4734
  const portalRoot = resolvePortalRoot();
@@ -4692,7 +4765,7 @@ function PopupMenu({
4692
4765
  document.removeEventListener("keydown", handleKeyDown);
4693
4766
  };
4694
4767
  }, [resolvedOpen, setResolvedOpen]);
4695
- useLayoutEffect3(() => {
4768
+ useLayoutEffect4(() => {
4696
4769
  if (!resolvedOpen || !anchor || !rootRef.current) {
4697
4770
  return;
4698
4771
  }
@@ -4742,11 +4815,11 @@ function PopupMenu({
4742
4815
  }
4743
4816
  setActivePath((currentPath) => [...currentPath.slice(0, level), item.id]);
4744
4817
  }
4745
- if (!resolvedOpen || !anchor || !portalRoot || items.every((item) => item.hidden)) {
4818
+ if (!resolvedOpen || !anchor || !portalRoot || !hasVisibleMainMenuItems(items)) {
4746
4819
  return null;
4747
4820
  }
4748
4821
  return createPortal2(
4749
- /* @__PURE__ */ jsx35(
4822
+ /* @__PURE__ */ jsx37(
4750
4823
  "div",
4751
4824
  {
4752
4825
  ...props,
@@ -4762,7 +4835,7 @@ function PopupMenu({
4762
4835
  top: 0,
4763
4836
  visibility: "hidden"
4764
4837
  },
4765
- children: /* @__PURE__ */ jsx35("div", { className: "nu-popup-menu__shell", children: /* @__PURE__ */ jsx35(
4838
+ children: /* @__PURE__ */ jsx37("div", { className: "nu-popup-menu__shell", children: /* @__PURE__ */ jsx37(
4766
4839
  MainMenuList,
4767
4840
  {
4768
4841
  activePath,
@@ -4781,10 +4854,10 @@ function PopupMenu({
4781
4854
  }
4782
4855
 
4783
4856
  // src/components/PopupMenu/usePopupMenu.ts
4784
- import { useState as useState14 } from "react";
4857
+ import { useState as useState15 } from "react";
4785
4858
  function usePopupMenu() {
4786
- const [anchor, setAnchor] = useState14(null);
4787
- const [open, setOpen] = useState14(false);
4859
+ const [anchor, setAnchor] = useState15(null);
4860
+ const [open, setOpen] = useState15(false);
4788
4861
  function close() {
4789
4862
  setOpen(false);
4790
4863
  }
@@ -4841,7 +4914,7 @@ function useNuIconGridContext() {
4841
4914
  }
4842
4915
 
4843
4916
  // src/components/IconGrid/NuIconGrid.tsx
4844
- import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
4917
+ import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
4845
4918
  var DRAG_THRESHOLD2 = 3;
4846
4919
  var gridRegistrations = /* @__PURE__ */ new Map();
4847
4920
  function clamp2(value, minimum, maximum) {
@@ -4899,11 +4972,11 @@ function NuIconGridItem({
4899
4972
  const manager = useNuIconGridContext();
4900
4973
  const dragDrop = useNuDragDrop();
4901
4974
  const contextMenu = usePopupMenu();
4902
- const dragStartRef = useRef10(void 0);
4903
- const isDraggingRef = useRef10(false);
4904
- const [isDragging, setIsDragging] = useState15(false);
4905
- const suppressClickRef = useRef10(false);
4906
- const latestPositionRef = useRef10(icon.position);
4975
+ const dragStartRef = useRef11(void 0);
4976
+ const isDraggingRef = useRef11(false);
4977
+ const [isDragging, setIsDragging] = useState16(false);
4978
+ const suppressClickRef = useRef11(false);
4979
+ const latestPositionRef = useRef11(icon.position);
4907
4980
  const contextMenuItems = resolveIconContextMenuItems(
4908
4981
  icon.contextMenuItems,
4909
4982
  icon
@@ -5075,12 +5148,12 @@ function NuIconGridItem({
5075
5148
  style: { left: icon.position.x, top: icon.position.y },
5076
5149
  type: "button",
5077
5150
  children: [
5078
- /* @__PURE__ */ jsx36("span", { "aria-hidden": "true", className: "nu-icon-grid__glyph", children: typeof icon.icon === "string" ? /* @__PURE__ */ jsx36("img", { alt: "", draggable: false, src: icon.icon }) : icon.icon }),
5079
- /* @__PURE__ */ jsx36("span", { className: "nu-icon-grid__label", children: renderMnemonicText(icon.label) })
5151
+ /* @__PURE__ */ jsx38("span", { "aria-hidden": "true", className: "nu-icon-grid__glyph", children: typeof icon.icon === "string" ? /* @__PURE__ */ jsx38("img", { alt: "", draggable: false, src: icon.icon }) : icon.icon }),
5152
+ /* @__PURE__ */ jsx38("span", { className: "nu-icon-grid__label", children: renderMnemonicText(icon.label) })
5080
5153
  ]
5081
5154
  }
5082
5155
  ),
5083
- /* @__PURE__ */ jsx36(
5156
+ /* @__PURE__ */ jsx38(
5084
5157
  PopupMenu,
5085
5158
  {
5086
5159
  anchor: contextMenu.anchor,
@@ -5106,9 +5179,9 @@ function NuIconGrid({
5106
5179
  onPointerDown,
5107
5180
  ...props
5108
5181
  }) {
5109
- const [gridElement, setGridElement] = useState15(null);
5182
+ const [gridElement, setGridElement] = useState16(null);
5110
5183
  const manager = useNuIconGridContext();
5111
- const hasAppliedDefaultArrangementRef = useRef10(false);
5184
+ const hasAppliedDefaultArrangementRef = useRef11(false);
5112
5185
  const arrangeIcons = manager.arrangeIcons;
5113
5186
  const setGridSize = manager.setGridSize;
5114
5187
  const contextMenu = usePopupMenu();
@@ -5125,7 +5198,7 @@ function NuIconGrid({
5125
5198
  [acceptsDrop, onDrop]
5126
5199
  );
5127
5200
  useNuDropTarget(gridElement, sharedDropTargetOptions);
5128
- useLayoutEffect4(() => {
5201
+ useLayoutEffect5(() => {
5129
5202
  if (!gridElement) {
5130
5203
  return;
5131
5204
  }
@@ -5146,7 +5219,7 @@ function NuIconGrid({
5146
5219
  resizeObserver.observe(gridElement);
5147
5220
  return () => resizeObserver.disconnect();
5148
5221
  }, [arrangeIcons, defaultArrangeMode, gridElement, setGridSize]);
5149
- useLayoutEffect4(() => {
5222
+ useLayoutEffect5(() => {
5150
5223
  if (!gridElement) {
5151
5224
  return;
5152
5225
  }
@@ -5189,7 +5262,7 @@ function NuIconGrid({
5189
5262
  ref: setGridElement,
5190
5263
  role: "group",
5191
5264
  children: [
5192
- manager.icons.map((icon) => /* @__PURE__ */ jsx36(
5265
+ manager.icons.map((icon) => /* @__PURE__ */ jsx38(
5193
5266
  NuIconGridItem,
5194
5267
  {
5195
5268
  gridElement,
@@ -5199,7 +5272,7 @@ function NuIconGrid({
5199
5272
  },
5200
5273
  icon.id
5201
5274
  )),
5202
- /* @__PURE__ */ jsx36(
5275
+ /* @__PURE__ */ jsx38(
5203
5276
  PopupMenu,
5204
5277
  {
5205
5278
  anchor: contextMenu.anchor,
@@ -5217,10 +5290,10 @@ function NuIconGrid({
5217
5290
  import {
5218
5291
  useCallback as useCallback5,
5219
5292
  useMemo as useMemo10,
5220
- useRef as useRef11,
5221
- useState as useState16
5293
+ useRef as useRef12,
5294
+ useState as useState17
5222
5295
  } from "react";
5223
- import { jsx as jsx37 } from "react/jsx-runtime";
5296
+ import { jsx as jsx39 } from "react/jsx-runtime";
5224
5297
  var GRID_PADDING = 12;
5225
5298
  var ICON_CELL_HEIGHT = 104;
5226
5299
  var ICON_CELL_WIDTH = 104;
@@ -5285,12 +5358,12 @@ function NuIconProvider({
5285
5358
  children,
5286
5359
  defaultIcons = []
5287
5360
  }) {
5288
- const idRef = useRef11(defaultIcons.length);
5289
- const gridSizeRef = useRef11({ height: 0, width: 0 });
5290
- const [icons, setIcons] = useState16(
5361
+ const idRef = useRef12(defaultIcons.length);
5362
+ const gridSizeRef = useRef12({ height: 0, width: 0 });
5363
+ const [icons, setIcons] = useState17(
5291
5364
  () => getInitialIcons(defaultIcons)
5292
5365
  );
5293
- const [selectedIconId, setSelectedIconId] = useState16(null);
5366
+ const [selectedIconId, setSelectedIconId] = useState17(null);
5294
5367
  const addIcon = useCallback5((definition) => {
5295
5368
  const id = definition.id ?? `nu-icon-${++idRef.current}`;
5296
5369
  setIcons((currentIcons) => {
@@ -5368,7 +5441,7 @@ function NuIconProvider({
5368
5441
  updateIcon
5369
5442
  ]
5370
5443
  );
5371
- return /* @__PURE__ */ jsx37(NuIconContext.Provider, { value: contextValue, children });
5444
+ return /* @__PURE__ */ jsx39(NuIconContext.Provider, { value: contextValue, children });
5372
5445
  }
5373
5446
 
5374
5447
  // src/components/ComboBox/ComboBox.tsx
@@ -5376,11 +5449,11 @@ import {
5376
5449
  useEffect as useEffect9,
5377
5450
  useId as useId5,
5378
5451
  useMemo as useMemo11,
5379
- useRef as useRef12,
5380
- useState as useState17
5452
+ useRef as useRef13,
5453
+ useState as useState18
5381
5454
  } from "react";
5382
5455
  import { createPortal as createPortal3 } from "react-dom";
5383
- import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
5456
+ import { jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
5384
5457
  function flattenComboBoxOptions(data) {
5385
5458
  const options = [];
5386
5459
  data.forEach((group) => {
@@ -5421,21 +5494,21 @@ function ComboBox({
5421
5494
  value,
5422
5495
  ...props
5423
5496
  }) {
5424
- const rootRef = useRef12(null);
5425
- const inputRef = useRef12(null);
5426
- const fieldRef = useRef12(null);
5427
- const popupRef = useRef12(null);
5497
+ const rootRef = useRef13(null);
5498
+ const inputRef = useRef13(null);
5499
+ const fieldRef = useRef13(null);
5500
+ const popupRef = useRef13(null);
5428
5501
  const generatedId = useId5();
5429
5502
  const fieldId = `${generatedId}-combo-box`;
5430
5503
  const labelId = `${fieldId}-label`;
5431
5504
  const hintId = hint ? `${fieldId}-hint` : void 0;
5432
- const [open, setOpen] = useState17(false);
5505
+ const [open, setOpen] = useState18(false);
5433
5506
  const options = useMemo11(() => flattenComboBoxOptions(data), [data]);
5434
5507
  const isValueControlled = value !== void 0;
5435
5508
  const isInputControlled = inputValueProp !== void 0;
5436
- const [uncontrolledValue, setUncontrolledValue] = useState17(() => defaultValue);
5509
+ const [uncontrolledValue, setUncontrolledValue] = useState18(() => defaultValue);
5437
5510
  const initialSelectedOption = findComboBoxOption(options, defaultValue);
5438
- const [uncontrolledInputValue, setUncontrolledInputValue] = useState17(
5511
+ const [uncontrolledInputValue, setUncontrolledInputValue] = useState18(
5439
5512
  () => defaultInputValue ?? initialSelectedOption?.item.name.text ?? ""
5440
5513
  );
5441
5514
  const resolvedValue = isValueControlled ? value : uncontrolledValue;
@@ -5463,7 +5536,7 @@ function ComboBox({
5463
5536
  [filteredData]
5464
5537
  );
5465
5538
  const popupRoot = typeof document === "undefined" ? null : resolveComboBoxPortalRoot();
5466
- const [themePortalStyle, setThemePortalStyle] = useState17(() => void 0);
5539
+ const [themePortalStyle, setThemePortalStyle] = useState18(() => void 0);
5467
5540
  useEffect9(() => {
5468
5541
  if (!open) {
5469
5542
  return;
@@ -5548,7 +5621,7 @@ function ComboBox({
5548
5621
  ref: rootRef,
5549
5622
  style: mergeSlotStyle(style, slotStyles?.root),
5550
5623
  children: [
5551
- /* @__PURE__ */ jsx38(
5624
+ /* @__PURE__ */ jsx40(
5552
5625
  "label",
5553
5626
  {
5554
5627
  className: cx("nu-combo-box__label", slotClassNames?.label),
@@ -5571,7 +5644,7 @@ function ComboBox({
5571
5644
  ref: fieldRef,
5572
5645
  style: slotStyles?.field,
5573
5646
  children: [
5574
- /* @__PURE__ */ jsx38(
5647
+ /* @__PURE__ */ jsx40(
5575
5648
  "span",
5576
5649
  {
5577
5650
  "aria-hidden": "true",
@@ -5580,7 +5653,7 @@ function ComboBox({
5580
5653
  children: "["
5581
5654
  }
5582
5655
  ),
5583
- /* @__PURE__ */ jsx38(
5656
+ /* @__PURE__ */ jsx40(
5584
5657
  "span",
5585
5658
  {
5586
5659
  className: cx(
@@ -5588,7 +5661,7 @@ function ComboBox({
5588
5661
  slotClassNames?.inputShell
5589
5662
  ),
5590
5663
  style: slotStyles?.inputShell,
5591
- children: /* @__PURE__ */ jsx38(
5664
+ children: /* @__PURE__ */ jsx40(
5592
5665
  "input",
5593
5666
  {
5594
5667
  "aria-autocomplete": "list",
@@ -5615,7 +5688,7 @@ function ComboBox({
5615
5688
  )
5616
5689
  }
5617
5690
  ),
5618
- /* @__PURE__ */ jsx38(
5691
+ /* @__PURE__ */ jsx40(
5619
5692
  "span",
5620
5693
  {
5621
5694
  "aria-hidden": "true",
@@ -5627,7 +5700,7 @@ function ComboBox({
5627
5700
  ]
5628
5701
  }
5629
5702
  ),
5630
- /* @__PURE__ */ jsx38(
5703
+ /* @__PURE__ */ jsx40(
5631
5704
  ControlOpener,
5632
5705
  {
5633
5706
  "aria-label": open ? "Collapse list" : "Expand list",
@@ -5645,7 +5718,7 @@ function ComboBox({
5645
5718
  ]
5646
5719
  }
5647
5720
  ),
5648
- hint ? /* @__PURE__ */ jsx38(
5721
+ hint ? /* @__PURE__ */ jsx40(
5649
5722
  "span",
5650
5723
  {
5651
5724
  className: cx("nu-combo-box__hint", slotClassNames?.hint),
@@ -5655,7 +5728,7 @@ function ComboBox({
5655
5728
  }
5656
5729
  ) : null,
5657
5730
  open && popupRoot ? createPortal3(
5658
- /* @__PURE__ */ jsx38(
5731
+ /* @__PURE__ */ jsx40(
5659
5732
  "div",
5660
5733
  {
5661
5734
  className: cx("nu-combo-box__popup", slotClassNames?.popup),
@@ -5665,12 +5738,12 @@ function ComboBox({
5665
5738
  themePortalStyle,
5666
5739
  slotStyles?.popup
5667
5740
  ),
5668
- children: /* @__PURE__ */ jsx38(
5741
+ children: /* @__PURE__ */ jsx40(
5669
5742
  "div",
5670
5743
  {
5671
5744
  className: cx("nu-combo-box__listbox", slotClassNames?.listbox),
5672
5745
  style: slotStyles?.listbox,
5673
- children: /* @__PURE__ */ jsx38(
5746
+ children: /* @__PURE__ */ jsx40(
5674
5747
  ListBox,
5675
5748
  {
5676
5749
  data: filteredData,
@@ -5703,7 +5776,7 @@ function ComboBox({
5703
5776
  import {
5704
5777
  Fragment as Fragment6
5705
5778
  } from "react";
5706
- import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
5779
+ import { jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
5707
5780
  var COMMAND_BUTTON_GLYPH_NAMES = /* @__PURE__ */ new Set([
5708
5781
  "check-fill",
5709
5782
  "check-mark",
@@ -5744,7 +5817,7 @@ function CommandButton({
5744
5817
  const hasMenu = menuItems.length > 0;
5745
5818
  const showCaret = dropdown || hasMenu;
5746
5819
  const resolvedToggled = toggled ?? pressed;
5747
- const resolvedIcon = typeof icon === "string" && isCommandButtonGlyphName(icon) ? /* @__PURE__ */ jsx39(NuGlyph, { name: icon }) : icon ?? null;
5820
+ const resolvedIcon = typeof icon === "string" && isCommandButtonGlyphName(icon) ? /* @__PURE__ */ jsx41(NuGlyph, { name: icon }) : icon ?? null;
5748
5821
  function handleClick(event) {
5749
5822
  onClick?.(event);
5750
5823
  if (event.defaultPrevented || !hasMenu) {
@@ -5769,7 +5842,7 @@ function CommandButton({
5769
5842
  type,
5770
5843
  onClick: handleClick,
5771
5844
  children: [
5772
- resolvedIcon ? /* @__PURE__ */ jsx39(
5845
+ resolvedIcon ? /* @__PURE__ */ jsx41(
5773
5846
  "span",
5774
5847
  {
5775
5848
  className: cx(
@@ -5781,7 +5854,7 @@ function CommandButton({
5781
5854
  children: resolvedIcon
5782
5855
  }
5783
5856
  ) : null,
5784
- children ? /* @__PURE__ */ jsx39(
5857
+ children ? /* @__PURE__ */ jsx41(
5785
5858
  "span",
5786
5859
  {
5787
5860
  className: cx(
@@ -5793,7 +5866,7 @@ function CommandButton({
5793
5866
  children: renderMnemonicNode(children)
5794
5867
  }
5795
5868
  ) : null,
5796
- showCaret ? /* @__PURE__ */ jsx39(
5869
+ showCaret ? /* @__PURE__ */ jsx41(
5797
5870
  "span",
5798
5871
  {
5799
5872
  className: cx(
@@ -5802,13 +5875,13 @@ function CommandButton({
5802
5875
  slotClassNames?.caret
5803
5876
  ),
5804
5877
  style: slotStyles?.caret,
5805
- children: /* @__PURE__ */ jsx39(NuGlyph, { name: "dropdown-arrow" })
5878
+ children: /* @__PURE__ */ jsx41(NuGlyph, { name: "dropdown-arrow" })
5806
5879
  }
5807
5880
  ) : null
5808
5881
  ]
5809
5882
  }
5810
5883
  ),
5811
- hasMenu ? /* @__PURE__ */ jsx39(
5884
+ hasMenu ? /* @__PURE__ */ jsx41(
5812
5885
  PopupMenu,
5813
5886
  {
5814
5887
  anchor: popupMenu.anchor,
@@ -5823,8 +5896,8 @@ function CommandButton({
5823
5896
  }
5824
5897
 
5825
5898
  // src/components/CrtGlitch/CrtGlitch.tsx
5826
- import { useEffect as useEffect10, useId as useId6, useRef as useRef13 } from "react";
5827
- import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
5899
+ import { useEffect as useEffect10, useId as useId6, useRef as useRef14 } from "react";
5900
+ import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
5828
5901
  var DEFAULT_INTERVAL_MS = 3e3;
5829
5902
  var DEFAULT_DURATION_MS = 2500;
5830
5903
  var DEFAULT_TOP_LEVEL_RATIO = 1 / 3;
@@ -5850,12 +5923,12 @@ function NuCrtGlitch({
5850
5923
  topLevelRatio = DEFAULT_TOP_LEVEL_RATIO
5851
5924
  }) {
5852
5925
  const filterId = useId6().replace(/:/g, "");
5853
- const turbulenceRef = useRef13(null);
5854
- const warpRef = useRef13(null);
5855
- const rOffsetRef = useRef13(null);
5856
- const bOffsetRef = useRef13(null);
5857
- const rafRef = useRef13(null);
5858
- const targetElRef = useRef13(null);
5926
+ const turbulenceRef = useRef14(null);
5927
+ const warpRef = useRef14(null);
5928
+ const rOffsetRef = useRef14(null);
5929
+ const bOffsetRef = useRef14(null);
5930
+ const rafRef = useRef14(null);
5931
+ const targetElRef = useRef14(null);
5859
5932
  useEffect10(() => {
5860
5933
  if (!enabled) {
5861
5934
  return;
@@ -5958,7 +6031,7 @@ function NuCrtGlitch({
5958
6031
  }
5959
6032
  };
5960
6033
  }, [durationMs, enabled, filterId, intervalMs, targetSelector, topLevelRatio]);
5961
- return /* @__PURE__ */ jsx40("svg", { "aria-hidden": "true", height: "0", style: { position: "absolute" }, width: "0", children: /* @__PURE__ */ jsx40("defs", { children: /* @__PURE__ */ jsxs24(
6034
+ return /* @__PURE__ */ jsx42("svg", { "aria-hidden": "true", height: "0", style: { position: "absolute" }, width: "0", children: /* @__PURE__ */ jsx42("defs", { children: /* @__PURE__ */ jsxs24(
5962
6035
  "filter",
5963
6036
  {
5964
6037
  "color-interpolation-filters": "sRGB",
@@ -5968,7 +6041,7 @@ function NuCrtGlitch({
5968
6041
  x: "-15%",
5969
6042
  y: "-5%",
5970
6043
  children: [
5971
- /* @__PURE__ */ jsx40(
6044
+ /* @__PURE__ */ jsx42(
5972
6045
  "feTurbulence",
5973
6046
  {
5974
6047
  baseFrequency: "0.001 0.045",
@@ -5979,7 +6052,7 @@ function NuCrtGlitch({
5979
6052
  type: "turbulence"
5980
6053
  }
5981
6054
  ),
5982
- /* @__PURE__ */ jsx40(
6055
+ /* @__PURE__ */ jsx42(
5983
6056
  "feDisplacementMap",
5984
6057
  {
5985
6058
  in: "SourceGraphic",
@@ -5991,8 +6064,8 @@ function NuCrtGlitch({
5991
6064
  yChannelSelector: "A"
5992
6065
  }
5993
6066
  ),
5994
- /* @__PURE__ */ jsx40("feOffset", { dx: 0, dy: 0, in: "warped", ref: rOffsetRef, result: "rOff" }),
5995
- /* @__PURE__ */ jsx40(
6067
+ /* @__PURE__ */ jsx42("feOffset", { dx: 0, dy: 0, in: "warped", ref: rOffsetRef, result: "rOff" }),
6068
+ /* @__PURE__ */ jsx42(
5996
6069
  "feColorMatrix",
5997
6070
  {
5998
6071
  in: "rOff",
@@ -6001,7 +6074,7 @@ function NuCrtGlitch({
6001
6074
  values: "1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"
6002
6075
  }
6003
6076
  ),
6004
- /* @__PURE__ */ jsx40(
6077
+ /* @__PURE__ */ jsx42(
6005
6078
  "feColorMatrix",
6006
6079
  {
6007
6080
  in: "warped",
@@ -6010,8 +6083,8 @@ function NuCrtGlitch({
6010
6083
  values: "0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0"
6011
6084
  }
6012
6085
  ),
6013
- /* @__PURE__ */ jsx40("feOffset", { dx: 0, dy: 0, in: "warped", ref: bOffsetRef, result: "bOff" }),
6014
- /* @__PURE__ */ jsx40(
6086
+ /* @__PURE__ */ jsx42("feOffset", { dx: 0, dy: 0, in: "warped", ref: bOffsetRef, result: "bOff" }),
6087
+ /* @__PURE__ */ jsx42(
6015
6088
  "feColorMatrix",
6016
6089
  {
6017
6090
  in: "bOff",
@@ -6020,8 +6093,8 @@ function NuCrtGlitch({
6020
6093
  values: "0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0"
6021
6094
  }
6022
6095
  ),
6023
- /* @__PURE__ */ jsx40("feBlend", { in: "rOnly", in2: "gOnly", mode: "screen", result: "rg" }),
6024
- /* @__PURE__ */ jsx40("feBlend", { in: "rg", in2: "bOnly", mode: "screen" })
6096
+ /* @__PURE__ */ jsx42("feBlend", { in: "rOnly", in2: "gOnly", mode: "screen", result: "rg" }),
6097
+ /* @__PURE__ */ jsx42("feBlend", { in: "rg", in2: "bOnly", mode: "screen" })
6025
6098
  ]
6026
6099
  }
6027
6100
  ) }) });
@@ -6034,8 +6107,8 @@ import {
6034
6107
  useEffect as useEffect11,
6035
6108
  useImperativeHandle as useImperativeHandle2,
6036
6109
  useMemo as useMemo12,
6037
- useRef as useRef14,
6038
- useState as useState18
6110
+ useRef as useRef15,
6111
+ useState as useState19
6039
6112
  } from "react";
6040
6113
 
6041
6114
  // src/components/ListView/internals/helpers.ts
@@ -6073,14 +6146,14 @@ function renderListViewCellValue(row, column) {
6073
6146
  import { memo as memo3 } from "react";
6074
6147
 
6075
6148
  // src/components/ListView/internals/ListViewCheckControl.tsx
6076
- import { jsx as jsx41 } from "react/jsx-runtime";
6149
+ import { jsx as jsx43 } from "react/jsx-runtime";
6077
6150
  function ListViewCheckControl({
6078
6151
  isChecked,
6079
6152
  onActivate,
6080
6153
  onToggleCheck,
6081
6154
  uncheckedShape
6082
6155
  }) {
6083
- return /* @__PURE__ */ jsx41(
6156
+ return /* @__PURE__ */ jsx43(
6084
6157
  "button",
6085
6158
  {
6086
6159
  "aria-label": isChecked ? "Uncheck row" : "Check row",
@@ -6093,13 +6166,13 @@ function ListViewCheckControl({
6093
6166
  onToggleCheck();
6094
6167
  },
6095
6168
  type: "button",
6096
- children: /* @__PURE__ */ jsx41(
6169
+ children: /* @__PURE__ */ jsx43(
6097
6170
  "span",
6098
6171
  {
6099
6172
  "aria-hidden": "true",
6100
6173
  className: "nu-list-view__check-box",
6101
6174
  "data-unchecked-shape": uncheckedShape,
6102
- children: isChecked ? /* @__PURE__ */ jsx41(
6175
+ children: isChecked ? /* @__PURE__ */ jsx43(
6103
6176
  NuGlyph,
6104
6177
  {
6105
6178
  className: "nu-list-view__check-indicator",
@@ -6113,7 +6186,7 @@ function ListViewCheckControl({
6113
6186
  }
6114
6187
 
6115
6188
  // src/components/ListView/internals/ListViewRow.tsx
6116
- import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
6189
+ import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
6117
6190
  function ListViewRowInner({
6118
6191
  columns,
6119
6192
  isActive,
@@ -6165,7 +6238,7 @@ function ListViewRowInner({
6165
6238
  "--nu-list-view-columns": templateColumns
6166
6239
  },
6167
6240
  children: [
6168
- showCheckBox ? /* @__PURE__ */ jsx42("span", { className: "nu-list-view__check-cell", role: "gridcell", children: /* @__PURE__ */ jsx42(
6241
+ showCheckBox ? /* @__PURE__ */ jsx44("span", { className: "nu-list-view__check-cell", role: "gridcell", children: /* @__PURE__ */ jsx44(
6169
6242
  ListViewCheckControl,
6170
6243
  {
6171
6244
  isChecked,
@@ -6174,7 +6247,7 @@ function ListViewRowInner({
6174
6247
  uncheckedShape
6175
6248
  }
6176
6249
  ) }) : null,
6177
- columns.map((column) => /* @__PURE__ */ jsx42(
6250
+ columns.map((column) => /* @__PURE__ */ jsx44(
6178
6251
  "span",
6179
6252
  {
6180
6253
  className: [
@@ -6194,7 +6267,7 @@ function ListViewRowInner({
6194
6267
  var ListViewRow = memo3(ListViewRowInner);
6195
6268
 
6196
6269
  // src/components/ListView/ListView.tsx
6197
- import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
6270
+ import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
6198
6271
  function ListViewInner({
6199
6272
  activeRowId: activeRowIdProp,
6200
6273
  checkedIds,
@@ -6212,14 +6285,14 @@ function ListViewInner({
6212
6285
  uncheckedShape = "box",
6213
6286
  ...props
6214
6287
  }, ref) {
6215
- const rootRef = useRef14(null);
6216
- const rowRefs = useRef14({});
6288
+ const rootRef = useRef15(null);
6289
+ const rowRefs = useRef15({});
6217
6290
  const selectableRows = useMemo12(
6218
6291
  () => data.filter((row) => !row.disabled),
6219
6292
  [data]
6220
6293
  );
6221
6294
  const isActiveControlled = activeRowIdProp !== void 0;
6222
- const [uncontrolledActiveRowId, setUncontrolledActiveRowId] = useState18(
6295
+ const [uncontrolledActiveRowId, setUncontrolledActiveRowId] = useState19(
6223
6296
  () => defaultActiveRowId ?? getInitialActiveRowId(selectableRows, selectedId)
6224
6297
  );
6225
6298
  const activeRowId = activeRowIdProp !== void 0 ? activeRowIdProp : uncontrolledActiveRowId;
@@ -6382,8 +6455,8 @@ function ListViewInner({
6382
6455
  "--nu-list-view-columns": templateColumns
6383
6456
  },
6384
6457
  children: [
6385
- showCheckBox ? /* @__PURE__ */ jsx43("span", { className: "nu-list-view__header-cell", role: "columnheader" }) : null,
6386
- columns.map((column) => /* @__PURE__ */ jsx43(
6458
+ showCheckBox ? /* @__PURE__ */ jsx45("span", { className: "nu-list-view__header-cell", role: "columnheader" }) : null,
6459
+ columns.map((column) => /* @__PURE__ */ jsx45(
6387
6460
  "span",
6388
6461
  {
6389
6462
  className: [
@@ -6399,7 +6472,7 @@ function ListViewInner({
6399
6472
  ]
6400
6473
  }
6401
6474
  ),
6402
- /* @__PURE__ */ jsx43("div", { className: "nu-list-view__body", children: data.length > 0 ? data.map((row) => /* @__PURE__ */ jsx43(
6475
+ /* @__PURE__ */ jsx45("div", { className: "nu-list-view__body", children: data.length > 0 ? data.map((row) => /* @__PURE__ */ jsx45(
6403
6476
  ListViewRow,
6404
6477
  {
6405
6478
  columns,
@@ -6416,7 +6489,7 @@ function ListViewInner({
6416
6489
  uncheckedShape
6417
6490
  },
6418
6491
  row.id
6419
- )) : /* @__PURE__ */ jsx43("div", { className: "nu-list-view__empty", children: emptyText }) })
6492
+ )) : /* @__PURE__ */ jsx45("div", { className: "nu-list-view__empty", children: emptyText }) })
6420
6493
  ]
6421
6494
  }
6422
6495
  );
@@ -6428,8 +6501,8 @@ import {
6428
6501
  useEffect as useEffect12,
6429
6502
  useId as useId7,
6430
6503
  useMemo as useMemo13,
6431
- useRef as useRef15,
6432
- useState as useState19
6504
+ useRef as useRef16,
6505
+ useState as useState20
6433
6506
  } from "react";
6434
6507
 
6435
6508
  // src/components/MaskedField/textMask.ts
@@ -6594,7 +6667,7 @@ function getMaskedFieldState(mask, rawValue) {
6594
6667
  }
6595
6668
 
6596
6669
  // src/components/MaskedField/MaskedField.tsx
6597
- import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
6670
+ import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
6598
6671
  function MaskedField({
6599
6672
  "aria-invalid": ariaInvalid,
6600
6673
  className,
@@ -6617,8 +6690,8 @@ function MaskedField({
6617
6690
  const fieldId = id ?? generatedId;
6618
6691
  const hintId = hint ? `${fieldId}-hint` : void 0;
6619
6692
  const isControlled = value !== void 0;
6620
- const hasMountedRef = useRef15(false);
6621
- const [uncontrolledValue, setUncontrolledValue] = useState19(
6693
+ const hasMountedRef = useRef16(false);
6694
+ const [uncontrolledValue, setUncontrolledValue] = useState20(
6622
6695
  () => defaultValue == null ? "" : getMaskedFieldState(mask, String(defaultValue)).formattedValue
6623
6696
  );
6624
6697
  const rawResolvedValue = isControlled ? value == null ? "" : String(value) : uncontrolledValue;
@@ -6678,7 +6751,7 @@ function MaskedField({
6678
6751
  htmlFor: fieldId,
6679
6752
  style: mergeSlotStyle(style, slotStyles?.root),
6680
6753
  children: [
6681
- /* @__PURE__ */ jsx44(
6754
+ /* @__PURE__ */ jsx46(
6682
6755
  "span",
6683
6756
  {
6684
6757
  className: cx("nu-masked-field__label", slotClassNames?.label),
@@ -6692,7 +6765,7 @@ function MaskedField({
6692
6765
  className: cx("nu-masked-field__slot", slotClassNames?.slot),
6693
6766
  style: slotStyles?.slot,
6694
6767
  children: [
6695
- /* @__PURE__ */ jsx44(
6768
+ /* @__PURE__ */ jsx46(
6696
6769
  "span",
6697
6770
  {
6698
6771
  "aria-hidden": "true",
@@ -6701,7 +6774,7 @@ function MaskedField({
6701
6774
  children: "["
6702
6775
  }
6703
6776
  ),
6704
- /* @__PURE__ */ jsx44(
6777
+ /* @__PURE__ */ jsx46(
6705
6778
  "span",
6706
6779
  {
6707
6780
  className: cx(
@@ -6709,7 +6782,7 @@ function MaskedField({
6709
6782
  slotClassNames?.inputShell
6710
6783
  ),
6711
6784
  style: slotStyles?.inputShell,
6712
- children: /* @__PURE__ */ jsx44(
6785
+ children: /* @__PURE__ */ jsx46(
6713
6786
  "input",
6714
6787
  {
6715
6788
  ...props,
@@ -6727,7 +6800,7 @@ function MaskedField({
6727
6800
  )
6728
6801
  }
6729
6802
  ),
6730
- /* @__PURE__ */ jsx44(
6803
+ /* @__PURE__ */ jsx46(
6731
6804
  "span",
6732
6805
  {
6733
6806
  "aria-hidden": "true",
@@ -6739,7 +6812,7 @@ function MaskedField({
6739
6812
  ]
6740
6813
  }
6741
6814
  ),
6742
- hint ? /* @__PURE__ */ jsx44(
6815
+ hint ? /* @__PURE__ */ jsx46(
6743
6816
  "span",
6744
6817
  {
6745
6818
  className: cx("nu-masked-field__hint", slotClassNames?.hint),
@@ -6755,9 +6828,9 @@ function MaskedField({
6755
6828
 
6756
6829
  // src/components/Memo/Memo.tsx
6757
6830
  import {
6758
- useState as useState20
6831
+ useState as useState21
6759
6832
  } from "react";
6760
- import { jsx as jsx45 } from "react/jsx-runtime";
6833
+ import { jsx as jsx47 } from "react/jsx-runtime";
6761
6834
  function Memo({
6762
6835
  background,
6763
6836
  className,
@@ -6777,7 +6850,7 @@ function Memo({
6777
6850
  const isControlled = value !== void 0;
6778
6851
  const resolvedInitialValue = defaultValue == null ? content ?? "" : String(defaultValue);
6779
6852
  const resolvedValue = value == null ? "" : Array.isArray(value) ? value.join("\n") : String(value);
6780
- const [uncontrolledValue, setUncontrolledValue] = useState20(
6853
+ const [uncontrolledValue, setUncontrolledValue] = useState21(
6781
6854
  () => resolvedInitialValue
6782
6855
  );
6783
6856
  function handleChange(event) {
@@ -6787,7 +6860,7 @@ function Memo({
6787
6860
  onValueChange?.(event.target.value);
6788
6861
  onChange?.(event);
6789
6862
  }
6790
- return /* @__PURE__ */ jsx45(
6863
+ return /* @__PURE__ */ jsx47(
6791
6864
  "div",
6792
6865
  {
6793
6866
  className: ["nu-memo", className].filter(Boolean).join(" "),
@@ -6800,7 +6873,7 @@ function Memo({
6800
6873
  "--nu-memo-focus-text": focusTextColor,
6801
6874
  "--nu-memo-text": textColor
6802
6875
  },
6803
- children: /* @__PURE__ */ jsx45("div", { className: "nu-memo__viewport", children: /* @__PURE__ */ jsx45(
6876
+ children: /* @__PURE__ */ jsx47("div", { className: "nu-memo__viewport", children: /* @__PURE__ */ jsx47(
6804
6877
  "textarea",
6805
6878
  {
6806
6879
  ...props,
@@ -6817,10 +6890,10 @@ function Memo({
6817
6890
  import {
6818
6891
  useId as useId8,
6819
6892
  useMemo as useMemo14,
6820
- useRef as useRef16,
6821
- useState as useState21
6893
+ useRef as useRef17,
6894
+ useState as useState22
6822
6895
  } from "react";
6823
- import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
6896
+ import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
6824
6897
  function PageControl({
6825
6898
  activePageId: activePageIdProp,
6826
6899
  className,
@@ -6834,8 +6907,8 @@ function PageControl({
6834
6907
  }) {
6835
6908
  const generatedId = useId8();
6836
6909
  const isControlled = activePageIdProp !== void 0;
6837
- const tabRefs = useRef16({});
6838
- const [uncontrolledActivePageId, setUncontrolledActivePageId] = useState21(
6910
+ const tabRefs = useRef17({});
6911
+ const [uncontrolledActivePageId, setUncontrolledActivePageId] = useState22(
6839
6912
  () => defaultActivePageId ?? pages.find((page) => !page.disabled)?.id ?? pages[0]?.id
6840
6913
  );
6841
6914
  const activePageId = isControlled ? activePageIdProp : uncontrolledActivePageId;
@@ -6916,7 +6989,7 @@ function PageControl({
6916
6989
  slotStyles?.root
6917
6990
  ),
6918
6991
  children: [
6919
- /* @__PURE__ */ jsx46(
6992
+ /* @__PURE__ */ jsx48(
6920
6993
  "div",
6921
6994
  {
6922
6995
  className: cx("nu-page-control__tabs", slotClassNames?.tabs),
@@ -6927,7 +7000,7 @@ function PageControl({
6927
7000
  const isActive = page.id === resolvedActivePage?.id;
6928
7001
  const panelId = `${generatedId}-panel-${page.id}`;
6929
7002
  const tabId = `${generatedId}-tab-${page.id}`;
6930
- return /* @__PURE__ */ jsx46(
7003
+ return /* @__PURE__ */ jsx48(
6931
7004
  "button",
6932
7005
  {
6933
7006
  "aria-controls": panelId,
@@ -6951,7 +7024,7 @@ function PageControl({
6951
7024
  })
6952
7025
  }
6953
7026
  ),
6954
- /* @__PURE__ */ jsx46(
7027
+ /* @__PURE__ */ jsx48(
6955
7028
  "div",
6956
7029
  {
6957
7030
  "aria-labelledby": resolvedActivePage ? `${generatedId}-tab-${resolvedActivePage.id}` : void 0,
@@ -6968,7 +7041,7 @@ function PageControl({
6968
7041
  }
6969
7042
 
6970
7043
  // src/components/Panel/Panel.tsx
6971
- import { jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
7044
+ import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
6972
7045
  function Panel({
6973
7046
  children,
6974
7047
  className,
@@ -6986,7 +7059,7 @@ function Panel({
6986
7059
  className: cx("nu-panel", slotClassNames?.root, className),
6987
7060
  style: mergeSlotStyle(props.style, slotStyles?.root),
6988
7061
  children: [
6989
- title ? /* @__PURE__ */ jsx47(
7062
+ title ? /* @__PURE__ */ jsx49(
6990
7063
  "header",
6991
7064
  {
6992
7065
  className: cx("nu-panel__header", slotClassNames?.header),
@@ -6994,7 +7067,7 @@ function Panel({
6994
7067
  children: renderMnemonicText(title)
6995
7068
  }
6996
7069
  ) : null,
6997
- /* @__PURE__ */ jsx47(
7070
+ /* @__PURE__ */ jsx49(
6998
7071
  "div",
6999
7072
  {
7000
7073
  className: cx(
@@ -7006,7 +7079,7 @@ function Panel({
7006
7079
  children
7007
7080
  }
7008
7081
  ),
7009
- footer ? /* @__PURE__ */ jsx47(
7082
+ footer ? /* @__PURE__ */ jsx49(
7010
7083
  "footer",
7011
7084
  {
7012
7085
  className: cx("nu-panel__footer", slotClassNames?.footer),
@@ -7023,10 +7096,10 @@ function Panel({
7023
7096
  import {
7024
7097
  useId as useId9,
7025
7098
  useMemo as useMemo15,
7026
- useRef as useRef17,
7027
- useState as useState22
7099
+ useRef as useRef18,
7100
+ useState as useState23
7028
7101
  } from "react";
7029
- import { jsx as jsx48, jsxs as jsxs30 } from "react/jsx-runtime";
7102
+ import { jsx as jsx50, jsxs as jsxs30 } from "react/jsx-runtime";
7030
7103
  function collectGroupIds(entries) {
7031
7104
  const groupIds = /* @__PURE__ */ new Set();
7032
7105
  function visit(nextEntries) {
@@ -7134,11 +7207,11 @@ function PropertyGrid({
7134
7207
  ...props
7135
7208
  }) {
7136
7209
  const editorIdPrefix = useId9();
7137
- const rowButtonRefs = useRef17({});
7210
+ const rowButtonRefs = useRef18({});
7138
7211
  const groupIds = useMemo15(() => collectGroupIds(entries), [entries]);
7139
7212
  const isExpandedControlled = expandedIdsProp !== void 0;
7140
7213
  const isActiveControlled = activeIdProp !== void 0;
7141
- const [uncontrolledExpandedIds, setUncontrolledExpandedIds] = useState22(() => getInitialExpandedIds(entries, defaultExpandedIds));
7214
+ const [uncontrolledExpandedIds, setUncontrolledExpandedIds] = useState23(() => getInitialExpandedIds(entries, defaultExpandedIds));
7142
7215
  const resolvedExpandedIds = expandedIdsProp ?? uncontrolledExpandedIds;
7143
7216
  const expandedIdSet = useMemo15(
7144
7217
  () => new Set(
@@ -7151,7 +7224,7 @@ function PropertyGrid({
7151
7224
  [entries, expandedIdSet]
7152
7225
  );
7153
7226
  const interactiveRows = useMemo15(() => collectInteractiveRows(rows), [rows]);
7154
- const [uncontrolledActiveId, setUncontrolledActiveId] = useState22(() => getInitialActiveId2(interactiveRows, defaultActiveId));
7227
+ const [uncontrolledActiveId, setUncontrolledActiveId] = useState23(() => getInitialActiveId2(interactiveRows, defaultActiveId));
7155
7228
  const requestedActiveId = isActiveControlled ? activeIdProp : uncontrolledActiveId;
7156
7229
  const resolvedActiveId = requestedActiveId && interactiveRows.some((row) => row.id === requestedActiveId) ? requestedActiveId : interactiveRows[0]?.id;
7157
7230
  function updateExpandedIds(nextExpandedIds) {
@@ -7270,7 +7343,7 @@ function PropertyGrid({
7270
7343
  const nextExpandedIds = expandedIdSet.has(entry.id) ? resolvedExpandedIds.filter((expandedId) => expandedId !== entry.id) : [...resolvedExpandedIds, entry.id];
7271
7344
  updateExpandedIds(nextExpandedIds);
7272
7345
  }
7273
- return /* @__PURE__ */ jsx48(
7346
+ return /* @__PURE__ */ jsx50(
7274
7347
  "div",
7275
7348
  {
7276
7349
  ...props,
@@ -7281,9 +7354,9 @@ function PropertyGrid({
7281
7354
  ...style,
7282
7355
  "--nu-property-grid-label-width": labelWidth
7283
7356
  },
7284
- children: /* @__PURE__ */ jsx48("div", { className: "nu-property-grid__body", children: rows.map((row) => {
7357
+ children: /* @__PURE__ */ jsx50("div", { className: "nu-property-grid__body", children: rows.map((row) => {
7285
7358
  if (row.type === "section") {
7286
- return /* @__PURE__ */ jsx48("div", { className: "nu-property-grid__section", children: renderMnemonicText(row.entry.title) }, row.entry.id);
7359
+ return /* @__PURE__ */ jsx50("div", { className: "nu-property-grid__section", children: renderMnemonicText(row.entry.title) }, row.entry.id);
7287
7360
  }
7288
7361
  if (row.type === "group") {
7289
7362
  const isExpanded = expandedIdSet.has(row.entry.id);
@@ -7296,7 +7369,7 @@ function PropertyGrid({
7296
7369
  "data-expanded": isExpanded || void 0,
7297
7370
  "data-group": true,
7298
7371
  children: [
7299
- /* @__PURE__ */ jsx48(
7372
+ /* @__PURE__ */ jsx50(
7300
7373
  "button",
7301
7374
  {
7302
7375
  className: "nu-property-grid__label nu-property-grid__label-button",
@@ -7317,17 +7390,17 @@ function PropertyGrid({
7317
7390
  },
7318
7391
  type: "button",
7319
7392
  children: /* @__PURE__ */ jsxs30("span", { className: "nu-property-grid__lead", children: [
7320
- /* @__PURE__ */ jsx48("span", { className: "nu-property-grid__expander", children: /* @__PURE__ */ jsx48(
7393
+ /* @__PURE__ */ jsx50("span", { className: "nu-property-grid__expander", children: /* @__PURE__ */ jsx50(
7321
7394
  NuGlyph,
7322
7395
  {
7323
7396
  name: isExpanded ? "tree-caret-down" : "tree-caret-right"
7324
7397
  }
7325
7398
  ) }),
7326
- /* @__PURE__ */ jsx48("span", { className: "nu-property-grid__label-text", children: renderMnemonicText(row.entry.label) })
7399
+ /* @__PURE__ */ jsx50("span", { className: "nu-property-grid__label-text", children: renderMnemonicText(row.entry.label) })
7327
7400
  ] })
7328
7401
  }
7329
7402
  ),
7330
- /* @__PURE__ */ jsx48("div", { className: "nu-property-grid__editor", children: row.entry.summary ? /* @__PURE__ */ jsx48("div", { className: "nu-property-grid__control", children: row.entry.summary }) : null })
7403
+ /* @__PURE__ */ jsx50("div", { className: "nu-property-grid__editor", children: row.entry.summary ? /* @__PURE__ */ jsx50("div", { className: "nu-property-grid__control", children: row.entry.summary }) : null })
7331
7404
  ]
7332
7405
  },
7333
7406
  row.entry.id
@@ -7341,7 +7414,7 @@ function PropertyGrid({
7341
7414
  "data-active": resolvedActiveId === row.entry.id || void 0,
7342
7415
  "data-disabled": row.entry.disabled || void 0,
7343
7416
  children: [
7344
- /* @__PURE__ */ jsx48(
7417
+ /* @__PURE__ */ jsx50(
7345
7418
  "button",
7346
7419
  {
7347
7420
  className: "nu-property-grid__label nu-property-grid__label-button",
@@ -7362,8 +7435,8 @@ function PropertyGrid({
7362
7435
  },
7363
7436
  type: "button",
7364
7437
  children: /* @__PURE__ */ jsxs30("span", { className: "nu-property-grid__lead", children: [
7365
- /* @__PURE__ */ jsx48("span", { className: "nu-property-grid__expander-placeholder" }),
7366
- /* @__PURE__ */ jsx48("span", { className: "nu-property-grid__label-text", children: renderMnemonicText(row.entry.label) })
7438
+ /* @__PURE__ */ jsx50("span", { className: "nu-property-grid__expander-placeholder" }),
7439
+ /* @__PURE__ */ jsx50("span", { className: "nu-property-grid__label-text", children: renderMnemonicText(row.entry.label) })
7367
7440
  ] })
7368
7441
  }
7369
7442
  ),
@@ -7374,8 +7447,8 @@ function PropertyGrid({
7374
7447
  id: editorId,
7375
7448
  onFocusCapture: () => updateActiveId(row.entry.id),
7376
7449
  children: [
7377
- /* @__PURE__ */ jsx48("div", { className: "nu-property-grid__control", children: row.entry.content }),
7378
- row.entry.hint ? /* @__PURE__ */ jsx48("div", { className: "nu-property-grid__hint", children: row.entry.hint }) : null
7450
+ /* @__PURE__ */ jsx50("div", { className: "nu-property-grid__control", children: row.entry.content }),
7451
+ row.entry.hint ? /* @__PURE__ */ jsx50("div", { className: "nu-property-grid__hint", children: row.entry.hint }) : null
7379
7452
  ]
7380
7453
  }
7381
7454
  )
@@ -7389,7 +7462,7 @@ function PropertyGrid({
7389
7462
  }
7390
7463
 
7391
7464
  // src/components/ProgressBar/ProgressBar.tsx
7392
- import { jsx as jsx49, jsxs as jsxs31 } from "react/jsx-runtime";
7465
+ import { jsx as jsx51, jsxs as jsxs31 } from "react/jsx-runtime";
7393
7466
  function clamp3(value, min, max) {
7394
7467
  return Math.min(max, Math.max(min, value));
7395
7468
  }
@@ -7425,7 +7498,7 @@ function ProgressBar({
7425
7498
  role: "progressbar",
7426
7499
  style: mergeSlotStyle(style, slotStyles?.root),
7427
7500
  children: [
7428
- label ? /* @__PURE__ */ jsx49(
7501
+ label ? /* @__PURE__ */ jsx51(
7429
7502
  "span",
7430
7503
  {
7431
7504
  className: cx("nu-progress-bar__label", slotClassNames?.label),
@@ -7444,7 +7517,7 @@ function ProgressBar({
7444
7517
  slotStyles?.track
7445
7518
  ),
7446
7519
  children: [
7447
- /* @__PURE__ */ jsx49(
7520
+ /* @__PURE__ */ jsx51(
7448
7521
  "div",
7449
7522
  {
7450
7523
  className: cx("nu-progress-bar__fill", slotClassNames?.fill),
@@ -7457,7 +7530,7 @@ function ProgressBar({
7457
7530
  )
7458
7531
  }
7459
7532
  ),
7460
- showValue ? /* @__PURE__ */ jsx49(
7533
+ showValue ? /* @__PURE__ */ jsx51(
7461
7534
  "span",
7462
7535
  {
7463
7536
  className: cx("nu-progress-bar__value", slotClassNames?.value),
@@ -7468,7 +7541,7 @@ function ProgressBar({
7468
7541
  ]
7469
7542
  }
7470
7543
  ),
7471
- hint ? /* @__PURE__ */ jsx49(
7544
+ hint ? /* @__PURE__ */ jsx51(
7472
7545
  "span",
7473
7546
  {
7474
7547
  className: cx("nu-progress-bar__hint", slotClassNames?.hint),
@@ -7482,8 +7555,8 @@ function ProgressBar({
7482
7555
  }
7483
7556
 
7484
7557
  // src/components/RadioGroup/RadioButton.tsx
7485
- import { useId as useId10, useState as useState23 } from "react";
7486
- import { jsx as jsx50, jsxs as jsxs32 } from "react/jsx-runtime";
7558
+ import { useId as useId10, useState as useState24 } from "react";
7559
+ import { jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
7487
7560
  function RadioButton({
7488
7561
  checked,
7489
7562
  className,
@@ -7499,7 +7572,7 @@ function RadioButton({
7499
7572
  const inputId = id ?? generatedId;
7500
7573
  const hintId = hint ? `${inputId}-hint` : void 0;
7501
7574
  const isControlled = checked !== void 0;
7502
- const [uncontrolledChecked, setUncontrolledChecked] = useState23(defaultChecked);
7575
+ const [uncontrolledChecked, setUncontrolledChecked] = useState24(defaultChecked);
7503
7576
  const resolvedChecked = isControlled ? checked : uncontrolledChecked;
7504
7577
  function handleChange(event) {
7505
7578
  if (!isControlled) {
@@ -7509,7 +7582,7 @@ function RadioButton({
7509
7582
  }
7510
7583
  return /* @__PURE__ */ jsxs32("label", { className: ["nu-radio-button", className].filter(Boolean).join(" "), children: [
7511
7584
  /* @__PURE__ */ jsxs32("span", { className: "nu-radio-button__main", children: [
7512
- /* @__PURE__ */ jsx50(
7585
+ /* @__PURE__ */ jsx52(
7513
7586
  "input",
7514
7587
  {
7515
7588
  ...props,
@@ -7522,19 +7595,19 @@ function RadioButton({
7522
7595
  type: "radio"
7523
7596
  }
7524
7597
  ),
7525
- /* @__PURE__ */ jsx50("span", { "aria-hidden": "true", className: "nu-radio-button__control", children: /* @__PURE__ */ jsxs32("span", { className: "nu-radio-button__disc", children: [
7526
- /* @__PURE__ */ jsx50(NuGlyph, { className: "nu-radio-button__ring", name: "radio-ring" }),
7527
- resolvedChecked ? /* @__PURE__ */ jsx50(NuGlyph, { className: "nu-radio-button__fill", name: "radio-fill" }) : null
7598
+ /* @__PURE__ */ jsx52("span", { "aria-hidden": "true", className: "nu-radio-button__control", children: /* @__PURE__ */ jsxs32("span", { className: "nu-radio-button__disc", children: [
7599
+ /* @__PURE__ */ jsx52(NuGlyph, { className: "nu-radio-button__ring", name: "radio-ring" }),
7600
+ resolvedChecked ? /* @__PURE__ */ jsx52(NuGlyph, { className: "nu-radio-button__fill", name: "radio-fill" }) : null
7528
7601
  ] }) }),
7529
- /* @__PURE__ */ jsx50("span", { className: "nu-radio-button__label", children: renderMnemonicText(label) })
7602
+ /* @__PURE__ */ jsx52("span", { className: "nu-radio-button__label", children: renderMnemonicText(label) })
7530
7603
  ] }),
7531
- hint ? /* @__PURE__ */ jsx50("span", { className: "nu-radio-button__hint", id: hintId, children: hint }) : null
7604
+ hint ? /* @__PURE__ */ jsx52("span", { className: "nu-radio-button__hint", id: hintId, children: hint }) : null
7532
7605
  ] });
7533
7606
  }
7534
7607
 
7535
7608
  // src/components/RadioGroup/RadioGroup.tsx
7536
- import { useId as useId11, useState as useState24 } from "react";
7537
- import { jsx as jsx51, jsxs as jsxs33 } from "react/jsx-runtime";
7609
+ import { useId as useId11, useState as useState25 } from "react";
7610
+ import { jsx as jsx53, jsxs as jsxs33 } from "react/jsx-runtime";
7538
7611
  function RadioGroup({
7539
7612
  className,
7540
7613
  defaultValue,
@@ -7553,7 +7626,7 @@ function RadioGroup({
7553
7626
  const groupName = name ?? generatedId;
7554
7627
  const hintId = hint ? `${groupName}-hint` : void 0;
7555
7628
  const isControlled = value !== void 0;
7556
- const [uncontrolledValue, setUncontrolledValue] = useState24(defaultValue ?? options[0]?.value);
7629
+ const [uncontrolledValue, setUncontrolledValue] = useState25(defaultValue ?? options[0]?.value);
7557
7630
  const resolvedValue = isControlled ? value : uncontrolledValue;
7558
7631
  function commitValue(nextValue) {
7559
7632
  if (!isControlled) {
@@ -7569,7 +7642,7 @@ function RadioGroup({
7569
7642
  className: cx("nu-radio-group", slotClassNames?.root, className),
7570
7643
  style: mergeSlotStyle(style, slotStyles?.root),
7571
7644
  children: [
7572
- label ? /* @__PURE__ */ jsx51(
7645
+ label ? /* @__PURE__ */ jsx53(
7573
7646
  "legend",
7574
7647
  {
7575
7648
  className: cx("nu-radio-group__label", slotClassNames?.label),
@@ -7577,12 +7650,12 @@ function RadioGroup({
7577
7650
  children: renderMnemonicText(label)
7578
7651
  }
7579
7652
  ) : null,
7580
- /* @__PURE__ */ jsx51(
7653
+ /* @__PURE__ */ jsx53(
7581
7654
  "div",
7582
7655
  {
7583
7656
  className: cx("nu-radio-group__options", slotClassNames?.options),
7584
7657
  style: slotStyles?.options,
7585
- children: options.map((option) => /* @__PURE__ */ jsx51(
7658
+ children: options.map((option) => /* @__PURE__ */ jsx53(
7586
7659
  RadioButton,
7587
7660
  {
7588
7661
  checked: resolvedValue === option.value,
@@ -7601,7 +7674,7 @@ function RadioGroup({
7601
7674
  ))
7602
7675
  }
7603
7676
  ),
7604
- hint ? /* @__PURE__ */ jsx51(
7677
+ hint ? /* @__PURE__ */ jsx53(
7605
7678
  "span",
7606
7679
  {
7607
7680
  className: cx("nu-radio-group__hint", slotClassNames?.hint),
@@ -7616,14 +7689,14 @@ function RadioGroup({
7616
7689
  }
7617
7690
 
7618
7691
  // src/components/ReportCell/ReportCell.tsx
7619
- import { jsx as jsx52 } from "react/jsx-runtime";
7692
+ import { jsx as jsx54 } from "react/jsx-runtime";
7620
7693
  function ReportCell({
7621
7694
  align = "start",
7622
7695
  className,
7623
7696
  tone = "default",
7624
7697
  ...props
7625
7698
  }) {
7626
- return /* @__PURE__ */ jsx52(
7699
+ return /* @__PURE__ */ jsx54(
7627
7700
  "span",
7628
7701
  {
7629
7702
  ...props,
@@ -7642,11 +7715,11 @@ import {
7642
7715
  useEffect as useEffect13,
7643
7716
  useId as useId12,
7644
7717
  useMemo as useMemo16,
7645
- useRef as useRef18,
7646
- useState as useState25
7718
+ useRef as useRef19,
7719
+ useState as useState26
7647
7720
  } from "react";
7648
7721
  import { createPortal as createPortal4 } from "react-dom";
7649
- import { jsx as jsx53, jsxs as jsxs34 } from "react/jsx-runtime";
7722
+ import { jsx as jsx55, jsxs as jsxs34 } from "react/jsx-runtime";
7650
7723
  function resolveSearchBoxPortalRoot() {
7651
7724
  return document.body;
7652
7725
  }
@@ -7674,21 +7747,21 @@ function SearchBox({
7674
7747
  style,
7675
7748
  ...props
7676
7749
  }) {
7677
- const rootRef = useRef18(null);
7678
- const fieldRef = useRef18(null);
7679
- const inputRef = useRef18(null);
7680
- const popupRef = useRef18(null);
7681
- const requestIdRef = useRef18(0);
7750
+ const rootRef = useRef19(null);
7751
+ const fieldRef = useRef19(null);
7752
+ const inputRef = useRef19(null);
7753
+ const popupRef = useRef19(null);
7754
+ const requestIdRef = useRef19(0);
7682
7755
  const generatedId = useId12();
7683
7756
  const fieldId = `${generatedId}-search-box`;
7684
7757
  const labelId = `${fieldId}-label`;
7685
7758
  const hintId = hint ? `${fieldId}-hint` : void 0;
7686
7759
  const isQueryControlled = queryProp !== void 0;
7687
- const [uncontrolledQuery, setUncontrolledQuery] = useState25(defaultQuery);
7688
- const [open, setOpen] = useState25(false);
7689
- const [status, setStatus] = useState25("idle");
7690
- const [results, setResults] = useState25([]);
7691
- const [selectedValue, setSelectedValue] = useState25(null);
7760
+ const [uncontrolledQuery, setUncontrolledQuery] = useState26(defaultQuery);
7761
+ const [open, setOpen] = useState26(false);
7762
+ const [status, setStatus] = useState26("idle");
7763
+ const [results, setResults] = useState26([]);
7764
+ const [selectedValue, setSelectedValue] = useState26(null);
7692
7765
  const normalizedQuery = (isQueryControlled ? queryProp : uncontrolledQuery) ?? "";
7693
7766
  const trimmedQuery = normalizedQuery.trim();
7694
7767
  const resultOptions = useMemo16(() => {
@@ -7715,7 +7788,7 @@ function SearchBox({
7715
7788
  [resultOptions]
7716
7789
  );
7717
7790
  const popupRoot = typeof document === "undefined" ? null : resolveSearchBoxPortalRoot();
7718
- const [themePortalStyle, setThemePortalStyle] = useState25(() => void 0);
7791
+ const [themePortalStyle, setThemePortalStyle] = useState26(() => void 0);
7719
7792
  useEffect13(() => {
7720
7793
  if (disabled) {
7721
7794
  return;
@@ -7796,15 +7869,15 @@ function SearchBox({
7796
7869
  }
7797
7870
  function renderPopupContent() {
7798
7871
  if (status === "loading") {
7799
- return /* @__PURE__ */ jsx53("div", { className: "nu-search-box__status", children: loadingText });
7872
+ return /* @__PURE__ */ jsx55("div", { className: "nu-search-box__status", children: loadingText });
7800
7873
  }
7801
7874
  if (status === "error") {
7802
- return /* @__PURE__ */ jsx53("div", { className: "nu-search-box__status", children: errorText });
7875
+ return /* @__PURE__ */ jsx55("div", { className: "nu-search-box__status", children: errorText });
7803
7876
  }
7804
7877
  if (trimmedQuery.length < minQueryLength) {
7805
- return /* @__PURE__ */ jsx53("div", { className: "nu-search-box__status", children: idleText });
7878
+ return /* @__PURE__ */ jsx55("div", { className: "nu-search-box__status", children: idleText });
7806
7879
  }
7807
- return /* @__PURE__ */ jsx53("div", { className: "nu-search-box__listbox", children: /* @__PURE__ */ jsx53(
7880
+ return /* @__PURE__ */ jsx55("div", { className: "nu-search-box__listbox", children: /* @__PURE__ */ jsx55(
7808
7881
  ListBox,
7809
7882
  {
7810
7883
  data: listBoxData,
@@ -7849,10 +7922,10 @@ function SearchBox({
7849
7922
  ref: rootRef,
7850
7923
  style,
7851
7924
  children: [
7852
- /* @__PURE__ */ jsx53("label", { className: "nu-search-box__label", htmlFor: fieldId, id: labelId, children: renderMnemonicText(label) }),
7925
+ /* @__PURE__ */ jsx55("label", { className: "nu-search-box__label", htmlFor: fieldId, id: labelId, children: renderMnemonicText(label) }),
7853
7926
  /* @__PURE__ */ jsxs34("span", { className: "nu-search-box__slot", ref: fieldRef, children: [
7854
- /* @__PURE__ */ jsx53("span", { "aria-hidden": "true", className: "nu-search-box__bracket", children: "[" }),
7855
- /* @__PURE__ */ jsx53("span", { className: "nu-search-box__input-shell", children: /* @__PURE__ */ jsx53(
7927
+ /* @__PURE__ */ jsx55("span", { "aria-hidden": "true", className: "nu-search-box__bracket", children: "[" }),
7928
+ /* @__PURE__ */ jsx55("span", { className: "nu-search-box__input-shell", children: /* @__PURE__ */ jsx55(
7856
7929
  "input",
7857
7930
  {
7858
7931
  "aria-autocomplete": "list",
@@ -7877,11 +7950,11 @@ function SearchBox({
7877
7950
  value: normalizedQuery
7878
7951
  }
7879
7952
  ) }),
7880
- /* @__PURE__ */ jsx53("span", { "aria-hidden": "true", className: "nu-search-box__bracket", children: "]" })
7953
+ /* @__PURE__ */ jsx55("span", { "aria-hidden": "true", className: "nu-search-box__bracket", children: "]" })
7881
7954
  ] }),
7882
- hint ? /* @__PURE__ */ jsx53("span", { className: "nu-search-box__hint", id: hintId, children: hint }) : null,
7955
+ hint ? /* @__PURE__ */ jsx55("span", { className: "nu-search-box__hint", id: hintId, children: hint }) : null,
7883
7956
  open && popupRoot ? createPortal4(
7884
- /* @__PURE__ */ jsx53(
7957
+ /* @__PURE__ */ jsx55(
7885
7958
  "div",
7886
7959
  {
7887
7960
  className: "nu-search-box__popup",
@@ -7902,9 +7975,9 @@ function SearchBox({
7902
7975
  import {
7903
7976
  useId as useId13,
7904
7977
  useMemo as useMemo17,
7905
- useState as useState26
7978
+ useState as useState27
7906
7979
  } from "react";
7907
- import { jsx as jsx54, jsxs as jsxs35 } from "react/jsx-runtime";
7980
+ import { jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
7908
7981
  function clampSpinValue(value, min, max) {
7909
7982
  let nextValue = value;
7910
7983
  if (min !== void 0) {
@@ -7954,9 +8027,9 @@ function SpinBox({
7954
8027
  min,
7955
8028
  max
7956
8029
  );
7957
- const [uncontrolledValue, setUncontrolledValue] = useState26(initialNumericValue);
8030
+ const [uncontrolledValue, setUncontrolledValue] = useState27(initialNumericValue);
7958
8031
  const numericValue = isControlled ? clampSpinValue(value ?? initialNumericValue, min, max) : uncontrolledValue;
7959
- const [uncontrolledDraftValue, setUncontrolledDraftValue] = useState26(
8032
+ const [uncontrolledDraftValue, setUncontrolledDraftValue] = useState27(
7960
8033
  () => formatSpinValue(initialNumericValue)
7961
8034
  );
7962
8035
  const draftValue = isControlled ? formatSpinValue(numericValue) : uncontrolledDraftValue;
@@ -8024,7 +8097,7 @@ function SpinBox({
8024
8097
  htmlFor: fieldId,
8025
8098
  style: mergeSlotStyle(style, slotStyles?.root),
8026
8099
  children: [
8027
- /* @__PURE__ */ jsx54(
8100
+ /* @__PURE__ */ jsx56(
8028
8101
  "span",
8029
8102
  {
8030
8103
  className: cx("nu-spin-box__label", slotClassNames?.label),
@@ -8038,7 +8111,7 @@ function SpinBox({
8038
8111
  className: cx("nu-spin-box__slot", slotClassNames?.slot),
8039
8112
  style: slotStyles?.slot,
8040
8113
  children: [
8041
- /* @__PURE__ */ jsx54(
8114
+ /* @__PURE__ */ jsx56(
8042
8115
  "span",
8043
8116
  {
8044
8117
  "aria-hidden": "true",
@@ -8047,12 +8120,12 @@ function SpinBox({
8047
8120
  children: "["
8048
8121
  }
8049
8122
  ),
8050
- /* @__PURE__ */ jsx54(
8123
+ /* @__PURE__ */ jsx56(
8051
8124
  "span",
8052
8125
  {
8053
8126
  className: cx("nu-spin-box__input-shell", slotClassNames?.inputShell),
8054
8127
  style: slotStyles?.inputShell,
8055
- children: /* @__PURE__ */ jsx54(
8128
+ children: /* @__PURE__ */ jsx56(
8056
8129
  "input",
8057
8130
  {
8058
8131
  ...props,
@@ -8071,7 +8144,7 @@ function SpinBox({
8071
8144
  )
8072
8145
  }
8073
8146
  ),
8074
- /* @__PURE__ */ jsx54(
8147
+ /* @__PURE__ */ jsx56(
8075
8148
  "span",
8076
8149
  {
8077
8150
  "aria-hidden": "true",
@@ -8086,7 +8159,7 @@ function SpinBox({
8086
8159
  className: cx("nu-spin-box__controls", slotClassNames?.controls),
8087
8160
  style: slotStyles?.controls,
8088
8161
  children: [
8089
- /* @__PURE__ */ jsx54(
8162
+ /* @__PURE__ */ jsx56(
8090
8163
  "button",
8091
8164
  {
8092
8165
  className: cx("nu-spin-box__button", slotClassNames?.button),
@@ -8097,7 +8170,7 @@ function SpinBox({
8097
8170
  children: "-"
8098
8171
  }
8099
8172
  ),
8100
- /* @__PURE__ */ jsx54(
8173
+ /* @__PURE__ */ jsx56(
8101
8174
  "button",
8102
8175
  {
8103
8176
  className: cx("nu-spin-box__button", slotClassNames?.button),
@@ -8114,7 +8187,7 @@ function SpinBox({
8114
8187
  ]
8115
8188
  }
8116
8189
  ),
8117
- hint ? /* @__PURE__ */ jsx54(
8190
+ hint ? /* @__PURE__ */ jsx56(
8118
8191
  "span",
8119
8192
  {
8120
8193
  className: cx("nu-spin-box__hint", slotClassNames?.hint),
@@ -8132,10 +8205,10 @@ function SpinBox({
8132
8205
  import {
8133
8206
  useEffect as useEffect14,
8134
8207
  useId as useId14,
8135
- useRef as useRef19,
8136
- useState as useState27
8208
+ useRef as useRef20,
8209
+ useState as useState28
8137
8210
  } from "react";
8138
- import { jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
8211
+ import { jsx as jsx57, jsxs as jsxs36 } from "react/jsx-runtime";
8139
8212
  function clamp4(value, min, max) {
8140
8213
  return Math.min(max, Math.max(min, value));
8141
8214
  }
@@ -8166,12 +8239,12 @@ function Splitter({
8166
8239
  const parsedValue = Number(rawValue);
8167
8240
  return Number.isFinite(parsedValue) ? parsedValue : null;
8168
8241
  };
8169
- const [uncontrolledValue, setUncontrolledValue] = useState27(
8242
+ const [uncontrolledValue, setUncontrolledValue] = useState28(
8170
8243
  clamp4(getSavedValue() ?? defaultValue, min, max)
8171
8244
  );
8172
- const rootRef = useRef19(null);
8173
- const dragFrameRef = useRef19(null);
8174
- const dragValueRef = useRef19(null);
8245
+ const rootRef = useRef20(null);
8246
+ const dragFrameRef = useRef20(null);
8247
+ const dragValueRef = useRef20(null);
8175
8248
  const activeValue = clamp4(
8176
8249
  (isControlled ? value : uncontrolledValue) ?? defaultValue,
8177
8250
  min,
@@ -8302,8 +8375,8 @@ function Splitter({
8302
8375
  "--nu-splitter-value": `${activeValue * 100}%`
8303
8376
  },
8304
8377
  children: [
8305
- /* @__PURE__ */ jsx55("div", { className: "nu-splitter__pane", id: firstPaneId, children: first }),
8306
- /* @__PURE__ */ jsx55(
8378
+ /* @__PURE__ */ jsx57("div", { className: "nu-splitter__pane", id: firstPaneId, children: first }),
8379
+ /* @__PURE__ */ jsx57(
8307
8380
  "div",
8308
8381
  {
8309
8382
  "aria-controls": `${firstPaneId} ${secondPaneId}`,
@@ -8316,7 +8389,7 @@ function Splitter({
8316
8389
  onPointerDown: handlePointerDown,
8317
8390
  role: "separator",
8318
8391
  tabIndex: 0,
8319
- children: /* @__PURE__ */ jsx55(
8392
+ children: /* @__PURE__ */ jsx57(
8320
8393
  "span",
8321
8394
  {
8322
8395
  "aria-hidden": "true",
@@ -8326,7 +8399,7 @@ function Splitter({
8326
8399
  )
8327
8400
  }
8328
8401
  ),
8329
- /* @__PURE__ */ jsx55("div", { className: "nu-splitter__pane", id: secondPaneId, children: second })
8402
+ /* @__PURE__ */ jsx57("div", { className: "nu-splitter__pane", id: secondPaneId, children: second })
8330
8403
  ]
8331
8404
  }
8332
8405
  );
@@ -8337,10 +8410,10 @@ import {
8337
8410
  useEffect as useEffect15,
8338
8411
  useId as useId15,
8339
8412
  useMemo as useMemo18,
8340
- useRef as useRef20,
8341
- useState as useState28
8413
+ useRef as useRef21,
8414
+ useState as useState29
8342
8415
  } from "react";
8343
- import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
8416
+ import { jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
8344
8417
  function clamp5(value, min, max) {
8345
8418
  return Math.min(max, Math.max(min, value));
8346
8419
  }
@@ -8385,9 +8458,9 @@ function TickBar({
8385
8458
  min,
8386
8459
  safeMax
8387
8460
  );
8388
- const [uncontrolledValue, setUncontrolledValue] = useState28(initialValue);
8389
- const [dragging, setDragging] = useState28(false);
8390
- const trackRef = useRef20(null);
8461
+ const [uncontrolledValue, setUncontrolledValue] = useState29(initialValue);
8462
+ const [dragging, setDragging] = useState29(false);
8463
+ const trackRef = useRef21(null);
8391
8464
  const resolvedValue = isControlled ? clamp5(snapToStep(value ?? initialValue, min, safeStep), min, safeMax) : uncontrolledValue;
8392
8465
  const ratio = safeMax === min ? 0 : (resolvedValue - min) / (safeMax - min);
8393
8466
  const derivedTickCount = useMemo18(() => {
@@ -8489,7 +8562,7 @@ function TickBar({
8489
8562
  slotStyles?.root
8490
8563
  ),
8491
8564
  children: [
8492
- label ? /* @__PURE__ */ jsx56(
8565
+ label ? /* @__PURE__ */ jsx58(
8493
8566
  "span",
8494
8567
  {
8495
8568
  className: cx("nu-tick-bar__label", slotClassNames?.label),
@@ -8545,19 +8618,19 @@ function TickBar({
8545
8618
  style: slotStyles?.track,
8546
8619
  tabIndex: disabled ? -1 : 0,
8547
8620
  children: [
8548
- /* @__PURE__ */ jsx56(
8621
+ /* @__PURE__ */ jsx58(
8549
8622
  "div",
8550
8623
  {
8551
8624
  className: cx("nu-tick-bar__rail", slotClassNames?.rail),
8552
8625
  style: slotStyles?.rail
8553
8626
  }
8554
8627
  ),
8555
- /* @__PURE__ */ jsx56(
8628
+ /* @__PURE__ */ jsx58(
8556
8629
  "div",
8557
8630
  {
8558
8631
  className: cx("nu-tick-bar__ticks", slotClassNames?.ticks),
8559
8632
  style: slotStyles?.ticks,
8560
- children: Array.from({ length: derivedTickCount }, (_, index) => /* @__PURE__ */ jsx56(
8633
+ children: Array.from({ length: derivedTickCount }, (_, index) => /* @__PURE__ */ jsx58(
8561
8634
  "span",
8562
8635
  {
8563
8636
  "aria-hidden": "true",
@@ -8568,7 +8641,7 @@ function TickBar({
8568
8641
  ))
8569
8642
  }
8570
8643
  ),
8571
- /* @__PURE__ */ jsx56(
8644
+ /* @__PURE__ */ jsx58(
8572
8645
  "div",
8573
8646
  {
8574
8647
  "aria-hidden": "true",
@@ -8586,7 +8659,7 @@ function TickBar({
8586
8659
  ]
8587
8660
  }
8588
8661
  ),
8589
- showValue ? /* @__PURE__ */ jsx56(
8662
+ showValue ? /* @__PURE__ */ jsx58(
8590
8663
  "span",
8591
8664
  {
8592
8665
  className: cx("nu-tick-bar__value", slotClassNames?.value),
@@ -8597,7 +8670,7 @@ function TickBar({
8597
8670
  ]
8598
8671
  }
8599
8672
  ),
8600
- hint ? /* @__PURE__ */ jsx56(
8673
+ hint ? /* @__PURE__ */ jsx58(
8601
8674
  "span",
8602
8675
  {
8603
8676
  className: cx("nu-tick-bar__hint", slotClassNames?.hint),
@@ -8612,17 +8685,19 @@ function TickBar({
8612
8685
  }
8613
8686
 
8614
8687
  // src/components/ToolBar/ToolBar.tsx
8615
- import { jsx as jsx57 } from "react/jsx-runtime";
8688
+ import { jsx as jsx59, jsxs as jsxs38 } from "react/jsx-runtime";
8616
8689
  function ToolBar({
8617
8690
  children,
8618
8691
  className,
8692
+ endContent,
8619
8693
  fill = true,
8620
8694
  slotClassNames,
8621
8695
  slotStyles,
8696
+ startContent,
8622
8697
  wrap = false,
8623
8698
  ...props
8624
8699
  }) {
8625
- return /* @__PURE__ */ jsx57(
8700
+ return /* @__PURE__ */ jsxs38(
8626
8701
  "div",
8627
8702
  {
8628
8703
  ...props,
@@ -8631,7 +8706,11 @@ function ToolBar({
8631
8706
  "data-wrap": wrap || void 0,
8632
8707
  role: "toolbar",
8633
8708
  style: mergeSlotStyle(props.style, slotStyles?.root),
8634
- children
8709
+ children: [
8710
+ startContent !== null && startContent !== void 0 ? /* @__PURE__ */ jsx59("span", { className: "nu-toolbar__static nu-toolbar__static--start", children: startContent }) : null,
8711
+ children,
8712
+ endContent !== null && endContent !== void 0 ? /* @__PURE__ */ jsx59("span", { className: "nu-toolbar__static nu-toolbar__static--end", children: endContent }) : null
8713
+ ]
8635
8714
  }
8636
8715
  );
8637
8716
  }
@@ -8641,7 +8720,7 @@ function ToolButton({
8641
8720
  slotStyles,
8642
8721
  ...props
8643
8722
  }) {
8644
- return /* @__PURE__ */ jsx57(
8723
+ return /* @__PURE__ */ jsx59(
8645
8724
  CommandButton,
8646
8725
  {
8647
8726
  ...props,
@@ -8671,7 +8750,7 @@ function ToolDropButton({
8671
8750
  uncheckedShape,
8672
8751
  ...props
8673
8752
  }) {
8674
- return /* @__PURE__ */ jsx57(
8753
+ return /* @__PURE__ */ jsx59(
8675
8754
  CommandButton,
8676
8755
  {
8677
8756
  ...props,
@@ -8697,7 +8776,7 @@ function ToolDropButton({
8697
8776
  );
8698
8777
  }
8699
8778
  function ToolSeparator({ className, ...props }) {
8700
- return /* @__PURE__ */ jsx57(
8779
+ return /* @__PURE__ */ jsx59(
8701
8780
  "div",
8702
8781
  {
8703
8782
  ...props,
@@ -8720,8 +8799,8 @@ import {
8720
8799
  useId as useId16,
8721
8800
  useImperativeHandle as useImperativeHandle3,
8722
8801
  useMemo as useMemo19,
8723
- useRef as useRef21,
8724
- useState as useState29
8802
+ useRef as useRef22,
8803
+ useState as useState30
8725
8804
  } from "react";
8726
8805
 
8727
8806
  // src/components/_shared/treeData.ts
@@ -8819,7 +8898,7 @@ function collectVisibleTreeItems(items, expandedIds, depth = 0, guideMask = [],
8819
8898
 
8820
8899
  // src/components/TreeView/internals/TreeViewItem.tsx
8821
8900
  import { memo as memo4 } from "react";
8822
- import { jsx as jsx58, jsxs as jsxs38 } from "react/jsx-runtime";
8901
+ import { jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
8823
8902
  function areTreeViewGuideArraysEqual(previousArray, nextArray) {
8824
8903
  if (previousArray.length !== nextArray.length) {
8825
8904
  return false;
@@ -8893,8 +8972,8 @@ function TreeViewItemInner({
8893
8972
  handleActivate();
8894
8973
  onToggleItemCheck?.(item, !isChecked);
8895
8974
  }
8896
- return /* @__PURE__ */ jsxs38("div", { className: "nu-tree-view__row", role: "none", children: [
8897
- /* @__PURE__ */ jsxs38(
8975
+ return /* @__PURE__ */ jsxs39("div", { className: "nu-tree-view__row", role: "none", children: [
8976
+ /* @__PURE__ */ jsxs39(
8898
8977
  "div",
8899
8978
  {
8900
8979
  "aria-checked": isCheckable ? isChecked : void 0,
@@ -8913,8 +8992,8 @@ function TreeViewItemInner({
8913
8992
  ref: (node) => registerItemRef(itemId, node),
8914
8993
  role: "treeitem",
8915
8994
  children: [
8916
- /* @__PURE__ */ jsxs38("span", { "aria-hidden": "true", className: "nu-tree-view__prefix", children: [
8917
- guideMask.map((hasGuide, guideIndex) => /* @__PURE__ */ jsx58(
8995
+ /* @__PURE__ */ jsxs39("span", { "aria-hidden": "true", className: "nu-tree-view__prefix", children: [
8996
+ guideMask.map((hasGuide, guideIndex) => /* @__PURE__ */ jsx60(
8918
8997
  "span",
8919
8998
  {
8920
8999
  className: "nu-tree-view__guide",
@@ -8925,7 +9004,7 @@ function TreeViewItemInner({
8925
9004
  },
8926
9005
  `${itemId}-guide-${guideIndex}`
8927
9006
  )),
8928
- /* @__PURE__ */ jsxs38(
9007
+ /* @__PURE__ */ jsxs39(
8929
9008
  "span",
8930
9009
  {
8931
9010
  className: "nu-tree-view__lead",
@@ -8933,19 +9012,19 @@ function TreeViewItemInner({
8933
9012
  "--nu-tree-view-origin-offset": originOffset
8934
9013
  },
8935
9014
  children: [
8936
- depth > 0 ? /* @__PURE__ */ jsx58(
9015
+ depth > 0 ? /* @__PURE__ */ jsx60(
8937
9016
  "span",
8938
9017
  {
8939
9018
  className: "nu-tree-view__branch",
8940
9019
  "data-branch": hasNextSibling ? "tee" : "elbow"
8941
9020
  }
8942
9021
  ) : null,
8943
- hasChildren ? /* @__PURE__ */ jsx58(
9022
+ hasChildren ? /* @__PURE__ */ jsx60(
8944
9023
  "span",
8945
9024
  {
8946
9025
  className: "nu-tree-view__expander",
8947
9026
  "data-connector": depth > 0 ? "lead" : void 0,
8948
- children: /* @__PURE__ */ jsx58(
9027
+ children: /* @__PURE__ */ jsx60(
8949
9028
  "button",
8950
9029
  {
8951
9030
  "aria-label": isExpanded ? "Collapse item" : "Expand item",
@@ -8953,7 +9032,7 @@ function TreeViewItemInner({
8953
9032
  onClick: handleToggleExpanded,
8954
9033
  tabIndex: -1,
8955
9034
  type: "button",
8956
- children: /* @__PURE__ */ jsx58(
9035
+ children: /* @__PURE__ */ jsx60(
8957
9036
  NuGlyph,
8958
9037
  {
8959
9038
  name: isExpanded ? "tree-caret-down" : "tree-caret-right"
@@ -8962,7 +9041,7 @@ function TreeViewItemInner({
8962
9041
  }
8963
9042
  )
8964
9043
  }
8965
- ) : depth > 0 ? /* @__PURE__ */ jsx58(
9044
+ ) : depth > 0 ? /* @__PURE__ */ jsx60(
8966
9045
  "span",
8967
9046
  {
8968
9047
  className: "nu-tree-view__expander-placeholder",
@@ -8973,8 +9052,8 @@ function TreeViewItemInner({
8973
9052
  }
8974
9053
  )
8975
9054
  ] }),
8976
- /* @__PURE__ */ jsxs38("span", { className: "nu-tree-view__content", children: [
8977
- isCheckable ? /* @__PURE__ */ jsx58("span", { className: "nu-tree-view__check-slot", children: /* @__PURE__ */ jsx58(
9055
+ /* @__PURE__ */ jsxs39("span", { className: "nu-tree-view__content", children: [
9056
+ isCheckable ? /* @__PURE__ */ jsx60("span", { className: "nu-tree-view__check-slot", children: /* @__PURE__ */ jsx60(
8978
9057
  "button",
8979
9058
  {
8980
9059
  "aria-label": isChecked ? "Uncheck item" : "Check item",
@@ -8982,12 +9061,12 @@ function TreeViewItemInner({
8982
9061
  onClick: handleToggleChecked,
8983
9062
  tabIndex: -1,
8984
9063
  type: "button",
8985
- children: /* @__PURE__ */ jsx58(
9064
+ children: /* @__PURE__ */ jsx60(
8986
9065
  "span",
8987
9066
  {
8988
9067
  className: "nu-tree-view__check-box",
8989
9068
  "data-unchecked-shape": uncheckedShape,
8990
- children: isChecked ? /* @__PURE__ */ jsx58(
9069
+ children: isChecked ? /* @__PURE__ */ jsx60(
8991
9070
  NuGlyph,
8992
9071
  {
8993
9072
  className: "nu-tree-view__check-mark",
@@ -8998,14 +9077,14 @@ function TreeViewItemInner({
8998
9077
  )
8999
9078
  }
9000
9079
  ) }) : null,
9001
- item.icon ? /* @__PURE__ */ jsx58("span", { className: "nu-tree-view__icon", children: item.icon }) : null,
9002
- /* @__PURE__ */ jsx58("span", { className: "nu-tree-view__title", children: item.title }),
9003
- item.hint ? /* @__PURE__ */ jsx58("span", { className: "nu-tree-view__hint", children: item.hint }) : null
9080
+ item.icon ? /* @__PURE__ */ jsx60("span", { className: "nu-tree-view__icon", children: item.icon }) : null,
9081
+ /* @__PURE__ */ jsx60("span", { className: "nu-tree-view__title", children: item.title }),
9082
+ item.hint ? /* @__PURE__ */ jsx60("span", { className: "nu-tree-view__hint", children: item.hint }) : null
9004
9083
  ] })
9005
9084
  ]
9006
9085
  }
9007
9086
  ),
9008
- hasChildren && isExpanded ? /* @__PURE__ */ jsx58("div", { role: "group", children: (item.children ?? []).map((child, index) => /* @__PURE__ */ jsx58(
9087
+ hasChildren && isExpanded ? /* @__PURE__ */ jsx60("div", { role: "group", children: (item.children ?? []).map((child, index) => /* @__PURE__ */ jsx60(
9009
9088
  TreeViewItem,
9010
9089
  {
9011
9090
  depth: depth + 1,
@@ -9041,7 +9120,7 @@ function areTreeViewItemPropsEqual(previousProps, nextProps) {
9041
9120
  var TreeViewItem = memo4(TreeViewItemInner, areTreeViewItemPropsEqual);
9042
9121
 
9043
9122
  // src/components/TreeView/TreeView.tsx
9044
- import { jsx as jsx59 } from "react/jsx-runtime";
9123
+ import { jsx as jsx61 } from "react/jsx-runtime";
9045
9124
  function TreeViewInner({
9046
9125
  className,
9047
9126
  data,
@@ -9056,18 +9135,18 @@ function TreeViewInner({
9056
9135
  uncheckedShape = "box",
9057
9136
  ...props
9058
9137
  }, ref) {
9059
- const rootRef = useRef21(null);
9138
+ const rootRef = useRef22(null);
9060
9139
  const treeId = useId16();
9061
- const itemRefs = useRef21({});
9140
+ const itemRefs = useRef22({});
9062
9141
  const isExpandedControlled = expandedIds !== void 0;
9063
- const [uncontrolledExpandedIds, setUncontrolledExpandedIds] = useState29(() => {
9142
+ const [uncontrolledExpandedIds, setUncontrolledExpandedIds] = useState30(() => {
9064
9143
  const expandedFromData = collectExpandedTreeIds(data);
9065
9144
  if (!defaultExpandedIds?.length) {
9066
9145
  return expandedFromData;
9067
9146
  }
9068
9147
  return Array.from(/* @__PURE__ */ new Set([...expandedFromData, ...defaultExpandedIds]));
9069
9148
  });
9070
- const [uncontrolledSelectedId, setUncontrolledSelectedId] = useState29(null);
9149
+ const [uncontrolledSelectedId, setUncontrolledSelectedId] = useState30(null);
9071
9150
  const resolvedExpandedIds = isExpandedControlled ? expandedIds : uncontrolledExpandedIds;
9072
9151
  const expandedIdSet = useMemo19(
9073
9152
  () => new Set(resolvedExpandedIds),
@@ -9083,7 +9162,7 @@ function TreeViewInner({
9083
9162
  );
9084
9163
  const derivedSelectedId = selectedId ?? uncontrolledSelectedId ?? findSelectedTreeItemId(data) ?? selectableItems[0]?.itemId ?? null;
9085
9164
  const resolvedSelectedId = derivedSelectedId && selectableItems.some((entry) => entry.itemId === derivedSelectedId) ? derivedSelectedId : selectableItems[0]?.itemId ?? null;
9086
- const [activeId, setActiveId] = useState29(resolvedSelectedId);
9165
+ const [activeId, setActiveId] = useState30(resolvedSelectedId);
9087
9166
  const resolvedActiveId = activeId && selectableItems.some((entry) => entry.itemId === activeId) ? activeId : resolvedSelectedId;
9088
9167
  useEffect16(() => {
9089
9168
  if (!resolvedActiveId) {
@@ -9292,7 +9371,7 @@ function TreeViewInner({
9292
9371
  setExpandedState
9293
9372
  ]
9294
9373
  );
9295
- return /* @__PURE__ */ jsx59(
9374
+ return /* @__PURE__ */ jsx61(
9296
9375
  "div",
9297
9376
  {
9298
9377
  ...props,
@@ -9302,7 +9381,7 @@ function TreeViewInner({
9302
9381
  ref: rootRef,
9303
9382
  role: "tree",
9304
9383
  tabIndex: 0,
9305
- children: visibleItems.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx59(
9384
+ children: visibleItems.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx61(
9306
9385
  TreeViewItem,
9307
9386
  {
9308
9387
  depth: 0,
@@ -9322,7 +9401,7 @@ function TreeViewInner({
9322
9401
  uncheckedShape
9323
9402
  },
9324
9403
  item.id
9325
- )) : /* @__PURE__ */ jsx59("div", { className: "nu-tree-view__empty", children: emptyText })
9404
+ )) : /* @__PURE__ */ jsx61("div", { className: "nu-tree-view__empty", children: emptyText })
9326
9405
  }
9327
9406
  );
9328
9407
  }
@@ -9335,10 +9414,10 @@ import {
9335
9414
  useEffect as useEffect17,
9336
9415
  useId as useId17,
9337
9416
  useImperativeHandle as useImperativeHandle4,
9338
- useLayoutEffect as useLayoutEffect5,
9417
+ useLayoutEffect as useLayoutEffect6,
9339
9418
  useMemo as useMemo20,
9340
- useRef as useRef22,
9341
- useState as useState30
9419
+ useRef as useRef23,
9420
+ useState as useState31
9342
9421
  } from "react";
9343
9422
 
9344
9423
  // src/components/TreeListView/internals/helpers.ts
@@ -9429,11 +9508,11 @@ function renderTreeListCellValue(item, column) {
9429
9508
 
9430
9509
  // src/components/TreeListView/internals/TreeListViewRow.tsx
9431
9510
  import { memo as memo5 } from "react";
9432
- import { Fragment as Fragment7, jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
9511
+ import { Fragment as Fragment7, jsx as jsx62, jsxs as jsxs40 } from "react/jsx-runtime";
9433
9512
  function renderTreeTitleContent(item) {
9434
- return /* @__PURE__ */ jsxs39(Fragment7, { children: [
9435
- /* @__PURE__ */ jsx60("span", { className: "nu-tree-list-view__title", children: item.title }),
9436
- item.hint ? /* @__PURE__ */ jsx60("span", { className: "nu-tree-list-view__hint", children: item.hint }) : null
9513
+ return /* @__PURE__ */ jsxs40(Fragment7, { children: [
9514
+ /* @__PURE__ */ jsx62("span", { className: "nu-tree-list-view__title", children: item.title }),
9515
+ item.hint ? /* @__PURE__ */ jsx62("span", { className: "nu-tree-list-view__hint", children: item.hint }) : null
9437
9516
  ] });
9438
9517
  }
9439
9518
  function renderReportCellContent(item, column, depth, rowIndex, getCellContent) {
@@ -9559,8 +9638,8 @@ function TreeListViewRowInner({
9559
9638
  handleActivate();
9560
9639
  onToggleItemCheck?.(item, !isChecked);
9561
9640
  }
9562
- return /* @__PURE__ */ jsxs39(Fragment7, { children: [
9563
- /* @__PURE__ */ jsx60(
9641
+ return /* @__PURE__ */ jsxs40(Fragment7, { children: [
9642
+ /* @__PURE__ */ jsx62(
9564
9643
  "div",
9565
9644
  {
9566
9645
  "aria-disabled": item.disabled || void 0,
@@ -9588,7 +9667,7 @@ function TreeListViewRowInner({
9588
9667
  "--nu-tree-list-view-columns": templateColumns
9589
9668
  },
9590
9669
  children: columns.map(
9591
- (column, columnIndex) => column.id === treeColumnId ? /* @__PURE__ */ jsxs39(
9670
+ (column, columnIndex) => column.id === treeColumnId ? /* @__PURE__ */ jsxs40(
9592
9671
  "span",
9593
9672
  {
9594
9673
  className: [
@@ -9600,8 +9679,8 @@ function TreeListViewRowInner({
9600
9679
  "data-column-id": column.id,
9601
9680
  role: "gridcell",
9602
9681
  children: [
9603
- /* @__PURE__ */ jsxs39("span", { "aria-hidden": "true", className: "nu-tree-list-view__prefix", children: [
9604
- guideMask.map((hasGuide, guideIndex) => /* @__PURE__ */ jsx60(
9682
+ /* @__PURE__ */ jsxs40("span", { "aria-hidden": "true", className: "nu-tree-list-view__prefix", children: [
9683
+ guideMask.map((hasGuide, guideIndex) => /* @__PURE__ */ jsx62(
9605
9684
  "span",
9606
9685
  {
9607
9686
  className: "nu-tree-list-view__guide",
@@ -9612,7 +9691,7 @@ function TreeListViewRowInner({
9612
9691
  },
9613
9692
  `${itemId}-guide-${guideIndex}`
9614
9693
  )),
9615
- /* @__PURE__ */ jsxs39(
9694
+ /* @__PURE__ */ jsxs40(
9616
9695
  "span",
9617
9696
  {
9618
9697
  className: "nu-tree-list-view__lead",
@@ -9620,19 +9699,19 @@ function TreeListViewRowInner({
9620
9699
  "--nu-tree-list-view-origin-offset": originOffset
9621
9700
  },
9622
9701
  children: [
9623
- depth > 0 ? /* @__PURE__ */ jsx60(
9702
+ depth > 0 ? /* @__PURE__ */ jsx62(
9624
9703
  "span",
9625
9704
  {
9626
9705
  className: "nu-tree-list-view__branch",
9627
9706
  "data-branch": hasNextSibling ? "tee" : "elbow"
9628
9707
  }
9629
9708
  ) : null,
9630
- hasChildren ? /* @__PURE__ */ jsx60(
9709
+ hasChildren ? /* @__PURE__ */ jsx62(
9631
9710
  "span",
9632
9711
  {
9633
9712
  className: "nu-tree-list-view__expander",
9634
9713
  "data-connector": depth > 0 ? "lead" : void 0,
9635
- children: /* @__PURE__ */ jsx60(
9714
+ children: /* @__PURE__ */ jsx62(
9636
9715
  "button",
9637
9716
  {
9638
9717
  "aria-label": isExpanded ? "Collapse item" : "Expand item",
@@ -9640,7 +9719,7 @@ function TreeListViewRowInner({
9640
9719
  onClick: handleToggleExpanded,
9641
9720
  tabIndex: -1,
9642
9721
  type: "button",
9643
- children: /* @__PURE__ */ jsx60(
9722
+ children: /* @__PURE__ */ jsx62(
9644
9723
  NuGlyph,
9645
9724
  {
9646
9725
  name: isExpanded ? "tree-caret-down" : "tree-caret-right"
@@ -9649,7 +9728,7 @@ function TreeListViewRowInner({
9649
9728
  }
9650
9729
  )
9651
9730
  }
9652
- ) : depth > 0 ? /* @__PURE__ */ jsx60(
9731
+ ) : depth > 0 ? /* @__PURE__ */ jsx62(
9653
9732
  "span",
9654
9733
  {
9655
9734
  className: "nu-tree-list-view__expander-placeholder",
@@ -9660,8 +9739,8 @@ function TreeListViewRowInner({
9660
9739
  }
9661
9740
  )
9662
9741
  ] }),
9663
- /* @__PURE__ */ jsxs39("span", { className: "nu-tree-list-view__tree-content", children: [
9664
- isCheckable ? /* @__PURE__ */ jsx60("span", { className: "nu-tree-list-view__check-slot", children: /* @__PURE__ */ jsx60(
9742
+ /* @__PURE__ */ jsxs40("span", { className: "nu-tree-list-view__tree-content", children: [
9743
+ isCheckable ? /* @__PURE__ */ jsx62("span", { className: "nu-tree-list-view__check-slot", children: /* @__PURE__ */ jsx62(
9665
9744
  "button",
9666
9745
  {
9667
9746
  "aria-label": isChecked ? "Uncheck item" : "Check item",
@@ -9669,12 +9748,12 @@ function TreeListViewRowInner({
9669
9748
  onClick: handleToggleChecked,
9670
9749
  tabIndex: -1,
9671
9750
  type: "button",
9672
- children: /* @__PURE__ */ jsx60(
9751
+ children: /* @__PURE__ */ jsx62(
9673
9752
  "span",
9674
9753
  {
9675
9754
  className: "nu-tree-list-view__check-box",
9676
9755
  "data-unchecked-shape": uncheckedShape,
9677
- children: isChecked ? /* @__PURE__ */ jsx60(
9756
+ children: isChecked ? /* @__PURE__ */ jsx62(
9678
9757
  NuGlyph,
9679
9758
  {
9680
9759
  className: "nu-tree-list-view__check-mark",
@@ -9685,13 +9764,13 @@ function TreeListViewRowInner({
9685
9764
  )
9686
9765
  }
9687
9766
  ) }) : null,
9688
- item.icon ? /* @__PURE__ */ jsx60("span", { className: "nu-tree-list-view__icon", children: item.icon }) : null,
9767
+ item.icon ? /* @__PURE__ */ jsx62("span", { className: "nu-tree-list-view__icon", children: item.icon }) : null,
9689
9768
  renderTreeTitleContent(item)
9690
9769
  ] })
9691
9770
  ]
9692
9771
  },
9693
9772
  column.id
9694
- ) : /* @__PURE__ */ jsx60(
9773
+ ) : /* @__PURE__ */ jsx62(
9695
9774
  "span",
9696
9775
  {
9697
9776
  className: [
@@ -9714,7 +9793,7 @@ function TreeListViewRowInner({
9714
9793
  )
9715
9794
  }
9716
9795
  ),
9717
- hasChildren && isExpanded ? /* @__PURE__ */ jsx60("div", { role: "rowgroup", children: (item.children ?? []).map((child, index) => /* @__PURE__ */ jsx60(
9796
+ hasChildren && isExpanded ? /* @__PURE__ */ jsx62("div", { role: "rowgroup", children: (item.children ?? []).map((child, index) => /* @__PURE__ */ jsx62(
9718
9797
  TreeListViewRow,
9719
9798
  {
9720
9799
  activeItemId,
@@ -9761,12 +9840,43 @@ var TreeListViewRow = memo5(
9761
9840
  );
9762
9841
 
9763
9842
  // src/components/TreeListView/TreeListView.tsx
9764
- import { jsx as jsx61, jsxs as jsxs40 } from "react/jsx-runtime";
9843
+ import { jsx as jsx63, jsxs as jsxs41 } from "react/jsx-runtime";
9844
+ function getColumnStorageKey(columnStoreKey) {
9845
+ const normalizedKey = columnStoreKey?.trim();
9846
+ return normalizedKey ? `reactnu.${normalizedKey}` : null;
9847
+ }
9848
+ function readStoredColumnWidths(storageKey, columns) {
9849
+ if (!storageKey || typeof window === "undefined") {
9850
+ return {};
9851
+ }
9852
+ try {
9853
+ const rawValue = window.localStorage.getItem(storageKey);
9854
+ if (!rawValue) {
9855
+ return {};
9856
+ }
9857
+ const parsedValue = JSON.parse(rawValue);
9858
+ if (!parsedValue || typeof parsedValue !== "object") {
9859
+ return {};
9860
+ }
9861
+ return Object.fromEntries(
9862
+ columns.flatMap((column) => {
9863
+ const width = parsedValue[column.id];
9864
+ if (typeof width !== "number" || !Number.isFinite(width)) {
9865
+ return [];
9866
+ }
9867
+ return [[column.id, Math.max(width, column.minWidth ?? 0)]];
9868
+ })
9869
+ );
9870
+ } catch {
9871
+ return {};
9872
+ }
9873
+ }
9765
9874
  function TreeListViewInner({
9766
9875
  acceptsDrop,
9767
9876
  activeItemId: activeItemIdProp,
9768
9877
  checkedIds,
9769
9878
  className,
9879
+ columnStoreKey,
9770
9880
  columns,
9771
9881
  onPopupMenu,
9772
9882
  data,
@@ -9788,23 +9898,26 @@ function TreeListViewInner({
9788
9898
  uncheckedShape = "box",
9789
9899
  ...props
9790
9900
  }, ref) {
9791
- const rootRef = useRef22(null);
9792
- const [rootElement, setRootElement] = useState30(null);
9901
+ const rootRef = useRef23(null);
9902
+ const [rootElement, setRootElement] = useState31(null);
9793
9903
  const treeId = useId17();
9794
- const itemRefs = useRef22({});
9795
- const resizeFrameRef = useRef22(null);
9796
- const resizeStateRef = useRef22(null);
9904
+ const storageKey = getColumnStorageKey(columnStoreKey);
9905
+ const loadedStorageKeyRef = useRef23(storageKey);
9906
+ const shouldPersistColumnWidthsRef = useRef23(false);
9907
+ const itemRefs = useRef23({});
9908
+ const resizeFrameRef = useRef23(null);
9909
+ const resizeStateRef = useRef23(null);
9797
9910
  const isExpandedControlled = expandedIds !== void 0;
9798
- const [uncontrolledExpandedIds, setUncontrolledExpandedIds] = useState30(() => {
9911
+ const [uncontrolledExpandedIds, setUncontrolledExpandedIds] = useState31(() => {
9799
9912
  const expandedFromData = collectExpandedTreeListIds(data);
9800
9913
  if (!defaultExpandedIds?.length) {
9801
9914
  return expandedFromData;
9802
9915
  }
9803
9916
  return Array.from(/* @__PURE__ */ new Set([...expandedFromData, ...defaultExpandedIds]));
9804
9917
  });
9805
- const [uncontrolledSelectedId, setUncontrolledSelectedId] = useState30(null);
9806
- const [autoColumnWidths, setAutoColumnWidths] = useState30({});
9807
- const [userColumnWidths, setUserColumnWidths] = useState30({});
9918
+ const [uncontrolledSelectedId, setUncontrolledSelectedId] = useState31(null);
9919
+ const [autoColumnWidths, setAutoColumnWidths] = useState31({});
9920
+ const [userColumnWidths, setUserColumnWidths] = useState31(() => readStoredColumnWidths(storageKey, columns));
9808
9921
  const isActiveControlled = activeItemIdProp !== void 0;
9809
9922
  const resolvedExpandedIds = isExpandedControlled ? expandedIds : uncontrolledExpandedIds;
9810
9923
  const expandedIdSet = useMemo20(
@@ -9821,7 +9934,7 @@ function TreeListViewInner({
9821
9934
  );
9822
9935
  const derivedSelectedId = selectedId ?? uncontrolledSelectedId ?? findSelectedTreeListItemId(data) ?? selectableItems[0]?.itemId ?? null;
9823
9936
  const resolvedSelectedId = derivedSelectedId && selectableItems.some((entry) => entry.itemId === derivedSelectedId) ? derivedSelectedId : selectableItems[0]?.itemId ?? null;
9824
- const [uncontrolledActiveItemId, setUncontrolledActiveItemId] = useState30(() => defaultActiveItemId ?? resolvedSelectedId);
9937
+ const [uncontrolledActiveItemId, setUncontrolledActiveItemId] = useState31(() => defaultActiveItemId ?? resolvedSelectedId);
9825
9938
  const activeItemId = activeItemIdProp !== void 0 ? activeItemIdProp : uncontrolledActiveItemId;
9826
9939
  const resolvedActiveItemId = activeItemId && selectableItems.some((entry) => entry.itemId === activeItemId) ? activeItemId : resolvedSelectedId;
9827
9940
  const minColumnWidthById = useMemo20(
@@ -9866,6 +9979,27 @@ function TreeListViewInner({
9866
9979
  block: "nearest"
9867
9980
  });
9868
9981
  }, [resolvedActiveItemId]);
9982
+ useEffect17(() => {
9983
+ if (loadedStorageKeyRef.current === storageKey) {
9984
+ return;
9985
+ }
9986
+ loadedStorageKeyRef.current = storageKey;
9987
+ shouldPersistColumnWidthsRef.current = false;
9988
+ setUserColumnWidths(readStoredColumnWidths(storageKey, columns));
9989
+ }, [columns, storageKey]);
9990
+ useEffect17(() => {
9991
+ if (!shouldPersistColumnWidthsRef.current) {
9992
+ return;
9993
+ }
9994
+ shouldPersistColumnWidthsRef.current = false;
9995
+ if (!storageKey || typeof window === "undefined") {
9996
+ return;
9997
+ }
9998
+ try {
9999
+ window.localStorage.setItem(storageKey, JSON.stringify(userColumnWidths));
10000
+ } catch {
10001
+ }
10002
+ }, [storageKey, userColumnWidths]);
9869
10003
  const registerItemRef = useCallback8(
9870
10004
  (itemId, node) => {
9871
10005
  itemRefs.current[itemId] = node;
@@ -9880,7 +10014,7 @@ function TreeListViewInner({
9880
10014
  (item) => onItemDoubleClick?.(item),
9881
10015
  [onItemDoubleClick]
9882
10016
  );
9883
- useLayoutEffect5(() => {
10017
+ useLayoutEffect6(() => {
9884
10018
  const rootNode = rootRef.current;
9885
10019
  if (!rootNode) {
9886
10020
  return;
@@ -10156,9 +10290,15 @@ function TreeListViewInner({
10156
10290
  return;
10157
10291
  }
10158
10292
  setUserColumnWidths(
10159
- (currentWidths) => currentWidths[resizeState.columnId] === resizeState.nextWidth ? currentWidths : {
10160
- ...currentWidths,
10161
- [resizeState.columnId]: resizeState.nextWidth
10293
+ (currentWidths) => {
10294
+ if (currentWidths[resizeState.columnId] === resizeState.nextWidth) {
10295
+ return currentWidths;
10296
+ }
10297
+ shouldPersistColumnWidthsRef.current = true;
10298
+ return {
10299
+ ...currentWidths,
10300
+ [resizeState.columnId]: resizeState.nextWidth
10301
+ };
10162
10302
  }
10163
10303
  );
10164
10304
  }
@@ -10205,7 +10345,7 @@ function TreeListViewInner({
10205
10345
  window.addEventListener("pointermove", handleColumnResizeMove);
10206
10346
  window.addEventListener("pointerup", handleColumnResizeEnd);
10207
10347
  }
10208
- return /* @__PURE__ */ jsxs40(
10348
+ return /* @__PURE__ */ jsxs41(
10209
10349
  "div",
10210
10350
  {
10211
10351
  ...props,
@@ -10217,7 +10357,7 @@ function TreeListViewInner({
10217
10357
  role: "treegrid",
10218
10358
  tabIndex: 0,
10219
10359
  children: [
10220
- /* @__PURE__ */ jsx61(
10360
+ /* @__PURE__ */ jsx63(
10221
10361
  "div",
10222
10362
  {
10223
10363
  className: "nu-tree-list-view__header",
@@ -10225,7 +10365,7 @@ function TreeListViewInner({
10225
10365
  style: {
10226
10366
  "--nu-tree-list-view-columns": templateColumns
10227
10367
  },
10228
- children: columns.map((column, columnIndex) => /* @__PURE__ */ jsxs40(
10368
+ children: columns.map((column, columnIndex) => /* @__PURE__ */ jsxs41(
10229
10369
  "span",
10230
10370
  {
10231
10371
  className: [
@@ -10236,8 +10376,8 @@ function TreeListViewInner({
10236
10376
  "data-column-id": column.id,
10237
10377
  role: "columnheader",
10238
10378
  children: [
10239
- /* @__PURE__ */ jsx61("span", { className: "nu-tree-list-view__header-label", children: renderMnemonicText(column.title) }),
10240
- column.resizable !== false ? /* @__PURE__ */ jsx61(
10379
+ /* @__PURE__ */ jsx63("span", { className: "nu-tree-list-view__header-label", children: renderMnemonicText(column.title) }),
10380
+ column.resizable !== false ? /* @__PURE__ */ jsx63(
10241
10381
  "button",
10242
10382
  {
10243
10383
  "aria-label": `Resize ${column.title} column`,
@@ -10253,7 +10393,7 @@ function TreeListViewInner({
10253
10393
  ))
10254
10394
  }
10255
10395
  ),
10256
- /* @__PURE__ */ jsx61("div", { className: "nu-tree-list-view__body", children: visibleItems.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx61(
10396
+ /* @__PURE__ */ jsx63("div", { className: "nu-tree-list-view__body", children: visibleItems.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx63(
10257
10397
  TreeListViewRow,
10258
10398
  {
10259
10399
  activeItemId: resolvedActiveItemId,
@@ -10283,19 +10423,20 @@ function TreeListViewInner({
10283
10423
  uncheckedShape
10284
10424
  },
10285
10425
  item.id
10286
- )) : /* @__PURE__ */ jsx61("div", { className: "nu-tree-list-view__empty", children: emptyText }) })
10426
+ )) : /* @__PURE__ */ jsx63("div", { className: "nu-tree-list-view__empty", children: emptyText }) })
10287
10427
  ]
10288
10428
  }
10289
10429
  );
10290
10430
  }
10291
10431
  var TreeListView = forwardRef4(TreeListViewInner);
10432
+ var TreeTable = TreeListView;
10292
10433
 
10293
10434
  // src/theme/NuThemeProvider.tsx
10294
10435
  import {
10295
10436
  useCallback as useCallback9,
10296
10437
  useId as useId18,
10297
10438
  useMemo as useMemo21,
10298
- useState as useState31
10439
+ useState as useState32
10299
10440
  } from "react";
10300
10441
 
10301
10442
  // src/theme/themes.ts
@@ -10525,6 +10666,8 @@ function getNuThemeStyle(theme) {
10525
10666
  "--nu-color-button-face-alt": theme.tokens.buttonFaceAlt,
10526
10667
  "--nu-color-button-danger": theme.tokens.buttonDanger,
10527
10668
  "--nu-color-button-success": theme.tokens.buttonSuccess,
10669
+ "--nu-text-danger": theme.tokens.buttonDanger,
10670
+ "--nu-text-success": theme.tokens.buttonSuccess,
10528
10671
  "--nu-color-button-text": theme.tokens.buttonText,
10529
10672
  "--nu-color-field-bg": theme.tokens.fieldBackground,
10530
10673
  "--nu-color-field-text": theme.tokens.fieldText,
@@ -10586,7 +10729,7 @@ function useNuTheme() {
10586
10729
  }
10587
10730
 
10588
10731
  // src/theme/NuThemeProvider.tsx
10589
- import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
10732
+ import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
10590
10733
  function NuThemeProvider({
10591
10734
  children,
10592
10735
  className,
@@ -10606,10 +10749,10 @@ function NuThemeProvider({
10606
10749
  theme
10607
10750
  }) {
10608
10751
  const generatedId = useId18();
10609
- const [internalTheme, setInternalTheme] = useState31(defaultTheme);
10610
- const [internalDesktopPatternMode, setInternalDesktopPatternMode] = useState31(defaultDesktopPatternMode);
10611
- const [internalFontFamily, setInternalFontFamily] = useState31(defaultFontFamily);
10612
- const [internalFontSize, setInternalFontSize] = useState31(defaultFontSize);
10752
+ const [internalTheme, setInternalTheme] = useState32(defaultTheme);
10753
+ const [internalDesktopPatternMode, setInternalDesktopPatternMode] = useState32(defaultDesktopPatternMode);
10754
+ const [internalFontFamily, setInternalFontFamily] = useState32(defaultFontFamily);
10755
+ const [internalFontSize, setInternalFontSize] = useState32(defaultFontSize);
10613
10756
  const currentTheme = theme ?? internalTheme;
10614
10757
  const resolvedDesktopPatternMode = desktopPatternMode ?? internalDesktopPatternMode;
10615
10758
  const resolvedFontFamily = fontFamily ?? internalFontFamily;
@@ -10677,7 +10820,7 @@ function NuThemeProvider({
10677
10820
  handleThemeChange
10678
10821
  ]
10679
10822
  );
10680
- return /* @__PURE__ */ jsx62(NuThemeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs41(
10823
+ return /* @__PURE__ */ jsx64(NuThemeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs42(
10681
10824
  "div",
10682
10825
  {
10683
10826
  className: ["nu-theme-root", className].filter(Boolean).join(" "),
@@ -10692,7 +10835,7 @@ function NuThemeProvider({
10692
10835
  ...style
10693
10836
  },
10694
10837
  children: [
10695
- crtGlitch ? /* @__PURE__ */ jsx62(NuCrtGlitch, { ...typeof crtGlitch === "object" ? crtGlitch : {} }) : null,
10838
+ crtGlitch ? /* @__PURE__ */ jsx64(NuCrtGlitch, { ...typeof crtGlitch === "object" ? crtGlitch : {} }) : null,
10696
10839
  children
10697
10840
  ]
10698
10841
  }
@@ -10737,6 +10880,7 @@ export {
10737
10880
  RadioGroup,
10738
10881
  ReportCell,
10739
10882
  SearchBox,
10883
+ Spacer,
10740
10884
  SpinBox,
10741
10885
  Splitter,
10742
10886
  Stack,
@@ -10749,6 +10893,7 @@ export {
10749
10893
  ToolDropButton,
10750
10894
  ToolSeparator,
10751
10895
  TreeListView,
10896
+ TreeTable,
10752
10897
  TreeView,
10753
10898
  Window,
10754
10899
  WindowBar,
@@ -10760,6 +10905,7 @@ export {
10760
10905
  hasVisibleMainMenuItems,
10761
10906
  isMainMenuDivider,
10762
10907
  isMainMenuItem,
10908
+ isMainMenuSpacer,
10763
10909
  isNuThemeName,
10764
10910
  nuThemes,
10765
10911
  resolveNuTheme,