@alacris/ui 0.4.2 → 0.4.3
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/README.md +3 -3
- package/package.json +1 -1
- package/src/components/ui-accordion-item.js +1 -1
- package/src/components/ui-alert.js +1 -0
- package/src/components/ui-chip.js +1 -0
- package/src/components/ui-drawer.js +1 -1
- package/src/components/ui-sheet.js +1 -1
- package/src/components/ui-side-sheet.js +1 -1
package/README.md
CHANGED
|
@@ -47,9 +47,9 @@ The published package is plain ESM. Point an import map at a pinned CDN build of
|
|
|
47
47
|
{
|
|
48
48
|
"imports": {
|
|
49
49
|
"@alacris/core": "https://cdn.jsdelivr.net/npm/@alacris/core@0.11.4/dist/alacris.js",
|
|
50
|
-
"@alacris/ui": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.4.
|
|
51
|
-
"@alacris/ui/theme": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.4.
|
|
52
|
-
"@alacris/ui/components/": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.4.
|
|
50
|
+
"@alacris/ui": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.4.3/src/index.js",
|
|
51
|
+
"@alacris/ui/theme": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.4.3/src/theme/index.js",
|
|
52
|
+
"@alacris/ui/components/": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.4.3/src/components/"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
</script>
|
package/package.json
CHANGED
|
@@ -146,7 +146,7 @@ define('ui-accordion-item', {
|
|
|
146
146
|
<ui-icon class=${() => `chevron${expanded() ? ' open' : ''}`} name="expand-more"></ui-icon>
|
|
147
147
|
</button>
|
|
148
148
|
</h3>
|
|
149
|
-
<div part="content" class="content" id="content" role="region" aria-labelledby="header"
|
|
149
|
+
<div part="content" class="content" id="content" role="region" aria-labelledby="header" ?inert=${() => !expanded()}
|
|
150
150
|
ref=${(el) => { contentEl = el; el.hidden = !expanded.peek(); }}>
|
|
151
151
|
<div class="body" part="body"><slot></slot></div>
|
|
152
152
|
</div>`;
|
|
@@ -132,6 +132,7 @@ define('ui-alert', {
|
|
|
132
132
|
const onDismiss = () => {
|
|
133
133
|
if (dismissing) return;
|
|
134
134
|
dismissing = true;
|
|
135
|
+
host.inert = true;
|
|
135
136
|
const height = host.scrollHeight || 0;
|
|
136
137
|
// Simulated DOMs (and display:none hosts) measure 0 — skip straight out.
|
|
137
138
|
if (!height) { host.emit('dismiss'); return; }
|
|
@@ -153,7 +153,7 @@ define('ui-drawer', {
|
|
|
153
153
|
return html`
|
|
154
154
|
${() =>
|
|
155
155
|
variant() === 'standard'
|
|
156
|
-
? html`<aside class=${() => `std ${anchor()}${open() ? ' open' : ''}`} part="surface"
|
|
156
|
+
? html`<aside class=${() => `std ${anchor()}${open() ? ' open' : ''}`} ?inert=${() => !open()} part="surface"
|
|
157
157
|
aria-label=${() => label() || 'Navigation'}>
|
|
158
158
|
<div class="inner"><slot></slot></div>
|
|
159
159
|
</aside>`
|
|
@@ -186,7 +186,7 @@ define('ui-sheet', {
|
|
|
186
186
|
return html`
|
|
187
187
|
${() =>
|
|
188
188
|
variant() === 'standard'
|
|
189
|
-
? html`<div class=${() => `std${open() ? ' open' : ''}`} part="surface" role="region"
|
|
189
|
+
? html`<div class=${() => `std${open() ? ' open' : ''}`} ?inert=${() => !open()} part="surface" role="region"
|
|
190
190
|
aria-label=${() => label() || 'Sheet'}>
|
|
191
191
|
<div class="std-inner">
|
|
192
192
|
<div class="handle" part="handle" aria-hidden="true"></div>
|
|
@@ -195,7 +195,7 @@ define('ui-side-sheet', {
|
|
|
195
195
|
return html`
|
|
196
196
|
${() =>
|
|
197
197
|
variant() === 'standard'
|
|
198
|
-
? html`<aside class=${() => `std ${anchor()}${open() ? ' open' : ''}`} part="surface"
|
|
198
|
+
? html`<aside class=${() => `std ${anchor()}${open() ? ' open' : ''}`} ?inert=${() => !open()} part="surface"
|
|
199
199
|
role="region"
|
|
200
200
|
aria-labelledby=${() => (hasHeadline() ? 'headline' : null)}
|
|
201
201
|
aria-label=${() => (hasHeadline() ? null : (label() || 'Side sheet'))}>
|