@godxjp/ui 13.2.1 → 13.3.0

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 (114) hide show
  1. package/dist/app/index.js +4 -4
  2. package/dist/{checkbox-DKaBna6z.d.ts → checkbox-YzUqZTuZ.d.ts} +1 -1
  3. package/dist/{chunk-HBOL5LSC.js → chunk-2XH6QAOC.js} +1 -1
  4. package/dist/{chunk-FJBVDJGL.js → chunk-36ORTEGC.js} +1 -1
  5. package/dist/{chunk-SISAM4JZ.js → chunk-3JIPRB2T.js} +1 -1
  6. package/dist/{chunk-QD3YG56T.js → chunk-46UVXYPU.js} +1 -1
  7. package/dist/{chunk-H2TX3OPW.js → chunk-6EBULOWM.js} +1 -1
  8. package/dist/{chunk-XY2QN4VR.js → chunk-BIC6D4EL.js} +2 -2
  9. package/dist/{chunk-XGXI52Z7.js → chunk-BTTKHJMC.js} +1 -1
  10. package/dist/{chunk-E6J7ZTDM.js → chunk-CA247VOA.js} +25 -3
  11. package/dist/{chunk-NXF64JCT.js → chunk-CLEBTIY3.js} +2 -2
  12. package/dist/{chunk-ZFBIKJSJ.js → chunk-E2CTBKYL.js} +1 -1
  13. package/dist/{chunk-GDHDJAVB.js → chunk-HOQSAUHZ.js} +1 -1
  14. package/dist/{chunk-MQ5F4T5A.js → chunk-IHNZCBES.js} +4 -4
  15. package/dist/{chunk-Z37463ZK.js → chunk-IRPZJKLU.js} +19 -3
  16. package/dist/{chunk-JEIUEOTJ.js → chunk-ITOHGSPS.js} +12 -0
  17. package/dist/chunk-IYSGELQC.js +467 -0
  18. package/dist/{chunk-SVJK3LBZ.js → chunk-JCDLEXBB.js} +2 -2
  19. package/dist/{chunk-LEVFHRHU.js → chunk-LCKET5WL.js} +3 -3
  20. package/dist/{chunk-C6OEAQTO.js → chunk-LIOHE3RU.js} +1 -1
  21. package/dist/{chunk-74OPJG3N.js → chunk-PXOPMYPJ.js} +4 -4
  22. package/dist/{chunk-ZKUB7DHO.js → chunk-QEHMSZBQ.js} +3 -3
  23. package/dist/{chunk-UVJE3FYT.js → chunk-QHS4U3SS.js} +3 -3
  24. package/dist/{chunk-DEUHS5A2.js → chunk-QRCLMU35.js} +1 -1
  25. package/dist/{chunk-JW34DXZ3.js → chunk-QVLCFPKF.js} +3 -3
  26. package/dist/{chunk-33AJDSML.js → chunk-RR2SSSQS.js} +2 -2
  27. package/dist/{chunk-LF7XRNCF.js → chunk-UVMHSC5Q.js} +4 -4
  28. package/dist/{chunk-4GZQHBHV.js → chunk-WW47N4ID.js} +2 -2
  29. package/dist/{chunk-5NIGHXT5.js → chunk-YY5PUFBL.js} +4 -4
  30. package/dist/components/admin/index.d.ts +9 -9
  31. package/dist/components/admin/index.js +22 -22
  32. package/dist/components/data-display/badge.d.ts +1 -1
  33. package/dist/components/data-display/badge.js +3 -3
  34. package/dist/components/data-display/card.d.ts +2 -2
  35. package/dist/components/data-display/carousel.js +3 -3
  36. package/dist/components/data-display/index.d.ts +4 -4
  37. package/dist/components/data-display/index.js +7 -7
  38. package/dist/components/data-entry/calendar.d.ts +3 -3
  39. package/dist/components/data-entry/calendar.js +2 -2
  40. package/dist/components/data-entry/cascader.d.ts +3 -3
  41. package/dist/components/data-entry/cascader.js +4 -4
  42. package/dist/components/data-entry/checkbox.d.ts +4 -4
  43. package/dist/components/data-entry/color-picker.d.ts +3 -3
  44. package/dist/components/data-entry/color-picker.js +3 -3
  45. package/dist/components/data-entry/date-picker.d.ts +3 -3
  46. package/dist/components/data-entry/date-picker.js +5 -5
  47. package/dist/components/data-entry/date-range-picker.d.ts +3 -3
  48. package/dist/components/data-entry/date-range-picker.js +5 -5
  49. package/dist/components/data-entry/index.d.ts +23 -12
  50. package/dist/components/data-entry/index.js +18 -18
  51. package/dist/components/data-entry/radio.d.ts +3 -3
  52. package/dist/components/data-entry/select.d.ts +3 -3
  53. package/dist/components/data-entry/select.js +4 -4
  54. package/dist/components/data-entry/slider.d.ts +3 -3
  55. package/dist/components/data-entry/switch.d.ts +3 -3
  56. package/dist/components/data-entry/time-input.js +2 -2
  57. package/dist/components/data-entry/time-picker.d.ts +3 -3
  58. package/dist/components/data-entry/time-picker.js +4 -4
  59. package/dist/components/data-entry/transfer.d.ts +4 -4
  60. package/dist/components/data-entry/transfer.js +5 -5
  61. package/dist/components/data-entry/tree-select.d.ts +3 -3
  62. package/dist/components/data-entry/tree-select.js +4 -4
  63. package/dist/components/data-entry/upload.d.ts +4 -4
  64. package/dist/components/data-entry/upload.js +6 -6
  65. package/dist/components/data-grid/index.js +5 -5
  66. package/dist/components/feedback/alert.d.ts +3 -3
  67. package/dist/components/feedback/alert.js +5 -5
  68. package/dist/components/feedback/dialog.d.ts +2 -2
  69. package/dist/components/feedback/dialog.js +4 -4
  70. package/dist/components/feedback/index.d.ts +2 -2
  71. package/dist/components/feedback/index.js +6 -6
  72. package/dist/components/feedback/sheet.d.ts +1 -1
  73. package/dist/components/general/button.d.ts +5 -3
  74. package/dist/components/general/button.js +1 -1
  75. package/dist/components/general/index.d.ts +3 -3
  76. package/dist/components/general/index.js +1 -1
  77. package/dist/components/layout/index.js +4 -4
  78. package/dist/components/navigation/index.d.ts +4 -4
  79. package/dist/components/navigation/index.js +7 -7
  80. package/dist/components/navigation/pagination.d.ts +3 -3
  81. package/dist/components/navigation/pagination.js +5 -5
  82. package/dist/components/navigation/steps.d.ts +4 -4
  83. package/dist/components/navigation/steps.js +3 -3
  84. package/dist/components/query/index.d.ts +3 -3
  85. package/dist/components/query/index.js +5 -5
  86. package/dist/components/ui/index.d.ts +7 -7
  87. package/dist/components/ui/index.js +21 -21
  88. package/dist/{data-display.prop-BCC2zOTq.d.ts → data-display.prop-CT0nVMdp.d.ts} +2 -2
  89. package/dist/{data-entry.prop-BGlwRXlJ.d.ts → data-entry.prop-DA61KfFl.d.ts} +39 -3
  90. package/dist/{data-table-B6HC3EFK.d.ts → data-table-DRr70ULe.d.ts} +3 -3
  91. package/dist/{data.prop-H9nROsUg.d.ts → data.prop-D0UEEczj.d.ts} +1 -1
  92. package/dist/{feedback.prop-sEx89LTF.d.ts → feedback.prop-CHlHDYZK.d.ts} +1 -1
  93. package/dist/{filter-bar-DPMQmIpX.d.ts → filter-bar-DoDtwYrr.d.ts} +1 -1
  94. package/dist/{general.prop-4ERae5Sj.d.ts → general.prop-CBQ_KVtR.d.ts} +11 -4
  95. package/dist/i18n/index.d.ts +4 -0
  96. package/dist/i18n/index.js +2 -2
  97. package/dist/index.d.ts +9 -9
  98. package/dist/index.js +29 -29
  99. package/dist/{interaction.prop-B44hePpl.d.ts → interaction.prop-DD46aTro.d.ts} +4 -3
  100. package/dist/lib/datetime/index.js +1 -1
  101. package/dist/{navigation.prop-DMbjEig7.d.ts → navigation.prop-FCsOVGrP.d.ts} +1 -1
  102. package/dist/props/components/index.d.ts +8 -8
  103. package/dist/props/index.d.ts +8 -8
  104. package/dist/props/index.js +2 -2
  105. package/dist/props/registry.d.ts +8 -3
  106. package/dist/props/registry.js +1 -1
  107. package/dist/props/vocabulary/index.d.ts +2 -2
  108. package/dist/{query.prop-cp6fEgOD.d.ts → query.prop-CsRuaXNb.d.ts} +1 -1
  109. package/dist/{search-input-CxGW8_7q.d.ts → search-input-BNOUeTiM.d.ts} +1 -1
  110. package/dist/styles/control.css +64 -0
  111. package/dist/styles/text-layout.css +12 -3
  112. package/dist/tokens/foundation.css +4 -3
  113. package/package.json +1 -1
  114. package/dist/chunk-ZPHIXXTK.js +0 -257
