@aurodesignsystem-dev/auro-popover 0.0.0-pr141.1 → 0.0.0-pr141.2
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/demo/api.md +17 -17
- package/demo/api.min.js +7 -7
- package/demo/index.md +1 -1
- package/demo/index.min.js +7 -7
- package/dist/index.d.ts +10 -10
- package/package.json +1 -1
package/demo/api.md
CHANGED
|
@@ -14,14 +14,14 @@ Shows short supporting content next to a trigger when someone hovers over, focus
|
|
|
14
14
|
|
|
15
15
|
### Properties and attributes
|
|
16
16
|
|
|
17
|
-
| Properties | Attributes | Modifiers | Type | Default | Description
|
|
18
|
-
| ----------- | ----------- | --------- | ---------------- | ------- |
|
|
19
|
-
| addSpace | addspace | | boolean | | Adds more space between the popover and its trigger. When `removeSpace` is also set, `addSpace` takes effect.
|
|
20
|
-
| boundary | boundary | | string \| object | | Sets the element that keeps the popover from overflowing, such as a selector string or an HTML element.
|
|
21
|
-
| disabled | disabled | | boolean | | Turns the popover off. A disabled popover doesn't show on hover, focus, touch, or keyboard activation.
|
|
22
|
-
| for | for | | string | | Sets the ID of the trigger element, for when the trigger can't use the `trigger` slot. In most cases, set `slot="trigger"` on the element instead.
|
|
23
|
-
| placement | placement | | string | `top` | Sets
|
|
24
|
-
| removeSpace | removespace | | boolean | | Reduces the space between the popover and its trigger, so the popover sits closer to it. Has no effect when `addSpace` is also set.
|
|
17
|
+
| Properties | Attributes | Modifiers | Type | Default | Description |
|
|
18
|
+
| ----------- | ----------- | --------- | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| addSpace | addspace | | boolean | | Adds more space between the popover and its trigger. When `removeSpace` is also set, `addSpace` takes effect. |
|
|
20
|
+
| boundary | boundary | | string \| object | | Sets the element that keeps the popover from overflowing, such as a selector string or an HTML element. |
|
|
21
|
+
| disabled | disabled | | boolean | | Turns the popover off. A disabled popover doesn't show on hover, focus, touch, or keyboard activation. |
|
|
22
|
+
| for | for | | string | | Sets the ID of the trigger element, for when the trigger can't use the `trigger` slot. In most cases, set `slot="trigger"` on the element instead. |
|
|
23
|
+
| placement | placement | | string | `top` | Sets the popover's position: above the trigger with `top` (the default), or below it with `bottom`. The popover flips to the opposite side when there isn't room. Changing this after the first render does not currently move the popover. |
|
|
24
|
+
| removeSpace | removespace | | boolean | | Reduces the space between the popover and its trigger, so the popover sits closer to it. Has no effect when `addSpace` is also set. |
|
|
25
25
|
|
|
26
26
|
### Methods
|
|
27
27
|
|
|
@@ -46,11 +46,11 @@ Shows short supporting content next to a trigger when someone hovers over, focus
|
|
|
46
46
|
|
|
47
47
|
### CSS custom properties
|
|
48
48
|
|
|
49
|
-
| Name | Description
|
|
50
|
-
| --------------------------------- |
|
|
51
|
-
| --ds-auro-popover-boxshadow-color |
|
|
52
|
-
| --ds-auro-popover-container-color | Background color of the popover.
|
|
53
|
-
| --ds-auro-popover-text-color |
|
|
49
|
+
| Name | Description |
|
|
50
|
+
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| --ds-auro-popover-boxshadow-color | Shadow around the popover bubble. The default is a full `box-shadow` value (offsets, blur, and color), not a color alone. |
|
|
52
|
+
| --ds-auro-popover-container-color | Background color of the popover. |
|
|
53
|
+
| --ds-auro-popover-text-color | Text color of elements placed in the popover, such as a `<p>` or `<span>`. Plain text that isn't wrapped in an element doesn't currently use it, and elements in the `trigger` slot use it too. |
|
|
54
54
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
55
55
|
|
|
56
56
|
## Basic
|
|
@@ -78,7 +78,7 @@ Shows short supporting content next to a trigger when someone hovers over, focus
|
|
|
78
78
|
|
|
79
79
|
## Apply popover to any type of content
|
|
80
80
|
|
|
81
|
-
The trigger can be any element, not just buttons or links. The component automatically makes any non-focusable trigger keyboard accessible, including custom elements
|
|
81
|
+
The trigger can be any element, not just buttons or links. The component automatically makes any non-focusable trigger keyboard accessible, including custom elements that have no internal focusable element, such as `auro-icon`. For icon-based triggers without visible text, `aria-label` is still required to provide an accessible name.
|
|
82
82
|
|
|
83
83
|
> **Accessibility note:** `auro-popover` manages `aria-description` on the focusable elements within the trigger slot as part of its accessibility contract. The popover content becomes the trigger's accessible description, so screen readers announce it on focus. When the trigger is a non-focusable wrapper around focusable content, such as `<div><a href="#">link</a></div>`, the description is applied to each focusable descendant rather than the wrapper itself. The component replaces any existing `aria-description` on affected elements when it first renders and removes it when it disconnects.
|
|
84
84
|
>
|
|
@@ -94,7 +94,7 @@ The trigger can be any element, not just buttons or links. The component automat
|
|
|
94
94
|
<auro-icon slot="trigger" category="interface" name="information-stroke" aria-label="More information"></auro-icon>
|
|
95
95
|
</auro-popover>
|
|
96
96
|
<br><br>
|
|
97
|
-
<!--
|
|
97
|
+
<!-- The component automatically makes native elements, such as <abbr>, keyboard accessible. -->
|
|
98
98
|
<p>Congratulations, you just achieved
|
|
99
99
|
<auro-popover>
|
|
100
100
|
Most Valuable Passenger: Alaska Airlines' mid-tier elite status level.
|
|
@@ -115,7 +115,7 @@ The trigger can be any element, not just buttons or links. The component automat
|
|
|
115
115
|
<auro-icon slot="trigger" category="interface" name="information-stroke" aria-label="More information"></auro-icon>
|
|
116
116
|
</auro-popover>
|
|
117
117
|
<br><br>
|
|
118
|
-
<!--
|
|
118
|
+
<!-- The component automatically makes native elements, such as <abbr>, keyboard accessible. -->
|
|
119
119
|
<p>Congratulations, you just achieved
|
|
120
120
|
<auro-popover>
|
|
121
121
|
Most Valuable Passenger: Alaska Airlines' mid-tier elite status level.
|
|
@@ -299,7 +299,7 @@ Three things to know before reaching for these:
|
|
|
299
299
|
|
|
300
300
|
**The arrow's position is set by the component.** It's recalculated every time the popover opens. Use the `placement` attribute to choose which side the popover appears on. Resizing the arrow via `::part(arrow)::before` also shifts where it meets the bubble, so check both `placement="top"` and `placement="bottom"` if you change its dimensions.
|
|
301
301
|
|
|
302
|
-
**The `trigger` part is empty when you use `for`.** It wraps the trigger slot, so it only has something to style when the trigger is slotted into the component. If you point at an external element with `for`, that element
|
|
302
|
+
**The `trigger` part is empty when you use `for`.** It wraps the trigger slot, so it only has something to style when the trigger is slotted into the component. If you point at an external element with `for`, that element isn't inside the wrapper and `::part(trigger)` silently does nothing. Style the external trigger directly instead.
|
|
303
303
|
|
|
304
304
|
To adjust spacing between the popover and its trigger, prefer the `addspace` and `removespace` attributes over part overrides.
|
|
305
305
|
|
package/demo/api.min.js
CHANGED
|
@@ -2091,9 +2091,9 @@ var tokensCss = i$3`:host{--ds-auro-popover-boxshadow-color: var(--ds-elevation-
|
|
|
2091
2091
|
* @csspart arrow - The arrow that points from the popover to its trigger. Its visible shape is the `::before` pseudo-element, where color, shadow, and size are set. The component sets the arrow's position.
|
|
2092
2092
|
* @csspart trigger - The wrapper around the `trigger` slot, useful for correcting alignment between the trigger and the popover. Empty when the `for` attribute is used, because the trigger then lives outside the component.
|
|
2093
2093
|
*
|
|
2094
|
-
* @cssprop --ds-auro-popover-boxshadow-color -
|
|
2094
|
+
* @cssprop --ds-auro-popover-boxshadow-color - Shadow around the popover bubble. The default is a full `box-shadow` value (offsets, blur, and color), not a color alone.
|
|
2095
2095
|
* @cssprop --ds-auro-popover-container-color - Background color of the popover.
|
|
2096
|
-
* @cssprop --ds-auro-popover-text-color -
|
|
2096
|
+
* @cssprop --ds-auro-popover-text-color - Text color of elements placed in the popover, such as a `<p>` or `<span>`. Plain text that isn't wrapped in an element doesn't currently use it, and elements in the `trigger` slot use it too.
|
|
2097
2097
|
*/
|
|
2098
2098
|
class AuroPopover extends i {
|
|
2099
2099
|
constructor() {
|
|
@@ -2159,7 +2159,7 @@ class AuroPopover extends i {
|
|
|
2159
2159
|
},
|
|
2160
2160
|
|
|
2161
2161
|
/**
|
|
2162
|
-
* Sets
|
|
2162
|
+
* Sets the popover's position: above the trigger with `top` (the default), or below it with `bottom`. The popover flips to the opposite side when there isn't room. Changing this after the first render does not currently move the popover.
|
|
2163
2163
|
* @type {'top' | 'bottom'}
|
|
2164
2164
|
* @default 'top'
|
|
2165
2165
|
*/
|
|
@@ -2305,7 +2305,7 @@ class AuroPopover extends i {
|
|
|
2305
2305
|
* NOTE: This component is not currently designed for reinitialization.
|
|
2306
2306
|
* All setup in firstUpdated() is assumed to run once per instance lifecycle.
|
|
2307
2307
|
* If the element is removed and later reattached, event bindings,
|
|
2308
|
-
* Popper setup, and accessibility wiring
|
|
2308
|
+
* Popper setup, and accessibility wiring are NOT restored automatically.
|
|
2309
2309
|
*/
|
|
2310
2310
|
|
|
2311
2311
|
// Add the tag name as an attribute if it is different than the component name
|
|
@@ -2643,7 +2643,7 @@ class AuroPopover extends i {
|
|
|
2643
2643
|
/**
|
|
2644
2644
|
* Toggles the display of the popover content.
|
|
2645
2645
|
* @private
|
|
2646
|
-
* @returns {void}
|
|
2646
|
+
* @returns {void}
|
|
2647
2647
|
*/
|
|
2648
2648
|
toggle() {
|
|
2649
2649
|
if (!this.popper) {
|
|
@@ -2659,7 +2659,7 @@ class AuroPopover extends i {
|
|
|
2659
2659
|
/**
|
|
2660
2660
|
* Hides the popover.
|
|
2661
2661
|
* @private
|
|
2662
|
-
* @returns {void}
|
|
2662
|
+
* @returns {void}
|
|
2663
2663
|
*/
|
|
2664
2664
|
toggleHide() {
|
|
2665
2665
|
this.isPopoverVisible = false;
|
|
@@ -2668,7 +2668,7 @@ class AuroPopover extends i {
|
|
|
2668
2668
|
/**
|
|
2669
2669
|
* Shows the popover.
|
|
2670
2670
|
* @private
|
|
2671
|
-
* @returns {void}
|
|
2671
|
+
* @returns {void}
|
|
2672
2672
|
*/
|
|
2673
2673
|
toggleShow() {
|
|
2674
2674
|
if (!this.popper || this.disabled) {
|
package/demo/index.md
CHANGED
|
@@ -22,7 +22,7 @@ Use `auro-popover` to give people more detail without leaving the page, such as:
|
|
|
22
22
|
* Helper text for a control.
|
|
23
23
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
24
24
|
|
|
25
|
-
## Developer
|
|
25
|
+
## Developer notes
|
|
26
26
|
|
|
27
27
|
The popover shows when someone hovers over or focuses the trigger. Hover isn't reliable on touch devices, so a tap, detected with `touchstart`, also toggles the popover.
|
|
28
28
|
|
package/demo/index.min.js
CHANGED
|
@@ -2084,9 +2084,9 @@ var tokensCss = i$3`:host{--ds-auro-popover-boxshadow-color: var(--ds-elevation-
|
|
|
2084
2084
|
* @csspart arrow - The arrow that points from the popover to its trigger. Its visible shape is the `::before` pseudo-element, where color, shadow, and size are set. The component sets the arrow's position.
|
|
2085
2085
|
* @csspart trigger - The wrapper around the `trigger` slot, useful for correcting alignment between the trigger and the popover. Empty when the `for` attribute is used, because the trigger then lives outside the component.
|
|
2086
2086
|
*
|
|
2087
|
-
* @cssprop --ds-auro-popover-boxshadow-color -
|
|
2087
|
+
* @cssprop --ds-auro-popover-boxshadow-color - Shadow around the popover bubble. The default is a full `box-shadow` value (offsets, blur, and color), not a color alone.
|
|
2088
2088
|
* @cssprop --ds-auro-popover-container-color - Background color of the popover.
|
|
2089
|
-
* @cssprop --ds-auro-popover-text-color -
|
|
2089
|
+
* @cssprop --ds-auro-popover-text-color - Text color of elements placed in the popover, such as a `<p>` or `<span>`. Plain text that isn't wrapped in an element doesn't currently use it, and elements in the `trigger` slot use it too.
|
|
2090
2090
|
*/
|
|
2091
2091
|
class AuroPopover extends i {
|
|
2092
2092
|
constructor() {
|
|
@@ -2152,7 +2152,7 @@ class AuroPopover extends i {
|
|
|
2152
2152
|
},
|
|
2153
2153
|
|
|
2154
2154
|
/**
|
|
2155
|
-
* Sets
|
|
2155
|
+
* Sets the popover's position: above the trigger with `top` (the default), or below it with `bottom`. The popover flips to the opposite side when there isn't room. Changing this after the first render does not currently move the popover.
|
|
2156
2156
|
* @type {'top' | 'bottom'}
|
|
2157
2157
|
* @default 'top'
|
|
2158
2158
|
*/
|
|
@@ -2298,7 +2298,7 @@ class AuroPopover extends i {
|
|
|
2298
2298
|
* NOTE: This component is not currently designed for reinitialization.
|
|
2299
2299
|
* All setup in firstUpdated() is assumed to run once per instance lifecycle.
|
|
2300
2300
|
* If the element is removed and later reattached, event bindings,
|
|
2301
|
-
* Popper setup, and accessibility wiring
|
|
2301
|
+
* Popper setup, and accessibility wiring are NOT restored automatically.
|
|
2302
2302
|
*/
|
|
2303
2303
|
|
|
2304
2304
|
// Add the tag name as an attribute if it is different than the component name
|
|
@@ -2636,7 +2636,7 @@ class AuroPopover extends i {
|
|
|
2636
2636
|
/**
|
|
2637
2637
|
* Toggles the display of the popover content.
|
|
2638
2638
|
* @private
|
|
2639
|
-
* @returns {void}
|
|
2639
|
+
* @returns {void}
|
|
2640
2640
|
*/
|
|
2641
2641
|
toggle() {
|
|
2642
2642
|
if (!this.popper) {
|
|
@@ -2652,7 +2652,7 @@ class AuroPopover extends i {
|
|
|
2652
2652
|
/**
|
|
2653
2653
|
* Hides the popover.
|
|
2654
2654
|
* @private
|
|
2655
|
-
* @returns {void}
|
|
2655
|
+
* @returns {void}
|
|
2656
2656
|
*/
|
|
2657
2657
|
toggleHide() {
|
|
2658
2658
|
this.isPopoverVisible = false;
|
|
@@ -2661,7 +2661,7 @@ class AuroPopover extends i {
|
|
|
2661
2661
|
/**
|
|
2662
2662
|
* Shows the popover.
|
|
2663
2663
|
* @private
|
|
2664
|
-
* @returns {void}
|
|
2664
|
+
* @returns {void}
|
|
2665
2665
|
*/
|
|
2666
2666
|
toggleShow() {
|
|
2667
2667
|
if (!this.popper || this.disabled) {
|
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export type AuroPopoverProps = {
|
|
|
87
87
|
disabled?: AuroPopover["disabled"];
|
|
88
88
|
/** Sets the ID of the trigger element, for when the trigger can't use the `trigger` slot. In most cases, set `slot="trigger"` on the element instead. */
|
|
89
89
|
for?: AuroPopover["for"];
|
|
90
|
-
/** Sets
|
|
90
|
+
/** Sets the popover's position: above the trigger with `top` (the default), or below it with `bottom`. The popover flips to the opposite side when there isn't room. Changing this after the first render does not currently move the popover. */
|
|
91
91
|
placement?: AuroPopover["placement"];
|
|
92
92
|
/** Reduces the space between the popover and its trigger, so the popover sits closer to it. Has no effect when `addSpace` is also set. */
|
|
93
93
|
removespace?: AuroPopover["removeSpace"];
|
|
@@ -126,7 +126,7 @@ export type AuroPopoverSolidJsProps = {
|
|
|
126
126
|
"prop:disabled"?: AuroPopover["disabled"];
|
|
127
127
|
/** Sets the ID of the trigger element, for when the trigger can't use the `trigger` slot. In most cases, set `slot="trigger"` on the element instead. */
|
|
128
128
|
"prop:for"?: AuroPopover["for"];
|
|
129
|
-
/** Sets
|
|
129
|
+
/** Sets the popover's position: above the trigger with `top` (the default), or below it with `bottom`. The popover flips to the opposite side when there isn't room. Changing this after the first render does not currently move the popover. */
|
|
130
130
|
"prop:placement"?: AuroPopover["placement"];
|
|
131
131
|
/** Reduces the space between the popover and its trigger, so the popover sits closer to it. Has no effect when `addSpace` is also set. */
|
|
132
132
|
"bool:removespace"?: AuroPopover["removeSpace"];
|
|
@@ -178,7 +178,7 @@ export type CustomElements = {
|
|
|
178
178
|
* - `boundary`: Sets the element that keeps the popover from overflowing, such as a selector string or an HTML element.
|
|
179
179
|
* - `disabled`: Turns the popover off. A disabled popover doesn't show on hover, focus, touch, or keyboard activation.
|
|
180
180
|
* - `for`: Sets the ID of the trigger element, for when the trigger can't use the `trigger` slot. In most cases, set `slot="trigger"` on the element instead.
|
|
181
|
-
* - `placement`: Sets
|
|
181
|
+
* - `placement`: Sets the popover's position: above the trigger with `top` (the default), or below it with `bottom`. The popover flips to the opposite side when there isn't room. Changing this after the first render does not currently move the popover.
|
|
182
182
|
* - `removespace`/`removeSpace`: Reduces the space between the popover and its trigger, so the popover sits closer to it. Has no effect when `addSpace` is also set.
|
|
183
183
|
* - `_addedTabIndex`: undefined (property only)
|
|
184
184
|
* - `_onBodyMouseover`: undefined (property only)
|
|
@@ -208,9 +208,9 @@ export type CustomElements = {
|
|
|
208
208
|
*
|
|
209
209
|
* CSS variables available for styling the component.
|
|
210
210
|
*
|
|
211
|
-
* - `--ds-auro-popover-boxshadow-color`:
|
|
211
|
+
* - `--ds-auro-popover-boxshadow-color`: Shadow around the popover bubble. The default is a full `box-shadow` value (offsets, blur, and color), not a color alone. (default: `undefined`)
|
|
212
212
|
* - `--ds-auro-popover-container-color`: Background color of the popover. (default: `undefined`)
|
|
213
|
-
* - `--ds-auro-popover-text-color`:
|
|
213
|
+
* - `--ds-auro-popover-text-color`: Text color of elements placed in the popover, such as a `<p>` or `<span>`. Plain text that isn't wrapped in an element doesn't currently use it, and elements in the `trigger` slot use it too. (default: `undefined`)
|
|
214
214
|
*
|
|
215
215
|
* ## CSS Parts
|
|
216
216
|
*
|
|
@@ -244,7 +244,7 @@ export type CustomElementsSolidJs = {
|
|
|
244
244
|
* - `boundary`: Sets the element that keeps the popover from overflowing, such as a selector string or an HTML element.
|
|
245
245
|
* - `disabled`: Turns the popover off. A disabled popover doesn't show on hover, focus, touch, or keyboard activation.
|
|
246
246
|
* - `for`: Sets the ID of the trigger element, for when the trigger can't use the `trigger` slot. In most cases, set `slot="trigger"` on the element instead.
|
|
247
|
-
* - `placement`: Sets
|
|
247
|
+
* - `placement`: Sets the popover's position: above the trigger with `top` (the default), or below it with `bottom`. The popover flips to the opposite side when there isn't room. Changing this after the first render does not currently move the popover.
|
|
248
248
|
* - `removespace`/`removeSpace`: Reduces the space between the popover and its trigger, so the popover sits closer to it. Has no effect when `addSpace` is also set.
|
|
249
249
|
* - `_addedTabIndex`: undefined (property only)
|
|
250
250
|
* - `_onBodyMouseover`: undefined (property only)
|
|
@@ -274,9 +274,9 @@ export type CustomElementsSolidJs = {
|
|
|
274
274
|
*
|
|
275
275
|
* CSS variables available for styling the component.
|
|
276
276
|
*
|
|
277
|
-
* - `--ds-auro-popover-boxshadow-color`:
|
|
277
|
+
* - `--ds-auro-popover-boxshadow-color`: Shadow around the popover bubble. The default is a full `box-shadow` value (offsets, blur, and color), not a color alone. (default: `undefined`)
|
|
278
278
|
* - `--ds-auro-popover-container-color`: Background color of the popover. (default: `undefined`)
|
|
279
|
-
* - `--ds-auro-popover-text-color`:
|
|
279
|
+
* - `--ds-auro-popover-text-color`: Text color of elements placed in the popover, such as a `<p>` or `<span>`. Plain text that isn't wrapped in an element doesn't currently use it, and elements in the `trigger` slot use it too. (default: `undefined`)
|
|
280
280
|
*
|
|
281
281
|
* ## CSS Parts
|
|
282
282
|
*
|
|
@@ -295,11 +295,11 @@ export type CustomElementsSolidJs = {
|
|
|
295
295
|
};
|
|
296
296
|
|
|
297
297
|
export type CustomCssProperties = {
|
|
298
|
-
/**
|
|
298
|
+
/** Shadow around the popover bubble. The default is a full `box-shadow` value (offsets, blur, and color), not a color alone. */
|
|
299
299
|
"--ds-auro-popover-boxshadow-color"?: string;
|
|
300
300
|
/** Background color of the popover. */
|
|
301
301
|
"--ds-auro-popover-container-color"?: string;
|
|
302
|
-
/**
|
|
302
|
+
/** Text color of elements placed in the popover, such as a `<p>` or `<span>`. Plain text that isn't wrapped in an element doesn't currently use it, and elements in the `trigger` slot use it too. */
|
|
303
303
|
"--ds-auro-popover-text-color"?: string;
|
|
304
304
|
};
|
|
305
305
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem-dev/auro-popover",
|
|
10
|
-
"version": "0.0.0-pr141.
|
|
10
|
+
"version": "0.0.0-pr141.2",
|
|
11
11
|
"description": "auro-popover HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|