@yuno-payments/dashboard-design-system 0.0.170 → 0.0.171

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 (161) hide show
  1. package/dist/components/atoms/access-denied-alert/access-denied-alert.d.ts +16 -0
  2. package/dist/components/atoms/accordion/accordion.d.ts +66 -0
  3. package/dist/components/atoms/alert/alert.d.ts +26 -1
  4. package/dist/components/atoms/alert/alert.js +9 -8
  5. package/dist/components/atoms/avatar/avatar-group.d.ts +28 -0
  6. package/dist/components/atoms/avatar/avatar.d.ts +25 -0
  7. package/dist/components/atoms/avatar/avatar.js +9 -9
  8. package/dist/components/atoms/badge/badge.d.ts +30 -2
  9. package/dist/components/atoms/badge/badge.js +27 -11
  10. package/dist/components/atoms/button/button.d.ts +44 -0
  11. package/dist/components/atoms/card/card.d.ts +137 -3
  12. package/dist/components/atoms/card/card.js +56 -28
  13. package/dist/components/atoms/checkbox/checkbox.d.ts +38 -2
  14. package/dist/components/atoms/checkbox/checkbox.js +61 -27
  15. package/dist/components/atoms/combobox/combobox.d.ts +18 -0
  16. package/dist/components/atoms/combobox/combobox.js +41 -41
  17. package/dist/components/atoms/combobox/types.d.ts +90 -1
  18. package/dist/components/atoms/currency-field/currency-field.d.ts +38 -0
  19. package/dist/components/atoms/currency-field/currency-field.js +22 -19
  20. package/dist/components/atoms/date-picker/date-picker.d.ts +15 -0
  21. package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +15 -0
  22. package/dist/components/atoms/dots-menu/dots-menu.d.ts +16 -0
  23. package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
  24. package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +52 -0
  25. package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +50 -0
  26. package/dist/components/atoms/field/field.d.ts +55 -0
  27. package/dist/components/atoms/field/field.js +53 -46
  28. package/dist/components/atoms/filter/filter-date-range.d.ts +12 -2
  29. package/dist/components/atoms/filter/filter-date-range.js +203 -168
  30. package/dist/components/atoms/filter/filter.d.ts +6 -0
  31. package/dist/components/atoms/filter/filter.js +91 -76
  32. package/dist/components/atoms/filter/index.d.ts +1 -1
  33. package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +208 -2
  34. package/dist/components/atoms/filter-dropdown/filter-dropdown.js +214 -160
  35. package/dist/components/atoms/icon/aida-logo.d.ts +3 -0
  36. package/dist/components/atoms/icon/aida-logo.js +64 -0
  37. package/dist/components/atoms/icon/icon-list.d.ts +5 -0
  38. package/dist/components/atoms/icon/icon-list.js +394 -384
  39. package/dist/components/atoms/icon/icon.d.ts +29 -0
  40. package/dist/components/atoms/index.d.ts +3 -2
  41. package/dist/components/atoms/label/index.d.ts +1 -1
  42. package/dist/components/atoms/label/label.d.ts +11 -0
  43. package/dist/components/atoms/label/label.js +28 -0
  44. package/dist/components/atoms/link/link.d.ts +20 -0
  45. package/dist/components/atoms/loading/index.d.ts +1 -0
  46. package/dist/components/atoms/loading/loading.d.ts +39 -0
  47. package/dist/components/atoms/loading/loading.js +37 -0
  48. package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
  49. package/dist/components/atoms/multi-select/multi-select.js +6 -6
  50. package/dist/components/atoms/multi-values-field/multi-values-field.d.ts +16 -0
  51. package/dist/components/atoms/multi-values-field/multi-values-field.js +109 -87
  52. package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +81 -0
  53. package/dist/components/atoms/otp-field/otp-field.d.ts +32 -0
  54. package/dist/components/atoms/password-field/password-field.d.ts +23 -0
  55. package/dist/components/atoms/password-field/password-field.js +1 -1
  56. package/dist/components/atoms/progress/progress.d.ts +15 -0
  57. package/dist/components/atoms/protected-field/protected-field.d.ts +10 -0
  58. package/dist/components/atoms/protected-field/protected-field.types.d.ts +14 -0
  59. package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
  60. package/dist/components/atoms/radio-group/radio-group.d.ts +50 -1
  61. package/dist/components/atoms/radio-group/radio-group.js +13 -12
  62. package/dist/components/atoms/search-field/search-field.d.ts +14 -0
  63. package/dist/components/atoms/search-field/search-field.js +17 -17
  64. package/dist/components/atoms/search-field/search-field.types.d.ts +57 -0
  65. package/dist/components/atoms/select/index.d.ts +2 -0
  66. package/dist/components/atoms/select/search-select.d.ts +22 -0
  67. package/dist/components/atoms/select/search-select.js +201 -0
  68. package/dist/components/atoms/select/select.d.ts +83 -1
  69. package/dist/components/atoms/select/select.js +21 -21
  70. package/dist/components/atoms/separator/separator.d.ts +17 -0
  71. package/dist/components/atoms/skeleton/index.d.ts +9 -0
  72. package/dist/components/atoms/switch/switch.d.ts +56 -2
  73. package/dist/components/atoms/switch/switch.js +64 -32
  74. package/dist/components/atoms/tabs/index.d.ts +16 -0
  75. package/dist/components/atoms/textarea/textarea.d.ts +32 -0
  76. package/dist/components/atoms/textarea/textarea.js +1 -1
  77. package/dist/components/atoms/time-picker/time-picker.d.ts +73 -2
  78. package/dist/components/atoms/time-picker/time-picker.js +218 -3
  79. package/dist/components/atoms/toaster/index.d.ts +15 -0
  80. package/dist/components/atoms/toggle-group/toggle-group.d.ts +26 -1
  81. package/dist/components/atoms/toggle-group/toggle-group.js +15 -14
  82. package/dist/components/atoms/tooltip/tooltip.d.ts +53 -2
  83. package/dist/components/atoms/typography/typography.d.ts +18 -0
  84. package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +50 -0
  85. package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
  86. package/dist/components/molecules/dialog-content/dialog-content.d.ts +16 -0
  87. package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +20 -0
  88. package/dist/components/molecules/dialog-header/dialog-header.d.ts +31 -0
  89. package/dist/components/molecules/empty/empty-icon.js +6 -6
  90. package/dist/components/molecules/empty/empty.d.ts +16 -1
  91. package/dist/components/molecules/empty/empty.js +37 -34
  92. package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +17 -0
  93. package/dist/components/molecules/pagination/pagination.d.ts +49 -0
  94. package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +41 -0
  95. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-content.js +1 -1
  96. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +18 -18
  97. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts +18 -0
  98. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +10 -10
  99. package/dist/components/organisms/data-table/components/data-table-body.d.ts +18 -0
  100. package/dist/components/organisms/data-table/components/data-table-header.d.ts +12 -0
  101. package/dist/components/organisms/data-table/components/data-table-header.js +7 -7
  102. package/dist/components/organisms/data-table/components/states/data-table-loading.d.ts +24 -0
  103. package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
  104. package/dist/components/organisms/data-table/data-table.d.ts +133 -4
  105. package/dist/components/organisms/data-table/data-table.js +132 -100
  106. package/dist/components/organisms/data-table/data-table.types.d.ts +35 -26
  107. package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +57 -41
  108. package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +8 -2
  109. package/dist/components/organisms/data-table/hooks/use-data-table-state.js +82 -47
  110. package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +8 -2
  111. package/dist/components/organisms/data-table/utils/data-table-constants.js +16 -10
  112. package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +1652 -0
  113. package/dist/components/organisms/data-table/utils/data-table-styles.js +29 -14
  114. package/dist/components/organisms/dialog/dialog.d.ts +67 -1
  115. package/dist/components/organisms/dialog/dialog.js +78 -61
  116. package/dist/components/organisms/index.d.ts +2 -0
  117. package/dist/components/organisms/sheet/sheet.d.ts +69 -0
  118. package/dist/components/organisms/sheet/sheet.js +34 -33
  119. package/dist/components/organisms/tutorial/index.d.ts +2 -0
  120. package/dist/components/organisms/tutorial/tutorial.d.ts +16 -0
  121. package/dist/components/organisms/tutorial/tutorial.js +114 -0
  122. package/dist/components/organisms/tutorial/tutorial.types.d.ts +15 -0
  123. package/dist/hooks/index.d.ts +3 -0
  124. package/dist/hooks/use-body-scroll-lock.d.ts +13 -0
  125. package/dist/hooks/use-escape-key.d.ts +14 -0
  126. package/dist/hooks/use-media-query.d.ts +20 -0
  127. package/dist/hooks/use-media-query.js +21 -0
  128. package/dist/index.css +1 -1
  129. package/dist/index.d.ts +2 -0
  130. package/dist/index.js +173 -162
  131. package/dist/lib/notification-alert.d.ts +42 -0
  132. package/dist/lib/notification-alert.js +75 -0
  133. package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +8 -0
  134. package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +8 -0
  135. package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +8 -0
  136. package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +8 -0
  137. package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +30 -0
  138. package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +36 -0
  139. package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +36 -0
  140. package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +30 -0
  141. package/dist/vendor/shadcn/avatar.js +19 -19
  142. package/dist/vendor/shadcn/badge.js +15 -15
  143. package/dist/vendor/shadcn/card.js +7 -7
  144. package/dist/vendor/shadcn/date-picker.d.ts +2 -2
  145. package/dist/vendor/shadcn/date-picker.js +1 -1
  146. package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
  147. package/dist/vendor/shadcn/date-range-picker.js +1 -1
  148. package/dist/vendor/shadcn/dialog.js +2 -2
  149. package/dist/vendor/shadcn/input-group.js +17 -17
  150. package/dist/vendor/shadcn/input.js +7 -7
  151. package/dist/vendor/shadcn/popover.js +1 -1
  152. package/dist/vendor/shadcn/select.js +2 -2
  153. package/dist/vendor/shadcn/sonner.d.ts +26 -1
  154. package/dist/vendor/shadcn/sonner.js +12 -8
  155. package/dist/vendor/shadcn/table.js +30 -30
  156. package/dist/vendor/shadcn/textarea.js +9 -9
  157. package/dist/vendor/shadcn/time-picker.d.ts +1 -2
  158. package/dist/vendor/shadcn/time-picker.js +17 -23
  159. package/dist/vendor/shadcn/toggle.js +13 -13
  160. package/dist/vendor/shadcn/tooltip.js +25 -15
  161. package/package.json +1 -1
