jenosize-ui 0.2.0 → 0.2.2

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 (184) hide show
  1. package/README.md +2 -2
  2. package/dist/{PaymentInput-CKPIPNWH.d.ts → PaymentInput-Dn5WVQVy.d.ts} +4 -0
  3. package/dist/{Select-CVbEQ2Ep.d.ts → Select-Dt5ARIH8.d.ts} +4 -0
  4. package/dist/{TagInput-CTJYOB4J.d.ts → TagInput-BaBeve6L.d.ts} +4 -0
  5. package/dist/area-chart.d.ts +3 -2
  6. package/dist/area-chart.js +6 -5
  7. package/dist/avatar.d.ts +5 -0
  8. package/dist/avatar.js +10 -9
  9. package/dist/badge.d.ts +4 -0
  10. package/dist/badge.js +5 -4
  11. package/dist/bar-chart.d.ts +3 -2
  12. package/dist/bar-chart.js +6 -5
  13. package/dist/breadcrumb.d.ts +4 -0
  14. package/dist/breadcrumb.js +4 -2
  15. package/dist/button.d.ts +6 -1
  16. package/dist/button.js +9 -8
  17. package/dist/calendar.d.ts +5 -0
  18. package/dist/calendar.js +16 -14
  19. package/dist/callout.d.ts +6 -6
  20. package/dist/callout.js +11 -9
  21. package/dist/card-D56VxyAe.d.ts +123 -0
  22. package/dist/card.d.ts +3 -51
  23. package/dist/card.js +5 -5
  24. package/dist/checkbox.js +8 -7
  25. package/dist/{chunk-75M43ELV.js → chunk-22M75A3N.js} +75 -45
  26. package/dist/{chunk-X2X7Q7NW.js → chunk-2R3QWWOT.js} +3 -3
  27. package/dist/{chunk-A46ED5JQ.js → chunk-33TOK7ES.js} +7 -5
  28. package/dist/{chunk-BNIWT6CW.js → chunk-3HOHLQVP.js} +7 -6
  29. package/dist/{chunk-DJYWPJZ3.js → chunk-3QXLIZIX.js} +3 -12
  30. package/dist/chunk-3ZEEGXYF.js +8 -0
  31. package/dist/chunk-45Y2ZGNK.js +34 -0
  32. package/dist/{chunk-ILICYNK7.js → chunk-4RBIWI2Q.js} +3 -3
  33. package/dist/{chunk-EX374YWB.js → chunk-54SIZR63.js} +15 -7
  34. package/dist/chunk-5AZKP4KZ.js +49 -0
  35. package/dist/{chunk-NA35YZRD.js → chunk-5DP7W5HX.js} +13 -11
  36. package/dist/{chunk-QKDEQFOQ.js → chunk-5KSD4WKN.js} +13 -4
  37. package/dist/{chunk-RIXEUAPY.js → chunk-5XPMY2LF.js} +5 -5
  38. package/dist/{chunk-L53Y7KUV.js → chunk-5YWH2ANQ.js} +62 -29
  39. package/dist/{chunk-6UBYHSBX.js → chunk-5ZEUTSCV.js} +5 -5
  40. package/dist/{chunk-JAVNGTOE.js → chunk-6MMBQVRO.js} +58 -43
  41. package/dist/{chunk-RNXRZGXN.js → chunk-74AIU53R.js} +5 -3
  42. package/dist/{chunk-JMWYCT63.js → chunk-7GUPNTAH.js} +14 -6
  43. package/dist/{chunk-DCGTB7P7.js → chunk-7QXOGAN6.js} +111 -39
  44. package/dist/{chunk-TBN644IN.js → chunk-7ZM7SNCZ.js} +3 -3
  45. package/dist/{chunk-AC6ZWKRN.js → chunk-AFYXSZGW.js} +2 -2
  46. package/dist/chunk-AIARANKE.js +33 -0
  47. package/dist/{chunk-54S5CUY6.js → chunk-AIGYMTCU.js} +5 -4
  48. package/dist/{chunk-C6OTOTKI.js → chunk-AZ7DKRBY.js} +5 -5
  49. package/dist/{chunk-QBHQOX23.js → chunk-BBKE4W3B.js} +18 -10
  50. package/dist/{chunk-FFTRB2UU.js → chunk-CFFWYXDW.js} +18 -6
  51. package/dist/{chunk-42FCPC77.js → chunk-CGHYXWTT.js} +10 -4
  52. package/dist/{chunk-FZBZGA3P.js → chunk-CGZXQ7PA.js} +4 -4
  53. package/dist/{chunk-GAFGIT4Q.js → chunk-D6XO4JVM.js} +30 -10
  54. package/dist/{chunk-GTHJWR3Q.js → chunk-D7EE5GWU.js} +21 -22
  55. package/dist/{chunk-USL3TDZM.js → chunk-DD5KJVFV.js} +321 -105
  56. package/dist/{chunk-NMERLWT7.js → chunk-E2YZ7IMT.js} +23 -7
  57. package/dist/{chunk-5JRM3OES.js → chunk-FNQJJO63.js} +3 -3
  58. package/dist/{chunk-MD4AR43X.js → chunk-FWRHBMWT.js} +3 -3
  59. package/dist/{chunk-4K6V6NNK.js → chunk-GLKFFA7N.js} +10 -8
  60. package/dist/{chunk-EDOUI2BG.js → chunk-GQRSABRN.js} +4 -4
  61. package/dist/{chunk-PO2TYK3C.js → chunk-GWYDOZGQ.js} +3 -3
  62. package/dist/{chunk-HSVBTIP2.js → chunk-HHYEAFCL.js} +70 -27
  63. package/dist/{chunk-DTMYD63D.js → chunk-HV2W6HUR.js} +47 -27
  64. package/dist/{chunk-P7DH62UY.js → chunk-I6WMNXC7.js} +5 -5
  65. package/dist/{chunk-6HJA7NPL.js → chunk-IEAWNA3V.js} +9 -4
  66. package/dist/{chunk-34J5AANZ.js → chunk-IQNVSQRK.js} +3 -3
  67. package/dist/{chunk-MCUASLZH.js → chunk-KHGW72BM.js} +3 -3
  68. package/dist/{chunk-FIGBJGH2.js → chunk-KJ5JUS53.js} +115 -79
  69. package/dist/{chunk-4R7WDDCW.js → chunk-KZP6B6B3.js} +4 -4
  70. package/dist/{chunk-4W6AYGLR.js → chunk-LE44X5GS.js} +55 -39
  71. package/dist/{chunk-7HV6EIGZ.js → chunk-LLPWQDF7.js} +3 -3
  72. package/dist/{chunk-JXHZHUB3.js → chunk-LQURV7HQ.js} +9 -7
  73. package/dist/{chunk-EDT5J5WK.js → chunk-LYXPJERB.js} +14 -4
  74. package/dist/{chunk-6IUTVDNI.js → chunk-MCQG4H6T.js} +35 -3
  75. package/dist/{chunk-4BRMM3I5.js → chunk-MFFA5MXY.js} +7 -6
  76. package/dist/{chunk-PXEJ5RKO.js → chunk-N3RVMBPX.js} +6 -9
  77. package/dist/{chunk-VH35QHD4.js → chunk-NC63TYNW.js} +16 -8
  78. package/dist/{chunk-VWGAMOSE.js → chunk-NKG4N6HA.js} +3 -3
  79. package/dist/{chunk-A5WQLN4B.js → chunk-OACWA4TC.js} +14 -52
  80. package/dist/{chunk-LBYCCLVI.js → chunk-OLLD2BZN.js} +9 -9
  81. package/dist/{chunk-T2WAD4QP.js → chunk-POQTE7JI.js} +55 -16
  82. package/dist/{chunk-74HPBSVY.js → chunk-QDKETK7D.js} +4 -4
  83. package/dist/{chunk-VEOYCAJP.js → chunk-QNIKRB62.js} +27 -7
  84. package/dist/{chunk-JYBGO6GY.js → chunk-R4Z7BINC.js} +11 -8
  85. package/dist/chunk-RJTVCA62.js +42 -0
  86. package/dist/{chunk-3GT43XPK.js → chunk-SB3DG572.js} +15 -8
  87. package/dist/{chunk-FKVPAEJ6.js → chunk-SKJC2KYD.js} +4 -3
  88. package/dist/{chunk-NKDW6C7K.js → chunk-SKRR3ZMP.js} +3 -3
  89. package/dist/{chunk-CTENRS34.js → chunk-T4ZFZTY6.js} +8 -6
  90. package/dist/{chunk-YLEHYDXC.js → chunk-T5574MXM.js} +33 -45
  91. package/dist/{chunk-4HKDD3PR.js → chunk-TX57TNJS.js} +92 -58
  92. package/dist/{chunk-CWMFEF6R.js → chunk-UGBNYSBN.js} +81 -29
  93. package/dist/{chunk-M5TVCASC.js → chunk-ULGCGKOE.js} +8 -6
  94. package/dist/{chunk-JUWDRRD6.js → chunk-X2VMIBK5.js} +4 -4
  95. package/dist/{chunk-763VS2FY.js → chunk-YHBI52P2.js} +3 -3
  96. package/dist/chunk-YIHKQ63K.js +13 -0
  97. package/dist/{chunk-3Z3SDKIA.js → chunk-YPNL2NBD.js} +5 -5
  98. package/dist/{chunk-MYQ3FD4Y.js → chunk-ZD3MOLIB.js} +8 -5
  99. package/dist/{chunk-BD5YKFRA.js → chunk-ZR6HNKSN.js} +5 -3
  100. package/dist/{chunk-WKWAUU64.js → chunk-ZZSNTCCL.js} +6 -5
  101. package/dist/combobox.d.ts +5 -0
  102. package/dist/combobox.js +13 -12
  103. package/dist/date-input.d.ts +4 -0
  104. package/dist/date-input.js +11 -9
  105. package/dist/date-picker.d.ts +6 -0
  106. package/dist/date-picker.js +24 -22
  107. package/dist/dialog.d.ts +21 -1
  108. package/dist/dialog.js +11 -9
  109. package/dist/drawer.d.ts +11 -1
  110. package/dist/drawer.js +10 -8
  111. package/dist/dropdown-menu.d.ts +12 -0
  112. package/dist/dropdown-menu.js +7 -6
  113. package/dist/dropzone.d.ts +3 -2
  114. package/dist/dropzone.js +13 -12
  115. package/dist/form.d.ts +5 -4
  116. package/dist/form.js +61 -45
  117. package/dist/header-navigation.d.ts +5 -1
  118. package/dist/header-navigation.js +21 -19
  119. package/dist/helper.d.ts +36 -0
  120. package/dist/helper.js +3 -0
  121. package/dist/index.d.ts +13 -11
  122. package/dist/index.js +83 -78
  123. package/dist/indicator.js +4 -4
  124. package/dist/input.d.ts +4 -0
  125. package/dist/input.js +9 -8
  126. package/dist/kanban-board.d.ts +21 -81
  127. package/dist/kanban-board.js +15 -13
  128. package/dist/labels-DPrh0se9.d.ts +627 -0
  129. package/dist/line-chart.d.ts +3 -2
  130. package/dist/line-chart.js +6 -5
  131. package/dist/{nav-DcCyt00p.d.ts → nav-CKKqjBs6.d.ts} +10 -0
  132. package/dist/number-input.d.ts +4 -0
  133. package/dist/number-input.js +9 -8
  134. package/dist/pagination.d.ts +7 -1
  135. package/dist/pagination.js +11 -10
  136. package/dist/payment-input.d.ts +3 -2
  137. package/dist/payment-input.js +9 -8
  138. package/dist/pie-chart.d.ts +7 -3
  139. package/dist/pie-chart.js +6 -5
  140. package/dist/popover.js +10 -8
  141. package/dist/progress-steps.js +2 -2
  142. package/dist/progress.d.ts +21 -1
  143. package/dist/progress.js +3 -2
  144. package/dist/provider.d.ts +212 -0
  145. package/dist/provider.js +7 -0
  146. package/dist/radar-chart.d.ts +7 -3
  147. package/dist/radar-chart.js +6 -5
  148. package/dist/radial-chart.d.ts +7 -3
  149. package/dist/radial-chart.js +6 -5
  150. package/dist/radio.js +8 -7
  151. package/dist/scroll-area.js +2 -2
  152. package/dist/select.d.ts +2 -1
  153. package/dist/select.js +15 -14
  154. package/dist/shared-CxAedkiy.d.ts +68 -0
  155. package/dist/sidebar-navigation.d.ts +36 -7
  156. package/dist/sidebar-navigation.js +15 -13
  157. package/dist/skeleton.js +2 -2
  158. package/dist/styles.css +1 -1
  159. package/dist/switch.js +4 -4
  160. package/dist/table.d.ts +56 -6
  161. package/dist/table.js +37 -35
  162. package/dist/tabs.d.ts +22 -0
  163. package/dist/tabs.js +3 -3
  164. package/dist/tag-input.d.ts +3 -2
  165. package/dist/tag-input.js +12 -11
  166. package/dist/tag.d.ts +4 -0
  167. package/dist/tag.js +3 -2
  168. package/dist/textarea.js +6 -5
  169. package/dist/theme.css +69 -6
  170. package/dist/theme.js +10 -9
  171. package/dist/toast.d.ts +11 -2
  172. package/dist/toast.js +11 -9
  173. package/dist/{tooltip-surface-Dmvb8v5K.d.ts → tooltip-surface-C2I9o2QM.d.ts} +1 -1
  174. package/dist/tooltip.d.ts +2 -2
  175. package/dist/tooltip.js +3 -3
  176. package/dist/tree.d.ts +5 -0
  177. package/dist/tree.js +5 -4
  178. package/dist/{types-6kvYwtRH.d.ts → types-DR9rAEy1.d.ts} +45 -13
  179. package/dist/{use-uploads-ButS4dGe.d.ts → use-uploads-KaPqDklo.d.ts} +9 -0
  180. package/dist/verification-code-input.js +8 -7
  181. package/package.json +12 -1
  182. package/dist/chunk-MFJP5FA7.js +0 -20
  183. package/dist/shared-BNXAdgh2.d.ts +0 -9
  184. package/dist/surface-DFyDnrTJ.d.ts +0 -34