@@ -0,0 +1,467 @@
1
+ import { Input } from './chunk-BNXPDUO4.js';
2
+ import { Button } from './chunk-CA247VOA.js';
3
+ import { useTranslation } from './chunk-6EBULOWM.js';
4
+ import { cn } from './chunk-U7N2A7A3.js';
5
+ import * as React from 'react';
6
+ import { ChevronUp, ChevronDown, EyeOff, Eye, Minus, Star, X } from 'lucide-react';
7
+ import { jsxs, jsx } from 'react/jsx-runtime';
8
+ import { OTPInput, OTPInputContext } from 'input-otp';
9
+
10
+ function decimalsOf(n) {
11
+ if (!Number.isFinite(n)) return 0;
12
+ const s = String(n);
13
+ const dot = s.indexOf(".");
14
+ return dot === -1 ? 0 : s.length - dot - 1;
15
+ }
16
+ function clamp(n, min, max) {
17
+ let out = n;
18
+ if (min != null && out < min) out = min;
19
+ if (max != null && out > max) out = max;
20
+ return out;
21
+ }
22
+ function roundTo(n, precision) {
23
+ if (!Number.isFinite(n)) return n;
24
+ const factor = 10 ** precision;
25
+ return Math.round((n + Number.EPSILON) * factor) / factor;
26
+ }
27
+ var NumberInput = React.forwardRef(
28
+ ({
29
+ value: controlledValue,
30
+ defaultValue = null,
31
+ onValueChange,
32
+ min,
33
+ max,
34
+ step = 1,
35
+ precision,
36
+ disabled,
37
+ readOnly,
38
+ size = "md",
39
+ placeholder,
40
+ prefix,
41
+ suffix,
42
+ name,
43
+ id,
44
+ className,
45
+ "aria-label": ariaLabel,
46
+ "aria-labelledby": ariaLabelledby,
47
+ "aria-describedby": ariaDescribedby,
48
+ "data-testid": dataTestId
49
+ }, ref) => {
50
+ const { t, locale } = useTranslation();
51
+ const isControlled = controlledValue !== void 0;
52
+ const [internal, setInternal] = React.useState(defaultValue);
53
+ const numericValue = isControlled ? controlledValue ?? null : internal;
54
+ const effectivePrecision = precision ?? decimalsOf(step);
55
+ const formatter = React.useMemo(
56
+ () => new Intl.NumberFormat(locale, {
57
+ minimumFractionDigits: 0,
58
+ maximumFractionDigits: Math.max(effectivePrecision, 0),
59
+ useGrouping: false
60
+ }),
61
+ [locale, effectivePrecision]
62
+ );
63
+ const formatAtRest = React.useCallback(
64
+ (n) => n == null ? "" : formatter.format(n),
65
+ [formatter]
66
+ );
67
+ const [draft, setDraft] = React.useState(() => formatAtRest(numericValue));
68
+ const [focused, setFocused] = React.useState(false);
69
+ React.useEffect(() => {
70
+ if (focused) return;
71
+ setDraft(formatAtRest(numericValue));
72
+ }, [numericValue, focused, formatAtRest]);
73
+ const commit = React.useCallback(
74
+ (next) => {
75
+ const normalized = next == null || Number.isNaN(next) ? null : roundTo(clamp(next, min, max), effectivePrecision);
76
+ if (!isControlled) setInternal(normalized);
77
+ onValueChange?.(normalized);
78
+ if (!focused) setDraft(formatAtRest(normalized));
79
+ return normalized;
80
+ },
81
+ [effectivePrecision, focused, formatAtRest, isControlled, max, min, onValueChange]
82
+ );
83
+ const stepBy = React.useCallback(
84
+ (direction, multiplier = 1) => {
85
+ const base = numericValue ?? min ?? 0;
86
+ const next = base + direction * step * multiplier;
87
+ const committed = commit(next);
88
+ setDraft(formatAtRest(committed));
89
+ },
90
+ [commit, formatAtRest, min, numericValue, step]
91
+ );
92
+ const atMin = min != null && numericValue != null && numericValue <= min;
93
+ const atMax = max != null && numericValue != null && numericValue >= max;
94
+ const interactive = !disabled && !readOnly;
95
+ const handleChange = (event) => {
96
+ const raw = event.target.value;
97
+ setDraft(raw);
98
+ if (readOnly) return;
99
+ const trimmed = raw.trim();
100
+ if (trimmed === "" || trimmed === "-") {
101
+ if (trimmed === "") commit(null);
102
+ return;
103
+ }
104
+ const parsed = Number(trimmed);
105
+ if (Number.isNaN(parsed)) return;
106
+ if (!isControlled) setInternal(parsed);
107
+ onValueChange?.(parsed);
108
+ };
109
+ const handleBlur = () => {
110
+ setFocused(false);
111
+ const trimmed = draft.trim();
112
+ if (trimmed === "" || trimmed === "-") {
113
+ commit(null);
114
+ setDraft(formatAtRest(null));
115
+ return;
116
+ }
117
+ const parsed = Number(trimmed);
118
+ const committed = commit(Number.isNaN(parsed) ? null : parsed);
119
+ setDraft(formatAtRest(committed));
120
+ };
121
+ const handleKeyDown = (event) => {
122
+ if (!interactive) return;
123
+ if (event.key === "ArrowUp") {
124
+ event.preventDefault();
125
+ stepBy(1, event.shiftKey ? 10 : 1);
126
+ } else if (event.key === "ArrowDown") {
127
+ event.preventDefault();
128
+ stepBy(-1, event.shiftKey ? 10 : 1);
129
+ } else if (event.key === "Enter") {
130
+ const trimmed = draft.trim();
131
+ const parsed = Number(trimmed);
132
+ const committed = commit(trimmed === "" || Number.isNaN(parsed) ? null : parsed);
133
+ setDraft(formatAtRest(committed));
134
+ }
135
+ };
136
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "number-input", "data-size": size, className: cn("ui-number-input", className), children: [
137
+ prefix != null ? /* @__PURE__ */ jsx(
138
+ "span",
139
+ {
140
+ "data-slot": "number-input-prefix",
141
+ className: "ui-number-input-affix",
142
+ "aria-hidden": "true",
143
+ children: prefix
144
+ }
145
+ ) : null,
146
+ /* @__PURE__ */ jsx(
147
+ Input,
148
+ {
149
+ ref,
150
+ id,
151
+ name,
152
+ type: "text",
153
+ inputMode: "decimal",
154
+ autoComplete: "off",
155
+ role: "spinbutton",
156
+ "data-slot": "number-input-field",
157
+ "data-testid": dataTestId,
158
+ className: "ui-number-input-field",
159
+ value: draft,
160
+ placeholder,
161
+ disabled,
162
+ readOnly,
163
+ "aria-label": ariaLabel,
164
+ "aria-labelledby": ariaLabelledby,
165
+ "aria-describedby": ariaDescribedby,
166
+ "aria-valuenow": numericValue ?? void 0,
167
+ "aria-valuemin": min,
168
+ "aria-valuemax": max,
169
+ "aria-valuetext": numericValue != null ? formatAtRest(numericValue) : void 0,
170
+ onChange: handleChange,
171
+ onFocus: () => setFocused(true),
172
+ onBlur: handleBlur,
173
+ onKeyDown: handleKeyDown
174
+ }
175
+ ),
176
+ suffix != null ? /* @__PURE__ */ jsx(
177
+ "span",
178
+ {
179
+ "data-slot": "number-input-suffix",
180
+ className: "ui-number-input-affix",
181
+ "aria-hidden": "true",
182
+ children: suffix
183
+ }
184
+ ) : null,
185
+ /* @__PURE__ */ jsxs("span", { "data-slot": "number-input-steppers", className: "ui-number-input-steppers", children: [
186
+ /* @__PURE__ */ jsx(
187
+ Button,
188
+ {
189
+ type: "button",
190
+ variant: "outline",
191
+ size: "icon-xs",
192
+ className: "ui-number-input-step ui-number-input-step-up",
193
+ tabIndex: -1,
194
+ disabled: !interactive || atMax,
195
+ "aria-label": t("ui.numberInput.increment"),
196
+ onClick: () => stepBy(1),
197
+ children: /* @__PURE__ */ jsx(ChevronUp, { "aria-hidden": "true" })
198
+ }
199
+ ),
200
+ /* @__PURE__ */ jsx(
201
+ Button,
202
+ {
203
+ type: "button",
204
+ variant: "outline",
205
+ size: "icon-xs",
206
+ className: "ui-number-input-step ui-number-input-step-down",
207
+ tabIndex: -1,
208
+ disabled: !interactive || atMin,
209
+ "aria-label": t("ui.numberInput.decrement"),
210
+ onClick: () => stepBy(-1),
211
+ children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true" })
212
+ }
213
+ )
214
+ ] })
215
+ ] });
216
+ }
217
+ );
218
+ NumberInput.displayName = "NumberInput";
219
+ var PasswordInput = React.forwardRef(
220
+ ({ className, ...props }, ref) => {
221
+ const { t } = useTranslation();
222
+ const [visible, setVisible] = React.useState(false);
223
+ return /* @__PURE__ */ jsxs("div", { className: "ui-password-input", "data-slot": "password-input", children: [
224
+ /* @__PURE__ */ jsx(
225
+ Input,
226
+ {
227
+ ref,
228
+ type: visible ? "text" : "password",
229
+ className: cn("ui-password-input-field", className),
230
+ ...props
231
+ }
232
+ ),
233
+ /* @__PURE__ */ jsx(
234
+ "button",
235
+ {
236
+ type: "button",
237
+ className: "ui-password-input-toggle",
238
+ onClick: () => setVisible((v) => !v),
239
+ "aria-label": visible ? t("ui.passwordInput.hide") : t("ui.passwordInput.show"),
240
+ "aria-pressed": visible,
241
+ children: visible ? /* @__PURE__ */ jsx(EyeOff, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Eye, { "aria-hidden": "true" })
242
+ }
243
+ )
244
+ ] });
245
+ }
246
+ );
247
+ PasswordInput.displayName = "PasswordInput";
248
+ var InputOTP = React.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx(
249
+ OTPInput,
250
+ {
251
+ ref,
252
+ "data-slot": "input-otp",
253
+ containerClassName: cn("ui-otp-container", containerClassName),
254
+ className: cn("ui-otp-input", className),
255
+ ...props
256
+ }
257
+ ));
258
+ InputOTP.displayName = "InputOTP";
259
+ var InputOTPGroup = React.forwardRef(
260
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
261
+ "div",
262
+ {
263
+ ref,
264
+ "data-slot": "input-otp-group",
265
+ className: cn("ui-otp-group", className),
266
+ ...props
267
+ }
268
+ )
269
+ );
270
+ InputOTPGroup.displayName = "InputOTPGroup";
271
+ var InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
272
+ const context = React.useContext(OTPInputContext);
273
+ const slot = context.slots[index] ?? { char: null, hasFakeCaret: false, isActive: false };
274
+ return /* @__PURE__ */ jsxs(
275
+ "div",
276
+ {
277
+ ref,
278
+ "data-slot": "input-otp-slot",
279
+ "data-active": slot.isActive || void 0,
280
+ className: cn("ui-otp-slot", className),
281
+ ...props,
282
+ children: [
283
+ slot.char,
284
+ slot.hasFakeCaret ? /* @__PURE__ */ jsx("div", { className: "ui-otp-caret-wrapper", "aria-hidden": "true", children: /* @__PURE__ */ jsx("div", { className: "ui-otp-caret" }) }) : null
285
+ ]
286
+ }
287
+ );
288
+ });
289
+ InputOTPSlot.displayName = "InputOTPSlot";
290
+ var InputOTPSeparator = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(Minus, { className: "ui-otp-separator-icon", "aria-hidden": "true" }) }));
291
+ InputOTPSeparator.displayName = "InputOTPSeparator";
292
+ var Rating = React.forwardRef(
293
+ ({
294
+ value,
295
+ defaultValue = 0,
296
+ onValueChange,
297
+ max = 5,
298
+ readOnly,
299
+ disabled,
300
+ name,
301
+ className,
302
+ ...rest
303
+ }, ref) => {
304
+ const { t } = useTranslation();
305
+ const [internal, setInternal] = React.useState(defaultValue);
306
+ const current = value ?? internal;
307
+ const [hover, setHover] = React.useState(null);
308
+ const display = hover ?? current;
309
+ const interactive = !readOnly && !disabled;
310
+ const select = (next) => {
311
+ if (!interactive) return;
312
+ if (value === void 0) setInternal(next);
313
+ onValueChange?.(next);
314
+ };
315
+ const focusableStar = current > 0 ? current : 1;
316
+ const onKeyDown = (e, star) => {
317
+ if (!interactive) return;
318
+ let next = null;
319
+ switch (e.key) {
320
+ case "ArrowRight":
321
+ case "ArrowUp":
322
+ next = Math.min(max, star + 1);
323
+ break;
324
+ case "ArrowLeft":
325
+ case "ArrowDown":
326
+ next = Math.max(1, star - 1);
327
+ break;
328
+ case "Home":
329
+ next = 1;
330
+ break;
331
+ case "End":
332
+ next = max;
333
+ break;
334
+ default:
335
+ return;
336
+ }
337
+ e.preventDefault();
338
+ select(next);
339
+ };
340
+ return /* @__PURE__ */ jsxs(
341
+ "div",
342
+ {
343
+ ref,
344
+ role: "radiogroup",
345
+ "data-slot": "rating",
346
+ className: cn("ui-rating", className),
347
+ "aria-label": rest["aria-label"] ?? t("ui.rating.ariaLabel"),
348
+ children: [
349
+ Array.from({ length: max }, (_, i) => i + 1).map((star) => /* @__PURE__ */ jsx(
350
+ "button",
351
+ {
352
+ type: "button",
353
+ role: "radio",
354
+ "aria-checked": current === star,
355
+ "aria-label": t("ui.rating.starLabel", { star, max }),
356
+ disabled: disabled || readOnly,
357
+ tabIndex: interactive && star === focusableStar ? 0 : -1,
358
+ className: cn("ui-rating-star", star <= display && "ui-rating-star-filled"),
359
+ onMouseEnter: () => interactive && setHover(star),
360
+ onMouseLeave: () => setHover(null),
361
+ onClick: () => select(star),
362
+ onKeyDown: (e) => onKeyDown(e, star),
363
+ children: /* @__PURE__ */ jsx(Star, { "aria-hidden": "true" })
364
+ },
365
+ star
366
+ )),
367
+ name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value: current }) : null
368
+ ]
369
+ }
370
+ );
371
+ }
372
+ );
373
+ Rating.displayName = "Rating";
374
+ var TagInput = React.forwardRef(
375
+ ({
376
+ value,
377
+ defaultValue = [],
378
+ onValueChange,
379
+ placeholder,
380
+ disabled,
381
+ name,
382
+ className,
383
+ id,
384
+ "aria-label": ariaLabel
385
+ }, ref) => {
386
+ const { t } = useTranslation();
387
+ const [internal, setInternal] = React.useState(defaultValue);
388
+ const tags = value ?? internal;
389
+ const [draft, setDraft] = React.useState("");
390
+ const commit = (next) => {
391
+ if (value === void 0) setInternal(next);
392
+ onValueChange?.(next);
393
+ };
394
+ const add = (raw) => {
395
+ const tag = raw.trim();
396
+ if (!tag || tags.includes(tag)) return;
397
+ commit([...tags, tag]);
398
+ };
399
+ const removeAt = (i) => commit(tags.filter((_, idx) => idx !== i));
400
+ const onKeyDown = (e) => {
401
+ if (e.key === "Enter" || e.key === ",") {
402
+ e.preventDefault();
403
+ add(draft);
404
+ setDraft("");
405
+ } else if (e.key === "Backspace" && draft === "" && tags.length > 0) {
406
+ removeAt(tags.length - 1);
407
+ }
408
+ };
409
+ return /* @__PURE__ */ jsxs(
410
+ "div",
411
+ {
412
+ "data-slot": "tag-input",
413
+ className: cn("ui-tag-input", disabled && "ui-tag-input-disabled", className),
414
+ children: [
415
+ tags.length > 0 ? /* @__PURE__ */ jsx("ul", { role: "list", className: "ui-tag-input-list", "data-slot": "tag-input-list", children: tags.map((tag, i) => /* @__PURE__ */ jsxs(
416
+ "li",
417
+ {
418
+ role: "listitem",
419
+ className: "ui-tag-input-chip",
420
+ "data-slot": "tag-input-chip",
421
+ children: [
422
+ tag,
423
+ !disabled ? /* @__PURE__ */ jsx(
424
+ "button",
425
+ {
426
+ type: "button",
427
+ className: "ui-tag-input-remove",
428
+ "aria-label": t("ui.tagInput.removeTag", { tag }),
429
+ onClick: () => removeAt(i),
430
+ children: /* @__PURE__ */ jsx(X, { "aria-hidden": "true" })
431
+ }
432
+ ) : null
433
+ ]
434
+ },
435
+ tag
436
+ )) }) : null,
437
+ /* @__PURE__ */ jsx(
438
+ "input",
439
+ {
440
+ ref,
441
+ id,
442
+ type: "text",
443
+ className: "ui-tag-input-field",
444
+ value: draft,
445
+ placeholder: tags.length === 0 ? placeholder : void 0,
446
+ disabled,
447
+ "aria-label": ariaLabel ?? t("ui.tagInput.inputLabel"),
448
+ onChange: (e) => setDraft(e.target.value),
449
+ onKeyDown,
450
+ onBlur: () => {
451
+ if (draft.trim()) {
452
+ add(draft);
453
+ setDraft("");
454
+ }
455
+ }
456
+ }
457
+ ),
458
+ /* @__PURE__ */ jsx("span", { "aria-live": "polite", className: "sr-only", "data-slot": "tag-input-status", children: t("ui.tagInput.tagCount", { count: tags.length }) }),
459
+ name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value: tags.join(",") }) : null
460
+ ]
461
+ }
462
+ );
463
+ }
464
+ );
465
+ TagInput.displayName = "TagInput";
466
+
467
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, NumberInput, PasswordInput, Rating, TagInput };
@@ -1,10 +1,10 @@
1
1
  import { EmptyState } from './chunk-YD7V2HGZ.js';
