@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.
- package/dist/components/alert-dialog.js +2 -2
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/button-group.d.ts +2 -2
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/combobox.js +2 -2
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/component-preview.d.ts +153 -0
- package/dist/components/component-preview.js +690 -0
- package/dist/components/component-preview.js.map +1 -0
- package/dist/components/dialog.js +2 -2
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js +2 -2
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/hover-card.js +2 -2
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/navigation-menu.js +2 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/popover.js +2 -2
- package/dist/components/popover.js.map +1 -1
- package/dist/components/select.js +2 -2
- package/dist/components/select.js.map +1 -1
- package/dist/components/sheet.js +2 -2
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/site-search.js +2 -2
- package/dist/components/site-search.js.map +1 -1
- package/dist/components/tooltip.js +2 -2
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/lib/portal-boundary.d.ts +47 -0
- package/dist/lib/portal-boundary.js +24 -0
- package/dist/lib/portal-boundary.js.map +1 -0
- package/dist/lib/preview-theme.d.ts +167 -0
- package/dist/lib/preview-theme.js +176 -0
- package/dist/lib/preview-theme.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- 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.
|
|
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",
|
package/src/styles/theme.css
CHANGED
|
@@ -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
|
-
|
|
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);
|