jenosize-ui 0.1.0 → 0.2.1

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 (204) hide show
  1. package/README.md +13 -10
  2. package/dist/Cartesian-ZIKPEYWP.d.ts +26 -0
  3. package/dist/{PaymentInput-CKPIPNWH.d.ts → PaymentInput-Dn5WVQVy.d.ts} +4 -0
  4. package/dist/{Select-CVbEQ2Ep.d.ts → Select-Dt5ARIH8.d.ts} +4 -0
  5. package/dist/{TagInput-CTJYOB4J.d.ts → TagInput-BaBeve6L.d.ts} +4 -0
  6. package/dist/area-chart.d.ts +54 -0
  7. package/dist/area-chart.js +9 -0
  8. package/dist/avatar.d.ts +24 -0
  9. package/dist/avatar.js +13 -7
  10. package/dist/badge.d.ts +4 -0
  11. package/dist/badge.js +6 -5
  12. package/dist/bar-chart.d.ts +32 -0
  13. package/dist/bar-chart.js +9 -0
  14. package/dist/breadcrumb.d.ts +4 -0
  15. package/dist/breadcrumb.js +5 -3
  16. package/dist/button.d.ts +16 -1
  17. package/dist/button.js +10 -8
  18. package/dist/calendar.d.ts +5 -0
  19. package/dist/calendar.js +18 -14
  20. package/dist/callout.d.ts +6 -6
  21. package/dist/callout.js +12 -9
  22. package/dist/card-D56VxyAe.d.ts +123 -0
  23. package/dist/card.d.ts +3 -1
  24. package/dist/card.js +7 -3
  25. package/dist/checkbox.js +9 -7
  26. package/dist/chunk-22M75A3N.js +396 -0
  27. package/dist/{chunk-D5BTFSL7.js → chunk-33TOK7ES.js} +7 -5
  28. package/dist/{chunk-THC2ISYP.js → chunk-3H444OJA.js} +6 -4
  29. package/dist/{chunk-GFOAJVW5.js → chunk-3QXLIZIX.js} +4 -13
  30. package/dist/chunk-3ZEEGXYF.js +8 -0
  31. package/dist/chunk-45Y2ZGNK.js +34 -0
  32. package/dist/{chunk-FHHAPGCR.js → chunk-4RBIWI2Q.js} +3 -3
  33. package/dist/chunk-4VGEJG4M.js +1510 -0
  34. package/dist/{chunk-PWKWNDBS.js → chunk-54SIZR63.js} +16 -8
  35. package/dist/chunk-5AZKP4KZ.js +49 -0
  36. package/dist/chunk-5DP7W5HX.js +254 -0
  37. package/dist/{chunk-J2BCKBHC.js → chunk-5KSD4WKN.js} +14 -5
  38. package/dist/{chunk-ZOOX3TUB.js → chunk-5XPMY2LF.js} +6 -6
  39. package/dist/chunk-5ZEUTSCV.js +147 -0
  40. package/dist/chunk-5ZPUAGOP.js +19 -0
  41. package/dist/{chunk-JTNFJLIY.js → chunk-667ZHY3T.js} +114 -42
  42. package/dist/{chunk-JP26LPCY.js → chunk-6B6BWTXC.js} +30 -13
  43. package/dist/{chunk-W5GGOUUI.js → chunk-6H4LNWQ7.js} +3 -3
  44. package/dist/{chunk-WFY7DKQD.js → chunk-6MMBQVRO.js} +61 -51
  45. package/dist/{chunk-7HOIZ3UO.js → chunk-7GUPNTAH.js} +15 -7
  46. package/dist/chunk-7VLYQR4D.js +44 -0
  47. package/dist/{chunk-KNYKWUYX.js → chunk-7ZM7SNCZ.js} +3 -3
  48. package/dist/{chunk-E7ZSWBAK.js → chunk-A323V6AI.js} +6 -4
  49. package/dist/chunk-AFYXSZGW.js +23 -0
  50. package/dist/chunk-AIARANKE.js +33 -0
  51. package/dist/{chunk-4OLULPQG.js → chunk-AIGYMTCU.js} +10 -6
  52. package/dist/{chunk-JVJRHBTD.js → chunk-AZ7DKRBY.js} +21 -8
  53. package/dist/{chunk-JYGR44ZC.js → chunk-BBKE4W3B.js} +19 -11
  54. package/dist/{chunk-Z3ETJN5G.js → chunk-BFVJHH7S.js} +8 -12
  55. package/dist/chunk-BLIZ3CL3.js +49 -0
  56. package/dist/{chunk-F2K7VJUV.js → chunk-CFFWYXDW.js} +19 -7
  57. package/dist/{chunk-MQGD2OUF.js → chunk-CGHYXWTT.js} +11 -5
  58. package/dist/{chunk-CYPPEUX5.js → chunk-CKMWBVRR.js} +27 -12
  59. package/dist/{chunk-GTHJWR3Q.js → chunk-D7EE5GWU.js} +21 -22
  60. package/dist/{chunk-5NOBSXJN.js → chunk-E2YZ7IMT.js} +24 -8
  61. package/dist/{chunk-T7FCG7XV.js → chunk-FFMTYQXE.js} +31 -11
  62. package/dist/{chunk-J36M3KRX.js → chunk-FH7Z7SGQ.js} +67 -32
  63. package/dist/chunk-FKVPAEJ6.js +57 -0
  64. package/dist/{chunk-GRLSUQQE.js → chunk-FNQJJO63.js} +4 -4
  65. package/dist/{chunk-5RAPA22E.js → chunk-FWRHBMWT.js} +4 -4
  66. package/dist/chunk-GLKFFA7N.js +171 -0
  67. package/dist/{chunk-KDLPXXD2.js → chunk-GQRSABRN.js} +4 -4
  68. package/dist/{chunk-DRZCJCBO.js → chunk-GZMDZF2V.js} +8 -7
  69. package/dist/chunk-HHYEAFCL.js +525 -0
  70. package/dist/{chunk-LME57Z6J.js → chunk-I6WMNXC7.js} +6 -6
  71. package/dist/chunk-IQNVSQRK.js +605 -0
  72. package/dist/chunk-KHGW72BM.js +10 -0
  73. package/dist/{chunk-ZZA2LUTL.js → chunk-KZP6B6B3.js} +41 -16
  74. package/dist/chunk-LCG34A5T.js +98 -0
  75. package/dist/chunk-LLPWQDF7.js +26 -0
  76. package/dist/{chunk-J7ZQQFPT.js → chunk-LO22VQL5.js} +18 -18
  77. package/dist/{chunk-BVJWBYIG.js → chunk-LQURV7HQ.js} +9 -7
  78. package/dist/{chunk-R6RGJF4L.js → chunk-LYXPJERB.js} +15 -5
  79. package/dist/{chunk-CME4DIML.js → chunk-MCQG4H6T.js} +54 -3
  80. package/dist/{chunk-VWC72TR3.js → chunk-MVG5MABV.js} +11 -8
  81. package/dist/{chunk-5FATN5YD.js → chunk-N3RVMBPX.js} +6 -9
  82. package/dist/chunk-NKG4N6HA.js +188 -0
  83. package/dist/{chunk-W46K56XU.js → chunk-OACWA4TC.js} +15 -69
  84. package/dist/chunk-OLLD2BZN.js +33 -0
  85. package/dist/{chunk-KMSYEE23.js → chunk-P6CON2R2.js} +25 -11
  86. package/dist/chunk-PO2TYK3C.js +17 -0
  87. package/dist/{chunk-7EWQKTNQ.js → chunk-POQTE7JI.js} +66 -25
  88. package/dist/{chunk-HMUZE6EK.js → chunk-QDKETK7D.js} +4 -4
  89. package/dist/{chunk-GCVA3OIV.js → chunk-QDYE5LVT.js} +13 -3
  90. package/dist/{chunk-WEUJYDCV.js → chunk-QHH6AUR3.js} +16 -8
  91. package/dist/chunk-RJTVCA62.js +42 -0
  92. package/dist/{chunk-MUFHLP4S.js → chunk-S5TEWPWW.js} +50 -41
  93. package/dist/{chunk-D6TPWNRK.js → chunk-SB3DG572.js} +15 -8
  94. package/dist/chunk-SKRR3ZMP.js +10 -0
  95. package/dist/chunk-T4ZFZTY6.js +62 -0
  96. package/dist/{chunk-I7WU4GTY.js → chunk-T5574MXM.js} +34 -46
  97. package/dist/{chunk-MKC5HNA7.js → chunk-U4WSJAYK.js} +374 -147
  98. package/dist/{chunk-BJUZVYQC.js → chunk-UGKELBNC.js} +60 -44
  99. package/dist/chunk-ULGCGKOE.js +77 -0
  100. package/dist/{chunk-QA74ITR4.js → chunk-X2VMIBK5.js} +45 -17
  101. package/dist/chunk-X2X7Q7NW.js +17 -0
  102. package/dist/chunk-YHBI52P2.js +10 -0
  103. package/dist/chunk-YIHKQ63K.js +13 -0
  104. package/dist/{chunk-3Y5X7B5C.js → chunk-YQYVGWIC.js} +6 -11
  105. package/dist/{chunk-WZQFC7ZN.js → chunk-ZHAT2XZ4.js} +139 -66
  106. package/dist/{chunk-7IU5TMFL.js → chunk-ZMFY7WAY.js} +124 -40
  107. package/dist/{chunk-SV56BSUQ.js → chunk-ZZSNTCCL.js} +6 -5
  108. package/dist/combobox.d.ts +5 -0
  109. package/dist/combobox.js +15 -12
  110. package/dist/control-size-CaxQhkKh.d.ts +3 -0
  111. package/dist/date-input.d.ts +4 -0
  112. package/dist/date-input.js +12 -9
  113. package/dist/date-picker.d.ts +6 -0
  114. package/dist/date-picker.js +25 -20
  115. package/dist/dialog.d.ts +37 -5
  116. package/dist/dialog.js +12 -8
  117. package/dist/drawer.d.ts +20 -3
  118. package/dist/drawer.js +11 -7
  119. package/dist/dropdown-menu.d.ts +26 -2
  120. package/dist/dropdown-menu.js +9 -4
  121. package/dist/dropzone.d.ts +35 -0
  122. package/dist/dropzone.js +23 -0
  123. package/dist/form.d.ts +82 -3
  124. package/dist/form.js +205 -45
  125. package/dist/header-navigation.d.ts +19 -4
  126. package/dist/header-navigation.js +23 -16
  127. package/dist/helper.d.ts +36 -0
  128. package/dist/helper.js +3 -0
  129. package/dist/index.d.ts +32 -8
  130. package/dist/index.js +87 -62
  131. package/dist/indicator.js +4 -4
  132. package/dist/input.d.ts +4 -0
  133. package/dist/input.js +10 -8
  134. package/dist/kanban-board.d.ts +489 -0
  135. package/dist/kanban-board.js +25 -0
  136. package/dist/labels-DPrh0se9.d.ts +627 -0
  137. package/dist/line-chart.d.ts +36 -0
  138. package/dist/line-chart.js +9 -0
  139. package/dist/{nav-Bla0o_-1.d.ts → nav-CKKqjBs6.d.ts} +18 -11
  140. package/dist/number-input.d.ts +4 -0
  141. package/dist/number-input.js +10 -8
  142. package/dist/pagination.d.ts +7 -1
  143. package/dist/pagination.js +14 -10
  144. package/dist/panel-El4oI68p.d.ts +9 -0
  145. package/dist/payment-input.d.ts +3 -2
  146. package/dist/payment-input.js +10 -8
  147. package/dist/pie-chart.d.ts +64 -0
  148. package/dist/pie-chart.js +9 -0
  149. package/dist/popover.d.ts +9 -3
  150. package/dist/popover.js +11 -7
  151. package/dist/progress-steps.d.ts +275 -0
  152. package/dist/progress-steps.js +8 -0
  153. package/dist/progress.d.ts +21 -1
  154. package/dist/progress.js +3 -2
  155. package/dist/provider.d.ts +212 -0
  156. package/dist/provider.js +7 -0
  157. package/dist/radar-chart.d.ts +77 -0
  158. package/dist/radar-chart.js +9 -0
  159. package/dist/radial-chart.d.ts +73 -0
  160. package/dist/radial-chart.js +9 -0
  161. package/dist/radio.js +9 -7
  162. package/dist/rule-BqzaIwJy.d.ts +80 -0
  163. package/dist/scroll-area.d.ts +62 -0
  164. package/dist/scroll-area.js +7 -0
  165. package/dist/select.d.ts +3 -3
  166. package/dist/select.js +17 -14
  167. package/dist/separator.d.ts +114 -0
  168. package/dist/separator.js +5 -0
  169. package/dist/shared-CxAedkiy.d.ts +68 -0
  170. package/dist/sidebar-navigation.d.ts +80 -12
  171. package/dist/sidebar-navigation.js +18 -9
  172. package/dist/skeleton.d.ts +61 -0
  173. package/dist/skeleton.js +5 -0
  174. package/dist/styles.css +1 -1
  175. package/dist/switch.js +4 -4
  176. package/dist/table.d.ts +148 -42
  177. package/dist/table.js +39 -33
  178. package/dist/tabs.d.ts +22 -0
  179. package/dist/tabs.js +3 -3
  180. package/dist/tag-input.d.ts +3 -2
  181. package/dist/tag-input.js +13 -11
  182. package/dist/tag.d.ts +4 -0
  183. package/dist/tag.js +4 -3
  184. package/dist/textarea.js +7 -5
  185. package/dist/theme.css +151 -6
  186. package/dist/theme.js +11 -9
  187. package/dist/toast.d.ts +11 -2
  188. package/dist/toast.js +12 -9
  189. package/dist/tooltip-surface-C2I9o2QM.d.ts +35 -0
  190. package/dist/tooltip.d.ts +15 -1
  191. package/dist/tooltip.js +3 -2
  192. package/dist/tree.d.ts +5 -0
  193. package/dist/tree.js +8 -6
  194. package/dist/types-DR9rAEy1.d.ts +188 -0
  195. package/dist/use-uploads-KaPqDklo.d.ts +482 -0
  196. package/dist/verification-code-input.d.ts +84 -0
  197. package/dist/verification-code-input.js +14 -0
  198. package/package.json +70 -9
  199. package/dist/card-nWicloNi.d.ts +0 -80
  200. package/dist/chunk-24TO7E32.js +0 -42
  201. package/dist/chunk-FXIBGTS5.js +0 -14
  202. package/dist/chunk-MFJP5FA7.js +0 -20
  203. package/dist/chunk-ZZT2E5VT.js +0 -24
  204. package/dist/shared-BNXAdgh2.d.ts +0 -9
