@strategicos/ui 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/components/alert-dialog.js +5 -5
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/alert.js +10 -6
- package/dist/components/alert.js.map +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.js +4 -4
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +13 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/dialog.js +5 -5
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dropdown-menu.js +5 -5
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/pagination.js +16 -2
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/select.js +4 -4
- package/dist/components/select.js.map +1 -1
- package/dist/components/sheet.js +2 -2
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +12 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.js +2 -2
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/tooltip.js +1 -1
- package/package.json +1 -1
- package/src/components/alert-dialog.tsx +5 -5
- package/src/components/alert.tsx +10 -7
- package/src/components/badge.tsx +1 -1
- package/src/components/button.tsx +1 -1
- package/src/components/card.tsx +4 -4
- package/src/components/checkbox.tsx +33 -0
- package/src/components/dialog.tsx +6 -6
- package/src/components/dropdown-menu.tsx +5 -5
- package/src/components/input.tsx +1 -1
- package/src/components/pagination.tsx +54 -18
- package/src/components/select.tsx +4 -4
- package/src/components/sheet.tsx +2 -2
- package/src/components/switch.tsx +32 -0
- package/src/components/table.tsx +2 -2
- package/src/components/tabs.tsx +1 -1
- package/src/components/textarea.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
package/dist/components/table.js
CHANGED
|
@@ -17,10 +17,10 @@ function TableRow({ className, ...props }) {
|
|
|
17
17
|
return (_jsx("tr", { "data-slot": "table-row", className: cn("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className), ...props }));
|
|
18
18
|
}
|
|
19
19
|
function TableHead({ className, ...props }) {
|
|
20
|
-
return (_jsx("th", { "data-slot": "table-head", className: cn("h-10 px-2 text-left align-middle font-
|
|
20
|
+
return (_jsx("th", { "data-slot": "table-head", className: cn("h-10 px-2.5 text-left align-middle font-bold whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className), ...props }));
|
|
21
21
|
}
|
|
22
22
|
function TableCell({ className, ...props }) {
|
|
23
|
-
return (_jsx("td", { "data-slot": "table-cell", className: cn("
|
|
23
|
+
return (_jsx("td", { "data-slot": "table-cell", className: cn("px-2.5 py-2.5 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className), ...props }));
|
|
24
24
|
}
|
|
25
25
|
function TableCaption({ className, ...props }) {
|
|
26
26
|
return (_jsx("caption", { "data-slot": "table-caption", className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/components/table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAIZ,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,SAAS,KAAK,CAAC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AAE,EAAE,CACX,
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/components/table.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAIZ,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACnE,OAAO,CACL,2BACY,iBAAiB,EAC3B,SAAS,EAAC,iCAAiC,YAE3C,6BACY,OAAO,EACjB,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,GACE,CACP,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,6BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,KACvC,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACvE,OAAO,CACL,6BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAClD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiC;IACzE,OAAO,CACL,6BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACnE,OAAO,CACL,0BACY,WAAW,EACrB,SAAS,EAAE,EAAE,CACX,2GAA2G,EAC3G,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACpE,OAAO,CACL,0BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,8GAA8G,EAC9G,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACpE,OAAO,CACL,0BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,4EAA4E,EAC5E,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACwB;IAChC,OAAO,CACL,+BACY,eAAe,EACzB,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,KAC1D,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}
|
package/dist/components/tabs.js
CHANGED
|
@@ -47,7 +47,7 @@ const tabsTriggerVariants = cva("group/tabs-trigger relative inline-flex cursor-
|
|
|
47
47
|
{
|
|
48
48
|
variant: "line",
|
|
49
49
|
orientation: "horizontal",
|
|
50
|
-
className: "-mb-px justify-center border-b-2 border-transparent px-3 py-2.5 data-active:border-primary-strong sm:px-4",
|
|
50
|
+
className: "-mb-px justify-center rounded-t-md border-b-2 border-transparent px-3 py-2.5 hover:bg-muted/70 data-active:border-primary-strong sm:px-4",
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
variant: "line",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,UAAU,CAAA;AAEhD,OAAO,EAAE,EAAE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C;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -12,7 +12,7 @@ import { cn } from "../lib/utils.js";
|
|
|
12
12
|
* (sem borda até o hover, salva no blur), um padrão deliberadamente diferente.
|
|
13
13
|
*/
|
|
14
14
|
function Textarea({ className, ...props }) {
|
|
15
|
-
return (_jsx("textarea", { "data-slot": "textarea", className: cn("w-full min-w-0 resize-none rounded-lg border border-input bg-transparent px-3 py-2 text-base leading-relaxed transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:
|
|
15
|
+
return (_jsx("textarea", { "data-slot": "textarea", className: cn("w-full min-w-0 resize-none rounded-lg border border-input bg-transparent px-3 py-2 text-base leading-relaxed transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-60 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), ...props }));
|
|
16
16
|
}
|
|
17
17
|
export { Textarea };
|
|
18
18
|
//# sourceMappingURL=textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/components/textarea.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC;;;;;;;;;;GAUG;AACH,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoC;IACzE,OAAO,CACL,gCACY,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/components/textarea.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC;;;;;;;;;;GAUG;AACH,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoC;IACzE,OAAO,CACL,gCACY,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,ohBAAohB,EACphB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -12,7 +12,7 @@ function TooltipTrigger({ ...props }) {
|
|
|
12
12
|
return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
13
13
|
}
|
|
14
14
|
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
15
|
-
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-
|
|
15
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-lg bg-foreground px-2.5 py-1 text-sm text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })] }) }));
|
|
16
16
|
}
|
|
17
17
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
18
18
|
//# sourceMappingURL=tooltip.js.map
|
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@ function AlertDialogOverlay({
|
|
|
32
32
|
<AlertDialogPrimitive.Overlay
|
|
33
33
|
data-slot="alert-dialog-overlay"
|
|
34
34
|
className={cn(
|
|
35
|
-
"fixed inset-0 isolate z-50 bg-black/
|
|
35
|
+
"fixed inset-0 isolate z-50 bg-black/60 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
36
36
|
className
|
|
37
37
|
)}
|
|
38
38
|
{...props}
|
|
@@ -51,7 +51,7 @@ function AlertDialogContent({
|
|
|
51
51
|
<AlertDialogPrimitive.Content
|
|
52
52
|
data-slot="alert-dialog-content"
|
|
53
53
|
className={cn(
|
|
54
|
-
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-
|
|
54
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-xl ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-[440px] data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
55
55
|
className
|
|
56
56
|
)}
|
|
57
57
|
{...props}
|
|
@@ -66,7 +66,7 @@ function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">)
|
|
|
66
66
|
return (
|
|
67
67
|
<div
|
|
68
68
|
data-slot="alert-dialog-header"
|
|
69
|
-
className={cn("flex flex-col gap-
|
|
69
|
+
className={cn("flex flex-col gap-1.5", className)}
|
|
70
70
|
{...props}
|
|
71
71
|
/>
|
|
72
72
|
)
|
|
@@ -77,7 +77,7 @@ function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">)
|
|
|
77
77
|
<div
|
|
78
78
|
data-slot="alert-dialog-footer"
|
|
79
79
|
className={cn(
|
|
80
|
-
"-
|
|
80
|
+
"mt-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
81
81
|
className
|
|
82
82
|
)}
|
|
83
83
|
{...props}
|
|
@@ -92,7 +92,7 @@ function AlertDialogTitle({
|
|
|
92
92
|
return (
|
|
93
93
|
<AlertDialogPrimitive.Title
|
|
94
94
|
data-slot="alert-dialog-title"
|
|
95
|
-
className={cn("
|
|
95
|
+
className={cn("text-lg leading-tight font-semibold", className)}
|
|
96
96
|
{...props}
|
|
97
97
|
/>
|
|
98
98
|
)
|
package/src/components/alert.tsx
CHANGED
|
@@ -4,13 +4,16 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
4
4
|
import { cn } from "../lib/utils.js"
|
|
5
5
|
|
|
6
6
|
const alertVariants = cva(
|
|
7
|
-
"group/alert relative grid w-full gap-
|
|
7
|
+
"group/alert relative grid w-full gap-1 rounded-lg px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-3 *:[svg]:row-span-2 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-5",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
default: "bg-muted text-foreground",
|
|
12
|
+
// Status: fundo em /10 da cor; título e ícone na cor, texto neutro.
|
|
13
|
+
info: "bg-info/10 *:data-[slot=alert-title]:text-info *:[svg]:text-info",
|
|
14
|
+
success: "bg-success/10 *:data-[slot=alert-title]:text-success *:[svg]:text-success",
|
|
15
|
+
warning: "bg-warning/10 *:data-[slot=alert-title]:text-warning-strong *:[svg]:text-warning",
|
|
16
|
+
destructive: "bg-destructive/10 *:data-[slot=alert-title]:text-destructive *:[svg]:text-destructive",
|
|
14
17
|
},
|
|
15
18
|
},
|
|
16
19
|
defaultVariants: {
|
|
@@ -39,7 +42,7 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
39
42
|
<div
|
|
40
43
|
data-slot="alert-title"
|
|
41
44
|
className={cn(
|
|
42
|
-
"font-
|
|
45
|
+
"font-semibold group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
|
|
43
46
|
className
|
|
44
47
|
)}
|
|
45
48
|
{...props}
|
|
@@ -55,7 +58,7 @@ function AlertDescription({
|
|
|
55
58
|
<div
|
|
56
59
|
data-slot="alert-description"
|
|
57
60
|
className={cn(
|
|
58
|
-
"text-sm text-balance text-
|
|
61
|
+
"text-sm text-balance text-foreground/80 md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
59
62
|
className
|
|
60
63
|
)}
|
|
61
64
|
{...props}
|
|
@@ -67,7 +70,7 @@ function AlertAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
67
70
|
return (
|
|
68
71
|
<div
|
|
69
72
|
data-slot="alert-action"
|
|
70
|
-
className={cn("absolute top-2 right-2", className)}
|
|
73
|
+
className={cn("absolute top-2.5 right-2.5", className)}
|
|
71
74
|
{...props}
|
|
72
75
|
/>
|
|
73
76
|
)
|
package/src/components/badge.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { Slot } from "radix-ui"
|
|
|
5
5
|
import { cn } from "../lib/utils.js"
|
|
6
6
|
|
|
7
7
|
const badgeVariants = cva(
|
|
8
|
-
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-
|
|
8
|
+
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2.5 text-[11px] font-bold tracking-[0.025em] whitespace-nowrap uppercase transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
@@ -5,7 +5,7 @@ import { Slot } from "radix-ui"
|
|
|
5
5
|
import { cn } from "../lib/utils.js"
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-
|
|
8
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
package/src/components/card.tsx
CHANGED
|
@@ -12,7 +12,7 @@ function Card({
|
|
|
12
12
|
data-slot="card"
|
|
13
13
|
data-size={size}
|
|
14
14
|
className={cn(
|
|
15
|
-
"group/card flex flex-col gap-4 overflow-hidden rounded-
|
|
15
|
+
"group/card flex flex-col gap-4 overflow-hidden rounded-lg border border-border bg-card py-4 text-sm text-card-foreground shadow-card has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",
|
|
16
16
|
className
|
|
17
17
|
)}
|
|
18
18
|
{...props}
|
|
@@ -25,7 +25,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
25
25
|
<div
|
|
26
26
|
data-slot="card-header"
|
|
27
27
|
className={cn(
|
|
28
|
-
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-
|
|
28
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",
|
|
29
29
|
className
|
|
30
30
|
)}
|
|
31
31
|
{...props}
|
|
@@ -38,7 +38,7 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
38
38
|
<div
|
|
39
39
|
data-slot="card-title"
|
|
40
40
|
className={cn(
|
|
41
|
-
"font-heading text-base leading-snug font-
|
|
41
|
+
"font-heading text-base leading-snug font-semibold group-data-[size=sm]/card:text-sm",
|
|
42
42
|
className
|
|
43
43
|
)}
|
|
44
44
|
{...props}
|
|
@@ -84,7 +84,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
84
84
|
<div
|
|
85
85
|
data-slot="card-footer"
|
|
86
86
|
className={cn(
|
|
87
|
-
"flex items-center rounded-b-
|
|
87
|
+
"flex items-center rounded-b-lg border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",
|
|
88
88
|
className
|
|
89
89
|
)}
|
|
90
90
|
{...props}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui"
|
|
5
|
+
import { CheckIcon, MinusIcon } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
import { cn } from "../lib/utils.js"
|
|
8
|
+
|
|
9
|
+
/** Caixa de seleção (Radix Checkbox), no tamanho padrão do Mantine: 20px,
|
|
10
|
+
* raio de 4px, marcada na cor primária. Aceita `checked="indeterminate"`.
|
|
11
|
+
* Para rótulo, associe um <Label htmlFor> ao `id` do Checkbox. */
|
|
12
|
+
function Checkbox({
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
16
|
+
return (
|
|
17
|
+
<CheckboxPrimitive.Root
|
|
18
|
+
data-slot="checkbox"
|
|
19
|
+
className={cn(
|
|
20
|
+
"peer group/checkbox inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-input bg-background text-primary-foreground transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive data-checked:border-primary data-checked:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary dark:bg-input/30",
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
{...props}
|
|
24
|
+
>
|
|
25
|
+
<CheckboxPrimitive.Indicator data-slot="checkbox-indicator" className="flex items-center justify-center">
|
|
26
|
+
<CheckIcon className="size-3.5 stroke-3 group-data-[state=indeterminate]/checkbox:hidden" />
|
|
27
|
+
<MinusIcon className="hidden size-3.5 stroke-3 group-data-[state=indeterminate]/checkbox:block" />
|
|
28
|
+
</CheckboxPrimitive.Indicator>
|
|
29
|
+
</CheckboxPrimitive.Root>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { Checkbox }
|
|
@@ -39,7 +39,7 @@ function DialogOverlay({
|
|
|
39
39
|
<DialogPrimitive.Overlay
|
|
40
40
|
data-slot="dialog-overlay"
|
|
41
41
|
className={cn(
|
|
42
|
-
"fixed inset-0 isolate z-50 bg-black/
|
|
42
|
+
"fixed inset-0 isolate z-50 bg-black/60 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
43
43
|
className
|
|
44
44
|
)}
|
|
45
45
|
{...props}
|
|
@@ -61,7 +61,7 @@ function DialogContent({
|
|
|
61
61
|
<DialogPrimitive.Content
|
|
62
62
|
data-slot="dialog-content"
|
|
63
63
|
className={cn(
|
|
64
|
-
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-
|
|
64
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-xl ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-[440px] data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
65
65
|
className
|
|
66
66
|
)}
|
|
67
67
|
{...props}
|
|
@@ -71,7 +71,7 @@ function DialogContent({
|
|
|
71
71
|
<DialogPrimitive.Close data-slot="dialog-close" asChild>
|
|
72
72
|
<Button
|
|
73
73
|
variant="ghost"
|
|
74
|
-
className="absolute top-
|
|
74
|
+
className="absolute top-3 right-3"
|
|
75
75
|
size="icon-sm"
|
|
76
76
|
>
|
|
77
77
|
<XIcon
|
|
@@ -89,7 +89,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
89
89
|
return (
|
|
90
90
|
<div
|
|
91
91
|
data-slot="dialog-header"
|
|
92
|
-
className={cn("flex flex-col gap-
|
|
92
|
+
className={cn("flex flex-col gap-1.5 pr-8", className)}
|
|
93
93
|
{...props}
|
|
94
94
|
/>
|
|
95
95
|
)
|
|
@@ -107,7 +107,7 @@ function DialogFooter({
|
|
|
107
107
|
<div
|
|
108
108
|
data-slot="dialog-footer"
|
|
109
109
|
className={cn(
|
|
110
|
-
"-
|
|
110
|
+
"mt-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
111
111
|
className
|
|
112
112
|
)}
|
|
113
113
|
{...props}
|
|
@@ -130,7 +130,7 @@ function DialogTitle({
|
|
|
130
130
|
<DialogPrimitive.Title
|
|
131
131
|
data-slot="dialog-title"
|
|
132
132
|
className={cn(
|
|
133
|
-
"
|
|
133
|
+
"text-lg leading-tight font-semibold",
|
|
134
134
|
className
|
|
135
135
|
)}
|
|
136
136
|
{...props}
|
|
@@ -73,7 +73,7 @@ function DropdownMenuItem({
|
|
|
73
73
|
data-inset={inset}
|
|
74
74
|
data-variant={variant}
|
|
75
75
|
className={cn(
|
|
76
|
-
"group/dropdown-menu-item relative flex cursor-
|
|
76
|
+
"group/dropdown-menu-item relative flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
77
77
|
className
|
|
78
78
|
)}
|
|
79
79
|
{...props}
|
|
@@ -95,7 +95,7 @@ function DropdownMenuCheckboxItem({
|
|
|
95
95
|
data-slot="dropdown-menu-checkbox-item"
|
|
96
96
|
data-inset={inset}
|
|
97
97
|
className={cn(
|
|
98
|
-
"relative flex cursor-
|
|
98
|
+
"relative flex cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
99
99
|
className
|
|
100
100
|
)}
|
|
101
101
|
checked={checked}
|
|
@@ -139,7 +139,7 @@ function DropdownMenuRadioItem({
|
|
|
139
139
|
data-slot="dropdown-menu-radio-item"
|
|
140
140
|
data-inset={inset}
|
|
141
141
|
className={cn(
|
|
142
|
-
"relative flex cursor-
|
|
142
|
+
"relative flex cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
143
143
|
className
|
|
144
144
|
)}
|
|
145
145
|
{...props}
|
|
@@ -170,7 +170,7 @@ function DropdownMenuLabel({
|
|
|
170
170
|
data-slot="dropdown-menu-label"
|
|
171
171
|
data-inset={inset}
|
|
172
172
|
className={cn(
|
|
173
|
-
"px-
|
|
173
|
+
"px-2.5 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8.5",
|
|
174
174
|
className
|
|
175
175
|
)}
|
|
176
176
|
{...props}
|
|
@@ -226,7 +226,7 @@ function DropdownMenuSubTrigger({
|
|
|
226
226
|
data-slot="dropdown-menu-sub-trigger"
|
|
227
227
|
data-inset={inset}
|
|
228
228
|
className={cn(
|
|
229
|
-
"flex cursor-
|
|
229
|
+
"flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
230
230
|
className
|
|
231
231
|
)}
|
|
232
232
|
{...props}
|
package/src/components/input.tsx
CHANGED
|
@@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
|
8
8
|
type={type}
|
|
9
9
|
data-slot="input"
|
|
10
10
|
className={cn(
|
|
11
|
-
"h-9 w-full min-w-0 rounded-lg border border-input bg-transparent px-3 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:
|
|
11
|
+
"h-9 w-full min-w-0 rounded-lg border border-input bg-transparent px-3 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-60 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...props}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ChevronLeft, ChevronRight } from "lucide-react"
|
|
2
2
|
|
|
3
3
|
import { cn } from "../lib/utils.js"
|
|
4
|
-
import { Button } from "./button.js"
|
|
5
4
|
|
|
6
5
|
interface PaginationProps {
|
|
7
6
|
page: number
|
|
@@ -13,6 +12,24 @@ interface PaginationProps {
|
|
|
13
12
|
className?: string
|
|
14
13
|
}
|
|
15
14
|
|
|
15
|
+
type Item = number | "dots"
|
|
16
|
+
|
|
17
|
+
/** Páginas visíveis, no padrão do Mantine: a primeira e a última sempre, a
|
|
18
|
+
* atual com uma vizinha de cada lado, e reticências no lugar dos buracos.
|
|
19
|
+
* O total de itens é fixo (7 quando há buraco), para os botões não pularem
|
|
20
|
+
* de posição enquanto se navega. */
|
|
21
|
+
function pageItems(page: number, totalPages: number): Item[] {
|
|
22
|
+
const range = (a: number, b: number) => Array.from({ length: b - a + 1 }, (_, i) => a + i)
|
|
23
|
+
if (totalPages <= 7) return range(1, totalPages)
|
|
24
|
+
|
|
25
|
+
if (page <= 4) return [...range(1, 5), "dots", totalPages]
|
|
26
|
+
if (page >= totalPages - 3) return [1, "dots", ...range(totalPages - 4, totalPages)]
|
|
27
|
+
return [1, "dots", page - 1, page, page + 1, "dots", totalPages]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const control =
|
|
31
|
+
"inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-border bg-background text-sm font-medium tabular-nums text-foreground transition-colors outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-background"
|
|
32
|
+
|
|
16
33
|
export function Pagination({
|
|
17
34
|
page,
|
|
18
35
|
totalPages,
|
|
@@ -28,35 +45,54 @@ export function Pagination({
|
|
|
28
45
|
const to = Math.min(page * pageSize, total)
|
|
29
46
|
|
|
30
47
|
return (
|
|
31
|
-
<div className={cn("flex items-center justify-between gap-3 pt-3", className)}>
|
|
32
|
-
<p className="text-xs text-muted-foreground">
|
|
48
|
+
<div className={cn("flex flex-wrap items-center justify-between gap-3 pt-3", className)}>
|
|
49
|
+
<p className="text-xs text-muted-foreground tabular-nums">
|
|
33
50
|
{from}–{to} de {total}
|
|
34
51
|
</p>
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
className="size-8"
|
|
52
|
+
<nav aria-label="Paginação" className="flex items-center gap-1.5">
|
|
53
|
+
<button
|
|
54
|
+
type="button"
|
|
55
|
+
className={control}
|
|
40
56
|
disabled={page <= 1 || loading}
|
|
41
57
|
onClick={() => onPageChange(page - 1)}
|
|
42
58
|
aria-label="Página anterior"
|
|
43
59
|
>
|
|
44
60
|
<ChevronLeft className="size-4" />
|
|
45
|
-
</
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
</button>
|
|
62
|
+
|
|
63
|
+
{pageItems(page, totalPages).map((item, i) =>
|
|
64
|
+
item === "dots" ? (
|
|
65
|
+
<span key={`dots-${i}`} aria-hidden className="inline-flex size-8 items-center justify-center text-sm text-muted-foreground">
|
|
66
|
+
…
|
|
67
|
+
</span>
|
|
68
|
+
) : (
|
|
69
|
+
<button
|
|
70
|
+
key={item}
|
|
71
|
+
type="button"
|
|
72
|
+
className={cn(
|
|
73
|
+
control,
|
|
74
|
+
item === page && "border-primary bg-primary text-primary-foreground hover:bg-primary-hover"
|
|
75
|
+
)}
|
|
76
|
+
disabled={loading}
|
|
77
|
+
aria-current={item === page ? "page" : undefined}
|
|
78
|
+
aria-label={`Página ${item}`}
|
|
79
|
+
onClick={() => item !== page && onPageChange(item)}
|
|
80
|
+
>
|
|
81
|
+
{item}
|
|
82
|
+
</button>
|
|
83
|
+
)
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
<button
|
|
87
|
+
type="button"
|
|
88
|
+
className={control}
|
|
53
89
|
disabled={page >= totalPages || loading}
|
|
54
90
|
onClick={() => onPageChange(page + 1)}
|
|
55
91
|
aria-label="Próxima página"
|
|
56
92
|
>
|
|
57
93
|
<ChevronRight className="size-4" />
|
|
58
|
-
</
|
|
59
|
-
</
|
|
94
|
+
</button>
|
|
95
|
+
</nav>
|
|
60
96
|
</div>
|
|
61
97
|
)
|
|
62
98
|
}
|
|
@@ -44,7 +44,7 @@ function SelectTrigger({
|
|
|
44
44
|
data-slot="select-trigger"
|
|
45
45
|
data-size={size}
|
|
46
46
|
className={cn(
|
|
47
|
-
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2.5 pl-3 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-
|
|
47
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2.5 pl-3 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-60 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-7.5 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
48
48
|
className
|
|
49
49
|
)}
|
|
50
50
|
{...props}
|
|
@@ -82,7 +82,7 @@ function SelectContent({
|
|
|
82
82
|
<SelectPrimitive.Viewport
|
|
83
83
|
data-position={position}
|
|
84
84
|
className={cn(
|
|
85
|
-
"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
|
|
85
|
+
"p-1 data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
|
|
86
86
|
position === "popper" && ""
|
|
87
87
|
)}
|
|
88
88
|
>
|
|
@@ -101,7 +101,7 @@ function SelectLabel({
|
|
|
101
101
|
return (
|
|
102
102
|
<SelectPrimitive.Label
|
|
103
103
|
data-slot="select-label"
|
|
104
|
-
className={cn("px-
|
|
104
|
+
className={cn("px-2.5 py-1.5 text-xs font-medium text-muted-foreground", className)}
|
|
105
105
|
{...props}
|
|
106
106
|
/>
|
|
107
107
|
)
|
|
@@ -121,7 +121,7 @@ function SelectItem({
|
|
|
121
121
|
<SelectPrimitive.Item
|
|
122
122
|
data-slot="select-item"
|
|
123
123
|
className={cn(
|
|
124
|
-
"relative flex w-full cursor-
|
|
124
|
+
"relative flex w-full cursor-pointer items-center gap-2 rounded-md py-1.5 pr-8 pl-2.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
125
125
|
className
|
|
126
126
|
)}
|
|
127
127
|
{...props}
|
package/src/components/sheet.tsx
CHANGED
|
@@ -37,7 +37,7 @@ function SheetOverlay({
|
|
|
37
37
|
<SheetPrimitive.Overlay
|
|
38
38
|
data-slot="sheet-overlay"
|
|
39
39
|
className={cn(
|
|
40
|
-
"fixed inset-0 z-50 bg-black/
|
|
40
|
+
"fixed inset-0 z-50 bg-black/60 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
41
41
|
className
|
|
42
42
|
)}
|
|
43
43
|
{...props}
|
|
@@ -114,7 +114,7 @@ function SheetTitle({
|
|
|
114
114
|
<SheetPrimitive.Title
|
|
115
115
|
data-slot="sheet-title"
|
|
116
116
|
className={cn(
|
|
117
|
-
"
|
|
117
|
+
"text-lg font-semibold text-foreground",
|
|
118
118
|
className
|
|
119
119
|
)}
|
|
120
120
|
{...props}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Switch as SwitchPrimitive } from "radix-ui"
|
|
5
|
+
|
|
6
|
+
import { cn } from "../lib/utils.js"
|
|
7
|
+
|
|
8
|
+
/** Interruptor liga/desliga (Radix Switch), no tamanho padrão do Mantine:
|
|
9
|
+
* trilho de 38×20px e polegar de 14px. Ligado usa a cor primária.
|
|
10
|
+
* Para rótulo, associe um <Label htmlFor> ao `id` do Switch. */
|
|
11
|
+
function Switch({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof SwitchPrimitive.Root>) {
|
|
15
|
+
return (
|
|
16
|
+
<SwitchPrimitive.Root
|
|
17
|
+
data-slot="switch"
|
|
18
|
+
className={cn(
|
|
19
|
+
"peer inline-flex h-5 w-9.5 shrink-0 cursor-pointer items-center rounded-full border border-input bg-muted p-0.5 transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-checked:border-primary data-checked:bg-primary dark:bg-input/40",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...props}
|
|
23
|
+
>
|
|
24
|
+
<SwitchPrimitive.Thumb
|
|
25
|
+
data-slot="switch-thumb"
|
|
26
|
+
className="pointer-events-none block size-3.5 rounded-full bg-background shadow-sm ring-1 ring-foreground/10 transition-transform data-checked:translate-x-4.5 data-unchecked:translate-x-0"
|
|
27
|
+
/>
|
|
28
|
+
</SwitchPrimitive.Root>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { Switch }
|
package/src/components/table.tsx
CHANGED
|
@@ -70,7 +70,7 @@ function TableHead({ className, ...props }: React.ComponentProps<"th">) {
|
|
|
70
70
|
<th
|
|
71
71
|
data-slot="table-head"
|
|
72
72
|
className={cn(
|
|
73
|
-
"h-10 px-2 text-left align-middle font-
|
|
73
|
+
"h-10 px-2.5 text-left align-middle font-bold whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
74
74
|
className
|
|
75
75
|
)}
|
|
76
76
|
{...props}
|
|
@@ -83,7 +83,7 @@ function TableCell({ className, ...props }: React.ComponentProps<"td">) {
|
|
|
83
83
|
<td
|
|
84
84
|
data-slot="table-cell"
|
|
85
85
|
className={cn(
|
|
86
|
-
"
|
|
86
|
+
"px-2.5 py-2.5 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
87
87
|
className
|
|
88
88
|
)}
|
|
89
89
|
{...props}
|
package/src/components/tabs.tsx
CHANGED
|
@@ -109,7 +109,7 @@ const tabsTriggerVariants = cva(
|
|
|
109
109
|
variant: "line",
|
|
110
110
|
orientation: "horizontal",
|
|
111
111
|
className:
|
|
112
|
-
"-mb-px justify-center border-b-2 border-transparent px-3 py-2.5 data-active:border-primary-strong sm:px-4",
|
|
112
|
+
"-mb-px justify-center rounded-t-md border-b-2 border-transparent px-3 py-2.5 hover:bg-muted/70 data-active:border-primary-strong sm:px-4",
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
variant: "line",
|