@godxjp/ui 6.2.0 → 6.4.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 (80) hide show
  1. package/dist/app/index.js +4 -4
  2. package/dist/{checkbox-CoHDi3ao.d.ts → checkbox-CNP1MnPn.d.ts} +1 -1
  3. package/dist/{chunk-7JN4JXK6.js → chunk-54LBVZLM.js} +111 -23
  4. package/dist/{chunk-GV2YQLH2.js → chunk-5DRKN2HI.js} +1 -1
  5. package/dist/{chunk-7OTWYSVX.js → chunk-6BJ2X7PA.js} +32 -10
  6. package/dist/{chunk-IGOP3HFF.js → chunk-7W3CHMLL.js} +1 -1
  7. package/dist/{chunk-FRFUSXBH.js → chunk-A3Q5LKWS.js} +1 -1
  8. package/dist/chunk-DV52WNXO.js +8 -0
  9. package/dist/{chunk-2476DOOA.js → chunk-E7CZIMX7.js} +2 -2
  10. package/dist/{chunk-32UNYHGY.js → chunk-EYLUVDHJ.js} +1 -1
  11. package/dist/{chunk-FBGBDFNL.js → chunk-FNZQTYAG.js} +2 -2
  12. package/dist/{chunk-66KBGNJT.js → chunk-GFUO67BB.js} +3 -3
  13. package/dist/chunk-GXBWEOZD.js +106 -0
  14. package/dist/{chunk-2D72MDPB.js → chunk-GXKBK6N2.js} +2 -2
  15. package/dist/{chunk-JVAOKBRC.js → chunk-MIVDO3Z3.js} +2 -2
  16. package/dist/{chunk-ZOBDO3KZ.js → chunk-NKN2OW3G.js} +2 -2
  17. package/dist/{chunk-BXIE57HV.js → chunk-RGSH6FQN.js} +1 -1
  18. package/dist/{chunk-XAFIIWZU.js → chunk-TNIDN4OY.js} +2 -2
  19. package/dist/{chunk-R5QIUFML.js → chunk-UJFXXEM4.js} +59 -30
  20. package/dist/{chunk-GVKKQ6MU.js → chunk-ULKQ3IDG.js} +2 -2
  21. package/dist/chunk-WHRFHVFD.js +123 -0
  22. package/dist/{chunk-JZCFDGIB.js → chunk-WUXFOY6M.js} +2 -2
  23. package/dist/components/admin/index.d.ts +5 -5
  24. package/dist/components/admin/index.js +20 -19
  25. package/dist/components/data-display/index.js +6 -9
  26. package/dist/components/data-entry/autocomplete.d.ts +1 -1
  27. package/dist/components/data-entry/autocomplete.js +3 -3
  28. package/dist/components/data-entry/calendar.d.ts +1 -1
  29. package/dist/components/data-entry/cascader.d.ts +1 -1
  30. package/dist/components/data-entry/cascader.js +4 -4
  31. package/dist/components/data-entry/checkbox.d.ts +2 -2
  32. package/dist/components/data-entry/color-picker.d.ts +1 -1
  33. package/dist/components/data-entry/color-picker.js +4 -4
  34. package/dist/components/data-entry/command.d.ts +5 -5
  35. package/dist/components/data-entry/date-picker.d.ts +8 -2
  36. package/dist/components/data-entry/date-picker.js +4 -3
  37. package/dist/components/data-entry/date-range-picker.d.ts +7 -2
  38. package/dist/components/data-entry/date-range-picker.js +4 -3
  39. package/dist/components/data-entry/index.d.ts +4 -4
  40. package/dist/components/data-entry/index.js +18 -18
  41. package/dist/components/data-entry/radio.d.ts +1 -1
  42. package/dist/components/data-entry/slider.d.ts +1 -1
  43. package/dist/components/data-entry/switch.d.ts +1 -1
  44. package/dist/components/data-entry/time-picker.d.ts +7 -2
  45. package/dist/components/data-entry/time-picker.js +4 -4
  46. package/dist/components/data-entry/transfer.d.ts +2 -2
  47. package/dist/components/data-entry/transfer.js +4 -4
  48. package/dist/components/data-entry/tree-select.d.ts +1 -1
  49. package/dist/components/data-entry/tree-select.js +4 -4
  50. package/dist/components/data-entry/upload.d.ts +2 -2
  51. package/dist/components/data-entry/upload.js +6 -6
  52. package/dist/components/feedback/alert.js +4 -4
  53. package/dist/components/feedback/dialog.js +3 -3
  54. package/dist/components/feedback/index.js +7 -7
  55. package/dist/components/feedback/sheet.d.ts +1 -1
  56. package/dist/components/layout/index.d.ts +3 -3
  57. package/dist/components/layout/index.js +3 -2
  58. package/dist/components/navigation/index.d.ts +2 -2
  59. package/dist/components/navigation/index.js +4 -4
  60. package/dist/components/navigation/pagination.js +3 -3
  61. package/dist/components/query/index.js +5 -5
  62. package/dist/components/ui/index.d.ts +2 -2
  63. package/dist/components/ui/index.js +19 -19
  64. package/dist/{data-entry.prop-CRbHLb39.d.ts → data-entry.prop-I3mgmdGm.d.ts} +6 -0
  65. package/dist/{filter-bar-XpspcQdZ.d.ts → filter-bar-CNEdQB7i.d.ts} +1 -1
  66. package/dist/i18n/index.d.ts +8 -3
  67. package/dist/i18n/index.js +2 -2
  68. package/dist/index.d.ts +5 -5
  69. package/dist/index.js +20 -19
  70. package/dist/{inline-C5u6ptJV.d.ts → inline-BuyFYZah.d.ts} +1 -1
  71. package/dist/{layout.prop-C795F0qg.d.ts → layout.prop-CjlAEWgr.d.ts} +2 -0
  72. package/dist/lib/datetime/index.d.ts +3 -1
  73. package/dist/lib/datetime/index.js +1 -1
  74. package/dist/props/components/index.d.ts +2 -2
  75. package/dist/props/index.d.ts +2 -2
  76. package/dist/{search-input-PzXHa8KZ.d.ts → search-input-JWJMFVqC.d.ts} +1 -1
  77. package/dist/styles/shell-layout.css +75 -0
  78. package/package.json +2 -1
  79. package/dist/chunk-ACNKID6V.js +0 -70
  80. package/dist/chunk-HNH4PJSV.js +0 -66
