@aortl/admin-css 0.11.0 → 0.12.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@aortl/admin-css",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
4
4
  "description": "Pre-built CSS design system. Drop in via <link> and use semantic class names.",
5
5
  "keywords": [
6
6
  "components",
@@ -1,7 +1,7 @@
1
1
  @layer components {
2
2
  .card {
3
3
  @apply flex flex-col
4
- bg-surface text-text
4
+ bg-surface-muted text-text
5
5
  border border-border
6
6
  rounded-xl
7
7
  shadow-xs
@@ -45,4 +45,55 @@
45
45
  .card-bordered {
46
46
  @apply shadow-none border-border-strong;
47
47
  }
48
+
49
+ /* Neutral variant — sits flush with the page (`--color-surface`, the same
50
+ fill as `html`/`.app-shell`) instead of the raised `surface-strong` of a
51
+ default card. For de-emphasised or grouped panels that shouldn't pop off
52
+ the background. No accent, no status meaning. */
53
+ .card-muted {
54
+ @apply bg-surface;
55
+ }
56
+
57
+ /* Color variants — tinted surface + matching border, mirroring Alert. The
58
+ title (and any leading icon, via `currentColor`) picks up the accent for
59
+ fast scanning. */
60
+ .card-primary {
61
+ @apply bg-primary-muted border-primary-muted;
62
+ }
63
+
64
+ .card-info {
65
+ @apply bg-info-muted border-info-muted;
66
+ }
67
+
68
+ .card-success {
69
+ @apply bg-success-muted border-success-muted;
70
+ }
71
+
72
+ .card-warning {
73
+ @apply bg-warning-muted border-warning-muted;
74
+ }
75
+
76
+ .card-danger {
77
+ @apply bg-danger-muted border-danger-muted;
78
+ }
79
+
80
+ .card-primary .card-title {
81
+ @apply text-primary;
82
+ }
83
+
84
+ .card-info .card-title {
85
+ @apply text-info;
86
+ }
87
+
88
+ .card-success .card-title {
89
+ @apply text-success;
90
+ }
91
+
92
+ .card-danger .card-title {
93
+ @apply text-danger;
94
+ }
95
+
96
+ /* `card-warning` keeps its title at `text-text`: the warning accent is
97
+ yellow-400 in both modes and fails AA contrast on the muted yellow
98
+ surface. The tinted bg still carries the warning signal. */
48
99
  }
@@ -1,11 +1,13 @@
1
1
  @layer components {
2
+ /* A KPI tile is a `.card` shell with no inner `.card-body` — label / value /
3
+ detail stack directly on the card. Pair `.stat-card` with `.card` in the
4
+ markup so it inherits the surface, border, radius, and shadow, plus every
5
+ card modifier: `.card-bordered`, `.card-compact`, and the color variants
6
+ (`.card-primary`, `.card-muted`, …). `.stat-card` only adds the flat inner
7
+ padding/gap and the inverted hierarchy (the value dominates, the label is a
8
+ small annotation). */
2
9
  .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;
10
+ @apply gap-1 p-4;
9
11
  }
10
12
 
11
13
  .stat-card-label {
@@ -20,12 +22,31 @@
20
22
  @apply text-sm text-text-muted;
21
23
  }
22
24
 
23
- /* Modifiers mirror `.card`. */
24
- .stat-card-compact {
25
+ /* `.card-compact` tightens `.card-body`, but a stat card has no body — apply
26
+ the same padding step to the stat-card root, with a tighter gap to match. */
27
+ .card-compact.stat-card {
25
28
  @apply p-3 gap-0.5;
26
29
  }
27
30
 
28
- .stat-card-bordered {
29
- @apply shadow-none border-border-strong;
31
+ /* Color variants (`.card-primary`, `.card-success`, …) supply the tinted
32
+ surface + border via `.card`. Here we tint the value to the matching accent
33
+ — the headline metric is a stat card's analog of `.card-title`, so a status
34
+ KPI reads its colour at a glance. `warning` is skipped for the same reason
35
+ `.card-warning` skips its title: yellow-400 fails AA on the muted yellow
36
+ surface. The tinted surface still carries the warning signal. */
37
+ .card-primary .stat-card-value {
38
+ @apply text-primary;
39
+ }
40
+
41
+ .card-info .stat-card-value {
42
+ @apply text-info;
43
+ }
44
+
45
+ .card-success .stat-card-value {
46
+ @apply text-success;
47
+ }
48
+
49
+ .card-danger .stat-card-value {
50
+ @apply text-danger;
30
51
  }
31
52
  }
package/src/utilities.css CHANGED
@@ -53,6 +53,9 @@
53
53
  @source inline(
54
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
55
  );
56
+ @source inline(
57
+ "{,sm:,md:,lg:,xl:,2xl:}{col-start,col-end,row-start,row-end}-{1,2,3,4,5,6,7,8,9,10,11,12,13,auto}"
58
+ );
56
59
  @source inline("{,sm:,md:,lg:,xl:,2xl:}grid-flow-{row,col,dense,row-dense,col-dense}");
57
60
  @source inline("{,sm:,md:,lg:,xl:,2xl:}{auto-cols,auto-rows}-{auto,min,max,fr}");
58
61
  @source inline("{,sm:,md:,lg:,xl:,2xl:}order-{1,2,3,4,5,6,7,8,9,10,11,12,first,last,none}");
@@ -116,6 +119,14 @@
116
119
  "{,hover:,focus:,focus-visible:,active:}rounded{,-t,-r,-b,-l,-tl,-tr,-br,-bl}{,-none,-sm,-md,-lg,-xl,-2xl,-3xl,-full}"
117
120
  );
118
121
 
122
+ /* Divide — borders between flex/grid children. Structural separators, so no
123
+ variants (a divider rarely changes on hover or at a breakpoint). Colors are
124
+ the two foundation borders only. */
125
+ @source inline("divide-{x,y}{,-0,-2,-4,-8}");
126
+ @source inline("divide-{x,y}-reverse");
127
+ @source inline("divide-{solid,dashed,dotted,double,none}");
128
+ @source inline("divide-{border,border-strong}");
129
+
119
130
  /* Outline + ring — interactive */
120
131
  @source inline("{,hover:,focus:,focus-visible:,active:}outline{,-0,-1,-2,-4,-8}");
121
132
  @source inline(