@aortl/admin-css 0.8.0 → 0.10.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.
- package/dist/admin.css +75 -2
- package/dist/admin.min.css +1 -1
- package/dist/admin.scoped.css +70 -2
- package/dist/admin.scoped.min.css +11 -3
- package/dist/admin.utilities.css +30825 -0
- package/dist/admin.utilities.min.css +2 -0
- package/package.json +6 -2
- package/src/admin.css +2 -0
- package/src/components/alert.css +5 -1
- package/src/components/badge.css +5 -1
- package/src/components/code-block.css +20 -0
- package/src/components/index.css +2 -0
- package/src/components/stat-card.css +31 -0
- package/src/theme.css +7 -0
- package/src/utilities.css +137 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aortl/admin-css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Pre-built CSS design system. Drop in via <link> and use semantic class names.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"./admin.min.css": "./dist/admin.min.css",
|
|
33
33
|
"./admin.scoped.css": "./dist/admin.scoped.css",
|
|
34
34
|
"./admin.scoped.min.css": "./dist/admin.scoped.min.css",
|
|
35
|
+
"./admin.utilities.css": "./dist/admin.utilities.css",
|
|
36
|
+
"./admin.utilities.min.css": "./dist/admin.utilities.min.css",
|
|
35
37
|
"./src/*": "./src/*"
|
|
36
38
|
},
|
|
37
39
|
"publishConfig": {
|
|
@@ -46,9 +48,11 @@
|
|
|
46
48
|
"vitest": "4.1.6"
|
|
47
49
|
},
|
|
48
50
|
"scripts": {
|
|
49
|
-
"build": "pnpm build:dev && pnpm build:min && pnpm build:scoped",
|
|
51
|
+
"build": "pnpm build:dev && pnpm build:min && pnpm build:utilities && pnpm build:utilities:min && pnpm build:scoped",
|
|
50
52
|
"build:dev": "tailwindcss -i ./src/admin.css -o ./dist/admin.css",
|
|
51
53
|
"build:min": "tailwindcss -i ./src/admin.css -o ./dist/admin.min.css --minify",
|
|
54
|
+
"build:utilities": "tailwindcss -i ./src/utilities.css -o ./dist/admin.utilities.css",
|
|
55
|
+
"build:utilities:min": "tailwindcss -i ./src/utilities.css -o ./dist/admin.utilities.min.css --minify",
|
|
52
56
|
"build:scoped": "node ./scripts/wrap-scoped.mjs",
|
|
53
57
|
"dev": "tailwindcss -i ./src/admin.css -o ./dist/admin.css --watch",
|
|
54
58
|
"test": "vitest run",
|
package/src/admin.css
CHANGED
package/src/components/alert.css
CHANGED
|
@@ -67,9 +67,13 @@
|
|
|
67
67
|
@apply text-success;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
/* Warning title/icon use `text-text` rather than `text-warning`: the warning
|
|
71
|
+
accent is yellow-400 in both modes, which fails AA contrast against the
|
|
72
|
+
muted yellow background in light mode. The muted bg + border still carry
|
|
73
|
+
the warning signal. */
|
|
70
74
|
.alert-warning .alert-title,
|
|
71
75
|
.alert-warning > :is(i, svg):first-child {
|
|
72
|
-
@apply text-
|
|
76
|
+
@apply text-text;
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
.alert-danger .alert-title,
|
package/src/components/badge.css
CHANGED
|
@@ -20,8 +20,12 @@
|
|
|
20
20
|
@apply bg-success-muted text-success border-success-muted;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/* Warning text uses `text-text` rather than `text-warning`: the warning
|
|
24
|
+
accent is yellow-400 in both modes, which fails AA contrast against the
|
|
25
|
+
muted yellow background in light mode. The muted bg + border still carry
|
|
26
|
+
the warning signal. */
|
|
23
27
|
.badge-warning {
|
|
24
|
-
@apply bg-warning-muted text-
|
|
28
|
+
@apply bg-warning-muted text-text border-warning-muted;
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
.badge-danger {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.code-block {
|
|
3
|
+
@apply bg-code-surface text-code-text
|
|
4
|
+
font-mono text-sm
|
|
5
|
+
rounded-lg
|
|
6
|
+
p-3;
|
|
7
|
+
white-space: pre-wrap;
|
|
8
|
+
word-wrap: break-word;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Opt out of wrapping for log-style content where long lines should
|
|
13
|
+
scroll horizontally instead of breaking. Pair with an inline
|
|
14
|
+
`max-height` to clamp vertical growth — `overflow: auto` above
|
|
15
|
+
turns into a scrollbar automatically. */
|
|
16
|
+
.code-block-nowrap {
|
|
17
|
+
white-space: pre;
|
|
18
|
+
word-wrap: normal;
|
|
19
|
+
}
|
|
20
|
+
}
|
package/src/components/index.css
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
@import "./switch.css";
|
|
21
21
|
@import "./select.css";
|
|
22
22
|
@import "./card.css";
|
|
23
|
+
@import "./stat-card.css";
|
|
23
24
|
@import "./dialog.css";
|
|
24
25
|
@import "./field.css";
|
|
25
26
|
@import "./file-input.css";
|
|
@@ -30,3 +31,4 @@
|
|
|
30
31
|
@import "./tabs.css";
|
|
31
32
|
@import "./table.css";
|
|
32
33
|
@import "./tooltip.css";
|
|
34
|
+
@import "./code-block.css";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.stat-card {
|
|
3
|
+
@apply flex flex-col gap-1
|
|
4
|
+
p-4
|
|
5
|
+
bg-surface text-text
|
|
6
|
+
border border-border
|
|
7
|
+
rounded-xl
|
|
8
|
+
shadow-xs;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.stat-card-label {
|
|
12
|
+
@apply flex items-center gap-2 text-sm text-text-muted font-medium;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.stat-card-value {
|
|
16
|
+
@apply text-2xl font-bold tabular-nums leading-tight;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.stat-card-detail {
|
|
20
|
+
@apply text-sm text-text-muted;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Modifiers — mirror `.card`. */
|
|
24
|
+
.stat-card-compact {
|
|
25
|
+
@apply p-3 gap-0.5;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.stat-card-bordered {
|
|
29
|
+
@apply shadow-none border-border-strong;
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/theme.css
CHANGED
|
@@ -211,6 +211,13 @@
|
|
|
211
211
|
--color-border: light-dark(var(--color-base-150), var(--color-base-850));
|
|
212
212
|
--color-border-strong: light-dark(var(--color-base-300), var(--color-base-700));
|
|
213
213
|
|
|
214
|
+
/* Code — neutral surface for <pre>-style output blocks (logs, JSON, LLM
|
|
215
|
+
output). One step darker than `surface-strong` in light mode so the
|
|
216
|
+
block visually carves out from regular chrome; matches `surface-muted`
|
|
217
|
+
depth in dark mode. */
|
|
218
|
+
--color-code-surface: light-dark(var(--color-base-150), var(--color-base-950));
|
|
219
|
+
--color-code-text: light-dark(var(--color-base-800), var(--color-base-200));
|
|
220
|
+
|
|
214
221
|
/* Primary — Flexoki blue */
|
|
215
222
|
--color-primary: light-dark(var(--color-blue-600), var(--color-blue-400));
|
|
216
223
|
--color-primary-hover: light-dark(var(--color-blue-700), var(--color-blue-300));
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
@layer theme, base, components, utilities;
|
|
2
|
+
|
|
3
|
+
@reference "tailwindcss";
|
|
4
|
+
@reference "./theme.css";
|
|
5
|
+
|
|
6
|
+
@import "tailwindcss/utilities.css" layer(utilities);
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Pre-built utility safelist for the no-build `admin.utilities.css` bundle.
|
|
10
|
+
*
|
|
11
|
+
* Curated to keep wire size tight — admin density rarely needs spacing
|
|
12
|
+
* above 32, text sizes above 2xl, or interactive variants on layout
|
|
13
|
+
* primitives. Each `@source inline(...)` is a brace-expanded class set;
|
|
14
|
+
* Tailwind expands the same way bash does (empty branches `{,foo}`
|
|
15
|
+
* include both the no-prefix and prefixed forms).
|
|
16
|
+
*
|
|
17
|
+
* Variant policy per family:
|
|
18
|
+
* - Layout (display, spacing, sizing, grid, ...) → responsive only
|
|
19
|
+
* - Visual (colors, borders, shadow, outline) → interactive only
|
|
20
|
+
* - Typography (weight, leading, ...) → neither
|
|
21
|
+
*
|
|
22
|
+
* Adding a utility: extend the matching line. Adding a new semantic
|
|
23
|
+
* color: update theme.css AND the color lines below.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/* Display, position, visibility — responsive */
|
|
27
|
+
@source inline(
|
|
28
|
+
"{,sm:,md:,lg:,xl:,2xl:}{block,inline-block,inline,flex,inline-flex,grid,inline-grid,contents,table,inline-table,table-row,table-cell,hidden,flow-root,list-item,static,fixed,absolute,relative,sticky,visible,invisible,collapse,sr-only,not-sr-only}"
|
|
29
|
+
);
|
|
30
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}overflow{,-x,-y}-{auto,hidden,visible,scroll,clip}");
|
|
31
|
+
|
|
32
|
+
/* Flex / grid — responsive */
|
|
33
|
+
@source inline(
|
|
34
|
+
"{,sm:,md:,lg:,xl:,2xl:}flex-{row,row-reverse,col,col-reverse,wrap,wrap-reverse,nowrap,1,auto,initial,none}"
|
|
35
|
+
);
|
|
36
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}{grow,grow-0,shrink,shrink-0}");
|
|
37
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}items-{start,end,center,baseline,stretch}");
|
|
38
|
+
@source inline(
|
|
39
|
+
"{,sm:,md:,lg:,xl:,2xl:}justify-{start,end,center,between,around,evenly,stretch}"
|
|
40
|
+
);
|
|
41
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}justify-items-{start,end,center,stretch}");
|
|
42
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}justify-self-{auto,start,end,center,stretch,baseline}");
|
|
43
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}self-{auto,start,end,center,stretch,baseline}");
|
|
44
|
+
@source inline(
|
|
45
|
+
"{,sm:,md:,lg:,xl:,2xl:}place-{items,content,self}-{start,end,center,stretch,between,around,evenly}"
|
|
46
|
+
);
|
|
47
|
+
@source inline(
|
|
48
|
+
"{,sm:,md:,lg:,xl:,2xl:}content-{start,end,center,between,around,evenly,stretch,normal}"
|
|
49
|
+
);
|
|
50
|
+
@source inline(
|
|
51
|
+
"{,sm:,md:,lg:,xl:,2xl:}{grid-cols,grid-rows}-{1,2,3,4,5,6,7,8,9,10,11,12,none,subgrid}"
|
|
52
|
+
);
|
|
53
|
+
@source inline(
|
|
54
|
+
"{,sm:,md:,lg:,xl:,2xl:}{col-span,row-span}-{1,2,3,4,5,6,7,8,9,10,11,12,full,auto}"
|
|
55
|
+
);
|
|
56
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}grid-flow-{row,col,dense,row-dense,col-dense}");
|
|
57
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}{auto-cols,auto-rows}-{auto,min,max,fr}");
|
|
58
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}order-{1,2,3,4,5,6,7,8,9,10,11,12,first,last,none}");
|
|
59
|
+
|
|
60
|
+
/* Spacing (padding, margin, gap) — responsive */
|
|
61
|
+
@source inline(
|
|
62
|
+
"{,sm:,md:,lg:,xl:,2xl:}{p,px,py,pt,pr,pb,pl,ps,pe,m,mx,my,mt,mr,mb,ml,ms,me,gap,gap-x,gap-y}-{0,0.5,1,1.5,2,3,4,6,8,12,16,20,24,32}"
|
|
63
|
+
);
|
|
64
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}{m,mx,my,mt,mr,mb,ml,ms,me}-auto");
|
|
65
|
+
|
|
66
|
+
/* Sizing (w, h, min-w, max-w, min-h, max-h) — responsive */
|
|
67
|
+
@source inline(
|
|
68
|
+
"{,sm:,md:,lg:,xl:,2xl:}{w,h,min-w,max-w,min-h,max-h}-{0,0.5,1,1.5,2,3,4,6,8,12,16,20,24,32,px,auto,full,screen,fit,min,max}"
|
|
69
|
+
);
|
|
70
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}{w,h}-{1/2,1/3,2/3,1/4,2/4,3/4}");
|
|
71
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}max-w-{xs,sm,md,lg,xl,2xl,3xl,4xl,5xl,6xl,7xl,prose,none}");
|
|
72
|
+
|
|
73
|
+
/* Text size + align — responsive */
|
|
74
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}text-{xs,sm,base,lg,xl,2xl}");
|
|
75
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}text-{left,center,right,justify,start,end}");
|
|
76
|
+
|
|
77
|
+
/* Aspect ratio — responsive */
|
|
78
|
+
@source inline("{,sm:,md:,lg:,xl:,2xl:}aspect-{auto,square,video}");
|
|
79
|
+
|
|
80
|
+
/* Translate (x/y only — full transforms intentionally skipped) — responsive */
|
|
81
|
+
@source inline(
|
|
82
|
+
"{,sm:,md:,lg:,xl:,2xl:}translate-{x,y}-{0,0.5,1,1.5,2,3,4,6,8,12,16,20,24,32,1/2,full}"
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
/* Typography (non-size) — no variants */
|
|
86
|
+
@source inline("font-{thin,extralight,light,normal,medium,semibold,bold,extrabold,black}");
|
|
87
|
+
@source inline("font-{sans,mono,serif}");
|
|
88
|
+
@source inline("leading-{none,tight,snug,normal,relaxed,loose,3,4,5,6,7,8,9,10}");
|
|
89
|
+
@source inline("tracking-{tighter,tight,normal,wide,wider,widest}");
|
|
90
|
+
@source inline("text-{wrap,nowrap,balance,pretty}");
|
|
91
|
+
@source inline("{underline,overline,line-through,no-underline,truncate}");
|
|
92
|
+
|
|
93
|
+
/* Borders + rounded — interactive */
|
|
94
|
+
@source inline(
|
|
95
|
+
"{,hover:,focus:,focus-visible:,active:}border{,-x,-y,-t,-r,-b,-l}{,-0,-2,-4,-8}"
|
|
96
|
+
);
|
|
97
|
+
@source inline(
|
|
98
|
+
"{,hover:,focus:,focus-visible:,active:}border-{solid,dashed,dotted,double,hidden,none}"
|
|
99
|
+
);
|
|
100
|
+
@source inline(
|
|
101
|
+
"{,hover:,focus:,focus-visible:,active:}rounded{,-t,-r,-b,-l,-tl,-tr,-br,-bl}{,-none,-sm,-md,-lg,-xl,-2xl,-3xl,-full}"
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
/* Outline + ring — interactive */
|
|
105
|
+
@source inline("{,hover:,focus:,focus-visible:,active:}outline{,-0,-1,-2,-4,-8}");
|
|
106
|
+
@source inline(
|
|
107
|
+
"{,hover:,focus:,focus-visible:,active:}outline-{none,dashed,dotted,double,hidden}"
|
|
108
|
+
);
|
|
109
|
+
@source inline("{,hover:,focus:,focus-visible:,active:}outline-offset-{0,1,2,4,8}");
|
|
110
|
+
@source inline("{,hover:,focus:,focus-visible:,active:}ring{,-0,-1,-2,-4,-8}");
|
|
111
|
+
@source inline("{,hover:,focus:,focus-visible:,active:}ring-inset");
|
|
112
|
+
|
|
113
|
+
/* Shadow — interactive */
|
|
114
|
+
@source inline(
|
|
115
|
+
"{,hover:,focus:,focus-visible:,active:}shadow{,-2xs,-xs,-sm,-md,-lg,-xl,-2xl,-inner,-none}"
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
/* Foundation semantic colors — interactive (kept in sync with theme.css) */
|
|
119
|
+
@source inline(
|
|
120
|
+
"{,hover:,focus:,focus-visible:,active:}{bg,text,border,outline,ring,shadow}-{surface,surface-muted,surface-strong,text,text-muted,border,border-strong}"
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
/* Accent semantic colors — each has base + -hover + -muted + -content (kept in sync with theme.css) */
|
|
124
|
+
@source inline(
|
|
125
|
+
"{,hover:,focus:,focus-visible:,active:}{bg,text,border,outline,ring,shadow}-{primary,system-accent,danger,success,warning,info}{,-hover,-muted,-content}"
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
/* Cursor + opacity — interactive */
|
|
129
|
+
@source inline(
|
|
130
|
+
"{,hover:,focus:,focus-visible:,active:}cursor-{auto,default,pointer,wait,text,move,help,not-allowed,none,progress,grab,grabbing,col-resize,row-resize,zoom-in,zoom-out}"
|
|
131
|
+
);
|
|
132
|
+
@source inline(
|
|
133
|
+
"{,hover:,focus:,focus-visible:,active:}opacity-{0,5,10,15,20,25,30,40,50,60,70,75,80,90,95,100}"
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
/* Z-index — no variants */
|
|
137
|
+
@source inline("z-{0,10,20,30,40,50,auto}");
|