mgv-backoffice 1.43.2 → 1.43.3
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<dl class="grid grid-cols-
|
|
2
|
+
<dl class="grid grid-cols-[minmax(0,1fr)] gap-x-6 gap-y-4 text-left" :class="columns === 2 ? 'sm:grid-cols-[repeat(2,minmax(0,1fr))]' : columns === 3 ? 'sm:grid-cols-[repeat(2,minmax(0,1fr))] lg:grid-cols-[repeat(3,minmax(0,1fr))]' : ''">
|
|
3
3
|
<div v-for="item in items" :key="item.label" class="min-w-0">
|
|
4
4
|
<dt class="text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400">{{ item.label }}</dt>
|
|
5
5
|
<dd class="mt-1 break-words text-sm text-slate-900 dark:text-slate-100" :class="item.mono ? 'font-mono' : ''">
|
|
@@ -2,15 +2,19 @@ import { describe, it, expect } from 'vitest'
|
|
|
2
2
|
import { readFileSync, readdirSync, statSync } from 'node:fs'
|
|
3
3
|
import { join } from 'node:path'
|
|
4
4
|
|
|
5
|
-
// Consumers import the lib CSS AFTER their own Tailwind utilities
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
5
|
+
// Consumers import the lib CSS AFTER their own Tailwind utilities, so any
|
|
6
|
+
// grid-cols-N utility a lib source ships lands in that later stylesheet and
|
|
7
|
+
// wins every equal-specificity tie against the consumer's own copy:
|
|
8
|
+
// - a breakpoint-prefixed one overrides the consumer's larger-breakpoint
|
|
9
|
+
// columns (a 7-column stat grid collapses to 2);
|
|
10
|
+
// - an unprefixed one overrides ALL of the consumer's responsive columns
|
|
11
|
+
// (a 3-column grid stacks into 1 at every width).
|
|
12
|
+
// Lib sources must use the arbitrary-value forms instead, e.g.
|
|
13
|
+
// grid-cols-[minmax(0,1fr)] or grid-cols-[repeat(2,minmax(0,1fr))] (behind a
|
|
14
|
+
// breakpoint prefix as needed) — no consumer class collides with those.
|
|
11
15
|
// Test files are excluded from Tailwind's scan (@source not in style.css), so
|
|
12
16
|
// they're skipped here too. No literal class tokens in this file on purpose.
|
|
13
|
-
const PLAIN = new RegExp(String.raw
|
|
17
|
+
const PLAIN = new RegExp(String.raw`(?<![\w-])(?:(?:sm|md|lg|xl|2xl):)?grid-cols-\d+\b`, 'g')
|
|
14
18
|
|
|
15
19
|
function sources(dir: string): string[] {
|
|
16
20
|
return readdirSync(dir).flatMap((f) => {
|
|
@@ -21,7 +25,7 @@ function sources(dir: string): string[] {
|
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
describe('lib sources', () => {
|
|
24
|
-
it('use no plain
|
|
28
|
+
it('use no plain grid-cols-N utilities (prefixed or not)', () => {
|
|
25
29
|
const offenders = sources(join(__dirname, '..')).flatMap((p) =>
|
|
26
30
|
[...readFileSync(p, 'utf8').matchAll(PLAIN)].map((m) => `${p}: ${m[0]}`),
|
|
27
31
|
)
|