prime-ui-kit 0.9.2 → 0.9.3

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.
Files changed (96) hide show
  1. package/README.md +9 -5
  2. package/dist/chunks/{chunk-ZEFCDEEQ.js → chunk-6JTZOA5I.js} +878 -331
  3. package/dist/chunks/{chunk-LXGRKN34.js → chunk-OAE4IQX2.js} +769 -479
  4. package/dist/chunks/{chunk-IQELQNMR.js → chunk-U5SR2LZR.js} +17 -4
  5. package/dist/color-picker.js +2 -2
  6. package/dist/components/button/Button.d.ts +19 -2
  7. package/dist/components/card/Card.d.ts +1 -1
  8. package/dist/components/code-block/CodeBlock.d.ts +1 -1
  9. package/dist/components/color-picker/ColorPicker.d.ts +1 -1
  10. package/dist/components/data-table/Row.d.ts +3 -1
  11. package/dist/components/data-table/rows.d.ts +4 -0
  12. package/dist/components/digit-input/DigitInput.d.ts +6 -1
  13. package/dist/components/index.d.ts +4 -1
  14. package/dist/components/input/Input.d.ts +16 -1
  15. package/dist/components/input/passwordStrength.d.ts +9 -0
  16. package/dist/components/progress-bar/ProgressBar.d.ts +16 -1
  17. package/dist/components/sparkline/Sparkline.d.ts +26 -0
  18. package/dist/hooks/useEdgeOverflow.d.ts +4 -0
  19. package/dist/icons/registry.d.ts +2 -0
  20. package/dist/index.css +830 -267
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +9 -3
  23. package/dist/internal/CheckMark.d.ts +12 -0
  24. package/dist/internal/MorphText.d.ts +12 -0
  25. package/dist/internal/RollingNumber.d.ts +14 -0
  26. package/dist/internal/surfaceDepth.d.ts +25 -0
  27. package/dist/internal/swatch.d.ts +4 -1
  28. package/dist/layout/app-shell/AppShell.d.ts +2 -2
  29. package/dist/motion/celebrate.d.ts +18 -0
  30. package/dist/tokens/layers.d.ts +37 -0
  31. package/dist/tokens/naming.d.ts +1 -1
  32. package/dist/tokens/semantic.d.ts +66 -56
  33. package/dist/tokens/themes/dark.d.ts +6 -14
  34. package/package.json +1 -1
  35. package/src/components/accordion/COMPONENT.md +4 -4
  36. package/src/components/avatar/COMPONENT.md +1 -1
  37. package/src/components/button/COMPONENT.md +26 -5
  38. package/src/components/button/examples/download.tsx +45 -0
  39. package/src/components/button/examples/hold-to-confirm.tsx +23 -0
  40. package/src/components/button/examples/label-morph.tsx +33 -0
  41. package/src/components/card/COMPONENT.md +4 -2
  42. package/src/components/card/examples/narrow.tsx +2 -2
  43. package/src/components/card/examples/panel-chart.tsx +1 -1
  44. package/src/components/card/examples/variants.tsx +1 -1
  45. package/src/components/checkbox/examples/examples.module.css +1 -1
  46. package/src/components/code-block/COMPONENT.md +6 -6
  47. package/src/components/code-block/examples/overview.tsx +1 -1
  48. package/src/components/code-block/examples/variants.tsx +1 -1
  49. package/src/components/color-picker/COMPONENT.md +1 -1
  50. package/src/components/color-swatches/COMPONENT.md +5 -5
  51. package/src/components/command-menu/COMPONENT.md +1 -1
  52. package/src/components/crossfade/examples/overview.tsx +3 -3
  53. package/src/components/data-table/COMPONENT.md +5 -4
  54. package/src/components/digit-input/COMPONENT.md +5 -3
  55. package/src/components/digit-input/examples/on-complete.tsx +7 -6
  56. package/src/components/dnd/COMPONENT.md +1 -1
  57. package/src/components/dnd/examples/examples.module.css +4 -4
  58. package/src/components/dropdown/COMPONENT.md +1 -1
  59. package/src/components/dropdown/examples/examples.module.css +1 -1
  60. package/src/components/empty-page/examples/examples.module.css +1 -1
  61. package/src/components/example-frame/COMPONENT.md +1 -1
  62. package/src/components/input/COMPONENT.md +10 -1
  63. package/src/components/input/examples/password-strength.tsx +12 -0
  64. package/src/components/kanban/COMPONENT.md +4 -4
  65. package/src/components/login-form/COMPONENT.md +4 -4
  66. package/src/components/login-form/examples/register.tsx +2 -2
  67. package/src/components/login-form/examples/reset-password.tsx +2 -2
  68. package/src/components/modal/COMPONENT.md +2 -2
  69. package/src/components/modal/examples/examples.module.css +2 -2
  70. package/src/components/page-content/examples/examples.module.css +1 -1
  71. package/src/components/popover/COMPONENT.md +1 -1
  72. package/src/components/progress-bar/COMPONENT.md +5 -1
  73. package/src/components/progress-bar/examples/examples.module.css +7 -0
  74. package/src/components/progress-bar/examples/milestone.tsx +43 -0
  75. package/src/components/progress-bar/examples/steps.tsx +35 -0
  76. package/src/components/skeleton/examples/with-crossfade.tsx +3 -3
  77. package/src/components/sparkline/COMPONENT.md +98 -0
  78. package/src/components/sparkline/examples/examples.module.css +13 -0
  79. package/src/components/sparkline/examples/overview.tsx +27 -0
  80. package/src/components/sparkline/examples/period.tsx +46 -0
  81. package/src/components/tabs/COMPONENT.md +15 -16
  82. package/src/components/tabs/examples/examples.module.css +14 -0
  83. package/src/components/tabs/examples/orientation.tsx +87 -33
  84. package/src/components/tooltip/COMPONENT.md +8 -6
  85. package/src/components/tooltip/examples/examples.module.css +2 -2
  86. package/src/layout/app-header/COMPONENT.md +1 -1
  87. package/src/layout/app-header/examples/examples.module.css +4 -4
  88. package/src/layout/app-shell/COMPONENT.md +8 -8
  89. package/src/layout/app-shell/examples/examples.module.css +3 -3
  90. package/src/layout/bottom-nav/COMPONENT.md +1 -1
  91. package/src/layout/bottom-nav/examples/examples.module.css +1 -1
  92. package/src/layout/sidebar/COMPONENT.md +4 -4
  93. package/src/layout/sidebar/examples/examples.module.css +5 -5
  94. package/src/styles/globals.css +125 -2
  95. package/src/styles/theme-dark.css +36 -13
  96. package/src/styles/theme-light.css +60 -16
