@webdevarif/dashui 0.1.6 → 0.1.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.mjs CHANGED
@@ -13,7 +13,7 @@ function cn(...inputs) {
13
13
  // src/components/primitives/button.tsx
14
14
  import { jsx } from "react/jsx-runtime";
15
15
  var buttonVariants = cva(
16
- "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
16
+ "inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
17
17
  {
18
18
  variants: {
19
19
  variant: {
@@ -26,8 +26,8 @@ var buttonVariants = cva(
26
26
  },
27
27
  size: {
28
28
  default: "h-10 px-4 py-2",
29
- sm: "h-9 rounded-md px-3",
30
- lg: "h-11 rounded-md px-8",
29
+ sm: "h-9 rounded-lg px-3",
30
+ lg: "h-11 rounded-lg px-8",
31
31
  icon: "h-10 w-10"
32
32
  }
33
33
  },
@@ -397,7 +397,11 @@ var Input = React6.forwardRef(
397
397
  {
398
398
  type,
399
399
  className: cn(
400
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
400
+ "flex h-10 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background",
401
+ "file:border-0 file:bg-transparent file:text-sm file:font-medium",
402
+ "placeholder:text-muted-foreground",
403
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
404
+ "disabled:cursor-not-allowed disabled:opacity-50",
401
405
  error && "border-destructive focus-visible:ring-destructive",
402
406
  className
403
407
  ),
@@ -412,16 +416,15 @@ Input.displayName = "Input";
412
416
  // src/components/primitives/label.tsx
413
417
  import * as React7 from "react";
414
418
  import * as LabelPrimitive from "@radix-ui/react-label";
415
- import { cva as cva3 } from "class-variance-authority";
416
419
  import { jsx as jsx8 } from "react/jsx-runtime";
417
- var labelVariants = cva3(
418
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
419
- );
420
420
  var Label2 = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
421
421
  LabelPrimitive.Root,
422
422
  {
423
423
  ref,
424
- className: cn(labelVariants(), className),
424
+ className: cn(
425
+ "block text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
426
+ className
427
+ ),
425
428
  ...props
426
429
  }
427
430
  ));
@@ -461,13 +464,17 @@ var SelectTrigger = React9.forwardRef(({ className, children, ...props }, ref) =
461
464
  {
462
465
  ref,
463
466
  className: cn(
464
- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
467
+ "flex h-10 w-full items-center justify-between rounded-lg border border-input bg-background px-3 py-2 text-sm",
468
+ "ring-offset-background placeholder:text-muted-foreground",
469
+ "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
470
+ "disabled:cursor-not-allowed disabled:opacity-50",
471
+ "[&>span]:line-clamp-1",
465
472
  className
466
473
  ),
467
474
  ...props,
468
475
  children: [
469
476
  children,
470
- /* @__PURE__ */ jsx10(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx10(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
477
+ /* @__PURE__ */ jsx10(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx10(ChevronDown, { className: "h-4 w-4 opacity-50 shrink-0" }) })
471
478
  ]
472
479
  }
473
480
  ));
@@ -476,10 +483,7 @@ var SelectScrollUpButton = React9.forwardRef(({ className, ...props }, ref) => /
476
483
  SelectPrimitive.ScrollUpButton,
477
484
  {
478
485
  ref,
479
- className: cn(
480
- "flex cursor-default items-center justify-center py-1",
481
- className
482
- ),
486
+ className: cn("flex cursor-default items-center justify-center py-1", className),
483
487
  ...props,
484
488
  children: /* @__PURE__ */ jsx10(ChevronUp, { className: "h-4 w-4" })
485
489
  }
@@ -489,10 +493,7 @@ var SelectScrollDownButton = React9.forwardRef(({ className, ...props }, ref) =>
489
493
  SelectPrimitive.ScrollDownButton,
490
494
  {
491
495
  ref,
492
- className: cn(
493
- "flex cursor-default items-center justify-center py-1",
494
- className
495
- ),
496
+ className: cn("flex cursor-default items-center justify-center py-1", className),
496
497
  ...props,
497
498
  children: /* @__PURE__ */ jsx10(ChevronDown, { className: "h-4 w-4" })
498
499
  }
@@ -503,7 +504,15 @@ var SelectContent = React9.forwardRef(({ className, children, position = "popper
503
504
  {
504
505
  ref,
505
506
  className: cn(
506
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
507
+ // explicit bg + border + shadow so it never relies on missing CSS vars
508
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
509
+ "rounded-lg border border-border bg-white text-foreground shadow-lg",
510
+ "dark:bg-zinc-900 dark:border-zinc-700",
511
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
512
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
513
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
514
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
515
+ "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
507
516
  position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
508
517
  className
509
518
  ),
@@ -530,7 +539,7 @@ var SelectLabel = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
530
539
  SelectPrimitive.Label,
531
540
  {
532
541
  ref,
533
- className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
542
+ className: cn("py-1.5 pl-8 pr-2 text-xs font-semibold text-muted-foreground", className),
534
543
  ...props
535
544
  }
536
545
  ));
@@ -540,12 +549,15 @@ var SelectItem = React9.forwardRef(({ className, children, ...props }, ref) => /
540
549
  {
541
550
  ref,
542
551
  className: cn(
543
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
552
+ "relative flex w-full cursor-default select-none items-center",
553
+ "rounded-md py-2 pl-9 pr-3 text-sm outline-none",
554
+ "focus:bg-accent focus:text-accent-foreground",
555
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
544
556
  className
545
557
  ),
546
558
  ...props,
547
559
  children: [
548
- /* @__PURE__ */ jsx10("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx10(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx10(Check3, { className: "h-4 w-4" }) }) }),
560
+ /* @__PURE__ */ jsx10("span", { className: "absolute left-2.5 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx10(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx10(Check3, { className: "h-3.5 w-3.5 text-primary", strokeWidth: 2.5 }) }) }),
549
561
  /* @__PURE__ */ jsx10(SelectPrimitive.ItemText, { children })
550
562
  ]
551
563
  }
@@ -555,7 +567,7 @@ var SelectSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__
555
567
  SelectPrimitive.Separator,
556
568
  {
557
569
  ref,
558
- className: cn("-mx-1 my-1 h-px bg-muted", className),
570
+ className: cn("-mx-1 my-1 h-px bg-border", className),
559
571
  ...props
560
572
  }
561
573
  ));