package/dist/app/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { useAppContext } from '../chunk-32UNYHGY.js';
2
- export { APP_LOCALES, APP_REQUEST_HEADER_LOCALE, APP_REQUEST_HEADER_TIMEZONE, APP_TIMEZONE_OPTIONS, APP_TIMEZONE_PRESET, APP_TIME_FORMAT_OPTIONS, AppProvider, DEFAULT_STORAGE_KEY, TIMEZONE_ALIASES, formatTimezoneDisplayLabel, getAllIanaTimezones, getAppRequestHeaders, getBrowserTimezone, getTimeFormatLabel, getTimezoneCityName, getTimezoneLabel, getTimezoneOffsetLabel, isKnownAppTimezone, isValidIanaTimezone, readStoredPreferences, resetAppRequestHeaders, resetIanaTimezoneCacheForTests, resolveDefaultTimeFormat, resolveDefaultTimezone, resolveTimezoneForIntl, resolveTimezonePickerOptions, syncAppRequestHeaders, useAppContext, useAppDateFormat, useAppLocale, useAppTimeFormat, useAppTimezone, useOptionalAppContext, usePickerLocales, useTranslation, writeStoredPreferences } from '../chunk-32UNYHGY.js';
3
- import { formatDate } from '../chunk-7OTWYSVX.js';
4
- export { APP_DATE_FORMATS, APP_DATE_FORMAT_OPTIONS, APP_LOCALE_CONFIG, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, APP_TIME_FORMATS, detectFormatDateKind, formatAppDate, formatAppDateLong, formatAppDateTime, formatAppRelative, formatAppTime, formatCalendarDate, formatDate, formatTimeOfDay, getDateFnsLocale, getDateFormatLabel, getDatePattern, getDateTimePattern, getDatetimeContext, getDayPickerLocale, getTimePattern, isAppDateFormat, isAppLocale, isAppTimeFormat, isFormatDateValue, isValidHhmm, normalizeHhmm, parseDateInput, resolveDefaultDateFormat, syncDatetimeContext } from '../chunk-7OTWYSVX.js';
1
+ import { useAppContext } from '../chunk-EYLUVDHJ.js';
2
+ export { APP_LOCALES, APP_REQUEST_HEADER_LOCALE, APP_REQUEST_HEADER_TIMEZONE, APP_TIMEZONE_OPTIONS, APP_TIMEZONE_PRESET, APP_TIME_FORMAT_OPTIONS, AppProvider, DEFAULT_STORAGE_KEY, TIMEZONE_ALIASES, formatTimezoneDisplayLabel, getAllIanaTimezones, getAppRequestHeaders, getBrowserTimezone, getTimeFormatLabel, getTimezoneCityName, getTimezoneLabel, getTimezoneOffsetLabel, isKnownAppTimezone, isValidIanaTimezone, readStoredPreferences, resetAppRequestHeaders, resetIanaTimezoneCacheForTests, resolveDefaultTimeFormat, resolveDefaultTimezone, resolveTimezoneForIntl, resolveTimezonePickerOptions, syncAppRequestHeaders, useAppContext, useAppDateFormat, useAppLocale, useAppTimeFormat, useAppTimezone, useOptionalAppContext, usePickerLocales, useTranslation, writeStoredPreferences } from '../chunk-EYLUVDHJ.js';
3
+ import { formatDate } from '../chunk-6BJ2X7PA.js';
4
+ export { APP_DATE_FORMATS, APP_DATE_FORMAT_OPTIONS, APP_LOCALE_CONFIG, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, APP_TIME_FORMATS, detectFormatDateKind, formatAppDate, formatAppDateLong, formatAppDateTime, formatAppRelative, formatAppTime, formatCalendarDate, formatDate, formatTimeOfDay, getDateFnsLocale, getDateFormatLabel, getDatePattern, getDateTimePattern, getDatetimeContext, getDayPickerLocale, getTimePattern, isAppDateFormat, isAppLocale, isAppTimeFormat, isFormatDateValue, isValidHhmm, normalizeHhmm, parseDateInput, resolveDefaultDateFormat, syncDatetimeContext } from '../chunk-6BJ2X7PA.js';
5
5
  import { useMemo } from 'react';