2
2
  import { Flex, densityClass } from './chunk-INIIF7F7.js';
3
3
  import { Checkbox } from './chunk-BE6GJGKJ.js';
4
- import { Button } from './chunk-E6J7ZTDM.js';
4
+ import { Button } from './chunk-CA247VOA.js';
5
5
  import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-IJ5ALJGA.js';
6
6
  import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass } from './chunk-B4K4BXEF.js';
7
- import { useTranslation } from './chunk-H2TX3OPW.js';
7
+ import { useTranslation } from './chunk-6EBULOWM.js';
8
8
  import { cn } from './chunk-U7N2A7A3.js';
9
9
  import { jsx, jsxs } from 'react/jsx-runtime';
10
10
  import * as React from 'react';
@@ -1,6 +1,6 @@
1
- import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-NXF64JCT.js';
2
- import { Button } from './chunk-E6J7ZTDM.js';
3
- import { useTranslation } from './chunk-H2TX3OPW.js';
1
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-CLEBTIY3.js';
2
+ import { Button } from './chunk-CA247VOA.js';
3
+ import { useTranslation } from './chunk-6EBULOWM.js';
4
4
  import { cn } from './chunk-U7N2A7A3.js';
5
5
  import * as React from 'react';
6
6
  import { MoreHorizontal, ChevronLeft, ChevronRight } from 'lucide-react';
