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,5 +1,4 @@
1
- import { useCartesianColors, BarChart, LineChart, AreaChart, MARGIN, ChartDataTable, formatNumber, ChartFrame, BAR_LAYOUT, CHART_ROOT, AREA_GRADIENT_STOPS, CartesianGrid, GRID, XAxis, X_AXIS_PADDING, AXIS_TICK, AXIS, Label, AXIS_LABEL, YAxis, ReferenceLine, ZERO_LINE, Tooltip, TOOLTIP_CURSOR, NO_ANIMATION, ChartTooltipContent, Area, AREA_FILL_OPACITY, AREA_SOLID_OPACITY, ACTIVE_DOT, AREA_BAND, Line, LINE_DASH, DOT, Bar, BAR_RADIUS_HORIZONTAL, BAR_RADIUS, MAX_BAR_SIZE, ChartLegendContent, BAND_SEPARATOR } from './chunk-75M43ELV.js';
2
- import { cn } from './chunk-ZSNJ6UA3.js';
1
+ import { useCartesianColors, DEFAULT_PALETTE, BarChart, LineChart, AreaChart, MARGIN, ChartDataTable, formatNumber, ChartFrame, BAR_LAYOUT, CHART_ROOT, AREA_GRADIENT_STOPS, CartesianGrid, GRID, XAxis, X_AXIS_PADDING, AXIS_TICK, AXIS, Label, AXIS_LABEL, YAxis, ReferenceLine, ZERO_LINE, Tooltip, TOOLTIP_CURSOR, NO_ANIMATION, ChartTooltipContent, Area, AREA_FILL_OPACITY, AREA_SOLID_OPACITY, AREA_BAND, ACTIVE_DOT, Line, LINE_DASH, DOT, Bar, BAR_RADIUS_HORIZONTAL, BAR_RADIUS, MAX_BAR_SIZE, ChartLegendContent, BAND_SEPARATOR } from './chunk-22M75A3N.js';
3
2
  import * as React from 'react';
4
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
4
 