@@ -1,12 +1,13 @@
1
1
  import { DRAG_GHOST, DROP_LINE, DROP_LINE_Y, dragGhostProps, ghostPosition } from './chunk-5ZPUAGOP.js';
2
2
  import { useAutoScroll, useDrag } from './chunk-P6CON2R2.js';
3
- import { Skeleton } from './chunk-7HV6EIGZ.js';
3
+ import { Skeleton } from './chunk-LLPWQDF7.js';
4
4
  import { useDebounced } from './chunk-F6NLE6XJ.js';
5
- import { Slot } from './chunk-52IFGFTL.js';
6
5
  import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
6
+ import { Slot } from './chunk-52IFGFTL.js';
7
7
  import { LoaderCircleIcon, CircleAlertIcon, ChevronRightIcon, GripVerticalIcon, CheckIcon, MinusIcon } from './chunk-BLIZ3CL3.js';
8
- import { devWarn, warnNonNegativeInt, warnNeedsName } from './chunk-QDYE5LVT.js';
9
8
  import { cn } from './chunk-ZSNJ6UA3.js';
9
+ import { useLabels } from './chunk-RJTVCA62.js';
10
+ import { devWarn, warnNonNegativeInt, warnNeedsName } from './chunk-QDYE5LVT.js';
10
11
  import * as React from 'react';
