@godxjp/ui 6.8.0 → 6.10.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 (88) hide show
  1. package/dist/app/index.js +4 -4
  2. package/dist/{checkbox-CNP1MnPn.d.ts → checkbox-Vtb93W2X.d.ts} +1 -1
  3. package/dist/{chunk-GT2OGI2S.js → chunk-25ZZ2W3M.js} +3 -3
  4. package/dist/{chunk-LQGSZODY.js → chunk-2HLWHQJA.js} +1 -1
  5. package/dist/{chunk-WM5MKEOD.js → chunk-2QG3OVAD.js} +2 -2
  6. package/dist/{chunk-QT3T2HEI.js → chunk-43QSNZS3.js} +2 -2
  7. package/dist/{chunk-CJVXTCYD.js → chunk-4R7QL3MW.js} +1 -1
  8. package/dist/{chunk-RP3NH5QJ.js → chunk-6PWNLR2F.js} +1 -1
  9. package/dist/{chunk-Z33J65PB.js → chunk-6UFKWOEW.js} +2 -2
  10. package/dist/{chunk-6RA3KSVK.js → chunk-DTJKTRJS.js} +43 -1
  11. package/dist/{chunk-NKQKCA5W.js → chunk-EXBWDW5E.js} +3 -3
  12. package/dist/{chunk-TRVOPU4U.js → chunk-FXFJF4YA.js} +21 -0
  13. package/dist/{chunk-4VP24PAR.js → chunk-NTUHJ37K.js} +3 -3
  14. package/dist/{chunk-TCY4QONW.js → chunk-OI7TDPEJ.js} +2 -2
  15. package/dist/{chunk-NHD5XDMX.js → chunk-RLGHEV4A.js} +1 -1
  16. package/dist/{chunk-I2SHXSYY.js → chunk-TT2L7JM6.js} +2 -2
  17. package/dist/{chunk-J2T7IEFE.js → chunk-V7RC4PBY.js} +2 -2
  18. package/dist/{chunk-VM2IAY6N.js → chunk-VRSHUKDF.js} +2 -2
  19. package/dist/chunk-Y6JLEGVK.js +247 -0
  20. package/dist/{chunk-K6D7LQWC.js → chunk-ZKIAZDVU.js} +3 -3
  21. package/dist/{chunk-2WGV7GGO.js → chunk-ZR2TIBPG.js} +2 -2
  22. package/dist/components/admin/index.d.ts +10 -10
  23. package/dist/components/admin/index.js +22 -22
  24. package/dist/components/data-display/index.d.ts +3 -3
  25. package/dist/components/data-display/index.js +4 -4
  26. package/dist/components/data-entry/autocomplete.d.ts +10 -2
  27. package/dist/components/data-entry/autocomplete.js +4 -3
  28. package/dist/components/data-entry/calendar.d.ts +2 -1
  29. package/dist/components/data-entry/cascader.d.ts +2 -1
  30. package/dist/components/data-entry/cascader.js +4 -4
  31. package/dist/components/data-entry/checkbox.d.ts +3 -2
  32. package/dist/components/data-entry/color-picker.d.ts +2 -1
  33. package/dist/components/data-entry/color-picker.js +4 -4
  34. package/dist/components/data-entry/date-picker.d.ts +2 -1
  35. package/dist/components/data-entry/date-picker.js +4 -4
  36. package/dist/components/data-entry/date-range-picker.d.ts +2 -1
  37. package/dist/components/data-entry/date-range-picker.js +4 -4
  38. package/dist/components/data-entry/index.d.ts +16 -5
  39. package/dist/components/data-entry/index.js +18 -18
  40. package/dist/components/data-entry/radio.d.ts +2 -1
  41. package/dist/components/data-entry/slider.d.ts +2 -1
  42. package/dist/components/data-entry/switch.d.ts +2 -1
  43. package/dist/components/data-entry/time-picker.d.ts +2 -1
  44. package/dist/components/data-entry/time-picker.js +4 -4
  45. package/dist/components/data-entry/transfer.d.ts +3 -2
  46. package/dist/components/data-entry/transfer.js +4 -4
  47. package/dist/components/data-entry/tree-select.d.ts +2 -1
  48. package/dist/components/data-entry/tree-select.js +4 -4
  49. package/dist/components/data-entry/upload.d.ts +3 -2
  50. package/dist/components/data-entry/upload.js +6 -6
  51. package/dist/components/feedback/alert.d.ts +3 -3
  52. package/dist/components/feedback/alert.js +4 -4
  53. package/dist/components/feedback/dialog.d.ts +2 -2
  54. package/dist/components/feedback/dialog.js +3 -3
  55. package/dist/components/feedback/index.d.ts +4 -4
  56. package/dist/components/feedback/index.js +8 -8
  57. package/dist/components/layout/index.d.ts +6 -6
  58. package/dist/components/layout/index.js +3 -3
  59. package/dist/components/navigation/index.d.ts +4 -4
  60. package/dist/components/navigation/index.js +5 -5
  61. package/dist/components/navigation/pagination.js +3 -3
  62. package/dist/components/query/index.js +5 -5
  63. package/dist/components/ui/index.d.ts +4 -4
  64. package/dist/components/ui/index.js +20 -20
  65. package/dist/{content.prop-D1Dd3TAc.d.ts → content.prop-DrV_zDy-.d.ts} +3 -1
  66. package/dist/{data-display.prop-Cvi2Mrfw.d.ts → data-display.prop-i0iaSwMV.d.ts} +1 -1
  67. package/dist/{data-entry.prop-I3mgmdGm.d.ts → data-entry.prop-DGzBAJpn.d.ts} +62 -11
  68. package/dist/{data-table-CnRksymA.d.ts → data-table-Bg7fPpXy.d.ts} +1 -1
  69. package/dist/{feedback.prop-BmxUlpAW.d.ts → feedback.prop-BnBpUzNK.d.ts} +1 -1
  70. package/dist/{filter-bar-DNDVhpCE.d.ts → filter-bar-BpUvE_yO.d.ts} +1 -1
  71. package/dist/i18n/index.d.ts +7 -0
  72. package/dist/i18n/index.js +2 -2
  73. package/dist/index.d.ts +10 -10
  74. package/dist/index.js +22 -22
  75. package/dist/{inline-Bu_syXvi.d.ts → inline-CV3A46np.d.ts} +1 -1
  76. package/dist/{layout.prop-D3rD3uZq.d.ts → layout.prop-MwHm4-Zl.d.ts} +2 -2
  77. package/dist/lib/datetime/index.js +1 -1
  78. package/dist/{navigation.prop-DxBiClEH.d.ts → navigation.prop-Hu7s7MJa.d.ts} +1 -1
  79. package/dist/props/components/index.d.ts +6 -6
  80. package/dist/props/index.d.ts +6 -6
  81. package/dist/props/index.js +1 -1
  82. package/dist/props/registry.d.ts +28 -1
  83. package/dist/props/registry.js +1 -1
  84. package/dist/props/vocabulary/index.d.ts +2 -2
  85. package/dist/{search-input-JWJMFVqC.d.ts → search-input-CkFBczDV.d.ts} +1 -1
  86. package/package.json +1 -1
  87. package/dist/chunk-HGRRL34G.js +0 -81
  88. package/dist/{chunk-5OLTVEDN.js → chunk-X3OSXYAB.js} +2 -2
