@proximus/lavender 2.0.0-alpha.80 → 2.0.0-alpha.82

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.
@@ -2395,57 +2395,57 @@ const subgridRowsValues = [
2395
2395
  "11",
2396
2396
  "12"
2397
2397
  ];
2398
- const attributeBreakpointCSSSelector$4 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .container`;
2398
+ const attributeBreakpointCSSSelector$3 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .container`;
2399
2399
  const paddingPrefix$1 = "px-padding";
2400
2400
  const containerBreakpoints = [
2401
2401
  cssTokenBreakpoints(
2402
2402
  "padding",
2403
- attributeBreakpointCSSSelector$4,
2403
+ attributeBreakpointCSSSelector$3,
2404
2404
  paddingValues,
2405
2405
  paddingPrefix$1,
2406
2406
  "--container-padding"
2407
2407
  ),
2408
2408
  cssTokenBreakpoints(
2409
2409
  "padding-inline",
2410
- attributeBreakpointCSSSelector$4,
2410
+ attributeBreakpointCSSSelector$3,
2411
2411
  paddingValues,
2412
2412
  paddingPrefix$1
2413
2413
  ),
2414
2414
  cssTokenBreakpoints(
2415
2415
  "padding-block",
2416
- attributeBreakpointCSSSelector$4,
2416
+ attributeBreakpointCSSSelector$3,
2417
2417
  paddingValues,
2418
2418
  paddingPrefix$1
2419
2419
  ),
2420
2420
  cssTokenBreakpoints(
2421
2421
  "padding-top",
2422
- attributeBreakpointCSSSelector$4,
2422
+ attributeBreakpointCSSSelector$3,
2423
2423
  paddingValues,
2424
2424
  paddingPrefix$1
2425
2425
  ),
2426
2426
  cssTokenBreakpoints(
2427
2427
  "padding-right",
2428
- attributeBreakpointCSSSelector$4,
2428
+ attributeBreakpointCSSSelector$3,
2429
2429
  paddingValues,
2430
2430
  paddingPrefix$1,
2431
2431
  "--container-padding-right"
2432
2432
  ),
2433
2433
  cssTokenBreakpoints(
2434
2434
  "padding-bottom",
2435
- attributeBreakpointCSSSelector$4,
2435
+ attributeBreakpointCSSSelector$3,
2436
2436
  paddingValues,
2437
2437
  paddingPrefix$1
2438
2438
  ),
2439
2439
  cssTokenBreakpoints(
2440
2440
  "padding-left",
2441
- attributeBreakpointCSSSelector$4,
2441
+ attributeBreakpointCSSSelector$3,
2442
2442
  paddingValues,
2443
2443
  paddingPrefix$1,
2444
2444
  "--container-padding-left"
2445
2445
  ),
2446
2446
  cssTokenBreakpoints(
2447
2447
  "gap",
2448
- attributeBreakpointCSSSelector$4,
2448
+ attributeBreakpointCSSSelector$3,
2449
2449
  gapValues,
2450
2450
  "px-spacing",
2451
2451
  void 0,
@@ -3539,11 +3539,11 @@ const contentAlignmentValues = [
3539
3539
  "stretch"
3540
3540
  ];
3541
3541
  const itemsAlignmentValues = ["", "start", "end", "center", "stretch"];
3542
- const attributeBreakpointCSSSelector$3 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .grid`;
3542
+ const attributeBreakpointCSSSelector$2 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .grid`;
3543
3543
  const gapPrefix$1 = "px-spacing";
3544
3544
  const gapCssTokenBreakpoints = cssTokenBreakpoints(
3545
3545
  "gap",
3546
- attributeBreakpointCSSSelector$3,
3546
+ attributeBreakpointCSSSelector$2,
3547
3547
  gapValues,
3548
3548
  gapPrefix$1,
3549
3549
  "--grid-gap"
@@ -4868,7 +4868,7 @@ const cardBackgroundColorValues = [
4868
4868
  const cardPaddingValues = ["", "s", "m", "l"];
4869
4869
  const cardMediaLeftSizeValues = ["", "s", "m"];
4870
4870
  const cardMediaPositionValues = ["", "top", "left", "background"];
4871
- const attributeBreakpointCSSSelector$2 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .card__content`;
4871
+ const attributeBreakpointCSSSelector$1 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .card__content`;
4872
4872
  const paddingPrefix = "px-padding";
4873
4873
  const _Card = class _Card extends VerticallyExtendedElement {
4874
4874
  constructor() {
@@ -4876,7 +4876,7 @@ const _Card = class _Card extends VerticallyExtendedElement {
4876
4876
  styleSheet$B,
4877
4877
  cssTokenBreakpoints(
4878
4878
  "padding",
4879
- attributeBreakpointCSSSelector$2,
4879
+ attributeBreakpointCSSSelector$1,
4880
4880
  cardPaddingValues,
4881
4881
  paddingPrefix,
4882
4882
  "--card__content-padding"
@@ -5237,8 +5237,8 @@ let Card = _Card;
5237
5237
  if (!customElements.get("px-card")) {
5238
5238
  customElements.define("px-card", Card);
5239
5239
  }
5240
- const styles$G = ":host{display:block}:host *{box-sizing:border-box}.carousel{overflow:hidden;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;gap:var(--px-spacing-default-desktop)}@media only screen and (max-width: 768px){.carousel{gap:var(--px-spacing-default-mobile)}}#appleseed-container{margin-inline:var(--px-spacing-s-mobile)}@media only screen and (max-width: 768px){#button-icons{display:none}}.carousel::-webkit-scrollbar{display:none}";
5241
- const itemStyles = "::slotted(*){border-radius:var(--px-radius-main);height:100%}.carousel-item{height:100%}:host{scroll-snap-align:start;align-items:center;justify-content:center;flex:1 0 var( --px-carousel-min-width-desktop, var(--px-carousel-min-width-all-desktop) );border-radius:var(--px-radius-main);background:#fff;overflow:hidden}@media screen and (max-width: 768px){:host{scroll-snap-align:center;flex:1 0 var( --px-carousel-min-width-mobile, var(--px-carousel-min-width-all-mobile) )!important}}@media screen and (min-width: 768px) and (max-width: 1024px){:host{flex:1 0 var( --px-carousel-min-width-tablet, var(--px-carousel-min-width-all-tablet) )!important}}";
5240
+ const styles$G = ':host{display:block;--px-carousel-visible-items: 1;--px-carousel-gap-default: var(--px-spacing-default-desktop)}:host *{box-sizing:border-box}:host([visible-items="1"]){--px-carousel-visible-items: 1}:host([visible-items="2"]){--px-carousel-visible-items: 2}:host([visible-items="3"]){--px-carousel-visible-items: 3}:host([visible-items="4"]){--px-carousel-visible-items: 4}:host([visible-items="5"]){--px-carousel-visible-items: 5}:host([visible-items="6"]){--px-carousel-visible-items: 6}:host([visible-items="7"]){--px-carousel-visible-items: 7}:host([visible-items="8"]){--px-carousel-visible-items: 8}:host([visible-items="9"]){--px-carousel-visible-items: 9}:host([visible-items--mobile="1"]){--px-carousel-visible-items--mobile: 1}:host([visible-items--mobile="2"]){--px-carousel-visible-items--mobile: 2}:host([visible-items--mobile="3"]){--px-carousel-visible-items--mobile: 3}:host([visible-items--mobile="4"]){--px-carousel-visible-items--mobile: 4}:host([visible-items--mobile="5"]){--px-carousel-visible-items--mobile: 5}:host([visible-items--mobile="6"]){--px-carousel-visible-items--mobile: 6}:host([visible-items--mobile="7"]){--px-carousel-visible-items--mobile: 7}:host([visible-items--mobile="8"]){--px-carousel-visible-items--mobile: 8}:host([visible-items--mobile="9"]){--px-carousel-visible-items--mobile: 9}:host([visible-items--tablet="1"]){--px-carousel-visible-items--tablet: 1}:host([visible-items--tablet="2"]){--px-carousel-visible-items--tablet: 2}:host([visible-items--tablet="3"]){--px-carousel-visible-items--tablet: 3}:host([visible-items--tablet="4"]){--px-carousel-visible-items--tablet: 4}:host([visible-items--tablet="5"]){--px-carousel-visible-items--tablet: 5}:host([visible-items--tablet="6"]){--px-carousel-visible-items--tablet: 6}:host([visible-items--tablet="7"]){--px-carousel-visible-items--tablet: 7}:host([visible-items--tablet="8"]){--px-carousel-visible-items--tablet: 8}:host([visible-items--tablet="9"]){--px-carousel-visible-items--tablet: 9}:host([visible-items--laptop="1"]){--px-carousel-visible-items--laptop: 1}:host([visible-items--laptop="2"]){--px-carousel-visible-items--laptop: 2}:host([visible-items--laptop="3"]){--px-carousel-visible-items--laptop: 3}:host([visible-items--laptop="4"]){--px-carousel-visible-items--laptop: 4}:host([visible-items--laptop="5"]){--px-carousel-visible-items--laptop: 5}:host([visible-items--laptop="6"]){--px-carousel-visible-items--laptop: 6}:host([visible-items--laptop="7"]){--px-carousel-visible-items--laptop: 7}:host([visible-items--laptop="8"]){--px-carousel-visible-items--laptop: 8}:host([visible-items--laptop="9"]){--px-carousel-visible-items--laptop: 9}:host([visible-items--desktop="1"]){--px-carousel-visible-items--desktop: 1}:host([visible-items--desktop="2"]){--px-carousel-visible-items--desktop: 2}:host([visible-items--desktop="3"]){--px-carousel-visible-items--desktop: 3}:host([visible-items--desktop="4"]){--px-carousel-visible-items--desktop: 4}:host([visible-items--desktop="5"]){--px-carousel-visible-items--desktop: 5}:host([visible-items--desktop="6"]){--px-carousel-visible-items--desktop: 6}:host([visible-items--desktop="7"]){--px-carousel-visible-items--desktop: 7}:host([visible-items--desktop="8"]){--px-carousel-visible-items--desktop: 8}:host([visible-items--desktop="9"]){--px-carousel-visible-items--desktop: 9}:host([gap="default"]){--px-carousel-gap-default: var(--px-spacing-default-desktop)}:host([gap="s"]){--px-carousel-gap-default: var(--px-spacing-s-desktop)}:host([gap="xs"]){--px-carousel-gap-default: var(--px-spacing-xs-desktop)}:host([gap="2xs"]){--px-carousel-gap-default: var(--px-spacing-2xs-desktop)}:host([gap="l"]){--px-carousel-gap-default: var(--px-spacing-l-desktop)}:host([gap="none"]){--px-carousel-gap-default: 0}:host([gap--mobile="default"]){--px-carousel-gap-default--mobile: var(--px-spacing-default-mobile)}:host([gap--mobile="s"]){--px-carousel-gap-default--mobile: var(--px-spacing-s-mobile)}:host([gap--mobile="xs"]){--px-carousel-gap-default--mobile: var(--px-spacing-xs-mobile)}:host([gap--mobile="2xs"]){--px-carousel-gap-default--mobile: var(--px-spacing-2xs-mobile)}:host([gap--mobile="l"]){--px-carousel-gap-default--mobile: var(--px-spacing-l-mobile)}:host([gap--mobile="none"]){--px-carousel-gap-default--mobile: 0}:host([gap--tablet="default"]){--px-carousel-gap-default--tablet: var(--px-spacing-default-tablet)}:host([gap--tablet="s"]){--px-carousel-gap-default--tablet: var(--px-spacing-s-tablet)}:host([gap--tablet="xs"]){--px-carousel-gap-default--tablet: var(--px-spacing-xs-tablet)}:host([gap--tablet="2xs"]){--px-carousel-gap-default--tablet: var(--px-spacing-2xs-tablet)}:host([gap--tablet="l"]){--px-carousel-gap-default--tablet: var(--px-spacing-l-tablet)}:host([gap--tablet="none"]){--px-carousel-gap-default--tablet: 0}:host([gap--laptop="default"]){--px-carousel-gap-default--laptop: var(--px-spacing-default-laptop)}:host([gap--laptop="s"]){--px-carousel-gap-default--laptop: var(--px-spacing-s-laptop)}:host([gap--laptop="xs"]){--px-carousel-gap-default--laptop: var(--px-spacing-xs-laptop)}:host([gap--laptop="2xs"]){--px-carousel-gap-default--laptop: var(--px-spacing-2xs-laptop)}:host([gap--laptop="l"]){--px-carousel-gap-default--laptop: var(--px-spacing-l-laptop)}:host([gap--laptop="none"]){--px-carousel-gap-default--laptop: 0}:host([gap--desktop="default"]){--px-carousel-gap-default--desktop: var(--px-spacing-default-desktop)}:host([gap--desktop="s"]){--px-carousel-gap-default--desktop: var(--px-spacing-s-desktop)}:host([gap--desktop="xs"]){--px-carousel-gap-default--desktop: var(--px-spacing-xs-desktop)}:host([gap--desktop="2xs"]){--px-carousel-gap-default--desktop: var(--px-spacing-2xs-desktop)}:host([gap--desktop="l"]){--px-carousel-gap-default--desktop: var(--px-spacing-l-desktop)}:host([gap--desktop="none"]){--px-carousel-gap-default--desktop: 0}.carousel{overflow:hidden;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;gap:var(--px-carousel-gap-default--desktop, var(--px-carousel-gap-default))}@media only screen and (max-width: 48em){.carousel{gap:var(--px-carousel-gap-default--mobile, var(--px-carousel-gap-default))}}@media only screen and (min-width: 48.0625em) and (max-width: 64em){.carousel{gap:var(--px-carousel-gap-default--tablet, var(--px-carousel-gap-default))}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.carousel{gap:var(--px-carousel-gap-default--laptop, var(--px-carousel-gap-default))}}#appleseed-container{margin-inline:var(--px-spacing-s-mobile)}@media only screen and (max-width: 48em){#button-icons{display:none}}.carousel::-webkit-scrollbar{display:none}';
5241
+ const itemStyles = "::slotted(*){border-radius:var(--px-radius-main);height:100%}.carousel-item{height:100%}:host{scroll-snap-align:start;align-items:center;justify-content:center;border-radius:var(--px-radius-main);background:#fff;overflow:hidden;--visible-items: var(--px-carousel-visible-items--desktop, var(--px-carousel-visible-items, 1));--spacing: var(--px-carousel-gap-default--desktop, var(--px-carousel-gap-default, var(--px-spacing-s-desktop)));min-width:calc((100% - max(var(--visible-items),2) * var(--spacing)) / var(--visible-items) - 64px / max(var(--visible-items),2))}@media only screen and (max-width: 48em){:host{--visible-items: var(--px-carousel-visible-items--mobile, var(--px-carousel-visible-items, 1));--spacing: var(--px-carousel-gap-default--mobile, var(--px-carousel-gap-default, var(--px-spacing-s-mobile)))}}@media only screen and (min-width: 48.0625em) and (max-width: 64em){:host{--visible-items: var(--px-carousel-visible-items--tablet, var(--px-carousel-visible-items, 1));--spacing: var(--px-carousel-gap-default--tablet, var(--px-carousel-gap-default, var(--px-spacing-s-desktop)))}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){:host{--visible-items: var(--px-carousel-visible-items--laptop, var(--px-carousel-visible-items, 1));--spacing: var(--px-carousel-gap-default--laptop, var(--px-carousel-gap-default, var(--px-spacing-s-desktop)))}}@media screen and (max-width: 48em){:host{scroll-snap-align:center;flex:1 0 var( --px-carousel-min-width-mobile, var(--px-carousel-min-width-all-mobile) )!important}}@media screen and (min-width: 48em) and (max-width: 64em){:host{flex:1 0 var( --px-carousel-min-width-tablet, var(--px-carousel-min-width-all-tablet) )!important}}";
5242
5242
  const styles$F = ":host{--px-appleseed-size-l: 14px;--px-appleseed-size-m: 10px;--px-appleseed-size-s: 6px;--px-appleseed-size-xs: 4px}.container{display:flex}.container:has(#seed-0.appleseed-6-plus[active]) :nth-child(4)>div,.container:has(#seed-1.appleseed-6-plus[active]) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-0.appleseed-6-plus[active]) :nth-child(5)>div,.container:has(#seed-1.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(2)>div,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(4)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(1)>div,.container:has(#seed-2.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(1)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.container:has(#seed-3.appleseed-6-plus[active]) :nth-child(5)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(1)>div{width:var(--px-appleseed-size-xs);height:var(--px-appleseed-size-xs)}.container:has(#seed-4.appleseed-6-plus[active]) :nth-child(2)>div{width:var(--px-appleseed-size-s);height:var(--px-appleseed-size-s)}.appleseed{width:var(--px-size-icon-m);height:var(--px-size-icon-m);display:flex;justify-content:center;align-items:center}@media only screen and (max-width: 47.938em){.appleseed{width:var(--px-size-icon-s);height:var(--px-size-icon-s)}}.appleseed-6-plus>div,.appleseed-6-minus>div{box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-brand-default);border-radius:var(--px-radius-main);height:var(--px-appleseed-size-m);width:var(--px-appleseed-size-m)}.appleseed-6-plus[active]>div,.appleseed-6-minus[active]>div{width:var(--px-appleseed-size-l);height:var(--px-appleseed-size-l);background-color:var(--px-color-icon-brand-default)}";
5243
5243
  const styleSheet$A = new CSSStyleSheet();
5244
5244
  styleSheet$A.replaceSync(styles$F);
@@ -5486,19 +5486,10 @@ function throttle(func, wait, options) {
5486
5486
  const styleSheet$z = new CSSStyleSheet();
5487
5487
  styleSheet$z.replaceSync(styles$G);
5488
5488
  const CAROUSEL_ITEM_CONNECTED_EVENT = "px-carousel-item-connected";
5489
- const attributeBreakpointCSSSelector$1 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .carousel`;
5490
- const prefix = "px-spacing";
5491
- const visibleItemCalcFunction = (spacingToken) => (numberOfItems, device) => `calc(((100% - ${Math.max(parseInt(numberOfItems), 2)} * ( var(--px-spacing-${spacingToken}-${device}))) / ${numberOfItems}) - ( 64px / ${Math.max(parseInt(numberOfItems), 2)}))`;
5492
5489
  class Carousel extends HTMLElement {
5493
5490
  constructor() {
5494
5491
  super();
5495
5492
  __privateAdd(this, _Carousel_instances);
5496
- this.visibleItemsAttributeDelegate = new AttributeBreakpointHandlerDelegate(
5497
- this,
5498
- "visible-items",
5499
- visibleItemCalcFunction("s"),
5500
- "--px-carousel-min-width"
5501
- );
5502
5493
  this.template = `<px-vstack gap="default">
5503
5494
  <div class="carousel">
5504
5495
  <slot></slot>
@@ -5550,42 +5541,9 @@ class Carousel extends HTMLElement {
5550
5541
  };
5551
5542
  this.attachShadow({ mode: "open" });
5552
5543
  this.shadowRoot.innerHTML = this.template;
5553
- this.shadowRoot.adoptedStyleSheets = [
5554
- styleSheet$z,
5555
- cssTokenBreakpoints(
5556
- "gap",
5557
- attributeBreakpointCSSSelector$1,
5558
- gapValues,
5559
- prefix
5560
- )
5561
- ];
5562
- }
5563
- static get observedAttributes() {
5564
- return ["visible-items"];
5565
- }
5566
- attributeChangedCallback(attrName, oldValue, newValue) {
5567
- if (oldValue !== newValue) {
5568
- switch (attrName) {
5569
- case "gap":
5570
- case "gap--mobile":
5571
- case "gap--tablet":
5572
- case "gap--desktop":
5573
- this.visibleItemsAttributeDelegate.attributeValue = visibleItemCalcFunction(newValue);
5574
- break;
5575
- default:
5576
- this.visibleItemsAttributeDelegate.attributeChangedCallback(
5577
- attrName,
5578
- oldValue,
5579
- newValue
5580
- );
5581
- }
5582
- }
5544
+ this.shadowRoot.adoptedStyleSheets = [styleSheet$z];
5583
5545
  }
5584
5546
  connectedCallback() {
5585
- this.visibleItemsAttributeDelegate.init("1");
5586
- this.visibleItemsAttributeDelegate.attributeValue = visibleItemCalcFunction(
5587
- this.getAttribute("gap") || "s"
5588
- );
5589
5547
  this.addEventListener(CAROUSEL_ITEM_CONNECTED_EVENT, () => {
5590
5548
  __privateMethod(this, _Carousel_instances, syncItems_fn).call(this);
5591
5549
  });
@@ -5669,7 +5627,7 @@ class CarouselItem extends HTMLElement {
5669
5627
  </div>`;
5670
5628
  this.attachShadow({ mode: "open" });
5671
5629
  this.shadowRoot.innerHTML = this.template;
5672
- this.shadowRoot.adoptedStyleSheets = [styleSheet$z, itemStyleSheet];
5630
+ this.shadowRoot.adoptedStyleSheets = [itemStyleSheet];
5673
5631
  }
5674
5632
  connectedCallback() {
5675
5633
  this.dispatchEvent(
@@ -15365,7 +15323,7 @@ class StickyContainer extends HTMLElement {
15365
15323
  if (!customElements.get("px-sticky-container")) {
15366
15324
  customElements.define("px-sticky-container", StickyContainer);
15367
15325
  }
15368
- const switchCss = ':host{display:inline-flex}.switch *{box-sizing:border-box}.switch{display:inline-flex;align-items:center;border-radius:var(--px-radius-pill)}.switch:focus-visible{outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default);outline-offset:var(--px-focus-offset-mobile)}.switch:has(input[inverted]):focus-visible{outline-color:var(--px-color-border-focus-outline-inverted)}label{display:flex;flex-shrink:0;padding:var(--px-padding-3xs-mobile);border-radius:var(--px-radius-pill);background-color:var(--px-color-background-container-strong-default);outline:var(--px-size-border-m) solid var(--px-color-border-none-default);width:var(--px-size-action-input-switch-width);height:calc(var(--px-size-icon-m) + (var(--px-padding-3xs-mobile) * 2));position:relative}label:after{content:"";position:absolute;top:50%;left:var(--px-padding-3xs-mobile);width:var(--px-size-icon-m);max-width:var(--px-size-icon-m);height:var(--px-size-icon-m);border-radius:var(--px-radius-pill);background-color:var(--px-color-background-container-light-default);transform:translateY(-50%);transition:transform .2s ease-in-out}:host input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}:host(:not([disabled])):host(:hover) label,:host(:not([disabled])):host([hover]) label{outline-color:var(--px-color-border-neutral-default);cursor:pointer}:host([checked]) label{background-color:var(--px-color-background-purpose-success-default);transition:background-color .2s ease-in-out}:host([checked]) label:after{transform:translateY(-50%) translate(calc(var(--px-size-icon-m) - var(--px-padding-3xs-mobile)));transition:transform .2s ease-in-out}:host(:hover) :is(:host(:not([disabled])) :is(:host([checked]) label)),:host([hover]) :is(:host(:not([disabled])) :is(:host([checked]) label)){outline-color:var(--px-color-border-purpose-success-default)}:host([disabled]) label{background-color:var(--px-color-background-state-disabled-default)}:host([disabled]) label:after{background-color:var(--px-color-background-state-disabled-default)}:host([inverted]) label{background-color:var(--px-color-background-container-strong-inverted)}:host(:hover) :is(:host(:not([disabled])) :is(:host([inverted]) label)),:host([hover]) :is(:host(:not([disabled])) :is(:host([inverted]) label)){outline-color:var(--px-color-border-neutral-inverted)}:host([checked]:not([disabled])) :is(:host([inverted]) label){background-color:var(--px-color-background-purpose-success-inverted)}:host(:hover) :is(:host([checked]:not([disabled])) :is(:host([inverted]) label)),:host([hover]) :is(:host([checked]:not([disabled])) :is(:host([inverted]) label)){outline-color:var(--px-color-border-purpose-success-inverted)}:host([disabled]) :is(:host([inverted]) label){background-color:var(--px-color-background-state-disabled-inverted)}:host([disabled]) :is(:host([inverted]) label):after{background-color:var(--px-color-background-state-disabled-inverted)}@media only screen and (min-width: 48em){label{padding:var(--px-padding-3xs-desktop)}}@media only screen and (min-width: 64.0625em){label{padding:var(--px-padding-3xs-desktop)}}';
15326
+ const switchCss = ':host{display:inline-flex}.switch *{box-sizing:border-box}.switch{display:inline-flex;align-items:center;border-radius:var(--px-radius-pill)}:host(:focus-visible){outline:none}:host(:focus-visible) .switch{outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default);outline-offset:var(--px-focus-offset-mobile)}:host([inverted]:focus-visible) .switch{outline-color:var(--px-color-border-focus-outline-inverted)}label{display:flex;flex-shrink:0;padding:var(--px-padding-3xs-mobile);border-radius:var(--px-radius-pill);background-color:var(--px-color-background-container-strong-default);outline:var(--px-size-border-m) solid var(--px-color-border-none-default);width:var(--px-size-action-input-switch-width);height:calc(var(--px-size-icon-m) + (var(--px-padding-3xs-mobile) * 2));position:relative}label:after{content:"";position:absolute;top:50%;left:var(--px-padding-3xs-mobile);width:var(--px-size-icon-m);max-width:var(--px-size-icon-m);height:var(--px-size-icon-m);border-radius:var(--px-radius-pill);background-color:var(--px-color-background-container-light-default);transform:translateY(-50%);transition:transform .2s ease-in-out}:host input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}:host(:not([disabled])):host(:hover) label,:host(:not([disabled])):host([hover]) label{outline-color:var(--px-color-border-neutral-default);cursor:pointer}:host([checked]) label{background-color:var(--px-color-background-purpose-success-default);transition:background-color .2s ease-in-out}:host([checked]) label:after{transform:translateY(-50%) translate(calc(var(--px-size-icon-m) - var(--px-padding-3xs-mobile)));transition:transform .2s ease-in-out}:host(:hover) :is(:host(:not([disabled])) :is(:host([checked]) label)),:host([hover]) :is(:host(:not([disabled])) :is(:host([checked]) label)){outline-color:var(--px-color-border-purpose-success-default)}:host([disabled]) label{background-color:var(--px-color-background-state-disabled-default)}:host([disabled]) label:after{background-color:var(--px-color-background-state-disabled-default)}:host([inverted]) label{background-color:var(--px-color-background-container-strong-inverted)}:host(:hover) :is(:host(:not([disabled])) :is(:host([inverted]) label)),:host([hover]) :is(:host(:not([disabled])) :is(:host([inverted]) label)){outline-color:var(--px-color-border-neutral-inverted)}:host([checked]:not([disabled])) :is(:host([inverted]) label){background-color:var(--px-color-background-purpose-success-inverted)}:host(:hover) :is(:host([checked]:not([disabled])) :is(:host([inverted]) label)),:host([hover]) :is(:host([checked]:not([disabled])) :is(:host([inverted]) label)){outline-color:var(--px-color-border-purpose-success-inverted)}:host([disabled]) :is(:host([inverted]) label){background-color:var(--px-color-background-state-disabled-inverted)}:host([disabled]) :is(:host([inverted]) label):after{background-color:var(--px-color-background-state-disabled-inverted)}@media only screen and (min-width: 48em){label{padding:var(--px-padding-3xs-desktop)}}@media only screen and (min-width: 64.0625em){label{padding:var(--px-padding-3xs-desktop)}}';
15369
15327
  const switchStyles = new CSSStyleSheet();
15370
15328
  switchStyles.replaceSync(switchCss);
15371
15329
  var InputState = /* @__PURE__ */ ((InputState2) => {
@@ -15377,50 +15335,51 @@ const _Switch = class _Switch extends PxElement {
15377
15335
  constructor() {
15378
15336
  var _a;
15379
15337
  super(switchStyles);
15380
- this.template = () => `<div class="switch" tabindex="0" role="switch">
15381
- <input type="checkbox" tabindex="-1"/>
15338
+ this.template = () => `<div class="switch">
15339
+ <input type="checkbox" tabindex="-1" inert/>
15382
15340
  <label></label>
15383
15341
  </div>`;
15384
15342
  this.shadowRoot.innerHTML = this.template();
15385
15343
  this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
15344
+ this.role = "switch";
15386
15345
  }
15387
15346
  static get observedAttributes() {
15388
15347
  return [...super.observedAttributes, "inverted", "hover"];
15389
15348
  }
15390
15349
  connectedCallback() {
15391
- this.$el.addEventListener("change", () => {
15350
+ const toggle = () => {
15392
15351
  var _a;
15393
- this.checked = this.$el.checked;
15394
- const customEvent = new Event("change", {
15395
- bubbles: true,
15396
- composed: true
15397
- // Allow the event to pass through shadow DOM boundaries
15398
- });
15399
- this.dispatchEvent(customEvent);
15400
- (_a = this.internals) == null ? void 0 : _a.setFormValue(this.formData());
15401
- });
15352
+ if (!this.disabled) {
15353
+ this.checked = !this.checked;
15354
+ this.dispatchEvent(
15355
+ new Event("change", { bubbles: true, composed: true })
15356
+ );
15357
+ (_a = this.internals) == null ? void 0 : _a.setFormValue(this.formData());
15358
+ }
15359
+ };
15360
+ this.addEventListener("click", toggle);
15402
15361
  this.addEventListener("keypress", (e) => {
15403
15362
  if (e.code === "Space" || e.code === "Enter") {
15404
- this.$el.click();
15363
+ toggle();
15405
15364
  }
15406
15365
  });
15407
- this.setupForId();
15366
+ this.tabIndex = 0;
15408
15367
  if (this.hasAttribute("checked")) {
15409
15368
  this.checked = true;
15410
15369
  }
15411
- this.$switch.ariaChecked = `${this.checked}`;
15370
+ this.ariaChecked = `${this.checked}`;
15412
15371
  }
15413
15372
  attributeChangedCallback(attrName, oldValue, newValue) {
15414
15373
  if (oldValue !== newValue) {
15415
15374
  switch (attrName) {
15416
15375
  case "checked":
15417
15376
  this.$el.checked = newValue !== null;
15418
- this.$switch.ariaChecked = `${this.$el.checked}`;
15377
+ this.ariaChecked = `${this.$el.checked}`;
15419
15378
  break;
15420
15379
  case "disabled":
15421
15380
  this.$el.disabled = newValue !== null;
15422
- this.$switch.ariaDisabled = `${this.$el.disabled}`;
15423
- this.$switch.tabIndex = this.$el.disabled ? -1 : 0;
15381
+ this.ariaDisabled = `${this.$el.disabled}`;
15382
+ this.tabIndex = this.$el.disabled ? -1 : 0;
15424
15383
  break;
15425
15384
  case "hover":
15426
15385
  this.$el.classList.toggle("hover");
@@ -15452,12 +15411,6 @@ const _Switch = class _Switch extends PxElement {
15452
15411
  setupForId() {
15453
15412
  const id = Math.random().toString(36).substr(2, 9);
15454
15413
  this.$el.setAttribute("id", id);
15455
- if (this.$label) {
15456
- this.$label.setAttribute("for", id);
15457
- }
15458
- }
15459
- get $label() {
15460
- return this.shadowRoot.querySelector("label");
15461
15414
  }
15462
15415
  get $switch() {
15463
15416
  return this.shadowRoot.querySelector(".switch");
@@ -15478,7 +15431,7 @@ const _Switch = class _Switch extends PxElement {
15478
15431
  } else {
15479
15432
  this.removeAttribute("checked");
15480
15433
  }
15481
- this.$switch.ariaChecked = `${value}`;
15434
+ this.ariaChecked = `${value}`;
15482
15435
  }
15483
15436
  set disabled(value) {
15484
15437
  this.$el.disabled = value;
@@ -15487,7 +15440,8 @@ const _Switch = class _Switch extends PxElement {
15487
15440
  } else {
15488
15441
  this.removeAttribute("disabled");
15489
15442
  }
15490
- this.$switch.ariaDisabled = `${value}`;
15443
+ this.ariaDisabled = `${value}`;
15444
+ this.tabIndex = value ? -1 : 0;
15491
15445
  }
15492
15446
  get disabled() {
15493
15447
  return this.$el.disabled;