11
12
  import { mergeProps } from '@base-ui/react/merge-props';
12
13
  import { useRender } from '@base-ui/react/use-render';
@@ -774,6 +775,28 @@ function treeKeydown(event, ctx) {
774
775
  }
775
776
  }
776
777
  }
778
+
779
+ // src/components/tree/labels.ts
780
+ var TREE_LABELS = {
781
+ /** The default behind the `emptyMessage` prop. */
782
+ emptyMessage: "Nothing here",
783
+ /** The OTHER empty state: "nothing matched" and "there is nothing here" are different sentences. */
784
+ noMatches: (ctx) => `No matches for \u201C${ctx.query}\u201D`,
785
+ /** A branch whose lazy children failed to load, and the button beside it. */
786
+ loadError: "Couldn\u2019t load",
787
+ retry: "Retry",
788
+ /** The name a moved node falls back to when its label is a node, not a string. */
789
+ itemFallback: "Item",
790
+ /**
791
+ * The reorder live region.
792
+ *
793
+ * The ctx carries the raw `position` union, not an English preposition — a translation should not
794
+ * have to parse `"into"`, so the position → verb mapping is this default's job.
795
+ */
796
+ moved: (ctx) => `${ctx.name} moved ${ctx.position === "child" ? "into" : ctx.position} ${ctx.target}`,
797
+ /** The same move with no named target. */
798
+ movedRoot: (ctx) => `${ctx.name} moved`
799
+ };
777
800
  var TREE_INDENT = 20;
778
801
  var HALF_GLYPH = { md: 8, lg: 10 };
779
802
  var ROW_PX = { md: 6, lg: 8 };
@@ -976,7 +999,7 @@ function TreeItem({
976
999
  reserve,
977
1000
  lastChain
978
1001
  }) {
979
- const { tree, size, guide, emptyMessage } = ctx;
1002
+ const { tree, size, guide, emptyMessage, t } = ctx;
980
1003
  const rowId = React.useId();
981
1004
  const branch = isBranch(node);
982
1005
  const children = node.children;
@@ -1020,8 +1043,8 @@ function TreeItem({
1020
1043
  interactive content in a tree, and it is NOT in `tree.visible`, so ↑↓ skip it. */
1021
1044
  /* @__PURE__ */ jsxs("li", { role: "none", className: cn("flex items-center gap-2", EMPTY_ROW[size]), style: groupRowStyle, children: [
1022
1045
  groupRules,
1023
- /* @__PURE__ */ jsx("span", { className: "text-error-primary", children: "Couldn\u2019t load" }),
1024
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => tree.retryLoad(node.id), className: RETRY_BUTTON, children: "Retry" })
1046
+ /* @__PURE__ */ jsx("span", { className: "text-error-primary", children: t.loadError }),
1047
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => tree.retryLoad(node.id), className: RETRY_BUTTON, children: t.retry })
1025
1048
  ] })
1026
1049
  ) }) }) : null,
1027
1050
  branch && children != null ? /* @__PURE__ */ jsx(
@@ -1062,7 +1085,9 @@ function TreeRows({
1062
1085
  )) });
1063
1086
  }
