@godxjp/ui 13.7.0 → 13.8.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 (101) hide show
  1. package/dist/app/index.js +4 -4
  2. package/dist/{checkbox-ChJ2PyIz.d.ts → checkbox-BpnDa6_M.d.ts} +1 -1
  3. package/dist/{chunk-KW54IV4X.js → chunk-2MRAHKOD.js} +3 -3
  4. package/dist/{chunk-QMGNMDQG.js → chunk-3VFNWVR7.js} +5 -5
  5. package/dist/{chunk-IRPZJKLU.js → chunk-4FGE5XVC.js} +10 -0
  6. package/dist/{chunk-SXECWZZV.js → chunk-4SSJ54R2.js} +4 -4
  7. package/dist/{chunk-C7W5BO7R.js → chunk-5732TWQF.js} +22 -1
  8. package/dist/chunk-57VDEN64.js +881 -0
  9. package/dist/{chunk-CSTUENE6.js → chunk-65RWSIZF.js} +4 -4
  10. package/dist/{chunk-JXGDDD46.js → chunk-A3J2G2ZA.js} +2 -2
  11. package/dist/{chunk-QTEPKNQE.js → chunk-B6S6LTWT.js} +1 -1
  12. package/dist/{chunk-GOJQHYED.js → chunk-BJTNKNMY.js} +9 -5
  13. package/dist/{chunk-6EKAEN6T.js → chunk-D4JX6O2W.js} +3 -3
  14. package/dist/{chunk-W3AS2GEC.js → chunk-FLY23H4G.js} +2 -2
  15. package/dist/{chunk-ZYJRZLMZ.js → chunk-HIEGUYPP.js} +1 -1
  16. package/dist/{chunk-TNFAUPEV.js → chunk-HRW7JDUJ.js} +4 -4
  17. package/dist/{chunk-O3F3KF2B.js → chunk-I5D4QYZI.js} +3 -3
  18. package/dist/{chunk-76S3TQFH.js → chunk-IAJOP2Z3.js} +31 -13
  19. package/dist/{chunk-LFO5BJ4H.js → chunk-ION2KFXK.js} +2 -2
  20. package/dist/{chunk-6AIYMYSG.js → chunk-K24AQV4R.js} +1 -1
  21. package/dist/{chunk-B23A5CPA.js → chunk-L6NMIUKC.js} +2 -2
  22. package/dist/{chunk-RBXVCWXL.js → chunk-LVLPNKJP.js} +2 -2
  23. package/dist/{chunk-MUUO7SPN.js → chunk-NU2SOVTU.js} +9 -3
  24. package/dist/{chunk-B7R7DHZF.js → chunk-NZBAFFWP.js} +1 -1
  25. package/dist/{chunk-LTKHPOE3.js → chunk-PL4NEIVO.js} +1 -1
  26. package/dist/{chunk-ZOMIELKI.js → chunk-Q3KUZG4P.js} +1 -1
  27. package/dist/{chunk-QPRBPE4S.js → chunk-QE4IYHJU.js} +3 -3
  28. package/dist/{chunk-3JQDPNTA.js → chunk-R2TXLS7S.js} +1 -1
  29. package/dist/{chunk-2FJ5TMQU.js → chunk-X6AJ5HEI.js} +1 -1
  30. package/dist/{chunk-5L77S5CL.js → chunk-XBFUROAY.js} +1 -1
  31. package/dist/{chunk-I472SSN2.js → chunk-YLRCDJMR.js} +1 -1
  32. package/dist/chunk-YXVJFYQE.js +191 -0
  33. package/dist/components/admin/index.d.ts +2 -2
  34. package/dist/components/admin/index.js +23 -23
  35. package/dist/components/data-display/badge.js +3 -3
  36. package/dist/components/data-display/card.d.ts +2 -2
  37. package/dist/components/data-display/carousel.js +3 -3
  38. package/dist/components/data-display/index.js +8 -8
  39. package/dist/components/data-entry/calendar.d.ts +1 -1
  40. package/dist/components/data-entry/calendar.js +4 -4
  41. package/dist/components/data-entry/cascader.d.ts +1 -1
  42. package/dist/components/data-entry/cascader.js +4 -4
  43. package/dist/components/data-entry/checkbox.d.ts +2 -2
  44. package/dist/components/data-entry/color-picker.d.ts +1 -1
  45. package/dist/components/data-entry/color-picker.js +4 -4
  46. package/dist/components/data-entry/date-picker.d.ts +1 -1
  47. package/dist/components/data-entry/date-picker.js +6 -6
  48. package/dist/components/data-entry/date-range-picker.d.ts +6 -4
  49. package/dist/components/data-entry/date-range-picker.js +5 -6
  50. package/dist/components/data-entry/index.d.ts +24 -6
  51. package/dist/components/data-entry/index.js +23 -23
  52. package/dist/components/data-entry/input.js +3 -3
  53. package/dist/components/data-entry/radio.d.ts +1 -1
  54. package/dist/components/data-entry/select.d.ts +1 -1
  55. package/dist/components/data-entry/select.js +5 -5
  56. package/dist/components/data-entry/slider.d.ts +1 -1
  57. package/dist/components/data-entry/switch.d.ts +1 -1
  58. package/dist/components/data-entry/textarea.js +3 -3
  59. package/dist/components/data-entry/time-input.js +2 -2
  60. package/dist/components/data-entry/time-picker.d.ts +1 -1
  61. package/dist/components/data-entry/time-picker.js +5 -5
  62. package/dist/components/data-entry/transfer.d.ts +2 -2
  63. package/dist/components/data-entry/transfer.js +6 -6
  64. package/dist/components/data-entry/tree-select.d.ts +1 -1
  65. package/dist/components/data-entry/tree-select.js +4 -4
  66. package/dist/components/data-entry/upload.d.ts +2 -2
  67. package/dist/components/data-entry/upload.js +7 -7
  68. package/dist/components/data-grid/index.js +6 -6
  69. package/dist/components/feedback/alert.js +5 -5
  70. package/dist/components/feedback/dialog.js +5 -5
  71. package/dist/components/feedback/index.js +8 -8
  72. package/dist/components/general/button.js +3 -3
  73. package/dist/components/general/index.js +3 -3
  74. package/dist/components/layout/index.js +4 -4
  75. package/dist/components/navigation/index.js +9 -9
  76. package/dist/components/navigation/pagination.js +6 -6
  77. package/dist/components/navigation/steps.js +3 -3
  78. package/dist/components/query/index.js +5 -5
  79. package/dist/components/ui/index.d.ts +2 -2
  80. package/dist/components/ui/index.js +25 -25
  81. package/dist/{data-entry.prop-CyiZuEI8.d.ts → data-entry.prop-C9QWj5Kl.d.ts} +40 -2
  82. package/dist/form/index.js +1 -1
  83. package/dist/i18n/index.d.ts +6 -0
  84. package/dist/i18n/index.js +2 -2
  85. package/dist/index.d.ts +2 -2
  86. package/dist/index.js +36 -36
  87. package/dist/lib/datetime/index.js +1 -1
  88. package/dist/props/components/index.d.ts +1 -1
  89. package/dist/props/index.d.ts +1 -1
  90. package/dist/props/index.js +2 -2
  91. package/dist/props/registry.d.ts +10 -0
  92. package/dist/props/registry.js +1 -1
  93. package/dist/{search-input--ui38eQV.d.ts → search-input-d1g8eW9z.d.ts} +1 -1
  94. package/dist/styles/form-layout.css +5 -5
  95. package/dist/styles/layout.css +2 -2
  96. package/dist/tokens/base.css +1 -0
  97. package/dist/tokens/components/form.css +11 -0
  98. package/dist/tokens/semantic/layout.css +11 -0
  99. package/package.json +2 -1
  100. package/dist/chunk-3ZNSR2NL.js +0 -467
  101. package/dist/chunk-G7A6SUIN.js +0 -183