package/dist/app/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { useAppContext } from '../chunk-NHD5XDMX.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-NHD5XDMX.js';
3
- import { formatDate } from '../chunk-TRVOPU4U.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-TRVOPU4U.js';
1
+ import { useAppContext } from '../chunk-RLGHEV4A.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-RLGHEV4A.js';
3
+ import { formatDate } from '../chunk-FXFJF4YA.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-FXFJF4YA.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-I3mgmdGm.js';
4
+ import { c as CheckboxGroupProp } from './data-entry.prop-DGzBAJpn.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,9 +1,9 @@
1
1
  import { Calendar } from './chunk-IK7I3ABN.js';
2
- import { Input } from './chunk-VOHTRR5X.js';
3
2
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
+ import { Input } from './chunk-VOHTRR5X.js';
4
4
  import { Button } from './chunk-HJEBRCXL.js';
5
- import { useTranslation, usePickerLocales } from './chunk-NHD5XDMX.js';
6
- import { toIsoDate, parseDateInput } from './chunk-TRVOPU4U.js';
5
+ import { useTranslation, usePickerLocales } from './chunk-RLGHEV4A.js';
6
+ import { toIsoDate, parseDateInput } from './chunk-FXFJF4YA.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import * as React from 'react';
9
9
  import { CalendarIcon } from 'lucide-react';
