@godxjp/ui 6.12.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 (179) hide show
  1. package/README.md +5 -0
  2. package/dist/app/index.d.ts +2 -2
  3. package/dist/{app.prop-IobwLwaM.d.ts → app.prop-DnIXFzLi.d.ts} +9 -9
  4. package/dist/aspect-ratio-DGoYrOry.d.ts +6 -0
  5. package/dist/avatar-D9MdXzfF.d.ts +8 -0
  6. package/dist/{checkbox-9w-eF8sM.d.ts → checkbox-ChRsR7Nk.d.ts} +2 -2
  7. package/dist/{chunk-3UGU5TYP.js → chunk-25RYBC5T.js} +2 -2
  8. package/dist/{chunk-CQBADMFG.js → chunk-26CPAKUP.js} +3 -2
  9. package/dist/{chunk-ZTYEH3UW.js → chunk-3TS3G4U3.js} +3 -3
  10. package/dist/{chunk-ZS6DTAM2.js → chunk-4MMIMZMK.js} +1 -1
  11. package/dist/{chunk-T2S3IGZG.js → chunk-4R7RQDXI.js} +23 -21
  12. package/dist/{chunk-Y7AV7QJO.js → chunk-6QXQQAOQ.js} +5 -5
  13. package/dist/{chunk-JJCGMCTL.js → chunk-A22MCA3X.js} +6 -6
  14. package/dist/{chunk-TW4IRRAX.js → chunk-A7PKMT7Y.js} +8 -49
  15. package/dist/chunk-AINW5WYN.js +57 -0
  16. package/dist/chunk-B3WX53JQ.js +40 -0
  17. package/dist/{chunk-BM5LIDCS.js → chunk-C5H655GK.js} +223 -67
  18. package/dist/{chunk-ZLK5SPT6.js → chunk-EOTOCNT7.js} +1 -1
  19. package/dist/chunk-FRU44GA2.js +18 -0
  20. package/dist/chunk-FYM3MJSK.js +59 -0
  21. package/dist/{chunk-EE3B3TEQ.js → chunk-G2WYOCDL.js} +5 -5
  22. package/dist/chunk-HKD6ERY7.js +1 -0
  23. package/dist/{chunk-V6UWJKZF.js → chunk-HTEL5DQI.js} +1 -1
  24. package/dist/{chunk-ICM6XBST.js → chunk-IBK5D2Q6.js} +2 -1
  25. package/dist/{chunk-IK7I3ABN.js → chunk-IOGU3ZWF.js} +2 -2
  26. package/dist/{chunk-HJEBRCXL.js → chunk-M4PZNAMV.js} +1 -0
  27. package/dist/{chunk-2QG3OVAD.js → chunk-N43OKOFT.js} +7 -5
  28. package/dist/{chunk-YVBZ37ZE.js → chunk-NG23LVTM.js} +5 -5
  29. package/dist/{chunk-E76QIYSY.js → chunk-O24Z3ULJ.js} +4 -4
  30. package/dist/{chunk-GXHZAJUA.js → chunk-O2OUNXV4.js} +10 -10
  31. package/dist/{chunk-L6J44O74.js → chunk-OJZ6C2HM.js} +2 -2
  32. package/dist/{chunk-2HLWHQJA.js → chunk-P4HFJQID.js} +5 -4
  33. package/dist/chunk-R2W2FX5Q.js +48 -0
  34. package/dist/{chunk-AZS7553U.js → chunk-RGIYKJPW.js} +6 -6
  35. package/dist/{chunk-GH7E5N6F.js → chunk-RGPF3HU6.js} +3 -3
  36. package/dist/chunk-SEG2YBXF.js +29 -0
  37. package/dist/{chunk-JBEIL3VD.js → chunk-SKIRU7GC.js} +2 -2
  38. package/dist/chunk-TILFZBTE.js +50 -0
  39. package/dist/{chunk-6UFKWOEW.js → chunk-TMDGV4CN.js} +15 -11
  40. package/dist/chunk-UIYEAUWA.js +78 -0
  41. package/dist/{chunk-XG7XDYIM.js → chunk-V3N266PT.js} +48 -2
  42. package/dist/{chunk-I3272Y2C.js → chunk-WN52SCGE.js} +4 -4
  43. package/dist/{chunk-T4UT3B3K.js → chunk-WTVLZVBA.js} +153 -188
  44. package/dist/{chunk-SWGQX3AP.js → chunk-XDUZ7JJL.js} +2 -2
  45. package/dist/chunk-XMBCNMJI.js +61 -0
  46. package/dist/{chunk-RVY4F7LK.js → chunk-XZM2GNAY.js} +7 -7
  47. package/dist/{chunk-K27I23OA.js → chunk-Z6HNY2PL.js} +9 -9
  48. package/dist/components/admin/index.d.ts +24 -22
  49. package/dist/components/admin/index.js +33 -32
  50. package/dist/components/data-display/badge.d.ts +15 -4
  51. package/dist/components/data-display/badge.js +4 -2
  52. package/dist/components/data-display/card.d.ts +3 -3
  53. package/dist/components/data-display/card.js +1 -1
  54. package/dist/components/data-display/index.d.ts +14 -26
  55. package/dist/components/data-display/index.js +28 -37
  56. package/dist/components/data-display/table.js +2 -2
  57. package/dist/components/data-entry/autocomplete.d.ts +5 -5
  58. package/dist/components/data-entry/autocomplete.js +5 -5
  59. package/dist/components/data-entry/calendar.d.ts +5 -5
  60. package/dist/components/data-entry/calendar.js +3 -3
  61. package/dist/components/data-entry/cascader.d.ts +6 -6
  62. package/dist/components/data-entry/cascader.js +7 -7
  63. package/dist/components/data-entry/checkbox.d.ts +6 -6
  64. package/dist/components/data-entry/checkbox.js +2 -2
  65. package/dist/components/data-entry/color-picker.d.ts +6 -6
  66. package/dist/components/data-entry/color-picker.js +2 -2
  67. package/dist/components/data-entry/command.d.ts +11 -11
  68. package/dist/components/data-entry/command.js +2 -2
  69. package/dist/components/data-entry/date-picker.d.ts +6 -6
  70. package/dist/components/data-entry/date-picker.js +4 -4
  71. package/dist/components/data-entry/date-range-picker.d.ts +6 -6
  72. package/dist/components/data-entry/date-range-picker.js +4 -4
  73. package/dist/components/data-entry/index.d.ts +13 -19
  74. package/dist/components/data-entry/index.js +27 -145
  75. package/dist/components/data-entry/radio.d.ts +5 -5
  76. package/dist/components/data-entry/radio.js +2 -2
  77. package/dist/components/data-entry/select.d.ts +5 -5
  78. package/dist/components/data-entry/select.js +5 -5
  79. package/dist/components/data-entry/slider.d.ts +5 -5
  80. package/dist/components/data-entry/switch.d.ts +5 -5
  81. package/dist/components/data-entry/switch.js +1 -1
  82. package/dist/components/data-entry/textarea.js +2 -2
  83. package/dist/components/data-entry/time-picker.d.ts +6 -6
  84. package/dist/components/data-entry/time-picker.js +2 -2
  85. package/dist/components/data-entry/transfer.d.ts +7 -7
  86. package/dist/components/data-entry/transfer.js +5 -5
  87. package/dist/components/data-entry/tree-select.d.ts +6 -6
  88. package/dist/components/data-entry/tree-select.js +7 -7
  89. package/dist/components/data-entry/upload.d.ts +7 -7
  90. package/dist/components/data-entry/upload.js +5 -5
  91. package/dist/components/feedback/alert.d.ts +7 -5
  92. package/dist/components/feedback/alert.js +3 -3
  93. package/dist/components/feedback/dialog.d.ts +9 -6
  94. package/dist/components/feedback/dialog.js +2 -2
  95. package/dist/components/feedback/index.d.ts +7 -6
  96. package/dist/components/feedback/index.js +9 -7
  97. package/dist/components/general/button.d.ts +4 -4
  98. package/dist/components/general/button.js +1 -1
  99. package/dist/components/general/index.d.ts +3 -3
  100. package/dist/components/general/index.js +1 -1
  101. package/dist/components/layout/index.d.ts +19 -45
  102. package/dist/components/layout/index.js +4 -5
  103. package/dist/components/navigation/index.d.ts +13 -14
  104. package/dist/components/navigation/index.js +9 -10
  105. package/dist/components/navigation/pagination.d.ts +5 -5
  106. package/dist/components/navigation/pagination.js +6 -6
  107. package/dist/components/navigation/steps.d.ts +6 -6
  108. package/dist/components/navigation/steps.js +2 -2
  109. package/dist/components/navigation/tabs.d.ts +14 -2
  110. package/dist/components/navigation/tabs.js +1 -1
  111. package/dist/components/query/index.d.ts +12 -7
  112. package/dist/components/query/index.js +4 -4
  113. package/dist/components/ui/index.d.ts +21 -14
  114. package/dist/components/ui/index.js +32 -29
  115. package/dist/{data-display.prop-i0iaSwMV.d.ts → data-display.prop-Cf2p9QC4.d.ts} +18 -17
  116. package/dist/{data-entry.prop-Cjidhei7.d.ts → data-entry.prop-CDkOajPj.d.ts} +34 -40
  117. package/dist/{data-table-Bg7fPpXy.d.ts → data-table-B_q7j992.d.ts} +10 -33
  118. package/dist/{data.prop-BmLaGLb7.d.ts → data.prop-DMYMNl6L.d.ts} +2 -2
  119. package/dist/{feedback.prop-BnBpUzNK.d.ts → feedback.prop-BR5JOpPl.d.ts} +8 -5
  120. package/dist/filter-bar-DvVXm_d1.d.ts +14 -0
  121. package/dist/form/index.d.ts +3 -3
  122. package/dist/{form.prop-BHgpuFFm.d.ts → form.prop-Bc6r6JJW.d.ts} +1 -1
  123. package/dist/{general.prop-D7brMPNL.d.ts → general.prop-DoHDCRmL.d.ts} +2 -2
  124. package/dist/index.d.ts +27 -25
  125. package/dist/index.js +46 -32
  126. package/dist/inline-DqfYlGKj.d.ts +18 -0
  127. package/dist/{interaction.prop-Cdn7wOtq.d.ts → interaction.prop-DSFizzP6.d.ts} +8 -6
  128. package/dist/{layout.prop-MwHm4-Zl.d.ts → layout.prop-Baq9muDN.d.ts} +27 -13
  129. package/dist/layout.prop-CXvl2rVR.d.ts +16 -0
  130. package/dist/{navigation.prop-Ck5_gSfs.d.ts → navigation.prop-8DgElO0c.d.ts} +17 -14
  131. package/dist/{navigation.prop-Hu7s7MJa.d.ts → navigation.prop-BKlxd-j7.d.ts} +2 -5
  132. package/dist/props/components/index.d.ts +14 -14
  133. package/dist/props/index.d.ts +14 -14
  134. package/dist/props/index.js +2 -2
  135. package/dist/props/registry.d.ts +254 -64
  136. package/dist/props/registry.js +1 -1
  137. package/dist/props/vocabulary/index.d.ts +5 -5
  138. package/dist/{query.prop-hIPrk2zI.d.ts → query.prop-DuODxsiU.d.ts} +12 -8
  139. package/dist/{search-input-mAZy3Den.d.ts → search-input-cezAxpgb.d.ts} +7 -2
  140. package/dist/{shared.prop-BNRJc9K0.d.ts → shared.prop-BsNSXeqD.d.ts} +9 -3
  141. package/dist/skeleton-uWAjSacg.d.ts +22 -0
  142. package/dist/styles/alert-layout.css +38 -18
  143. package/dist/styles/badge-layout.css +4 -4
  144. package/dist/styles/card-layout.css +24 -24
  145. package/dist/styles/control.css +68 -0
  146. package/dist/styles/data-display-layout.css +23 -81
  147. package/dist/styles/density.css +10 -10
  148. package/dist/styles/dialog-layout.css +4 -4
  149. package/dist/styles/index.css +6 -9
  150. package/dist/styles/layout.css +114 -85
  151. package/dist/styles/table-layout.css +3 -3
  152. package/dist/theme/example.service.css +0 -5
  153. package/dist/toggle-group-BulJgKh3.d.ts +26 -0
  154. package/dist/tokens/base.css +7 -7
  155. package/dist/tokens/components/badge.css +7 -0
  156. package/dist/tokens/{primitives → components}/card.css +11 -12
  157. package/dist/tokens/{primitives → components}/control.css +10 -0
  158. package/dist/tokens/components/feedback.css +17 -0
  159. package/dist/tokens/{primitives → components}/table.css +2 -2
  160. package/dist/tokens/foundation.css +7 -22
  161. package/dist/use-toast-Dsw3yE2S.d.ts +19 -0
  162. package/package.json +13 -7
  163. package/scripts/ui-audit.mjs +22 -0
  164. package/dist/chunk-BPSKQUL2.js +0 -68
  165. package/dist/chunk-M64MVRLS.js +0 -92
  166. package/dist/chunk-PIIRNAXA.js +0 -26
  167. package/dist/chunk-S66TJXJU.js +0 -33
  168. package/dist/chunk-WXW43RK5.js +0 -24
  169. package/dist/components/navigation/tabs-items.d.ts +0 -12
  170. package/dist/components/navigation/tabs-items.js +0 -3
  171. package/dist/filter-bar-BpUvE_yO.d.ts +0 -10
  172. package/dist/inline-CV3A46np.d.ts +0 -10
  173. package/dist/layout.prop-4TCNvyQZ.d.ts +0 -20
  174. package/dist/tokens/primitives/badge.css +0 -13
  175. package/dist/tokens/primitives/feedback.css +0 -17
  176. package/dist/use-toast-Dol5bdY3.d.ts +0 -34
  177. /package/dist/{chunk-LDSLS6HE.js → chunk-2H65B4JA.js} +0 -0
  178. /package/dist/tokens/{primitives → components}/navigation.css +0 -0
  179. /package/dist/tokens/{primitives → semantic}/layout.css +0 -0
