@aortl/admin-css 0.20.1 → 0.21.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aortl/admin-css",
3
- "version": "0.20.1",
3
+ "version": "0.21.0",
4
4
  "description": "Pre-built CSS design system. Drop in via <link> and use semantic class names.",
5
5
  "keywords": [
6
6
  "components",
package/src/admin.css CHANGED
@@ -1,8 +1,6 @@
1
1
  @layer theme, base, components, utilities;
2
2
 
3
- @import "tailwindcss";
4
-
5
- @source "../../admin-react/src/**/*.{ts,tsx}";
3
+ @import "tailwindcss" source(none);
6
4
 
7
5
  @import "./fonts.css";
8
6
  @import "./theme.css";
@@ -43,6 +43,7 @@
43
43
  a background circle so the slide is one background-position. Drawn in
44
44
  both states so an off toggle still reads as a toggle. */
45
45
  .btn:is([aria-pressed], [data-pressed])::before {
46
+ /* Off thumb is paper in both modes — it reads on the border-strong track either way. */
46
47
  --btn-toggle-thumb: var(--color-paper);
47
48
  content: "";
48
49
  flex-shrink: 0;
@@ -64,8 +65,8 @@
64
65
  }
65
66
 
66
67
  .btn:is([aria-pressed="true"], [data-pressed])::before {
67
- /* Thumb is primary-content, not .switch's paper — paper would vanish on
68
- the dark-mode paper track. */
68
+ /* Thumb is primary-content, not paper — paper would vanish on the
69
+ dark-mode paper track. */
69
70
  --btn-toggle-thumb: var(--color-primary-content);
70
71
  background-color: var(--color-primary);
71
72
  background-position: calc(100% - 2px) 50%;
@@ -115,9 +115,10 @@
115
115
  border-bottom-right-radius: inherit;
116
116
  }
117
117
 
118
+ /* ms-auto pins the button to the header's end when there is no title. */
118
119
  .dialog-close {
119
120
  @apply inline-flex items-center justify-center
120
- size-7 shrink-0
121
+ size-7 shrink-0 ms-auto
121
122
  rounded-md text-text-muted
122
123
  bg-transparent
123
124
  hover:bg-surface-strong hover:text-text
@@ -14,7 +14,15 @@
14
14
  @apply text-sm font-medium text-text leading-none;
15
15
  }
16
16
 
17
- .field-label[data-required]::after {
17
+ /* A required control marks only its own field's label. Branch 1: top-level fields; branch 2:
18
+ fields with no required sub-field; a nested field with both needs [data-required]. :where()
19
+ keeps specificity equal to the [data-required] branch, so one host override beats both. */
20
+ .field-label[data-required]:not([data-required="false"], :has(.asteriskField))::after,
21
+ .field:where(
22
+ :has(:required:not(.field .field :required)),
23
+ :has(:required):not(:has(.field :required))
24
+ )
25
+ > .field-label:not([data-required="false"], :has(.asteriskField))::after {
18
26
  content: " *";
19
27
  @apply text-danger;
20
28
  }
@@ -21,13 +21,14 @@
21
21
  @apply opacity-50 cursor-not-allowed;
22
22
  }
23
23
 
24
+ /* Off thumb is paper in both modes — it reads on the border-strong track either way. */
24
25
  .switch-thumb {
25
26
  @apply size-4 rounded-full bg-paper shadow-sm
26
27
  transition-transform duration-150;
27
28
  }
28
29
 
29
30
  .switch[data-checked] .switch-thumb {
30
- @apply translate-x-4;
31
+ @apply translate-x-4 bg-primary-content;
31
32
  }
32
33
 
33
34
  /* Native input variant. */
@@ -39,6 +40,7 @@
39
40
  @apply bg-primary;
40
41
  }
41
42
 
43
+ /* Off thumb is paper in both modes — it reads on the border-strong track either way. */
42
44
  input.switch::before {
43
45
  content: "";
44
46
  @apply size-4 rounded-full bg-paper shadow-sm
@@ -46,7 +48,7 @@
46
48
  }
47
49
 
48
50
  input.switch:checked::before {
49
- @apply translate-x-4;
51
+ @apply translate-x-4 bg-primary-content;
50
52
  }
51
53
 
52
54
  /* Switches are wider than checkboxes/radios, so the label gap is larger. */
package/src/theme.css CHANGED
@@ -6,6 +6,11 @@
6
6
  * (--color-primary) or the palette tone underneath it.
7
7
  */
8
8
 
9
+ /* Tailwind's `container` utility shares container.css's class name and would
10
+ override it in builds that generate utilities (the docs, Tailwind consumers).
11
+ Here because theme.css, unlike components/index.css, is never layer-wrapped. */
12
+ @source not inline("container");
13
+
9
14
  @theme static {
10
15
  /* Wipe Tailwind's default palette — Flexoki is the single source of truth. */
11
16
  --color-*: initial;
package/src/utilities.css CHANGED
@@ -3,7 +3,7 @@
3
3
  @reference "tailwindcss";
4
4
  @reference "./theme.css";
5
5
 
6
- @import "tailwindcss/utilities.css" layer(utilities);
6
+ @import "tailwindcss/utilities.css" layer(utilities) source(none);
7
7
 
8
8
  /*
9
9
  * Pre-built utility safelist for the no-build `admin.utilities.css` bundle,