a11y-elements 1.0.1 → 1.0.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 +44 -6
- package/dist/a11y.css +66 -9
- package/dist/browser/all.js +17 -17
- package/dist/browser/{chunk-JFZTJO7H.js → chunk-2HQKZFJV.js} +2 -2
- package/dist/browser/{chunk-AHF64455.js → chunk-2TPJ5MVQ.js} +2 -2
- package/dist/browser/{chunk-ORDVOV7E.js → chunk-2X4DBANG.js} +2 -2
- package/dist/browser/{chunk-7YZP3GGZ.js → chunk-3AHPI6C5.js} +2 -2
- package/dist/browser/{chunk-D6ES5GYW.js → chunk-6BEWDDER.js} +2 -2
- package/dist/browser/{chunk-JTFESZPQ.js → chunk-6VUVGT2G.js} +3 -3
- package/dist/browser/{chunk-23IEROGQ.js → chunk-B6V4HID2.js} +6 -2
- package/dist/browser/chunk-B6V4HID2.js.map +1 -0
- package/dist/browser/{chunk-NLRXEMHB.js → chunk-F4KVDZS3.js} +38 -3
- package/dist/browser/chunk-F4KVDZS3.js.map +1 -0
- package/dist/browser/{chunk-LVKKZ4XP.js → chunk-FJCQ4PVG.js} +2 -2
- package/dist/browser/{chunk-6AIK32FI.js → chunk-GYM3EIL3.js} +46 -21
- package/dist/browser/chunk-GYM3EIL3.js.map +1 -0
- package/dist/browser/{chunk-GJIRWFLA.js → chunk-H25W66MH.js} +42 -1
- package/dist/browser/chunk-H25W66MH.js.map +1 -0
- package/dist/browser/{chunk-EMXZKQ32.js → chunk-HJUKOWFZ.js} +5 -3
- package/dist/browser/chunk-HJUKOWFZ.js.map +1 -0
- package/dist/browser/{chunk-6JAOKGVI.js → chunk-IJ6JK2XW.js} +2 -2
- package/dist/browser/{chunk-MKDICSZ3.js → chunk-OB2NQV77.js} +3 -3
- package/dist/browser/{chunk-O235WSRL.js → chunk-RGO5EYGG.js} +2 -2
- package/dist/browser/chunk-WKWX3MMT.js +233 -0
- package/dist/browser/chunk-WKWX3MMT.js.map +1 -0
- package/dist/browser/{chunk-7GCUNMAO.js → chunk-YYYJ6D77.js} +16 -2
- package/dist/browser/chunk-YYYJ6D77.js.map +1 -0
- package/dist/browser/overlays/blocking-loader/define.js +3 -3
- package/dist/browser/overlays/context-menu/define.js +5 -5
- package/dist/browser/overlays/drawer/define.js +4 -4
- package/dist/browser/overlays/dropdown/define.js +5 -5
- package/dist/browser/overlays/emergency-dialog/define.js +4 -4
- package/dist/browser/overlays/floating/define.js +2 -2
- package/dist/browser/overlays/modal/define.js +4 -4
- package/dist/browser/overlays/notification-banner/define.js +3 -3
- package/dist/browser/overlays/popover/define.js +4 -4
- package/dist/browser/overlays/snackbar/define.js +3 -3
- package/dist/browser/overlays/tooltip/define.js +4 -4
- package/dist/core/input-modality.d.ts +21 -0
- package/dist/core/input-modality.js +56 -0
- package/dist/core/input-modality.js.map +1 -0
- package/dist/core/overlay-registry.d.ts +12 -0
- package/dist/core/overlay-registry.js +55 -0
- package/dist/core/overlay-registry.js.map +1 -1
- package/dist/overlays/context-menu/context-menu.element.d.ts +2 -0
- package/dist/overlays/context-menu/context-menu.element.js +4 -0
- package/dist/overlays/context-menu/context-menu.element.js.map +1 -1
- package/dist/overlays/core/a11y-anchored-overlay-element.d.ts +16 -0
- package/dist/overlays/core/a11y-anchored-overlay-element.js +37 -1
- package/dist/overlays/core/a11y-anchored-overlay-element.js.map +1 -1
- package/dist/overlays/core/a11y-passive-overlay-element.d.ts +9 -0
- package/dist/overlays/core/a11y-passive-overlay-element.js +14 -0
- package/dist/overlays/core/a11y-passive-overlay-element.js.map +1 -1
- package/dist/overlays/notification-banner/notification-banner.element.d.ts +7 -1
- package/dist/overlays/notification-banner/notification-banner.element.js +9 -1
- package/dist/overlays/notification-banner/notification-banner.element.js.map +1 -1
- package/dist/overlays/snackbar/snackbar.element.d.ts +20 -7
- package/dist/overlays/snackbar/snackbar.element.js +55 -20
- package/dist/overlays/snackbar/snackbar.element.js.map +1 -1
- package/dist/overlays/tooltip/tooltip.element.d.ts +32 -8
- package/dist/overlays/tooltip/tooltip.element.js +112 -18
- package/dist/overlays/tooltip/tooltip.element.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunk-23IEROGQ.js.map +0 -1
- package/dist/browser/chunk-6AIK32FI.js.map +0 -1
- package/dist/browser/chunk-7GCUNMAO.js.map +0 -1
- package/dist/browser/chunk-EMXZKQ32.js.map +0 -1
- package/dist/browser/chunk-GJIRWFLA.js.map +0 -1
- package/dist/browser/chunk-LIZBBXUV.js +0 -124
- package/dist/browser/chunk-LIZBBXUV.js.map +0 -1
- package/dist/browser/chunk-NLRXEMHB.js.map +0 -1
- /package/dist/browser/{chunk-JFZTJO7H.js.map → chunk-2HQKZFJV.js.map} +0 -0
- /package/dist/browser/{chunk-AHF64455.js.map → chunk-2TPJ5MVQ.js.map} +0 -0
- /package/dist/browser/{chunk-ORDVOV7E.js.map → chunk-2X4DBANG.js.map} +0 -0
- /package/dist/browser/{chunk-7YZP3GGZ.js.map → chunk-3AHPI6C5.js.map} +0 -0
- /package/dist/browser/{chunk-D6ES5GYW.js.map → chunk-6BEWDDER.js.map} +0 -0
- /package/dist/browser/{chunk-JTFESZPQ.js.map → chunk-6VUVGT2G.js.map} +0 -0
- /package/dist/browser/{chunk-LVKKZ4XP.js.map → chunk-FJCQ4PVG.js.map} +0 -0
- /package/dist/browser/{chunk-6JAOKGVI.js.map → chunk-IJ6JK2XW.js.map} +0 -0
- /package/dist/browser/{chunk-MKDICSZ3.js.map → chunk-OB2NQV77.js.map} +0 -0
- /package/dist/browser/{chunk-O235WSRL.js.map → chunk-RGO5EYGG.js.map} +0 -0
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Behavior shared by overlays is described once, in [Common to all overlays](#comm
|
|
|
43
43
|
- [`<a11y-notification-banner>`](#a11y-notification-banner)
|
|
44
44
|
- [`<a11y-popover>`](#a11y-popover)
|
|
45
45
|
- [`<a11y-snackbar>`](#a11y-snackbar)
|
|
46
|
-
- [`<a11y-tooltip>`](#a11y-
|
|
46
|
+
- [`<a11y-tooltip>`](#a11y-tooltip)
|
|
47
47
|
|
|
48
48
|
### Import paths
|
|
49
49
|
|
|
@@ -1546,11 +1546,21 @@ It's a page region, not an open/close overlay: it fires no open/close events and
|
|
|
1546
1546
|
| Option | Default | Description |
|
|
1547
1547
|
| --- | --- | --- |
|
|
1548
1548
|
| `type` | `info` | `info`, `success`, `warning` or `error` (`error` uses `role="alert"`). |
|
|
1549
|
-
| `position` | `top` | `top` or `bottom`. |
|
|
1549
|
+
| `position` | `--a11y-notification-banner-position`, else `top` | `top` or `bottom`. |
|
|
1550
1550
|
| `actionText` / `onAction` | — | Adds an action button; clicking it runs `onAction` and dismisses the banner. |
|
|
1551
1551
|
| `onClose` | — | Called when the banner is dismissed. |
|
|
1552
1552
|
| `maxStack` | — | Sets `max-stack` on the region (sticky for later banners). |
|
|
1553
1553
|
|
|
1554
|
+
To set the default position for every banner, use CSS, like any other style property:
|
|
1555
|
+
|
|
1556
|
+
```css
|
|
1557
|
+
:root {
|
|
1558
|
+
--a11y-notification-banner-position: bottom;
|
|
1559
|
+
}
|
|
1560
|
+
```
|
|
1561
|
+
|
|
1562
|
+
It's read each time a banner is shown, so a change applies to the next banners, not to those already on screen. A `position` passed to `show()` wins. Other values, corners included, are ignored.
|
|
1563
|
+
|
|
1554
1564
|
Classes: `.a11y-notification-banner--info` / `--success` / `--warning` / `--error`, `__message`, `__action`, `__close`.
|
|
1555
1565
|
|
|
1556
1566
|
<details>
|
|
@@ -1565,6 +1575,7 @@ Colors come from the shared `--a11y-color-*` tokens (see [Shared tokens](#shared
|
|
|
1565
1575
|
| `--a11y-notification-banner-close-font-size` | `1.25rem` |
|
|
1566
1576
|
| `--a11y-notification-banner-gap` | `1rem` |
|
|
1567
1577
|
| `--a11y-notification-banner-padding` | `0.75rem 1.5rem` |
|
|
1578
|
+
| `--a11y-notification-banner-position` | `top` |
|
|
1568
1579
|
|
|
1569
1580
|
</details>
|
|
1570
1581
|
|
|
@@ -1624,7 +1635,8 @@ import { h, raw } from 'a11y-elements/core';
|
|
|
1624
1635
|
|
|
1625
1636
|
notify('Saved');
|
|
1626
1637
|
notify('Upload failed', { type: 'error', actionText: 'Retry', onAction: retryUpload });
|
|
1627
|
-
notify('Copied to clipboard', { position: 'top', duration: 1500 });
|
|
1638
|
+
notify('Copied to clipboard', { position: 'top-right', duration: 1500 });
|
|
1639
|
+
notify('Draft deleted', { actionText: 'Undo', onAction: restoreDraft, onClose: () => console.log('toast gone') });
|
|
1628
1640
|
notify(raw('Saved. <a href="/files">View files</a>')); // markup: sanitized, see below
|
|
1629
1641
|
notify(h('span', null, 'Saved. ', h('a', { href: '/files' }, 'View files'))); // nodes, no parsing at all
|
|
1630
1642
|
```
|
|
@@ -1635,7 +1647,7 @@ notify(h('span', null, 'Saved. ', h('a', { href: '/files' }, 'View files'))); //
|
|
|
1635
1647
|
| `max-stack` | attribute | `3` | How many toasts show at once; the rest wait in a queue and show as earlier ones are dismissed. |
|
|
1636
1648
|
| `maxStack` | property | `3` | Same as `max-stack`. `setMaxStack(n)` is an alias. |
|
|
1637
1649
|
| `notify(message, options)` | method | — | Shows a toast (or queues it). |
|
|
1638
|
-
| `dismissAll()` | method | — | Removes every showing toast and drops queued ones, without running `onAction`. |
|
|
1650
|
+
| `dismissAll()` | method | — | Removes every showing toast (calling its `onClose`) and drops queued ones silently, without running `onAction`. |
|
|
1639
1651
|
|
|
1640
1652
|
It's a page region, not an open/close overlay: it fires no open/close events and `dismissAllOverlays()` leaves it alone, so toasts outlive a SPA navigation while the region stays in the page. Call `dismissAll()` to clear them. Removing the region from the document (e.g. with `removeOverlaysWithin()`) drops its toasts, queued ones included, and cancels their timers; re-adding it starts empty. A toast enqueued while the region is detached waits until it's back in the page. Like every overlay it moves itself to `<body>`; see [Overlays in a framework](#overlays-in-a-framework) for `removeOverlaysWithin()`.
|
|
1641
1653
|
|
|
@@ -1646,11 +1658,22 @@ A `message` is text: a string is inserted as text, never parsed. A DOM node (e.g
|
|
|
1646
1658
|
| Option | Default | Description |
|
|
1647
1659
|
| --- | --- | --- |
|
|
1648
1660
|
| `type` | `info` | `info`, `success`, `warning` or `error` (`error` uses `role="alert"`). |
|
|
1649
|
-
| `position` | `bottom` | `bottom` or `
|
|
1661
|
+
| `position` | `--a11y-snackbar-position`, else `bottom` | `top`, `bottom`, `top-left`, `top-right`, `bottom-left` or `bottom-right`. |
|
|
1650
1662
|
| `duration` | `3000` (`10000` with an action) | Time on screen, in ms, not counting hover/focus. `Infinity` keeps the toast until it's dismissed. |
|
|
1651
1663
|
| `actionText` / `onAction` | — | Adds an action button; clicking it dismisses the toast and runs `onAction`. |
|
|
1664
|
+
| `onClose` | — | Called once the toast is gone: × button, action button (after `onAction`), timeout, or `dismissAll()`. Not called for a queued toast that never showed. |
|
|
1652
1665
|
| `maxStack` | — | Sets `max-stack` on the region (sticky for later toasts). |
|
|
1653
1666
|
|
|
1667
|
+
To set the default position for every toast, use CSS, like any other style property:
|
|
1668
|
+
|
|
1669
|
+
```css
|
|
1670
|
+
:root {
|
|
1671
|
+
--a11y-snackbar-position: top-right;
|
|
1672
|
+
}
|
|
1673
|
+
```
|
|
1674
|
+
|
|
1675
|
+
It's read each time a toast is shown, so a change applies to the next toasts, not to those already on screen. A `position` passed to `notify()` wins. Toasts in the same position stack; each position has its own stack. Each stack is up to 90% of the viewport wide, so on a narrow screen toasts in different positions can overlap.
|
|
1676
|
+
|
|
1654
1677
|
Classes: `.a11y-snackbar--info` / `--success` / `--warning` / `--error`.
|
|
1655
1678
|
|
|
1656
1679
|
<details>
|
|
@@ -1669,6 +1692,7 @@ Colors come from the shared `--a11y-color-*` tokens (see [Shared tokens](#shared
|
|
|
1669
1692
|
| `--a11y-snackbar-gap` | `1rem` |
|
|
1670
1693
|
| `--a11y-snackbar-offset` | `1rem` |
|
|
1671
1694
|
| `--a11y-snackbar-padding` | `0.75rem 1.5rem` |
|
|
1695
|
+
| `--a11y-snackbar-position` | `bottom` |
|
|
1672
1696
|
| `--a11y-snackbar-shadow-blur` | `6px` |
|
|
1673
1697
|
| `--a11y-snackbar-shadow-color` | `rgba(0, 0, 0, 0.3)` |
|
|
1674
1698
|
| `--a11y-snackbar-shadow-offset-y` | `2px` |
|
|
@@ -1678,7 +1702,9 @@ Colors come from the shared `--a11y-color-*` tokens (see [Shared tokens](#shared
|
|
|
1678
1702
|
|
|
1679
1703
|
### `a11y-tooltip`
|
|
1680
1704
|
|
|
1681
|
-
A short description shown on hover or focus of its anchor, which gets `aria-describedby`. It stays open while the pointer is over it, and Escape hides it. Never traps focus. See [Anchored overlays](#anchored-overlays).
|
|
1705
|
+
A short description shown on mouse hover or keyboard focus of its anchor, which gets `aria-describedby`. It stays open while the pointer is over it, and Escape hides it. Never traps focus. See [Anchored overlays](#anchored-overlays).
|
|
1706
|
+
|
|
1707
|
+
Pressing the anchor hides it, and hover doesn't bring it back until the pointer leaves and returns. On a touch screen a tap doesn't show it, since the tap is the action. Instead, a long press (500 ms) shows it, until the next tap elsewhere or on the anchor. Screen readers still announce the text through `aria-describedby`. Focus shows it only when the keyboard was used last (Tab, or Escape closing a modal that hands focus back), not after a click or tap. Before any input, it follows `:focus-visible`.
|
|
1682
1708
|
|
|
1683
1709
|
```html
|
|
1684
1710
|
<button id="save-btn">Save</button>
|
|
@@ -1713,6 +1739,8 @@ Status colors and the z-index scale, defined on `:root` (in `overlays/core/overl
|
|
|
1713
1739
|
|
|
1714
1740
|
Each status color has a text color drawn on it (`--a11y-color-text-on-<type>`). Every default pair passes WCAG AA (4.5:1): success 5.13:1, info 5.75:1, error 5.62:1, warning 9.00:1. Warning is amber with dark text, since white on it is only 1.97:1. If you change a status color, check its contrast with its text color.
|
|
1715
1741
|
|
|
1742
|
+
Overlays move themselves to `<body>`, so a tooltip opened from inside a modal would render behind it at its own level (320 < 510). Instead, a dropdown, popover, tooltip or context menu opened from inside another overlay (a modal, drawer, emergency dialog, popover or toast region) stacks just above that overlay: its z-index is the parent's plus its `--a11y-z-nested-<name>` offset. That's 513 for a tooltip in a modal, 523 in a drawer and 613 in an emergency dialog, so it stays below a drawer or blocking loader opened on top. Snackbar and notification-banner stay usable while a modal, drawer or emergency dialog is open, so they're shown that many levels above the topmost one instead of behind its backdrop. Under a blocking loader they keep their usual level. Keep the offsets below 10, the gap between modal layers. The parent's z-index is set at runtime as `--a11y-z-parent` on the nested overlay's wrapper (`.a11y-is-nested`), and as `--a11y-z-modal-layer` on `<html>` (`.a11y-modal-layer-open`).
|
|
1743
|
+
|
|
1716
1744
|
<details>
|
|
1717
1745
|
<summary>CSS variables</summary>
|
|
1718
1746
|
|
|
@@ -1749,6 +1777,12 @@ Each status color has a text color drawn on it (`--a11y-color-text-on-<type>`).
|
|
|
1749
1777
|
| `--a11y-z-emergency-dialog` | `610` |
|
|
1750
1778
|
| `--a11y-z-debug-panel` | `700` |
|
|
1751
1779
|
| `--a11y-z-inspector` | `710` |
|
|
1780
|
+
| `--a11y-z-nested-dropdown` | `1` |
|
|
1781
|
+
| `--a11y-z-nested-popover` | `2` |
|
|
1782
|
+
| `--a11y-z-nested-tooltip` | `3` |
|
|
1783
|
+
| `--a11y-z-nested-context-menu` | `4` |
|
|
1784
|
+
| `--a11y-z-nested-snackbar` | `5` |
|
|
1785
|
+
| `--a11y-z-nested-notification-banner` | `6` |
|
|
1752
1786
|
|
|
1753
1787
|
</details>
|
|
1754
1788
|
|
|
@@ -1879,3 +1913,7 @@ The full list of tokens, with their defaults, is in the shipped `dist/a11y.css`
|
|
|
1879
1913
|
## License
|
|
1880
1914
|
|
|
1881
1915
|
MIT — see [`LICENSE.txt`](./LICENSE.txt).
|
|
1916
|
+
|
|
1917
|
+
## Support
|
|
1918
|
+
|
|
1919
|
+
If you find a11y-elements useful, consider supporting its development on [Ko-fi](https://ko-fi.com/loiskouninef)
|
package/dist/a11y.css
CHANGED
|
@@ -926,6 +926,12 @@ a11y-file-input > input:disabled + .a11y-file-input__dropzone .a11y-file-input__
|
|
|
926
926
|
--a11y-z-emergency-dialog: 610;
|
|
927
927
|
--a11y-z-debug-panel: 700;
|
|
928
928
|
--a11y-z-inspector: 710;
|
|
929
|
+
--a11y-z-nested-dropdown: 1;
|
|
930
|
+
--a11y-z-nested-popover: 2;
|
|
931
|
+
--a11y-z-nested-tooltip: 3;
|
|
932
|
+
--a11y-z-nested-context-menu: 4;
|
|
933
|
+
--a11y-z-nested-snackbar: 5;
|
|
934
|
+
--a11y-z-nested-notification-banner: 6;
|
|
929
935
|
}
|
|
930
936
|
|
|
931
937
|
/* src/overlays/core/overlay-runtime.css */
|
|
@@ -1210,6 +1216,9 @@ a11y-emergency-dialog {
|
|
|
1210
1216
|
box-shadow: 0 var(--a11y-popover-shadow-offset-y, 2px) var(--a11y-popover-shadow-blur, 10px) color-mix(in srgb, var(--a11y-popover-color-text, var(--a11y-color-text-default, #111827)), transparent var(--a11y-popover-shadow-fade, 85%));
|
|
1211
1217
|
max-width: var(--a11y-popover-max-width, 320px);
|
|
1212
1218
|
}
|
|
1219
|
+
.a11y-popover-wrapper.a11y-is-nested {
|
|
1220
|
+
z-index: calc(var(--a11y-z-parent) + var(--a11y-z-nested-popover, 2));
|
|
1221
|
+
}
|
|
1213
1222
|
a11y-popover {
|
|
1214
1223
|
display: none;
|
|
1215
1224
|
}
|
|
@@ -1227,6 +1236,9 @@ a11y-popover {
|
|
|
1227
1236
|
font-size: var(--a11y-tooltip-font-size, 0.85rem);
|
|
1228
1237
|
max-width: var(--a11y-tooltip-max-width, 240px);
|
|
1229
1238
|
}
|
|
1239
|
+
.a11y-tooltip-wrapper.a11y-is-nested {
|
|
1240
|
+
z-index: calc(var(--a11y-z-parent) + var(--a11y-z-nested-tooltip, 3));
|
|
1241
|
+
}
|
|
1230
1242
|
a11y-tooltip {
|
|
1231
1243
|
display: none;
|
|
1232
1244
|
}
|
|
@@ -1244,6 +1256,9 @@ a11y-tooltip {
|
|
|
1244
1256
|
box-shadow: 0 var(--a11y-dropdown-shadow-offset-y, 2px) var(--a11y-dropdown-shadow-blur, 10px) color-mix(in srgb, var(--a11y-dropdown-color-text, var(--a11y-color-text-default, #111827)), transparent var(--a11y-dropdown-shadow-fade, 85%));
|
|
1245
1257
|
min-width: var(--a11y-dropdown-min-width, 160px);
|
|
1246
1258
|
}
|
|
1259
|
+
.a11y-dropdown-wrapper.a11y-is-nested {
|
|
1260
|
+
z-index: calc(var(--a11y-z-parent) + var(--a11y-z-nested-dropdown, 1));
|
|
1261
|
+
}
|
|
1247
1262
|
a11y-dropdown {
|
|
1248
1263
|
display: none;
|
|
1249
1264
|
}
|
|
@@ -1261,6 +1276,9 @@ a11y-dropdown {
|
|
|
1261
1276
|
box-shadow: 0 var(--a11y-context-menu-shadow-offset-y, 2px) var(--a11y-context-menu-shadow-blur, 10px) color-mix(in srgb, var(--a11y-context-menu-color-text, var(--a11y-color-text-default, #111827)), transparent var(--a11y-context-menu-shadow-fade, 85%));
|
|
1262
1277
|
min-width: var(--a11y-context-menu-min-width, 160px);
|
|
1263
1278
|
}
|
|
1279
|
+
.a11y-context-menu-wrapper.a11y-is-nested {
|
|
1280
|
+
z-index: calc(var(--a11y-z-parent) + var(--a11y-z-nested-context-menu, 4));
|
|
1281
|
+
}
|
|
1264
1282
|
a11y-context-menu {
|
|
1265
1283
|
display: none;
|
|
1266
1284
|
}
|
|
@@ -1443,11 +1461,8 @@ a11y-floating.a11y-floating--scrolled-away {
|
|
|
1443
1461
|
}
|
|
1444
1462
|
|
|
1445
1463
|
/* src/overlays/snackbar/snackbar.css */
|
|
1446
|
-
.a11y-snackbar-
|
|
1447
|
-
.a11y-snackbar-region__top {
|
|
1464
|
+
.a11y-snackbar-region__stack {
|
|
1448
1465
|
position: fixed;
|
|
1449
|
-
left: 50%;
|
|
1450
|
-
transform: translateX(-50%);
|
|
1451
1466
|
display: flex;
|
|
1452
1467
|
flex-direction: column;
|
|
1453
1468
|
align-items: stretch;
|
|
@@ -1457,16 +1472,26 @@ a11y-floating.a11y-floating--scrolled-away {
|
|
|
1457
1472
|
pointer-events: none;
|
|
1458
1473
|
z-index: var(--a11y-z-snackbar, 400);
|
|
1459
1474
|
}
|
|
1460
|
-
.a11y-snackbar-
|
|
1461
|
-
.a11y-snackbar-region__top .a11y-snackbar {
|
|
1475
|
+
.a11y-snackbar-region__stack .a11y-snackbar {
|
|
1462
1476
|
pointer-events: auto;
|
|
1463
1477
|
}
|
|
1464
|
-
.a11y-snackbar-
|
|
1478
|
+
.a11y-snackbar-region__stack[data-position^=top] {
|
|
1479
|
+
top: var(--a11y-snackbar-offset, 1rem);
|
|
1480
|
+
}
|
|
1481
|
+
.a11y-snackbar-region__stack[data-position^=bottom] {
|
|
1465
1482
|
bottom: var(--a11y-snackbar-offset, 1rem);
|
|
1466
1483
|
flex-direction: column-reverse;
|
|
1467
1484
|
}
|
|
1468
|
-
.a11y-snackbar-
|
|
1469
|
-
|
|
1485
|
+
.a11y-snackbar-region__stack[data-position$=left] {
|
|
1486
|
+
left: var(--a11y-snackbar-offset, 1rem);
|
|
1487
|
+
}
|
|
1488
|
+
.a11y-snackbar-region__stack[data-position$=right] {
|
|
1489
|
+
right: var(--a11y-snackbar-offset, 1rem);
|
|
1490
|
+
}
|
|
1491
|
+
.a11y-snackbar-region__stack[data-position=top],
|
|
1492
|
+
.a11y-snackbar-region__stack[data-position=bottom] {
|
|
1493
|
+
left: 50%;
|
|
1494
|
+
transform: translateX(-50%);
|
|
1470
1495
|
}
|
|
1471
1496
|
.a11y-snackbar {
|
|
1472
1497
|
position: relative;
|
|
@@ -1482,6 +1507,9 @@ a11y-floating.a11y-floating--scrolled-away {
|
|
|
1482
1507
|
width: 100%;
|
|
1483
1508
|
animation: a11y-snackbar-fade-in var(--a11y-snackbar-animation-duration, 0.3s) ease;
|
|
1484
1509
|
}
|
|
1510
|
+
.a11y-snackbar-region__stack[data-position^=top] .a11y-snackbar {
|
|
1511
|
+
animation-name: a11y-snackbar-fade-in-down;
|
|
1512
|
+
}
|
|
1485
1513
|
.a11y-snackbar--success {
|
|
1486
1514
|
background: var(--a11y-color-success, #2e7d32);
|
|
1487
1515
|
color: var(--a11y-color-text-on-success, var(--a11y-color-text, white));
|
|
@@ -1541,11 +1569,24 @@ a11y-floating.a11y-floating--scrolled-away {
|
|
|
1541
1569
|
transform: translateY(0);
|
|
1542
1570
|
}
|
|
1543
1571
|
}
|
|
1572
|
+
@keyframes a11y-snackbar-fade-in-down {
|
|
1573
|
+
from {
|
|
1574
|
+
opacity: 0;
|
|
1575
|
+
transform: translateY(-8px);
|
|
1576
|
+
}
|
|
1577
|
+
to {
|
|
1578
|
+
opacity: 1;
|
|
1579
|
+
transform: translateY(0);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1544
1582
|
@media (prefers-reduced-motion: reduce) {
|
|
1545
1583
|
.a11y-snackbar {
|
|
1546
1584
|
animation: none;
|
|
1547
1585
|
}
|
|
1548
1586
|
}
|
|
1587
|
+
html.a11y-modal-layer-open .a11y-snackbar-region {
|
|
1588
|
+
z-index: calc(var(--a11y-z-modal-layer) + var(--a11y-z-nested-snackbar, 5));
|
|
1589
|
+
}
|
|
1549
1590
|
|
|
1550
1591
|
/* src/overlays/notification-banner/notification-banner.css */
|
|
1551
1592
|
.a11y-notification-banner-region__top,
|
|
@@ -1612,6 +1653,19 @@ a11y-floating.a11y-floating--scrolled-away {
|
|
|
1612
1653
|
font-size: var(--a11y-notification-banner-close-font-size, 1.25rem);
|
|
1613
1654
|
line-height: 1;
|
|
1614
1655
|
}
|
|
1656
|
+
.a11y-notification-banner-region__bottom .a11y-notification-banner {
|
|
1657
|
+
animation-name: a11y-notification-banner-fade-in-up;
|
|
1658
|
+
}
|
|
1659
|
+
@keyframes a11y-notification-banner-fade-in-up {
|
|
1660
|
+
from {
|
|
1661
|
+
opacity: 0;
|
|
1662
|
+
transform: translateY(8px);
|
|
1663
|
+
}
|
|
1664
|
+
to {
|
|
1665
|
+
opacity: 1;
|
|
1666
|
+
transform: translateY(0);
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1615
1669
|
@keyframes a11y-notification-banner-fade-in {
|
|
1616
1670
|
from {
|
|
1617
1671
|
opacity: 0;
|
|
@@ -1627,5 +1681,8 @@ a11y-floating.a11y-floating--scrolled-away {
|
|
|
1627
1681
|
animation: none;
|
|
1628
1682
|
}
|
|
1629
1683
|
}
|
|
1684
|
+
html.a11y-modal-layer-open .a11y-notification-banner-region {
|
|
1685
|
+
z-index: calc(var(--a11y-z-modal-layer) + var(--a11y-z-nested-notification-banner, 6));
|
|
1686
|
+
}
|
|
1630
1687
|
|
|
1631
1688
|
/* src/a11y.css */
|
package/dist/browser/all.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FloatingElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FJCQ4PVG.js";
|
|
4
4
|
import {
|
|
5
5
|
ModalElement,
|
|
6
6
|
confirmDialog
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2HQKZFJV.js";
|
|
8
8
|
import {
|
|
9
9
|
NotificationBannerElement,
|
|
10
10
|
showNotificationBanner
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HJUKOWFZ.js";
|
|
12
12
|
import {
|
|
13
13
|
PopoverElement
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3AHPI6C5.js";
|
|
15
15
|
import {
|
|
16
16
|
SnackbarElement,
|
|
17
17
|
notify
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-GYM3EIL3.js";
|
|
19
|
+
import "./chunk-YYYJ6D77.js";
|
|
20
20
|
import {
|
|
21
21
|
TooltipElement
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WKWX3MMT.js";
|
|
23
23
|
import {
|
|
24
24
|
TabsElement
|
|
25
25
|
} from "./chunk-4V5TTMP4.js";
|
|
@@ -31,29 +31,29 @@ import {
|
|
|
31
31
|
} from "./chunk-SRWD5UK6.js";
|
|
32
32
|
import {
|
|
33
33
|
BlockingLoaderElement
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-OB2NQV77.js";
|
|
35
35
|
import {
|
|
36
36
|
ContextMenuElement
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-B6V4HID2.js";
|
|
38
38
|
import {
|
|
39
39
|
DrawerElement
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6BEWDDER.js";
|
|
41
41
|
import {
|
|
42
42
|
DropdownElement
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-2X4DBANG.js";
|
|
44
|
+
import "./chunk-RGO5EYGG.js";
|
|
45
|
+
import "./chunk-F4KVDZS3.js";
|
|
46
46
|
import {
|
|
47
47
|
EmergencyDialogElement
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-2TPJ5MVQ.js";
|
|
49
|
+
import "./chunk-6VUVGT2G.js";
|
|
50
50
|
import "./chunk-MNWKDM3I.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-IJ6JK2XW.js";
|
|
52
52
|
import "./chunk-FNILKXCO.js";
|
|
53
53
|
import {
|
|
54
54
|
dismissAllOverlays,
|
|
55
55
|
removeOverlaysWithin
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-H25W66MH.js";
|
|
57
57
|
import {
|
|
58
58
|
LabelElement
|
|
59
59
|
} from "./chunk-WDPW7UKG.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
A11yModalOverlayElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6VUVGT2G.js";
|
|
4
4
|
import {
|
|
5
5
|
appendContent,
|
|
6
6
|
h
|
|
@@ -88,4 +88,4 @@ export {
|
|
|
88
88
|
ModalElement,
|
|
89
89
|
confirmDialog
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
91
|
+
//# sourceMappingURL=chunk-2HQKZFJV.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
A11yModalOverlayElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6VUVGT2G.js";
|
|
4
4
|
import {
|
|
5
5
|
defineElement
|
|
6
6
|
} from "./chunk-ED3UMYMY.js";
|
|
@@ -33,4 +33,4 @@ defineElement("a11y-emergency-dialog", EmergencyDialogElement);
|
|
|
33
33
|
export {
|
|
34
34
|
EmergencyDialogElement
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-2TPJ5MVQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
A11yMenuOverlayElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RGO5EYGG.js";
|
|
4
4
|
import {
|
|
5
5
|
nextId
|
|
6
6
|
} from "./chunk-Q4TMA3P7.js";
|
|
@@ -89,4 +89,4 @@ defineElement("a11y-dropdown", DropdownElement);
|
|
|
89
89
|
export {
|
|
90
90
|
DropdownElement
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-2X4DBANG.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
A11yAnchoredOverlayElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F4KVDZS3.js";
|
|
4
4
|
import {
|
|
5
5
|
nextId
|
|
6
6
|
} from "./chunk-Q4TMA3P7.js";
|
|
@@ -62,4 +62,4 @@ defineElement("a11y-popover", PopoverElement);
|
|
|
62
62
|
export {
|
|
63
63
|
PopoverElement
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-3AHPI6C5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
A11yModalOverlayElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6VUVGT2G.js";
|
|
4
4
|
import {
|
|
5
5
|
defineElement
|
|
6
6
|
} from "./chunk-ED3UMYMY.js";
|
|
@@ -47,4 +47,4 @@ defineElement("a11y-drawer", DrawerElement);
|
|
|
47
47
|
export {
|
|
48
48
|
DrawerElement
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-6BEWDDER.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-MNWKDM3I.js";
|
|
4
4
|
import {
|
|
5
5
|
A11yOverlayElement
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IJ6JK2XW.js";
|
|
7
7
|
import {
|
|
8
8
|
FocusTrapHelper
|
|
9
9
|
} from "./chunk-FNILKXCO.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
inertOutside,
|
|
12
12
|
lockScroll,
|
|
13
13
|
unlockScroll
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H25W66MH.js";
|
|
15
15
|
import {
|
|
16
16
|
nextId
|
|
17
17
|
} from "./chunk-Q4TMA3P7.js";
|
|
@@ -209,4 +209,4 @@ var A11yModalOverlayElement = class extends A11yOverlayElement {
|
|
|
209
209
|
export {
|
|
210
210
|
A11yModalOverlayElement
|
|
211
211
|
};
|
|
212
|
-
//# sourceMappingURL=chunk-
|
|
212
|
+
//# sourceMappingURL=chunk-6VUVGT2G.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
A11yMenuOverlayElement
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RGO5EYGG.js";
|
|
4
4
|
import {
|
|
5
5
|
defineElement,
|
|
6
6
|
doc
|
|
@@ -40,6 +40,10 @@ var ContextMenuElement = class extends A11yMenuOverlayElement {
|
|
|
40
40
|
super.onAttributeChanged(name);
|
|
41
41
|
if (name === "trigger") this._bindTrigger();
|
|
42
42
|
}
|
|
43
|
+
/** Anchored to a point, not an element: its trigger is what it was opened from. */
|
|
44
|
+
nestingTarget() {
|
|
45
|
+
return this.triggerElement ?? super.nestingTarget();
|
|
46
|
+
}
|
|
43
47
|
createWrapper() {
|
|
44
48
|
const el = super.createWrapper();
|
|
45
49
|
el.classList.add("a11y-context-menu-wrapper");
|
|
@@ -74,4 +78,4 @@ defineElement("a11y-context-menu", ContextMenuElement);
|
|
|
74
78
|
export {
|
|
75
79
|
ContextMenuElement
|
|
76
80
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
81
|
+
//# sourceMappingURL=chunk-B6V4HID2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/overlays/context-menu/context-menu.element.ts","../../src/overlays/context-menu/define.ts"],"sourcesContent":["import { A11yMenuOverlayElement } from '../core/a11y-menu-overlay-element.js';\nimport { doc } from '../../core/safe-dom.js';\n\n/**\n * A menu that opens at the mouse position on right-click (`contextmenu`) of\n * a trigger element, replacing the browser's native context menu there.\n *\n * ```html\n * <div id=\"canvas\">Right-click me</div>\n * <a11y-context-menu trigger=\"canvas\">\n * <div role=\"menuitem\">Copy</div>\n * <div role=\"menuitem\">Paste</div>\n * </a11y-context-menu>\n * ```\n */\nexport class ContextMenuElement extends A11yMenuOverlayElement {\n static override get observedAttributes(): string[] {\n return [...super.observedAttributes, 'trigger'];\n }\n\n private _triggerEl: HTMLElement | null = null;\n private _boundTriggerEl: HTMLElement | null = null;\n private _boundContextMenu = (e: MouseEvent): void => {\n e.preventDefault();\n this.setAnchorPoint(e.clientX, e.clientY);\n // Re-right-clicking while already open repositions in place rather than\n // no-op'ing (the `open` attribute wouldn't change, so attributeChangedCallback\n // wouldn't fire) — _show() itself already guards on an existing wrapper.\n if (this.open) this._show();\n else this.open = true;\n };\n\n /** The element whose `contextmenu` event opens this menu: an explicit `.triggerElement` property, or the `trigger=\"<id>\"` attribute. */\n get triggerElement(): HTMLElement | null {\n if (this._triggerEl) return this._triggerEl;\n const id = this.getAttribute('trigger');\n return id ? doc.getElementById(id) : null;\n }\n\n set triggerElement(el: HTMLElement | null) {\n this._triggerEl = el;\n this._bindTrigger();\n }\n\n protected override onConnect(): void {\n this._bindTrigger();\n // Trigger not parsed yet (menu authored before it, define script loaded synchronously).\n if (!this._boundTriggerEl) this.afterParse(() => this._bindTrigger());\n }\n\n protected override onDisconnect(): void {\n this._unbindTrigger();\n }\n\n protected override onAttributeChanged(name: string): void {\n super.onAttributeChanged(name);\n if (name === 'trigger') this._bindTrigger();\n }\n\n /** Anchored to a point, not an element: its trigger is what it was opened from. */\n protected override nestingTarget(): Node | null {\n return this.triggerElement ?? super.nestingTarget();\n }\n\n protected override createWrapper(): HTMLElement {\n const el = super.createWrapper();\n el.classList.add('a11y-context-menu-wrapper');\n return el;\n }\n\n protected override getContentClass(): string {\n return 'a11y-context-menu-content';\n }\n\n /** Detaches from the trigger entirely (unlike `close()`, which just hides the current menu — it can still reopen on the next right-click). */\n dispose(): void {\n this._unbindTrigger();\n this.close();\n }\n\n private _bindTrigger(): void {\n const trigger = this.triggerElement;\n if (this._boundTriggerEl === trigger) return;\n this._unbindTrigger();\n if (!trigger) return;\n trigger.addEventListener('contextmenu', this._boundContextMenu);\n this._boundTriggerEl = trigger;\n }\n\n private _unbindTrigger(): void {\n if (!this._boundTriggerEl) return;\n this._boundTriggerEl.removeEventListener('contextmenu', this._boundContextMenu);\n this._boundTriggerEl = null;\n }\n}\n","import { defineElement } from '../../core/define-element.js';\nimport { ContextMenuElement } from './context-menu.element.js';\n\ndefineElement('a11y-context-menu', ContextMenuElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'a11y-context-menu': ContextMenuElement;\n }\n}\n\nexport { ContextMenuElement };\nexport * from '../core/zero-build-exports.js';\n"],"mappings":";;;;;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AACtC,SAAK,eAAe;AACpB,QAAI,CAAC,QAAS;AACd,YAAQ,iBAAiB,eAAe,KAAK,iBAAiB;AAC9D,SAAK,kBAAkB;AAAA,EACzB;AAAA,EAEQ,iBAAuB;AAC7B,QAAI,CAAC,KAAK,gBAAiB;AAC3B,SAAK,gBAAgB,oBAAoB,eAAe,KAAK,iBAAiB;AAC9E,SAAK,kBAAkB;AAAA,EACzB;AACF;;;AC3FA,cAAc,qBAAqB,kBAAkB;","names":[]}
|
|
@@ -3,14 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-MNWKDM3I.js";
|
|
4
4
|
import {
|
|
5
5
|
A11yOverlayElement
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IJ6JK2XW.js";
|
|
7
7
|
import {
|
|
8
8
|
FocusTrapHelper
|
|
9
9
|
} from "./chunk-FNILKXCO.js";
|
|
10
10
|
import {
|
|
11
|
+
computedZIndex,
|
|
12
|
+
findOverlayChromeRoot,
|
|
13
|
+
getPortalOrigin,
|
|
11
14
|
hasOverlayOpenedAfter,
|
|
12
15
|
isInsideOverlayOpenedAfter
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H25W66MH.js";
|
|
14
17
|
import {
|
|
15
18
|
doc
|
|
16
19
|
} from "./chunk-ED3UMYMY.js";
|
|
@@ -26,6 +29,11 @@ var A11yAnchoredOverlayElement = class extends A11yOverlayElement {
|
|
|
26
29
|
_focusTrap = null;
|
|
27
30
|
_boundOutsideClick = null;
|
|
28
31
|
_outsideClickTimer = null;
|
|
32
|
+
/** The `<html>` given the no-op click listener, kept to remove it from the same element. */
|
|
33
|
+
_tapTargetRoot = null;
|
|
34
|
+
/** Per instance: a shared function would be added once, and the first overlay to close would remove it for all. */
|
|
35
|
+
_noopClick = () => {
|
|
36
|
+
};
|
|
29
37
|
_boundKeyDown = null;
|
|
30
38
|
_boundReposition = null;
|
|
31
39
|
_resizeObserver = null;
|
|
@@ -77,10 +85,31 @@ var A11yAnchoredOverlayElement = class extends A11yOverlayElement {
|
|
|
77
85
|
getContentClass() {
|
|
78
86
|
return "a11y-anchored-overlay-content";
|
|
79
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* What this overlay was opened from, to tell whether it's nested in another
|
|
90
|
+
* overlay (a tooltip in a modal): the anchor, else where it was authored.
|
|
91
|
+
*/
|
|
92
|
+
nestingTarget() {
|
|
93
|
+
return this.anchorElement ?? getPortalOrigin(this);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* It lives on `<body>`, so its own z-index (tooltip 320…) would put it
|
|
97
|
+
* behind the overlay it was opened from (modal 510…). Nested, it records
|
|
98
|
+
* that overlay's z-index as `--a11y-z-parent`, and its CSS stacks it
|
|
99
|
+
* `--a11y-z-nested-<name>` above that.
|
|
100
|
+
*/
|
|
101
|
+
_markNesting(wrapper) {
|
|
102
|
+
const root = findOverlayChromeRoot(this.nestingTarget(), this);
|
|
103
|
+
const z = root && root !== wrapper ? computedZIndex(root) : null;
|
|
104
|
+
if (z === null) return;
|
|
105
|
+
wrapper.classList.add("a11y-is-nested");
|
|
106
|
+
wrapper.style.setProperty("--a11y-z-parent", String(z));
|
|
107
|
+
}
|
|
80
108
|
_show() {
|
|
81
109
|
this._flushPendingHide();
|
|
82
110
|
if (this._wrapper) this._teardownChrome();
|
|
83
111
|
const wrapper = this.createWrapper();
|
|
112
|
+
this._markNesting(wrapper);
|
|
84
113
|
doc.body.appendChild(wrapper);
|
|
85
114
|
this.classList.add(this.getContentClass());
|
|
86
115
|
this._moveSelfTo(wrapper);
|
|
@@ -213,6 +242,8 @@ var A11yAnchoredOverlayElement = class extends A11yOverlayElement {
|
|
|
213
242
|
this._outsideClickTimer = setTimeout(() => {
|
|
214
243
|
doc.addEventListener("click", this._boundOutsideClick, true);
|
|
215
244
|
}, 0);
|
|
245
|
+
this._tapTargetRoot = doc.documentElement;
|
|
246
|
+
this._tapTargetRoot.addEventListener("click", this._noopClick);
|
|
216
247
|
if (!this.wantsFocusTrap()) {
|
|
217
248
|
this._boundKeyDown = (e) => {
|
|
218
249
|
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
@@ -232,6 +263,10 @@ var A11yAnchoredOverlayElement = class extends A11yOverlayElement {
|
|
|
232
263
|
doc.removeEventListener("click", this._boundOutsideClick, true);
|
|
233
264
|
this._boundOutsideClick = null;
|
|
234
265
|
}
|
|
266
|
+
if (this._tapTargetRoot) {
|
|
267
|
+
this._tapTargetRoot.removeEventListener("click", this._noopClick);
|
|
268
|
+
this._tapTargetRoot = null;
|
|
269
|
+
}
|
|
235
270
|
if (this._boundKeyDown) {
|
|
236
271
|
doc.removeEventListener("keydown", this._boundKeyDown, true);
|
|
237
272
|
this._boundKeyDown = null;
|
|
@@ -261,4 +296,4 @@ var A11yAnchoredOverlayElement = class extends A11yOverlayElement {
|
|
|
261
296
|
export {
|
|
262
297
|
A11yAnchoredOverlayElement
|
|
263
298
|
};
|
|
264
|
-
//# sourceMappingURL=chunk-
|
|
299
|
+
//# sourceMappingURL=chunk-F4KVDZS3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/overlays/core/a11y-anchored-overlay-element.ts"],"sourcesContent":["import { A11yOverlayElement } from '../../core/a11y-overlay-element.js';\nimport {\n computedZIndex,\n findOverlayChromeRoot,\n getPortalOrigin,\n hasOverlayOpenedAfter,\n isInsideOverlayOpenedAfter,\n} from '../../core/overlay-registry.js';\nimport { FocusTrapHelper, type IFocusTrapOptions } from '../../core/focus-trap.js';\nimport { whenTransitionDone } from '../../core/transition.js';\nimport { doc } from '../../core/safe-dom.js';\n\nexport type AnchoredSide = 'top' | 'bottom' | 'left' | 'right';\nexport type AnchoredAlign = 'start' | 'end';\nexport type AnchoredPlacement = AnchoredSide | `${AnchoredSide}-${AnchoredAlign}`;\n\n/**\n * Base for overlays positioned relative to an anchor element or point\n * (popover, tooltip, dropdown, and — via `A11yMenuOverlayElement` —\n * dropdown-menu/context-menu). `this` (the custom element, holding the\n * consumer's own light-DOM content) is moved into a `wrapper` div appended\n * to `document.body` on show, and moved back out before the wrapper is torn\n * down on hide — the same portal dance `A11yOverlayElement` documents,\n * scoped to this overlay family's extra positioning chrome.\n *\n * The flip/clamp positioning math and the deferred-outside-click dismissal\n * are ported near-verbatim from the old framework version — both were\n * already framework-free hand-rolled DOM/geometry code with nothing to do\n * with the old base classes.\n */\nexport abstract class A11yAnchoredOverlayElement extends A11yOverlayElement {\n static override get observedAttributes(): string[] {\n return ['open', 'anchor', 'placement', 'offset'];\n }\n\n protected _wrapper: HTMLElement | null = null;\n private _anchorEl: HTMLElement | null = null;\n private _anchorRect: DOMRect | null = null;\n private _focusTrap: FocusTrapHelper | null = null;\n private _boundOutsideClick: ((e: MouseEvent) => void) | null = null;\n private _outsideClickTimer: ReturnType<typeof setTimeout> | null = null;\n /** The `<html>` given the no-op click listener, kept to remove it from the same element. */\n private _tapTargetRoot: HTMLElement | null = null;\n /** Per instance: a shared function would be added once, and the first overlay to close would remove it for all. */\n private _noopClick = (): void => {};\n private _boundKeyDown: ((e: KeyboardEvent) => void) | null = null;\n private _boundReposition: (() => void) | null = null;\n private _resizeObserver: ResizeObserver | null = null;\n private _pendingHide: (() => void) | null = null;\n private _cancelHideWait: (() => void) | null = null;\n\n /** The element to anchor to: an explicit `.anchorElement` property, or the `anchor=\"<id>\"` attribute. */\n get anchorElement(): HTMLElement | null {\n if (this._anchorEl) return this._anchorEl;\n const id = this.getAttribute('anchor');\n return id ? doc.getElementById(id) : null;\n }\n\n set anchorElement(el: HTMLElement | null) {\n this._anchorEl = el;\n this._anchorRect = null;\n this.onAnchorChanged();\n }\n\n /**\n * Called whenever the anchor may have changed (`anchor` attribute,\n * `.anchorElement` property). Subclasses that wire listeners/ARIA onto the\n * anchor re-bind here — call `super.onAnchorChanged()`.\n */\n protected onAnchorChanged(): void {\n if (this._wrapper) this.updatePosition();\n }\n\n protected override onAttributeChanged(name: string): void {\n if (name === 'anchor') this.onAnchorChanged();\n else if (this._wrapper) this.updatePosition(); // placement / offset\n }\n\n /** Anchors to a fixed viewport point instead of an element (used by context menus). */\n protected setAnchorPoint(x: number, y: number): void {\n this._anchorEl = null;\n this._anchorRect = new DOMRect(x, y, 0, 0);\n }\n\n get placement(): AnchoredPlacement {\n return (this.getAttribute('placement') as AnchoredPlacement | null) ?? 'bottom';\n }\n\n get offset(): number {\n return this.numberAttr('offset', 8);\n }\n\n /** Override to force focus-trapping on/off/conditional (menus always force it off; popovers derive it from `interactive`). */\n protected wantsFocusTrap(): boolean {\n return this.boolAttr('trap-focus');\n }\n\n protected createWrapper(): HTMLElement {\n const el = doc.createElement('div');\n el.className = 'a11y-anchored-overlay-wrapper';\n return el;\n }\n\n protected getContentClass(): string {\n return 'a11y-anchored-overlay-content';\n }\n\n /**\n * What this overlay was opened from, to tell whether it's nested in another\n * overlay (a tooltip in a modal): the anchor, else where it was authored.\n */\n protected nestingTarget(): Node | null {\n return this.anchorElement ?? getPortalOrigin(this);\n }\n\n /**\n * It lives on `<body>`, so its own z-index (tooltip 320…) would put it\n * behind the overlay it was opened from (modal 510…). Nested, it records\n * that overlay's z-index as `--a11y-z-parent`, and its CSS stacks it\n * `--a11y-z-nested-<name>` above that.\n */\n private _markNesting(wrapper: HTMLElement): void {\n const root = findOverlayChromeRoot(this.nestingTarget(), this);\n const z = root && root !== wrapper ? computedZIndex(root) : null;\n if (z === null) return;\n wrapper.classList.add('a11y-is-nested');\n wrapper.style.setProperty('--a11y-z-parent', String(z));\n }\n\n protected override _show(): void {\n // Reopened mid-close: complete that close first (see A11yModalOverlayElement).\n this._flushPendingHide();\n // Re-shown while already open (e.g. a context menu re-right-clicked\n // elsewhere): drop the current chrome and its listeners, then rebuild.\n if (this._wrapper) this._teardownChrome();\n\n const wrapper = this.createWrapper();\n this._markNesting(wrapper);\n doc.body.appendChild(wrapper);\n this.classList.add(this.getContentClass());\n this._moveSelfTo(wrapper); // see A11yOverlayElement's class doc on why this isn't a raw appendChild\n this._wrapper = wrapper;\n\n this.updatePosition();\n this._bindDismissListeners(wrapper);\n this._bindRepositionListeners(wrapper);\n\n if (this.wantsFocusTrap()) {\n this._focusTrap = new FocusTrapHelper({ container: wrapper, options: this._focusTrapOptions() });\n this._focusTrap.activate();\n }\n\n // Skipped if closed before the frame: adding it then would animate a closing overlay back in.\n requestAnimationFrame(() => {\n if (this._wrapper === wrapper) wrapper.classList.add('a11y-is-open');\n });\n if (!this._isShowing) this._onShown();\n }\n\n protected override _hide(opts?: { immediate?: boolean }): void {\n // Focus already moved elsewhere on the page (e.g. the outside click that closes this landed\n // on a text field): leave it there rather than pulling it back to the trigger.\n const active = doc.activeElement;\n const focusMovedAway = !!this._wrapper && !!active && active !== doc.body && !this._wrapper.contains(active);\n this._unbindActiveListeners({ returnFocus: !focusMovedAway });\n\n const wrapper = this._wrapper;\n if (!wrapper) {\n if (this._pendingHide) {\n if (opts?.immediate) this._flushPendingHide();\n } else if (this._isShowing) {\n this._onHidden();\n }\n return;\n }\n this._wrapper = null;\n\n const finish = (): void => {\n this._pendingHide = null;\n this._cancelHideWait = null;\n this.classList.remove(this.getContentClass());\n // Detach from the wrapper before it's removed — unless the consumer is\n // removing this element from the document, which must stay removed.\n if (!this._detaching) this._moveSelfTo(doc.body);\n wrapper.remove();\n this._onHidden();\n };\n this._pendingHide = finish;\n\n if (opts?.immediate) {\n finish();\n return;\n }\n wrapper.classList.remove('a11y-is-open');\n this._cancelHideWait = whenTransitionDone(wrapper, finish);\n }\n\n private _flushPendingHide(): void {\n const finish = this._pendingHide;\n if (!finish) return;\n this._cancelHideWait?.();\n finish();\n }\n\n private _unbindActiveListeners(opts?: { returnFocus?: boolean }): void {\n this._focusTrap?.deactivate(opts);\n this._focusTrap = null;\n this._unbindDismissListeners();\n this._unbindRepositionListeners();\n }\n\n private _teardownChrome(): void {\n this._unbindActiveListeners();\n this._moveSelfTo(doc.body);\n this._wrapper?.remove();\n this._wrapper = null;\n }\n\n protected _focusTrapOptions(): IFocusTrapOptions {\n return { onDeactivate: () => this.close('escape') };\n }\n\n updatePosition(): void {\n const anchorRect = this._getAnchorRect();\n if (!anchorRect || !this._wrapper) return;\n\n const wrapperRect = this._wrapper.getBoundingClientRect();\n const viewportWidth = doc.documentElement.clientWidth;\n const viewportHeight = doc.documentElement.clientHeight;\n\n const { placement, top, left } = this._computePosition(anchorRect, wrapperRect, viewportWidth, viewportHeight);\n\n this._wrapper.setAttribute('data-placement', placement);\n this._wrapper.style.top = `${top}px`;\n this._wrapper.style.left = `${left}px`;\n }\n\n private _getAnchorRect(): DOMRect | null {\n if (this.anchorElement) return this.anchorElement.getBoundingClientRect();\n return this._anchorRect;\n }\n\n private _computePosition(\n anchorRect: DOMRect,\n wrapperRect: DOMRect,\n viewportWidth: number,\n viewportHeight: number,\n ): { placement: string; top: number; left: number } {\n const offset = this.offset;\n const [side, align] = this.placement.split('-') as [AnchoredSide, AnchoredAlign | undefined];\n\n const opposite: Record<AnchoredSide, AnchoredSide> = { top: 'bottom', bottom: 'top', left: 'right', right: 'left' };\n\n const fits = (s: AnchoredSide): boolean => {\n switch (s) {\n case 'top':\n return anchorRect.top - offset - wrapperRect.height >= 0;\n case 'bottom':\n return anchorRect.bottom + offset + wrapperRect.height <= viewportHeight;\n case 'left':\n return anchorRect.left - offset - wrapperRect.width >= 0;\n case 'right':\n return anchorRect.right + offset + wrapperRect.width <= viewportWidth;\n }\n };\n\n const resolvedSide = !fits(side) && fits(opposite[side]) ? opposite[side] : side;\n\n let top: number;\n let left: number;\n\n if (resolvedSide === 'top' || resolvedSide === 'bottom') {\n top = resolvedSide === 'top' ? anchorRect.top - offset - wrapperRect.height : anchorRect.bottom + offset;\n left = this._alignCrossAxis(align, anchorRect.left, anchorRect.right, wrapperRect.width);\n left = this._clamp(left, offset, viewportWidth - wrapperRect.width - offset);\n } else {\n left = resolvedSide === 'left' ? anchorRect.left - offset - wrapperRect.width : anchorRect.right + offset;\n top = this._alignCrossAxis(align, anchorRect.top, anchorRect.bottom, wrapperRect.height);\n top = this._clamp(top, offset, viewportHeight - wrapperRect.height - offset);\n }\n\n const placement = align ? `${resolvedSide}-${align}` : resolvedSide;\n return { placement, top, left };\n }\n\n private _alignCrossAxis(align: AnchoredAlign | undefined, anchorStart: number, anchorEnd: number, wrapperSize: number): number {\n if (align === 'start') return anchorStart;\n if (align === 'end') return anchorEnd - wrapperSize;\n return anchorStart + (anchorEnd - anchorStart) / 2 - wrapperSize / 2;\n }\n\n private _clamp(value: number, min: number, max: number): number {\n if (max < min) return min;\n return Math.min(Math.max(value, min), max);\n }\n\n private _bindDismissListeners(wrapper: HTMLElement): void {\n this._boundOutsideClick = (e: MouseEvent): void => {\n const target = e.target as Node;\n if (wrapper.contains(target) || this.anchorElement?.contains(target)) return;\n if (isInsideOverlayOpenedAfter(this, target)) return; // e.g. a dropdown opened from inside this popover\n this.close('outside-click');\n };\n // Deferred so the same click/tap that opened the overlay doesn't immediately close it.\n // Capture phase: decided before the click's own handlers run — a menu item's handler closes\n // its dropdown, and once closed the dropdown no longer counts as \"opened on top of this one\".\n this._outsideClickTimer = setTimeout(() => {\n doc.addEventListener('click', this._boundOutsideClick!, true);\n }, 0);\n // WebKit with a touch screen (iOS Safari, Linux WebKit) fires no `click` for a tap\n // unless the element tapped or one of its parents has a click listener: one on\n // `document` doesn't count. On <html>, not <body>: a tap below a short <body> lands on <html>.\n // Without this, a tap on empty page space wouldn't close the overlay.\n this._tapTargetRoot = doc.documentElement;\n this._tapTargetRoot.addEventListener('click', this._noopClick);\n\n if (!this.wantsFocusTrap()) {\n // Capture phase, before a focus trap's own document listener: Escape\n // dismisses this overlay only (e.g. a tooltip on a button inside a\n // modal), and `preventDefault()` tells every other handler it's taken.\n this._boundKeyDown = (e: KeyboardEvent): void => {\n if (e.key !== 'Escape' || e.defaultPrevented) return;\n // Capture listeners run in the order they were added, i.e. oldest overlay first:\n // leave Escape to whatever was opened on top of this one.\n if (hasOverlayOpenedAfter(this)) return;\n e.preventDefault();\n this.close('escape');\n };\n doc.addEventListener('keydown', this._boundKeyDown, true);\n }\n }\n\n private _unbindDismissListeners(): void {\n if (this._outsideClickTimer) {\n clearTimeout(this._outsideClickTimer);\n this._outsideClickTimer = null;\n }\n if (this._boundOutsideClick) {\n doc.removeEventListener('click', this._boundOutsideClick, true);\n this._boundOutsideClick = null;\n }\n if (this._tapTargetRoot) {\n this._tapTargetRoot.removeEventListener('click', this._noopClick);\n this._tapTargetRoot = null;\n }\n if (this._boundKeyDown) {\n doc.removeEventListener('keydown', this._boundKeyDown, true);\n this._boundKeyDown = null;\n }\n }\n\n private _bindRepositionListeners(wrapper: HTMLElement): void {\n this._boundReposition = () => this.updatePosition();\n window.addEventListener('scroll', this._boundReposition, true);\n window.addEventListener('resize', this._boundReposition);\n\n if (typeof ResizeObserver !== 'undefined') {\n this._resizeObserver = new ResizeObserver(this._boundReposition);\n if (this.anchorElement) this._resizeObserver.observe(this.anchorElement);\n this._resizeObserver.observe(wrapper);\n }\n }\n\n private _unbindRepositionListeners(): void {\n if (this._boundReposition) {\n window.removeEventListener('scroll', this._boundReposition, true);\n window.removeEventListener('resize', this._boundReposition);\n this._boundReposition = null;\n }\n this._resizeObserver?.disconnect();\n this._resizeObserver = null;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8BO,IAAe,6BAAf,cAAkD,mBAAmB;AAAA,EAC1E,WAAoB,qBAA+B;AACjD,WAAO,CAAC,QAAQ,UAAU,aAAa,QAAQ;AAAA,EACjD;AAAA,EAEU,WAA+B;AAAA,EACjC,YAAgC;AAAA,EAChC,cAA8B;AAAA,EAC9B,aAAqC;AAAA,EACrC,qBAAuD;AAAA,EACvD,qBAA2D;AAAA;AAAA,EAE3D,iBAAqC;AAAA;AAAA,EAErC,aAAa,MAAY;AAAA,EAAC;AAAA,EAC1B,gBAAqD;AAAA,EACrD,mBAAwC;AAAA,EACxC,kBAAyC;AAAA,EACzC,eAAoC;AAAA,EACpC,kBAAuC;AAAA;AAAA,EAG/C,IAAI,gBAAoC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I,KAAK,gBAAgB;AACvB,WAAK,eAAe,oBAAoB,SAAS,KAAK,UAAU;AAChE,WAAK,iBAAiB;AAAA,IACxB;AACA,QAAI,KAAK,eAAe;AACtB,UAAI,oBAAoB,WAAW,KAAK,eAAe,IAAI;AAC3D,WAAK,gBAAgB;AAAA,IACvB;AAAA,EACF;AAAA,EAEQ,yBAAyB,SAA4B;AAC3D,SAAK,mBAAmB,MAAM,KAAK,eAAe;AAClD,WAAO,iBAAiB,UAAU,KAAK,kBAAkB,IAAI;AAC7D,WAAO,iBAAiB,UAAU,KAAK,gBAAgB;AAEvD,QAAI,OAAO,mBAAmB,aAAa;AACzC,WAAK,kBAAkB,IAAI,eAAe,KAAK,gBAAgB;AAC/D,UAAI,KAAK,cAAe,MAAK,gBAAgB,QAAQ,KAAK,aAAa;AACvE,WAAK,gBAAgB,QAAQ,OAAO;AAAA,IACtC;AAAA,EACF;AAAA,EAEQ,6BAAmC;AACzC,QAAI,KAAK,kBAAkB;AACzB,aAAO,oBAAoB,UAAU,KAAK,kBAAkB,IAAI;AAChE,aAAO,oBAAoB,UAAU,KAAK,gBAAgB;AAC1D,WAAK,mBAAmB;AAAA,IAC1B;AACA,SAAK,iBAAiB,WAAW;AACjC,SAAK,kBAAkB;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
recordPortalOrigin,
|
|
12
12
|
registerOpenOverlay,
|
|
13
13
|
unregisterOpenOverlay
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H25W66MH.js";
|
|
15
15
|
import {
|
|
16
16
|
nextId
|
|
17
17
|
} from "./chunk-Q4TMA3P7.js";
|
|
@@ -547,4 +547,4 @@ defineElement("a11y-floating", FloatingElement);
|
|
|
547
547
|
export {
|
|
548
548
|
FloatingElement
|
|
549
549
|
};
|
|
550
|
-
//# sourceMappingURL=chunk-
|
|
550
|
+
//# sourceMappingURL=chunk-FJCQ4PVG.js.map
|