@@ -0,0 +1,201 @@
1
+ import { j as e } from "../../../_virtual/jsx-runtime.js";
2
+ import * as n from "react";
3
+ import { cn as a } from "../../../lib/utils.js";
4
+ import { FieldLabel as A } from "../../../vendor/shadcn/field.js";
5
+ import { Icon as b } from "../icon/icon.js";
6
+ import { Combobox as B, ComboboxTrigger as H, ComboboxContent as J } from "../../../vendor/shadcn/combobox.js";
7
+ import { Command as K, CommandInput as M, CommandList as P, CommandEmpty as Q, CommandGroup as U, CommandItem as k } from "../../../vendor/shadcn/command.js";
8
+ import { Typography as x } from "../typography/typography.js";
9
+ const W = n.forwardRef(
10
+ ({
11
+ label: j,
12
+ description: N,
13
+ error: u,
14
+ optional: G = !1,
15
+ placeholder: L = "Select an option",
16
+ value: r,
17
+ defaultValue: p,
18
+ onChange: h,
19
+ disabled: f = !1,
20
+ options: c = [],
21
+ groups: o = [],
22
+ className: E,
23
+ id: g,
24
+ searchPlaceholder: z = "Search...",
25
+ maxHeight: F = 300
26
+ }, I) => {
27
+ const [i, C] = n.useState(!1), [v, S] = n.useState(""), d = o.length > 0, w = c.length > 0, R = n.useCallback(() => {
28
+ if (!r) return null;
29
+ if (d)
30
+ for (const s of o) {
31
+ const l = s.options.find((t) => t.value === r);
32
+ if (l) return l.label;
33
+ }
34
+ else if (w) {
35
+ const s = c.find((l) => l.value === r);
36
+ if (s) return s.label;
37
+ }
38
+ return null;
39
+ }, [r, o, c, d, w]), T = n.useCallback(
40
+ (s) => {
41
+ if (!s)
42
+ return { filteredOptions: c, filteredGroups: o };
43
+ const l = s.toLowerCase();
44
+ if (d) {
45
+ const t = o.map((m) => ({
46
+ ...m,
47
+ options: m.options.filter(
48
+ (V) => V.label.toLowerCase().includes(l)
49
+ )
50
+ })).filter((m) => m.options.length > 0);
51
+ return { filteredOptions: [], filteredGroups: t };
52
+ } else
53
+ return { filteredOptions: c.filter(
54
+ (m) => m.label.toLowerCase().includes(l)
55
+ ), filteredGroups: [] };
56
+ },
57
+ [c, o, d]
58
+ ), { filteredOptions: q, filteredGroups: D } = T(v);
59
+ n.useEffect(() => {
60
+ i && setTimeout(() => {
61
+ document.querySelector(
62
+ '[data-slot="command-input"]'
63
+ )?.focus();
64
+ }, 0);
65
+ }, [i]), n.useEffect(() => {
66
+ i || S("");
67
+ }, [i]), n.useEffect(() => {
68
+ p && !r && h?.(p);
69
+ }, [p, r, h]);
70
+ const y = (s) => {
71
+ f || (h?.(s), C(!1));
72
+ }, O = R();
73
+ return /* @__PURE__ */ e.jsxs("div", { className: a("w-full", E), children: [
74
+ j && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 mb-2", children: [
75
+ /* @__PURE__ */ e.jsx(A, { htmlFor: g, className: a(f && "text-muted-foreground"), children: j }),
76
+ G && /* @__PURE__ */ e.jsx(x, { variant: "sm", className: "text-muted-foreground", children: "(Optional)" })
77
+ ] }),
78
+ N && !u && /* @__PURE__ */ e.jsx(
79
+ x,
80
+ {
81
+ variant: "sm",
82
+ className: a(
83
+ "text-muted-foreground mb-2",
84
+ f && "text-muted-"
85
+ ),
86
+ children: N
87
+ }
88
+ ),
89
+ /* @__PURE__ */ e.jsxs(B, { open: i, onOpenChange: C, children: [
90
+ /* @__PURE__ */ e.jsx(H, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
91
+ "button",
92
+ {
93
+ ref: I,
94
+ id: g,
95
+ type: "button",
96
+ disabled: f,
97
+ role: "combobox",
98
+ "aria-expanded": i,
99
+ "aria-haspopup": "listbox",
100
+ className: a(
101
+ "flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:text-muted- shadow-xs [&>span]:min-w-0 [&>span]:truncate",
102
+ u && "border-destructive"
103
+ ),
104
+ children: [
105
+ /* @__PURE__ */ e.jsx(
106
+ "span",
107
+ {
108
+ className: a(
109
+ "truncate",
110
+ !O && "text-muted-foreground"
111
+ ),
112
+ children: O || L
113
+ }
114
+ ),
115
+ /* @__PURE__ */ e.jsx(
116
+ b,
117
+ {
118
+ name: "CaretDown",
119
+ size: "sm",
120
+ className: "text-muted- shrink-0"
121
+ }
122
+ )
123
+ ]
124
+ }
125
+ ) }),
126
+ /* @__PURE__ */ e.jsx(J, { className: "p-0", align: "start", children: /* @__PURE__ */ e.jsxs(K, { shouldFilter: !1, children: [
127
+ /* @__PURE__ */ e.jsx(
128
+ M,
129
+ {
130
+ placeholder: z,
131
+ value: v,
132
+ onValueChange: S
133
+ }
134
+ ),
135
+ /* @__PURE__ */ e.jsxs(P, { style: { maxHeight: F }, children: [
136
+ /* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(
137
+ x,
138
+ {
139
+ variant: "sm",
140
+ className: "text-muted-foreground py-6 text-center",
141
+ children: "No results found."
142
+ }
143
+ ) }),
144
+ d ? D.map((s, l) => /* @__PURE__ */ e.jsxs(U, { children: [
145
+ s.label && /* @__PURE__ */ e.jsx("div", { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: s.label }),
146
+ s.options.map((t) => /* @__PURE__ */ e.jsxs(
147
+ k,
148
+ {
149
+ value: t.value,
150
+ onSelect: () => y(t.value),
151
+ className: a(
152
+ "cursor-pointer",
153
+ r === t.value && "bg-accent"
154
+ ),
155
+ children: [
156
+ /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
157
+ t.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: t.icon }),
158
+ t.label
159
+ ] }),
160
+ r === t.value && /* @__PURE__ */ e.jsx(
161
+ b,
162
+ {
163
+ name: "Check",
164
+ size: "sm",
165
+ className: "ml-auto"
166
+ }
167
+ )
168
+ ]
169
+ },
170
+ t.value
171
+ ))
172
+ ] }, l)) : q.map((s) => /* @__PURE__ */ e.jsxs(
173
+ k,
174
+ {
175
+ value: s.value,
176
+ onSelect: () => y(s.value),
177
+ className: a(
178
+ "cursor-pointer",
179
+ r === s.value && "bg-accent"
180
+ ),
181
+ children: [
182
+ /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
183
+ s.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: s.icon }),
184
+ s.label
185
+ ] }),
186
+ r === s.value && /* @__PURE__ */ e.jsx(b, { name: "Check", size: "sm", className: "ml-auto" })
187
+ ]
188
+ },
189
+ s.value
190
+ ))
191
+ ] })
192
+ ] }) })
193
+ ] }),
194
+ u && /* @__PURE__ */ e.jsx(x, { variant: "sm", className: "text-destructive mt-2", children: u })
195
+ ] });
196
+ }
197
+ );
198
+ W.displayName = "SearchSelect";
199
+ export {
200
+ W as SearchSelect
201
+ };
@@ -1,28 +1,110 @@
1
1
  import * as React from "react";
