@kopexa/theme 17.1.2 → 17.2.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
+ };
@@ -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,
@@ -42,20 +42,22 @@ declare const datagrid: tailwind_variants.TVReturnType<{
42
42
  table: string;
43
43
  };
44
44
  };
45
- headerBackground: {
46
- false: {
45
+ headerColor: {
46
+ default: {
47
47
  headerRow: string;
48
48
  };
49
- true: {
49
+ muted: {
50
50
  headerRow: string;
51
51
  };
52
- };
53
- stripped: {
54
- true: {
52
+ primary: {
55
53
  headerRow: string;
56
- bodyRowSkeleton: string;
57
- bodyRow: string;
58
54
  };
55
+ accent: {
56
+ headerRow: string;
57
+ };
58
+ };
59
+ stripped: {
60
+ true: {};
59
61
  };
60
62
  width: {
61
63
  fixed: {
@@ -81,6 +83,8 @@ declare const datagrid: tailwind_variants.TVReturnType<{
81
83
  columnsPinnable: {
82
84
  true: {
83
85
  headerRowCell: string;
86
+ bodyRowCell: string;
87
+ bodyRowSkeletonCell: string;
84
88
  };
85
89
  false: {};
86
90
  };
@@ -148,21 +152,23 @@ declare const datagrid: tailwind_variants.TVReturnType<{
148
152
  table: string;
149
153
  };
150
154
  };
151
- headerBackground: {
152
- false: {
155
+ headerColor: {
156
+ default: {
153
157
  headerRow: string;
154
158
  };
155
- true: {
159
+ muted: {
156
160
  headerRow: string;
157
161
  };
158
- };
159
- stripped: {
160
- true: {
162
+ primary: {
163
+ headerRow: string;
164
+ };
165
+ accent: {
161
166
  headerRow: string;
162
- bodyRowSkeleton: string;
163
- bodyRow: string;
164
167
  };
165
168
  };
169
+ stripped: {
170
+ true: {};
171
+ };
166
172
  width: {
167
173
  fixed: {
168
174
  table: string;
@@ -187,6 +193,8 @@ declare const datagrid: tailwind_variants.TVReturnType<{
187
193
  columnsPinnable: {
188
194
  true: {
189
195
  headerRowCell: string;
196
+ bodyRowCell: string;
197
+ bodyRowSkeletonCell: string;
190
198
  };
191
199
  false: {};
192
200
  };
@@ -254,21 +262,23 @@ declare const datagrid: tailwind_variants.TVReturnType<{
254
262
  table: string;
255
263
  };
256
264
  };
257
- headerBackground: {
258
- false: {
265
+ headerColor: {
266
+ default: {
259
267
  headerRow: string;
260
268
  };
261
- true: {
269
+ muted: {
262
270
  headerRow: string;
263
271
  };
264
- };
265
- stripped: {
266
- true: {
272
+ primary: {
273
+ headerRow: string;
274
+ };
275
+ accent: {
267
276
  headerRow: string;
268
- bodyRowSkeleton: string;
269
- bodyRow: string;
270
277
  };
271
278
  };
279
+ stripped: {
280
+ true: {};
281
+ };
272
282
  width: {
273
283
  fixed: {
274
284
  table: string;
@@ -293,6 +303,8 @@ declare const datagrid: tailwind_variants.TVReturnType<{
293
303
  columnsPinnable: {
294
304
  true: {
295
305
  headerRowCell: string;
306
+ bodyRowCell: string;
307
+ bodyRowSkeletonCell: string;
296
308
  };
297
309
  false: {};
298
310
  };
@@ -42,20 +42,22 @@ declare const datagrid: tailwind_variants.TVReturnType<{
42
42
  table: string;
43
43
  };
44
44
  };
45
- headerBackground: {
46
- false: {
45
+ headerColor: {
46
+ default: {
47
47
  headerRow: string;
48
48
  };
49
- true: {
49
+ muted: {
50
50
  headerRow: string;
51
51
  };
52
- };
53
- stripped: {
54
- true: {
52
+ primary: {
55
53
  headerRow: string;
56
- bodyRowSkeleton: string;
57
- bodyRow: string;
58
54
  };
55
+ accent: {
56
+ headerRow: string;
57
+ };
58
+ };
59
+ stripped: {
60
+ true: {};
59
61
  };
60
62
  width: {
61
63
  fixed: {
@@ -81,6 +83,8 @@ declare const datagrid: tailwind_variants.TVReturnType<{
81
83
  columnsPinnable: {
82
84
  true: {
83
85
  headerRowCell: string;
86
+ bodyRowCell: string;
87
+ bodyRowSkeletonCell: string;
84
88
  };
85
89
  false: {};
86
90
  };
@@ -148,21 +152,23 @@ declare const datagrid: tailwind_variants.TVReturnType<{
148
152
  table: string;
149
153
  };
150
154
  };
151
- headerBackground: {
152
- false: {
155
+ headerColor: {
156
+ default: {
153
157
  headerRow: string;
154
158
  };
155
- true: {
159
+ muted: {
156
160
  headerRow: string;
157
161
  };
158
- };
159
- stripped: {
160
- true: {
162
+ primary: {
163
+ headerRow: string;
164
+ };
165
+ accent: {
161
166
  headerRow: string;
162
- bodyRowSkeleton: string;
163
- bodyRow: string;
164
167
  };
165
168
  };
169
+ stripped: {
170
+ true: {};
171
+ };
166
172
  width: {
167
173
  fixed: {
168
174
  table: string;
@@ -187,6 +193,8 @@ declare const datagrid: tailwind_variants.TVReturnType<{
187
193
  columnsPinnable: {
188
194
  true: {
189
195
  headerRowCell: string;
196
+ bodyRowCell: string;
197
+ bodyRowSkeletonCell: string;
190
198
  };
191
199
  false: {};
192
200
  };
@@ -254,21 +262,23 @@ declare const datagrid: tailwind_variants.TVReturnType<{
254
262
  table: string;
255
263
  };
256
264
  };
257
- headerBackground: {
258
- false: {
265
+ headerColor: {
266
+ default: {
259
267
  headerRow: string;
260
268
  };
261
- true: {
269
+ muted: {
262
270
  headerRow: string;
263
271
  };
264
- };
265
- stripped: {
266
- true: {
272
+ primary: {
273
+ headerRow: string;
274
+ };
275
+ accent: {
267
276
  headerRow: string;
268
- bodyRowSkeleton: string;
269
- bodyRow: string;
270
277
  };
271
278
  };
279
+ stripped: {
280
+ true: {};
281
+ };
272
282
  width: {
273
283
  fixed: {
274
284
  table: string;
@@ -293,6 +303,8 @@ declare const datagrid: tailwind_variants.TVReturnType<{
293
303
  columnsPinnable: {
294
304
  true: {
295
305
  headerRowCell: string;
306
+ bodyRowCell: string;
307
+ bodyRowSkeletonCell: string;
296
308
  };
297
309
  false: {};
298
310
  };
@@ -82,20 +82,22 @@ var datagrid = (0, import_tailwind_variants.tv)({
82
82
  table: "border-separate border-spacing-0"
83
83
  }
84
84
  },
85
- headerBackground: {
86
- false: {
85
+ headerColor: {
86
+ default: {
87
87
  headerRow: "bg-transparent"
88
88
  },
89
- true: {
89
+ muted: {
90
90
  headerRow: "bg-muted/40"
91
+ },
92
+ primary: {
93
+ headerRow: "bg-primary/10"
94
+ },
95
+ accent: {
96
+ headerRow: "bg-accent"
91
97
  }
92
98
  },
93
99
  stripped: {
94
- true: {
95
- headerRow: "bg-transparent",
96
- bodyRowSkeleton: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted",
97
- bodyRow: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted"
98
- }
100
+ true: {}
99
101
  },
100
102
  width: {
101
103
  fixed: {
@@ -120,7 +122,9 @@ var datagrid = (0, import_tailwind_variants.tv)({
120
122
  },
121
123
  columnsPinnable: {
122
124
  true: {
123
- 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"
125
+ 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",
126
+ 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",
127
+ 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"
124
128
  },
125
129
  false: {}
126
130
  },
@@ -141,6 +145,71 @@ var datagrid = (0, import_tailwind_variants.tv)({
141
145
  bodyRowSkeleton: "border-b border-border [&:not(:last-child)>td]:border-b",
142
146
  bodyRow: "border-b border-border [&:not(:last-child)>td]:border-b"
143
147
  }
148
+ },
149
+ // stripped + headerColor default: odd rows are muted (first data row is muted)
150
+ {
151
+ stripped: true,
152
+ headerColor: "default",
153
+ className: {
154
+ bodyRowSkeleton: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted",
155
+ bodyRow: "odd:bg-muted/90 hover:bg-transparent odd:hover:bg-muted"
156
+ }
157
+ },
158
+ // stripped + headerColor muted: even rows are muted (header counts as first, so first data row is not muted)
159
+ {
160
+ stripped: true,
161
+ headerColor: "muted",
162
+ className: {
163
+ bodyRowSkeleton: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted",
164
+ bodyRow: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted"
165
+ }
166
+ },
167
+ // stripped + headerColor primary: even rows are muted
168
+ {
169
+ stripped: true,
170
+ headerColor: "primary",
171
+ className: {
172
+ bodyRowSkeleton: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted",
173
+ bodyRow: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted"
174
+ }
175
+ },
176
+ // stripped + headerColor accent: even rows are muted
177
+ {
178
+ stripped: true,
179
+ headerColor: "accent",
180
+ className: {
181
+ bodyRowSkeleton: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted",
182
+ bodyRow: "even:bg-muted/90 hover:bg-transparent even:hover:bg-muted"
183
+ }
184
+ },
185
+ // columnsPinnable + headerColor: pinned header cells need matching background
186
+ {
187
+ columnsPinnable: true,
188
+ headerColor: "default",
189
+ className: {
190
+ headerRowCell: "data-pinned:bg-transparent!"
191
+ }
192
+ },
193
+ {
194
+ columnsPinnable: true,
195
+ headerColor: "muted",
196
+ className: {
197
+ headerRowCell: "data-pinned:bg-muted/40!"
198
+ }
199
+ },
200
+ {
201
+ columnsPinnable: true,
202
+ headerColor: "primary",
203
+ className: {
204
+ headerRowCell: "data-pinned:bg-primary/10!"
205
+ }
206
+ },
207
+ {
208
+ columnsPinnable: true,
209
+ headerColor: "accent",
210
+ className: {
211
+ headerRowCell: "data-pinned:bg-accent!"
212
+ }
144
213
  }
145
214
  ],
146
215
  defaultVariants: {
@@ -149,7 +218,7 @@ var datagrid = (0, import_tailwind_variants.tv)({
149
218
  width: "fixed",
150
219
  headerSticky: false,
151
220
  headerBorder: true,
152
- headerBackground: true,
221
+ headerColor: "muted",
153
222
  cellBorder: false,
154
223
  stripped: false,
155
224
  columnsPinnable: false,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  datagrid
3
- } from "../chunk-45KIKY4A.mjs";
3
+ } from "../chunk-Z5W4E7GM.mjs";
4
4
  export {
5
5
  datagrid
6
6
  };