@@ -1,13 +1,19 @@
1
- import { Tag } from './chunk-R6RGJF4L.js';
2
- import { useTagRow } from './chunk-W5GGOUUI.js';
3
- import { FieldShell } from './chunk-QA74ITR4.js';
1
+ import { Tag } from './chunk-LYXPJERB.js';
2
+ import { useTagRow } from './chunk-6H4LNWQ7.js';
3
+ import { FieldShell } from './chunk-X2VMIBK5.js';
4
4
  import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
5
- import { CONTROL_TEXT, CONTROL_RADIUS, useFieldValidity, FieldFrame } from './chunk-J2BCKBHC.js';
5
+ import { CONTROL_TEXT, CONTROL_RADIUS, 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 * as React from 'react';
9
10
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
10
11
 
12
+ // src/components/tag-input/labels.ts
13
+ var TAG_INPUT_LABELS = {
14
+ /** Default behind the `placeholder` prop — the caller's own prop still wins. */
15
+ placeholder: "Add tag\u2026"
16
+ };
11
17
  var SEPARATOR = {
12
18
  enter: { key: "Enter", paste: "\n" },
13
19
  comma: { key: ",", paste: "," },
@@ -166,9 +172,11 @@ function useTagInput(opts) {
166
172
  }
167
173
  var PILL_SIZE = { sm: "sm", md: "md", lg: "md" };
168
174
  function TagInput(props) {
175
+ const t = useLabels("tagInput", TAG_INPUT_LABELS, props.labels);
169
176
  const {
170
177
  size = "md",
171
- placeholder = "Add tag\u2026",
178
+ placeholder = t.placeholder,
179
+ labels: _labels,
172
180
  label,
173
181
  tooltip,
174
182
  tooltipDescription,
@@ -264,6 +272,6 @@ function TagInput(props) {
264
272
  );
265
273
  }
266
274
 
267
- export { TAG_PILL_FOCUS_RING, TagInput, useTagInput };
268
- //# sourceMappingURL=chunk-WEUJYDCV.js.map
269
- //# sourceMappingURL=chunk-WEUJYDCV.js.map
275
+ export { TAG_INPUT_LABELS, TAG_PILL_FOCUS_RING, TagInput, useTagInput };
276
+ //# sourceMappingURL=chunk-QHH6AUR3.js.map
277
+ //# sourceMappingURL=chunk-QHH6AUR3.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,21 +1,37 @@
1
1
  import { useDebouncedCallback } from './chunk-F6NLE6XJ.js';
2
- import { useControlScrollFade } from './chunk-7EUAMHMU.js';
3
- import { ListboxFooter, MultiValueCount } from './chunk-FHHAPGCR.js';
4
- import { mapOptions, isOptionGroup, buildOptionMap } from './chunk-7JBNLEJ7.js';
5
- import { useTagRow } from './chunk-W5GGOUUI.js';
2
+ import { ListboxFooter, MultiValueCount } from './chunk-4RBIWI2Q.js';
3
+ import { useTagRow } from './chunk-6H4LNWQ7.js';
6
4
  import { tagSlotClass, tagContentClass, tagCloseClass, tagRootClass } from './chunk-4P2NBLBW.js';
7
- import { FieldShell } from './chunk-QA74ITR4.js';
5
+ import { ScrollView } from './chunk-FKVPAEJ6.js';
6
+ import { mapOptions, isOptionGroup, buildOptionMap } from './chunk-7JBNLEJ7.js';
7
+ import { useControlScrollFade } from './chunk-7EUAMHMU.js';
8
+ import { FieldShell } from './chunk-X2VMIBK5.js';
9
+ import { useFieldValidity, FieldFrame, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-5KSD4WKN.js';
8
10
  import { Slot } from './chunk-52IFGFTL.js';
9
- import { useScrollFade } from './chunk-O2LG3PNI.js';
10
- import { useFieldValidity, FieldFrame, LISTBOX_PX_SM, CONTROL_ICON, SLOT_ICON } from './chunk-J2BCKBHC.js';
11
- import { PlusIcon, XIcon, ChevronDownIcon, LoaderCircleIcon, CheckIcon } from './chunk-24TO7E32.js';
12
11
  import { POPUP_MOTION } from './chunk-O4GRKO3I.js';
13
- import { warnNonNegativeInt } from './chunk-GCVA3OIV.js';
12
+ import { PlusIcon, XIcon, ChevronDownIcon, LoaderCircleIcon, CheckIcon } from './chunk-BLIZ3CL3.js';
14
13
  import { cn } from './chunk-ZSNJ6UA3.js';
14
+ import { useLabels, usePublishedLabels, LabelsContext } from './chunk-RJTVCA62.js';
15
+ import { warnNonNegativeInt } from './chunk-QDYE5LVT.js';
15
16
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
16
17
  import * as React from 'react';
17
- import { jsxs, jsx } from 'react/jsx-runtime';
18
+ import { jsx, jsxs } from 'react/jsx-runtime';
18
19
 
20
+ // src/components/combobox/labels.ts
21
+ var COMBOBOX_LABELS = {
22
+ /** The trigger that opens the list without typing. */
23
+ showOptions: "Show options",
24
+ /** The ✕ that empties the input. */
25
+ clear: "Clear",
26
+ /** A multi-value chip's remove button, named after the value it drops. */
27
+ removeValue: (ctx) => `Remove ${ctx.label}`,
28
+ /** The free-text creation row. */
29
+ create: (ctx) => `Create \u201C${ctx.query}\u201D`,
30
+ /** Defaults behind the `placeholder`, `emptyMessage` and loading props — each prop still wins. */
31
+ placeholder: "Search\u2026",
32
+ emptyMessage: "No results found.",
33
+ loading: "Loading\u2026"
34
+ };
19
35
  var ComboboxContext = React.createContext({
20
36
  size: "md",
21
37
  multiple: false,
@@ -141,7 +157,7 @@ function ghostRemainder(optionMap, query) {
141
157
  return completion;
142
158
  }
143
159
  function ComboboxInput({
144
- placeholder = "Search\u2026",
160
+ placeholder,
145
161
  leading,
146
162
  trailing,
147
163
  leadingAddon,
@@ -156,13 +172,14 @@ function ComboboxInput({
156
172
  className
157
173
  }) {
158
174
  const { size, multiple, labelId, optionMap, query, anchorRef } = useComboboxContext();
175
+ const t = useLabels("combobox", COMBOBOX_LABELS, void 0);
159
176
  const chips = multiple && display === "tags";
160
177
  const { ref: fadeRef, style: fadeStyle } = useControlScrollFade(scrollFade && !multiple);
161
178
  const ghost = !multiple && optionMap.size > 0;
162
179
  const remainder = ghost ? ghostRemainder(optionMap, query) : "";
163
180
  const chipRow = useTagRow({ size, maxRows, count: selectedCount, hasPills: chips && selectedCount > 0, scrollbar: "none" });
164
181
  const showCount = multiple && !chips && selectedCount > 0;
165
- const inputPlaceholder = showCount ? void 0 : placeholder;
182
+ const inputPlaceholder = showCount ? void 0 : placeholder ?? t.placeholder;
166
183
  return /* @__PURE__ */ jsxs(
167
184
  FieldShell,
168
185
  {
@@ -216,7 +233,7 @@ function ComboboxInput({
216
233
  /* @__PURE__ */ jsx(
217
234
  Combobox$1.ChipRemove,
218
235
  {
219
- "aria-label": `Remove ${typeof chip.label === "string" ? chip.label : String(value)}`,
236
+ "aria-label": t.removeValue({ label: typeof chip.label === "string" ? chip.label : String(value) }),
220
237
  className: tagCloseClass(CHIP_SIZE[size]),
221
238
  children: /* @__PURE__ */ jsx(XIcon, {})
222
239
  }
@@ -227,7 +244,7 @@ function ComboboxInput({
227
244
  );
228
245
  });
229
246
  } }),
230
- /* @__PURE__ */ jsx(Combobox$1.Input, { "aria-labelledby": labelId, placeholder, className: cn(INNER_INPUT, "min-w-[4rem]") })
247
+ /* @__PURE__ */ jsx(Combobox$1.Input, { "aria-labelledby": labelId, placeholder: placeholder ?? t.placeholder, className: cn(INNER_INPUT, "min-w-[4rem]") })
231
248
  ] }) : (
232
249
  // ONE structure for the ghost-text and plain inputs — the input's position and element type
233
250
  // are identical whether or not there is a ghost remainder.
@@ -272,18 +289,19 @@ function ComboboxInput({
272
289
  }
273
290
  var TRAILING_BTN = "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md text-fg-quaternary outline-none transition-colors hover:text-fg-quaternary_hover focus-visible:text-fg-quaternary_hover data-[disabled]:cursor-not-allowed";
274
291
  function ComboboxTrigger({ className }) {
292
+ const t = useLabels("combobox", COMBOBOX_LABELS, void 0);
275
293
  const { size } = useComboboxContext();
276
- return /* @__PURE__ */ jsx(Combobox$1.Trigger, { "aria-label": "Show options", className: cn(TRAILING_BTN, CONTROL_ICON[size], className), children: /* @__PURE__ */ jsx(Combobox$1.Icon, { className: "inline-flex transition-transform duration-200 group-data-[popup-open]:rotate-180", children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) }) });
294
+ return /* @__PURE__ */ jsx(Combobox$1.Trigger, { "aria-label": t.showOptions, className: cn(TRAILING_BTN, CONTROL_ICON[size], className), children: /* @__PURE__ */ jsx(Combobox$1.Icon, { className: "inline-flex transition-transform duration-200 group-data-[popup-open]:rotate-180", children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) }) });
277
295
  }
278
296
  function ComboboxClear({ className }) {
297
+ const t = useLabels("combobox", COMBOBOX_LABELS, void 0);
279
298
  const { clearable, size } = useComboboxContext();
280
299
  if (!clearable) {
281
300
  return null;
282
301
  }
283
- return /* @__PURE__ */ jsx(Combobox$1.Clear, { "aria-label": "Clear", className: cn(TRAILING_BTN, CONTROL_ICON[size], className), children: /* @__PURE__ */ jsx(XIcon, {}) });
302
+ return /* @__PURE__ */ jsx(Combobox$1.Clear, { "aria-label": t.clear, className: cn(TRAILING_BTN, CONTROL_ICON[size], className), children: /* @__PURE__ */ jsx(XIcon, {}) });
284
303
  }
285
304
  var POPUP = cn("w-full rounded-lg bg-primary p-1 text-primary shadow-lg ring-1 ring-secondary_alt outline-none ring-inset", POPUP_MOTION);
286
- var LIST_BASE = "overflow-y-auto overscroll-contain outline-none";
287
305
  var LIST_MAX_H = {
288
306
  sm: "max-h-[min(var(--available-height),14rem)]",
289
307
  md: "max-h-[min(var(--available-height),16rem)]",
@@ -291,8 +309,6 @@ var LIST_MAX_H = {
291
309
  };
292
310
  function ComboboxContent({ children, footer, className }) {
293
311
  const { size, anchorRef } = useComboboxContext();
294
- const listRef = React.useRef(null);
295
- const { maskImage } = useScrollFade(listRef, { axis: "vertical" });
296
312
  return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(
297
313
  Combobox$1.Positioner,
298
314
  {
@@ -302,15 +318,7 @@ function ComboboxContent({ children, footer, className }) {
302
318
  sideOffset: 4,
303
319
  className: "z-50 w-fit max-w-[var(--available-width)] min-w-[var(--anchor-width)] outline-none",
304
320
  children: /* @__PURE__ */ jsxs(Combobox$1.Popup, { className: cn(POPUP, className), children: [
305
- /* @__PURE__ */ jsx(
306
- Combobox$1.List,
307
- {
308
- ref: listRef,
309
- className: cn(LIST_BASE, LIST_MAX_H[size]),
310
- style: maskImage ? { maskImage, WebkitMaskImage: maskImage } : void 0,
311
- children
312
- }
313
- ),
321
+ /* @__PURE__ */ jsx(ScrollView, { composite: true, viewportClassName: LIST_MAX_H[size], children: /* @__PURE__ */ jsx(Combobox$1.List, { className: "outline-none", children }) }),
314
322
  footer
315
323
  ] })
316
324
  }
@@ -388,10 +396,11 @@ function ComboboxGroupLabel({ children, className }) {
388
396
  function ComboboxEmpty({ children, className }) {
389
397
  return /* @__PURE__ */ jsx(Combobox$1.Empty, { className: cn("px-3 py-6 text-center text-sm text-tertiary", className), children });
390
398
  }
391
- function ComboboxLoading({ children = "Loading\u2026", className }) {
399
+ function ComboboxLoading({ children, className }) {
400
+ const t = useLabels("combobox", COMBOBOX_LABELS, void 0);
392
401
  return /* @__PURE__ */ jsxs(Combobox$1.Status, { className: cn("flex items-center justify-center gap-2 px-3 py-6 text-sm text-tertiary [&_svg]:size-4", className), children: [
393
402
  /* @__PURE__ */ jsx(LoaderCircleIcon, { className: "animate-spin" }),
394
- /* @__PURE__ */ jsx("span", { children })
403
+ /* @__PURE__ */ jsx("span", { children: children ?? t.loading })
395
404
  ] });
396
405
  }
397
406
  function optionLabelText(option) {
@@ -404,9 +413,6 @@ function asStringList(v) {
404
413
  if (Array.isArray(v)) return v.filter((entry) => typeof entry === "string");
405
414
  return typeof v === "string" ? [v] : [];
406
415
  }
407
- function defaultCreateLabel(query) {
408
- return `Create \u201C${query}\u201D`;
409
- }
410
416
  function defaultContains(option, query) {
411
417
  return optionLabelText(option).toLowerCase().includes(query.trim().toLowerCase());
412
418
  }
@@ -436,7 +442,7 @@ function ComboboxFlat(props) {
436
442
  filter,
437
443
  loading = false,
438
444
  loadingMessage,
439
- emptyMessage = "No results found.",
445
+ emptyMessage,
440
446
  placeholder,
441
447
  leading,
442
448
  trailing,
@@ -451,15 +457,18 @@ function ComboboxFlat(props) {
451
457
  meta,
452
458
  creatable = false,
453
459
  onCreate,
454
- createLabel = defaultCreateLabel,
460
+ createLabel,
455
461
  validateCreate,
456
462
  multiple,
457
463
  autoHighlight,
458
464
  onInputChange,
459
465
  searchDebounce = 0,
460
466
  onValueChange,
467
+ labels,
461
468
  ...rootProps
462
469
  } = props;
470
+ const t = useLabels("combobox", COMBOBOX_LABELS, labels);
471
+ const publishedLabels = usePublishedLabels("combobox", labels);
463
472
  const size = props.size ?? "md";
464
473
  const [query, setQuery] = React.useState("");
465
474
  const [selectedSingle, setSelectedSingle] = React.useState(() => asString(props.value ?? props.defaultValue));
@@ -501,7 +510,7 @@ function ComboboxFlat(props) {
501
510
  const knownAlready = createQuery === "" || flattenOptions(options).some((o) => o.value.toLowerCase() === trimmed || optionLabelText(o).toLowerCase() === trimmed) || selectedValues.some((v) => v.toLowerCase() === trimmed);
502
511
  const showCreate = creatable && !loading && !knownAlready && (validateCreate?.(createQuery) ?? true);
503
512
  const isEmpty = !loading && !showCreate && flattenOptions(rows).length === 0;
504
- return /* @__PURE__ */ jsxs(
513
+ return /* @__PURE__ */ jsx(LabelsContext.Provider, { value: publishedLabels, children: /* @__PURE__ */ jsxs(
505
514
  ComboboxRoot,
506
515
  {
507
516
  options,
@@ -534,7 +543,7 @@ function ComboboxFlat(props) {
534
543
  ),
535
544
  /* @__PURE__ */ jsxs(ComboboxContent, { footer: /* @__PURE__ */ jsx(ListboxFooter, { meta, actions, size }), children: [
536
545
  loading ? /* @__PURE__ */ jsx(ComboboxLoading, { children: loadingMessage }) : null,
537
- isEmpty ? /* @__PURE__ */ jsx(ComboboxEmpty, { children: emptyMessage }) : null,
546
+ isEmpty ? /* @__PURE__ */ jsx(ComboboxEmpty, { children: emptyMessage ?? t.emptyMessage }) : null,
538
547
  loading ? null : mapOptions(rows, {
539
548
  item: (opt) => /* @__PURE__ */ jsx(ComboboxItem, { value: opt.value, disabled: opt.disabled, children: opt.label ?? opt.value }, opt.value),
540
549
  group: (label, groupChildren) => /* @__PURE__ */ jsxs(ComboboxGroup, { children: [
@@ -542,11 +551,11 @@ function ComboboxFlat(props) {
542
551
  groupChildren
543
552
  ] }, label)
544
553
  }),
545
- showCreate ? /* @__PURE__ */ jsx(ComboboxItem, { value: createQuery, leading: /* @__PURE__ */ jsx(PlusIcon, {}), hideIndicator: true, children: createLabel(createQuery) }) : null
554
+ showCreate ? /* @__PURE__ */ jsx(ComboboxItem, { value: createQuery, leading: /* @__PURE__ */ jsx(PlusIcon, {}), hideIndicator: true, children: createLabel ? createLabel(createQuery) : t.create({ query: createQuery }) }) : null
546
555
  ] })
547
556
  ]
548
557
  }
549
- );
558
+ ) });
550
559
  }
551
560
  ComboboxFlat.displayName = "Combobox";
552
561
  ComboboxRoot.displayName = "ComboboxRoot";
@@ -562,5 +571,5 @@ ComboboxLoading.displayName = "ComboboxLoading";
562
571
  var Combobox = ComboboxFlat;
563
572
 
564
573
  export { Combobox };
565
- //# sourceMappingURL=chunk-MUFHLP4S.js.map
566
- //# sourceMappingURL=chunk-MUFHLP4S.js.map
574
+ //# sourceMappingURL=chunk-S5TEWPWW.js.map
575
+ //# sourceMappingURL=chunk-S5TEWPWW.js.map
@@ -1,8 +1,9 @@
1
1
  import { useControlScrollFade } from './chunk-7EUAMHMU.js';
2
- import { FieldShell } from './chunk-QA74ITR4.js';
3
- import { useFieldValidity, FieldFrame } from './chunk-J2BCKBHC.js';
4
- import { warnPositiveInt } from './chunk-GCVA3OIV.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-D6TPWNRK.js.map
387
- //# sourceMappingURL=chunk-D6TPWNRK.js.map
393
+ //# sourceMappingURL=chunk-SB3DG572.js.map
394
+ //# sourceMappingURL=chunk-SB3DG572.js.map
@@ -0,0 +1,10 @@
1
+ import { Cartesian } from './chunk-5DP7W5HX.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ function BarChart({ stacked = false, layout = "columns", ...rest }) {
5
+ return /* @__PURE__ */ jsx(Cartesian, { ...rest, component: "BarChart", mark: { kind: "bar", stacked, layout } });
6
+ }
7
+
8
+ export { BarChart };
9
+ //# sourceMappingURL=chunk-SKRR3ZMP.js.map
10
+ //# sourceMappingURL=chunk-SKRR3ZMP.js.map
@@ -0,0 +1,62 @@
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
+ import { cn } from './chunk-ZSNJ6UA3.js';
4
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
+
6
+ function PieChart2({
7
+ data,
8
+ donut = "regular",
9
+ size = "md",
10
+ palette = DEFAULT_PALETTE,
11
+ legend = "bottom",
12
+ formatValue = formatNumber,
13
+ tooltip = true,
14
+ tooltipTone = "surface",
15
+ emptyMessage,
16
+ labels,
17
+ className,
18
+ "aria-label": ariaLabel
19
+ }) {
20
+ const { rows, legendItems, colorMap, labelMap } = usePolarData("PieChart", data, palette);
21
+ const geometry = PIE_SIZE[size];
22
+ const innerRadius = donut === false ? 0 : Math.round(geometry.outer * PIE_DONUT[donut]);
23
+ const table = /* @__PURE__ */ jsx(ChartDataTable, { caption: ariaLabel, rowHeader: "Category", columns: ["Value"], rows: rows.map((row) => [row.name, formatValue(row.value)]) });
24
+ return /* @__PURE__ */ jsx(
25
+ ChartFrame,
26
+ {
27
+ component: "PieChart",
28
+ ariaLabel,
29
+ height: geometry.height,
30
+ isEmpty: data.length === 0,
31
+ emptyMessage,
32
+ labels,
33
+ className,
34
+ table,
35
+ legendPlacement: legend === "none" ? void 0 : legend,
36
+ legend: legend === "none" ? void 0 : /* @__PURE__ */ jsx(ChartLegendContent, { items: legendItems, placement: legend }),
37
+ children: () => /* @__PURE__ */ jsxs(PieChart, { className: cn(POLAR_ROOT, POLAR_HOVER), margin: MARGIN.polar, children: [
38
+ tooltip ? /* @__PURE__ */ jsx(Tooltip, { ...NO_ANIMATION, content: /* @__PURE__ */ jsx(ChartTooltipContent, { colors: colorMap, labels: labelMap, formatValue, tone: tooltipTone }) }) : null,
39
+ /* @__PURE__ */ jsx(
40
+ Pie,
41
+ {
42
+ ...NO_ANIMATION,
43
+ rootTabIndex: -1,
44
+ data: rows,
45
+ dataKey: "value",
46
+ nameKey: "name",
47
+ startAngle: -270,
48
+ endAngle: -630,
49
+ stroke: "none",
50
+ fill: "currentColor",
51
+ innerRadius,
52
+ outerRadius: geometry.outer
53
+ }
54
+ )
55
+ ] })
56
+ }
57
+ );
58
+ }
59
+
60
+ export { PieChart2 as PieChart };
61
+ //# sourceMappingURL=chunk-T4ZFZTY6.js.map
62
+ //# sourceMappingURL=chunk-T4ZFZTY6.js.map
@@ -1,12 +1,24 @@
1
- import { Button } from './chunk-W46K56XU.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
- import { XIcon, CircleXIcon, TriangleAlertIcon, CircleCheckIcon, InfoIcon, BellIcon } from './chunk-24TO7E32.js';
4
- import { devWarn, warnPositiveInt } from './chunk-GCVA3OIV.js';
5
+ import { XIcon, CircleXIcon, TriangleAlertIcon, CircleCheckIcon, InfoIcon, BellIcon } from './chunk-BLIZ3CL3.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-I7WU4GTY.js.map
503
- //# sourceMappingURL=chunk-I7WU4GTY.js.map
490
+ //# sourceMappingURL=chunk-T5574MXM.js.map
491
+ //# sourceMappingURL=chunk-T5574MXM.js.map