adminium 1.0.1-patch.0 → 1.0.1-patch.1

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.
package/dist/index.cjs CHANGED
@@ -3,14 +3,19 @@
3
3
 
4
4
  var clsx = require('clsx');
5
5
  var tailwindMerge = require('tailwind-merge');
6
- var classVarianceAuthority = require('class-variance-authority');
7
6
  var radixUi = require('radix-ui');
8
- var jsxRuntime = require('react/jsx-runtime');
9
- var SlotPrimitive = require('@radix-ui/react-slot');
7
+ var classVarianceAuthority = require('class-variance-authority');
10
8
  var lucideReact = require('lucide-react');
9
+ var SlotPrimitive2 = require('@radix-ui/react-slot');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+ var vaul = require('vaul');
12
+ var HoverCardPrimitive = require('@radix-ui/react-hover-card');
11
13
  var React = require('react');
14
+ var react = require('motion/react');
12
15
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
16
+ var reactTable = require('@tanstack/react-table');
13
17
  var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
18
+ var reactHookForm = require('react-hook-form');
14
19
 
15
20
  function _interopNamespace(e) {
16
21
  if (e && e.__esModule) return e;
@@ -30,7 +35,8 @@ function _interopNamespace(e) {
30
35
  return Object.freeze(n);
31
36
  }
32
37
 
33
- var SlotPrimitive__namespace = /*#__PURE__*/_interopNamespace(SlotPrimitive);
38
+ var SlotPrimitive2__namespace = /*#__PURE__*/_interopNamespace(SlotPrimitive2);
39
+ var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
34
40
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
35
41
  var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
36
42
  var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
@@ -39,677 +45,2707 @@ var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMe
39
45
  function cn(...inputs) {
40
46
  return tailwindMerge.twMerge(clsx.clsx(inputs));
41
47
  }
42
- var avatarStatusVariants = classVarianceAuthority.cva(
43
- "flex items-center rounded-full size-2 border-2 border-background",
44
- {
45
- variants: {
46
- variant: {
47
- online: "bg-green-600",
48
- offline: "bg-zinc-600 dark:bg-zinc-300",
49
- busy: "bg-yellow-600",
50
- away: "bg-blue-600"
51
- }
52
- },
53
- defaultVariants: {
54
- variant: "online"
55
- }
56
- }
57
- );
58
- function Avatar({
59
- className,
60
- ...props
61
- }) {
62
- return /* @__PURE__ */ jsxRuntime.jsx(
63
- radixUi.Avatar.Root,
64
- {
65
- "data-slot": "avatar",
66
- className: cn("relative flex shrink-0 size-10", className),
67
- ...props
68
- }
69
- );
70
- }
71
- function AvatarImage({
72
- className,
73
- ...props
74
- }) {
75
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative overflow-hidden rounded-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
76
- radixUi.Avatar.Image,
77
- {
78
- "data-slot": "avatar-image",
79
- className: cn("aspect-square h-full w-full"),
80
- ...props
81
- }
82
- ) });
83
- }
84
- function AvatarFallback({
85
- className,
86
- ...props
87
- }) {
88
- return /* @__PURE__ */ jsxRuntime.jsx(
89
- radixUi.Avatar.Fallback,
90
- {
91
- "data-slot": "avatar-fallback",
92
- className: cn(
93
- "flex h-full w-full items-center justify-center rounded-full border border-border bg-accent text-accent-foreground text-xs",
94
- className
95
- ),
96
- ...props
97
- }
98
- );
99
- }
100
- function AvatarIndicator({
101
- className,
102
- ...props
103
- }) {
104
- return /* @__PURE__ */ jsxRuntime.jsx(
105
- "div",
106
- {
107
- "data-slot": "avatar-indicator",
108
- className: cn(
109
- "absolute flex size-6 items-center justify-center",
110
- className
111
- ),
112
- ...props
113
- }
114
- );
115
- }
116
- function AvatarStatus({
117
- className,
118
- variant,
119
- ...props
120
- }) {
121
- return /* @__PURE__ */ jsxRuntime.jsx(
122
- "div",
123
- {
124
- "data-slot": "avatar-status",
125
- className: cn(avatarStatusVariants({ variant }), className),
126
- ...props
127
- }
128
- );
129
- }
130
- var badgeVariants = classVarianceAuthority.cva(
131
- "inline-flex items-center justify-center border border-transparent font-medium focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:-ms-px [&_svg]:shrink-0",
48
+ var buttonVariants = classVarianceAuthority.cva(
49
+ "cursor-pointer group whitespace-nowrap focus-visible:outline-hidden inline-flex items-center justify-center has-data-[arrow=true]:justify-between whitespace-nowrap text-sm font-medium ring-offset-background transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0",
132
50
  {
133
51
  variants: {
134
52
  variant: {
135
- primary: "bg-primary text-primary-foreground",
136
- secondary: "bg-secondary text-secondary-foreground",
137
- success: "bg-[var(--color-success-accent,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]",
138
- warning: "bg-[var(--color-warning-accent,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]",
139
- info: "bg-[var(--color-info-accent,var(--color-violet-500))] text-[var(--color-info-foreground,var(--color-white))]",
140
- outline: "bg-transparent border border-border text-secondary-foreground",
141
- destructive: "bg-destructive text-destructive-foreground"
53
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90",
54
+ mono: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black hover:bg-zinc-950/90 dark:hover:bg-zinc-300/90 data-[state=open]:bg-zinc-950/90 dark:data-[state=open]:bg-zinc-300/90",
55
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90",
56
+ success: "bg-emerald-500 text-white hover:bg-emerald-600 data-[state=open]:bg-emerald-600",
57
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90",
58
+ outline: "bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent",
59
+ dashed: "text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground",
60
+ ghost: "text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
61
+ dim: "text-muted-foreground hover:text-foreground data-[state=open]:text-foreground",
62
+ foreground: "",
63
+ inverse: ""
142
64
  },
143
65
  appearance: {
144
66
  default: "",
145
- light: "",
146
- outline: "",
147
- ghost: "border-transparent bg-transparent"
67
+ ghost: ""
148
68
  },
149
- disabled: {
150
- true: "opacity-50 pointer-events-none"
69
+ underline: {
70
+ solid: "",
71
+ dashed: ""
72
+ },
73
+ underlined: {
74
+ solid: "",
75
+ dashed: ""
151
76
  },
152
77
  size: {
153
- lg: "rounded-md px-[0.5rem] h-7 min-w-7 gap-1.5 text-xs [&_svg]:size-3.5",
154
- md: "rounded-md px-[0.45rem] h-6 min-w-6 gap-1.5 text-xs [&_svg]:size-3.5 ",
155
- sm: "rounded-sm px-[0.325rem] h-5 min-w-5 gap-1 text-[0.6875rem] leading-[0.75rem] [&_svg]:size-3",
156
- xs: "rounded-sm px-[0.25rem] h-4 min-w-4 gap-1 text-[0.625rem] leading-[0.5rem] [&_svg]:size-3"
78
+ lg: "h-10 rounded-md px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",
79
+ md: "h-8.5 rounded-md px-3 gap-1.5 text-[0.8125rem] leading-[var(--text-sm--line-height)] [&_svg:not([class*=size-])]:size-4",
80
+ sm: "h-7 rounded-md px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",
81
+ icon: "size-8.5 rounded-md [&_svg:not([class*=size-])]:size-4 shrink-0"
82
+ },
83
+ autoHeight: {
84
+ true: "",
85
+ false: ""
157
86
  },
158
87
  shape: {
159
88
  default: "",
160
89
  circle: "rounded-full"
90
+ },
91
+ mode: {
92
+ default: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
93
+ icon: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 shrink-0",
94
+ link: "text-primary h-auto p-0 bg-transparent rounded-none hover:bg-transparent data-[state=open]:bg-transparent",
95
+ input: `
96
+ justify-start font-normal hover:bg-background [&_svg]:transition-colors [&_svg]:hover:text-foreground data-[state=open]:bg-background
97
+ focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/30
98
+ [[data-state=open]>&]:border-ring [[data-state=open]>&]:outline-hidden [[data-state=open]>&]:ring-[3px]
99
+ [[data-state=open]>&]:ring-ring/30
100
+ aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
101
+ in-data-[invalid=true]:border-destructive/60 in-data-[invalid=true]:ring-destructive/10 dark:in-data-[invalid=true]:border-destructive dark:in-data-[invalid=true]:ring-destructive/20
102
+ `
103
+ },
104
+ placeholder: {
105
+ true: "text-muted-foreground",
106
+ false: ""
161
107
  }
162
108
  },
163
109
  compoundVariants: [
164
- /* Light */
110
+ // Icons opacity for default mode
165
111
  {
166
- variant: "primary",
167
- appearance: "light",
168
- className: "text-[var(--color-primary-accent,var(--color-blue-700))] bg-[var(--color-primary-soft,var(--color-blue-50))] dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:text-[var(--color-primary-soft,var(--color-blue-600))]"
112
+ variant: "ghost",
113
+ mode: "default",
114
+ className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
115
+ },
116
+ {
117
+ variant: "outline",
118
+ mode: "default",
119
+ className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
120
+ },
121
+ {
122
+ variant: "dashed",
123
+ mode: "default",
124
+ className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
169
125
  },
170
126
  {
171
127
  variant: "secondary",
172
- appearance: "light",
173
- className: "bg-secondary dark:bg-secondary/50 text-secondary-foreground"
128
+ mode: "default",
129
+ className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
174
130
  },
131
+ // Icons opacity for default mode
175
132
  {
176
- variant: "success",
177
- appearance: "light",
178
- className: "text-[var(--color-success-accent,var(--color-green-800))] bg-[var(--color-success-soft,var(--color-green-100))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:text-[var(--color-success-soft,var(--color-green-600))]"
133
+ variant: "outline",
134
+ mode: "input",
135
+ className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
179
136
  },
180
137
  {
181
- variant: "warning",
182
- appearance: "light",
183
- className: "text-[var(--color-warning-accent,var(--color-yellow-700))] bg-[var(--color-warning-soft,var(--color-yellow-100))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:text-[var(--color-warning-soft,var(--color-yellow-600))]"
138
+ variant: "outline",
139
+ mode: "icon",
140
+ className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
184
141
  },
142
+ // Auto height
185
143
  {
186
- variant: "info",
187
- appearance: "light",
188
- className: "text-[var(--color-info-accent,var(--color-violet-700))] bg-[var(--color-info-soft,var(--color-violet-100))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:text-[var(--color-info-soft,var(--color-violet-400))]"
144
+ size: "md",
145
+ autoHeight: true,
146
+ className: "h-auto min-h-8.5"
189
147
  },
190
148
  {
191
- variant: "destructive",
192
- appearance: "light",
193
- className: "text-[var(--color-destructive-accent,var(--color-red-700))] bg-[var(--color-destructive-soft,var(--color-red-50))] dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:text-[var(--color-destructive-soft,var(--color-red-600))]"
149
+ size: "sm",
150
+ autoHeight: true,
151
+ className: "h-auto min-h-7"
194
152
  },
195
- /* Outline */
153
+ {
154
+ size: "lg",
155
+ autoHeight: true,
156
+ className: "h-auto min-h-10"
157
+ },
158
+ // Shadow support
196
159
  {
197
160
  variant: "primary",
198
- appearance: "outline",
199
- className: "text-[var(--color-primary-accent,var(--color-blue-700))] border-[var(--color-primary-soft,var(--color-blue-100))] bg-[var(--color-primary-soft,var(--color-blue-50))] dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-soft,var(--color-blue-900))] dark:text-[var(--color-primary-soft,var(--color-blue-600))]"
161
+ mode: "default",
162
+ appearance: "default",
163
+ className: "shadow-xs shadow-black/5"
200
164
  },
201
165
  {
202
- variant: "success",
203
- appearance: "outline",
204
- className: "text-[var(--color-success-accent,var(--color-green-700))] border-[var(--color-success-soft,var(--color-green-200))] bg-[var(--color-success-soft,var(--color-green-50))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-soft,var(--color-green-900))] dark:text-[var(--color-success-soft,var(--color-green-600))]"
166
+ variant: "mono",
167
+ mode: "default",
168
+ appearance: "default",
169
+ className: "shadow-xs shadow-black/5"
205
170
  },
206
171
  {
207
- variant: "warning",
208
- appearance: "outline",
209
- className: "text-[var(--color-warning-accent,var(--color-yellow-700))] border-[var(--color-warning-soft,var(--color-yellow-200))] bg-[var(--color-warning-soft,var(--color-yellow-50))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-soft,var(--color-yellow-900))] dark:text-[var(--color-warning-soft,var(--color-yellow-600))]"
172
+ variant: "secondary",
173
+ mode: "default",
174
+ appearance: "default",
175
+ className: "shadow-xs shadow-black/5"
210
176
  },
211
177
  {
212
- variant: "info",
213
- appearance: "outline",
214
- className: "text-[var(--color-info-accent,var(--color-violet-700))] border-[var(--color-info-soft,var(--color-violet-100))] bg-[var(--color-info-soft,var(--color-violet-50))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-soft,var(--color-violet-900))] dark:text-[var(--color-info-soft,var(--color-violet-400))]"
178
+ variant: "outline",
179
+ mode: "default",
180
+ appearance: "default",
181
+ className: "shadow-xs shadow-black/5"
182
+ },
183
+ {
184
+ variant: "dashed",
185
+ mode: "default",
186
+ appearance: "default",
187
+ className: "shadow-xs shadow-black/5"
215
188
  },
216
189
  {
217
190
  variant: "destructive",
218
- appearance: "outline",
219
- className: "text-[var(--color-destructive-accent,var(--color-red-700))] border-[var(--color-destructive-soft,var(--color-red-100))] bg-[var(--color-destructive-soft,var(--color-red-50))] dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-soft,var(--color-red-900))] dark:text-[var(--color-destructive-soft,var(--color-red-600))]"
191
+ mode: "default",
192
+ appearance: "default",
193
+ className: "shadow-xs shadow-black/5"
220
194
  },
221
- /* Ghost */
195
+ // Shadow support
222
196
  {
223
197
  variant: "primary",
224
- appearance: "ghost",
225
- className: "text-primary"
198
+ mode: "icon",
199
+ appearance: "default",
200
+ className: "shadow-xs shadow-black/5"
201
+ },
202
+ {
203
+ variant: "mono",
204
+ mode: "icon",
205
+ appearance: "default",
206
+ className: "shadow-xs shadow-black/5"
226
207
  },
227
208
  {
228
209
  variant: "secondary",
229
- appearance: "ghost",
230
- className: "text-secondary-foreground"
210
+ mode: "icon",
211
+ appearance: "default",
212
+ className: "shadow-xs shadow-black/5"
231
213
  },
232
214
  {
233
- variant: "success",
234
- appearance: "ghost",
235
- className: "text-[var(--color-success-accent,var(--color-green-500))]"
215
+ variant: "outline",
216
+ mode: "icon",
217
+ appearance: "default",
218
+ className: "shadow-xs shadow-black/5"
236
219
  },
237
220
  {
238
- variant: "warning",
239
- appearance: "ghost",
240
- className: "text-[var(--color-warning-accent,var(--color-yellow-500))]"
221
+ variant: "dashed",
222
+ mode: "icon",
223
+ appearance: "default",
224
+ className: "shadow-xs shadow-black/5"
241
225
  },
242
226
  {
243
- variant: "info",
244
- appearance: "ghost",
245
- className: "text-[var(--color-info-accent,var(--color-violet-500))]"
227
+ variant: "destructive",
228
+ mode: "icon",
229
+ appearance: "default",
230
+ className: "shadow-xs shadow-black/5"
231
+ },
232
+ // Link
233
+ {
234
+ variant: "primary",
235
+ mode: "link",
236
+ underline: "solid",
237
+ className: "font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"
238
+ },
239
+ {
240
+ variant: "primary",
241
+ mode: "link",
242
+ underline: "dashed",
243
+ className: "font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"
244
+ },
245
+ {
246
+ variant: "primary",
247
+ mode: "link",
248
+ underlined: "solid",
249
+ className: "font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"
250
+ },
251
+ {
252
+ variant: "primary",
253
+ mode: "link",
254
+ underlined: "dashed",
255
+ className: "font-medium text-primary hover:text-primary/90 [&_svg]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"
256
+ },
257
+ {
258
+ variant: "inverse",
259
+ mode: "link",
260
+ underline: "solid",
261
+ className: "font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"
262
+ },
263
+ {
264
+ variant: "inverse",
265
+ mode: "link",
266
+ underline: "dashed",
267
+ className: "font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"
268
+ },
269
+ {
270
+ variant: "inverse",
271
+ mode: "link",
272
+ underlined: "solid",
273
+ className: "font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"
274
+ },
275
+ {
276
+ variant: "inverse",
277
+ mode: "link",
278
+ underlined: "dashed",
279
+ className: "font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"
280
+ },
281
+ {
282
+ variant: "foreground",
283
+ mode: "link",
284
+ underline: "solid",
285
+ className: "font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"
286
+ },
287
+ {
288
+ variant: "foreground",
289
+ mode: "link",
290
+ underline: "dashed",
291
+ className: "font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"
292
+ },
293
+ {
294
+ variant: "foreground",
295
+ mode: "link",
296
+ underlined: "solid",
297
+ className: "font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"
298
+ },
299
+ {
300
+ variant: "foreground",
301
+ mode: "link",
302
+ underlined: "dashed",
303
+ className: "font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"
304
+ },
305
+ // Ghost
306
+ {
307
+ variant: "primary",
308
+ appearance: "ghost",
309
+ className: "bg-transparent text-primary/90 hover:bg-primary/5 data-[state=open]:bg-primary/5"
246
310
  },
247
311
  {
248
312
  variant: "destructive",
249
313
  appearance: "ghost",
250
- className: "text-destructive"
314
+ className: "bg-transparent text-destructive/90 hover:bg-destructive/5 data-[state=open]:bg-destructive/5"
251
315
  },
252
- { size: "lg", appearance: "ghost", className: "px-0" },
253
- { size: "md", appearance: "ghost", className: "px-0" },
254
- { size: "sm", appearance: "ghost", className: "px-0" },
255
- { size: "xs", appearance: "ghost", className: "px-0" }
316
+ {
317
+ variant: "success",
318
+ appearance: "ghost",
319
+ className: "bg-transparent text-emerald-500 hover:bg-emerald-500/5 data-[state=open]:bg-emerald-500/5"
320
+ },
321
+ {
322
+ variant: "ghost",
323
+ mode: "icon",
324
+ className: "text-muted-foreground"
325
+ },
326
+ // Size
327
+ {
328
+ size: "sm",
329
+ mode: "icon",
330
+ className: "w-7 h-7 p-0 [[&_svg:not([class*=size-])]:size-3.5"
331
+ },
332
+ {
333
+ size: "md",
334
+ mode: "icon",
335
+ className: "w-8.5 h-8.5 p-0 [&_svg:not([class*=size-])]:size-4"
336
+ },
337
+ {
338
+ size: "icon",
339
+ className: "w-8.5 h-8.5 p-0 [&_svg:not([class*=size-])]:size-4"
340
+ },
341
+ {
342
+ size: "lg",
343
+ mode: "icon",
344
+ className: "w-10 h-10 p-0 [&_svg:not([class*=size-])]:size-4"
345
+ },
346
+ // Input mode
347
+ {
348
+ mode: "input",
349
+ placeholder: true,
350
+ variant: "outline",
351
+ className: "font-normal text-muted-foreground"
352
+ },
353
+ {
354
+ mode: "input",
355
+ variant: "outline",
356
+ size: "sm",
357
+ className: "gap-1.25"
358
+ },
359
+ {
360
+ mode: "input",
361
+ variant: "outline",
362
+ size: "md",
363
+ className: "gap-1.5"
364
+ },
365
+ {
366
+ mode: "input",
367
+ variant: "outline",
368
+ size: "lg",
369
+ className: "gap-1.5"
370
+ }
256
371
  ],
257
372
  defaultVariants: {
258
373
  variant: "primary",
259
- appearance: "default",
260
- size: "md"
261
- }
262
- }
263
- );
264
- var badgeButtonVariants = classVarianceAuthority.cva(
265
- "cursor-pointer transition-all inline-flex items-center justify-center leading-none size-3.5 [&>svg]:opacity-100! [&>svg]:size-3.5! p-0 rounded-md -me-0.5 opacity-60 hover:opacity-100",
266
- {
267
- variants: {
268
- variant: {
269
- default: ""
270
- }
271
- },
272
- defaultVariants: {
273
- variant: "default"
374
+ mode: "default",
375
+ size: "md",
376
+ shape: "default",
377
+ appearance: "default"
274
378
  }
275
379
  }
276
380
  );
277
- function Badge({
381
+ function Button({
278
382
  className,
383
+ selected,
279
384
  variant,
280
- size,
281
- appearance,
282
385
  shape,
386
+ appearance,
387
+ mode,
388
+ size,
389
+ autoHeight,
390
+ underlined,
391
+ underline,
283
392
  asChild = false,
284
- disabled,
393
+ placeholder = false,
285
394
  ...props
286
395
  }) {
287
- const Comp = asChild ? SlotPrimitive__namespace.Slot : "span";
396
+ const Comp = asChild ? SlotPrimitive2__namespace.Slot : "button";
288
397
  return /* @__PURE__ */ jsxRuntime.jsx(
289
398
  Comp,
290
399
  {
291
- "data-slot": "badge",
400
+ "data-slot": "button",
292
401
  className: cn(
293
- badgeVariants({ variant, size, appearance, shape, disabled }),
294
- className
402
+ buttonVariants({
403
+ variant,
404
+ size,
405
+ shape,
406
+ appearance,
407
+ mode,
408
+ autoHeight,
409
+ placeholder,
410
+ underlined,
411
+ underline,
412
+ className
413
+ }),
414
+ asChild && props.disabled && "pointer-events-none opacity-50"
295
415
  ),
416
+ ...selected && { "data-state": "open" },
296
417
  ...props
297
418
  }
298
419
  );
299
420
  }
300
- function BadgeButton({
421
+ function ButtonArrow({
422
+ icon: Icon = lucideReact.ChevronDown,
301
423
  className,
302
- variant,
303
- asChild = false,
304
424
  ...props
305
425
  }) {
306
- const Comp = asChild ? SlotPrimitive__namespace.Slot : "span";
307
426
  return /* @__PURE__ */ jsxRuntime.jsx(
308
- Comp,
427
+ Icon,
309
428
  {
310
- "data-slot": "badge-button",
311
- className: cn(badgeButtonVariants({ variant, className })),
312
- role: "button",
429
+ "data-slot": "button-arrow",
430
+ className: cn("ms-auto -me-1", className),
313
431
  ...props
314
432
  }
315
433
  );
316
434
  }
317
- function BadgeDot({ className, ...props }) {
435
+ function AlertDialog({
436
+ ...props
437
+ }) {
438
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.AlertDialog.Root, { "data-slot": "alert-dialog", ...props });
439
+ }
440
+ function AlertDialogTrigger({
441
+ ...props
442
+ }) {
443
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.AlertDialog.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
444
+ }
445
+ function AlertDialogPortal({
446
+ ...props
447
+ }) {
448
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.AlertDialog.Portal, { "data-slot": "alert-dialog-portal", ...props });
449
+ }
450
+ function AlertDialogOverlay({
451
+ className,
452
+ ...props
453
+ }) {
318
454
  return /* @__PURE__ */ jsxRuntime.jsx(
319
- "span",
455
+ radixUi.AlertDialog.Overlay,
320
456
  {
321
- "data-slot": "badge-dot",
457
+ "data-slot": "alert-dialog-overlay",
322
458
  className: cn(
323
- "size-1.5 rounded-full bg-[currentColor] opacity-75",
459
+ "fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
324
460
  className
325
461
  ),
326
462
  ...props
327
463
  }
328
464
  );
329
465
  }
330
- var buttonVariants = classVarianceAuthority.cva(
331
- "cursor-pointer group whitespace-nowrap focus-visible:outline-hidden inline-flex items-center justify-center has-data-[arrow=true]:justify-between whitespace-nowrap text-sm font-medium ring-offset-background transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0",
466
+ function AlertDialogContent({
467
+ className,
468
+ ...props
469
+ }) {
470
+ return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
471
+ /* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
472
+ /* @__PURE__ */ jsxRuntime.jsx(
473
+ radixUi.AlertDialog.Content,
474
+ {
475
+ "data-slot": "alert-dialog-content",
476
+ className: cn(
477
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg shadow-black/5 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
478
+ className
479
+ ),
480
+ ...props
481
+ }
482
+ )
483
+ ] });
484
+ }
485
+ var AlertDialogHeader = ({
486
+ className,
487
+ ...props
488
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
489
+ "div",
332
490
  {
333
- variants: {
334
- variant: {
335
- primary: "bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90",
336
- mono: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black hover:bg-zinc-950/90 dark:hover:bg-zinc-300/90 data-[state=open]:bg-zinc-950/90 dark:data-[state=open]:bg-zinc-300/90",
337
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90",
338
- success: "bg-emerald-500 text-white hover:bg-emerald-600 data-[state=open]:bg-emerald-600",
339
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90",
340
- outline: "bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent",
341
- dashed: "text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground",
342
- ghost: "text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
343
- dim: "text-muted-foreground hover:text-foreground data-[state=open]:text-foreground",
344
- foreground: "",
345
- inverse: ""
346
- },
347
- appearance: {
348
- default: "",
349
- ghost: ""
350
- },
351
- underline: {
352
- solid: "",
353
- dashed: ""
491
+ "data-slot": "alert-dialog-header",
492
+ className: cn(
493
+ "flex flex-col space-y-2 text-center sm:text-left",
494
+ className
495
+ ),
496
+ ...props
497
+ }
498
+ );
499
+ var AlertDialogFooter = ({
500
+ className,
501
+ ...props
502
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
503
+ "div",
504
+ {
505
+ "data-slot": "alert-dialog-footer",
506
+ className: cn(
507
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2.5",
508
+ className
509
+ ),
510
+ ...props
511
+ }
512
+ );
513
+ function AlertDialogTitle({
514
+ className,
515
+ ...props
516
+ }) {
517
+ return /* @__PURE__ */ jsxRuntime.jsx(
518
+ radixUi.AlertDialog.Title,
519
+ {
520
+ "data-slot": "alert-dialog-title",
521
+ className: cn("text-lg font-semibold", className),
522
+ ...props
523
+ }
524
+ );
525
+ }
526
+ function AlertDialogDescription({
527
+ className,
528
+ ...props
529
+ }) {
530
+ return /* @__PURE__ */ jsxRuntime.jsx(
531
+ radixUi.AlertDialog.Description,
532
+ {
533
+ "data-slot": "alert-dialog-description",
534
+ className: cn("text-sm text-muted-foreground", className),
535
+ ...props
536
+ }
537
+ );
538
+ }
539
+ function AlertDialogAction({
540
+ className,
541
+ variant,
542
+ ...props
543
+ }) {
544
+ return /* @__PURE__ */ jsxRuntime.jsx(
545
+ radixUi.AlertDialog.Action,
546
+ {
547
+ "data-slot": "alert-dialog-action",
548
+ className: cn(buttonVariants({ variant }), className),
549
+ ...props
550
+ }
551
+ );
552
+ }
553
+ function AlertDialogCancel({
554
+ className,
555
+ ...props
556
+ }) {
557
+ return /* @__PURE__ */ jsxRuntime.jsx(
558
+ radixUi.AlertDialog.Cancel,
559
+ {
560
+ "data-slot": "alert-dialog-cancel",
561
+ className: cn(
562
+ buttonVariants({ variant: "outline" }),
563
+ "mt-2 sm:mt-0",
564
+ className
565
+ ),
566
+ ...props
567
+ }
568
+ );
569
+ }
570
+ var dialogContentVariants = classVarianceAuthority.cva(
571
+ "flex flex-col fixed outline-0 z-50 border border-border bg-background p-6 shadow-lg shadow-black/5 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
572
+ {
573
+ variants: {
574
+ variant: {
575
+ default: "left-[50%] top-[50%] max-w-lg translate-x-[-50%] translate-y-[-50%] w-full",
576
+ fullscreen: "inset-5"
577
+ }
578
+ },
579
+ defaultVariants: {
580
+ variant: "default"
581
+ }
582
+ }
583
+ );
584
+ function Dialog({
585
+ ...props
586
+ }) {
587
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Root, { "data-slot": "dialog", ...props });
588
+ }
589
+ function DialogTrigger({
590
+ ...props
591
+ }) {
592
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
593
+ }
594
+ function DialogPortal({
595
+ ...props
596
+ }) {
597
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
598
+ }
599
+ function DialogClose({
600
+ ...props
601
+ }) {
602
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { "data-slot": "dialog-close", ...props });
603
+ }
604
+ function DialogOverlay({
605
+ className,
606
+ ...props
607
+ }) {
608
+ return /* @__PURE__ */ jsxRuntime.jsx(
609
+ radixUi.Dialog.Overlay,
610
+ {
611
+ "data-slot": "dialog-overlay",
612
+ className: cn(
613
+ "fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
614
+ className
615
+ ),
616
+ ...props
617
+ }
618
+ );
619
+ }
620
+ function DialogContent({
621
+ className,
622
+ children,
623
+ showCloseButton = true,
624
+ overlay = true,
625
+ variant,
626
+ "aria-describedby": ariaDescribedBy,
627
+ ...props
628
+ }) {
629
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
630
+ overlay && /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
631
+ /* @__PURE__ */ jsxRuntime.jsxs(
632
+ radixUi.Dialog.Content,
633
+ {
634
+ "data-slot": "dialog-content",
635
+ className: cn(dialogContentVariants({ variant }), className),
636
+ "aria-describedby": ariaDescribedBy,
637
+ ...props,
638
+ children: [
639
+ children,
640
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(DialogClose, { className: "cursor-pointer outline-0 absolute end-5 top-5 rounded-sm opacity-60 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
641
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" }),
642
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
643
+ ] })
644
+ ]
645
+ }
646
+ )
647
+ ] });
648
+ }
649
+ var DialogHeader = ({
650
+ className,
651
+ ...props
652
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
653
+ "div",
654
+ {
655
+ "data-slot": "dialog-header",
656
+ className: cn(
657
+ "flex flex-col space-y-1 text-center sm:text-start mb-5",
658
+ className
659
+ ),
660
+ ...props
661
+ }
662
+ );
663
+ var DialogFooter = ({
664
+ className,
665
+ ...props
666
+ }) => /* @__PURE__ */ jsxRuntime.jsx(
667
+ "div",
668
+ {
669
+ "data-slot": "dialog-footer",
670
+ className: cn(
671
+ "flex flex-col-reverse sm:flex-row sm:justify-end pt-5 sm:space-x-2.5",
672
+ className
673
+ ),
674
+ ...props
675
+ }
676
+ );
677
+ function DialogTitle({
678
+ className,
679
+ ...props
680
+ }) {
681
+ return /* @__PURE__ */ jsxRuntime.jsx(
682
+ radixUi.Dialog.Title,
683
+ {
684
+ "data-slot": "dialog-title",
685
+ className: cn(
686
+ "text-lg font-semibold leading-none tracking-tight",
687
+ className
688
+ ),
689
+ ...props
690
+ }
691
+ );
692
+ }
693
+ var DialogBody = ({
694
+ className,
695
+ ...props
696
+ }) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "dialog-body", className: cn("grow", className), ...props });
697
+ function DialogDescription({
698
+ className,
699
+ ...props
700
+ }) {
701
+ return /* @__PURE__ */ jsxRuntime.jsx(
702
+ radixUi.Dialog.Description,
703
+ {
704
+ "data-slot": "dialog-description",
705
+ className: cn("text-sm text-muted-foreground", className),
706
+ ...props
707
+ }
708
+ );
709
+ }
710
+ function Popover({ ...props }) {
711
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Root, { "data-slot": "popover", ...props });
712
+ }
713
+ function PopoverTrigger({ ...props }) {
714
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
715
+ }
716
+ function PopoverContent({
717
+ className,
718
+ align = "center",
719
+ sideOffset = 4,
720
+ ...props
721
+ }) {
722
+ return /* @__PURE__ */ jsxRuntime.jsx(
723
+ radixUi.Popover.Content,
724
+ {
725
+ "data-slot": "popover-content",
726
+ align,
727
+ sideOffset,
728
+ className: cn(
729
+ "z-50 w-72 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md shadow-black/5 outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
730
+ className
731
+ ),
732
+ ...props
733
+ }
734
+ );
735
+ }
736
+ var Drawer = ({ shouldScaleBackground = true, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Root, { shouldScaleBackground, ...props });
737
+ function DrawerTrigger({ ...props }) {
738
+ return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Trigger, { "data-slot": "drawer-trigger", ...props });
739
+ }
740
+ function DrawerPortal({ ...props }) {
741
+ return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
742
+ }
743
+ function DrawerClose({ ...props }) {
744
+ return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Close, { "data-slot": "drawer-close", ...props });
745
+ }
746
+ function DrawerOverlay({ className, ...props }) {
747
+ return /* @__PURE__ */ jsxRuntime.jsx(
748
+ vaul.Drawer.Overlay,
749
+ {
750
+ "data-slot": "drawer-overlay",
751
+ className: cn("fixed inset-0 z-50 bg-black/80", className),
752
+ ...props
753
+ }
754
+ );
755
+ }
756
+ function DrawerContent({ className, children, ...props }) {
757
+ return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
758
+ /* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
759
+ /* @__PURE__ */ jsxRuntime.jsxs(
760
+ vaul.Drawer.Content,
761
+ {
762
+ "data-slot": "drawer-content",
763
+ className: cn(
764
+ "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border",
765
+ className
766
+ ),
767
+ ...props,
768
+ children: [
769
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
770
+ children
771
+ ]
772
+ }
773
+ )
774
+ ] });
775
+ }
776
+ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "drawer-header", className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props });
777
+ var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props });
778
+ function DrawerTitle({ className, ...props }) {
779
+ return /* @__PURE__ */ jsxRuntime.jsx(
780
+ vaul.Drawer.Title,
781
+ {
782
+ "data-slot": "drawer-title",
783
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
784
+ ...props
785
+ }
786
+ );
787
+ }
788
+ function DrawerDescription({ className, ...props }) {
789
+ return /* @__PURE__ */ jsxRuntime.jsx(
790
+ vaul.Drawer.Description,
791
+ {
792
+ "data-slot": "drawer-description",
793
+ className: cn("text-sm text-muted-foreground", className),
794
+ ...props
795
+ }
796
+ );
797
+ }
798
+ function HoverCard({ ...props }) {
799
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Root, { "data-slot": "hover-card", ...props });
800
+ }
801
+ function HoverCardTrigger({ ...props }) {
802
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Trigger, { "data-slot": "hover-card-trigger", ...props });
803
+ }
804
+ function HoverCardContent({
805
+ className,
806
+ align = "center",
807
+ sideOffset = 4,
808
+ ...props
809
+ }) {
810
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsxRuntime.jsx(
811
+ HoverCardPrimitive__namespace.Content,
812
+ {
813
+ "data-slot": "hover-card-content",
814
+ align,
815
+ sideOffset,
816
+ className: cn(
817
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
818
+ className
819
+ ),
820
+ ...props
821
+ }
822
+ ) });
823
+ }
824
+ function Sheet({ ...props }) {
825
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Root, { "data-slot": "sheet", ...props });
826
+ }
827
+ function SheetTrigger({ ...props }) {
828
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
829
+ }
830
+ function SheetClose({ ...props }) {
831
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { "data-slot": "sheet-close", ...props });
832
+ }
833
+ function SheetPortal({ ...props }) {
834
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
835
+ }
836
+ function SheetOverlay({ className, ...props }) {
837
+ return /* @__PURE__ */ jsxRuntime.jsx(
838
+ radixUi.Dialog.Overlay,
839
+ {
840
+ "data-slot": "sheet-overlay",
841
+ className: cn(
842
+ "fixed inset-0 z-50 bg-black/30 [backdrop-filter:blur(4px)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
843
+ className
844
+ ),
845
+ ...props
846
+ }
847
+ );
848
+ }
849
+ var sheetVariants = classVarianceAuthority.cva(
850
+ "flex flex-col items-strech fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-400",
851
+ {
852
+ variants: {
853
+ side: {
854
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
855
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
856
+ left: "inset-y-0 start-0 h-full w-3/4 border-e data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm rtl:data-[state=closed]:slide-out-to-right rtl:data-[state=open]:slide-in-from-right",
857
+ right: "inset-y-0 end-0 h-full w-3/4 border-s data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm rtl:data-[state=closed]:slide-out-to-left rtl:data-[state=open]:slide-in-from-left"
858
+ }
859
+ },
860
+ defaultVariants: {
861
+ side: "right"
862
+ }
863
+ }
864
+ );
865
+ function SheetContent({
866
+ side = "right",
867
+ overlay = true,
868
+ close = true,
869
+ className,
870
+ children,
871
+ ...props
872
+ }) {
873
+ return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
874
+ overlay && /* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
875
+ /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Dialog.Content, { className: cn(sheetVariants({ side }), className), ...props, children: [
876
+ children,
877
+ close && /* @__PURE__ */ jsxRuntime.jsxs(
878
+ radixUi.Dialog.Close,
879
+ {
880
+ "data-slot": "sheet-close",
881
+ className: "cursor-pointer absolute end-5 top-4 rounded-sm opacity-60 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
882
+ children: [
883
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
884
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
885
+ ]
886
+ }
887
+ )
888
+ ] })
889
+ ] });
890
+ }
891
+ function SheetHeader({ className, ...props }) {
892
+ return /* @__PURE__ */ jsxRuntime.jsx(
893
+ "div",
894
+ {
895
+ "data-slot": "sheet-header",
896
+ className: cn("flex flex-col space-y-1 text-center sm:text-start", className),
897
+ ...props
898
+ }
899
+ );
900
+ }
901
+ function SheetBody({ className, ...props }) {
902
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "sheet-body", className: cn("py-2.5", className), ...props });
903
+ }
904
+ function SheetFooter({ className, ...props }) {
905
+ return /* @__PURE__ */ jsxRuntime.jsx(
906
+ "div",
907
+ {
908
+ "data-slot": "sheet-footer",
909
+ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
910
+ ...props
911
+ }
912
+ );
913
+ }
914
+ function SheetTitle({ className, ...props }) {
915
+ return /* @__PURE__ */ jsxRuntime.jsx(
916
+ radixUi.Dialog.Title,
917
+ {
918
+ "data-slot": "sheet-title",
919
+ className: cn("text-base font-semibold text-foreground", className),
920
+ ...props
921
+ }
922
+ );
923
+ }
924
+ function SheetDescription({ className, ...props }) {
925
+ return /* @__PURE__ */ jsxRuntime.jsx(
926
+ radixUi.Dialog.Description,
927
+ {
928
+ "data-slot": "sheet-description",
929
+ className: cn("text-sm text-muted-foreground", className),
930
+ ...props
931
+ }
932
+ );
933
+ }
934
+ var AvatarGroupContext = React__namespace.createContext(
935
+ null
936
+ );
937
+ var StaggeredContent = ({ content }) => {
938
+ const children = React__namespace.Children.toArray(content);
939
+ return /* @__PURE__ */ jsxRuntime.jsx(
940
+ react.motion.div,
941
+ {
942
+ initial: "initial",
943
+ animate: "animate",
944
+ exit: "exit",
945
+ variants: {
946
+ animate: { transition: { staggerChildren: 0.08 } }
947
+ },
948
+ children: children.map((child, i) => /* @__PURE__ */ jsxRuntime.jsx(
949
+ react.motion.div,
950
+ {
951
+ variants: {
952
+ initial: { opacity: 0, y: 20 },
953
+ animate: {
954
+ opacity: 1,
955
+ y: 0,
956
+ transition: { duration: 0.3, ease: "easeOut" }
957
+ },
958
+ exit: {
959
+ opacity: 0,
960
+ y: -20,
961
+ transition: { duration: 0.2, ease: "easeIn" }
962
+ }
963
+ },
964
+ children: child
965
+ },
966
+ i
967
+ ))
968
+ }
969
+ );
970
+ };
971
+ function AvatarGroup({
972
+ children,
973
+ className,
974
+ tooltipClassName,
975
+ animation = "default"
976
+ }) {
977
+ const contextValue = {
978
+ tooltipClassName,
979
+ animation
980
+ };
981
+ return /* @__PURE__ */ jsxRuntime.jsx(AvatarGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex -space-x-2.5", className), children }) });
982
+ }
983
+ function AvatarGroupItem({
984
+ children,
985
+ className,
986
+ tooltipClassName,
987
+ animation: itemAnimation
988
+ }) {
989
+ const context = React__namespace.useContext(AvatarGroupContext);
990
+ const [hoveredIndex, setHoveredIndex] = React__namespace.useState(false);
991
+ const springConfig = { stiffness: 100, damping: 5 };
992
+ const x = react.useMotionValue(0);
993
+ const animation = itemAnimation || context?.animation || "default";
994
+ const finalTooltipClassName = tooltipClassName || context?.tooltipClassName;
995
+ const rotate = react.useSpring(
996
+ react.useTransform(x, [-100, 100], [-45, 45]),
997
+ springConfig
998
+ );
999
+ const translateX = react.useSpring(
1000
+ react.useTransform(x, [-100, 100], [-50, 50]),
1001
+ springConfig
1002
+ );
1003
+ const tooltipChild = React__namespace.Children.toArray(children).find(
1004
+ (child) => React__namespace.isValidElement(child) && child.type === AvatarGroupTooltip
1005
+ );
1006
+ const otherChildren = React__namespace.Children.toArray(children).filter(
1007
+ (child) => !(React__namespace.isValidElement(child) && child.type === AvatarGroupTooltip)
1008
+ );
1009
+ const tooltipContent = tooltipChild && React__namespace.isValidElement(tooltipChild) ? tooltipChild.props.children : null;
1010
+ const handleMouseMove = (event) => {
1011
+ const halfWidth = event.target.offsetWidth / 2;
1012
+ x.set(event.nativeEvent.offsetX - halfWidth);
1013
+ };
1014
+ const animationVariants = {
1015
+ default: {
1016
+ initial: { opacity: 0, y: 20, scale: 0.6 },
1017
+ animate: {
1018
+ opacity: 1,
1019
+ y: 0,
1020
+ scale: 1,
1021
+ transition: {
1022
+ type: "spring",
1023
+ stiffness: 260,
1024
+ damping: 10
1025
+ }
1026
+ },
1027
+ exit: {
1028
+ opacity: 0,
1029
+ y: 20,
1030
+ scale: 0.6,
1031
+ transition: {
1032
+ duration: 0.2,
1033
+ ease: "easeInOut"
1034
+ }
1035
+ }
1036
+ },
1037
+ flip: {
1038
+ initial: { opacity: 0, rotateX: -90 },
1039
+ animate: {
1040
+ opacity: 1,
1041
+ rotateX: 0,
1042
+ transition: {
1043
+ type: "spring",
1044
+ stiffness: 180,
1045
+ damping: 25
1046
+ }
1047
+ },
1048
+ exit: {
1049
+ opacity: 0,
1050
+ rotateX: -90,
1051
+ transition: {
1052
+ duration: 0.3,
1053
+ ease: "easeInOut"
1054
+ }
1055
+ }
1056
+ },
1057
+ reveal: {
1058
+ initial: { opacity: 0, scale: 0.95 },
1059
+ animate: {
1060
+ opacity: 1,
1061
+ scale: 1,
1062
+ transition: { duration: 0.15, ease: "easeOut" }
1063
+ },
1064
+ exit: {
1065
+ opacity: 0,
1066
+ scale: 0.95,
1067
+ transition: { duration: 0.1, ease: "easeIn" }
1068
+ }
1069
+ }
1070
+ };
1071
+ const selectedVariant = animationVariants[animation];
1072
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1073
+ "div",
1074
+ {
1075
+ className: cn("group relative", className),
1076
+ onMouseEnter: () => setHoveredIndex(true),
1077
+ onMouseLeave: () => setHoveredIndex(false),
1078
+ children: [
1079
+ /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", children: hoveredIndex && tooltipContent && /* @__PURE__ */ jsxRuntime.jsxs(
1080
+ react.motion.div,
1081
+ {
1082
+ initial: selectedVariant.initial,
1083
+ animate: selectedVariant.animate,
1084
+ exit: selectedVariant.exit,
1085
+ style: {
1086
+ translateX: animation === "reveal" ? 0 : translateX,
1087
+ rotate: animation === "reveal" ? 0 : rotate,
1088
+ whiteSpace: "nowrap",
1089
+ transformOrigin: "center"
1090
+ },
1091
+ className: cn(
1092
+ "absolute -top-16 left-1/2 z-50 flex -translate-x-1/2 flex-col items-center justify-center rounded-md bg-black px-4 py-2 text-xs font-medium text-white shadow-xl",
1093
+ finalTooltipClassName
1094
+ ),
1095
+ children: [
1096
+ /* @__PURE__ */ jsxRuntime.jsx(
1097
+ react.motion.div,
1098
+ {
1099
+ className: "absolute inset-x-10 -bottom-px z-30 h-px w-[20%] bg-gradient-to-r from-transparent via-emerald-500 dark:via-emerald-900 to-transparent",
1100
+ initial: { opacity: 0 },
1101
+ animate: { opacity: 1 },
1102
+ exit: { opacity: 0 },
1103
+ transition: { duration: 0.15 }
1104
+ }
1105
+ ),
1106
+ /* @__PURE__ */ jsxRuntime.jsx(
1107
+ react.motion.div,
1108
+ {
1109
+ className: "absolute -bottom-px left-10 z-30 h-px w-[40%] bg-gradient-to-r from-transparent via-sky-500 dark:via-sky-900 to-transparent",
1110
+ initial: { opacity: 0 },
1111
+ animate: { opacity: 1 },
1112
+ exit: { opacity: 0 },
1113
+ transition: { duration: 0.15 }
1114
+ }
1115
+ ),
1116
+ animation === "reveal" ? /* @__PURE__ */ jsxRuntime.jsx(StaggeredContent, { content: tooltipContent }) : tooltipContent
1117
+ ]
1118
+ }
1119
+ ) }),
1120
+ /* @__PURE__ */ jsxRuntime.jsx(
1121
+ react.motion.div,
1122
+ {
1123
+ className: "relative cursor-pointer",
1124
+ whileHover: {
1125
+ zIndex: 30
1126
+ },
1127
+ whileTap: { scale: 0.95 },
1128
+ transition: {
1129
+ duration: 0.5
1130
+ },
1131
+ onMouseMove: handleMouseMove,
1132
+ children: otherChildren
1133
+ }
1134
+ )
1135
+ ]
1136
+ }
1137
+ );
1138
+ }
1139
+ function AvatarGroupTooltip({
1140
+ children,
1141
+ className
1142
+ }) {
1143
+ return /* @__PURE__ */ jsxRuntime.jsx(
1144
+ react.motion.div,
1145
+ {
1146
+ initial: { opacity: 0, y: 20, scale: 0.6 },
1147
+ animate: { opacity: 1 },
1148
+ exit: { opacity: 0 },
1149
+ transition: { duration: 0.15 },
1150
+ className: cn("hidden relative z-30", className),
1151
+ children
1152
+ }
1153
+ );
1154
+ }
1155
+ var DataGridContext = React.createContext(void 0);
1156
+ function useDataGrid() {
1157
+ const context = React.useContext(DataGridContext);
1158
+ if (!context) {
1159
+ throw new Error("useDataGrid must be used within a DataGridProvider");
1160
+ }
1161
+ return context;
1162
+ }
1163
+ function DataGridProvider({
1164
+ children,
1165
+ table,
1166
+ ...props
1167
+ }) {
1168
+ return /* @__PURE__ */ jsxRuntime.jsx(
1169
+ DataGridContext.Provider,
1170
+ {
1171
+ value: {
1172
+ props,
1173
+ table,
1174
+ recordCount: props.recordCount,
1175
+ isLoading: props.isLoading || false
1176
+ },
1177
+ children
1178
+ }
1179
+ );
1180
+ }
1181
+ function DataGrid({
1182
+ children,
1183
+ table,
1184
+ ...props
1185
+ }) {
1186
+ const defaultProps = {
1187
+ loadingMode: "skeleton",
1188
+ tableLayout: {
1189
+ dense: false,
1190
+ cellBorder: false,
1191
+ rowBorder: true,
1192
+ rowRounded: false,
1193
+ stripped: false,
1194
+ headerSticky: false,
1195
+ headerBackground: true,
1196
+ headerBorder: true,
1197
+ width: "fixed",
1198
+ columnsVisibility: false,
1199
+ columnsResizable: false,
1200
+ columnsPinnable: false,
1201
+ columnsMovable: false,
1202
+ columnsDraggable: false,
1203
+ rowsDraggable: false
1204
+ },
1205
+ tableClassNames: {
1206
+ base: "",
1207
+ header: "",
1208
+ headerRow: "",
1209
+ headerSticky: "sticky top-0 z-10 bg-background/90 backdrop-blur-xs",
1210
+ body: "",
1211
+ bodyRow: "",
1212
+ footer: "",
1213
+ edgeCell: ""
1214
+ }
1215
+ };
1216
+ const mergedProps = {
1217
+ ...defaultProps,
1218
+ ...props,
1219
+ tableLayout: {
1220
+ ...defaultProps.tableLayout,
1221
+ ...props.tableLayout || {}
1222
+ },
1223
+ tableClassNames: {
1224
+ ...defaultProps.tableClassNames,
1225
+ ...props.tableClassNames || {}
1226
+ }
1227
+ };
1228
+ if (!table) {
1229
+ throw new Error('DataGrid requires a "table" prop');
1230
+ }
1231
+ return /* @__PURE__ */ jsxRuntime.jsx(DataGridProvider, { table, ...mergedProps, children });
1232
+ }
1233
+ function DataGridContainer({
1234
+ children,
1235
+ className,
1236
+ border = true
1237
+ }) {
1238
+ return /* @__PURE__ */ jsxRuntime.jsx(
1239
+ "div",
1240
+ {
1241
+ "data-slot": "data-grid",
1242
+ className: cn(
1243
+ "grid w-full",
1244
+ border && "border border-border rounded-lg",
1245
+ className
1246
+ ),
1247
+ children
1248
+ }
1249
+ );
1250
+ }
1251
+ var checkboxVariants = classVarianceAuthority.cva(
1252
+ `
1253
+ group peer bg-background shrink-0 rounded-md border border-input ring-offset-background focus-visible:outline-none
1254
+ focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50
1255
+ aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
1256
+ [[data-invalid=true]_&]:border-destructive/60 [[data-invalid=true]_&]:ring-destructive/10 dark:[[data-invalid=true]_&]:border-destructive dark:[[data-invalid=true]_&]:ring-destructive/20,
1257
+ data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:text-primary-foreground
1258
+ `,
1259
+ {
1260
+ variants: {
1261
+ size: {
1262
+ sm: "size-4.5 [&_svg]:size-3",
1263
+ md: "size-5 [&_svg]:size-3.5",
1264
+ lg: "size-5.5 [&_svg]:size-4"
1265
+ }
1266
+ },
1267
+ defaultVariants: {
1268
+ size: "md"
1269
+ }
1270
+ }
1271
+ );
1272
+ function Checkbox({
1273
+ className,
1274
+ size,
1275
+ ...props
1276
+ }) {
1277
+ return /* @__PURE__ */ jsxRuntime.jsx(
1278
+ CheckboxPrimitive__namespace.Root,
1279
+ {
1280
+ "data-slot": "checkbox",
1281
+ className: cn(checkboxVariants({ size }), className),
1282
+ ...props,
1283
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1284
+ CheckboxPrimitive__namespace.Indicator,
1285
+ {
1286
+ className: cn("flex items-center justify-center text-current"),
1287
+ children: [
1288
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "group-data-[state=indeterminate]:hidden" }),
1289
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "hidden group-data-[state=indeterminate]:block" })
1290
+ ]
1291
+ }
1292
+ )
1293
+ }
1294
+ );
1295
+ }
1296
+ var headerCellSpacingVariants = classVarianceAuthority.cva("", {
1297
+ variants: {
1298
+ size: {
1299
+ dense: "px-2.5 h-8",
1300
+ default: "px-4"
1301
+ }
1302
+ },
1303
+ defaultVariants: {
1304
+ size: "default"
1305
+ }
1306
+ });
1307
+ var bodyCellSpacingVariants = classVarianceAuthority.cva("", {
1308
+ variants: {
1309
+ size: {
1310
+ dense: "px-2.5 py-2",
1311
+ default: "px-4 py-3"
1312
+ }
1313
+ },
1314
+ defaultVariants: {
1315
+ size: "default"
1316
+ }
1317
+ });
1318
+ function getPinningStyles(column) {
1319
+ const isPinned = column.getIsPinned();
1320
+ return {
1321
+ left: isPinned === "left" ? `${column.getStart("left")}px` : void 0,
1322
+ right: isPinned === "right" ? `${column.getAfter("right")}px` : void 0,
1323
+ position: isPinned ? "sticky" : "relative",
1324
+ width: column.getSize(),
1325
+ zIndex: isPinned ? 1 : 0
1326
+ };
1327
+ }
1328
+ function DataGridTableBase({ children }) {
1329
+ const { props } = useDataGrid();
1330
+ return /* @__PURE__ */ jsxRuntime.jsx(
1331
+ "table",
1332
+ {
1333
+ "data-slot": "data-grid-table",
1334
+ className: cn(
1335
+ "w-full align-middle caption-bottom text-left rtl:text-right text-foreground font-normal text-sm",
1336
+ !props.tableLayout?.columnsDraggable && "border-separate border-spacing-0",
1337
+ props.tableLayout?.width === "fixed" ? "table-fixed" : "table-auto",
1338
+ props.tableClassNames?.base
1339
+ ),
1340
+ children
1341
+ }
1342
+ );
1343
+ }
1344
+ function DataGridTableHead({ children }) {
1345
+ const { props } = useDataGrid();
1346
+ return /* @__PURE__ */ jsxRuntime.jsx(
1347
+ "thead",
1348
+ {
1349
+ className: cn(
1350
+ props.tableClassNames?.header,
1351
+ props.tableLayout?.headerSticky && props.tableClassNames?.headerSticky
1352
+ ),
1353
+ children
1354
+ }
1355
+ );
1356
+ }
1357
+ function DataGridTableHeadRow({
1358
+ children,
1359
+ headerGroup
1360
+ }) {
1361
+ const { props } = useDataGrid();
1362
+ return /* @__PURE__ */ jsxRuntime.jsx(
1363
+ "tr",
1364
+ {
1365
+ className: cn(
1366
+ "bg-muted/40",
1367
+ props.tableLayout?.headerBorder && "[&>th]:border-b",
1368
+ props.tableLayout?.cellBorder && "[&_>:last-child]:border-e-0",
1369
+ props.tableLayout?.stripped && "bg-transparent",
1370
+ props.tableLayout?.headerBackground === false && "bg-transparent",
1371
+ props.tableClassNames?.headerRow
1372
+ ),
1373
+ children
1374
+ },
1375
+ headerGroup.id
1376
+ );
1377
+ }
1378
+ function DataGridTableHeadRowCell({
1379
+ children,
1380
+ header,
1381
+ dndRef,
1382
+ dndStyle
1383
+ }) {
1384
+ const { props } = useDataGrid();
1385
+ const { column } = header;
1386
+ const isPinned = column.getIsPinned();
1387
+ const isLastLeftPinned = isPinned === "left" && column.getIsLastColumn("left");
1388
+ const isFirstRightPinned = isPinned === "right" && column.getIsFirstColumn("right");
1389
+ const headerCellSpacing = headerCellSpacingVariants({
1390
+ size: props.tableLayout?.dense ? "dense" : "default"
1391
+ });
1392
+ return /* @__PURE__ */ jsxRuntime.jsx(
1393
+ "th",
1394
+ {
1395
+ ref: dndRef,
1396
+ style: {
1397
+ ...props.tableLayout?.width === "fixed" && {
1398
+ width: `${header.getSize()}px`
1399
+ },
1400
+ ...props.tableLayout?.columnsPinnable && column.getCanPin() && getPinningStyles(column),
1401
+ ...dndStyle ? dndStyle : null
1402
+ },
1403
+ "data-pinned": isPinned || void 0,
1404
+ "data-last-col": isLastLeftPinned ? "left" : isFirstRightPinned ? "right" : void 0,
1405
+ className: cn(
1406
+ "relative h-10 text-left rtl:text-right align-middle font-normal text-accent-foreground [&:has([role=checkbox])]:pe-0",
1407
+ headerCellSpacing,
1408
+ props.tableLayout?.cellBorder && "border-e",
1409
+ props.tableLayout?.columnsResizable && column.getCanResize() && "truncate",
1410
+ props.tableLayout?.columnsPinnable && column.getCanPin() && "[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0 [&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0 [&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0 [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-border data-pinned:bg-muted/90 data-pinned:backdrop-blur-xs",
1411
+ header.column.columnDef.meta?.headerClassName,
1412
+ column.getIndex() === 0 || column.getIndex() === header.headerGroup.headers.length - 1 ? props.tableClassNames?.edgeCell : ""
1413
+ ),
1414
+ children
1415
+ },
1416
+ header.id
1417
+ );
1418
+ }
1419
+ function DataGridTableHeadRowCellResize({
1420
+ header
1421
+ }) {
1422
+ const { column } = header;
1423
+ return /* @__PURE__ */ jsxRuntime.jsx(
1424
+ "div",
1425
+ {
1426
+ ...{
1427
+ onDoubleClick: () => column.resetSize(),
1428
+ onMouseDown: header.getResizeHandler(),
1429
+ onTouchStart: header.getResizeHandler(),
1430
+ className: "absolute top-0 h-full w-4 cursor-col-resize user-select-none touch-none -end-2 z-10 flex justify-center before:absolute before:w-px before:inset-y-0 before:bg-border before:-translate-x-px"
1431
+ }
1432
+ }
1433
+ );
1434
+ }
1435
+ function DataGridTableRowSpacer() {
1436
+ return /* @__PURE__ */ jsxRuntime.jsx("tbody", { "aria-hidden": "true", className: "h-2" });
1437
+ }
1438
+ function DataGridTableBody({ children }) {
1439
+ const { props } = useDataGrid();
1440
+ return /* @__PURE__ */ jsxRuntime.jsx(
1441
+ "tbody",
1442
+ {
1443
+ className: cn(
1444
+ "[&_tr:last-child]:border-0",
1445
+ props.tableLayout?.rowRounded && "[&_td:first-child]:rounded-s-lg [&_td:last-child]:rounded-e-lg",
1446
+ props.tableClassNames?.body
1447
+ ),
1448
+ children
1449
+ }
1450
+ );
1451
+ }
1452
+ function DataGridTableBodyRowSkeleton({ children }) {
1453
+ const { table, props } = useDataGrid();
1454
+ return /* @__PURE__ */ jsxRuntime.jsx(
1455
+ "tr",
1456
+ {
1457
+ className: cn(
1458
+ "hover:bg-muted/40 data-[state=selected]:bg-muted/50",
1459
+ props.onRowClick && "cursor-pointer",
1460
+ !props.tableLayout?.stripped && props.tableLayout?.rowBorder && "border-b border-border [&:not(:last-child)>td]:border-b",
1461
+ props.tableLayout?.cellBorder && "[&_>:last-child]:border-e-0",
1462
+ props.tableLayout?.stripped && "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted",
1463
+ table.options.enableRowSelection && "[&_>:first-child]:relative",
1464
+ props.tableClassNames?.bodyRow
1465
+ ),
1466
+ children
1467
+ }
1468
+ );
1469
+ }
1470
+ function DataGridTableBodyRowSkeletonCell({
1471
+ children,
1472
+ column
1473
+ }) {
1474
+ const { props, table } = useDataGrid();
1475
+ const bodyCellSpacing = bodyCellSpacingVariants({
1476
+ size: props.tableLayout?.dense ? "dense" : "default"
1477
+ });
1478
+ return /* @__PURE__ */ jsxRuntime.jsx(
1479
+ "td",
1480
+ {
1481
+ className: cn(
1482
+ "align-middle",
1483
+ bodyCellSpacing,
1484
+ props.tableLayout?.cellBorder && "border-e",
1485
+ props.tableLayout?.columnsResizable && column.getCanResize() && "truncate",
1486
+ column.columnDef.meta?.cellClassName,
1487
+ props.tableLayout?.columnsPinnable && column.getCanPin() && '[&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-border data-pinned:bg-background/90 data-pinned:backdrop-blur-xs"',
1488
+ column.getIndex() === 0 || column.getIndex() === table.getVisibleFlatColumns().length - 1 ? props.tableClassNames?.edgeCell : ""
1489
+ ),
1490
+ children
1491
+ }
1492
+ );
1493
+ }
1494
+ function DataGridTableBodyRow({
1495
+ children,
1496
+ row,
1497
+ dndRef,
1498
+ dndStyle
1499
+ }) {
1500
+ const { props, table } = useDataGrid();
1501
+ return /* @__PURE__ */ jsxRuntime.jsx(
1502
+ "tr",
1503
+ {
1504
+ ref: dndRef,
1505
+ style: { ...dndStyle ? dndStyle : null },
1506
+ "data-state": table.options.enableRowSelection && row.getIsSelected() ? "selected" : void 0,
1507
+ onClick: () => props.onRowClick && props.onRowClick(row.original),
1508
+ className: cn(
1509
+ "hover:bg-muted/40 data-[state=selected]:bg-muted/50",
1510
+ props.onRowClick && "cursor-pointer",
1511
+ !props.tableLayout?.stripped && props.tableLayout?.rowBorder && "border-b border-border [&:not(:last-child)>td]:border-b",
1512
+ props.tableLayout?.cellBorder && "[&_>:last-child]:border-e-0",
1513
+ props.tableLayout?.stripped && "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted",
1514
+ table.options.enableRowSelection && "[&_>:first-child]:relative",
1515
+ props.tableClassNames?.bodyRow
1516
+ ),
1517
+ children
1518
+ }
1519
+ );
1520
+ }
1521
+ function DataGridTableBodyRowExpanded({ row }) {
1522
+ const { props, table } = useDataGrid();
1523
+ return /* @__PURE__ */ jsxRuntime.jsx(
1524
+ "tr",
1525
+ {
1526
+ className: cn(
1527
+ props.tableLayout?.rowBorder && "[&:not(:last-child)>td]:border-b"
1528
+ ),
1529
+ children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: row.getVisibleCells().length, children: table.getAllColumns().find((column) => column.columnDef.meta?.expandedContent)?.columnDef.meta?.expandedContent?.(row.original) })
1530
+ }
1531
+ );
1532
+ }
1533
+ function DataGridTableBodyRowCell({
1534
+ children,
1535
+ cell,
1536
+ dndRef,
1537
+ dndStyle
1538
+ }) {
1539
+ const { props } = useDataGrid();
1540
+ const { column, row } = cell;
1541
+ const isPinned = column.getIsPinned();
1542
+ const isLastLeftPinned = isPinned === "left" && column.getIsLastColumn("left");
1543
+ const isFirstRightPinned = isPinned === "right" && column.getIsFirstColumn("right");
1544
+ const bodyCellSpacing = bodyCellSpacingVariants({
1545
+ size: props.tableLayout?.dense ? "dense" : "default"
1546
+ });
1547
+ return /* @__PURE__ */ jsxRuntime.jsx(
1548
+ "td",
1549
+ {
1550
+ ref: dndRef,
1551
+ ...props.tableLayout?.columnsDraggable && !isPinned ? { cell } : {},
1552
+ style: {
1553
+ ...props.tableLayout?.columnsPinnable && column.getCanPin() && getPinningStyles(column),
1554
+ ...dndStyle ? dndStyle : null
1555
+ },
1556
+ "data-pinned": isPinned || void 0,
1557
+ "data-last-col": isLastLeftPinned ? "left" : isFirstRightPinned ? "right" : void 0,
1558
+ className: cn(
1559
+ "align-middle",
1560
+ bodyCellSpacing,
1561
+ props.tableLayout?.cellBorder && "border-e",
1562
+ props.tableLayout?.columnsResizable && column.getCanResize() && "truncate",
1563
+ cell.column.columnDef.meta?.cellClassName,
1564
+ props.tableLayout?.columnsPinnable && column.getCanPin() && '[&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-border data-pinned:bg-background/90 data-pinned:backdrop-blur-xs"',
1565
+ column.getIndex() === 0 || column.getIndex() === row.getVisibleCells().length - 1 ? props.tableClassNames?.edgeCell : ""
1566
+ ),
1567
+ children
1568
+ },
1569
+ cell.id
1570
+ );
1571
+ }
1572
+ function DataGridTableEmpty() {
1573
+ const { table, props } = useDataGrid();
1574
+ const totalColumns = table.getAllColumns().length;
1575
+ return /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
1576
+ "td",
1577
+ {
1578
+ colSpan: totalColumns,
1579
+ className: "text-center text-muted-foreground py-6",
1580
+ children: props.emptyMessage || "No data available"
1581
+ }
1582
+ ) });
1583
+ }
1584
+ function DataGridTableLoader() {
1585
+ const { props } = useDataGrid();
1586
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-muted-foreground bg-card flex items-center gap-2 px-4 py-2 font-medium leading-none text-sm border shadow-xs rounded-md", children: [
1587
+ /* @__PURE__ */ jsxRuntime.jsxs(
1588
+ "svg",
1589
+ {
1590
+ className: "animate-spin -ml-1 h-5 w-5 text-muted-foreground",
1591
+ xmlns: "http://www.w3.org/2000/svg",
1592
+ fill: "none",
1593
+ viewBox: "0 0 24 24",
1594
+ children: [
1595
+ /* @__PURE__ */ jsxRuntime.jsx(
1596
+ "circle",
1597
+ {
1598
+ className: "opacity-25",
1599
+ cx: "12",
1600
+ cy: "12",
1601
+ r: "10",
1602
+ stroke: "currentColor",
1603
+ strokeWidth: "3"
1604
+ }
1605
+ ),
1606
+ /* @__PURE__ */ jsxRuntime.jsx(
1607
+ "path",
1608
+ {
1609
+ className: "opacity-75",
1610
+ fill: "currentColor",
1611
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
1612
+ }
1613
+ )
1614
+ ]
1615
+ }
1616
+ ),
1617
+ props.loadingMessage || "Loading..."
1618
+ ] }) });
1619
+ }
1620
+ function DataGridTableRowSelect({
1621
+ row,
1622
+ size
1623
+ }) {
1624
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1625
+ /* @__PURE__ */ jsxRuntime.jsx(
1626
+ "div",
1627
+ {
1628
+ className: cn(
1629
+ "hidden absolute top-0 bottom-0 start-0 w-[2px] bg-primary",
1630
+ row.getIsSelected() && "block"
1631
+ )
1632
+ }
1633
+ ),
1634
+ /* @__PURE__ */ jsxRuntime.jsx(
1635
+ Checkbox,
1636
+ {
1637
+ checked: row.getIsSelected(),
1638
+ onCheckedChange: (value) => row.toggleSelected(!!value),
1639
+ "aria-label": "Select row",
1640
+ size: size ?? "sm",
1641
+ className: "align-[inherit]"
1642
+ }
1643
+ )
1644
+ ] });
1645
+ }
1646
+ function DataGridTableRowSelectAll({ size }) {
1647
+ const { table, recordCount, isLoading } = useDataGrid();
1648
+ return /* @__PURE__ */ jsxRuntime.jsx(
1649
+ Checkbox,
1650
+ {
1651
+ checked: table.getIsAllPageRowsSelected() || table.getIsSomePageRowsSelected() && "indeterminate",
1652
+ disabled: isLoading || recordCount === 0,
1653
+ onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value),
1654
+ "aria-label": "Select all",
1655
+ size,
1656
+ className: "align-[inherit]"
1657
+ }
1658
+ );
1659
+ }
1660
+ function DataGridTable() {
1661
+ const { table, isLoading, props } = useDataGrid();
1662
+ const pagination = table.getState().pagination;
1663
+ return /* @__PURE__ */ jsxRuntime.jsxs(DataGridTableBase, { children: [
1664
+ /* @__PURE__ */ jsxRuntime.jsx(DataGridTableHead, { children: table.getHeaderGroups().map((headerGroup, index) => {
1665
+ return /* @__PURE__ */ jsxRuntime.jsx(DataGridTableHeadRow, { headerGroup, children: headerGroup.headers.map((header, idx) => {
1666
+ const { column } = header;
1667
+ return /* @__PURE__ */ jsxRuntime.jsxs(DataGridTableHeadRowCell, { header, children: [
1668
+ header.isPlaceholder ? null : reactTable.flexRender(
1669
+ header.column.columnDef.header,
1670
+ header.getContext()
1671
+ ),
1672
+ props.tableLayout?.columnsResizable && column.getCanResize() && /* @__PURE__ */ jsxRuntime.jsx(DataGridTableHeadRowCellResize, { header })
1673
+ ] }, idx);
1674
+ }) }, index);
1675
+ }) }),
1676
+ (props.tableLayout?.stripped || !props.tableLayout?.rowBorder) && /* @__PURE__ */ jsxRuntime.jsx(DataGridTableRowSpacer, {}),
1677
+ /* @__PURE__ */ jsxRuntime.jsx(DataGridTableBody, { children: props.loadingMode === "skeleton" && isLoading && pagination?.pageSize ? Array.from({ length: pagination.pageSize }).map((_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(DataGridTableBodyRowSkeleton, { children: table.getVisibleFlatColumns().map((column, colIndex) => {
1678
+ return /* @__PURE__ */ jsxRuntime.jsx(
1679
+ DataGridTableBodyRowSkeletonCell,
1680
+ {
1681
+ column,
1682
+ children: column.columnDef.meta?.skeleton
1683
+ },
1684
+ colIndex
1685
+ );
1686
+ }) }, rowIndex)) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row, index) => {
1687
+ return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
1688
+ /* @__PURE__ */ jsxRuntime.jsx(DataGridTableBodyRow, { row, children: row.getVisibleCells().map((cell, colIndex) => {
1689
+ return /* @__PURE__ */ jsxRuntime.jsx(DataGridTableBodyRowCell, { cell, children: reactTable.flexRender(
1690
+ cell.column.columnDef.cell,
1691
+ cell.getContext()
1692
+ ) }, colIndex);
1693
+ }) }, index),
1694
+ row.getIsExpanded() && /* @__PURE__ */ jsxRuntime.jsx(DataGridTableBodyRowExpanded, { row })
1695
+ ] }, row.id);
1696
+ }) : /* @__PURE__ */ jsxRuntime.jsx(DataGridTableEmpty, {}) })
1697
+ ] });
1698
+ }
1699
+ function DropdownMenu({
1700
+ ...props
1701
+ }) {
1702
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
1703
+ }
1704
+ function DropdownMenuPortal({
1705
+ ...props
1706
+ }) {
1707
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { "data-slot": "dropdown-menu-portal", ...props });
1708
+ }
1709
+ function DropdownMenuTrigger({
1710
+ ...props
1711
+ }) {
1712
+ return /* @__PURE__ */ jsxRuntime.jsx(
1713
+ DropdownMenuPrimitive__namespace.Trigger,
1714
+ {
1715
+ className: "select-none",
1716
+ "data-slot": "dropdown-menu-trigger",
1717
+ ...props
1718
+ }
1719
+ );
1720
+ }
1721
+ function DropdownMenuSubTrigger({
1722
+ className,
1723
+ inset,
1724
+ children,
1725
+ ...props
1726
+ }) {
1727
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1728
+ DropdownMenuPrimitive__namespace.SubTrigger,
1729
+ {
1730
+ "data-slot": "dropdown-menu-sub-trigger",
1731
+ className: cn(
1732
+ "flex cursor-default gap-2 select-none items-center rounded-md px-2 py-1.5 text-sm outline-hidden",
1733
+ "focus:bg-accent focus:text-foreground",
1734
+ "data-[state=open]:bg-accent data-[state=open]:text-foreground",
1735
+ "data-[here=true]:bg-accent data-[here=true]:text-foreground",
1736
+ "[&>svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&>svg]:size-4 [&>svg]:shrink-0",
1737
+ inset && "ps-8",
1738
+ className
1739
+ ),
1740
+ ...props,
1741
+ children: [
1742
+ children,
1743
+ /* @__PURE__ */ jsxRuntime.jsx(
1744
+ lucideReact.ChevronRight,
1745
+ {
1746
+ "data-slot": "dropdown-menu-sub-trigger-indicator",
1747
+ className: "ms-auto size-3.5! rtl:rotate-180"
1748
+ }
1749
+ )
1750
+ ]
1751
+ }
1752
+ );
1753
+ }
1754
+ function DropdownMenuSubContent({
1755
+ className,
1756
+ ...props
1757
+ }) {
1758
+ return /* @__PURE__ */ jsxRuntime.jsx(
1759
+ DropdownMenuPrimitive__namespace.SubContent,
1760
+ {
1761
+ "data-slot": "dropdown-menu-sub-content",
1762
+ className: cn(
1763
+ "space-y-0.5 z-50 min-w-32 overflow-hidden shadow-md shadow-black/5 rounded-md border border-border bg-popover text-popover-foreground p-2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1764
+ className
1765
+ ),
1766
+ ...props
1767
+ }
1768
+ );
1769
+ }
1770
+ function DropdownMenuContent({
1771
+ className,
1772
+ sideOffset = 4,
1773
+ ...props
1774
+ }) {
1775
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1776
+ DropdownMenuPrimitive__namespace.Content,
1777
+ {
1778
+ "data-slot": "dropdown-menu-content",
1779
+ sideOffset,
1780
+ className: cn(
1781
+ "space-y-0.5 z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md shadow-black/5 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1782
+ className
1783
+ ),
1784
+ ...props
1785
+ }
1786
+ ) });
1787
+ }
1788
+ function DropdownMenuGroup({
1789
+ ...props
1790
+ }) {
1791
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Group, { "data-slot": "dropdown-menu-group", ...props });
1792
+ }
1793
+ function DropdownMenuItem({
1794
+ className,
1795
+ inset,
1796
+ variant,
1797
+ ...props
1798
+ }) {
1799
+ return /* @__PURE__ */ jsxRuntime.jsx(
1800
+ DropdownMenuPrimitive__namespace.Item,
1801
+ {
1802
+ "data-slot": "dropdown-menu-item",
1803
+ className: cn(
1804
+ "text-foreground relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0",
1805
+ "focus:bg-accent focus:text-foreground",
1806
+ "data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",
1807
+ inset && "ps-8",
1808
+ variant === "destructive" && "text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",
1809
+ className
1810
+ ),
1811
+ ...props
1812
+ }
1813
+ );
1814
+ }
1815
+ function DropdownMenuCheckboxItem({
1816
+ className,
1817
+ children,
1818
+ checked,
1819
+ ...props
1820
+ }) {
1821
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1822
+ DropdownMenuPrimitive__namespace.CheckboxItem,
1823
+ {
1824
+ "data-slot": "dropdown-menu-checkbox-item",
1825
+ className: cn(
1826
+ "relative flex cursor-default select-none items-center rounded-md py-1.5 ps-8 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
1827
+ className
1828
+ ),
1829
+ checked,
1830
+ ...props,
1831
+ children: [
1832
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center text-muted-foreground justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-primary" }) }) }),
1833
+ children
1834
+ ]
1835
+ }
1836
+ );
1837
+ }
1838
+ function DropdownMenuRadioItem({
1839
+ className,
1840
+ children,
1841
+ ...props
1842
+ }) {
1843
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1844
+ DropdownMenuPrimitive__namespace.RadioItem,
1845
+ {
1846
+ "data-slot": "dropdown-menu-radio-item",
1847
+ className: cn(
1848
+ "relative flex cursor-default select-none items-center rounded-md py-1.5 ps-6 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
1849
+ className
1850
+ ),
1851
+ ...props,
1852
+ children: [
1853
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-1.5 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-1.5 w-1.5 fill-primary stroke-primary" }) }) }),
1854
+ children
1855
+ ]
1856
+ }
1857
+ );
1858
+ }
1859
+ function DropdownMenuLabel({
1860
+ className,
1861
+ inset,
1862
+ ...props
1863
+ }) {
1864
+ return /* @__PURE__ */ jsxRuntime.jsx(
1865
+ DropdownMenuPrimitive__namespace.Label,
1866
+ {
1867
+ "data-slot": "dropdown-menu-label",
1868
+ className: cn(
1869
+ "px-2 py-1.5 text-xs text-muted-foreground font-medium",
1870
+ inset && "ps-8",
1871
+ className
1872
+ ),
1873
+ ...props
1874
+ }
1875
+ );
1876
+ }
1877
+ function DropdownMenuRadioGroup({
1878
+ ...props
1879
+ }) {
1880
+ return /* @__PURE__ */ jsxRuntime.jsx(
1881
+ DropdownMenuPrimitive__namespace.RadioGroup,
1882
+ {
1883
+ "data-slot": "dropdown-menu-radio-group",
1884
+ ...props
1885
+ }
1886
+ );
1887
+ }
1888
+ function DropdownMenuSeparator({
1889
+ className,
1890
+ ...props
1891
+ }) {
1892
+ return /* @__PURE__ */ jsxRuntime.jsx(
1893
+ DropdownMenuPrimitive__namespace.Separator,
1894
+ {
1895
+ "data-slot": "dropdown-menu-separator",
1896
+ className: cn("-mx-2 my-1.5 h-px bg-muted", className),
1897
+ ...props
1898
+ }
1899
+ );
1900
+ }
1901
+ function DropdownMenuShortcut({
1902
+ className,
1903
+ ...props
1904
+ }) {
1905
+ return /* @__PURE__ */ jsxRuntime.jsx(
1906
+ "span",
1907
+ {
1908
+ "data-slot": "dropdown-menu-shortcut",
1909
+ className: cn("ms-auto text-xs tracking-widest opacity-60", className),
1910
+ ...props
1911
+ }
1912
+ );
1913
+ }
1914
+ function DropdownMenuSub({
1915
+ ...props
1916
+ }) {
1917
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
1918
+ }
1919
+ function DataGridColumnHeader({
1920
+ column,
1921
+ title = "",
1922
+ icon,
1923
+ className,
1924
+ filter,
1925
+ visibility = false
1926
+ }) {
1927
+ const { isLoading, table, props, recordCount } = useDataGrid();
1928
+ const moveColumn = (direction) => {
1929
+ const currentOrder = [...table.getState().columnOrder];
1930
+ const currentIndex = currentOrder.indexOf(column.id);
1931
+ if (direction === "left" && currentIndex > 0) {
1932
+ const newOrder = [...currentOrder];
1933
+ const [movedColumn] = newOrder.splice(currentIndex, 1);
1934
+ newOrder.splice(currentIndex - 1, 0, movedColumn);
1935
+ table.setColumnOrder(newOrder);
1936
+ }
1937
+ if (direction === "right" && currentIndex < currentOrder.length - 1) {
1938
+ const newOrder = [...currentOrder];
1939
+ const [movedColumn] = newOrder.splice(currentIndex, 1);
1940
+ newOrder.splice(currentIndex + 1, 0, movedColumn);
1941
+ table.setColumnOrder(newOrder);
1942
+ }
1943
+ };
1944
+ const canMove = (direction) => {
1945
+ const currentOrder = table.getState().columnOrder;
1946
+ const currentIndex = currentOrder.indexOf(column.id);
1947
+ if (direction === "left") {
1948
+ return currentIndex > 0;
1949
+ } else {
1950
+ return currentIndex < currentOrder.length - 1;
1951
+ }
1952
+ };
1953
+ const headerLabel = () => {
1954
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1955
+ "div",
1956
+ {
1957
+ className: cn(
1958
+ "text-accent-foreground font-normal inline-flex h-full items-center gap-1.5 text-[0.8125rem] leading-[calc(1.125/0.8125)] [&_svg]:size-3.5 [&_svg]:opacity-60",
1959
+ className
1960
+ ),
1961
+ children: [
1962
+ icon && icon,
1963
+ title
1964
+ ]
1965
+ }
1966
+ );
1967
+ };
1968
+ const headerButton = () => {
1969
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1970
+ Button,
1971
+ {
1972
+ variant: "ghost",
1973
+ className: cn(
1974
+ "text-secondary-foreground rounded-md font-normal -ms-2 px-2 h-7 hover:bg-secondary data-[state=open]:bg-secondary hover:text-foreground data-[state=open]:text-foreground",
1975
+ className
1976
+ ),
1977
+ disabled: isLoading || recordCount === 0,
1978
+ onClick: () => {
1979
+ const isSorted = column.getIsSorted();
1980
+ if (isSorted === "asc") {
1981
+ column.toggleSorting(true);
1982
+ } else if (isSorted === "desc") {
1983
+ column.clearSorting();
1984
+ } else {
1985
+ column.toggleSorting(false);
1986
+ }
1987
+ },
1988
+ children: [
1989
+ icon && icon,
1990
+ title,
1991
+ column.getCanSort() && (column.getIsSorted() === "desc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "size-[0.7rem]! mt-px" }) : column.getIsSorted() === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "size-[0.7rem]! mt-px" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "size-[0.7rem]! mt-px" }))
1992
+ ]
1993
+ }
1994
+ );
1995
+ };
1996
+ const headerPin = () => {
1997
+ return /* @__PURE__ */ jsxRuntime.jsx(
1998
+ Button,
1999
+ {
2000
+ mode: "icon",
2001
+ size: "sm",
2002
+ variant: "ghost",
2003
+ className: "-me-1 size-7 rounded-md",
2004
+ onClick: () => column.pin(false),
2005
+ "aria-label": `Unpin ${title} column`,
2006
+ title: `Unpin ${title} column`,
2007
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PinOff, { className: "size-3.5! opacity-50!", "aria-hidden": "true" })
2008
+ }
2009
+ );
2010
+ };
2011
+ const headerControls = () => {
2012
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center h-full gap-1.5 justify-between", children: [
2013
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
2014
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: headerButton() }),
2015
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { className: "w-40", align: "start", children: [
2016
+ filter && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: filter }),
2017
+ filter && (column.getCanSort() || column.getCanPin() || visibility) && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2018
+ column.getCanSort() && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2019
+ /* @__PURE__ */ jsxRuntime.jsxs(
2020
+ DropdownMenuItem,
2021
+ {
2022
+ onClick: () => {
2023
+ if (column.getIsSorted() === "asc") {
2024
+ column.clearSorting();
2025
+ } else {
2026
+ column.toggleSorting(false);
2027
+ }
2028
+ },
2029
+ disabled: !column.getCanSort(),
2030
+ children: [
2031
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "size-3.5!" }),
2032
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "grow", children: "Asc" }),
2033
+ column.getIsSorted() === "asc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4 opacity-100! text-primary" })
2034
+ ]
2035
+ }
2036
+ ),
2037
+ /* @__PURE__ */ jsxRuntime.jsxs(
2038
+ DropdownMenuItem,
2039
+ {
2040
+ onClick: () => {
2041
+ if (column.getIsSorted() === "desc") {
2042
+ column.clearSorting();
2043
+ } else {
2044
+ column.toggleSorting(true);
2045
+ }
2046
+ },
2047
+ disabled: !column.getCanSort(),
2048
+ children: [
2049
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "size-3.5!" }),
2050
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "grow", children: "Desc" }),
2051
+ column.getIsSorted() === "desc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4 opacity-100! text-primary" })
2052
+ ]
2053
+ }
2054
+ )
2055
+ ] }),
2056
+ (filter || column.getCanSort()) && (column.getCanSort() || column.getCanPin() || visibility) && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2057
+ props.tableLayout?.columnsPinnable && column.getCanPin() && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2058
+ /* @__PURE__ */ jsxRuntime.jsxs(
2059
+ DropdownMenuItem,
2060
+ {
2061
+ onClick: () => column.pin(column.getIsPinned() === "left" ? false : "left"),
2062
+ children: [
2063
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeftToLine, { className: "size-3.5!", "aria-hidden": "true" }),
2064
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "grow", children: "Pin to left" }),
2065
+ column.getIsPinned() === "left" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4 opacity-100! text-primary" })
2066
+ ]
2067
+ }
2068
+ ),
2069
+ /* @__PURE__ */ jsxRuntime.jsxs(
2070
+ DropdownMenuItem,
2071
+ {
2072
+ onClick: () => column.pin(
2073
+ column.getIsPinned() === "right" ? false : "right"
2074
+ ),
2075
+ children: [
2076
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRightToLine, { className: "size-3.5!", "aria-hidden": "true" }),
2077
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "grow", children: "Pin to right" }),
2078
+ column.getIsPinned() === "right" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4 opacity-100! text-primary" })
2079
+ ]
2080
+ }
2081
+ )
2082
+ ] }),
2083
+ props.tableLayout?.columnsMovable && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2084
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2085
+ /* @__PURE__ */ jsxRuntime.jsxs(
2086
+ DropdownMenuItem,
2087
+ {
2088
+ onClick: () => moveColumn("left"),
2089
+ disabled: !canMove("left") || column.getIsPinned() !== false,
2090
+ children: [
2091
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "size-3.5!", "aria-hidden": "true" }),
2092
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Move to Left" })
2093
+ ]
2094
+ }
2095
+ ),
2096
+ /* @__PURE__ */ jsxRuntime.jsxs(
2097
+ DropdownMenuItem,
2098
+ {
2099
+ onClick: () => moveColumn("right"),
2100
+ disabled: !canMove("right") || column.getIsPinned() !== false,
2101
+ children: [
2102
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "size-3.5!", "aria-hidden": "true" }),
2103
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Move to Right" })
2104
+ ]
2105
+ }
2106
+ )
2107
+ ] }),
2108
+ props.tableLayout?.columnsVisibility && visibility && (column.getCanSort() || column.getCanPin() || filter) && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2109
+ props.tableLayout?.columnsVisibility && visibility && /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSub, { children: [
2110
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSubTrigger, { children: [
2111
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings2, { className: "size-3.5!" }),
2112
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Columns" })
2113
+ ] }),
2114
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSubContent, { children: table.getAllColumns().filter(
2115
+ (col) => typeof col.accessorFn !== "undefined" && col.getCanHide()
2116
+ ).map((col) => {
2117
+ return /* @__PURE__ */ jsxRuntime.jsx(
2118
+ DropdownMenuCheckboxItem,
2119
+ {
2120
+ checked: col.getIsVisible(),
2121
+ onSelect: (event) => event.preventDefault(),
2122
+ onCheckedChange: (value) => col.toggleVisibility(!!value),
2123
+ className: "capitalize",
2124
+ children: col.columnDef.meta?.headerTitle || col.id
2125
+ },
2126
+ col.id
2127
+ );
2128
+ }) }) })
2129
+ ] })
2130
+ ] })
2131
+ ] }),
2132
+ props.tableLayout?.columnsPinnable && column.getCanPin() && column.getIsPinned() && headerPin()
2133
+ ] });
2134
+ };
2135
+ if (props.tableLayout?.columnsMovable || props.tableLayout?.columnsVisibility && visibility || props.tableLayout?.columnsPinnable && column.getCanPin() || filter) {
2136
+ return headerControls();
2137
+ }
2138
+ if (column.getCanSort() || props.tableLayout?.columnsResizable && column.getCanResize()) {
2139
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center h-full", children: headerButton() });
2140
+ }
2141
+ return headerLabel();
2142
+ }
2143
+ var SelectContext = React__namespace.createContext({ indicatorPosition: "left", indicator: null, indicatorVisibility: true });
2144
+ var Select = ({
2145
+ indicatorPosition = "left",
2146
+ indicatorVisibility = true,
2147
+ indicator,
2148
+ ...props
2149
+ }) => {
2150
+ return /* @__PURE__ */ jsxRuntime.jsx(
2151
+ SelectContext.Provider,
2152
+ {
2153
+ value: { indicatorPosition, indicatorVisibility, indicator },
2154
+ children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Root, { ...props })
2155
+ }
2156
+ );
2157
+ };
2158
+ function SelectGroup({
2159
+ ...props
2160
+ }) {
2161
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Group, { "data-slot": "select-group", ...props });
2162
+ }
2163
+ function SelectValue({
2164
+ ...props
2165
+ }) {
2166
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Value, { "data-slot": "select-value", ...props });
2167
+ }
2168
+ var selectTriggerVariants = classVarianceAuthority.cva(
2169
+ `
2170
+ flex bg-background w-full items-center justify-between outline-none border border-input shadow-xs shadow-black/5 transition-shadow
2171
+ text-foreground data-placeholder:text-muted-foreground focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px]
2172
+ focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1
2173
+ aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
2174
+ [[data-invalid=true]_&]:border-destructive/60 [[data-invalid=true]_&]:ring-destructive/10 dark:[[data-invalid=true]_&]:border-destructive dark:[[data-invalid=true]_&]:ring-destructive/20
2175
+ `,
2176
+ {
2177
+ variants: {
2178
+ size: {
2179
+ sm: "h-7 px-2.5 text-xs gap-1 rounded-md",
2180
+ md: "h-8.5 px-3 text-[0.8125rem] leading-(--text-sm--line-height) gap-1 rounded-md",
2181
+ lg: "h-10 px-4 text-sm gap-1.5 rounded-md"
2182
+ }
2183
+ },
2184
+ defaultVariants: {
2185
+ size: "md"
2186
+ }
2187
+ }
2188
+ );
2189
+ function SelectTrigger({
2190
+ className,
2191
+ children,
2192
+ size,
2193
+ ...props
2194
+ }) {
2195
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2196
+ radixUi.Select.Trigger,
2197
+ {
2198
+ "data-slot": "select-trigger",
2199
+ className: cn(selectTriggerVariants({ size }), className),
2200
+ ...props,
2201
+ children: [
2202
+ children,
2203
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-60 -me-0.5" }) })
2204
+ ]
2205
+ }
2206
+ );
2207
+ }
2208
+ function SelectScrollUpButton({
2209
+ className,
2210
+ ...props
2211
+ }) {
2212
+ return /* @__PURE__ */ jsxRuntime.jsx(
2213
+ radixUi.Select.ScrollUpButton,
2214
+ {
2215
+ "data-slot": "select-scroll-up-button",
2216
+ className: cn(
2217
+ "flex cursor-default items-center justify-center py-1",
2218
+ className
2219
+ ),
2220
+ ...props,
2221
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
2222
+ }
2223
+ );
2224
+ }
2225
+ function SelectScrollDownButton({
2226
+ className,
2227
+ ...props
2228
+ }) {
2229
+ return /* @__PURE__ */ jsxRuntime.jsx(
2230
+ radixUi.Select.ScrollDownButton,
2231
+ {
2232
+ "data-slot": "select-scroll-down-button",
2233
+ className: cn(
2234
+ "flex cursor-default items-center justify-center py-1",
2235
+ className
2236
+ ),
2237
+ ...props,
2238
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
2239
+ }
2240
+ );
2241
+ }
2242
+ function SelectContent({
2243
+ className,
2244
+ children,
2245
+ position = "popper",
2246
+ ...props
2247
+ }) {
2248
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
2249
+ radixUi.Select.Content,
2250
+ {
2251
+ "data-slot": "select-content",
2252
+ className: cn(
2253
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover shadow-md shadow-black/5 text-secondary-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2254
+ position === "popper" && "data-[side=bottom]:translate-y-1.5 data-[side=left]:-translate-x-1.5 data-[side=right]:translate-x-1.5 data-[side=top]:-translate-y-1.5",
2255
+ className
2256
+ ),
2257
+ position,
2258
+ ...props,
2259
+ children: [
2260
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
2261
+ /* @__PURE__ */ jsxRuntime.jsx(
2262
+ radixUi.Select.Viewport,
2263
+ {
2264
+ className: cn(
2265
+ "p-1.5",
2266
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
2267
+ ),
2268
+ children
2269
+ }
2270
+ ),
2271
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
2272
+ ]
2273
+ }
2274
+ ) });
2275
+ }
2276
+ function SelectLabel({
2277
+ className,
2278
+ ...props
2279
+ }) {
2280
+ return /* @__PURE__ */ jsxRuntime.jsx(
2281
+ radixUi.Select.Label,
2282
+ {
2283
+ "data-slot": "select-label",
2284
+ className: cn(
2285
+ "py-1.5 ps-8 pe-2 text-xs text-muted-foreground font-medium",
2286
+ className
2287
+ ),
2288
+ ...props
2289
+ }
2290
+ );
2291
+ }
2292
+ function SelectItem({
2293
+ className,
2294
+ children,
2295
+ ...props
2296
+ }) {
2297
+ const { indicatorPosition, indicatorVisibility, indicator } = React__namespace.useContext(SelectContext);
2298
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2299
+ radixUi.Select.Item,
2300
+ {
2301
+ "data-slot": "select-item",
2302
+ className: cn(
2303
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 text-sm outline-hidden text-foreground hover:bg-accent focus:bg-accent data-disabled:pointer-events-none data-disabled:opacity-50",
2304
+ indicatorPosition === "left" ? "ps-8 pe-2" : "pe-8 ps-2",
2305
+ className
2306
+ ),
2307
+ ...props,
2308
+ children: [
2309
+ indicatorVisibility && (indicator && React.isValidElement(indicator) ? indicator : /* @__PURE__ */ jsxRuntime.jsx(
2310
+ "span",
2311
+ {
2312
+ className: cn(
2313
+ "absolute flex h-3.5 w-3.5 items-center justify-center",
2314
+ indicatorPosition === "left" ? "start-2" : "end-2"
2315
+ ),
2316
+ children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-primary" }) })
2317
+ }
2318
+ )),
2319
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemText, { children })
2320
+ ]
2321
+ }
2322
+ );
2323
+ }
2324
+ function SelectIndicator({
2325
+ children,
2326
+ className,
2327
+ ...props
2328
+ }) {
2329
+ const { indicatorPosition } = React__namespace.useContext(SelectContext);
2330
+ return /* @__PURE__ */ jsxRuntime.jsx(
2331
+ "span",
2332
+ {
2333
+ "data-slot": "select-indicator",
2334
+ className: cn(
2335
+ "absolute flex top-1/2 -translate-y-1/2 items-center justify-center",
2336
+ indicatorPosition === "left" ? "start-2" : "end-2",
2337
+ className
2338
+ ),
2339
+ ...props,
2340
+ children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemIndicator, { children })
2341
+ }
2342
+ );
2343
+ }
2344
+ function SelectSeparator({
2345
+ className,
2346
+ ...props
2347
+ }) {
2348
+ return /* @__PURE__ */ jsxRuntime.jsx(
2349
+ radixUi.Select.Separator,
2350
+ {
2351
+ "data-slot": "select-separator",
2352
+ className: cn("-mx-1.5 my-1.5 h-px bg-border", className),
2353
+ ...props
2354
+ }
2355
+ );
2356
+ }
2357
+ function Skeleton({ className, ...props }) {
2358
+ return /* @__PURE__ */ jsxRuntime.jsx(
2359
+ "div",
2360
+ {
2361
+ "aria-hidden": props["aria-hidden"] ?? true,
2362
+ "data-slot": "skeleton",
2363
+ className: cn(
2364
+ "block animate-pulse rounded-md bg-muted/40 shrink-0",
2365
+ // ensure sensible default size when none provided
2366
+ "h-4 w-full",
2367
+ className
2368
+ ),
2369
+ ...props
2370
+ }
2371
+ );
2372
+ }
2373
+ function DataGridPagination(props) {
2374
+ const { table, recordCount, isLoading } = useDataGrid();
2375
+ const defaultProps = {
2376
+ sizes: [5, 10, 25, 50, 100],
2377
+ sizesLabel: "Show",
2378
+ sizesDescription: "per page",
2379
+ sizesSkeleton: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-44" }),
2380
+ moreLimit: 5,
2381
+ more: false,
2382
+ info: "{from} - {to} of {count}",
2383
+ infoSkeleton: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-60" })
2384
+ };
2385
+ const mergedProps = { ...defaultProps, ...props };
2386
+ const btnBaseClasses = "size-7 p-0 text-sm";
2387
+ const btnArrowClasses = btnBaseClasses + " rtl:transform rtl:rotate-180";
2388
+ const pageIndex = table.getState().pagination.pageIndex;
2389
+ const pageSize = table.getState().pagination.pageSize;
2390
+ const from = pageIndex * pageSize + 1;
2391
+ const to = Math.min((pageIndex + 1) * pageSize, recordCount);
2392
+ const pageCount = table.getPageCount();
2393
+ const paginationInfo = mergedProps?.info ? mergedProps.info.replace("{from}", from.toString()).replace("{to}", to.toString()).replace("{count}", recordCount.toString()) : `${from} - ${to} of ${recordCount}`;
2394
+ const paginationMoreLimit = mergedProps?.moreLimit || 5;
2395
+ const currentGroupStart = Math.floor(pageIndex / paginationMoreLimit) * paginationMoreLimit;
2396
+ const currentGroupEnd = Math.min(
2397
+ currentGroupStart + paginationMoreLimit,
2398
+ pageCount
2399
+ );
2400
+ const renderPageButtons = () => {
2401
+ const buttons = [];
2402
+ for (let i = currentGroupStart; i < currentGroupEnd; i++) {
2403
+ buttons.push(
2404
+ /* @__PURE__ */ jsxRuntime.jsx(
2405
+ Button,
2406
+ {
2407
+ size: "sm",
2408
+ mode: "icon",
2409
+ variant: "ghost",
2410
+ className: cn(btnBaseClasses, "text-muted-foreground", {
2411
+ "bg-accent text-accent-foreground": pageIndex === i
2412
+ }),
2413
+ onClick: () => {
2414
+ if (pageIndex !== i) {
2415
+ table.setPageIndex(i);
2416
+ }
2417
+ },
2418
+ children: i + 1
2419
+ },
2420
+ i
2421
+ )
2422
+ );
2423
+ }
2424
+ return buttons;
2425
+ };
2426
+ const renderEllipsisPrevButton = () => {
2427
+ if (currentGroupStart > 0) {
2428
+ return /* @__PURE__ */ jsxRuntime.jsx(
2429
+ Button,
2430
+ {
2431
+ size: "sm",
2432
+ mode: "icon",
2433
+ className: btnBaseClasses,
2434
+ variant: "ghost",
2435
+ onClick: () => table.setPageIndex(currentGroupStart - 1),
2436
+ children: "..."
2437
+ }
2438
+ );
2439
+ }
2440
+ return null;
2441
+ };
2442
+ const renderEllipsisNextButton = () => {
2443
+ if (currentGroupEnd < pageCount) {
2444
+ return /* @__PURE__ */ jsxRuntime.jsx(
2445
+ Button,
2446
+ {
2447
+ className: btnBaseClasses,
2448
+ variant: "ghost",
2449
+ size: "sm",
2450
+ mode: "icon",
2451
+ onClick: () => table.setPageIndex(currentGroupEnd),
2452
+ children: "..."
2453
+ }
2454
+ );
2455
+ }
2456
+ return null;
2457
+ };
2458
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2459
+ "div",
2460
+ {
2461
+ "data-slot": "data-grid-pagination",
2462
+ className: cn(
2463
+ "flex flex-wrap flex-col sm:flex-row justify-between items-center gap-2.5 py-2.5 sm:py-0 grow",
2464
+ mergedProps?.className
2465
+ ),
2466
+ children: [
2467
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center space-x-2.5 pb-2.5 sm:pb-0 order-2 sm:order-1", children: isLoading ? mergedProps?.sizesSkeleton : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2468
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: "Rows per page" }),
2469
+ /* @__PURE__ */ jsxRuntime.jsxs(
2470
+ Select,
2471
+ {
2472
+ value: `${pageSize}`,
2473
+ indicatorPosition: "right",
2474
+ onValueChange: (value) => {
2475
+ const newPageSize = Number(value);
2476
+ table.setPageSize(newPageSize);
2477
+ },
2478
+ children: [
2479
+ /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-fit", size: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: `${pageSize}` }) }),
2480
+ /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { side: "top", className: "min-w-[50px]", children: mergedProps?.sizes?.map((size) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: `${size}`, children: size }, size)) })
2481
+ ]
2482
+ }
2483
+ )
2484
+ ] }) }),
2485
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col sm:flex-row justify-center sm:justify-end items-center gap-2.5 pt-2.5 sm:pt-0 order-1 sm:order-2", children: isLoading ? mergedProps?.infoSkeleton : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2486
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground text-nowrap order-2 sm:order-1", children: paginationInfo }),
2487
+ pageCount > 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-1 order-1 sm:order-2", children: [
2488
+ /* @__PURE__ */ jsxRuntime.jsxs(
2489
+ Button,
2490
+ {
2491
+ size: "sm",
2492
+ mode: "icon",
2493
+ variant: "ghost",
2494
+ className: btnArrowClasses,
2495
+ onClick: () => table.previousPage(),
2496
+ disabled: !table.getCanPreviousPage(),
2497
+ children: [
2498
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Go to previous page" }),
2499
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: "size-4" })
2500
+ ]
2501
+ }
2502
+ ),
2503
+ renderEllipsisPrevButton(),
2504
+ renderPageButtons(),
2505
+ renderEllipsisNextButton(),
2506
+ /* @__PURE__ */ jsxRuntime.jsxs(
2507
+ Button,
2508
+ {
2509
+ size: "sm",
2510
+ mode: "icon",
2511
+ variant: "ghost",
2512
+ className: btnArrowClasses,
2513
+ onClick: () => table.nextPage(),
2514
+ disabled: !table.getCanNextPage(),
2515
+ children: [
2516
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Go to next page" }),
2517
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "size-4" })
2518
+ ]
2519
+ }
2520
+ )
2521
+ ] })
2522
+ ] }) })
2523
+ ]
2524
+ }
2525
+ );
2526
+ }
2527
+ function DataGridColumnVisibility({
2528
+ table,
2529
+ trigger
2530
+ }) {
2531
+ return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
2532
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: trigger }),
2533
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "end", className: "min-w-[150px]", children: [
2534
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { className: "font-medium", children: "Toggle Columns" }),
2535
+ table.getAllColumns().filter(
2536
+ (column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
2537
+ ).map((column) => {
2538
+ return /* @__PURE__ */ jsxRuntime.jsx(
2539
+ DropdownMenuCheckboxItem,
2540
+ {
2541
+ className: "capitalize",
2542
+ checked: column.getIsVisible(),
2543
+ onSelect: (event) => event.preventDefault(),
2544
+ onCheckedChange: (value) => column.toggleVisibility(!!value),
2545
+ children: column.columnDef.meta?.headerTitle || column.id
2546
+ },
2547
+ column.id
2548
+ );
2549
+ })
2550
+ ] })
2551
+ ] });
2552
+ }
2553
+ var badgeVariants = classVarianceAuthority.cva(
2554
+ "inline-flex items-center justify-center border border-transparent font-medium focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:-ms-px [&_svg]:shrink-0",
2555
+ {
2556
+ variants: {
2557
+ variant: {
2558
+ primary: "bg-primary text-primary-foreground",
2559
+ secondary: "bg-secondary text-secondary-foreground",
2560
+ success: "bg-[var(--color-success-accent,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]",
2561
+ warning: "bg-[var(--color-warning-accent,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]",
2562
+ info: "bg-[var(--color-info-accent,var(--color-violet-500))] text-[var(--color-info-foreground,var(--color-white))]",
2563
+ outline: "bg-transparent border border-border text-secondary-foreground",
2564
+ destructive: "bg-destructive text-destructive-foreground"
354
2565
  },
355
- underlined: {
356
- solid: "",
357
- dashed: ""
2566
+ appearance: {
2567
+ default: "",
2568
+ light: "",
2569
+ outline: "",
2570
+ ghost: "border-transparent bg-transparent"
358
2571
  },
359
- size: {
360
- lg: "h-10 rounded-md px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",
361
- md: "h-8.5 rounded-md px-3 gap-1.5 text-[0.8125rem] leading-[var(--text-sm--line-height)] [&_svg:not([class*=size-])]:size-4",
362
- sm: "h-7 rounded-md px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",
363
- icon: "size-8.5 rounded-md [&_svg:not([class*=size-])]:size-4 shrink-0"
2572
+ disabled: {
2573
+ true: "opacity-50 pointer-events-none"
364
2574
  },
365
- autoHeight: {
366
- true: "",
367
- false: ""
2575
+ size: {
2576
+ lg: "rounded-md px-[0.5rem] h-7 min-w-7 gap-1.5 text-xs [&_svg]:size-3.5",
2577
+ md: "rounded-md px-[0.45rem] h-6 min-w-6 gap-1.5 text-xs [&_svg]:size-3.5 ",
2578
+ sm: "rounded-sm px-[0.325rem] h-5 min-w-5 gap-1 text-[0.6875rem] leading-[0.75rem] [&_svg]:size-3",
2579
+ xs: "rounded-sm px-[0.25rem] h-4 min-w-4 gap-1 text-[0.625rem] leading-[0.5rem] [&_svg]:size-3"
368
2580
  },
369
2581
  shape: {
370
2582
  default: "",
371
2583
  circle: "rounded-full"
372
- },
373
- mode: {
374
- default: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
375
- icon: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 shrink-0",
376
- link: "text-primary h-auto p-0 bg-transparent rounded-none hover:bg-transparent data-[state=open]:bg-transparent",
377
- input: `
378
- justify-start font-normal hover:bg-background [&_svg]:transition-colors [&_svg]:hover:text-foreground data-[state=open]:bg-background
379
- focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/30
380
- [[data-state=open]>&]:border-ring [[data-state=open]>&]:outline-hidden [[data-state=open]>&]:ring-[3px]
381
- [[data-state=open]>&]:ring-ring/30
382
- aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
383
- in-data-[invalid=true]:border-destructive/60 in-data-[invalid=true]:ring-destructive/10 dark:in-data-[invalid=true]:border-destructive dark:in-data-[invalid=true]:ring-destructive/20
384
- `
385
- },
386
- placeholder: {
387
- true: "text-muted-foreground",
388
- false: ""
389
2584
  }
390
2585
  },
391
- compoundVariants: [
392
- // Icons opacity for default mode
393
- {
394
- variant: "ghost",
395
- mode: "default",
396
- className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
397
- },
398
- {
399
- variant: "outline",
400
- mode: "default",
401
- className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
402
- },
403
- {
404
- variant: "dashed",
405
- mode: "default",
406
- className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
407
- },
408
- {
409
- variant: "secondary",
410
- mode: "default",
411
- className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
412
- },
413
- // Icons opacity for default mode
414
- {
415
- variant: "outline",
416
- mode: "input",
417
- className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
418
- },
419
- {
420
- variant: "outline",
421
- mode: "icon",
422
- className: "[&_svg:not([role=img]):not([class*=text-]):not([class*=opacity-])]:opacity-60"
423
- },
424
- // Auto height
425
- {
426
- size: "md",
427
- autoHeight: true,
428
- className: "h-auto min-h-8.5"
429
- },
430
- {
431
- size: "sm",
432
- autoHeight: true,
433
- className: "h-auto min-h-7"
434
- },
435
- {
436
- size: "lg",
437
- autoHeight: true,
438
- className: "h-auto min-h-10"
439
- },
440
- // Shadow support
441
- {
442
- variant: "primary",
443
- mode: "default",
444
- appearance: "default",
445
- className: "shadow-xs shadow-black/5"
446
- },
447
- {
448
- variant: "mono",
449
- mode: "default",
450
- appearance: "default",
451
- className: "shadow-xs shadow-black/5"
452
- },
453
- {
454
- variant: "secondary",
455
- mode: "default",
456
- appearance: "default",
457
- className: "shadow-xs shadow-black/5"
458
- },
459
- {
460
- variant: "outline",
461
- mode: "default",
462
- appearance: "default",
463
- className: "shadow-xs shadow-black/5"
464
- },
465
- {
466
- variant: "dashed",
467
- mode: "default",
468
- appearance: "default",
469
- className: "shadow-xs shadow-black/5"
470
- },
471
- {
472
- variant: "destructive",
473
- mode: "default",
474
- appearance: "default",
475
- className: "shadow-xs shadow-black/5"
476
- },
477
- // Shadow support
478
- {
479
- variant: "primary",
480
- mode: "icon",
481
- appearance: "default",
482
- className: "shadow-xs shadow-black/5"
483
- },
484
- {
485
- variant: "mono",
486
- mode: "icon",
487
- appearance: "default",
488
- className: "shadow-xs shadow-black/5"
489
- },
490
- {
491
- variant: "secondary",
492
- mode: "icon",
493
- appearance: "default",
494
- className: "shadow-xs shadow-black/5"
495
- },
496
- {
497
- variant: "outline",
498
- mode: "icon",
499
- appearance: "default",
500
- className: "shadow-xs shadow-black/5"
501
- },
502
- {
503
- variant: "dashed",
504
- mode: "icon",
505
- appearance: "default",
506
- className: "shadow-xs shadow-black/5"
507
- },
508
- {
509
- variant: "destructive",
510
- mode: "icon",
511
- appearance: "default",
512
- className: "shadow-xs shadow-black/5"
513
- },
514
- // Link
515
- {
516
- variant: "primary",
517
- mode: "link",
518
- underline: "solid",
519
- className: "font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"
520
- },
2586
+ compoundVariants: [
2587
+ /* Light */
521
2588
  {
522
2589
  variant: "primary",
523
- mode: "link",
524
- underline: "dashed",
525
- className: "font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"
2590
+ appearance: "light",
2591
+ className: "text-[var(--color-primary-accent,var(--color-blue-700))] bg-[var(--color-primary-soft,var(--color-blue-50))] dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:text-[var(--color-primary-soft,var(--color-blue-600))]"
526
2592
  },
527
2593
  {
528
- variant: "primary",
529
- mode: "link",
530
- underlined: "solid",
531
- className: "font-medium text-primary hover:text-primary/90 [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"
2594
+ variant: "secondary",
2595
+ appearance: "light",
2596
+ className: "bg-secondary dark:bg-secondary/50 text-secondary-foreground"
532
2597
  },
533
2598
  {
534
- variant: "primary",
535
- mode: "link",
536
- underlined: "dashed",
537
- className: "font-medium text-primary hover:text-primary/90 [&_svg]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"
2599
+ variant: "success",
2600
+ appearance: "light",
2601
+ className: "text-[var(--color-success-accent,var(--color-green-800))] bg-[var(--color-success-soft,var(--color-green-100))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:text-[var(--color-success-soft,var(--color-green-600))]"
538
2602
  },
539
2603
  {
540
- variant: "inverse",
541
- mode: "link",
542
- underline: "solid",
543
- className: "font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"
2604
+ variant: "warning",
2605
+ appearance: "light",
2606
+ className: "text-[var(--color-warning-accent,var(--color-yellow-700))] bg-[var(--color-warning-soft,var(--color-yellow-100))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:text-[var(--color-warning-soft,var(--color-yellow-600))]"
544
2607
  },
545
2608
  {
546
- variant: "inverse",
547
- mode: "link",
548
- underline: "dashed",
549
- className: "font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"
2609
+ variant: "info",
2610
+ appearance: "light",
2611
+ className: "text-[var(--color-info-accent,var(--color-violet-700))] bg-[var(--color-info-soft,var(--color-violet-100))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:text-[var(--color-info-soft,var(--color-violet-400))]"
550
2612
  },
551
2613
  {
552
- variant: "inverse",
553
- mode: "link",
554
- underlined: "solid",
555
- className: "font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"
2614
+ variant: "destructive",
2615
+ appearance: "light",
2616
+ className: "text-[var(--color-destructive-accent,var(--color-red-700))] bg-[var(--color-destructive-soft,var(--color-red-50))] dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:text-[var(--color-destructive-soft,var(--color-red-600))]"
556
2617
  },
2618
+ /* Outline */
557
2619
  {
558
- variant: "inverse",
559
- mode: "link",
560
- underlined: "dashed",
561
- className: "font-medium text-inherit [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"
2620
+ variant: "primary",
2621
+ appearance: "outline",
2622
+ className: "text-[var(--color-primary-accent,var(--color-blue-700))] border-[var(--color-primary-soft,var(--color-blue-100))] bg-[var(--color-primary-soft,var(--color-blue-50))] dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-soft,var(--color-blue-900))] dark:text-[var(--color-primary-soft,var(--color-blue-600))]"
562
2623
  },
563
2624
  {
564
- variant: "foreground",
565
- mode: "link",
566
- underline: "solid",
567
- className: "font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-solid"
2625
+ variant: "success",
2626
+ appearance: "outline",
2627
+ className: "text-[var(--color-success-accent,var(--color-green-700))] border-[var(--color-success-soft,var(--color-green-200))] bg-[var(--color-success-soft,var(--color-green-50))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-soft,var(--color-green-900))] dark:text-[var(--color-success-soft,var(--color-green-600))]"
568
2628
  },
569
2629
  {
570
- variant: "foreground",
571
- mode: "link",
572
- underline: "dashed",
573
- className: "font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 hover:underline hover:underline-offset-4 hover:decoration-dashed decoration-1"
2630
+ variant: "warning",
2631
+ appearance: "outline",
2632
+ className: "text-[var(--color-warning-accent,var(--color-yellow-700))] border-[var(--color-warning-soft,var(--color-yellow-200))] bg-[var(--color-warning-soft,var(--color-yellow-50))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-soft,var(--color-yellow-900))] dark:text-[var(--color-warning-soft,var(--color-yellow-600))]"
574
2633
  },
575
2634
  {
576
- variant: "foreground",
577
- mode: "link",
578
- underlined: "solid",
579
- className: "font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-solid"
2635
+ variant: "info",
2636
+ appearance: "outline",
2637
+ className: "text-[var(--color-info-accent,var(--color-violet-700))] border-[var(--color-info-soft,var(--color-violet-100))] bg-[var(--color-info-soft,var(--color-violet-50))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-soft,var(--color-violet-900))] dark:text-[var(--color-info-soft,var(--color-violet-400))]"
580
2638
  },
581
2639
  {
582
- variant: "foreground",
583
- mode: "link",
584
- underlined: "dashed",
585
- className: "font-medium text-foreground [&_svg:not([role=img]):not([class*=text-])]:opacity-60 underline underline-offset-4 decoration-dashed decoration-1"
2640
+ variant: "destructive",
2641
+ appearance: "outline",
2642
+ className: "text-[var(--color-destructive-accent,var(--color-red-700))] border-[var(--color-destructive-soft,var(--color-red-100))] bg-[var(--color-destructive-soft,var(--color-red-50))] dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-soft,var(--color-red-900))] dark:text-[var(--color-destructive-soft,var(--color-red-600))]"
586
2643
  },
587
- // Ghost
2644
+ /* Ghost */
588
2645
  {
589
2646
  variant: "primary",
590
2647
  appearance: "ghost",
591
- className: "bg-transparent text-primary/90 hover:bg-primary/5 data-[state=open]:bg-primary/5"
2648
+ className: "text-primary"
592
2649
  },
593
2650
  {
594
- variant: "destructive",
2651
+ variant: "secondary",
595
2652
  appearance: "ghost",
596
- className: "bg-transparent text-destructive/90 hover:bg-destructive/5 data-[state=open]:bg-destructive/5"
2653
+ className: "text-secondary-foreground"
597
2654
  },
598
2655
  {
599
2656
  variant: "success",
600
2657
  appearance: "ghost",
601
- className: "bg-transparent text-emerald-500 hover:bg-emerald-500/5 data-[state=open]:bg-emerald-500/5"
602
- },
603
- {
604
- variant: "ghost",
605
- mode: "icon",
606
- className: "text-muted-foreground"
607
- },
608
- // Size
609
- {
610
- size: "sm",
611
- mode: "icon",
612
- className: "w-7 h-7 p-0 [[&_svg:not([class*=size-])]:size-3.5"
613
- },
614
- {
615
- size: "md",
616
- mode: "icon",
617
- className: "w-8.5 h-8.5 p-0 [&_svg:not([class*=size-])]:size-4"
618
- },
619
- {
620
- size: "icon",
621
- className: "w-8.5 h-8.5 p-0 [&_svg:not([class*=size-])]:size-4"
622
- },
623
- {
624
- size: "lg",
625
- mode: "icon",
626
- className: "w-10 h-10 p-0 [&_svg:not([class*=size-])]:size-4"
2658
+ className: "text-[var(--color-success-accent,var(--color-green-500))]"
627
2659
  },
628
- // Input mode
629
2660
  {
630
- mode: "input",
631
- placeholder: true,
632
- variant: "outline",
633
- className: "font-normal text-muted-foreground"
2661
+ variant: "warning",
2662
+ appearance: "ghost",
2663
+ className: "text-[var(--color-warning-accent,var(--color-yellow-500))]"
634
2664
  },
635
2665
  {
636
- mode: "input",
637
- variant: "outline",
638
- size: "sm",
639
- className: "gap-1.25"
2666
+ variant: "info",
2667
+ appearance: "ghost",
2668
+ className: "text-[var(--color-info-accent,var(--color-violet-500))]"
640
2669
  },
641
2670
  {
642
- mode: "input",
643
- variant: "outline",
644
- size: "md",
645
- className: "gap-1.5"
2671
+ variant: "destructive",
2672
+ appearance: "ghost",
2673
+ className: "text-destructive"
646
2674
  },
647
- {
648
- mode: "input",
649
- variant: "outline",
650
- size: "lg",
651
- className: "gap-1.5"
652
- }
2675
+ { size: "lg", appearance: "ghost", className: "px-0" },
2676
+ { size: "md", appearance: "ghost", className: "px-0" },
2677
+ { size: "sm", appearance: "ghost", className: "px-0" },
2678
+ { size: "xs", appearance: "ghost", className: "px-0" }
653
2679
  ],
654
2680
  defaultVariants: {
655
2681
  variant: "primary",
656
- mode: "default",
657
- size: "md",
658
- shape: "default",
659
- appearance: "default"
2682
+ appearance: "default",
2683
+ size: "md"
660
2684
  }
661
2685
  }
662
2686
  );
663
- function Button({
2687
+ var badgeButtonVariants = classVarianceAuthority.cva(
2688
+ "cursor-pointer transition-all inline-flex items-center justify-center leading-none size-3.5 [&>svg]:opacity-100! [&>svg]:size-3.5! p-0 rounded-md -me-0.5 opacity-60 hover:opacity-100",
2689
+ {
2690
+ variants: {
2691
+ variant: {
2692
+ default: ""
2693
+ }
2694
+ },
2695
+ defaultVariants: {
2696
+ variant: "default"
2697
+ }
2698
+ }
2699
+ );
2700
+ function Badge({
664
2701
  className,
665
- selected,
666
2702
  variant,
667
- shape,
668
- appearance,
669
- mode,
670
2703
  size,
671
- autoHeight,
672
- underlined,
673
- underline,
2704
+ appearance,
2705
+ shape,
674
2706
  asChild = false,
675
- placeholder = false,
2707
+ disabled,
676
2708
  ...props
677
2709
  }) {
678
- const Comp = asChild ? SlotPrimitive__namespace.Slot : "button";
2710
+ const Comp = asChild ? SlotPrimitive2__namespace.Slot : "span";
679
2711
  return /* @__PURE__ */ jsxRuntime.jsx(
680
2712
  Comp,
681
2713
  {
682
- "data-slot": "button",
2714
+ "data-slot": "badge",
683
2715
  className: cn(
684
- buttonVariants({
685
- variant,
686
- size,
687
- shape,
688
- appearance,
689
- mode,
690
- autoHeight,
691
- placeholder,
692
- underlined,
693
- underline,
694
- className
695
- }),
696
- asChild && props.disabled && "pointer-events-none opacity-50"
2716
+ badgeVariants({ variant, size, appearance, shape, disabled }),
2717
+ className
697
2718
  ),
698
- ...selected && { "data-state": "open" },
699
2719
  ...props
700
2720
  }
701
2721
  );
702
2722
  }
703
- function ButtonArrow({
704
- icon: Icon = lucideReact.ChevronDown,
2723
+ function BadgeButton({
705
2724
  className,
2725
+ variant,
2726
+ asChild = false,
706
2727
  ...props
707
2728
  }) {
2729
+ const Comp = asChild ? SlotPrimitive2__namespace.Slot : "span";
708
2730
  return /* @__PURE__ */ jsxRuntime.jsx(
709
- Icon,
2731
+ Comp,
710
2732
  {
711
- "data-slot": "button-arrow",
712
- className: cn("ms-auto -me-1", className),
2733
+ "data-slot": "badge-button",
2734
+ className: cn(badgeButtonVariants({ variant, className })),
2735
+ role: "button",
2736
+ ...props
2737
+ }
2738
+ );
2739
+ }
2740
+ function BadgeDot({ className, ...props }) {
2741
+ return /* @__PURE__ */ jsxRuntime.jsx(
2742
+ "span",
2743
+ {
2744
+ "data-slot": "badge-dot",
2745
+ className: cn(
2746
+ "size-1.5 rounded-full bg-[currentColor] opacity-75",
2747
+ className
2748
+ ),
713
2749
  ...props
714
2750
  }
715
2751
  );
@@ -900,56 +2936,11 @@ function CardDescription({
900
2936
  ...props
901
2937
  }) {
902
2938
  return /* @__PURE__ */ jsxRuntime.jsx(
903
- "div",
904
- {
905
- "data-slot": "card-description",
906
- className: cn("text-sm text-muted-foreground", className),
907
- ...props
908
- }
909
- );
910
- }
911
- var checkboxVariants = classVarianceAuthority.cva(
912
- `
913
- group peer bg-background shrink-0 rounded-md border border-input ring-offset-background focus-visible:outline-none
914
- focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50
915
- aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
916
- [[data-invalid=true]_&]:border-destructive/60 [[data-invalid=true]_&]:ring-destructive/10 dark:[[data-invalid=true]_&]:border-destructive dark:[[data-invalid=true]_&]:ring-destructive/20,
917
- data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:text-primary-foreground
918
- `,
919
- {
920
- variants: {
921
- size: {
922
- sm: "size-4.5 [&_svg]:size-3",
923
- md: "size-5 [&_svg]:size-3.5",
924
- lg: "size-5.5 [&_svg]:size-4"
925
- }
926
- },
927
- defaultVariants: {
928
- size: "md"
929
- }
930
- }
931
- );
932
- function Checkbox({
933
- className,
934
- size,
935
- ...props
936
- }) {
937
- return /* @__PURE__ */ jsxRuntime.jsx(
938
- CheckboxPrimitive__namespace.Root,
2939
+ "div",
939
2940
  {
940
- "data-slot": "checkbox",
941
- className: cn(checkboxVariants({ size }), className),
942
- ...props,
943
- children: /* @__PURE__ */ jsxRuntime.jsxs(
944
- CheckboxPrimitive__namespace.Indicator,
945
- {
946
- className: cn("flex items-center justify-center text-current"),
947
- children: [
948
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "group-data-[state=indeterminate]:hidden" }),
949
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "hidden group-data-[state=indeterminate]:block" })
950
- ]
951
- }
952
- )
2941
+ "data-slot": "card-description",
2942
+ className: cn("text-sm text-muted-foreground", className),
2943
+ ...props
953
2944
  }
954
2945
  );
955
2946
  }
@@ -1306,573 +3297,408 @@ var inputWrapperVariants = classVarianceAuthority.cva(
1306
3297
  }
1307
3298
  },
1308
3299
  defaultVariants: {
1309
- variant: "md"
1310
- }
1311
- }
1312
- );
1313
- function Input({
1314
- className,
1315
- type,
1316
- variant,
1317
- ...props
1318
- }) {
1319
- return /* @__PURE__ */ jsxRuntime.jsx(
1320
- "input",
1321
- {
1322
- "data-slot": "input",
1323
- type,
1324
- className: cn(inputVariants({ variant }), className),
1325
- ...props
1326
- }
1327
- );
1328
- }
1329
- function InputAddon({
1330
- className,
1331
- variant,
1332
- mode,
1333
- ...props
1334
- }) {
1335
- return /* @__PURE__ */ jsxRuntime.jsx(
1336
- "div",
1337
- {
1338
- "data-slot": "input-addon",
1339
- className: cn(inputAddonVariants({ variant, mode }), className),
1340
- ...props
1341
- }
1342
- );
1343
- }
1344
- function InputGroup({
1345
- className,
1346
- ...props
1347
- }) {
1348
- return /* @__PURE__ */ jsxRuntime.jsx(
1349
- "div",
1350
- {
1351
- "data-slot": "input-group",
1352
- className: cn(inputGroupVariants(), className),
1353
- ...props
1354
- }
1355
- );
1356
- }
1357
- function InputWrapper({
1358
- className,
1359
- variant,
1360
- ...props
1361
- }) {
1362
- return /* @__PURE__ */ jsxRuntime.jsx(
1363
- "div",
1364
- {
1365
- "data-slot": "input-wrapper",
1366
- className: cn(
1367
- inputVariants({ variant }),
1368
- inputWrapperVariants({ variant }),
1369
- className
1370
- ),
1371
- ...props
1372
- }
1373
- );
1374
- }
1375
- function Skeleton({ className, ...props }) {
1376
- return /* @__PURE__ */ jsxRuntime.jsx(
1377
- "div",
1378
- {
1379
- "aria-hidden": props["aria-hidden"] ?? true,
1380
- "data-slot": "skeleton",
1381
- className: cn(
1382
- "block animate-pulse rounded-md bg-muted/40 shrink-0",
1383
- // ensure sensible default size when none provided
1384
- "h-4 w-full",
1385
- className
1386
- ),
1387
- ...props
1388
- }
1389
- );
1390
- }
1391
- function DropdownMenu({
1392
- ...props
1393
- }) {
1394
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
1395
- }
1396
- function DropdownMenuPortal({
1397
- ...props
1398
- }) {
1399
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { "data-slot": "dropdown-menu-portal", ...props });
1400
- }
1401
- function DropdownMenuTrigger({
1402
- ...props
1403
- }) {
1404
- return /* @__PURE__ */ jsxRuntime.jsx(
1405
- DropdownMenuPrimitive__namespace.Trigger,
1406
- {
1407
- className: "select-none",
1408
- "data-slot": "dropdown-menu-trigger",
1409
- ...props
1410
- }
1411
- );
1412
- }
1413
- function DropdownMenuSubTrigger({
1414
- className,
1415
- inset,
1416
- children,
1417
- ...props
1418
- }) {
1419
- return /* @__PURE__ */ jsxRuntime.jsxs(
1420
- DropdownMenuPrimitive__namespace.SubTrigger,
1421
- {
1422
- "data-slot": "dropdown-menu-sub-trigger",
1423
- className: cn(
1424
- "flex cursor-default gap-2 select-none items-center rounded-md px-2 py-1.5 text-sm outline-hidden",
1425
- "focus:bg-accent focus:text-foreground",
1426
- "data-[state=open]:bg-accent data-[state=open]:text-foreground",
1427
- "data-[here=true]:bg-accent data-[here=true]:text-foreground",
1428
- "[&>svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&>svg]:size-4 [&>svg]:shrink-0",
1429
- inset && "ps-8",
1430
- className
1431
- ),
1432
- ...props,
1433
- children: [
1434
- children,
1435
- /* @__PURE__ */ jsxRuntime.jsx(
1436
- lucideReact.ChevronRight,
1437
- {
1438
- "data-slot": "dropdown-menu-sub-trigger-indicator",
1439
- className: "ms-auto size-3.5! rtl:rotate-180"
1440
- }
1441
- )
1442
- ]
1443
- }
1444
- );
1445
- }
1446
- function DropdownMenuSubContent({
1447
- className,
1448
- ...props
1449
- }) {
1450
- return /* @__PURE__ */ jsxRuntime.jsx(
1451
- DropdownMenuPrimitive__namespace.SubContent,
1452
- {
1453
- "data-slot": "dropdown-menu-sub-content",
1454
- className: cn(
1455
- "space-y-0.5 z-50 min-w-32 overflow-hidden shadow-md shadow-black/5 rounded-md border border-border bg-popover text-popover-foreground p-2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1456
- className
1457
- ),
1458
- ...props
1459
- }
1460
- );
1461
- }
1462
- function DropdownMenuContent({
1463
- className,
1464
- sideOffset = 4,
1465
- ...props
1466
- }) {
1467
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1468
- DropdownMenuPrimitive__namespace.Content,
1469
- {
1470
- "data-slot": "dropdown-menu-content",
1471
- sideOffset,
1472
- className: cn(
1473
- "space-y-0.5 z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md shadow-black/5 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1474
- className
1475
- ),
1476
- ...props
1477
- }
1478
- ) });
1479
- }
1480
- function DropdownMenuGroup({
1481
- ...props
1482
- }) {
1483
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Group, { "data-slot": "dropdown-menu-group", ...props });
1484
- }
1485
- function DropdownMenuItem({
1486
- className,
1487
- inset,
1488
- variant,
1489
- ...props
1490
- }) {
1491
- return /* @__PURE__ */ jsxRuntime.jsx(
1492
- DropdownMenuPrimitive__namespace.Item,
1493
- {
1494
- "data-slot": "dropdown-menu-item",
1495
- className: cn(
1496
- "text-foreground relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0",
1497
- "focus:bg-accent focus:text-foreground",
1498
- "data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",
1499
- inset && "ps-8",
1500
- variant === "destructive" && "text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",
1501
- className
1502
- ),
1503
- ...props
1504
- }
1505
- );
1506
- }
1507
- function DropdownMenuCheckboxItem({
1508
- className,
1509
- children,
1510
- checked,
1511
- ...props
1512
- }) {
1513
- return /* @__PURE__ */ jsxRuntime.jsxs(
1514
- DropdownMenuPrimitive__namespace.CheckboxItem,
1515
- {
1516
- "data-slot": "dropdown-menu-checkbox-item",
1517
- className: cn(
1518
- "relative flex cursor-default select-none items-center rounded-md py-1.5 ps-8 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
1519
- className
1520
- ),
1521
- checked,
1522
- ...props,
1523
- children: [
1524
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center text-muted-foreground justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-primary" }) }) }),
1525
- children
1526
- ]
1527
- }
1528
- );
1529
- }
1530
- function DropdownMenuRadioItem({
1531
- className,
1532
- children,
1533
- ...props
1534
- }) {
1535
- return /* @__PURE__ */ jsxRuntime.jsxs(
1536
- DropdownMenuPrimitive__namespace.RadioItem,
1537
- {
1538
- "data-slot": "dropdown-menu-radio-item",
1539
- className: cn(
1540
- "relative flex cursor-default select-none items-center rounded-md py-1.5 ps-6 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
1541
- className
1542
- ),
1543
- ...props,
1544
- children: [
1545
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-1.5 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-1.5 w-1.5 fill-primary stroke-primary" }) }) }),
1546
- children
1547
- ]
3300
+ variant: "md"
1548
3301
  }
1549
- );
1550
- }
1551
- function DropdownMenuLabel({
3302
+ }
3303
+ );
3304
+ function Input({
1552
3305
  className,
1553
- inset,
3306
+ type,
3307
+ variant,
1554
3308
  ...props
1555
3309
  }) {
1556
3310
  return /* @__PURE__ */ jsxRuntime.jsx(
1557
- DropdownMenuPrimitive__namespace.Label,
3311
+ "input",
1558
3312
  {
1559
- "data-slot": "dropdown-menu-label",
1560
- className: cn(
1561
- "px-2 py-1.5 text-xs text-muted-foreground font-medium",
1562
- inset && "ps-8",
1563
- className
1564
- ),
3313
+ "data-slot": "input",
3314
+ type,
3315
+ className: cn(inputVariants({ variant }), className),
1565
3316
  ...props
1566
3317
  }
1567
3318
  );
1568
3319
  }
