jenosize-ui 0.2.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 (180) 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 +9 -8
  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 +15 -13
  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-A46ED5JQ.js → chunk-33TOK7ES.js} +7 -5
  27. package/dist/{chunk-RNXRZGXN.js → chunk-3H444OJA.js} +5 -3
  28. package/dist/{chunk-DJYWPJZ3.js → chunk-3QXLIZIX.js} +3 -12
  29. package/dist/chunk-3ZEEGXYF.js +8 -0
  30. package/dist/chunk-45Y2ZGNK.js +34 -0
  31. package/dist/{chunk-ILICYNK7.js → chunk-4RBIWI2Q.js} +3 -3
  32. package/dist/{chunk-FIGBJGH2.js → chunk-4VGEJG4M.js} +115 -79
  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-6UBYHSBX.js → chunk-5ZEUTSCV.js} +5 -5
  39. package/dist/{chunk-DCGTB7P7.js → chunk-667ZHY3T.js} +111 -39
  40. package/dist/{chunk-MYQ3FD4Y.js → chunk-6B6BWTXC.js} +8 -5
  41. package/dist/{chunk-6HJA7NPL.js → chunk-6H4LNWQ7.js} +3 -3
  42. package/dist/{chunk-JAVNGTOE.js → chunk-6MMBQVRO.js} +58 -43
  43. package/dist/{chunk-JMWYCT63.js → chunk-7GUPNTAH.js} +14 -6
  44. package/dist/{chunk-TBN644IN.js → chunk-7ZM7SNCZ.js} +3 -3
  45. package/dist/{chunk-BD5YKFRA.js → chunk-A323V6AI.js} +5 -3
  46. package/dist/{chunk-AC6ZWKRN.js → chunk-AFYXSZGW.js} +2 -2
  47. package/dist/chunk-AIARANKE.js +33 -0
  48. package/dist/{chunk-54S5CUY6.js → chunk-AIGYMTCU.js} +5 -4
  49. package/dist/{chunk-C6OTOTKI.js → chunk-AZ7DKRBY.js} +5 -5
  50. package/dist/{chunk-QBHQOX23.js → chunk-BBKE4W3B.js} +18 -10
  51. package/dist/{chunk-4BRMM3I5.js → chunk-BFVJHH7S.js} +7 -6
  52. package/dist/{chunk-FFTRB2UU.js → chunk-CFFWYXDW.js} +18 -6
  53. package/dist/{chunk-42FCPC77.js → chunk-CGHYXWTT.js} +10 -4
  54. package/dist/{chunk-VEOYCAJP.js → chunk-CKMWBVRR.js} +27 -7
  55. package/dist/{chunk-GTHJWR3Q.js → chunk-D7EE5GWU.js} +21 -22
  56. package/dist/{chunk-NMERLWT7.js → chunk-E2YZ7IMT.js} +23 -7
  57. package/dist/{chunk-GAFGIT4Q.js → chunk-FFMTYQXE.js} +30 -10
  58. package/dist/{chunk-L53Y7KUV.js → chunk-FH7Z7SGQ.js} +61 -28
  59. package/dist/{chunk-5JRM3OES.js → chunk-FNQJJO63.js} +3 -3
  60. package/dist/{chunk-MD4AR43X.js → chunk-FWRHBMWT.js} +3 -3
  61. package/dist/{chunk-4K6V6NNK.js → chunk-GLKFFA7N.js} +10 -8
  62. package/dist/{chunk-EDOUI2BG.js → chunk-GQRSABRN.js} +4 -4
  63. package/dist/{chunk-BNIWT6CW.js → chunk-GZMDZF2V.js} +7 -6
  64. package/dist/{chunk-HSVBTIP2.js → chunk-HHYEAFCL.js} +70 -27
  65. package/dist/{chunk-P7DH62UY.js → chunk-I6WMNXC7.js} +5 -5
  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-4R7WDDCW.js → chunk-KZP6B6B3.js} +4 -4
  69. package/dist/{chunk-7HV6EIGZ.js → chunk-LLPWQDF7.js} +3 -3
  70. package/dist/{chunk-FZBZGA3P.js → chunk-LO22VQL5.js} +4 -4
  71. package/dist/{chunk-JXHZHUB3.js → chunk-LQURV7HQ.js} +9 -7
  72. package/dist/{chunk-EDT5J5WK.js → chunk-LYXPJERB.js} +14 -4
  73. package/dist/{chunk-6IUTVDNI.js → chunk-MCQG4H6T.js} +35 -3
  74. package/dist/{chunk-JYBGO6GY.js → chunk-MVG5MABV.js} +11 -8
  75. package/dist/{chunk-PXEJ5RKO.js → chunk-N3RVMBPX.js} +6 -9
  76. package/dist/{chunk-VWGAMOSE.js → chunk-NKG4N6HA.js} +3 -3
  77. package/dist/{chunk-A5WQLN4B.js → chunk-OACWA4TC.js} +14 -52
  78. package/dist/{chunk-LBYCCLVI.js → chunk-OLLD2BZN.js} +9 -9
  79. package/dist/{chunk-T2WAD4QP.js → chunk-POQTE7JI.js} +55 -16
  80. package/dist/{chunk-74HPBSVY.js → chunk-QDKETK7D.js} +4 -4
  81. package/dist/{chunk-VH35QHD4.js → chunk-QHH6AUR3.js} +16 -8
  82. package/dist/chunk-RJTVCA62.js +42 -0
  83. package/dist/{chunk-DTMYD63D.js → chunk-S5TEWPWW.js} +46 -26
  84. package/dist/{chunk-3GT43XPK.js → chunk-SB3DG572.js} +15 -8
  85. package/dist/{chunk-NKDW6C7K.js → chunk-SKRR3ZMP.js} +3 -3
  86. package/dist/{chunk-CTENRS34.js → chunk-T4ZFZTY6.js} +8 -6
  87. package/dist/{chunk-YLEHYDXC.js → chunk-T5574MXM.js} +33 -45
  88. package/dist/{chunk-USL3TDZM.js → chunk-U4WSJAYK.js} +321 -105
  89. package/dist/{chunk-4W6AYGLR.js → chunk-UGKELBNC.js} +55 -39
  90. package/dist/{chunk-M5TVCASC.js → chunk-ULGCGKOE.js} +8 -6
  91. package/dist/{chunk-JUWDRRD6.js → chunk-X2VMIBK5.js} +4 -4
  92. package/dist/{chunk-763VS2FY.js → chunk-YHBI52P2.js} +3 -3
  93. package/dist/chunk-YIHKQ63K.js +13 -0
  94. package/dist/{chunk-3Z3SDKIA.js → chunk-YQYVGWIC.js} +5 -5
  95. package/dist/{chunk-4HKDD3PR.js → chunk-ZHAT2XZ4.js} +91 -57
  96. package/dist/{chunk-CWMFEF6R.js → chunk-ZMFY7WAY.js} +60 -24
  97. package/dist/{chunk-WKWAUU64.js → chunk-ZZSNTCCL.js} +6 -5
  98. package/dist/combobox.d.ts +5 -0
  99. package/dist/combobox.js +12 -11
  100. package/dist/date-input.d.ts +4 -0
  101. package/dist/date-input.js +11 -9
  102. package/dist/date-picker.d.ts +6 -0
  103. package/dist/date-picker.js +23 -21
  104. package/dist/dialog.d.ts +21 -1
  105. package/dist/dialog.js +10 -8
  106. package/dist/drawer.d.ts +11 -1
  107. package/dist/drawer.js +9 -7
  108. package/dist/dropdown-menu.d.ts +12 -0
  109. package/dist/dropdown-menu.js +6 -5
  110. package/dist/dropzone.d.ts +3 -2
  111. package/dist/dropzone.js +13 -12
  112. package/dist/form.d.ts +5 -4
  113. package/dist/form.js +60 -44
  114. package/dist/header-navigation.d.ts +5 -1
  115. package/dist/header-navigation.js +21 -19
  116. package/dist/helper.d.ts +36 -0
  117. package/dist/helper.js +3 -0
  118. package/dist/index.d.ts +13 -11
  119. package/dist/index.js +81 -76
  120. package/dist/indicator.js +4 -4
  121. package/dist/input.d.ts +4 -0
  122. package/dist/input.js +9 -8
  123. package/dist/kanban-board.d.ts +21 -81
  124. package/dist/kanban-board.js +14 -12
  125. package/dist/labels-DPrh0se9.d.ts +627 -0
  126. package/dist/line-chart.d.ts +3 -2
  127. package/dist/line-chart.js +6 -5
  128. package/dist/{nav-DcCyt00p.d.ts → nav-CKKqjBs6.d.ts} +10 -0
  129. package/dist/number-input.d.ts +4 -0
  130. package/dist/number-input.js +9 -8
  131. package/dist/pagination.d.ts +7 -1
  132. package/dist/pagination.js +11 -10
  133. package/dist/payment-input.d.ts +3 -2
  134. package/dist/payment-input.js +9 -8
  135. package/dist/pie-chart.d.ts +7 -3
  136. package/dist/pie-chart.js +6 -5
  137. package/dist/popover.js +9 -7
  138. package/dist/progress-steps.js +2 -2
  139. package/dist/progress.d.ts +21 -1
  140. package/dist/progress.js +3 -2
  141. package/dist/provider.d.ts +212 -0
  142. package/dist/provider.js +7 -0
  143. package/dist/radar-chart.d.ts +7 -3
  144. package/dist/radar-chart.js +6 -5
  145. package/dist/radial-chart.d.ts +7 -3
  146. package/dist/radial-chart.js +6 -5
  147. package/dist/radio.js +8 -7
  148. package/dist/select.d.ts +2 -1
  149. package/dist/select.js +14 -13
  150. package/dist/shared-CxAedkiy.d.ts +68 -0
  151. package/dist/sidebar-navigation.d.ts +28 -7
  152. package/dist/sidebar-navigation.js +15 -13
  153. package/dist/skeleton.js +2 -2
  154. package/dist/styles.css +1 -1
  155. package/dist/switch.js +4 -4
  156. package/dist/table.d.ts +56 -6
  157. package/dist/table.js +36 -34
  158. package/dist/tabs.d.ts +22 -0
  159. package/dist/tabs.js +3 -3
  160. package/dist/tag-input.d.ts +3 -2
  161. package/dist/tag-input.js +12 -11
  162. package/dist/tag.d.ts +4 -0
  163. package/dist/tag.js +3 -2
  164. package/dist/textarea.js +6 -5
  165. package/dist/theme.css +69 -6
  166. package/dist/theme.js +10 -9
  167. package/dist/toast.d.ts +11 -2
  168. package/dist/toast.js +11 -9
  169. package/dist/{tooltip-surface-Dmvb8v5K.d.ts → tooltip-surface-C2I9o2QM.d.ts} +1 -1
  170. package/dist/tooltip.d.ts +2 -2
  171. package/dist/tooltip.js +3 -3
  172. package/dist/tree.d.ts +5 -0
  173. package/dist/tree.js +5 -4
  174. package/dist/{types-6kvYwtRH.d.ts → types-DR9rAEy1.d.ts} +45 -13
  175. package/dist/{use-uploads-ButS4dGe.d.ts → use-uploads-KaPqDklo.d.ts} +9 -0
  176. package/dist/verification-code-input.js +8 -7
  177. package/package.json +12 -1
  178. package/dist/chunk-MFJP5FA7.js +0 -20
  179. package/dist/shared-BNXAdgh2.d.ts +0 -9
  180. package/dist/surface-DFyDnrTJ.d.ts +0 -34