6
6
 
7
7
  function useFormatting() {
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { c as CheckboxGroupProp } from './data-entry.prop-CRbHLb39.js';
4
+ import { c as CheckboxGroupProp } from './data-entry.prop-I3mgmdGm.js';
5
5
 
6
6
  declare function CheckboxGroup({ value: controlledValue, defaultValue, onChange, options, orientation, disabled, name, className, children, }: CheckboxGroupProp): react_jsx_runtime.JSX.Element;
7
7
 
@@ -1,5 +1,6 @@
1
- import { densityClass, pageContainerVariantClass, stackGapClass } from './chunk-S66TJXJU.js';
1
+ import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './chunk-DV52WNXO.js';
2
2
  import { Badge } from './chunk-PIIRNAXA.js';
3
+ import { densityClass, pageContainerVariantClass, stackGapClass } from './chunk-S66TJXJU.js';
3
4
  import { cn } from './chunk-U7N2A7A3.js';
4
5
  import { Link } from 'react-router-dom';
5
6
  import { ChevronRight, PanelLeftOpen, PanelLeftClose, ChevronDown, Search, Bell, SlidersHorizontal } from 'lucide-react';
@@ -196,6 +197,97 @@ function ShellApp({ menu, breadcrumb, children }) {
196
197
  }
197
198
  );
198
199
  }
