@godxjp/ui 13.7.0 → 13.9.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 (122) hide show
  1. package/dist/app/index.js +4 -4
  2. package/dist/{checkbox-ChJ2PyIz.d.ts → checkbox-bBfLARyF.d.ts} +1 -1
  3. package/dist/{chunk-CSTUENE6.js → chunk-2JOJYHG2.js} +4 -4
  4. package/dist/{chunk-TNFAUPEV.js → chunk-3UTHNXKB.js} +4 -4
  5. package/dist/{chunk-IRPZJKLU.js → chunk-4FGE5XVC.js} +10 -0
  6. package/dist/{chunk-C7W5BO7R.js → chunk-5732TWQF.js} +22 -1
  7. package/dist/{chunk-IMERLXSC.js → chunk-5LTW2LWF.js} +6 -1
  8. package/dist/{chunk-SXECWZZV.js → chunk-6SZKFJYY.js} +8 -8
  9. package/dist/{chunk-QMGNMDQG.js → chunk-76YSDJDP.js} +5 -5
  10. package/dist/chunk-7PBKPDBJ.js +881 -0
  11. package/dist/{chunk-QTEPKNQE.js → chunk-B6S6LTWT.js} +1 -1
  12. package/dist/{chunk-GOJQHYED.js → chunk-DBVZ73ML.js} +9 -5
  13. package/dist/{chunk-I472SSN2.js → chunk-E3Z3XCQR.js} +4 -3
  14. package/dist/{chunk-ZYJRZLMZ.js → chunk-HIEGUYPP.js} +1 -1
  15. package/dist/{chunk-W3AS2GEC.js → chunk-HNL7CJFO.js} +5 -5
  16. package/dist/{chunk-76S3TQFH.js → chunk-IAJOP2Z3.js} +31 -13
  17. package/dist/{chunk-RBXVCWXL.js → chunk-IESBK6XZ.js} +2 -2
  18. package/dist/{chunk-LFO5BJ4H.js → chunk-ION2KFXK.js} +2 -2
  19. package/dist/{chunk-QPRBPE4S.js → chunk-IRBI2EZ2.js} +4 -4
  20. package/dist/{chunk-3KPEZ5CF.js → chunk-J2DEWIYY.js} +1 -1
  21. package/dist/{chunk-6AIYMYSG.js → chunk-K24AQV4R.js} +1 -1
  22. package/dist/{chunk-B23A5CPA.js → chunk-KZ7ZDNUN.js} +3 -3
  23. package/dist/{chunk-6EKAEN6T.js → chunk-MSRJC3RT.js} +3 -3
  24. package/dist/{chunk-O3F3KF2B.js → chunk-N2WBUCVY.js} +4 -4
  25. package/dist/{chunk-MUUO7SPN.js → chunk-NU2SOVTU.js} +9 -3
  26. package/dist/{chunk-B7R7DHZF.js → chunk-NZBAFFWP.js} +1 -1
  27. package/dist/{chunk-ZOMIELKI.js → chunk-Q3KUZG4P.js} +1 -1
  28. package/dist/{chunk-LTKHPOE3.js → chunk-QROC2RMH.js} +2 -2
  29. package/dist/{chunk-P5KPCT6R.js → chunk-QVBOICFU.js} +2 -0
  30. package/dist/{chunk-3JQDPNTA.js → chunk-R2TXLS7S.js} +1 -1
  31. package/dist/{chunk-JXGDDD46.js → chunk-TRBD4RXJ.js} +4 -4
  32. package/dist/{chunk-KW54IV4X.js → chunk-UT6DAJUL.js} +3 -3
  33. package/dist/{chunk-2FJ5TMQU.js → chunk-X6AJ5HEI.js} +1 -1
  34. package/dist/{chunk-5L77S5CL.js → chunk-XBFUROAY.js} +1 -1
  35. package/dist/chunk-YXVJFYQE.js +191 -0
  36. package/dist/components/admin/index.d.ts +4 -4
  37. package/dist/components/admin/index.js +30 -30
  38. package/dist/components/data-display/badge.js +3 -3
  39. package/dist/components/data-display/card.d.ts +6 -4
  40. package/dist/components/data-display/card.js +1 -1
  41. package/dist/components/data-display/carousel.js +3 -3
  42. package/dist/components/data-display/index.js +11 -11
  43. package/dist/components/data-display/scroll-area.js +1 -1
  44. package/dist/components/data-entry/calendar.d.ts +2 -2
  45. package/dist/components/data-entry/calendar.js +4 -4
  46. package/dist/components/data-entry/cascader.d.ts +2 -2
  47. package/dist/components/data-entry/cascader.js +5 -5
  48. package/dist/components/data-entry/checkbox.d.ts +3 -3
  49. package/dist/components/data-entry/color-picker.d.ts +2 -2
  50. package/dist/components/data-entry/color-picker.js +4 -4
  51. package/dist/components/data-entry/date-picker.d.ts +2 -2
  52. package/dist/components/data-entry/date-picker.js +6 -6
  53. package/dist/components/data-entry/date-range-picker.d.ts +7 -5
  54. package/dist/components/data-entry/date-range-picker.js +5 -6
  55. package/dist/components/data-entry/index.d.ts +25 -7
  56. package/dist/components/data-entry/index.js +25 -25
  57. package/dist/components/data-entry/input.js +3 -3
  58. package/dist/components/data-entry/radio.d.ts +2 -2
  59. package/dist/components/data-entry/select.d.ts +2 -2
  60. package/dist/components/data-entry/select.js +5 -5
  61. package/dist/components/data-entry/slider.d.ts +2 -2
  62. package/dist/components/data-entry/switch.d.ts +2 -2
  63. package/dist/components/data-entry/textarea.js +3 -3
  64. package/dist/components/data-entry/time-input.js +2 -2
  65. package/dist/components/data-entry/time-picker.d.ts +2 -2
  66. package/dist/components/data-entry/time-picker.js +5 -5
  67. package/dist/components/data-entry/transfer.d.ts +3 -3
  68. package/dist/components/data-entry/transfer.js +7 -7
  69. package/dist/components/data-entry/tree-select.d.ts +2 -2
  70. package/dist/components/data-entry/tree-select.js +6 -6
  71. package/dist/components/data-entry/upload.d.ts +3 -3
  72. package/dist/components/data-entry/upload.js +7 -7
  73. package/dist/components/data-grid/index.js +9 -9
  74. package/dist/components/feedback/alert.js +5 -5
  75. package/dist/components/feedback/dialog.js +5 -5
  76. package/dist/components/feedback/index.js +10 -10
  77. package/dist/components/feedback/sheet.d.ts +1 -1
  78. package/dist/components/feedback/sheet.js +1 -1
  79. package/dist/components/general/button.js +3 -3
  80. package/dist/components/general/index.js +3 -3
  81. package/dist/components/layout/index.d.ts +4 -4
  82. package/dist/components/layout/index.js +5 -5
  83. package/dist/components/navigation/index.js +9 -9
  84. package/dist/components/navigation/pagination.js +6 -6
  85. package/dist/components/navigation/steps.js +3 -3
  86. package/dist/components/query/index.js +5 -5
  87. package/dist/components/ui/index.d.ts +3 -3
  88. package/dist/components/ui/index.js +32 -32
  89. package/dist/{data-entry.prop-CyiZuEI8.d.ts → data-entry.prop-BSUaseKh.d.ts} +41 -3
  90. package/dist/{flex-X2EFU1d5.d.ts → flex-1Cy46L0M.d.ts} +1 -1
  91. package/dist/form/index.js +1 -1
  92. package/dist/i18n/index.d.ts +6 -0
  93. package/dist/i18n/index.js +2 -2
  94. package/dist/index.d.ts +4 -4
  95. package/dist/index.js +43 -43
  96. package/dist/{layout.prop-D2be7gOo.d.ts → layout.prop-fCz-Vlie.d.ts} +2 -0
  97. package/dist/lib/datetime/index.js +1 -1
  98. package/dist/props/components/index.d.ts +2 -2
  99. package/dist/props/index.d.ts +2 -2
  100. package/dist/props/index.js +1 -1
  101. package/dist/props/registry.d.ts +10 -0
  102. package/dist/props/registry.js +1 -1
  103. package/dist/{search-input--ui38eQV.d.ts → search-input-D4v1JGOA.d.ts} +1 -1
  104. package/dist/styles/alert-layout.css +2 -2
  105. package/dist/styles/card-layout.css +10 -10
  106. package/dist/styles/control.css +8 -8
  107. package/dist/styles/data-display-layout.css +7 -7
  108. package/dist/styles/data-entry-layout.css +2 -2
  109. package/dist/styles/dialog-layout.css +1 -1
  110. package/dist/styles/form-layout.css +5 -5
  111. package/dist/styles/index.css +1 -1
  112. package/dist/styles/layout.css +10 -10
  113. package/dist/styles/navigation-layout.css +5 -5
  114. package/dist/styles/shell-layout.css +10 -10
  115. package/dist/styles/table-layout.css +6 -6
  116. package/dist/tokens/base.css +1 -0
  117. package/dist/tokens/components/card.css +4 -0
  118. package/dist/tokens/components/form.css +11 -0
  119. package/dist/tokens/semantic/layout.css +11 -0
  120. package/package.json +5 -3
  121. package/dist/chunk-3ZNSR2NL.js +0 -467
  122. package/dist/chunk-G7A6SUIN.js +0 -183