@@ -1,8 +1,8 @@
1
- import { Input } from './chunk-6AIYMYSG.js';
1
+ import { Input } from './chunk-K24AQV4R.js';
2
+ import { Button } from './chunk-XBFUROAY.js';
2
3
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
- import { Button } from './chunk-5L77S5CL.js';
4
- import { useTranslation, usePickerLocales } from './chunk-QTEPKNQE.js';
5
- import { normalizeHhmm, isValidHhmm } from './chunk-C7W5BO7R.js';
4
+ import { useTranslation, usePickerLocales } from './chunk-B6S6LTWT.js';
5
+ import { normalizeHhmm, isValidHhmm } from './chunk-5732TWQF.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import * as React from 'react';
8
8
  import { X, Clock } from 'lucide-react';
@@ -1,11 +1,11 @@
1
1
  import { normalizeTreeOptions, collectAllExpandableKeys, filterVisibleTree, flattenVisibleTree, findNodeByValue, reactNodeText, getDescendantValues } from './chunk-SMLKNECP.js';
2
2
  import { Command, CommandInput } from './chunk-3R3QVJCB.js';
3
3
  import { Checkbox } from './chunk-BE6GJGKJ.js';
4
+ import { Button } from './chunk-XBFUROAY.js';
4
5
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
5
6
  import { ScrollArea } from './chunk-3KPEZ5CF.js';
