adminium 1.0.7 → 1.0.8

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
@@ -68,20 +68,32 @@ function Spinner({ className, ...props }) {
68
68
  }
69
69
  var buttonVariantConfig = {
70
70
  variant: {
71
+ // Primary
71
72
  primary: "bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90",
72
- 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",
73
+ "dark-primary": "bg-foreground/50 text-white border border-white/20 hover:bg-foreground/70 data-[state=open]:bg-background data-[state=open]:text-primary data-[state=open]:border-primary/30 data-[state=open]:hover:bg-background/90",
74
+ "outline-primary": "bg-background text-primary border border-primary/30 hover:bg-background/90",
75
+ // Destructive
73
76
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90",
77
+ "destructive-soft": "bg-red-100 text-red-600 border border-red-500 hover:bg-red-200 data-[state=open]:bg-red-200 dark:bg-red-950 dark:text-red-400 dark:border-red-500 dark:hover:bg-red-900 dark:data-[state=open]:bg-red-900",
78
+ "outline-destructive": "bg-background text-destructive border border-destructive/30 hover:bg-background/90",
79
+ // Success
74
80
  success: "bg-emerald-500 text-white hover:bg-emerald-600 data-[state=open]:bg-emerald-600",
81
+ "success-soft": "bg-green-100 text-green-600 border border-green-500 hover:bg-green-200 data-[state=open]:bg-green-200 dark:bg-green-950 dark:text-green-400 dark:border-green-500 dark:hover:bg-green-900 dark:data-[state=open]:bg-green-900",
82
+ // Info
83
+ info: "bg-violet-600 text-white hover:bg-violet-700 data-[state=open]:bg-violet-700",
84
+ "info-soft": "bg-violet-100 text-violet-600 border border-violet-500 hover:bg-violet-200 data-[state=open]:bg-violet-200 dark:bg-violet-950 dark:text-violet-400 dark:border-violet-500 dark:hover:bg-violet-900 dark:data-[state=open]:bg-violet-900",
85
+ // Warning
86
+ warning: "bg-yellow-500 text-white hover:bg-yellow-600 data-[state=open]:bg-yellow-600",
87
+ "warning-soft": "bg-yellow-100 text-yellow-800 border border-yellow-500 hover:bg-yellow-200 data-[state=open]:bg-yellow-200 dark:bg-yellow-950 dark:text-yellow-400 dark:border-yellow-500 dark:hover:bg-yellow-900 dark:data-[state=open]:bg-yellow-900",
88
+ // Neutral
89
+ 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",
75
90
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90",
76
91
  outline: "bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent",
77
92
  dashed: "text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground",
78
93
  ghost: "text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
79
94
  dim: "text-muted-foreground hover:text-foreground data-[state=open]:text-foreground",
80
95
  foreground: "",
81
- inverse: "",
82
- "dark-primary": "bg-foreground/50 text-white border border-white/20 hover:bg-foreground/70 data-[state=open]:bg-background data-[state=open]:text-primary data-[state=open]:border-primary/30 data-[state=open]:hover:bg-background/90",
83
- "outline-primary": "bg-background text-primary border border-primary/30 hover:bg-background/90",
84
- "outline-destructive": "bg-background text-destructive border border-destructive/30 hover:bg-background/90"
96
+ inverse: ""
85
97
  },
86
98
  appearance: {
87
99
  default: "",
@@ -180,112 +192,50 @@ var buttonVariants = classVarianceAuthority.cva(
180
192
  autoHeight: true,
181
193
  className: "h-auto min-h-10"
182
194
  },
183
- // Shadow support
184
- {
185
- variant: "primary",
186
- mode: "default",
187
- appearance: "default",
188
- className: "shadow-xs shadow-black/5"
189
- },
190
- {
191
- variant: "mono",
192
- mode: "default",
193
- appearance: "default",
194
- className: "shadow-xs shadow-black/5"
195
- },
196
- {
197
- variant: "secondary",
198
- mode: "default",
199
- appearance: "default",
200
- className: "shadow-xs shadow-black/5"
201
- },
195
+ // Shadow support (default mode)
202
196
  {
203
- variant: "outline",
204
- mode: "default",
205
- appearance: "default",
206
- className: "shadow-xs shadow-black/5"
207
- },
208
- {
209
- variant: "dashed",
210
- mode: "default",
211
- appearance: "default",
212
- className: "shadow-xs shadow-black/5"
213
- },
214
- {
215
- variant: "destructive",
216
- mode: "default",
217
- appearance: "default",
218
- className: "shadow-xs shadow-black/5"
219
- },
220
- {
221
- variant: "dark-primary",
222
- mode: "default",
223
- appearance: "default",
224
- className: "shadow-xs shadow-black/5"
225
- },
226
- {
227
- variant: "outline-primary",
228
- mode: "default",
229
- appearance: "default",
230
- className: "shadow-xs shadow-black/5"
231
- },
232
- {
233
- variant: "outline-destructive",
197
+ variant: [
198
+ "primary",
199
+ "mono",
200
+ "secondary",
201
+ "outline",
202
+ "dashed",
203
+ "destructive",
204
+ "destructive-soft",
205
+ "dark-primary",
206
+ "outline-primary",
207
+ "outline-destructive",
208
+ "success",
209
+ "success-soft",
210
+ "info",
211
+ "info-soft",
212
+ "warning",
213
+ "warning-soft"
214
+ ],
234
215
  mode: "default",
235
216
  appearance: "default",
236
217
  className: "shadow-xs shadow-black/5"
237
218
  },
238
- // Shadow support
239
- {
240
- variant: "primary",
241
- mode: "icon",
242
- appearance: "default",
243
- className: "shadow-xs shadow-black/5"
244
- },
245
- {
246
- variant: "mono",
247
- mode: "icon",
248
- appearance: "default",
249
- className: "shadow-xs shadow-black/5"
250
- },
251
- {
252
- variant: "secondary",
253
- mode: "icon",
254
- appearance: "default",
255
- className: "shadow-xs shadow-black/5"
256
- },
257
- {
258
- variant: "outline",
259
- mode: "icon",
260
- appearance: "default",
261
- className: "shadow-xs shadow-black/5"
262
- },
263
- {
264
- variant: "dashed",
265
- mode: "icon",
266
- appearance: "default",
267
- className: "shadow-xs shadow-black/5"
268
- },
269
- {
270
- variant: "destructive",
271
- mode: "icon",
272
- appearance: "default",
273
- className: "shadow-xs shadow-black/5"
274
- },
219
+ // Shadow support (icon mode)
275
220
  {
276
- variant: "dark-primary",
277
- mode: "icon",
278
- appearance: "default",
279
- className: "shadow-xs shadow-black/5"
280
- },
281
- {
282
- variant: "outline-primary",
283
- mode: "icon",
284
- appearance: "default",
285
- className: "shadow-xs shadow-black/5"
286
- },
287
- {
288
- variant: "outline-destructive",
221
+ variant: [
222
+ "primary",
223
+ "mono",
224
+ "secondary",
225
+ "outline",
226
+ "dashed",
227
+ "destructive",
228
+ "destructive-soft",
229
+ "dark-primary",
230
+ "outline-primary",
231
+ "outline-destructive",
232
+ "success",
233
+ "success-soft",
234
+ "info",
235
+ "info-soft",
236
+ "warning",
237
+ "warning-soft"
238
+ ],
289
239
  mode: "icon",
290
240
  appearance: "default",
291
241
  className: "shadow-xs shadow-black/5"
@@ -394,6 +344,36 @@ var buttonVariants = classVarianceAuthority.cva(
394
344
  appearance: "ghost",
395
345
  className: "bg-transparent text-emerald-500 hover:bg-emerald-500/5 data-[state=open]:bg-emerald-500/5"
396
346
  },
347
+ {
348
+ variant: "success-soft",
349
+ appearance: "ghost",
350
+ className: "bg-transparent text-green-600 border-transparent hover:bg-green-100/50 data-[state=open]:bg-green-100/50 dark:text-green-400 dark:hover:bg-green-950/50 dark:data-[state=open]:bg-green-950/50"
351
+ },
352
+ {
353
+ variant: "destructive-soft",
354
+ appearance: "ghost",
355
+ className: "bg-transparent text-red-600 border-transparent hover:bg-red-100/50 data-[state=open]:bg-red-100/50 dark:text-red-400 dark:hover:bg-red-950/50 dark:data-[state=open]:bg-red-950/50"
356
+ },
357
+ {
358
+ variant: "info",
359
+ appearance: "ghost",
360
+ className: "bg-transparent text-violet-500 hover:bg-violet-500/5 data-[state=open]:bg-violet-500/5"
361
+ },
362
+ {
363
+ variant: "info-soft",
364
+ appearance: "ghost",
365
+ className: "bg-transparent text-violet-600 border-transparent hover:bg-violet-100/50 data-[state=open]:bg-violet-100/50 dark:text-violet-400 dark:hover:bg-violet-950/50 dark:data-[state=open]:bg-violet-950/50"
366
+ },
367
+ {
368
+ variant: "warning",
369
+ appearance: "ghost",
370
+ className: "bg-transparent text-yellow-500 hover:bg-yellow-500/5 data-[state=open]:bg-yellow-500/5"
371
+ },
372
+ {
373
+ variant: "warning-soft",
374
+ appearance: "ghost",
375
+ className: "bg-transparent text-yellow-800 border-transparent hover:bg-yellow-100/50 data-[state=open]:bg-yellow-100/50 dark:text-yellow-400 dark:hover:bg-yellow-950/50 dark:data-[state=open]:bg-yellow-950/50"
376
+ },
397
377
  {
398
378
  variant: "ghost",
399
379
  mode: "icon",
@@ -3883,6 +3863,125 @@ function KanbanOverlay({ children, className }) {
3883
3863
  }
3884
3864
  ) });
3885
3865
  }