1569
- function DropdownMenuRadioGroup({
3320
+ function InputAddon({
3321
+ className,
3322
+ variant,
3323
+ mode,
1570
3324
  ...props
1571
3325
  }) {
1572
3326
  return /* @__PURE__ */ jsxRuntime.jsx(
1573
- DropdownMenuPrimitive__namespace.RadioGroup,
3327
+ "div",
1574
3328
  {
1575
- "data-slot": "dropdown-menu-radio-group",
3329
+ "data-slot": "input-addon",
3330
+ className: cn(inputAddonVariants({ variant, mode }), className),
1576
3331
  ...props
1577
3332
  }
1578
3333
  );
1579
3334
  }
1580
- function DropdownMenuSeparator({
3335
+ function InputGroup({
1581
3336
  className,
1582
3337
  ...props
1583
3338
  }) {
1584
3339
  return /* @__PURE__ */ jsxRuntime.jsx(
1585
- DropdownMenuPrimitive__namespace.Separator,
3340
+ "div",
1586
3341
  {
1587
- "data-slot": "dropdown-menu-separator",
1588
- className: cn("-mx-2 my-1.5 h-px bg-muted", className),
3342
+ "data-slot": "input-group",
3343
+ className: cn(inputGroupVariants(), className),
1589
3344
  ...props
1590
3345
  }
1591
3346
  );
1592
3347
  }
1593
- function DropdownMenuShortcut({
3348
+ function InputWrapper({
1594
3349
  className,
3350
+ variant,
1595
3351
  ...props
1596
3352
  }) {
1597
3353
  return /* @__PURE__ */ jsxRuntime.jsx(
1598
- "span",
3354
+ "div",
1599
3355
  {
1600
- "data-slot": "dropdown-menu-shortcut",
1601
- className: cn("ms-auto text-xs tracking-widest opacity-60", className),
3356
+ "data-slot": "input-wrapper",
3357
+ className: cn(
3358
+ inputVariants({ variant }),
3359
+ inputWrapperVariants({ variant }),
3360
+ className
3361
+ ),
1602
3362
  ...props
1603
3363
  }
1604
3364
  );
1605
3365
  }
1606
- function DropdownMenuSub({
1607
- ...props
1608
- }) {
1609
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
1610
- }
1611
- var alertVariants = classVarianceAuthority.cva(
1612
- "flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",
3366
+ var labelVariants = classVarianceAuthority.cva(
3367
+ "text-sm leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
1613
3368
  {
1614
3369
  variants: {
1615
3370
  variant: {
1616
- secondary: "",
1617
- primary: "",
1618
- destructive: "",
1619
- success: "",
1620
- info: "",
1621
- mono: "",
1622
- warning: ""
1623
- },
1624
- icon: {
1625
- primary: "",
1626
- destructive: "",
1627
- success: "",
1628
- info: "",
1629
- warning: ""
1630
- },
1631
- appearance: {
1632
- solid: "",
1633
- outline: "",
1634
- light: "",
1635
- stroke: "text-foreground"
1636
- },
1637
- size: {
1638
- lg: "rounded-lg p-4 gap-3 text-base [&>[data-slot=alert-icon]>svg]:size-6 [&_[data-slot=alert-icon]]:mt-0.5 [&_[data-slot=alert-close]]:mt-1",
1639
- md: "rounded-lg p-3.5 gap-2.5 text-sm [&>[data-slot=alert-icon]>svg]:size-5 [&_[data-slot=alert-icon]]:mt-0 [&_[data-slot=alert-close]]:mt-0.5",
1640
- sm: "rounded-md px-3 py-2.5 gap-2 text-xs [&>[data-slot=alert-icon]>svg]:size-4 [&_[data-alert-icon]]:mt-0.5 [&_[data-slot=alert-close]]:mt-0.25 [&_[data-slot=alert-close]_svg]:size-3.5"
3371
+ primary: "font-medium",
3372
+ secondary: "font-normal"
1641
3373
  }
1642
3374
  },
1643
- compoundVariants: [
1644
- /* Solid */
1645
- {
1646
- variant: "secondary",
1647
- appearance: "solid",
1648
- className: "bg-muted text-foreground"
1649
- },
1650
- {
1651
- variant: "primary",
1652
- appearance: "solid",
1653
- className: "bg-primary text-primary-foreground"
1654
- },
1655
- {
1656
- variant: "destructive",
1657
- appearance: "solid",
1658
- className: "bg-destructive text-destructive-foreground"
1659
- },
1660
- {
1661
- variant: "success",
1662
- appearance: "solid",
1663
- className: "bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"
1664
- },
1665
- {
1666
- variant: "info",
1667
- appearance: "solid",
1668
- className: "bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"
1669
- },
1670
- {
1671
- variant: "warning",
1672
- appearance: "solid",
1673
- className: "bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"
1674
- },
1675
- {
1676
- variant: "mono",
1677
- appearance: "solid",
1678
- className: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black [&_[data-slot=alert-close]]:text-white"
1679
- },
1680
- /* Outline */
1681
- {
1682
- variant: "secondary",
1683
- appearance: "outline",
1684
- className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
1685
- },
1686
- {
1687
- variant: "primary",
1688
- appearance: "outline",
1689
- className: "border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"
1690
- },
1691
- {
1692
- variant: "destructive",
1693
- appearance: "outline",
1694
- className: "border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"
1695
- },
1696
- {
1697
- variant: "success",
1698
- appearance: "outline",
1699
- className: "border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"
1700
- },
1701
- {
1702
- variant: "info",
1703
- appearance: "outline",
1704
- className: "border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"
1705
- },
1706
- {
1707
- variant: "warning",
1708
- appearance: "outline",
1709
- className: "border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"
1710
- },
1711
- {
1712
- variant: "mono",
1713
- appearance: "outline",
1714
- className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
1715
- },
1716
- /* Light */
1717
- {
1718
- variant: "secondary",
1719
- appearance: "light",
1720
- className: "bg-muted border border-border text-foreground"
1721
- },
1722
- {
1723
- variant: "primary",
1724
- appearance: "light",
1725
- className: "text-foreground bg-[var(--color-primary-soft,var(--color-blue-50))] border border-[var(--color-primary-alpha,var(--color-blue-100))] [&_[data-slot=alert-icon]]:text-primary dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-alpha,var(--color-blue-900))]"
1726
- },
1727
- {
1728
- variant: "destructive",
1729
- appearance: "light",
1730
- className: "bg-[var(--color-destructive-soft,var(--color-red-50))] border border-[var(--color-destructive-alpha,var(--color-red-100))] text-foreground [&_[data-slot=alert-icon]]:text-destructive dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-alpha,var(--color-red-900))] "
1731
- },
1732
- {
1733
- variant: "success",
1734
- appearance: "light",
1735
- className: "bg-[var(--color-success-soft,var(--color-green-50))] border border-[var(--color-success-alpha,var(--color-green-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-alpha,var(--color-green-900))]"
1736
- },
1737
- {
1738
- variant: "info",
1739
- appearance: "light",
1740
- className: "bg-[var(--color-info-soft,var(--color-violet-50))] border border-[var(--color-info-alpha,var(--color-violet-100))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-alpha,var(--color-violet-900))]"
1741
- },
1742
- {
1743
- variant: "warning",
1744
- appearance: "light",
1745
- className: "bg-[var(--color-warning-soft,var(--color-yellow-50))] border border-[var(--color-warning-alpha,var(--color-yellow-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-alpha,var(--color-yellow-900))]"
1746
- },
1747
- /* Mono */
1748
- {
1749
- variant: "mono",
1750
- icon: "primary",
1751
- className: "[&_[data-slot=alert-icon]]:text-primary"
1752
- },
1753
- {
1754
- variant: "mono",
1755
- icon: "warning",
1756
- className: "[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"
1757
- },
1758
- {
1759
- variant: "mono",
1760
- icon: "success",
1761
- className: "[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"
1762
- },
1763
- {
1764
- variant: "mono",
1765
- icon: "destructive",
1766
- className: "[&_[data-slot=alert-icon]]:text-destructive"
1767
- },
1768
- {
1769
- variant: "mono",
1770
- icon: "info",
1771
- className: "[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"
1772
- }
1773
- ],
1774
3375
  defaultVariants: {
1775
- variant: "secondary",
1776
- appearance: "solid",
1777
- size: "md"
3376
+ variant: "primary"
1778
3377
  }
1779
3378
  }
1780
3379
  );
1781
- function Alert({
3380
+ function Label2({
1782
3381
  className,
1783
3382
  variant,
1784
- size,
1785
- icon,
1786
- appearance,
1787
- close = false,
1788
- onClose,
1789
- children,
1790
3383
  ...props
1791
3384
  }) {
1792
- return /* @__PURE__ */ jsxRuntime.jsxs(
1793
- "div",
3385
+ return /* @__PURE__ */ jsxRuntime.jsx(
3386
+ radixUi.Label.Root,
1794
3387
  {
1795
- "data-slot": "alert",
1796
- role: "alert",
1797
- className: cn(
1798
- alertVariants({ variant, size, icon, appearance }),
1799
- className
1800
- ),
1801
- ...props,
1802
- children: [
1803
- children,
1804
- close && /* @__PURE__ */ jsxRuntime.jsx(
1805
- Button,
1806
- {
1807
- size: "sm",
1808
- variant: "inverse",
1809
- mode: "icon",
1810
- onClick: onClose,
1811
- "aria-label": "Dismiss",
1812
- "data-slot": "alert-close",
1813
- className: cn("group shrink-0 size-4"),
1814
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "opacity-60 group-hover:opacity-100 size-4" })
1815
- }
1816
- )
1817
- ]
3388
+ "data-slot": "label",
3389
+ className: cn(labelVariants({ variant }), className),
3390
+ ...props
1818
3391
  }
1819
3392
  );
1820
3393
  }
1821
- function AlertTitle({
3394
+ var Form = reactHookForm.FormProvider;
3395
+ var FormFieldContext = React__namespace.createContext(
3396
+ {}
3397
+ );
3398
+ var FormField = ({
3399
+ ...props
3400
+ }) => {
3401
+ return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
3402
+ };
3403
+ var useFormField = () => {
3404
+ const fieldContext = React__namespace.useContext(FormFieldContext);
3405
+ const itemContext = React__namespace.useContext(FormItemContext);
3406
+ const { getFieldState, formState } = reactHookForm.useFormContext();
3407
+ const fieldState = getFieldState(fieldContext.name, formState);
3408
+ if (!fieldContext) {
3409
+ throw new Error("useFormField should be used within <FormField>");
3410
+ }
3411
+ const { id } = itemContext;
3412
+ return {
3413
+ id,
3414
+ name: fieldContext.name,
3415
+ formItemId: `${id}-form-item`,
3416
+ formDescriptionId: `${id}-form-item-description`,
3417
+ formMessageId: `${id}-form-item-message`,
3418
+ ...fieldState
3419
+ };
3420
+ };
3421
+ var FormItemContext = React__namespace.createContext(
3422
+ {}
3423
+ );
3424
+ function FormItem({
3425
+ className,
3426
+ ...props
3427
+ }) {
3428
+ const id = React__namespace.useId();
3429
+ return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx(FormItemInner, { className, ...props }) });
3430
+ }
3431
+ function FormItemInner({
1822
3432
  className,
1823
3433
  ...props
1824
3434
  }) {
3435
+ const { error } = useFormField();
1825
3436
  return /* @__PURE__ */ jsxRuntime.jsx(
1826
3437
  "div",
1827
3438
  {
1828
- "data-slot": "alert-title",
1829
- className: cn("grow tracking-tight", className),
3439
+ "data-slot": "form-item",
3440
+ className: cn("flex flex-col gap-2.5", className),
3441
+ "data-invalid": !!error,
1830
3442
  ...props
1831
3443
  }
1832
3444
  );
1833
3445
  }
1834
- function AlertIcon({ children, className, ...props }) {
3446
+ function FormLabel({
3447
+ className,
3448
+ ...props
3449
+ }) {
3450
+ const { formItemId } = useFormField();
1835
3451
  return /* @__PURE__ */ jsxRuntime.jsx(
1836
- "div",
3452
+ Label2,
1837
3453
  {
1838
- "data-slot": "alert-icon",
1839
- className: cn("shrink-0", className),
1840
- ...props,
1841
- children
3454
+ "data-slot": "form-label",
3455
+ className: cn("font-medium text-foreground", className),
3456
+ htmlFor: formItemId,
3457
+ ...props
1842
3458
  }
1843
3459
  );
1844
3460
  }
1845
- function AlertToolbar({ children, className, ...props }) {
1846
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "alert-toolbar", className: cn(className), ...props, children });
3461
+ function FormControl({ ...props }) {
3462
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
3463
+ return /* @__PURE__ */ jsxRuntime.jsx(
3464
+ SlotPrimitive2.Slot,
3465
+ {
3466
+ "data-slot": "form-control",
3467
+ id: formItemId,
3468
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
3469
+ "aria-invalid": !!error,
3470
+ ...props
3471
+ }
3472
+ );
1847
3473
  }
1848
- function AlertDescription({
3474
+ function FormDescription({
1849
3475
  className,
1850
3476
  ...props
1851
3477
  }) {
3478
+ const { formDescriptionId, error } = useFormField();
3479
+ if (error) {
3480
+ return null;
3481
+ }
1852
3482
  return /* @__PURE__ */ jsxRuntime.jsx(
1853
3483
  "div",
1854
3484
  {
1855
- "data-slot": "alert-description",
1856
- className: cn("text-sm [&_p]:leading-relaxed [&_p]:mb-2", className),
3485
+ "data-slot": "form-description",
3486
+ id: formDescriptionId,
3487
+ className: cn("text-xs text-muted-foreground -mt-0.5", className),
1857
3488
  ...props
1858
3489
  }
1859
3490
  );
1860
3491
  }
1861
- function AlertContent({
3492
+ function FormMessage({
1862
3493
  className,
3494
+ children,
1863
3495
  ...props
1864
3496
  }) {
3497
+ const { error, formMessageId } = useFormField();
3498
+ const body = error ? String(error?.message) : children;
3499
+ if (!body) {
3500
+ return null;
3501
+ }
1865
3502
  return /* @__PURE__ */ jsxRuntime.jsx(
1866
3503
  "div",
1867
3504
  {
1868
- "data-slot": "alert-content",
3505
+ "data-slot": "form-message",
3506
+ id: formMessageId,
3507
+ className: cn("-mt-0.5 text-xs font-normal text-destructive", className),
3508
+ ...props,
3509
+ children: body
3510
+ }
3511
+ );
3512
+ }
3513
+ function ScrollArea({
3514
+ className,
3515
+ viewportClassName,
3516
+ children,
3517
+ viewportRef,
3518
+ ...props
3519
+ }) {
3520
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3521
+ radixUi.ScrollArea.Root,
3522
+ {
3523
+ "data-slot": "scroll-area",
3524
+ className: cn("relative overflow-hidden", className),
3525
+ ...props,
3526
+ children: [
3527
+ /* @__PURE__ */ jsxRuntime.jsx(
3528
+ radixUi.ScrollArea.Viewport,
3529
+ {
3530
+ ref: viewportRef,
3531
+ className: cn("h-full w-full rounded-[inherit]", viewportClassName),
3532
+ children
3533
+ }
3534
+ ),
3535
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
3536
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.ScrollArea.Corner, {})
3537
+ ]
3538
+ }
3539
+ );
3540
+ }
3541
+ function ScrollBar({
3542
+ className,
3543
+ orientation = "vertical",
3544
+ ...props
3545
+ }) {
3546
+ return /* @__PURE__ */ jsxRuntime.jsx(
3547
+ radixUi.ScrollArea.ScrollAreaScrollbar,
3548
+ {
3549
+ "data-slot": "scroll-area-scrollbar",
3550
+ orientation,
1869
3551
  className: cn(
1870
- "space-y-2 [&_[data-slot=alert-title]]:font-semibold",
3552
+ "flex touch-none select-none transition-colors",
3553
+ orientation === "vertical" && "h-full w-2 border-l border-l-transparent p-[1px]",
3554
+ orientation === "horizontal" && "h-2 flex-col border-t border-t-transparent p-[1px]",
1871
3555
  className
1872
3556
  ),
1873
- ...props
3557
+ ...props,
3558
+ children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.ScrollArea.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
3559
+ }
3560
+ );
3561
+ }
3562
+ function Scrollspy({
3563
+ children,
3564
+ targetRef,
3565
+ onUpdate,
3566
+ className,
3567
+ offset = 0,
3568
+ smooth = true,
3569
+ dataAttribute = "scrollspy",
3570
+ history = true
3571
+ }) {
3572
+ const selfRef = React.useRef(null);
3573
+ const anchorElementsRef = React.useRef(null);
3574
+ const prevIdTracker = React.useRef(null);
3575
+ const setActiveSection = React.useCallback(
3576
+ (sectionId, force = false) => {
3577
+ if (!sectionId) return;
3578
+ anchorElementsRef.current?.forEach((item) => {
3579
+ const id = item.getAttribute(`data-${dataAttribute}-anchor`);
3580
+ if (id === sectionId) {
3581
+ item.setAttribute("data-active", "true");
3582
+ } else {
3583
+ item.removeAttribute("data-active");
3584
+ }
3585
+ });
3586
+ if (onUpdate) onUpdate(sectionId);
3587
+ if (history && (force || prevIdTracker.current !== sectionId)) {
3588
+ window.history.replaceState({}, "", `#${sectionId}`);
3589
+ }
3590
+ prevIdTracker.current = sectionId;
3591
+ },
3592
+ [anchorElementsRef, dataAttribute, history, onUpdate]
3593
+ );
3594
+ const handleScroll = React.useCallback(() => {
3595
+ if (!anchorElementsRef.current || anchorElementsRef.current.length === 0)
3596
+ return;
3597
+ const scrollElement = targetRef?.current === document ? window : targetRef?.current;
3598
+ const scrollTop = scrollElement === window ? window.scrollY || document.documentElement.scrollTop : scrollElement.scrollTop;
3599
+ let activeIdx = 0;
3600
+ let minDelta = Infinity;
3601
+ anchorElementsRef.current.forEach((anchor, idx) => {
3602
+ const sectionId2 = anchor.getAttribute(`data-${dataAttribute}-anchor`);
3603
+ const sectionElement = document.getElementById(sectionId2);
3604
+ if (!sectionElement) return;
3605
+ let customOffset = offset;
3606
+ const dataOffset = anchor.getAttribute(`data-${dataAttribute}-offset`);
3607
+ if (dataOffset) customOffset = parseInt(dataOffset, 10);
3608
+ const delta = Math.abs(
3609
+ sectionElement.offsetTop - customOffset - scrollTop
3610
+ );
3611
+ if (sectionElement.offsetTop - customOffset <= scrollTop && delta < minDelta) {
3612
+ minDelta = delta;
3613
+ activeIdx = idx;
3614
+ }
3615
+ });
3616
+ if (scrollElement) {
3617
+ const scrollHeight = scrollElement === window ? document.documentElement.scrollHeight : scrollElement.scrollHeight;
3618
+ const clientHeight = scrollElement === window ? window.innerHeight : scrollElement.clientHeight;
3619
+ if (scrollTop + clientHeight >= scrollHeight - 2) {
3620
+ activeIdx = anchorElementsRef.current.length - 1;
3621
+ }
1874
3622
  }
3623
+ const activeAnchor = anchorElementsRef.current[activeIdx];
3624
+ const sectionId = activeAnchor?.getAttribute(`data-${dataAttribute}-anchor`) || null;
3625
+ setActiveSection(sectionId);
3626
+ anchorElementsRef.current.forEach((item, idx) => {
3627
+ if (idx !== activeIdx) {
3628
+ item.removeAttribute("data-active");
3629
+ }
3630
+ });
3631
+ }, [anchorElementsRef, targetRef, dataAttribute, offset, setActiveSection]);
3632
+ const scrollTo = React.useCallback(
3633
+ (anchorElement) => (event) => {
3634
+ if (event) event.preventDefault();
3635
+ const sectionId = anchorElement.getAttribute(`data-${dataAttribute}-anchor`)?.replace("#", "") || null;
3636
+ if (!sectionId) return;
3637
+ const sectionElement = document.getElementById(sectionId);
3638
+ if (!sectionElement) return;
3639
+ const scrollToElement = targetRef?.current === document ? window : targetRef?.current;
3640
+ let customOffset = offset;
3641
+ const dataOffset = anchorElement.getAttribute(
3642
+ `data-${dataAttribute}-offset`
3643
+ );
3644
+ if (dataOffset) {
3645
+ customOffset = parseInt(dataOffset, 10);
3646
+ }
3647
+ const scrollTop = sectionElement.offsetTop - customOffset;
3648
+ if (scrollToElement && "scrollTo" in scrollToElement) {
3649
+ scrollToElement.scrollTo({
3650
+ top: scrollTop,
3651
+ left: 0,
3652
+ behavior: smooth ? "smooth" : "auto"
3653
+ });
3654
+ }
3655
+ setActiveSection(sectionId, true);
3656
+ },
3657
+ [dataAttribute, offset, smooth, targetRef, setActiveSection]
1875
3658
  );
3659
+ const scrollToHashSection = React.useCallback(() => {
3660
+ const hash = CSS.escape(window.location.hash.replace("#", ""));
3661
+ if (hash) {
3662
+ const targetElement = document.querySelector(
3663
+ `[data-${dataAttribute}-anchor="${hash}"]`
3664
+ );
3665
+ if (targetElement) {
3666
+ scrollTo(targetElement)();
3667
+ }
3668
+ }
3669
+ }, [dataAttribute, scrollTo]);
3670
+ React.useEffect(() => {
3671
+ if (selfRef.current) {
3672
+ anchorElementsRef.current = Array.from(
3673
+ selfRef.current.querySelectorAll(`[data-${dataAttribute}-anchor]`)
3674
+ );
3675
+ }
3676
+ anchorElementsRef.current?.forEach((item) => {
3677
+ item.addEventListener("click", scrollTo(item));
3678
+ });
3679
+ const scrollElement = targetRef?.current === document ? window : targetRef?.current;
3680
+ scrollElement?.addEventListener("scroll", handleScroll);
3681
+ setTimeout(() => {
3682
+ scrollToHashSection();
3683
+ setTimeout(() => {
3684
+ handleScroll();
3685
+ }, 100);
3686
+ }, 100);
3687
+ return () => {
3688
+ scrollElement?.removeEventListener("scroll", handleScroll);
3689
+ anchorElementsRef.current?.forEach((item) => {
3690
+ item.removeEventListener("click", scrollTo(item));
3691
+ });
3692
+ };
3693
+ }, [
3694
+ targetRef,
3695
+ selfRef,
3696
+ handleScroll,
3697
+ dataAttribute,
3698
+ scrollTo,
3699
+ scrollToHashSection
3700
+ ]);
3701
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "scrollspy", className, ref: selfRef, children });
1876
3702
  }
1877
3703
  var MOBILE_BREAKPOINT = 992;
1878
3704
  function useIsMobile() {
@@ -1920,17 +3746,20 @@ function useMounted() {
1920
3746
  return mounted;
1921
3747
  }
1922
3748
 
1923
- exports.Alert = Alert;
1924
- exports.AlertContent = AlertContent;
1925
- exports.AlertDescription = AlertDescription;
1926
- exports.AlertIcon = AlertIcon;
1927
- exports.AlertTitle = AlertTitle;
1928
- exports.AlertToolbar = AlertToolbar;
1929
- exports.Avatar = Avatar;
1930
- exports.AvatarFallback = AvatarFallback;
1931
- exports.AvatarImage = AvatarImage;
1932
- exports.AvatarIndicator = AvatarIndicator;
1933
- exports.AvatarStatus = AvatarStatus;
3749
+ exports.AlertDialog = AlertDialog;
3750
+ exports.AlertDialogAction = AlertDialogAction;
3751
+ exports.AlertDialogCancel = AlertDialogCancel;
3752
+ exports.AlertDialogContent = AlertDialogContent;
3753
+ exports.AlertDialogDescription = AlertDialogDescription;
3754
+ exports.AlertDialogFooter = AlertDialogFooter;
3755
+ exports.AlertDialogHeader = AlertDialogHeader;
3756
+ exports.AlertDialogOverlay = AlertDialogOverlay;
3757
+ exports.AlertDialogPortal = AlertDialogPortal;
3758
+ exports.AlertDialogTitle = AlertDialogTitle;
3759
+ exports.AlertDialogTrigger = AlertDialogTrigger;
3760
+ exports.AvatarGroup = AvatarGroup;
3761
+ exports.AvatarGroupItem = AvatarGroupItem;
3762
+ exports.AvatarGroupTooltip = AvatarGroupTooltip;
1934
3763
  exports.Badge = Badge;
1935
3764
  exports.BadgeButton = BadgeButton;
1936
3765
  exports.BadgeDot = BadgeDot;
@@ -1946,6 +3775,50 @@ exports.CardTable = CardTable;
1946
3775
  exports.CardTitle = CardTitle;
1947
3776
  exports.CardToolbar = CardToolbar;
1948
3777
  exports.Checkbox = Checkbox;
3778
+ exports.DataGrid = DataGrid;
3779
+ exports.DataGridColumnHeader = DataGridColumnHeader;
3780
+ exports.DataGridColumnVisibility = DataGridColumnVisibility;
3781
+ exports.DataGridContainer = DataGridContainer;
3782
+ exports.DataGridPagination = DataGridPagination;
3783
+ exports.DataGridProvider = DataGridProvider;
3784
+ exports.DataGridTable = DataGridTable;
3785
+ exports.DataGridTableBase = DataGridTableBase;
3786
+ exports.DataGridTableBody = DataGridTableBody;
3787
+ exports.DataGridTableBodyRow = DataGridTableBodyRow;
3788
+ exports.DataGridTableBodyRowCell = DataGridTableBodyRowCell;
3789
+ exports.DataGridTableBodyRowExpanded = DataGridTableBodyRowExpanded;
3790
+ exports.DataGridTableBodyRowSkeleton = DataGridTableBodyRowSkeleton;
3791
+ exports.DataGridTableBodyRowSkeletonCell = DataGridTableBodyRowSkeletonCell;
3792
+ exports.DataGridTableEmpty = DataGridTableEmpty;
3793
+ exports.DataGridTableHead = DataGridTableHead;
3794
+ exports.DataGridTableHeadRow = DataGridTableHeadRow;
3795
+ exports.DataGridTableHeadRowCell = DataGridTableHeadRowCell;
3796
+ exports.DataGridTableHeadRowCellResize = DataGridTableHeadRowCellResize;
3797
+ exports.DataGridTableLoader = DataGridTableLoader;
3798
+ exports.DataGridTableRowSelect = DataGridTableRowSelect;
3799
+ exports.DataGridTableRowSelectAll = DataGridTableRowSelectAll;
3800
+ exports.DataGridTableRowSpacer = DataGridTableRowSpacer;
3801
+ exports.Dialog = Dialog;
3802
+ exports.DialogBody = DialogBody;
3803
+ exports.DialogClose = DialogClose;
3804
+ exports.DialogContent = DialogContent;
3805
+ exports.DialogDescription = DialogDescription;
3806
+ exports.DialogFooter = DialogFooter;
3807
+ exports.DialogHeader = DialogHeader;
3808
+ exports.DialogOverlay = DialogOverlay;
3809
+ exports.DialogPortal = DialogPortal;
3810
+ exports.DialogTitle = DialogTitle;
3811
+ exports.DialogTrigger = DialogTrigger;
3812
+ exports.Drawer = Drawer;
3813
+ exports.DrawerClose = DrawerClose;
3814
+ exports.DrawerContent = DrawerContent;
3815
+ exports.DrawerDescription = DrawerDescription;
3816
+ exports.DrawerFooter = DrawerFooter;
3817
+ exports.DrawerHeader = DrawerHeader;
3818
+ exports.DrawerOverlay = DrawerOverlay;
3819
+ exports.DrawerPortal = DrawerPortal;
3820
+ exports.DrawerTitle = DrawerTitle;
3821
+ exports.DrawerTrigger = DrawerTrigger;
1949
3822
  exports.DropdownMenu = DropdownMenu;
1950
3823
  exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
1951
3824
  exports.DropdownMenuContent = DropdownMenuContent;
@@ -1961,19 +3834,61 @@ exports.DropdownMenuSub = DropdownMenuSub;
1961
3834
  exports.DropdownMenuSubContent = DropdownMenuSubContent;
1962
3835
  exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
1963
3836
  exports.DropdownMenuTrigger = DropdownMenuTrigger;
3837
+ exports.Form = Form;
3838
+ exports.FormControl = FormControl;
3839
+ exports.FormDescription = FormDescription;
3840
+ exports.FormField = FormField;
3841
+ exports.FormItem = FormItem;
3842
+ exports.FormLabel = FormLabel;
3843
+ exports.FormMessage = FormMessage;
3844
+ exports.HoverCard = HoverCard;
3845
+ exports.HoverCardContent = HoverCardContent;
3846
+ exports.HoverCardTrigger = HoverCardTrigger;
1964
3847
  exports.Icons = Icons;
1965
3848
  exports.Input = Input;
1966
3849
  exports.InputAddon = InputAddon;
1967
3850
  exports.InputGroup = InputGroup;
1968
3851
  exports.InputWrapper = InputWrapper;
3852
+ exports.Label = Label2;
3853
+ exports.Popover = Popover;
3854
+ exports.PopoverContent = PopoverContent;
3855
+ exports.PopoverTrigger = PopoverTrigger;
3856
+ exports.ScrollArea = ScrollArea;
3857
+ exports.ScrollBar = ScrollBar;
3858
+ exports.Scrollspy = Scrollspy;
3859
+ exports.Select = Select;
3860
+ exports.SelectContent = SelectContent;
3861
+ exports.SelectGroup = SelectGroup;
3862
+ exports.SelectIndicator = SelectIndicator;
3863
+ exports.SelectItem = SelectItem;
3864
+ exports.SelectLabel = SelectLabel;
3865
+ exports.SelectScrollDownButton = SelectScrollDownButton;
3866
+ exports.SelectScrollUpButton = SelectScrollUpButton;
3867
+ exports.SelectSeparator = SelectSeparator;
3868
+ exports.SelectTrigger = SelectTrigger;
3869
+ exports.SelectValue = SelectValue;
3870
+ exports.Sheet = Sheet;
3871
+ exports.SheetBody = SheetBody;
3872
+ exports.SheetClose = SheetClose;
3873
+ exports.SheetContent = SheetContent;
3874
+ exports.SheetDescription = SheetDescription;
3875
+ exports.SheetFooter = SheetFooter;
3876
+ exports.SheetHeader = SheetHeader;
3877
+ exports.SheetOverlay = SheetOverlay;
3878
+ exports.SheetPortal = SheetPortal;
3879
+ exports.SheetTitle = SheetTitle;
3880
+ exports.SheetTrigger = SheetTrigger;
1969
3881
  exports.Skeleton = Skeleton;
1970
- exports.avatarStatusVariants = avatarStatusVariants;
1971
3882
  exports.badgeVariants = badgeVariants;
1972
3883
  exports.buttonVariants = buttonVariants;
1973
3884
  exports.cn = cn;
1974
3885
  exports.inputAddonVariants = inputAddonVariants;
1975
3886
  exports.inputVariants = inputVariants;
3887
+ exports.labelVariants = labelVariants;
3888
+ exports.selectTriggerVariants = selectTriggerVariants;
1976
3889
  exports.useCopyToClipboard = useCopyToClipboard;
3890
+ exports.useDataGrid = useDataGrid;
3891
+ exports.useFormField = useFormField;
1977
3892
  exports.useIsMobile = useIsMobile;
1978
3893
  exports.useMounted = useMounted;
1979
3894
  //# sourceMappingURL=index.cjs.map