6
- import { Button } from './chunk-5L77S5CL.js';
7
7
  import { controlOpenRingClass } from './chunk-B4K4BXEF.js';
8
- import { useTranslation } from './chunk-QTEPKNQE.js';
8
+ import { useTranslation } from './chunk-B6S6LTWT.js';
9
9
  import { cn } from './chunk-U7N2A7A3.js';
10
10
  import * as React from 'react';
11
11
  import { X, ChevronsUpDown, ChevronDown, ChevronRight } from 'lucide-react';
@@ -1,4 +1,4 @@
1
- import { APP_TIME_FORMATS, isAppDateFormat, isAppTimeFormat, isAppLocale, translate, getDateFnsLocale, syncI18nLocale, syncDatetimeContext, disableLiveRelativeFormatting, enableLiveRelativeFormatting, getDayPickerLocale, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, resolveDefaultDateFormat } from './chunk-C7W5BO7R.js';
1
+ import { APP_TIME_FORMATS, isAppDateFormat, isAppTimeFormat, isAppLocale, translate, getDateFnsLocale, syncI18nLocale, syncDatetimeContext, disableLiveRelativeFormatting, enableLiveRelativeFormatting, getDayPickerLocale, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, resolveDefaultDateFormat } from './chunk-5732TWQF.js';
2
2
  import * as React from 'react';
3
3
  import { useMemo } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -1,9 +1,9 @@
1
1
  import { Command, CommandList, CommandItem, CommandGroup } from './chunk-3R3QVJCB.js';
2
- import { Input } from './chunk-6AIYMYSG.js';
2
+ import { Input } from './chunk-K24AQV4R.js';
3
+ import { Button } from './chunk-XBFUROAY.js';
3
4
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
4
- import { Button } from './chunk-5L77S5CL.js';
5
5
  import { controlTriggerClass, controlOpenRingClass } from './chunk-B4K4BXEF.js';
6
- import { useTranslation } from './chunk-QTEPKNQE.js';
6
+ import { useTranslation } from './chunk-B6S6LTWT.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import * as React from 'react';
9
9
  import * as SelectPrimitive from '@radix-ui/react-select';
