@aortl/admin-css 0.20.0 → 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/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.21.0] - 2026-09-25
8
+
9
+ ### Added
10
+
11
+ - `Button` types the HTML invoker attributes `commandfor` and `command`, which `@types/react` doesn't declare yet, so the documented `Dialog` and `Drawer` invoker examples type-check. (react)
12
+ - `systemAccent` on `BrandTile` and `Navbar`, as on `AdminRoot` and `AppShell`: sets `--color-system-accent` inline. (react)
13
+ - `maxWidth` on `Container` sets `--container-max` inline, overriding the `size` preset. (react)
14
+ - `useConfirm()`, a promise-based `window.confirm`: `await confirm({ title, description, confirmLabel, cancelLabel, variant })` resolves `true` on Confirm and `false` on Cancel, Esc, or unmount. `<AdminRoot>` hosts the dialog, a `size="sm"` `Dialog` with no light dismiss that renders only while a confirm is pending, and queues concurrent calls in order. `variant: "danger"` renders a danger confirm button and focuses Cancel. Throws outside `<AdminRoot>`. (react)
15
+ - `variant` and `size` on `Menu.Trigger` style the trigger as a `Button` (`_ao-btn`, square without children), for button-styled and split-button menus. A raw `className="btn"` on the trigger rendered unstyled under the scoped bundle, since the `_ao-` prefix is added only to admin's own classes. (react)
16
+
17
+ ### Changed
18
+
19
+ - The asterisk on a `.field-label` follows the control's own `required` (via `:has()`) when the label is a direct child of the `.field`, so pages whose required controls lacked `[data-required]` now show one: React forms without `<Field required>`, and Django templates without crispy's `.asteriskField` (crispy labels are unchanged). `[data-required]` / `<Field required>` still add it, for controls with no native `required`, a wrapped label, or a nested field holding both its own and a sub-field's required control. `[data-required="false"]`, which `<Field required={false}>` now renders, removes it. (both)
20
+
21
+ ### Fixed
22
+
23
+ - Containers are no longer capped at Tailwind's breakpoint widths. `admin.css` and `admin.scoped.css` shipped Tailwind's `.container` utility, whose later `utilities` layer overrode `max-width` on every `.container` and `<Container>`: the default, `container-sm`/`-lg`/`-fluid`, and per-instance `--container-max`. Container widths change as a result: wider at most viewports, and `90rem` in place of `96rem` at the widest. Tailwind builds that import the source CSS generated the same utility; `theme.css` now excludes it with `@source not inline("container")`, which needs Tailwind v4.1+. (css)
24
+ - The checked `Switch` thumb no longer vanishes in dark mode. It was `paper` on the `primary` track, which is also paper in dark mode; the checked thumb now uses `primary-content`, as `ToggleButton`'s mini switch already did. (css)
25
+
26
+ ### Removed
27
+
28
+ - Stray Tailwind utilities in `admin.css` and `admin.scoped.css`: `.flex`, `.grid`, `.block`, `.inline`, `.hidden`, `.sr-only`, `.relative`, `.absolute`, `.fixed`, `.sticky`, `.flex-1`, `.overflow-hidden`, `.rounded`, `.text-right`, `.tabular-nums` and a few more. The build scanned the repo for class-like strings and emitted whatever matched. Vanilla pages that relied on any of them without `admin.utilities.css` must add that bundle. `Dialog` and `Drawer` headers without a title and `Sidebar.CollapseToggle` used two of them; `.dialog-close` now pins itself to the header end with `margin-inline-start: auto`, and the toggle drops its redundant `sr-only` label (the checkbox keeps its `aria-label`). `admin.utilities.css` also loses `.transform`, which its safelist never included. (both)
29
+
30
+ ## [0.20.1] - 2026-07-30
31
+
32
+ ### Fixed
33
+
34
+ - `Select` and `Tooltip` popups no longer paint behind host chrome. Base UI positions them in a `position: fixed` wrapper with `z-index: auto`, so an `<AdminRoot>` embedded in a page whose own elements carry a positive `z-index` hid its own dropdowns. Both positioners now carry a `.popup-layer` class: `z-index: var(--z-popup, 1000)`. Declare `--z-popup` on `.admin-root` or any ancestor to slot popups into a host's own stacking scale. (both)
35
+
7
36
  ## [0.20.0] - 2026-07-06
8
37
 
9
38
  ### Added
@@ -133,12 +162,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
133
162
  - Make `primary` a high-contrast neutral and move blue to `info`. (both)
134
163
  - Use solid color fills for `Alert` and `Badge` status variants. (both)
135
164
 
