@apliteni/apliteni-ui 0.84.0 → 0.85.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/guidelines/motion.md +1 -1
- package/package.json +2 -2
- package/src/styles/dropdown.css +10 -0
- package/src/styles/topbar.css +5 -2
package/guidelines/motion.md
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
|
|
47
47
|
**Why:** Published bundles cap animations and transitions at 0.01ms under `prefers-reduced-motion`, so focus reaches a visible control without delay.
|
|
48
48
|
|
|
49
|
-
**Do:** Open drawers and
|
|
49
|
+
**Do:** Open drawers, confirmations, command palettes and dropdown panels without internal transitions.
|
|
50
50
|
|
|
51
51
|
**Don't:** Keep a transition running after reduced motion is requested.
|
|
52
52
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apliteni/apliteni-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.85.1",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"react"
|
|
6
6
|
],
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"build-storybook": "storybook build -o storybook-static",
|
|
57
57
|
"build": "npm run build --workspace react",
|
|
58
58
|
"prepare": "npm run build",
|
|
59
|
-
"test": "for d in src stories site scripts; do [ -d \"$d\" ] || { echo \"npm test: no such directory: $d\" >&2; exit 1; }; done; node --test 'src/**/*.test.js' 'stories/**/*.test.js' 'site/**/*.test.js' 'scripts/**/*.test.js'",
|
|
59
|
+
"test": "for d in src stories site scripts; do [ -d \"$d\" ] || { echo \"npm test: no such directory: $d\" >&2; exit 1; }; done; node --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./scripts/slow-tests.mjs --test-reporter-destination=stdout 'src/**/*.test.js' 'stories/**/*.test.js' 'site/**/*.test.js' 'scripts/**/*.test.js'",
|
|
60
60
|
"tokens:sync": "node scripts/sync-brand-tokens.mjs",
|
|
61
61
|
"tokens:check": "node scripts/sync-brand-tokens.mjs --check",
|
|
62
62
|
"tokens:drift": "node scripts/brand-drift.mjs"
|
package/src/styles/dropdown.css
CHANGED
|
@@ -126,6 +126,16 @@
|
|
|
126
126
|
.ui-dropdown.open .ui-dropdown__panel,
|
|
127
127
|
.ui-dropdown__panel--portal.is-open { transition-property: opacity, transform; }
|
|
128
128
|
|
|
129
|
+
/* And nothing inside it is held either. Under reduced motion an element that names no
|
|
130
|
+
property of its own still transitions the inherited `visibility`, so it is hidden in
|
|
131
|
+
the frame openDropdown() focuses into it — #519. Keyed on the data hook, because the
|
|
132
|
+
topbar's two menus open on the same wiring and keep their own CSS.
|
|
133
|
+
why: docs/specification.md#the-dropdown-panel */
|
|
134
|
+
@media (prefers-reduced-motion: reduce) {
|
|
135
|
+
.open > [data-dropdown-panel] *,
|
|
136
|
+
[data-dropdown-panel].is-open * { transition: none !important; }
|
|
137
|
+
}
|
|
138
|
+
|
|
129
139
|
/* Portalled panel — wireDropdown() moves it onto <body>, clear of every
|
|
130
140
|
ancestor's overflow and every ancestor's stacking context. The descendant
|
|
131
141
|
selector above stops matching the moment it leaves the trigger's subtree, so
|
package/src/styles/topbar.css
CHANGED
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
transition: background var(--dur-fast) var(--ease);
|
|
189
189
|
}
|
|
190
190
|
/* Menu rows use the reading surface and an edge on hover — see
|
|
191
|
-
src/styles/dropdown.css:
|
|
191
|
+
src/styles/dropdown.css:176 `.ui-dropdown__item:hover`.
|
|
192
192
|
why: docs/specification.md#elevation */
|
|
193
193
|
.vopt:hover { outline: 1px solid var(--control-edge); outline-offset: -1px; background: var(--surface); /* ring-gap: inherit — control paint; its focus indicator uses the containing surface. */ }
|
|
194
194
|
/* The row is a keyboard stop: src/components/dropdown.js:554
|
|
@@ -269,7 +269,10 @@
|
|
|
269
269
|
border: 1px solid var(--float-edge);
|
|
270
270
|
box-shadow: inset 0 0 0 1px var(--elev-edge, var(--float-edge-inner)), var(--elev-drop);
|
|
271
271
|
border-radius: 14px;
|
|
272
|
-
|
|
272
|
+
/* No clip. The rows reach this panel's edges, and the ring a focused row draws reaches
|
|
273
|
+
3px past itself; `overflow: hidden` here cut that down to the one pixel of border it
|
|
274
|
+
had, and the reader met two accent bars instead of a ring. The ring crosses the edge
|
|
275
|
+
now. #519 why: docs/specification.md#a-menu-panel-does-not-cut-off-its-rows-ring */
|
|
273
276
|
opacity: 0;
|
|
274
277
|
visibility: hidden;
|
|
275
278
|
pointer-events: none; /* see .vsw__menu above */
|