@@ -7,6 +7,7 @@ import {
7
7
  ChoiceField,
8
8
  ChoiceLabel,
9
9
  ControlSizeProvider,
10
+ DEFAULT_PROGRESS_SEGMENTS_LABELS,
10
11
  Divider,
11
12
  EmptyPage,
12
13
  FieldCounter,
@@ -20,8 +21,11 @@ import {
20
21
  LayerProvider,
21
22
  MenuGroup,
22
23
  Portal,
24
+ ProgressBar,
25
+ RollingNumber,
23
26
  ScrollContainer,
24
27
  Slot,
28
+ SurfaceDepthProvider,
25
29
  SwatchChip,
26
30
  SwatchContent,
27
31
  SwatchFill,
@@ -54,6 +58,8 @@ import {
54
58
  palette_default,
55
59
  prefersReducedMotion,
56
60
  readCssLengthPx,
61
+ resolveSegments,
62
+ resolveValue,
57
63
  rovingIndex,
58
64
  sameColor,
59
65
  sheet_default,
@@ -72,14 +78,16 @@ import {
72
78
  useLayer,
73
79
  useMediaQuery,
74
80
  useMergedRefs,
81
+ useNestedSurfaceDepth,
75
82
  useOptionalControlSize,
76
83
  usePresence,
77
84
  useScrollLock,
85
+ useStageDepth,
78
86
  useStoreSlice,
79
87
  useSwatchOptions,
80
88
  useSwipeDismiss,
81
89
  visuallyHiddenClass
82
- } from "./chunk-ZEFCDEEQ.js";
90
+ } from "./chunk-6JTZOA5I.js";
83
91
 
84
92
  // src/layout/app-header/AppHeader.tsx
85
93
  import * as React from "react";
@@ -418,7 +426,10 @@ function BadgeRoot({
418
426
  endTaken: trailing
419
427
  });
420
428
  const textOnly = !trailing && !onPress && edges.children.every(isText);
421
- const body = /* @__PURE__ */ jsx4(ControlSizeProvider, { value: tier, children: textOnly ? edges.children : wrapText(edges.children) });
429
+ const body = /* @__PURE__ */ jsx4(ControlSizeProvider, { value: tier, children: typeof children === "number" ? (
430
+ // A count rolls its digits to the new value (foundation §7 rule 8).
431
+ /* @__PURE__ */ jsx4(RollingNumber, { children })
432
+ ) : textOnly ? edges.children : wrapText(edges.children) });
422
433
  return /* @__PURE__ */ jsxs3(
423
434
  "span",
424
435
  {
@@ -1410,6 +1421,7 @@ var SidebarRoot = React11.forwardRef(function SidebarRoot2({
1410
1421
  setMode((prev) => prev === "expanded" ? "compact" : "expanded");
1411
1422
  }, [offCanvas, setMode, setOpen]);
1412
1423
  const navId = React11.useId();
1424
+ const depth = useNestedSurfaceDepth();
1413
1425
  const context = React11.useMemo(
1414
1426
  () => ({ persist, mode, setMode, open, setOpen, toggle, offCanvas, size, navId, labels }),
1415
1427
  [persist, mode, setMode, open, setOpen, toggle, offCanvas, size, navId, labels]
@@ -1420,6 +1432,7 @@ var SidebarRoot = React11.forwardRef(function SidebarRoot2({
1420
1432
  ...rest,
1421
1433
  ref: mergedRootRef,
1422
1434
  className: cx(Sidebar_default.root, className),
1435
+ "data-depth": depth,
1423
1436
  ...toDataAttributes({
1424
1437
  size,
1425
1438
  mode,
@@ -1448,7 +1461,7 @@ var SidebarRoot = React11.forwardRef(function SidebarRoot2({
1448
1461
  className: Sidebar_default.panel,
1449
1462
  "aria-label": labels.navigation,
1450
1463
  inert: offCanvas && !open || !offCanvas && mode === "hidden" || void 0,
1451
- children: /* @__PURE__ */ jsx9(LayerProvider, { value: offCanvas ? layer : null, children: /* @__PURE__ */ jsx9(AnchorRectProvider, { value: offCanvas ? null : anchorRect, children: /* @__PURE__ */ jsx9(ControlSizeProvider, { value: size, children }) }) })
1464
+ children: /* @__PURE__ */ jsx9(LayerProvider, { value: offCanvas ? layer : null, children: /* @__PURE__ */ jsx9(AnchorRectProvider, { value: offCanvas ? null : anchorRect, children: /* @__PURE__ */ jsx9(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx9(ControlSizeProvider, { value: size, children }) }) }) })
1452
1465
  }
1453
1466
  )
1454
1467
  ]
@@ -2355,7 +2368,17 @@ function AccordionRoot(props) {
2355
2368
  children,
2356
2369
  ...rest
2357
2370
  } = props;
2358
- return /* @__PURE__ */ jsx10(AccordionProvider, { value: contextValue, children: /* @__PURE__ */ jsx10("div", { ...rest, className: cx(Accordion_default.root, className), ...toDataAttributes({ size, layout }), children: /* @__PURE__ */ jsx10(ControlSizeProvider, { value: size, children }) }) });
2371
+ const depth = useNestedSurfaceDepth();
2372
+ return /* @__PURE__ */ jsx10(AccordionProvider, { value: contextValue, children: /* @__PURE__ */ jsx10(
2373
+ "div",
2374
+ {
2375
+ ...rest,
2376
+ className: cx(Accordion_default.root, className),
2377
+ "data-depth": depth,
2378
+ ...toDataAttributes({ size, layout }),
2379
+ children: /* @__PURE__ */ jsx10(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx10(ControlSizeProvider, { value: size, children }) })
2380
+ }
2381
+ ) });
2359
2382
  }
2360
2383
  AccordionRoot.displayName = "Accordion.Root";
2361
2384
  function AccordionItem({
@@ -2493,13 +2516,16 @@ function BannerRoot({
2493
2516
  () => ({ onDismiss, size, dismissLabel }),
2494
2517
  [onDismiss, size, dismissLabel]
2495
2518
  );
2519
+ const nested = useNestedSurfaceDepth();
2520
+ const depth = variant === "outline" ? nested : "tinted";
2496
2521
  return /* @__PURE__ */ jsx11(
2497
2522
  "div",
2498
2523
  {
2499
2524
  ...rest,
2500
2525
  className: cx(Banner_default.root, className),
2526
+ "data-depth": depth,
2501
2527
  ...toDataAttributes({ variant, tone, size, placement }),
2502
- children: /* @__PURE__ */ jsx11(BannerContext.Provider, { value: context, children: /* @__PURE__ */ jsxs8(ControlSizeProvider, { value: size, children: [
2528
+ children: /* @__PURE__ */ jsx11(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx11(BannerContext.Provider, { value: context, children: /* @__PURE__ */ jsxs8(ControlSizeProvider, { value: size, children: [
2503
2529
  children,
2504
2530
  onDismiss ? /* @__PURE__ */ jsx11("span", { className: Banner_default.close, children: /* @__PURE__ */ jsx11(
2505
2531
  Button.Root,
@@ -2512,7 +2538,7 @@ function BannerRoot({
2512
2538
  children: /* @__PURE__ */ jsx11(Button.Icon, { children: /* @__PURE__ */ jsx11(Icon, { name: "action.close" }) })
2513
2539
  }
2514
2540
  ) }) : null
2515
- ] }) })
2541
+ ] }) }) })
2516
2542
  }
2517
2543
  );
2518
2544
  }
@@ -2829,13 +2855,22 @@ var Card_default = {
2829
2855
 
2830
2856
  // src/components/card/Card.tsx
2831
2857
  import { jsx as jsx15 } from "react/jsx-runtime";
2832
- function CardRoot({ variant = "panel", flat = false, className, ...rest }) {
2858
+ function CardRoot({
2859
+ variant = "panel",
2860
+ flat = false,
2861
+ className,
2862
+ children,
2863
+ ...rest
2864
+ }) {
2865
+ const depth = useNestedSurfaceDepth();
2833
2866
  return /* @__PURE__ */ jsx15(
2834
2867
  "div",
2835
2868
  {
2836
2869
  ...rest,
2837
2870
  className: cx(Card_default.root, className),
2838
- ...toDataAttributes({ variant, flat: flat || void 0 })
2871
+ "data-depth": depth,
2872
+ ...toDataAttributes({ variant, flat: flat || void 0 }),
2873
+ children: /* @__PURE__ */ jsx15(SurfaceDepthProvider, { value: depth, children })
2839
2874
  }
2840
2875
  );
2841
2876
  }
@@ -3619,6 +3654,7 @@ function ModalDialog({
3619
3654
  ),
3620
3655
  "data-size": size,
3621
3656
  "data-state": state,
3657
+ "data-depth": "floating",
3622
3658
  ...shell.aria,
3623
3659
  ...rest,
3624
3660
  onPointerDown: (event) => {
@@ -3627,7 +3663,7 @@ function ModalDialog({
3627
3663
  },
3628
3664
  children: [
3629
3665
  compact ? /* @__PURE__ */ jsx19("div", { className: sheet_default.handle, "data-swipe-handle": "", "aria-hidden": "true" }) : null,
3630
- /* @__PURE__ */ jsx19(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx19(LayerProvider, { value: layer, children: /* @__PURE__ */ jsx19(ControlSizeProvider, { value: "m", children }) }) })
3666
+ /* @__PURE__ */ jsx19(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx19(LayerProvider, { value: layer, children: /* @__PURE__ */ jsx19(SurfaceDepthProvider, { value: "floating", children: /* @__PURE__ */ jsx19(ControlSizeProvider, { value: "m", children }) }) }) })
3631
3667
  ]
3632
3668
  }
3633
3669
  )
@@ -4129,12 +4165,17 @@ var DataTable_default = {
4129
4165
  selectCell: "DataTable_selectCell",
4130
4166
  toggleCell: "DataTable_toggleCell",
4131
4167
  chevron: "DataTable_chevron",
4168
+ fold: "DataTable_fold",
4169
+ foldItem: "DataTable_foldItem",
4170
+ foldPad: "DataTable_foldPad",
4171
+ "dt-fold-open": "DataTable_dt-fold-open",
4132
4172
  measureBody: "DataTable_measureBody",
4133
4173
  truncate: "DataTable_truncate",
4134
4174
  detailCell: "DataTable_detailCell",
4135
4175
  detailMotion: "DataTable_detailMotion",
4136
4176
  detailRow: "DataTable_detailRow",
4137
4177
  "dt-detail-enter": "DataTable_dt-detail-enter",
4178
+ detailClip: "DataTable_detailClip",
4138
4179
  detailContent: "DataTable_detailContent",
4139
4180
  firstColumnSticky: "DataTable_firstColumnSticky",
4140
4181
  stickyLead: "DataTable_stickyLead",
@@ -4338,19 +4379,29 @@ function flatten(data, options) {
4338
4379
  collect(childrenOf(row), key);
4339
4380
  });
4340
4381
  };
4341
- const visit = (row, key, depth, parentAnimate) => {
4382
+ const visit = (row, key, depth, parentAnimate, parentFolding) => {
4342
4383
  const children = getRowChildren ? childrenOf(row) : [];
4343
4384
  const childKeys = children.map((child, index) => keyOf(child, index, key));
4344
4385
  const expandable = options.expandEnabled && (options.isRowExpandable?.(row) ?? (children.length > 0 || options.withDetail));
4345
4386
  const isExpanded = expandable && expanded.has(key);
4387
+ const isClosing = expandable && !isExpanded && Boolean(options.closing?.has(key));
4346
4388
  const animate = parentAnimate || depth === 0 && arrived.has(key);
4347
- result.rows.push({ row, key, depth, childKeys, expandable, expanded: isExpanded, animate });
4389
+ result.rows.push({
4390
+ row,
4391
+ key,
4392
+ depth,
4393
+ childKeys,
4394
+ expandable,
4395
+ expanded: isExpanded,
4396
+ animate,
4397
+ folding: parentFolding
4398
+ });
4348
4399
  if (options.collectKeys) result.keys.push(key);
4349
4400
  const childAnimate = parentAnimate || options.lastExpandedKey === key;
4350
4401
  children.forEach((child, index) => {
4351
4402
  const childKey = childKeys[index];
4352
- if (isExpanded) {
4353
- visit(child, childKey, depth + 1, childAnimate);
4403
+ if (isExpanded || isClosing) {
4404
+ visit(child, childKey, depth + 1, childAnimate, parentFolding || isClosing);
4354
4405
  return;
4355
4406
  }
4356
4407
  result.measure.push({ row: child, key: childKey, depth: depth + 1 });
@@ -4363,7 +4414,7 @@ function flatten(data, options) {
4363
4414
  data.forEach((row, index) => {
4364
4415
  const key = keyOf(row, index, null);
4365
4416
  if (index >= options.start && index < options.end) {
4366
- visit(row, key, 0, false);
4417
+ visit(row, key, 0, false, false);
4367
4418
  } else if (options.collectKeys) {
4368
4419
  result.keys.push(key);
4369
4420
  collect(childrenOf(row), key);
@@ -4412,31 +4463,40 @@ function DataTableRowImpl({
4412
4463
  expandable,
4413
4464
  expanded,
4414
4465
  animate,
4466
+ folding = false,
4415
4467
  detailAnimate,
4416
4468
  selected,
4417
4469
  childControls
4418
4470
  }) {
4419
4471
  const { columns, size, labels, selection, renderExpanded } = shared;
4420
4472
  const rowLabel = shared.getRowLabel?.(row);
4421
- const detail = usePresence(expanded && Boolean(renderExpanded), { exitDuration: "fast" });
4473
+ const detail = usePresence(expanded && Boolean(renderExpanded), { exitDuration: "base" });
4422
4474
  const detailContent = detail.mounted ? renderExpanded?.(row) : null;
4423
4475
  const hasDetail = detailContent != null && detailContent !== false;
4424
4476
  const controls = [
4425
4477
  hasDetail && expanded ? shared.detailDomId(rowKey) : "",
4426
4478
  expanded ? childControls : ""
4427
4479
  ].filter(Boolean).join(" ");
4428
- const enter = animate && enterMotion_default.enterBase;
4480
+ const sub = depth > 0;
4481
+ const [unfolding, setUnfolding] = React23.useState(sub && animate);
4482
+ const fold = !sub ? void 0 : folding ? "closed" : unfolding ? "opening" : "open";
4483
+ const enter = animate && !sub && enterMotion_default.enterBase;
4429
4484
  const lead = cx(DataTable_default.cell, enter, shared.stickyFirstColumn && DataTable_default.stickyLead);
4485
+ const folded = (node) => sub ? /* @__PURE__ */ jsx24("div", { className: DataTable_default.fold, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.foldItem, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.foldPad, children: node }) }) }) : node;
4430
4486
  return /* @__PURE__ */ jsxs16(Fragment4, { children: [
4431
4487
  /* @__PURE__ */ jsxs16(
4432
4488
  "tr",
4433
4489
  {
4434
4490
  id: shared.rowDomId(rowKey),
4435
4491
  className: DataTable_default.row,
4436
- style: depth > 0 ? { "--dt-depth": depth } : void 0,
4492
+ style: sub ? { "--dt-depth": depth } : void 0,
4437
4493
  "data-stripe": shared.striped && index % 2 === 1 ? "alt" : void 0,
4438
4494
  "data-clickable": shared.onRowClick ? "true" : void 0,
4439
- "data-depth": depth > 0 ? depth : void 0,
4495
+ "data-level": sub ? depth : void 0,
4496
+ "data-fold": fold,
4497
+ onAnimationEnd: unfolding ? (event) => {
4498
+ if (event.animationName.includes("dt-fold-open")) setUnfolding(false);
4499
+ } : void 0,
4440
4500
  "data-expanded": expanded ? "true" : void 0,
4441
4501
  "data-animate": animate ? "true" : void 0,
4442
4502
  "aria-selected": shared.selectable ? selected : void 0,
@@ -4451,35 +4511,39 @@ function DataTableRowImpl({
4451
4511
  "data-select-index": index,
4452
4512
  onPointerDown: (event) => selection.onPointerDown(index, event),
4453
4513
  onClick: (event) => selection.onClick(index, event),
4454
- children: /* @__PURE__ */ jsx24(
4455
- Checkbox.Root,
4456
- {
4457
- size,
4458
- checked: selected,
4459
- "aria-label": formatLabel(labels.selectRow, { label: rowLabel })
4460
- }
4514
+ children: folded(
4515
+ /* @__PURE__ */ jsx24(
4516
+ Checkbox.Root,
4517
+ {
4518
+ size,
4519
+ checked: selected,
4520
+ "aria-label": formatLabel(labels.selectRow, { label: rowLabel })
4521
+ }
4522
+ )
4461
4523
  )
4462
4524
  }
4463
4525
  )
4464
4526
  ) : null,
4465
- shared.expandEnabled ? /* @__PURE__ */ jsx24("td", { className: cx(lead, DataTable_default.toggleCell), children: expandable ? /* @__PURE__ */ jsx24(
4466
- Button.Root,
4467
- {
4468
- variant: "ghost",
4469
- tone: "neutral",
4470
- size: TOGGLE_SIZE[size],
4471
- "aria-expanded": expanded,
4472
- "aria-controls": controls || void 0,
4473
- "aria-label": formatLabel(expanded ? labels.collapse : labels.expand, {
4474
- label: rowLabel
4475
- }),
4476
- onClick: (event) => {
4477
- event.stopPropagation();
4478
- shared.toggleExpanded(rowKey);
4479
- },
4480
- children: /* @__PURE__ */ jsx24(Button.Icon, { children: /* @__PURE__ */ jsx24(Icon, { name: "nav.chevronRight", className: DataTable_default.chevron }) })
4481
- }
4482
- ) : null }) : null,
4527
+ shared.expandEnabled ? /* @__PURE__ */ jsx24("td", { className: cx(lead, DataTable_default.toggleCell), children: folded(
4528
+ expandable ? /* @__PURE__ */ jsx24(
4529
+ Button.Root,
4530
+ {
4531
+ variant: "ghost",
4532
+ tone: "neutral",
4533
+ size: TOGGLE_SIZE[size],
4534
+ "aria-expanded": expanded,
4535
+ "aria-controls": controls || void 0,
4536
+ "aria-label": formatLabel(expanded ? labels.collapse : labels.expand, {
4537
+ label: rowLabel
4538
+ }),
4539
+ onClick: (event) => {
4540
+ event.stopPropagation();
4541
+ shared.toggleExpanded(rowKey);
4542
+ },
4543
+ children: /* @__PURE__ */ jsx24(Button.Icon, { children: /* @__PURE__ */ jsx24(Icon, { name: "nav.chevronRight", className: DataTable_default.chevron }) })
4544
+ }
4545
+ ) : null
4546
+ ) }) : null,
4483
4547
  columns.map((column, columnIndex) => {
4484
4548
  const isFirstColumn = columnIndex === 0;
4485
4549
  return /* @__PURE__ */ jsx24(
@@ -4495,7 +4559,7 @@ function DataTableRowImpl({
4495
4559
  "data-numeric": column.numeric ? "true" : void 0,
4496
4560
  "data-first-column": isFirstColumn ? "true" : void 0,
4497
4561
  "data-column-id": column.id,
4498
- children: renderCell(row, column, true)
4562
+ children: folded(renderCell(row, column, true))
4499
4563
  },
4500
4564
  column.id
4501
4565
  );
@@ -4511,7 +4575,7 @@ function DataTableRowImpl({
4511
4575
  "data-state": detail.state,
4512
4576
  "data-animate": detailAnimate || animate ? "true" : void 0,
4513
4577
  inert: !expanded,
4514
- children: /* @__PURE__ */ jsx24("td", { colSpan: shared.totalColumns, className: DataTable_default.detailCell, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailMotion, onTransitionEnd: detail.onExitEnd, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailContent, children: detailContent }) }) })
4578
+ children: /* @__PURE__ */ jsx24("td", { colSpan: shared.totalColumns, className: DataTable_default.detailCell, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailMotion, onTransitionEnd: detail.onExitEnd, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailClip, children: /* @__PURE__ */ jsx24("div", { className: DataTable_default.detailContent, children: detailContent }) }) }) })
4515
4579
  }
4516
4580
  ) : null
4517
4581
  ] });
@@ -4528,7 +4592,7 @@ function MeasureBody({
4528
4592
  {
4529
4593
  className: DataTable_default.row,
4530
4594
  style: { "--dt-depth": depth },
4531
- "data-depth": depth,
4595
+ "data-level": depth,
4532
4596
  children: [
4533
4597
  selectable ? /* @__PURE__ */ jsx24("td", { className: cx(DataTable_default.cell, DataTable_default.selectCell) }) : null,
4534
4598
  expandEnabled ? /* @__PURE__ */ jsx24("td", { className: cx(DataTable_default.cell, DataTable_default.toggleCell) }) : null,
@@ -4981,6 +5045,7 @@ var DEFAULT_LABELS3 = {
4981
5045
  };
4982
5046
  var EMPTY_KEYS = [];
4983
5047
  var SKELETON_ROWS = 5;
5048
+ var NO_KEYS = /* @__PURE__ */ new Set();
4984
5049
  var INFINITE_SCROLL_HEIGHT = 360;
4985
5050
  var domIdPart = (key) => String(key).replace(/[^A-Za-z0-9_-]/g, "_");
4986
5051
  function DataTable({
@@ -5041,6 +5106,7 @@ function DataTable({
5041
5106
  const tableRef = React28.useRef(null);
5042
5107
  const rootRef = React28.useRef(null);
5043
5108
  const mergedRootRef = useMergedRefs(rootRef, ref);
5109
+ const depth = useNestedSurfaceDepth();
5044
5110
  const columns = React28.useMemo(() => {
5045
5111
  if (!hiddenColumns?.length) return allColumns;
5046
5112
  const hidden = new Set(hiddenColumns);
@@ -5109,11 +5175,29 @@ function DataTable({
5109
5175
  const [lastExpandedKey, setLastExpandedKey] = React28.useState(null);
5110
5176
  const expansion = React28.useRef({ expandedKeys, setExpandedKeys });
5111
5177
  expansion.current = { expandedKeys, setExpandedKeys };
5178
+ const [closingKeys, setClosingKeys] = React28.useState(NO_KEYS);
5112
5179
  const toggleExpanded = React28.useCallback((key) => {
5113
5180
  const { expandedKeys: keys, setExpandedKeys: setKeys } = expansion.current;
5114
5181
  const isOpen = keys.includes(key);
5115
5182
  setLastExpandedKey(isOpen ? null : key);
5116
5183
  setKeys(isOpen ? keys.filter((k) => k !== key) : [...keys, key]);
5184
+ setClosingKeys((prev) => {
5185
+ const next = new Set(prev);
5186
+ if (isOpen) next.add(key);
5187
+ else next.delete(key);
5188
+ return next;
5189
+ });
5190
+ if (isOpen) {
5191
+ window.setTimeout(
5192
+ () => setClosingKeys((prev) => {
5193
+ if (!prev.has(key)) return prev;
5194
+ const next = new Set(prev);
5195
+ next.delete(key);
5196
+ return next;
5197
+ }),
5198
+ exitTimeoutMs("base")
5199
+ );
5200
+ }
5117
5201
  }, []);
5118
5202
  const flat = React28.useMemo(
5119
5203
  () => flatten(sortedRows, {
@@ -5127,6 +5211,7 @@ function DataTable({
5127
5211
  withDetail: Boolean(renderExpanded),
5128
5212
  isRowExpandable,
5129
5213
  expanded: expandedSet,
5214
+ closing: closingKeys,
5130
5215
  arrived: rowArrival.added,
5131
5216
  lastExpandedKey,
5132
5217
  collectKeys: selectable
@@ -5143,6 +5228,7 @@ function DataTable({
5143
5228
  renderExpanded,
5144
5229
  isRowExpandable,
5145
5230
  expandedSet,
5231
+ closingKeys,
5146
5232
  rowArrival.added,
5147
5233
  lastExpandedKey,
5148
5234
  selectable
@@ -5220,12 +5306,13 @@ function DataTable({
5220
5306
  );
5221
5307
  const showRange = bodyState === "rows" && (infinite || paged && totalPages > 1);
5222
5308
  const showInfiniteStatus = !hasError && infinite && (infiniteRows.hasInternalMore || loadingMore || infiniteRows.canRequestMore);
5223
- return /* @__PURE__ */ jsx28(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs19(
5309
+ return /* @__PURE__ */ jsx28(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx28(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs19(
5224
5310
  "div",
5225
5311
  {
5226
5312
  ...rest,
5227
5313
  ref: mergedRootRef,
5228
5314
  className: cx(DataTable_default.root, className),
5315
+ "data-depth": depth,
5229
5316
  ...toDataAttributes({
5230
5317
  size,
5231
5318
  "row-dividers": rowDividers ? void 0 : "false",
@@ -5301,6 +5388,7 @@ function DataTable({
5301
5388
  expandable: item.expandable,
5302
5389
  expanded: item.expanded,
5303
5390
  animate: item.animate,
5391
+ folding: item.folding,
5304
5392
  detailAnimate: lastExpandedKey === item.key,
5305
5393
  selected: selectable && selection.selectedSet.has(item.key),
5306
5394
  childControls: item.childKeys.map(rowDomId).join(" ")
@@ -5318,7 +5406,10 @@ function DataTable({
5318
5406
  error,
5319
5407
  empty,
5320
5408
  emptyLabel: labels.empty,
5321
- skeletonRows: Math.max(1, loadingRows ?? Math.min(safePageSize, SKELETON_ROWS))
5409
+ skeletonRows: Math.max(
5410
+ 1,
5411
+ loadingRows ?? Math.min(safePageSize, SKELETON_ROWS)
5412
+ )
5322
5413
  }
5323
5414
  )
5324
5415
  },
@@ -5336,7 +5427,14 @@ function DataTable({
5336
5427
  ]
5337
5428
  }
5338
5429
  ),
5339
- infinite ? /* @__PURE__ */ jsx28("div", { ref: infiniteRows.sentinelRef, className: DataTable_default.sentinel, "aria-hidden": "true" }) : null
5430
+ infinite ? /* @__PURE__ */ jsx28(
5431
+ "div",
5432
+ {
5433
+ ref: infiniteRows.sentinelRef,
5434
+ className: DataTable_default.sentinel,
5435
+ "aria-hidden": "true"
5436
+ }
5437
+ ) : null
5340
5438
  ]
5341
5439
  }
5342
5440
  ) }),
@@ -5357,7 +5455,7 @@ function DataTable({
5357
5455
  )
5358
5456
  ]
5359
5457
  }
5360
- ) });
5458
+ ) }) });
5361
5459
  }
5362
5460
 
5363
5461
  // src/components/datepicker/Datepicker.tsx
@@ -5795,6 +5893,7 @@ function PanelView(props) {
5795
5893
  const [panelNode, setPanelNode] = React30.useState(null);
5796
5894
  const panelRef = useMergedRefs(setPanelNode, domRef);
5797
5895
  const parentWidth = useAvailableWidth(embedded ? panelNode : null);
5896
+ const nestedDepth = useNestedSurfaceDepth();
5798
5897
  const viewportWidth = useViewportWidth(!embedded);
5799
5898
  useContainScroll(embedded ? null : panelNode);
5800
5899
  const hasPresets = Boolean(presets) && isRange;
@@ -5957,6 +6056,7 @@ function PanelView(props) {
5957
6056
  className: cx(Datepicker_default.panel, className),
5958
6057
  "data-size": size,
5959
6058
  "data-embedded": embedded ? "true" : void 0,
6059
+ "data-depth": embedded ? nestedDepth : void 0,
5960
6060
  "data-compact": compact ? "true" : void 0,
5961
6061
  "data-layout": layout,
5962
6062
  children: [
@@ -6356,7 +6456,9 @@ import * as React31 from "react";
6356
6456
  var DigitInput_default = {
6357
6457
  frame: "DigitInput_frame",
6358
6458
  root: "DigitInput_root",
6359
- cell: "DigitInput_cell"
6459
+ cell: "DigitInput_cell",
6460
+ ring: "DigitInput_ring",
6461
+ primeDigitIn: "DigitInput_primeDigitIn"
6360
6462
  };
6361
6463
 
6362
6464
  // src/components/digit-input/DigitInput.tsx
@@ -6381,6 +6483,7 @@ function DigitInput({
6381
6483
  onComplete,
6382
6484
  disabled,
6383
6485
  invalid,
6486
+ success = false,
6384
6487
  focusRing = true,
6385
6488
  label,
6386
6489
  required,
@@ -6416,6 +6519,32 @@ function DigitInput({
6416
6519
  pendingFocusRef.current = null;
6417
6520
  inputRefs.current[index]?.focus();
6418
6521
  });
6522
+ const [focusIndex, setFocusIndex] = React31.useState(null);
6523
+ const ringRef = React31.useRef(null);
6524
+ const ringShown = React31.useRef(false);
6525
+ React31.useLayoutEffect(() => {
6526
+ const ring = ringRef.current;
6527
+ const cell = focusIndex === null ? null : inputRefs.current[focusIndex];
6528
+ if (!ring) return;
6529
+ if (!cell) {
6530
+ ringShown.current = false;
6531
+ return;
6532
+ }
6533
+ const place = () => {
6534
+ ring.style.width = `${cell.offsetWidth}px`;
6535
+ ring.style.height = `${cell.offsetHeight}px`;
6536
+ ring.style.transform = `translate(${cell.offsetLeft}px, ${cell.offsetTop}px)`;
6537
+ };
6538
+ if (!ringShown.current) {
6539
+ ring.style.transition = "none";
6540
+ place();
6541
+ ring.getBoundingClientRect();
6542
+ ring.style.transition = "";
6543
+ ringShown.current = true;
6544
+ } else {
6545
+ place();
6546
+ }
6547
+ });
6419
6548
  const entryIndex = Math.min(value.length, length - 1);
6420
6549
  const handleChangeAt = (index, nextChar) => {
6421
6550
  const at = Math.min(index, entryIndex);
@@ -6462,10 +6591,27 @@ function DigitInput({
6462
6591
  size,
6463
6592
  "full-width": fullWidth || void 0,
6464
6593
  invalid: ids.invalid || void 0,
6594
+ success: success && !ids.invalid || void 0,
6465
6595
  disabled: disabled || void 0,
6466
6596
  "focus-ring": focusRing ? void 0 : false
6467
6597
  }),
6598
+ onFocus: (event) => {
6599
+ const index = inputRefs.current.indexOf(event.target);
6600
+ if (index >= 0) setFocusIndex(index);
6601
+ },
6602
+ onBlur: (event) => {
6603
+ if (!event.currentTarget.contains(event.relatedTarget)) setFocusIndex(null);
6604
+ },
6468
6605
  children: [
6606
+ /* @__PURE__ */ jsx31(
6607
+ "span",
6608
+ {
6609
+ ref: ringRef,
6610
+ className: DigitInput_default.ring,
6611
+ "aria-hidden": "true",
6612
+ "data-visible": focusIndex !== null || void 0
6613
+ }
6614
+ ),
6469
6615
  name ? /* @__PURE__ */ jsx31("input", { type: "hidden", name, value }) : null,
6470
6616
  cells.map((cell, index) => /* @__PURE__ */ jsx31(
6471
6617
  "input",
@@ -6483,6 +6629,8 @@ function DigitInput({
6483
6629
  disabled,
6484
6630
  required,
6485
6631
  className: cx(fieldSurfaceClass, DigitInput_default.cell),
6632
+ "data-focus-ring": "false",
6633
+ style: { "--digit-i": index },
6486
6634
  "data-size": size,
6487
6635
  "data-filled": cell ? "true" : void 0,
6488
6636
  "data-group-start": groupSize && index > 0 && index % groupSize === 0 ? "true" : void 0,
@@ -6700,7 +6848,7 @@ var POINTER_ACTIVATION = {
6700
6848
  };
6701
6849
  var TOUCH_ACTIVATION = {
6702
6850
  distance: Number.POSITIVE_INFINITY,
6703
- delay: 180,
6851
+ delay: 280,
6704
6852
  tolerance: 10
6705
6853
  };
6706
6854
  function pointerKindOf(pointerType) {
@@ -7146,11 +7294,27 @@ function cloneFor(preview) {
7146
7294
  clone.classList.add(Dnd_default.lift);
7147
7295
  return clone;
7148
7296
  }
7297
+ function holdHoverUntilLeave(node) {
7298
+ node.setAttribute("data-dnd-hover", "");
7299
+ const release = () => {
7300
+ node.removeAttribute("data-dnd-hover");
7301
+ window.removeEventListener("pointermove", onMove);
7302
+ window.removeEventListener("pointerdown", release, true);
7303
+ };
7304
+ const onMove = (event) => {
7305
+ const r = node.getBoundingClientRect();
7306
+ const inside = event.clientX >= r.left && event.clientX <= r.right && event.clientY >= r.top && event.clientY <= r.bottom;
7307
+ if (!inside) release();
7308
+ };
7309
+ window.addEventListener("pointermove", onMove);
7310
+ window.addEventListener("pointerdown", release, true);
7311
+ }
7149
7312
  function DragOverlay({ controller }) {
7150
7313
  const hostRef = React35.useRef(null);
7151
7314
  const grabRef = React35.useRef({ x: 0, y: 0 });
7152
7315
  const pointRef = React35.useRef({ x: 0, y: 0 });
7153
7316
  const frameRef = React35.useRef(null);
7317
+ const pointerKindRef = React35.useRef("mouse");
7154
7318
  const [mounted, setMounted] = React35.useState(false);
7155
7319
  const stopLandingRef = React35.useRef(null);
7156
7320
  const endTokenRef = React35.useRef(0);
@@ -7210,12 +7374,20 @@ function DragOverlay({ controller }) {
7210
7374
  const rect = layoutRect(destination);
7211
7375
  const to = translate({ x: rect.left, y: rect.top }, { x: 0, y: 0 });
7212
7376
  destination.setAttribute("data-dnd-landing", "");
7377
+ const box = destination.getBoundingClientRect();
7378
+ const point = pointRef.current;
7379
+ const pointerOver = pointerKindRef.current === "mouse" && point.x >= box.left && point.x <= box.right && point.y >= box.top && point.y <= box.bottom;
7380
+ const transition = destination.style.transition;
7381
+ destination.style.transition = "none";
7382
+ if (pointerOver) holdHoverUntilLeave(destination);
7383
+ const landed = getComputedStyle(destination).boxShadow;
7384
+ destination.style.transition = transition;
7213
7385
  const flight = host.animate([{ transform: from }, { transform: to }], timing);
7214
7386
  const drawn = getComputedStyle(lifted);
7215
7387
  const setDown = lifted.animate(
7216
7388
  [
7217
7389
  { transform: drawn.transform, boxShadow: drawn.boxShadow },
7218
- { transform: "none", boxShadow: "none" }
7390
+ { transform: "none", boxShadow: landed }
7219
7391
  ],
7220
7392
  timing
7221
7393
  );
@@ -7243,6 +7415,7 @@ function DragOverlay({ controller }) {
7243
7415
  if (event.type === "start") {
7244
7416
  grabRef.current = event.preview.grab;
7245
7417
  pointRef.current = event.preview.point;
7418
+ pointerKindRef.current = event.preview.pointerKind;
7246
7419
  settle(host);
7247
7420
  host.replaceChildren(cloneFor(event.preview));
7248
7421
  host.style.transform = translate(event.preview.point, event.preview.grab);
@@ -8002,6 +8175,7 @@ function DrawerDialog({
8002
8175
  "data-side": side,
8003
8176
  "data-size": size,
8004
8177
  "data-state": state,
8178
+ "data-depth": "floating",
8005
8179
  onAnimationEnd: onExitEnd,
8006
8180
  ...shell.aria,
8007
8181
  ...rest,
@@ -8011,7 +8185,7 @@ function DrawerDialog({
8011
8185
  },
8012
8186
  children: [
8013
8187
  bottom ? /* @__PURE__ */ jsx34("div", { className: sheet_default.handle, "data-swipe-handle": "", "aria-hidden": "true" }) : null,
8014
- /* @__PURE__ */ jsx34(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx34(LayerProvider, { value: layer, children }) })
8188
+ /* @__PURE__ */ jsx34(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx34(LayerProvider, { value: layer, children: /* @__PURE__ */ jsx34(SurfaceDepthProvider, { value: "floating", children }) }) })
8015
8189
  ]
8016
8190
  }
8017
8191
  )
@@ -8700,13 +8874,15 @@ function ExampleFrame({
8700
8874
  });
8701
8875
  const rootRef = React43.useRef(null);
8702
8876
  const mergedRef = useMergedRefs(rootRef, ref);
8877
+ const depth = useNestedSurfaceDepth();
8878
+ const stageDepth = useStageDepth();
8703
8879
  const previousScheme = React43.useRef(colorScheme);
8704
8880
  React43.useLayoutEffect(() => {
8705
8881
  if (previousScheme.current === colorScheme) return;
8706
8882
  previousScheme.current = colorScheme;
8707
8883
  if (rootRef.current) suspendTransitions(rootRef.current);
8708
8884
  }, [colorScheme]);
8709
- return /* @__PURE__ */ jsxs27("div", { ...rest, ref: mergedRef, className: cx(ExampleFrame_default.root, className), children: [
8885
+ return /* @__PURE__ */ jsxs27("div", { ...rest, ref: mergedRef, className: cx(ExampleFrame_default.root, className), "data-depth": depth, children: [
8710
8886
  /* @__PURE__ */ jsx37(
8711
8887
  ExampleFrameToolbar,
8712
8888
  {
@@ -8727,7 +8903,8 @@ function ExampleFrame({
8727
8903
  className: ExampleFrame_default.previewInner,
8728
8904
  "data-preview-layout": previewLayout,
8729
8905
  "data-theme": colorScheme,
8730
- children
8906
+ "data-depth": stageDepth,
8907
+ children: /* @__PURE__ */ jsx37(SurfaceDepthProvider, { value: stageDepth, children })
8731
8908
  }
8732
8909
  ) }) }) : (
8733
8910
  // Plain CodeBlock is not focusable itself; the scrolling pane takes keyboard focus instead.
@@ -8845,164 +9022,8 @@ function ExampleFrameToolbar({
8845
9022
  ExampleFrameToolbar.displayName = "ExampleFrame.Toolbar";
8846
9023
 
8847
9024
  // src/components/file-upload/FileUpload.tsx
8848
- import * as React45 from "react";
8849
-
8850
- // src/components/progress-bar/ProgressBar.tsx
8851
9025
  import * as React44 from "react";
8852
9026
 
8853
- // src/internal/progressSegments.ts
8854
- function resolveValue(value, max) {
8855
- const top = max !== void 0 && max > 0 ? max : 100;
8856
- const clamped = Math.min(top, Math.max(Number.isFinite(value) ? value : 0, 0));
8857
- return {
8858
- value: clamped,
8859
- max: top,
8860
- ratio: clamped / top,
8861
- percent: Math.round(clamped / top * 100)
8862
- };
8863
- }
8864
- var DEFAULT_PROGRESS_SEGMENTS_LABELS = {
8865
- empty: "\u041D\u0435\u0442 \u0441\u0435\u0433\u043C\u0435\u043D\u0442\u043E\u0432",
8866
- allEmpty: "\u0412\u0441\u0435 \u0441\u0435\u0433\u043C\u0435\u043D\u0442\u044B \u043F\u0443\u0441\u0442\u044B"
8867
- };
8868
- function nonNegative(n) {
8869
- return Number.isFinite(n) && n > 0 ? n : 0;
8870
- }
8871
- function resolveSegments(input, max, labels) {
8872
- const segments = input.map((s) => ({ ...s, value: nonNegative(s.value) }));
8873
- const total = segments.reduce((acc, s) => acc + s.value, 0);
8874
- const scale = max !== void 0 && max > 0 ? Math.max(max, total) : total;
8875
- let text;
8876
- if (segments.length === 0) text = labels.empty;
8877
- else if (scale <= 0) text = labels.allEmpty;
8878
- else
8879
- text = segments.map((s) => {
8880
- const pct = Math.round(s.value / scale * 100);
8881
- return s.label ? `${s.label}: ${pct}%` : `${pct}%`;
8882
- }).join(", ");
8883
- return {
8884
- segments,
8885
- total,
8886
- scale,
8887
- rest: scale - total,
8888
- percent: scale > 0 ? Math.round(total / scale * 100) : 0,
8889
- text
8890
- };
8891
- }
8892
-
8893
- // src/components/progress-bar/ProgressBar.module.css
8894
- var ProgressBar_default = {
8895
- root: "ProgressBar_root",
8896
- segment: "ProgressBar_segment",
8897
- header: "ProgressBar_header",
8898
- label: "ProgressBar_label",
8899
- value: "ProgressBar_value",
8900
- native: "ProgressBar_native",
8901
- bar: "ProgressBar_bar",
8902
- fill: "ProgressBar_fill",
8903
- segments: "ProgressBar_segments",
8904
- rest: "ProgressBar_rest"
8905
- };
8906
-
8907
- // src/components/progress-bar/ProgressBar.tsx
8908
- import { Fragment as Fragment7, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
8909
- function ProgressBar(props) {
8910
- const {
8911
- label,
8912
- size = "m",
8913
- showValue = false,
8914
- className,
8915
- value: valueProp,
8916
- max: maxProp,
8917
- tone: toneProp,
8918
- segments: segmentsProp,
8919
- segmentGap = "none",
8920
- labels,
8921
- "aria-label": ariaLabel,
8922
- ...rest
8923
- } = props;
8924
- const labelId = React44.useId();
8925
- const descriptionId = React44.useId();
8926
- let percent;
8927
- let tone;
8928
- let bar;
8929
- if (segmentsProp) {
8930
- const resolved = resolveSegments(segmentsProp, maxProp, {
8931
- ...DEFAULT_PROGRESS_SEGMENTS_LABELS,
8932
- ...labels
8933
- });
8934
- const { segments, total, rest: free, text } = resolved;
8935
- percent = resolved.percent;
8936
- const named = Boolean(label || ariaLabel);
8937
- const a11y = named ? {
8938
- "aria-labelledby": label ? labelId : void 0,
8939
- "aria-label": label ? void 0 : ariaLabel,
8940
- "aria-describedby": descriptionId
8941
- } : { "aria-label": text };
8942
- bar = /* @__PURE__ */ jsxs28(Fragment7, { children: [
8943
- named ? /* @__PURE__ */ jsx38(VisuallyHidden, { id: descriptionId, children: text }) : null,
8944
- /* @__PURE__ */ jsxs28(
8945
- "div",
8946
- {
8947
- className: ProgressBar_default.bar,
8948
- role: "group",
8949
- ...a11y,
8950
- ...toDataAttributes({ "segment-gap": segmentGap }),
8951
- children: [
8952
- total > 0 ? /* @__PURE__ */ jsx38("span", { className: ProgressBar_default.segments, style: { flexGrow: total }, children: segments.map((seg, i) => /* @__PURE__ */ jsx38(
8953
- "span",
8954
- {
8955
- className: ProgressBar_default.segment,
8956
- style: { flexGrow: seg.value },
8957
- title: seg.label,
8958
- ...toDataAttributes({ tone: seg.tone ?? "accent" })
8959
- },
8960
- i
8961
- )) }) : null,
8962
- free > 0 || total === 0 ? /* @__PURE__ */ jsx38("span", { className: ProgressBar_default.rest, style: { flexGrow: free > 0 ? free : 1 } }) : null
8963
- ]
8964
- }
8965
- )
8966
- ] });
8967
- } else {
8968
- const resolved = resolveValue(valueProp ?? 0, maxProp);
8969
- const { value, max } = resolved;
8970
- percent = resolved.percent;
8971
- tone = toneProp ?? "accent";
8972
- bar = /* @__PURE__ */ jsxs28(Fragment7, { children: [
8973
- /* @__PURE__ */ jsx38(
8974
- "progress",
8975
- {
8976
- value,
8977
- max,
8978
- "aria-labelledby": label ? labelId : void 0,
8979
- "aria-label": label ? void 0 : ariaLabel,
8980
- className: ProgressBar_default.native
8981
- }
8982
- ),
8983
- /* @__PURE__ */ jsx38(
8984
- "span",
8985
- {
8986
- className: ProgressBar_default.bar,
8987
- "aria-hidden": "true",
8988
- style: { "--pb-ratio": resolved.ratio },
8989
- children: /* @__PURE__ */ jsx38("span", { className: ProgressBar_default.fill })
8990
- }
8991
- )
8992
- ] });
8993
- }
8994
- return /* @__PURE__ */ jsxs28("div", { className: cx(ProgressBar_default.root, className), ...rest, ...toDataAttributes({ size, tone }), children: [
8995
- label || showValue ? /* @__PURE__ */ jsxs28("div", { className: ProgressBar_default.header, children: [
8996
- label ? /* @__PURE__ */ jsx38("span", { className: ProgressBar_default.label, id: labelId, children: label }) : null,
8997
- showValue ? /* @__PURE__ */ jsxs28("span", { className: ProgressBar_default.value, "aria-hidden": "true", children: [
8998
- percent,
8999
- "%"
9000
- ] }) : null
9001
- ] }) : null,
9002
- bar
9003
- ] });
9004
- }
9005
-
9006
9027
  // src/components/file-upload/FileUpload.module.css
9007
9028
  var FileUpload_default = {
9008
9029
  root: "FileUpload_root",
@@ -9020,7 +9041,7 @@ var FileUpload_default = {
9020
9041
  };
9021
9042
 
9022
9043
  // src/components/file-upload/FileUpload.tsx
9023
- import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
9044
+ import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
9024
9045
  var FILE_UPLOAD_LABELS = {
9025
9046
  title: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0435\u0433\u043E \u0441\u044E\u0434\u0430",
9026
9047
  description: "JPEG, PNG, PDF, MP4 \u0434\u043E 50 \u041C\u0411",
@@ -9028,15 +9049,15 @@ var FILE_UPLOAD_LABELS = {
9028
9049
  optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E"
9029
9050
  };
9030
9051
  function FileUploadBody({ className, ...rest }) {
9031
- return /* @__PURE__ */ jsx39("div", { className: cx(FileUpload_default.body, className), ...rest });
9052
+ return /* @__PURE__ */ jsx38("div", { className: cx(FileUpload_default.body, className), ...rest });
9032
9053
  }
9033
9054
  FileUploadBody.displayName = "FileUpload.Body";
9034
9055
  function FileUploadIcon({ className, ...rest }) {
9035
- return /* @__PURE__ */ jsx39("span", { className: cx(FileUpload_default.icon, className), "aria-hidden": true, ...rest });
9056
+ return /* @__PURE__ */ jsx38("span", { className: cx(FileUpload_default.icon, className), "aria-hidden": true, ...rest });
9036
9057
  }
9037
9058
  FileUploadIcon.displayName = "FileUpload.Icon";
9038
9059
  function FileUploadTitle({ className, tone = "default", ...rest }) {
9039
- return /* @__PURE__ */ jsx39(
9060
+ return /* @__PURE__ */ jsx38(
9040
9061
  "p",
9041
9062
  {
9042
9063
  className: cx(FileUpload_default.title, className),
@@ -9047,7 +9068,7 @@ function FileUploadTitle({ className, tone = "default", ...rest }) {
9047
9068
  }
9048
9069
  FileUploadTitle.displayName = "FileUpload.Title";
9049
9070
  function FileUploadDescription(props) {
9050
- return /* @__PURE__ */ jsx39(Hint.Root, { size: useControlSize(void 0), ...props });
9071
+ return /* @__PURE__ */ jsx38(Hint.Root, { size: useControlSize(void 0), ...props });
9051
9072
  }
9052
9073
  FileUploadDescription.displayName = "FileUpload.Description";
9053
9074
  function FileUploadItem({
@@ -9057,7 +9078,7 @@ function FileUploadItem({
9057
9078
  ...rest
9058
9079
  }) {
9059
9080
  const size = useControlSize(sizeProp);
9060
- return /* @__PURE__ */ jsx39(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx39(
9081
+ return /* @__PURE__ */ jsx38(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx38(
9061
9082
  "div",
9062
9083
  {
9063
9084
  className: cx(FileUpload_default.item, className),
@@ -9073,19 +9094,19 @@ function FileUploadFormatBadge({
9073
9094
  className,
9074
9095
  ...rest
9075
9096
  }) {
9076
- return /* @__PURE__ */ jsx39(Badge.Root, { ...rest, color, className: cx(FileUpload_default.formatBadge, className), "aria-hidden": true, children: format4.trim().slice(0, 8).toUpperCase() });
9097
+ return /* @__PURE__ */ jsx38(Badge.Root, { ...rest, color, className: cx(FileUpload_default.formatBadge, className), "aria-hidden": true, children: format4.trim().slice(0, 8).toUpperCase() });
9077
9098
  }
9078
9099
  FileUploadFormatBadge.displayName = "FileUpload.FormatBadge";
9079
9100
  function FileUploadItemName({ className, ...rest }) {
9080
- return /* @__PURE__ */ jsx39("div", { className: cx(FileUpload_default.itemName, className), ...rest });
9101
+ return /* @__PURE__ */ jsx38("div", { className: cx(FileUpload_default.itemName, className), ...rest });
9081
9102
  }
9082
9103
  FileUploadItemName.displayName = "FileUpload.ItemName";
9083
9104
  function FileUploadItemDescription({ className, ...rest }) {
9084
- return /* @__PURE__ */ jsx39("div", { className: cx(FileUpload_default.itemDescription, className), ...rest });
9105
+ return /* @__PURE__ */ jsx38("div", { className: cx(FileUpload_default.itemDescription, className), ...rest });
9085
9106
  }
9086
9107
  FileUploadItemDescription.displayName = "FileUpload.ItemDescription";
9087
9108
  function FileUploadItemActions({ className, ...rest }) {
9088
- return /* @__PURE__ */ jsx39("div", { className: cx(FileUpload_default.itemActions, className), ...rest });
9109
+ return /* @__PURE__ */ jsx38("div", { className: cx(FileUpload_default.itemActions, className), ...rest });
9089
9110
  }
9090
9111
  FileUploadItemActions.displayName = "FileUpload.ItemActions";
9091
9112
  function FileUploadItemProgress({
@@ -9095,7 +9116,7 @@ function FileUploadItemProgress({
9095
9116
  "aria-label": ariaLabel = "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0444\u0430\u0439\u043B\u0430",
9096
9117
  ...rest
9097
9118
  }) {
9098
- return /* @__PURE__ */ jsx39("div", { ...rest, className: cx(FileUpload_default.itemProgress, className), children: /* @__PURE__ */ jsx39(ProgressBar, { value, max, "aria-label": ariaLabel }) });
9119
+ return /* @__PURE__ */ jsx38("div", { ...rest, className: cx(FileUpload_default.itemProgress, className), children: /* @__PURE__ */ jsx38(ProgressBar, { value, max, "aria-label": ariaLabel }) });
9099
9120
  }
9100
9121
  FileUploadItemProgress.displayName = "FileUpload.ItemProgress";
9101
9122
  function FileUploadRoot({
@@ -9122,8 +9143,8 @@ function FileUploadRoot({
9122
9143
  const size = useControlSize(sizeProp);
9123
9144
  const labels = { ...FILE_UPLOAD_LABELS, ...labelsProp };
9124
9145
  const ids = useFieldFrame(id, { label, hint, error, invalid });
9125
- const [dragOver, setDragOver] = React45.useState(false);
9126
- const dragDepth = React45.useRef(0);
9146
+ const [dragOver, setDragOver] = React44.useState(false);
9147
+ const dragDepth = React44.useRef(0);
9127
9148
  const onDragEnter = (event) => {
9128
9149
  event.preventDefault();
9129
9150
  dragDepth.current += 1;
@@ -9139,7 +9160,7 @@ function FileUploadRoot({
9139
9160
  setDragOver(false);
9140
9161
  if (!disabled) onFilesChange?.(Array.from(event.dataTransfer.files));
9141
9162
  };
9142
- return /* @__PURE__ */ jsx39(
9163
+ return /* @__PURE__ */ jsx38(
9143
9164
  FieldFrame,
9144
9165
  {
9145
9166
  ...rest,
@@ -9152,7 +9173,7 @@ function FileUploadRoot({
9152
9173
  error,
9153
9174
  disabled,
9154
9175
  optionalLabel: labels.optional,
9155
- children: /* @__PURE__ */ jsxs29(
9176
+ children: /* @__PURE__ */ jsxs28(
9156
9177
  "label",
9157
9178
  {
9158
9179
  className: FileUpload_default.root,
@@ -9168,7 +9189,7 @@ function FileUploadRoot({
9168
9189
  onDragLeave,
9169
9190
  onDrop,
9170
9191
  children: [
9171
- /* @__PURE__ */ jsx39(
9192
+ /* @__PURE__ */ jsx38(
9172
9193
  "input",
9173
9194
  {
9174
9195
  ref: inputRef,
@@ -9190,13 +9211,13 @@ function FileUploadRoot({
9190
9211
  }
9191
9212
  }
9192
9213
  ),
9193
- /* @__PURE__ */ jsx39(ControlSizeProvider, { value: size, children: children ?? /* @__PURE__ */ jsxs29(FileUploadBody, { children: [
9194
- /* @__PURE__ */ jsx39(FileUploadIcon, { children: /* @__PURE__ */ jsx39(Icon, { name: "action.upload", size, tone: "secondary" }) }),
9195
- /* @__PURE__ */ jsxs29("div", { className: FileUpload_default.copy, children: [
9196
- /* @__PURE__ */ jsx39(FileUploadTitle, { children: labels.title }),
9197
- labels.description ? /* @__PURE__ */ jsx39(FileUploadDescription, { children: labels.description }) : null
9214
+ /* @__PURE__ */ jsx38(ControlSizeProvider, { value: size, children: children ?? /* @__PURE__ */ jsxs28(FileUploadBody, { children: [
9215
+ /* @__PURE__ */ jsx38(FileUploadIcon, { children: /* @__PURE__ */ jsx38(Icon, { name: "action.upload", size, tone: "secondary" }) }),
9216
+ /* @__PURE__ */ jsxs28("div", { className: FileUpload_default.copy, children: [
9217
+ /* @__PURE__ */ jsx38(FileUploadTitle, { children: labels.title }),
9218
+ labels.description ? /* @__PURE__ */ jsx38(FileUploadDescription, { children: labels.description }) : null
9198
9219
  ] }),
9199
- /* @__PURE__ */ jsx39(Button.Root, { asChild: true, variant: "soft", tone: "neutral", size, disabled, children: /* @__PURE__ */ jsx39("span", { children: labels.browse }) })
9220
+ /* @__PURE__ */ jsx38(Button.Root, { asChild: true, variant: "soft", tone: "neutral", size, disabled, children: /* @__PURE__ */ jsx38("span", { children: labels.browse }) })
9200
9221
  ] }) })
9201
9222
  ]
9202
9223
  }
@@ -9220,7 +9241,7 @@ var FileUpload = {
9220
9241
  };
9221
9242
 
9222
9243
  // src/components/kanban/Kanban.tsx
9223
- import * as React46 from "react";
9244
+ import * as React45 from "react";
9224
9245
 
9225
9246
  // src/components/kanban/Kanban.module.css
9226
9247
  var Kanban_default = {
@@ -9246,7 +9267,7 @@ var Kanban_default = {
9246
9267
  };
9247
9268
 
9248
9269
  // src/components/kanban/Kanban.tsx
9249
- import { Fragment as Fragment8, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
9270
+ import { Fragment as Fragment7, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
9250
9271
  var defaultKanbanLabels = {
9251
9272
  count: "\u041A\u0430\u0440\u0442\u043E\u0447\u0435\u043A: {count}",
9252
9273
  countLimit: "\u041A\u0430\u0440\u0442\u043E\u0447\u0435\u043A: {count} \u0438\u0437 {limit}",
@@ -9256,12 +9277,12 @@ var defaultKanbanLabels = {
9256
9277
  };
9257
9278
  var SKELETON_CARDS = [3, 2, 1];
9258
9279
  var ITEM_SHORTCUTS = "Alt+ArrowUp Alt+ArrowDown Alt+ArrowLeft Alt+ArrowRight";
9259
- var BoardContext = React46.createContext(null);
9260
- var ItemIdContext = React46.createContext(null);
9280
+ var BoardContext = React45.createContext(null);
9281
+ var ItemIdContext = React45.createContext(null);
9261
9282
  function KanbanRoot(props) {
9262
- const outer = React46.useContext(DragControllerContext);
9263
- const board = /* @__PURE__ */ jsx40(KanbanBoard, { ...props });
9264
- return outer ? board : /* @__PURE__ */ jsx40(Dnd.Root, { children: board });
9283
+ const outer = React45.useContext(DragControllerContext);
9284
+ const board = /* @__PURE__ */ jsx39(KanbanBoard, { ...props });
9285
+ return outer ? board : /* @__PURE__ */ jsx39(Dnd.Root, { children: board });
9265
9286
  }
9266
9287
  KanbanRoot.displayName = "Kanban.Root";
9267
9288
  var EMPTY_VALUE = {};
@@ -9285,15 +9306,15 @@ function KanbanBoard({
9285
9306
  }) {
9286
9307
  const labels = { ...defaultKanbanLabels, ...labelsProp };
9287
9308
  const controller = useDragController();
9288
- const kind = `kanban-${React46.useId()}`;
9289
- const rootRef = React46.useRef(null);
9309
+ const kind = `kanban-${React45.useId()}`;
9310
+ const rootRef = React45.useRef(null);
9290
9311
  const setRootRef = useMergedRefs(rootRef, ref);
9291
- const pendingFocus = React46.useRef(null);
9312
+ const pendingFocus = React45.useRef(null);
9292
9313
  const [value, setValue] = useControllableState({
9293
9314
  value: valueProp,
9294
9315
  defaultValue: defaultValue ?? EMPTY_VALUE
9295
9316
  });
9296
- const byId = React46.useMemo(
9317
+ const byId = React45.useMemo(
9297
9318
  () => new Map(items.map((item) => [getId(item), item])),
9298
9319
  [items, getId]
9299
9320
  );
@@ -9351,7 +9372,7 @@ function KanbanBoard({
9351
9372
  })
9352
9373
  );
9353
9374
  };
9354
- React46.useLayoutEffect(() => {
9375
+ React45.useLayoutEffect(() => {
9355
9376
  const id = pendingFocus.current;
9356
9377
  if (id === null) return;
9357
9378
  pendingFocus.current = null;
@@ -9361,7 +9382,7 @@ function KanbanBoard({
9361
9382
  card?.focus({ focusVisible: true });
9362
9383
  });
9363
9384
  const context = { moveAcross, disabled: disabled || loading };
9364
- return /* @__PURE__ */ jsx40(BoardContext, { value: context, children: /* @__PURE__ */ jsx40(
9385
+ return /* @__PURE__ */ jsx39(BoardContext, { value: context, children: /* @__PURE__ */ jsx39(
9365
9386
  "div",
9366
9387
  {
9367
9388
  ref: setRootRef,
@@ -9370,7 +9391,7 @@ function KanbanBoard({
9370
9391
  className: cx(Kanban_default.root, className),
9371
9392
  "data-loading": loading || void 0,
9372
9393
  "data-disabled": disabled || void 0,
9373
- children: /* @__PURE__ */ jsx40(ScrollContainer, { axis: "horizontal", className: Kanban_default.scroller, "data-full-width": "true", children: columns.map((column, columnIndex) => /* @__PURE__ */ jsx40(
9394
+ children: /* @__PURE__ */ jsx39(ScrollContainer, { axis: "horizontal", className: Kanban_default.scroller, "data-full-width": "true", children: columns.map((column, columnIndex) => /* @__PURE__ */ jsx39(
9374
9395
  KanbanColumnView,
9375
9396
  {
9376
9397
  column,
@@ -9412,30 +9433,30 @@ function KanbanColumnView({
9412
9433
  disabled,
9413
9434
  labels
9414
9435
  }) {
9415
- const headingId = React46.useId();
9436
+ const headingId = React45.useId();
9416
9437
  const count = cards.length;
9417
9438
  const full = column.limit !== void 0 && count >= column.limit;
9418
9439
  const countText = column.limit === void 0 ? formatLabel(labels.count, { count }) : formatLabel(labels.countLimit, { count, limit: column.limit });
9419
- return /* @__PURE__ */ jsxs30("div", { className: Kanban_default.column, "data-kanban-column": column.id, "data-full": full || void 0, children: [
9420
- /* @__PURE__ */ jsx40(ControlSizeProvider, { value: "s", children: /* @__PURE__ */ jsxs30("div", { className: Kanban_default.header, children: [
9421
- /* @__PURE__ */ jsx40("h3", { id: headingId, className: Kanban_default.title, children: column.title }),
9422
- loading ? null : /* @__PURE__ */ jsxs30(Fragment8, { children: [
9423
- /* @__PURE__ */ jsx40(Badge.Root, { color: full ? "orange" : "gray", "aria-hidden": "true", children: column.limit === void 0 ? count : `${count} / ${column.limit}` }),
9424
- /* @__PURE__ */ jsx40(VisuallyHidden, { children: countText })
9440
+ return /* @__PURE__ */ jsxs29("div", { className: Kanban_default.column, "data-kanban-column": column.id, "data-full": full || void 0, children: [
9441
+ /* @__PURE__ */ jsx39(ControlSizeProvider, { value: "s", children: /* @__PURE__ */ jsxs29("div", { className: Kanban_default.header, children: [
9442
+ /* @__PURE__ */ jsx39("h3", { id: headingId, className: Kanban_default.title, children: column.title }),
9443
+ loading ? null : /* @__PURE__ */ jsxs29(Fragment7, { children: [
9444
+ /* @__PURE__ */ jsx39(Badge.Root, { color: full ? "orange" : "gray", "aria-hidden": "true", children: column.limit === void 0 ? count : `${count} / ${column.limit}` }),
9445
+ /* @__PURE__ */ jsx39(VisuallyHidden, { children: countText })
9425
9446
  ] }),
9426
- actions ? /* @__PURE__ */ jsx40("div", { className: Kanban_default.actions, children: actions }) : null
9447
+ actions ? /* @__PURE__ */ jsx39("div", { className: Kanban_default.actions, children: actions }) : null
9427
9448
  ] }) }),
9428
- /* @__PURE__ */ jsx40(ScrollContainer, { className: Kanban_default.body, children: /* @__PURE__ */ jsx40(Crossfade, { state: loading ? "loading" : "ready", className: Kanban_default.swap, children: loading ? /* @__PURE__ */ jsx40("div", { className: Kanban_default.list, children: Array.from({ length: skeletons }, (_, index) => (
9449
+ /* @__PURE__ */ jsx39(ScrollContainer, { className: Kanban_default.body, children: /* @__PURE__ */ jsx39(Crossfade, { state: loading ? "loading" : "ready", className: Kanban_default.swap, children: loading ? /* @__PURE__ */ jsx39("div", { className: Kanban_default.list, children: Array.from({ length: skeletons }, (_, index) => (
9429
9450
  // biome-ignore lint/suspicious/noArrayIndexKey: identical placeholder cards
9430
- /* @__PURE__ */ jsxs30("div", { className: cx(Kanban_default.item, Kanban_default.skeleton), "aria-hidden": "true", children: [
9431
- /* @__PURE__ */ jsx40(Skeleton, { lines: 2 }),
9432
- /* @__PURE__ */ jsxs30("div", { className: Kanban_default.footer, children: [
9433
- /* @__PURE__ */ jsx40(Skeleton, { shape: "block", className: Kanban_default.skeletonBadge }),
9434
- /* @__PURE__ */ jsx40(Skeleton, { shape: "circle", size: "s" })
9451
+ /* @__PURE__ */ jsxs29("div", { className: cx(Kanban_default.item, Kanban_default.skeleton), "aria-hidden": "true", children: [
9452
+ /* @__PURE__ */ jsx39(Skeleton, { lines: 2 }),
9453
+ /* @__PURE__ */ jsxs29("div", { className: Kanban_default.footer, children: [
9454
+ /* @__PURE__ */ jsx39(Skeleton, { shape: "block", className: Kanban_default.skeletonBadge }),
9455
+ /* @__PURE__ */ jsx39(Skeleton, { shape: "circle", size: "s" })
9435
9456
  ] })
9436
9457
  ] }, index)
9437
- )) }) : /* @__PURE__ */ jsxs30("div", { className: Kanban_default.drop, children: [
9438
- /* @__PURE__ */ jsx40(
9458
+ )) }) : /* @__PURE__ */ jsxs29("div", { className: Kanban_default.drop, children: [
9459
+ /* @__PURE__ */ jsx39(
9439
9460
  Dnd.Sortable,
9440
9461
  {
9441
9462
  as: "ul",
@@ -9448,10 +9469,10 @@ function KanbanColumnView({
9448
9469
  canDrop: accepts,
9449
9470
  disabled,
9450
9471
  onReorder,
9451
- renderItem: (item) => /* @__PURE__ */ jsx40(ItemIdContext, { value: getId(item), children: renderItem(item) })
9472
+ renderItem: (item) => /* @__PURE__ */ jsx39(ItemIdContext, { value: getId(item), children: renderItem(item) })
9452
9473
  }
9453
9474
  ),
9454
- count === 0 ? /* @__PURE__ */ jsx40(EmptyPage.Root, { layout: "compact", className: Kanban_default.empty, children: /* @__PURE__ */ jsx40(EmptyPage.Title, { as: "p", children: labels.empty }) }) : null
9475
+ count === 0 ? /* @__PURE__ */ jsx39(EmptyPage.Root, { layout: "compact", className: Kanban_default.empty, children: /* @__PURE__ */ jsx39(EmptyPage.Title, { as: "p", children: labels.empty }) }) : null
9455
9476
  ] }) }) })
9456
9477
  ] });
9457
9478
  }
@@ -9462,13 +9483,13 @@ function KanbanItem({
9462
9483
  children,
9463
9484
  ...rest
9464
9485
  }) {
9465
- const id = React46.useContext(ItemIdContext);
9466
- const board = React46.useContext(BoardContext);
9486
+ const id = React45.useContext(ItemIdContext);
9487
+ const board = React45.useContext(BoardContext);
9467
9488
  if (id === null || board === null) {
9468
9489
  throw new Error("Kanban.Item must be returned from Kanban.Root renderItem");
9469
9490
  }
9470
9491
  const locked = disabled || board.disabled;
9471
- return /* @__PURE__ */ jsx40(
9492
+ return /* @__PURE__ */ jsx39(
9472
9493
  Dnd.SortableItem,
9473
9494
  {
9474
9495
  id,
@@ -9486,29 +9507,29 @@ function KanbanItem({
9486
9507
  const towardStart = event.key === (rtl ? "ArrowRight" : "ArrowLeft");
9487
9508
  board.moveAcross(id, towardStart ? -1 : 1);
9488
9509
  },
9489
- children: /* @__PURE__ */ jsx40(ControlSizeProvider, { value: "m", children })
9510
+ children: /* @__PURE__ */ jsx39(ControlSizeProvider, { value: "m", children })
9490
9511
  }
9491
9512
  );
9492
9513
  }
9493
9514
  KanbanItem.displayName = "Kanban.Item";
9494
9515
  function KanbanItemTitle({ className, ...rest }) {
9495
- return /* @__PURE__ */ jsx40("span", { className: cx(Kanban_default.itemTitle, className), ...rest });
9516
+ return /* @__PURE__ */ jsx39("span", { className: cx(Kanban_default.itemTitle, className), ...rest });
9496
9517
  }
9497
9518
  KanbanItemTitle.displayName = "Kanban.ItemTitle";
9498
9519
  function KanbanItemDescription({ className, ...rest }) {
9499
- return /* @__PURE__ */ jsx40("span", { className: cx(Kanban_default.itemDescription, className), ...rest });
9520
+ return /* @__PURE__ */ jsx39("span", { className: cx(Kanban_default.itemDescription, className), ...rest });
9500
9521
  }
9501
9522
  KanbanItemDescription.displayName = "Kanban.ItemDescription";
9502
9523
  function KanbanItemBadges({ className, ...rest }) {
9503
- return /* @__PURE__ */ jsx40("div", { className: cx(Kanban_default.itemBadges, className), ...rest });
9524
+ return /* @__PURE__ */ jsx39("div", { className: cx(Kanban_default.itemBadges, className), ...rest });
9504
9525
  }
9505
9526
  KanbanItemBadges.displayName = "Kanban.ItemBadges";
9506
9527
  function KanbanItemFooter({ className, ...rest }) {
9507
- return /* @__PURE__ */ jsx40("div", { className: cx(Kanban_default.footer, className), ...rest });
9528
+ return /* @__PURE__ */ jsx39("div", { className: cx(Kanban_default.footer, className), ...rest });
9508
9529
  }
9509
9530
  KanbanItemFooter.displayName = "Kanban.ItemFooter";
9510
9531
  function KanbanItemCount({ className, ...rest }) {
9511
- return /* @__PURE__ */ jsx40("span", { className: cx(Kanban_default.count, className), ...rest });
9532
+ return /* @__PURE__ */ jsx39("span", { className: cx(Kanban_default.count, className), ...rest });
9512
9533
  }
9513
9534
  KanbanItemCount.displayName = "Kanban.ItemCount";
9514
9535
  var Kanban = {
@@ -9545,7 +9566,7 @@ var Typography_default = {
9545
9566
  };
9546
9567
 
9547
9568
  // src/components/typography/Typography.tsx
9548
- import { jsx as jsx41 } from "react/jsx-runtime";
9569
+ import { jsx as jsx40 } from "react/jsx-runtime";
9549
9570
  var ROLE_CLASS = {
9550
9571
  caption: textRole_default.caption,
9551
9572
  "body-s": textRole_default.bodyS,
@@ -9575,7 +9596,7 @@ function Typography({
9575
9596
  ref,
9576
9597
  ...rest
9577
9598
  }) {
9578
- return /* @__PURE__ */ jsx41(
9599
+ return /* @__PURE__ */ jsx40(
9579
9600
  Tag,
9580
9601
  {
9581
9602
  ref,
@@ -9608,7 +9629,7 @@ var LoginForm_default = {
9608
9629
  };
9609
9630
 
9610
9631
  // src/components/login-form/LoginForm.tsx
9611
- import { jsx as jsx42 } from "react/jsx-runtime";
9632
+ import { jsx as jsx41 } from "react/jsx-runtime";
9612
9633
  var TITLE_ROLE = {
9613
9634
  xs: "title-s",
9614
9635
  s: "title-m",
@@ -9640,29 +9661,31 @@ function LoginFormRoot({
9640
9661
  ref,
9641
9662
  ...rest
9642
9663
  }) {
9643
- return /* @__PURE__ */ jsx42(
9664
+ const depth = useNestedSurfaceDepth();
9665
+ return /* @__PURE__ */ jsx41(
9644
9666
  "div",
9645
9667
  {
9646
9668
  ref,
9647
9669
  ...rest,
9648
9670
  className: cx(LoginForm_default.root, className),
9671
+ "data-depth": depth,
9649
9672
  ...toDataAttributes({ size, align, flat }),
9650
- children: /* @__PURE__ */ jsx42(ControlSizeProvider, { value: size, children })
9673
+ children: /* @__PURE__ */ jsx41(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx41(ControlSizeProvider, { value: size, children }) })
9651
9674
  }
9652
9675
  );
9653
9676
  }
9654
9677
  LoginFormRoot.displayName = "LoginForm.Root";
9655
9678
  function LoginFormHeader({ className, children, ...rest }) {
9656
- return /* @__PURE__ */ jsx42("header", { className: cx(LoginForm_default.header, className), ...rest, children });
9679
+ return /* @__PURE__ */ jsx41("header", { className: cx(LoginForm_default.header, className), ...rest, children });
9657
9680
  }
9658
9681
  LoginFormHeader.displayName = "LoginForm.Header";
9659
9682
  function LoginFormLogo({ className, children, ...rest }) {
9660
- return /* @__PURE__ */ jsx42("div", { className: cx(LoginForm_default.logo, className), ...rest, children });
9683
+ return /* @__PURE__ */ jsx41("div", { className: cx(LoginForm_default.logo, className), ...rest, children });
9661
9684
  }
9662
9685
  LoginFormLogo.displayName = "LoginForm.Logo";
9663
9686
  function LoginFormTitle({ as = "h1", className, children, ...rest }) {
9664
9687
  const size = useLoginFormSize();
9665
- return /* @__PURE__ */ jsx42(
9688
+ return /* @__PURE__ */ jsx41(
9666
9689
  Typography,
9667
9690
  {
9668
9691
  as,
@@ -9676,7 +9699,7 @@ function LoginFormTitle({ as = "h1", className, children, ...rest }) {
9676
9699
  LoginFormTitle.displayName = "LoginForm.Title";
9677
9700
  function LoginFormDescription({ className, children, ...rest }) {
9678
9701
  const size = useLoginFormSize();
9679
- return /* @__PURE__ */ jsx42(
9702
+ return /* @__PURE__ */ jsx41(
9680
9703
  Typography,
9681
9704
  {
9682
9705
  as: "p",
@@ -9690,20 +9713,20 @@ function LoginFormDescription({ className, children, ...rest }) {
9690
9713
  }
9691
9714
  LoginFormDescription.displayName = "LoginForm.Description";
9692
9715
  function LoginFormBody({ className, children, ...rest }) {
9693
- return /* @__PURE__ */ jsx42("div", { className: cx(LoginForm_default.body, className), ...rest, children });
9716
+ return /* @__PURE__ */ jsx41("div", { className: cx(LoginForm_default.body, className), ...rest, children });
9694
9717
  }
9695
9718
  LoginFormBody.displayName = "LoginForm.Body";
9696
9719
  function LoginFormForm({ className, children, ref, ...rest }) {
9697
- return /* @__PURE__ */ jsx42("form", { ref, className: cx(LoginForm_default.form, className), ...rest, children });
9720
+ return /* @__PURE__ */ jsx41("form", { ref, className: cx(LoginForm_default.form, className), ...rest, children });
9698
9721
  }
9699
9722
  LoginFormForm.displayName = "LoginForm.Form";
9700
9723
  function LoginFormActions({ className, children, ...rest }) {
9701
- return /* @__PURE__ */ jsx42("div", { className: cx(LoginForm_default.actions, className), ...rest, children });
9724
+ return /* @__PURE__ */ jsx41("div", { className: cx(LoginForm_default.actions, className), ...rest, children });
9702
9725
  }
9703
9726
  LoginFormActions.displayName = "LoginForm.Actions";
9704
9727
  function LoginFormFooter({ className, children, ...rest }) {
9705
9728
  const size = useLoginFormSize();
9706
- return /* @__PURE__ */ jsx42(
9729
+ return /* @__PURE__ */ jsx41(
9707
9730
  Typography,
9708
9731
  {
9709
9732
  as: "p",
@@ -9736,7 +9759,7 @@ var NativeSelect_default = {
9736
9759
  };
9737
9760
 
9738
9761
  // src/components/native-select/NativeSelect.tsx
9739
- import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
9762
+ import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
9740
9763
  var NATIVE_SELECT_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
9741
9764
  function NativeSelect({
9742
9765
  size = "m",
@@ -9763,7 +9786,7 @@ function NativeSelect({
9763
9786
  const labels = { ...NATIVE_SELECT_LABELS, ...labelsProp };
9764
9787
  const ids = useFieldFrame(id, { hint, error, invalid }, ariaDescribedBy);
9765
9788
  const initial = defaultValue ?? (value === void 0 && placeholder ? "" : void 0);
9766
- return /* @__PURE__ */ jsx43(
9789
+ return /* @__PURE__ */ jsx42(
9767
9790
  FieldFrame,
9768
9791
  {
9769
9792
  size,
@@ -9776,8 +9799,8 @@ function NativeSelect({
9776
9799
  disabled,
9777
9800
  optionalLabel: labels.optional,
9778
9801
  className,
9779
- children: /* @__PURE__ */ jsx43(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs31("span", { className: cx(fieldTierClass, NativeSelect_default.root), ...toDataAttributes({ size }), children: [
9780
- /* @__PURE__ */ jsxs31(
9802
+ children: /* @__PURE__ */ jsx42(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs30("span", { className: cx(fieldTierClass, NativeSelect_default.root), ...toDataAttributes({ size }), children: [
9803
+ /* @__PURE__ */ jsxs30(
9781
9804
  "select",
9782
9805
  {
9783
9806
  ...rest,
@@ -9799,12 +9822,12 @@ function NativeSelect({
9799
9822
  "focus-ring": focusRing ? void 0 : false
9800
9823
  }),
9801
9824
  children: [
9802
- placeholder ? /* @__PURE__ */ jsx43("option", { value: "", children: placeholder }) : null,
9825
+ placeholder ? /* @__PURE__ */ jsx42("option", { value: "", children: placeholder }) : null,
9803
9826
  children
9804
9827
  ]
9805
9828
  }
9806
9829
  ),
9807
- /* @__PURE__ */ jsx43("span", { className: NativeSelect_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ jsx43(Icon, { name: "nav.chevronDown" }) })
9830
+ /* @__PURE__ */ jsx42("span", { className: NativeSelect_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ jsx42(Icon, { name: "nav.chevronDown" }) })
9808
9831
  ] }) })
9809
9832
  }
9810
9833
  );
@@ -9812,7 +9835,7 @@ function NativeSelect({
9812
9835
  NativeSelect.displayName = "NativeSelect";
9813
9836
 
9814
9837
  // src/components/notification/Notification.tsx
9815
- import * as React47 from "react";
9838
+ import * as React46 from "react";
9816
9839
 
9817
9840
  // src/components/notification/Notification.module.css
9818
9841
  var Notification_default = {
@@ -9839,7 +9862,7 @@ var Notification_default = {
9839
9862
  };
9840
9863
 
9841
9864
  // src/components/notification/Notification.tsx
9842
- import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
9865
+ import { jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
9843
9866
  var NOTIFICATION_LABELS = {
9844
9867
  close: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435",
9845
9868
  regionTopLeft: "\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u0435\u0440\u0445\u0443 \u0441\u043B\u0435\u0432\u0430",
@@ -9857,7 +9880,7 @@ var REGION_LABEL_KEY = {
9857
9880
  "bottom-center": "regionBottomCenter",
9858
9881
  "bottom-right": "regionBottomRight"
9859
9882
  };
9860
- var NotificationLabelsContext = React47.createContext(NOTIFICATION_LABELS);
9883
+ var NotificationLabelsContext = React46.createContext(NOTIFICATION_LABELS);
9861
9884
  var TONE_ICON = {
9862
9885
  info: "status.info",
9863
9886
  success: "status.success",
@@ -9885,15 +9908,16 @@ function CardView({
9885
9908
  stackExpanded = false,
9886
9909
  ...rest
9887
9910
  }) {
9888
- const labels = React47.useContext(NotificationLabelsContext);
9911
+ const labels = React46.useContext(NotificationLabelsContext);
9889
9912
  const liveRole = tone === "danger" || tone === "warning" ? "alert" : "status";
9890
- return /* @__PURE__ */ jsxs32(
9913
+ return /* @__PURE__ */ jsxs31(
9891
9914
  "article",
9892
9915
  {
9893
9916
  ...rest,
9894
9917
  className: cx(Notification_default.card, className),
9895
9918
  role: liveRole,
9896
9919
  "aria-live": liveRole === "alert" ? "assertive" : "polite",
9920
+ "data-depth": "floating",
9897
9921
  ...toDataAttributes({
9898
9922
  tone,
9899
9923
  size,
@@ -9902,14 +9926,14 @@ function CardView({
9902
9926
  "stack-expanded": stackExpanded
9903
9927
  }),
9904
9928
  children: [
9905
- /* @__PURE__ */ jsx44("div", { className: Notification_default.iconWrap, "aria-hidden": "true", children: icon ?? /* @__PURE__ */ jsx44(Icon, { name: TONE_ICON[tone] }) }),
9906
- /* @__PURE__ */ jsxs32("div", { className: Notification_default.content, children: [
9907
- /* @__PURE__ */ jsxs32("header", { className: Notification_default.header, children: [
9908
- /* @__PURE__ */ jsx44("p", { className: Notification_default.title, children: title }),
9909
- badge !== void 0 ? /* @__PURE__ */ jsx44(Badge.Root, { size: "xs", color: TONE_BADGE_COLOR[tone], children: badge }) : null
9929
+ /* @__PURE__ */ jsx43("div", { className: Notification_default.iconWrap, "aria-hidden": "true", children: icon ?? /* @__PURE__ */ jsx43(Icon, { name: TONE_ICON[tone] }) }),
9930
+ /* @__PURE__ */ jsxs31("div", { className: Notification_default.content, children: [
9931
+ /* @__PURE__ */ jsxs31("header", { className: Notification_default.header, children: [
9932
+ /* @__PURE__ */ jsx43("p", { className: Notification_default.title, children: title }),
9933
+ badge !== void 0 ? /* @__PURE__ */ jsx43(Badge.Root, { size: "xs", color: TONE_BADGE_COLOR[tone], children: badge }) : null
9910
9934
  ] }),
9911
- description ? /* @__PURE__ */ jsx44("p", { className: Notification_default.description, children: description }) : null,
9912
- action ? /* @__PURE__ */ jsx44("div", { className: Notification_default.actionRow, children: /* @__PURE__ */ jsx44(
9935
+ description ? /* @__PURE__ */ jsx43("p", { className: Notification_default.description, children: description }) : null,
9936
+ action ? /* @__PURE__ */ jsx43("div", { className: Notification_default.actionRow, children: /* @__PURE__ */ jsx43(
9913
9937
  Button.Root,
9914
9938
  {
9915
9939
  variant: "soft",
@@ -9920,7 +9944,7 @@ function CardView({
9920
9944
  }
9921
9945
  ) }) : null
9922
9946
  ] }),
9923
- onClose ? /* @__PURE__ */ jsx44(
9947
+ onClose ? /* @__PURE__ */ jsx43(
9924
9948
  Button.Root,
9925
9949
  {
9926
9950
  variant: "ghost",
@@ -9928,10 +9952,10 @@ function CardView({
9928
9952
  size: stepDown(size, 2),
9929
9953
  "aria-label": labels.close,
9930
9954
  onClick: onClose,
9931
- children: /* @__PURE__ */ jsx44(Button.Icon, { children: /* @__PURE__ */ jsx44(Icon, { name: "action.close" }) })
9955
+ children: /* @__PURE__ */ jsx43(Button.Icon, { children: /* @__PURE__ */ jsx43(Icon, { name: "action.close" }) })
9932
9956
  }
9933
9957
  ) : null,
9934
- countdown ? /* @__PURE__ */ jsx44("div", { className: Notification_default.progressTrack, "aria-hidden": "true", children: /* @__PURE__ */ jsx44(
9958
+ countdown ? /* @__PURE__ */ jsx43("div", { className: Notification_default.progressTrack, "aria-hidden": "true", children: /* @__PURE__ */ jsx43(
9935
9959
  "span",
9936
9960
  {
9937
9961
  className: Notification_default.progressValue,
@@ -9949,14 +9973,14 @@ function CardView({
9949
9973
  );
9950
9974
  }
9951
9975
  function NotificationCard({ onDismiss, ...props }) {
9952
- return /* @__PURE__ */ jsx44(CardView, { ...props, onClose: onDismiss });
9976
+ return /* @__PURE__ */ jsx43(CardView, { ...props, onClose: onDismiss });
9953
9977
  }
9954
9978
  function subscribeVisibility(listener) {
9955
9979
  document.addEventListener("visibilitychange", listener);
9956
9980
  return () => document.removeEventListener("visibilitychange", listener);
9957
9981
  }
9958
9982
  function useDocumentHidden() {
9959
- return React47.useSyncExternalStore(
9983
+ return React46.useSyncExternalStore(
9960
9984
  subscribeVisibility,
9961
9985
  () => document.visibilityState === "hidden",
9962
9986
  () => false
@@ -9965,7 +9989,7 @@ function useDocumentHidden() {
9965
9989
  function ToastCard({ item, paused, onDismiss, stackDepth, stackExpanded }) {
9966
9990
  const hidden = useDocumentHidden();
9967
9991
  const timed = !item.persistent && item.duration > 0;
9968
- return /* @__PURE__ */ jsx44(
9992
+ return /* @__PURE__ */ jsx43(
9969
9993
  CardView,
9970
9994
  {
9971
9995
  tone: item.tone,
@@ -9984,8 +10008,8 @@ function ToastCard({ item, paused, onDismiss, stackDepth, stackExpanded }) {
9984
10008
  }
9985
10009
 
9986
10010
  // src/components/notification/NotificationStore.tsx
9987
- import * as React48 from "react";
9988
- import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
10011
+ import * as React47 from "react";
10012
+ import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
9989
10013
  var DEFAULT_DURATION = 5e3;
9990
10014
  var PEEK_VISIBLE = 3;
9991
10015
  var SCALE_STEP = 0.05;
@@ -10017,7 +10041,7 @@ var POSITIONS = [
10017
10041
  "bottom-right"
10018
10042
  ];
10019
10043
  var TONES = ["success", "danger", "warning", "info"];
10020
- var StoreContext = React48.createContext(null);
10044
+ var StoreContext = React47.createContext(null);
10021
10045
  function newId() {
10022
10046
  return globalThis.crypto?.randomUUID?.() ?? `ntf-${Date.now()}-${Math.random().toString(16).slice(2)}`;
10023
10047
  }
@@ -10031,17 +10055,17 @@ function NotificationStack({
10031
10055
  onDismiss,
10032
10056
  onExited
10033
10057
  }) {
10034
- const labels = React48.useContext(NotificationLabelsContext);
10035
- const [expanded, setExpanded] = React48.useState(false);
10036
- const [heights, setHeights] = React48.useState({});
10037
- const collapseTimerRef = React48.useRef(null);
10038
- const lastLayoutRef = React48.useRef(/* @__PURE__ */ new Map());
10039
- const listRef = React48.useRef(null);
10040
- const hoveredRef = React48.useRef(false);
10041
- const focusedRef = React48.useRef(false);
10058
+ const labels = React47.useContext(NotificationLabelsContext);
10059
+ const [expanded, setExpanded] = React47.useState(false);
10060
+ const [heights, setHeights] = React47.useState({});
10061
+ const collapseTimerRef = React47.useRef(null);
10062
+ const lastLayoutRef = React47.useRef(/* @__PURE__ */ new Map());
10063
+ const listRef = React47.useRef(null);
10064
+ const hoveredRef = React47.useRef(false);
10065
+ const focusedRef = React47.useRef(false);
10042
10066
  const top = isTop(position);
10043
- const step = React48.useMemo(space2Px, []);
10044
- const syncExpanded = React48.useCallback(() => {
10067
+ const step = React47.useMemo(space2Px, []);
10068
+ const syncExpanded = React47.useCallback(() => {
10045
10069
  if (collapseTimerRef.current !== null) {
10046
10070
  clearTimeout(collapseTimerRef.current);
10047
10071
  collapseTimerRef.current = null;
@@ -10052,29 +10076,29 @@ function NotificationStack({
10052
10076
  collapseTimerRef.current = window.setTimeout(() => setExpanded(false), COLLAPSE_DELAY_MS);
10053
10077
  }
10054
10078
  }, []);
10055
- const handleHover = React48.useCallback(
10079
+ const handleHover = React47.useCallback(
10056
10080
  (hovered) => {
10057
10081
  hoveredRef.current = hovered;
10058
10082
  syncExpanded();
10059
10083
  },
10060
10084
  [syncExpanded]
10061
10085
  );
10062
- React48.useLayoutEffect(() => {
10086
+ React47.useLayoutEffect(() => {
10063
10087
  if (!focusedRef.current) return;
10064
10088
  if (listRef.current?.contains(document.activeElement)) return;
10065
10089
  focusedRef.current = false;
10066
10090
  syncExpanded();
10067
10091
  });
10068
- React48.useEffect(
10092
+ React47.useEffect(
10069
10093
  () => () => {
10070
10094
  if (collapseTimerRef.current !== null) clearTimeout(collapseTimerRef.current);
10071
10095
  },
10072
10096
  []
10073
10097
  );
10074
- const reportHeight = React48.useCallback((id, height) => {
10098
+ const reportHeight = React47.useCallback((id, height) => {
10075
10099
  setHeights((prev) => prev[id] === height ? prev : { ...prev, [id]: height });
10076
10100
  }, []);
10077
- React48.useEffect(() => {
10101
+ React47.useEffect(() => {
10078
10102
  setHeights((prev) => {
10079
10103
  const ids = new Set(items.map((n) => n.id));
10080
10104
  const stale = Object.keys(prev).filter((id) => !ids.has(id));
@@ -10101,14 +10125,14 @@ function NotificationStack({
10101
10125
  });
10102
10126
  const frontHeight = active.length > 0 ? heights[active[0].id] ?? 0 : 0;
10103
10127
  const stackHeight = active.length === 0 ? 0 : expanded ? flowHeight - step : frontHeight + Math.min(active.length - 1, PEEK_VISIBLE - 1) * step;
10104
- React48.useLayoutEffect(() => {
10128
+ React47.useLayoutEffect(() => {
10105
10129
  for (const [id, layout] of layouts) lastLayoutRef.current.set(id, layout);
10106
10130
  const ids = new Set(items.map((n) => n.id));
10107
10131
  for (const id of lastLayoutRef.current.keys()) {
10108
10132
  if (!ids.has(id)) lastLayoutRef.current.delete(id);
10109
10133
  }
10110
10134
  });
10111
- return /* @__PURE__ */ jsx45(
10135
+ return /* @__PURE__ */ jsx44(
10112
10136
  "ol",
10113
10137
  {
10114
10138
  ref: listRef,
@@ -10130,7 +10154,7 @@ function NotificationStack({
10130
10154
  children: items.map((item) => {
10131
10155
  const closing = item.dismissing === true;
10132
10156
  const layout = layouts.get(item.id) ?? lastLayoutRef.current.get(item.id) ?? RESTING_LAYOUT;
10133
- return /* @__PURE__ */ jsx45(
10157
+ return /* @__PURE__ */ jsx44(
10134
10158
  NotificationStackItem,
10135
10159
  {
10136
10160
  item,
@@ -10152,7 +10176,7 @@ function NotificationStack({
10152
10176
  }
10153
10177
  );
10154
10178
  }
10155
- var NotificationStackItem = React48.memo(function NotificationStackItem2({
10179
+ var NotificationStackItem = React47.memo(function NotificationStackItem2({
10156
10180
  item,
10157
10181
  position,
10158
10182
  index,
@@ -10166,9 +10190,9 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
10166
10190
  onExited,
10167
10191
  onHeight
10168
10192
  }) {
10169
- const ref = React48.useRef(null);
10193
+ const ref = React47.useRef(null);
10170
10194
  const { id } = item;
10171
- React48.useLayoutEffect(() => {
10195
+ React47.useLayoutEffect(() => {
10172
10196
  const el = ref.current;
10173
10197
  if (!el) return;
10174
10198
  onHeight(id, el.offsetHeight);
@@ -10179,10 +10203,10 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
10179
10203
  }, [id, onHeight]);
10180
10204
  const state = closing ? "closed" : "open";
10181
10205
  const { axis, sign } = swipeDirection(position);
10182
- const dragRef = React48.useRef(
10206
+ const dragRef = React47.useRef(
10183
10207
  null
10184
10208
  );
10185
- const [swiping, setSwiping] = React48.useState(false);
10209
+ const [swiping, setSwiping] = React47.useState(false);
10186
10210
  const swipeAmount = (client, origin) => {
10187
10211
  const toward = (client - origin) * sign;
10188
10212
  if (toward >= 0) return toward;
@@ -10233,7 +10257,7 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
10233
10257
  if (amount === 0 || prefersReducedMotion()) delete el.dataset.swipe;
10234
10258
  else el.dataset.swipe = "return";
10235
10259
  };
10236
- return /* @__PURE__ */ jsx45(
10260
+ return /* @__PURE__ */ jsx44(
10237
10261
  "li",
10238
10262
  {
10239
10263
  ref,
@@ -10247,7 +10271,7 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
10247
10271
  "--ntf-opacity": opacity,
10248
10272
  zIndex: Z_FRONT - index
10249
10273
  },
10250
- children: /* @__PURE__ */ jsx45(
10274
+ children: /* @__PURE__ */ jsx44(
10251
10275
  "div",
10252
10276
  {
10253
10277
  className: Notification_default.motion,
@@ -10264,7 +10288,7 @@ var NotificationStackItem = React48.memo(function NotificationStackItem2({
10264
10288
  delete event.currentTarget.dataset.swipe;
10265
10289
  }
10266
10290
  },
10267
- children: /* @__PURE__ */ jsx45(
10291
+ children: /* @__PURE__ */ jsx44(
10268
10292
  ToastCard,
10269
10293
  {
10270
10294
  item,
@@ -10284,7 +10308,7 @@ function NotificationToaster({
10284
10308
  onDismiss,
10285
10309
  onExited
10286
10310
  }) {
10287
- const grouped = React48.useMemo(() => {
10311
+ const grouped = React47.useMemo(() => {
10288
10312
  const map = /* @__PURE__ */ new Map();
10289
10313
  for (const entry of entries) {
10290
10314
  if (!map.has(entry.position)) map.set(entry.position, /* @__PURE__ */ new Map());
@@ -10300,18 +10324,18 @@ function NotificationToaster({
10300
10324
  }
10301
10325
  return map;
10302
10326
  }, [entries]);
10303
- return /* @__PURE__ */ jsx45(Portal, { children: /* @__PURE__ */ jsx45("div", { className: Notification_default.viewport, ...{ [LIVE_REGION_ATTR]: "" }, children: POSITIONS.map((pos) => {
10327
+ return /* @__PURE__ */ jsx44(Portal, { children: /* @__PURE__ */ jsx44("div", { className: Notification_default.viewport, ...{ [LIVE_REGION_ATTR]: "" }, children: POSITIONS.map((pos) => {
10304
10328
  const byTone = grouped.get(pos);
10305
10329
  if (!byTone?.size) return null;
10306
10330
  const [vertical, horizontal] = pos.split("-");
10307
10331
  const stacks = TONES.map((tone) => ({ tone, items: byTone.get(tone) ?? [] })).filter(
10308
10332
  (s) => s.items.length > 0
10309
10333
  );
10310
- return /* @__PURE__ */ jsx45(
10334
+ return /* @__PURE__ */ jsx44(
10311
10335
  "section",
10312
10336
  {
10313
10337
  className: `${Notification_default.zone} ${Notification_default[vertical]} ${Notification_default[horizontal]}`,
10314
- children: stacks.map((s) => /* @__PURE__ */ jsx45(
10338
+ children: stacks.map((s) => /* @__PURE__ */ jsx44(
10315
10339
  NotificationStack,
10316
10340
  {
10317
10341
  position: pos,
@@ -10332,22 +10356,22 @@ function NotificationProvider({
10332
10356
  max = 5,
10333
10357
  labels: labelsProp
10334
10358
  }) {
10335
- const labels = React48.useMemo(
10359
+ const labels = React47.useMemo(
10336
10360
  () => ({ ...NOTIFICATION_LABELS, ...labelsProp }),
10337
10361
  [labelsProp]
10338
10362
  );
10339
- const [entries, setEntries] = React48.useState([]);
10340
- const entriesRef = React48.useRef(entries);
10363
+ const [entries, setEntries] = React47.useState([]);
10364
+ const entriesRef = React47.useRef(entries);
10341
10365
  entriesRef.current = entries;
10342
- const exitTimersRef = React48.useRef(/* @__PURE__ */ new Map());
10343
- React48.useEffect(() => {
10366
+ const exitTimersRef = React47.useRef(/* @__PURE__ */ new Map());
10367
+ React47.useEffect(() => {
10344
10368
  const timers = exitTimersRef.current;
10345
10369
  return () => {
10346
10370
  for (const timer of timers.values()) clearTimeout(timer);
10347
10371
  timers.clear();
10348
10372
  };
10349
10373
  }, []);
10350
- const remove = React48.useCallback((id) => {
10374
+ const remove = React47.useCallback((id) => {
10351
10375
  const timer = exitTimersRef.current.get(id);
10352
10376
  if (timer !== void 0) {
10353
10377
  clearTimeout(timer);
@@ -10355,7 +10379,7 @@ function NotificationProvider({
10355
10379
  }
10356
10380
  setEntries((prev) => prev.filter((n) => n.id !== id));
10357
10381
  }, []);
10358
- const startExit = React48.useCallback(
10382
+ const startExit = React47.useCallback(
10359
10383
  (ids) => {
10360
10384
  if (ids.length === 0) return;
10361
10385
  const target = new Set(ids);
@@ -10382,12 +10406,12 @@ function NotificationProvider({
10382
10406
  },
10383
10407
  [remove]
10384
10408
  );
10385
- const dismiss = React48.useCallback((id) => startExit([id]), [startExit]);
10386
- const dismissAll = React48.useCallback(
10409
+ const dismiss = React47.useCallback((id) => startExit([id]), [startExit]);
10410
+ const dismissAll = React47.useCallback(
10387
10411
  () => startExit(entriesRef.current.filter((n) => !n.dismissing).map((n) => n.id)),
10388
10412
  [startExit]
10389
10413
  );
10390
- const notify = React48.useCallback(
10414
+ const notify = React47.useCallback(
10391
10415
  (options) => {
10392
10416
  const id = newId();
10393
10417
  const record = {
@@ -10414,24 +10438,24 @@ function NotificationProvider({
10414
10438
  },
10415
10439
  [position, max]
10416
10440
  );
10417
- const publicItems = React48.useMemo(() => entries.filter((n) => !n.dismissing), [entries]);
10418
- const value = React48.useMemo(
10441
+ const publicItems = React47.useMemo(() => entries.filter((n) => !n.dismissing), [entries]);
10442
+ const value = React47.useMemo(
10419
10443
  () => ({ items: publicItems, notify, dismiss, dismissAll }),
10420
10444
  [publicItems, notify, dismiss, dismissAll]
10421
10445
  );
10422
- return /* @__PURE__ */ jsx45(StoreContext.Provider, { value, children: /* @__PURE__ */ jsxs33(NotificationLabelsContext.Provider, { value: labels, children: [
10446
+ return /* @__PURE__ */ jsx44(StoreContext.Provider, { value, children: /* @__PURE__ */ jsxs32(NotificationLabelsContext.Provider, { value: labels, children: [
10423
10447
  children,
10424
- /* @__PURE__ */ jsx45(NotificationToaster, { entries, onDismiss: dismiss, onExited: remove })
10448
+ /* @__PURE__ */ jsx44(NotificationToaster, { entries, onDismiss: dismiss, onExited: remove })
10425
10449
  ] }) });
10426
10450
  }
10427
10451
  function useNotifications() {
10428
- const ctx = React48.useContext(StoreContext);
10452
+ const ctx = React47.useContext(StoreContext);
10429
10453
  if (!ctx) throw new Error("useNotifications must be used within NotificationProvider");
10430
10454
  return ctx;
10431
10455
  }
10432
10456
 
10433
10457
  // src/components/page-content/PageContent.tsx
10434
- import * as React49 from "react";
10458
+ import * as React48 from "react";
10435
10459
 
10436
10460
  // src/components/page-content/PageContent.module.css
10437
10461
  var PageContent_default = {
@@ -10446,9 +10470,9 @@ var PageContent_default = {
10446
10470
  };
10447
10471
 
10448
10472
  // src/components/page-content/PageContent.tsx
10449
- import { jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
10473
+ import { jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
10450
10474
  function PageContentRoot({ maxWidth = "full", className, ...rest }) {
10451
- return /* @__PURE__ */ jsx46(
10475
+ return /* @__PURE__ */ jsx45(
10452
10476
  "div",
10453
10477
  {
10454
10478
  className: cx(PageContent_default.root, className),
@@ -10459,25 +10483,25 @@ function PageContentRoot({ maxWidth = "full", className, ...rest }) {
10459
10483
  }
10460
10484
  PageContentRoot.displayName = "PageContent.Root";
10461
10485
  function PageContentSection({ className, ...rest }) {
10462
- return /* @__PURE__ */ jsx46("section", { className: cx(PageContent_default.section, className), ...rest });
10486
+ return /* @__PURE__ */ jsx45("section", { className: cx(PageContent_default.section, className), ...rest });
10463
10487
  }
10464
10488
  PageContentSection.displayName = "PageContent.Section";
10465
10489
  function PageContentActions({ className, ...rest }) {
10466
- return /* @__PURE__ */ jsx46("div", { className: cx(PageContent_default.actions, className), ...rest });
10490
+ return /* @__PURE__ */ jsx45("div", { className: cx(PageContent_default.actions, className), ...rest });
10467
10491
  }
10468
10492
  PageContentActions.displayName = "PageContent.Actions";
10469
10493
  function PageContentHeader({ className, children, ...rest }) {
10470
- const items = React49.Children.toArray(children);
10471
- const isActions = (child) => React49.isValidElement(child) && child.type === PageContentActions;
10494
+ const items = React48.Children.toArray(children);
10495
+ const isActions = (child) => React48.isValidElement(child) && child.type === PageContentActions;
10472
10496
  const actions = items.filter(isActions);
10473
- return /* @__PURE__ */ jsxs34(
10497
+ return /* @__PURE__ */ jsxs33(
10474
10498
  "div",
10475
10499
  {
10476
10500
  className: cx(PageContent_default.header, className),
10477
10501
  "data-has-actions": actions.length > 0 ? "true" : void 0,
10478
10502
  ...rest,
10479
10503
  children: [
10480
- /* @__PURE__ */ jsx46("div", { className: PageContent_default.heading, children: items.filter((child) => !isActions(child)) }),
10504
+ /* @__PURE__ */ jsx45("div", { className: PageContent_default.heading, children: items.filter((child) => !isActions(child)) }),
10481
10505
  actions
10482
10506
  ]
10483
10507
  }
@@ -10485,7 +10509,7 @@ function PageContentHeader({ className, children, ...rest }) {
10485
10509
  }
10486
10510
  PageContentHeader.displayName = "PageContent.Header";
10487
10511
  function PageContentTitle({ className, ...rest }) {
10488
- return /* @__PURE__ */ jsx46("h1", { className: cx(PageContent_default.title, className), ...rest });
10512
+ return /* @__PURE__ */ jsx45("h1", { className: cx(PageContent_default.title, className), ...rest });
10489
10513
  }
10490
10514
  PageContentTitle.displayName = "PageContent.Title";
10491
10515
  function PageContentDescription({
@@ -10493,7 +10517,7 @@ function PageContentDescription({
10493
10517
  measure = "readable",
10494
10518
  ...rest
10495
10519
  }) {
10496
- return /* @__PURE__ */ jsx46(
10520
+ return /* @__PURE__ */ jsx45(
10497
10521
  "p",
10498
10522
  {
10499
10523
  className: cx(PageContent_default.description, className),
@@ -10504,7 +10528,7 @@ function PageContentDescription({
10504
10528
  }
10505
10529
  PageContentDescription.displayName = "PageContent.Description";
10506
10530
  function PageContentBody({ className, ...rest }) {
10507
- return /* @__PURE__ */ jsx46("div", { className: cx(PageContent_default.body, className), ...rest });
10531
+ return /* @__PURE__ */ jsx45("div", { className: cx(PageContent_default.body, className), ...rest });
10508
10532
  }
10509
10533
  PageContentBody.displayName = "PageContent.Body";
10510
10534
  var PageContent = {
@@ -10518,7 +10542,7 @@ var PageContent = {
10518
10542
  };
10519
10543
 
10520
10544
  // src/components/page-toolbar/PageToolbar.tsx
10521
- import * as React50 from "react";
10545
+ import * as React49 from "react";
10522
10546
 
10523
10547
  // src/components/page-toolbar/PageToolbar.module.css
10524
10548
  var PageToolbar_default = {
@@ -10533,37 +10557,37 @@ var PageToolbar_default = {
10533
10557
  };
10534
10558
 
10535
10559
  // src/components/page-toolbar/PageToolbar.tsx
10536
- import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
10560
+ import { jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
10537
10561
  function PageToolbarRoot({ className, children, ref, ...rest }) {
10538
- const items = React50.Children.toArray(children);
10539
- const isChips = (child) => React50.isValidElement(child) && child.type === PageToolbarChips;
10540
- return /* @__PURE__ */ jsxs35("div", { ...rest, ref, className: cx(PageToolbar_default.root, className), children: [
10541
- /* @__PURE__ */ jsxs35("div", { className: PageToolbar_default.bar, children: [
10562
+ const items = React49.Children.toArray(children);
10563
+ const isChips = (child) => React49.isValidElement(child) && child.type === PageToolbarChips;
10564
+ return /* @__PURE__ */ jsxs34("div", { ...rest, ref, className: cx(PageToolbar_default.root, className), children: [
10565
+ /* @__PURE__ */ jsxs34("div", { className: PageToolbar_default.bar, children: [
10542
10566
  items.filter((child) => !isChips(child)),
10543
- /* @__PURE__ */ jsx47("span", { className: PageToolbar_default.break, "aria-hidden": "true" })
10567
+ /* @__PURE__ */ jsx46("span", { className: PageToolbar_default.break, "aria-hidden": "true" })
10544
10568
  ] }),
10545
10569
  items.filter(isChips)
10546
10570
  ] });
10547
10571
  }
10548
10572
  PageToolbarRoot.displayName = "PageToolbar.Root";
10549
10573
  function PageToolbarSections({ className, ...rest }) {
10550
- return /* @__PURE__ */ jsx47("div", { ...rest, className: cx(PageToolbar_default.sections, className) });
10574
+ return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.sections, className) });
10551
10575
  }
10552
10576
  PageToolbarSections.displayName = "PageToolbar.Sections";
10553
10577
  function PageToolbarTools({ className, ...rest }) {
10554
- return /* @__PURE__ */ jsx47("div", { ...rest, className: cx(PageToolbar_default.tools, className) });
10578
+ return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.tools, className) });
10555
10579
  }
10556
10580
  PageToolbarTools.displayName = "PageToolbar.Tools";
10557
10581
  function PageToolbarView({ className, ...rest }) {
10558
- return /* @__PURE__ */ jsx47("div", { ...rest, className: cx(PageToolbar_default.view, className) });
10582
+ return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.view, className) });
10559
10583
  }
10560
10584
  PageToolbarView.displayName = "PageToolbar.View";
10561
10585
  function PageToolbarActions({ className, ...rest }) {
10562
- return /* @__PURE__ */ jsx47("div", { ...rest, className: cx(PageToolbar_default.actions, className) });
10586
+ return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.actions, className) });
10563
10587
  }
10564
10588
  PageToolbarActions.displayName = "PageToolbar.Actions";
10565
10589
  function PageToolbarChips({ className, ...rest }) {
10566
- return /* @__PURE__ */ jsx47("div", { ...rest, className: cx(PageToolbar_default.chips, className) });
10590
+ return /* @__PURE__ */ jsx46("div", { ...rest, className: cx(PageToolbar_default.chips, className) });
10567
10591
  }
10568
10592
  PageToolbarChips.displayName = "PageToolbar.Chips";
10569
10593
  var PageToolbar = {
@@ -10576,7 +10600,7 @@ var PageToolbar = {
10576
10600
  };
10577
10601
 
10578
10602
  // src/components/progress-circle/ProgressCircle.tsx
10579
- import * as React51 from "react";
10603
+ import * as React50 from "react";
10580
10604
 
10581
10605
  // src/components/progress-circle/ProgressCircle.module.css
10582
10606
  var ProgressCircle_default = {
@@ -10593,7 +10617,7 @@ var ProgressCircle_default = {
10593
10617
  };
10594
10618
 
10595
10619
  // src/components/progress-circle/ProgressCircle.tsx
10596
- import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
10620
+ import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
10597
10621
  var STROKE = 100 / 12;
10598
10622
  var RADIUS = 50 - STROKE / 2;
10599
10623
  var CIRCUMFERENCE = 2 * Math.PI * RADIUS;
@@ -10606,10 +10630,10 @@ function arcStyle(start, length) {
10606
10630
  };
10607
10631
  }
10608
10632
  function Ring(props) {
10609
- return /* @__PURE__ */ jsx48("circle", { cx: 50, cy: 50, r: RADIUS, strokeWidth: STROKE, ...props });
10633
+ return /* @__PURE__ */ jsx47("circle", { cx: 50, cy: 50, r: RADIUS, strokeWidth: STROKE, ...props });
10610
10634
  }
10611
10635
  function Cap({ position, tone }) {
10612
- return /* @__PURE__ */ jsx48(
10636
+ return /* @__PURE__ */ jsx47(
10613
10637
  "circle",
10614
10638
  {
10615
10639
  cx: 50 + RADIUS,
@@ -10628,7 +10652,7 @@ function SegmentArcs({
10628
10652
  }) {
10629
10653
  if (gap === "hairline" && arcs.length > 1) {
10630
10654
  const inset = (STROKE + HAIRLINE_GAP) / 2;
10631
- return /* @__PURE__ */ jsx48(Fragment9, { children: arcs.map((a, i) => /* @__PURE__ */ jsx48(
10655
+ return /* @__PURE__ */ jsx47(Fragment8, { children: arcs.map((a, i) => /* @__PURE__ */ jsx47(
10632
10656
  Ring,
10633
10657
  {
10634
10658
  className: a.rest ? ProgressCircle_default.restRound : ProgressCircle_default.segmentRound,
@@ -10641,8 +10665,8 @@ function SegmentArcs({
10641
10665
  const parts = arcs.filter((a) => !a.rest);
10642
10666
  const first = parts[0];
10643
10667
  const last = parts[parts.length - 1];
10644
- return /* @__PURE__ */ jsxs36(Fragment9, { children: [
10645
- parts.map((a, i) => /* @__PURE__ */ jsx48(
10668
+ return /* @__PURE__ */ jsxs35(Fragment8, { children: [
10669
+ parts.map((a, i) => /* @__PURE__ */ jsx47(
10646
10670
  Ring,
10647
10671
  {
10648
10672
  className: ProgressCircle_default.segment,
@@ -10651,9 +10675,9 @@ function SegmentArcs({
10651
10675
  },
10652
10676
  i
10653
10677
  )),
10654
- first && last && !closed ? /* @__PURE__ */ jsxs36(Fragment9, { children: [
10655
- /* @__PURE__ */ jsx48(Cap, { position: first.start, tone: first.tone }),
10656
- /* @__PURE__ */ jsx48(Cap, { position: last.start + last.length, tone: last.tone })
10678
+ first && last && !closed ? /* @__PURE__ */ jsxs35(Fragment8, { children: [
10679
+ /* @__PURE__ */ jsx47(Cap, { position: first.start, tone: first.tone }),
10680
+ /* @__PURE__ */ jsx47(Cap, { position: last.start + last.length, tone: last.tone })
10657
10681
  ] }) : null
10658
10682
  ] });
10659
10683
  }
@@ -10671,7 +10695,7 @@ function ProgressCircle(props) {
10671
10695
  labels,
10672
10696
  ...rest
10673
10697
  } = props;
10674
- const descriptionId = React51.useId();
10698
+ const descriptionId = React50.useId();
10675
10699
  const showInner = children != null && children !== false && !SIZES_WITHOUT_INNER.has(size);
10676
10700
  const valueText = typeof children === "string" || typeof children === "number" ? String(children) : void 0;
10677
10701
  let tone;
@@ -10698,9 +10722,9 @@ function ProgressCircle(props) {
10698
10722
  }
10699
10723
  if (free > 0 && total > 0) arcs.push({ start: cursor, length: free * unit, rest: true });
10700
10724
  const a11y = label ? { "aria-label": label, "aria-describedby": descriptionId } : { "aria-label": text };
10701
- if (label) description = /* @__PURE__ */ jsx48(VisuallyHidden, { id: descriptionId, children: text });
10725
+ if (label) description = /* @__PURE__ */ jsx47(VisuallyHidden, { id: descriptionId, children: text });
10702
10726
  svg = // biome-ignore lint/a11y/useSemanticElements: a distribution is a group of parts, not a fieldset
10703
- /* @__PURE__ */ jsx48(
10727
+ /* @__PURE__ */ jsx47(
10704
10728
  "svg",
10705
10729
  {
10706
10730
  viewBox: "0 0 100 100",
@@ -10708,16 +10732,16 @@ function ProgressCircle(props) {
10708
10732
  role: "group",
10709
10733
  ...a11y,
10710
10734
  ...toDataAttributes({ "segment-gap": gap }),
10711
- children: /* @__PURE__ */ jsxs36("g", { className: ProgressCircle_default.arcs, children: [
10712
- gap === "none" || total === 0 ? /* @__PURE__ */ jsx48(Ring, { className: ProgressCircle_default.track }) : null,
10713
- total > 0 ? /* @__PURE__ */ jsx48(SegmentArcs, { arcs, gap, closed: free === 0 }) : null
10735
+ children: /* @__PURE__ */ jsxs35("g", { className: ProgressCircle_default.arcs, children: [
10736
+ gap === "none" || total === 0 ? /* @__PURE__ */ jsx47(Ring, { className: ProgressCircle_default.track }) : null,
10737
+ total > 0 ? /* @__PURE__ */ jsx47(SegmentArcs, { arcs, gap, closed: free === 0 }) : null
10714
10738
  ] })
10715
10739
  }
10716
10740
  );
10717
10741
  } else {
10718
10742
  const { value, max, ratio } = resolveValue(valueProp ?? 0, maxProp);
10719
10743
  tone = toneProp ?? "accent";
10720
- svg = /* @__PURE__ */ jsx48(
10744
+ svg = /* @__PURE__ */ jsx47(
10721
10745
  "svg",
10722
10746
  {
10723
10747
  viewBox: "0 0 100 100",
@@ -10728,9 +10752,9 @@ function ProgressCircle(props) {
10728
10752
  "aria-valuemax": max,
10729
10753
  "aria-label": label,
10730
10754
  "aria-valuetext": valueText,
10731
- children: /* @__PURE__ */ jsxs36("g", { className: ProgressCircle_default.arcs, children: [
10732
- /* @__PURE__ */ jsx48(Ring, { className: ProgressCircle_default.track }),
10733
- /* @__PURE__ */ jsx48(
10755
+ children: /* @__PURE__ */ jsxs35("g", { className: ProgressCircle_default.arcs, children: [
10756
+ /* @__PURE__ */ jsx47(Ring, { className: ProgressCircle_default.track }),
10757
+ /* @__PURE__ */ jsx47(
10734
10758
  Ring,
10735
10759
  {
10736
10760
  className: ProgressCircle_default.fill,
@@ -10745,15 +10769,15 @@ function ProgressCircle(props) {
10745
10769
  }
10746
10770
  );
10747
10771
  }
10748
- return /* @__PURE__ */ jsxs36("div", { className: cx(ProgressCircle_default.root, className), ...rest, ...toDataAttributes({ size, tone }), children: [
10772
+ return /* @__PURE__ */ jsxs35("div", { className: cx(ProgressCircle_default.root, className), ...rest, ...toDataAttributes({ size, tone }), children: [
10749
10773
  svg,
10750
10774
  description,
10751
- showInner ? /* @__PURE__ */ jsx48("div", { className: ProgressCircle_default.inner, "aria-hidden": valueText !== void 0 ? true : void 0, children }) : null
10775
+ showInner ? /* @__PURE__ */ jsx47("div", { className: ProgressCircle_default.inner, "aria-hidden": valueText !== void 0 ? true : void 0, children }) : null
10752
10776
  ] });
10753
10777
  }
10754
10778
 
10755
10779
  // src/components/radio/Radio.tsx
10756
- import * as React52 from "react";
10780
+ import * as React51 from "react";
10757
10781
 
10758
10782
  // src/components/radio/Radio.module.css
10759
10783
  var Radio_default = {
@@ -10764,7 +10788,7 @@ var Radio_default = {
10764
10788
  };
10765
10789
 
10766
10790
  // src/components/radio/Radio.tsx
10767
- import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
10791
+ import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
10768
10792
  var RADIO_GROUP_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
10769
10793
  var [RadioGroupProvider, useRadioGroupContext] = createComponentContext("Radio.Group");
10770
10794
  function RadioGroup({
@@ -10793,7 +10817,7 @@ function RadioGroup({
10793
10817
  const size = useControlSize(sizeProp);
10794
10818
  const ids = useFieldFrame(id, { label, hint, error, invalid }, ariaDescribedBy);
10795
10819
  const name = nameProp ?? ids.controlId;
10796
- const reportChange = React52.useCallback(
10820
+ const reportChange = React51.useCallback(
10797
10821
  (next) => {
10798
10822
  if (next !== void 0) onValueChange?.(next);
10799
10823
  },
@@ -10804,11 +10828,11 @@ function RadioGroup({
10804
10828
  defaultValue,
10805
10829
  onChange: reportChange
10806
10830
  });
10807
- const ctxValue = React52.useMemo(
10831
+ const ctxValue = React51.useMemo(
10808
10832
  () => ({ name, value, setValue, size, disabled, invalid: ids.invalid, required }),
10809
10833
  [name, value, setValue, size, disabled, ids.invalid, required]
10810
10834
  );
10811
- return /* @__PURE__ */ jsx49(RadioGroupProvider, { value: ctxValue, children: /* @__PURE__ */ jsx49(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx49(
10835
+ return /* @__PURE__ */ jsx48(RadioGroupProvider, { value: ctxValue, children: /* @__PURE__ */ jsx48(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsx48(
10812
10836
  FieldFrame,
10813
10837
  {
10814
10838
  ...rest,
@@ -10823,7 +10847,7 @@ function RadioGroup({
10823
10847
  optionalLabel: labelsProp?.optional ?? RADIO_GROUP_LABELS.optional,
10824
10848
  group: true,
10825
10849
  className,
10826
- children: /* @__PURE__ */ jsx49(
10850
+ children: /* @__PURE__ */ jsx48(
10827
10851
  "div",
10828
10852
  {
10829
10853
  id: ids.controlId,
@@ -10858,7 +10882,7 @@ function RadioRoot({
10858
10882
  const ids = useFieldFrame(id, { hint, invalid: group.invalid }, ariaDescribedBy);
10859
10883
  const disabled = group.disabled || disabledProp;
10860
10884
  const checked = group.value === value;
10861
- return /* @__PURE__ */ jsx49(
10885
+ return /* @__PURE__ */ jsx48(
10862
10886
  ChoiceField,
10863
10887
  {
10864
10888
  ids,
@@ -10867,8 +10891,8 @@ function RadioRoot({
10867
10891
  disabled,
10868
10892
  hint,
10869
10893
  className: cx(Radio_default.root, className),
10870
- control: /* @__PURE__ */ jsxs37(Fragment10, { children: [
10871
- /* @__PURE__ */ jsx49(
10894
+ control: /* @__PURE__ */ jsxs36(Fragment9, { children: [
10895
+ /* @__PURE__ */ jsx48(
10872
10896
  "input",
10873
10897
  {
10874
10898
  ...inputRest,
@@ -10886,7 +10910,7 @@ function RadioRoot({
10886
10910
  "aria-describedby": ids.describedBy
10887
10911
  }
10888
10912
  ),
10889
- /* @__PURE__ */ jsx49("span", { className: cx(choiceVisualClass, Radio_default.control), "aria-hidden": "true", children: /* @__PURE__ */ jsx49("span", { className: Radio_default.dot }) })
10913
+ /* @__PURE__ */ jsx48("span", { className: cx(choiceVisualClass, Radio_default.control), "aria-hidden": "true", children: /* @__PURE__ */ jsx48("span", { className: Radio_default.dot }) })
10890
10914
  ] }),
10891
10915
  children
10892
10916
  }
@@ -10894,7 +10918,7 @@ function RadioRoot({
10894
10918
  }
10895
10919
  RadioRoot.displayName = "Radio.Root";
10896
10920
  function RadioLabel(props) {
10897
- return /* @__PURE__ */ jsx49(ChoiceLabel, { ...props });
10921
+ return /* @__PURE__ */ jsx48(ChoiceLabel, { ...props });
10898
10922
  }
10899
10923
  RadioLabel.displayName = "Radio.Label";
10900
10924
  var Radio = {
@@ -10915,7 +10939,7 @@ var Slider_default = {
10915
10939
  };
10916
10940
 
10917
10941
  // src/components/slider/Slider.tsx
10918
- import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
10942
+ import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
10919
10943
  var SLIDER_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
10920
10944
  var clamp = (n, min, max) => Math.min(max, Math.max(min, n));
10921
10945
  function Slider({
@@ -10954,7 +10978,7 @@ function Slider({
10954
10978
  const safeValue = clamp(value, min, max);
10955
10979
  const ratio = max > min ? (safeValue - min) / (max - min) : 0;
10956
10980
  const valueText = formatValue ? formatValue(safeValue) : String(safeValue);
10957
- return /* @__PURE__ */ jsx50(
10981
+ return /* @__PURE__ */ jsx49(
10958
10982
  FieldFrame,
10959
10983
  {
10960
10984
  ...rest,
@@ -10967,12 +10991,12 @@ function Slider({
10967
10991
  error,
10968
10992
  disabled,
10969
10993
  optionalLabel: labelsProp?.optional ?? SLIDER_LABELS.optional,
10970
- labelEnd: showValue ? /* @__PURE__ */ jsx50("output", { className: Slider_default.value, htmlFor: ids.controlId, "aria-hidden": "true", children: valueText }) : void 0,
10994
+ labelEnd: showValue ? /* @__PURE__ */ jsx49("output", { className: Slider_default.value, htmlFor: ids.controlId, "aria-hidden": "true", children: valueText }) : void 0,
10971
10995
  className: cx(Slider_default.root, className),
10972
10996
  style: { ...style, "--slider-ratio": ratio },
10973
10997
  ...toDataAttributes({ tone }),
10974
- children: /* @__PURE__ */ jsx50(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs38("div", { className: Slider_default.control, children: [
10975
- /* @__PURE__ */ jsx50(
10998
+ children: /* @__PURE__ */ jsx49(ControlSizeProvider, { value: size, children: /* @__PURE__ */ jsxs37("div", { className: Slider_default.control, children: [
10999
+ /* @__PURE__ */ jsx49(
10976
11000
  "input",
10977
11001
  {
10978
11002
  id: ids.controlId,
@@ -10993,15 +11017,15 @@ function Slider({
10993
11017
  "aria-invalid": ids.invalid || void 0
10994
11018
  }
10995
11019
  ),
10996
- /* @__PURE__ */ jsx50("span", { className: Slider_default.track, "aria-hidden": "true", children: /* @__PURE__ */ jsx50("span", { className: Slider_default.range }) }),
10997
- /* @__PURE__ */ jsx50("span", { className: Slider_default.thumb, "aria-hidden": "true" })
11020
+ /* @__PURE__ */ jsx49("span", { className: Slider_default.track, "aria-hidden": "true", children: /* @__PURE__ */ jsx49("span", { className: Slider_default.range }) }),
11021
+ /* @__PURE__ */ jsx49("span", { className: Slider_default.thumb, "aria-hidden": "true" })
10998
11022
  ] }) })
10999
11023
  }
11000
11024
  );
11001
11025
  }
11002
11026
 
11003
11027
  // src/components/smart-filter/SmartFilter.tsx
11004
- import * as React53 from "react";
11028
+ import * as React52 from "react";
11005
11029
 
11006
11030
  // src/components/smart-filter/model.ts
11007
11031
  var EMPTY = { include: [], exclude: [] };
@@ -11065,7 +11089,7 @@ var SmartFilter_default = {
11065
11089
  };
11066
11090
 
11067
11091
  // src/components/smart-filter/SmartFilter.tsx
11068
- import { Fragment as Fragment12, jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
11092
+ import { Fragment as Fragment11, jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
11069
11093
  var DEFAULT_LABELS4 = {
11070
11094
  filter: "\u0424\u0438\u043B\u044C\u0442\u0440",
11071
11095
  searchPlaceholder: "\u041F\u043E\u0438\u0441\u043A",
@@ -11113,7 +11137,7 @@ function SmartFilterRoot({
11113
11137
  defaultValue: defaultSearch,
11114
11138
  onChange: onSearchChange
11115
11139
  });
11116
- const [open, setOpen] = React53.useState(false);
11140
+ const [open, setOpen] = React52.useState(false);
11117
11141
  const context = {
11118
11142
  fields,
11119
11143
  value: current,
@@ -11133,15 +11157,15 @@ function SmartFilterRoot({
11133
11157
  size,
11134
11158
  collapsedLimit
11135
11159
  };
11136
- return /* @__PURE__ */ jsx51(SmartFilterProvider, { value: context, children: /* @__PURE__ */ jsx51(Popover.Root, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx51("div", { ref, className: cx(SmartFilter_default.root, className), "data-size": size, children }) }) });
11160
+ return /* @__PURE__ */ jsx50(SmartFilterProvider, { value: context, children: /* @__PURE__ */ jsx50(Popover.Root, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx50("div", { ref, className: cx(SmartFilter_default.root, className), "data-size": size, children }) }) });
11137
11161
  }
11138
11162
  SmartFilterRoot.displayName = "SmartFilter.Root";
11139
11163
  function SmartFilterToolbar({ className, ...rest }) {
11140
11164
  const { fields, total, open, setOpen, search, setSearch, labels, size } = useSmartFilter();
11141
11165
  const hasFilters = fields.length > 0;
11142
- return /* @__PURE__ */ jsxs39(Fragment12, { children: [
11143
- /* @__PURE__ */ jsx51(Popover.Anchor, { children: /* @__PURE__ */ jsxs39("div", { ...rest, className: cx(SmartFilter_default.toolbar, className), "data-slot": "smart-filter-toolbar", children: [
11144
- hasFilters && /* @__PURE__ */ jsxs39(
11166
+ return /* @__PURE__ */ jsxs38(Fragment11, { children: [
11167
+ /* @__PURE__ */ jsx50(Popover.Anchor, { children: /* @__PURE__ */ jsxs38("div", { ...rest, className: cx(SmartFilter_default.toolbar, className), "data-slot": "smart-filter-toolbar", children: [
11168
+ hasFilters && /* @__PURE__ */ jsxs38(
11145
11169
  Button.Root,
11146
11170
  {
11147
11171
  variant: "soft",
@@ -11152,15 +11176,15 @@ function SmartFilterToolbar({ className, ...rest }) {
11152
11176
  "aria-haspopup": "dialog",
11153
11177
  onClick: () => setOpen(!open),
11154
11178
  children: [
11155
- /* @__PURE__ */ jsx51(Button.Icon, { children: /* @__PURE__ */ jsx51(Icon, { name: "action.filter" }) }),
11179
+ /* @__PURE__ */ jsx50(Button.Icon, { children: /* @__PURE__ */ jsx50(Icon, { name: "action.filter" }) }),
11156
11180
  labels.filter,
11157
- total > 0 && /* @__PURE__ */ jsx51(Badge.Root, { color: "blue", children: total })
11181
+ total > 0 && /* @__PURE__ */ jsx50(Badge.Root, { color: "blue", children: total })
11158
11182
  ]
11159
11183
  }
11160
11184
  ),
11161
- /* @__PURE__ */ jsx51(Input.Root, { size, className: SmartFilter_default.search, labels: { clear: labels.clearSearch }, children: /* @__PURE__ */ jsxs39(Input.Wrapper, { children: [
11162
- /* @__PURE__ */ jsx51(Input.Icon, { side: "start", children: /* @__PURE__ */ jsx51(Icon, { name: "action.search", tone: "secondary" }) }),
11163
- /* @__PURE__ */ jsx51(
11185
+ /* @__PURE__ */ jsx50(Input.Root, { size, className: SmartFilter_default.search, labels: { clear: labels.clearSearch }, children: /* @__PURE__ */ jsxs38(Input.Wrapper, { children: [
11186
+ /* @__PURE__ */ jsx50(Input.Icon, { side: "start", children: /* @__PURE__ */ jsx50(Icon, { name: "action.search", tone: "secondary" }) }),
11187
+ /* @__PURE__ */ jsx50(
11164
11188
  Input.Field,
11165
11189
  {
11166
11190
  type: "search",
@@ -11175,10 +11199,10 @@ function SmartFilterToolbar({ className, ...rest }) {
11175
11199
  }
11176
11200
  }
11177
11201
  ),
11178
- search.length > 0 && /* @__PURE__ */ jsx51(Input.ClearButton, { onClick: () => setSearch("") })
11202
+ search.length > 0 && /* @__PURE__ */ jsx50(Input.ClearButton, { onClick: () => setSearch("") })
11179
11203
  ] }) })
11180
11204
  ] }) }),
11181
- hasFilters && /* @__PURE__ */ jsx51(Popover.Content, { matchTriggerWidth: true, flush: true, size, children: /* @__PURE__ */ jsx51(Panel, {}) })
11205
+ hasFilters && /* @__PURE__ */ jsx50(Popover.Content, { matchTriggerWidth: true, flush: true, size, children: /* @__PURE__ */ jsx50(Panel, {}) })
11182
11206
  ] });
11183
11207
  }
11184
11208
  SmartFilterToolbar.displayName = "SmartFilter.Toolbar";
@@ -11196,7 +11220,7 @@ function Panel() {
11196
11220
  collapsedLimit
11197
11221
  } = useSmartFilter();
11198
11222
  const query = search.trim();
11199
- const [expanded, setExpanded] = React53.useState(() => /* @__PURE__ */ new Set());
11223
+ const [expanded, setExpanded] = React52.useState(() => /* @__PURE__ */ new Set());
11200
11224
  const rows = fields.map((field) => {
11201
11225
  const selection = value[field.key];
11202
11226
  const known = new Set(field.options.map((o) => o.value));
@@ -11214,7 +11238,7 @@ function Panel() {
11214
11238
  if (query) {
11215
11239
  sections.push({
11216
11240
  key: "query",
11217
- node: /* @__PURE__ */ jsx51("div", { className: SmartFilter_default.queryRow, children: /* @__PURE__ */ jsxs39(
11241
+ node: /* @__PURE__ */ jsx50("div", { className: SmartFilter_default.queryRow, children: /* @__PURE__ */ jsxs38(
11218
11242
  Button.Root,
11219
11243
  {
11220
11244
  variant: "ghost",
@@ -11223,9 +11247,9 @@ function Panel() {
11223
11247
  fullWidth: true,
11224
11248
  onClick: () => setOpen(false),
11225
11249
  children: [
11226
- /* @__PURE__ */ jsx51(Button.Icon, { children: /* @__PURE__ */ jsx51(Icon, { name: "action.search" }) }),
11250
+ /* @__PURE__ */ jsx50(Button.Icon, { children: /* @__PURE__ */ jsx50(Icon, { name: "action.search" }) }),
11227
11251
  formatLabel(labels.searchText, { query }),
11228
- /* @__PURE__ */ jsx51(Kbd, { className: SmartFilter_default.queryKey, children: "\u21B5" })
11252
+ /* @__PURE__ */ jsx50(Kbd, { className: SmartFilter_default.queryKey, children: "\u21B5" })
11229
11253
  ]
11230
11254
  }
11231
11255
  ) })
@@ -11237,10 +11261,10 @@ function Panel() {
11237
11261
  const all = field.options.map((o) => o.value);
11238
11262
  sections.push({
11239
11263
  key: `field:${field.key}`,
11240
- node: /* @__PURE__ */ jsxs39("div", { className: SmartFilter_default.row, "data-field": field.key, children: [
11241
- /* @__PURE__ */ jsx51(Typography, { as: "span", variant: "body-s", tone: "secondary", children: field.label }),
11242
- /* @__PURE__ */ jsxs39("div", { className: SmartFilter_default.values, children: [
11243
- shown.map((option) => /* @__PURE__ */ jsx51(
11264
+ node: /* @__PURE__ */ jsxs38("div", { className: SmartFilter_default.row, "data-field": field.key, children: [
11265
+ /* @__PURE__ */ jsx50(Typography, { as: "span", variant: "body-s", tone: "secondary", children: field.label }),
11266
+ /* @__PURE__ */ jsxs38("div", { className: SmartFilter_default.values, children: [
11267
+ shown.map((option) => /* @__PURE__ */ jsx50(
11244
11268
  ValueToggle,
11245
11269
  {
11246
11270
  option,
@@ -11252,7 +11276,7 @@ function Panel() {
11252
11276
  },
11253
11277
  option.value
11254
11278
  )),
11255
- collapsible && /* @__PURE__ */ jsxs39(
11279
+ collapsible && /* @__PURE__ */ jsxs38(
11256
11280
  Badge.Root,
11257
11281
  {
11258
11282
  size,
@@ -11260,7 +11284,7 @@ function Panel() {
11260
11284
  onPress: () => setExpanded((prev) => new Set(prev).add(field.key)),
11261
11285
  children: [
11262
11286
  formatLabel(labels.more, { count: options.length - collapsedLimit }),
11263
- /* @__PURE__ */ jsx51(Badge.Icon, { children: /* @__PURE__ */ jsx51(Icon, { name: "nav.chevronDown" }) })
11287
+ /* @__PURE__ */ jsx50(Badge.Icon, { children: /* @__PURE__ */ jsx50(Icon, { name: "nav.chevronDown" }) })
11264
11288
  ]
11265
11289
  }
11266
11290
  )
@@ -11271,21 +11295,21 @@ function Panel() {
11271
11295
  if (empty.length > 0) {
11272
11296
  sections.push({
11273
11297
  key: "empty",
11274
- node: /* @__PURE__ */ jsx51(EmptyPage.Root, { layout: "compact", size, role: "status", children: /* @__PURE__ */ jsx51(EmptyPage.Description, { children: formatLabel(labels.noMatches, { fields: empty.join(", ") }) }) })
11298
+ node: /* @__PURE__ */ jsx50(EmptyPage.Root, { layout: "compact", size, role: "status", children: /* @__PURE__ */ jsx50(EmptyPage.Description, { children: formatLabel(labels.noMatches, { fields: empty.join(", ") }) }) })
11275
11299
  });
11276
11300
  }
11277
11301
  sections.push({
11278
11302
  key: "footer",
11279
- node: /* @__PURE__ */ jsxs39("div", { className: SmartFilter_default.footer, children: [
11280
- /* @__PURE__ */ jsx51(Typography, { as: "span", variant: "caption", tone: "muted", className: SmartFilter_default.hint, children: labels.hint }),
11281
- /* @__PURE__ */ jsx51(Typography, { as: "span", variant: "caption", tone: "muted", children: formatLabel(labels.count, { count: total }) }),
11282
- total > 0 && /* @__PURE__ */ jsx51(Button.Root, { variant: "ghost", tone: "neutral", size: "xs", onClick: clearAll, children: labels.reset })
11303
+ node: /* @__PURE__ */ jsxs38("div", { className: SmartFilter_default.footer, children: [
11304
+ /* @__PURE__ */ jsx50(Typography, { as: "span", variant: "caption", tone: "muted", className: SmartFilter_default.hint, children: labels.hint }),
11305
+ /* @__PURE__ */ jsx50(Typography, { as: "span", variant: "caption", tone: "muted", children: formatLabel(labels.count, { count: total }) }),
11306
+ total > 0 && /* @__PURE__ */ jsx50(Button.Root, { variant: "ghost", tone: "neutral", size: "xs", onClick: clearAll, children: labels.reset })
11283
11307
  ] })
11284
11308
  });
11285
- return /* @__PURE__ */ jsxs39(Fragment12, { children: [
11286
- /* @__PURE__ */ jsx51(Popover.Title, { children: /* @__PURE__ */ jsx51(VisuallyHidden, { children: labels.filter }) }),
11287
- sections.map((section, index) => /* @__PURE__ */ jsxs39(React53.Fragment, { children: [
11288
- index > 0 && /* @__PURE__ */ jsx51(Divider, { role: "presentation" }),
11309
+ return /* @__PURE__ */ jsxs38(Fragment11, { children: [
11310
+ /* @__PURE__ */ jsx50(Popover.Title, { children: /* @__PURE__ */ jsx50(VisuallyHidden, { children: labels.filter }) }),
11311
+ sections.map((section, index) => /* @__PURE__ */ jsxs38(React52.Fragment, { children: [
11312
+ index > 0 && /* @__PURE__ */ jsx50(Divider, { role: "presentation" }),
11289
11313
  section.node
11290
11314
  ] }, section.key))
11291
11315
  ] });
@@ -11301,7 +11325,7 @@ var TIER_BELOW = {
11301
11325
  };
11302
11326
  function ValueToggle({ option, size, mode, canHide, query, onMode }) {
11303
11327
  const { labels } = useSmartFilter();
11304
- return /* @__PURE__ */ jsxs39(
11328
+ return /* @__PURE__ */ jsxs38(
11305
11329
  Badge.Root,
11306
11330
  {
11307
11331
  size: tagSizeOf(size),
@@ -11318,9 +11342,9 @@ function ValueToggle({ option, size, mode, canHide, query, onMode }) {
11318
11342
  },
11319
11343
  children: [
11320
11344
  mode === "exclude" && `${labels.not} `,
11321
- option.icon ? /* @__PURE__ */ jsx51(Badge.Icon, { children: option.icon }) : null,
11322
- /* @__PURE__ */ jsx51("span", { children: /* @__PURE__ */ jsx51(HighlightMatch, { text: option.label, query }) }),
11323
- /* @__PURE__ */ jsx51(
11345
+ option.icon ? /* @__PURE__ */ jsx50(Badge.Icon, { children: option.icon }) : null,
11346
+ /* @__PURE__ */ jsx50("span", { children: /* @__PURE__ */ jsx50(HighlightMatch, { text: option.label, query }) }),
11347
+ /* @__PURE__ */ jsx50(
11324
11348
  Badge.Action,
11325
11349
  {
11326
11350
  label: formatLabel(mode === "exclude" ? labels.unhideValue : labels.hideValue, {
@@ -11340,7 +11364,7 @@ function SmartFilterChips({ className, ...rest }) {
11340
11364
  const { fields, value, setSelection, total, clearAll, setOpen, setSearch, labels, size } = useSmartFilter();
11341
11365
  if (total === 0) return null;
11342
11366
  const tagSize = tagSizeOf(size);
11343
- return /* @__PURE__ */ jsxs39("div", { ...rest, className: cx(SmartFilter_default.chips, className), "data-slot": "smart-filter-chips", children: [
11367
+ return /* @__PURE__ */ jsxs38("div", { ...rest, className: cx(SmartFilter_default.chips, className), "data-slot": "smart-filter-chips", children: [
11344
11368
  fields.flatMap((field) => {
11345
11369
  const selection = value[field.key];
11346
11370
  if (!selection) return [];
@@ -11350,7 +11374,7 @@ function SmartFilterChips({ className, ...rest }) {
11350
11374
  field: field.label,
11351
11375
  value: labelOf2(v)
11352
11376
  });
11353
- return /* @__PURE__ */ jsx51(
11377
+ return /* @__PURE__ */ jsx50(
11354
11378
  Badge.Root,
11355
11379
  {
11356
11380
  size: tagSize,
@@ -11368,7 +11392,7 @@ function SmartFilterChips({ className, ...rest }) {
11368
11392
  ...selection.exclude.map((v) => tag(v, true))
11369
11393
  ];
11370
11394
  }),
11371
- /* @__PURE__ */ jsxs39(
11395
+ /* @__PURE__ */ jsxs38(
11372
11396
  Badge.Root,
11373
11397
  {
11374
11398
  size: tagSize,
@@ -11377,12 +11401,12 @@ function SmartFilterChips({ className, ...rest }) {
11377
11401
  setOpen(true);
11378
11402
  },
11379
11403
  children: [
11380
- /* @__PURE__ */ jsx51(Badge.Icon, { children: /* @__PURE__ */ jsx51(Icon, { name: "action.add" }) }),
11404
+ /* @__PURE__ */ jsx50(Badge.Icon, { children: /* @__PURE__ */ jsx50(Icon, { name: "action.add" }) }),
11381
11405
  labels.add
11382
11406
  ]
11383
11407
  }
11384
11408
  ),
11385
- /* @__PURE__ */ jsx51(LinkButton, { asChild: true, tone: "neutral", size: TIER_BELOW[tagSize], className: SmartFilter_default.clearAll, children: /* @__PURE__ */ jsx51("button", { type: "button", onClick: clearAll, children: labels.clearAll }) })
11409
+ /* @__PURE__ */ jsx50(LinkButton, { asChild: true, tone: "neutral", size: TIER_BELOW[tagSize], className: SmartFilter_default.clearAll, children: /* @__PURE__ */ jsx50("button", { type: "button", onClick: clearAll, children: labels.clearAll }) })
11386
11410
  ] });
11387
11411
  }
11388
11412
  SmartFilterChips.displayName = "SmartFilter.Chips";
@@ -11392,6 +11416,152 @@ var SmartFilter = {
11392
11416
  Chips: SmartFilterChips
11393
11417
  };
11394
11418
 
11419
+ // src/components/sparkline/Sparkline.tsx
11420
+ import * as React53 from "react";
11421
+
11422
+ // src/components/sparkline/Sparkline.module.css
11423
+ var Sparkline_default = {
11424
+ root: "Sparkline_root",
11425
+ head: "Sparkline_head",
11426
+ label: "Sparkline_label",
11427
+ date: "Sparkline_date",
11428
+ valueRow: "Sparkline_valueRow",
11429
+ value: "Sparkline_value",
11430
+ change: "Sparkline_change",
11431
+ trend: "Sparkline_trend",
11432
+ plot: "Sparkline_plot",
11433
+ svg: "Sparkline_svg",
11434
+ line: "Sparkline_line",
11435
+ area: "Sparkline_area",
11436
+ cursor: "Sparkline_cursor",
11437
+ guide: "Sparkline_guide",
11438
+ dot: "Sparkline_dot"
11439
+ };
11440
+
11441
+ // src/components/sparkline/Sparkline.tsx
11442
+ import { Fragment as Fragment12, jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
11443
+ var SPARKLINE_LABELS = { point: "{label}: {value}" };
11444
+ var NUMBER = new Intl.NumberFormat("ru-RU");
11445
+ var PERCENT = new Intl.NumberFormat("ru-RU", { maximumFractionDigits: 1 });
11446
+ function changeAt(data, index) {
11447
+ if (index <= 0) return null;
11448
+ const prev = data[index - 1].value;
11449
+ return prev === 0 ? null : (data[index].value - prev) / Math.abs(prev) * 100;
11450
+ }
11451
+ function Sparkline({
11452
+ data,
11453
+ label,
11454
+ formatValue = (value) => NUMBER.format(value),
11455
+ labels: labelsProp,
11456
+ className,
11457
+ ref,
11458
+ ...rest
11459
+ }) {
11460
+ const labels = { ...SPARKLINE_LABELS, ...labelsProp };
11461
+ const last = data.length - 1;
11462
+ const [active, setActive] = React53.useState(null);
11463
+ const index = active === null ? last : Math.min(active, last);
11464
+ const point = data[index];
11465
+ const [series, setSeries] = React53.useState({ data, version: 0 });
11466
+ if (series.data !== data) setSeries({ data, version: series.version + 1 });
11467
+ const version = series.data === data ? series.version : series.version + 1;
11468
+ const swapped = useStateSwap(version);
11469
+ const values = data.map((p) => p.value);
11470
+ const min = Math.min(...values);
11471
+ const max = Math.max(...values);
11472
+ const span2 = max - min || 1;
11473
+ const y = (value) => 1 - (value - min) / span2;
11474
+ const x = (i) => last > 0 ? i / last : 0.5;
11475
+ const line = data.map((p, i) => `${i ? "L" : "M"}${x(i) * 100},${y(p.value) * 100}`).join("");
11476
+ const fromPointer = (event) => {
11477
+ const rect = event.currentTarget.getBoundingClientRect();
11478
+ const ratio = rect.width ? (event.clientX - rect.left) / rect.width : 1;
11479
+ setActive(Math.max(0, Math.min(last, Math.round(ratio * last))));
11480
+ };
11481
+ const change = changeAt(data, index);
11482
+ const valueText = point ? formatValue(point.value) : "";
11483
+ return /* @__PURE__ */ jsxs39(
11484
+ "div",
11485
+ {
11486
+ ...rest,
11487
+ ref,
11488
+ className: cx(Sparkline_default.root, className),
11489
+ "data-scrubbing": active !== null || void 0,
11490
+ children: [
11491
+ /* @__PURE__ */ jsxs39("div", { className: Sparkline_default.head, children: [
11492
+ /* @__PURE__ */ jsx51("span", { className: Sparkline_default.label, children: label }),
11493
+ /* @__PURE__ */ jsx51("span", { className: Sparkline_default.date, children: point?.label })
11494
+ ] }),
11495
+ /* @__PURE__ */ jsxs39("div", { className: Sparkline_default.valueRow, children: [
11496
+ /* @__PURE__ */ jsx51("span", { className: Sparkline_default.value, children: active === null ? /* @__PURE__ */ jsx51(RollingNumber, { children: valueText }) : valueText }),
11497
+ change !== null ? /* @__PURE__ */ jsxs39(Badge.Root, { color: change < 0 ? "red" : "green", className: Sparkline_default.change, children: [
11498
+ /* @__PURE__ */ jsx51(Badge.Icon, { className: Sparkline_default.trend, "data-down": change < 0 || void 0, children: /* @__PURE__ */ jsx51(Icon, { name: "status.trendUp" }) }),
11499
+ `${change > 0 ? "+" : change < 0 ? "\u2212" : ""}${PERCENT.format(Math.abs(change))}%`
11500
+ ] }) : null
11501
+ ] }),
11502
+ /* @__PURE__ */ jsxs39(
11503
+ "div",
11504
+ {
11505
+ className: Sparkline_default.plot,
11506
+ role: "slider",
11507
+ tabIndex: 0,
11508
+ "aria-label": label,
11509
+ "aria-valuemin": 0,
11510
+ "aria-valuemax": Math.max(last, 0),
11511
+ "aria-valuenow": index,
11512
+ "aria-valuetext": point ? formatLabel(labels.point, { label: point.label, value: valueText }) : void 0,
11513
+ onPointerDown: (event) => {
11514
+ if (event.pointerType !== "mouse") event.currentTarget.setPointerCapture(event.pointerId);
11515
+ fromPointer(event);
11516
+ },
11517
+ onPointerMove: fromPointer,
11518
+ onPointerLeave: () => setActive(null),
11519
+ onPointerUp: (event) => {
11520
+ if (event.pointerType !== "mouse") setActive(null);
11521
+ },
11522
+ onPointerCancel: () => setActive(null),
11523
+ onKeyDown: (event) => {
11524
+ const next = event.key === "ArrowLeft" || event.key === "ArrowDown" ? index - 1 : event.key === "ArrowRight" || event.key === "ArrowUp" ? index + 1 : event.key === "Home" ? 0 : event.key === "End" ? last : null;
11525
+ if (next === null) return;
11526
+ event.preventDefault();
11527
+ setActive(Math.max(0, Math.min(last, next)));
11528
+ },
11529
+ onBlur: () => setActive(null),
11530
+ children: [
11531
+ /* @__PURE__ */ jsx51(
11532
+ "svg",
11533
+ {
11534
+ className: cx(Sparkline_default.svg, swapped && swapMotion_default.swapIn),
11535
+ viewBox: "0 0 100 100",
11536
+ preserveAspectRatio: "none",
11537
+ "aria-hidden": "true",
11538
+ children: data.length > 1 ? /* @__PURE__ */ jsxs39(Fragment12, { children: [
11539
+ /* @__PURE__ */ jsx51("path", { className: Sparkline_default.area, d: `${line}L100,100L0,100Z` }),
11540
+ /* @__PURE__ */ jsx51("path", { className: Sparkline_default.line, d: line })
11541
+ ] }) : null
11542
+ },
11543
+ version
11544
+ ),
11545
+ point ? /* @__PURE__ */ jsxs39(
11546
+ "span",
11547
+ {
11548
+ className: Sparkline_default.cursor,
11549
+ "aria-hidden": "true",
11550
+ style: { "--sparkline-x": x(index), "--sparkline-y": y(point.value) },
11551
+ children: [
11552
+ /* @__PURE__ */ jsx51("span", { className: Sparkline_default.guide }),
11553
+ /* @__PURE__ */ jsx51("span", { className: Sparkline_default.dot })
11554
+ ]
11555
+ }
11556
+ ) : null
11557
+ ]
11558
+ }
11559
+ )
11560
+ ]
11561
+ }
11562
+ );
11563
+ }
11564
+
11395
11565
  // src/components/stepper/Stepper.tsx
11396
11566
  import * as React54 from "react";
11397
11567
 
@@ -11633,7 +11803,6 @@ var Tabs_default = {
11633
11803
  list: "Tabs_list",
11634
11804
  indicator: "Tabs_indicator",
11635
11805
  indicatorFolder: "Tabs_indicatorFolder",
11636
- indicatorPill: "Tabs_indicatorPill",
11637
11806
  item: "Tabs_item",
11638
11807
  tab: "Tabs_tab",
11639
11808
  content: "Tabs_content",
@@ -11708,14 +11877,16 @@ function TabsRoot({
11708
11877
  ...minItemWidth !== void 0 && { "--tabs-item-min": cssLength(minItemWidth) },
11709
11878
  ...maxItemWidth !== void 0 && { "--tabs-item-max": cssLength(maxItemWidth) }
11710
11879
  };
11880
+ const depth = useNestedSurfaceDepth();
11711
11881
  return /* @__PURE__ */ jsx54(TabsProvider, { value: context, children: /* @__PURE__ */ jsx54(
11712
11882
  "div",
11713
11883
  {
11714
11884
  ...rest,
11715
11885
  className: cx(Tabs_default.root, className),
11716
11886
  style: { ...style, ...widths },
11887
+ "data-depth": depth,
11717
11888
  ...toDataAttributes({ orientation, size, tone, "full-width": fullWidth }),
11718
- children: /* @__PURE__ */ jsx54("div", { className: Tabs_default.layout, children })
11889
+ children: /* @__PURE__ */ jsx54(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx54("div", { className: Tabs_default.layout, children }) })
11719
11890
  }
11720
11891
  ) });
11721
11892
  }
@@ -11774,7 +11945,11 @@ function placeIndicator(list, indicator, activeValue, animate) {
11774
11945
  }
11775
11946
  const left = box.offsetLeft;
11776
11947
  const right = left + box.offsetWidth;
11777
- const flare = Number.parseFloat(getComputedStyle(indicator, "::after").width) || 0;
11948
+ const top = box.offsetTop;
11949
+ const bottom = top + box.offsetHeight;
11950
+ const column = getComputedStyle(list).flexDirection.startsWith("column");
11951
+ indicator.dataset.axis = column ? "y" : "x";
11952
+ const flare = Number.parseFloat(getComputedStyle(indicator).scrollMarginTop) || 0;
11778
11953
  const transform = `translate(${left}px, ${box.offsetTop}px)`;
11779
11954
  const width = `${box.offsetWidth}px`;
11780
11955
  const height = `${box.offsetHeight}px`;
@@ -11786,18 +11961,35 @@ function placeIndicator(list, indicator, activeValue, animate) {
11786
11961
  indicator.style.transform = transform;
11787
11962
  indicator.style.width = width;
11788
11963
  indicator.style.height = height;
11789
- indicator.dataset.edgeStart = String(left - flare < 0);
11790
- indicator.dataset.edgeEnd = String(box === items.at(-1) && right + flare > list.clientWidth);
11964
+ const scrolls = !column && list.scrollWidth > list.clientWidth + 0.5;
11965
+ indicator.dataset.edgeStart = String(column ? top - flare < 0 : left - flare < 0);
11966
+ indicator.dataset.edgeEnd = String(
11967
+ box === items.at(-1) && (column ? bottom + flare > list.clientHeight : scrolls || right + flare > list.clientWidth)
11968
+ );
11791
11969
  indicator.dataset.visible = String(box.offsetWidth > 0 && box.offsetHeight > 0);
11792
11970
  }
11971
+ function fadeDepth(list) {
11972
+ const raw = getComputedStyle(list).getPropertyValue("--prime-space-8").trim();
11973
+ const value = Number.parseFloat(raw);
11974
+ if (!Number.isFinite(value)) return 0;
11975
+ if (raw.endsWith("rem")) {
11976
+ return value * (Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16);
11977
+ }
11978
+ return value;
11979
+ }
11793
11980
  function revealActive(list, smooth) {
11794
11981
  if (list.scrollWidth <= list.clientWidth || typeof list.scrollTo !== "function") return;
11795
11982
  const box = list.querySelector('[role="tab"][aria-selected="true"]')?.parentElement;
11796
11983
  if (!box) return;
11797
- const start = box.offsetLeft;
11798
- const end = start + box.offsetWidth;
11799
- const left = start < list.scrollLeft ? start : end > list.scrollLeft + list.clientWidth ? end - list.clientWidth : null;
11800
- if (left !== null) list.scrollTo({ left, behavior: smooth ? "smooth" : "auto" });
11984
+ const margin = fadeDepth(list);
11985
+ const max = list.scrollWidth - list.clientWidth;
11986
+ const start = box.offsetLeft - margin;
11987
+ const end = box.offsetLeft + box.offsetWidth + margin;
11988
+ const target = start < list.scrollLeft ? start : end > list.scrollLeft + list.clientWidth ? end - list.clientWidth : null;
11989
+ if (target === null) return;
11990
+ const left = Math.min(max, Math.max(0, target));
11991
+ if (Math.abs(left - list.scrollLeft) < 1) return;
11992
+ list.scrollTo({ left, behavior: smooth ? "smooth" : "auto" });
11801
11993
  }
11802
11994
  function useListLayout(listRef, indicatorRef, userChangeRef, activeValue, horizontal) {
11803
11995
  const [collapse, setCollapse] = React55.useState("full");
@@ -11874,7 +12066,7 @@ function TabsList({ children, className, ref, ...rest }) {
11874
12066
  role: "tablist",
11875
12067
  "aria-orientation": orientation,
11876
12068
  className: cx(Tabs_default.list, className),
11877
- "data-indicator": horizontal ? "folder" : "pill",
12069
+ "data-indicator": "folder",
11878
12070
  "data-collapse": collapse,
11879
12071
  onKeyDown: handleKeyDown,
11880
12072
  children: [
@@ -11882,7 +12074,7 @@ function TabsList({ children, className, ref, ...rest }) {
11882
12074
  "div",
11883
12075
  {
11884
12076
  ref: indicatorRef,
11885
- className: cx(Tabs_default.indicator, horizontal ? Tabs_default.indicatorFolder : Tabs_default.indicatorPill),
12077
+ className: cx(Tabs_default.indicator, Tabs_default.indicatorFolder),
11886
12078
  "data-indicator": "",
11887
12079
  "aria-hidden": "true",
11888
12080
  onTransitionEnd: (event) => {
@@ -13194,6 +13386,103 @@ var Timeline = {
13194
13386
  GapMeta: TimelineGapMeta
13195
13387
  };
13196
13388
 
13389
+ // src/motion/celebrate.ts
13390
+ var COLOR_TOKENS = [
13391
+ "--prime-color-accent-default",
13392
+ "--prime-color-success-default",
13393
+ "--prime-color-warning-default",
13394
+ "--prime-color-info-default"
13395
+ ];
13396
+ var PIECES = 90;
13397
+ var DURATION_MS = 1400;
13398
+ var GRAVITY = 16e-4;
13399
+ var DRAG = 12e-4;
13400
+ function celebrate(options = {}) {
13401
+ if (typeof window === "undefined" || typeof document === "undefined") return Promise.resolve();
13402
+ if (prefersReducedMotion()) return Promise.resolve();
13403
+ const width = window.innerWidth;
13404
+ const height = window.innerHeight;
13405
+ const { origin } = options;
13406
+ let x = width / 2;
13407
+ let y = height / 3;
13408
+ let themed = document.body;
13409
+ if (origin instanceof Element) {
13410
+ const rect = origin.getBoundingClientRect();
13411
+ x = rect.left + rect.width / 2;
13412
+ y = rect.top + rect.height / 2;
13413
+ themed = origin;
13414
+ } else if (origin) {
13415
+ x = origin.x;
13416
+ y = origin.y;
13417
+ }
13418
+ const canvas = document.createElement("canvas");
13419
+ const ctx = canvas.getContext("2d");
13420
+ if (!ctx) return Promise.resolve();
13421
+ const dpr = window.devicePixelRatio || 1;
13422
+ canvas.width = width * dpr;
13423
+ canvas.height = height * dpr;
13424
+ canvas.setAttribute("aria-hidden", "true");
13425
+ Object.assign(canvas.style, {
13426
+ position: "fixed",
13427
+ inset: "0",
13428
+ width: "100%",
13429
+ height: "100%",
13430
+ pointerEvents: "none",
13431
+ zIndex: "var(--prime-z-toast)"
13432
+ });
13433
+ ctx.scale(dpr, dpr);
13434
+ document.body.append(canvas);
13435
+ const css = getComputedStyle(themed);
13436
+ const colors = COLOR_TOKENS.map((token) => css.getPropertyValue(token).trim()).filter(Boolean);
13437
+ const palette = colors.length > 0 ? colors : ["currentColor"];
13438
+ const pieces = Array.from({ length: PIECES }, () => {
13439
+ const direction = -Math.PI / 2 + (Math.random() - 0.5) * (Math.PI * 2) / 3;
13440
+ const speed = 0.45 + Math.random() * 0.75;
13441
+ return {
13442
+ x,
13443
+ y,
13444
+ vx: Math.cos(direction) * speed,
13445
+ vy: Math.sin(direction) * speed,
13446
+ angle: Math.random() * Math.PI,
13447
+ spin: (Math.random() - 0.5) * 0.02,
13448
+ size: 5 + Math.random() * 5,
13449
+ color: palette[Math.floor(Math.random() * palette.length)]
13450
+ };
13451
+ });
13452
+ return new Promise((resolve) => {
13453
+ const start = performance.now();
13454
+ let prev = start;
13455
+ const frame = (now) => {
13456
+ const t = now - start;
13457
+ const dt = Math.min(32, now - prev);
13458
+ prev = now;
13459
+ ctx.clearRect(0, 0, width, height);
13460
+ if (t >= DURATION_MS) {
13461
+ canvas.remove();
13462
+ resolve();
13463
+ return;
13464
+ }
13465
+ ctx.globalAlpha = t < DURATION_MS * 0.6 ? 1 : 1 - (t - DURATION_MS * 0.6) / (DURATION_MS * 0.4);
13466
+ for (const piece of pieces) {
13467
+ piece.vy += GRAVITY * dt;
13468
+ piece.vx *= 1 - DRAG * dt;
13469
+ piece.vy *= 1 - DRAG * dt;
13470
+ piece.x += piece.vx * dt;
13471
+ piece.y += piece.vy * dt;
13472
+ piece.angle += piece.spin * dt;
13473
+ ctx.save();
13474
+ ctx.translate(piece.x, piece.y);
13475
+ ctx.rotate(piece.angle);
13476
+ ctx.fillStyle = piece.color;
13477
+ ctx.fillRect(-piece.size / 2, -piece.size / 4, piece.size, piece.size / 2);
13478
+ ctx.restore();
13479
+ }
13480
+ requestAnimationFrame(frame);
13481
+ };
13482
+ requestAnimationFrame(frame);
13483
+ });
13484
+ }
13485
+
13197
13486
  export {
13198
13487
  Kbd,
13199
13488
  AppHeader,
@@ -13234,7 +13523,6 @@ export {
13234
13523
  applyTheme,
13235
13524
  SegmentedControl,
13236
13525
  ExampleFrame,
13237
- ProgressBar,
13238
13526
  FileUpload,
13239
13527
  Kanban,
13240
13528
  Typography,
@@ -13251,10 +13539,12 @@ export {
13251
13539
  matchesSmartFilter,
13252
13540
  resolveSmartFilterValues,
13253
13541
  SmartFilter,
13542
+ Sparkline,
13254
13543
  Stepper,
13255
13544
  Switch,
13256
13545
  Tabs,
13257
13546
  TagSelect,
13258
13547
  Textarea,
13259
- Timeline
13548
+ Timeline,
13549
+ celebrate
13260
13550
  };