@@ -1,4 +1,4 @@
1
- import { controlIconLeadingClass } from './chunk-ICM6XBST.js';
1
+ import { controlIconLeadingClass } from './chunk-IBK5D2Q6.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import * as React from 'react';
4
4
  import { Command as Command$1 } from 'cmdk';
@@ -11,6 +11,7 @@ var toneSuccessClass = "border-success/30 bg-success/10 text-success";
11
11
  var toneWarningClass = "border-warning/30 bg-warning/10 text-warning-foreground";
12
12
  var toneInfoClass = "border-info/30 bg-info/10 text-info";
13
13
  var toneDestructiveClass = "border-destructive/30 bg-destructive/10 text-destructive";
14
+ var toneMutedClass = "border-border bg-muted text-muted-foreground";
14
15
  var toneNeutralClass = "border-border bg-muted text-muted-foreground";
15
16
 
16
- export { controlIconClass, controlIconLeadingClass, controlIconSmClass, controlMultilineClass, controlTriggerClass, tableCellPaddingClass, tableHeadHeightClass, tableRowHeightClass, toneDestructiveClass, toneInfoClass, toneNeutralClass, toneSuccessClass, toneWarningClass };
17
+ export { controlIconClass, controlIconLeadingClass, controlIconSmClass, controlMultilineClass, controlTriggerClass, tableCellPaddingClass, tableHeadHeightClass, tableRowHeightClass, toneDestructiveClass, toneInfoClass, toneMutedClass, toneNeutralClass, toneSuccessClass, toneWarningClass };
@@ -1,5 +1,5 @@
1
- import { controlIconSmClass } from './chunk-ICM6XBST.js';
2
- import { buttonVariants } from './chunk-HJEBRCXL.js';
1
+ import { buttonVariants } from './chunk-M4PZNAMV.js';
2
+ import { controlIconSmClass } from './chunk-IBK5D2Q6.js';
3
3
  import { cn } from './chunk-U7N2A7A3.js';