2
+ /**
3
+ * Represents a single option in the select dropdown
4
+ */
2
5
  export interface SelectOption {
6
+ /**
7
+ * Unique value for this option
8
+ */
3
9
  value: string;
10
+ /**
11
+ * Display label for this option
12
+ */
4
13
  label: string;
14
+ /**
15
+ * Optional icon to display before the label
16
+ */
5
17
  icon?: React.ReactNode;
6
18
  }
19
+ /**
20
+ * Represents a group of options in the select dropdown
21
+ */
7
22
  export interface SelectOptionGroup {
23
+ /**
24
+ * Optional label for the group
25
+ */
8
26
  label?: string;
27
+ /**
28
+ * Array of options in this group
29
+ */
9
30
  options: SelectOption[];
10
31
  }
32
+ /**
33
+ * Props for the Select component
34
+ */
11
35
  export interface SelectProps {
36
+ /**
37
+ * Label text displayed above the select
38
+ */
12
39
  label?: string;
40
+ /**
41
+ * Helper text displayed below the select
42
+ */
13
43
  description?: string;
44
+ /**
45
+ * Error message displayed below the select
46
+ */
14
47
  error?: string;
48
+ /**
49
+ * Whether to show "(Optional)" next to the label
50
+ * @default false
51
+ */
15
52
  optional?: boolean;
53
+ /**
54
+ * Placeholder text shown when no option is selected
55
+ * @default "Select an option"
56
+ */
16
57
  placeholder?: string;
58
+ /**
59
+ * Controlled value of the select
60
+ */
17
61
  value?: string;
62
+ /**
63
+ * Default value for uncontrolled mode
64
+ */
18
65
  defaultValue?: string;
19
- onValueChange?: (value: string) => void;
66
+ /**
67
+ * Callback fired when the selected value changes
68
+ */
69
+ onChange?: (value: string) => void;
70
+ /**
71
+ * Whether the select is disabled
72
+ * @default false
73
+ */
20
74
  disabled?: boolean;
75
+ /**
76
+ * Array of options (use either options or groups, not both)
77
+ */
21
78
  options?: SelectOption[];
79
+ /**
80
+ * Array of grouped options (use either options or groups, not both)
81
+ */
22
82
  groups?: SelectOptionGroup[];
83
+ /**
84
+ * Additional CSS classes for the container
85
+ */
23
86
  className?: string;
87
+ /**
88
+ * HTML id attribute for the select element
89
+ */
24
90
  id?: string;
25
91
  }
