@kopexa/theme 1.5.8 → 1.6.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/{chunk-FLD2CUFZ.mjs → chunk-3IIJVON7.mjs} +11 -8
- package/dist/{chunk-I2NMD23O.mjs → chunk-5QIMO5EG.mjs} +1 -1
- package/dist/chunk-CZMZHA7U.mjs +37 -0
- package/dist/{chunk-3M5JSM7Y.mjs → chunk-DQEPGWAN.mjs} +1 -1
- package/dist/{chunk-4VKJFW6Y.mjs → chunk-EACX3NZF.mjs} +11 -2
- package/dist/chunk-FWRXPYLB.mjs +41 -0
- package/dist/chunk-GA6UOB2D.mjs +166 -0
- package/dist/chunk-I6M4S2KZ.mjs +41 -0
- package/dist/{chunk-UI2M2MFB.mjs → chunk-J4JIYTOU.mjs} +4 -2
- package/dist/{chunk-67PPUTSS.mjs → chunk-LG2J56LI.mjs} +2 -2
- package/dist/{chunk-CDTKWCOH.mjs → chunk-MKBU6G6Q.mjs} +44 -3
- package/dist/{chunk-32L6KXLV.mjs → chunk-T5PESSOS.mjs} +1 -1
- package/dist/chunk-TT5V2MUL.mjs +29 -0
- package/dist/chunk-V2J5XG34.mjs +43 -0
- package/dist/chunk-VCLXE57S.mjs +16 -0
- package/dist/chunk-WPOYEHD2.mjs +45 -0
- package/dist/{chunk-5BIGFSZK.mjs → chunk-XJ7XBZNF.mjs} +1 -1
- package/dist/chunk-ZLM6Z3W2.mjs +94 -0
- package/dist/components/avatar.js +2 -2
- package/dist/components/avatar.mjs +2 -2
- package/dist/components/button.js +2 -2
- package/dist/components/button.mjs +2 -2
- package/dist/components/card.d.mts +24 -0
- package/dist/components/card.d.ts +24 -0
- package/dist/components/card.js +11 -2
- package/dist/components/card.mjs +1 -1
- package/dist/components/chip.js +2 -2
- package/dist/components/chip.mjs +2 -2
- package/dist/components/code.js +2 -2
- package/dist/components/code.mjs +2 -2
- package/dist/components/drawer.d.mts +9 -3
- package/dist/components/drawer.d.ts +9 -3
- package/dist/components/drawer.js +4 -2
- package/dist/components/drawer.mjs +1 -1
- package/dist/components/index.d.mts +9 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +585 -25
- package/dist/components/index.mjs +55 -15
- package/dist/components/page-layout.d.mts +9 -0
- package/dist/components/page-layout.d.ts +9 -0
- package/dist/components/page-layout.js +11 -8
- package/dist/components/page-layout.mjs +1 -1
- package/dist/components/preview-card.d.mts +89 -0
- package/dist/components/preview-card.d.ts +89 -0
- package/dist/components/preview-card.js +69 -0
- package/dist/components/preview-card.mjs +6 -0
- package/dist/components/risk-badge.d.mts +97 -0
- package/dist/components/risk-badge.d.ts +97 -0
- package/dist/components/risk-badge.js +67 -0
- package/dist/components/risk-badge.mjs +6 -0
- package/dist/components/risk-indicator.d.mts +76 -0
- package/dist/components/risk-indicator.d.ts +76 -0
- package/dist/components/risk-indicator.js +61 -0
- package/dist/components/risk-indicator.mjs +6 -0
- package/dist/components/section-row.d.mts +47 -0
- package/dist/components/section-row.d.ts +47 -0
- package/dist/components/section-row.js +53 -0
- package/dist/components/section-row.mjs +6 -0
- package/dist/components/separator.d.mts +22 -0
- package/dist/components/separator.d.ts +22 -0
- package/dist/components/separator.js +40 -0
- package/dist/components/separator.mjs +6 -0
- package/dist/components/sidebar.d.mts +206 -0
- package/dist/components/sidebar.d.ts +206 -0
- package/dist/components/sidebar.js +192 -0
- package/dist/components/sidebar.mjs +10 -0
- package/dist/components/split-page-layout.d.mts +49 -0
- package/dist/components/split-page-layout.d.ts +49 -0
- package/dist/components/split-page-layout.js +65 -0
- package/dist/components/split-page-layout.mjs +6 -0
- package/dist/components/tab-nav.d.mts +119 -0
- package/dist/components/tab-nav.d.ts +119 -0
- package/dist/components/tab-nav.js +118 -0
- package/dist/components/tab-nav.mjs +6 -0
- package/dist/components/table.d.mts +72 -0
- package/dist/components/table.d.ts +72 -0
- package/dist/components/table.js +44 -3
- package/dist/components/table.mjs +1 -1
- package/dist/components/tabs.d.mts +43 -0
- package/dist/components/tabs.d.ts +43 -0
- package/dist/components/tabs.js +65 -0
- package/dist/components/tabs.mjs +6 -0
- package/dist/index.css +93 -23
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +585 -25
- package/dist/index.mjs +55 -15
- package/dist/utils/variants.js +2 -2
- package/dist/utils/variants.mjs +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-FWB233VZ.mjs → chunk-NP4SOC4S.mjs} +0 -0
|
@@ -3,7 +3,7 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
var pageLayout = tv({
|
|
4
4
|
slots: {
|
|
5
5
|
root: "",
|
|
6
|
-
wrapper: "flex
|
|
6
|
+
wrapper: "flex flex-wrap w-full",
|
|
7
7
|
baseContent: "flex flex-1 flex-wrap max-w-full",
|
|
8
8
|
header: "w-full grow-0 shrink-0",
|
|
9
9
|
footerWrapper: "w-full",
|
|
@@ -22,7 +22,8 @@ var pageLayout = tv({
|
|
|
22
22
|
],
|
|
23
23
|
pane: "w-[var(--pane-width-size)] md:overflow-auto",
|
|
24
24
|
contentWrapper: "flex min-w-px flex-col basis-0 grow shrink",
|
|
25
|
-
content: "w-full mx-auto grow h-full"
|
|
25
|
+
content: "w-full mx-auto grow h-full",
|
|
26
|
+
bleed: []
|
|
26
27
|
},
|
|
27
28
|
variants: {
|
|
28
29
|
gap: {
|
|
@@ -50,14 +51,14 @@ var pageLayout = tv({
|
|
|
50
51
|
content: "max-w-full"
|
|
51
52
|
},
|
|
52
53
|
md: {
|
|
53
|
-
wrapper: "max-w-3xl",
|
|
54
|
+
wrapper: "max-w-3xl mx-auto",
|
|
54
55
|
content: "max-w-3xl"
|
|
55
56
|
},
|
|
56
57
|
lg: {
|
|
57
|
-
wrapper: "max-w-5xl"
|
|
58
|
+
wrapper: "max-w-5xl mx-auto"
|
|
58
59
|
},
|
|
59
60
|
xl: {
|
|
60
|
-
wrapper: "max-w-8xl",
|
|
61
|
+
wrapper: "max-w-8xl mx-auto",
|
|
61
62
|
content: "max-w-8xl"
|
|
62
63
|
}
|
|
63
64
|
},
|
|
@@ -79,7 +80,8 @@ var pageLayout = tv({
|
|
|
79
80
|
header: "p-4",
|
|
80
81
|
content: "p-4",
|
|
81
82
|
pane: "p-4",
|
|
82
|
-
footerContent: "p-4"
|
|
83
|
+
footerContent: "p-4",
|
|
84
|
+
bleed: ["-mx-4 p-4"]
|
|
83
85
|
},
|
|
84
86
|
// 1.5rem
|
|
85
87
|
normal: {
|
|
@@ -87,7 +89,8 @@ var pageLayout = tv({
|
|
|
87
89
|
header: "p-2 md:p-3",
|
|
88
90
|
content: "p-2 md:p-3",
|
|
89
91
|
pane: "p-2 md:p-3",
|
|
90
|
-
footerContent: "p-2 md:p-3"
|
|
92
|
+
footerContent: "p-2 md:p-3",
|
|
93
|
+
bleed: ["-mx-2 md:-mx-3 p-2 md:p-3"]
|
|
91
94
|
}
|
|
92
95
|
},
|
|
93
96
|
inModal: {
|
|
@@ -102,7 +105,7 @@ var pageLayout = tv({
|
|
|
102
105
|
defaultVariants: {
|
|
103
106
|
width: "xl",
|
|
104
107
|
spacing: "normal",
|
|
105
|
-
paneWidth: "
|
|
108
|
+
paneWidth: "lg",
|
|
106
109
|
gap: "normal"
|
|
107
110
|
}
|
|
108
111
|
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/components/risk-indicator.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var riskIndicator = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
base: "flex items-end gap-0.5",
|
|
6
|
+
bar: "rounded-sm",
|
|
7
|
+
barLow: "bg-green-500",
|
|
8
|
+
barMedium: "bg-yellow-500",
|
|
9
|
+
barHigh: "bg-red-500",
|
|
10
|
+
barInactive: "bg-gray-200",
|
|
11
|
+
barHeight1: "h-1/3",
|
|
12
|
+
barHeight2: "h-2/3",
|
|
13
|
+
barHeight3: "h-full",
|
|
14
|
+
barWidth: "w-1"
|
|
15
|
+
},
|
|
16
|
+
variants: {
|
|
17
|
+
level: {
|
|
18
|
+
none: "",
|
|
19
|
+
low: "",
|
|
20
|
+
medium: "",
|
|
21
|
+
high: ""
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
sm: "h-3",
|
|
25
|
+
md: "h-4",
|
|
26
|
+
lg: "h-5"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
level: "none",
|
|
31
|
+
size: "md"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
riskIndicator
|
|
37
|
+
};
|
|
@@ -50,6 +50,9 @@ var card = tv({
|
|
|
50
50
|
none: {
|
|
51
51
|
root: "shadow-none"
|
|
52
52
|
},
|
|
53
|
+
"2xs": {
|
|
54
|
+
root: "shadow-2xs"
|
|
55
|
+
},
|
|
53
56
|
sm: {
|
|
54
57
|
root: "shadow-sm"
|
|
55
58
|
},
|
|
@@ -60,6 +63,11 @@ var card = tv({
|
|
|
60
63
|
root: "shadow-lg"
|
|
61
64
|
}
|
|
62
65
|
},
|
|
66
|
+
border: {
|
|
67
|
+
true: {
|
|
68
|
+
root: "border"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
63
71
|
radius: {
|
|
64
72
|
none: {
|
|
65
73
|
root: "rounded-none",
|
|
@@ -108,12 +116,13 @@ var card = tv({
|
|
|
108
116
|
},
|
|
109
117
|
defaultVariants: {
|
|
110
118
|
radius: "lg",
|
|
111
|
-
shadow: "
|
|
119
|
+
shadow: "sm",
|
|
112
120
|
fullWidth: false,
|
|
113
121
|
isHoverable: false,
|
|
114
122
|
isPressable: false,
|
|
115
123
|
isBlurred: false,
|
|
116
|
-
isDisabled: false
|
|
124
|
+
isDisabled: false,
|
|
125
|
+
border: true
|
|
117
126
|
}
|
|
118
127
|
});
|
|
119
128
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/components/split-page-layout.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var splitPageLayout = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: [
|
|
6
|
+
"size-full min-h-0 grid grid-cols-[1fr_10px] md:grid-cols-3 relative"
|
|
7
|
+
],
|
|
8
|
+
content: ["p-4 md:p-6 col-span-1 md:col-span-2"],
|
|
9
|
+
panelContainer: [
|
|
10
|
+
"flex flex-col",
|
|
11
|
+
"md:border-s",
|
|
12
|
+
//"size-full",
|
|
13
|
+
"bg-muted dark:bg-primary-900"
|
|
14
|
+
],
|
|
15
|
+
panel: [
|
|
16
|
+
"md:border-s",
|
|
17
|
+
"p-4 md:p-6",
|
|
18
|
+
"overflow-y-auto overflow-x-hidden",
|
|
19
|
+
"flex-1",
|
|
20
|
+
"min-h-0",
|
|
21
|
+
"h-full"
|
|
22
|
+
],
|
|
23
|
+
bleed: "-mx-4 md:-mx-6",
|
|
24
|
+
mobileWrapper: "relative",
|
|
25
|
+
mobileContainer: ["absolute top-2 right-2 z-10"]
|
|
26
|
+
},
|
|
27
|
+
variants: {
|
|
28
|
+
inset: {
|
|
29
|
+
true: {
|
|
30
|
+
panelContainer: "rounded-e-md max-md:rounded-md"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
inset: true
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
splitPageLayout
|
|
41
|
+
};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// src/components/sidebar.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var sidebar = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
provider: [
|
|
6
|
+
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full"
|
|
7
|
+
],
|
|
8
|
+
sidebarWrapper: ["group peer text-sidebar-foreground hidden md:block"],
|
|
9
|
+
sidebar: [
|
|
10
|
+
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col"
|
|
11
|
+
],
|
|
12
|
+
gap: [
|
|
13
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
14
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
15
|
+
"group-data-[side=right]:rotate-180"
|
|
16
|
+
],
|
|
17
|
+
container: [
|
|
18
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex"
|
|
19
|
+
],
|
|
20
|
+
inner: [
|
|
21
|
+
"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"
|
|
22
|
+
],
|
|
23
|
+
trigger: [],
|
|
24
|
+
rail: [
|
|
25
|
+
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
26
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
27
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
28
|
+
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
29
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
30
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2"
|
|
31
|
+
],
|
|
32
|
+
inset: [
|
|
33
|
+
"bg-background relative flex w-full flex-1 flex-col",
|
|
34
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2"
|
|
35
|
+
],
|
|
36
|
+
input: ["bg-background h-8 w-full shadow-none"],
|
|
37
|
+
header: ["flex flex-col gap-2 p-2"],
|
|
38
|
+
footer: ["flex flex-col gap-2 p-2"],
|
|
39
|
+
separator: ["bg-sidebar-border mx-2 w-auto"],
|
|
40
|
+
content: [
|
|
41
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden"
|
|
42
|
+
],
|
|
43
|
+
group: ["relative flex w-full min-w-0 flex-col p-2"],
|
|
44
|
+
groupLabel: [
|
|
45
|
+
"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
46
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0"
|
|
47
|
+
],
|
|
48
|
+
groupAction: [
|
|
49
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
50
|
+
// Increases the hit area of the button on mobile.
|
|
51
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
52
|
+
"group-data-[collapsible=icon]:hidden"
|
|
53
|
+
],
|
|
54
|
+
groupContent: ["w-full text-sm"],
|
|
55
|
+
menu: ["flex w-full min-w-0 flex-col gap-1"],
|
|
56
|
+
menuItem: ["group/menu-item relative"]
|
|
57
|
+
},
|
|
58
|
+
variants: {
|
|
59
|
+
variant: {
|
|
60
|
+
sidebar: {
|
|
61
|
+
gap: "group-data-[collapsible=icon]:w-(--sidebar-width-icon)",
|
|
62
|
+
container: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l"
|
|
63
|
+
},
|
|
64
|
+
floating: {
|
|
65
|
+
gap: "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]",
|
|
66
|
+
container: "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
|
|
67
|
+
},
|
|
68
|
+
inset: {
|
|
69
|
+
gap: "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]",
|
|
70
|
+
container: "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
side: {
|
|
74
|
+
left: {
|
|
75
|
+
container: "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
|
|
76
|
+
},
|
|
77
|
+
right: {
|
|
78
|
+
container: "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
isMobile: {
|
|
82
|
+
true: {},
|
|
83
|
+
false: {}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
defaultVariants: {
|
|
87
|
+
variant: "sidebar",
|
|
88
|
+
isMobile: false
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
var sidebarMenuButton = tv({
|
|
92
|
+
base: [
|
|
93
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md",
|
|
94
|
+
"p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding]",
|
|
95
|
+
"disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8",
|
|
96
|
+
"aria-disabled:pointer-events-none aria-disabled:opacity-50",
|
|
97
|
+
"data-[active=true]:font-medium",
|
|
98
|
+
"group-data-[collapsible=icon]:size-8!",
|
|
99
|
+
"group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0"
|
|
100
|
+
],
|
|
101
|
+
variants: {
|
|
102
|
+
variant: {
|
|
103
|
+
default: "",
|
|
104
|
+
outline: ""
|
|
105
|
+
},
|
|
106
|
+
color: {
|
|
107
|
+
default: [
|
|
108
|
+
"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
109
|
+
"focus-visible:ring-2",
|
|
110
|
+
"active:bg-sidebar-accent active:text-sidebar-accent-foreground",
|
|
111
|
+
"data-[active=true]:bg-sidebar-accent",
|
|
112
|
+
"data-[active=true]:text-sidebar-accent-foreground",
|
|
113
|
+
"data-[state=open]:hover:bg-sidebar-accent",
|
|
114
|
+
"data-[state=open]:hover:text-sidebar-accent-foreground "
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
size: {
|
|
118
|
+
sm: "h-7 text-xs",
|
|
119
|
+
md: "h-8 text-sm",
|
|
120
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
defaultVariants: {
|
|
124
|
+
color: "default",
|
|
125
|
+
variant: "default",
|
|
126
|
+
size: "md"
|
|
127
|
+
},
|
|
128
|
+
compoundVariants: [
|
|
129
|
+
{
|
|
130
|
+
variant: "default",
|
|
131
|
+
color: "default",
|
|
132
|
+
class: ["hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
variant: "outline",
|
|
136
|
+
color: "default",
|
|
137
|
+
class: [
|
|
138
|
+
"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
});
|
|
143
|
+
var sidebarMenuAction = tv({
|
|
144
|
+
base: [
|
|
145
|
+
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
146
|
+
// Increases the hit area of the button on mobile.
|
|
147
|
+
"after:absolute after:-inset-2 md:after:hidden",
|
|
148
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
149
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
150
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
151
|
+
"group-data-[collapsible=icon]:hidden"
|
|
152
|
+
],
|
|
153
|
+
variants: {
|
|
154
|
+
showOnHover: {
|
|
155
|
+
true: [
|
|
156
|
+
"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
export {
|
|
163
|
+
sidebar,
|
|
164
|
+
sidebarMenuButton,
|
|
165
|
+
sidebarMenuAction
|
|
166
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/components/tabs.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var tabs = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "flex flex-col gap-2",
|
|
6
|
+
list: [
|
|
7
|
+
"bg-muted text-muted-foreground",
|
|
8
|
+
"inline-flex flex-col md:flex-row",
|
|
9
|
+
"w-full md:w-fit items-center justify-center rounded-lg p-[3px]"
|
|
10
|
+
],
|
|
11
|
+
trigger: [
|
|
12
|
+
"inline-flex flex-1 items-center justify-center gap-1.5 rounded-md",
|
|
13
|
+
" border border-transparent",
|
|
14
|
+
"data-[state=active]:bg-background",
|
|
15
|
+
"dark:data-[state=active]:text-foreground",
|
|
16
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring",
|
|
17
|
+
"dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30",
|
|
18
|
+
"text-foreground dark:text-muted-foreground",
|
|
19
|
+
"h-[calc(100%-1px)] whitespace-nowrap transition-[color,box-shadow]",
|
|
20
|
+
"focus-visible:ring-[3px] focus-visible:outline-1",
|
|
21
|
+
"disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",
|
|
22
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
23
|
+
],
|
|
24
|
+
content: ["flex-1 outline-none"]
|
|
25
|
+
},
|
|
26
|
+
variants: {
|
|
27
|
+
size: {
|
|
28
|
+
md: {
|
|
29
|
+
list: "md:h-9",
|
|
30
|
+
trigger: "px-2 py-1 text-sm font-medium max-md:w-full"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
size: "md"
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
tabs
|
|
41
|
+
};
|
|
@@ -52,13 +52,15 @@ var drawer = tv({
|
|
|
52
52
|
content: "max-w-6xl"
|
|
53
53
|
},
|
|
54
54
|
full: {
|
|
55
|
-
content: "max-w-full max-h-full h-[calc(100dvh_-_1rem)] inset-2"
|
|
55
|
+
content: "max-w-full max-h-full h-[calc(100dvh_-_1rem)] !inset-2"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
placement: {
|
|
59
59
|
top: {},
|
|
60
60
|
bottom: {},
|
|
61
|
-
left: {
|
|
61
|
+
left: {
|
|
62
|
+
content: "inset-y-2 ms-2 left-0 border-r h-[calc(100dvh_-_1rem)]"
|
|
63
|
+
},
|
|
62
64
|
right: {
|
|
63
65
|
content: "inset-y-2 me-2 right-0 h-[calc(100%-1rem)] border-l"
|
|
64
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/utils/variants.ts
|
|
2
2
|
var solid = {
|
|
3
|
-
default: "bg-accent text-accent-foreground",
|
|
3
|
+
default: "bg-accent/70 text-accent-foreground",
|
|
4
4
|
primary: "bg-primary text-primary-foreground",
|
|
5
5
|
secondary: "bg-secondary text-secondary-foreground",
|
|
6
6
|
destructive: "bg-destructive text-destructive-foreground",
|
|
@@ -34,7 +34,7 @@ var faded = {
|
|
|
34
34
|
foreground: "border-default bg-accent/30 text-foreground"
|
|
35
35
|
};
|
|
36
36
|
var ghost = {
|
|
37
|
-
primary: "bg-transparent text-primary",
|
|
37
|
+
primary: "bg-transparent text-primary dark:text-primary-foreground",
|
|
38
38
|
secondary: "bg-transparent text-secondary",
|
|
39
39
|
destructive: "bg-transparent text-destructive",
|
|
40
40
|
warning: "bg-transparent text-warning",
|
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
3
|
var table = tv({
|
|
4
4
|
slots: {
|
|
5
|
+
container: ["overflow-x-auto whitespace-nowrap", "-mx-3 md:-mx-6"],
|
|
6
|
+
wrapper: ["inline-block min-w-full align-middle"],
|
|
5
7
|
table: "min-w-full h-auto",
|
|
6
8
|
thead: "",
|
|
7
9
|
tbody: "after:block divide-y",
|
|
8
10
|
tr: [
|
|
9
11
|
"group/tr outline-hidden",
|
|
10
|
-
"[&
|
|
11
|
-
"[&
|
|
12
|
+
"[&_th:last-child]:pr-4",
|
|
13
|
+
"[&_th:first-child]:pl-4"
|
|
12
14
|
],
|
|
13
15
|
th: [
|
|
14
16
|
"group/th px-3 py-3.5 text-start text-xs font-semibold whitespace-normal",
|
|
15
17
|
"text-foreground border-b"
|
|
16
18
|
],
|
|
17
19
|
td: [
|
|
20
|
+
"first:pl-3 last:pr-3",
|
|
21
|
+
"md:first:pl-6 md:last:pr-6",
|
|
18
22
|
"py-2 px-3 text-xs font-normal whitespace-normal relative",
|
|
19
23
|
"[&>*]:z-[1]",
|
|
20
24
|
"[&>*]:relative",
|
|
@@ -36,15 +40,50 @@ var table = tv({
|
|
|
36
40
|
"before:w-0.5",
|
|
37
41
|
"before:opacity-0",
|
|
38
42
|
"group-aria-[selected=true]/tr:first:before:opacity-100"
|
|
39
|
-
]
|
|
43
|
+
],
|
|
44
|
+
ownerCell: [
|
|
45
|
+
"min-h-[50px]",
|
|
46
|
+
"inline-flex items-center justify-center gap-2"
|
|
47
|
+
],
|
|
48
|
+
ownerCellAvatar: [],
|
|
49
|
+
ownerCelltextWrapper: "inline-flex flex-col items-start",
|
|
50
|
+
ownerCellName: "text-xs font-medium",
|
|
51
|
+
ownerCellDescription: "text-[11px] text-muted-foreground truncate",
|
|
52
|
+
ownerCellUnassigned: "text-xs italic text-muted-foreground"
|
|
40
53
|
},
|
|
41
54
|
variants: {
|
|
55
|
+
bleed: {
|
|
56
|
+
true: {},
|
|
57
|
+
false: {
|
|
58
|
+
container: ["px-3 md:px-6"],
|
|
59
|
+
th: ["first:pl-1 last:pr-1"],
|
|
60
|
+
td: ["first:pl-1 last:pr-1"]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
42
63
|
overscroll: {
|
|
43
64
|
horizontal: {
|
|
44
65
|
th: "whitespace-nowrap",
|
|
45
66
|
td: "whitespace-nowrap"
|
|
46
67
|
}
|
|
47
68
|
},
|
|
69
|
+
variant: {
|
|
70
|
+
default: {},
|
|
71
|
+
// a border between cells and above the table
|
|
72
|
+
// this is used for the grid variant
|
|
73
|
+
grid: {
|
|
74
|
+
table: "border-separate border-spacing-0",
|
|
75
|
+
th: [
|
|
76
|
+
"border-l first:border-l-0 border-b",
|
|
77
|
+
"first:pl-3 md:first:pl-6 last:pr-3 md:last:pr-6"
|
|
78
|
+
],
|
|
79
|
+
td: [
|
|
80
|
+
"border-l first:border-l-0",
|
|
81
|
+
"border-b",
|
|
82
|
+
// first cell has no border
|
|
83
|
+
"[&_td:first-child]:border-l-0 [&_th:first-child]:border-l-0"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
48
87
|
color: {
|
|
49
88
|
default: {
|
|
50
89
|
td: [
|
|
@@ -109,8 +148,10 @@ var table = tv({
|
|
|
109
148
|
}
|
|
110
149
|
},
|
|
111
150
|
defaultVariants: {
|
|
151
|
+
variant: "default",
|
|
112
152
|
layout: "auto",
|
|
113
153
|
color: "default",
|
|
154
|
+
bleed: false,
|
|
114
155
|
fullWidth: true
|
|
115
156
|
}
|
|
116
157
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/components/section-row.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var sectionRow = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: ["section-row items-start"],
|
|
6
|
+
title: "section-row__title text-muted-foreground text-sm font-semibold",
|
|
7
|
+
valueText: "whitespace-pre-line text-pretty text-sm",
|
|
8
|
+
valueContainer: "section-row__value-container flex flex-wrap gap-1",
|
|
9
|
+
action: "section-row__action"
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
hasActions: {
|
|
13
|
+
true: {
|
|
14
|
+
root: [
|
|
15
|
+
"has-actions"
|
|
16
|
+
//"md:grid-cols-[min(40%,--spacing(80))_auto_28px]",
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
false: {}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
hasActions: false
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
sectionRow
|
|
29
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// src/components/risk-badge.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var riskBadge = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: ["inline-flex flex-col items-start gap-0.5"],
|
|
6
|
+
label: ["inline-flex items-center gap-0.5 text-xs"],
|
|
7
|
+
grade: ["font-semibold"],
|
|
8
|
+
level: ["font-medium"],
|
|
9
|
+
dots: ["inline-flex items-center gap-0.5"],
|
|
10
|
+
dot: [
|
|
11
|
+
"inline-block w-1.5 h-1.5 rounded-full",
|
|
12
|
+
"transition-all duration-150 ease-in-out"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
color: {
|
|
17
|
+
default: {
|
|
18
|
+
dot: "bg-gray-200 dark:bg-gray-700"
|
|
19
|
+
},
|
|
20
|
+
success: {
|
|
21
|
+
dot: "bg-success"
|
|
22
|
+
},
|
|
23
|
+
destructive: {
|
|
24
|
+
dot: "bg-destructive"
|
|
25
|
+
},
|
|
26
|
+
warning: {
|
|
27
|
+
dot: "bg-warning"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
dotFilled: {
|
|
31
|
+
true: {
|
|
32
|
+
dot: "opacity-100 scale-110"
|
|
33
|
+
},
|
|
34
|
+
false: {
|
|
35
|
+
dot: "opacity-40 scale-100"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
riskBadge
|
|
43
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/components/separator.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var separator = tv({
|
|
4
|
+
base: "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
5
|
+
variants: {
|
|
6
|
+
orientation: {
|
|
7
|
+
vertical: "",
|
|
8
|
+
horizontal: ""
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
compoundVariants: []
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
separator
|
|
16
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// src/components/preview-card.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var previewCard = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: [
|
|
6
|
+
"flex w-full items-start gap-3 rounded-md bg-background p-2 transition-colors",
|
|
7
|
+
"transition-all group min-h-10",
|
|
8
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"
|
|
9
|
+
],
|
|
10
|
+
icon: ["flex-shrink-0 text-muted-foreground"],
|
|
11
|
+
content: ["flex min-w-0 flex-1 flex-col justify-center"],
|
|
12
|
+
title: ["truncate text-xs font-medium text-foreground"],
|
|
13
|
+
description: ["truncate text-[10px] text-muted-foreground line-clamp-1"],
|
|
14
|
+
action: ["shrink-0 rounded-full [&_svg]:size-4"],
|
|
15
|
+
tags: ["mt-1.5 flex items-center gap-2"]
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
size: {
|
|
19
|
+
md: {
|
|
20
|
+
icon: "[&__svg]:size-5"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
isBordered: {
|
|
24
|
+
true: {
|
|
25
|
+
root: ["border"]
|
|
26
|
+
},
|
|
27
|
+
false: {}
|
|
28
|
+
},
|
|
29
|
+
isHoverable: {
|
|
30
|
+
true: {
|
|
31
|
+
root: "hover:bg-muted/50 hover:border-primary",
|
|
32
|
+
title: "group-hover:text-primary"
|
|
33
|
+
},
|
|
34
|
+
false: {}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
size: "md",
|
|
39
|
+
isBordered: true
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
previewCard
|
|
45
|
+
};
|