3866
+ function Table({
3867
+ className,
3868
+ ...props
3869
+ }) {
3870
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "table-wrapper", className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
3871
+ "table",
3872
+ {
3873
+ "data-slot": "table",
3874
+ className: cn(
3875
+ "w-full caption-bottom text-sm border-collapse",
3876
+ className
3877
+ ),
3878
+ ...props
3879
+ }
3880
+ ) });
3881
+ }
3882
+ function TableHeader({
3883
+ className,
3884
+ ...props
3885
+ }) {
3886
+ return /* @__PURE__ */ jsxRuntime.jsx(
3887
+ "thead",
3888
+ {
3889
+ "data-slot": "table-header",
3890
+ className: cn("[&_tr]:border-b", className),
3891
+ ...props
3892
+ }
3893
+ );
3894
+ }
3895
+ function TableBody({
3896
+ className,
3897
+ ...props
3898
+ }) {
3899
+ return /* @__PURE__ */ jsxRuntime.jsx(
3900
+ "tbody",
3901
+ {
3902
+ "data-slot": "table-body",
3903
+ className: cn("[&_tr:last-child]:border-0", className),
3904
+ ...props
3905
+ }
3906
+ );
3907
+ }
3908
+ function TableFooter({
3909
+ className,
3910
+ ...props
3911
+ }) {
3912
+ return /* @__PURE__ */ jsxRuntime.jsx(
3913
+ "tfoot",
3914
+ {
3915
+ "data-slot": "table-footer",
3916
+ className: cn(
3917
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
3918
+ className
3919
+ ),
3920
+ ...props
3921
+ }
3922
+ );
3923
+ }
3924
+ function TableRow({
3925
+ className,
3926
+ ...props
3927
+ }) {
3928
+ return /* @__PURE__ */ jsxRuntime.jsx(
3929
+ "tr",
3930
+ {
3931
+ "data-slot": "table-row",
3932
+ className: cn(
3933
+ "border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
3934
+ className
3935
+ ),
3936
+ ...props
3937
+ }
3938
+ );
3939
+ }
3940
+ function TableHead({
3941
+ className,
3942
+ ...props
3943
+ }) {
3944
+ return /* @__PURE__ */ jsxRuntime.jsx(
3945
+ "th",
3946
+ {
3947
+ "data-slot": "table-head",
3948
+ className: cn(
3949
+ "h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pe-0 *:[[role=checkbox]]:translate-y-0.5",
3950
+ className
3951
+ ),
3952
+ ...props
3953
+ }
3954
+ );
3955
+ }
3956
+ function TableCell({
3957
+ className,
3958
+ ...props
3959
+ }) {
3960
+ return /* @__PURE__ */ jsxRuntime.jsx(
3961
+ "td",
3962
+ {
3963
+ "data-slot": "table-cell",
3964
+ className: cn(
3965
+ "px-4 py-3 align-middle [&:has([role=checkbox])]:pe-0 *:[[role=checkbox]]:translate-y-0.5",
3966
+ className
3967
+ ),
3968
+ ...props
3969
+ }
3970
+ );
3971
+ }
3972
+ function TableCaption({
3973
+ className,
3974
+ ...props
3975
+ }) {
3976
+ return /* @__PURE__ */ jsxRuntime.jsx(
3977
+ "caption",
3978
+ {
3979
+ "data-slot": "table-caption",
3980
+ className: cn("mt-4 text-sm text-muted-foreground", className),
3981
+ ...props
3982
+ }
3983
+ );
3984
+ }
3886
3985
  var badgeVariants = classVarianceAuthority.cva(
3887
3986
  "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",
3888
3987
  {
@@ -7579,6 +7678,14 @@ exports.Spinner = Spinner;
7579
7678
  exports.Switch = Switch;
7580
7679
  exports.SwitchIndicator = SwitchIndicator;
7581
7680
  exports.SwitchWrapper = SwitchWrapper;
7681
+ exports.Table = Table;
7682
+ exports.TableBody = TableBody;
7683
+ exports.TableCaption = TableCaption;
7684
+ exports.TableCell = TableCell;
7685
+ exports.TableFooter = TableFooter;
7686
+ exports.TableHead = TableHead;
7687
+ exports.TableHeader = TableHeader;
7688
+ exports.TableRow = TableRow;
7582
7689
  exports.Tabs = Tabs;
7583
7690
  exports.TabsContent = TabsContent;
7584
7691
  exports.TabsList = TabsList;