92
+ /**
93
+ * Select dropdown component with label, description, error handling, and grouped options support.
94
+ *
95
+ * @example
96
+ * ```tsx
97
+ * <Select
98
+ * label="Country"
99
+ * placeholder="Select a country"
100
+ * options={[
101
+ * { value: 'us', label: 'United States' },
102
+ * { value: 'mx', label: 'Mexico' }
103
+ * ]}
104
+ * onChange={(value) => console.log(value)}
105
+ * />
106
+ * ```
107
+ */
26
108
  declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLButtonElement>>;
27
109
  export { Select };
28
110
  export type { SelectProps };
@@ -1,19 +1,19 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
2
  import * as y from "react";
3
3
  import { cn as c } from "../../../lib/utils.js";
4
- import { Select as w, SelectTrigger as G, SelectValue as L, SelectContent as O, SelectGroup as R, SelectLabel as T, SelectItem as d } from "../../../vendor/shadcn/select.js";
5
- import { Label as C } from "../../../vendor/shadcn/label.js";
6
- import { Typography as r } from "../typography/typography.js";
7
- const E = y.forwardRef(
4
+ import { Select as w, SelectTrigger as C, SelectValue as G, SelectContent as L, SelectGroup as O, SelectLabel as R, SelectItem as d } from "../../../vendor/shadcn/select.js";
5
+ import { Label as T } from "../label/label.js";
6
+ import { Typography as n } from "../typography/typography.js";
7
+ const V = y.forwardRef(
8
8
  ({
9
- label: m,
10
- description: n,
9
+ label: r,
10
+ description: m,
11
11
  error: a,
12
12
  optional: j = !1,
13
13
  placeholder: f = "Select an option",
14
14
  value: u,
15
15
  defaultValue: o,
16
- onValueChange: p,
16
+ onChange: p,
17
17
  disabled: t = !1,
18
18
  options: i = [],
19
19
  groups: x = [],
@@ -22,19 +22,19 @@ const E = y.forwardRef(
22
22
  }, N) => {
23
23
  const S = x.length > 0, b = i.length > 0;
24
24
  return /* @__PURE__ */ e.jsxs("div", { className: c("w-full", v), children: [
25
- m && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 mb-2", children: [
26
- /* @__PURE__ */ e.jsx(C, { htmlFor: h, className: c(t && "opacity-50"), children: m }),
27
- j && /* @__PURE__ */ e.jsx(r, { variant: "sm", className: "text-muted-foreground", children: "(Optional)" })
25
+ r && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 mb-2", children: [
26
+ /* @__PURE__ */ e.jsx(T, { htmlFor: h, className: c(t && "opacity-50"), children: r }),
27
+ j && /* @__PURE__ */ e.jsx(n, { variant: "sm", className: "text-muted-foreground", children: "(Optional)" })
28
28
  ] }),
29
- n && !a && /* @__PURE__ */ e.jsx(
30
- r,
29
+ m && !a && /* @__PURE__ */ e.jsx(
30
+ n,
31
31
  {
32
32
  variant: "sm",
33
33
  className: c(
34
34
  "text-muted-foreground mb-2",
35
35
  t && "opacity-50"
36
36
  ),
37
- children: n
37
+ children: m
38
38
  }
39
39
  ),
40
40
  /* @__PURE__ */ e.jsxs(
@@ -46,18 +46,18 @@ const E = y.forwardRef(
46
46
  disabled: t,
47
47
  children: [
48
48
  /* @__PURE__ */ e.jsx(
49
- G,
49
+ C,
50
50
  {
51
51
  ref: N,
52
52
  id: h,
53
53
  className: c(a && "border-destructive"),
54
- children: /* @__PURE__ */ e.jsx(L, { placeholder: f })
54
+ children: /* @__PURE__ */ e.jsx(G, { placeholder: f })
55
55
  }
56
56
  ),
57
- /* @__PURE__ */ e.jsx(O, { children: S ? (
57
+ /* @__PURE__ */ e.jsx(L, { children: S ? (
58
58
  // Render grouped options
59
- x.map((l, g) => /* @__PURE__ */ e.jsxs(R, { children: [
60
- l.label && /* @__PURE__ */ e.jsx(T, { children: l.label }),
59
+ x.map((l, g) => /* @__PURE__ */ e.jsxs(O, { children: [
60
+ l.label && /* @__PURE__ */ e.jsx(R, { children: l.label }),
61
61
  l.options.map((s) => /* @__PURE__ */ e.jsxs(d, { value: s.value, children: [
62
62
  s.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: s.icon }),
63
63
  s.label
@@ -73,11 +73,11 @@ const E = y.forwardRef(
73
73
  ]
74
74
  }
75
75
  ),
76
- a && /* @__PURE__ */ e.jsx(r, { variant: "sm", className: "text-destructive mt-2", children: a })
76
+ a && /* @__PURE__ */ e.jsx(n, { variant: "sm", className: "text-destructive mt-2", children: a })
77
77
  ] });
78
78
  }
79
79
  );
80
- E.displayName = "Select";
80
+ V.displayName = "Select";
81
81
  export {
82
- E as Select
82
+ V as Select
83
83
  };
@@ -4,9 +4,26 @@ declare const dividerVariants: (props?: ({
4
4
  orientation?: "horizontal" | "vertical" | null | undefined;
5
5
  spacing?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ /**
8
+ * Props for the Separator component
9
+ */
7
10
  interface SeparatorProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof dividerVariants> {
11
+ /**
12
+ * Orientation of the separator
13
+ * @default "horizontal"
14
+ */
8
15
  orientation?: "horizontal" | "vertical";
9
16
  }
17
+ /**
18
+ * Visual separator line for dividing content sections.
19
+ * Supports horizontal/vertical orientations and spacing variants.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <Separator />
24
+ * <Separator orientation="vertical" spacing="md" />
25
+ * ```
26
+ */
10
27
  declare const Separator: {
11
28
  ({ className, orientation, spacing, ...props }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
12
29
  displayName: string;
@@ -1 +1,10 @@
1
+ /**
2
+ * Skeleton loader component for displaying placeholder content during loading states.
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * <Skeleton className="h-4 w-[250px]" />
7
+ * <Skeleton className="h-12 w-12 rounded-full" />
8
+ * ```
9
+ */
1
10
  export { Skeleton } from '../../../vendor/shadcn/skeleton';
@@ -1,10 +1,64 @@
1
1
  import { Switch as ShadcnSwitch } from '../../../vendor/shadcn/switch';
2
- import { ComponentProps } from 'react';
3
- export interface SwitchProps extends Omit<ComponentProps<typeof ShadcnSwitch>, "children"> {
2
+ import { ComponentProps, ChangeEvent } from 'react';
3
+ /**
4
+ * Props for the Switch component
5
+ */
6
+ export interface SwitchProps extends Omit<ComponentProps<typeof ShadcnSwitch>, "children" | "onCheckedChange" | "className" | "onChange"> {
7
+ /**
8
+ * Label text displayed next to the switch
9
+ */
4
10
  label: string;
11
+ /**
12
+ * Optional description text displayed below the label
13
+ */
5
14
  description?: string;
15
+ /**
16
+ * Position of the switch relative to the label
17
+ * @default "left"
18
+ */
6
19
  side?: "left" | "right";
20
+ /**
21
+ * Visual variant of the switch container
22
+ * - "default": minimal layout without background
23
+ * - "box": contained layout with background, border, and padding
24
+ * @default "default"
25
+ */
7
26
  variant?: "default" | "box";
27
+ /**
28
+ * Callback fired when the switch state changes
29
+ * Provides a synthetic ChangeEvent compatible with react-hook-form
30
+ */
31
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
32
+ /**
33
+ * Additional CSS classes to apply to the wrapper container
34
+ */
35
+ className?: string;
36
+ /**
37
+ * Additional CSS classes to apply to the switch element itself
38
+ */
39
+ switchClassName?: string;
40
+ /**
41
+ * Additional CSS classes to apply to the label element
42
+ */
43
+ labelClassName?: string;
44
+ /**
45
+ * Optional info icon with tooltip
46
+ */
47
+ info?: string;
8
48
  }
49
+ /**
50
+ * Toggle switch component with label and optional description.
51
+ * Supports left/right positioning and box variant for emphasized display.
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * <Switch
56
+ * label="Enable notifications"
57
+ * description="Receive email notifications for updates"
58
+ * checked={isEnabled}
59
+ * onChange={(e) => setIsEnabled(e.target.checked)}
60
+ * />
61
+ * ```
62
+ */
9
63
  declare const Switch: import('react').ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
10
64
  export { Switch };
@@ -1,47 +1,79 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { Switch as p } from "../../../vendor/shadcn/switch.js";
3
- import { forwardRef as f, useId as h } from "react";
4
- import { cn as w } from "../../../lib/utils.js";
5
- import { Label as u } from "../../../vendor/shadcn/label.js";
6
- const j = f(
2
+ import { Switch as v } from "../../../vendor/shadcn/switch.js";
3
+ import { forwardRef as N, useId as y } from "react";
4
+ import { cn as o } from "../../../lib/utils.js";
5
+ import { Label as S } from "../label/label.js";
6
+ const C = N(
7
7
  ({
8
- label: t,
9
- description: s,
10
- side: o = "left",
11
- variant: a = "default",
12
- id: i,
13
- name: l,
14
- ...c
15
- }, m) => {
16
- const x = h(), r = i || l || x, d = /* @__PURE__ */ e.jsx(
17
- p,
8
+ label: c,
9
+ description: a,
10
+ side: i = "left",
11
+ variant: l = "default",
12
+ id: d,
13
+ name: t,
14
+ onChange: n,
15
+ className: m,
16
+ switchClassName: x,
17
+ info: f,
18
+ labelClassName: p,
19
+ ...h
20
+ }, u) => {
21
+ const g = y(), r = d || t || g, w = (s) => {
22
+ if (!n) return;
23
+ n({
24
+ target: {
25
+ name: t || r,
26
+ checked: s,
27
+ type: "checkbox",
28
+ value: s ? "on" : "off"
29
+ },
30
+ currentTarget: {
31
+ name: t || r,
32
+ checked: s,
33
+ type: "checkbox",
34
+ value: s ? "on" : "off"
35
+ },
36
+ preventDefault: () => {
37
+ },
38
+ stopPropagation: () => {
39
+ }
40
+ });
41
+ }, b = /* @__PURE__ */ e.jsx(
42
+ v,
18
43
  {
19
- ref: m,
44
+ ref: u,
20
45
  id: r,
21
- className: "cursor-pointer",
22
- ...c
46
+ name: t,
47
+ className: o("cursor-pointer", x),
48
+ onCheckedChange: w,
49
+ ...h
23
50
  }
24
- ), n = w("flex gap-3 items-start", {
25
- "flex-row-reverse": o === "right",
26
- "bg-white box-border justify-start p-4 rounded-lg border shadow-xs": a === "box"
27
- });
28
- return /* @__PURE__ */ e.jsxs("div", { className: n, children: [
29
- d,
51
+ ), j = o(
52
+ "flex gap-2 items-start",
53
+ {
54
+ "flex-row-reverse": i === "right",
55
+ "bg-background box-border justify-start p-4 rounded-lg border shadow-xs": l === "box"
56
+ },
57
+ m
58
+ );
59
+ return /* @__PURE__ */ e.jsxs("div", { className: j, children: [
60
+ b,
30
61
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
31
- /* @__PURE__ */ e.jsx(
32
- u,
62
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(
63
+ S,
33
64
  {
34
65
  htmlFor: r,
35
- className: "text-sm leading-[18.39px] cursor-pointer",
36
- children: t
66
+ info: f,
67
+ className: o("text-sm leading-[18.39px] cursor-pointer", p),
68
+ children: c
37
69
  }
38
- ),
39
- s && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-neutral-500", children: s })
70
+ ) }),
71
+ a && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: a })
40
72
  ] })
41
73
  ] });
42
74
  }
43
75
  );
44
- j.displayName = "Switch";
76
+ C.displayName = "Switch";
45
77
  export {
46
- j as Switch
78
+ C as Switch
47
79
  };
@@ -1 +1,17 @@
1
+ /**
2
+ * Tabs components for organizing content into switchable panels.
3
+ * Composed of Tabs (root), TabsList, TabsTrigger, and TabsContent.
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <Tabs defaultValue="tab1">
8
+ * <TabsList>
9
+ * <TabsTrigger value="tab1">Tab 1</TabsTrigger>
10
+ * <TabsTrigger value="tab2">Tab 2</TabsTrigger>
11
+ * </TabsList>
12
+ * <TabsContent value="tab1">Content 1</TabsContent>
13
+ * <TabsContent value="tab2">Content 2</TabsContent>
14
+ * </Tabs>
15
+ * ```
16
+ */
1
17
  export { Tabs, TabsList, TabsTrigger, TabsContent } from '../../../vendor/shadcn/tabs';