@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
package/README.md CHANGED
@@ -126,8 +126,13 @@ pnpm preview # preview app → http://localhost:6008 (fixed port, kills
126
126
  pnpm preview:build # static build — the integration test for examples + docs
127
127
  pnpm docs:sync-primitives # regenerate docs/primitives/**/*.md from source
128
128
  pnpm typecheck && pnpm audit && pnpm test
129
+ pnpm check:mcp-sync # MCP registry ↔ library export drift guard (also in verify)
130
+ pnpm release --ui <patch|minor|major> --mcp <…|skip> # publish lib + MCP in lockstep
129
131
  ```
130
132
 
133
+ This repo ships two packages — `@godxjp/ui` (this dir) and `@godxjp/ui-mcp` (`mcp/`). They keep
134
+ separate version lines but release together via `pnpm release`; see DEVELOPMENT.md §6.
135
+
131
136
  → **[docs/DEVELOPMENT.md](./docs/DEVELOPMENT.md)** is the contributor guideline (the
132
137
  boundary, the layers, how to add/extend a component, verification).
133
138
 
@@ -5,12 +5,12 @@ import * as date_fns from 'date-fns';
5
5
  import { Locale } from 'date-fns';
6
6
  import { vi } from 'react-day-picker/locale';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
- import { a as AppProviderProp, A as AppContextValue } from '../app.prop-IobwLwaM.js';
8
+ import { a as AppProviderProp, A as AppContextValue } from '../app.prop-DnIXFzLi.js';
9
9
  import { j as formatDate, a as FormatDateOptions } from '../format-date-ByyZoqI5.js';
10
10
  export { F as FormatDateKind, b as FormatDatetimeOptions, d as detectFormatDateKind, f as formatAppDate, c as formatAppDateLong, e as formatAppDateTime, g as formatAppRelative, h as formatAppTime, i as formatCalendarDate, k as formatTimeOfDay, m as isFormatDateValue } from '../format-date-ByyZoqI5.js';
11
11
  export { getDatetimeContext, isValidHhmm, normalizeHhmm, parseDateInput, syncDatetimeContext } from '../lib/datetime/index.js';
12
12
  export { usePickerLocales, useTranslation } from '../i18n/index.js';
13
- import '../shared.prop-BNRJc9K0.js';
13
+ import '../shared.prop-BsNSXeqD.js';
14
14
  import 'react';
15
15
  import '@date-fns/tz';
16
16
 
@@ -1,7 +1,7 @@
1
1
  import { Locale } from 'date-fns';
2
2
  import { DayPickerProps } from 'react-day-picker';
3
3
  import { h as AppLocale, l as AppTimezoneDefault, k as AppTimezone, j as AppTimeFormat, g as AppDateFormat, i as AppRequestHeaders } from './types-mvzYGrma.js';
4
- import { C as ChildrenProp, a as ClassNameProp, D as DisabledProp, I as IdProp } from './shared.prop-BNRJc9K0.js';
4
+ import { C as ChildrenProp, a as ClassNameProp, c as DisabledProp, I as IdProp, V as ValueProp, g as OnValueChangeProp } from './shared.prop-BsNSXeqD.js';
5
5
 
6
6
  /** App shell prop types — @see docs/COMPONENTS.md#app */
7
7
 
@@ -40,16 +40,16 @@ type LocalePickerProp = {
40
40
  disabled?: DisabledProp;
41
41
  id?: IdProp;
42
42
  /** Controlled value; default reads/writes AppProvider. */
43
- value?: AppLocale;
44
- onChange?: (locale: AppLocale) => void;
43
+ value?: ValueProp<AppLocale>;
44
+ onValueChange?: OnValueChangeProp<AppLocale>;
45
45
  };
46
46
  /** @see TimezonePicker */
47
47
  type TimezonePickerProp = {
48
48
  className?: ClassNameProp;
49
49
  disabled?: DisabledProp;
50
50
  id?: IdProp;
51
- value?: AppTimezone;
52
- onChange?: (timezone: AppTimezone) => void;
51
+ value?: ValueProp<AppTimezone>;
52
+ onValueChange?: OnValueChangeProp<AppTimezone>;
53
53
  /** Override AppProvider list; omit to use context or full IANA. */
54
54
  options?: readonly AppTimezone[];
55
55
  };
@@ -58,16 +58,16 @@ type TimeFormatPickerProp = {
58
58
  className?: ClassNameProp;
59
59
  disabled?: DisabledProp;
60
60
  id?: IdProp;
61
- value?: AppTimeFormat;
62
- onChange?: (timeFormat: AppTimeFormat) => void;
61
+ value?: ValueProp<AppTimeFormat>;
62
+ onValueChange?: OnValueChangeProp<AppTimeFormat>;
63
63
  };
64
64
  /** @see DateFormatPicker */
65
65
  type DateFormatPickerProp = {
66
66
  className?: ClassNameProp;
67
67
  disabled?: DisabledProp;
68
68
  id?: IdProp;
69
- value?: AppDateFormat;
70
- onChange?: (dateFormat: AppDateFormat) => void;
69
+ value?: ValueProp<AppDateFormat>;
70
+ onValueChange?: OnValueChangeProp<AppDateFormat>;
71
71
  };
72
72
  /** Value exposed by `useAppContext`. */
73
73
  type AppContextValue = {
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
3
+
4
+ declare const AspectRatio: React.ForwardRefExoticComponent<Omit<AspectRatioPrimitive.AspectRatioProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+
6
+ export { AspectRatio as A };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
+
4
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
5
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
6
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
7
+
8
+ export { Avatar as A, AvatarFallback as a, AvatarImage as b };
@@ -1,9 +1,9 @@
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-Cjidhei7.js';
4
+ import { c as CheckboxGroupProp } from './data-entry.prop-CDkOajPj.js';
5
5
 
6
- declare function CheckboxGroup({ value: controlledValue, defaultValue, onChange, options, orientation, disabled, name, className, children, }: CheckboxGroupProp): react_jsx_runtime.JSX.Element;
6
+ declare function CheckboxGroup({ value: controlledValue, defaultValue, onValueChange, options, orientation, disabled, name, className, children, }: CheckboxGroupProp): react_jsx_runtime.JSX.Element;
7
7
 
8
8
  /** Checkbox — dùng standalone hoặc `Checkbox.Group` với `options` (Ant Design style). */
9
9
  declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>> & {
@@ -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 RadioGroupPrimitive from '@radix-ui/react-radio-group';
@@ -61,7 +61,7 @@ function RadioGroupOptions({
61
61
  className: choiceGroupClassName(orientation, className),
62
62
  children: options.map((opt, index) => {
63
63
  const id = `${reactId}-${opt.value}-${index}`;
64
- return /* @__PURE__ */ jsx(ChoiceField, { id, label: opt.label, description: opt.description, children: /* @__PURE__ */ jsx(RadioItem, { id, value: opt.value, disabled: opt.disabled }) }, opt.value);
64
+ return /* @__PURE__ */ jsx(Field, { id, label: opt.label, description: opt.description, children: /* @__PURE__ */ jsx(RadioItem, { id, value: opt.value, disabled: opt.disabled }) }, opt.value);
65
65
  })
66
66
  }
67
67
  );
@@ -2,7 +2,7 @@ import { Label } from './chunk-7PWBC4BY.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
 
5
- function ChoiceField({ id, label, description, className, children }) {
5
+ function Field({ id, label, description, className, children }) {
6
6
  return /* @__PURE__ */ jsxs("div", { className: cn("ui-choice-field", className), children: [
7
7
  /* @__PURE__ */ jsx("div", { className: "ui-choice-control", children }),
8
8
  /* @__PURE__ */ jsxs("div", { className: "ui-choice-content", children: [
@@ -11,10 +11,11 @@ function ChoiceField({ id, label, description, className, children }) {
11
11
  ] })
12
12
  ] });
13
13
  }
14
+ var ChoiceField = Field;
14
15
 
15
16
  // src/components/data-entry/choice-option.ts
16
17
  function choiceGroupClassName(_orientation = "vertical", className) {
17
18
  return cn("ui-choice-group", className);
18
19
  }
19
20
 
20
- export { ChoiceField, choiceGroupClassName };
21
+ export { ChoiceField, Field, choiceGroupClassName };
@@ -1,5 +1,5 @@
1
1
  import { Input } from './chunk-VOHTRR5X.js';
2
- import { controlIconClass } from './chunk-ICM6XBST.js';
2
+ import { controlIconClass } from './chunk-IBK5D2Q6.js';
3
3
  import { useTranslation } from './chunk-RLGHEV4A.js';
4
4
  import { cn } from './chunk-U7N2A7A3.js';
5
5
  import * as React from 'react';
@@ -12,7 +12,7 @@ function normalizeHex(value) {
12
12
  }
13
13
  function ColorPicker({
14
14
  value = "#2563eb",
15
- onChange,
15
+ onValueChange,
16
16
  disabled,
17
17
  className,
18
18
  id,
@@ -28,7 +28,7 @@ function ColorPicker({
28
28
  return;
29
29
  }
30
30
  setDraft(null);
31
- onChange?.(normalized);
31
+ onValueChange?.(normalized);
32
32
  };
33
33
  return /* @__PURE__ */ jsxs("div", { className: cn("ui-color-picker", className), children: [
34
34
  /* @__PURE__ */ jsxs("div", { className: cn("ui-color-picker-swatch", controlIconClass), children: [
@@ -1,4 +1,4 @@
1
- import { tableHeadHeightClass } from './chunk-ICM6XBST.js';
1
+ import { tableHeadHeightClass } from './chunk-IBK5D2Q6.js';
2
2
  import { cn } from './chunk-U7N2A7A3.js';
3
3
  import * as React from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -1,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, useOptionalAppContext, APP_LOCALES, resolveTimezonePickerOptions, getTimezoneLabel, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel } from './chunk-RLGHEV4A.js';
4
4
  import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-FXFJF4YA.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
@@ -8,27 +8,29 @@ import { jsxs, jsx } from 'react/jsx-runtime';
8
8
  import { Link } from 'react-router-dom';
9
9
  import * as React from 'react';
10
10
 
11
- function FilterBar({
11
+ function Toolbar({
12
12
  onClear,
13
13
  hasActiveFilters = true,
14
14
  className,
15
15
  children
16
16
  }) {
17
17
  const { t } = useTranslation();
18
- return /* @__PURE__ */ jsxs("div", { className: cn("ui-filter-bar", className), children: [
18
+ return /* @__PURE__ */ jsxs("div", { className: cn("ui-toolbar", className), children: [
19
19
  children,
20
- onClear && hasActiveFilters && /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: onClear, className: "ui-filter-clear", children: [
20
+ onClear && hasActiveFilters && /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: onClear, className: "ui-toolbar-clear", children: [
21
21
  /* @__PURE__ */ jsx(X, { "aria-hidden": "true" }),
22
22
  t("common.clearFilters")
23
23
  ] })
24
24
  ] });
25
25
  }
26
- function FilterGroup({ label, className, children }) {
27
- return /* @__PURE__ */ jsxs("div", { className: cn("ui-stack-xs ui-filter-group", className), children: [
28
- /* @__PURE__ */ jsx("div", { className: "ui-filter-label", children: label }),
26
+ function ToolbarGroup({ label, className, children }) {
27
+ return /* @__PURE__ */ jsxs("div", { className: cn("ui-stack-xs ui-toolbar-group", className), children: [
28
+ /* @__PURE__ */ jsx("div", { className: "ui-toolbar-label", children: label }),
29
29
  children
30
30
  ] });
31
31
  }
32
+ var FilterBar = Toolbar;
33
+ var FilterGroup = ToolbarGroup;
32
34
  function PageHeader({ title, description, breadcrumb, actions, className }) {
33
35
  return /* @__PURE__ */ jsxs("header", { className: cn("ui-page-header", className), children: [
34
36
  breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "ui-breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: "ui-breadcrumb-list", children: breadcrumb.map((item, i) => {
@@ -54,13 +56,13 @@ function PageHeader({ title, description, breadcrumb, actions, className }) {
54
56
  ] })
55
57
  ] });
56
58
  }
57
- function LocalePicker({ className, disabled, id, value, onChange }) {
59
+ function LocalePicker({ className, disabled, id, value, onValueChange }) {
58
60
  const ctx = useOptionalAppContext();
59
61
  const { t } = useTranslation();
60
62
  const current = value ?? ctx?.locale;
61
- const handleChange = onChange ?? ctx?.setLocale;
63
+ const handleChange = onValueChange ?? ctx?.setLocale;
62
64
  if (current === void 0 || !handleChange) {
63
- throw new Error("LocalePicker requires <AppProvider> or controlled value + onChange");
65
+ throw new Error("LocalePicker requires <AppProvider> or controlled value + onValueChange");
64
66
  }
65
67
  return /* @__PURE__ */ jsxs(Select, { value: current, onValueChange: handleChange, disabled, children: [
66
68
  /* @__PURE__ */ jsxs(
@@ -83,16 +85,16 @@ function TimezonePicker({
83
85
  disabled,
84
86
  id,
85
87
  value,
86
- onChange,
88
+ onValueChange,
87
89
  options: optionsProp
88
90
  }) {
89
91
  const ctx = useOptionalAppContext();
90
92
  const { t, locale, fallbackLocale } = useTranslation();
91
93
  const current = value ?? ctx?.timezone;
92
- const handleChange = onChange ?? ctx?.setTimezone;
94
+ const handleChange = onValueChange ?? ctx?.setTimezone;
93
95
  const configured = optionsProp ?? ctx?.timezoneOptions;
94
96
  if (current === void 0 || !handleChange) {
95
- throw new Error("TimezonePicker requires <AppProvider> or controlled value + onChange");
97
+ throw new Error("TimezonePicker requires <AppProvider> or controlled value + onValueChange");
96
98
  }
97
99
  const options = React.useMemo(
98
100
  () => resolveTimezonePickerOptions(configured, current),
@@ -119,14 +121,14 @@ function TimeFormatPicker({
119
121
  disabled,
120
122
  id,
121
123
  value,
122
- onChange
124
+ onValueChange
123
125
  }) {
124
126
  const ctx = useOptionalAppContext();
125
127
  const { t, locale, fallbackLocale } = useTranslation();
126
128
  const current = value ?? ctx?.timeFormat;
127
- const handleChange = onChange ?? ctx?.setTimeFormat;
129
+ const handleChange = onValueChange ?? ctx?.setTimeFormat;
128
130
  if (current === void 0 || !handleChange) {
129
- throw new Error("TimeFormatPicker requires <AppProvider> or controlled value + onChange");
131
+ throw new Error("TimeFormatPicker requires <AppProvider> or controlled value + onValueChange");
130
132
  }
131
133
  return /* @__PURE__ */ jsxs(Select, { value: current, onValueChange: handleChange, disabled, children: [
132
134
  /* @__PURE__ */ jsxs(
@@ -149,14 +151,14 @@ function DateFormatPicker({
149
151
  disabled,
150
152
  id,
151
153
  value,
152
- onChange
154
+ onValueChange
153
155
  }) {
154
156
  const ctx = useOptionalAppContext();
155
157
  const { t, locale, fallbackLocale } = useTranslation();
156
158
  const current = value ?? ctx?.dateFormat;
157
- const handleChange = onChange ?? ctx?.setDateFormat;
159
+ const handleChange = onValueChange ?? ctx?.setDateFormat;
158
160
  if (current === void 0 || !handleChange) {
159
- throw new Error("DateFormatPicker requires <AppProvider> or controlled value + onChange");
161
+ throw new Error("DateFormatPicker requires <AppProvider> or controlled value + onValueChange");
160
162
  }
161
163
  return /* @__PURE__ */ jsxs(Select, { value: current, onValueChange: handleChange, disabled, children: [
162
164
  /* @__PURE__ */ jsxs(
@@ -175,4 +177,4 @@ function DateFormatPicker({
175
177
  ] });
176
178
  }
177
179
 
178
- export { DateFormatPicker, FilterBar, FilterGroup, LocalePicker, PageHeader, TimeFormatPicker, TimezonePicker };
180
+ export { DateFormatPicker, FilterBar, FilterGroup, LocalePicker, PageHeader, TimeFormatPicker, TimezonePicker, Toolbar, ToolbarGroup };
@@ -1,7 +1,7 @@
1
- import { Command, CommandList, CommandItem, CommandGroup } from './chunk-V6UWJKZF.js';
1
+ import { Command, CommandList, CommandItem, CommandGroup } from './chunk-HTEL5DQI.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 } from './chunk-RLGHEV4A.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import * as React from 'react';
@@ -11,7 +11,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
11
11
  var DEBOUNCE_MS = 250;
12
12
  function SearchSelect({
13
13
  value = "",
14
- onChange,
14
+ onValueChange,
15
15
  options: staticOptions,
16
16
  loadOptions,
17
17
  renderOption,
@@ -103,12 +103,12 @@ function SearchSelect({
103
103
  const select = (option) => {
104
104
  if (option.disabled) return;
105
105
  setPicked(option);
106
- onChange?.(option.value, option);
106
+ onValueChange?.(option.value, option);
107
107
  setOpen(false);
108
108
  };
109
109
  const clear = () => {
110
110
  setPicked(null);
111
- onChange?.("", void 0);
111
+ onValueChange?.("", void 0);
112
112
  setOpen(false);
113
113
  };
114
114
  const onScroll = (event) => {
@@ -1,9 +1,9 @@
1
1
  import { normalizeTreeOptions, collectAllExpandableKeys, filterVisibleTree, flattenVisibleTree, findNodeByValue, reactNodeText, getDescendantValues } 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 } 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';
@@ -38,7 +38,7 @@ function TreeSelectRoot({
38
38
  treeData: treeDataProp,
39
39
  value,
40
40
  defaultValue,
41
- onChange,
41
+ onValueChange,
42
42
  multiple,
43
43
  treeCheckable,
44
44
  treeCheckStrictly,
@@ -73,7 +73,7 @@ function TreeSelectRoot({
73
73
  }, [options, expandedKeys, search, showSearch]);
74
74
  const commit = (next) => {
75
75
  if (!isControlled) setInternal(next);
76
- onChange?.(checkable || multiple ? next : next[0] ?? void 0);
76
+ onValueChange?.(checkable || multiple ? next : next[0] ?? void 0);
77
77
  };
78
78
  const toggleExpand = (key) => {
79
79
  setExpandedKeys((prev) => {
@@ -1,12 +1,12 @@
1
- import { Inline, densityClass } from './chunk-S66TJXJU.js';
2
- import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-ZS6DTAM2.js';
3
- import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass, toneNeutralClass, toneInfoClass, toneDestructiveClass, toneWarningClass, toneSuccessClass } from './chunk-ICM6XBST.js';
4
- import { Button } from './chunk-HJEBRCXL.js';
1
+ import { Inline, densityClass } from './chunk-TILFZBTE.js';
2
+ import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-4MMIMZMK.js';
3
+ import { Button } from './chunk-M4PZNAMV.js';
4
+ import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass } from './chunk-IBK5D2Q6.js';
5
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
- import { Layers, Layers2, ArrowUp, ArrowDown, ChevronsUpDown, MoreHorizontal, XCircle, Pause, CheckCircle2, Circle, Trash2, AlertCircle, Clock, Play } from 'lucide-react';
9
8
  import * as React from 'react';
9
+ import { Layers, Layers2, ArrowUp, ArrowDown, ChevronsUpDown, MoreHorizontal } from 'lucide-react';
10
10
 
11
11
  function EmptyState({ icon: Icon, title, description, action, className }) {
12
12
  return /* @__PURE__ */ jsxs("div", { "data-slot": "empty-state", className: cn("ui-empty-state", className), children: [
@@ -16,52 +16,11 @@ function EmptyState({ icon: Icon, title, description, action, className }) {
16
16
  action && /* @__PURE__ */ jsx("div", { children: action })
17
17
  ] });
18
18
  }
19
- var STATUS_MAP = {
20
- active: { tone: "success", icon: CheckCircle2 },
21
- completed: { tone: "success", icon: CheckCircle2 },
22
- delivered: { tone: "success", icon: CheckCircle2 },
23
- done: { tone: "success", icon: CheckCircle2 },
24
- permanent: { tone: "success", icon: CheckCircle2 },
25
- succeeded: { tone: "success", icon: CheckCircle2 },
26
- draft: { tone: "neutral", icon: Circle },
27
- pending: { tone: "warning", icon: Clock },
28
- scheduled: { tone: "info", icon: Clock },
29
- sending: { tone: "info", icon: Play },
30
- temporary: { tone: "warning", icon: Clock },
31
- bounced: { tone: "destructive", icon: AlertCircle },
32
- cancelled: { tone: "neutral", icon: Pause },
33
- deleted: { tone: "destructive", icon: Trash2 },
34
- failed: { tone: "destructive", icon: XCircle },
35
- private: { tone: "neutral", icon: Circle },
36
- internal: { tone: "info", icon: Circle },
37
- public: { tone: "info", icon: Circle },
38
- ASSIGNMENT_STATUS_ACTIVE: { tone: "success", icon: CheckCircle2 },
39
- ASSIGNMENT_STATUS_SUSPENDED: { tone: "warning", icon: Pause },
40
- ASSIGNMENT_STATUS_TERMINATED: { tone: "destructive", icon: XCircle }
41
- };
42
- var TONE_CLASSES = {
43
- success: toneSuccessClass,
44
- warning: toneWarningClass,
45
- destructive: toneDestructiveClass,
46
- info: toneInfoClass,
47
- neutral: toneNeutralClass
48
- };
49
- function StatusBadge({ status, className, label: labelOverride, tone, icon }) {
50
- const { t } = useTranslation();
51
- const def = STATUS_MAP[status] ?? { tone: "neutral", icon: Circle };
52
- const resolvedTone = tone ?? def.tone;
53
- const ResolvedIcon = icon === void 0 ? def.icon : icon;
54
- const resolvedLabel = labelOverride ?? (status in STATUS_MAP ? t(`status.${status}`) : status);
55
- return /* @__PURE__ */ jsxs("span", { "data-slot": "status-badge", className: cn(TONE_CLASSES[resolvedTone], className), children: [
56
- ResolvedIcon ? /* @__PURE__ */ jsx(ResolvedIcon, { "data-slot": "status-badge-icon", "aria-hidden": "true" }) : null,
57
- /* @__PURE__ */ jsx("span", { children: resolvedLabel })
58
- ] });
59
- }
60
- function KeyValueGrid({ columns = 2, className, children }) {
19
+ function Descriptions({ columns = 2, className, children }) {
61
20
  const colsClass = columns === 1 ? "grid-cols-1" : columns === 3 ? "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1 sm:grid-cols-2";
62
21
  return /* @__PURE__ */ jsx("dl", { className: cn("grid gap-x-6 gap-y-3", colsClass, className), children });
63
22
  }
64
- KeyValueGrid.Item = function KeyValueGridItem({
23
+ Descriptions.Item = function DescriptionsItem({
65
24
  label,
66
25
  mono,
67
26
  span,
@@ -412,4 +371,4 @@ DataTable.RowActions = function DataTableRowActions({ ariaLabel, children }) {
412
371
  };
413
372
  DataTable.RowActions.displayName = "DataTable.RowActions";
414
373
 
415
- export { DataTable, EmptyState, KeyValueGrid, StatusBadge };
374
+ export { DataTable, Descriptions, EmptyState };
@@ -0,0 +1,57 @@
1
+ import { tableCellPaddingClass, tableRowHeightClass } from './chunk-IBK5D2Q6.js';
2
+ import { cn } from './chunk-U7N2A7A3.js';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+
5
+ function Skeleton({ className, ...props }) {
6
+ return /* @__PURE__ */ jsx(
7
+ "div",
8
+ {
9
+ "aria-busy": "true",
10
+ "aria-live": "polite",
11
+ className: cn("ui-skeleton-block", className),
12
+ ...props
13
+ }
14
+ );
15
+ }
16
+ function SkeletonRows({ rows = 6, columns = 4, className }) {
17
+ return /* @__PURE__ */ jsx("div", { className: cn("ui-skeleton-rows", className), "aria-busy": "true", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "ui-skeleton-row", children: Array.from({ length: columns }).map((_2, j) => /* @__PURE__ */ jsx(
18
+ Skeleton,
19
+ {
20
+ className: cn("h-4", j === 0 ? "w-1/4" : j === columns - 1 ? "w-1/6" : "flex-1")
21
+ },
22
+ j
23
+ )) }, i)) });
24
+ }
25
+ function SkeletonTable({ rows = 8, columns = 5 }) {
26
+ return /* @__PURE__ */ jsxs("div", { className: "ui-skeleton-table", "aria-busy": "true", children: [
27
+ /* @__PURE__ */ jsx("div", { className: cn("ui-skeleton-table-head", tableCellPaddingClass, tableRowHeightClass), children: Array.from({ length: columns }).map((_, j) => /* @__PURE__ */ jsx(Skeleton, { className: cn("h-3", j === 0 ? "w-1/5" : "flex-1") }, j)) }),
28
+ /* @__PURE__ */ jsx("div", { className: "ui-skeleton-table-body", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ className: cn("ui-skeleton-table-row", tableCellPaddingClass, tableRowHeightClass),
32
+ children: Array.from({ length: columns }).map((_2, j) => /* @__PURE__ */ jsx(Skeleton, { className: cn("h-4", j === 0 ? "w-1/5" : "flex-1") }, j))
33
+ },
34
+ i
35
+ )) })
36
+ ] });
37
+ }
38
+ function SkeletonDetail() {
39
+ return /* @__PURE__ */ jsxs("div", { className: "ui-skeleton-detail ui-skeleton-detail-stack", "aria-busy": "true", children: [
40
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-1/3" }),
41
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/2" }),
42
+ /* @__PURE__ */ jsx("div", { className: "ui-skeleton-detail-box ui-skeleton-detail-stack", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "ui-skeleton-detail-stack", children: [
43
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-24" }),
44
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full max-w-md" })
45
+ ] }, i)) })
46
+ ] });
47
+ }
48
+ function SkeletonStat() {
49
+ return /* @__PURE__ */ jsxs("div", { className: "ui-skeleton-stat", "aria-busy": "true", children: [
50
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-24" }),
51
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[length:var(--control-height)] w-32" }),
52
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-20" })
53
+ ] });
54
+ }
55
+ var SkeletonCard = SkeletonStat;
56
+
57
+ export { Skeleton, SkeletonCard, SkeletonDetail, SkeletonRows, SkeletonStat, SkeletonTable };
@@ -0,0 +1,40 @@
1
+ import { toast as toast$1 } from 'sonner';
2
+
3
+ // src/components/feedback/use-toast.ts
4
+ function nodeText(value) {
5
+ if (value == null) return "";
6
+ if (typeof value === "string") return value;
7
+ if (typeof value === "number" || typeof value === "boolean") return String(value);
8
+ return "";
9
+ }
10
+ function legacyToast(options) {
11
+ const { title, description, variant, ...rest } = options;
12
+ const titleText = nodeText(title);
13
+ const descText = nodeText(description);
14
+ const message = titleText || descText;
15
+ const desc = titleText && descText ? descText : void 0;
16
+ const sonnerOptions = { ...rest, description: desc };
17
+ switch (variant) {
18
+ case "destructive":
19
+ return toast$1.error(message, sonnerOptions);
20
+ case "success":
21
+ return toast$1.success(message, sonnerOptions);
22
+ default:
23
+ return toast$1(message, sonnerOptions);
24
+ }
25
+ }
26
+ var toast = Object.assign((messageOrOptions) => {
27
+ if (typeof messageOrOptions === "string") {
28
+ return toast$1(messageOrOptions);
29
+ }
30
+ return legacyToast(messageOrOptions);
31
+ }, toast$1);
32
+ function useToast() {
33
+ return {
34
+ toast: (options) => legacyToast(options),
35
+ dismiss: toast$1.dismiss,
36
+ toasts: []
37
+ };
38
+ }
39
+
40
+ export { toast, useToast };