@@ -1,13 +1,51 @@
1
+ import { NativeSelect } from './chunk-I6WMNXC7.js';
1
2
  import { Separator } from './chunk-7VLYQR4D.js';
2
- import { Input } from './chunk-JMWYCT63.js';
3
- import { NativeSelect } from './chunk-P7DH62UY.js';
4
- import { TooltipExport } from './chunk-4R7WDDCW.js';
3
+ import { Input } from './chunk-7GUPNTAH.js';
4
+ import { TooltipExport } from './chunk-KZP6B6B3.js';
5
5
  import { ChevronsLeftIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsRightIcon } from './chunk-BLIZ3CL3.js';
6
- import { warnPositiveInt, warnNonNegativeInt } from './chunk-QDYE5LVT.js';
7
6
  import { cn } from './chunk-ZSNJ6UA3.js';
7
+ import { useLabels } from './chunk-RJTVCA62.js';
8
+ import { warnPositiveInt, warnNonNegativeInt } from './chunk-QDYE5LVT.js';
8
9
  import * as React from 'react';
9
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
11
 
12
+ // src/components/pagination/labels.ts
13
+ var PAGINATION_LABELS = {
14
+ /** The `<nav>` landmark. */
15
+ nav: "Pagination",
16
+ /** VISIBLE — the readout word before the page number. */
17
+ page: "Page",
18
+ /**
19
+ * VISIBLE — the words AFTER the page number, carrying the total: `Page` [3] `of 12`.
20
+ *
21
+ * Two keys bracketing the number rather than one whole-sentence key, because under `goto` the
22
+ * middle of that sentence is an `<input>`. A label returns a STRING, so it cannot wrap a node —
23
+ * the field has to sit between two labels. Thai keeps the same order (`หน้า` 3 `จาก 12`), so the
24
+ * bracket is a fit here and not a compromise; a language that puts the total first would need
25
+ * this pair rethought, and the existing `page` key already carried that constraint.
26
+ */
27
+ ofTotal: (ctx) => `of ${ctx.total}`,
28
+ /** The jump input's accessible name. */
29
+ goToPage: "Go to page",
30
+ /** Each numbered button. */
31
+ pageNumber: (ctx) => `Page ${ctx.page}`,
32
+ /** VISIBLE and also the select's accessible name — one key, both sites, because they are one
33
+ * phrase and a translation that split them would be saying two things. */
34
+ rowsPerPage: "Rows per page",
35
+ /**
36
+ * VISIBLE — the result count beside the pager.
37
+ *
38
+ * `formatted` arrives already locale-grouped (`"1,204"`), because formatting is the component's
39
+ * decision and a translator must never have to reimplement `toLocaleString`. `count` is the raw
40
+ * number, there for a plural rule: English owns its own two-form branch here, so a language with
41
+ * three forms overrides the whole function rather than fighting a hard-coded `s`.
42
+ */
43
+ results: (ctx) => `${ctx.formatted} ${ctx.count === 1 ? "result" : "results"}`,
44
+ first: "First page",
45
+ previous: "Previous page",
46
+ next: "Next page",
47
+ last: "Last page"
48
+ };
11
49
  var ELLIPSIS = "\u2026";
