@nswds/ui 9.4.0 → 9.6.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.
Files changed (40) hide show
  1. package/dist/components/alert-dialog.js +2 -2
  2. package/dist/components/alert-dialog.js.map +1 -1
  3. package/dist/components/button-group.d.ts +2 -2
  4. package/dist/components/button-group.js.map +1 -1
  5. package/dist/components/combobox.js +2 -2
  6. package/dist/components/combobox.js.map +1 -1
  7. package/dist/components/component-preview.d.ts +153 -0
  8. package/dist/components/component-preview.js +690 -0
  9. package/dist/components/component-preview.js.map +1 -0
  10. package/dist/components/dialog.js +2 -2
  11. package/dist/components/dialog.js.map +1 -1
  12. package/dist/components/drawer.js +2 -2
  13. package/dist/components/drawer.js.map +1 -1
  14. package/dist/components/dropdown-menu.js +2 -2
  15. package/dist/components/dropdown-menu.js.map +1 -1
  16. package/dist/components/hover-card.js +2 -2
  17. package/dist/components/hover-card.js.map +1 -1
  18. package/dist/components/navigation-menu.js +2 -1
  19. package/dist/components/navigation-menu.js.map +1 -1
  20. package/dist/components/popover.js +2 -2
  21. package/dist/components/popover.js.map +1 -1
  22. package/dist/components/select.js +2 -2
  23. package/dist/components/select.js.map +1 -1
  24. package/dist/components/sheet.js +2 -2
  25. package/dist/components/sheet.js.map +1 -1
  26. package/dist/components/site-search.js +2 -2
  27. package/dist/components/site-search.js.map +1 -1
  28. package/dist/components/tooltip.js +2 -2
  29. package/dist/components/tooltip.js.map +1 -1
  30. package/dist/index.d.ts +3 -0
  31. package/dist/index.js +2 -0
  32. package/dist/lib/portal-boundary.d.ts +47 -0
  33. package/dist/lib/portal-boundary.js +24 -0
  34. package/dist/lib/portal-boundary.js.map +1 -0
  35. package/dist/lib/preview-theme.d.ts +167 -0
  36. package/dist/lib/preview-theme.js +176 -0
  37. package/dist/lib/preview-theme.js.map +1 -0
  38. package/dist/styles.css +1 -1
  39. package/package.json +1 -1
  40. package/src/styles/theme.css +12 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nswds/ui",
3
- "version": "9.4.0",
3
+ "version": "9.6.0",
4
4
  "description": "UI components for NSW Government digital products, providing reusable design elements and patterns for consistent user interfaces.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/digitalnsw/nswds-ui#readme",
@@ -60,8 +60,18 @@
60
60
  attribute form (next-themes' `attribute="data-theme"`) got mode-aware role
61
61
  tokens but dead `dark:` utilities. Matching both keeps the two in step.
62
62
  Specificity is unchanged at (0,2,0): `:is()` takes its most specific argument,
63
- and every argument here is a single class or attribute. */
64
- @custom-variant dark (&:is(.dark, .dark *, [data-theme='dark'], [data-theme='dark'] *));
63
+ and every argument here is a single class or attribute.
64
+ 3. A light island. The first clause matches anything under a dark ancestor,
65
+ so a region set back to light on a dark page (ComponentPreview's light
66
+ stage) would still take every `dark:` utility: a Button there drew its
67
+ pale dark-mode ink on a white surface. An element at or inside
68
+ `[data-theme-island='light']` is therefore excluded. `:where()` holds the
69
+ exclusion at zero specificity, so the total stays (0,2,0) and no
70
+ consumer's cascade moves. One level only: a dark region nested inside a
71
+ light island stays light. The marker flips utilities, not tokens; the
72
+ island must also supply light values for the role tokens, which
73
+ ComponentPreview does (lib/preview-theme.ts). */
74
+ @custom-variant dark (&:is(.dark, .dark *, [data-theme='dark'], [data-theme='dark'] *):not(:where([data-theme-island='light'], [data-theme-island='light'] *)));
65
75
 
66
76
  @theme inline {
67
77
  --font-heading: var(--font-sans);