136
- [Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.20.0...HEAD
165
+ [Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.21.0...HEAD
137
166
  [0.16.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.16.0...v0.16.1
138
167
  [0.16.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.1...v0.16.0
139
168
  [0.15.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.0...v0.15.1
140
169
  [0.15.0]: https://github.com/Digital-Udvikling/admin-design-system/releases/tag/v0.15.0
141
170
 
171
+ [0.21.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.20.1...v0.21.0
172
+ [0.20.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.20.0...v0.20.1
142
173
  [0.20.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.19.1...v0.20.0
143
174
  [0.19.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.19.0...v0.19.1
144
175
  [0.19.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.5...v0.19.0
package/dist/admin.css CHANGED
@@ -370,109 +370,7 @@
370
370
  display: none !important;
371
371
  }
372
372
  }
373
- @layer utilities {
374
- .collapse {
375
- visibility: collapse;
376
- }
377
- .visible {
378
- visibility: visible;
379
- }
380
- .sr-only {
381
- position: absolute;
382
- width: 1px;
383
- height: 1px;
384
- padding: 0;
385
- margin: -1px;
386
- overflow: hidden;
387
- clip-path: inset(50%);
388
- white-space: nowrap;
389
- border-width: 0;
390
- }
391
- .absolute {
392
- position: absolute;
393
- }
394
- .fixed {
395
- position: fixed;
396
- }
397
- .relative {
398
- position: relative;
399
- }
400
- .sticky {
401
- position: sticky;
402
- }
403
- .container {
404
- width: 100%;
405
- @media (width >= 40rem) {
406
- max-width: 40rem;
407
- }
408
- @media (width >= 48rem) {
409
- max-width: 48rem;
410
- }
411
- @media (width >= 64rem) {
412
- max-width: 64rem;
413
- }
414
- @media (width >= 80rem) {
415
- max-width: 80rem;
416
- }
417
- @media (width >= 96rem) {
418
- max-width: 96rem;
419
- }
420
- }
421
- .my-4 {
422
- margin-block: calc(var(--spacing) * 4);
423
- }
424
- .block {
425
- display: block;
426
- }
427
- .flex {
428
- display: flex;
429
- }
430
- .grid {
431
- display: grid;
432
- }
433
- .hidden {
434
- display: none;
435
- }
436
- .inline {
437
- display: inline;
438
- }
439
- .table {
440
- display: table;
441
- }
442
- .table-cell {
443
- display: table-cell;
444
- }
445
- .flex-1 {
446
- flex: 1;
447
- }
448
- .transform {
449
- transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
450
- }
451
- .overflow-hidden {
452
- overflow: hidden;
453
- }
454
- .rounded {
455
- border-radius: 0.25rem;
456
- }
457
- .rounded-md {
458
- border-radius: var(--radius-md);
459
- }
460
- .text-right {
461
- text-align: right;
462
- }
463
- .tabular-nums {
464
- --tw-numeric-spacing: tabular-nums;
465
- font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
466
- }
467
- .ring {
468
- --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
469
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
470
- }
471
- .outline {
472
- outline-style: var(--tw-outline-style);
473
- outline-width: 1px;
474
- }
475
- }
373
+ @layer utilities;
476
374
  @font-face {
477
375
  font-family: "IBM Plex Sans";
478
376
  font-style: normal;
@@ -2777,6 +2675,7 @@
2777
2675
  .switch[data-checked] .switch-thumb {
2778
2676
  --tw-translate-x: calc(var(--spacing) * 4);
2779
2677
  translate: var(--tw-translate-x) var(--tw-translate-y);
2678
+ background-color: var(--color-primary-content);
2780
2679
  }
2781
2680
  input.switch {
2782
2681
  margin: calc(var(--spacing) * 0);
@@ -2803,6 +2702,7 @@
2803
2702
  input.switch:checked::before {
2804
2703
  --tw-translate-x: calc(var(--spacing) * 4);
2805
2704
  translate: var(--tw-translate-x) var(--tw-translate-y);
2705
+ background-color: var(--color-primary-content);
2806
2706
  }
2807
2707
  label:has(> .switch) {
2808
2708
  display: inline-flex;
@@ -3648,6 +3548,7 @@
3648
3548
  border-bottom-right-radius: inherit;
3649
3549
  }
3650
3550
  .dialog-close {
3551
+ margin-inline-start: auto;
3651
3552
  display: inline-flex;
3652
3553
  width: calc(var(--spacing) * 7);
3653
3554
  height: calc(var(--spacing) * 7);
@@ -3750,6 +3651,11 @@
3750
3651
  }
3751
3652
  }
3752
3653
  }
3654
+ @layer components {
3655
+ .popup-layer {
3656
+ z-index: var(--z-popup, 1000);
3657
+ }
3658
+ }
3753
3659
  @layer components {
3754
3660
  .field {
3755
3661
  display: flex;
@@ -3771,7 +3677,7 @@
3771
3677
  font-weight: var(--font-weight-medium);
3772
3678
  color: var(--color-text);
3773
3679
  }
3774
- .field-label[data-required]::after {
3680
+ .field-label[data-required]:not([data-required="false"], :has(.asteriskField))::after, .field:where( :has(:required:not(.field .field :required)), :has(:required):not(:has(.field :required)) ) > .field-label:not([data-required="false"], :has(.asteriskField))::after {
3775
3681
  content: " *";
3776
3682
  color: var(--color-danger);
3777
3683
  }
@@ -5594,43 +5500,29 @@
5594
5500
  }
5595
5501
  }
5596
5502
  }
5597
- @property --tw-rotate-x {
5598
- syntax: "*";
5599
- inherits: false;
5600
- }
5601
- @property --tw-rotate-y {
5602
- syntax: "*";
5603
- inherits: false;
5604
- }
5605
- @property --tw-rotate-z {
5606
- syntax: "*";
5607
- inherits: false;
5608
- }
5609
- @property --tw-skew-x {
5610
- syntax: "*";
5611
- inherits: false;
5612
- }
5613
- @property --tw-skew-y {
5503
+ @property --tw-leading {
5614
5504
  syntax: "*";
5615
5505
  inherits: false;
5616
5506
  }
5617
- @property --tw-ordinal {
5507
+ @property --tw-font-weight {
5618
5508
  syntax: "*";
5619
5509
  inherits: false;
5620
5510
  }
5621
- @property --tw-slashed-zero {
5511
+ @property --tw-border-style {
5622
5512
  syntax: "*";
5623
5513
  inherits: false;
5514
+ initial-value: solid;
5624
5515
  }
5625
- @property --tw-numeric-figure {
5516
+ @property --tw-outline-style {
5626
5517
  syntax: "*";
5627
5518
  inherits: false;
5519
+ initial-value: solid;
5628
5520
  }
5629
- @property --tw-numeric-spacing {
5521
+ @property --tw-duration {
5630
5522
  syntax: "*";
5631
5523
  inherits: false;
5632
5524
  }
5633
- @property --tw-numeric-fraction {
5525
+ @property --tw-tracking {
5634
5526
  syntax: "*";
5635
5527
  inherits: false;
5636
5528
  }
@@ -5699,29 +5591,23 @@
5699
5591
  inherits: false;
5700
5592
  initial-value: 0 0 #0000;
5701
5593
  }
5702
- @property --tw-outline-style {
5703
- syntax: "*";
5704
- inherits: false;
5705
- initial-value: solid;
5706
- }
5707
- @property --tw-leading {
5594
+ @property --tw-ordinal {
5708
5595
  syntax: "*";
5709
5596
  inherits: false;
5710
5597
  }
5711
- @property --tw-font-weight {
5598
+ @property --tw-slashed-zero {
5712
5599
  syntax: "*";
5713
5600
  inherits: false;
5714
5601
  }
5715
- @property --tw-border-style {
5602
+ @property --tw-numeric-figure {
5716
5603
  syntax: "*";
5717
5604
  inherits: false;
5718
- initial-value: solid;
5719
5605
  }
5720
- @property --tw-duration {
5606
+ @property --tw-numeric-spacing {
5721
5607
  syntax: "*";
5722
5608
  inherits: false;
5723
5609
  }
5724
- @property --tw-tracking {
5610
+ @property --tw-numeric-fraction {
5725
5611
  syntax: "*";
5726
5612
  inherits: false;
5727
5613
  }
@@ -5743,16 +5629,12 @@
5743
5629
  @layer properties {
5744
5630
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
5745
5631
  *, ::before, ::after, ::backdrop {
5746
- --tw-rotate-x: initial;
5747
- --tw-rotate-y: initial;
5748
- --tw-rotate-z: initial;
5749
- --tw-skew-x: initial;
5750
- --tw-skew-y: initial;
5751
- --tw-ordinal: initial;
5752
- --tw-slashed-zero: initial;
5753
- --tw-numeric-figure: initial;
5754
- --tw-numeric-spacing: initial;
5755
- --tw-numeric-fraction: initial;
5632
+ --tw-leading: initial;
5633
+ --tw-font-weight: initial;
5634
+ --tw-border-style: solid;
5635
+ --tw-outline-style: solid;
5636
+ --tw-duration: initial;
5637
+ --tw-tracking: initial;
5756
5638
  --tw-shadow: 0 0 #0000;
5757
5639
  --tw-shadow-color: initial;
5758
5640
  --tw-shadow-alpha: 100%;
@@ -5767,12 +5649,11 @@
5767
5649
  --tw-ring-offset-width: 0px;
5768
5650
  --tw-ring-offset-color: #fff;
5769
5651
  --tw-ring-offset-shadow: 0 0 #0000;
5770
- --tw-outline-style: solid;
5771
- --tw-leading: initial;
5772
- --tw-font-weight: initial;
5773
- --tw-border-style: solid;
5774
- --tw-duration: initial;
5775
- --tw-tracking: initial;
5652
+ --tw-ordinal: initial;
5653
+ --tw-slashed-zero: initial;
5654
+ --tw-numeric-figure: initial;
5655
+ --tw-numeric-spacing: initial;
5656
+ --tw-numeric-fraction: initial;
5776
5657
  --tw-translate-x: 0;
5777
5658
  --tw-translate-y: 0;
5778
5659
  --tw-translate-z: 0;