@kopexa/theme 17.1.2 → 17.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.
@@ -0,0 +1,69 @@
1
+ // src/components/preview-card.ts
2
+ import { tv } from "tailwind-variants";
3
+ var previewCard = tv({
4
+ slots: {
5
+ root: [
6
+ "grid w-full grid-cols-[auto_1fr_auto] items-center gap-y-1.5 rounded-md bg-background p-2",
7
+ "transition-all group min-h-10 cursor-pointer",
8
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"
9
+ ],
10
+ icon: ["row-start-1 col-start-1 mr-3 text-muted-foreground"],
11
+ content: ["row-start-1 col-start-2 flex min-w-0 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: ["row-start-1 col-start-3 ml-3 rounded-full [&_svg]:size-4"],
15
+ tags: ["col-start-2 flex items-center gap-2"]
16
+ },
17
+ variants: {
18
+ size: {
19
+ md: {
20
+ icon: "[&__svg]:size-5"
21
+ }
22
+ },
23
+ border: {
24
+ all: {
25
+ root: ["border"]
26
+ },
27
+ bottom: {
28
+ root: ["border-b rounded-none"]
29
+ },
30
+ none: {}
31
+ },
32
+ hoverBorder: {
33
+ true: {
34
+ root: "hover:border-primary"
35
+ },
36
+ false: {}
37
+ },
38
+ hoverBg: {
39
+ true: {
40
+ root: "hover:bg-muted/50"
41
+ },
42
+ false: {}
43
+ },
44
+ hoverTitle: {
45
+ true: {
46
+ title: "group-hover:underline"
47
+ },
48
+ false: {}
49
+ },
50
+ showAction: {
51
+ hover: {
52
+ action: "opacity-0 group-hover:opacity-100 transition-opacity"
53
+ },
54
+ always: {}
55
+ }
56
+ },
57
+ defaultVariants: {
58
+ size: "md",
59
+ border: "all",
60
+ hoverBorder: true,
61
+ hoverBg: true,
62
+ hoverTitle: false,
63
+ showAction: "hover"
64
+ }
65
+ });
66
+
67
+ export {
68
+ previewCard
69
+ };
@@ -3,23 +3,22 @@ import { tv } from "tailwind-variants";
3
3
  var card = tv({
4
4
  slots: {
5
5
  root: [
6
- "flex flex-col relative h-auto outline-hidden box-border",
6
+ "flex flex-col relative h-auto outline-hidden box-border overflow-hidden",
7
7
  "transition-colors duration-200"
8
8
  ],
9
9
  header: [
10
10
  "flex",
11
- "items-center",
11
+ "items-start",
12
12
  "justify-between",
13
- "flex-wrap",
14
- "min-h-14",
15
- "gap-2.5",
16
13
  "w-full",
17
14
  "shrink-0",
18
15
  "overflow-inherit",
19
16
  "color-inherit",
20
17
  "subpixel-antialiased"
21
18
  ],
22
- heading: "space-y-1",
19
+ heading: "space-y-0.5 min-w-0",
20
+ title: "font-semibold truncate",
21
+ subtitle: "text-sm text-muted-foreground line-clamp-2",
23
22
  toolbar: "flex items-center gap-2.5",
24
23
  body: [
25
24
  "grow",
@@ -38,7 +37,6 @@ var card = tv({
38
37
  "subpixel-antialiased"
39
38
  ],
40
39
  footer: [
41
- "p-3",
42
40
  "h-auto",
43
41
  "flex",
44
42
  "w-full",
@@ -59,12 +57,12 @@ var card = tv({
59
57
  accent: {
60
58
  root: "bg-muted shadow-xs p-1",
61
59
  header: "!border-none",
62
- body: "bg-card rounded-t-xl [&:last-child]:rounded-b-xl"
60
+ body: "bg-card"
63
61
  },
64
62
  destructive: {
65
- root: "bg-destructive/10",
63
+ root: "bg-destructive/10 p-1",
66
64
  header: "!border-none",
67
- body: "bg-card rounded-t-xl [&:last-child]:rounded-b-xl"
65
+ body: "bg-card"
68
66
  }
69
67
  },
70
68
  shadow: {
@@ -95,6 +93,11 @@ var card = tv({
95
93
  emphasized: {
96
94
  root: "border-2 border-border",
97
95
  header: "border-b border-border"
96
+ },
97
+ divider: {
98
+ root: "border-0",
99
+ header: "border-b border-border",
100
+ footer: "border-t border-border"
98
101
  }
99
102
  },
100
103
  radius: {
@@ -146,48 +149,42 @@ var card = tv({
146
149
  }
147
150
  },
148
151
  bleed: {
149
- none: {},
150
- sm: {
151
- body: "px-2",
152
- header: "px-2",
153
- footer: "px-2"
152
+ none: {
153
+ body: "px-4",
154
+ header: "px-4",
155
+ footer: "px-4"
154
156
  },
155
- md: {
157
+ content: {
156
158
  body: "px-0",
157
- header: "px-0",
158
- footer: "px-0"
159
- },
160
- lg: {
161
- body: "-mx-2",
162
- header: "-mx-2",
163
- footer: "-mx-2"
159
+ header: "px-4",
160
+ footer: "px-4"
164
161
  },
165
- content: {
162
+ full: {
166
163
  body: "px-0",
167
- header: "px-3",
168
- footer: "px-3"
164
+ header: "px-0",
165
+ footer: "px-0"
169
166
  }
170
167
  },
171
168
  spacing: {
172
169
  sm: {
173
- body: "p-2",
174
- header: "p-2",
175
- footer: "p-2"
170
+ body: "py-2",
171
+ header: "py-2 gap-2",
172
+ footer: "py-2"
176
173
  },
177
174
  md: {
178
- body: "p-5",
179
- header: "px-5",
180
- footer: "px-5"
175
+ body: "py-4",
176
+ header: "py-4 gap-3",
177
+ footer: "py-4"
181
178
  },
182
179
  lg: {
183
- body: "p-4",
184
- header: "p-4",
185
- footer: "p-4"
180
+ body: "py-5",
181
+ header: "py-5 gap-4",
182
+ footer: "py-5"
186
183
  },
187
184
  xl: {
188
- body: "p-6",
189
- header: "p-6",
190
- footer: "p-6"
185
+ body: "py-6",
186
+ header: "py-6 gap-5",
187
+ footer: "py-6"
191
188
  }
192
189
  }
193
190
  },
@@ -0,0 +1,75 @@
1
+ // src/components/section-row.ts
2
+ import { tv } from "tailwind-variants";
3
+ var sectionRow = tv({
4
+ slots: {
5
+ root: ["grid grid-cols-1 text-base/6 sm:text-sm/6", "w-full"],
6
+ title: [
7
+ "col-start-1 text-muted-foreground text-sm font-medium",
8
+ "flex flex-row items-center gap-1.5",
9
+ "shrink-0"
10
+ ],
11
+ icon: "shrink-0 text-muted-foreground [&>svg]:size-4",
12
+ infoTip: ["min-w-64 w-auto max-w-96 p-2"],
13
+ valueText: "whitespace-pre-line text-pretty text-sm",
14
+ valueContainer: ["flex flex-row items-start gap-1", "grow min-w-0"],
15
+ action: "shrink-0"
16
+ },
17
+ variants: {
18
+ orientation: {
19
+ horizontal: {
20
+ root: "grid-cols-[min(33%,theme(spacing.48))_1fr_auto]"
21
+ },
22
+ vertical: {
23
+ root: "grid-cols-[1fr_auto] items-center",
24
+ valueContainer: "col-span-full items-start",
25
+ action: "row-start-1 col-start-2"
26
+ }
27
+ },
28
+ align: {
29
+ start: {
30
+ root: "items-start"
31
+ },
32
+ center: {
33
+ root: "items-center"
34
+ }
35
+ },
36
+ spacing: {
37
+ none: {
38
+ root: "gap-x-3 gap-y-0 py-0"
39
+ },
40
+ tight: {
41
+ root: "gap-x-3 gap-y-0.5 py-1"
42
+ },
43
+ default: {
44
+ root: "gap-x-3 gap-y-1 py-2"
45
+ },
46
+ loose: {
47
+ root: "gap-x-3 gap-y-2 py-3"
48
+ }
49
+ },
50
+ hasActions: {
51
+ true: {},
52
+ false: {
53
+ action: "hidden"
54
+ }
55
+ },
56
+ justify: {
57
+ start: {},
58
+ between: {
59
+ root: "justify-between",
60
+ valueContainer: "justify-end text-right"
61
+ }
62
+ }
63
+ },
64
+ defaultVariants: {
65
+ hasActions: false,
66
+ orientation: "horizontal",
67
+ align: "start",
68
+ spacing: "default",
69
+ justify: "start"
70
+ }
71
+ });
72
+
73
+ export {
74
+ sectionRow
75
+ };
@@ -58,20 +58,22 @@ var datagrid = tv({
58
58
  table: "border-separate border-spacing-0"
59
59
  }
60
60
  },
61
- headerBackground: {
62
- false: {
61
+ headerColor: {
62
+ default: {
63
63
  headerRow: "bg-transparent"
64
64
  },
65
- true: {
65
+ muted: {
66
66
  headerRow: "bg-muted/40"
67
+ },
68
+ primary: {
69
+ headerRow: "bg-primary/10"
70
+ },
71
+ accent: {
72
+ headerRow: "bg-accent"
67
73
  }
68
74
  },
69
75
  stripped: {
70
- true: {
71
- headerRow: "bg-transparent",
72
- bodyRowSkeleton: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted",
73
- bodyRow: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted"
74
- }
76
+ true: {}
75
77
  },
76
78
  width: {
77
79
  fixed: {
@@ -96,7 +98,9 @@ var datagrid = tv({
96
98
  },
97
99
  columnsPinnable: {
98
100
  true: {
99
- headerRowCell: "[&: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"
101
+ headerRowCell: "[&: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-background",
102
+ bodyRowCell: "[&[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",
103
+ bodyRowSkeletonCell: "[&[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"
100
104
  },
101
105
  false: {}
102
106
  },
@@ -117,6 +121,71 @@ var datagrid = tv({
117
121
  bodyRowSkeleton: "border-b border-border [&:not(:last-child)>td]:border-b",
118
122
  bodyRow: "border-b border-border [&:not(:last-child)>td]:border-b"
119
123
  }
124
+ },
125
+ // stripped + headerColor default: odd rows are muted (first data row is muted)
126
+ {
127
+ stripped: true,
128
+ headerColor: "default",
129
+ className: {
130
+ bodyRowSkeleton: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted",
131
+ bodyRow: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted"
132
+ }
133
+ },
134
+ // stripped + headerColor muted: even rows are muted (header counts as first, so first data row is not muted)
135
+ {
136
+ stripped: true,
137
+ headerColor: "muted",
138
+ className: {
139
+ bodyRowSkeleton: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted",
140
+ bodyRow: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted"
141
+ }
142
+ },
143
+ // stripped + headerColor primary: even rows are muted
144
+ {
145
+ stripped: true,
146
+ headerColor: "primary",
147
+ className: {
148
+ bodyRowSkeleton: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted",
149
+ bodyRow: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted"
150
+ }
151
+ },
152
+ // stripped + headerColor accent: even rows are muted
153
+ {
154
+ stripped: true,
155
+ headerColor: "accent",
156
+ className: {
157
+ bodyRowSkeleton: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted",
158
+ bodyRow: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted"
159
+ }
160
+ },
161
+ // columnsPinnable + headerColor: pinned header cells need matching background
162
+ {
163
+ columnsPinnable: true,
164
+ headerColor: "default",
165
+ className: {
166
+ headerRowCell: "data-pinned:bg-transparent!"
167
+ }
168
+ },
169
+ {
170
+ columnsPinnable: true,
171
+ headerColor: "muted",
172
+ className: {
173
+ headerRowCell: "data-pinned:bg-muted/40!"
174
+ }
175
+ },
176
+ {
177
+ columnsPinnable: true,
178
+ headerColor: "primary",
179
+ className: {
180
+ headerRowCell: "data-pinned:bg-primary/10!"
181
+ }
182
+ },
183
+ {
184
+ columnsPinnable: true,
185
+ headerColor: "accent",
186
+ className: {
187
+ headerRowCell: "data-pinned:bg-accent!"
188
+ }
120
189
  }
121
190
  ],
122
191
  defaultVariants: {
@@ -125,7 +194,7 @@ var datagrid = tv({
125
194
  width: "fixed",
126
195
  headerSticky: false,
127
196
  headerBorder: true,
128
- headerBackground: true,
197
+ headerColor: "muted",
129
198
  cellBorder: false,
130
199
  stripped: false,
131
200
  columnsPinnable: false,
@@ -49,6 +49,11 @@ declare const card: tailwind_variants.TVReturnType<{
49
49
  root: string;
50
50
  header: string;
51
51
  };
52
+ divider: {
53
+ root: string;
54
+ header: string;
55
+ footer: string;
56
+ };
52
57
  };
53
58
  radius: {
54
59
  none: {
@@ -98,23 +103,17 @@ declare const card: tailwind_variants.TVReturnType<{
98
103
  };
99
104
  };
100
105
  bleed: {
101
- none: {};
102
- sm: {
103
- body: string;
104
- header: string;
105
- footer: string;
106
- };
107
- md: {
106
+ none: {
108
107
  body: string;
109
108
  header: string;
110
109
  footer: string;
111
110
  };
112
- lg: {
111
+ content: {
113
112
  body: string;
114
113
  header: string;
115
114
  footer: string;
116
115
  };
117
- content: {
116
+ full: {
118
117
  body: string;
119
118
  header: string;
120
119
  footer: string;
@@ -146,6 +145,8 @@ declare const card: tailwind_variants.TVReturnType<{
146
145
  root: string[];
147
146
  header: string[];
148
147
  heading: string;
148
+ title: string;
149
+ subtitle: string;
149
150
  toolbar: string;
150
151
  body: string[];
151
152
  footer: string[];
@@ -197,6 +198,11 @@ declare const card: tailwind_variants.TVReturnType<{
197
198
  root: string;
198
199
  header: string;
199
200
  };
201
+ divider: {
202
+ root: string;
203
+ header: string;
204
+ footer: string;
205
+ };
200
206
  };
201
207
  radius: {
202
208
  none: {
@@ -246,23 +252,17 @@ declare const card: tailwind_variants.TVReturnType<{
246
252
  };
247
253
  };
248
254
  bleed: {
249
- none: {};
250
- sm: {
251
- body: string;
252
- header: string;
253
- footer: string;
254
- };
255
- md: {
255
+ none: {
256
256
  body: string;
257
257
  header: string;
258
258
  footer: string;
259
259
  };
260
- lg: {
260
+ content: {
261
261
  body: string;
262
262
  header: string;
263
263
  footer: string;
264
264
  };
265
- content: {
265
+ full: {
266
266
  body: string;
267
267
  header: string;
268
268
  footer: string;
@@ -294,6 +294,8 @@ declare const card: tailwind_variants.TVReturnType<{
294
294
  root: string[];
295
295
  header: string[];
296
296
  heading: string;
297
+ title: string;
298
+ subtitle: string;
297
299
  toolbar: string;
298
300
  body: string[];
299
301
  footer: string[];
@@ -345,6 +347,11 @@ declare const card: tailwind_variants.TVReturnType<{
345
347
  root: string;
346
348
  header: string;
347
349
  };
350
+ divider: {
351
+ root: string;
352
+ header: string;
353
+ footer: string;
354
+ };
348
355
  };
349
356
  radius: {
350
357
  none: {
@@ -394,23 +401,17 @@ declare const card: tailwind_variants.TVReturnType<{
394
401
  };
395
402
  };
396
403
  bleed: {
397
- none: {};
398
- sm: {
399
- body: string;
400
- header: string;
401
- footer: string;
402
- };
403
- md: {
404
+ none: {
404
405
  body: string;
405
406
  header: string;
406
407
  footer: string;
407
408
  };
408
- lg: {
409
+ content: {
409
410
  body: string;
410
411
  header: string;
411
412
  footer: string;
412
413
  };
413
- content: {
414
+ full: {
414
415
  body: string;
415
416
  header: string;
416
417
  footer: string;
@@ -442,6 +443,8 @@ declare const card: tailwind_variants.TVReturnType<{
442
443
  root: string[];
443
444
  header: string[];
444
445
  heading: string;
446
+ title: string;
447
+ subtitle: string;
445
448
  toolbar: string;
446
449
  body: string[];
447
450
  footer: string[];
@@ -49,6 +49,11 @@ declare const card: tailwind_variants.TVReturnType<{
49
49
  root: string;
50
50
  header: string;
51
51
  };
52
+ divider: {
53
+ root: string;
54
+ header: string;
55
+ footer: string;
56
+ };
52
57
  };
53
58
  radius: {
54
59
  none: {
@@ -98,23 +103,17 @@ declare const card: tailwind_variants.TVReturnType<{
98
103
  };
99
104
  };
100
105
  bleed: {
101
- none: {};
102
- sm: {
103
- body: string;
104
- header: string;
105
- footer: string;
106
- };
107
- md: {
106
+ none: {
108
107
  body: string;
109
108
  header: string;
110
109
  footer: string;
111
110
  };
112
- lg: {
111
+ content: {
113
112
  body: string;
114
113
  header: string;
115
114
  footer: string;
116
115
  };
117
- content: {
116
+ full: {
118
117
  body: string;
119
118
  header: string;
120
119
  footer: string;
@@ -146,6 +145,8 @@ declare const card: tailwind_variants.TVReturnType<{
146
145
  root: string[];
147
146
  header: string[];
148
147
  heading: string;
148
+ title: string;
149
+ subtitle: string;
149
150
  toolbar: string;
150
151
  body: string[];
151
152
  footer: string[];
@@ -197,6 +198,11 @@ declare const card: tailwind_variants.TVReturnType<{
197
198
  root: string;
198
199
  header: string;
199
200
  };
201
+ divider: {
202
+ root: string;
203
+ header: string;
204
+ footer: string;
205
+ };
200
206
  };
201
207
  radius: {
202
208
  none: {
@@ -246,23 +252,17 @@ declare const card: tailwind_variants.TVReturnType<{
246
252
  };
247
253
  };
248
254
  bleed: {
249
- none: {};
250
- sm: {
251
- body: string;
252
- header: string;
253
- footer: string;
254
- };
255
- md: {
255
+ none: {
256
256
  body: string;
257
257
  header: string;
258
258
  footer: string;
259
259
  };
260
- lg: {
260
+ content: {
261
261
  body: string;
262
262
  header: string;
263
263
  footer: string;
264
264
  };
265
- content: {
265
+ full: {
266
266
  body: string;
267
267
  header: string;
268
268
  footer: string;
@@ -294,6 +294,8 @@ declare const card: tailwind_variants.TVReturnType<{
294
294
  root: string[];
295
295
  header: string[];
296
296
  heading: string;
297
+ title: string;
298
+ subtitle: string;
297
299
  toolbar: string;
298
300
  body: string[];
299
301
  footer: string[];
@@ -345,6 +347,11 @@ declare const card: tailwind_variants.TVReturnType<{
345
347
  root: string;
346
348
  header: string;
347
349
  };
350
+ divider: {
351
+ root: string;
352
+ header: string;
353
+ footer: string;
354
+ };
348
355
  };
349
356
  radius: {
350
357
  none: {
@@ -394,23 +401,17 @@ declare const card: tailwind_variants.TVReturnType<{
394
401
  };
395
402
  };
396
403
  bleed: {
397
- none: {};
398
- sm: {
399
- body: string;
400
- header: string;
401
- footer: string;
402
- };
403
- md: {
404
+ none: {
404
405
  body: string;
405
406
  header: string;
406
407
  footer: string;
407
408
  };
408
- lg: {
409
+ content: {
409
410
  body: string;
410
411
  header: string;
411
412
  footer: string;
412
413
  };
413
- content: {
414
+ full: {
414
415
  body: string;
415
416
  header: string;
416
417
  footer: string;
@@ -442,6 +443,8 @@ declare const card: tailwind_variants.TVReturnType<{
442
443
  root: string[];
443
444
  header: string[];
444
445
  heading: string;
446
+ title: string;
447
+ subtitle: string;
445
448
  toolbar: string;
446
449
  body: string[];
447
450
  footer: string[];