@warp-ds/elements 2.8.1-next.2 → 2.8.1-next.4

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.
Files changed (41) hide show
  1. package/dist/custom-elements.json +188 -2
  2. package/dist/index.d.ts +21 -2
  3. package/dist/packages/attention/attention.js +6 -6
  4. package/dist/packages/attention/attention.js.map +2 -2
  5. package/dist/packages/box/box.js +3 -3
  6. package/dist/packages/box/box.js.map +2 -2
  7. package/dist/packages/breadcrumbs/breadcrumbs.stories.js +11 -20
  8. package/dist/packages/button/button.js +2 -2
  9. package/dist/packages/button/button.js.map +2 -2
  10. package/dist/packages/checkbox-group/checkbox-group.js +1 -1
  11. package/dist/packages/checkbox-group/checkbox-group.js.map +2 -2
  12. package/dist/packages/datepicker/datepicker.stories.js +2 -4
  13. package/dist/packages/icon/icon.react.stories.js +1 -1
  14. package/dist/packages/icon/icon.stories.js +1 -1
  15. package/dist/packages/link/link.js +1 -1
  16. package/dist/packages/link/link.js.map +2 -2
  17. package/dist/packages/modal/modal.js +4 -3
  18. package/dist/packages/modal/modal.js.map +3 -3
  19. package/dist/packages/modal-header/modal-header.js +1 -1
  20. package/dist/packages/modal-header/modal-header.js.map +2 -2
  21. package/dist/packages/pill/pill.js +1 -1
  22. package/dist/packages/pill/pill.js.map +2 -2
  23. package/dist/packages/select/select.a11y.test.d.ts +1 -0
  24. package/dist/packages/select/select.a11y.test.js +124 -0
  25. package/dist/packages/select/select.d.ts +7 -4
  26. package/dist/packages/select/select.js +21 -21
  27. package/dist/packages/select/select.js.map +3 -3
  28. package/dist/packages/select/select.react.stories.d.ts +1 -1
  29. package/dist/packages/select/select.test.js +168 -0
  30. package/dist/packages/slider/slider.stories.js +14 -36
  31. package/dist/packages/slider-thumb/slider-thumb.js +1 -1
  32. package/dist/packages/slider-thumb/slider-thumb.js.map +2 -2
  33. package/dist/packages/tab/tab.d.ts +2 -0
  34. package/dist/packages/tab/tab.js +4 -3
  35. package/dist/packages/tab/tab.js.map +3 -3
  36. package/dist/packages/textarea/textarea.js +9 -9
  37. package/dist/packages/textarea/textarea.js.map +2 -2
  38. package/dist/packages/textfield/textfield.js +1 -1
  39. package/dist/packages/textfield/textfield.js.map +2 -2
  40. package/dist/web-types.json +131 -44
  41. package/package.json +7 -7
package/dist/index.d.ts CHANGED
@@ -1229,6 +1229,9 @@ export type WarpSelectProps = {
1229
1229
  name?: WarpSelect["name"];
1230
1230
  /** */
1231
1231
  value?: WarpSelect["value"];
1232
+
1233
+ /** */
1234
+ onchange?: (e: CustomEvent) => void;
1232
1235
  };
1233
1236
 