@@ -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
3
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
4
- import { Button } from './chunk-5L77S5CL.js';
4
+ import { Button } from './chunk-XBFUROAY.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,9 +1,9 @@
1
+ import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './chunk-DV52WNXO.js';
1
2
  import { DropdownMenu, DropdownMenuTrigger } from './chunk-LMKUKCTN.js';
2
3
  import { Tooltip, TooltipTrigger, TooltipContent } from './chunk-32WO3YLB.js';
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';
@@ -370,6 +370,7 @@ function Topbar({
370
370
  onToggleCollapsed,
371
371
  rightSlot,
372
372
  unread = false,
373
+ searchPlaceholder,
373
374
  onNotificationsOpen,
374
375
  user
375
376
  }) {
@@ -442,7 +443,7 @@ function Topbar({
442
443
  onClick: onSearchOpen,
443
444
  children: [
444
445
  /* @__PURE__ */ jsx(Search, { "aria-hidden": "true" }),
445
- /* @__PURE__ */ jsx("span", { children: t("layout.topbar.searchPlaceholder") }),
446
+ /* @__PURE__ */ jsx("span", { children: searchPlaceholder ?? t("layout.topbar.searchPlaceholder") }),
446
447
  /* @__PURE__ */ jsx("kbd", { className: "kbd", children: "\u2318K" })
447
448
  ]
448
449
  }
@@ -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,10 +1,10 @@
1
1
  import { EmptyState } from './chunk-YD7V2HGZ.js';
2
+ import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-IJ5ALJGA.js';
2
3
  import { Flex, densityClass } from './chunk-INIIF7F7.js';
3
4
  import { Checkbox } from './chunk-BE6GJGKJ.js';
4
- import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-IJ5ALJGA.js';
5
- import { Button } from './chunk-5L77S5CL.js';
5
+ import { Button } from './chunk-XBFUROAY.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';
@@ -238,7 +238,7 @@ DataTable.Content = function DataTableContent() {
238
238
  "aria-sort": isSortable ? isActiveSort ? sort?.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
239
239
  className: cn(
240
240
  col.width,
241
- col.align === "right" && "text-right",
241
+ col.align === "right" && "text-end",
242
242
  col.align === "center" && "text-center",
243
243
  col.hiddenOnMobile && "hidden md:table-cell",
244
244
  isSortable && "select-none"
@@ -312,7 +312,7 @@ DataTable.Content = function DataTableContent() {
312
312
  className: cn(
313
313
  cellPadding,
314
314
  col.width,
315
- col.align === "right" && "text-right",
315
+ col.align === "right" && "text-end",
316
316
  col.align === "center" && "text-center",
317
317
  col.hiddenOnMobile && "hidden md:table-cell"
318
318
  ),
@@ -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
+ import { useTranslation } from './chunk-B6S6LTWT.js';
2
3
  import { Label } from './chunk-7PWBC4BY.js';
3
- import { useTranslation } from './chunk-QTEPKNQE.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,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,9 +1,9 @@
1
- import { SearchInput } from './chunk-RBXVCWXL.js';
1
+ import { SearchInput } from './chunk-IESBK6XZ.js';
2
2
  import { reactNodeText } from './chunk-SMLKNECP.js';
3
+ import { ScrollArea } from './chunk-J2DEWIYY.js';
3
4
  import { Checkbox } from './chunk-BE6GJGKJ.js';
4
- import { ScrollArea } from './chunk-3KPEZ5CF.js';
5
- import { Button } from './chunk-5L77S5CL.js';
6
- import { useTranslation } from './chunk-QTEPKNQE.js';
5
+ import { Button } from './chunk-XBFUROAY.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';
@@ -24,7 +24,7 @@ var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...prop
24
24
  orientation,
25
25
  className: cn(
26
26
  "flex touch-none transition-colors select-none",
27
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
27
+ orientation === "vertical" && "h-full w-2.5 border-s border-s-transparent p-px",
28
28
  orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
29
29
  className
30
30
  ),
@@ -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
+ import { ScrollArea, ScrollBar } from './chunk-J2DEWIYY.js';
2
3
  import { Command, CommandInput } from './chunk-3R3QVJCB.js';
3
4
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
4
- import { ScrollArea, ScrollBar } from './chunk-3KPEZ5CF.js';
5
- import { Button } from './chunk-5L77S5CL.js';
5
+ import { Button } from './chunk-XBFUROAY.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,7 +1,7 @@
1
- import { humanError } from './chunk-2FJ5TMQU.js';
2
1
  import { Flex } from './chunk-INIIF7F7.js';
3
- import { Button } from './chunk-5L77S5CL.js';
4
- import { useTranslation } from './chunk-QTEPKNQE.js';
2
+ import { humanError } from './chunk-X6AJ5HEI.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,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
+ import { useTranslation } from './chunk-B6S6LTWT.js';
4
5
  import { Label } from './chunk-7PWBC4BY.js';
5
- import { useTranslation } from './chunk-QTEPKNQE.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';
@@ -99,7 +99,7 @@ var DialogBody = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data
99
99
  DialogBody.displayName = "DialogBody";
100
100
  var DialogFooter = ({ className, ...props }) => (
101
101
  // Layout (right-aligned actions, mobile column-reverse) lives in feedback-layout.css
102
- // [data-slot="dialog-footer"]. Destructive action goes far-left via `className="mr-auto"`.
102
+ // [data-slot="dialog-footer"]. Destructive action goes to the start via `className="me-auto"`.
103
103
  /* @__PURE__ */ jsx("div", { "data-slot": "dialog-footer", className, ...props })
104
104
  );
105
105
  DialogFooter.displayName = "DialogFooter";
@@ -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 { 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,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';
@@ -96,7 +96,7 @@ function Steps({
96
96
  {
97
97
  className: cn(
98
98
  "min-w-0",
99
- isVertical ? "pt-1 text-left" : "mt-2 px-2",
99
+ isVertical ? "pt-1 text-start" : "mt-2 px-2",
100
100
  titlePlacement === "vertical" && !isVertical && "mt-1"
101
101
  ),
102
102
  children: [
@@ -94,6 +94,7 @@ function StatCard({
94
94
  layout = "stacked",
95
95
  align = "start",
96
96
  inverse = false,
97
+ accent,
97
98
  className,
98
99
  size = "compact",
99
100
  ...props
@@ -103,6 +104,7 @@ function StatCard({
103
104
  Card,
104
105
  {
105
106
  size: size ?? "compact",
107
+ accent,
106
108
  className: cn("ui-stat-card", className),
107
109
  "data-stat-card": "",
108
110
  "data-stat-layout": layout,
@@ -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,11 +1,11 @@
1
1
  import { normalizeTreeOptions, collectAllExpandableKeys, filterVisibleTree, flattenVisibleTree, findNodeByValue, reactNodeText, getDescendantValues } from './chunk-SMLKNECP.js';
2
- import { Command, CommandInput } from './chunk-3R3QVJCB.js';
2
+ import { ScrollArea } from './chunk-J2DEWIYY.js';
3
3
  import { Checkbox } from './chunk-BE6GJGKJ.js';
4
+ import { Command, CommandInput } from './chunk-3R3QVJCB.js';
4
5
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
5
- import { ScrollArea } from './chunk-3KPEZ5CF.js';
6
- import { Button } from './chunk-5L77S5CL.js';
6
+ import { Button } from './chunk-XBFUROAY.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,6 +1,6 @@
1
- import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-GOJQHYED.js';
2
- import { Button } from './chunk-5L77S5CL.js';
3
- import { useTranslation } from './chunk-QTEPKNQE.js';
1
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-DBVZ73ML.js';
2
+ import { Button } from './chunk-XBFUROAY.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 { MoreHorizontal, ChevronLeft, ChevronRight } from 'lucide-react';
@@ -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';
@@ -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 };
@@ -1,9 +1,9 @@
1
1
  export { B as BreadcrumbItem } from '../../navigation.prop-CXDaVNaR.js';
2
- export { c as FlexProp, P as PageContainerProp, P as PageContainerProps } from '../../layout.prop-D2be7gOo.js';
3
- export { F as Flex, P as PageContainer } from '../../flex-X2EFU1d5.js';
2
+ export { c as FlexProp, P as PageContainerProp, P as PageContainerProps } from '../../layout.prop-fCz-Vlie.js';
3
+ export { F as Flex, P as PageContainer } from '../../flex-1Cy46L0M.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-D4v1JGOA.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-BSUaseKh.js';
22
22
  export { j as formatDate } from '../../format-date-ByyZoqI5.js';
23
23
  import '../../shared.prop-BvMSLFJ6.js';
24
24
  import 'react';