12
50
  function pageWindow(page, pageCount, siblingCount = 1) {
13
51
  const total = Math.max(1, pageCount);
@@ -84,8 +122,10 @@ function Pagination({
84
122
  goto = false,
85
123
  siblingCount = 1,
86
124
  disabled,
125
+ labels,
87
126
  className
88
127
  }) {
128
+ const t = useLabels("pagination", PAGINATION_LABELS, labels);
89
129
  const total = Math.max(1, pageCount);
90
130
  const current = Math.min(Math.max(1, page), total);
91
131
  React.useEffect(() => {
@@ -111,7 +151,7 @@ function Pagination({
111
151
  {
112
152
  size: "sm",
113
153
  inputMode: "numeric",
114
- "aria-label": "Go to page",
154
+ "aria-label": t.goToPage,
115
155
  value: draft ?? String(current),
116
156
  disabled,
117
157
  onChange: (event) => setDraft(event.target.value),
@@ -132,12 +172,9 @@ function Pagination({
132
172
  const showReadoutWords = variant !== "minimal";
133
173
  const gotoInMetadata = goto && variant === "numbered";
134
174
  const readoutBody = /* @__PURE__ */ jsxs(Fragment, { children: [
135
- showReadoutWords ? /* @__PURE__ */ jsx("span", { children: "Page" }) : null,
175
+ showReadoutWords ? /* @__PURE__ */ jsx("span", { children: t.page }) : null,
136
176
  goto ? pageField : /* @__PURE__ */ jsx("span", { className: "font-medium text-primary", children: current }),
137
- showReadoutWords ? /* @__PURE__ */ jsxs("span", { children: [
138
- "of ",
139
- total
140
- ] }) : null
177
+ showReadoutWords ? /* @__PURE__ */ jsx("span", { children: t.ofTotal({ total }) }) : null
141
178
  ] });
142
179
  const metadata = [];
143
180
  if (gotoInMetadata) {
@@ -152,12 +189,12 @@ function Pagination({
152
189
  id: "size",
153
190
  tier: 30,
154
191
  node: (tierClass) => /* @__PURE__ */ jsxs("div", { className: cn("items-center gap-2 text-sm text-tertiary", tierClass), children: [
155
- /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: "Rows per page" }),
192
+ /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: t.rowsPerPage }),
156
193
  /* @__PURE__ */ jsx(
157
194
  NativeSelect,
158
195
  {
159
196
  size: "sm",
160
- "aria-label": "Rows per page",
197
+ "aria-label": t.rowsPerPage,
161
198
  value: String(pageSize),
162
199
  disabled,
163
200
  onChange: (event) => onPageSizeChange(Number(event.target.value)),
@@ -171,14 +208,10 @@ function Pagination({
171
208
  metadata.push({
172
209
  id: "total",
173
210
  tier: 42,
174
- node: (tierClass) => /* @__PURE__ */ jsxs("span", { className: cn("text-sm whitespace-nowrap text-tertiary", tierClass), children: [
175
- totalItems.toLocaleString(),
176
- " ",
177
- totalItems === 1 ? "result" : "results"
178
- ] })
211
+ node: (tierClass) => /* @__PURE__ */ jsx("span", { className: cn("text-sm whitespace-nowrap text-tertiary", tierClass), children: t.results({ count: totalItems, formatted: totalItems.toLocaleString() }) })
179
212
  });
180
213
  }
181
- return /* @__PURE__ */ jsx("div", { className: cn("@container w-full", className), children: /* @__PURE__ */ jsxs("nav", { "aria-label": "Pagination", className: cn("flex w-full flex-wrap items-center gap-2 @[46rem]:gap-3", ALIGN[align]), children: [
214
+ return /* @__PURE__ */ jsx("div", { className: cn("@container w-full", className), children: /* @__PURE__ */ jsxs("nav", { "aria-label": t.nav, className: cn("flex w-full flex-wrap items-center gap-2 @[46rem]:gap-3", ALIGN[align]), children: [
182
215
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: metadata.map((member, index) => {
183
216
  const previous = metadata[index - 1];
184
217
  return /* @__PURE__ */ jsxs(React.Fragment, { children: [
@@ -191,7 +224,7 @@ function Pagination({
191
224
  variant === "numbered" ? /* @__PURE__ */ jsx(
192
225
  Arrow,
193
226
  {
194
- label: "First page",
227
+ label: t.first,
195
228
  icon: /* @__PURE__ */ jsx(ChevronsLeftIcon, {}),
196
229
  color,
197
230
  disabled: Boolean(disabled) || current <= 1,
@@ -199,16 +232,7 @@ function Pagination({
199
232
  className: "hidden @[46rem]:flex"
200
233
  }
201
234
  ) : null,
202
- /* @__PURE__ */ jsx(
203
- Arrow,
204
- {
205
- label: "Previous page",
206
- icon: /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
207
- color,
208
- disabled: Boolean(disabled) || current <= 1,
209
- onClick: () => go(current - 1)
210
- }
211
- )
235
+ /* @__PURE__ */ jsx(Arrow, { label: t.previous, icon: /* @__PURE__ */ jsx(ChevronLeftIcon, {}), color, disabled: Boolean(disabled) || current <= 1, onClick: () => go(current - 1) })
212
236
  ] }),
213
237
  variant === "numbered" ? /* @__PURE__ */ jsx("div", { className: "hidden items-center gap-0.5 @[46rem]:flex", children: pageWindow(current, total, siblingCount).map(
214
238
  (entry, index) => entry === ELLIPSIS ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "flex size-9 shrink-0 items-center justify-center text-tertiary", children: ELLIPSIS }, `gap-${index}`) : /* @__PURE__ */ jsx(
@@ -217,7 +241,7 @@ function Pagination({
217
241
  type: "button",
218
242
  disabled,
219
243
  "aria-current": entry === current ? "page" : void 0,
220
- "aria-label": `Page ${entry}`,
244
+ "aria-label": t.pageNumber({ page: entry }),
221
245
  onClick: () => go(entry),
222
246
  className: cn(PAGE_BUTTON, entry === current ? PAGE_BUTTON_ACTIVE[color] : PAGE_BUTTON_IDLE[color]),
223
247
  children: entry
@@ -242,20 +266,11 @@ function Pagination({
242
266
  )
243
267
  ) : null,
244
268
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
245
- /* @__PURE__ */ jsx(
246
- Arrow,
247
- {
248
- label: "Next page",
249
- icon: /* @__PURE__ */ jsx(ChevronRightIcon, {}),
250
- color,
251
- disabled: Boolean(disabled) || current >= total,
252
- onClick: () => go(current + 1)
253
- }
254
- ),
269
+ /* @__PURE__ */ jsx(Arrow, { label: t.next, icon: /* @__PURE__ */ jsx(ChevronRightIcon, {}), color, disabled: Boolean(disabled) || current >= total, onClick: () => go(current + 1) }),
255
270
  variant === "numbered" ? /* @__PURE__ */ jsx(
256
271
  Arrow,
257
272
  {
258
- label: "Last page",
273
+ label: t.last,
259
274
  icon: /* @__PURE__ */ jsx(ChevronsRightIcon, {}),
260
275
  color,
261
276
  disabled: Boolean(disabled) || current >= total,
@@ -270,5 +285,5 @@ function Pagination({
270
285
  Pagination.displayName = "Pagination";
271
286
 
272
287
  export { Pagination, pageWindow };
273
- //# sourceMappingURL=chunk-JAVNGTOE.js.map
274
- //# sourceMappingURL=chunk-JAVNGTOE.js.map
288
+ //# sourceMappingURL=chunk-6MMBQVRO.js.map
289
+ //# sourceMappingURL=chunk-6MMBQVRO.js.map
@@ -1,13 +1,19 @@
1
1
  import { useControlScrollFade } from './chunk-7EUAMHMU.js';
2
- import { FieldShell } from './chunk-JUWDRRD6.js';
3
- import { useSeamlessSlot } from './chunk-TBN644IN.js';
4
- import { useFieldValidity, FieldFrame } from './chunk-QKDEQFOQ.js';
2
+ import { FieldShell } from './chunk-X2VMIBK5.js';
3
+ import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
4
+ import { useSeamlessSlot } from './chunk-7ZM7SNCZ.js';
5
5
  import { EyeOffIcon, EyeIcon } from './chunk-BLIZ3CL3.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 { jsx, Fragment } from 'react/jsx-runtime';
10
11
 
12
+ // src/components/input/labels.ts
13
+ var INPUT_LABELS = {
14
+ showPassword: "Show password",
15
+ hidePassword: "Hide password"
16
+ };
11
17
  function InputAddon({ size: sizeProp, children, className }) {
12
18
  const slot = useSeamlessSlot();
13
19
  const size = sizeProp ?? slot?.size ?? "md";
@@ -35,8 +41,10 @@ function Input(props) {
35
41
  name,
36
42
  id,
37
43
  className,
44
+ labels,
38
45
  ...rest
39
46
  } = props;
47
+ const t = useLabels("input", INPUT_LABELS, labels);
40
48
  const [revealed, setRevealed] = React.useState(false);
41
49
  const isPassword = type === "password";
42
50
  const controlType = isPassword ? revealed ? "text" : "password" : type;
@@ -75,7 +83,7 @@ function Input(props) {
75
83
  type: "button",
76
84
  disabled,
77
85
  onClick: () => setRevealed((v) => !v),
78
- "aria-label": revealed ? "Hide password" : "Show password",
86
+ "aria-label": revealed ? t.hidePassword : t.showPassword,
79
87
  className: cn(
80
88
  "inline-flex shrink-0 cursor-pointer text-fg-quaternary transition duration-100 ease-linear outline-none disabled:cursor-not-allowed",
81
89
  "hover:text-fg-quaternary_hover focus-visible:text-fg-quaternary_hover",
@@ -106,5 +114,5 @@ function Input(props) {
106
114
  }
107
115
 
108
116
  export { Input, InputAddon };
109
- //# sourceMappingURL=chunk-JMWYCT63.js.map
110
- //# sourceMappingURL=chunk-JMWYCT63.js.map
117
+ //# sourceMappingURL=chunk-7GUPNTAH.js.map
118
+ //# sourceMappingURL=chunk-7GUPNTAH.js.map
@@ -1,5 +1,5 @@
1
- import { devWarn } from './chunk-QDYE5LVT.js';
2
1
  import { cn } from './chunk-ZSNJ6UA3.js';
2
+ import { devWarn } from './chunk-QDYE5LVT.js';
3
3
  import * as React from 'react';
4
4
 
5
5
  var SEAMLESS_COLOR = "bg-current/10 text-inherit ring-1 ring-inset ring-current/20";
@@ -48,5 +48,5 @@ function warnSeamlessFieldChrome(component, chrome) {
48
48
  }
49
49
 
50
50
  export { SEAMLESS_BOX, SEAMLESS_CHIP, SEAMLESS_CHIP_NUM, SEAMLESS_CHIP_PX, SEAMLESS_COLOR, SEAMLESS_CONTROL, SEAMLESS_DOT, SEAMLESS_FILL_COUPLED_FG, SEAMLESS_INHERIT_FG, SeamlessProvider, addonSlotClasses, useSeamlessSlot, warnSeamlessFieldChrome };
51
- //# sourceMappingURL=chunk-TBN644IN.js.map
52
- //# sourceMappingURL=chunk-TBN644IN.js.map
51
+ //# sourceMappingURL=chunk-7ZM7SNCZ.js.map
52
+ //# sourceMappingURL=chunk-7ZM7SNCZ.js.map
@@ -1,4 +1,4 @@
1
- import { useControllableOpen, DialogSurface } from './chunk-VEOYCAJP.js';
1
+ import { useControllableOpen, DialogSurface } from './chunk-CKMWBVRR.js';
2
2
  import { EXPLICIT_CLOSE } from './chunk-S7NNXWIN.js';
3
3
  import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
4
4
  import * as React from 'react';
@@ -11,6 +11,7 @@ function Dialog(props) {
11
11
  defaultOpen = false,
12
12
  onOpenChange,
13
13
  size = "md",
14
+ backdrop = "scrim",
14
15
  showClose = true,
15
16
  dividers = "line",
16
17
  keepMounted = false,
@@ -45,6 +46,7 @@ function Dialog(props) {
45
46
  DialogSurface,
46
47
  {
47
48
  size,
49
+ backdrop,
48
50
  showClose,
49
51
  dividers,
50
52
  keepMounted,
@@ -66,5 +68,5 @@ function Dialog(props) {
66
68
  Dialog.displayName = "Dialog";
67
69
 
68
70
  export { Dialog };
69
- //# sourceMappingURL=chunk-BD5YKFRA.js.map
70
- //# sourceMappingURL=chunk-BD5YKFRA.js.map
71
+ //# sourceMappingURL=chunk-A323V6AI.js.map
72
+ //# sourceMappingURL=chunk-A323V6AI.js.map
@@ -19,5 +19,5 @@ var TOOLTIP_TONE = {
19
19
  };
20
20
 
21
21
  export { TOOLTIP_SWATCH, TOOLTIP_TONE };
22
- //# sourceMappingURL=chunk-AC6ZWKRN.js.map
23
- //# sourceMappingURL=chunk-AC6ZWKRN.js.map
22
+ //# sourceMappingURL=chunk-AFYXSZGW.js.map
23
+ //# sourceMappingURL=chunk-AFYXSZGW.js.map
@@ -0,0 +1,33 @@
1
+ import { LinkContext } from './chunk-5AZKP4KZ.js';
2
+ import { LocaleContext } from './chunk-YIHKQ63K.js';
3
+ import { LabelsContext, mergeLabels } from './chunk-RJTVCA62.js';
4
+ import { devWarn } from './chunk-QDYE5LVT.js';
5
+ import * as React from 'react';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ function JenosizeUIProvider(props) {
9
+ const { link, labels, locale, timeZone, era, weekStartsOn, children } = props;
10
+ const outer = React.useContext(LabelsContext);
11
+ const mergedLabels = React.useMemo(() => mergeLabels(outer, labels), [outer, labels]);
12
+ const outerLocale = React.useContext(LocaleContext);
13
+ const localeConfig = React.useMemo(() => {
14
+ const own = { locale, timeZone, era, weekStartsOn };
15
+ const declared = Object.fromEntries(Object.entries(own).filter(([, v]) => v !== void 0));
16
+ if (Object.keys(declared).length === 0) return outerLocale;
17
+ return { ...outerLocale, ...declared };
18
+ }, [outerLocale, locale, timeZone, era, weekStartsOn]);
19
+ const outerLink = React.useContext(LinkContext);
20
+ const previousLink = React.useRef(link);
21
+ if (link != null && previousLink.current != null && link !== previousLink.current) {
22
+ devWarn(
23
+ "`JenosizeUIProvider link` changed identity between renders, which REMOUNTS every link in the app (losing keyboard focus and router prefetch state). Hoist the wrapper to module scope \u2014 `const AppLink = ({ href, ...rest }) => <Link to={href} {...rest} />` \u2014 or wrap it in `useCallback`."
24
+ );
25
+ }
26
+ previousLink.current = link;
27
+ return /* @__PURE__ */ jsx(LinkContext.Provider, { value: link ?? outerLink, children: /* @__PURE__ */ jsx(LabelsContext.Provider, { value: mergedLabels, children: /* @__PURE__ */ jsx(LocaleContext.Provider, { value: localeConfig, children }) }) });
28
+ }
29
+ JenosizeUIProvider.displayName = "JenosizeUIProvider";
30
+
31
+ export { JenosizeUIProvider };
32
+ //# sourceMappingURL=chunk-AIARANKE.js.map
33
+ //# sourceMappingURL=chunk-AIARANKE.js.map
@@ -1,8 +1,8 @@
1
- import { Slot } from './chunk-52IFGFTL.js';
2
1
  import { useScrollFade } from './chunk-O2LG3PNI.js';
3
2
  import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
4
- import { warnStickyNoScrollport, nearestScrollport, warnNeedsName } from './chunk-QDYE5LVT.js';
3
+ import { Slot } from './chunk-52IFGFTL.js';
5
4
  import { cn } from './chunk-ZSNJ6UA3.js';
5
+ import { warnStickyNoScrollport, nearestScrollport, warnNeedsName } from './chunk-QDYE5LVT.js';
6
6
  import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
7
7
  import * as React from 'react';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -162,6 +162,7 @@ function Tabs(props) {
162
162
  value: it.value,
163
163
  disabled: it.disabled,
164
164
  "aria-label": it.ariaLabel,
165
+ render: it.render,
165
166
  className: cn(TAB_BASE, TAB_SIZE[size], TAB_VARIANT[variant], fitted && (horizontal ? "min-w-0 flex-1" : "flex-1"), it.className),
166
167
  children: [
167
168
  it.leading != null ? /* @__PURE__ */ jsx(Slot, { className: TAB_SLOT_ICON[size], children: it.leading }) : null,
@@ -201,5 +202,5 @@ function Tabs(props) {
201
202
  Tabs.displayName = "Tabs";
202
203
 
203
204
  export { Tabs };
204
- //# sourceMappingURL=chunk-54S5CUY6.js.map
205
- //# sourceMappingURL=chunk-54S5CUY6.js.map
205
+ //# sourceMappingURL=chunk-AIGYMTCU.js.map
206
+ //# sourceMappingURL=chunk-AIGYMTCU.js.map
@@ -1,7 +1,7 @@
1
- import { GLYPH } from './chunk-6IUTVDNI.js';
2
- import { TooltipExport } from './chunk-4R7WDDCW.js';
3
- import { warnNeedsName } from './chunk-QDYE5LVT.js';
1
+ import { GLYPH } from './chunk-MCQG4H6T.js';
2
+ import { TooltipExport } from './chunk-KZP6B6B3.js';
4
3
  import { cn } from './chunk-ZSNJ6UA3.js';
4
+ import { warnNeedsName } from './chunk-QDYE5LVT.js';
5
5
  import { mergeProps } from '@base-ui/react/merge-props';
6
6
  import { useRender } from '@base-ui/react/use-render';
7
7
  import 'react';
@@ -59,5 +59,5 @@ function ButtonUtility(props) {
59
59
  }
60
60
 
61
61
  export { ButtonUtility };
62
- //# sourceMappingURL=chunk-C6OTOTKI.js.map
63
- //# sourceMappingURL=chunk-C6OTOTKI.js.map
62
+ //# sourceMappingURL=chunk-AZ7DKRBY.js.map
63
+ //# sourceMappingURL=chunk-AZ7DKRBY.js.map
@@ -1,13 +1,19 @@
1
1
  import { useControlScrollFade } from './chunk-7EUAMHMU.js';
2
- import { FieldShell } from './chunk-JUWDRRD6.js';
3
- import { useFieldValidity, FieldFrame } from './chunk-QKDEQFOQ.js';
2
+ import { FieldShell } from './chunk-X2VMIBK5.js';
3
+ import { useFieldValidity, FieldFrame } from './chunk-5KSD4WKN.js';
4
4
  import { PlusIcon, ChevronUpIcon, ChevronDownIcon, MinusIcon } from './chunk-BLIZ3CL3.js';
5
- import { warnPositiveNumber } from './chunk-QDYE5LVT.js';
6
5
  import { cn } from './chunk-ZSNJ6UA3.js';
6
+ import { useLabels } from './chunk-RJTVCA62.js';
7
+ import { warnPositiveNumber } from './chunk-QDYE5LVT.js';
7
8
  import { NumberField } from '@base-ui/react/number-field';
8
9
  import 'react';
9
10
  import { jsx, jsxs } from 'react/jsx-runtime';
10
11
 
12
+ // src/components/number-input/labels.ts
13
+ var NUMBER_INPUT_LABELS = {
14
+ decrease: "Decrease",
15
+ increase: "Increase"
16
+ };
11
17
  var STEP_GAP = { sm: "gap-3", md: "gap-3", lg: "gap-3.5" };
12
18
  var STEP_BTN = "inline-flex shrink-0 cursor-pointer items-center justify-center self-stretch text-tertiary outline-none transition-colors duration-100 ease-linear enabled:hover:bg-secondary enabled:hover:text-secondary disabled:cursor-not-allowed disabled:[&_svg]:opacity-50 [&_svg]:size-5";
13
19
  var STEP_PX = { sm: "px-2", md: "px-2.5", lg: "px-3" };
@@ -50,8 +56,10 @@ function NumberInput(props) {
50
56
  format,
51
57
  onValueChange,
52
58
  className,
53
- "aria-label": ariaLabel
59
+ "aria-label": ariaLabel,
60
+ labels
54
61
  } = props;
62
+ const t = useLabels("numberInput", NUMBER_INPUT_LABELS, labels);
55
63
  warnPositiveNumber("NumberInput", "step", step === "any" ? void 0 : step);
56
64
  warnPositiveNumber("NumberInput", "smallStep", smallStep);
57
65
  warnPositiveNumber("NumberInput", "largeStep", largeStep);
@@ -103,10 +111,10 @@ function NumberInput(props) {
103
111
  leadingAddon,
104
112
  trailingAddon,
105
113
  segmentDivider: variant !== "horizontal",
106
- segmentLeading: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label": "Decrease", className: cn(STEP_BTN, STEP_PX[size]), children: /* @__PURE__ */ jsx(MinusIcon, {}) }) : null,
107
- segmentTrailing: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Increment, { "aria-label": "Increase", className: cn(STEP_BTN, STEP_PX[size]), children: /* @__PURE__ */ jsx(PlusIcon, {}) }) : /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col self-stretch", size === "lg" ? "w-7.5" : "w-7"), children: [
108
- /* @__PURE__ */ jsx(NumberField.Increment, { "aria-label": "Increase", className: cn(CHEVRON_BTN, CHEVRON_ICON[size]), children: /* @__PURE__ */ jsx(ChevronUpIcon, {}) }),
109
- /* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label": "Decrease", className: cn(CHEVRON_BTN, "border-t border-primary", CHEVRON_ICON[size]), children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
114
+ segmentLeading: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label": t.decrease, className: cn(STEP_BTN, STEP_PX[size]), children: /* @__PURE__ */ jsx(MinusIcon, {}) }) : null,
115
+ segmentTrailing: variant === "horizontal" ? /* @__PURE__ */ jsx(NumberField.Increment, { "aria-label": t.increase, className: cn(STEP_BTN, STEP_PX[size]), children: /* @__PURE__ */ jsx(PlusIcon, {}) }) : /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col self-stretch", size === "lg" ? "w-7.5" : "w-7"), children: [
116
+ /* @__PURE__ */ jsx(NumberField.Increment, { "aria-label": t.increase, className: cn(CHEVRON_BTN, CHEVRON_ICON[size]), children: /* @__PURE__ */ jsx(ChevronUpIcon, {}) }),
117
+ /* @__PURE__ */ jsx(NumberField.Decrement, { "aria-label": t.decrease, className: cn(CHEVRON_BTN, "border-t border-primary", CHEVRON_ICON[size]), children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
110
118
  ] }),
111
119
  className: STEP_GAP[size],
112
120
  children: /* @__PURE__ */ jsx(
@@ -129,5 +137,5 @@ function NumberInput(props) {
129
137
  }
130
138
 
131
139
  export { NumberInput };
132
- //# sourceMappingURL=chunk-QBHQOX23.js.map
133
- //# sourceMappingURL=chunk-QBHQOX23.js.map
140
+ //# sourceMappingURL=chunk-BBKE4W3B.js.map
141
+ //# sourceMappingURL=chunk-BBKE4W3B.js.map
@@ -1,7 +1,7 @@
1
- import { useControllableOpen } from './chunk-VEOYCAJP.js';
2
- import { PanelChrome } from './chunk-FZBZGA3P.js';
3
- import { CloseButton } from './chunk-42FCPC77.js';
1
+ import { useControllableOpen, BACKDROP_TREATMENT } from './chunk-CKMWBVRR.js';
2
+ import { PanelChrome } from './chunk-LO22VQL5.js';
4
3
  import { EXPLICIT_CLOSE } from './chunk-S7NNXWIN.js';
4
+ import { CloseButton } from './chunk-CGHYXWTT.js';
5
5
  import { DRAWER_BACKDROP_MOTION, DRAWER_POPUP_MOTION, DRAWER_SLIDE } from './chunk-O4GRKO3I.js';
6
6
  import { cn } from './chunk-ZSNJ6UA3.js';
7
7
  import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
@@ -47,6 +47,7 @@ function Drawer(props) {
47
47
  onOpenChange,
48
48
  side = "right",
49
49
  size = "md",
50
+ backdrop = "scrim",
50
51
  showClose = true,
51
52
  dividers = "line",
52
53
  keepMounted = false,
@@ -83,7 +84,7 @@ function Drawer(props) {
83
84
  children: [
84
85
  trigger ? /* @__PURE__ */ jsx(Drawer$1.Trigger, { render: trigger }) : null,
85
86
  /* @__PURE__ */ jsxs(Drawer$1.Portal, { keepMounted, container, children: [
86
- /* @__PURE__ */ jsx(Drawer$1.Backdrop, { className: cn(anchor, "inset-0 z-50 bg-overlay", DRAWER_BACKDROP_MOTION) }),
87
+ /* @__PURE__ */ jsx(Drawer$1.Backdrop, { className: cn(anchor, "inset-0 z-50", BACKDROP_TREATMENT[backdrop], DRAWER_BACKDROP_MOTION) }),
87
88
  /* @__PURE__ */ jsx(Drawer$1.Viewport, { className: cn("pointer-events-none z-50", anchor, "inset-0"), children: /* @__PURE__ */ jsx(
88
89
  PanelChrome,
89
90
  {
@@ -127,5 +128,5 @@ function Drawer(props) {
127
128
  Drawer.displayName = "Drawer";
128
129
 
129
130
  export { Drawer };
130
- //# sourceMappingURL=chunk-4BRMM3I5.js.map
131
- //# sourceMappingURL=chunk-4BRMM3I5.js.map
131
+ //# sourceMappingURL=chunk-BFVJHH7S.js.map
132
+ //# sourceMappingURL=chunk-BFVJHH7S.js.map
@@ -1,11 +1,19 @@
1
+ import { useLinkElement } from './chunk-5AZKP4KZ.js';
1
2
  import { Slot } from './chunk-52IFGFTL.js';
2
3
  import { ChevronRightIcon, SlashIcon } from './chunk-BLIZ3CL3.js';
3
- import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
4
4
  import { cn } from './chunk-ZSNJ6UA3.js';
5
+ import { useLabels } from './chunk-RJTVCA62.js';
6
+ import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
5
7
  import { useRender } from '@base-ui/react/use-render';
6
8
  import * as React from 'react';
7
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
10
 
11
+ // src/components/breadcrumb/labels.ts
12
+ var BREADCRUMB_LABELS = {
13
+ /** The "…" trigger. The English default owns its own `count === 1` branch — a language with a
14
+ * different plural rule owns the whole function, which is why this is not a string. */
15
+ showHidden: (ctx) => `Show ${ctx.count} hidden breadcrumb${ctx.count === 1 ? "" : "s"}`
16
+ };
9
17
  var NAV = "min-w-0";
10
18
  var OL_BASE = "flex items-center";
11
19
  var OL_GAP = {
@@ -44,9 +52,12 @@ function CrumbContent({ item, truncate }) {
44
52
  }
45
53
  function Crumb({ item, variant }) {
46
54
  const { href, render, onClick, ariaLabel, className } = item;
55
+ const link = useLinkElement(href);
47
56
  return useRender({
48
57
  defaultTagName: "button",
49
- render: render ?? (href != null ? /* @__PURE__ */ jsx("a", { href }) : void 0),
58
+ // The item's own `render` still wins — it is the more specific statement than the provider's
59
+ // app-wide `link`, which is what `useLinkElement` reads.
60
+ render: render ?? link,
50
61
  // A crumb takes no `...rest` (its whole API is the item fields), so there is nothing to
51
62
  // merge — unlike Button, which merges its computed props over the caller's spread.
52
63
  props: {
@@ -69,7 +80,8 @@ function collapse(items, maxItems) {
69
80
  return { lead: rest.slice(0, keep), hidden: rest.slice(keep), current };
70
81
  }
71
82
  function Breadcrumb(props) {
72
- const { items, variant = "text", divider = "chevron", bordered = false, maxItems, className } = props;
83
+ const { items, variant = "text", divider = "chevron", bordered = false, maxItems, labels, className } = props;
84
+ const t = useLabels("breadcrumb", BREADCRUMB_LABELS, labels);
73
85
  const ariaLabel = props["aria-label"] ?? "Breadcrumb";
74
86
  const [expanded, setExpanded] = React.useState(false);
75
87
  warnPositiveInt("Breadcrumb", "maxItems", maxItems);
@@ -81,7 +93,7 @@ function Breadcrumb(props) {
81
93
  if (current.href != null || current.render != null) {
82
94
  devWarn("<Breadcrumb> the last item is the current page and never renders as a link \u2014 its `href`/`render` are ignored.");
83
95
  }
84
- const overflowLabel = `Show ${hidden.length} hidden breadcrumb${hidden.length === 1 ? "" : "s"}`;
96
+ const overflowLabel = t.showHidden({ count: hidden.length });
85
97
  return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className: cn(NAV, className), children: /* @__PURE__ */ jsxs("ol", { className: cn(OL_BASE, OL_GAP[variant], bordered && OL_BORDERED), children: [
86
98
  lead.map((item, i) => /* @__PURE__ */ jsxs("li", { className: cn(LI_BASE, OL_GAP[variant]), children: [
87
99
  /* @__PURE__ */ jsx(Crumb, { item, variant }),
@@ -110,5 +122,5 @@ function Breadcrumb(props) {
110
122
  Breadcrumb.displayName = "Breadcrumb";
111
123
 
112
124
  export { Breadcrumb };
113
- //# sourceMappingURL=chunk-FFTRB2UU.js.map
114
- //# sourceMappingURL=chunk-FFTRB2UU.js.map
125
+ //# sourceMappingURL=chunk-CFFWYXDW.js.map
126
+ //# sourceMappingURL=chunk-CFFWYXDW.js.map
@@ -1,10 +1,15 @@
1
1
  import { XIcon } from './chunk-BLIZ3CL3.js';
2
2
  import { cn } from './chunk-ZSNJ6UA3.js';
3
+ import { useLabels } from './chunk-RJTVCA62.js';
3
4
  import { mergeProps } from '@base-ui/react/merge-props';
4
5
  import { useRender } from '@base-ui/react/use-render';
5
6
  import 'react';
6
7
  import { jsx } from 'react/jsx-runtime';
7
8
 
9
+ // src/components/button/labels.ts
10
+ var CLOSE_BUTTON_LABELS = {
11
+ close: "Close"
12
+ };
8
13
  var BASE = "flex cursor-pointer items-center justify-center rounded-lg p-2 outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:shrink-0 [&_svg]:transition-colors [&_svg]:duration-100 [&_svg]:ease-linear";
9
14
  var SIZE = {
10
15
  xs: "size-7 [&_svg]:size-4",
@@ -17,7 +22,8 @@ var THEME = {
17
22
  dark: "text-white/70 hover:bg-white/20 hover:text-white"
18
23
  };
19
24
  function CloseButton(props) {
20
- const { render, size = "sm", theme = "light", label = "Close", disabled = false, type = "button", className, ...rest } = props;
25
+ const { render, size = "sm", theme = "light", label, labels, disabled = false, type = "button", className, ...rest } = props;
26
+ const t = useLabels("closeButton", CLOSE_BUTTON_LABELS, labels);
21
27
  return useRender({
22
28
  defaultTagName: "button",
23
29
  render,
@@ -27,7 +33,7 @@ function CloseButton(props) {
27
33
  className: cn(BASE, SIZE[size], THEME[theme], className),
28
34
  children: /* @__PURE__ */ jsx(XIcon, {}),
29
35
  disabled,
30
- "aria-label": label
36
+ "aria-label": label ?? t.close
31
37
  },
32
38
  rest
33
39
  )
@@ -35,5 +41,5 @@ function CloseButton(props) {
35
41
  }
36
42
 
37
43
  export { CloseButton };
38
- //# sourceMappingURL=chunk-42FCPC77.js.map
39
- //# sourceMappingURL=chunk-42FCPC77.js.map
44
+ //# sourceMappingURL=chunk-CGHYXWTT.js.map
45
+ //# sourceMappingURL=chunk-CGHYXWTT.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-LO22VQL5.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-CKMWBVRR.js.map
88
+ //# sourceMappingURL=chunk-CKMWBVRR.js.map