@@ -1,7 +1,7 @@
1
1
  import { Input } from './chunk-VOHTRR5X.js';
2
2
  import { buttonVariants, Button } from './chunk-HJEBRCXL.js';
3
3
  import { Label } from './chunk-7PWBC4BY.js';
4
- import { useTranslation } from './chunk-NHD5XDMX.js';
4
+ import { useTranslation } from './chunk-RLGHEV4A.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';
@@ -1,6 +1,6 @@
1
- import { AlertQueryError } from './chunk-Z33J65PB.js';
1
+ import { AlertQueryError } from './chunk-6UFKWOEW.js';
2
2
  import { Button } from './chunk-HJEBRCXL.js';
3
- import { useTranslation } from './chunk-NHD5XDMX.js';
3
+ import { useTranslation } from './chunk-RLGHEV4A.js';
4
4
  import * as React from 'react';
5
5
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
6
6
  import { RefreshCw } 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-NHD5XDMX.js';
4
- import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-TRVOPU4U.js';
3
+ import { useTranslation, useOptionalAppContext, APP_LOCALES, resolveTimezonePickerOptions, getTimezoneLabel, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel } from './chunk-RLGHEV4A.js';
4
+ import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-FXFJF4YA.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,4 +1,4 @@
1
- import { formatDate, translateCurrent } from './chunk-TRVOPU4U.js';
1
+ import { formatDate, translateCurrent } from './chunk-FXFJF4YA.js';
2
2
 
3
3
  // src/lib/format.ts
