@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 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
- Two things to know before reaching for these:
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
- <!-- Selectors are scoped to .cssPartsExample so this demo does not restyle
352
- other popovers on the page. Keep every line in this <style> block at column
353
- zero with no blank lines: the docs generator indents injected examples, and
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
- /* The bubble container. */
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
- /* The visible arrow is the ::before pseudo-element of the arrow part, so
364
- recolor that rather than ::part(arrow) itself. Keep it matched to the
365
- bubble's background or the seam between them will show. */
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
- /* The trigger wrapper. Use it to line an icon trigger up with adjacent text
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">&lt;!-- Selectors are scoped to .cssPartsExample so this demo does not restyle
398
- other popovers on the page. Keep every line in this &lt;style&gt; block at column
399
- zero with no blank lines: the docs generator indents injected examples, and
400
- markdown turns 4-space-indented lines into a code block, which silently
401
- breaks the stylesheet. --&gt;
399
+ <pre class="language-html"><code class="language-html">&lt;!-- Scoped to .cssPartsExample. Keep every line in this &lt;style&gt; 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. --&gt;
402
402
  &lt;style&gt;
403
- /* The bubble container. */
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
- /* The visible arrow is the ::before pseudo-element of the arrow part, so
410
- recolor that rather than ::part(arrow) itself. Keep it matched to the
411
- bubble's background or the seam between them will show. */
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
- /* The trigger wrapper. Use it to line an icon trigger up with adjacent text
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.0",
10
+ "version": "0.0.0-pr135.2",
11
11
  "description": "auro-popover HTML custom element",
12
12
  "repository": {
13
13
  "type": "git",