@godxjp/ui 7.0.0 → 8.0.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 (154) hide show
  1. package/dist/app/index.d.ts +2 -2
  2. package/dist/{app.prop-IobwLwaM.d.ts → app.prop-DnIXFzLi.d.ts} +9 -9
  3. package/dist/{checkbox-CK2mYEpD.d.ts → checkbox-ChRsR7Nk.d.ts} +2 -2
  4. package/dist/{chunk-3UGU5TYP.js → chunk-25RYBC5T.js} +2 -2
  5. package/dist/{chunk-CQBADMFG.js → chunk-26CPAKUP.js} +3 -2
  6. package/dist/{chunk-TT2L7JM6.js → chunk-3TS3G4U3.js} +3 -3
  7. package/dist/{chunk-ZS6DTAM2.js → chunk-4MMIMZMK.js} +1 -1
  8. package/dist/{chunk-6TSU4IHV.js → chunk-4R7RQDXI.js} +23 -21
  9. package/dist/{chunk-OXKY5QMK.js → chunk-6QXQQAOQ.js} +6 -6
  10. package/dist/{chunk-JJCGMCTL.js → chunk-A22MCA3X.js} +6 -6
  11. package/dist/{chunk-VXXKR5U4.js → chunk-A7PKMT7Y.js} +4 -4
  12. package/dist/{chunk-HKQITNB3.js → chunk-AINW5WYN.js} +5 -4
  13. package/dist/{chunk-OGFWIXRO.js → chunk-C5H655GK.js} +218 -53
  14. package/dist/{chunk-ZLK5SPT6.js → chunk-EOTOCNT7.js} +1 -1
  15. package/dist/{chunk-ARDVPIF4.js → chunk-G2WYOCDL.js} +5 -5
  16. package/dist/chunk-HKD6ERY7.js +1 -0
  17. package/dist/{chunk-V6UWJKZF.js → chunk-HTEL5DQI.js} +1 -1
  18. package/dist/{chunk-ICM6XBST.js → chunk-IBK5D2Q6.js} +2 -1
  19. package/dist/{chunk-IK7I3ABN.js → chunk-IOGU3ZWF.js} +2 -2
  20. package/dist/{chunk-HJEBRCXL.js → chunk-M4PZNAMV.js} +1 -0
  21. package/dist/{chunk-2QG3OVAD.js → chunk-N43OKOFT.js} +7 -5
  22. package/dist/{chunk-ZR2TIBPG.js → chunk-NG23LVTM.js} +4 -4
  23. package/dist/{chunk-E76QIYSY.js → chunk-O24Z3ULJ.js} +4 -4
  24. package/dist/{chunk-L6J44O74.js → chunk-OJZ6C2HM.js} +2 -2
  25. package/dist/{chunk-2HLWHQJA.js → chunk-P4HFJQID.js} +5 -4
  26. package/dist/{chunk-EXBWDW5E.js → chunk-RGIYKJPW.js} +7 -7
  27. package/dist/{chunk-ZKIAZDVU.js → chunk-RGPF3HU6.js} +4 -4
  28. package/dist/{chunk-FBHN6OO4.js → chunk-SKIRU7GC.js} +2 -2
  29. package/dist/chunk-TILFZBTE.js +50 -0
  30. package/dist/{chunk-6UFKWOEW.js → chunk-TMDGV4CN.js} +15 -11
  31. package/dist/{chunk-7AMHT5Z5.js → chunk-UIYEAUWA.js} +30 -13
  32. package/dist/{chunk-25ZZ2W3M.js → chunk-WN52SCGE.js} +5 -5
  33. package/dist/{chunk-EQRQM6RF.js → chunk-WTVLZVBA.js} +28 -8
  34. package/dist/{chunk-Y3XBNUTD.js → chunk-XDUZ7JJL.js} +2 -2
  35. package/dist/chunk-XMBCNMJI.js +61 -0
  36. package/dist/{chunk-RVY4F7LK.js → chunk-XZM2GNAY.js} +7 -7
  37. package/dist/{chunk-NTUHJ37K.js → chunk-Z6HNY2PL.js} +9 -9
  38. package/dist/components/admin/index.d.ts +19 -19
  39. package/dist/components/admin/index.js +30 -30
  40. package/dist/components/data-display/badge.d.ts +7 -4
  41. package/dist/components/data-display/badge.js +2 -2
  42. package/dist/components/data-display/card.d.ts +2 -2
  43. package/dist/components/data-display/index.d.ts +6 -6
  44. package/dist/components/data-display/index.js +8 -8
  45. package/dist/components/data-display/table.js +2 -2
  46. package/dist/components/data-entry/autocomplete.d.ts +5 -5
  47. package/dist/components/data-entry/autocomplete.js +6 -6
  48. package/dist/components/data-entry/calendar.d.ts +5 -5
  49. package/dist/components/data-entry/calendar.js +3 -3
  50. package/dist/components/data-entry/cascader.d.ts +6 -6
  51. package/dist/components/data-entry/cascader.js +7 -7
  52. package/dist/components/data-entry/checkbox.d.ts +6 -6
  53. package/dist/components/data-entry/checkbox.js +2 -2
  54. package/dist/components/data-entry/color-picker.d.ts +6 -6
  55. package/dist/components/data-entry/color-picker.js +2 -2
  56. package/dist/components/data-entry/command.d.ts +11 -11
  57. package/dist/components/data-entry/command.js +2 -2
  58. package/dist/components/data-entry/date-picker.d.ts +6 -6
  59. package/dist/components/data-entry/date-picker.js +5 -5
  60. package/dist/components/data-entry/date-range-picker.d.ts +6 -6
  61. package/dist/components/data-entry/date-range-picker.js +5 -5
  62. package/dist/components/data-entry/index.d.ts +11 -21
  63. package/dist/components/data-entry/index.js +25 -83
  64. package/dist/components/data-entry/radio.d.ts +5 -5
  65. package/dist/components/data-entry/radio.js +2 -2
  66. package/dist/components/data-entry/select.d.ts +5 -5
  67. package/dist/components/data-entry/select.js +6 -6
  68. package/dist/components/data-entry/slider.d.ts +5 -5
  69. package/dist/components/data-entry/switch.d.ts +5 -5
  70. package/dist/components/data-entry/textarea.js +2 -2
  71. package/dist/components/data-entry/time-picker.d.ts +6 -6
  72. package/dist/components/data-entry/time-picker.js +3 -3
  73. package/dist/components/data-entry/transfer.d.ts +7 -7
  74. package/dist/components/data-entry/transfer.js +4 -4
  75. package/dist/components/data-entry/tree-select.d.ts +6 -6
  76. package/dist/components/data-entry/tree-select.js +7 -7
  77. package/dist/components/data-entry/upload.d.ts +7 -7
  78. package/dist/components/data-entry/upload.js +5 -5
  79. package/dist/components/feedback/alert.d.ts +7 -5
  80. package/dist/components/feedback/alert.js +3 -3
  81. package/dist/components/feedback/dialog.d.ts +9 -6
  82. package/dist/components/feedback/dialog.js +2 -2
  83. package/dist/components/feedback/index.d.ts +6 -6
  84. package/dist/components/feedback/index.js +7 -6
  85. package/dist/components/general/button.d.ts +4 -4
  86. package/dist/components/general/button.js +1 -1
  87. package/dist/components/general/index.d.ts +3 -3
  88. package/dist/components/general/index.js +1 -1
  89. package/dist/components/layout/index.d.ts +10 -9
  90. package/dist/components/layout/index.js +3 -3
  91. package/dist/components/navigation/index.d.ts +13 -13
  92. package/dist/components/navigation/index.js +10 -10
  93. package/dist/components/navigation/pagination.d.ts +5 -5
  94. package/dist/components/navigation/pagination.js +7 -7
  95. package/dist/components/navigation/steps.d.ts +6 -6
  96. package/dist/components/navigation/steps.js +2 -2
  97. package/dist/components/query/index.d.ts +12 -7
  98. package/dist/components/query/index.js +4 -4
  99. package/dist/components/ui/index.d.ts +12 -12
  100. package/dist/components/ui/index.js +30 -30
  101. package/dist/{data-display.prop-CXP9Jfdn.d.ts → data-display.prop-Cf2p9QC4.d.ts} +6 -5
  102. package/dist/{data-entry.prop-CpSx5dX6.d.ts → data-entry.prop-CDkOajPj.d.ts} +38 -28
  103. package/dist/{data-table-C5lcmAwE.d.ts → data-table-B_q7j992.d.ts} +4 -4
  104. package/dist/{data.prop-BmLaGLb7.d.ts → data.prop-DMYMNl6L.d.ts} +2 -2
  105. package/dist/{feedback.prop-BnBpUzNK.d.ts → feedback.prop-BR5JOpPl.d.ts} +8 -5
  106. package/dist/filter-bar-DvVXm_d1.d.ts +14 -0
  107. package/dist/form/index.d.ts +3 -3
  108. package/dist/{form.prop-BHgpuFFm.d.ts → form.prop-Bc6r6JJW.d.ts} +1 -1
  109. package/dist/{general.prop-D7brMPNL.d.ts → general.prop-DoHDCRmL.d.ts} +2 -2
  110. package/dist/index.d.ts +22 -22
  111. package/dist/index.js +43 -30
  112. package/dist/inline-DqfYlGKj.d.ts +18 -0
  113. package/dist/{interaction.prop-Cdn7wOtq.d.ts → interaction.prop-DSFizzP6.d.ts} +8 -6
  114. package/dist/{layout.prop-MwHm4-Zl.d.ts → layout.prop-Baq9muDN.d.ts} +27 -13
  115. package/dist/layout.prop-CXvl2rVR.d.ts +16 -0
  116. package/dist/{navigation.prop-DAH4ysXj.d.ts → navigation.prop-8DgElO0c.d.ts} +12 -8
  117. package/dist/{navigation.prop-Hu7s7MJa.d.ts → navigation.prop-BKlxd-j7.d.ts} +2 -5
  118. package/dist/props/components/index.d.ts +14 -14
  119. package/dist/props/index.d.ts +14 -14
  120. package/dist/props/index.js +2 -2
  121. package/dist/props/registry.d.ts +251 -56
  122. package/dist/props/registry.js +1 -1
  123. package/dist/props/vocabulary/index.d.ts +5 -5
  124. package/dist/{query.prop-hIPrk2zI.d.ts → query.prop-DuODxsiU.d.ts} +12 -8
  125. package/dist/{search-input-rR2XDrjv.d.ts → search-input-cezAxpgb.d.ts} +7 -2
  126. package/dist/{shared.prop-BNRJc9K0.d.ts → shared.prop-BsNSXeqD.d.ts} +9 -3
  127. package/dist/{skeleton-CqFO4dRc.d.ts → skeleton-uWAjSacg.d.ts} +4 -2
  128. package/dist/styles/alert-layout.css +38 -18
  129. package/dist/styles/badge-layout.css +2 -2
  130. package/dist/styles/card-layout.css +5 -5
  131. package/dist/styles/density.css +10 -10
  132. package/dist/styles/dialog-layout.css +4 -4
  133. package/dist/styles/index.css +6 -9
  134. package/dist/styles/layout.css +95 -14
  135. package/dist/styles/table-layout.css +3 -3
  136. package/dist/theme/example.service.css +0 -5
  137. package/dist/tokens/base.css +7 -7
  138. package/dist/tokens/components/badge.css +7 -0
  139. package/dist/tokens/{primitives → components}/card.css +2 -3
  140. package/dist/tokens/{primitives → components}/control.css +10 -0
  141. package/dist/tokens/components/feedback.css +17 -0
  142. package/dist/tokens/{primitives → components}/table.css +2 -2
  143. package/dist/tokens/foundation.css +7 -22
  144. package/package.json +5 -3
  145. package/scripts/ui-audit.mjs +22 -0
  146. package/dist/chunk-S66TJXJU.js +0 -33
  147. package/dist/filter-bar-zSKz7YCR.d.ts +0 -10
  148. package/dist/inline-CV3A46np.d.ts +0 -10
  149. package/dist/layout.prop-4TCNvyQZ.d.ts +0 -20
  150. package/dist/tokens/primitives/badge.css +0 -13
  151. package/dist/tokens/primitives/feedback.css +0 -17
  152. /package/dist/{chunk-LDSLS6HE.js → chunk-2H65B4JA.js} +0 -0
  153. /package/dist/tokens/{primitives → components}/navigation.css +0 -0
  154. /package/dist/tokens/{primitives → semantic}/layout.css +0 -0