4
4
  function formatDateTime(value, options) {
@@ -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-NHD5XDMX.js';
3
+ import { useTranslation } from './chunk-RLGHEV4A.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,7 +1,7 @@
1
- import { humanError } from './chunk-CJVXTCYD.js';
1
+ import { humanError } from './chunk-4R7QL3MW.js';
2
2
  import { Inline } from './chunk-S66TJXJU.js';
3
3
  import { Button } from './chunk-HJEBRCXL.js';
4
- import { useTranslation } from './chunk-NHD5XDMX.js';
4
+ import { useTranslation } from './chunk-RLGHEV4A.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';
@@ -138,6 +138,11 @@ var VOCABULARY_REGISTRY = {
138
138
  category: "content",
139
139
  description: "Toolbar actions slot"
140
140
  },
141
+ EmptyMessageProp: {
142
+ file: "vocabulary/content.prop.ts",
143
+ category: "content",
144
+ description: "No-results / no-data message in lists, selects, empty states"
145
+ },
141
146
  // layout.prop.ts
142
147
  PageDensityProp: {
143
148
  file: "vocabulary/layout.prop.ts",
@@ -411,7 +416,44 @@ var COMPONENT_PROP_REGISTRY = {
411
416
  AutocompleteProp: {
412
417
  group: "data-entry",
413
418
  file: "components/data-entry.prop.ts",
414
- vocabulary: ["PlaceholderProp", "ValueProp", "DisabledProp", "IdProp"]
419
+ vocabulary: [
420
+ "PlaceholderProp",
421
+ "ValueProp",
422
+ "DisabledProp",
423
+ "IdProp",
424
+ "EmptyMessageProp",
425
+ "ClassNameProp"
426
+ ],
427
+ note: "Deprecated \u2014 a thin wrapper over SearchSelect (static options)."
428
+ },
429
+ SearchSelectProp: {
430
+ group: "data-entry",
431
+ file: "components/data-entry.prop.ts",
432
+ vocabulary: [
433
+ "ValueProp",
434
+ "PlaceholderProp",
435
+ "EmptyMessageProp",
436
+ "DisabledProp",
437
+ "NameProp",
438
+ "IdProp",
439
+ "ClassNameProp"
440
+ ],
441
+ note: "Searchable single-select combobox (static `options` OR async `loadOptions`), optgroup grouping, custom `renderOption`. Supersedes Autocomplete."
442
+ },
443
+ SearchSelectOptionProp: {
444
+ group: "data-entry",
445
+ file: "components/data-entry.prop.ts",
446
+ vocabulary: []
447
+ },
448
+ SearchSelectLoadParamsProp: {
449
+ group: "data-entry",
450
+ file: "components/data-entry.prop.ts",
451
+ vocabulary: []
452
+ },
453
+ SearchSelectLoadResultProp: {
454
+ group: "data-entry",
455
+ file: "components/data-entry.prop.ts",
456
+ vocabulary: []
415
457
  },
416
458
  UploadProp: {
417
459
  group: "data-entry",
@@ -1,9 +1,9 @@
1
1
  import { Calendar } from './chunk-IK7I3ABN.js';
2
- import { Input } from './chunk-VOHTRR5X.js';
3
2
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
+ import { Input } from './chunk-VOHTRR5X.js';
4
4
  import { Button } from './chunk-HJEBRCXL.js';
5
- import { useTranslation, usePickerLocales } from './chunk-NHD5XDMX.js';
6
- import { toIsoDate, parseDateInput } from './chunk-TRVOPU4U.js';
5
+ import { useTranslation, usePickerLocales } from './chunk-RLGHEV4A.js';
6
+ import { toIsoDate, parseDateInput } from './chunk-FXFJF4YA.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import * as React from 'react';
9
9
  import { CalendarIcon } from 'lucide-react';
@@ -132,6 +132,13 @@ var en_default = {
132
132
  empty: "No data",
133
133
  moveRight: "Move to target",
134
134
  moveLeft: "Move to source"
135
+ },
136
+ searchSelect: {
137
+ placeholder: "Select\u2026",
138
+ search: "Search",
139
+ clear: "Clear selection",
140
+ loading: "Loading\u2026",
141
+ empty: "No results"
135
142
  }
136
143
  },
137
144
  feedback: {
@@ -312,6 +319,13 @@ var ja_default = {
312
319
  empty: "\u30C7\u30FC\u30BF\u306A\u3057",
313
320
  moveRight: "\u30BF\u30FC\u30B2\u30C3\u30C8\u3078\u79FB\u52D5",
314
321
  moveLeft: "\u30BD\u30FC\u30B9\u3078\u623B\u3059"
322
+ },
323
+ searchSelect: {
324
+ placeholder: "\u9078\u629E\u2026",
325
+ search: "\u691C\u7D22",
326
+ clear: "\u9078\u629E\u3092\u30AF\u30EA\u30A2",
327
+ loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",
328
+ empty: "\u8A72\u5F53\u306A\u3057"
315
329
  }
316
330
  },
317
331
  feedback: {
@@ -492,6 +506,13 @@ var vi_default = {
492
506
  empty: "Kh\xF4ng c\xF3 d\u1EEF li\u1EC7u",
493
507
  moveRight: "Chuy\u1EC3n sang \u0111\xEDch",
494
508
  moveLeft: "Chuy\u1EC3n v\u1EC1 ngu\u1ED3n"
509
+ },
510
+ searchSelect: {
511
+ placeholder: "Ch\u1ECDn\u2026",
512
+ search: "T\xECm ki\u1EBFm",
513
+ clear: "X\xF3a l\u1EF1a ch\u1ECDn",
514
+ loading: "\u0110ang t\u1EA3i\u2026",
515
+ empty: "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3"
495
516
  }
496
517
  },
497
518
  feedback: {
@@ -1,9 +1,9 @@
1
- import { formatBytes } from './chunk-CJVXTCYD.js';
2
- import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-LQGSZODY.js';
3
1
  import { Slider } from './chunk-CRERCLIZ.js';
4
2
  import { controlIconClass } from './chunk-ICM6XBST.js';
3
+ import { formatBytes } from './chunk-4R7QL3MW.js';
4
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-2HLWHQJA.js';
5
5
  import { Button } from './chunk-HJEBRCXL.js';
6
- import { useTranslation } from './chunk-NHD5XDMX.js';
6
+ import { useTranslation } from './chunk-RLGHEV4A.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import * as React2 from 'react';
9
9
  import { Upload as Upload$1, ImagePlus, Camera, Trash2, RotateCcw, X } from 'lucide-react';
@@ -1,8 +1,8 @@
1
- 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-NHD5XDMX.js';
5
+ import { useTranslation } from './chunk-RLGHEV4A.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,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-TRVOPU4U.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-FXFJF4YA.js';
2
2
  import * as React from 'react';
3
3
  import { useMemo } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { Input } from './chunk-VOHTRR5X.js';
2
1
  import { controlIconClass } from './chunk-ICM6XBST.js';
3
- import { useTranslation } from './chunk-NHD5XDMX.js';
2
+ import { Input } from './chunk-VOHTRR5X.js';
3
+ import { useTranslation } from './chunk-RLGHEV4A.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,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-NHD5XDMX.js';
7
+ import { useTranslation } from './chunk-RLGHEV4A.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,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-NHD5XDMX.js';
7
+ import { useTranslation } from './chunk-RLGHEV4A.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';
@@ -0,0 +1,247 @@
1
+ import { Command, CommandList, CommandItem, CommandGroup } from './chunk-V6UWJKZF.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 } from './chunk-RLGHEV4A.js';
6
+ import { cn } from './chunk-U7N2A7A3.js';
7
+ import * as React from 'react';
8
+ import { ChevronsUpDown, Check, Loader2 } from 'lucide-react';
9
+ import { jsxs, jsx } from 'react/jsx-runtime';
10
+
11
+ var DEBOUNCE_MS = 250;
12
+ function SearchSelect({
13
+ value = "",
14
+ onChange,
15
+ options: staticOptions,
16
+ loadOptions,
17
+ renderOption,
18
+ selectedLabel,
19
+ placeholder,
20
+ searchPlaceholder,
21
+ emptyMessage,
22
+ loadingMessage,
23
+ clearLabel,
24
+ clearable = true,
25
+ disabled = false,
26
+ name,
27
+ id,
28
+ className,
29
+ "data-testid": dataTestId
30
+ }) {
31
+ const { t } = useTranslation();
32
+ const [open, setOpen] = React.useState(false);
33
+ const [query, setQuery] = React.useState("");
34
+ const [debouncedQuery, setDebouncedQuery] = React.useState("");
35
+ const [loaded, setLoaded] = React.useState([]);
36
+ const [page, setPage] = React.useState(1);
37
+ const [hasMore, setHasMore] = React.useState(false);
38
+ const [loading, setLoading] = React.useState(false);
39
+ const [activeIndex, setActiveIndex] = React.useState(0);
40
+ const [picked, setPicked] = React.useState(null);
41
+ const reqId = React.useRef(0);
42
+ const resolvedLoad = React.useMemo(
43
+ () => loadOptions ?? (async ({ query: search }) => {
44
+ const needle = search.trim().toLowerCase();
45
+ const list = staticOptions ?? [];
46
+ return {
47
+ options: needle ? list.filter(
48
+ (option) => option.label.toLowerCase().includes(needle) || option.value.toLowerCase().includes(needle)
49
+ ) : list,
50
+ hasMore: false
51
+ };
52
+ }),
53
+ [loadOptions, staticOptions]
54
+ );
55
+ React.useEffect(() => {
56
+ const handle = window.setTimeout(() => setDebouncedQuery(query.trim()), DEBOUNCE_MS);
57
+ return () => window.clearTimeout(handle);
58
+ }, [query]);
59
+ const fetchPage = React.useCallback(
60
+ async (nextPage, search, append) => {
61
+ const ticket = ++reqId.current;
62
+ setLoading(true);
63
+ try {
64
+ const result = await resolvedLoad({ query: search, page: nextPage });
65
+ if (ticket !== reqId.current) return;
66
+ setLoaded((prev) => append ? [...prev, ...result.options] : result.options);
67
+ setHasMore(Boolean(result.hasMore));
68
+ setPage(nextPage);
69
+ } finally {
70
+ if (ticket === reqId.current) setLoading(false);
71
+ }
72
+ },
73
+ [resolvedLoad]
74
+ );
75
+ React.useEffect(() => {
76
+ if (!open) return;
77
+ setActiveIndex(0);
78
+ void fetchPage(1, debouncedQuery, false);
79
+ }, [open, debouncedQuery, fetchPage]);
80
+ const grouped = React.useMemo(() => {
81
+ const order = [];
82
+ const buckets = /* @__PURE__ */ new Map();
83
+ for (const option of loaded) {
84
+ const key = option.group ?? "";
85
+ if (!buckets.has(key)) {
86
+ buckets.set(key, []);
87
+ order.push(key);
88
+ }
89
+ buckets.get(key).push(option);
90
+ }
91
+ let flatIndex = 0;
92
+ return order.map((key) => ({
93
+ heading: key || void 0,
94
+ items: (buckets.get(key) ?? []).map((option) => ({ option, index: flatIndex++ }))
95
+ }));
96
+ }, [loaded]);
97
+ const flatOrdered = React.useMemo(
98
+ () => grouped.flatMap((group) => group.items.map((entry) => entry.option)),
99
+ [grouped]
100
+ );
101
+ const resolvedPlaceholder = placeholder ?? t("dataEntry.searchSelect.placeholder");
102
+ const currentLabel = value ? picked?.label ?? selectedLabel ?? resolvedPlaceholder : resolvedPlaceholder;
103
+ const select = (option) => {
104
+ if (option.disabled) return;
105
+ setPicked(option);
106
+ onChange?.(option.value, option);
107
+ setOpen(false);
108
+ };
109
+ const clear = () => {
110
+ setPicked(null);
111
+ onChange?.("", void 0);
112
+ setOpen(false);
113
+ };
114
+ const onScroll = (event) => {
115
+ const el = event.currentTarget;
116
+ if (el.scrollHeight - el.scrollTop - el.clientHeight < 48 && hasMore && !loading) {
117
+ void fetchPage(page + 1, debouncedQuery, true);
118
+ }
119
+ };
120
+ const onKeyDown = (event) => {
121
+ if (event.key === "ArrowDown") {
122
+ event.preventDefault();
123
+ setActiveIndex((i) => Math.min(i + 1, Math.max(flatOrdered.length - 1, 0)));
124
+ } else if (event.key === "ArrowUp") {
125
+ event.preventDefault();
126
+ setActiveIndex((i) => Math.max(i - 1, 0));
127
+ } else if (event.key === "Enter" && flatOrdered[activeIndex]) {
128
+ event.preventDefault();
129
+ select(flatOrdered[activeIndex]);
130
+ } else if (event.key === "Escape") {
131
+ event.preventDefault();
132
+ setOpen(false);
133
+ }
134
+ };
135
+ const optionTestId = (optionValue) => dataTestId ? `${dataTestId}-option-${optionValue}` : void 0;
136
+ return /* @__PURE__ */ jsxs(
137
+ Popover,
138
+ {
139
+ open,
140
+ onOpenChange: (next) => {
141
+ setOpen(next);
142
+ if (!next) setQuery("");
143
+ },
144
+ children: [
145
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
146
+ Button,
147
+ {
148
+ id,
149
+ type: "button",
150
+ variant: "outline",
151
+ role: "combobox",
152
+ "aria-expanded": open,
153
+ disabled,
154
+ "data-testid": dataTestId,
155
+ className: cn("w-full justify-between font-normal", className),
156
+ children: [
157
+ /* @__PURE__ */ jsx("span", { className: cn("truncate text-left", !value && "text-muted-foreground"), children: currentLabel }),
158
+ /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 size-4 shrink-0 opacity-50", "aria-hidden": "true" })
159
+ ]
160
+ }
161
+ ) }),
162
+ name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value }) : null,
163
+ /* @__PURE__ */ jsx(
164
+ PopoverContent,
165
+ {
166
+ align: "start",
167
+ sideOffset: 4,
168
+ collisionPadding: 12,
169
+ className: "flex max-h-[min(24rem,var(--radix-popover-content-available-height))] w-max max-w-[min(32rem,calc(100vw-1.5rem))] min-w-[var(--radix-popover-trigger-width)] flex-col p-0",
170
+ children: /* @__PURE__ */ jsxs(Command, { shouldFilter: false, className: "flex min-h-0 flex-col", children: [
171
+ /* @__PURE__ */ jsx("div", { className: "border-border shrink-0 border-b p-2", children: /* @__PURE__ */ jsx(
172
+ Input,
173
+ {
174
+ autoFocus: true,
175
+ value: query,
176
+ onChange: (event) => setQuery(event.target.value),
177
+ onKeyDown,
178
+ placeholder: searchPlaceholder ?? t("dataEntry.searchSelect.search")
179
+ }
180
+ ) }),
181
+ /* @__PURE__ */ jsxs(CommandList, { className: "min-h-0 flex-1 overflow-y-auto p-1", onScroll, children: [
182
+ clearable && value ? /* @__PURE__ */ jsx(CommandItem, { value: "", "data-testid": optionTestId("none"), onSelect: clear, children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-sm", children: clearLabel ?? t("dataEntry.searchSelect.clear") }) }) : null,
183
+ grouped.map((group) => {
184
+ const rows = group.items.map(({ option, index }) => /* @__PURE__ */ jsxs(
185
+ CommandItem,
186
+ {
187
+ value: option.value,
188
+ "data-testid": optionTestId(option.value),
189
+ "aria-selected": activeIndex === index,
190
+ disabled: option.disabled,
191
+ className: activeIndex === index ? "bg-accent text-accent-foreground" : void 0,
192
+ onMouseEnter: () => setActiveIndex(index),
193
+ onSelect: () => select(option),
194
+ children: [
195
+ renderOption ? /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: renderOption(option) }) : /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
196
+ /* @__PURE__ */ jsx("span", { className: "truncate text-sm", children: option.label }),
197
+ option.sublabel ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground truncate text-xs", children: option.sublabel }) : null
198
+ ] }),
199
+ value === option.value ? /* @__PURE__ */ jsx(Check, { className: "text-primary size-4 shrink-0", "aria-hidden": "true" }) : null
200
+ ]
201
+ },
202
+ option.value
203
+ ));
204
+ return group.heading ? /* @__PURE__ */ jsx(CommandGroup, { heading: group.heading, children: rows }, group.heading) : /* @__PURE__ */ jsx(React.Fragment, { children: rows }, "__ungrouped");
205
+ }),
206
+ loading ? /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-center gap-2 px-2 py-3 text-sm", children: [
207
+ /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" }),
208
+ loadingMessage ?? t("dataEntry.searchSelect.loading")
209
+ ] }) : null,
210
+ !loading && loaded.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-muted-foreground px-2 py-6 text-center text-sm", children: emptyMessage ?? t("dataEntry.searchSelect.empty") }) : null
211
+ ] })
212
+ ] })
213
+ }
214
+ )
215
+ ]
216
+ }
217
+ );
218
+ }
219
+ function Autocomplete({
220
+ options,
221
+ value,
222
+ onValueChange,
223
+ placeholder,
224
+ searchPlaceholder,
225
+ emptyMessage,
226
+ disabled,
227
+ className,
228
+ id
229
+ }) {
230
+ return /* @__PURE__ */ jsx(
231
+ SearchSelect,
232
+ {
233
+ id,
234
+ value,
235
+ onChange: (next) => onValueChange?.(next),
236
+ options,
237
+ clearable: false,
238
+ placeholder,
239
+ searchPlaceholder,
240
+ emptyMessage,
241
+ disabled,
242
+ className
243
+ }
244
+ );
245
+ }
246
+
247
+ export { Autocomplete, SearchSelect };
@@ -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-NHD5XDMX.js';
5
- import { normalizeHhmm, isValidHhmm } from './chunk-TRVOPU4U.js';
4
+ import { useTranslation } from './chunk-RLGHEV4A.js';
5
+ import { normalizeHhmm, isValidHhmm } from './chunk-FXFJF4YA.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import * as React from 'react';
8
8
  import { Clock } from 'lucide-react';