200
+ function isItemActive(item, activeId) {
201
+ if (item.id === activeId) return true;
202
+ return (item.children ?? []).some((child) => isItemActive(child, activeId));
203
+ }
204
+ function NavLeaf({ item, activeId, collapsed, onSelect, sub = false }) {
205
+ const Icon = item.icon;
206
+ const active = item.id === activeId;
207
+ return /* @__PURE__ */ jsxs(
208
+ "button",
209
+ {
210
+ type: "button",
211
+ className: cn("sb-nav-item", sub && "sb-nav-item--sub"),
212
+ "data-active": active ? "true" : void 0,
213
+ "aria-current": active ? "page" : void 0,
214
+ "aria-disabled": item.disabled,
215
+ "aria-label": collapsed ? item.label : void 0,
216
+ onClick: () => {
217
+ if (!item.disabled) onSelect?.(item.id);
218
+ },
219
+ children: [
220
+ !sub ? /* @__PURE__ */ jsx("span", { className: "sb-icon", children: /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true" }) }) : null,
221
+ !collapsed && /* @__PURE__ */ jsx("span", { className: "sb-label", children: item.label }),
222
+ !collapsed && item.badge !== void 0 && item.badge !== "" ? /* @__PURE__ */ jsx("span", { className: "sb-badge", children: item.badge }) : null,
223
+ collapsed && !sub ? /* @__PURE__ */ jsx("span", { className: "sb-flyout", children: item.label }) : null
224
+ ]
225
+ }
226
+ );
227
+ }
228
+ function NavGroup({ item, activeId, collapsed, onSelect }) {
229
+ const Icon = item.icon;
230
+ const active = isItemActive(item, activeId);
231
+ const children = item.children ?? [];
232
+ if (collapsed) {
233
+ return /* @__PURE__ */ jsxs("div", { className: "sb-nav-fly", children: [
234
+ /* @__PURE__ */ jsx(
235
+ "button",
236
+ {
237
+ type: "button",
238
+ className: "sb-nav-item",
239
+ "data-active": active ? "true" : void 0,
240
+ "aria-label": item.label,
241
+ "aria-haspopup": "menu",
242
+ children: /* @__PURE__ */ jsx("span", { className: "sb-icon", children: /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true" }) })
243
+ }
244
+ ),
245
+ /* @__PURE__ */ jsxs("span", { className: "sb-flyout sb-flyout--group", role: "menu", children: [
246
+ /* @__PURE__ */ jsx("span", { className: "sb-flyout-title", children: item.label }),
247
+ children.map((child) => /* @__PURE__ */ jsx(
248
+ "button",
249
+ {
250
+ type: "button",
251
+ role: "menuitem",
252
+ className: "sb-nav-item sb-nav-item--sub",
253
+ "data-active": child.id === activeId ? "true" : void 0,
254
+ "aria-current": child.id === activeId ? "page" : void 0,
255
+ onClick: () => {
256
+ if (!child.disabled) onSelect?.(child.id);
257
+ },
258
+ children: /* @__PURE__ */ jsx("span", { className: "sb-label", children: child.label })
259
+ },
260
+ child.id
261
+ ))
262
+ ] })
263
+ ] });
264
+ }
265
+ return /* @__PURE__ */ jsxs(Collapsible, { defaultOpen: active, children: [
266
+ /* @__PURE__ */ jsxs(
267
+ CollapsibleTrigger,
268
+ {
269
+ className: "sb-nav-item sb-nav-group-trigger",
270
+ "data-active": active ? "true" : void 0,
271
+ children: [
272
+ /* @__PURE__ */ jsx("span", { className: "sb-icon", children: /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true" }) }),
273
+ /* @__PURE__ */ jsx("span", { className: "sb-label", children: item.label }),
274
+ /* @__PURE__ */ jsx(ChevronDown, { className: "sb-chevron", "aria-hidden": "true" })
275
+ ]
276
+ }
277
+ ),
278
+ /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "sb-nav-sub", children: children.map((child) => /* @__PURE__ */ jsx(
279
+ NavLeaf,
280
+ {
281
+ item: child,
282
+ activeId,
283
+ collapsed: false,
284
+ onSelect,
285
+ sub: true
286
+ },
287
+ child.id
288
+ )) }) })
289
+ ] });
290
+ }
199
291
  function Sidebar({
200
292
  activeId,
201
293
  onSelect,
@@ -233,31 +325,27 @@ function Sidebar({
233
325
  ) : null,
234
326
  /* @__PURE__ */ jsx("div", { className: "sb-nav-scroll", children: sections.map((section, sectionIndex) => /* @__PURE__ */ jsxs("div", { className: "sb-section", children: [
235
327
  section.label && !collapsed ? /* @__PURE__ */ jsx("div", { className: "sb-section-label", children: section.label }) : null,
236
- /* @__PURE__ */ jsx("div", { className: "sb-nav", role: "navigation", children: section.items.map((item) => {
237
- const Icon = item.icon;
238
- const isActive = item.id === activeId;
239
- return /* @__PURE__ */ jsxs(
240
- "button",
328
+ /* @__PURE__ */ jsx("div", { className: "sb-nav", role: "navigation", children: section.items.map(
329
+ (item) => item.children && item.children.length > 0 ? /* @__PURE__ */ jsx(
330
+ NavGroup,
241
331
  {
242
- type: "button",
243
- className: cn("sb-nav-item"),
244
- "data-active": isActive ? "true" : void 0,
245
- "aria-current": isActive ? "page" : void 0,
246
- "aria-disabled": item.disabled,
247
- "aria-label": collapsed ? item.label : void 0,
248
- title: collapsed ? item.label : void 0,
249
- onClick: () => {
250
- if (!item.disabled) onSelect?.(item.id);
251
- },
252
- children: [
253
- /* @__PURE__ */ jsx("span", { className: "sb-icon", children: /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true" }) }),
254
- !collapsed && /* @__PURE__ */ jsx("span", { className: "sb-label", children: item.label }),
255
- !collapsed && item.badge !== void 0 && item.badge !== "" ? /* @__PURE__ */ jsx("span", { className: "sb-badge", children: item.badge }) : null
256
- ]
332
+ item,
333
+ activeId,
334
+ collapsed,
335
+ onSelect
336
+ },
337
+ item.id
338
+ ) : /* @__PURE__ */ jsx(
339
+ NavLeaf,
340
+ {
341
+ item,
342
+ activeId,
343
+ collapsed,
344
+ onSelect
257
345
  },
258
346
  item.id
259
- );
260
- }) })
347
+ )
348
+ ) })
261
349
  ] }, section.label ?? sectionIndex)) }),
262
350
  footer ? /* @__PURE__ */ jsx("div", { className: "sb-footer", children: footer }) : null
263
351
  ] });
@@ -1,7 +1,7 @@
1
1
  import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from './chunk-V6UWJKZF.js';
2
2
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
3
  import { Button } from './chunk-HJEBRCXL.js';
4
- import { useTranslation } from './chunk-32UNYHGY.js';
4
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
7
7
  import { ChevronsUpDown, Check } from 'lucide-react';
@@ -69,16 +69,21 @@ var en_default = {
69
69
  },
70
70
  dataEntry: {
71
71
  datePicker: {
72
- placeholder: "Select date"
72
+ placeholder: "Select date",
73
+ openCalendar: "Open calendar"
73
74
  },
74
75
  dateRangePicker: {
75
- placeholder: "Select date range"
76
+ placeholder: "Select date range",
77
+ from: "From",
78
+ to: "To",
79
+ openCalendar: "Open calendar"
76
80
  },
77
81
  timePicker: {
78
82
  placeholder: "Select time",
79
83
  hour: "Hour",
80
84
  minute: "Minute",
81
- typeLabel: "Type time HH:mm"
85
+ typeLabel: "Type time HH:mm",
86
+ openPicker: "Open time picker"
82
87
  },
83
88
  searchInput: {
84
89
  placeholder: "Search\u2026"
@@ -242,16 +247,21 @@ var ja_default = {
242
247
  },
243
248
  dataEntry: {
244
249
  datePicker: {
245
- placeholder: "\u65E5\u4ED8\u3092\u9078\u629E"
250
+ placeholder: "\u65E5\u4ED8\u3092\u9078\u629E",
251
+ openCalendar: "\u30AB\u30EC\u30F3\u30C0\u30FC\u3092\u958B\u304F"
246
252
  },
247
253
  dateRangePicker: {
248
- placeholder: "\u671F\u9593\u3092\u9078\u629E"
254
+ placeholder: "\u671F\u9593\u3092\u9078\u629E",
255
+ from: "\u958B\u59CB",
256
+ to: "\u7D42\u4E86",
257
+ openCalendar: "\u30AB\u30EC\u30F3\u30C0\u30FC\u3092\u958B\u304F"
249
258
  },
250
259
  timePicker: {
251
260
  placeholder: "\u6642\u523B\u3092\u9078\u629E",
252
261
  hour: "\u6642",
253
262
  minute: "\u5206",
254
- typeLabel: "HH:mm \u3092\u5165\u529B"
263
+ typeLabel: "HH:mm \u3092\u5165\u529B",
264
+ openPicker: "\u6642\u523B\u3092\u9078\u629E"
255
265
  },
256
266
  searchInput: {
257
267
  placeholder: "\u691C\u7D22\u2026"
@@ -415,16 +425,21 @@ var vi_default = {
415
425
  },
416
426
  dataEntry: {
417
427
  datePicker: {
418
- placeholder: "Ch\u1ECDn ng\xE0y"
428
+ placeholder: "Ch\u1ECDn ng\xE0y",
429
+ openCalendar: "M\u1EDF l\u1ECBch"
419
430
  },
420
431
  dateRangePicker: {
421
- placeholder: "Ch\u1ECDn kho\u1EA3ng ng\xE0y"
432
+ placeholder: "Ch\u1ECDn kho\u1EA3ng ng\xE0y",
433
+ from: "T\u1EEB",
434
+ to: "\u0110\u1EBFn",
435
+ openCalendar: "M\u1EDF l\u1ECBch"
422
436
  },
423
437
  timePicker: {
424
438
  placeholder: "Ch\u1ECDn gi\u1EDD",
425
439
  hour: "Gi\u1EDD",
426
440
  minute: "Ph\xFAt",
427
- typeLabel: "Nh\u1EADp gi\u1EDD HH:mm"
441
+ typeLabel: "Nh\u1EADp gi\u1EDD HH:mm",
442
+ openPicker: "M\u1EDF ch\u1ECDn gi\u1EDD"
428
443
  },
429
444
  searchInput: {
430
445
  placeholder: "T\xECm ki\u1EBFm\u2026"
@@ -679,6 +694,13 @@ function isDateOnlyString(value) {
679
694
  }
680
695
 
681
696
  // src/lib/datetime/parse.ts
697
+ function toIsoDate(value) {
698
+ if (value == null || Number.isNaN(value.getTime())) return "";
699
+ const year = String(value.getFullYear()).padStart(4, "0");
700
+ const month = String(value.getMonth() + 1).padStart(2, "0");
701
+ const day = String(value.getDate()).padStart(2, "0");
702
+ return `${year}-${month}-${day}`;
703
+ }
682
704
  function parseDateInput(value) {
683
705
  if (value == null) return null;
684
706
  if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value;
@@ -854,4 +876,4 @@ function isFormatDateValue(value) {
854
876
  return parseDateInput(trimmed) != null;
855
877
  }
856
878
 
857
- export { APP_DATE_FORMATS, APP_DATE_FORMAT_OPTIONS, APP_LOCALE_CONFIG, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, APP_TIME_FORMATS, MESSAGE_CATALOG, calendarDateToTZDate, detectFormatDateKind, disableLiveRelativeFormatting, enableLiveRelativeFormatting, formatAppDate, formatAppDateLong, formatAppDateTime, formatAppRelative, formatAppTime, formatCalendarDate, formatDate, formatTimeOfDay, getDateFnsLocale, getDateFormatLabel, getDatePattern, getDateTimePattern, getDatetimeContext, getDayPickerLocale, getTimePattern, hhmmToTZDate, isAppDateFormat, isAppLocale, isAppTimeFormat, isDateOnlyString, isFormatDateValue, isValidHhmm, normalizeHhmm, parseDateInput, resetDatetimeContextForTests, resetI18nLocale, resolveDefaultDateFormat, syncDatetimeContext, syncI18nLocale, translate, translateCurrent };
879
+ export { APP_DATE_FORMATS, APP_DATE_FORMAT_OPTIONS, APP_LOCALE_CONFIG, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, APP_TIME_FORMATS, MESSAGE_CATALOG, calendarDateToTZDate, detectFormatDateKind, disableLiveRelativeFormatting, enableLiveRelativeFormatting, formatAppDate, formatAppDateLong, formatAppDateTime, formatAppRelative, formatAppTime, formatCalendarDate, formatDate, formatTimeOfDay, getDateFnsLocale, getDateFormatLabel, getDatePattern, getDateTimePattern, getDatetimeContext, getDayPickerLocale, getTimePattern, hhmmToTZDate, isAppDateFormat, isAppLocale, isAppTimeFormat, isDateOnlyString, isFormatDateValue, isValidHhmm, normalizeHhmm, parseDateInput, resetDatetimeContextForTests, resetI18nLocale, resolveDefaultDateFormat, syncDatetimeContext, syncI18nLocale, toIsoDate, translate, translateCurrent };
@@ -1,4 +1,4 @@
1
- import { formatDate, translateCurrent } from './chunk-7OTWYSVX.js';
1
+ import { formatDate, translateCurrent } from './chunk-6BJ2X7PA.js';
2
2
 
3
3
  // src/lib/format.ts
4
4
  function formatDateTime(value, options) {
@@ -1,7 +1,7 @@
1
1
  import { Input } from './chunk-VOHTRR5X.js';
2
2
  import { buttonVariants, Button } from './chunk-HJEBRCXL.js';
3
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
3
4
  import { Label } from './chunk-7PWBC4BY.js';
4
- import { useTranslation } from './chunk-32UNYHGY.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
7
7
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -0,0 +1,8 @@
1
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
+
3
+ // src/components/data-display/collapsible.tsx
4
+ var Collapsible = CollapsiblePrimitive.Root;
5
+ var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
6
+ var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
7
+
8
+ export { Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger };
@@ -1,10 +1,10 @@
1
1
  import { normalizeTreeOptions, collectAllExpandableKeys, filterVisibleTree, flattenVisibleTree, findNodeByValue, reactNodeText, getDescendantValues } from './chunk-SMLKNECP.js';
2
- import { Checkbox } from './chunk-E76QIYSY.js';
3
2
  import { Command, CommandInput } from './chunk-V6UWJKZF.js';
3
+ import { Checkbox } from './chunk-E76QIYSY.js';
4
4
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
5
5
  import { ScrollArea } from './chunk-3KPEZ5CF.js';
6
6
  import { Button } from './chunk-HJEBRCXL.js';
7
- import { useTranslation } from './chunk-32UNYHGY.js';
7
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
8
8
  import { cn } from './chunk-U7N2A7A3.js';
9
9
  import * as React from 'react';
10
10
  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-7OTWYSVX.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-6BJ2X7PA.js';
2
2
  import * as React from 'react';
3
3
  import { useMemo } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
- import { humanError } from './chunk-IGOP3HFF.js';
1
+ import { humanError } from './chunk-7W3CHMLL.js';
2
2
  import { Inline } from './chunk-S66TJXJU.js';
3
3
  import { Button } from './chunk-HJEBRCXL.js';
4
- import { useTranslation } from './chunk-32UNYHGY.js';
4
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
7
7
  import { CheckCircle2, TriangleAlert, AlertCircle, Info, X, RefreshCw } from 'lucide-react';
@@ -1,9 +1,9 @@
1
- import { formatBytes } from './chunk-IGOP3HFF.js';
2
- import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-FRFUSXBH.js';
3
1
  import { Slider } from './chunk-CRERCLIZ.js';
4
2
  import { controlIconClass } from './chunk-ICM6XBST.js';
3
+ import { formatBytes } from './chunk-7W3CHMLL.js';
4
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-A3Q5LKWS.js';
5
5
  import { Button } from './chunk-HJEBRCXL.js';
6
- import { useTranslation } from './chunk-32UNYHGY.js';
6
+ import { useTranslation } from './chunk-EYLUVDHJ.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';
@@ -0,0 +1,106 @@
1
+ import { Calendar } from './chunk-IK7I3ABN.js';
2
+ import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
+ import { Input } from './chunk-VOHTRR5X.js';
4
+ import { Button } from './chunk-HJEBRCXL.js';
5
+ import { useTranslation, usePickerLocales } from './chunk-EYLUVDHJ.js';
6
+ import { toIsoDate, parseDateInput } from './chunk-6BJ2X7PA.js';
7
+ import { cn } from './chunk-U7N2A7A3.js';
8
+ import * as React from 'react';
9
+ import { CalendarIcon } from 'lucide-react';
10
+ import { jsxs, jsx } from 'react/jsx-runtime';
11
+
12
+ var ISO_HINT = "yyyy-mm-dd";
13
+ function DatePicker({
14
+ value,
15
+ onChange,
16
+ placeholder,
17
+ disabled,
18
+ className,
19
+ id,
20
+ name,
21
+ locale: localeProp,
22
+ fromDate,
23
+ toDate
24
+ }) {
25
+ const { t } = useTranslation();
26
+ const { dayPickerLocale } = usePickerLocales(localeProp);
27
+ const [open, setOpen] = React.useState(false);
28
+ const [text, setText] = React.useState(() => toIsoDate(value));
29
+ React.useEffect(() => {
30
+ setText(toIsoDate(value));
31
+ }, [value]);
32
+ const resolvedPlaceholder = placeholder ?? t("dataEntry.datePicker.placeholder") ?? ISO_HINT;
33
+ const commit = (raw) => {
34
+ const trimmed = raw.trim();
35
+ if (trimmed === "") {
36
+ onChange?.(void 0);
37
+ return;
38
+ }
39
+ const parsed = parseDateInput(trimmed);
40
+ if (parsed) {
41
+ onChange?.(parsed);
42
+ }
43
+ };
44
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
45
+ /* @__PURE__ */ jsx(
46
+ Input,
47
+ {
48
+ id,
49
+ name,
50
+ value: text,
51
+ disabled,
52
+ placeholder: resolvedPlaceholder,
53
+ inputMode: "numeric",
54
+ autoComplete: "off",
55
+ role: "combobox",
56
+ "aria-expanded": open,
57
+ "aria-haspopup": "dialog",
58
+ className: "pr-10",
59
+ onChange: (event) => {
60
+ setText(event.target.value);
61
+ commit(event.target.value);
62
+ },
63
+ onBlur: (event) => {
64
+ const parsed = parseDateInput(event.target.value.trim());
65
+ setText(parsed ? toIsoDate(parsed) : toIsoDate(value));
66
+ }
67
+ }
68
+ ),
69
+ /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
70
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
71
+ Button,
72
+ {
73
+ type: "button",
74
+ variant: "ghost",
75
+ size: "icon",
76
+ disabled,
77
+ tabIndex: -1,
78
+ "aria-label": t("dataEntry.datePicker.openCalendar") ?? "Open calendar",
79
+ className: "text-muted-foreground absolute inset-y-0 right-0 h-full px-2 hover:bg-transparent",
80
+ children: /* @__PURE__ */ jsx(CalendarIcon, { className: "size-4 shrink-0", "aria-hidden": "true" })
81
+ }
82
+ ) }),
83
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "end", children: /* @__PURE__ */ jsx(
84
+ Calendar,
85
+ {
86
+ mode: "single",
87
+ selected: value,
88
+ onSelect: (date) => {
89
+ onChange?.(date);
90
+ setText(toIsoDate(date));
91
+ setOpen(false);
92
+ },
93
+ locale: dayPickerLocale,
94
+ disabled: [
95
+ ...fromDate ? [{ before: fromDate }] : [],
96
+ ...toDate ? [{ after: toDate }] : []
97
+ ],
98
+ startMonth: fromDate,
99
+ endMonth: toDate
100
+ }
101
+ ) })
102
+ ] })
103
+ ] });
104
+ }
105
+
106
+ export { DatePicker };
@@ -1,10 +1,10 @@
1
1
  import { normalizeTreeOptions, formatPathLabels, getNodeByPath, filterTreeOptions, pathsEqual, pathKey } from './chunk-SMLKNECP.js';
2
- import { Checkbox } from './chunk-E76QIYSY.js';
3
2
  import { Command, CommandInput } from './chunk-V6UWJKZF.js';
3
+ import { Checkbox } from './chunk-E76QIYSY.js';
4
4
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
5
5
  import { ScrollArea, ScrollBar } from './chunk-3KPEZ5CF.js';
6
6
  import { Button } from './chunk-HJEBRCXL.js';
7
- import { useTranslation } from './chunk-32UNYHGY.js';
7
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
8
8
  import { cn } from './chunk-U7N2A7A3.js';
9
9
  import * as React from 'react';
10
10
  import { X, ChevronsUpDown, Check, ChevronRight } from 'lucide-react';
@@ -1,7 +1,7 @@
1
1
  import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-UX634MYF.js';
2
2
  import { Button } from './chunk-HJEBRCXL.js';
3
- import { useTranslation, useOptionalAppContext, APP_LOCALES, resolveTimezonePickerOptions, getTimezoneLabel, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel } from './chunk-32UNYHGY.js';
4
- import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-7OTWYSVX.js';
3
+ import { useTranslation, useOptionalAppContext, APP_LOCALES, resolveTimezonePickerOptions, getTimezoneLabel, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel } from './chunk-EYLUVDHJ.js';
4
+ import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-6BJ2X7PA.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import { X, ChevronRight, Languages, Globe, Clock, CalendarDays } from 'lucide-react';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,10 +1,10 @@
1
1
  import { reactNodeText } from './chunk-SMLKNECP.js';
2
2
  import { Checkbox } from './chunk-E76QIYSY.js';
3
- import { Input } from './chunk-VOHTRR5X.js';
4
3
  import { ScrollArea } from './chunk-3KPEZ5CF.js';
4
+ import { Input } from './chunk-VOHTRR5X.js';
5
5
  import { Button } from './chunk-HJEBRCXL.js';
6
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
6
7
  import { Label } from './chunk-7PWBC4BY.js';
7
- import { useTranslation } from './chunk-32UNYHGY.js';
8
8
  import { cn } from './chunk-U7N2A7A3.js';
9
9
  import * as React from 'react';
10
10
  import { useState, useEffect } from 'react';
@@ -1,6 +1,6 @@
1
1
  import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-UX634MYF.js';
2
2
  import { Button } from './chunk-HJEBRCXL.js';
3
- import { useTranslation } from './chunk-32UNYHGY.js';
3
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
4
4
  import { cn } from './chunk-U7N2A7A3.js';
5
5
  import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,8 +1,8 @@
1
- import { Inline, densityClass } from './chunk-S66TJXJU.js';
2
1
  import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-ZS6DTAM2.js';
3
2
  import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass, toneNeutralClass, toneInfoClass, toneDestructiveClass, toneWarningClass, toneSuccessClass } from './chunk-ICM6XBST.js';