@@ -1,8 +1,8 @@
1
1
  import { reactNodeText } from './chunk-SMLKNECP.js';
2
- import { Checkbox } from './chunk-E76QIYSY.js';
2
+ import { Checkbox } from './chunk-O24Z3ULJ.js';
3
3
  import { ScrollArea } from './chunk-3KPEZ5CF.js';
4
4
  import { Input } from './chunk-VOHTRR5X.js';
5
- import { Button } from './chunk-HJEBRCXL.js';
5
+ import { Button } from './chunk-M4PZNAMV.js';
6
6
  import { Label } from './chunk-7PWBC4BY.js';
7
7
  import { useTranslation } from './chunk-RLGHEV4A.js';
8
8
  import { cn } from './chunk-U7N2A7A3.js';
@@ -205,7 +205,7 @@ function TransferPanel({
205
205
  function Transfer({
206
206
  dataSource,
207
207
  targetKeys,
208
- onChange,
208
+ onValueChange,
209
209
  titles,
210
210
  showSearch,
211
211
  oneWay,
@@ -229,7 +229,7 @@ function Transfer({
229
229
  const keys = selected[fromSide];
230
230
  if (!keys.length) return;
231
231
  const nextTarget = direction === "right" ? [...targetKeys, ...keys.filter((k) => !targetKeys.includes(k))] : targetKeys.filter((k) => !keys.includes(k));
232
- onChange?.(nextTarget, direction, keys);
232
+ onValueChange?.(nextTarget, direction, keys);
233
233
  const cleared = fromSide === 0 ? [[], selected[1]] : [selected[0], []];
234
234
  if (selectedKeysProp) onSelectChange?.(cleared[0], cleared[1]);
235
235
  else setInternalSelected(cleared);
@@ -1,4 +1,4 @@
1
- import { ChoiceField, choiceGroupClassName } from './chunk-CQBADMFG.js';
1
+ import { Field, choiceGroupClassName } from './chunk-26CPAKUP.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import * as React from 'react';
4
4
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
@@ -19,7 +19,7 @@ function useControllableArray(controlled, defaultValue) {
19
19
  function CheckboxGroup({
20
20
  value: controlledValue,
21
21
  defaultValue = [],
22
- onChange,
22
+ onValueChange,
23
23
  options,
24
24
  orientation = "vertical",
25
25
  disabled,
@@ -32,7 +32,7 @@ function CheckboxGroup({
32
32
  const toggle = (optionValue) => {
33
33
  const next = value.includes(optionValue) ? value.filter((v) => v !== optionValue) : [...value, optionValue];
34
34
  setValue(next);
35
- onChange?.(next);
35
+ onValueChange?.(next);
36
36
  };
37
37
  if (options && options.length > 0) {
38
38
  return /* @__PURE__ */ jsx(
@@ -45,7 +45,7 @@ function CheckboxGroup({
45
45
  children: options.map((opt, index) => {
46
46
  const id = `${reactId}-${opt.value}-${index}`;
47
47
  const checked = value.includes(opt.value);
48
- return /* @__PURE__ */ jsx(ChoiceField, { id, label: opt.label, description: opt.description, children: /* @__PURE__ */ jsx(
48
+ return /* @__PURE__ */ jsx(Field, { id, label: opt.label, description: opt.description, children: /* @__PURE__ */ jsx(
49
49
  Checkbox,
50
50
  {
51
51
  id,
@@ -1,4 +1,4 @@
1
- import { controlIconClass } from './chunk-ICM6XBST.js';
1
+ import { controlIconClass } from './chunk-IBK5D2Q6.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import { Check, Loader2, X, Circle } from 'lucide-react';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -65,7 +65,7 @@ function Steps({
65
65
  }) {
66
66
  const base = initial;
67
67
  const isVertical = orientation === "vertical";
68
- const compact = size === "small";
68
+ const compact = size === "sm";
69
69
  return /* @__PURE__ */ jsx(
70
70
  "ol",
71
71
  {
@@ -1,5 +1,5 @@
1
1
  import { Input } from './chunk-VOHTRR5X.js';
2
- import { buttonVariants, Button } from './chunk-HJEBRCXL.js';
2
+ import { buttonVariants, Button } from './chunk-M4PZNAMV.js';
3
3
  import { Label } from './chunk-7PWBC4BY.js';
4
4
  import { useTranslation } from './chunk-RLGHEV4A.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
@@ -152,7 +152,7 @@ var DialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
152
152
  }
153
153
  ));
154
154
  DialogCancel.displayName = "DialogCancel";
155
- function DialogConfirm({
155
+ function AlertDialog({
156
156
  open,
157
157
  onOpenChange,
158
158
  title,
@@ -232,7 +232,8 @@ var Dialog = Object.assign(DialogRoot, {
232
232
  Close: DialogClose,
233
233
  Action: DialogAction,
234
234
  Cancel: DialogCancel,
235
- Confirm: DialogConfirm
235
+ Confirm: AlertDialog
236
236
  });
237
+ var DialogConfirm = AlertDialog;
237
238
 
238
- export { Dialog, DialogAction, DialogCancel, DialogClose, DialogConfirm, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger };
239
+ export { AlertDialog, Dialog, DialogAction, DialogCancel, DialogClose, DialogConfirm, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger };
@@ -1,7 +1,7 @@
1
- import { Calendar } from './chunk-IK7I3ABN.js';
2
- import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
1
+ import { Calendar } from './chunk-IOGU3ZWF.js';
3
2
  import { Input } from './chunk-VOHTRR5X.js';
4
- import { Button } from './chunk-HJEBRCXL.js';
3
+ import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
4
+ import { Button } from './chunk-M4PZNAMV.js';
5
5
  import { useTranslation, usePickerLocales } from './chunk-RLGHEV4A.js';
6
6
  import { toIsoDate, parseDateInput } from './chunk-FXFJF4YA.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
@@ -12,7 +12,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
12
12
  var ISO_HINT = "yyyy-mm-dd";
13
13
  function DatePicker({
14
14
  value,
15
- onChange,
15
+ onValueChange,
16
16
  placeholder,
17
17
  disabled,
18
18
  className,
@@ -33,12 +33,12 @@ function DatePicker({
33
33
  const commit = (raw) => {
34
34
  const trimmed = raw.trim();
35
35
  if (trimmed === "") {
36
- onChange?.(void 0);
36
+ onValueChange?.(void 0);
37
37
  return;
38
38
  }
39
39
  const parsed = parseDateInput(trimmed);
40
40
  if (parsed) {
41
- onChange?.(parsed);
41
+ onValueChange?.(parsed);
42
42
  }
43
43
  };
44
44
  return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
@@ -86,7 +86,7 @@ function DatePicker({
86
86
  mode: "single",
87
87
  selected: value,
88
88
  onSelect: (date) => {
89
- onChange?.(date);
89
+ onValueChange?.(date);
90
90
  setText(toIsoDate(date));
91
91
  setOpen(false);
92
92
  },
@@ -1,6 +1,6 @@
1
- import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
2
1
  import { Input } from './chunk-VOHTRR5X.js';
3
- import { Button } from './chunk-HJEBRCXL.js';
2
+ import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
+ import { Button } from './chunk-M4PZNAMV.js';
4
4
  import { useTranslation } from './chunk-RLGHEV4A.js';
5
5
  import { normalizeHhmm, isValidHhmm } from './chunk-FXFJF4YA.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
@@ -133,7 +133,7 @@ function TimePickerPanel({ value, minuteStep, onChange, onDone }) {
133
133
  function TimePicker({
134
134
  value: controlledValue,
135
135
  defaultValue,
136
- onChange,
136
+ onValueChange,
137
137
  placeholder,
138
138
  disabled,
139
139
  className,
@@ -153,7 +153,7 @@ function TimePicker({
153
153
  }, [value]);
154
154
  const setValue = (next) => {
155
155
  if (!isControlled) setInternal(next);
156
- onChange?.(next);
156
+ onValueChange?.(next);
157
157
  };
158
158
  return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
159
159
  /* @__PURE__ */ jsx(
@@ -1,5 +1,5 @@
1
- import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-ARDVPIF4.js';
2
- import { Button } from './chunk-HJEBRCXL.js';
1
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-G2WYOCDL.js';
2
+ import { Button } from './chunk-M4PZNAMV.js';
3
3
  import { useTranslation } from './chunk-RLGHEV4A.js';
4
4
  import { cn } from './chunk-U7N2A7A3.js';
5
5
  import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
@@ -0,0 +1,50 @@
1
+ import { cn } from './chunk-U7N2A7A3.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ // src/lib/variants.ts
5
+ var densityClass = {
6
+ compact: "ui-density-compact",
7
+ default: "ui-density-default",
8
+ comfortable: "ui-density-comfortable"
9
+ };
10
+ var pageContainerVariantClass = {
11
+ default: void 0,
12
+ narrow: "ui-page-container--narrow",
13
+ flush: "ui-page-container--flush",
14
+ ghost: "ui-page-container--ghost"
15
+ };
16
+ var flexGapClass = {
17
+ xs: "ui-flex-gap-xs",
18
+ sm: "ui-flex-gap-sm",
19
+ md: "ui-flex-gap-md",
20
+ lg: "ui-flex-gap-lg",
21
+ xl: "ui-flex-gap-xl"
22
+ };
23
+ function Flex({
24
+ direction = "col",
25
+ gap = "md",
26
+ align,
27
+ justify,
28
+ wrap = false,
29
+ className,
30
+ children,
31
+ ...props
32
+ }) {
33
+ return /* @__PURE__ */ jsx(
34
+ "div",
35
+ {
36
+ "data-direction": direction,
37
+ "data-align": align,
38
+ "data-justify": justify,
39
+ "data-wrap": wrap ? "true" : void 0,
40
+ className: cn("ui-flex", flexGapClass[gap], className),
41
+ ...props,
42
+ children
43
+ }
44
+ );
45
+ }
46
+ function Inline({ gap = "sm", ...props }) {
47
+ return /* @__PURE__ */ jsx(Flex, { direction: "row", wrap: true, gap, align: "center", ...props });
48
+ }
49
+
50
+ export { Flex, Inline, densityClass, pageContainerVariantClass };
@@ -1,10 +1,10 @@
1
1
  import { humanError } from './chunk-4R7QL3MW.js';
2
- import { Inline } from './chunk-S66TJXJU.js';
3
- import { Button } from './chunk-HJEBRCXL.js';
2
+ import { Inline } from './chunk-TILFZBTE.js';
3
+ import { Button } from './chunk-M4PZNAMV.js';
4
4
  import { useTranslation } from './chunk-RLGHEV4A.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
7
- import { CheckCircle2, TriangleAlert, AlertCircle, Info, X, RefreshCw } from 'lucide-react';
7
+ import { Info, CheckCircle2, TriangleAlert, AlertCircle, X, RefreshCw } from 'lucide-react';
8
8
  import { jsx, jsxs } from 'react/jsx-runtime';
9
9
 
10
10
  var AlertContext = React.createContext("default");
@@ -12,23 +12,27 @@ var DEFAULT_ICONS = {
12
12
  default: Info,
13
13
  destructive: AlertCircle,
14
14
  warning: TriangleAlert,
15
- success: CheckCircle2
15
+ success: CheckCircle2,
16
+ info: Info,
17
+ muted: Info,
18
+ neutral: Info
16
19
  };
17
20
  var AlertBase = React.forwardRef(
18
- ({ variant = "default", icon, onDismiss, className, children, ...props }, ref) => {
19
- const IconComponent = icon === false ? null : icon ?? DEFAULT_ICONS[variant];
20
- return /* @__PURE__ */ jsx(AlertContext.Provider, { value: variant, children: /* @__PURE__ */ jsxs(
21
+ ({ variant = "default", tone = "default", icon, onDismiss, className, children, ...props }, ref) => {
22
+ const IconComponent = icon === false ? null : icon ?? DEFAULT_ICONS[tone];
23
+ return /* @__PURE__ */ jsx(AlertContext.Provider, { value: tone, children: /* @__PURE__ */ jsxs(
21
24
  "div",
22
25
  {
23
26
  ref,
24
27
  role: "alert",
25
28
  "data-slot": "alert",
26
29
  "data-variant": variant,
30
+ "data-tone": tone,
27
31
  "data-dismissible": onDismiss ? "" : void 0,
28
32
  className,
29
33
  ...props,
30
34
  children: [
31
- IconComponent && /* @__PURE__ */ jsx(IconComponent, { "data-slot": "alert-icon", "data-variant": variant, "aria-hidden": "true" }),
35
+ IconComponent && /* @__PURE__ */ jsx(IconComponent, { "data-slot": "alert-icon", "data-tone": tone, "aria-hidden": "true" }),
32
36
  /* @__PURE__ */ jsx("div", { "data-slot": "alert-body", children }),
33
37
  onDismiss && /* @__PURE__ */ jsx(
34
38
  "button",
@@ -51,13 +55,13 @@ var AlertBase = React.forwardRef(
51
55
  AlertBase.displayName = "Alert";
52
56
  var AlertTitle = React.forwardRef(
53
57
  ({ className, ...props }, ref) => {
54
- const variant = React.useContext(AlertContext);
58
+ const tone = React.useContext(AlertContext);
55
59
  return /* @__PURE__ */ jsx(
56
60
  "p",
57
61
  {
58
62
  ref,
59
63
  "data-slot": "alert-title",
60
- "data-variant": variant,
64
+ "data-tone": tone,
61
65
  className,
62
66
  ...props
63
67
  }
@@ -87,7 +91,7 @@ var AlertActions = React.forwardRef(
87
91
  AlertActions.displayName = "AlertActions";
88
92
  function AlertQueryError({ error, onRetry, className }) {
89
93
  const { t } = useTranslation();
90
- return /* @__PURE__ */ jsxs(Alert, { variant: "destructive", className, children: [
94
+ return /* @__PURE__ */ jsxs(Alert, { tone: "destructive", className, children: [
91
95
  /* @__PURE__ */ jsx(AlertTitle, { children: t("common.error") }),
92
96
  /* @__PURE__ */ jsx(AlertDescription, { children: humanError(error) }),
93
97
  onRetry && /* @__PURE__ */ jsx(AlertActions, { children: /* @__PURE__ */ jsx(
@@ -1,4 +1,4 @@
1
- import { toneNeutralClass, toneInfoClass, toneWarningClass, toneSuccessClass, toneDestructiveClass } from './chunk-ICM6XBST.js';
1
+ import { toneNeutralClass, toneMutedClass, toneInfoClass, toneDestructiveClass, toneWarningClass, toneSuccessClass } from './chunk-IBK5D2Q6.js';
2
2
  import { useTranslation } from './chunk-RLGHEV4A.js';
3
3
  import { cn } from './chunk-U7N2A7A3.js';
4
4
  import { cva } from 'class-variance-authority';
@@ -35,27 +35,44 @@ var badgeVariants = cva(
35
35
  variant: {
36
36
  default: "border-transparent bg-primary text-primary-foreground",
37
37
  secondary: "border-transparent bg-secondary text-secondary-foreground",
38
- destructive: cn("border-transparent", toneDestructiveClass),
39
- outline: "text-foreground",
40
- success: cn("border-transparent", toneSuccessClass),
41
- warning: cn("border-transparent", toneWarningClass),
42
- info: cn("border-transparent", toneInfoClass),
43
- neutral: cn("border-transparent", toneNeutralClass)
38
+ outline: "text-foreground"
44
39
  }
45
40
  },
46
41
  defaultVariants: { variant: "default" }
47
42
  }
48
43
  );
49
- function Badge({ className, variant, icon, status, children, ...props }) {
44
+ var badgeToneClass = {
45
+ default: void 0,
46
+ success: cn("border-transparent", toneSuccessClass),
47
+ warning: cn("border-transparent", toneWarningClass),
48
+ destructive: cn("border-transparent", toneDestructiveClass),
49
+ info: cn("border-transparent", toneInfoClass),
50
+ muted: cn("border-transparent", toneMutedClass),
51
+ neutral: cn("border-transparent", toneNeutralClass)
52
+ };
53
+ function Badge({ className, variant, tone, icon, status, children, ...props }) {
50
54
  const { t } = useTranslation();
51
55
  const statusDef = status ? STATUS_MAP[status] ?? { tone: "neutral", icon: Circle } : null;
52
- const resolvedVariant = variant ?? statusDef?.tone ?? "default";
56
+ const resolvedTone = tone ?? statusDef?.tone ?? "default";
53
57
  const ResolvedIcon = icon === void 0 ? statusDef?.icon : icon;
54
58
  const resolvedChildren = children ?? (status ? status in STATUS_MAP ? t(`status.${status}`) : status : void 0);
55
- return /* @__PURE__ */ jsxs("div", { "data-slot": "badge", className: cn(badgeVariants({ variant: resolvedVariant }), className), ...props, children: [
56
- ResolvedIcon ? /* @__PURE__ */ jsx(ResolvedIcon, { "data-slot": "badge-icon", "aria-hidden": "true" }) : null,
57
- resolvedChildren
58
- ] });
59
+ return /* @__PURE__ */ jsxs(
60
+ "div",
61
+ {
62
+ "data-slot": "badge",
63
+ "data-tone": resolvedTone,
64
+ className: cn(
65
+ badgeVariants({ variant: variant ?? "default" }),
66
+ badgeToneClass[resolvedTone],
67
+ className
68
+ ),
69
+ ...props,
70
+ children: [
71
+ ResolvedIcon ? /* @__PURE__ */ jsx(ResolvedIcon, { "data-slot": "badge-icon", "aria-hidden": "true" }) : null,
72
+ resolvedChildren
73
+ ]
74
+ }
75
+ );
59
76
  }
60
77
 
61
78
  export { Badge };
@@ -1,7 +1,7 @@
1
- import { Calendar } from './chunk-IK7I3ABN.js';
2
- import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
1
+ import { Calendar } from './chunk-IOGU3ZWF.js';
3
2
  import { Input } from './chunk-VOHTRR5X.js';
4
- import { Button } from './chunk-HJEBRCXL.js';
3
+ import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
4
+ import { Button } from './chunk-M4PZNAMV.js';
5
5
  import { useTranslation, usePickerLocales } from './chunk-RLGHEV4A.js';
6
6
  import { toIsoDate, parseDateInput } from './chunk-FXFJF4YA.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
@@ -12,7 +12,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
12
12
  var ISO_HINT = "yyyy-mm-dd";
13
13
  function DateRangePicker({
14
14
  value,
15
- onChange,
15
+ onValueChange,
16
16
  placeholder,
17
17
  disabled,
18
18
  className,
@@ -32,7 +32,7 @@ function DateRangePicker({
32
32
  setToText(toIsoDate(value?.to));
33
33
  }, [value?.from, value?.to]);
34
34
  const resolvedPlaceholder = placeholder ?? t("dataEntry.dateRangePicker.placeholder") ?? ISO_HINT;
35
- const emit = (next) => onChange?.(next);
35
+ const emit = (next) => onValueChange?.(next);
36
36
  const commitEdge = (edge, raw) => {
37
37
  const parsed = raw.trim() === "" ? void 0 : parseDateInput(raw.trim()) ?? void 0;
38
38
  const next = { from: value?.from, to: value?.to, [edge]: parsed };
@@ -1,8 +1,8 @@
1
- import { DropdownMenu, DropdownMenuTrigger } from './chunk-TO33OY4L.js';
2
1
  import { Tooltip, TooltipTrigger, TooltipContent } from './chunk-32WO3YLB.js';
2
+ import { DropdownMenu, DropdownMenuTrigger } from './chunk-TO33OY4L.js';
3
3
  import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './chunk-DV52WNXO.js';
4
+ import { densityClass, pageContainerVariantClass, Flex } from './chunk-TILFZBTE.js';
4
5
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
5
- import { densityClass, pageContainerVariantClass, stackGapClass } from './chunk-S66TJXJU.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import { Link } from 'react-router-dom';
8
8
  import { ChevronRight, ChevronDown, PanelLeftOpen, PanelLeftClose, Search, Bell, SlidersHorizontal } from 'lucide-react';
@@ -10,7 +10,10 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
10
  import * as React from 'react';
11
11
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
12
12
 
13
- function PageContainer({
13
+ function PageContainerInset({ className, children, ...props }) {
14
+ return /* @__PURE__ */ jsx("div", { className: cn("ui-page-container-inset", className), ...props, children });
15
+ }
16
+ function PageContainerRoot({
14
17
  title,
15
18
  subtitle,
16
19
  extra,
@@ -62,11 +65,14 @@ function PageContainer({
62
65
  }
63
66
  );
64
67
  }
65
- function PageInset({ className, children, ...props }) {
66
- return /* @__PURE__ */ jsx("div", { className: cn("ui-page-inset", className), ...props, children });
68
+ var PageContainer = Object.assign(PageContainerRoot, {
69
+ Inset: PageContainerInset
70
+ });
71
+ function PageInset(props) {
72
+ return /* @__PURE__ */ jsx(PageContainerInset, { ...props });
67
73
  }
68
- function Stack({ gap = "md", className, children, ...props }) {
69
- return /* @__PURE__ */ jsx("div", { className: cn(stackGapClass[gap], className), ...props, children });
74
+ function Stack(props) {
75
+ return /* @__PURE__ */ jsx(Flex, { direction: "col", ...props });
70
76
  }
71
77
  function AppShell({
72
78
  sidebar,
@@ -365,8 +371,22 @@ function Topbar({
365
371
  ) : null
366
372
  ] });
367
373
  }
374
+ function resolveColumns(columns) {
375
+ if (typeof columns === "number") {
376
+ return {
377
+ "--responsive-grid-sm": Math.min(columns, 2),
378
+ "--responsive-grid-md": Math.min(columns, 3),
379
+ "--responsive-grid-lg": columns
380
+ };
381
+ }
382
+ return {
383
+ "--responsive-grid-sm": columns.sm ?? 1,
384
+ "--responsive-grid-md": columns.md ?? columns.sm ?? 1,
385
+ "--responsive-grid-lg": columns.lg ?? columns.md ?? columns.sm ?? 1
386
+ };
387
+ }
368
388
  function ResponsiveGrid({ columns = 4, children }) {
369
- return /* @__PURE__ */ jsx("div", { className: "ui-responsive-grid", "data-columns": columns, children });
389
+ return /* @__PURE__ */ jsx("div", { className: "ui-responsive-grid", style: resolveColumns(columns), children });
370
390
  }
371
391
  function SplitPane({ children, aside, asideWidth = "md" }) {
372
392
  return /* @__PURE__ */ jsxs("div", { className: "ui-split-pane", "data-aside-width": asideWidth, children: [
@@ -1,4 +1,4 @@
1
- import { SearchSelect } from './chunk-OXKY5QMK.js';
1
+ import { SearchSelect } from './chunk-6QXQQAOQ.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
 
4
4
  function Autocomplete({
@@ -17,7 +17,7 @@ function Autocomplete({
17
17
  {
18
18
  id,
19
19
  value,
20
- onChange: (next) => onValueChange?.(next),
20
+ onValueChange: (next) => onValueChange?.(next),
21
21
  options,
22
22
  clearable: false,
23
23
  placeholder,
@@ -0,0 +1,61 @@
1
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectGroup, SelectItem } from './chunk-G2WYOCDL.js';
2
+ import { Inline } from './chunk-TILFZBTE.js';
3
+ import { cn } from './chunk-U7N2A7A3.js';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ function CountryOptionLabel({
7
+ country,
8
+ showCode = false,
9
+ className
10
+ }) {
11
+ const code = country.value ?? country.code ?? "";
12
+ const text = country.nativeName != null && country.nativeName !== "" ? `${country.name} (${country.nativeName})` : country.name;
13
+ return /* @__PURE__ */ jsxs(Inline, { gap: "xs", className: cn("items-center", className), children: [
14
+ country.flagSvgPath != null && country.flagSvgPath !== "" && /* @__PURE__ */ jsx(
15
+ "img",
16
+ {
17
+ src: country.flagSvgPath,
18
+ alt: "",
19
+ className: "h-3 w-5 shrink-0 rounded-sm object-cover",
20
+ "aria-hidden": "true"
21
+ }
22
+ ),
23
+ /* @__PURE__ */ jsxs("span", { className: "truncate", children: [
24
+ text,
25
+ showCode && code !== "" && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
26
+ " \xB7 ",
27
+ code
28
+ ] })
29
+ ] })
30
+ ] });
31
+ }
32
+ function CountrySelect({
33
+ id,
34
+ name,
35
+ options,
36
+ defaultValue,
37
+ required = false,
38
+ allowEmpty = false,
39
+ emptyLabel = "\u2014",
40
+ placeholder,
41
+ invalid = false
42
+ }) {
43
+ const emptyValue = "0";
44
+ const resolvedDefault = defaultValue && defaultValue !== "" ? defaultValue : emptyValue;
45
+ return /* @__PURE__ */ jsxs(
46
+ Select,
47
+ {
48
+ name,
49
+ defaultValue: allowEmpty ? resolvedDefault : defaultValue ?? options[0]?.value,
50
+ children: [
51
+ /* @__PURE__ */ jsx(SelectTrigger, { id, className: "w-full", "aria-invalid": invalid, "aria-required": required, children: /* @__PURE__ */ jsx(SelectValue, { placeholder }) }),
52
+ /* @__PURE__ */ jsx(SelectContent, { children: /* @__PURE__ */ jsxs(SelectGroup, { children: [
53
+ allowEmpty && /* @__PURE__ */ jsx(SelectItem, { value: emptyValue, children: emptyLabel }),
54
+ options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.value ?? "", children: /* @__PURE__ */ jsx(CountryOptionLabel, { country: option }) }, option.value))
55
+ ] }) })
56
+ ]
57
+ }
58
+ );
59
+ }
60
+
61
+ export { CountryOptionLabel, CountrySelect };
@@ -1,9 +1,9 @@
1
1
  import { normalizeTreeOptions, formatPathLabels, getNodeByPath, filterTreeOptions, pathsEqual, pathKey } from './chunk-SMLKNECP.js';
2
- import { Checkbox } from './chunk-E76QIYSY.js';
3
- import { Command, CommandInput } from './chunk-V6UWJKZF.js';
4
- import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
2
+ import { Checkbox } from './chunk-O24Z3ULJ.js';
5
3
  import { ScrollArea, ScrollBar } from './chunk-3KPEZ5CF.js';
6
- import { Button } from './chunk-HJEBRCXL.js';
4
+ import { Command, CommandInput } from './chunk-HTEL5DQI.js';
5
+ import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
6
+ import { Button } from './chunk-M4PZNAMV.js';
7
7
  import { useTranslation } from './chunk-RLGHEV4A.js';
8
8
  import { cn } from './chunk-U7N2A7A3.js';
9
9
  import * as React from 'react';
@@ -21,7 +21,7 @@ function Cascader({
21
21
  options: optionsProp,
22
22
  value,
23
23
  defaultValue,
24
- onChange,
24
+ onValueChange,
25
25
  multiple,
26
26
  changeOnSelect,
27
27
  showSearch,
@@ -62,14 +62,14 @@ function Cascader({
62
62
  }, [multiple, multiValue, singleValue, options]);
63
63
  const commitSingle = (path) => {
64
64
  if (!isControlledSingle) setInternalSingle(path);
65
- onChange?.(path, getNodeByPath(options, path));
65
+ onValueChange?.(path, getNodeByPath(options, path));
66
66
  setOpen(false);
67
67
  setActivePath([]);
68
68
  setSearch("");
69
69
  };
70
70
  const commitMulti = (paths) => {
71
71
  if (!isControlledMulti) setInternalMulti(paths);
72
- onChange?.(
72
+ onValueChange?.(
73
73
  paths,
74
74
  paths.map((p) => getNodeByPath(options, p))
75
75
  );
@@ -1,8 +1,8 @@
1
- import { Slider } from './chunk-CRERCLIZ.js';
2
- import { controlIconClass } from './chunk-ICM6XBST.js';
3
1
  import { formatBytes } from './chunk-4R7QL3MW.js';
4
- import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-2HLWHQJA.js';
5
- import { Button } from './chunk-HJEBRCXL.js';
2
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-P4HFJQID.js';
3
+ import { Slider } from './chunk-CRERCLIZ.js';
4
+ import { Button } from './chunk-M4PZNAMV.js';
5
+ import { controlIconClass } from './chunk-IBK5D2Q6.js';
6
6
  import { useTranslation } from './chunk-RLGHEV4A.js';
7
7
  import { cn } from './chunk-U7N2A7A3.js';
8
8
  import * as React2 from 'react';
@@ -203,16 +203,16 @@ function fileMatchesAccept(file, accept) {
203
203
  return file.type === trimmed || file.name.endsWith(trimmed);
204
204
  });
205
205
  }
206
- function useUploadList(controlled, defaultValue, onChange) {
206
+ function useUploadList(controlled, defaultValue, onValueChange) {
207
207
  const [internal, setInternal] = React2.useState(defaultValue ?? []);
208
208
  const items = controlled ?? internal;
209
209
  const setItems = React2.useCallback(
210
210
  (next) => {
211
211
  const resolved = typeof next === "function" ? next(items) : next;
212
212
  if (controlled === void 0) setInternal(resolved);
213
- onChange?.(resolved);
213
+ onValueChange?.(resolved);
214
214
  },
215
- [controlled, items, onChange]
215
+ [controlled, items, onValueChange]
216
216
  );
217
217
  return [items, setItems];
218
218
  }
@@ -243,7 +243,7 @@ function Upload({
243
243
  variant = "dropzone",
244
244
  value,
245
245
  defaultValue,
246
- onChange,
246
+ onValueChange,
247
247
  accept: acceptProp,
248
248
  multiple: multipleProp,
249
249
  maxCount: maxCountProp,
@@ -261,7 +261,7 @@ function Upload({
261
261
  const inputRef = React2.useRef(null);
262
262
  const [dragActive, setDragActive] = React2.useState(false);
263
263
  const [cropFile, setCropFile] = React2.useState(null);
264
- const [items, setItems] = useUploadList(value, defaultValue, onChange);
264
+ const [items, setItems] = useUploadList(value, defaultValue, onValueChange);
265
265
  const isSingleAvatar = variant === "avatar" || variant === "avatar-crop" || variant === "picture" && maxCount === 1;
266
266
  const singleItem = isSingleAvatar ? items[0] ?? null : null;
267
267
  const draft = useUploadDraft({