4
4
  import { ChevronLeft, ChevronRight } from 'lucide-react';
5
5
  import { DayPicker } from 'react-day-picker';
@@ -16,6 +16,7 @@ var buttonVariants = cva("ui-button", {
16
16
  },
17
17
  size: {
18
18
  default: "ui-button--default-size py-2 has-[>svg]:px-3",
19
+ md: "ui-button--default-size py-2 has-[>svg]:px-3",
19
20
  xs: "h-[calc(var(--control-height)-0.75rem)] gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
20
21
  sm: "ui-button--sm gap-1.5 rounded-md has-[>svg]:px-2.5",
21
22
  lg: "ui-button--lg rounded-md has-[>svg]:px-4",
@@ -1,5 +1,5 @@
1
- import { AlertQueryError } from './chunk-6UFKWOEW.js';
2
- import { Button } from './chunk-HJEBRCXL.js';
1
+ import { AlertQueryError } from './chunk-TMDGV4CN.js';
2
+ import { Button } from './chunk-M4PZNAMV.js';
3
3
  import { useTranslation } from './chunk-RLGHEV4A.js';
4
4
  import * as React from 'react';
5
5
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
@@ -45,7 +45,7 @@ function DataState({
45
45
  if (empty && (data === null || isEmpty(data))) return /* @__PURE__ */ jsx(Fragment, { children: empty });
46
46
  return /* @__PURE__ */ jsx(Fragment, { children: children(data) });
47
47
  }
48
- function MutationFeedback({
48
+ function AlertMutationFeedback({
49
49
  mutation,
50
50
  onRetry,
51
51
  showRetry = true,
@@ -63,7 +63,8 @@ function MutationFeedback({
63
63
  }
64
64
  );
65
65
  }
66
- function QueryRefetchButton({
66
+ var MutationFeedback = AlertMutationFeedback;
67
+ function ButtonRefetch({
67
68
  query,
68
69
  label = "Refresh",
69
70
  children,
@@ -97,6 +98,7 @@ function QueryRefetchButton({
97
98
  }
98
99
  );
99
100
  }
101
+ var QueryRefetchButton = ButtonRefetch;
100
102
  function flattenItemPages(data) {
101
103
  if (!data) return [];
102
104
  return data.pages.flatMap((page) => page.items);
@@ -188,4 +190,4 @@ function PrefetchLink({
188
190
  );
189
191
  }
190
192
 
191
- export { DataState, InfiniteQueryState, MutationFeedback, PrefetchLink, QueryRefetchButton, flattenItemPages };
193
+ export { AlertMutationFeedback, ButtonRefetch, DataState, InfiniteQueryState, MutationFeedback, PrefetchLink, QueryRefetchButton, flattenItemPages };
@@ -1,8 +1,8 @@
1
1
  import { reactNodeText } from './chunk-SMLKNECP.js';
2
- import { Checkbox } from './chunk-E76QIYSY.js';
3
- import { Input } from './chunk-VOHTRR5X.js';
2
+ import { Checkbox } from './chunk-O24Z3ULJ.js';
4
3
  import { ScrollArea } from './chunk-3KPEZ5CF.js';
5
- import { Button } from './chunk-HJEBRCXL.js';
4
+ import { Input } from './chunk-VOHTRR5X.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,
@@ -86,7 +86,7 @@ function getDeltaTone(delta, inverse) {
86
86
  const semanticPositive = inverse ? !isPositive : isPositive;
87
87
  return semanticPositive ? "positive" : "negative";
88
88
  }
89
- function CardStat({
89
+ function StatCard({
90
90
  label,
91
91
  value,
92
92
  hint,
@@ -103,23 +103,23 @@ function CardStat({
103
103
  Card,
104
104
  {
105
105
  size: size ?? "compact",
106
- className,
106
+ className: cn("ui-stat-card", className),
107
107
  "data-stat-card": "",
108
108
  "data-stat-layout": layout,
109
109
  "data-stat-align": align,
110
110
  ...props,
111
111
  children: [
112
- /* @__PURE__ */ jsxs("div", { "data-slot": "card-stat-body", children: [
113
- /* @__PURE__ */ jsx("div", { "data-slot": "card-stat-label", children: label }),
114
- hint && layout === "inline" ? /* @__PURE__ */ jsx("div", { "data-slot": "card-stat-hint", children: hint }) : null
112
+ /* @__PURE__ */ jsxs("div", { "data-slot": "stat-card-body", children: [
113
+ /* @__PURE__ */ jsx("div", { "data-slot": "stat-card-label", children: label }),
114
+ hint && layout === "inline" ? /* @__PURE__ */ jsx("div", { "data-slot": "stat-card-hint", children: hint }) : null
115
115
  ] }),
116
116
  /* @__PURE__ */ jsxs("div", { children: [
117
- /* @__PURE__ */ jsxs("div", { "data-slot": "card-stat-value-row", children: [
118
- /* @__PURE__ */ jsx("span", { "data-slot": "card-stat-value", children: value }),
117
+ /* @__PURE__ */ jsxs("div", { "data-slot": "stat-card-value-row", children: [
118
+ /* @__PURE__ */ jsx("span", { "data-slot": "stat-card-value", children: value }),
119
119
  delta ? /* @__PURE__ */ jsx(
120
120
  "span",
121
121
  {
122
- "data-slot": "card-stat-delta",
122
+ "data-slot": "stat-card-delta",
123
123
  "data-delta-tone": deltaTone,
124
124
  className: cn(
125
125
  deltaTone === "positive" && "text-success",
@@ -129,7 +129,7 @@ function CardStat({
129
129
  }
130
130
  ) : null
131
131
  ] }),
132
- hint && layout !== "inline" ? /* @__PURE__ */ jsx("div", { "data-slot": "card-stat-hint", children: hint }) : null
132
+ hint && layout !== "inline" ? /* @__PURE__ */ jsx("div", { "data-slot": "stat-card-hint", children: hint }) : null
133
133
  ] })
134
134
  ]
135
135
  }
@@ -140,4 +140,4 @@ var CardAction = React.forwardRef(
140
140
  );
141
141
  CardAction.displayName = "CardAction";
142
142
 
143
- export { Card, CardAction, CardContent, CardCover, CardDescription, CardFooter, CardHeader, CardStat, CardTitle };
143
+ export { Card, CardAction, CardContent, CardCover, CardDescription, CardFooter, CardHeader, CardTitle, StatCard };
@@ -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 };
@@ -0,0 +1,48 @@
1
+ import { cn } from './chunk-U7N2A7A3.js';
2
+ import * as React from 'react';
3
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
4
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
+
6
+ var Switch = React.forwardRef(
7
+ ({
8
+ className,
9
+ size = "default",
10
+ name,
11
+ checked,
12
+ defaultChecked = false,
13
+ onCheckedChange,
14
+ ...props
15
+ }, ref) => {
16
+ const [internalChecked, setInternalChecked] = React.useState(defaultChecked);
17
+ const isControlled = checked !== void 0;
18
+ const isChecked = isControlled ? checked : internalChecked;
19
+ const handleCheckedChange = (next) => {
20
+ if (!isControlled) {
21
+ setInternalChecked(next);
22
+ }
23
+ onCheckedChange?.(next);
24
+ };
25
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
26
+ name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value: isChecked ? "1" : "0", readOnly: true }) : null,
27
+ /* @__PURE__ */ jsx(
28
+ SwitchPrimitive.Root,
29
+ {
30
+ ref,
31
+ "data-slot": "switch",
32
+ "data-size": size,
33
+ checked: isChecked,
34
+ onCheckedChange: handleCheckedChange,
35
+ className: cn(
36
+ "peer ui-switch focus-visible:border-ring focus-visible:ring-ring/50 shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
37
+ className
38
+ ),
39
+ ...props,
40
+ children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "ui-switch-thumb" })
41
+ }
42
+ )
43
+ ] });
44
+ }
45
+ );
46
+ Switch.displayName = SwitchPrimitive.Root.displayName;
47
+
48
+ export { Switch };
@@ -1,7 +1,7 @@
1
- import { Calendar } from './chunk-IK7I3ABN.js';
1
+ import { Calendar } from './chunk-IOGU3ZWF.js';
2
2
  import { Input } from './chunk-VOHTRR5X.js';
3
3
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
4
- import { Button } from './chunk-HJEBRCXL.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
1
  import { Input } from './chunk-VOHTRR5X.js';
2
2
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
- import { Button } from './chunk-HJEBRCXL.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(
@@ -0,0 +1,29 @@
1
+ import { cn } from './chunk-U7N2A7A3.js';
2
+ import * as React from 'react';
3
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ var Avatar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Root, { ref, "data-slot": "avatar", className: cn("ui-avatar", className), ...props }));
7
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
8
+ var AvatarImage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9
+ AvatarPrimitive.Image,
10
+ {
11
+ ref,
12
+ "data-slot": "avatar-image",
13
+ className: cn("ui-avatar-image", className),
14
+ ...props
15
+ }
16
+ ));
17
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
18
+ var AvatarFallback = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
19
+ AvatarPrimitive.Fallback,
20
+ {
21
+ ref,
22
+ "data-slot": "avatar-fallback",
23
+ className: cn("ui-avatar-fallback", className),
24
+ ...props
25
+ }
26
+ ));
27
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
28
+
29
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -1,5 +1,5 @@
1
- import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-EE3B3TEQ.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(
@@ -0,0 +1,78 @@
1
+ import { toneNeutralClass, toneMutedClass, toneInfoClass, toneDestructiveClass, toneWarningClass, toneSuccessClass } from './chunk-IBK5D2Q6.js';
2
+ import { useTranslation } from './chunk-RLGHEV4A.js';
3
+ import { cn } from './chunk-U7N2A7A3.js';
4
+ import { cva } from 'class-variance-authority';
5
+ import { XCircle, Pause, CheckCircle2, Circle, Trash2, AlertCircle, Clock, Play } from 'lucide-react';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
+
8
+ var STATUS_MAP = {
9
+ active: { tone: "success", icon: CheckCircle2 },
10
+ completed: { tone: "success", icon: CheckCircle2 },
11
+ delivered: { tone: "success", icon: CheckCircle2 },
12
+ done: { tone: "success", icon: CheckCircle2 },
13
+ permanent: { tone: "success", icon: CheckCircle2 },
14
+ succeeded: { tone: "success", icon: CheckCircle2 },
15
+ draft: { tone: "neutral", icon: Circle },
16
+ pending: { tone: "warning", icon: Clock },
17
+ scheduled: { tone: "info", icon: Clock },
18
+ sending: { tone: "info", icon: Play },
19
+ temporary: { tone: "warning", icon: Clock },
20
+ bounced: { tone: "destructive", icon: AlertCircle },
21
+ cancelled: { tone: "neutral", icon: Pause },
22
+ deleted: { tone: "destructive", icon: Trash2 },
23
+ failed: { tone: "destructive", icon: XCircle },
24
+ private: { tone: "neutral", icon: Circle },
25
+ internal: { tone: "info", icon: Circle },
26
+ public: { tone: "info", icon: Circle },
27
+ ASSIGNMENT_STATUS_ACTIVE: { tone: "success", icon: CheckCircle2 },
28
+ ASSIGNMENT_STATUS_SUSPENDED: { tone: "warning", icon: Pause },
29
+ ASSIGNMENT_STATUS_TERMINATED: { tone: "destructive", icon: XCircle }
30
+ };
31
+ var badgeVariants = cva(
32
+ "inline-flex items-center border text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring",
33
+ {
34
+ variants: {
35
+ variant: {
36
+ default: "border-transparent bg-primary text-primary-foreground",
37
+ secondary: "border-transparent bg-secondary text-secondary-foreground",
38
+ outline: "text-foreground"
39
+ }
40
+ },
41
+ defaultVariants: { variant: "default" }
42
+ }
43
+ );
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 }) {
54
+ const { t } = useTranslation();
55
+ const statusDef = status ? STATUS_MAP[status] ?? { tone: "neutral", icon: Circle } : null;
56
+ const resolvedTone = tone ?? statusDef?.tone ?? "default";
57
+ const ResolvedIcon = icon === void 0 ? statusDef?.icon : icon;
58
+ const resolvedChildren = children ?? (status ? status in STATUS_MAP ? t(`status.${status}`) : status : void 0);
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
+ );
76
+ }
77
+
78
+ export { Badge };