1234
1237
  export type WarpSelectSolidJsProps = {
@@ -1264,6 +1267,8 @@ export type WarpSelectSolidJsProps = {
1264
1267
  "prop:name"?: WarpSelect["name"];
1265
1268
  /** */
1266
1269
  "prop:value"?: WarpSelect["value"];
1270
+ /** */
1271
+ "on:change"?: (e: CustomEvent) => void;
1267
1272
 
1268
1273
  /** Set the innerHTML of the element */
1269
1274
  innerHTML?: string;
@@ -2442,13 +2447,20 @@ export type CustomElements = {
2442
2447
  * - `name`: undefined
2443
2448
  * - `value`: undefined
2444
2449
  *
2450
+ * ## Events
2451
+ *
2452
+ * Events that will be emitted by the component.
2453
+ *
2454
+ * - `change`: undefined
2455
+ *
2445
2456
  * ## Methods
2446
2457
  *
2447
2458
  * Methods that can be called to access component functionality.
2448
2459
  *
2449
2460
  * - `resetFormControl() => void`: undefined
2461
+ * - `formStateRestoreCallback(state: string | File | FormData | null, _reason: 'autocomplete' | 'restore') => void`: undefined
2450
2462
  * - `handleKeyDown(event: KeyboardEvent) => void`: undefined
2451
- * - `onChange({ target }) => void`: undefined
2463
+ * - `onChange(event: Event) => void`: undefined
2452
2464
  */
2453
2465
  "w-select": Partial<WarpSelectProps & BaseProps<WarpSelect> & BaseEvents>;
2454
2466
 
@@ -3470,13 +3482,20 @@ export type CustomElementsSolidJs = {
3470
3482
  * - `name`: undefined
3471
3483
  * - `value`: undefined
3472
3484
  *
3485
+ * ## Events
3486
+ *
3487
+ * Events that will be emitted by the component.
3488
+ *
3489
+ * - `change`: undefined
3490
+ *
3473
3491
  * ## Methods
3474
3492
  *
3475
3493
  * Methods that can be called to access component functionality.
3476
3494
  *
3477
3495
  * - `resetFormControl() => void`: undefined
3496
+ * - `formStateRestoreCallback(state: string | File | FormData | null, _reason: 'autocomplete' | 'restore') => void`: undefined
3478
3497
  * - `handleKeyDown(event: KeyboardEvent) => void`: undefined
3479
- * - `onChange({ target }) => void`: undefined
3498
+ * - `onChange(event: Event) => void`: undefined
3480
3499
  */
3481
3500
  "w-select": Partial<
3482
3501
  WarpSelectProps &
@@ -3605,14 +3605,14 @@ Please compile your catalog first.
3605
3605
  100% {
3606
3606
  background-position: 60px 0;
3607
3607
  }
3608
- }`;var Yr=["primary","secondary","negative","negativeQuiet","utility","utilityQuiet","quiet","link","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"],Z=class extends Ur{constructor(){super(...arguments);this.variant="secondary"}connectedCallback(){if(super.connectedCallback(),!Yr.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
3608
+ }`;var Yr=["primary","secondary","negative","negativeQuiet","utility","utilityQuiet","quiet","link","overlay","overlayInverted","overlayQuiet","overlayInvertedQuiet"],Z=class extends Ur{constructor(){super(...arguments);this.autofocus=!1;this.variant="secondary";this.small=!1;this.disabled=!1;this.fullWidth=!1}connectedCallback(){if(super.connectedCallback(),!Yr.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
3609
3609
  ${Yr.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0)}render(){let r={"w-button":this.variant!=="link","w-button--primary":this.variant==="primary","w-button--secondary":this.variant==="secondary","w-button--negative":this.variant==="negative","w-button--utility":this.variant==="utility","w-button--quiet":this.variant==="quiet","w-button--negative-quiet":this.variant==="negativeQuiet","w-button--utility-quiet":this.variant==="utilityQuiet","w-button--overlay":this.variant==="overlay","w-button--overlay-inverted":this.variant==="overlayInverted","w-button--overlay-quiet":this.variant==="overlayQuiet","w-button--overlay-inverted-quiet":this.variant==="overlayInvertedQuiet","w-button--small":this.small,"w-button--full-width":this.fullWidth,"w-button--disabled":this.disabled};return Li`<a
3610
3610
  href=${this.href}
3611
3611
  target=${this.target}
3612
3612
  rel=${this.target==="_blank"?this.rel||"noopener":void 0}
3613
3613
  class=${zi(r)}>
3614
3614
  <slot></slot>
3615
- </a>`}};Z.shadowRootOptions={...Ur.shadowRootOptions,delegatesFocus:!0},Z.styles=[Ee,Hr],y([me({type:Boolean,reflect:!0})],Z.prototype,"autofocus",2),y([me({reflect:!0})],Z.prototype,"variant",2),y([me({type:Boolean,reflect:!0})],Z.prototype,"small",2),y([me({reflect:!0})],Z.prototype,"href",2),y([me({type:Boolean,reflect:!0})],Z.prototype,"disabled",2),y([me({reflect:!0})],Z.prototype,"target",2),y([me({reflect:!0})],Z.prototype,"rel",2),y([me({attribute:"full-width",type:Boolean,reflect:!0})],Z.prototype,"fullWidth",2);customElements.get("w-link")||customElements.define("w-link",Z);var Xr=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var Zr=JSON.parse('{"button.aria.loading":["Loading..."]}');var Gr=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var Jr=JSON.parse('{"button.aria.loading":["Laster..."]}');var Wr=JSON.parse('{"button.aria.loading":["Laddar ..."]}');import{css as Di}from"lit";var Kr=Di`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.animate-inprogress{background-size:30px 30px;animation:3s linear infinite animate-inprogress;background-image:linear-gradient(135deg,#0000000d 25%,#0000 0 50%,#0000000d 0 75%,#0000 0,#0000)!important}@keyframes animate-inprogress{0%{background-position:0 0}to{background-position:60px 0}}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.inline-block{display:inline-block}.inline{display:inline}.inline-flex{display:inline-flex}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.hover\\:no-underline:hover,.focus\\:no-underline:focus,.active\\:no-underline:active{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.max-w-full{max-width:100%}.max-w-max{max-width:max-content}.min-h-32{min-height:3.2rem}.min-w-32{min-width:3.2rem}.w-full{width:100%}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-0{padding:0}.p-4{padding:.4rem}.px-14{padding-left:1.4rem;padding-right:1.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.py-10{padding-top:1rem;padding-bottom:1rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.py-\\[11px\\]{padding-top:11px;padding-bottom:11px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.cursor-default{cursor:default}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var ro=["primary","secondary","negative","utility","pill","link"],pe="font-bold focusable justify-center transition-colors ease-in-out",T={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},S={primary:`border-0 rounded-radius-default ${pe}`,secondary:`border-2 rounded-radius-default ${pe}`,utility:`border rounded-radius-utility ${pe}`,negative:`border-0 rounded-radius-default ${pe}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${pe}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${T.link}`},p={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},h={medium:"text-m leading-[24]",xsmall:"text-xs"},m={inProgress:`border-transparent animate-inprogress pointer-events-none ${T.loading}`,quiet:`border-0 rounded-8 ${pe}`,utilityQuiet:`border-0 rounded-4 ${pe}`,negativeQuiet:`border-0 rounded-8 ${pe}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${T.disabled}`},$={secondary:`${p.medium} ${h.medium} ${S.secondary} ${T.secondary}`,secondaryHref:`${p.medium} ${h.medium} ${S.secondary} ${T.secondary}`,secondaryDisabled:`${p.medium} ${h.medium} ${S.secondary} ${m.isDisabled}`,secondarySmall:`${h.xsmall} ${p.xsmall} ${S.secondary} ${T.secondary}`,secondarySmallDisabled:`${h.xsmall} ${p.xsmall} ${S.secondary} ${m.isDisabled}`,secondaryQuiet:`${p.medium} ${h.medium} ${m.quiet} ${T.quiet}`,secondaryQuietDisabled:`${p.medium} ${h.medium} ${m.quiet} ${m.isDisabled}`,secondarySmallQuiet:`${h.xsmall} ${p.xsmall} ${m.quiet} ${T.quiet}`,secondarySmallQuietDisabled:`${h.xsmall} ${p.xsmall} ${m.quiet} ${m.isDisabled}`,secondaryLoading:`${p.medium} ${h.medium} ${S.secondary} ${m.inProgress}`,secondarySmallLoading:`${h.xsmall} ${p.xsmall} ${S.secondary} ${m.inProgress}`,secondarySmallQuietLoading:`${h.xsmall} ${p.xsmall} ${m.quiet} ${m.inProgress}`,secondaryQuietLoading:`${p.medium} ${h.medium} ${m.quiet} ${m.inProgress}`,primary:`${p.large} ${h.medium} ${S.primary} ${T.primary}`,primaryDisabled:`${p.large} ${h.medium} ${m.isDisabled} ${S.primary}`,primarySmall:`${p.small} ${h.xsmall} ${S.primary} ${T.primary}`,primarySmallDisabled:`${p.small} ${h.xsmall} ${m.isDisabled} ${S.primary} `,primaryQuiet:`${p.large} ${h.medium} ${m.quiet} ${T.quiet}`,primaryQuietDisabled:`${p.large} ${h.medium} ${m.quiet} ${m.isDisabled}`,primarySmallQuiet:`${p.small} ${h.xsmall} ${m.quiet} ${T.quiet}`,primarySmallQuietDisabled:`${p.small} ${h.xsmall} ${m.quiet} ${m.isDisabled}`,primaryLoading:`${p.large} ${h.medium} ${m.inProgress} ${S.primary}`,primarySmallLoading:`${p.small} ${h.xsmall} ${m.inProgress} ${S.primary}`,primarySmallQuietLoading:`${p.small} ${h.xsmall} ${m.quiet} ${m.inProgress} ${S.primary}`,primaryQuietLoading:`${p.large} ${h.medium} ${m.quiet} ${m.inProgress}`,utility:`${p.utility} ${h.medium} ${S.utility} ${T.utility}`,utilityDisabled:`${p.utility} ${h.medium} ${S.utility} ${m.isDisabled}`,utilityQuiet:`${p.large} ${h.medium} ${m.utilityQuiet} ${T.utilityQuiet}`,utilityQuietDisabled:`${p.large} ${h.medium} ${m.utilityQuiet} ${m.isDisabled}`,utilitySmall:`${p.smallUtility} ${h.xsmall} ${S.utility} ${T.utility}`,utilitySmallDisabled:`${p.smallUtility} ${h.xsmall} ${S.utility} ${m.isDisabled}`,utilitySmallQuiet:`${p.smallUtility} ${h.xsmall} ${m.utilityQuiet} ${T.utilityQuiet}`,utilitySmallQuietDisabled:`${p.smallUtility} ${h.xsmall} ${m.utilityQuiet} ${m.isDisabled}`,utilityLoading:`${p.large} ${h.medium} ${S.utility} ${m.inProgress}`,utilitySmallLoading:`${p.smallUtility} ${h.xsmall} ${S.utility} ${m.inProgress}`,utilityQuietLoading:`${p.large} ${h.medium} ${m.inProgress} ${m.utilityQuiet}`,utilitySmallQuietLoading:`${p.smallUtility} ${h.xsmall} ${m.inProgress} ${m.utilityQuiet}`,negative:`${p.large} ${h.medium} ${S.negative} ${T.destructive}`,negativeDisabled:`${p.large} ${h.medium} ${S.negative} ${m.isDisabled}`,negativeQuiet:`${p.large} ${h.medium} ${m.negativeQuiet} ${T.negativeQuiet}`,negativeQuietDisabled:`${p.large} ${h.medium} ${m.negativeQuiet}${m.isDisabled}`,negativeSmall:`${p.small} ${h.xsmall} ${S.negative} ${T.destructive}`,negativeSmallDisabled:`${p.small} ${h.xsmall} ${S.negative} ${m.isDisabled}`,negativeSmallQuiet:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${T.negativeQuiet}`,negativeSmallQuietDisabled:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${m.isDisabled}`,negativeLoading:`${p.large} ${h.medium} ${S.negative} ${m.inProgress}`,negativeSmallLoading:`${p.small} ${h.xsmall} ${m.inProgress} ${S.negative}`,negativeQuietLoading:`${p.large} ${h.medium} ${m.negativeQuiet} ${S.negative} ${m.inProgress}`,negativeSmallQuietLoading:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${m.inProgress}`,pill:`${p.pill} ${h.medium} ${S.pill} ${T.pill}`,pillSmall:`${p.pillSmall} ${h.xsmall} ${S.pill} ${T.pill}`,pillLoading:`${p.pill} ${h.medium} ${S.pill} ${m.inProgress}`,pillSmallLoading:`${p.pillSmall} ${h.xsmall} ${S.pill} ${m.inProgress}`,link:`${p.link} ${h.medium} ${S.link}`,linkSmall:`${p.link} ${h.xsmall} ${S.link}`,linkAsButton:"inline-block active:no-underline hover:no-underline focus:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"},Me,N=class extends Ir(to){constructor(){super();this.type="button";Tt(this,Me,null);ut(Zr,Jr,Gr,Xr,Wr),this.variant="secondary",this.ariaValueTextLoading=P._({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(r){r.has("value")&&this.setValue(this.value)}connectedCallback(){if(super.connectedCallback(),!ro.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
3615
+ </a>`}};Z.shadowRootOptions={...Ur.shadowRootOptions,delegatesFocus:!0},Z.styles=[Ee,Hr],y([me({type:Boolean,reflect:!0})],Z.prototype,"autofocus",2),y([me({reflect:!0})],Z.prototype,"variant",2),y([me({type:Boolean,reflect:!0})],Z.prototype,"small",2),y([me({reflect:!0})],Z.prototype,"href",2),y([me({type:Boolean,reflect:!0})],Z.prototype,"disabled",2),y([me({reflect:!0})],Z.prototype,"target",2),y([me({reflect:!0})],Z.prototype,"rel",2),y([me({attribute:"full-width",type:Boolean,reflect:!0})],Z.prototype,"fullWidth",2);customElements.get("w-link")||customElements.define("w-link",Z);var Xr=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var Zr=JSON.parse('{"button.aria.loading":["Loading..."]}');var Gr=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var Jr=JSON.parse('{"button.aria.loading":["Laster..."]}');var Wr=JSON.parse('{"button.aria.loading":["Laddar ..."]}');import{css as Di}from"lit";var Kr=Di`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.animate-inprogress{background-size:30px 30px;animation:3s linear infinite animate-inprogress;background-image:linear-gradient(135deg,#0000000d 25%,#0000 0 50%,#0000000d 0 75%,#0000 0,#0000)!important}@keyframes animate-inprogress{0%{background-position:0 0}to{background-position:60px 0}}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.inline-block{display:inline-block}.inline{display:inline}.inline-flex{display:inline-flex}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.hover\\:no-underline:hover,.focus\\:no-underline:focus,.active\\:no-underline:active{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.max-w-full{max-width:100%}.max-w-max{max-width:max-content}.min-h-32{min-height:3.2rem}.min-w-32{min-width:3.2rem}.w-full{width:100%}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-0{padding:0}.p-4{padding:.4rem}.px-14{padding-left:1.4rem;padding-right:1.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.py-10{padding-top:1rem;padding-bottom:1rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.py-\\[11px\\]{padding-top:11px;padding-bottom:11px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.cursor-default{cursor:default}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var ro=["primary","secondary","negative","utility","pill","link"],pe="font-bold focusable justify-center transition-colors ease-in-out",T={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},S={primary:`border-0 rounded-radius-default ${pe}`,secondary:`border-2 rounded-radius-default ${pe}`,utility:`border rounded-radius-utility ${pe}`,negative:`border-0 rounded-radius-default ${pe}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${pe}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${T.link}`},p={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},h={medium:"text-m leading-[24]",xsmall:"text-xs"},m={inProgress:`border-transparent animate-inprogress pointer-events-none ${T.loading}`,quiet:`border-0 rounded-8 ${pe}`,utilityQuiet:`border-0 rounded-4 ${pe}`,negativeQuiet:`border-0 rounded-8 ${pe}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${T.disabled}`},$={secondary:`${p.medium} ${h.medium} ${S.secondary} ${T.secondary}`,secondaryHref:`${p.medium} ${h.medium} ${S.secondary} ${T.secondary}`,secondaryDisabled:`${p.medium} ${h.medium} ${S.secondary} ${m.isDisabled}`,secondarySmall:`${h.xsmall} ${p.xsmall} ${S.secondary} ${T.secondary}`,secondarySmallDisabled:`${h.xsmall} ${p.xsmall} ${S.secondary} ${m.isDisabled}`,secondaryQuiet:`${p.medium} ${h.medium} ${m.quiet} ${T.quiet}`,secondaryQuietDisabled:`${p.medium} ${h.medium} ${m.quiet} ${m.isDisabled}`,secondarySmallQuiet:`${h.xsmall} ${p.xsmall} ${m.quiet} ${T.quiet}`,secondarySmallQuietDisabled:`${h.xsmall} ${p.xsmall} ${m.quiet} ${m.isDisabled}`,secondaryLoading:`${p.medium} ${h.medium} ${S.secondary} ${m.inProgress}`,secondarySmallLoading:`${h.xsmall} ${p.xsmall} ${S.secondary} ${m.inProgress}`,secondarySmallQuietLoading:`${h.xsmall} ${p.xsmall} ${m.quiet} ${m.inProgress}`,secondaryQuietLoading:`${p.medium} ${h.medium} ${m.quiet} ${m.inProgress}`,primary:`${p.large} ${h.medium} ${S.primary} ${T.primary}`,primaryDisabled:`${p.large} ${h.medium} ${m.isDisabled} ${S.primary}`,primarySmall:`${p.small} ${h.xsmall} ${S.primary} ${T.primary}`,primarySmallDisabled:`${p.small} ${h.xsmall} ${m.isDisabled} ${S.primary} `,primaryQuiet:`${p.large} ${h.medium} ${m.quiet} ${T.quiet}`,primaryQuietDisabled:`${p.large} ${h.medium} ${m.quiet} ${m.isDisabled}`,primarySmallQuiet:`${p.small} ${h.xsmall} ${m.quiet} ${T.quiet}`,primarySmallQuietDisabled:`${p.small} ${h.xsmall} ${m.quiet} ${m.isDisabled}`,primaryLoading:`${p.large} ${h.medium} ${m.inProgress} ${S.primary}`,primarySmallLoading:`${p.small} ${h.xsmall} ${m.inProgress} ${S.primary}`,primarySmallQuietLoading:`${p.small} ${h.xsmall} ${m.quiet} ${m.inProgress} ${S.primary}`,primaryQuietLoading:`${p.large} ${h.medium} ${m.quiet} ${m.inProgress}`,utility:`${p.utility} ${h.medium} ${S.utility} ${T.utility}`,utilityDisabled:`${p.utility} ${h.medium} ${S.utility} ${m.isDisabled}`,utilityQuiet:`${p.large} ${h.medium} ${m.utilityQuiet} ${T.utilityQuiet}`,utilityQuietDisabled:`${p.large} ${h.medium} ${m.utilityQuiet} ${m.isDisabled}`,utilitySmall:`${p.smallUtility} ${h.xsmall} ${S.utility} ${T.utility}`,utilitySmallDisabled:`${p.smallUtility} ${h.xsmall} ${S.utility} ${m.isDisabled}`,utilitySmallQuiet:`${p.smallUtility} ${h.xsmall} ${m.utilityQuiet} ${T.utilityQuiet}`,utilitySmallQuietDisabled:`${p.smallUtility} ${h.xsmall} ${m.utilityQuiet} ${m.isDisabled}`,utilityLoading:`${p.large} ${h.medium} ${S.utility} ${m.inProgress}`,utilitySmallLoading:`${p.smallUtility} ${h.xsmall} ${S.utility} ${m.inProgress}`,utilityQuietLoading:`${p.large} ${h.medium} ${m.inProgress} ${m.utilityQuiet}`,utilitySmallQuietLoading:`${p.smallUtility} ${h.xsmall} ${m.inProgress} ${m.utilityQuiet}`,negative:`${p.large} ${h.medium} ${S.negative} ${T.destructive}`,negativeDisabled:`${p.large} ${h.medium} ${S.negative} ${m.isDisabled}`,negativeQuiet:`${p.large} ${h.medium} ${m.negativeQuiet} ${T.negativeQuiet}`,negativeQuietDisabled:`${p.large} ${h.medium} ${m.negativeQuiet}${m.isDisabled}`,negativeSmall:`${p.small} ${h.xsmall} ${S.negative} ${T.destructive}`,negativeSmallDisabled:`${p.small} ${h.xsmall} ${S.negative} ${m.isDisabled}`,negativeSmallQuiet:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${T.negativeQuiet}`,negativeSmallQuietDisabled:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${m.isDisabled}`,negativeLoading:`${p.large} ${h.medium} ${S.negative} ${m.inProgress}`,negativeSmallLoading:`${p.small} ${h.xsmall} ${m.inProgress} ${S.negative}`,negativeQuietLoading:`${p.large} ${h.medium} ${m.negativeQuiet} ${S.negative} ${m.inProgress}`,negativeSmallQuietLoading:`${p.small} ${h.xsmall} ${m.negativeQuiet} ${m.inProgress}`,pill:`${p.pill} ${h.medium} ${S.pill} ${T.pill}`,pillSmall:`${p.pillSmall} ${h.xsmall} ${S.pill} ${T.pill}`,pillLoading:`${p.pill} ${h.medium} ${S.pill} ${m.inProgress}`,pillSmallLoading:`${p.pillSmall} ${h.xsmall} ${S.pill} ${m.inProgress}`,link:`${p.link} ${h.medium} ${S.link}`,linkSmall:`${p.link} ${h.xsmall} ${S.link}`,linkAsButton:"inline-block active:no-underline hover:no-underline focus:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"},Me,N=class extends Ir(to){constructor(){super();this.type="button";this.autofocus=!1;this.quiet=!1;this.small=!1;this.loading=!1;this.fullWidth=!1;Tt(this,Me,null);ut(Zr,Jr,Gr,Xr,Wr),this.variant="secondary",this.ariaValueTextLoading=P._({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(r){r.has("value")&&this.setValue(this.value)}connectedCallback(){if(super.connectedCallback(),!ro.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
3616
3616
  ${ro.join(", ")}.`);Pt(this,Me,this.value)}firstUpdated(){this.autofocus&&!this.href&&setTimeout(()=>this.focus(),0)}get _primaryClasses(){return[!this.small&&!this.quiet&&!this.loading&&$.primary,this.small&&!this.quiet&&!this.loading&&$.primarySmall,this.small&&this.quiet&&!this.loading&&$.primarySmallQuiet,this.small&&this.loading&&(this.quiet?$.primarySmallQuietLoading:$.primarySmallLoading),!this.small&&this.quiet&&!this.loading&&$.primaryQuiet,!this.small&&this.loading&&(this.quiet?$.primaryQuietLoading:$.primaryLoading)]}get _secondaryClasses(){return[!this.small&&!this.quiet&&!this.loading&&$.secondary,this.small&&!this.quiet&&!this.loading&&$.secondarySmall,this.small&&this.loading&&(this.quiet?$.secondarySmallQuietLoading:$.secondarySmallLoading),this.small&&this.quiet&&!this.loading&&$.secondarySmallQuiet,!this.small&&this.quiet&&!this.loading&&$.secondaryQuiet,!this.small&&this.loading&&(this.quiet?$.secondaryQuietLoading:$.secondaryLoading)]}get _utilityClasses(){return[!this.small&&!this.quiet&&!this.loading&&$.utility,this.small&&!this.quiet&&!this.loading&&$.utilitySmall,this.small&&this.quiet&&!this.loading&&$.utilitySmallQuiet,this.small&&this.loading&&(this.quiet?$.utilitySmallQuietLoading:$.utilitySmallLoading),!this.small&&this.quiet&&!this.loading&&$.utilityQuiet,!this.small&&this.loading&&(this.quiet?$.utilityQuietLoading:$.utilityLoading)]}get _negativeClasses(){return[!this.small&&!this.quiet&&!this.loading&&$.negative,this.small&&!this.quiet&&!this.loading&&$.negativeSmall,this.small&&this.quiet&&!this.loading&&$.negativeSmallQuiet,this.small&&this.loading&&(this.quiet?$.negativeSmallQuietLoading:$.negativeSmallLoading),!this.small&&this.quiet&&!this.loading&&$.negativeQuiet,!this.small&&this.loading&&(this.quiet?$.negativeQuietLoading:$.negativeLoading)]}get _pillClasses(){return[!this.loading&&(this.small?$.pillSmall:$.pill),this.loading&&(this.small?$.pillSmallLoading:$.pillLoading)]}get _linkClasses(){return[this.small?$.linkSmall:$.link]}get _classes(){return ke(this.buttonClass,[this.variant==="primary"&&this._primaryClasses,this.variant==="secondary"&&this._secondaryClasses,this.variant==="utility"&&this._utilityClasses,this.variant==="negative"&&this._negativeClasses,this.variant==="pill"&&this._pillClasses,this.variant==="link"&&this._linkClasses,this.href&&$.linkAsButton,this.fullWidth?$.fullWidth:$.contentWidth])}_handleButtonClick(){this.type==="submit"?this.internals.form.requestSubmit():this.type==="reset"&&this.internals.form.reset()}resetFormControl(){this.value=At(this,Me)}render(){return gt` ${this.href?gt`<w-link
3617
3617
  href=${this.href}
3618
3618
  target=${this.target}
@@ -3628,9 +3628,9 @@ ${ro.join(", ")}.`);Pt(this,Me,this.value)}firstUpdated(){this.autofocus&&!this.
3628
3628
  </w-link>`:gt`<button type=${this.type||"button"} class=${this._classes} @click="${this._handleButtonClick}">
3629
3629
  <slot></slot>
3630
3630
  </button>`}
3631
- ${this.loading?gt`<span class="sr-only" role="progressbar" aria-valuenow="{0}" aria-valuetext=${this.ariaValueTextLoading}></span>`:null}`}};Me=new WeakMap,N.shadowRootOptions={...to.shadowRootOptions,delegatesFocus:!0},N.styles=[Ee,Kr,eo`:host([full-width]) { width: 100%; }`,eo`.rounded-radius-default{border-radius:var(--w-button-radius-default,8px);}.rounded-radius-utility{border-radius:var(--w-button-radius-utility,4px);}`],y([G({reflect:!0})],N.prototype,"type",2),y([G({type:Boolean,reflect:!0})],N.prototype,"autofocus",2),y([G({reflect:!0})],N.prototype,"variant",2),y([G({type:Boolean,reflect:!0})],N.prototype,"quiet",2),y([G({type:Boolean,reflect:!0})],N.prototype,"small",2),y([G({type:Boolean,reflect:!0})],N.prototype,"loading",2),y([G({reflect:!0})],N.prototype,"href",2),y([G({reflect:!0})],N.prototype,"target",2),y([G({reflect:!0})],N.prototype,"rel",2),y([G({attribute:"full-width",type:Boolean,reflect:!0})],N.prototype,"fullWidth",2),y([G({attribute:"button-class",reflect:!0})],N.prototype,"buttonClass",2),y([G({reflect:!0})],N.prototype,"name",2),y([G({reflect:!0})],N.prototype,"value",2);customElements.get("w-button")||customElements.define("w-button",N);var Pi={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},Re="font-bold focusable justify-center transition-colors ease-in-out",Aa={primary:`border-0 rounded-8 ${Re}`,secondary:`border-2 rounded-8 ${Re}`,utility:`border rounded-4 ${Re}`,negative:`border-0 rounded-8 ${Re}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${Re}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${Pi.link}`},Fe={base:"border-2 relative flex items-center",tooltip:"s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted rounded-4 py-6 px-8",callout:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",highlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",popover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeftStart:"-left-[8px]",arrowDirectionLeft:"-left-[8px]",arrowDirectionLeftEnd:"-left-[8px]",arrowDirectionRightStart:"-right-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionRightEnd:"-right-[8px]",arrowDirectionBottomStart:"-bottom-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionBottomEnd:"-bottom-[8px]",arrowDirectionTopStart:"-top-[8px]",arrowDirectionTop:"-top-[8px]",arrowDirectionTopEnd:"-top-[8px]",arrowTooltip:"s-bg-inverted border-[--w-s-color-background-inverted]",arrowCallout:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",arrowPopover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",arrowHighlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",content:"last-child:mb-0",notCallout:"absolute z-50"},V=class extends Ai{constructor(){super(),ut(jr,qr,Nr,Fr,Vr),this.handleDone=this.handleDone.bind(this),this.show=!1,this.placement="bottom",this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1,this.distance=8,this.skidding=0,this.flip=!1,this.crossAxis=!1,this._initialPlacement=this.placement,this._actualDirection=this.placement}connectedCallback(){if(super.connectedCallback(),this.placement&&!Object.keys(ye).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
3632
- ${JSON.stringify(Object.keys(ye))}`);if(this.fallbackPlacements&&!this.fallbackPlacements.every(t=>kt.includes(t)))throw new Error(`Invalid "fallbackPlacements" attribute. Set its value to an array with one or more of the following:
3633
- ${JSON.stringify(kt)}`);setTimeout(()=>{this.requestUpdate(),this.handleDone()},0),this.callout||(window.addEventListener("click",this.handleDone),window.addEventListener("scroll",this.handleDone),window.addEventListener("resize",this.handleDone),window.addEventListener("touch",this.handleDone)),this.tooltip&&(window.addEventListener("mouseover",this.handleDone),window.addEventListener("mouseout",this.handleDone))}disconnectedCallback(){window.removeEventListener("click",this.handleDone),window.removeEventListener("scroll",this.handleDone),window.removeEventListener("resize",this.handleDone),window.removeEventListener("touch",this.handleDone),window.removeEventListener("mouseover",this.handleDone),window.removeEventListener("mouseout",this.handleDone),super.disconnectedCallback()}handleDone(){window.requestAnimationFrame(()=>{this.show&&this._targetEl&&this._attentionEl?_t(this.attentionState).then(t=>{this._actualDirection=t==null?void 0:t.actualDirection}):this._actualDirection=this._initialPlacement})}get _actualDirection(){return this.placement}set _actualDirection(t){this.placement=t}get _arrowEl(){return this.renderRoot.querySelector("#arrow")}get _arrowDirection(){return ye[this._actualDirection]}get _arrowClasses(){return ke([Fe.arrowBase,this._activeVariantClasses.arrow,Fe[`arrowDirection${$t(this._arrowDirection)}`]])}get _arrowHtml(){return this.noArrow?"":Le`<div id="arrow" class="${this._arrowClasses}"></div>`}get _activeVariantClasses(){let t={callout:this.callout,popover:this.popover,tooltip:this.tooltip,highlight:this.highlight},r=Object.keys(t).find(o=>!!t[o])||"";return{wrapper:Fe[r],arrow:Fe[`arrow${r.charAt(0).toUpperCase()+r.slice(1)}`]}}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){var r;let t=(r=this.renderRoot)==null?void 0:r.querySelector("slot[name='target']");return t?t.assignedElements()[0]:null}get _messageEl(){let t=this.renderRoot.querySelector("slot[name='message']");return t?t.assignedElements()[0]:null}get _wrapperClasses(){return ke([Fe.base,this._activeVariantClasses.wrapper])}get _ariaClose(){return P._({id:"attention.aria.close",message:"Close",comment:"Aria label for the close button in attention"})}get _closeBtnHtml(){return Le`
3631
+ ${this.loading?gt`<span class="sr-only" role="progressbar" aria-valuenow="{0}" aria-valuetext=${this.ariaValueTextLoading}></span>`:null}`}};Me=new WeakMap,N.shadowRootOptions={...to.shadowRootOptions,delegatesFocus:!0},N.styles=[Ee,Kr,eo`:host([full-width]) { width: 100%; }`,eo`.rounded-radius-default{border-radius:var(--w-button-radius-default,8px);}.rounded-radius-utility{border-radius:var(--w-button-radius-utility,4px);}`],y([G({reflect:!0})],N.prototype,"type",2),y([G({type:Boolean,reflect:!0})],N.prototype,"autofocus",2),y([G({reflect:!0})],N.prototype,"variant",2),y([G({type:Boolean,reflect:!0})],N.prototype,"quiet",2),y([G({type:Boolean,reflect:!0})],N.prototype,"small",2),y([G({type:Boolean,reflect:!0})],N.prototype,"loading",2),y([G({reflect:!0})],N.prototype,"href",2),y([G({reflect:!0})],N.prototype,"target",2),y([G({reflect:!0})],N.prototype,"rel",2),y([G({attribute:"full-width",type:Boolean,reflect:!0})],N.prototype,"fullWidth",2),y([G({attribute:"button-class",reflect:!0})],N.prototype,"buttonClass",2),y([G({reflect:!0})],N.prototype,"name",2),y([G({reflect:!0})],N.prototype,"value",2);customElements.get("w-button")||customElements.define("w-button",N);var Pi={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},Re="font-bold focusable justify-center transition-colors ease-in-out",Aa={primary:`border-0 rounded-8 ${Re}`,secondary:`border-2 rounded-8 ${Re}`,utility:`border rounded-4 ${Re}`,negative:`border-0 rounded-8 ${Re}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${Re}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${Pi.link}`},Fe={base:"border-2 relative flex items-center",tooltip:"s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted rounded-4 py-6 px-8",callout:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",highlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",popover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeftStart:"-left-[8px]",arrowDirectionLeft:"-left-[8px]",arrowDirectionLeftEnd:"-left-[8px]",arrowDirectionRightStart:"-right-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionRightEnd:"-right-[8px]",arrowDirectionBottomStart:"-bottom-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionBottomEnd:"-bottom-[8px]",arrowDirectionTopStart:"-top-[8px]",arrowDirectionTop:"-top-[8px]",arrowDirectionTopEnd:"-top-[8px]",arrowTooltip:"s-bg-inverted border-[--w-s-color-background-inverted]",arrowCallout:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",arrowPopover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",arrowHighlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",content:"last-child:mb-0",notCallout:"absolute z-50"},V=class extends Ai{constructor(){super();this.show=!1;this.tooltip=!1;this.callout=!1;this.highlight=!1;this.canClose=!1;this.noArrow=!1;this.flip=!1;this.crossAxis=!1;ut(jr,qr,Nr,Fr,Vr),this.handleDone=this.handleDone.bind(this),this.show=!1,this.placement="bottom",this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1,this.distance=8,this.skidding=0,this.flip=!1,this.crossAxis=!1,this._initialPlacement=this.placement,this._actualDirection=this.placement}connectedCallback(){if(super.connectedCallback(),this.placement&&!Object.keys(ye).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
3632
+ ${JSON.stringify(Object.keys(ye))}`);if(this.fallbackPlacements&&!this.fallbackPlacements.every(r=>kt.includes(r)))throw new Error(`Invalid "fallbackPlacements" attribute. Set its value to an array with one or more of the following:
3633
+ ${JSON.stringify(kt)}`);setTimeout(()=>{this.requestUpdate(),this.handleDone()},0),this.callout||(window.addEventListener("click",this.handleDone),window.addEventListener("scroll",this.handleDone),window.addEventListener("resize",this.handleDone),window.addEventListener("touch",this.handleDone)),this.tooltip&&(window.addEventListener("mouseover",this.handleDone),window.addEventListener("mouseout",this.handleDone))}disconnectedCallback(){window.removeEventListener("click",this.handleDone),window.removeEventListener("scroll",this.handleDone),window.removeEventListener("resize",this.handleDone),window.removeEventListener("touch",this.handleDone),window.removeEventListener("mouseover",this.handleDone),window.removeEventListener("mouseout",this.handleDone),super.disconnectedCallback()}handleDone(){window.requestAnimationFrame(()=>{this.show&&this._targetEl&&this._attentionEl?_t(this.attentionState).then(r=>{this._actualDirection=r==null?void 0:r.actualDirection}):this._actualDirection=this._initialPlacement})}get _actualDirection(){return this.placement}set _actualDirection(r){this.placement=r}get _arrowEl(){return this.renderRoot.querySelector("#arrow")}get _arrowDirection(){return ye[this._actualDirection]}get _arrowClasses(){return ke([Fe.arrowBase,this._activeVariantClasses.arrow,Fe[`arrowDirection${$t(this._arrowDirection)}`]])}get _arrowHtml(){return this.noArrow?"":Le`<div id="arrow" class="${this._arrowClasses}"></div>`}get _activeVariantClasses(){let r={callout:this.callout,popover:this.popover,tooltip:this.tooltip,highlight:this.highlight},o=Object.keys(r).find(i=>!!r[i])||"";return{wrapper:Fe[o],arrow:Fe[`arrow${o.charAt(0).toUpperCase()+o.slice(1)}`]}}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){var o;let r=(o=this.renderRoot)==null?void 0:o.querySelector("slot[name='target']");return r?r.assignedElements()[0]:null}get _messageEl(){let r=this.renderRoot.querySelector("slot[name='message']");return r?r.assignedElements()[0]:null}get _wrapperClasses(){return ke([Fe.base,this._activeVariantClasses.wrapper])}get _ariaClose(){return P._({id:"attention.aria.close",message:"Close",comment:"Aria label for the close button in attention"})}get _closeBtnHtml(){return Le`
3634
3634
  <w-button
3635
3635
  aria-label="${this._ariaClose}"
3636
3636
  @click=${this.close}
@@ -3645,7 +3645,7 @@ ${JSON.stringify(kt)}`);setTimeout(()=>{this.requestUpdate(),this.handleDone()},
3645
3645
  locale="${dt()}"
3646
3646
  class="flex"></w-icon>
3647
3647
  </w-button>
3648
- `}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this._arrowEl,attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow,distance:this.distance,skidding:this.skidding,flip:this.flip,crossAxis:this.crossAxis,fallbackPlacements:this.fallbackPlacements},_t(this.attentionState)}pointingAtDirection(){switch(ye[this._actualDirection]){case"top-start":case"top":case"top-end":return P._({id:"attention.aria.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right-start":case"right":case"right-end":return P._({id:"attention.aria.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom-start":case"bottom":case"bottom-end":return P._({id:"attention.aria.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left-start":case"left":case"left-end":return P._({id:"attention.aria.pointingLeft",message:"pointing left",comment:"Default screenreader message for left direction in the attention component"});default:return""}}activeAttentionType(){switch(!0){case this.tooltip:return P._({id:"attention.aria.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return P._({id:"attention.aria.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return P._({id:"attention.aria.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return P._({id:"attention.aria.highlight",message:"highlighted speech bubble",comment:"Default screenreader message for highlighted speech bubble in the attention component"});default:return""}}defaultAriaLabel(){return`${this.activeAttentionType()} ${this.noArrow?"":this.pointingAtDirection()}`}setAriaLabels(){if(this._targetEl&&!this._targetEl.getAttribute("aria-details")){let t=this._messageEl.id||(this._messageEl.id=Mr());this._targetEl.setAttribute("aria-details",t)}}firstUpdated(){this._initialPlacement=this.placement,this.setAriaLabels(),this.callout&&(this._attentionEl.style.position="relative")}close(){let t=new CustomEvent("close",{bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(t))}keypressed(t){this.canClose&&t.key==="Escape"&&(t.preventDefault(),this.close())}render(){return!this.callout&&this._targetEl===void 0?Le``:Le`
3648
+ `}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this._arrowEl,attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow,distance:this.distance,skidding:this.skidding,flip:this.flip,crossAxis:this.crossAxis,fallbackPlacements:this.fallbackPlacements},_t(this.attentionState)}pointingAtDirection(){switch(ye[this._actualDirection]){case"top-start":case"top":case"top-end":return P._({id:"attention.aria.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right-start":case"right":case"right-end":return P._({id:"attention.aria.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom-start":case"bottom":case"bottom-end":return P._({id:"attention.aria.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left-start":case"left":case"left-end":return P._({id:"attention.aria.pointingLeft",message:"pointing left",comment:"Default screenreader message for left direction in the attention component"});default:return""}}activeAttentionType(){switch(!0){case this.tooltip:return P._({id:"attention.aria.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return P._({id:"attention.aria.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return P._({id:"attention.aria.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return P._({id:"attention.aria.highlight",message:"highlighted speech bubble",comment:"Default screenreader message for highlighted speech bubble in the attention component"});default:return""}}defaultAriaLabel(){return`${this.activeAttentionType()} ${this.noArrow?"":this.pointingAtDirection()}`}setAriaLabels(){if(this._targetEl&&!this._targetEl.getAttribute("aria-details")){let r=this._messageEl.id||(this._messageEl.id=Mr());this._targetEl.setAttribute("aria-details",r)}}firstUpdated(){this._initialPlacement=this.placement,this.setAriaLabels(),this.callout&&(this._attentionEl.style.position="relative")}close(){let r=new CustomEvent("close",{bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(r))}keypressed(r){this.canClose&&r.key==="Escape"&&(r.preventDefault(),this.close())}render(){return!this.callout&&this._targetEl===void 0?Le``:Le`
3649
3649
  <div class=${Ti(this.className?this.className:void 0)}>
3650
3650
  ${this.placement==="right-start"||this.placement==="right"||this.placement==="right-end"||this.placement==="bottom-start"||this.placement==="bottom"||this.placement==="bottom-end"?Le`
3651
3651
  <slot name="target"></slot>