@@ -437,8 +437,12 @@ function DataSelect({
437
437
  name,
438
438
  id,
439
439
  className,
440
- "data-testid": dataTestId
440
+ "data-testid": dataTestId,
441
+ ...rest
441
442
  }) {
443
+ const ariaProps = Object.fromEntries(
444
+ Object.entries(rest).filter(([key]) => key.startsWith("aria-"))
445
+ );
442
446
  const searchable = showSearch ?? Boolean(loadOptions);
443
447
  if (searchable) {
444
448
  return /* @__PURE__ */ jsx(
@@ -491,7 +495,7 @@ function DataSelect({
491
495
  disabled,
492
496
  name,
493
497
  children: [
494
- /* @__PURE__ */ jsx(SelectTrigger, { id, "data-testid": dataTestId, className, children: /* @__PURE__ */ jsx(SelectValue, { placeholder }) }),
498
+ /* @__PURE__ */ jsx(SelectTrigger, { id, "data-testid": dataTestId, className, ...ariaProps, children: /* @__PURE__ */ jsx(SelectValue, { placeholder }) }),
495
499
  /* @__PURE__ */ jsx(SelectContent, { children: groupDataOptions(options).map(
496
500
  (group) => group.heading ? /* @__PURE__ */ jsxs(SelectGroup, { children: [
497
501
  /* @__PURE__ */ jsx(SelectLabel, { children: group.heading }),
@@ -1,7 +1,7 @@
1
- import { humanError } from './chunk-2FJ5TMQU.js';
1
+ import { humanError } from './chunk-X6AJ5HEI.js';
2
2
  import { Flex } from './chunk-INIIF7F7.js';
3
- import { Button } from './chunk-5L77S5CL.js';
4
- import { useTranslation } from './chunk-QTEPKNQE.js';
3
+ import { Button } from './chunk-XBFUROAY.js';
4
+ import { useTranslation } from './chunk-B6S6LTWT.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';
@@ -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-XBFUROAY.js';
4
5
  import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-IJ5ALJGA.js';
5
- import { Button } from './chunk-5L77S5CL.js';
6
6
  import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass } from './chunk-B4K4BXEF.js';
7
- import { useTranslation } from './chunk-QTEPKNQE.js';
7
+ import { useTranslation } from './chunk-B6S6LTWT.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,5 +1,5 @@
1
1
  import { toneNeutralClass, toneMutedClass, toneInfoClass, toneDestructiveClass, toneWarningClass, toneSuccessClass } from './chunk-B4K4BXEF.js';
2
- import { useTranslation } from './chunk-QTEPKNQE.js';
2
+ import { useTranslation } from './chunk-B6S6LTWT.js';
3
3
  import { cn } from './chunk-U7N2A7A3.js';
4
4
  import { cva } from 'class-variance-authority';
5
5
  import { XCircle, Pause, CheckCircle2, Circle, Trash2, AlertCircle, Clock, Play } from 'lucide-react';
@@ -1,7 +1,7 @@
1
- import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-GOJQHYED.js';
2
- import { Button } from './chunk-5L77S5CL.js';
3
- import { useOptionalAppContext, useTranslation, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel, resolveTimezonePickerOptions, getTimezoneLabel, APP_LOCALES } from './chunk-QTEPKNQE.js';
4
- import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-C7W5BO7R.js';
1
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-BJTNKNMY.js';
2
+ import { Button } from './chunk-XBFUROAY.js';
3
+ import { useOptionalAppContext, useTranslation, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel, resolveTimezonePickerOptions, getTimezoneLabel, APP_LOCALES } from './chunk-B6S6LTWT.js';
4
+ import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-5732TWQF.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
7
7
  import { useId } from 'react';
@@ -1,8 +1,8 @@
1
1
  import { overlayHeaderToneClass } from './chunk-VU4GFGDG.js';
2
- import { Input } from './chunk-6AIYMYSG.js';
3
- import { buttonVariants, Button } from './chunk-5L77S5CL.js';
2
+ import { Input } from './chunk-K24AQV4R.js';
3
+ import { buttonVariants, Button } from './chunk-XBFUROAY.js';
4
4
  import { Label } from './chunk-7PWBC4BY.js';
5
- import { useTranslation } from './chunk-QTEPKNQE.js';
5
+ import { useTranslation } from './chunk-B6S6LTWT.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,14 +1,14 @@
1
1
  import { ResponsiveGrid } from './chunk-C3PKEV6S.js';
2
2
  import { Label } from './chunk-7PWBC4BY.js';
3
3
  import { cn } from './chunk-U7N2A7A3.js';
4
- import * as React from 'react';
4
+ import * as React2 from 'react';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
 
7
- var FormLayoutContext = React.createContext(null);
7
+ var FormLayoutContext = React2.createContext(null);
8
8
  function useFormLayout() {
9
- return React.useContext(FormLayoutContext);
9
+ return React2.useContext(FormLayoutContext);
10
10
  }
11
- var Form = React.forwardRef(function Form2({
11
+ var Form = React2.forwardRef(function Form2({
12
12
  layout = "vertical",
13
13
  labelWidth,
14
14
  controlWidth,
@@ -20,7 +20,7 @@ var Form = React.forwardRef(function Form2({
20
20
  children,
21
21
  ...props
22
22
  }, ref) {
23
- const ctx = React.useMemo(
23
+ const ctx = React2.useMemo(
24
24
  () => ({ layout, labelWidth, controlWidth, labelAlign, collapseBelow }),
25
25
  [layout, labelWidth, controlWidth, labelAlign, collapseBelow]
26
26
  );
@@ -58,14 +58,23 @@ function FormField({
58
58
  const controlWidth = controlWidthProp ?? form?.controlWidth;
59
59
  const labelAlign = form?.labelAlign ?? "end";
60
60
  const collapseBelow = form?.collapseBelow ?? "md";
61
- const helperId = helper ? `${id}-helper` : void 0;
62
- const errorId = error ? `${id}-error` : void 0;
63
- if (typeof process !== "undefined" && process.env?.NODE_ENV !== "production" && !React.isValidElement(children)) {
61
+ const autoId = React2.useId();
62
+ const resolvedId = id ?? autoId;
63
+ const labelId = `${resolvedId}-label`;
64
+ const helperId = helper ? `${resolvedId}-helper` : void 0;
65
+ const errorId = error ? `${resolvedId}-error` : void 0;
66
+ if (typeof process !== "undefined" && process.env?.NODE_ENV !== "production" && !React2.isValidElement(children)) {
64
67
  console.warn(
65
68
  "FormField expects a single React element child to receive aria-describedby/aria-errormessage; the helper text and error message will not be associated with the control."
66
69
  );
67
70
  }
68
- const childWithA11y = React.isValidElement(children) ? React.cloneElement(children, {
71
+ const childProps = React2.isValidElement(children) ? children.props : void 0;
72
+ const childWithA11y = React2.isValidElement(children) ? React2.cloneElement(children, {
73
+ // The label is associated via aria-labelledby (not <label for>): composite
74
+ // controls (Radio.Group, checkbox lists, range pairs) have no labelable root,
75
+ // and a dangling `for` triggers Chrome's "Incorrect use of <label>" issue.
76
+ id: childProps?.id ?? resolvedId,
77
+ "aria-labelledby": childProps?.["aria-labelledby"] ?? labelId,
69
78
  // Helper and error can coexist: helper stays on aria-describedby, the error on
70
79
  // aria-errormessage (surfaced when aria-invalid is true).
71
80
  "aria-describedby": helperId,
@@ -90,10 +99,19 @@ function FormField({
90
99
  className: cn("ui-form-field", className),
91
100
  children: [
92
101
  /* @__PURE__ */ jsxs("div", { "data-slot": "form-field-label", className: "ui-form-field-label", children: [
93
- /* @__PURE__ */ jsxs(Label, { htmlFor: id, className: "ui-inline-xs", children: [
94
- /* @__PURE__ */ jsx("span", { children: label }),
95
- required && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "text-destructive", children: "*" })
96
- ] }),
102
+ /* @__PURE__ */ jsx(Label, { asChild: true, id: labelId, className: "ui-inline-xs", children: /* @__PURE__ */ jsxs(
103
+ "span",
104
+ {
105
+ onClick: () => {
106
+ const el = document.getElementById(resolvedId);
107
+ if (el && el instanceof HTMLElement) el.focus();
108
+ },
109
+ children: [
110
+ /* @__PURE__ */ jsx("span", { children: label }),
111
+ required && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "text-destructive", children: "*" })
112
+ ]
113
+ }
114
+ ) }),
97
115
  labelAddon
98
116
  ] }),
99
117
  /* @__PURE__ */ jsxs("div", { "data-slot": "form-field-control", className: "ui-form-field-control", children: [
@@ -1,6 +1,6 @@
1
- import { Input } from './chunk-6AIYMYSG.js';
1
+ import { Input } from './chunk-K24AQV4R.js';
2
2
  import { controlIconClass } from './chunk-B4K4BXEF.js';
3
- import { useTranslation } from './chunk-QTEPKNQE.js';
3
+ import { useTranslation } from './chunk-B6S6LTWT.js';
4
4
  import { cn } from './chunk-U7N2A7A3.js';
5
5
  import * as React from 'react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { useTranslation } from './chunk-QTEPKNQE.js';
1
+ import { useTranslation } from './chunk-B6S6LTWT.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import * as React from 'react';
4
4
  import { X } 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-XBFUROAY.js';
3
4
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
4
5
  import { ScrollArea, ScrollBar } from './chunk-3KPEZ5CF.js';
5
- import { Button } from './chunk-5L77S5CL.js';
6
6
  import { controlOpenRingClass } from './chunk-B4K4BXEF.js';
7
- import { useTranslation } from './chunk-QTEPKNQE.js';
7
+ import { useTranslation } from './chunk-B6S6LTWT.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,6 +1,6 @@
1
- import { Input } from './chunk-6AIYMYSG.js';
1
+ import { Input } from './chunk-K24AQV4R.js';
2
2
  import { Label } from './chunk-7PWBC4BY.js';
3
- import { useTranslation } from './chunk-QTEPKNQE.js';
3
+ import { useTranslation } from './chunk-B6S6LTWT.js';
4
4
  import { useDebouncedValue } from './chunk-LFW37FGG.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- import { buttonVariants } from './chunk-5L77S5CL.js';
1
+ import { buttonVariants } from './chunk-XBFUROAY.js';
2
2
  import { controlIconSmClass } from './chunk-B4K4BXEF.js';
3
3
  import { cn } from './chunk-U7N2A7A3.js';
4
4
  import { ChevronLeft, ChevronRight } from 'lucide-react';
@@ -16,7 +16,7 @@ function Calendar({
16
16
  DayPicker,
17
17
  {
18
18
  showOutsideDays,
19
- className: cn("w-fit p-3", className),
19
+ className: cn("relative w-fit p-3", className),
20
20
  classNames: {
21
21
  months: cn("flex flex-col gap-4 sm:flex-row", classNames?.months),
22
22
  month: cn("relative flex flex-col gap-4", classNames?.month),
@@ -25,7 +25,13 @@ function Calendar({
25
25
  classNames?.month_caption
26
26
  ),
27
27
  caption_label: cn("text-sm font-medium", classNames?.caption_label),
28
- nav: cn("absolute inset-x-0 top-3 flex items-center justify-between px-1", classNames?.nav),
28
+ // z-10 is load-bearing: `month` below is position:relative and later in the DOM, so
29
+ // without a z-index it paints OVER these buttons — they render but never receive the
30
+ // click (the month caption swallows it) and the calendar looks frozen.
31
+ nav: cn(
32
+ "absolute inset-x-0 top-3 z-10 flex items-center justify-between px-1",
33
+ classNames?.nav
34
+ ),
29
35
  button_previous: cn(
30
36
  buttonVariants({ variant: "outline" }),
31
37
  controlIconSmClass,
@@ -1,4 +1,4 @@
1
- import { useTranslation } from './chunk-QTEPKNQE.js';
1
+ import { useTranslation } from './chunk-B6S6LTWT.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import * as React from 'react';
4
4
  import useEmblaCarousel from 'embla-carousel-react';
@@ -1,5 +1,5 @@
1
1
  import { controlIconClass } from './chunk-B4K4BXEF.js';
2
- import { useTranslation } from './chunk-QTEPKNQE.js';
2
+ import { useTranslation } from './chunk-B6S6LTWT.js';
3
3
  import { cn } from './chunk-U7N2A7A3.js';
4
4
  import { Check, Loader2, X, Circle } from 'lucide-react';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { controlMultilineClass } from './chunk-B4K4BXEF.js';
2
- import { useTranslation } from './chunk-QTEPKNQE.js';
2
+ import { useTranslation } from './chunk-B6S6LTWT.js';
3
3
  import { cn } from './chunk-U7N2A7A3.js';
4
4
  import * as React from 'react';
5
5
  import { X } from 'lucide-react';
@@ -1,9 +1,9 @@
1
- import { SearchInput } from './chunk-RBXVCWXL.js';
1
+ import { SearchInput } from './chunk-LVLPNKJP.js';
2
2
  import { reactNodeText } from './chunk-SMLKNECP.js';
3
3
  import { Checkbox } from './chunk-BE6GJGKJ.js';
4
+ import { Button } from './chunk-XBFUROAY.js';
4
5
  import { ScrollArea } from './chunk-3KPEZ5CF.js';
5
- import { Button } from './chunk-5L77S5CL.js';
6
- import { useTranslation } from './chunk-QTEPKNQE.js';
6
+ import { useTranslation } from './chunk-B6S6LTWT.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,4 +1,4 @@
1
- import { normalizeHhmm, isValidHhmm } from './chunk-C7W5BO7R.js';
1
+ import { normalizeHhmm, isValidHhmm } from './chunk-5732TWQF.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,4 +1,4 @@
1
- import { getSyncedLocale, translateCurrent } from './chunk-C7W5BO7R.js';
1
+ import { getSyncedLocale, translateCurrent } from './chunk-5732TWQF.js';
2
2
 
3
3
  // src/lib/format.ts
4
4
  function formatBytes(n, locale = getSyncedLocale()) {
@@ -1,4 +1,4 @@
1
- import { useTranslation } from './chunk-QTEPKNQE.js';
1
+ import { useTranslation } from './chunk-B6S6LTWT.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import * as React from 'react';
4
4
  import { Slot } from '@radix-ui/react-slot';
@@ -3,7 +3,7 @@ import { Tooltip, TooltipTrigger, TooltipContent } from './chunk-32WO3YLB.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-QTEPKNQE.js';
6
+ import { useTranslation } from './chunk-B6S6LTWT.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';
@@ -0,0 +1,191 @@
1
+ import { Calendar } from './chunk-NU2SOVTU.js';
2
+ import { Popover, PopoverAnchor, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
+ import { useTranslation, usePickerLocales } from './chunk-B6S6LTWT.js';
4
+ import { toIsoDate, parseDateInput } from './chunk-5732TWQF.js';
5
+ import { cn } from './chunk-U7N2A7A3.js';
6
+ import * as React from 'react';
7
+ import { ArrowRight, X, CalendarIcon } from 'lucide-react';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
10
+ var ISO_HINT = "yyyy-mm-dd";
11
+ function DateRangePicker({
12
+ value: valueProp,
13
+ defaultValue,
14
+ onValueChange,
15
+ placeholder,
16
+ disabled,
17
+ className,
18
+ id,
19
+ name,
20
+ locale: localeProp,
21
+ fromDate,
22
+ toDate,
23
+ allowClear = true
24
+ }) {
25
+ const { t } = useTranslation();
26
+ const { dayPickerLocale } = usePickerLocales(localeProp);
27
+ const [open, setOpen] = React.useState(false);
28
+ const autoId = React.useId();
29
+ const fromId = id ?? autoId;
30
+ const toId = `${fromId}-to`;
31
+ const isControlled = React.useRef(valueProp !== void 0).current;
32
+ const [internalValue, setInternalValue] = React.useState(defaultValue);
33
+ const value = isControlled ? valueProp : internalValue;
34
+ const [fromText, setFromText] = React.useState(() => toIsoDate(value?.from));
35
+ const [toText, setToText] = React.useState(() => toIsoDate(value?.to));
36
+ React.useEffect(() => {
37
+ setFromText(toIsoDate(value?.from));
38
+ setToText(toIsoDate(value?.to));
39
+ }, [value?.from, value?.to]);
40
+ const resolvedPlaceholder = placeholder ?? t("dataEntry.dateRangePicker.placeholder") ?? ISO_HINT;
41
+ const emit = (next) => {
42
+ if (!isControlled) setInternalValue(next);
43
+ onValueChange?.(next);
44
+ };
45
+ const showClear = allowClear && Boolean(value?.from || value?.to) && !disabled;
46
+ const clear = () => {
47
+ emit(void 0);
48
+ setFromText("");
49
+ setToText("");
50
+ };
51
+ const commitEdge = (edge, raw) => {
52
+ const trimmed = raw.trim();
53
+ if (trimmed !== "" && !/^\d{4}-\d{2}-\d{2}$/.test(trimmed)) return;
54
+ const parsed = trimmed === "" ? void 0 : parseDateInput(trimmed) ?? void 0;
55
+ const next = { from: value?.from, to: value?.to, [edge]: parsed };
56
+ emit(next.from || next.to ? next : void 0);
57
+ };
58
+ const sharedKeyHandlers = {
59
+ onKeyDown: (event) => {
60
+ if (event.key === "ArrowDown") {
61
+ event.preventDefault();
62
+ setOpen(true);
63
+ } else if (event.key === "Escape" && open) {
64
+ setOpen(false);
65
+ }
66
+ }
67
+ };
68
+ const innerInputClass = "min-w-0 flex-1 bg-transparent tabular-nums outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed";
69
+ return /* @__PURE__ */ jsx(Popover, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs(
70
+ "div",
71
+ {
72
+ className: cn(
73
+ // One input-styled shell for the whole range — mirrors Input's control
74
+ // tokens (border/radius/ring) so it reads as a single form field.
75
+ "ui-control border-input bg-background flex w-full min-w-0 items-center gap-2 rounded-md border px-3 shadow-xs transition-[color,box-shadow] outline-none",
76
+ "focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",
77
+ open && "border-ring ring-ring/50 ring-[3px]",
78
+ disabled && "pointer-events-none cursor-not-allowed opacity-50",
79
+ className
80
+ ),
81
+ onClick: () => {
82
+ if (!disabled) setOpen(true);
83
+ },
84
+ children: [
85
+ /* @__PURE__ */ jsx(
86
+ "input",
87
+ {
88
+ id: fromId,
89
+ name: name ? `${name}_from` : void 0,
90
+ value: fromText,
91
+ disabled,
92
+ placeholder: resolvedPlaceholder,
93
+ inputMode: "numeric",
94
+ autoComplete: "off",
95
+ "aria-label": t("dataEntry.dateRangePicker.from") ?? "From",
96
+ className: innerInputClass,
97
+ ...sharedKeyHandlers,
98
+ onChange: (event) => {
99
+ setFromText(event.target.value);
100
+ commitEdge("from", event.target.value);
101
+ },
102
+ onBlur: (event) => {
103
+ const parsed = parseDateInput(event.target.value.trim());
104
+ setFromText(parsed ? toIsoDate(parsed) : toIsoDate(value?.from));
105
+ }
106
+ }
107
+ ),
108
+ /* @__PURE__ */ jsx(ArrowRight, { className: "text-muted-foreground size-3.5 shrink-0", "aria-hidden": "true" }),
109
+ /* @__PURE__ */ jsx(
110
+ "input",
111
+ {
112
+ id: toId,
113
+ name: name ? `${name}_to` : void 0,
114
+ value: toText,
115
+ disabled,
116
+ placeholder: resolvedPlaceholder,
117
+ inputMode: "numeric",
118
+ autoComplete: "off",
119
+ "aria-label": t("dataEntry.dateRangePicker.to") ?? "To",
120
+ className: innerInputClass,
121
+ ...sharedKeyHandlers,
122
+ onChange: (event) => {
123
+ setToText(event.target.value);
124
+ commitEdge("to", event.target.value);
125
+ },
126
+ onBlur: (event) => {
127
+ const parsed = parseDateInput(event.target.value.trim());
128
+ setToText(parsed ? toIsoDate(parsed) : toIsoDate(value?.to));
129
+ }
130
+ }
131
+ ),
132
+ showClear ? /* @__PURE__ */ jsx(
133
+ "button",
134
+ {
135
+ type: "button",
136
+ tabIndex: -1,
137
+ "aria-label": t("common.clear") ?? "Clear",
138
+ className: "text-muted-foreground hover:text-foreground shrink-0",
139
+ onClick: (event) => {
140
+ event.stopPropagation();
141
+ clear();
142
+ },
143
+ children: /* @__PURE__ */ jsx(X, { className: "size-4 shrink-0", "aria-hidden": "true" })
144
+ }
145
+ ) : null,
146
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
147
+ "button",
148
+ {
149
+ type: "button",
150
+ disabled,
151
+ tabIndex: -1,
152
+ "aria-label": t("dataEntry.dateRangePicker.openCalendar") ?? "Open calendar",
153
+ className: "text-muted-foreground hover:text-foreground shrink-0",
154
+ children: /* @__PURE__ */ jsx(CalendarIcon, { className: "size-4 shrink-0", "aria-hidden": "true" })
155
+ }
156
+ ) }),
157
+ /* @__PURE__ */ jsx(
158
+ PopoverContent,
159
+ {
160
+ className: "w-auto p-0",
161
+ align: "start",
162
+ onOpenAutoFocus: (event) => event.preventDefault(),
163
+ children: /* @__PURE__ */ jsx(
164
+ Calendar,
165
+ {
166
+ mode: "range",
167
+ selected: value,
168
+ defaultMonth: value?.from,
169
+ numberOfMonths: 2,
170
+ onSelect: (range) => {
171
+ emit(range);
172
+ setFromText(toIsoDate(range?.from));
173
+ setToText(toIsoDate(range?.to));
174
+ },
175
+ locale: dayPickerLocale,
176
+ disabled: [
177
+ ...fromDate ? [{ before: fromDate }] : [],
178
+ ...toDate ? [{ after: toDate }] : []
179
+ ],
180
+ startMonth: fromDate,
181
+ endMonth: toDate
182
+ }
183
+ )
184
+ }
185
+ )
186
+ ]
187
+ }
188
+ ) }) });
189
+ }
190
+
191
+ export { DateRangePicker };
@@ -3,7 +3,7 @@ export { c as FlexProp, P as PageContainerProp, P as PageContainerProps } from '
3
3
  export { F as Flex, P as PageContainer } from '../../flex-X2EFU1d5.js';
4
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--ui38eQV.js';
6
+ export { F as Field, a as FormField, S as SearchInput } from '../../search-input-d1g8eW9z.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';
@@ -18,7 +18,7 @@ export { AlertDialog, Dialog, DialogContent, DialogDescription, DialogFooter, Di
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-CyiZuEI8.js';
21
+ export { E as collectUploadCommitActions, G as createUploadItem } from '../../data-entry.prop-C9QWj5Kl.js';
22
22
  export { j as formatDate } from '../../format-date-ByyZoqI5.js';
23
23
  import '../../shared.prop-BvMSLFJ6.js';
24
24
  import 'react';