@rededor/cura 2.0.0-alpha.13 → 2.0.0-alpha.16

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 (168) hide show
  1. package/dist/cjs/cura-accordion_22.cjs.entry.js +65 -74
  2. package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
  3. package/dist/cjs/cura-display.cjs.entry.js +1 -1
  4. package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +1 -1
  5. package/dist/cjs/cura-icons-view.cjs.entry.js +1 -1
  6. package/dist/cjs/cura-input-date.cjs.entry.js +1 -1
  7. package/dist/cjs/cura-input-textarea.cjs.entry.js +236 -0
  8. package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
  9. package/dist/cjs/cura-modal.cjs.entry.js +1 -1
  10. package/dist/cjs/cura-progress-bar_2.cjs.entry.js +2 -2
  11. package/dist/cjs/cura-radio.cjs.entry.js +1 -1
  12. package/dist/cjs/cura-stepper.cjs.entry.js +1 -1
  13. package/dist/cjs/cura-switch.cjs.entry.js +1 -1
  14. package/dist/cjs/cura-tabs-button.cjs.entry.js +1 -1
  15. package/dist/cjs/cura-tabs-transparent.cjs.entry.js +1 -1
  16. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  17. package/dist/cjs/cura-tooltip.cjs.entry.js +1 -1
  18. package/dist/cjs/cura.cjs.js +1 -1
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/cjs/utils-DMHZ2n4p.js +47 -0
  21. package/dist/collection/collection-manifest.json +1 -0
  22. package/dist/collection/components/cura-calendar/cura-calendar.css +13 -1
  23. package/dist/collection/components/cura-calendar/cura-calendar.js +92 -11
  24. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +29 -1
  25. package/dist/collection/components/cura-calendar/cura-calendar.type.js +1 -0
  26. package/dist/collection/components/cura-card/cura-card.js +1 -1
  27. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-category/cura-dropdown-search-category.js +1 -1
  28. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js +1 -1
  29. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +1 -1
  30. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +1 -1
  31. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  32. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  33. package/dist/collection/components/cura-modal/cura-modal.js +1 -1
  34. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  35. package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +1 -1
  36. package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +1 -1
  37. package/dist/collection/components/cura-stepper/cura-stepper.js +1 -1
  38. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  39. package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
  40. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  41. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
  42. package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.css +174 -0
  43. package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.js +613 -0
  44. package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.stories.js +222 -0
  45. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  46. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  47. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  48. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  49. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  50. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  51. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  52. package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +1 -1
  53. package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +1 -1
  54. package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +1 -1
  55. package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +1 -1
  56. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  57. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  58. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  59. package/dist/components/cura-accordion-item.js +1 -1
  60. package/dist/components/cura-alert.js +1 -1
  61. package/dist/components/cura-badge-counter.js +1 -1
  62. package/dist/components/cura-badge-distance.js +1 -1
  63. package/dist/components/cura-badge-pill.js +1 -1
  64. package/dist/components/cura-button-outline.js +1 -1
  65. package/dist/components/cura-button-select.js +1 -1
  66. package/dist/components/cura-button-transparent.js +1 -1
  67. package/dist/components/cura-button.js +1 -1
  68. package/dist/components/cura-calendar.js +1 -1
  69. package/dist/components/cura-card.js +1 -1
  70. package/dist/components/cura-checkbox.js +1 -1
  71. package/dist/components/cura-display.js +1 -1
  72. package/dist/components/cura-dropdown-search-category.js +1 -1
  73. package/dist/components/cura-dropdown-search-not-found.js +1 -1
  74. package/dist/components/cura-dropdown-search-option.js +1 -1
  75. package/dist/components/cura-dropdown-search.js +1 -1
  76. package/dist/components/cura-heading.js +1 -1
  77. package/dist/components/cura-icon.js +1 -1
  78. package/dist/components/cura-icons-view.js +1 -1
  79. package/dist/components/cura-input-date.js +1 -1
  80. package/dist/components/cura-input-text.js +1 -1
  81. package/dist/components/cura-input-textarea.d.ts +11 -0
  82. package/dist/components/cura-input-textarea.js +1 -0
  83. package/dist/components/cura-label.js +1 -1
  84. package/dist/components/cura-loader-bar.js +1 -1
  85. package/dist/components/cura-loader-circle.js +1 -1
  86. package/dist/components/cura-modal.js +1 -1
  87. package/dist/components/cura-page-template.js +1 -1
  88. package/dist/components/cura-paragraph.js +1 -1
  89. package/dist/components/cura-progress-bar.js +1 -1
  90. package/dist/components/cura-radio.js +1 -1
  91. package/dist/components/cura-select-option.js +1 -1
  92. package/dist/components/cura-select.js +1 -1
  93. package/dist/components/cura-stepper-item.js +1 -1
  94. package/dist/components/cura-stepper.js +1 -1
  95. package/dist/components/cura-switch.js +1 -1
  96. package/dist/components/cura-tabs-button.js +1 -1
  97. package/dist/components/cura-tabs-group.js +1 -1
  98. package/dist/components/cura-tabs-transparent.js +1 -1
  99. package/dist/components/cura-tabs.js +1 -1
  100. package/dist/components/cura-toast.js +1 -1
  101. package/dist/components/cura-tooltip.js +1 -1
  102. package/dist/components/index.js +1 -1
  103. package/dist/components/p-B2TDH4aP.js +1 -0
  104. package/dist/components/{p-C05r6CQV.js → p-BHVSbubb.js} +1 -1
  105. package/dist/components/{p-B2RN7oe_.js → p-BKDpza6x.js} +1 -1
  106. package/dist/components/{p-BYA8glxD.js → p-BuETJyzc.js} +1 -1
  107. package/dist/components/p-CalvBU-U.js +1 -0
  108. package/dist/components/{p-CCkEqDZb.js → p-CksTHXxZ.js} +1 -1
  109. package/dist/components/{p-DxJedO3K.js → p-D4hCuriT.js} +1 -1
  110. package/dist/components/{p-fn4zJrKE.js → p-DI66_jP6.js} +1 -1
  111. package/dist/components/{p-Bf21UQXV.js → p-DQP7jRHp.js} +1 -1
  112. package/dist/components/p-DgK8dEko.js +1 -0
  113. package/dist/components/{p-DXlGQp3a.js → p-DgQJ968V.js} +1 -1
  114. package/dist/components/{p-fR02COZb.js → p-Dmalf4Oj.js} +1 -1
  115. package/dist/components/{p-D6xuYQiO.js → p-KovUKiTX.js} +1 -1
  116. package/dist/components/{p-D7WNwjv-.js → p-PiUhcFob.js} +1 -1
  117. package/dist/components/{p-C7so9xnO.js → p-TnCIk87O.js} +1 -1
  118. package/dist/components/{p-BSdkRryc.js → p-i55vIhdM.js} +1 -1
  119. package/dist/cura/cura.esm.js +1 -1
  120. package/dist/cura/{p-bf99e8bf.entry.js → p-18a1cadf.entry.js} +1 -1
  121. package/dist/cura/{p-ddf4d240.entry.js → p-1c48aaa7.entry.js} +1 -1
  122. package/dist/cura/{p-b7369d04.entry.js → p-4178e3e6.entry.js} +1 -1
  123. package/dist/cura/p-5b26a166.entry.js +1 -0
  124. package/dist/cura/{p-42e72d12.entry.js → p-604f1c1d.entry.js} +1 -1
  125. package/dist/cura/{p-9de85de6.entry.js → p-906c8b66.entry.js} +1 -1
  126. package/dist/cura/p-CUmwazb8.js +1 -0
  127. package/dist/cura/p-a305e17a.entry.js +1 -0
  128. package/dist/cura/{p-3a3202f0.entry.js → p-a72db13d.entry.js} +1 -1
  129. package/dist/cura/{p-c247c93b.entry.js → p-b157025d.entry.js} +1 -1
  130. package/dist/cura/{p-f911a6c5.entry.js → p-b447fca2.entry.js} +1 -1
  131. package/dist/cura/{p-2e2e2b4d.entry.js → p-bd649bed.entry.js} +1 -1
  132. package/dist/cura/{p-c18d7f16.entry.js → p-c987ddde.entry.js} +1 -1
  133. package/dist/cura/{p-b14ae206.entry.js → p-d43fb791.entry.js} +1 -1
  134. package/dist/cura/{p-7965fe63.entry.js → p-d64ef37d.entry.js} +1 -1
  135. package/dist/cura/{p-1dc9c478.entry.js → p-f072b011.entry.js} +1 -1
  136. package/dist/cura/{p-5357f7bd.entry.js → p-f407bd73.entry.js} +1 -1
  137. package/dist/cura/p-f638eda8.entry.js +1 -0
  138. package/dist/esm/cura-accordion_22.entry.js +58 -67
  139. package/dist/esm/cura-checkbox.entry.js +1 -1
  140. package/dist/esm/cura-display.entry.js +1 -1
  141. package/dist/esm/cura-dropdown-search-not-found.entry.js +1 -1
  142. package/dist/esm/cura-icons-view.entry.js +1 -1
  143. package/dist/esm/cura-input-date.entry.js +1 -1
  144. package/dist/esm/cura-input-textarea.entry.js +234 -0
  145. package/dist/esm/cura-loader-bar.entry.js +1 -1
  146. package/dist/esm/cura-modal.entry.js +1 -1
  147. package/dist/esm/cura-progress-bar_2.entry.js +2 -2
  148. package/dist/esm/cura-radio.entry.js +1 -1
  149. package/dist/esm/cura-stepper.entry.js +1 -1
  150. package/dist/esm/cura-switch.entry.js +1 -1
  151. package/dist/esm/cura-tabs-button.entry.js +1 -1
  152. package/dist/esm/cura-tabs-transparent.entry.js +1 -1
  153. package/dist/esm/cura-toast.entry.js +1 -1
  154. package/dist/esm/cura-tooltip.entry.js +1 -1
  155. package/dist/esm/cura.js +1 -1
  156. package/dist/esm/loader.js +1 -1
  157. package/dist/esm/utils-BZCR971L.js +41 -0
  158. package/dist/types/components/cura-calendar/cura-calendar.d.ts +20 -2
  159. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +29 -0
  160. package/dist/types/components/cura-calendar/cura-calendar.type.d.ts +4 -0
  161. package/dist/types/components/forms/cura-input-textarea/cura-input-textarea.d.ts +116 -0
  162. package/dist/types/components/forms/cura-input-textarea/cura-input-textarea.stories.d.ts +188 -0
  163. package/dist/types/components.d.ts +232 -0
  164. package/package.json +2 -2
  165. package/dist/components/p-B8xnU6YS.js +0 -1
  166. package/dist/components/p-CG1lz5DR.js +0 -1
  167. package/dist/cura/p-47fdb124.entry.js +0 -1
  168. package/dist/cura/p-cbe8c690.entry.js +0 -1
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-C7so9xnO.js";const p=o,r=s;export{p as CuraStepperItem,r as defineCustomElement}
1
+ import{C as o,d as s}from"./p-TnCIk87O.js";const p=o,r=s;export{p as CuraStepperItem,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,i as s,j as r,t as i}from"./p-DBXUEjWh.js";import{d as a}from"./p-D6xuYQiO.js";import{d as o}from"./p-fR02COZb.js";import{d as l}from"./p-fn4zJrKE.js";import{d as n}from"./p-BSdkRryc.js";import{d as c}from"./p-D7WNwjv-.js";import{d as p}from"./p-CG1lz5DR.js";import{d as h}from"./p-C7so9xnO.js";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.errorInCurrentStep=!1,this.displayHeading=!1,this.variant="default",this.steps=[],this.styles={},this.stepList=[]}connectedCallback(){this.initializeSteps();const{fonts:e,colors:t,spacing:s}=window.CuraAPI.theme,r=e.getWeights();this.styles=this.generateStyles(t,e,s,r)}generateStyles(e,t,s,r){return{"--base-spacing":s.getSpacing(),"--neutral-purewhite":e.getColor("neutral-purewhite"),"--neutral-lighter":e.getColor("neutral-lighter"),"--neutral-base":e.getColor("neutral-base"),"--neutral-light":e.getColor("neutral-light"),"--success-light":e.getColor("success-light"),"--info-light":e.getColor("info-light"),"--error-light":e.getColor("error-light"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":r.regular}}initializeSteps(){this.stepList="string"==typeof this.steps?JSON.parse(this.steps||"[]"):this.steps}getStepStatus(e){return this.activeStepIndex===e&&this.errorInCurrentStep?"stop":this.activeStepIndex===e&&this.stepList.length!==e?"active":this.activeStepIndex>=e?"done":"default"}getProgressStyles(){return this.errorInCurrentStep?{progressColor:"var(--error-light)",activeStepTextColor:"error-darker",nextStepTextColor:"error-dark"}:0===this.activeStepIndex?{progressColor:"var(--info-light)",activeStepTextColor:"neutral-dark",nextStepTextColor:"neutral-medium"}:this.activeStepIndex===this.stepList.length?{progressColor:"var(--success-light)",activeStepTextColor:"success-darker",nextStepTextColor:"success-dark"}:{progressColor:"var(--info-light)",activeStepTextColor:"info-darker",nextStepTextColor:"info-dark"}}renderCompactStepper(){var e;const t=0===this.activeStepIndex?this.stepList[this.activeStepIndex].title:this.stepList[this.activeStepIndex-1].title,r=0===this.activeStepIndex?this.stepList[this.activeStepIndex+1].title:null===(e=this.stepList[this.activeStepIndex])||void 0===e?void 0:e.title,i=this.activeStepIndex===this.stepList.length,a=!(i||this.errorInCurrentStep),{progressColor:o,activeStepTextColor:l,nextStepTextColor:n}=this.getProgressStyles();return s("div",{class:"container compact",style:this.styles},s("cura-progress-bar",{progress:100*this.activeStepIndex/this.stepList.length,progressColor:o,active:0!==this.activeStepIndex},a?s("cura-heading",{color:"neutral-dark",size:"xsmall"},this.activeStepIndex,"/",this.stepList.length):s("cura-icon",{name:this.errorInCurrentStep?"alertCircle":"checkCircle",color:this.errorInCurrentStep?"error-dark":"success-dark",size:"16"})),this.displayHeading&&s("div",{class:"heading"},s("cura-heading",{size:"small",weight:"bold",color:l},t),!i&&s("cura-heading",{size:"xsmall",weight:"regular",color:n},"Próximo: ",r)))}renderStep(e,t){const r=this.getStepStatus(t+1),i="default"!==r?"100%":"0";return s("div",{class:"step "+(t===this.stepList.length-1?"last":""),key:e.title},s("cura-stepper-item",{heading:e.title,label:e.label,displayHeading:this.displayHeading,status:r}),t<this.stepList.length-1&&s("div",{class:"wrapper"},s("div",{class:"divider"}),s("div",{class:`divider ${r} animation`,style:{"--progress-width":i}})))}renderStepper(){return s("div",{class:"container",style:this.styles},s("div",{class:"stepper-list"},this.stepList.map(((e,t)=>this.renderStep(e,t)))))}render(){return s(r,{key:"6593f8a294abd6f729cbf493e3a773f358c10cf7"},"default"===this.variant?this.renderStepper():this.renderCompactStepper())}get host(){return this}static get style(){return":host{display:block;box-sizing:border-box;width:100%}cura-heading{--margin-block:0 !important}.container{display:flex}.compact{display:flex;padding:0px;justify-content:space-between;align-items:center}.compact .heading{text-align:right}.stepper-list{gap:4px;display:flex;flex-shrink:0;align-items:center;padding:0;flex:1;width:100%;justify-content:space-between}.step{display:flex;align-items:center;flex-direction:row;flex:1;gap:4px}.step .wrapper{flex:1;position:relative}.step .divider{background-color:var(--neutral-light);height:2px;flex:1;transition:all 1s}.step .animation{position:absolute;top:0;left:0;right:0;width:var(--progress-width)}.step .done{background-color:var(--success-light)}.step .stop{background-color:var(--error-light)}.step .active{background-color:var(--info-light)}.last{flex:0}"}},[1,"cura-stepper",{activeStepIndex:[514,"active-step-index"],errorInCurrentStep:[516,"error-in-current-step"],displayHeading:[516,"display-heading"],variant:[513],steps:[1],styles:[32],stepList:[32]}]),u=d,g=function(){"undefined"!=typeof customElements&&["cura-stepper","cura-badge-pill","cura-heading","cura-icon","cura-label","cura-paragraph","cura-progress-bar","cura-stepper-item"].forEach((e=>{switch(e){case"cura-stepper":customElements.get(i(e))||customElements.define(i(e),d);break;case"cura-badge-pill":customElements.get(i(e))||a();break;case"cura-heading":customElements.get(i(e))||o();break;case"cura-icon":customElements.get(i(e))||l();break;case"cura-label":customElements.get(i(e))||n();break;case"cura-paragraph":customElements.get(i(e))||c();break;case"cura-progress-bar":customElements.get(i(e))||p();break;case"cura-stepper-item":customElements.get(i(e))||h()}}))};export{u as CuraStepper,g as defineCustomElement}
1
+ import{p as e,H as t,i as s,j as r,t as i}from"./p-DBXUEjWh.js";import{d as a}from"./p-KovUKiTX.js";import{d as o}from"./p-Dmalf4Oj.js";import{d as l}from"./p-DI66_jP6.js";import{d as c}from"./p-i55vIhdM.js";import{d as n}from"./p-PiUhcFob.js";import{d as p}from"./p-CalvBU-U.js";import{d as h}from"./p-TnCIk87O.js";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.errorInCurrentStep=!1,this.displayHeading=!1,this.variant="default",this.steps=[],this.styles={},this.stepList=[]}connectedCallback(){this.initializeSteps();const{fonts:e,colors:t,spacing:s}=window.CuraAPI.theme,r=e.getWeights();this.styles=this.generateStyles(t,e,s,r)}generateStyles(e,t,s,r){return{"--base-spacing":s.getSpacing(),"--neutral-purewhite":e.getColor("neutral-purewhite"),"--neutral-lighter":e.getColor("neutral-lighter"),"--neutral-base":e.getColor("neutral-base"),"--neutral-light":e.getColor("neutral-light"),"--success-light":e.getColor("success-light"),"--info-light":e.getColor("info-light"),"--error-light":e.getColor("error-light"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":r.regular}}initializeSteps(){this.stepList="string"==typeof this.steps?JSON.parse(this.steps||"[]"):this.steps}getStepStatus(e){return this.activeStepIndex===e&&this.errorInCurrentStep?"stop":this.activeStepIndex===e&&this.stepList.length!==e?"active":this.activeStepIndex>=e?"done":"default"}getProgressStyles(){return this.errorInCurrentStep?{progressColor:"var(--error-light)",activeStepTextColor:"error-darker",nextStepTextColor:"error-dark"}:0===this.activeStepIndex?{progressColor:"var(--info-light)",activeStepTextColor:"neutral-dark",nextStepTextColor:"neutral-medium"}:this.activeStepIndex===this.stepList.length?{progressColor:"var(--success-light)",activeStepTextColor:"success-darker",nextStepTextColor:"success-dark"}:{progressColor:"var(--info-light)",activeStepTextColor:"info-darker",nextStepTextColor:"info-dark"}}renderCompactStepper(){var e;const t=0===this.activeStepIndex?this.stepList[this.activeStepIndex].title:this.stepList[this.activeStepIndex-1].title,r=0===this.activeStepIndex?this.stepList[this.activeStepIndex+1].title:null===(e=this.stepList[this.activeStepIndex])||void 0===e?void 0:e.title,i=this.activeStepIndex===this.stepList.length,a=!(i||this.errorInCurrentStep),{progressColor:o,activeStepTextColor:l,nextStepTextColor:c}=this.getProgressStyles();return s("div",{class:"container compact",style:this.styles},s("cura-progress-bar",{progress:100*this.activeStepIndex/this.stepList.length,progressColor:o,active:0!==this.activeStepIndex},a?s("cura-heading",{color:"neutral-dark",size:"xsmall"},this.activeStepIndex,"/",this.stepList.length):s("cura-icon",{name:this.errorInCurrentStep?"alertCircle":"checkCircle",color:this.errorInCurrentStep?"error-dark":"success-dark",size:"16"})),this.displayHeading&&s("div",{class:"heading"},s("cura-heading",{size:"small",weight:"bold",color:l},t),!i&&s("cura-heading",{size:"xsmall",weight:"regular",color:c},"Próximo: ",r)))}renderStep(e,t){const r=this.getStepStatus(t+1),i="default"!==r?"100%":"0";return s("div",{class:"step "+(t===this.stepList.length-1?"last":""),key:e.title},s("cura-stepper-item",{heading:e.title,label:e.label,displayHeading:this.displayHeading,status:r}),t<this.stepList.length-1&&s("div",{class:"wrapper"},s("div",{class:"divider"}),s("div",{class:`divider ${r} animation`,style:{"--progress-width":i}})))}renderStepper(){return s("div",{class:"container",style:this.styles},s("div",{class:"stepper-list"},this.stepList.map(((e,t)=>this.renderStep(e,t)))))}render(){return s(r,{key:"34f5acc0bded7a19276667cbdb84e0617232d73b"},"default"===this.variant?this.renderStepper():this.renderCompactStepper())}get host(){return this}static get style(){return":host{display:block;box-sizing:border-box;width:100%}cura-heading{--margin-block:0 !important}.container{display:flex}.compact{display:flex;padding:0px;justify-content:space-between;align-items:center}.compact .heading{text-align:right}.stepper-list{gap:4px;display:flex;flex-shrink:0;align-items:center;padding:0;flex:1;width:100%;justify-content:space-between}.step{display:flex;align-items:center;flex-direction:row;flex:1;gap:4px}.step .wrapper{flex:1;position:relative}.step .divider{background-color:var(--neutral-light);height:2px;flex:1;transition:all 1s}.step .animation{position:absolute;top:0;left:0;right:0;width:var(--progress-width)}.step .done{background-color:var(--success-light)}.step .stop{background-color:var(--error-light)}.step .active{background-color:var(--info-light)}.last{flex:0}"}},[1,"cura-stepper",{activeStepIndex:[514,"active-step-index"],errorInCurrentStep:[516,"error-in-current-step"],displayHeading:[516,"display-heading"],variant:[513],steps:[1],styles:[32],stepList:[32]}]),u=d,g=function(){"undefined"!=typeof customElements&&["cura-stepper","cura-badge-pill","cura-heading","cura-icon","cura-label","cura-paragraph","cura-progress-bar","cura-stepper-item"].forEach((e=>{switch(e){case"cura-stepper":customElements.get(i(e))||customElements.define(i(e),d);break;case"cura-badge-pill":customElements.get(i(e))||a();break;case"cura-heading":customElements.get(i(e))||o();break;case"cura-icon":customElements.get(i(e))||l();break;case"cura-label":customElements.get(i(e))||c();break;case"cura-paragraph":customElements.get(i(e))||n();break;case"cura-progress-bar":customElements.get(i(e))||p();break;case"cura-stepper-item":customElements.get(i(e))||h()}}))};export{u as CuraStepper,g as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as a,k as t,i as r,j as s,t as i}from"./p-DBXUEjWh.js";import{f as o}from"./p-Dot54hbB.js";import{d as l}from"./p-BSdkRryc.js";const n=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.onchange=t(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.disabled=!1,this.label="",this.ontabindex=0,this.position="left",this.size="medium",this.background="light",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.sizes={large:{size:64},medium:{size:48},small:{size:40}},this.isDarkbackground=()=>"dark"===this.background,this.toggleSwitch=()=>{if(this.disabled)return null;this.checked=!this.checked,this.internals.setFormValue(""+this.checked),this.onchange.emit({checked:this.checked})}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-track":this.sizes[this.size].size+"px","--size":o[this.size].size+"px","--gap":o[this.size].gap+"px"})}setColors(){[{name:"--info-base",background:"info-base"},{name:"--neutral-black-shadow",background:"neutral-black",opacity:.16},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--neutral-medium",background:"neutral-medium"},{name:"--neutral-pale",background:"neutral-pale"},{name:"--neutral-dark-base",background:"neutral-"+(this.isDarkbackground()?"dark":"base")},{name:"--neutral-darker-medium",background:"neutral-"+(this.isDarkbackground()?"darker":"medium")},{name:"--neutral-black-neutral-pale",background:this.isDarkbackground()?"neutral-black":"neutral-pale"},{name:"--neutral-black-neutral-base",background:this.isDarkbackground()?"neutral-dark":"neutral-base"},{name:"--color-base-light",background:this.color+"-light"},{name:"--color-dark",background:this.color+"-dark"}].forEach((e=>{this.styles[e.name]=window.CuraAPI.theme.colors.getColor(e.background,null==e?void 0:e.opacity)})),this.styles=Object.assign({},this.styles)}connectedCallback(){this.sizeHandler(),this.setColors()}formAssociatedCallback(e){e.ariaLabel=this.label}formStateRestoreCallback(e){this.checked="true"===e.value,this.internals.setFormValue(""+this.checked)}formResetCallback(){this.checked=!1,this.internals.setValidity({}),this.internals.setFormValue(""+this.checked)}formDisabledCallback(e){this.disabled=e}assignColor(e,a){return this.disabled?(this.isDarkbackground(),"neutral-dark"):this.isDarkbackground()?e:a}getClasses(){const e={container:!0};return e.checked=this.checked,e.disabled=this.disabled,e.position="right"===this.position,e}render(){return r(s,{key:"39e910a3c68672eb23a123529a77f8ee0d1093aa",role:"switch","aria-checked":this.checked,"aria-disabled":this.disabled},r("div",{key:"649b89d2709b8afa30cfc1ba549d45ac3c9c04a1",class:this.getClasses(),style:this.styles,onClick:this.toggleSwitch},r("div",{key:"4b1c7d704f0db997a4738abbd248c3a0bbcfdfcd",class:"info"},r("cura-label",{key:"b225b06ed00144348d08bb95c8a5bf2f1f48e610",textOverflow:this.overflowLabel,style:{textAlign:"right"===this.position?"right":"left"},class:"label",weight:"bold",size:"large"===this.size?"medium":"xsmall",lineHeight:"125%",color:this.assignColor("neutral-white","neutral-black")},this.label),r("cura-label",{key:"22f5e79e0b2e98867663a9a60436d11bc2ce236e",textOverflow:this.overflowHelper,style:{textAlign:"right"===this.position?"right":"left"},color:this.assignColor("primary-lighter","neutral-dark"),size:"xsmall",class:"message"},r("slot",{key:"d9ed12c05133baeec10aa149f26d6dc01b2e3cd8"}))),r("div",{key:"d51364956de2b53735285109dd457cbff9500eb7",class:"control"},r("div",{key:"5f1ce68eba5430eac69d670a72c4abd48a79a90d",class:"track "+this.size.toLowerCase()},r("div",{key:"5077af32559bc7eb183745544844d01a6078ee1d",class:"thumb "+this.size.toLowerCase(),tabIndex:this.ontabindex})))))}static get formAssociated(){return!0}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);text-align:left;cursor:pointer}.position{flex-direction:row}.info{overflow:hidden}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color 0.3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform 0.3s, outline 0.3s;display:inline-block;cursor:pointer;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));background:var(--neutral-purewhite);transform:translateX(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale) !important;border-color:var(--neutral-darker-medium) !important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base) !important;border-color:var(--neutral-black-neutral-pale) !important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none !important;border-color:var(--neutral-black-neutral-pale) !important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base) !important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base) !important;border-color:var(--color-dark)}'}},[321,"cura-switch",{checked:[1540],disabled:[516],label:[513],ontabindex:[514],position:[513],size:[513],background:[1],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0}]}]),c=n,d=function(){"undefined"!=typeof customElements&&["cura-switch","cura-label"].forEach((e=>{switch(e){case"cura-switch":customElements.get(i(e))||customElements.define(i(e),n);break;case"cura-label":customElements.get(i(e))||l()}}))};export{c as CuraSwitch,d as defineCustomElement}
1
+ import{p as e,H as a,k as t,i as r,j as s,t as i}from"./p-DBXUEjWh.js";import{f as o}from"./p-Dot54hbB.js";import{d as l}from"./p-i55vIhdM.js";const n=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.onchange=t(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.disabled=!1,this.label="",this.ontabindex=0,this.position="left",this.size="medium",this.background="light",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.sizes={large:{size:64},medium:{size:48},small:{size:40}},this.isDarkbackground=()=>"dark"===this.background,this.toggleSwitch=()=>{if(this.disabled)return null;this.checked=!this.checked,this.internals.setFormValue(""+this.checked),this.onchange.emit({checked:this.checked})}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-track":this.sizes[this.size].size+"px","--size":o[this.size].size+"px","--gap":o[this.size].gap+"px"})}setColors(){[{name:"--info-base",background:"info-base"},{name:"--neutral-black-shadow",background:"neutral-black",opacity:.16},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--neutral-medium",background:"neutral-medium"},{name:"--neutral-pale",background:"neutral-pale"},{name:"--neutral-dark-base",background:"neutral-"+(this.isDarkbackground()?"dark":"base")},{name:"--neutral-darker-medium",background:"neutral-"+(this.isDarkbackground()?"darker":"medium")},{name:"--neutral-black-neutral-pale",background:this.isDarkbackground()?"neutral-black":"neutral-pale"},{name:"--neutral-black-neutral-base",background:this.isDarkbackground()?"neutral-dark":"neutral-base"},{name:"--color-base-light",background:this.color+"-light"},{name:"--color-dark",background:this.color+"-dark"}].forEach((e=>{this.styles[e.name]=window.CuraAPI.theme.colors.getColor(e.background,null==e?void 0:e.opacity)})),this.styles=Object.assign({},this.styles)}connectedCallback(){this.sizeHandler(),this.setColors()}formAssociatedCallback(e){e.ariaLabel=this.label}formStateRestoreCallback(e){this.checked="true"===e.value,this.internals.setFormValue(""+this.checked)}formResetCallback(){this.checked=!1,this.internals.setValidity({}),this.internals.setFormValue(""+this.checked)}formDisabledCallback(e){this.disabled=e}assignColor(e,a){return this.disabled?(this.isDarkbackground(),"neutral-dark"):this.isDarkbackground()?e:a}getClasses(){const e={container:!0};return e.checked=this.checked,e.disabled=this.disabled,e.position="right"===this.position,e}render(){return r(s,{key:"55eb7eb4da5cc3eaa376c3a188f1f4580b4d3be8",role:"switch","aria-checked":this.checked,"aria-disabled":this.disabled},r("div",{key:"2c2e8f59747f6b12e6e9b528007e9e585fc2bb6e",class:this.getClasses(),style:this.styles,onClick:this.toggleSwitch},r("div",{key:"6e3ba0c77facb521f15cc7cdf75adb0ec7a64985",class:"info"},r("cura-label",{key:"6ecc8ca37c3e4078b35f063f935ffa802ed11c0a",textOverflow:this.overflowLabel,style:{textAlign:"right"===this.position?"right":"left"},class:"label",weight:"bold",size:"large"===this.size?"medium":"xsmall",lineHeight:"125%",color:this.assignColor("neutral-white","neutral-black")},this.label),r("cura-label",{key:"eea722ec56d3293259d938089972a71b2b0806df",textOverflow:this.overflowHelper,style:{textAlign:"right"===this.position?"right":"left"},color:this.assignColor("primary-lighter","neutral-dark"),size:"xsmall",class:"message"},r("slot",{key:"ce171b19a68fa581279cef2e8b4d6818b84e59c9"}))),r("div",{key:"73088b5709884f1d338680a4148f5b4dce33d09c",class:"control"},r("div",{key:"e61c81796ef55a901423fa8b050a22c856c7fc26",class:"track "+this.size.toLowerCase()},r("div",{key:"d8b302df2b06fc043dc0629a87e2fde46616b406",class:"thumb "+this.size.toLowerCase(),tabIndex:this.ontabindex})))))}static get formAssociated(){return!0}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);text-align:left;cursor:pointer}.position{flex-direction:row}.info{overflow:hidden}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color 0.3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform 0.3s, outline 0.3s;display:inline-block;cursor:pointer;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));background:var(--neutral-purewhite);transform:translateX(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale) !important;border-color:var(--neutral-darker-medium) !important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base) !important;border-color:var(--neutral-black-neutral-pale) !important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none !important;border-color:var(--neutral-black-neutral-pale) !important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base) !important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base) !important;border-color:var(--color-dark)}'}},[321,"cura-switch",{checked:[1540],disabled:[516],label:[513],ontabindex:[514],position:[513],size:[513],background:[1],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0}]}]),c=n,d=function(){"undefined"!=typeof customElements&&["cura-switch","cura-label"].forEach((e=>{switch(e){case"cura-switch":customElements.get(i(e))||customElements.define(i(e),n);break;case"cura-label":customElements.get(i(e))||l()}}))};export{c as CuraSwitch,d as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,k as r,i as s,j as o,t as a}from"./p-DBXUEjWh.js";import{l as i}from"./p-CHcd-uKK.js";import{d as c}from"./p-B2RN7oe_.js";import{d as n}from"./p-fn4zJrKE.js";import{d as l}from"./p-BSdkRryc.js";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.tabSelect=r(this,"tabSelect"),this.counter=1,this.selected=!1,this.disabled=!1,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--background-color-selected",theme:"light"===this.colorMode?"primary-base":"primary-light"},{name:"--background-color-hover",theme:"light"===this.colorMode?"primary-light":null},{name:"--background-disabled-selected",theme:"light"===this.colorMode?"neutral-white":"neutral-black"},{name:"--border-color",theme:"light"===this.colorMode?"primary-base":"primary-light"}].forEach((e=>{e.theme&&(this.styles[e.name]=window.CuraAPI.theme.colors.getColor(e.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"neutral-black":"primary-lighter":this.selected?"neutral-purewhite":"primary-dark"}getIcon(){if(!this.iconName)return"";const e="large"===this.size?20:16,t=this.computeContentColor();return s("cura-icon",{name:this.iconName,size:e,color:t})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled}}getCounter(){return s("cura-badge-counter",{number:this.counter,color:"primary",disabled:this.disabled,class:"badge-number"})}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-dark":window.CuraAPI.theme.colors.getColor("neutral-dark"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(e){this.disabled?e.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const e=i[this.size]||i.default,t=this.computeContentColor();return s(o,{key:"9410b9c68061ffb5d838fe6ab2f409be9b90c6ac",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},s("button",{key:"1ac26d9b41e072f1ec3668d66fee83679640c54f",class:this.getClasses(),style:this.styles,onClick:e=>this.handleClick(e),disabled:this.disabled,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this)},this.getIcon(),s("cura-label",{key:"ff854d36883b062d699388e71e6315f76f008f79",size:e,color:t,lineHeight:"0",marginBlock:"0"},s("slot",{key:"6ab5c0cdea38f9094bb382943fe25c3967a681ab"})),this.counter>0&&this.getCounter()))}static get watchers(){return{colorMode:[{setColors:0}]}}static get style(){return":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;display:flex;align-items:center;justify-content:center;min-width:120px;width:fit-content;border:2px solid var(--border-color);border-radius:4px}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.selected),:host a:not(.selected){border:2px solid var(--border-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button cura-badge-counter,:host a cura-badge-counter{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{border-color:transparent;background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.disabled:not(.selected),:host a.disabled:not(.selected){border-color:var(--neutral-dark)}"}},[257,"cura-tabs-button",{name:[513],iconName:[513,"icon-name"],counter:[1538],selected:[1540],disabled:[1540],size:[513],colorMode:[1537,"color-mode"],hovered:[32],styles:[32]},void 0,{colorMode:[{setColors:0}]}]),h=d,u=function(){"undefined"!=typeof customElements&&["cura-tabs-button","cura-badge-counter","cura-icon","cura-label"].forEach((e=>{switch(e){case"cura-tabs-button":customElements.get(a(e))||customElements.define(a(e),d);break;case"cura-badge-counter":customElements.get(a(e))||c();break;case"cura-icon":customElements.get(a(e))||n();break;case"cura-label":customElements.get(a(e))||l()}}))};export{h as CuraTabsButton,u as defineCustomElement}
1
+ import{p as t,H as e,k as r,i as s,j as o,t as a}from"./p-DBXUEjWh.js";import{l as i}from"./p-CHcd-uKK.js";import{d as c}from"./p-BKDpza6x.js";import{d as n}from"./p-DI66_jP6.js";import{d as l}from"./p-i55vIhdM.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tabSelect=r(this,"tabSelect"),this.counter=1,this.selected=!1,this.disabled=!1,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--background-color-selected",theme:"light"===this.colorMode?"primary-base":"primary-light"},{name:"--background-color-hover",theme:"light"===this.colorMode?"primary-light":null},{name:"--background-disabled-selected",theme:"light"===this.colorMode?"neutral-white":"neutral-black"},{name:"--border-color",theme:"light"===this.colorMode?"primary-base":"primary-light"}].forEach((t=>{t.theme&&(this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"neutral-black":"primary-lighter":this.selected?"neutral-purewhite":"primary-dark"}getIcon(){if(!this.iconName)return"";const t="large"===this.size?20:16,e=this.computeContentColor();return s("cura-icon",{name:this.iconName,size:t,color:e})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled}}getCounter(){return s("cura-badge-counter",{number:this.counter,color:"primary",disabled:this.disabled,class:"badge-number"})}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-dark":window.CuraAPI.theme.colors.getColor("neutral-dark"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(t){this.disabled?t.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const t=i[this.size]||i.default,e=this.computeContentColor();return s(o,{key:"8c6b0887fb2077909547c732cecb8655842d4a93",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},s("button",{key:"f91ddf1d31dbebb6e097e48838b64b6787a88148",class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),disabled:this.disabled,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this)},this.getIcon(),s("cura-label",{key:"0ca8313f7b54bc0d238c1b56abb75c940789471f",size:t,color:e,lineHeight:"0",marginBlock:"0"},s("slot",{key:"964538375a7c4560a996cc8c069753f07120ba9e"})),this.counter>0&&this.getCounter()))}static get watchers(){return{colorMode:[{setColors:0}]}}static get style(){return":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;display:flex;align-items:center;justify-content:center;min-width:120px;width:fit-content;border:2px solid var(--border-color);border-radius:4px}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.selected),:host a:not(.selected){border:2px solid var(--border-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button cura-badge-counter,:host a cura-badge-counter{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{border-color:transparent;background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.disabled:not(.selected),:host a.disabled:not(.selected){border-color:var(--neutral-dark)}"}},[257,"cura-tabs-button",{name:[513],iconName:[513,"icon-name"],counter:[1538],selected:[1540],disabled:[1540],size:[513],colorMode:[1537,"color-mode"],hovered:[32],styles:[32]},void 0,{colorMode:[{setColors:0}]}]),h=d,u=function(){"undefined"!=typeof customElements&&["cura-tabs-button","cura-badge-counter","cura-icon","cura-label"].forEach((t=>{switch(t){case"cura-tabs-button":customElements.get(a(t))||customElements.define(a(t),d);break;case"cura-badge-counter":customElements.get(a(t))||c();break;case"cura-icon":customElements.get(a(t))||n();break;case"cura-label":customElements.get(a(t))||l()}}))};export{h as CuraTabsButton,u as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,k as s,i as a,j as o,t as r}from"./p-DBXUEjWh.js";const i=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tabChange=s(this,"tabChange"),this.gap=0,this.borderBottom=!0,this.colorMode="light",this.styles={}}handleTabSelect(t){this.updateSelectedTab(t.detail.name)}updateSelectedTab(t){this.host.querySelectorAll("cura-tabs, cura-tabs-transparent, cura-tabs-button").forEach((e=>{e.selected=e.name===t}))}getClasses(){return{"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--border-color":window.CuraAPI.theme.colors.getColor("light"===this.colorMode?"neutral-base":"primary-base"),"--gap":this.gap+"px"})}render(){return a(o,{key:"fb6a6ae52fd5bdfb8c3978a75f26be87479ccafa",role:"tablist",style:this.styles,class:this.getClasses()},a("slot",{key:"afca97b27c8359f8236331257e4db41f1332e071"}))}get host(){return this}static get style(){return':host{display:flex;gap:var(--gap)}:host(.border-bottom){position:relative}:host(.border-bottom)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background:var(--border-color);z-index:0}::slotted(cura-tabs),::slotted(cura-tabs-transparent){position:relative;z-index:1}'}},[257,"cura-tabs-group",{gap:[514],borderBottom:[1540,"border-bottom"],colorMode:[1537,"color-mode"],styles:[32]},[[0,"tabSelect","handleTabSelect"]]]),b=i,c=function(){"undefined"!=typeof customElements&&["cura-tabs-group"].forEach((t=>{"cura-tabs-group"===t&&(customElements.get(r(t))||customElements.define(r(t),i))}))};export{b as CuraTabsGroup,c as defineCustomElement}
1
+ import{p as t,H as e,k as s,i as o,j as a,t as r}from"./p-DBXUEjWh.js";const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tabChange=s(this,"tabChange"),this.gap=0,this.borderBottom=!0,this.colorMode="light",this.styles={}}handleTabSelect(t){this.updateSelectedTab(t.detail.name)}updateSelectedTab(t){this.host.querySelectorAll("cura-tabs, cura-tabs-transparent, cura-tabs-button").forEach((e=>{e.selected=e.name===t}))}getClasses(){return{"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--border-color":window.CuraAPI.theme.colors.getColor("light"===this.colorMode?"neutral-base":"primary-base"),"--gap":this.gap+"px"})}render(){return o(a,{key:"1a2babd4b23b2f54644cfe9d0129736c897f50c3",role:"tablist",style:this.styles,class:this.getClasses()},o("slot",{key:"ba78df56f01619de8df14cbfde08dd501b15048e"}))}get host(){return this}static get style(){return':host{display:flex;gap:var(--gap)}:host(.border-bottom){position:relative}:host(.border-bottom)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background:var(--border-color);z-index:0}::slotted(cura-tabs),::slotted(cura-tabs-transparent){position:relative;z-index:1}'}},[257,"cura-tabs-group",{gap:[514],borderBottom:[1540,"border-bottom"],colorMode:[1537,"color-mode"],styles:[32]},[[0,"tabSelect","handleTabSelect"]]]),i=b,c=function(){"undefined"!=typeof customElements&&["cura-tabs-group"].forEach((t=>{"cura-tabs-group"===t&&(customElements.get(r(t))||customElements.define(r(t),b))}))};export{i as CuraTabsGroup,c as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,k as o,i as s,j as r,t as a}from"./p-DBXUEjWh.js";import{l as i}from"./p-CHcd-uKK.js";import{d as n}from"./p-fn4zJrKE.js";import{d as c}from"./p-BSdkRryc.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tabSelect=o(this,"tabSelect"),this.selected=!1,this.disabled=!1,this.borderBottom=!0,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--border-bottom-color",theme:"light"===this.colorMode?"neutral-base":"primary"},{name:"--border-bottom-color-selected",theme:"light"===this.colorMode?"primary-dark":"primary-lighter"}].forEach((t=>{t.theme&&(this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"primary-lighter":"neutral-purewhite":this.hovered&&!this.selected?"primary-dark":this.selected?"primary-base":"neutral-black"}getIcon(){if(!this.iconName)return"";const t="large"===this.size?20:16,e=this.computeContentColor();return s("cura-icon",{name:this.iconName,size:t,color:e})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled,"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(t){this.disabled?t.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const t=i[this.size]||i.default,e=this.computeContentColor();return s(r,{key:"d3c9e277a079381def09397dc922d697aa99d70a",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},s("button",{key:"ab4cac9782f48c367c4ada4e303f9422971dc38e",class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),disabled:this.disabled,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this)},this.getIcon(),s("cura-label",{key:"c6567bdf7b80efc3380a8a93bf52de966e1caa7d",size:t,color:e,lineHeight:"0",marginBlock:"0"},s("slot",{key:"93c392107790a2c0e3499e5b7bd742219203a980"}))))}static get watchers(){return{colorMode:[{setColors:0}]}}static get style(){return":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:not(.selected),:host a:not(.selected){border-color:var(--border-color)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer}:host button.selected:not(.disabled),:host a.selected:not(.disabled){border-bottom:1px solid var(--border-bottom-color-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}"}},[257,"cura-tabs-transparent",{name:[513],iconName:[513,"icon-name"],selected:[1540],disabled:[1540],borderBottom:[1540,"border-bottom"],size:[513],colorMode:[1537,"color-mode"],hovered:[32],styles:[32]},void 0,{colorMode:[{setColors:0}]}]),l=d,h=function(){"undefined"!=typeof customElements&&["cura-tabs-transparent","cura-icon","cura-label"].forEach((t=>{switch(t){case"cura-tabs-transparent":customElements.get(a(t))||customElements.define(a(t),d);break;case"cura-icon":customElements.get(a(t))||n();break;case"cura-label":customElements.get(a(t))||c()}}))};export{l as CuraTabsTransparent,h as defineCustomElement}
1
+ import{p as t,H as e,k as o,i as s,j as r,t as a}from"./p-DBXUEjWh.js";import{l as i}from"./p-CHcd-uKK.js";import{d as n}from"./p-DI66_jP6.js";import{d as c}from"./p-i55vIhdM.js";const l=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tabSelect=o(this,"tabSelect"),this.selected=!1,this.disabled=!1,this.borderBottom=!0,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--border-bottom-color",theme:"light"===this.colorMode?"neutral-base":"primary"},{name:"--border-bottom-color-selected",theme:"light"===this.colorMode?"primary-dark":"primary-lighter"}].forEach((t=>{t.theme&&(this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"primary-lighter":"neutral-purewhite":this.hovered&&!this.selected?"primary-dark":this.selected?"primary-base":"neutral-black"}getIcon(){if(!this.iconName)return"";const t="large"===this.size?20:16,e=this.computeContentColor();return s("cura-icon",{name:this.iconName,size:t,color:e})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled,"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(t){this.disabled?t.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const t=i[this.size]||i.default,e=this.computeContentColor();return s(r,{key:"3a165e58646df4462994a4368ef6d58a843bdc5c",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},s("button",{key:"50bfeaf2ec27682b6168f0c173b140bee1249229",class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),disabled:this.disabled,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this)},this.getIcon(),s("cura-label",{key:"5f2c83984da3d83ec0e6719eff67e901195366fa",size:t,color:e,lineHeight:"0",marginBlock:"0"},s("slot",{key:"317de55115567fed9ece59b8c4da507e20f9c57e"}))))}static get watchers(){return{colorMode:[{setColors:0}]}}static get style(){return":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:not(.selected),:host a:not(.selected){border-color:var(--border-color)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer}:host button.selected:not(.disabled),:host a.selected:not(.disabled){border-bottom:1px solid var(--border-bottom-color-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}"}},[257,"cura-tabs-transparent",{name:[513],iconName:[513,"icon-name"],selected:[1540],disabled:[1540],borderBottom:[1540,"border-bottom"],size:[513],colorMode:[1537,"color-mode"],hovered:[32],styles:[32]},void 0,{colorMode:[{setColors:0}]}]),d=l,h=function(){"undefined"!=typeof customElements&&["cura-tabs-transparent","cura-icon","cura-label"].forEach((t=>{switch(t){case"cura-tabs-transparent":customElements.get(a(t))||customElements.define(a(t),l);break;case"cura-icon":customElements.get(a(t))||n();break;case"cura-label":customElements.get(a(t))||c()}}))};export{d as CuraTabsTransparent,h as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,k as o,i as s,j as r,t as a}from"./p-DBXUEjWh.js";import{l as i}from"./p-CHcd-uKK.js";import{d as c}from"./p-fn4zJrKE.js";import{d as n}from"./p-BSdkRryc.js";const l=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tabSelect=o(this,"tabSelect"),this.selected=!1,this.disabled=!1,this.borderBottom=!0,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--background-color-selected",theme:"light"===this.colorMode?"primary-base":"primary-lighter"},{name:"--background-color-hover",theme:"light"===this.colorMode?"primary-lighter":null},{name:"--background-disabled-selected",theme:"light"===this.colorMode?"neutral-pale":"neutral-black"},{name:"--border-bottom-color",theme:"light"===this.colorMode?"neutral-base":"primary"}].forEach((t=>{t.theme&&(this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"neutral-black":"primary-lighter":this.selected?"neutral-purewhite":"primary-dark"}updateDynamicStyles(){"dark"===this.colorMode&&this.hovered&&!this.selected&&(this.styles=Object.assign(Object.assign({},this.styles),{"--border-bottom-color":window.CuraAPI.theme.colors.getColor("neutral-purewhite")}))}getIcon(){if(!this.iconName)return"";const t="large"===this.size?20:16,e=this.computeContentColor();return s("cura-icon",{name:this.iconName,size:t,color:e})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled,"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(t){this.disabled?t.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const t=i[this.size]||i.default,e=this.computeContentColor();return this.updateDynamicStyles(),s(r,{key:"3966968b73a9a51ec26f3206cdb09fbfcb3d3daf",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},s("button",{key:"00cc6382c635a05c52fd74b3e02e968c2d94cacb",class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),disabled:this.disabled,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this)},this.getIcon(),s("cura-label",{key:"e193500f156c10cf0442e6f504e19d552c19f849",size:t,color:e,lineHeight:"0",marginBlock:"0"},s("slot",{key:"8a0ac7c4b2ff4990093d13b4110e370616cf39f4"}))))}static get watchers(){return{colorMode:[{setColors:0}]}}static get style(){return":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center;border-radius:4px 4px 0 0}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.light,:host a:not(.disabled,.selected):hover.light{border-bottom-color:var(--primary-dark)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-bottom-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border:2px solid var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}"}},[257,"cura-tabs",{name:[513],iconName:[513,"icon-name"],selected:[1540],disabled:[1540],borderBottom:[1540,"border-bottom"],size:[513],colorMode:[1537,"color-mode"],hovered:[32],styles:[32]},void 0,{colorMode:[{setColors:0}]}]),d=l,h=function(){"undefined"!=typeof customElements&&["cura-tabs","cura-icon","cura-label"].forEach((t=>{switch(t){case"cura-tabs":customElements.get(a(t))||customElements.define(a(t),l);break;case"cura-icon":customElements.get(a(t))||c();break;case"cura-label":customElements.get(a(t))||n()}}))};export{d as CuraTabs,h as defineCustomElement}
1
+ import{p as t,H as e,k as o,i as s,j as r,t as a}from"./p-DBXUEjWh.js";import{l as i}from"./p-CHcd-uKK.js";import{d as c}from"./p-DI66_jP6.js";import{d as n}from"./p-i55vIhdM.js";const l=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tabSelect=o(this,"tabSelect"),this.selected=!1,this.disabled=!1,this.borderBottom=!0,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--background-color-selected",theme:"light"===this.colorMode?"primary-base":"primary-lighter"},{name:"--background-color-hover",theme:"light"===this.colorMode?"primary-lighter":null},{name:"--background-disabled-selected",theme:"light"===this.colorMode?"neutral-pale":"neutral-black"},{name:"--border-bottom-color",theme:"light"===this.colorMode?"neutral-base":"primary"}].forEach((t=>{t.theme&&(this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"neutral-black":"primary-lighter":this.selected?"neutral-purewhite":"primary-dark"}updateDynamicStyles(){"dark"===this.colorMode&&this.hovered&&!this.selected&&(this.styles=Object.assign(Object.assign({},this.styles),{"--border-bottom-color":window.CuraAPI.theme.colors.getColor("neutral-purewhite")}))}getIcon(){if(!this.iconName)return"";const t="large"===this.size?20:16,e=this.computeContentColor();return s("cura-icon",{name:this.iconName,size:t,color:e})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled,"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(t){this.disabled?t.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const t=i[this.size]||i.default,e=this.computeContentColor();return this.updateDynamicStyles(),s(r,{key:"d12ccbd8e900c1a21dfee2ee7363e167772acad4",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},s("button",{key:"2e77d02614e38baaca599d7830f5ba4dcb048519",class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),disabled:this.disabled,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this)},this.getIcon(),s("cura-label",{key:"343f0d566d70ea2f132ea55ca588c57cb2ce20f2",size:t,color:e,lineHeight:"0",marginBlock:"0"},s("slot",{key:"9acebd9e763f88d698ca6c0a08e97c3960701730"}))))}static get watchers(){return{colorMode:[{setColors:0}]}}static get style(){return":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center;border-radius:4px 4px 0 0}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.light,:host a:not(.disabled,.selected):hover.light{border-bottom-color:var(--primary-dark)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-bottom-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border:2px solid var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}"}},[257,"cura-tabs",{name:[513],iconName:[513,"icon-name"],selected:[1540],disabled:[1540],borderBottom:[1540,"border-bottom"],size:[513],colorMode:[1537,"color-mode"],hovered:[32],styles:[32]},void 0,{colorMode:[{setColors:0}]}]),d=l,h=function(){"undefined"!=typeof customElements&&["cura-tabs","cura-icon","cura-label"].forEach((t=>{switch(t){case"cura-tabs":customElements.get(a(t))||customElements.define(a(t),l);break;case"cura-icon":customElements.get(a(t))||c();break;case"cura-label":customElements.get(a(t))||n()}}))};export{d as CuraTabs,h as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,k as a,i as o,j as s,t as i}from"./p-DBXUEjWh.js";import{d as r}from"./p-fR02COZb.js";import{d as n}from"./p-fn4zJrKE.js";import{d as c}from"./p-CCkEqDZb.js";import{d as l}from"./p-D7WNwjv-.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toastClosed=a(this,"toastClosed"),this.type="info",this.position="top-right",this.closeButton=!0,this.loader=!0,this.autoCloseDelay=1e4,this.styles={},this.progress=0,this.handleClose=()=>{this.closeContainer()}}async close(){this.closeContainer()}handleChangeType(){this.setStyle()}connectedCallback(){this.setStyle()}render(){return o(s,{key:"c65f4295ed41485cdeb992dc29a76b4aeef87a39",role:"alert","aria-live":"polite","aria-atomic":"true","aria-label":this.label},o("div",{key:"62ec0a3170f862d0634df42ac4ccf0708c80fa32",class:this.getClasses(),style:this.styles},o("cura-icon",{key:"bdb68633080a0032c4fdc2f3bb53a668e5b8ab1b",class:"default-icon",name:this.getNameIcon(),size:16,color:this.type+"-dark"}),o("div",{key:"42516aa76455a7b2c7e96613d6e0f38d8f9fbfba",class:"content"},o("cura-heading",{key:"07402cf186ed3626248d682239b1105378dc2ae6",level:4,size:"xsmall",color:this.type+"-dark",weight:"bold","margin-block":"0"},this.label),o("cura-paragraph",{key:"f8239bb5c4ca52e3ce55cc50fab46bd45440e2ee",color:this.type+"-darker",size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},o("slot",{key:"d0491202942530967ddb5d34ecf1333975c8dda0"})),o("slot",{key:"3024563fbc18c2b4a4954849f74014b0be6b34ee",name:"actions"})),this.closeButton&&o("cura-icon",{key:"20b315655b9d8ff4ddfc6c2cec6ebc8981f64643",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.loader&&!!this.autoCloseDelay&&o("cura-loader-bar",{key:"a81f9da8704799af13009fa046b58e9d6eeb453c",color:this.type+"-base",progress:this.progress})))}componentDidLoad(){this.openContainer(),this.startAnimation()}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-base":window.CuraAPI.theme.colors.getColor("neutral-base",.2),"--primary-base":window.CuraAPI.theme.colors.getColor("primary-base"),"--color-base":window.CuraAPI.theme.colors.getColor(this.type+"-base")})}getClasses(){const[t,e]=this.position.split("-"),a={container:!0};return a[t]=!0,a[e]=!0,this.loader&&(a.loader=!0),a}getNameIcon(){return this.icon?this.icon:{info:"infoCircle",success:"checkCircle",warning:"alertCircle",error:"alertTriangle"}[this.type]}openContainer(){this.container=this.host.shadowRoot.querySelector(".container"),this.container.classList.add("active")}closeContainer(){this.container.classList.remove("active"),setTimeout((()=>{this.toastClosed.emit(),this.host.remove()}),500)}startAnimation(){if(this.autoCloseDelay)if(this.loader){this.progress=0;let t=setInterval((()=>{this.progress>=100?(clearInterval(t),this.closeContainer()):this.progress++}),this.autoCloseDelay/100)}else{let t=setInterval((()=>{clearInterval(t),this.closeContainer()}),this.autoCloseDelay)}}get host(){return this}static get watchers(){return{type:[{handleChangeType:0}],position:[{handleChangeType:0}]}}static get style(){return":host{display:block;box-sizing:border-box}:host .container{position:fixed;z-index:99999;display:flex;box-sizing:border-box;min-width:320px;height:fit-content;padding:16px;border:1px solid var(--color-base);border-radius:12px;background-color:var(--neutral-purewhite);overflow:hidden;box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12))}:host .container.loader{padding:16px 16px 20px}:host .container.top{top:24px}:host .container.top.center{top:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, top 0.5s ease-in-out}:host .container.top.center.active{top:24px;opacity:1}:host .container.bottom{bottom:24px}:host .container.bottom.center{bottom:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, bottom 0.5s ease-in-out}:host .container.bottom.center.active{bottom:24px;opacity:1}:host .container.left{left:-100%;opacity:0;transition:opacity 0.5s ease-in-out, left 0.5s ease-in-out}@media (max-width: 768px){:host .container.left{right:unset;left:50%;transform:translateX(-50%)}}:host .container.left.active{left:24px;opacity:1}:host .container.right{right:-100%;opacity:0;transition:opacity 0.5s ease-in-out, right 0.5s ease-in-out}@media (max-width: 768px){:host .container.right{right:unset;left:50%;transform:translateX(-50%)}}:host .container.right.active{right:24px;opacity:1}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:4px}:host .container .default-icon{margin-right:12px}:host .container .close-icon{margin-left:12px;cursor:pointer}"}},[257,"cura-toast",{type:[1],position:[1],icon:[513],label:[513],closeButton:[516,"close-button"],loader:[516],autoCloseDelay:[514,"auto-close-delay"],styles:[32],progress:[32],close:[64]},void 0,{type:[{handleChangeType:0}],position:[{handleChangeType:0}]}]),p=h,d=function(){"undefined"!=typeof customElements&&["cura-toast","cura-heading","cura-icon","cura-loader-bar","cura-paragraph"].forEach((t=>{switch(t){case"cura-toast":customElements.get(i(t))||customElements.define(i(t),h);break;case"cura-heading":customElements.get(i(t))||r();break;case"cura-icon":customElements.get(i(t))||n();break;case"cura-loader-bar":customElements.get(i(t))||c();break;case"cura-paragraph":customElements.get(i(t))||l()}}))};export{p as CuraToast,d as defineCustomElement}
1
+ import{p as t,H as e,k as a,i as o,j as s,t as i}from"./p-DBXUEjWh.js";import{d as r}from"./p-Dmalf4Oj.js";import{d as n}from"./p-DI66_jP6.js";import{d as c}from"./p-CksTHXxZ.js";import{d as l}from"./p-PiUhcFob.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toastClosed=a(this,"toastClosed"),this.type="info",this.position="top-right",this.closeButton=!0,this.loader=!0,this.autoCloseDelay=1e4,this.styles={},this.progress=0,this.handleClose=()=>{this.closeContainer()}}async close(){this.closeContainer()}handleChangeType(){this.setStyle()}connectedCallback(){this.setStyle()}render(){return o(s,{key:"3ed410c2082acf963a9bc034ba0698d3d5a8c05e",role:"alert","aria-live":"polite","aria-atomic":"true","aria-label":this.label},o("div",{key:"7da959ad2aa5d8b57e509bfc5c1241cfe2aab078",class:this.getClasses(),style:this.styles},o("cura-icon",{key:"f88bbe2ad57d6d5a2cdd707a753fe6a37d2fb13a",class:"default-icon",name:this.getNameIcon(),size:16,color:this.type+"-dark"}),o("div",{key:"b6d1cf4f6d5cd42b331f19c7996f3de36c29f09e",class:"content"},o("cura-heading",{key:"ab72f2ffea1f653cd956c5ac1b1c80a053e07673",level:4,size:"xsmall",color:this.type+"-dark",weight:"bold","margin-block":"0"},this.label),o("cura-paragraph",{key:"29e40bf6759c4a2c53beed9028d4d4a5472c8d1d",color:this.type+"-darker",size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},o("slot",{key:"b76073439ef46c084eb681a1639d3644b862db00"})),o("slot",{key:"a5d6b28128d692d84990654e5b74c13c91f1fcb5",name:"actions"})),this.closeButton&&o("cura-icon",{key:"bd46e61b4280815f9cb8a683838cceda7b3349c1",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.loader&&!!this.autoCloseDelay&&o("cura-loader-bar",{key:"bffd92fb6e1c162ff5ead3d3fa84168ef80ca240",color:this.type+"-base",progress:this.progress})))}componentDidLoad(){this.openContainer(),this.startAnimation()}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-base":window.CuraAPI.theme.colors.getColor("neutral-base",.2),"--primary-base":window.CuraAPI.theme.colors.getColor("primary-base"),"--color-base":window.CuraAPI.theme.colors.getColor(this.type+"-base")})}getClasses(){const[t,e]=this.position.split("-"),a={container:!0};return a[t]=!0,a[e]=!0,this.loader&&(a.loader=!0),a}getNameIcon(){return this.icon?this.icon:{info:"infoCircle",success:"checkCircle",warning:"alertCircle",error:"alertTriangle"}[this.type]}openContainer(){this.container=this.host.shadowRoot.querySelector(".container"),this.container.classList.add("active")}closeContainer(){this.container.classList.remove("active"),setTimeout((()=>{this.toastClosed.emit(),this.host.remove()}),500)}startAnimation(){if(this.autoCloseDelay)if(this.loader){this.progress=0;let t=setInterval((()=>{this.progress>=100?(clearInterval(t),this.closeContainer()):this.progress++}),this.autoCloseDelay/100)}else{let t=setInterval((()=>{clearInterval(t),this.closeContainer()}),this.autoCloseDelay)}}get host(){return this}static get watchers(){return{type:[{handleChangeType:0}],position:[{handleChangeType:0}]}}static get style(){return":host{display:block;box-sizing:border-box}:host .container{position:fixed;z-index:99999;display:flex;box-sizing:border-box;min-width:320px;height:fit-content;padding:16px;border:1px solid var(--color-base);border-radius:12px;background-color:var(--neutral-purewhite);overflow:hidden;box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12))}:host .container.loader{padding:16px 16px 20px}:host .container.top{top:24px}:host .container.top.center{top:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, top 0.5s ease-in-out}:host .container.top.center.active{top:24px;opacity:1}:host .container.bottom{bottom:24px}:host .container.bottom.center{bottom:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, bottom 0.5s ease-in-out}:host .container.bottom.center.active{bottom:24px;opacity:1}:host .container.left{left:-100%;opacity:0;transition:opacity 0.5s ease-in-out, left 0.5s ease-in-out}@media (max-width: 768px){:host .container.left{right:unset;left:50%;transform:translateX(-50%)}}:host .container.left.active{left:24px;opacity:1}:host .container.right{right:-100%;opacity:0;transition:opacity 0.5s ease-in-out, right 0.5s ease-in-out}@media (max-width: 768px){:host .container.right{right:unset;left:50%;transform:translateX(-50%)}}:host .container.right.active{right:24px;opacity:1}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:4px}:host .container .default-icon{margin-right:12px}:host .container .close-icon{margin-left:12px;cursor:pointer}"}},[257,"cura-toast",{type:[1],position:[1],icon:[513],label:[513],closeButton:[516,"close-button"],loader:[516],autoCloseDelay:[514,"auto-close-delay"],styles:[32],progress:[32],close:[64]},void 0,{type:[{handleChangeType:0}],position:[{handleChangeType:0}]}]),d=h,p=function(){"undefined"!=typeof customElements&&["cura-toast","cura-heading","cura-icon","cura-loader-bar","cura-paragraph"].forEach((t=>{switch(t){case"cura-toast":customElements.get(i(t))||customElements.define(i(t),h);break;case"cura-heading":customElements.get(i(t))||r();break;case"cura-icon":customElements.get(i(t))||n();break;case"cura-loader-bar":customElements.get(i(t))||c();break;case"cura-paragraph":customElements.get(i(t))||l()}}))};export{d as CuraToast,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as a,k as r,i as e,j as o,t as s}from"./p-DBXUEjWh.js";import{d as i}from"./p-DXlGQp3a.js";import{d as n}from"./p-fR02COZb.js";import{d as c}from"./p-fn4zJrKE.js";import{d as l}from"./p-BSdkRryc.js";import{d as p}from"./p-Bf21UQXV.js";import{d as h}from"./p-D7WNwjv-.js";const d=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tooltipClosed=r(this,"tooltipClosed"),this.elementId="",this.interactive=!0,this.delay=250,this.maxWidth="280px",this.position="top",this.closeButton=!1,this.isMobile=!1,this.styles={},this.handleClose=()=>{this.closeContainer()}}onWindowResize(){this.setPosition(this.targetElement)}onWindowScroll(){this.setPosition(this.targetElement)}connectedCallback(){this.setStyle()}render(){return e(o,{key:"655c6aae9efc3aad790c6a45a7192ef01baeac97",role:"tooltip",id:this.elementId},e("div",{key:"c552ffd20262eed5e71f4cd93c078852cc52c1ca",class:"container",style:this.styles},e("div",{key:"110f11205496428b674431e1b2bc8c3f95f9397a",class:"content"},e("cura-heading",{key:"d2a0caf6a338c9c0b839ea8671c6d524b943ca86",level:4,size:"xsmall",color:"neutral-black",weight:"bold","margin-block":"0"},this.label),e("cura-paragraph",{key:"bd7addb352119fead424151294e01eae111915e2",color:"neutral-dark","spot-color":"secondary-darker",size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},e("slot",{key:"2323f1af541803e16caa042e9969953557a28976"}))),this.closeButton&&!this.isMobile&&e("cura-icon",{key:"92a672d383b057c53ce1771bea1ff9374a9a50a7",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.isMobile&&e("cura-button-transparent",{key:"a31de7e78e092b4fbf6b0e0b85c0c664399081a0",class:"close-button",size:"small",type:"button",color:"error","icon-name":"close","icon-position":"right",onClick:this.handleClose},"OK, entendi.")))}componentDidLoad(){var t,a,r,e,o;if(this.targetElement=document.querySelector(`[aria-labelledby="${this.elementId}"]`),this.interactive){this.host.style.visibility="hidden";let s=null,i=null;null===(t=this.targetElement)||void 0===t||t.addEventListener("mouseenter",(()=>{clearTimeout(i),s=setTimeout((()=>{this.host.style.visibility="visible"}),"number"==typeof this.delay&&this.delay>250?this.delay:250)})),null===(a=this.targetElement)||void 0===a||a.addEventListener("mouseleave",(()=>{clearTimeout(s),i=setTimeout((()=>{this.handleClose()}),"number"==typeof this.delay&&this.delay>250?this.delay:250)})),null===(r=this.host)||void 0===r||r.addEventListener("mouseenter",(()=>{"visible"===window.getComputedStyle(this.host).visibility&&clearTimeout(i)})),null===(e=this.host)||void 0===e||e.addEventListener("mouseleave",(()=>{clearTimeout(s),this.handleClose()})),null===(o=this.targetElement)||void 0===o||o.addEventListener("click",(()=>{"hidden"===window.getComputedStyle(this.host).visibility?s=setTimeout((()=>{this.host.style.visibility="visible"}),"number"==typeof this.delay&&this.delay>250?this.delay:250):(clearTimeout(s),this.handleClose())})),null===document||void 0===document||document.addEventListener("click",(t=>{this.targetElement.contains(t.target)||this.host.contains(t.target)||(clearTimeout(s),this.handleClose())}))}else this.host.style.visibility="visible";setTimeout((()=>{this.setPosition(this.targetElement)}),100)}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--max-width":this.maxWidth,"--base-spacing":window.CuraAPI.theme.spacing.getSpacing(),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-light":window.CuraAPI.theme.colors.getColor("neutral-light"),"--neutral-black-shadow":window.CuraAPI.theme.colors.getColor("neutral-black",.16)})}getClasses(){const[t,a]=this.position.split("-"),r={container:!0};return t&&(r[t]=!0),a&&(r[a]=!0),r}setPosition(t){const a=window.innerWidth,r=window.innerHeight,e=this.host.shadowRoot.querySelector(".container");if(this.isMobile=a<=768,this.host.style.position=this.isMobile?"fixed":"absolute",this.host.style.bottom=this.isMobile?"0":"unset",e.style.flexDirection=this.isMobile?"column":"row",this.isMobile)return this.host.style.left="0",void(this.host.style.top="unset");const o=t.offsetTop,s=t.offsetLeft,i=t.offsetWidth,n=t.offsetHeight,c=this.host.getBoundingClientRect(),l=10,p=10,h=.5*i+18,d=.5*n+18,u=this.styles["--neutral-light"];let b=0,m=0;const w=Object.keys(this.getClasses()).filter((t=>["top","left","bottom","right","start","end"].includes(t))),x=({arrowTop:t="",arrowLeft:a="",translate:r="",borderColor:e=""})=>{a&&this.host.style.setProperty("--arrow-left",a),t&&this.host.style.setProperty("--arrow-top",t),r&&this.host.style.setProperty("--arrow-translate",r),e&&this.host.style.setProperty("--arrow-border-color",e)};(w.includes("top")||w.includes("bottom"))&&(x({arrowLeft:"50%",translate:"translateX(-50%)"}),w.includes("top")&&(m=o-c.height-p,x({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${u} ${u} transparent`}),m<l&&(m=o+n+p,x({arrowTop:"-6px",borderColor:`${u} transparent transparent ${u}`}))),w.includes("bottom")&&(m=o+n+p,x({arrowTop:"-6px",borderColor:`${u} transparent transparent ${u}`}),m+c.height>r-l&&(m=o-c.height-p,x({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${u} ${u} transparent`}))),b=s+(i-c.width)/2,w.includes("start")&&(b=s-c.width+h,x({arrowLeft:"calc(100% - 18px)"}),b<l&&(b=s+i-h,x({arrowLeft:"18px"}))),w.includes("end")&&(b=s+i-h,x({arrowLeft:"18px"}),b+c.width>a-l&&(b=s-c.width+h,x({arrowLeft:"calc(100% - 18px)"})))),(w.includes("right")||w.includes("left"))&&(x({arrowTop:"50%",translate:"translateY(-50%)"}),w.includes("right")&&(b=s+i+p,x({arrowLeft:"-6px",borderColor:`transparent transparent ${u} ${u}`}),b+c.width>a-l&&(b=s-c.width-p,x({arrowLeft:"calc(100% - 6px)",borderColor:`${u} ${u} transparent transparent`}))),w.includes("left")&&(b=s-c.width-p,x({arrowLeft:"calc(100% - 6px)",borderColor:`${u} ${u} transparent transparent`}),b<l&&(b=s+i+p,x({arrowLeft:"-6px",borderColor:`transparent transparent ${u} ${u}`}))),m=o+(n-c.height)/2,w.includes("start")&&(m=o-c.height+d,x({arrowTop:"calc(100% - 18px)"}),m<l&&(m=o+n-d,x({arrowTop:"18px"}))),w.includes("end")&&(m=o+n-d,x({arrowTop:"18px"}),m+c.height>r-l&&(m=o-c.height+d,x({arrowTop:"calc(100% - 18px)"})))),this.host.style.left=b+"px",this.host.style.top=m+"px"}closeContainer(){this.host.style.visibility="hidden",this.tooltipClosed.emit()}get host(){return this}static get style(){return':host{position:absolute;z-index:99998;display:block;width:fit-content;height:fit-content;box-sizing:border-box}@media (max-width: 768px){:host{width:100%}}:host .container{display:flex;box-sizing:border-box;max-width:var(--max-width);height:auto;padding:calc(var(--cura-spacing-base) * 2px);border:1px solid var(--neutral-light);border-radius:calc(var(--cura-spacing-base) * 1px);background-color:var(--neutral-purewhite);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}@media (max-width: 768px){:host .container{max-width:90%;height:fit-content;padding:calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px) 0 calc(var(--cura-spacing-base) * 4px);margin:0 auto;border:2px solid;border-radius:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px) 0 0;border-color:var(--neutral-light) var(--neutral-light) transparent var(--neutral-light)}}:host .container::after{content:"";position:absolute;z-index:99999;width:calc(var(--cura-spacing-base) * 2.5px);height:calc(var(--cura-spacing-base) * 2.5px);border:1px solid;border-radius:2px;background-color:var(--neutral-purewhite);left:var(--arrow-left);top:var(--arrow-top);border-color:var(--arrow-border-color);transform:var(--arrow-translate) rotate(45deg)}@media (max-width: 768px){:host .container::after{display:none}}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:calc(var(--cura-spacing-base) * 1px)}@media (max-width: 768px){:host .container .content{padding-bottom:calc(var(--cura-spacing-base) * 4px);border-bottom:1px dashed var(--neutral-light)}}:host .container .close-icon{margin-left:calc(var(--cura-spacing-base) * 3px);cursor:pointer}:host .container .close-button{padding:calc(var(--cura-spacing-base) * 2px) 0}'}},[257,"cura-tooltip",{elementId:[1,"element-id"],interactive:[4],delay:[2],maxWidth:[1,"max-width"],position:[513],label:[513],closeButton:[516,"close-button"],isMobile:[32]},[[9,"resize","onWindowResize"],[9,"scroll","onWindowScroll"]]]),u=d,b=function(){"undefined"!=typeof customElements&&["cura-tooltip","cura-button-transparent","cura-heading","cura-icon","cura-label","cura-loader-circle","cura-paragraph"].forEach((t=>{switch(t){case"cura-tooltip":customElements.get(s(t))||customElements.define(s(t),d);break;case"cura-button-transparent":customElements.get(s(t))||i();break;case"cura-heading":customElements.get(s(t))||n();break;case"cura-icon":customElements.get(s(t))||c();break;case"cura-label":customElements.get(s(t))||l();break;case"cura-loader-circle":customElements.get(s(t))||p();break;case"cura-paragraph":customElements.get(s(t))||h()}}))};export{u as CuraTooltip,b as defineCustomElement}
1
+ import{p as t,H as a,k as r,i as e,j as o,t as s}from"./p-DBXUEjWh.js";import{d as i}from"./p-DgQJ968V.js";import{d as n}from"./p-Dmalf4Oj.js";import{d as c}from"./p-DI66_jP6.js";import{d as l}from"./p-i55vIhdM.js";import{d}from"./p-DQP7jRHp.js";import{d as h}from"./p-PiUhcFob.js";const p=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tooltipClosed=r(this,"tooltipClosed"),this.elementId="",this.interactive=!0,this.delay=250,this.maxWidth="280px",this.position="top",this.closeButton=!1,this.isMobile=!1,this.styles={},this.handleClose=()=>{this.closeContainer()}}onWindowResize(){this.setPosition(this.targetElement)}onWindowScroll(){this.setPosition(this.targetElement)}connectedCallback(){this.setStyle()}render(){return e(o,{key:"721cf76abdc6eb079edbc8540d2deaa74559c809",role:"tooltip",id:this.elementId},e("div",{key:"51c94531a0d28de3844ac109f0b941062b17c013",class:"container",style:this.styles},e("div",{key:"b80521a83e983ba8939fb21183570de5dfacf544",class:"content"},e("cura-heading",{key:"fc16d66d76800d5c8b778bea1cf325d1ce500f72",level:4,size:"xsmall",color:"neutral-black",weight:"bold","margin-block":"0"},this.label),e("cura-paragraph",{key:"1e0bd7fcbec98be145c83ef8cfa62e2b8e40211c",color:"neutral-dark","spot-color":"secondary-darker",size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},e("slot",{key:"4c4509441c4aa22b3810e1b66939e4cea05f48aa"}))),this.closeButton&&!this.isMobile&&e("cura-icon",{key:"35910c2bb5122c25f10c38ed90c5c633daeb7891",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.isMobile&&e("cura-button-transparent",{key:"1cec8c66efb24e8eda4e09354dd335e03abd99ed",class:"close-button",size:"small",type:"button",color:"error","icon-name":"close","icon-position":"right",onClick:this.handleClose},"OK, entendi.")))}componentDidLoad(){var t,a,r,e,o;if(this.targetElement=document.querySelector(`[aria-labelledby="${this.elementId}"]`),this.interactive){this.host.style.visibility="hidden";let s=null,i=null;null===(t=this.targetElement)||void 0===t||t.addEventListener("mouseenter",(()=>{clearTimeout(i),s=setTimeout((()=>{this.host.style.visibility="visible"}),"number"==typeof this.delay&&this.delay>250?this.delay:250)})),null===(a=this.targetElement)||void 0===a||a.addEventListener("mouseleave",(()=>{clearTimeout(s),i=setTimeout((()=>{this.handleClose()}),"number"==typeof this.delay&&this.delay>250?this.delay:250)})),null===(r=this.host)||void 0===r||r.addEventListener("mouseenter",(()=>{"visible"===window.getComputedStyle(this.host).visibility&&clearTimeout(i)})),null===(e=this.host)||void 0===e||e.addEventListener("mouseleave",(()=>{clearTimeout(s),this.handleClose()})),null===(o=this.targetElement)||void 0===o||o.addEventListener("click",(()=>{"hidden"===window.getComputedStyle(this.host).visibility?s=setTimeout((()=>{this.host.style.visibility="visible"}),"number"==typeof this.delay&&this.delay>250?this.delay:250):(clearTimeout(s),this.handleClose())})),null===document||void 0===document||document.addEventListener("click",(t=>{this.targetElement.contains(t.target)||this.host.contains(t.target)||(clearTimeout(s),this.handleClose())}))}else this.host.style.visibility="visible";setTimeout((()=>{this.setPosition(this.targetElement)}),100)}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--max-width":this.maxWidth,"--base-spacing":window.CuraAPI.theme.spacing.getSpacing(),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-light":window.CuraAPI.theme.colors.getColor("neutral-light"),"--neutral-black-shadow":window.CuraAPI.theme.colors.getColor("neutral-black",.16)})}getClasses(){const[t,a]=this.position.split("-"),r={container:!0};return t&&(r[t]=!0),a&&(r[a]=!0),r}setPosition(t){const a=window.innerWidth,r=window.innerHeight,e=this.host.shadowRoot.querySelector(".container");if(this.isMobile=a<=768,this.host.style.position=this.isMobile?"fixed":"absolute",this.host.style.bottom=this.isMobile?"0":"unset",e.style.flexDirection=this.isMobile?"column":"row",this.isMobile)return this.host.style.left="0",void(this.host.style.top="unset");const o=t.offsetTop,s=t.offsetLeft,i=t.offsetWidth,n=t.offsetHeight,c=this.host.getBoundingClientRect(),l=10,d=10,h=.5*i+18,p=.5*n+18,u=this.styles["--neutral-light"];let b=0,m=0;const x=Object.keys(this.getClasses()).filter((t=>["top","left","bottom","right","start","end"].includes(t))),w=({arrowTop:t="",arrowLeft:a="",translate:r="",borderColor:e=""})=>{a&&this.host.style.setProperty("--arrow-left",a),t&&this.host.style.setProperty("--arrow-top",t),r&&this.host.style.setProperty("--arrow-translate",r),e&&this.host.style.setProperty("--arrow-border-color",e)};(x.includes("top")||x.includes("bottom"))&&(w({arrowLeft:"50%",translate:"translateX(-50%)"}),x.includes("top")&&(m=o-c.height-d,w({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${u} ${u} transparent`}),m<l&&(m=o+n+d,w({arrowTop:"-6px",borderColor:`${u} transparent transparent ${u}`}))),x.includes("bottom")&&(m=o+n+d,w({arrowTop:"-6px",borderColor:`${u} transparent transparent ${u}`}),m+c.height>r-l&&(m=o-c.height-d,w({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${u} ${u} transparent`}))),b=s+(i-c.width)/2,x.includes("start")&&(b=s-c.width+h,w({arrowLeft:"calc(100% - 18px)"}),b<l&&(b=s+i-h,w({arrowLeft:"18px"}))),x.includes("end")&&(b=s+i-h,w({arrowLeft:"18px"}),b+c.width>a-l&&(b=s-c.width+h,w({arrowLeft:"calc(100% - 18px)"})))),(x.includes("right")||x.includes("left"))&&(w({arrowTop:"50%",translate:"translateY(-50%)"}),x.includes("right")&&(b=s+i+d,w({arrowLeft:"-6px",borderColor:`transparent transparent ${u} ${u}`}),b+c.width>a-l&&(b=s-c.width-d,w({arrowLeft:"calc(100% - 6px)",borderColor:`${u} ${u} transparent transparent`}))),x.includes("left")&&(b=s-c.width-d,w({arrowLeft:"calc(100% - 6px)",borderColor:`${u} ${u} transparent transparent`}),b<l&&(b=s+i+d,w({arrowLeft:"-6px",borderColor:`transparent transparent ${u} ${u}`}))),m=o+(n-c.height)/2,x.includes("start")&&(m=o-c.height+p,w({arrowTop:"calc(100% - 18px)"}),m<l&&(m=o+n-p,w({arrowTop:"18px"}))),x.includes("end")&&(m=o+n-p,w({arrowTop:"18px"}),m+c.height>r-l&&(m=o-c.height+p,w({arrowTop:"calc(100% - 18px)"})))),this.host.style.left=b+"px",this.host.style.top=m+"px"}closeContainer(){this.host.style.visibility="hidden",this.tooltipClosed.emit()}get host(){return this}static get style(){return':host{position:absolute;z-index:99998;display:block;width:fit-content;height:fit-content;box-sizing:border-box}@media (max-width: 768px){:host{width:100%}}:host .container{display:flex;box-sizing:border-box;max-width:var(--max-width);height:auto;padding:calc(var(--cura-spacing-base) * 2px);border:1px solid var(--neutral-light);border-radius:calc(var(--cura-spacing-base) * 1px);background-color:var(--neutral-purewhite);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}@media (max-width: 768px){:host .container{max-width:90%;height:fit-content;padding:calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px) 0 calc(var(--cura-spacing-base) * 4px);margin:0 auto;border:2px solid;border-radius:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px) 0 0;border-color:var(--neutral-light) var(--neutral-light) transparent var(--neutral-light)}}:host .container::after{content:"";position:absolute;z-index:99999;width:calc(var(--cura-spacing-base) * 2.5px);height:calc(var(--cura-spacing-base) * 2.5px);border:1px solid;border-radius:2px;background-color:var(--neutral-purewhite);left:var(--arrow-left);top:var(--arrow-top);border-color:var(--arrow-border-color);transform:var(--arrow-translate) rotate(45deg)}@media (max-width: 768px){:host .container::after{display:none}}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:calc(var(--cura-spacing-base) * 1px)}@media (max-width: 768px){:host .container .content{padding-bottom:calc(var(--cura-spacing-base) * 4px);border-bottom:1px dashed var(--neutral-light)}}:host .container .close-icon{margin-left:calc(var(--cura-spacing-base) * 3px);cursor:pointer}:host .container .close-button{padding:calc(var(--cura-spacing-base) * 2px) 0}'}},[257,"cura-tooltip",{elementId:[1,"element-id"],interactive:[4],delay:[2],maxWidth:[1,"max-width"],position:[513],label:[513],closeButton:[516,"close-button"],isMobile:[32]},[[9,"resize","onWindowResize"],[9,"scroll","onWindowScroll"]]]),u=p,b=function(){"undefined"!=typeof customElements&&["cura-tooltip","cura-button-transparent","cura-heading","cura-icon","cura-label","cura-loader-circle","cura-paragraph"].forEach((t=>{switch(t){case"cura-tooltip":customElements.get(s(t))||customElements.define(s(t),p);break;case"cura-button-transparent":customElements.get(s(t))||i();break;case"cura-heading":customElements.get(s(t))||n();break;case"cura-icon":customElements.get(s(t))||c();break;case"cura-label":customElements.get(s(t))||l();break;case"cura-loader-circle":customElements.get(s(t))||d();break;case"cura-paragraph":customElements.get(s(t))||h()}}))};export{u as CuraTooltip,b as defineCustomElement}
@@ -1 +1 @@
1
- import{T as t,a as e,b as a,c as i,d as o,e as n,t as l}from"./p-DBXUEjWh.js";export{g as getAssetPath,r as render,s as setAssetPath,f as setNonce,h as setPlatformOptions}from"./p-DBXUEjWh.js";import{S as c}from"./p-B8xnU6YS.js";import{CuraAccordion as u}from"./cura-accordion.js";import{CuraAccordionItem as d}from"./cura-accordion-item.js";import{CuraAlert as m}from"./cura-alert.js";import{CuraAvatar as p}from"./cura-avatar.js";import{CuraBadgeCounter as w}from"./cura-badge-counter.js";import{CuraBadgeDistance as b}from"./cura-badge-distance.js";import{CuraBadgeDot as y}from"./cura-badge-dot.js";import{CuraBadgePill as v}from"./cura-badge-pill.js";import{CuraButton as j}from"./cura-button.js";import{CuraButtonOutline as E}from"./cura-button-outline.js";import{CuraButtonSelect as M}from"./cura-button-select.js";import{CuraButtonTransparent as T}from"./cura-button-transparent.js";import{CuraCalendar as x}from"./cura-calendar.js";import{CuraCard as F}from"./cura-card.js";import{CuraCheckbox as k}from"./cura-checkbox.js";import{CuraDisplay as O}from"./cura-display.js";import{CuraDropdownSearch as S}from"./cura-dropdown-search.js";import{CuraDropdownSearchCategory as C}from"./cura-dropdown-search-category.js";import{CuraDropdownSearchNotFound as I}from"./cura-dropdown-search-not-found.js";import{CuraDropdownSearchOption as V}from"./cura-dropdown-search-option.js";import{CuraHeading as L}from"./cura-heading.js";import{CuraIcon as $}from"./cura-icon.js";import{CuraIconsView as W}from"./cura-icons-view.js";import{CuraInputDate as D}from"./cura-input-date.js";import{CuraInputText as H}from"./cura-input-text.js";import{CuraLabel as R}from"./cura-label.js";import{CuraLoaderBar as A}from"./cura-loader-bar.js";import{CuraLoaderCircle as N}from"./cura-loader-circle.js";import{CuraModal as P}from"./cura-modal.js";import{CuraPageTemplate as B}from"./cura-page-template.js";import{CuraParagraph as z}from"./cura-paragraph.js";import{CuraProgressBar as U}from"./cura-progress-bar.js";import{CuraRadio as _}from"./cura-radio.js";import{CuraSelect as q}from"./cura-select.js";import{CuraSelectOption as J}from"./cura-select-option.js";import{CuraStepper as X}from"./cura-stepper.js";import{CuraStepperItem as G}from"./cura-stepper-item.js";import{CuraSwitch as K}from"./cura-switch.js";import{CuraTabs as Y}from"./cura-tabs.js";import{CuraTabsButton as Q}from"./cura-tabs-button.js";import{CuraTabsGroup as Z}from"./cura-tabs-group.js";import{CuraTabsTransparent as tt}from"./cura-tabs-transparent.js";import{CuraToast as et}from"./cura-toast.js";import{CuraTooltip as rt}from"./cura-tooltip.js";const at={default:n,maternidade:o,oncologia:i,richet:a,perinatalTemp:e,legacyDefault:t};class it{constructor(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"},this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}getColor(t="primary-base",e=1){const{color:r,depth:a}=this.splitColorDepth(t);return this.getStatic(r,a,e)||this.getDynamic(r,a,e)}getStatic(t,e,r=1){var a,i,o;if(!c.color[t])return null;const n="neutral"===t?this.NeutralDepthAlias[e]:this.ColorDepthAlias[e];return(null===(a=c.color[t])||void 0===a?void 0:a[n])?`rgba(${null===(i=c.color[t])||void 0===i?void 0:i[n]}, ${r})`:`rgba(${null===(o=c.color[t])||void 0===o?void 0:o[e]}, ${r})`}getDynamic(t,e,r){const a=this.ColorDepthAlias[e]?`--cura-color-${t}-${this.ColorDepthAlias[e]}`:`--cura-color-${t}-${e}`;return getComputedStyle(document.documentElement).getPropertyValue(a)?`rgba(var(${a}), ${r})`:`rgba(var(--cura-color-primary-500), ${r})`}splitColorDepth(t){const[e,r]=t.toLowerCase().split(/-(.*)/);return{color:null!=e?e:"primary",depth:null!=r?r:"base"}}}class ot{constructor(){this.curaSpacing="--cura-spacing-base"}getSpacing(){return getComputedStyle(document.body).getPropertyValue(this.curaSpacing)?`var(${this.curaSpacing})`:"4"}}class nt{constructor(){this.getSize=()=>"var(--cura-font-size)",this.getColor=()=>"var(--cura-font-color)"}getFamily(t="body"){const e="--cura-font-"+t.toLowerCase();return getComputedStyle(document.body).getPropertyValue(e)?`var(${e})`:"var(--cura-font-body)"}getWeights(){const t={};return Object.keys(n.font.weights).forEach((e=>t[e]=`var(--cura-font-weights-${e})`)),t}}class st{constructor(){}get(t=null,e=null){if(t){const r=e?c.breakpoints[t][e]:c.breakpoints[t];if(r||0===r)return r}return c.breakpoints}}class lt{constructor(){var t;this.prefix="--cura",this.colors=new it,this.spacing=new ot,this.fonts=new nt,this.breakpoints=new st,this.groupObject={},this.setCssVar=(t,e)=>{const r=this.groupPath(e,t[0]);this.rootElement.style.setProperty(r,t[1])},this.groupPath=(t,e)=>`${t}-${e}`,this.isObject=t=>t&&"object"==typeof t&&!Array.isArray(t),this.mergeObject=(t,e)=>{const r=Object.entries(t);for(let t of r)this.isObject(t[1])?this.mergeObject(t[1],e[t[0]]):e[t[0]]=t[1]},this.buildCssVars=(t,e,r=!1)=>{const a=Object.entries(e);for(let e of a)if(this.isObject(e[1]))this.buildCssVars(this.groupPath(t,e[0]),e[1],r);else if(r){const r=this.groupPath(t,e[0]);this.groupObject[r]=e[1]}else this.setCssVar(e,t)},"undefined"!=typeof window&&(this.rootElement=null===(t=null===window||void 0===window?void 0:window.document)||void 0===t?void 0:t.documentElement)}load(t="default"){this.buildCssVars(this.prefix,at[t]?at[t]:at.default)}loadVarsSSR(t="default"){return this.buildCssVars(this.prefix,at[t]?at[t]:at.default,!0),this.groupObject}setCustom(t){const e=t.name;if(e in at)console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e),this.load("default");else{const r=Object.assign({},JSON.parse(JSON.stringify(t.fromPreset&&t.fromPreset in at?at[t.fromPreset]:at.default)));this.mergeObject(t.definitions,r),at[e]=r,this.load(e)}}}class ct{constructor(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";const e=new lt;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t,r){return e.colors.getColor(t,r)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}},spacing:{getSpacing:function(){return e.spacing.getSpacing()}},breakpoints:{get:function(t,r){return e.breakpoints.get(t,r)}}},this._addGlobalClasses(),t&&t.customTheme?this.theme.setCustom(t.customTheme):this.theme.load(t&&t.theme?t.theme:"default")}_addGlobalClasses(){const t="cura_global_classes";let e=document.head.querySelector("#"+t);e||(e=document.createElement("style"),e.id=t,e.textContent="\n .cura-body-scroll-lock {\n overflow: hidden;\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n }\n ",document.head.appendChild(e))}}const ut=function(){const t=window.CuraInit;window.CuraAPI=t?new ct(t):new ct;const e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}})),t&&"function"==typeof t.onReady&&t.onReady(e)}||(()=>{}),dt=new WeakMap,mt=new WeakMap,ft=new WeakMap,ht=new WeakMap,pt=new WeakMap,wt=new WeakMap,bt=new WeakMap,yt=new WeakMap,gt=new WeakMap,vt=new WeakMap,jt=new WeakMap,Et=new WeakMap,Mt=new WeakMap,Tt=new WeakMap,xt=new WeakMap,Ft=(t,e,r)=>{t.getAttribute(e)!==r&&t.setAttribute(e,r)},kt=(t,e)=>{t.toggleAttribute("internals-disabled",e),e?Ft(t,"aria-disabled","true"):t.removeAttribute("aria-disabled"),t.formDisabledCallback&&t.formDisabledCallback.call(t,e)},Ot=t=>{ft.get(t).forEach((t=>{t.remove()})),ft.set(t,[])},St=(t,e)=>{const r=document.createElement("input");return r.type="hidden",r.name=t.getAttribute("name"),t.after(r),ft.get(e).push(r),r},Ct=(t,e)=>{if(e.length){const r=Array.from(e);r.forEach((e=>e.addEventListener("click",t.click.bind(t))));const[a]=r;let i=a.id;a.id||(i=a.htmlFor+"_Label",a.id=i),Ft(t,"aria-labelledby",i)}},It=t=>{const e=Array.from(t.elements).filter((t=>!t.tagName.includes("-")&&t.validity)).map((t=>t.validity.valid)),r=yt.get(t)||[],a=[...e,...Array.from(r).filter((t=>t.isConnected)).map((t=>ht.get(t).validity.valid))].includes(!1);t.toggleAttribute("internals-invalid",a),t.toggleAttribute("internals-valid",!a)},Vt=t=>{It(Dt(t.target))},Lt=t=>{It(Dt(t.target))},$t=t=>{const e=yt.get(t.target);e&&e.size&&e.forEach((t=>{t.constructor.formAssociated&&t.formResetCallback&&t.formResetCallback.apply(t)}))},Wt=(t,e,r)=>{if(e){const a=yt.get(e);if(a)a.add(t);else{const r=new Set;r.add(t),yt.set(e,r),(t=>{const e=["button[type=submit]","input[type=submit]","button:not([type])"].map((t=>t+":not([disabled])")).map((e=>`${e}:not([form])${t.id?`,${e}[form='${t.id}']`:""}`)).join(",");t.addEventListener("click",(r=>{if(r.target.closest(e)){const e=yt.get(t);if(t.noValidate)return;e.size&&Array.from(e).reverse().map((t=>ht.get(t).reportValidity())).includes(!1)&&r.preventDefault()}}))})(e),e.addEventListener("reset",$t),e.addEventListener("input",Vt),e.addEventListener("change",Lt)}wt.set(e,{ref:t,internals:r}),t.constructor.formAssociated&&t.formAssociatedCallback&&setTimeout((()=>{t.formAssociatedCallback.call(t,e)}),0),It(e)}},Dt=t=>{let e=t.parentNode;return e&&"FORM"!==e.tagName&&(e=Dt(e)),e},Ht=(t,e,r=DOMException)=>{if(!t.constructor.formAssociated)throw new r(e)},Rt=(t,e,r)=>{const a=yt.get(t);return a&&a.size&&a.forEach((t=>{ht.get(t)[r]()||(e=!1)})),e},At=t=>{let e=!1;if(t.constructor.formAssociated){let r=ht.get(t);void 0===r&&(t.attachInternals(),r=ht.get(t),e=!0);const{labels:a,form:i}=r;Ct(t,a),Wt(t,i,r)}return e};function Nt(){return"undefined"!=typeof MutationObserver}const Pt={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"};function Bt(t){const e=ht.get(t),{form:r}=e;Wt(t,r,e),Ct(t,e.labels)}const zt=(t,e=!1)=>{const r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>ht.has(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=r.nextNode();const i=!e||t.disabled;for(;a;)a.formDisabledCallback&&i&&kt(a,t.disabled),a=r.nextNode()},Ut={attributes:!0,attributeFilter:["disabled","name"]},_t=Nt()?new MutationObserver((t=>{for(const e of t){const t=e.target;if("disabled"===e.attributeName&&(t.constructor.formAssociated?kt(t,t.hasAttribute("disabled")):"fieldset"===t.localName&&zt(t)),"name"===e.attributeName&&t.constructor.formAssociated){const e=ht.get(t),r=gt.get(t);e.setFormValue(r)}}})):{};function qt(t){t.forEach((t=>{const{addedNodes:e,removedNodes:r}=t,a=Array.from(e),i=Array.from(r);a.forEach((t=>{if(ht.has(t)&&t.constructor.formAssociated&&Bt(t),vt.has(t)){const e=vt.get(t);Object.keys(Pt).filter((t=>null!==e[t])).forEach((r=>{Ft(t,Pt[r],e[r])})),vt.delete(t)}if(xt.has(t)){const e=xt.get(t);Ft(t,"internals-valid",""+e.validity.valid),Ft(t,"internals-invalid",""+!e.validity.valid),Ft(t,"aria-invalid",""+!e.validity.valid),xt.delete(t)}if("form"===t.localName){const e=yt.get(t),r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>!ht.has(t)||!t.constructor.formAssociated||e&&e.has(t)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});let a=r.nextNode();for(;a;)Bt(a),a=r.nextNode()}"fieldset"===t.localName&&(_t.observe?.(t,Ut),zt(t,!0))})),i.forEach((t=>{const e=ht.get(t);e&&ft.get(e)&&Ot(e),bt.has(t)&&bt.get(t).disconnect()}))}))}function Jt(t){t.forEach((t=>{const{removedNodes:e}=t;e.forEach((e=>{const r=Mt.get(t.target);ht.has(e)&&At(e),r.disconnect()}))}))}!Nt()||new MutationObserver(qt);const Xt={childList:!0,subtree:!0};class Gt{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const Kt=new WeakMap;function Yt(t,e){t.toggleAttribute(e,!0),t.part&&t.part.add(e)}class Qt extends Set{static get isPolyfilled(){return!0}constructor(t){if(super(),!t||!t.tagName||-1===t.tagName.indexOf("-"))throw new TypeError("Illegal constructor");Kt.set(this,t)}add(t){if(!/^--/.test(t)||"string"!=typeof t)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${t} must start with '--'.`);const e=super.add(t),r=Kt.get(this),a="state"+t;return r.isConnected?Yt(r,a):setTimeout((()=>{Yt(r,a)})),e}clear(){for(let[t]of this.entries())this.delete(t);super.clear()}delete(t){const e=super.delete(t),r=Kt.get(this);return r.isConnected?(r.toggleAttribute("state"+t,!1),r.part&&r.part.remove("state"+t)):setTimeout((()=>{r.toggleAttribute("state"+t,!1),r.part&&r.part.remove("state"+t)})),e}}var Zt,te=function(t,e,r,a){if("a"===r&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(t):a?a.value:e.get(t)};class ee{constructor(t){Zt.set(this,void 0),function(t,e,r,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===a?i.call(t,r):i?i.value=r:e.set(t,r)}(this,Zt,t,"f");for(let e=0;e<t.length;e++){let r=t[e];this[e]=r,r.hasAttribute("name")&&(this[r.getAttribute("name")]=r)}Object.freeze(this)}get length(){return te(this,Zt,"f").length}[(Zt=new WeakMap,Symbol.iterator)](){return te(this,Zt,"f")[Symbol.iterator]()}item(t){return null==this[t]?null:this[t]}namedItem(t){return null==this[t]?null:this[t]}}class re{static get isPolyfilled(){return!0}constructor(t){if(!t||!t.tagName||-1===t.tagName.indexOf("-"))throw new TypeError("Illegal constructor");const e=t.getRootNode(),r=new Gt;this.states=new Qt(t),dt.set(this,t),mt.set(this,r),ht.set(t,this),((t,e)=>{for(let r in Pt){e[r]=null;let a=null;const i=Pt[r];Object.defineProperty(e,r,{get:()=>a,set(r){a=r,t.isConnected?Ft(t,i,r):vt.set(t,e)}})}})(t,this),(t=>{ft.set(this,[]),_t.observe?.(t,Ut)})(t),Object.seal(this),e instanceof DocumentFragment&&(t=>{const e=new MutationObserver(Jt);window?.ShadyDOM?.inUse&&t.mode&&t.host&&(t=t.host),e.observe?.(t,{childList:!0}),Mt.set(t,e)})(e)}checkValidity(){const t=dt.get(this);if(Ht(t,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const e=mt.get(this);if(!e.valid){const e=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});t.dispatchEvent(e)}return e.valid}get form(){const t=dt.get(this);let e;return Ht(t,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element."),!0===t.constructor.formAssociated&&(e=Dt(t)),e}get labels(){const t=dt.get(this);Ht(t,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const e=t.getAttribute("id"),r=t.getRootNode();return r&&e?r.querySelectorAll(`[for="${e}"]`):[]}reportValidity(){const t=dt.get(this);if(Ht(t,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const e=this.checkValidity(),r=Et.get(this);if(r&&!t.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!e&&r&&(t.focus(),r.focus()),e}setFormValue(t){const e=dt.get(this);Ht(e,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Ot(this),null==t||t instanceof FormData?null!=t&&t instanceof FormData&&Array.from(t).reverse().forEach((([t,r])=>{if("string"==typeof r){const a=St(e,this);a.name=t,a.value=r}})):e.getAttribute("name")&&(St(e,this).value=t),gt.set(e,t)}setValidity(t,e,r){const a=dt.get(this);if(Ht(a,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!t)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");Et.set(this,r);const i=mt.get(this),o={};for(const e in t)o[e]=t[e];0===Object.keys(o).length&&(t=>{t.badInput=!1,t.customError=!1,t.patternMismatch=!1,t.rangeOverflow=!1,t.rangeUnderflow=!1,t.stepMismatch=!1,t.tooLong=!1,t.tooShort=!1,t.typeMismatch=!1,t.valid=!0,t.valueMissing=!1})(i);const n={...i,...o};delete n.valid;const{valid:s}=((t,e,r)=>(t.valid=(t=>{let e=!0;for(let r in t)"valid"!==r&&!1!==t[r]&&(e=!1);return e})(e),Object.keys(e).forEach((r=>t[r]=e[r])),r&&It(r),t))(i,n,this.form);if(!s&&!e)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");pt.set(this,s?"":e),a.isConnected?(a.toggleAttribute("internals-invalid",!s),a.toggleAttribute("internals-valid",s),Ft(a,"aria-invalid",""+!s)):xt.set(a,this)}get shadowRoot(){const t=dt.get(this);return jt.get(t)||null}get validationMessage(){const t=dt.get(this);return Ht(t,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),pt.get(this)}get validity(){const t=dt.get(this);return Ht(t,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),mt.get(this)}get willValidate(){const t=dt.get(this);return Ht(t,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(t.matches(":disabled")||t.disabled||t.hasAttribute("disabled")||t.hasAttribute("readonly"))}}let ae=!1,ie=!1;function oe(t){ie||(ie=!0,window.CustomStateSet=Qt,t&&(HTMLElement.prototype.attachInternals=function(...e){const r=t.call(this,e);return r.states=new Qt(this),r}))}function ne(t,e=window){e.CuraInit=t}function se(t){return(new lt).loadVarsSSR(t)}!!customElements.polyfillWrapFlushCallback||(function(){if("undefined"==typeof window||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class t extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const e="element-internals-feature-detection-"+Math.random().toString(36).replace(/[^a-z]+/g,"");customElements.define(e,t);const r=new t;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every((t=>t in r.internals))}()?"undefined"==typeof window||window.CustomStateSet||oe(HTMLElement.prototype.attachInternals):function(t=!0){let e=!1;if(!ae){if(ae=!0,"undefined"!=typeof window&&(window.ElementInternals=re),"undefined"!=typeof CustomElementRegistry){const r=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(t,a,i){if(a.formAssociated){const t=a.prototype.connectedCallback;a.prototype.connectedCallback=function(){Tt.has(this)||(Tt.set(this,!0),this.hasAttribute("disabled")&&kt(this,!0)),null!=t&&t.apply(this),e=At(this)}}r.call(this,t,a,i)}}if("undefined"!=typeof HTMLElement&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(-1===this.tagName.indexOf("-"))throw Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");if(ht.has(this)&&!e)throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new re(this)}),"undefined"!=typeof Element){function a(...t){const e=i.apply(this,t);if(jt.set(this,e),Nt()){const t=new MutationObserver(qt);window.ShadyDOM?t.observe(this,Xt):t.observe(e,Xt),bt.set(this,t)}return e}const i=Element.prototype.attachShadow;Element.prototype.attachShadow=a}Nt()&&"undefined"!=typeof document&&new MutationObserver(qt).observe(document.documentElement,Xt),"undefined"!=typeof HTMLFormElement&&function(){const t=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=function(...e){let r=t.apply(this,e);return Rt(this,r,"checkValidity")};const e=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=function(...t){let r=e.apply(this,t);return Rt(this,r,"reportValidity")};const{get:r}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...t){const e=r.call(this,...t),a=Array.from(yt.get(this)||[]);if(0===a.length)return e;const i=Array.from(e).concat(a).sort(((t,e)=>t.compareDocumentPosition?2&t.compareDocumentPosition(e)?1:-1:0));return new ee(i)}})}(),(t||"undefined"!=typeof window&&!window.CustomStateSet)&&oe()}}(!1)),ut();const le=t=>{"undefined"!=typeof customElements&&[u,d,m,p,w,b,y,v,j,E,M,T,x,F,k,O,S,C,I,V,L,$,W,D,H,R,A,N,P,B,z,U,_,q,J,X,G,K,Y,Q,Z,tt,et,rt].forEach((e=>{customElements.get(l(e.is))||customElements.define(l(e.is),e,t)}))};export{ne as CuraInit,se as InitVarsTheme,le as defineCustomElements}
1
+ import{T as t,a as e,b as a,c as i,d as o,e as n,t as l}from"./p-DBXUEjWh.js";export{g as getAssetPath,r as render,s as setAssetPath,f as setNonce,h as setPlatformOptions}from"./p-DBXUEjWh.js";import{S as c}from"./p-B2TDH4aP.js";import{CuraAccordion as u}from"./cura-accordion.js";import{CuraAccordionItem as d}from"./cura-accordion-item.js";import{CuraAlert as m}from"./cura-alert.js";import{CuraAvatar as p}from"./cura-avatar.js";import{CuraBadgeCounter as w}from"./cura-badge-counter.js";import{CuraBadgeDistance as b}from"./cura-badge-distance.js";import{CuraBadgeDot as y}from"./cura-badge-dot.js";import{CuraBadgePill as v}from"./cura-badge-pill.js";import{CuraButton as j}from"./cura-button.js";import{CuraButtonOutline as E}from"./cura-button-outline.js";import{CuraButtonSelect as M}from"./cura-button-select.js";import{CuraButtonTransparent as T}from"./cura-button-transparent.js";import{CuraCalendar as x}from"./cura-calendar.js";import{CuraCard as F}from"./cura-card.js";import{CuraCheckbox as k}from"./cura-checkbox.js";import{CuraDisplay as O}from"./cura-display.js";import{CuraDropdownSearch as C}from"./cura-dropdown-search.js";import{CuraDropdownSearchCategory as S}from"./cura-dropdown-search-category.js";import{CuraDropdownSearchNotFound as I}from"./cura-dropdown-search-not-found.js";import{CuraDropdownSearchOption as V}from"./cura-dropdown-search-option.js";import{CuraHeading as L}from"./cura-heading.js";import{CuraIcon as $}from"./cura-icon.js";import{CuraIconsView as W}from"./cura-icons-view.js";import{CuraInputDate as D}from"./cura-input-date.js";import{CuraInputText as H}from"./cura-input-text.js";import{CuraInputTextarea as R}from"./cura-input-textarea.js";import{CuraLabel as A}from"./cura-label.js";import{CuraLoaderBar as N}from"./cura-loader-bar.js";import{CuraLoaderCircle as P}from"./cura-loader-circle.js";import{CuraModal as B}from"./cura-modal.js";import{CuraPageTemplate as z}from"./cura-page-template.js";import{CuraParagraph as _}from"./cura-paragraph.js";import{CuraProgressBar as q}from"./cura-progress-bar.js";import{CuraRadio as U}from"./cura-radio.js";import{CuraSelect as J}from"./cura-select.js";import{CuraSelectOption as X}from"./cura-select-option.js";import{CuraStepper as G}from"./cura-stepper.js";import{CuraStepperItem as K}from"./cura-stepper-item.js";import{CuraSwitch as Q}from"./cura-switch.js";import{CuraTabs as Y}from"./cura-tabs.js";import{CuraTabsButton as Z}from"./cura-tabs-button.js";import{CuraTabsGroup as tt}from"./cura-tabs-group.js";import{CuraTabsTransparent as et}from"./cura-tabs-transparent.js";import{CuraToast as rt}from"./cura-toast.js";import{CuraTooltip as at}from"./cura-tooltip.js";const it={default:n,maternidade:o,oncologia:i,richet:a,perinatalTemp:e,legacyDefault:t};class ot{constructor(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"},this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}getColor(t="primary-base",e=1){const{color:r,depth:a}=this.splitColorDepth(t);return this.getStatic(r,a,e)||this.getDynamic(r,a,e)}getStatic(t,e,r=1){var a,i,o;if(!c.color[t])return null;const n="neutral"===t?this.NeutralDepthAlias[e]:this.ColorDepthAlias[e];return(null===(a=c.color[t])||void 0===a?void 0:a[n])?`rgba(${null===(i=c.color[t])||void 0===i?void 0:i[n]}, ${r})`:`rgba(${null===(o=c.color[t])||void 0===o?void 0:o[e]}, ${r})`}getDynamic(t,e,r){const a=this.ColorDepthAlias[e]?`--cura-color-${t}-${this.ColorDepthAlias[e]}`:`--cura-color-${t}-${e}`;return getComputedStyle(document.documentElement).getPropertyValue(a)?`rgba(var(${a}), ${r})`:`rgba(var(--cura-color-primary-500), ${r})`}splitColorDepth(t){const[e,r]=t.toLowerCase().split(/-(.*)/);return{color:null!=e?e:"primary",depth:null!=r?r:"base"}}}class nt{constructor(){this.curaSpacing="--cura-spacing-base"}getSpacing(){return getComputedStyle(document.body).getPropertyValue(this.curaSpacing)?`var(${this.curaSpacing})`:"4"}}class st{constructor(){this.getSize=()=>"var(--cura-font-size)",this.getColor=()=>"var(--cura-font-color)"}getFamily(t="body"){const e="--cura-font-"+t.toLowerCase();return getComputedStyle(document.body).getPropertyValue(e)?`var(${e})`:"var(--cura-font-body)"}getWeights(){const t={};return Object.keys(n.font.weights).forEach((e=>t[e]=`var(--cura-font-weights-${e})`)),t}}class lt{constructor(){}get(t=null,e=null){if(t){const r=e?c.breakpoints[t][e]:c.breakpoints[t];if(r||0===r)return r}return c.breakpoints}}class ct{constructor(){var t;this.prefix="--cura",this.colors=new ot,this.spacing=new nt,this.fonts=new st,this.breakpoints=new lt,this.groupObject={},this.setCssVar=(t,e)=>{const r=this.groupPath(e,t[0]);this.rootElement.style.setProperty(r,t[1])},this.groupPath=(t,e)=>`${t}-${e}`,this.isObject=t=>t&&"object"==typeof t&&!Array.isArray(t),this.mergeObject=(t,e)=>{const r=Object.entries(t);for(let t of r)this.isObject(t[1])?this.mergeObject(t[1],e[t[0]]):e[t[0]]=t[1]},this.buildCssVars=(t,e,r=!1)=>{const a=Object.entries(e);for(let e of a)if(this.isObject(e[1]))this.buildCssVars(this.groupPath(t,e[0]),e[1],r);else if(r){const r=this.groupPath(t,e[0]);this.groupObject[r]=e[1]}else this.setCssVar(e,t)},"undefined"!=typeof window&&(this.rootElement=null===(t=null===window||void 0===window?void 0:window.document)||void 0===t?void 0:t.documentElement)}load(t="default"){this.buildCssVars(this.prefix,it[t]?it[t]:it.default)}loadVarsSSR(t="default"){return this.buildCssVars(this.prefix,it[t]?it[t]:it.default,!0),this.groupObject}setCustom(t){const e=t.name;if(e in it)console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e),this.load("default");else{const r=Object.assign({},JSON.parse(JSON.stringify(t.fromPreset&&t.fromPreset in it?it[t.fromPreset]:it.default)));this.mergeObject(t.definitions,r),it[e]=r,this.load(e)}}}class ut{constructor(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";const e=new ct;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t,r){return e.colors.getColor(t,r)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}},spacing:{getSpacing:function(){return e.spacing.getSpacing()}},breakpoints:{get:function(t,r){return e.breakpoints.get(t,r)}}},this._addGlobalClasses(),t&&t.customTheme?this.theme.setCustom(t.customTheme):this.theme.load(t&&t.theme?t.theme:"default")}_addGlobalClasses(){const t="cura_global_classes";let e=document.head.querySelector("#"+t);e||(e=document.createElement("style"),e.id=t,e.textContent="\n .cura-body-scroll-lock {\n overflow: hidden;\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n }\n ",document.head.appendChild(e))}}const dt=function(){const t=window.CuraInit;window.CuraAPI=t?new ut(t):new ut;const e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}})),t&&"function"==typeof t.onReady&&t.onReady(e)}||(()=>{}),mt=new WeakMap,ft=new WeakMap,ht=new WeakMap,pt=new WeakMap,wt=new WeakMap,bt=new WeakMap,yt=new WeakMap,gt=new WeakMap,vt=new WeakMap,jt=new WeakMap,Et=new WeakMap,Mt=new WeakMap,Tt=new WeakMap,xt=new WeakMap,Ft=new WeakMap,kt=(t,e,r)=>{t.getAttribute(e)!==r&&t.setAttribute(e,r)},Ot=(t,e)=>{t.toggleAttribute("internals-disabled",e),e?kt(t,"aria-disabled","true"):t.removeAttribute("aria-disabled"),t.formDisabledCallback&&t.formDisabledCallback.call(t,e)},Ct=t=>{ht.get(t).forEach((t=>{t.remove()})),ht.set(t,[])},St=(t,e)=>{const r=document.createElement("input");return r.type="hidden",r.name=t.getAttribute("name"),t.after(r),ht.get(e).push(r),r},It=(t,e)=>{if(e.length){const r=Array.from(e);r.forEach((e=>e.addEventListener("click",t.click.bind(t))));const[a]=r;let i=a.id;a.id||(i=a.htmlFor+"_Label",a.id=i),kt(t,"aria-labelledby",i)}},Vt=t=>{const e=Array.from(t.elements).filter((t=>!t.tagName.includes("-")&&t.validity)).map((t=>t.validity.valid)),r=gt.get(t)||[],a=[...e,...Array.from(r).filter((t=>t.isConnected)).map((t=>pt.get(t).validity.valid))].includes(!1);t.toggleAttribute("internals-invalid",a),t.toggleAttribute("internals-valid",!a)},Lt=t=>{Vt(Ht(t.target))},$t=t=>{Vt(Ht(t.target))},Wt=t=>{const e=gt.get(t.target);e&&e.size&&e.forEach((t=>{t.constructor.formAssociated&&t.formResetCallback&&t.formResetCallback.apply(t)}))},Dt=(t,e,r)=>{if(e){const a=gt.get(e);if(a)a.add(t);else{const r=new Set;r.add(t),gt.set(e,r),(t=>{const e=["button[type=submit]","input[type=submit]","button:not([type])"].map((t=>t+":not([disabled])")).map((e=>`${e}:not([form])${t.id?`,${e}[form='${t.id}']`:""}`)).join(",");t.addEventListener("click",(r=>{if(r.target.closest(e)){const e=gt.get(t);if(t.noValidate)return;e.size&&Array.from(e).reverse().map((t=>pt.get(t).reportValidity())).includes(!1)&&r.preventDefault()}}))})(e),e.addEventListener("reset",Wt),e.addEventListener("input",Lt),e.addEventListener("change",$t)}bt.set(e,{ref:t,internals:r}),t.constructor.formAssociated&&t.formAssociatedCallback&&setTimeout((()=>{t.formAssociatedCallback.call(t,e)}),0),Vt(e)}},Ht=t=>{let e=t.parentNode;return e&&"FORM"!==e.tagName&&(e=Ht(e)),e},Rt=(t,e,r=DOMException)=>{if(!t.constructor.formAssociated)throw new r(e)},At=(t,e,r)=>{const a=gt.get(t);return a&&a.size&&a.forEach((t=>{pt.get(t)[r]()||(e=!1)})),e},Nt=t=>{let e=!1;if(t.constructor.formAssociated){let r=pt.get(t);void 0===r&&(t.attachInternals(),r=pt.get(t),e=!0);const{labels:a,form:i}=r;It(t,a),Dt(t,i,r)}return e};function Pt(){return"undefined"!=typeof MutationObserver}const Bt={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"};function zt(t){const e=pt.get(t),{form:r}=e;Dt(t,r,e),It(t,e.labels)}const _t=(t,e=!1)=>{const r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>pt.has(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=r.nextNode();const i=!e||t.disabled;for(;a;)a.formDisabledCallback&&i&&Ot(a,t.disabled),a=r.nextNode()},qt={attributes:!0,attributeFilter:["disabled","name"]},Ut=Pt()?new MutationObserver((t=>{for(const e of t){const t=e.target;if("disabled"===e.attributeName&&(t.constructor.formAssociated?Ot(t,t.hasAttribute("disabled")):"fieldset"===t.localName&&_t(t)),"name"===e.attributeName&&t.constructor.formAssociated){const e=pt.get(t),r=vt.get(t);e.setFormValue(r)}}})):{};function Jt(t){t.forEach((t=>{const{addedNodes:e,removedNodes:r}=t,a=Array.from(e),i=Array.from(r);a.forEach((t=>{if(pt.has(t)&&t.constructor.formAssociated&&zt(t),jt.has(t)){const e=jt.get(t);Object.keys(Bt).filter((t=>null!==e[t])).forEach((r=>{kt(t,Bt[r],e[r])})),jt.delete(t)}if(Ft.has(t)){const e=Ft.get(t);kt(t,"internals-valid",""+e.validity.valid),kt(t,"internals-invalid",""+!e.validity.valid),kt(t,"aria-invalid",""+!e.validity.valid),Ft.delete(t)}if("form"===t.localName){const e=gt.get(t),r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>!pt.has(t)||!t.constructor.formAssociated||e&&e.has(t)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});let a=r.nextNode();for(;a;)zt(a),a=r.nextNode()}"fieldset"===t.localName&&(Ut.observe?.(t,qt),_t(t,!0))})),i.forEach((t=>{const e=pt.get(t);e&&ht.get(e)&&Ct(e),yt.has(t)&&yt.get(t).disconnect()}))}))}function Xt(t){t.forEach((t=>{const{removedNodes:e}=t;e.forEach((e=>{const r=Tt.get(t.target);pt.has(e)&&Nt(e),r.disconnect()}))}))}!Pt()||new MutationObserver(Jt);const Gt={childList:!0,subtree:!0};class Kt{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const Qt=new WeakMap;function Yt(t,e){t.toggleAttribute(e,!0),t.part&&t.part.add(e)}class Zt extends Set{static get isPolyfilled(){return!0}constructor(t){if(super(),!t||!t.tagName||-1===t.tagName.indexOf("-"))throw new TypeError("Illegal constructor");Qt.set(this,t)}add(t){if(!/^--/.test(t)||"string"!=typeof t)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${t} must start with '--'.`);const e=super.add(t),r=Qt.get(this),a="state"+t;return r.isConnected?Yt(r,a):setTimeout((()=>{Yt(r,a)})),e}clear(){for(let[t]of this.entries())this.delete(t);super.clear()}delete(t){const e=super.delete(t),r=Qt.get(this);return r.isConnected?(r.toggleAttribute("state"+t,!1),r.part&&r.part.remove("state"+t)):setTimeout((()=>{r.toggleAttribute("state"+t,!1),r.part&&r.part.remove("state"+t)})),e}}var te,ee=function(t,e,r,a){if("a"===r&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?a:"a"===r?a.call(t):a?a.value:e.get(t)};class re{constructor(t){te.set(this,void 0),function(t,e,r,a,i){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===a?i.call(t,r):i?i.value=r:e.set(t,r)}(this,te,t,"f");for(let e=0;e<t.length;e++){let r=t[e];this[e]=r,r.hasAttribute("name")&&(this[r.getAttribute("name")]=r)}Object.freeze(this)}get length(){return ee(this,te,"f").length}[(te=new WeakMap,Symbol.iterator)](){return ee(this,te,"f")[Symbol.iterator]()}item(t){return null==this[t]?null:this[t]}namedItem(t){return null==this[t]?null:this[t]}}class ae{static get isPolyfilled(){return!0}constructor(t){if(!t||!t.tagName||-1===t.tagName.indexOf("-"))throw new TypeError("Illegal constructor");const e=t.getRootNode(),r=new Kt;this.states=new Zt(t),mt.set(this,t),ft.set(this,r),pt.set(t,this),((t,e)=>{for(let r in Bt){e[r]=null;let a=null;const i=Bt[r];Object.defineProperty(e,r,{get:()=>a,set(r){a=r,t.isConnected?kt(t,i,r):jt.set(t,e)}})}})(t,this),(t=>{ht.set(this,[]),Ut.observe?.(t,qt)})(t),Object.seal(this),e instanceof DocumentFragment&&(t=>{const e=new MutationObserver(Xt);window?.ShadyDOM?.inUse&&t.mode&&t.host&&(t=t.host),e.observe?.(t,{childList:!0}),Tt.set(t,e)})(e)}checkValidity(){const t=mt.get(this);if(Rt(t,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const e=ft.get(this);if(!e.valid){const e=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});t.dispatchEvent(e)}return e.valid}get form(){const t=mt.get(this);let e;return Rt(t,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element."),!0===t.constructor.formAssociated&&(e=Ht(t)),e}get labels(){const t=mt.get(this);Rt(t,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const e=t.getAttribute("id"),r=t.getRootNode();return r&&e?r.querySelectorAll(`[for="${e}"]`):[]}reportValidity(){const t=mt.get(this);if(Rt(t,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const e=this.checkValidity(),r=Mt.get(this);if(r&&!t.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!e&&r&&(t.focus(),r.focus()),e}setFormValue(t){const e=mt.get(this);Rt(e,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Ct(this),null==t||t instanceof FormData?null!=t&&t instanceof FormData&&Array.from(t).reverse().forEach((([t,r])=>{if("string"==typeof r){const a=St(e,this);a.name=t,a.value=r}})):e.getAttribute("name")&&(St(e,this).value=t),vt.set(e,t)}setValidity(t,e,r){const a=mt.get(this);if(Rt(a,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!t)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");Mt.set(this,r);const i=ft.get(this),o={};for(const e in t)o[e]=t[e];0===Object.keys(o).length&&(t=>{t.badInput=!1,t.customError=!1,t.patternMismatch=!1,t.rangeOverflow=!1,t.rangeUnderflow=!1,t.stepMismatch=!1,t.tooLong=!1,t.tooShort=!1,t.typeMismatch=!1,t.valid=!0,t.valueMissing=!1})(i);const n={...i,...o};delete n.valid;const{valid:s}=((t,e,r)=>(t.valid=(t=>{let e=!0;for(let r in t)"valid"!==r&&!1!==t[r]&&(e=!1);return e})(e),Object.keys(e).forEach((r=>t[r]=e[r])),r&&Vt(r),t))(i,n,this.form);if(!s&&!e)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");wt.set(this,s?"":e),a.isConnected?(a.toggleAttribute("internals-invalid",!s),a.toggleAttribute("internals-valid",s),kt(a,"aria-invalid",""+!s)):Ft.set(a,this)}get shadowRoot(){const t=mt.get(this);return Et.get(t)||null}get validationMessage(){const t=mt.get(this);return Rt(t,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),wt.get(this)}get validity(){const t=mt.get(this);return Rt(t,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),ft.get(this)}get willValidate(){const t=mt.get(this);return Rt(t,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(t.matches(":disabled")||t.disabled||t.hasAttribute("disabled")||t.hasAttribute("readonly"))}}let ie=!1,oe=!1;function ne(t){oe||(oe=!0,window.CustomStateSet=Zt,t&&(HTMLElement.prototype.attachInternals=function(...e){const r=t.call(this,e);return r.states=new Zt(this),r}))}function se(t,e=window){e.CuraInit=t}function le(t){return(new ct).loadVarsSSR(t)}!!customElements.polyfillWrapFlushCallback||(function(){if("undefined"==typeof window||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class t extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const e="element-internals-feature-detection-"+Math.random().toString(36).replace(/[^a-z]+/g,"");customElements.define(e,t);const r=new t;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every((t=>t in r.internals))}()?"undefined"==typeof window||window.CustomStateSet||ne(HTMLElement.prototype.attachInternals):function(t=!0){let e=!1;if(!ie){if(ie=!0,"undefined"!=typeof window&&(window.ElementInternals=ae),"undefined"!=typeof CustomElementRegistry){const r=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(t,a,i){if(a.formAssociated){const t=a.prototype.connectedCallback;a.prototype.connectedCallback=function(){xt.has(this)||(xt.set(this,!0),this.hasAttribute("disabled")&&Ot(this,!0)),null!=t&&t.apply(this),e=Nt(this)}}r.call(this,t,a,i)}}if("undefined"!=typeof HTMLElement&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(-1===this.tagName.indexOf("-"))throw Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");if(pt.has(this)&&!e)throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new ae(this)}),"undefined"!=typeof Element){function a(...t){const e=i.apply(this,t);if(Et.set(this,e),Pt()){const t=new MutationObserver(Jt);window.ShadyDOM?t.observe(this,Gt):t.observe(e,Gt),yt.set(this,t)}return e}const i=Element.prototype.attachShadow;Element.prototype.attachShadow=a}Pt()&&"undefined"!=typeof document&&new MutationObserver(Jt).observe(document.documentElement,Gt),"undefined"!=typeof HTMLFormElement&&function(){const t=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=function(...e){let r=t.apply(this,e);return At(this,r,"checkValidity")};const e=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=function(...t){let r=e.apply(this,t);return At(this,r,"reportValidity")};const{get:r}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...t){const e=r.call(this,...t),a=Array.from(gt.get(this)||[]);if(0===a.length)return e;const i=Array.from(e).concat(a).sort(((t,e)=>t.compareDocumentPosition?2&t.compareDocumentPosition(e)?1:-1:0));return new re(i)}})}(),(t||"undefined"!=typeof window&&!window.CustomStateSet)&&ne()}}(!1)),dt();const ce=t=>{"undefined"!=typeof customElements&&[u,d,m,p,w,b,y,v,j,E,M,T,x,F,k,O,C,S,I,V,L,$,W,D,H,R,A,N,P,B,z,_,q,U,J,X,G,K,Q,Y,Z,tt,et,rt,at].forEach((e=>{customElements.get(l(e.is))||customElements.define(l(e.is),e,t)}))};export{se as CuraInit,le as InitVarsTheme,ce as defineCustomElements}
@@ -0,0 +1 @@
1
+ const n={color:{success:{100:"223,246,233",300:"148,225,181",500:"95,210,144",700:"49,115,77",900:"19,42,29"},info:{100:"207,226,255",300:"149,191,255",500:"110,168,255",700:"66,100,153",900:"37,56,85"},error:{100:"251,221,221",300:"242,143,143",500:"206,42,42",700:"157,58,58",900:"47,17,17"},warning:{100:"252,250,196",300:"248,244,137",500:"245,239,78",700:"108,106,32",900:"49,48,16"},whatsapp:{100:"182,240,204",300:"110,226,153",500:"37,211,102",700:"25,141,68",900:"7,42,20"},neutral:{0:"255,255,255",100:"246,246,246",200:"233,233,233",300:"226,226,226",400:"212,212,212",500:"183,183,183",600:"146,146,146",700:"110,110,110",800:"74,74,74",900:"38,38,38"}},breakpoints:{xsmall:{min:0,max:480},small:{min:481,max:768},medium:{min:769,max:992},large:{min:993,max:1920},xlarge:{min:1921,max:4096}}};function o(){return(null===window||void 0===window?void 0:window.innerWidth)<n.breakpoints.medium.min}function a(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.userAgent)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function i(n){if(!o()||!a())return null;const i=document.createElement("input");return i.setAttribute("type","text"),i.style.position="absolute",i.style.opacity="0",i.style.height="0",i.style.fontSize="16px",n.prepend(i),i.focus(),i}function t(){document.body.classList.add("cura-body-scroll-lock")}function r(){document.body.classList.contains("cura-body-scroll-lock")&&document.body.classList.remove("cura-body-scroll-lock")}export{n as S,t as a,a as b,o as c,i as f,r}