@@ -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
6
  import { Label } from './chunk-7PWBC4BY.js';
7
- import { useTranslation } from './chunk-NHD5XDMX.js';
7
+ import { useTranslation } from './chunk-RLGHEV4A.js';
8
8
  import { cn } from './chunk-U7N2A7A3.js';
9
9
  import * as React from 'react';
10
10
  import { useState, useEffect } from 'react';
@@ -1,9 +1,9 @@
1
- export { B as BreadcrumbItem } from '../../navigation.prop-DxBiClEH.js';
2
- export { I as InlineProp, P as PageContainerProp, P as PageContainerProps, a as PageHeaderProp, f as StackProp } from '../../layout.prop-D3rD3uZq.js';
3
- export { F as FilterBar, a as FilterGroup, P as PageHeader } from '../../filter-bar-DNDVhpCE.js';
4
- export { I as Inline, P as PageContainer, S as Stack } from '../../inline-Bu_syXvi.js';
5
- export { C as ColumnDef, D as DataTable, a as Density, E as EmptyState, K as KeyValueGrid, S as StatusBadge } from '../../data-table-CnRksymA.js';
6
- export { F as FormField, S as SearchInput } from '../../search-input-JWJMFVqC.js';
1
+ export { B as BreadcrumbItem } from '../../navigation.prop-Hu7s7MJa.js';
2
+ export { I as InlineProp, P as PageContainerProp, P as PageContainerProps, a as PageHeaderProp, f as StackProp } from '../../layout.prop-MwHm4-Zl.js';
3
+ export { F as FilterBar, a as FilterGroup, P as PageHeader } from '../../filter-bar-BpUvE_yO.js';
4
+ export { I as Inline, P as PageContainer, S as Stack } from '../../inline-CV3A46np.js';
5
+ export { C as ColumnDef, D as DataTable, a as Density, E as EmptyState, K as KeyValueGrid, S as StatusBadge } from '../../data-table-Bg7fPpXy.js';
6
+ export { F as FormField, S as SearchInput } from '../../search-input-CkFBczDV.js';
7
7
  export { L as LegacyToastOptions, S as SkeletonCard, a as SkeletonDetail, b as SkeletonRows, c as SkeletonTable, t as toast, u as useToast } from '../../use-toast-Dol5bdY3.js';