@@ -45,7 +44,7 @@ function Cartesian({
45
44
  series,
46
45
  mark,
47
46
  component,
48
- palette = "brand",
47
+ palette = DEFAULT_PALETTE,
49
48
  height = 240,
50
49
  legend = "right",
51
50
  grid = true,
@@ -55,7 +54,8 @@ function Cartesian({
55
54
  formatValue = formatNumber,
56
55
  tooltip = true,
57
56
  tooltipTone = "surface",
58
- emptyMessage = "No data to display",
57
+ emptyMessage,
58
+ labels,
59
59
  className,
60
60
  "aria-label": ariaLabel
61
61
  }) {
@@ -69,7 +69,7 @@ function Cartesian({
69
69
  }
70
70
  return { colorMap: colorMap2, labelMap: labelMap2 };
71
71
  }, [series, colors]);
72
- const legendItems = React.useMemo(() => series.map((s, i) => ({ label: s.label, colorClass: colors[i] ?? "" })), [series, colors]);
72
+ const legendItems = React.useMemo(() => series.map((s, i) => ({ label: s.label, color: colors[i] ?? "" })), [series, colors]);
73
73
  const formatCategory = React.useCallback((value) => formatX ? formatX(value) : String(value ?? ""), [formatX]);
74
74
  const crossesZero = React.useMemo(() => {
75
75
  let min = Infinity;
@@ -114,13 +114,14 @@ function Cartesian({
114
114
  height,
115
115
  isEmpty: data.length === 0,
116
116
  emptyMessage,
117
+ labels,
117
118
  className,
118
119
  table,
119
120
  legendAlign: "start",
120
121
  legendPlacement: legend === "none" ? void 0 : legend,
121
122
  legend: legend === "none" ? void 0 : /* @__PURE__ */ jsx(ChartLegendContent, { items: legendItems, placement: legend }),
122
123
  children: (gid) => /* @__PURE__ */ jsxs(Root, { data, className: CHART_ROOT, margin, layout: mark.kind === "bar" ? BAR_LAYOUT[mark.layout] : void 0, children: [
123
- mark.kind === "area" && mark.fill === "gradient" ? /* @__PURE__ */ jsx("defs", { children: series.map((s, i) => /* @__PURE__ */ jsxs("linearGradient", { id: `${gid}-${i}`, x1: "0", y1: "0", x2: "0", y2: "1", className: colors[i], children: [
124
+ mark.kind === "area" && mark.fill === "gradient" ? /* @__PURE__ */ jsx("defs", { children: series.map((s, i) => /* @__PURE__ */ jsxs("linearGradient", { id: `${gid}-${i}`, x1: "0", y1: "0", x2: "0", y2: "1", style: { color: colors[i] }, children: [
124
125
  /* @__PURE__ */ jsx("stop", { offset: AREA_GRADIENT_STOPS.fromOffset, stopColor: "currentColor", stopOpacity: AREA_GRADIENT_STOPS.from }),
125
126
  /* @__PURE__ */ jsx("stop", { offset: AREA_GRADIENT_STOPS.toOffset, stopColor: "currentColor", stopOpacity: AREA_GRADIENT_STOPS.to })
126
127
  ] }, s.key)) }) : null,
@@ -194,7 +195,8 @@ function Cartesian({
194
195
  Area,
195
196
  {
196
197
  ...NO_ANIMATION,
197
- className: cn(color, AREA_BAND[mark.band]),
198
+ className: AREA_BAND[mark.band],
199
+ style: { color },
198
200
  dataKey: key,
199
201
  name: s.label,
200
202
  type: mark.curve,
@@ -213,7 +215,7 @@ function Cartesian({
213
215
  Line,
214
216
  {
215
217
  ...NO_ANIMATION,
216
- className: color,
218
+ style: { color },
217
219
  dataKey: key,
218
220
  name: s.label,
219
221
  type: mark.curve,
@@ -231,7 +233,7 @@ function Cartesian({
231
233
  Bar,
232
234
  {
233
235
  ...NO_ANIMATION,
234
- className: color,
236
+ style: { color },
235
237
  dataKey: key,
236
238
  name: s.label,
237
239
  fill: "currentColor",
@@ -248,5 +250,5 @@ function Cartesian({
248
250
  }
249
251
 
250
252
  export { Cartesian };
251
- //# sourceMappingURL=chunk-NA35YZRD.js.map
252
- //# sourceMappingURL=chunk-NA35YZRD.js.map
253
+ //# sourceMappingURL=chunk-5DP7W5HX.js.map
254
+ //# sourceMappingURL=chunk-5DP7W5HX.js.map
@@ -1,6 +1,7 @@
1
- import { TooltipExport } from './chunk-4R7WDDCW.js';
1
+ import { TooltipExport } from './chunk-KZP6B6B3.js';
2
2
  import { CircleHelpIcon } from './chunk-BLIZ3CL3.js';
3
3
  import { cn } from './chunk-ZSNJ6UA3.js';
4
+ import { useLabels } from './chunk-RJTVCA62.js';
4
5
  import { Field } from '@base-ui/react/field';
5
6
  import 'react';
6
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -43,6 +44,13 @@ var SHELL_SIZE = {
43
44
  lg: `min-h-11 ${BAR_PX.lg} gap-2 ${CONTROL_TEXT.lg} ${CONTROL_RADIUS}`
44
45
  };
45
46
  var LISTBOX_PX_SM = "pl-3 pr-2.5";
47
+
48
+ // src/components/field/labels.ts
49
+ var FIELD_LABELS = {
50
+ /** Appended to a required control's accessible name, visually hidden. Leading comma included:
51
+ * it is a name FRAGMENT ("Email, required"), not a sentence. */
52
+ required: ", required"
53
+ };
46
54
  function useFieldValidity(invalid = false, error) {
47
55
  const showError = error != null && error !== "";
48
56
  return { isInvalid: invalid || showError, showError };
@@ -126,6 +134,7 @@ function FieldGroupFrame(props) {
126
134
  announceRequired = false,
127
135
  children
128
136
  } = props;
137
+ const t = useLabels("field", FIELD_LABELS, void 0);
129
138
  return /* @__PURE__ */ jsxs(Field.Root, { name, disabled, invalid: isInvalid, className: cn("flex flex-col gap-1.5", fullWidth ? "w-full" : "w-auto", className), children: [
130
139
  label ? /* @__PURE__ */ jsxs("span", { id: labelId, className: FIELD_LABEL_CLASS, children: [
131
140
  /* @__PURE__ */ jsx(
@@ -139,7 +148,7 @@ function FieldGroupFrame(props) {
139
148
  tooltipDescription
140
149
  }
141
150
  ),
142
- required && announceRequired ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: ", required" }) : null
151
+ required && announceRequired ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.required }) : null
143
152
  ] }) : null,
144
153
  children,
145
154
  /* @__PURE__ */ jsx(FieldMessages, { hint, error, showError, size })
@@ -147,5 +156,5 @@ function FieldGroupFrame(props) {
147
156
  }
148
157
 
149
158
  export { BAR_SIZE, CONTROL_ICON, CONTROL_RADIUS, CONTROL_TEXT, FIELD_LABEL_CLASS, FieldFrame, FieldGroupFrame, LISTBOX_PX_SM, SHELL_SIZE, SLOT_ICON, useFieldValidity };
150
- //# sourceMappingURL=chunk-QKDEQFOQ.js.map
151
- //# sourceMappingURL=chunk-QKDEQFOQ.js.map
159
+ //# sourceMappingURL=chunk-5KSD4WKN.js.map
160
+ //# sourceMappingURL=chunk-5KSD4WKN.js.map
@@ -1,8 +1,8 @@
1
- import { OptionRow } from './chunk-GTHJWR3Q.js';
2
- import { useFieldValidity, FieldGroupFrame } from './chunk-QKDEQFOQ.js';
1
+ import { OptionRow } from './chunk-D7EE5GWU.js';
2
+ import { useFieldValidity, FieldGroupFrame } from './chunk-5KSD4WKN.js';
3
3
  import { MinusIcon, CheckIcon } from './chunk-BLIZ3CL3.js';
4
- import { devWarn, warnNeedsName } from './chunk-QDYE5LVT.js';
5
4
  import { cn } from './chunk-ZSNJ6UA3.js';
5
+ import { devWarn, warnNeedsName } from './chunk-QDYE5LVT.js';
6
6
  import { CheckboxGroup as CheckboxGroup$1 } from '@base-ui/react/checkbox-group';
7
7
  import * as React3 from 'react';
8
8
  import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
@@ -188,5 +188,5 @@ function CheckboxGroup(props) {
188
188
  CheckboxGroup.displayName = "CheckboxGroup";
189
189
 
190
190
  export { Checkbox, CheckboxGroup };
191
- //# sourceMappingURL=chunk-RIXEUAPY.js.map
192
- //# sourceMappingURL=chunk-RIXEUAPY.js.map
191
+ //# sourceMappingURL=chunk-5XPMY2LF.js.map
192
+ //# sourceMappingURL=chunk-5XPMY2LF.js.map
@@ -1,8 +1,8 @@
1
- import { controlBoxClasses } from './chunk-JUWDRRD6.js';
2
- import { useFieldValidity, FieldFrame, CONTROL_TEXT } from './chunk-QKDEQFOQ.js';
1
+ import { controlBoxClasses } from './chunk-X2VMIBK5.js';
2
+ import { useFieldValidity, FieldFrame, CONTROL_TEXT } from './chunk-5KSD4WKN.js';
3
3
  import { CircleIcon, AsteriskIcon } from './chunk-BLIZ3CL3.js';
4
- import { warnPositiveInt } from './chunk-QDYE5LVT.js';
5
4
  import { cn } from './chunk-ZSNJ6UA3.js';
5
+ import { warnPositiveInt } from './chunk-QDYE5LVT.js';
6
6
  import { OTPField } from '@base-ui/react/otp-field';
7
7
  import * as React from 'react';
8
8
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -143,5 +143,5 @@ function VerificationCodeInput(props) {
143
143
  }
144
144
 
145
145
  export { VerificationCodeInput };
146
- //# sourceMappingURL=chunk-6UBYHSBX.js.map
147
- //# sourceMappingURL=chunk-6UBYHSBX.js.map
146
+ //# sourceMappingURL=chunk-5ZEUTSCV.js.map
147
+ //# sourceMappingURL=chunk-5ZEUTSCV.js.map
@@ -1,14 +1,16 @@
1
- import { DEFAULT_WEEK_START, useControllable, DEFAULT_WEEK_START_INDEX, weekStartIndex, toWireDate } from './chunk-MD4AR43X.js';
2
- import { Popover } from './chunk-3Z3SDKIA.js';
3
- import { DateInput } from './chunk-NMERLWT7.js';
4
- import { DEFAULT_FORMAT, parseFormat, fromISO, BE_OFFSET } from './chunk-DJYWPJZ3.js';
5
- import { Button } from './chunk-A5WQLN4B.js';
1
+ import { DEFAULT_WEEK_START, useControllable, DEFAULT_WEEK_START_INDEX, weekStartIndex, toWireDate } from './chunk-FWRHBMWT.js';
2
+ import { Popover } from './chunk-YQYVGWIC.js';
3
+ import { DateInput } from './chunk-E2YZ7IMT.js';
4
+ import { DEFAULT_FORMAT, parseFormat, fromISO, BE_OFFSET } from './chunk-3QXLIZIX.js';
6
5
  import { INTRINSIC_CELL, INTRINSIC_STACK, IntrinsicWidth } from './chunk-7S2TBALK.js';
7
- import { FieldShell } from './chunk-JUWDRRD6.js';
8
- import { useFieldValidity, FieldFrame, CONTROL_ICON } from './chunk-QKDEQFOQ.js';
6
+ import { useLocaleConfig } from './chunk-YIHKQ63K.js';
7
+ import { Button } from './chunk-OACWA4TC.js';
8
+ import { FieldShell } from './chunk-X2VMIBK5.js';
9
+ import { useFieldValidity, FieldFrame, CONTROL_ICON } from './chunk-5KSD4WKN.js';
9
10
  import { CalendarIcon, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from './chunk-BLIZ3CL3.js';
10
- import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
11
11
  import { cn } from './chunk-ZSNJ6UA3.js';
12
+ import { useLabels, usePublishedLabels, LabelsContext } from './chunk-RJTVCA62.js';
13
+ import { warnPositiveInt, devWarn } from './chunk-QDYE5LVT.js';
12
14
  import { enUS } from 'date-fns/locale';
13
15
  import * as React5 from 'react';
14
16
  import { startOfDay, subDays, endOfWeek, startOfWeek, endOfMonth, startOfMonth, subMonths, endOfYear, startOfYear, subYears, isValid, addYears, format } from 'date-fns';
@@ -371,6 +373,35 @@ function DayGrid(props) {
371
373
  const value = selected;
372
374
  return /* @__PURE__ */ jsx(DayPicker, { ...shared, mode: "single", selected: value ?? void 0, onSelect: (next) => onSelect(next ?? null) });
373
375
  }
376
+
377
+ // src/components/date-picker/labels.ts
378
+ var DATE_PICKER_LABELS = {
379
+ /** The trigger's accessible name when the field has no `label`. */
380
+ openCalendar: "Choose a date",
381
+ openRange: "Choose a date range",
382
+ /** The two typed segments of a range. */
383
+ startDate: "Start date",
384
+ endDate: "End date",
385
+ /** The confirm footer, shown under `commit="confirm"`. */
386
+ cancel: "Cancel",
387
+ apply: "Apply",
388
+ /** Defaults behind the `placeholder` props — each prop still wins. */
389
+ placeholder: "Select date",
390
+ rangePlaceholder: "Select dates",
391
+ /** Defaults behind the standalone calendars' `aria-label`. */
392
+ calendarName: "Calendar",
393
+ rangeCalendarName: "Date range calendar",
394
+ /**
395
+ * Appended to the trigger's accessible name when the field is required, visually hidden —
396
+ * `aria-required` is illegal on `role="button"`, so the requirement has to travel in the NAME.
397
+ *
398
+ * Deliberately the bare word, NOT the `", required"` that `FIELD_LABELS` and `DROPZONE_LABELS`
399
+ * carry: this converts an existing literal and the pass's rule is that a default is byte-identical
400
+ * to what it replaced. The three spellings SHOULD agree — the comma is a pause a screen reader
401
+ * honours — but changing what a picker announces is a decision, not a conversion.
402
+ */
403
+ required: "required"
404
+ };
374
405
  function DateCalendar(props) {
375
406
  const {
376
407
  value,
@@ -379,13 +410,19 @@ function DateCalendar(props) {
379
410
  min,
380
411
  max,
381
412
  disabledDates,
382
- locale = enUS,
383
- weekStartsOn = DEFAULT_WEEK_START,
384
- era = "ce",
413
+ locale: localeProp,
414
+ weekStartsOn: weekStartsOnProp,
415
+ era: eraProp,
416
+ labels,
385
417
  size = "md",
386
418
  defaultMonth,
387
419
  className
388
420
  } = props;
421
+ const t = useLabels("datePicker", DATE_PICKER_LABELS, labels);
422
+ const app = useLocaleConfig();
423
+ const locale = localeProp ?? app.locale ?? enUS;
424
+ const era = eraProp ?? app.era ?? "ce";
425
+ const weekStartsOn = weekStartsOnProp ?? app.weekStartsOn ?? DEFAULT_WEEK_START;
389
426
  const [selected, setSelected] = useControllable(value, defaultValue, onValueChange);
390
427
  const normalized = React5.useMemo(() => toCalendarDate(selected), [selected]);
391
428
  return /* @__PURE__ */ jsx(
@@ -402,7 +439,7 @@ function DateCalendar(props) {
402
439
  era,
403
440
  size,
404
441
  defaultMonth,
405
- ariaLabel: props["aria-label"] ?? "Calendar",
442
+ ariaLabel: props["aria-label"] ?? t.calendarName,
406
443
  className
407
444
  }
408
445
  );
@@ -420,13 +457,19 @@ function DateRangeCalendar(props) {
420
457
  min,
421
458
  max,
422
459
  disabledDates,
423
- locale = enUS,
424
- weekStartsOn = DEFAULT_WEEK_START,
425
- era = "ce",
460
+ locale: localeProp,
461
+ weekStartsOn: weekStartsOnProp,
462
+ era: eraProp,
463
+ labels,
426
464
  size = "md",
427
465
  defaultMonth,
428
466
  className
429
467
  } = props;
468
+ const t = useLabels("datePicker", DATE_PICKER_LABELS, labels);
469
+ const app = useLocaleConfig();
470
+ const locale = localeProp ?? app.locale ?? enUS;
471
+ const era = eraProp ?? app.era ?? "ce";
472
+ const weekStartsOn = weekStartsOnProp ?? app.weekStartsOn ?? DEFAULT_WEEK_START;
430
473
  const [selected, setSelected] = useControllable(value, defaultValue, (next) => onValueChange?.(next ?? EMPTY_RANGE));
431
474
  const normalized = React5.useMemo(
432
475
  () => ({ start: toCalendarDate(selected?.start), end: toCalendarDate(selected?.end) }),
@@ -449,7 +492,7 @@ function DateRangeCalendar(props) {
449
492
  era,
450
493
  size,
451
494
  defaultMonth,
452
- ariaLabel: props["aria-label"] ?? "Date range calendar",
495
+ ariaLabel: props["aria-label"] ?? t.rangeCalendarName,
453
496
  className
454
497
  }
455
498
  );
@@ -627,9 +670,10 @@ function usePickerDraft(committed, commit, setCommitted, onOpen) {
627
670
  };
628
671
  }
629
672
  function ApplyRow({ onCancel, onApply, disabled }) {
673
+ const t = useLabels("datePicker", DATE_PICKER_LABELS, void 0);
630
674
  return /* @__PURE__ */ jsxs(Fragment, { children: [
631
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", color: "neutral", size: "sm", onClick: onCancel, children: "Cancel" }),
632
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, disabled, children: "Apply" })
675
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", color: "neutral", size: "sm", onClick: onCancel, children: t.cancel }),
676
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, disabled, children: t.apply })
633
677
  ] });
634
678
  }
635
679
  var BODY = "flex flex-col gap-3";
@@ -642,7 +686,7 @@ function DatePicker(props) {
642
686
  format: formatProp,
643
687
  dateInputFormat = DEFAULT_FORMAT,
644
688
  commit = "instant",
645
- placeholder = "Select date",
689
+ placeholder: placeholderProp,
646
690
  side = "bottom",
647
691
  align = "start",
648
692
  label,
@@ -664,13 +708,21 @@ function DatePicker(props) {
664
708
  min,
665
709
  max,
666
710
  disabledDates,
667
- locale = enUS,
668
- weekStartsOn = DEFAULT_WEEK_START,
669
- era = "ce",
711
+ locale: localeProp,
712
+ weekStartsOn: weekStartsOnProp,
713
+ era: eraProp,
714
+ labels,
670
715
  size = "md",
671
716
  defaultMonth,
672
717
  className
673
718
  } = props;
719
+ const t = useLabels("datePicker", DATE_PICKER_LABELS, labels);
720
+ const publishedLabels = usePublishedLabels("datePicker", labels);
721
+ const placeholder = placeholderProp ?? t.placeholder;
722
+ const app = useLocaleConfig();
723
+ const locale = localeProp ?? app.locale ?? enUS;
724
+ const era = eraProp ?? app.era ?? "ce";
725
+ const weekStartsOn = weekStartsOnProp ?? app.weekStartsOn ?? DEFAULT_WEEK_START;
674
726
  const hasTime = hasTimeSegments(dateInputFormat);
675
727
  const displayFormat = formatProp ?? defaultDisplayFormat(dateInputFormat);
676
728
  const [rawCommitted, setCommitted] = useControllable(value, defaultValue, onValueChange);
@@ -730,12 +782,12 @@ function DatePicker(props) {
730
782
  valueNode,
731
783
  /* @__PURE__ */ jsx(IntrinsicWidth, { candidates: sizingCandidates, className: "font-medium" })
732
784
  ] }) : valueNode,
733
- required && !hideRequiredIndicator ? /* @__PURE__ */ jsx("span", { id: requiredId, className: "sr-only", children: "required" }) : null,
785
+ required && !hideRequiredIndicator ? /* @__PURE__ */ jsx("span", { id: requiredId, className: "sr-only", children: t.required }) : null,
734
786
  /* @__PURE__ */ jsx(TriggerGlyph, { size })
735
787
  ]
736
788
  }
737
789
  );
738
- return /* @__PURE__ */ jsx(
790
+ return /* @__PURE__ */ jsx(LabelsContext.Provider, { value: publishedLabels, children: /* @__PURE__ */ jsx(
739
791
  FieldFrame,
740
792
  {
741
793
  label,
@@ -787,10 +839,22 @@ function DatePicker(props) {
787
839
  size: "lg",
788
840
  className: "max-h-[var(--available-height)] max-w-none",
789
841
  dividers: commit === "confirm" ? "line" : "none",
790
- "aria-label": label ?? "Choose a date",
842
+ "aria-label": label ?? t.openCalendar,
791
843
  footer: commit === "confirm" ? () => /* @__PURE__ */ jsx(ApplyRow, { onCancel: picker.close, onApply: picker.apply }) : void 0,
792
844
  children: /* @__PURE__ */ jsxs("div", { className: BODY, children: [
793
- /* @__PURE__ */ jsx(TypedRow, { value: picker.draft, onValueChange: onTypedChange, format: dateInputFormat, hasTime, era, size, min, max }),
845
+ /* @__PURE__ */ jsx(
846
+ TypedRow,
847
+ {
848
+ value: picker.draft,
849
+ onValueChange: onTypedChange,
850
+ format: dateInputFormat,
851
+ hasTime,
852
+ era,
853
+ size,
854
+ min,
855
+ max
856
+ }
857
+ ),
794
858
  /* @__PURE__ */ jsx(
795
859
  DayGrid,
796
860
  {
@@ -817,7 +881,7 @@ function DatePicker(props) {
817
881
  }
818
882
  )
819
883
  }
820
- );
884
+ ) });
821
885
  }
822
886
  DatePicker.displayName = "DatePicker";
823
887
  var EMPTY_RANGE2 = { start: null, end: null };
@@ -833,7 +897,7 @@ function DateRangePicker(props) {
833
897
  format: formatProp,
834
898
  dateInputFormat = DEFAULT_FORMAT,
835
899
  commit = "instant",
836
- placeholder = "Select dates",
900
+ placeholder: placeholderProp,
837
901
  side = "bottom",
838
902
  align = "start",
839
903
  label,
@@ -855,13 +919,21 @@ function DateRangePicker(props) {
855
919
  min,
856
920
  max,
857
921
  disabledDates,
858
- locale = enUS,
859
- weekStartsOn = DEFAULT_WEEK_START,
860
- era = "ce",
922
+ locale: localeProp,
923
+ weekStartsOn: weekStartsOnProp,
924
+ era: eraProp,
925
+ labels,
861
926
  size = "md",
862
927
  defaultMonth,
863
928
  className
864
929
  } = props;
930
+ const t = useLabels("datePicker", DATE_PICKER_LABELS, labels);
931
+ const publishedLabels = usePublishedLabels("datePicker", labels);
932
+ const placeholder = placeholderProp ?? t.rangePlaceholder;
933
+ const app = useLocaleConfig();
934
+ const locale = localeProp ?? app.locale ?? enUS;
935
+ const era = eraProp ?? app.era ?? "ce";
936
+ const weekStartsOn = weekStartsOnProp ?? app.weekStartsOn ?? DEFAULT_WEEK_START;
865
937
  const hasTime = hasTimeSegments(dateInputFormat);
866
938
  const displayFormat = formatProp ?? defaultDisplayFormat(dateInputFormat);
867
939
  const [rawCommitted, setCommitted] = useControllable(value, defaultValue, (next) => onValueChange?.(next ?? EMPTY_RANGE2));
@@ -916,12 +988,12 @@ function DateRangePicker(props) {
916
988
  className: TRIGGER_CLASS,
917
989
  children: [
918
990
  /* @__PURE__ */ jsx("span", { id: valueId, className: cn("truncate", printed == null ? "text-quaternary" : "font-medium"), children: printed ?? placeholder }),
919
- required && !hideRequiredIndicator ? /* @__PURE__ */ jsx("span", { id: requiredId, className: "sr-only", children: "required" }) : null,
991
+ required && !hideRequiredIndicator ? /* @__PURE__ */ jsx("span", { id: requiredId, className: "sr-only", children: t.required }) : null,
920
992
  /* @__PURE__ */ jsx(TriggerGlyph, { size })
921
993
  ]
922
994
  }
923
995
  );
924
- return /* @__PURE__ */ jsx(
996
+ return /* @__PURE__ */ jsx(LabelsContext.Provider, { value: publishedLabels, children: /* @__PURE__ */ jsx(
925
997
  FieldFrame,
926
998
  {
927
999
  label,
@@ -970,14 +1042,14 @@ function DateRangePicker(props) {
970
1042
  size: "lg",
971
1043
  className: "max-h-[var(--available-height)] max-w-none",
972
1044
  dividers: commit === "confirm" ? "line" : "none",
973
- "aria-label": label ?? "Choose a date range",
1045
+ "aria-label": label ?? t.openRange,
974
1046
  footer: commit === "confirm" ? () => /* @__PURE__ */ jsx(ApplyRow, { onCancel: picker.close, onApply: picker.apply }) : void 0,
975
1047
  children: /* @__PURE__ */ jsxs("div", { className: BODY, children: [
976
1048
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
977
1049
  /* @__PURE__ */ jsx(
978
1050
  TypedRow,
979
1051
  {
980
- label: "Start date",
1052
+ label: t.startDate,
981
1053
  value: picker.draft.start,
982
1054
  onValueChange: (next) => onTypedChange("start", next),
983
1055
  format: dateInputFormat,
@@ -992,7 +1064,7 @@ function DateRangePicker(props) {
992
1064
  /* @__PURE__ */ jsx(
993
1065
  TypedRow,
994
1066
  {
995
- label: "End date",
1067
+ label: t.endDate,
996
1068
  value: picker.draft.end,
997
1069
  onValueChange: (next) => onTypedChange("end", next),
998
1070
  format: dateInputFormat,
@@ -1037,10 +1109,10 @@ function DateRangePicker(props) {
1037
1109
  }
1038
1110
  )
1039
1111
  }
1040
- );
1112
+ ) });
1041
1113
  }
1042
1114
  DateRangePicker.displayName = "DateRangePicker";
1043
1115
 
1044
1116
  export { DATE_PRESETS, DateCalendar, DatePicker, DateRangeCalendar, DateRangePicker, resolvePreset };
1045
- //# sourceMappingURL=chunk-DCGTB7P7.js.map
1046
- //# sourceMappingURL=chunk-DCGTB7P7.js.map
1117
+ //# sourceMappingURL=chunk-667ZHY3T.js.map
1118
+ //# sourceMappingURL=chunk-667ZHY3T.js.map
@@ -1,5 +1,6 @@
1
- import { ruleEdge, RULE_WEIGHT, rulePaint } from './chunk-LCG34A5T.js';
2
1
  import { PopupScrollViewport } from './chunk-PO2TYK3C.js';
2
+ import { ruleEdge, RULE_WEIGHT, rulePaint } from './chunk-LCG34A5T.js';
3
+ import { useLinkElement } from './chunk-5AZKP4KZ.js';
3
4
  import { Slot } from './chunk-52IFGFTL.js';
4
5
  import { POPUP_MOTION, POPUP_MOTION_HOST } from './chunk-O4GRKO3I.js';
5
6
  import { ChevronRightIcon, CheckIcon } from './chunk-BLIZ3CL3.js';
@@ -73,8 +74,10 @@ function CheckboxBoxIndicator({ trailing = false }) {
73
74
  );
74
75
  }
75
76
  function ActionRow({ item, size }) {
76
- const { label, leading, trailing, shortcut, variant = "default", active, disabled, onClick, href, closeOnClick, className } = item;
77
+ const { label, leading, trailing, shortcut, variant = "default", active, disabled, onClick, href, render, closeOnClick, className } = item;
77
78
  const tone = variant === "destructive" ? "destructive" : active ? "active" : "default";
79
+ const link = useLinkElement(disabled ? void 0 : href);
80
+ const element = disabled ? void 0 : render ?? link;
78
81
  return /* @__PURE__ */ jsxs(
79
82
  Menu.Item,
80
83
  {
@@ -83,7 +86,7 @@ function ActionRow({ item, size }) {
83
86
  disabled,
84
87
  closeOnClick,
85
88
  onClick,
86
- render: href ? /* @__PURE__ */ jsx("a", { href }) : void 0,
89
+ render: element,
87
90
  children: [
88
91
  leading ? /* @__PURE__ */ jsx(LeadingIcon, { size, tone, children: leading }) : null,
89
92
  /* @__PURE__ */ jsx("span", { className: LABEL_SLOT, children: label }),
@@ -244,5 +247,5 @@ function DropdownMenu(props) {
244
247
  DropdownMenu.displayName = "DropdownMenu";
245
248
 
246
249
  export { DropdownMenu };
247
- //# sourceMappingURL=chunk-MYQ3FD4Y.js.map
248
- //# sourceMappingURL=chunk-MYQ3FD4Y.js.map
250
+ //# sourceMappingURL=chunk-6B6BWTXC.js.map
251
+ //# sourceMappingURL=chunk-6B6BWTXC.js.map
@@ -1,7 +1,7 @@
1
1
  import { useScrollFade } from './chunk-O2LG3PNI.js';
2
2
  import { useIsomorphicLayoutEffect } from './chunk-EDSK6FEH.js';
3
- import { warnPositiveInt } from './chunk-QDYE5LVT.js';
4
3
  import { cn } from './chunk-ZSNJ6UA3.js';
4
+ import { warnPositiveInt } from './chunk-QDYE5LVT.js';
5
5
  import * as React from 'react';
6
6
 
7
7
  function tagShellPy(size, hasPills) {
@@ -71,5 +71,5 @@ function useTagRow(opts) {
71
71
  }
72
72
 
73
73
  export { useTagRow };
74
- //# sourceMappingURL=chunk-6HJA7NPL.js.map
75
- //# sourceMappingURL=chunk-6HJA7NPL.js.map
74
+ //# sourceMappingURL=chunk-6H4LNWQ7.js.map
75
+ //# sourceMappingURL=chunk-6H4LNWQ7.js.map