@@ -1,4 +1,4 @@
1
- import { normalizeHhmm, isValidHhmm } from './chunk-JEIUEOTJ.js';
1
+ import { normalizeHhmm, isValidHhmm } from './chunk-ITOHGSPS.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import * as React from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -1,9 +1,9 @@
1
- import { Calendar } from './chunk-HBOL5LSC.js';
1
+ import { Calendar } from './chunk-2XH6QAOC.js';
2
2
  import { Input } from './chunk-BNXPDUO4.js';
3
- import { Button } from './chunk-E6J7ZTDM.js';
3
+ import { Button } from './chunk-CA247VOA.js';
4
4
  import { Popover, PopoverAnchor, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
5
- import { useTranslation, usePickerLocales } from './chunk-H2TX3OPW.js';
6
- import { toIsoDate, parseDateInput } from './chunk-JEIUEOTJ.js';
5
+ import { useTranslation, usePickerLocales } from './chunk-6EBULOWM.js';
6
+ import { toIsoDate, parseDateInput } from './chunk-ITOHGSPS.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import * as React from 'react';
9
9
  import { CalendarIcon } from 'lucide-react';
@@ -1,8 +1,8 @@
1
1
  import { Input } from './chunk-BNXPDUO4.js';
2
- import { Button } from './chunk-E6J7ZTDM.js';
2
+ import { Button } from './chunk-CA247VOA.js';
3
3
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
4
- import { useTranslation, usePickerLocales } from './chunk-H2TX3OPW.js';
5
- import { normalizeHhmm, isValidHhmm } from './chunk-JEIUEOTJ.js';
4
+ import { useTranslation, usePickerLocales } from './chunk-6EBULOWM.js';
5
+ import { normalizeHhmm, isValidHhmm } from './chunk-ITOHGSPS.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import * as React from 'react';
8
8
  import { Clock } from 'lucide-react';
@@ -1,7 +1,7 @@
1
- import { humanError } from './chunk-GDHDJAVB.js';
1
+ import { humanError } from './chunk-HOQSAUHZ.js';
2
2
  import { Flex } from './chunk-INIIF7F7.js';
3
- import { Button } from './chunk-E6J7ZTDM.js';
4
- import { useTranslation } from './chunk-H2TX3OPW.js';
3
+ import { Button } from './chunk-CA247VOA.js';
4
+ import { useTranslation } from './chunk-6EBULOWM.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
7
7
  import { Info, CheckCircle2, TriangleAlert, AlertCircle, X, RefreshCw } from 'lucide-react';
@@ -3,7 +3,7 @@ import { DropdownMenu, DropdownMenuTrigger } from './chunk-LMKUKCTN.js';
3
3
  import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './chunk-DV52WNXO.js';
4
4
  import { densityClass, pageContainerVariantClass } from './chunk-INIIF7F7.js';
5
5
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
6
- import { useTranslation } from './chunk-H2TX3OPW.js';
6
+ import { useTranslation } from './chunk-6EBULOWM.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import { ChevronRight, ChevronDown, PanelLeftOpen, PanelLeftClose, Search, Bell, SlidersHorizontal } from 'lucide-react';
9
9
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,9 +1,9 @@
1
- import { SearchInput } from './chunk-ZFBIKJSJ.js';
1
+ import { SearchInput } from './chunk-E2CTBKYL.js';
2
2
  import { reactNodeText } from './chunk-SMLKNECP.js';
3
3
  import { Checkbox } from './chunk-BE6GJGKJ.js';
4
- import { Button } from './chunk-E6J7ZTDM.js';
4
+ import { Button } from './chunk-CA247VOA.js';
5
5
  import { ScrollArea } from './chunk-3KPEZ5CF.js';
6
- import { useTranslation } from './chunk-H2TX3OPW.js';
6
+ import { useTranslation } from './chunk-6EBULOWM.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import * as React from 'react';
9
9
  import { ChevronRight, ChevronLeft } from 'lucide-react';
@@ -1,10 +1,10 @@
1
1
  import { normalizeTreeOptions, formatPathLabels, getNodeByPath, filterTreeOptions, pathsEqual, pathKey } from './chunk-SMLKNECP.js';
2
2
  import { Command, CommandInput } from './chunk-3R3QVJCB.js';
3
- import { Button } from './chunk-E6J7ZTDM.js';
3
+ import { Button } from './chunk-CA247VOA.js';
4
4
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
5
5
  import { ScrollArea, ScrollBar } from './chunk-3KPEZ5CF.js';
6
6
  import { controlOpenRingClass } from './chunk-B4K4BXEF.js';
7
- import { useTranslation } from './chunk-H2TX3OPW.js';
7
+ import { useTranslation } from './chunk-6EBULOWM.js';
8
8
  import { cn } from './chunk-U7N2A7A3.js';
9
9
  import * as React from 'react';
10
10
  import { Check, X, ChevronsUpDown, ChevronRight, Minus } from 'lucide-react';
@@ -1,9 +1,9 @@
1
- import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from './chunk-4GZQHBHV.js';
2
- import { formatBytes } from './chunk-GDHDJAVB.js';
1
+ import { formatBytes } from './chunk-HOQSAUHZ.js';
2
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from './chunk-WW47N4ID.js';
3
3
  import { Slider } from './chunk-TBJBVEIP.js';
4
- import { Button } from './chunk-E6J7ZTDM.js';
4
+ import { Button } from './chunk-CA247VOA.js';
5
5
  import { controlIconClass } from './chunk-B4K4BXEF.js';
6
- import { useTranslation } from './chunk-H2TX3OPW.js';
6
+ import { useTranslation } from './chunk-6EBULOWM.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import * as React2 from 'react';
9
9
  import { Upload as Upload$1, ImagePlus, Camera, Trash2, RotateCcw, X } from 'lucide-react';
@@ -1,8 +1,8 @@
1
1
  import { overlayHeaderToneClass } from './chunk-VU4GFGDG.js';
2
2
  import { Input } from './chunk-BNXPDUO4.js';
3
- import { buttonVariants, Button } from './chunk-E6J7ZTDM.js';
3
+ import { buttonVariants, Button } from './chunk-CA247VOA.js';
4
4
  import { Label } from './chunk-7PWBC4BY.js';
5
- import { useTranslation } from './chunk-H2TX3OPW.js';
5
+ import { useTranslation } from './chunk-6EBULOWM.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import * as React from 'react';
8
8
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -1,7 +1,7 @@
1
- import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-NXF64JCT.js';
2
- import { Button } from './chunk-E6J7ZTDM.js';
3
- import { useOptionalAppContext, useTranslation, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel, resolveTimezonePickerOptions, getTimezoneLabel, APP_LOCALES } from './chunk-H2TX3OPW.js';
4
- import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-JEIUEOTJ.js';
1
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-CLEBTIY3.js';
2
+ import { Button } from './chunk-CA247VOA.js';
3
+ import { useOptionalAppContext, useTranslation, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel, resolveTimezonePickerOptions, getTimezoneLabel, APP_LOCALES } from './chunk-6EBULOWM.js';
4
+ import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-ITOHGSPS.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
7
7
  import { useId } from 'react';
@@ -1,9 +1,9 @@
1
1
  export { B as BreadcrumbItem } from '../../navigation.prop-CXDaVNaR.js';
2
2
  export { c as FlexProp, P as PageContainerProp, P as PageContainerProps } from '../../layout.prop-ChLFNGJ6.js';
3
3
  export { F as Flex, P as PageContainer } from '../../flex-88Ps6YCv.js';
4
- export { C as ColumnDef, D as DataTable, a as Density, b as Descriptions, E as EmptyState } from '../../data-table-B6HC3EFK.js';
4
+ export { C as ColumnDef, D as DataTable, a as Density, b as Descriptions, E as EmptyState } from '../../data-table-DRr70ULe.js';
5
5
  export { Badge } from '../data-display/badge.js';
6
- export { F as Field, a as FormField, S as SearchInput } from '../../search-input-CxGW8_7q.js';
6
+ export { F as Field, a as FormField, S as SearchInput } from '../../search-input-BNOUeTiM.js';
7
7
  export { a as SkeletonDetail, c as SkeletonRows, d as SkeletonStat, e as SkeletonTable } from '../../skeleton-cj9kh5wo.js';
8
8
  export { Alert, AlertActions, AlertContent, AlertDescription, AlertQueryError, AlertTitle } from '../feedback/alert.js';
9
9
  export { Upload, useUploadDraft } from '../data-entry/upload.js';
@@ -13,31 +13,31 @@ export { Transfer } from '../data-entry/transfer.js';
13
13
  export { Tabs, TabsContent, TabsList, TabsTrigger } from '../navigation/tabs.js';
14
14
  export { Pagination } from '../navigation/pagination.js';
15
15
  export { Steps } from '../navigation/steps.js';
16
- export { T as Toolbar, a as ToolbarGroup } from '../../filter-bar-DPMQmIpX.js';
16
+ export { T as Toolbar, a as ToolbarGroup } from '../../filter-bar-DoDtwYrr.js';
17
17
  export { AlertDialog, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from '../feedback/dialog.js';
18
18
  export { Toaster } from '../feedback/sonner.js';
19
19
  export { toast } from 'sonner';
20
20
  export { useDebouncedValue, useTimeoutFlag } from '../../lib/hooks.js';
21
- export { B as collectUploadCommitActions, E as createUploadItem } from '../../data-entry.prop-BGlwRXlJ.js';
21
+ export { B as collectUploadCommitActions, E as createUploadItem } from '../../data-entry.prop-DA61KfFl.js';
22
22
  export { j as formatDate } from '../../format-date-ByyZoqI5.js';
23
23
  import '../../shared.prop-BvMSLFJ6.js';
24
24
  import 'react';
25
25
  import '../../content.prop-DrV_zDy-.js';
26
26
  import '../../layout.prop-CXvl2rVR.js';
27
27
  import 'react/jsx-runtime';
28
- import '../../data-display.prop-BCC2zOTq.js';
29
- import '../../interaction.prop-B44hePpl.js';
30
- import '../../data.prop-H9nROsUg.js';
28
+ import '../../data-display.prop-CT0nVMdp.js';
29
+ import '../../interaction.prop-DD46aTro.js';
30
+ import '../../data.prop-D0UEEczj.js';
31
31
  import 'class-variance-authority/types';
32
32
  import 'class-variance-authority';
33
- import '../../feedback.prop-sEx89LTF.js';
33
+ import '../../feedback.prop-CHlHDYZK.js';
34
34
  import '@radix-ui/react-checkbox';
35
35
  import '@radix-ui/react-radio-group';
36
36
  import '@radix-ui/react-slider';
37
37
  import '@radix-ui/react-switch';
38
38
  import 'react-day-picker';
39
39
  import '@radix-ui/react-tabs';
40
- import '../../navigation.prop-DMbjEig7.js';
40
+ import '../../navigation.prop-FCsOVGrP.js';
41
41
  import '@radix-ui/react-dialog';
42
42
  import '@radix-ui/react-alert-dialog';
43
43
  import 'date-fns';