@bjj/nuxt-layer-shadcn-ui 0.13.6 → 0.14.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.
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
/* Reference: https://www.shadcn-vue.com/themes */
|
|
3
3
|
|
|
4
4
|
:root {
|
|
5
|
-
/* Background
|
|
5
|
+
/* Background elevation axis: page -> card -> overlay, opaque colors.
|
|
6
|
+
In light mode card and overlay are both pure white; elevation is
|
|
7
|
+
expressed by shadows instead of lightness. */
|
|
6
8
|
--background: oklch(0.98 0 0);
|
|
7
9
|
--background-surface: oklch(1 0 0);
|
|
8
|
-
--background-
|
|
9
|
-
|
|
10
|
+
--background-elevated: oklch(1 0 0);
|
|
11
|
+
|
|
12
|
+
/* Background interaction axis: translucent "ink" overlays (black in light
|
|
13
|
+
mode, white in dark mode) that compose on any elevation surface, so
|
|
14
|
+
muted/hover states look consistent on page, card and overlay alike. */
|
|
15
|
+
--background-muted: oklch(0 0 0 / 5%);
|
|
16
|
+
--background-accent: oklch(0 0 0 / 8%);
|
|
10
17
|
|
|
11
18
|
/* Foreground */
|
|
12
19
|
--foreground: oklch(0.145 0 0);
|
|
@@ -17,9 +24,9 @@
|
|
|
17
24
|
--primary: oklch(0.205 0 0);
|
|
18
25
|
--primary-foreground: oklch(0.985 0 0);
|
|
19
26
|
|
|
20
|
-
/* Border */
|
|
21
|
-
--border: oklch(0
|
|
22
|
-
--input: oklch(0
|
|
27
|
+
/* Border: translucent ink like the interaction axis, adapts to the surface beneath */
|
|
28
|
+
--border: oklch(0 0 0 / 10%);
|
|
29
|
+
--input: oklch(0 0 0 / 10%);
|
|
23
30
|
--ring: oklch(0.708 0 0);
|
|
24
31
|
|
|
25
32
|
/* Status */
|
|
@@ -32,12 +39,15 @@
|
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
.dark {
|
|
35
|
-
/* Background
|
|
36
|
-
|
|
37
|
-
--background: oklch(0.
|
|
38
|
-
--background-surface: oklch(0.
|
|
39
|
-
--background-
|
|
40
|
-
|
|
42
|
+
/* Background elevation axis: in dark mode overlay sits above card, card
|
|
43
|
+
above page; steps are kept narrow for a calm ladder */
|
|
44
|
+
--background: oklch(0.145 0 0);
|
|
45
|
+
--background-surface: oklch(0.205 0 0);
|
|
46
|
+
--background-elevated: oklch(0.25 0 0);
|
|
47
|
+
|
|
48
|
+
/* Background interaction axis: white ink in dark mode */
|
|
49
|
+
--background-muted: oklch(1 0 0 / 6%);
|
|
50
|
+
--background-accent: oklch(1 0 0 / 10%);
|
|
41
51
|
|
|
42
52
|
/* Foreground */
|
|
43
53
|
--foreground: oklch(0.985 0 0);
|
|
@@ -49,7 +59,7 @@
|
|
|
49
59
|
--primary-foreground: oklch(0.205 0 0);
|
|
50
60
|
|
|
51
61
|
/* Border */
|
|
52
|
-
--border: oklch(0
|
|
62
|
+
--border: oklch(1 0 0 / 10%);
|
|
53
63
|
--input: oklch(1 0 0 / 15%);
|
|
54
64
|
--ring: oklch(0.439 0 0);
|
|
55
65
|
|
|
@@ -71,7 +81,7 @@
|
|
|
71
81
|
/* Components */
|
|
72
82
|
--color-card: var(--background-surface);
|
|
73
83
|
--color-card-foreground: var(--foreground);
|
|
74
|
-
--color-popover: var(--background-
|
|
84
|
+
--color-popover: var(--background-elevated);
|
|
75
85
|
--color-popover-foreground: var(--foreground);
|
|
76
86
|
|
|
77
87
|
/* Brand */
|
|
@@ -113,4 +123,4 @@
|
|
|
113
123
|
--color-sidebar-accent-foreground: var(--foreground-accent);
|
|
114
124
|
--color-sidebar-border: var(--border);
|
|
115
125
|
--color-sidebar-ring: var(--ring);
|
|
116
|
-
}
|
|
126
|
+
}
|
|
@@ -271,7 +271,7 @@ function buildColumnStyle (column: DataTableColumn): Record<string, string> {
|
|
|
271
271
|
const heightStyle = computed(() => props.height ? { '--data-table-height': props.height } : undefined)
|
|
272
272
|
|
|
273
273
|
// Reusable class fragments
|
|
274
|
-
const headerCellClass = 'h-auto
|
|
274
|
+
const headerCellClass = 'h-auto px-4 py-3 text-xs font-normal text-foreground'
|
|
275
275
|
const headerDividerClass = 'relative after:absolute after:top-1/2 after:right-0 after:h-4 after:w-px after:-translate-y-1/2 after:bg-muted-foreground/25'
|
|
276
276
|
const stickyLeftClass = 'sticky left-0 z-10'
|
|
277
277
|
const emptyCellClass = 'h-0.5 w-2.5 bg-muted-foreground/50 inline-block rounded-full align-middle'
|
|
@@ -293,7 +293,7 @@ defineExpose({
|
|
|
293
293
|
<div
|
|
294
294
|
:class="cn(
|
|
295
295
|
`
|
|
296
|
-
rounded-lg
|
|
296
|
+
data-table-frame rounded-lg px-1 text-foreground @container relative
|
|
297
297
|
overflow-hidden
|
|
298
298
|
`,
|
|
299
299
|
!$slots.footer && 'pb-1',
|
|
@@ -509,7 +509,7 @@ defineExpose({
|
|
|
509
509
|
<TableRow>
|
|
510
510
|
<TableCell
|
|
511
511
|
:colspan="totalColumns"
|
|
512
|
-
class="
|
|
512
|
+
class="p-0!"
|
|
513
513
|
>
|
|
514
514
|
<div :class="footerViewportClass">
|
|
515
515
|
<slot name="footer" />
|
|
@@ -522,6 +522,17 @@ defineExpose({
|
|
|
522
522
|
</template>
|
|
523
523
|
|
|
524
524
|
<style scoped>
|
|
525
|
+
/* Frame, sticky header and sticky footer share one opaque paint: the
|
|
526
|
+
translucent border tint composited over the card surface. They must stay
|
|
527
|
+
opaque so rows scrolling beneath sticky cells can't show through. */
|
|
528
|
+
.data-table-frame,
|
|
529
|
+
.data-table-frame :deep(thead th),
|
|
530
|
+
.data-table-frame :deep(tfoot td) {
|
|
531
|
+
background:
|
|
532
|
+
linear-gradient(var(--color-border), var(--color-border))
|
|
533
|
+
var(--color-card);
|
|
534
|
+
}
|
|
535
|
+
|
|
525
536
|
:deep([data-slot="table-container"]) {
|
|
526
537
|
height: var(--data-table-height, auto);
|
|
527
538
|
}
|
|
@@ -545,16 +556,20 @@ defineExpose({
|
|
|
545
556
|
}
|
|
546
557
|
|
|
547
558
|
:deep(tbody tr) {
|
|
548
|
-
--cell-
|
|
559
|
+
--cell-overlay: transparent;
|
|
549
560
|
}
|
|
550
561
|
|
|
551
562
|
:deep(tbody tr:not([data-virtual-row]):hover),
|
|
552
563
|
:deep(tbody tr[data-state="selected"]) {
|
|
553
|
-
--cell-
|
|
564
|
+
--cell-overlay: var(--color-muted);
|
|
554
565
|
}
|
|
555
566
|
|
|
567
|
+
/* Opaque card base under a translucent state overlay: frozen (sticky) cells
|
|
568
|
+
must fully occlude columns scrolling beneath them. */
|
|
556
569
|
:deep(tbody td) {
|
|
557
|
-
background:
|
|
570
|
+
background:
|
|
571
|
+
linear-gradient(var(--cell-overlay), var(--cell-overlay))
|
|
572
|
+
var(--color-card);
|
|
558
573
|
}
|
|
559
574
|
|
|
560
575
|
:deep(tbody tr:has(+ tr[aria-hidden="true"])) {
|
|
@@ -33,6 +33,7 @@ const mergedListClass = computed(() => cn(props.rounded && 'rounded-full', props
|
|
|
33
33
|
function getTriggerClass (item: TabsItem) {
|
|
34
34
|
const showsOnlyIcon = !!item.icon && (props.iconOnly || !item.title)
|
|
35
35
|
return cn(
|
|
36
|
+
'data-[state=active]:bg-card',
|
|
36
37
|
props.rounded && 'rounded-full',
|
|
37
38
|
showsOnlyIcon && 'px-0 aspect-square flex-none',
|
|
38
39
|
props.triggerClass,
|
|
@@ -175,14 +175,12 @@ const dragAreaBase = `
|
|
|
175
175
|
flex cursor-pointer flex-col items-center justify-center gap-2
|
|
176
176
|
rounded-md border border-dashed bg-muted/40 px-6 py-10
|
|
177
177
|
text-center transition-colors
|
|
178
|
-
dark:bg-muted/20
|
|
179
178
|
`
|
|
180
179
|
|
|
181
180
|
const boxTriggerBase = `
|
|
182
181
|
flex size-24 shrink-0 cursor-pointer flex-col items-center justify-center
|
|
183
182
|
gap-1 rounded-md border border-dashed bg-muted/40 text-xs
|
|
184
183
|
text-muted-foreground transition-colors
|
|
185
|
-
dark:bg-muted/20
|
|
186
184
|
`
|
|
187
185
|
|
|
188
186
|
const disabledClass = 'pointer-events-none cursor-not-allowed opacity-60'
|
|
@@ -215,7 +213,6 @@ const boxTriggerClass = computed(() => makeTriggerClass(
|
|
|
215
213
|
const thumbBase = `
|
|
216
214
|
group/thumb
|
|
217
215
|
relative size-24 shrink-0 overflow-hidden rounded-md border bg-muted/40
|
|
218
|
-
dark:bg-muted/20
|
|
219
216
|
`
|
|
220
217
|
|
|
221
218
|
const rowItemBase = `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bjj/nuxt-layer-shadcn-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Nuxt layer providing shadcn-vue based UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"vue-i18n": "^11",
|
|
43
43
|
"vue-router": "^4 || ^5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "78110189a45b96010d17a058c174867e6feb4c42"
|
|
46
46
|
}
|