8
8
  export { DataState, InfiniteQueryState, MutationFeedback, PrefetchLink, QueryRefetchButton, flattenItemPages } from '../query/index.js';
9
9
  export { Alert, AlertActions, AlertContent, AlertDescription, AlertQueryError, AlertTitle } from '../feedback/alert.js';
@@ -19,23 +19,23 @@ export { Dialog, DialogConfirm, DialogContent, DialogDescription, DialogFooter,
19
19
  export { Toaster } from '../feedback/sonner.js';
20
20
  import { b as FormatDatetimeOptions, a as FormatDateOptions } from '../../format-date-ByyZoqI5.js';
21
21
  export { j as formatDate } from '../../format-date-ByyZoqI5.js';
22
- export { B as collectUploadCommitActions, E as createUploadItem } from '../../data-entry.prop-I3mgmdGm.js';
22
+ export { J as collectUploadCommitActions, K as createUploadItem } from '../../data-entry.prop-DGzBAJpn.js';
23
23
  import '../../shared.prop-BNRJc9K0.js';
24
24
  import 'react';
25
- import '../../content.prop-D1Dd3TAc.js';
25
+ import '../../content.prop-DrV_zDy-.js';
26
26
  import '../../layout.prop-4TCNvyQZ.js';
27
27
  import 'react/jsx-runtime';
28
28
  import '../../navigation.prop-Ck5_gSfs.js';
29
29
  import '../../data.prop-BmLaGLb7.js';
30
30
  import '../../interaction.prop-Cdn7wOtq.js';
31
- import '../../data-display.prop-Cvi2Mrfw.js';
31
+ import '../../data-display.prop-i0iaSwMV.js';
32
32
  import 'lucide-react';
33
33
  import 'sonner';
34
34
  import '../../query.prop-hIPrk2zI.js';
35
35
  import '@tanstack/react-query';
36
36
  import 'react-router-dom';
37
37
  import '../../general.prop-D7brMPNL.js';
38
- import '../../feedback.prop-BmxUlpAW.js';
38
+ import '../../feedback.prop-BnBpUzNK.js';
39
39
  import '@radix-ui/react-checkbox';
40
40
  import '@radix-ui/react-radio-group';
41
41
  import '@radix-ui/react-slider';