3
+ import { Inline, densityClass } from './chunk-S66TJXJU.js';
4
4
  import { Button } from './chunk-HJEBRCXL.js';
5
- import { useTranslation } from './chunk-32UNYHGY.js';
5
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
8
  import { Layers, Layers2, ArrowUp, ArrowDown, ChevronsUpDown, MoreHorizontal, XCircle, Pause, CheckCircle2, Circle, Trash2, AlertCircle, Clock, Play } from 'lucide-react';
@@ -1,8 +1,8 @@
1
- import { Input } from './chunk-VOHTRR5X.js';
2
1
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
2
+ import { Input } from './chunk-VOHTRR5X.js';
3
3
  import { Button } from './chunk-HJEBRCXL.js';
4
- import { useTranslation } from './chunk-32UNYHGY.js';
5
- import { isValidHhmm, formatTimeOfDay, normalizeHhmm } from './chunk-7OTWYSVX.js';
4
+ import { useTranslation } from './chunk-EYLUVDHJ.js';
5
+ import { normalizeHhmm, isValidHhmm } from './chunk-6BJ2X7PA.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import * as React from 'react';
8
8
  import { Clock } from 'lucide-react';
@@ -138,6 +138,7 @@ function TimePicker({
138
138
  disabled,
139
139
  className,
140
140
  id,
141
+ name,
141
142
  minuteStep = 5
142
143
  }) {
143
144
  const { t } = useTranslation();
@@ -145,42 +146,70 @@ function TimePicker({
145
146
  const [internal, setInternal] = React.useState(defaultValue ?? "");
146
147
  const isControlled = controlledValue !== void 0;
147
148
  const value = isControlled ? controlledValue : internal;
148
- const resolvedPlaceholder = placeholder ?? t("dataEntry.timePicker.placeholder");
149
+ const resolvedPlaceholder = placeholder ?? t("dataEntry.timePicker.placeholder") ?? "hh:mm";
150
+ const [text, setText] = React.useState(value);
151
+ React.useEffect(() => {
152
+ setText(value);
153
+ }, [value]);
149
154
  const setValue = (next) => {
150
155
  if (!isControlled) setInternal(next);
151
156
  onChange?.(next);
152
157
  };
153
- const display = value && isValidHhmm(value) ? formatTimeOfDay(value) : value || null;
154
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
155
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
156
- Button,
158
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
159
+ /* @__PURE__ */ jsx(
160
+ Input,
157
161
  {
158
162
  id,
159
- type: "button",
160
- variant: "outline",
163
+ name,
164
+ value: text,
161
165
  disabled,
162
- className: cn(
163
- "w-full justify-start text-left font-normal tabular-nums",
164
- !display && "text-muted-foreground",
165
- className
166
- ),
167
- children: [
168
- /* @__PURE__ */ jsx(Clock, { className: "mr-2 size-4 shrink-0", "aria-hidden": "true" }),
169
- display ?? resolvedPlaceholder
170
- ]
171
- }
172
- ) }),
173
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
174
- TimePickerPanel,
175
- {
176
- value: value || "09:00",
177
- minuteStep,
178
- onChange: setValue,
179
- onDone: () => {
180
- setOpen(false);
166
+ placeholder: resolvedPlaceholder,
167
+ inputMode: "numeric",
168
+ autoComplete: "off",
169
+ role: "combobox",
170
+ "aria-expanded": open,
171
+ "aria-haspopup": "dialog",
172
+ className: "pr-10 tabular-nums",
173
+ onChange: (event) => {
174
+ setText(event.target.value);
175
+ const normalized = normalizeHhmm(event.target.value);
176
+ if (normalized) setValue(normalized);
177
+ },
178
+ onBlur: (event) => {
179
+ const normalized = normalizeHhmm(event.target.value);
180
+ setText(normalized ?? (isValidHhmm(value) ? value : ""));
181
181
  }
182
182
  }
183
- ) })
183
+ ),
184
+ /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
185
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
186
+ Button,
187
+ {
188
+ type: "button",
189
+ variant: "ghost",
190
+ size: "icon",
191
+ disabled,
192
+ tabIndex: -1,
193
+ "aria-label": t("dataEntry.timePicker.openPicker") ?? "Open time picker",
194
+ className: "text-muted-foreground absolute inset-y-0 right-0 h-full px-2 hover:bg-transparent",
195
+ children: /* @__PURE__ */ jsx(Clock, { className: "size-4 shrink-0", "aria-hidden": "true" })
196
+ }
197
+ ) }),
198
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "end", children: /* @__PURE__ */ jsx(
199
+ TimePickerPanel,
200
+ {
201
+ value: value || "09:00",
202
+ minuteStep,
203
+ onChange: (next) => {
204
+ setValue(next);
205
+ setText(next);
206
+ },
207
+ onDone: () => {
208
+ setOpen(false);
209
+ }
210
+ }
211
+ ) })
212
+ ] })
184
213
  ] });
185
214
  }
186
215