@aurodesignsystem-dev/auro-popover 0.0.0-pr135.0 → 0.0.0-pr135.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 +28 -26
- package/demo/api.min.js +1 -1
- package/demo/index.min.js +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/demo/api.md
CHANGED
|
@@ -36,7 +36,7 @@ The `auro-popover` element attaches to another element and displays on hover.
|
|
|
36
36
|
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
37
37
|
| arrow | Apply CSS to the arrow's positioning anchor. The visible arrow shape is its `::before` pseudo-element, so target `::part(arrow)::before` to restyle color, shadow, or size. Arrow position is set by Popper as inline styles and cannot be overridden through this part. |
|
|
38
38
|
| popover | Apply CSS to the popover bubble container. |
|
|
39
|
-
| trigger | Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover.
|
|
39
|
+
| trigger | Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover. Has no effect when the `for` attribute is used, as the trigger then lives outside the component and this wrapper is empty. |
|
|
40
40
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
41
41
|
|
|
42
42
|
## Basic
|
|
@@ -337,38 +337,40 @@ In the event that a hyperlink UI is desired, it is recommended to use the `role=
|
|
|
337
337
|
|
|
338
338
|
The component exposes the `popover` bubble, the `arrow`, and the `trigger` wrapper as CSS shadow parts, so they can be styled from outside the shadow DOM.
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
Three things to know before reaching for these:
|
|
341
341
|
|
|
342
342
|
**The arrow's visible shape is a pseudo-element.** `::part(arrow)` selects an invisible positioning anchor; the diamond you see is its `::before`. Target `::part(arrow)::before` to change color, shadow, or size. Because the arrow and the bubble are painted separately, recolor both together or the seam between them will show.
|
|
343
343
|
|
|
344
344
|
**The arrow's position belongs to the component.** Placement is set by Popper as inline styles that are recalculated every time the popover opens, so `transform`, `top`, `left`, and `position` cannot be overridden through `::part(arrow)`. 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 verify both `placement="top"` and `placement="bottom"` if you change its dimensions.
|
|
345
345
|
|
|
346
|
+
**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 is not inside the wrapper and `::part(trigger)` will silently do nothing — style the external trigger directly instead.
|
|
347
|
+
|
|
346
348
|
To adjust spacing between the popover and its trigger, prefer the `addspace` and `removespace` attributes over part overrides.
|
|
347
349
|
|
|
348
350
|
<div class="exampleWrapper">
|
|
349
351
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/cssParts.html) -->
|
|
350
352
|
<!-- The below content is automatically added from ../apiExamples/cssParts.html -->
|
|
351
|
-
<!--
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
markdown turns 4-space-indented lines into a code block, which silently
|
|
355
|
-
breaks the stylesheet. -->
|
|
353
|
+
<!-- Scoped to .cssPartsExample. Keep every line in this <style> block at
|
|
354
|
+
column zero with no blank lines — the docs generator indents it, and a
|
|
355
|
+
4-space indent turns it into a code block. -->
|
|
356
356
|
<style>
|
|
357
|
-
/*
|
|
357
|
+
/* Bubble container. */
|
|
358
358
|
.cssPartsExample auro-popover::part(popover) {
|
|
359
359
|
color: #fff;
|
|
360
360
|
border-radius: 0;
|
|
361
361
|
background-color: #01426a;
|
|
362
362
|
}
|
|
363
|
-
/*
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
/* `color` above only reaches bare text; element content is matched by
|
|
364
|
+
::slotted(*), which beats inheritance. Set the token or markup loses contrast. */
|
|
365
|
+
.cssPartsExample auro-popover {
|
|
366
|
+
--ds-auro-popover-text-color: #fff;
|
|
367
|
+
}
|
|
368
|
+
/* The visible arrow is the part's ::before, not ::part(arrow) itself.
|
|
369
|
+
Match the bubble background or a seam shows. */
|
|
366
370
|
.cssPartsExample auro-popover::part(arrow)::before {
|
|
367
|
-
box-shadow: none;
|
|
368
371
|
background-color: #01426a;
|
|
369
372
|
}
|
|
370
|
-
/*
|
|
371
|
-
instead of resorting to layout workarounds. */
|
|
373
|
+
/* Trigger wrapper — aligns an icon trigger with adjacent text. */
|
|
372
374
|
.cssPartsExample .iconTrigger auro-popover::part(trigger) {
|
|
373
375
|
display: inline-flex;
|
|
374
376
|
align-items: center;
|
|
@@ -394,27 +396,27 @@ To adjust spacing between the popover and its trigger, prefer the `addspace` and
|
|
|
394
396
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/cssParts.html) -->
|
|
395
397
|
<!-- The below code snippet is automatically added from ../apiExamples/cssParts.html -->
|
|
396
398
|
|
|
397
|
-
<pre class="language-html"><code class="language-html"><!--
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
markdown turns 4-space-indented lines into a code block, which silently
|
|
401
|
-
breaks the stylesheet. -->
|
|
399
|
+
<pre class="language-html"><code class="language-html"><!-- Scoped to .cssPartsExample. Keep every line in this <style> block at
|
|
400
|
+
column zero with no blank lines — the docs generator indents it, and a
|
|
401
|
+
4-space indent turns it into a code block. -->
|
|
402
402
|
<style>
|
|
403
|
-
/*
|
|
403
|
+
/* Bubble container. */
|
|
404
404
|
.cssPartsExample auro-popover::part(popover) {
|
|
405
405
|
color: #fff;
|
|
406
406
|
border-radius: 0;
|
|
407
407
|
background-color: #01426a;
|
|
408
408
|
}
|
|
409
|
-
/*
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
/* `color` above only reaches bare text; element content is matched by
|
|
410
|
+
::slotted(*), which beats inheritance. Set the token or markup loses contrast. */
|
|
411
|
+
.cssPartsExample auro-popover {
|
|
412
|
+
--ds-auro-popover-text-color: #fff;
|
|
413
|
+
}
|
|
414
|
+
/* The visible arrow is the part's ::before, not ::part(arrow) itself.
|
|
415
|
+
Match the bubble background or a seam shows. */
|
|
412
416
|
.cssPartsExample auro-popover::part(arrow)::before {
|
|
413
|
-
box-shadow: none;
|
|
414
417
|
background-color: #01426a;
|
|
415
418
|
}
|
|
416
|
-
/*
|
|
417
|
-
instead of resorting to layout workarounds. */
|
|
419
|
+
/* Trigger wrapper — aligns an icon trigger with adjacent text. */
|
|
418
420
|
.cssPartsExample .iconTrigger auro-popover::part(trigger) {
|
|
419
421
|
display: inline-flex;
|
|
420
422
|
align-items: center;
|
package/demo/api.min.js
CHANGED
|
@@ -2074,7 +2074,7 @@ var tokensCss = i$3`:host{--ds-auro-popover-boxshadow-color: var(--ds-elevation-
|
|
|
2074
2074
|
*
|
|
2075
2075
|
* @csspart popover - Apply CSS to the popover bubble container.
|
|
2076
2076
|
* @csspart arrow - Apply CSS to the arrow's positioning anchor. The visible arrow shape is its `::before` pseudo-element, so target `::part(arrow)::before` to restyle color, shadow, or size. Arrow position is set by Popper as inline styles and cannot be overridden through this part.
|
|
2077
|
-
* @csspart trigger - Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover.
|
|
2077
|
+
* @csspart trigger - Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover. Has no effect when the `for` attribute is used, as the trigger then lives outside the component and this wrapper is empty.
|
|
2078
2078
|
*/
|
|
2079
2079
|
class AuroPopover extends i {
|
|
2080
2080
|
constructor() {
|
package/demo/index.min.js
CHANGED
|
@@ -2067,7 +2067,7 @@ var tokensCss = i$3`:host{--ds-auro-popover-boxshadow-color: var(--ds-elevation-
|
|
|
2067
2067
|
*
|
|
2068
2068
|
* @csspart popover - Apply CSS to the popover bubble container.
|
|
2069
2069
|
* @csspart arrow - Apply CSS to the arrow's positioning anchor. The visible arrow shape is its `::before` pseudo-element, so target `::part(arrow)::before` to restyle color, shadow, or size. Arrow position is set by Popper as inline styles and cannot be overridden through this part.
|
|
2070
|
-
* @csspart trigger - Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover.
|
|
2070
|
+
* @csspart trigger - Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover. Has no effect when the `for` attribute is used, as the trigger then lives outside the component and this wrapper is empty.
|
|
2071
2071
|
*/
|
|
2072
2072
|
class AuroPopover extends i {
|
|
2073
2073
|
constructor() {
|
package/dist/index.d.ts
CHANGED
|
@@ -218,7 +218,7 @@ export type CustomElements = {
|
|
|
218
218
|
*
|
|
219
219
|
* - `arrow`: Apply CSS to the arrow's positioning anchor. The visible arrow shape is its `::before` pseudo-element, so target `::part(arrow)::before` to restyle color, shadow, or size. Arrow position is set by Popper as inline styles and cannot be overridden through this part.
|
|
220
220
|
* - `popover`: Apply CSS to the popover bubble container.
|
|
221
|
-
* - `trigger`: Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover.
|
|
221
|
+
* - `trigger`: Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover. Has no effect when the `for` attribute is used, as the trigger then lives outside the component and this wrapper is empty.
|
|
222
222
|
*/
|
|
223
223
|
"auro-popover": Partial<
|
|
224
224
|
AuroPopoverProps & BaseProps<AuroPopover> & BaseEvents
|
|
@@ -272,7 +272,7 @@ export type CustomElementsSolidJs = {
|
|
|
272
272
|
*
|
|
273
273
|
* - `arrow`: Apply CSS to the arrow's positioning anchor. The visible arrow shape is its `::before` pseudo-element, so target `::part(arrow)::before` to restyle color, shadow, or size. Arrow position is set by Popper as inline styles and cannot be overridden through this part.
|
|
274
274
|
* - `popover`: Apply CSS to the popover bubble container.
|
|
275
|
-
* - `trigger`: Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover.
|
|
275
|
+
* - `trigger`: Apply CSS to the wrapper around the trigger slot. Use to correct alignment between the trigger and the popover. Has no effect when the `for` attribute is used, as the trigger then lives outside the component and this wrapper is empty.
|
|
276
276
|
*/
|
|
277
277
|
"auro-popover": Partial<
|
|
278
278
|
AuroPopoverProps &
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem-dev/auro-popover",
|
|
10
|
-
"version": "0.0.0-pr135.
|
|
10
|
+
"version": "0.0.0-pr135.2",
|
|
11
11
|
"description": "auro-popover HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|