1064
1087
  function Tree(props) {
1065
- const { tree, size = "md", guide = "line", emptyMessage = "Nothing here", render, className, ...rest } = props;
1088
+ const { tree, size = "md", guide = "line", emptyMessage, labels, render, className, ...rest } = props;
1089
+ const t = useLabels("tree", TREE_LABELS, labels);
1090
+ const resolvedEmptyMessage = emptyMessage ?? t.emptyMessage;
1066
1091
  warnNeedsName("Tree", rest["aria-label"] != null || rest["aria-labelledby"] != null, "`aria-label` or `aria-labelledby`");
1067
1092
  const rootRef = React.useRef(null);
1068
1093
  const [focusedId, setFocusedId] = React.useState(null);
@@ -1114,13 +1139,13 @@ function Tree(props) {
1114
1139
  (committed) => {
1115
1140
  const moved = tree.nodeById(committed.id);
1116
1141
  const target = tree.nodeById(committed.target);
1117
- const name = typeof moved?.label === "string" ? moved.label : "Item";
1142
+ const name = typeof moved?.label === "string" ? moved.label : t.itemFallback;
1118
1143
  const into = typeof target?.label === "string" ? target.label : "";
1119
- const verb = committed.position === "child" ? "into" : committed.position;
1120
1144
  clearTimeout(announceTimer.current ?? void 0);
1121
- announceTimer.current = setTimeout(() => setAnnouncement(into ? `${name} moved ${verb} ${into}` : `${name} moved`), ANNOUNCE_DEBOUNCE_MS);
1145
+ const sentence = into ? t.moved({ name, position: committed.position, target: into }) : t.movedRoot({ name });
1146
+ announceTimer.current = setTimeout(() => setAnnouncement(sentence), ANNOUNCE_DEBOUNCE_MS);
1122
1147
  },
1123
- [tree]
1148
+ [tree, t]
1124
1149
  );
1125
1150
  const onRowClick = React.useCallback(
1126
1151
  (id, event) => {
@@ -1301,8 +1326,22 @@ function Tree(props) {
1301
1326
  [announce, moveFocus, resolvedFocus, tree]
1302
1327
  );
1303
1328
  const ctx = React.useMemo(
1304
- () => ({ tree, size, guide, emptyMessage, focusedId: resolvedFocus, onRowFocus, showMarkers, keptIds, onRowClick, onRowDoubleClick, drag, dragHandlers }),
1305
- [tree, size, guide, emptyMessage, resolvedFocus, onRowFocus, showMarkers, keptIds, onRowClick, onRowDoubleClick, drag, dragHandlers]
1329
+ () => ({
1330
+ tree,
1331
+ size,
1332
+ guide,
1333
+ emptyMessage: resolvedEmptyMessage,
1334
+ t,
1335
+ focusedId: resolvedFocus,
1336
+ onRowFocus,
1337
+ showMarkers,
1338
+ keptIds,
1339
+ onRowClick,
1340
+ onRowDoubleClick,
1341
+ drag,
1342
+ dragHandlers
1343
+ }),
1344
+ [tree, size, guide, resolvedEmptyMessage, t, resolvedFocus, onRowFocus, showMarkers, keptIds, onRowClick, onRowDoubleClick, drag, dragHandlers]
1306
1345
  );
1307
1346
  const empty = tree.visible.length === 0;
1308
1347
  const element = useRender({
@@ -1320,7 +1359,7 @@ function Tree(props) {
1320
1359
  onKeyDown: handleKeyDown,
1321
1360
  onBlur: handleBlur,
1322
1361
  className: cn("", className),
1323
- children: empty ? /* @__PURE__ */ jsx("li", { role: "none", className: EMPTY_ROW[size], children: tree.isFiltering ? `No matches for \u201C${tree.query}\u201D` : emptyMessage }) : /* @__PURE__ */ jsx(TreeRows, { nodes: tree.nodes, depth: 0, ctx, parentChain: [] })
1362
+ children: empty ? /* @__PURE__ */ jsx("li", { role: "none", className: EMPTY_ROW[size], children: tree.isFiltering ? t.noMatches({ query: tree.query }) : resolvedEmptyMessage }) : /* @__PURE__ */ jsx(TreeRows, { nodes: tree.nodes, depth: 0, ctx, parentChain: [] })
1324
1363
  },
1325
1364
  rest
1326
1365
  )
@@ -1334,5 +1373,5 @@ function Tree(props) {
1334
1373
  Tree.displayName = "Tree";
1335
1374
 
1336
1375
  export { Tree, ancestorIds, applyTreeMove, attachChildren, isBranch, isDescendant, useTree, walkTree };
1337
- //# sourceMappingURL=chunk-T2WAD4QP.js.map
1338
- //# sourceMappingURL=chunk-T2WAD4QP.js.map
1376
+ //# sourceMappingURL=chunk-POQTE7JI.js.map
1377
+ //# sourceMappingURL=chunk-POQTE7JI.js.map
@@ -1,6 +1,6 @@
1
- import { OptionRow } from './chunk-GTHJWR3Q.js';
2
- import { warnNeedsName } from './chunk-QDYE5LVT.js';
1
+ import { OptionRow } from './chunk-D7EE5GWU.js';
3
2
  import { cn } from './chunk-ZSNJ6UA3.js';
3
+ import { warnNeedsName } from './chunk-QDYE5LVT.js';
4
4
  import { Switch as Switch$1 } from '@base-ui/react/switch';
5
5
  import * as React from 'react';
6
6
  import { jsx } from 'react/jsx-runtime';
@@ -63,5 +63,5 @@ function Switch(props) {
63
63
  }
64
64
 
65
65
  export { Switch };
66
- //# sourceMappingURL=chunk-74HPBSVY.js.map
67
- //# sourceMappingURL=chunk-74HPBSVY.js.map
66
+ //# sourceMappingURL=chunk-QDKETK7D.js.map
67
+ //# sourceMappingURL=chunk-QDKETK7D.js.map
@@ -1,11 +1,17 @@
1
- import { PanelChrome } from './chunk-FZBZGA3P.js';
2
- import { CloseButton } from './chunk-42FCPC77.js';
1
+ import { PanelChrome } from './chunk-CGZXQ7PA.js';
2
+ import { CloseButton } from './chunk-CGHYXWTT.js';
3
3
  import { BACKDROP_MOTION, DIALOG_POPUP_MOTION } from './chunk-O4GRKO3I.js';
4
4
  import { cn } from './chunk-ZSNJ6UA3.js';
5
5
  import { Dialog } from '@base-ui/react/dialog';
6
6
  import * as React from 'react';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
8
8
 
9
+ // src/components/overlay/backdrop.ts
10
+ var OVERLAY_BACKDROPS = ["scrim", "blur"];
11
+ var BACKDROP_TREATMENT = {
12
+ scrim: "bg-overlay",
13
+ blur: "bg-overlay-soft backdrop-blur-overlay"
14
+ };
9
15
  var DIALOG_SIZE = {
10
16
  sm: "max-w-sm",
11
17
  md: "max-w-lg",
@@ -25,10 +31,24 @@ function useControllableOpen(open, defaultOpen, onOpenChange) {
25
31
  return [value, setOpen];
26
32
  }
27
33
  function DialogSurface(props) {
28
- const { size = "md", showClose, dividers, keepMounted, title, description, leading, trailing, footer, className, children, close } = props;
34
+ const {
35
+ size = "md",
36
+ backdrop = "scrim",
37
+ showClose,
38
+ dividers,
39
+ keepMounted,
40
+ title,
41
+ description,
42
+ leading,
43
+ trailing,
44
+ footer,
45
+ className,
46
+ children,
47
+ close
48
+ } = props;
29
49
  const ariaLabel = props["aria-label"];
30
50
  return /* @__PURE__ */ jsxs(Dialog.Portal, { keepMounted, children: [
31
- /* @__PURE__ */ jsx(Dialog.Backdrop, { className: cn("fixed inset-0 z-50 bg-overlay", BACKDROP_MOTION) }),
51
+ /* @__PURE__ */ jsx(Dialog.Backdrop, { className: cn("fixed inset-0 z-50", BACKDROP_TREATMENT[backdrop], BACKDROP_MOTION) }),
32
52
  /* @__PURE__ */ jsx("div", { className: "pointer-events-none fixed inset-0 z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ jsx(
33
53
  PanelChrome,
34
54
  {
@@ -63,6 +83,6 @@ function DialogSurface(props) {
63
83
  ] });
64
84
  }
65
85
 
66
- export { DialogSurface, useControllableOpen };
67
- //# sourceMappingURL=chunk-VEOYCAJP.js.map
68
- //# sourceMappingURL=chunk-VEOYCAJP.js.map
86
+ export { BACKDROP_TREATMENT, DialogSurface, OVERLAY_BACKDROPS, useControllableOpen };
87
+ //# sourceMappingURL=chunk-QNIKRB62.js.map
88
+ //# sourceMappingURL=chunk-QNIKRB62.js.map
@@ -1,18 +1,21 @@
1
- import { useTagInput, TAG_PILL_FOCUS_RING } from './chunk-VH35QHD4.js';
2
- import { Tag } from './chunk-EDT5J5WK.js';
3
- import { useTagRow } from './chunk-6HJA7NPL.js';
4
- import { FieldShell } from './chunk-JUWDRRD6.js';
5
- import { useFieldValidity, FieldFrame } from './chunk-QKDEQFOQ.js';
1
+ import { TAG_INPUT_LABELS, useTagInput, TAG_PILL_FOCUS_RING } from './chunk-NC63TYNW.js';
2
+ import { Tag } from './chunk-LYXPJERB.js';
3
+ import { useTagRow } from './chunk-IEAWNA3V.js';
4
+ import { FieldShell } from './chunk-X2VMIBK5.js';
5
+ import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
6
6
  import { cn } from './chunk-ZSNJ6UA3.js';
7
+ import { useLabels } from './chunk-RJTVCA62.js';
7
8
  import { Field } from '@base-ui/react/field';
8
9
  import 'react';
9
10
  import { jsxs, jsx } from 'react/jsx-runtime';
10
11
 
11
12
  var PILL_SIZE = { sm: "sm", md: "md", lg: "md" };
12
13
  function TagInputOuter(props) {
14
+ const t = useLabels("tagInput", TAG_INPUT_LABELS, props.labels);
13
15
  const {
14
16
  size = "md",
15
- placeholder = "Add tag\u2026",
17
+ placeholder = t.placeholder,
18
+ labels: _labels,
16
19
  label,
17
20
  tooltip,
18
21
  tooltipDescription,
@@ -111,5 +114,5 @@ function TagInputOuter(props) {
111
114
  }
112
115
 
113
116
  export { TagInputOuter };
114
- //# sourceMappingURL=chunk-JYBGO6GY.js.map
115
- //# sourceMappingURL=chunk-JYBGO6GY.js.map
117
+ //# sourceMappingURL=chunk-R4Z7BINC.js.map
118
+ //# sourceMappingURL=chunk-R4Z7BINC.js.map
@@ -0,0 +1,42 @@
1
+ import { devWarn } from './chunk-QDYE5LVT.js';
2
+ import * as React from 'react';
3
+
4
+ var LabelsContext = React.createContext(void 0);
5
+ if (process.env.NODE_ENV !== "production") LabelsContext.displayName = "JenosizeUILabelsContext";
6
+ function resolveOne(scope, key, fallback, override) {
7
+ if (override === void 0) return fallback;
8
+ if (typeof fallback === "function") return typeof override === "function" ? override : () => override;
9
+ if (typeof override === "string") return override;
10
+ devWarn(`labels.${scope}.${key} must be a string \u2014 a function was given for a key that takes no context. Ignored.`);
11
+ return fallback;
12
+ }
13
+ function useLabels(scope, defaults, local) {
14
+ const app = React.useContext(LabelsContext)?.[scope];
15
+ return React.useMemo(() => {
16
+ if (app === void 0 && local === void 0) return defaults;
17
+ const merged = {};
18
+ for (const [key, fallback] of Object.entries(defaults)) {
19
+ const override = local?.[key] ?? app?.[key];
20
+ merged[key] = resolveOne(scope, key, fallback, override);
21
+ }
22
+ return merged;
23
+ }, [scope, defaults, app, local]);
24
+ }
25
+ function usePublishedLabels(scope, local) {
26
+ const outer = React.useContext(LabelsContext);
27
+ return React.useMemo(() => local === void 0 ? outer : mergeLabels(outer, { [scope]: local }), [outer, scope, local]);
28
+ }
29
+ function mergeLabels(outer, inner) {
30
+ if (outer === void 0) return inner;
31
+ if (inner === void 0) return outer;
32
+ const merged = { ...outer };
33
+ for (const [scope, table] of Object.entries(inner)) {
34
+ const before = merged[scope];
35
+ merged[scope] = before === void 0 ? table : { ...before, ...table };
36
+ }
37
+ return merged;
38
+ }
39
+
40
+ export { LabelsContext, mergeLabels, useLabels, usePublishedLabels };
41
+ //# sourceMappingURL=chunk-RJTVCA62.js.map
42
+ //# sourceMappingURL=chunk-RJTVCA62.js.map
@@ -1,8 +1,9 @@
1
1
  import { useControlScrollFade } from './chunk-7EUAMHMU.js';
2
- import { FieldShell } from './chunk-JUWDRRD6.js';
3
- import { useFieldValidity, FieldFrame } from './chunk-QKDEQFOQ.js';
4
- import { warnPositiveInt } from './chunk-QDYE5LVT.js';
2
+ import { FieldShell } from './chunk-X2VMIBK5.js';
3
+ import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
5
4
  import { cn } from './chunk-ZSNJ6UA3.js';
5
+ import { useLabels } from './chunk-RJTVCA62.js';
6
+ import { warnPositiveInt } from './chunk-QDYE5LVT.js';
6
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
8
  import { Field } from '@base-ui/react/field';
8
9
  import * as React from 'react';
@@ -257,8 +258,12 @@ function applyCardNumberEdit(rawValue, caret, previous, maxDigits = DEFAULT_MAX_
257
258
  const value = groupDigits(digits, CARD_GROUPS[detectCardType(digits)]);
258
259
  return { value, caret: caretAfterDigits(value, before) };
259
260
  }
260
- var DEFAULT_BRAND_ERROR = "This card type isn't accepted.";
261
- var DEFAULT_LUHN_ERROR = "Check the card number \u2014 a digit looks wrong.";
261
+
262
+ // src/components/payment-input/labels.ts
263
+ var PAYMENT_INPUT_LABELS = {
264
+ brandError: "This card type isn't accepted.",
265
+ luhnError: "Check the card number \u2014 a digit looks wrong."
266
+ };
262
267
  var LOGO_PL = { sm: "pl-1.5 gap-2", md: "pl-2", lg: "pl-2.5" };
263
268
  function PaymentInput(props) {
264
269
  const {
@@ -280,6 +285,7 @@ function PaymentInput(props) {
280
285
  acceptedBrands,
281
286
  brandError,
282
287
  luhnError,
288
+ labels,
283
289
  maxDigits = DEFAULT_MAX_DIGITS,
284
290
  required = false,
285
291
  hideRequiredIndicator = false,
@@ -294,6 +300,7 @@ function PaymentInput(props) {
294
300
  const inputRef = React.useRef(null);
295
301
  const { ref: fadeRef, style: fadeStyle } = useControlScrollFade(scrollFade, "horizontal", inputRef);
296
302
  const isControlled = value !== void 0;
303
+ const t = useLabels("paymentInput", PAYMENT_INPUT_LABELS, labels);
297
304
  warnPositiveInt("PaymentInput", "maxDigits", maxDigits);
298
305
  const [internal, setInternal] = React.useState(() => formatCardNumber(defaultValue ?? "", maxDigits));
299
306
  const [focused, setFocused] = React.useState(false);
@@ -303,7 +310,7 @@ function PaymentInput(props) {
303
310
  const brandRejected = acceptedBrands != null && cardType !== "unknown" && !acceptedBrands.includes(cardType);
304
311
  const checksumFailed = hasChecksumError(current, maxDigits) && (!focused || isLengthSettled(current, maxDigits));
305
312
  const parentHasError = error != null && error !== "";
306
- const effectiveError = parentHasError ? error : brandRejected ? brandError ?? DEFAULT_BRAND_ERROR : checksumFailed ? luhnError ?? DEFAULT_LUHN_ERROR : void 0;
313
+ const effectiveError = parentHasError ? error : brandRejected ? brandError ?? t.brandError : checksumFailed ? luhnError ?? t.luhnError : void 0;
307
314
  const { isInvalid, showError } = useFieldValidity(invalid, effectiveError);
308
315
  const caretRef = React.useRef(null);
309
316
  React.useLayoutEffect(() => {
@@ -383,5 +390,5 @@ function PaymentInput(props) {
383
390
  }
384
391
 
385
392
  export { CARD_ICON, DEFAULT_MAX_DIGITS, PaymentInput, applyCardNumberEdit, detectCardType, formatCardNumber, hasChecksumError, isCompleteCardNumber, isLengthSettled, luhnValid, onlyDigits };
386
- //# sourceMappingURL=chunk-3GT43XPK.js.map
387
- //# sourceMappingURL=chunk-3GT43XPK.js.map
393
+ //# sourceMappingURL=chunk-SB3DG572.js.map
394
+ //# sourceMappingURL=chunk-SB3DG572.js.map
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
7
7
  var ROOT = "flex flex-col";
8
- var VIEWPORT = "min-h-0 flex-1 overscroll-contain outline-none";
8
+ var VIEWPORT = "min-h-0 flex-1 outline-none data-[has-overflow-x]:overscroll-x-contain data-[has-overflow-y]:overscroll-y-contain";
9
9
  var BAR = "z-10 flex touch-none opacity-0 transition-opacity duration-150 select-none data-[hovering]:opacity-100 data-[scrolling]:opacity-100";
10
10
  var BAR_V = cn(BAR, "w-1.5 px-px py-2");
11
11
  var BAR_H = cn(BAR, "h-1.5 flex-col px-2 py-px");
@@ -38,6 +38,7 @@ function ScrollView(props) {
38
38
  ScrollArea.Viewport,
39
39
  {
40
40
  role: void 0,
41
+ "data-scroll-viewport": "",
41
42
  ...composite ? { tabIndex: void 0 } : {},
42
43
  ref: setViewport,
43
44
  className: cn(VIEWPORT, viewportClassName),
@@ -53,5 +54,5 @@ function ScrollView(props) {
53
54
  }
54
55
 
55
56
  export { ScrollView };
56
- //# sourceMappingURL=chunk-FKVPAEJ6.js.map
57
- //# sourceMappingURL=chunk-FKVPAEJ6.js.map
57
+ //# sourceMappingURL=chunk-SKJC2KYD.js.map
58
+ //# sourceMappingURL=chunk-SKJC2KYD.js.map
@@ -1,4 +1,4 @@
1
- import { Cartesian } from './chunk-NA35YZRD.js';
1
+ import { Cartesian } from './chunk-5DP7W5HX.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
4
  function BarChart({ stacked = false, layout = "columns", ...rest }) {
@@ -6,5 +6,5 @@ function BarChart({ stacked = false, layout = "columns", ...rest }) {
6
6
  }
7
7
 
8
8
  export { BarChart };
9
- //# sourceMappingURL=chunk-NKDW6C7K.js.map
10
- //# sourceMappingURL=chunk-NKDW6C7K.js.map
9
+ //# sourceMappingURL=chunk-SKRR3ZMP.js.map
10
+ //# sourceMappingURL=chunk-SKRR3ZMP.js.map
@@ -1,5 +1,5 @@
1
- import { usePolarData } from './chunk-LBYCCLVI.js';
2
- import { PIE_SIZE, PIE_DONUT, ChartDataTable, formatNumber, ChartFrame, PieChart, MARGIN, Tooltip, NO_ANIMATION, ChartTooltipContent, Pie, POLAR_ROOT, POLAR_HOVER, ChartLegendContent } from './chunk-75M43ELV.js';
1
+ import { usePolarData } from './chunk-OLLD2BZN.js';
2
+ import { DEFAULT_PALETTE, PIE_SIZE, PIE_DONUT, ChartDataTable, formatNumber, ChartFrame, PieChart, MARGIN, Tooltip, NO_ANIMATION, ChartTooltipContent, Pie, POLAR_ROOT, POLAR_HOVER, ChartLegendContent } from './chunk-22M75A3N.js';
3
3
  import { cn } from './chunk-ZSNJ6UA3.js';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
 
@@ -7,12 +7,13 @@ function PieChart2({
7
7
  data,
8
8
  donut = "regular",
9
9
  size = "md",
10
- palette = "brand",
10
+ palette = DEFAULT_PALETTE,
11
11
  legend = "bottom",
12
12
  formatValue = formatNumber,
13
13
  tooltip = true,
14
14
  tooltipTone = "surface",
15
- emptyMessage = "No data to display",
15
+ emptyMessage,
16
+ labels,
16
17
  className,
17
18
  "aria-label": ariaLabel
18
19
  }) {
@@ -28,6 +29,7 @@ function PieChart2({
28
29
  height: geometry.height,
29
30
  isEmpty: data.length === 0,
30
31
  emptyMessage,
32
+ labels,
31
33
  className,
32
34
  table,
33
35
  legendPlacement: legend === "none" ? void 0 : legend,
@@ -56,5 +58,5 @@ function PieChart2({
56
58
  }
57
59
 
58
60
  export { PieChart2 as PieChart };
59
- //# sourceMappingURL=chunk-CTENRS34.js.map
60
- //# sourceMappingURL=chunk-CTENRS34.js.map
61
+ //# sourceMappingURL=chunk-T4ZFZTY6.js.map
62
+ //# sourceMappingURL=chunk-T4ZFZTY6.js.map
@@ -1,12 +1,24 @@
1
- import { Button } from './chunk-A5WQLN4B.js';
1
+ import { useLinkResolver, LinkOrButton } from './chunk-5AZKP4KZ.js';
2
+ import { Button } from './chunk-OACWA4TC.js';
3
+ import { WASH, FILL } from './chunk-MCQG4H6T.js';
2
4
  import { Slot } from './chunk-52IFGFTL.js';
3
5
  import { XIcon, CircleXIcon, TriangleAlertIcon, CircleCheckIcon, InfoIcon, BellIcon } from './chunk-BLIZ3CL3.js';
4
- import { devWarn, warnPositiveInt } from './chunk-QDYE5LVT.js';
5
6
  import { cn } from './chunk-ZSNJ6UA3.js';
7
+ import { usePublishedLabels, LabelsContext, useLabels } from './chunk-RJTVCA62.js';
8
+ import { devWarn, warnPositiveInt } from './chunk-QDYE5LVT.js';
6
9
  import { Toast } from '@base-ui/react/toast';
7
10
  import * as React from 'react';
8
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
11
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
12
 
13
+ // src/components/toast/labels.ts
14
+ var TOAST_LABELS = {
15
+ /** The close affordance on every toast. */
16
+ dismiss: "Dismiss",
17
+ /** The viewport landmark. A secondary viewport names its corner so two regions are tellable
18
+ * apart; the ctx carries the raw `position`, and the space-separated rendering is this default's
19
+ * decision, not the caller's. */
20
+ region: (ctx) => ctx.primary ? "Notifications" : `Notifications (${ctx.position.replace("-", " ")})`
21
+ };
10
22
  var regions = /* @__PURE__ */ new Map();
11
23
  var regionsVersion = 0;
12
24
  var regionListeners = /* @__PURE__ */ new Set();
@@ -162,35 +174,11 @@ var toast = Object.assign((title, options) => enqueue("info", title, options), {
162
174
  });
163
175
  var TYPE_COLOR = {
164
176
  neutral: "neutral",
165
- info: "brand",
177
+ info: "info",
166
178
  success: "success",
167
179
  warning: "warning",
168
180
  error: "error"
169
181
  };
170
- var ICON_TINT = {
171
- // `neutral` has no hue to carry, so it takes the quiet wash + the muted glyph `lib/color.ts`'s
172
- // `FG.neutral` already resolves to — the one tone shared with the library-wide colour axis agrees
173
- // with it. The circle stays a circle: the other four are round, and a square in that row would
174
- // read as a different kind of thing.
175
- //
176
- // It is also the ONLY row with a ring, and that is the point rather than an inconsistency: the
177
- // other four delineate themselves by HUE, which this one does not have. Measured on the real card
178
- // (canvas-normalised, both themes): `bg-secondary` against `bg-primary` is 1.05:1 in light and 1.06:1 in
179
- // dark — no visible container at all, so the glyph floated where its four siblings sit in a circle.
180
- // The ring lands at 1.18:1 / 1.28:1, which is not a new value to justify — it is `--color-border-secondary`,
181
- // the same hairline every outlined `Card` in the library draws — and `color.ts`'s `SUBTLE.neutral`
182
- // likewise ships one. The glyph itself reads at 7.36:1 / 6.89:1 against the wash, well past the
183
- // 3:1 that WCAG 1.4.11 asks of non-text.
184
- //
185
- // (This used to cite `Callout` as agreeing. It no longer does, and the disagreement is the point:
186
- // Callout unified all six tones on ONE raised square, so its row has no round siblings to match.
187
- // Here four of five are circles, so the fifth must be too.)
188
- neutral: "bg-secondary text-tertiary ring-1 ring-secondary ring-inset",
189
- info: "bg-brand-primary text-brand-secondary",
190
- success: "bg-success-primary text-success-primary",
191
- warning: "bg-warning-primary text-warning-primary",
192
- error: "bg-error-primary text-utility-red-700"
193
- };
194
182
  var TYPE_ICON = {
195
183
  neutral: BellIcon,
196
184
  info: InfoIcon,
@@ -357,24 +345,21 @@ var COUNTDOWN_FILL = cn(
357
345
  "[animation:jz-toast-countdown_var(--toast-countdown)_linear_forwards]",
358
346
  "group-data-[expanded]/toast:[animation-play-state:paused]"
359
347
  );
360
- var COUNTDOWN_TINT = {
361
- neutral: "bg-secondary-solid",
362
- brand: "bg-brand-solid",
363
- success: "bg-success-solid",
364
- warning: "bg-warning-solid",
365
- error: "bg-error-solid",
366
- info: "bg-utility-blue-500"
367
- };
348
+ var COUNTDOWN_TINT = FILL;
368
349
  function relFor(action) {
369
350
  return action.rel?.join(" ") ?? (action.target === "_blank" ? "noreferrer" : void 0);
370
351
  }
371
352
  function ToastActionRow({ actions, id }) {
353
+ const resolveLink = useLinkResolver();
372
354
  return /* @__PURE__ */ jsx("div", { className: ACTION_ROW, children: actions.map((action) => {
373
355
  const onClick = () => {
374
356
  action.onClick?.();
375
357
  closeToast(id);
376
358
  };
377
- const anchor = action.href ? { render: /* @__PURE__ */ jsx("a", { href: action.href, target: action.target, rel: relFor(action) }) } : null;
359
+ const linkElement = resolveLink(action.href, { target: action.target });
360
+ const rel = relFor(action);
361
+ const overrides = { ...action.target != null && { target: action.target }, ...rel != null && { rel } };
362
+ const anchor = linkElement ? { render: Object.keys(overrides).length > 0 ? React.cloneElement(linkElement, overrides) : linkElement } : null;
378
363
  if (action.variant === "primary") {
379
364
  return /* @__PURE__ */ jsx(Button, { size: "sm", variant: "primary", leading: action.leading, onClick, ...anchor, children: action.label }, action.label);
380
365
  }
@@ -382,11 +367,12 @@ function ToastActionRow({ actions, id }) {
382
367
  action.leading === void 0 ? null : /* @__PURE__ */ jsx(Slot, { className: "[&>svg]:size-4", children: action.leading }),
383
368
  action.label
384
369
  ] });
385
- return action.href ? /* @__PURE__ */ jsx("a", { className: ACTION, href: action.href, target: action.target, rel: relFor(action), onClick, children: label }, action.label) : /* @__PURE__ */ jsx("button", { type: "button", className: ACTION, onClick, children: label }, action.label);
370
+ return /* @__PURE__ */ jsx(LinkOrButton, { render: anchor?.render, className: ACTION, onClick, children: label }, action.label);
386
371
  }) });
387
372
  }
388
373
  function ToastList({ position, stacked, countdown }) {
389
374
  const { toasts } = Toast.useToastManager();
375
+ const t = useLabels("toast", TOAST_LABELS, void 0);
390
376
  const rootClassName = rootClasses(position, stacked);
391
377
  const swipeDirection = SWIPE[AXIS[position]];
392
378
  return /* @__PURE__ */ jsx(Fragment, { children: toasts.map((item) => {
@@ -397,7 +383,7 @@ function ToastList({ position, stacked, countdown }) {
397
383
  const runFor = countdown && item.timeout ? item.timeout : 0;
398
384
  return /* @__PURE__ */ jsxs(Toast.Root, { toast: item, swipeDirection, "data-slot": "toast", className: cn("group/toast", rootClassName), children: [
399
385
  /* @__PURE__ */ jsxs(Toast.Content, { className: cn(CONTENT, compact ? CONTENT_ALIGN.compact : CONTENT_ALIGN.tall, stacked && CONTENT_STACKED), children: [
400
- leading === void 0 ? /* @__PURE__ */ jsx("span", { className: cn(ICON_CIRCLE, ICON_TINT[type]), "aria-hidden": "true", children: /* @__PURE__ */ jsx(TypeIcon, { type }) }) : /* @__PURE__ */ jsx(Slot, { className: LEADING_SLOT, children: leading }),
386
+ leading === void 0 ? /* @__PURE__ */ jsx("span", { className: cn(ICON_CIRCLE, WASH[TYPE_COLOR[type]]), "aria-hidden": "true", children: /* @__PURE__ */ jsx(TypeIcon, { type }) }) : /* @__PURE__ */ jsx(Slot, { className: LEADING_SLOT, children: leading }),
401
387
  /* @__PURE__ */ jsxs("div", { className: TEXT, children: [
402
388
  meta === void 0 && trailing === void 0 ? /* @__PURE__ */ jsx(Toast.Title, { className: TITLE }) : /* @__PURE__ */ jsxs("div", { className: TITLE_ROW, children: [
403
389
  /* @__PURE__ */ jsx(Toast.Title, { className: TITLE }),
@@ -408,7 +394,7 @@ function ToastList({ position, stacked, countdown }) {
408
394
  addOn === void 0 ? null : /* @__PURE__ */ jsx("div", { className: ADDON, children: addOn }),
409
395
  actions?.length ? /* @__PURE__ */ jsx(ToastActionRow, { actions, id: item.id }) : null
410
396
  ] }),
411
- /* @__PURE__ */ jsx(Toast.Close, { className: cn(CLOSE, !compact && CLOSE_TALL), "aria-label": "Dismiss", children: /* @__PURE__ */ jsx(XIcon, { className: "size-4" }) })
397
+ /* @__PURE__ */ jsx(Toast.Close, { className: cn(CLOSE, !compact && CLOSE_TALL), "aria-label": t.dismiss, children: /* @__PURE__ */ jsx(XIcon, { className: "size-4" }) })
412
398
  ] }),
413
399
  runFor > 0 ? (
414
400
  // Keyed on `updateKey` so `toast.update` — which resets Base UI's dismiss timer —
@@ -428,6 +414,7 @@ function ToastList({ position, stacked, countdown }) {
428
414
  }
429
415
  function ToastRegion(props) {
430
416
  const { position, stacked, countdown, duration, limit, primary, className, children } = props;
417
+ const t = useLabels("toast", TOAST_LABELS, void 0);
431
418
  warnPositiveInt("ToastProvider", "limit", limit);
432
419
  const region = regionFor(position);
433
420
  React.useEffect(() => {
@@ -446,7 +433,7 @@ function ToastRegion(props) {
446
433
  /* @__PURE__ */ jsx(Toast.Portal, { children: /* @__PURE__ */ jsx(
447
434
  Toast.Viewport,
448
435
  {
449
- "aria-label": primary ? "Notifications" : `Notifications (${position.replace("-", " ")})`,
436
+ "aria-label": t.region({ position, primary }),
450
437
  className: cn(VIEWPORT, VIEWPORT_POSITION[position], !stacked && VIEWPORT_LIST[EDGE[position]], className),
451
438
  children: /* @__PURE__ */ jsx(ToastList, { position, stacked, countdown })
452
439
  }
@@ -459,7 +446,8 @@ var subscribeToRegions = (onChange) => {
459
446
  };
460
447
  var regionsSnapshot = () => regionsVersion;
461
448
  function ToastProvider(props) {
462
- const { duration = 5e3, limit = 3, position = "top-right", stacked = true, countdown = true, className, children } = props;
449
+ const { duration = 5e3, limit = 3, position = "top-right", stacked = true, countdown = true, className, labels, children } = props;
450
+ const mergedLabels = usePublishedLabels("toast", labels);
463
451
  defaultTimeout = duration;
464
452
  defaultPosition = position;
465
453
  React.useEffect(() => {
@@ -482,7 +470,7 @@ function ToastProvider(props) {
482
470
  const positions = React.useMemo(() => {
483
471
  return [.../* @__PURE__ */ new Set([position, ...regions.keys()])];
484
472
  }, [position, version]);
485
- return /* @__PURE__ */ jsx(Fragment, { children: positions.map((p) => /* @__PURE__ */ jsx(
473
+ return /* @__PURE__ */ jsx(LabelsContext.Provider, { value: mergedLabels, children: positions.map((p) => /* @__PURE__ */ jsx(
486
474
  ToastRegion,
487
475
  {
488
476
  position: p,
@@ -499,5 +487,5 @@ function ToastProvider(props) {
499
487
  }
500
488
 
501
489
  export { ToastProvider, toast };
502
- //# sourceMappingURL=chunk-YLEHYDXC.js.map
503
- //# sourceMappingURL=chunk-YLEHYDXC.js.map
490
+ //# sourceMappingURL=chunk-T5574MXM.js.map
491
+ //# sourceMappingURL=chunk-T5574MXM.js.map