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

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 (153) hide show
  1. package/dist/cjs/cura-accordion_22.cjs.entry.js +55 -20
  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-loader-bar.cjs.entry.js +1 -1
  8. package/dist/cjs/cura-modal.cjs.entry.js +1 -1
  9. package/dist/cjs/cura-progress-bar_2.cjs.entry.js +2 -2
  10. package/dist/cjs/cura-radio.cjs.entry.js +1 -1
  11. package/dist/cjs/cura-stepper.cjs.entry.js +1 -1
  12. package/dist/cjs/cura-switch.cjs.entry.js +1 -1
  13. package/dist/cjs/cura-tabs-button.cjs.entry.js +1 -1
  14. package/dist/cjs/cura-tabs-transparent.cjs.entry.js +1 -1
  15. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  16. package/dist/cjs/cura-tooltip.cjs.entry.js +1 -1
  17. package/dist/cjs/cura.cjs.js +1 -1
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/components/cura-calendar/cura-calendar.css +13 -1
  20. package/dist/collection/components/cura-calendar/cura-calendar.js +91 -3
  21. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +29 -1
  22. package/dist/collection/components/cura-calendar/cura-calendar.type.js +1 -0
  23. package/dist/collection/components/cura-card/cura-card.js +1 -1
  24. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-category/cura-dropdown-search-category.js +1 -1
  25. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js +1 -1
  26. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +1 -1
  27. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +1 -1
  28. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  29. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  30. package/dist/collection/components/cura-modal/cura-modal.js +1 -1
  31. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  32. package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +1 -1
  33. package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +1 -1
  34. package/dist/collection/components/cura-stepper/cura-stepper.js +1 -1
  35. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  36. package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
  37. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  38. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
  39. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  40. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  41. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  42. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  43. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  44. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  45. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  46. package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +1 -1
  47. package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +1 -1
  48. package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +1 -1
  49. package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +1 -1
  50. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  51. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  52. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  53. package/dist/components/cura-accordion-item.js +1 -1
  54. package/dist/components/cura-alert.js +1 -1
  55. package/dist/components/cura-badge-counter.js +1 -1
  56. package/dist/components/cura-badge-distance.js +1 -1
  57. package/dist/components/cura-badge-pill.js +1 -1
  58. package/dist/components/cura-button-outline.js +1 -1
  59. package/dist/components/cura-button-select.js +1 -1
  60. package/dist/components/cura-button-transparent.js +1 -1
  61. package/dist/components/cura-button.js +1 -1
  62. package/dist/components/cura-calendar.js +1 -1
  63. package/dist/components/cura-card.js +1 -1
  64. package/dist/components/cura-checkbox.js +1 -1
  65. package/dist/components/cura-display.js +1 -1
  66. package/dist/components/cura-dropdown-search-category.js +1 -1
  67. package/dist/components/cura-dropdown-search-not-found.js +1 -1
  68. package/dist/components/cura-dropdown-search-option.js +1 -1
  69. package/dist/components/cura-dropdown-search.js +1 -1
  70. package/dist/components/cura-heading.js +1 -1
  71. package/dist/components/cura-icon.js +1 -1
  72. package/dist/components/cura-icons-view.js +1 -1
  73. package/dist/components/cura-input-date.js +1 -1
  74. package/dist/components/cura-input-text.js +1 -1
  75. package/dist/components/cura-label.js +1 -1
  76. package/dist/components/cura-loader-bar.js +1 -1
  77. package/dist/components/cura-loader-circle.js +1 -1
  78. package/dist/components/cura-modal.js +1 -1
  79. package/dist/components/cura-page-template.js +1 -1
  80. package/dist/components/cura-paragraph.js +1 -1
  81. package/dist/components/cura-progress-bar.js +1 -1
  82. package/dist/components/cura-radio.js +1 -1
  83. package/dist/components/cura-select-option.js +1 -1
  84. package/dist/components/cura-select.js +1 -1
  85. package/dist/components/cura-stepper-item.js +1 -1
  86. package/dist/components/cura-stepper.js +1 -1
  87. package/dist/components/cura-switch.js +1 -1
  88. package/dist/components/cura-tabs-button.js +1 -1
  89. package/dist/components/cura-tabs-group.js +1 -1
  90. package/dist/components/cura-tabs-transparent.js +1 -1
  91. package/dist/components/cura-tabs.js +1 -1
  92. package/dist/components/cura-toast.js +1 -1
  93. package/dist/components/cura-tooltip.js +1 -1
  94. package/dist/components/index.js +1 -1
  95. package/dist/components/{p-B2RN7oe_.js → p-BBtCzdwH.js} +1 -1
  96. package/dist/components/{p-fR02COZb.js → p-BFGkepgq.js} +1 -1
  97. package/dist/components/{p-CCkEqDZb.js → p-BGBnVlL3.js} +1 -1
  98. package/dist/components/{p-B8xnU6YS.js → p-BJafC0R3.js} +1 -1
  99. package/dist/components/{p-BYA8glxD.js → p-BOQ-9WHP.js} +1 -1
  100. package/dist/components/{p-DXlGQp3a.js → p-BXFxWVl3.js} +1 -1
  101. package/dist/components/{p-D7WNwjv-.js → p-Bac-rr_f.js} +1 -1
  102. package/dist/components/{p-C7so9xnO.js → p-BmMvoH-m.js} +1 -1
  103. package/dist/components/p-CalvBU-U.js +1 -0
  104. package/dist/components/{p-BSdkRryc.js → p-Cm1Vfoc6.js} +1 -1
  105. package/dist/components/{p-fn4zJrKE.js → p-DI66_jP6.js} +1 -1
  106. package/dist/components/{p-D6xuYQiO.js → p-DbZtk_CM.js} +1 -1
  107. package/dist/components/{p-DxJedO3K.js → p-I4AXUk2V.js} +1 -1
  108. package/dist/components/{p-C05r6CQV.js → p-Oyg5hynZ.js} +1 -1
  109. package/dist/components/p-nqT7t82E.js +1 -0
  110. package/dist/cura/cura.esm.js +1 -1
  111. package/dist/cura/{p-b14ae206.entry.js → p-04b5c710.entry.js} +1 -1
  112. package/dist/cura/{p-bf99e8bf.entry.js → p-18a1cadf.entry.js} +1 -1
  113. package/dist/cura/{p-2e2e2b4d.entry.js → p-1ecb2249.entry.js} +1 -1
  114. package/dist/cura/{p-b7369d04.entry.js → p-2572a4f9.entry.js} +1 -1
  115. package/dist/cura/{p-42e72d12.entry.js → p-604f1c1d.entry.js} +1 -1
  116. package/dist/cura/{p-ddf4d240.entry.js → p-71fffffa.entry.js} +1 -1
  117. package/dist/cura/{p-c247c93b.entry.js → p-8b29b763.entry.js} +1 -1
  118. package/dist/cura/{p-9de85de6.entry.js → p-906c8b66.entry.js} +1 -1
  119. package/dist/cura/{p-7965fe63.entry.js → p-a5c4849c.entry.js} +1 -1
  120. package/dist/cura/{p-3a3202f0.entry.js → p-a72db13d.entry.js} +1 -1
  121. package/dist/cura/{p-f911a6c5.entry.js → p-b447fca2.entry.js} +1 -1
  122. package/dist/cura/p-c287c69e.entry.js +1 -0
  123. package/dist/cura/{p-c18d7f16.entry.js → p-c987ddde.entry.js} +1 -1
  124. package/dist/cura/{p-1dc9c478.entry.js → p-f072b011.entry.js} +1 -1
  125. package/dist/cura/{p-5357f7bd.entry.js → p-f407bd73.entry.js} +1 -1
  126. package/dist/cura/p-f638eda8.entry.js +1 -0
  127. package/dist/esm/cura-accordion_22.entry.js +55 -20
  128. package/dist/esm/cura-checkbox.entry.js +1 -1
  129. package/dist/esm/cura-display.entry.js +1 -1
  130. package/dist/esm/cura-dropdown-search-not-found.entry.js +1 -1
  131. package/dist/esm/cura-icons-view.entry.js +1 -1
  132. package/dist/esm/cura-input-date.entry.js +1 -1
  133. package/dist/esm/cura-loader-bar.entry.js +1 -1
  134. package/dist/esm/cura-modal.entry.js +1 -1
  135. package/dist/esm/cura-progress-bar_2.entry.js +2 -2
  136. package/dist/esm/cura-radio.entry.js +1 -1
  137. package/dist/esm/cura-stepper.entry.js +1 -1
  138. package/dist/esm/cura-switch.entry.js +1 -1
  139. package/dist/esm/cura-tabs-button.entry.js +1 -1
  140. package/dist/esm/cura-tabs-transparent.entry.js +1 -1
  141. package/dist/esm/cura-toast.entry.js +1 -1
  142. package/dist/esm/cura-tooltip.entry.js +1 -1
  143. package/dist/esm/cura.js +1 -1
  144. package/dist/esm/loader.js +1 -1
  145. package/dist/types/components/cura-calendar/cura-calendar.d.ts +21 -0
  146. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +29 -0
  147. package/dist/types/components/cura-calendar/cura-calendar.type.d.ts +4 -0
  148. package/dist/types/components.d.ts +22 -0
  149. package/package.json +2 -2
  150. package/dist/components/p-Bf21UQXV.js +0 -1
  151. package/dist/components/p-CG1lz5DR.js +0 -1
  152. package/dist/cura/p-47fdb124.entry.js +0 -1
  153. package/dist/cura/p-cbe8c690.entry.js +0 -1
@@ -1 +1 @@
1
- import{p as e,H as r,k as a,i as s,j as t,t as o}from"./p-DBXUEjWh.js";import{f as c}from"./p-Dot54hbB.js";import{d as i}from"./p-fn4zJrKE.js";import{d as n}from"./p-BSdkRryc.js";import{d as l}from"./p-D7WNwjv-.js";const b=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.onchange=a(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.indeterminate=!1,this.status="default",this.disabled=!1,this.required=!1,this.ontabindex=0,this.position="left",this.size="medium",this.background="light",this.iconColor="dark",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.isDarkBackground=()=>"dark"===this.background,this.isDarkIconColor=()=>"dark"===this.iconColor,this.handleClick=()=>{this.disabled||(this.indeterminate=!1,this.checked=!this.checked,this.internals.setFormValue(this.value),this.onchange.emit({value:this.value,checked:this.checked,indeterminate:this.indeterminate}))}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size":c[this.size].size+"px","--gap":c[this.size].gap+"px"})}setColors(){[{name:"--color-base",background:this.color+"-base"},{name:"--color-lighter",background:this.color+"-lighter"},{name:"--color-light",background:this.color+"-light"},{name:"--color-dark",background:this.color+"-dark"},{name:"--info-base",background:"info-base"},{name:"--error-base",background:"error-base"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--success-dark",background:"success-dark"},{name:"--error-lighter",background:"error-lighter"},{name:"--neutral-black",background:"neutral-black"},{name:"--primary-base-neutral-white",background:this.isDarkBackground()?"primary-base":"neutral-white"},{name:"--neutral-base-neutral-medium",background:this.isDarkBackground()?"neutral-base":"neutral-medium"},{name:"--neutral-black-neutral-purewhite",background:this.isDarkBackground()?"neutral-black":"neutral-purewhite"},{name:"--neutral-black-neutral-white",background:this.isDarkBackground()?"neutral-black":"neutral-white"},{name:"--neutral-darker-neutral-base",background:this.isDarkBackground()?"neutral-darker":"neutral-base"},{name:"--neutral-base-neutral-base",background:this.isDarkBackground()?"primary-base":"neutral-base"},{name:"--neutral-purewhite-neutral-dark",background:this.isDarkBackground()?"neutral-purewhite":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkBackground()?"primary-base":"neutral-medium"},{name:"--success-base-lighter",background:this.isDarkBackground()?"success-base":"success-lighter"},{name:"--success-dark-base",background:this.isDarkBackground()?"success-dark":"success-base"},{name:"--error-base-lighter",background:this.isDarkBackground()?"error-base":"error-lighter"},{name:"--error-dark-base",background:this.isDarkBackground()?"error-dark":"error-base"}].forEach((e=>{this.styles[e.name]=window.CuraAPI.theme.colors.getColor(e.background)})),this.styles=Object.assign({},this.styles)}connectedCallback(){this.sizeHandler(),this.setColors()}formAssociatedCallback(e){e.ariaLabel=this.label}formStateRestoreCallback(e){this.value=e.value,this.checked=e.checked,this.indeterminate=e.indeterminate,this.internals.setFormValue(this.value)}formResetCallback(){this.value="",this.checked=!1,this.indeterminate=!1,this.internals.setValidity({}),this.internals.setFormValue(this.value)}formDisabledCallback(e){this.disabled=e}getClasses(){const e={container:!0};return e.checked=this.checked,e.disabled=this.disabled,e[this.background]=!0,e.indeterminate=this.indeterminate,e.position="right"===this.position,e[this.status]=!0,e}assignColor(e){return this.disabled?(this.isDarkBackground(),"neutral-dark"):{success:{icon:"success-dark",label:this.isDarkBackground()?"success-lighter":"success-darker",message:this.isDarkBackground()?"success-base":"success-dark"},error:{icon:"error-dark",label:this.isDarkBackground()?"error-lighter":"neutral-darker",message:this.isDarkBackground()?"error-base":"error-dark"},default:{icon:this.isDarkIconColor()?"neutral-black":"neutral-purewhite",label:this.isDarkBackground()?"neutral-white":"neutral-black",message:this.isDarkBackground()?"primary-lighter":"neutral-dark"}}[this.status][e]}getIcon(){const e=this.indeterminate?"minus":"check",r=this.assignColor("icon");return s("cura-icon",{class:"icon",name:e,size:"large"===this.size?20:"micro",color:r})}render(){return s(t,{key:"2e951be46f80c67ea87aaf1c613e29ae7a1cc856",role:"checkbox","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},s("div",{key:"341a30934dd6660b03e6be161999fad24fb005ef",class:this.getClasses(),style:this.styles,onClick:this.handleClick},s("div",{key:"58f32f6b047d19b8af2468b6007cf2dfb1297476",class:"info"},s("div",{key:"e23407390368c638e4e8cd9119ad3ccd1767d861",class:"label-wrapper"},s("cura-label",{key:"d7ce7b39441203e9058b0227edbfc75dd320806f",textOverflow:this.overflowLabel,class:"label"+("single"===this.overflowLabel?" textoverflow-single":""),weight:"bold",size:"large"===this.size?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&s("cura-paragraph",{key:"0684b9ab1f517083bc681bd0731aedf6d38c9873",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),s("cura-label",{key:"499419ee720a7c7ba7e42fc8fcebccfb4e0b0c42",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},s("slot",{key:"7c9637fa4a8082f6451851452db1b751218a20ec"}))),s("div",{key:"91b0a1f42d65d72aca24ff8a852d3c6f461a9cb7",class:"checkbox",tabIndex:this.ontabindex},s("input",{key:"4f1db30730b2d68d3d0f3036fd5924a9da1b541b",type:"checkbox",name:this.name,value:this.value,disabled:this.disabled,required:this.required,checked:this.checked,indeterminate:this.indeterminate}),this.getIcon())))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor: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);cursor:pointer}.position.container{flex-direction:row}.position .label-wrapper{justify-content:end}.position .message{text-align:right}.position .label{order:1}.info{display:flex;flex-direction:column;overflow:hidden}.label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}.label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}.control{width:fit-content;cursor:pointer;position:relative}.checkbox{appearance:none;border:2px solid var(--neutral-base-neutral-medium);border-radius:4px;background:var(--neutral-black-neutral-purewhite);flex:1 0;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;box-sizing:border-box;width:var(--size);height:var(--size);flex:0 0 var(--size)}.icon{position:absolute;display:flex;opacity:0;transition:opacity 0.3s}.checkbox:focus{border-color:var(--info-base) !important}.disabled .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base);cursor:not-allowed}.disabled .checkbox:hover{border-color:var(--neutral-darker-neutral-base) !important}.disabled.checked .checkbox,.disabled.indeterminate .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base)}.disabled.checked .checkbox:hover,.disabled.indeterminate .checkbox:hover{border-color:var(--neutral-base-neutral-white);background:var(--primary-base-neutral-white)}.disabled .checkbox:focus{border-color:var(--neutral-darker-neutral-base) !important}.checked .checkbox{border-color:var(--color-dark);background:var(--color-base)}.checked .checkbox:hover{border-color:var(--color-base) !important;background:var(--color-light)}.indeterminate .checkbox{border-color:var(--color-base);background:var(--color-light)}.indeterminate .checkbox:hover{border-color:var(--color-dark) !important;background:var(--color-base)}.checked .icon,.indeterminate .icon{opacity:1}:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover{border-color:var(--neutral-purewhite-neutral-dark)}.success.dark .checkbox{background:var(--neutral-black)}.success .checkbox{border-color:var(--success-base);background:var(--success-lighter)}.success .checkbox:hover{border-color:var(--success-base) !important}.success.checked .checkbox{border-color:var(--success-dark-base);background:var(--success-base-lighter)}.success.checked .checkbox:hover{border-color:var(--success-dark-base)}.error.dark .checkbox{background:var(--neutral-black)}.error .checkbox{border-color:var(--error-base);background:var(--error-lighter)}.error .checkbox:hover{border-color:var(--error-base) !important}.error.checked .checkbox{border-color:var(--error-dark-base);background:var(--error-base-lighter)}.error.checked .checkbox:hover{border-color:var(--error-dark-base)}input{appearance:none;-webkit-appearance:none;-moz-appearance:none}'}},[321,"cura-checkbox",{checked:[1540],indeterminate:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],size:[513],background:[1],iconColor:[1,"icon-color"],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor:0}]}]),h=b,d=function(){"undefined"!=typeof customElements&&["cura-checkbox","cura-icon","cura-label","cura-paragraph"].forEach((e=>{switch(e){case"cura-checkbox":customElements.get(o(e))||customElements.define(o(e),b);break;case"cura-icon":customElements.get(o(e))||i();break;case"cura-label":customElements.get(o(e))||n();break;case"cura-paragraph":customElements.get(o(e))||l()}}))};export{h as CuraCheckbox,d as defineCustomElement}
1
+ import{p as e,H as r,k as a,i as s,j as t,t as o}from"./p-DBXUEjWh.js";import{f as c}from"./p-Dot54hbB.js";import{d as i}from"./p-DI66_jP6.js";import{d as n}from"./p-Cm1Vfoc6.js";import{d as l}from"./p-Bac-rr_f.js";const h=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.onchange=a(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.indeterminate=!1,this.status="default",this.disabled=!1,this.required=!1,this.ontabindex=0,this.position="left",this.size="medium",this.background="light",this.iconColor="dark",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.isDarkBackground=()=>"dark"===this.background,this.isDarkIconColor=()=>"dark"===this.iconColor,this.handleClick=()=>{this.disabled||(this.indeterminate=!1,this.checked=!this.checked,this.internals.setFormValue(this.value),this.onchange.emit({value:this.value,checked:this.checked,indeterminate:this.indeterminate}))}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size":c[this.size].size+"px","--gap":c[this.size].gap+"px"})}setColors(){[{name:"--color-base",background:this.color+"-base"},{name:"--color-lighter",background:this.color+"-lighter"},{name:"--color-light",background:this.color+"-light"},{name:"--color-dark",background:this.color+"-dark"},{name:"--info-base",background:"info-base"},{name:"--error-base",background:"error-base"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--success-dark",background:"success-dark"},{name:"--error-lighter",background:"error-lighter"},{name:"--neutral-black",background:"neutral-black"},{name:"--primary-base-neutral-white",background:this.isDarkBackground()?"primary-base":"neutral-white"},{name:"--neutral-base-neutral-medium",background:this.isDarkBackground()?"neutral-base":"neutral-medium"},{name:"--neutral-black-neutral-purewhite",background:this.isDarkBackground()?"neutral-black":"neutral-purewhite"},{name:"--neutral-black-neutral-white",background:this.isDarkBackground()?"neutral-black":"neutral-white"},{name:"--neutral-darker-neutral-base",background:this.isDarkBackground()?"neutral-darker":"neutral-base"},{name:"--neutral-base-neutral-base",background:this.isDarkBackground()?"primary-base":"neutral-base"},{name:"--neutral-purewhite-neutral-dark",background:this.isDarkBackground()?"neutral-purewhite":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkBackground()?"primary-base":"neutral-medium"},{name:"--success-base-lighter",background:this.isDarkBackground()?"success-base":"success-lighter"},{name:"--success-dark-base",background:this.isDarkBackground()?"success-dark":"success-base"},{name:"--error-base-lighter",background:this.isDarkBackground()?"error-base":"error-lighter"},{name:"--error-dark-base",background:this.isDarkBackground()?"error-dark":"error-base"}].forEach((e=>{this.styles[e.name]=window.CuraAPI.theme.colors.getColor(e.background)})),this.styles=Object.assign({},this.styles)}connectedCallback(){this.sizeHandler(),this.setColors()}formAssociatedCallback(e){e.ariaLabel=this.label}formStateRestoreCallback(e){this.value=e.value,this.checked=e.checked,this.indeterminate=e.indeterminate,this.internals.setFormValue(this.value)}formResetCallback(){this.value="",this.checked=!1,this.indeterminate=!1,this.internals.setValidity({}),this.internals.setFormValue(this.value)}formDisabledCallback(e){this.disabled=e}getClasses(){const e={container:!0};return e.checked=this.checked,e.disabled=this.disabled,e[this.background]=!0,e.indeterminate=this.indeterminate,e.position="right"===this.position,e[this.status]=!0,e}assignColor(e){return this.disabled?(this.isDarkBackground(),"neutral-dark"):{success:{icon:"success-dark",label:this.isDarkBackground()?"success-lighter":"success-darker",message:this.isDarkBackground()?"success-base":"success-dark"},error:{icon:"error-dark",label:this.isDarkBackground()?"error-lighter":"neutral-darker",message:this.isDarkBackground()?"error-base":"error-dark"},default:{icon:this.isDarkIconColor()?"neutral-black":"neutral-purewhite",label:this.isDarkBackground()?"neutral-white":"neutral-black",message:this.isDarkBackground()?"primary-lighter":"neutral-dark"}}[this.status][e]}getIcon(){const e=this.indeterminate?"minus":"check",r=this.assignColor("icon");return s("cura-icon",{class:"icon",name:e,size:"large"===this.size?20:"micro",color:r})}render(){return s(t,{key:"9236b8f9d487c042e00800a624e1b729e36b296d",role:"checkbox","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},s("div",{key:"4472e8ee4fa4d1ea6c6f4cf9ba347acc66f7df2a",class:this.getClasses(),style:this.styles,onClick:this.handleClick},s("div",{key:"1c74e35fbfbcfcbe113edcd5522e674d197b2212",class:"info"},s("div",{key:"75e7fdf6050f38473379fb3e4a5880f9eb34e88e",class:"label-wrapper"},s("cura-label",{key:"eeac634dd87a72922c0d89e1877d0e0b132e6cd9",textOverflow:this.overflowLabel,class:"label"+("single"===this.overflowLabel?" textoverflow-single":""),weight:"bold",size:"large"===this.size?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&s("cura-paragraph",{key:"7d590fd046c2ba90dbef7846f51a774d50418ca7",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),s("cura-label",{key:"f7c750b3d3ce6afaaba514ac835ceed38674a048",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},s("slot",{key:"d83d9f24b5a5274233e61256add788bfa2ee0f92"}))),s("div",{key:"3f67839bbbf8a583d41765a2a6450c71f5063066",class:"checkbox",tabIndex:this.ontabindex},s("input",{key:"ab742442fc98838433f6db949478bef6ee2e0d45",type:"checkbox",name:this.name,value:this.value,disabled:this.disabled,required:this.required,checked:this.checked,indeterminate:this.indeterminate}),this.getIcon())))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor: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);cursor:pointer}.position.container{flex-direction:row}.position .label-wrapper{justify-content:end}.position .message{text-align:right}.position .label{order:1}.info{display:flex;flex-direction:column;overflow:hidden}.label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}.label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}.control{width:fit-content;cursor:pointer;position:relative}.checkbox{appearance:none;border:2px solid var(--neutral-base-neutral-medium);border-radius:4px;background:var(--neutral-black-neutral-purewhite);flex:1 0;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;box-sizing:border-box;width:var(--size);height:var(--size);flex:0 0 var(--size)}.icon{position:absolute;display:flex;opacity:0;transition:opacity 0.3s}.checkbox:focus{border-color:var(--info-base) !important}.disabled .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base);cursor:not-allowed}.disabled .checkbox:hover{border-color:var(--neutral-darker-neutral-base) !important}.disabled.checked .checkbox,.disabled.indeterminate .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base)}.disabled.checked .checkbox:hover,.disabled.indeterminate .checkbox:hover{border-color:var(--neutral-base-neutral-white);background:var(--primary-base-neutral-white)}.disabled .checkbox:focus{border-color:var(--neutral-darker-neutral-base) !important}.checked .checkbox{border-color:var(--color-dark);background:var(--color-base)}.checked .checkbox:hover{border-color:var(--color-base) !important;background:var(--color-light)}.indeterminate .checkbox{border-color:var(--color-base);background:var(--color-light)}.indeterminate .checkbox:hover{border-color:var(--color-dark) !important;background:var(--color-base)}.checked .icon,.indeterminate .icon{opacity:1}:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover{border-color:var(--neutral-purewhite-neutral-dark)}.success.dark .checkbox{background:var(--neutral-black)}.success .checkbox{border-color:var(--success-base);background:var(--success-lighter)}.success .checkbox:hover{border-color:var(--success-base) !important}.success.checked .checkbox{border-color:var(--success-dark-base);background:var(--success-base-lighter)}.success.checked .checkbox:hover{border-color:var(--success-dark-base)}.error.dark .checkbox{background:var(--neutral-black)}.error .checkbox{border-color:var(--error-base);background:var(--error-lighter)}.error .checkbox:hover{border-color:var(--error-base) !important}.error.checked .checkbox{border-color:var(--error-dark-base);background:var(--error-base-lighter)}.error.checked .checkbox:hover{border-color:var(--error-dark-base)}input{appearance:none;-webkit-appearance:none;-moz-appearance:none}'}},[321,"cura-checkbox",{checked:[1540],indeterminate:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],size:[513],background:[1],iconColor:[1,"icon-color"],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor:0}]}]),b=h,d=function(){"undefined"!=typeof customElements&&["cura-checkbox","cura-icon","cura-label","cura-paragraph"].forEach((e=>{switch(e){case"cura-checkbox":customElements.get(o(e))||customElements.define(o(e),h);break;case"cura-icon":customElements.get(o(e))||i();break;case"cura-label":customElements.get(o(e))||n();break;case"cura-paragraph":customElements.get(o(e))||l()}}))};export{b as CuraCheckbox,d as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as s,i as o,j as h,t as l}from"./p-DBXUEjWh.js";const e=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.level=1,this.size="large",this.spotColor="accent-dark",this.marginBlock="1.25em",this.lineHeight="120%",this.theme=window.CuraAPI.theme,this.styles={}}handleChangeColor(){this.setColors()}connectedCallback(){this.setFontProperties(),this.setColors()}setFontProperties(){this.weights=this.theme.fonts.getWeights(),this.fontSizeBase=this.theme.fonts.getSize(),this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("display"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-bold":this.weights.bold,"--font-weight-medium":this.weights.medium}}hostCSSProperties(){return{"--margin-block":this.marginBlock,"--font-size-base":this.fontSizeBase,"--line-height":this.lineHeight}}setColors(){const t=this.color?this.theme.colors.getColor(this.color):this.theme.fonts.getColor();this.styles=Object.assign(Object.assign({},this.styles),{"--color-body":t||this.theme.colors.getColor("neutral-darker"),"--color-link":this.theme.colors.getColor(""+this.spotColor)})}getClasses(){var t;const s={};return s[""+(null===(t=this.size)||void 0===t?void 0:t.toLowerCase())]=!0,s}getHeadingTag(){const t=this.getClasses(),s={1:o("h1",{style:this.styles,class:t},o("slot",null)),2:o("h2",{style:this.styles,class:t},o("slot",null)),3:o("h3",{style:this.styles,class:t},o("slot",null)),4:o("h4",{style:this.styles,class:t},o("slot",null)),5:o("h5",{style:this.styles,class:t},o("slot",null)),6:o("h6",{style:this.styles,class:t},o("slot",null)),default:o("h1",{style:this.styles,class:t},o("slot",null))};return s[""+this.level]||s.default}render(){return o(h,{key:"264f7e93aac5ecb7a775c6e505f230518e3959f4",style:this.hostCSSProperties(),role:"heading","aria-level":this.level},this.getHeadingTag())}get host(){return this}static get watchers(){return{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}}static get style(){return":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:3em;font-weight:var(--font-weight-bold);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.2857142857em;letter-spacing:-1.68px}:host h1 ::slotted(b),:host h1 ::slotted(strong),:host h2 ::slotted(b),:host h2 ::slotted(strong),:host h3 ::slotted(b),:host h3 ::slotted(strong),:host h4 ::slotted(b),:host h4 ::slotted(strong),:host h5 ::slotted(b),:host h5 ::slotted(strong),:host h6 ::slotted(b),:host h6 ::slotted(strong){font-weight:var(--font-weight-bold)}:host h1 ::slotted(a),:host h2 ::slotted(a),:host h3 ::slotted(a),:host h4 ::slotted(a),:host h5 ::slotted(a),:host h6 ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host h1 ::slotted(u),:host h2 ::slotted(u),:host h3 ::slotted(u),:host h4 ::slotted(u),:host h5 ::slotted(u),:host h6 ::slotted(u){text-underline-offset:10%}:host h1 ::slotted(i),:host h1 ::slotted(em),:host h2 ::slotted(i),:host h2 ::slotted(em),:host h3 ::slotted(i),:host h3 ::slotted(em),:host h4 ::slotted(i),:host h4 ::slotted(em),:host h5 ::slotted(i),:host h5 ::slotted(em),:host h6 ::slotted(i),:host h6 ::slotted(em){font-style:italic;font-weight:var(--font-weight-medium)}:host h1 ::slotted(abbr),:host h2 ::slotted(abbr),:host h3 ::slotted(abbr),:host h4 ::slotted(abbr),:host h5 ::slotted(abbr),:host h6 ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:3.429em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.8571428571em;letter-spacing:-1.92px}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.286em;line-height:calc(var(--line-height) + 5%)}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.5714285714em;letter-spacing:-1.2px}}"}},[257,"cura-display",{level:[514],size:[513],spotColor:[1,"spot-color"],color:[1],marginBlock:[513,"margin-block"],lineHeight:[513,"line-height"],styles:[32]},void 0,{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}]),i=e,a=function(){"undefined"!=typeof customElements&&["cura-display"].forEach((t=>{"cura-display"===t&&(customElements.get(l(t))||customElements.define(l(t),e))}))};export{i as CuraDisplay,a as defineCustomElement}
1
+ import{p as t,H as s,i as o,j as h,t as l}from"./p-DBXUEjWh.js";const e=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.level=1,this.size="large",this.spotColor="accent-dark",this.marginBlock="1.25em",this.lineHeight="120%",this.theme=window.CuraAPI.theme,this.styles={}}handleChangeColor(){this.setColors()}connectedCallback(){this.setFontProperties(),this.setColors()}setFontProperties(){this.weights=this.theme.fonts.getWeights(),this.fontSizeBase=this.theme.fonts.getSize(),this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("display"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-bold":this.weights.bold,"--font-weight-medium":this.weights.medium}}hostCSSProperties(){return{"--margin-block":this.marginBlock,"--font-size-base":this.fontSizeBase,"--line-height":this.lineHeight}}setColors(){const t=this.color?this.theme.colors.getColor(this.color):this.theme.fonts.getColor();this.styles=Object.assign(Object.assign({},this.styles),{"--color-body":t||this.theme.colors.getColor("neutral-darker"),"--color-link":this.theme.colors.getColor(""+this.spotColor)})}getClasses(){var t;const s={};return s[""+(null===(t=this.size)||void 0===t?void 0:t.toLowerCase())]=!0,s}getHeadingTag(){const t=this.getClasses(),s={1:o("h1",{style:this.styles,class:t},o("slot",null)),2:o("h2",{style:this.styles,class:t},o("slot",null)),3:o("h3",{style:this.styles,class:t},o("slot",null)),4:o("h4",{style:this.styles,class:t},o("slot",null)),5:o("h5",{style:this.styles,class:t},o("slot",null)),6:o("h6",{style:this.styles,class:t},o("slot",null)),default:o("h1",{style:this.styles,class:t},o("slot",null))};return s[""+this.level]||s.default}render(){return o(h,{key:"343caf7e121561a5339ea553ccadb8aeed553c37",style:this.hostCSSProperties(),role:"heading","aria-level":this.level},this.getHeadingTag())}get host(){return this}static get watchers(){return{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}}static get style(){return":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:3em;font-weight:var(--font-weight-bold);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.2857142857em;letter-spacing:-1.68px}:host h1 ::slotted(b),:host h1 ::slotted(strong),:host h2 ::slotted(b),:host h2 ::slotted(strong),:host h3 ::slotted(b),:host h3 ::slotted(strong),:host h4 ::slotted(b),:host h4 ::slotted(strong),:host h5 ::slotted(b),:host h5 ::slotted(strong),:host h6 ::slotted(b),:host h6 ::slotted(strong){font-weight:var(--font-weight-bold)}:host h1 ::slotted(a),:host h2 ::slotted(a),:host h3 ::slotted(a),:host h4 ::slotted(a),:host h5 ::slotted(a),:host h6 ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host h1 ::slotted(u),:host h2 ::slotted(u),:host h3 ::slotted(u),:host h4 ::slotted(u),:host h5 ::slotted(u),:host h6 ::slotted(u){text-underline-offset:10%}:host h1 ::slotted(i),:host h1 ::slotted(em),:host h2 ::slotted(i),:host h2 ::slotted(em),:host h3 ::slotted(i),:host h3 ::slotted(em),:host h4 ::slotted(i),:host h4 ::slotted(em),:host h5 ::slotted(i),:host h5 ::slotted(em),:host h6 ::slotted(i),:host h6 ::slotted(em){font-style:italic;font-weight:var(--font-weight-medium)}:host h1 ::slotted(abbr),:host h2 ::slotted(abbr),:host h3 ::slotted(abbr),:host h4 ::slotted(abbr),:host h5 ::slotted(abbr),:host h6 ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:3.429em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.8571428571em;letter-spacing:-1.92px}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.286em;line-height:calc(var(--line-height) + 5%)}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.5714285714em;letter-spacing:-1.2px}}"}},[257,"cura-display",{level:[514],size:[513],spotColor:[1,"spot-color"],color:[1],marginBlock:[513,"margin-block"],lineHeight:[513,"line-height"],styles:[32]},void 0,{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}]),i=e,a=function(){"undefined"!=typeof customElements&&["cura-display"].forEach((t=>{"cura-display"===t&&(customElements.get(l(t))||customElements.define(l(t),e))}))};export{i as CuraDisplay,a as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as a,i as t,j as o,t as r}from"./p-DBXUEjWh.js";import{d as s}from"./p-fR02COZb.js";const c=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.styles={"--neutral-light":this.theme.colors.getColor("neutral-light")}}render(){return t(o,{key:"511391a8c6c1c998b04e3093838173ae76549715"},t("div",{key:"63da720bb3d2cc354ef5f1e9ceaf0f2f9c396f4e",class:"component-container",style:this.styles},t("cura-heading",{key:"ba003607e581d4abaf2e6d617f94e3174d04a4b3",size:"xsmall",weight:"bold",color:"neutral-dark",marginBlock:"0",lineHeight:"1em"},t("slot",{key:"80b14ff99b42a64082895db81b4dbe78cd7545a3"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);padding:calc(var(--cura-spacing-base) * 3px) 0}:host(:last-child) .component-container{border-bottom:none !important}"}},[257,"cura-dropdown-search-category"]),n=c,i=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-category","cura-heading"].forEach((e=>{switch(e){case"cura-dropdown-search-category":customElements.get(r(e))||customElements.define(r(e),c);break;case"cura-heading":customElements.get(r(e))||s()}}))};export{n as CuraDropdownSearchCategory,i as defineCustomElement}
1
+ import{p as e,H as a,i as t,j as o,t as c}from"./p-DBXUEjWh.js";import{d as r}from"./p-BFGkepgq.js";const s=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.styles={"--neutral-light":this.theme.colors.getColor("neutral-light")}}render(){return t(o,{key:"d80c4ebc3e7edee04eb7e3b405cc11ea1cb65111"},t("div",{key:"af087ac20e0e2075acb87b64573734e16bdd7b62",class:"component-container",style:this.styles},t("cura-heading",{key:"f48f5ca2cd5fdb7b2862ae20e51b3963461db945",size:"xsmall",weight:"bold",color:"neutral-dark",marginBlock:"0",lineHeight:"1em"},t("slot",{key:"13030d0abe5ac052fa3c3a7e04694ecfd7a3ab23"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);padding:calc(var(--cura-spacing-base) * 3px) 0}:host(:last-child) .component-container{border-bottom:none !important}"}},[257,"cura-dropdown-search-category"]),n=s,i=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-category","cura-heading"].forEach((e=>{switch(e){case"cura-dropdown-search-category":customElements.get(c(e))||customElements.define(c(e),s);break;case"cura-heading":customElements.get(c(e))||r()}}))};export{n as CuraDropdownSearchCategory,i as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as o,k as t,i as r,j as s,t as a}from"./p-DBXUEjWh.js";import{d as n}from"./p-fR02COZb.js";const c=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.actionclick=t(this,"actionclick"),this.handleClick=e=>{this.actionclick.emit(),e.preventDefault(),e.stopPropagation()}}render(){return r(s,{key:"899559f0e05394638cd9c6dd61897383453ed176"},r("div",{key:"0b1ed35b82f1df7feac928ab84e08149a38a79a3",class:"component-container",onClick:this.handleClick},r("cura-heading",{key:"49f423b01e6719790bf7f3bcda6f3239042c0c9f",size:"xsmall",weight:"bold",color:"error-dark"},r("slot",{key:"4fbcfb5602729f92f84a22d003d5b2e66e481b6c"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);border-bottom:none;cursor:default}:host .component-container cura-heading{--margin-block:0 !important;flex:1}"}},[257,"cura-dropdown-search-not-found"]),i=c,d=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-not-found","cura-heading"].forEach((e=>{switch(e){case"cura-dropdown-search-not-found":customElements.get(a(e))||customElements.define(a(e),c);break;case"cura-heading":customElements.get(a(e))||n()}}))};export{i as CuraDropdownSearchNotFound,d as defineCustomElement}
1
+ import{p as e,H as o,k as t,i as a,j as r,t as s}from"./p-DBXUEjWh.js";import{d as c}from"./p-BFGkepgq.js";const n=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.actionclick=t(this,"actionclick"),this.handleClick=e=>{this.actionclick.emit(),e.preventDefault(),e.stopPropagation()}}render(){return a(r,{key:"6b57806eb3a2c3be73c76876bfce0062e36a97fa"},a("div",{key:"5a294ef5d53177d439816d881a8d5c90b60b621e",class:"component-container",onClick:this.handleClick},a("cura-heading",{key:"ff92297c1261d69ef9fa8c2b9cdbfee6365b08f2",size:"xsmall",weight:"bold",color:"error-dark"},a("slot",{key:"b84f981ba0cff218b5bf0c94a014c83daaa184ac"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);border-bottom:none;cursor:default}:host .component-container cura-heading{--margin-block:0 !important;flex:1}"}},[257,"cura-dropdown-search-not-found"]),i=n,d=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-not-found","cura-heading"].forEach((e=>{switch(e){case"cura-dropdown-search-not-found":customElements.get(s(e))||customElements.define(s(e),n);break;case"cura-heading":customElements.get(s(e))||c()}}))};export{i as CuraDropdownSearchNotFound,d as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,k as a,i as o,j as r,t as c}from"./p-DBXUEjWh.js";const i=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.actionclick=a(this,"actionclick"),this.selectoption=a(this,"selectoption"),this.selectable=!0,this.selected=!1,this.highlighted=!1,this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.styles={"--neutral-light":this.theme.colors.getColor("neutral-light"),"--neutral-white":this.theme.colors.getColor("neutral-white"),"--neutral-dark":this.theme.colors.getColor("neutral-dark"),"--neutral-black":this.theme.colors.getColor("neutral-black"),"--primary-lighter-50":this.theme.colors.getColor("primary-lighter",.5),"--primary-light":this.theme.colors.getColor("primary-light"),"--primary":this.theme.colors.getColor("primary-base")}}handleSelect(){this.selectable?this.selectoption.emit(this.optionid):this.actionclick.emit()}handleActionsClick(){this.actionclick.emit()}getClasses(){return{"component-container":!0,selected:this.selected,highlighted:this.highlighted,"not-selectable":!this.selectable}}render(){return o(r,{key:"6168a95a628d07878f472c310390bf9c45bd5057"},o("div",{key:"29763282f101a9fbe205c91e7b3c70fa51878e63",class:this.getClasses(),style:this.styles},o("div",{key:"46bd7a250ad866b984e6f4184aa4800e89b741c9",class:"selectable-container",onClick:()=>this.handleSelect()},o("slot",{key:"77088405f3cc4f077e49a4266fb926348774d9e9",name:"image"}),o("div",{key:"96baef2af4ffe7c5ec809a5adbd0512120b6c71c",class:"content"},o("slot",{key:"e41794e8eaff6bfe1516e88e8591ca915eb7ad3f"}))),o("div",{key:"991bca3b0956519b531d576a1738bc3f200cc73f",class:"actions-container",onClick:()=>this.handleActionsClick()},o("slot",{key:"098e8c29ab48ef8e0cfff2a48a31860eafb62487",name:"actions"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);transition:background-color 0.15s linear}:host .component-container:not(.selected):not(.not-selectable):has(.selectable-container:hover),:host .component-container:not(.selected):not(.not-selectable).highlighted{background-color:var(--neutral-white)}:host .selectable-container{flex:1;display:flex;align-items:center;justify-content:flex-start;padding:calc(var(--cura-spacing-base) * 3px) 0;min-height:calc(var(--cura-spacing-base) * 10px);min-width:0;gap:calc(var(--cura-spacing-base) * 1px);cursor:pointer}:host .selectable-container .content{flex:1;align-items:center;justify-content:flex-end;padding-right:calc(var(--cura-spacing-base) * 1px);min-width:0}:host .selectable-container ::slotted(cura-icon){--color:var(--neutral-dark) !important;margin:0 10px}:host .selectable-container ::slotted(cura-avatar){margin:0 calc(var(--cura-spacing-base) * 1px)}:host .selectable-container ::slotted(cura-heading),:host .selectable-container ::slotted(cura-paragraph){--margin-block:0 !important;--color-spot:var(--primary) !important}:host .selectable-container ::slotted(cura-heading){--color-body:var(--neutral-black) !important}:host .selectable-container ::slotted(cura-paragraph){--color-body:var(--neutral-dark) !important}:host .selected{background-color:var(--primary-lighter-50);border-bottom-color:var(--primary-light)}:host .selected .selectable-container{cursor:default}:host .selected .selectable-container ::slotted(cura-icon){--color:var(--primary) !important}:host .selected .selectable-container ::slotted(cura-heading){--color-body:var(--primary) !important}:host .actions-container{display:flex}:host .actions-container ::slotted(*){padding-left:calc(var(--cura-spacing-base) * 1px)}:host .not-selectable .selectable-container{cursor:default}:host(:last-child) .component-container{border-bottom:none !important}"}},[257,"cura-dropdown-search-option",{value:[1],optionid:[1],selectable:[516],selected:[516],highlighted:[516]}]),n=i,s=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-option"].forEach((t=>{"cura-dropdown-search-option"===t&&(customElements.get(c(t))||customElements.define(c(t),i))}))};export{n as CuraDropdownSearchOption,s as defineCustomElement}
1
+ import{p as t,H as e,k as a,i as c,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.actionclick=a(this,"actionclick"),this.selectoption=a(this,"selectoption"),this.selectable=!0,this.selected=!1,this.highlighted=!1,this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.styles={"--neutral-light":this.theme.colors.getColor("neutral-light"),"--neutral-white":this.theme.colors.getColor("neutral-white"),"--neutral-dark":this.theme.colors.getColor("neutral-dark"),"--neutral-black":this.theme.colors.getColor("neutral-black"),"--primary-lighter-50":this.theme.colors.getColor("primary-lighter",.5),"--primary-light":this.theme.colors.getColor("primary-light"),"--primary":this.theme.colors.getColor("primary-base")}}handleSelect(){this.selectable?this.selectoption.emit(this.optionid):this.actionclick.emit()}handleActionsClick(){this.actionclick.emit()}getClasses(){return{"component-container":!0,selected:this.selected,highlighted:this.highlighted,"not-selectable":!this.selectable}}render(){return c(o,{key:"e01c513f3c2cf8ad1b4b118f2b59d5228a052112"},c("div",{key:"b59ae795fc8905929ed91fc2e18e465b0d1632f0",class:this.getClasses(),style:this.styles},c("div",{key:"f3d163ac57e5c6cbc15f4b7d822273afa1279816",class:"selectable-container",onClick:()=>this.handleSelect()},c("slot",{key:"ed9427e3251354825ee9652f653f9597ccf79383",name:"image"}),c("div",{key:"a78dcf1bfd71e42542b9f7bdb7fb43e3acc628ba",class:"content"},c("slot",{key:"7ad2f91f434cf69b5f45674e887d29fe4188cd9e"}))),c("div",{key:"7f9cac5875885a80505b7455de49c090aca7848c",class:"actions-container",onClick:()=>this.handleActionsClick()},c("slot",{key:"12496150bea58f08dc7c5a868d866f67903e545c",name:"actions"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);transition:background-color 0.15s linear}:host .component-container:not(.selected):not(.not-selectable):has(.selectable-container:hover),:host .component-container:not(.selected):not(.not-selectable).highlighted{background-color:var(--neutral-white)}:host .selectable-container{flex:1;display:flex;align-items:center;justify-content:flex-start;padding:calc(var(--cura-spacing-base) * 3px) 0;min-height:calc(var(--cura-spacing-base) * 10px);min-width:0;gap:calc(var(--cura-spacing-base) * 1px);cursor:pointer}:host .selectable-container .content{flex:1;align-items:center;justify-content:flex-end;padding-right:calc(var(--cura-spacing-base) * 1px);min-width:0}:host .selectable-container ::slotted(cura-icon){--color:var(--neutral-dark) !important;margin:0 10px}:host .selectable-container ::slotted(cura-avatar){margin:0 calc(var(--cura-spacing-base) * 1px)}:host .selectable-container ::slotted(cura-heading),:host .selectable-container ::slotted(cura-paragraph){--margin-block:0 !important;--color-spot:var(--primary) !important}:host .selectable-container ::slotted(cura-heading){--color-body:var(--neutral-black) !important}:host .selectable-container ::slotted(cura-paragraph){--color-body:var(--neutral-dark) !important}:host .selected{background-color:var(--primary-lighter-50);border-bottom-color:var(--primary-light)}:host .selected .selectable-container{cursor:default}:host .selected .selectable-container ::slotted(cura-icon){--color:var(--primary) !important}:host .selected .selectable-container ::slotted(cura-heading){--color-body:var(--primary) !important}:host .actions-container{display:flex}:host .actions-container ::slotted(*){padding-left:calc(var(--cura-spacing-base) * 1px)}:host .not-selectable .selectable-container{cursor:default}:host(:last-child) .component-container{border-bottom:none !important}"}},[257,"cura-dropdown-search-option",{value:[1],optionid:[1],selectable:[516],selected:[516],highlighted:[516]}]),n=i,s=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-option"].forEach((t=>{"cura-dropdown-search-option"===t&&(customElements.get(r(t))||customElements.define(r(t),i))}))};export{n as CuraDropdownSearchOption,s as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as i,k as s,i as o,j as e,t as h}from"./p-DBXUEjWh.js";import{a as n,r,c as a,b as c,d as l}from"./p-B8xnU6YS.js";import{d}from"./p-DXlGQp3a.js";import{d as p}from"./p-fn4zJrKE.js";import{d as u}from"./p-BSdkRryc.js";import{d as w}from"./p-Bf21UQXV.js";class m{constructor(t,i){this._stopPropagationEvent=t=>{this.scrollableElement.scrollHeight<=this.scrollableElement.clientHeight&&t.preventDefault(),t.stopPropagation()},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()},t&&i?(this.hostElement=t,this.scrollableElement=i):console.error("Componentes host ou scrollable não foram informados corretamente ou não existem.")}disableScroll(){this.scrollPosition=window.scrollY,window.scrollTo({top:0,behavior:"instant"}),n(),this._addEvents()}enableScroll(){r(),window.scrollTo({top:this.scrollPosition,behavior:"instant"}),this._removeEvents()}_addEvents(){this.hostElement.addEventListener("wheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("mousewheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("touchmove",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("scroll",this._preventEvent,{passive:!1}),this.scrollableElement.addEventListener("wheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("mousewheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("touchmove",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("scroll",this._stopPropagationEvent,{passive:!1})}_removeEvents(){this.hostElement.removeEventListener("wheel",this._preventEvent),this.hostElement.removeEventListener("mousewheel",this._preventEvent),this.hostElement.removeEventListener("touchmove",this._preventEvent),this.hostElement.removeEventListener("scroll",this._preventEvent),this.scrollableElement.removeEventListener("wheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("mousewheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("touchmove",this._stopPropagationEvent),this.scrollableElement.removeEventListener("scroll",this._stopPropagationEvent)}}const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.termchange=s(this,"termchange"),this.optionselect=s(this,"optionselect"),this.size="large",this.status="default",this.disabled=!1,this.required=!1,this.placeholder="",this.label="",this.icon="search",this.maxheight="400px",this.value="",this.searchdelay=400,this.searchminchars=3,this.styles={},this.zoomState=!1,this.isOnFocus=!1,this.resizeTimeoutMs=66,this.focusTimeoutMs=500,this.blurTimeoutMs=300,this.highlightedIndex=-1,this.dropdownItems=[],this.dropdownSelectableItems=[],this.handleSlotChange=()=>{this.getSlotElements()},this.handleWindowResize=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this.isMobile=a(),this.setZoomHeight()}),this.resizeTimeoutMs)},this.handleVisualViewportChange=()=>{this.zoomState&&(this.viewportTimeout&&clearTimeout(this.viewportTimeout),this.viewportTimeout=setTimeout((()=>this.setZoomHeight()),this.resizeTimeoutMs))},this.handleFocus=()=>{this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout((()=>{this.isOnFocus=!0,this.clearHighlight(),this.isMobile&&!this.zoomState&&this.enterZoom(),this.zoomState&&this.setZoomHeight(),setTimeout((()=>{var t;null===(t=this.selectedOptionElement)||void 0===t||t.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"})}),10)}),this.focusTimeoutMs)},this.handleBlur=()=>{this.blurTimeout&&clearTimeout(this.blurTimeout),this.blurTimeout=setTimeout((()=>{this.zoomState&&setTimeout((()=>this.setZoomHeight()),c?500:100),this.isOnFocus=!1}),this.blurTimeoutMs)},this.handleFocusout=()=>{this.zoomState&&this.setZoomHeight()},this.handleBackClick=()=>{this.exitZoom()},this.handleOptionActionClick=t=>{this.getInputElement().setFocus(),this._preventEvent(t)},this.handleInputClear=t=>{this.setValue(""),this.clearSelectedOptions(),this._preventEvent(t)},this.handleSelectOption=t=>{this._selectOption(t.detail),this._preventEvent(t)},this.handleInputValueChange=t=>{this.setValue(t.detail),this.selectedOptionElement&&t.detail!==this.selectedOptionElement.value&&this.clearSelectedOptions(),this._preventEvent(t)},this.handleDropdownMouseOver=()=>{(this.highlightedElement||this.highlightedIndex>=0)&&this.clearHighlight()},this.handleKeyDown=t=>{"ArrowDown"===t.key&&this.moveHighlight("next"),"ArrowUp"===t.key&&this.moveHighlight("prev"),"Enter"===t.key&&this.selectHighlight()},this.getInputElement=()=>{var t;return null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("cura-input-text")},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()}}async setFocus(){this.getInputElement().setFocus()}async selectOption(t){this._selectOption(t)}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.breakpoints=window.CuraAPI.theme.breakpoints.get(),this.styles["--info"]=window.CuraAPI.theme.colors.getColor("info-base"),this.styles["--purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor("neutral-black",.16),this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark"),this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter"),this.styles["--primary"]=window.CuraAPI.theme.colors.getColor("primary"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium,null===window||void 0===window||window.addEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.addEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.addEventListener("resize",this.handleVisualViewportChange),window.visualViewport.addEventListener("scroll",this.handleVisualViewportChange)),this.isMobile=a()}componentDidLoad(){var t;this.dropdownElement=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-container"),this.host.addEventListener("actionclick",this.handleOptionActionClick),this.host.addEventListener("selectoption",this.handleSelectOption),this.scrollBehavior=new m(this.host,this.dropdownElement),setTimeout((()=>this.getSlotElements()),10)}disconnectedCallback(){this.removeAllListeners()}removeAllListeners(){null===window||void 0===window||window.removeEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.removeEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.removeEventListener("resize",this.handleVisualViewportChange),window.visualViewport.removeEventListener("scroll",this.handleVisualViewportChange)),this.host.removeEventListener("actionclick",this.handleOptionActionClick),this.host.removeEventListener("selectoption",this.handleSelectOption)}moveHighlight(t){if(!this.dropdownSelectableItems.length)return;let i="next"===t?this.highlightedIndex+1:this.highlightedIndex-1;if(i<0)return void this.clearHighlight();const s=this.dropdownSelectableItems.length-1;i>s&&(i=s),this.highlightedElement&&(this.highlightedElement.highlighted=!1),this.highlightedIndex=i,this.highlightedElement=this.dropdownSelectableItems[i],this.highlightedElement.selected?this.moveHighlight(t):(this.highlightedElement.highlighted=!0,this.highlightedElement.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}))}clearHighlight(){this.highlightedElement&&(this.highlightedElement.highlighted=!1,this.highlightedElement=null),this.highlightedIndex=-1}selectHighlight(){this.highlightedElement&&(this._selectOption(this.highlightedElement.optionid),this.clearHighlight(),this.getInputElement().blur())}setValue(t){this.value!==t&&(this.value=t,this.valueTimeout&&clearTimeout(this.valueTimeout),this.valueTimeout=setTimeout((()=>{var t;const i=null!==(t=this.value)&&void 0!==t?t:"";this.termchange.emit(""===i||i.length<this.searchminchars?"":i)}),this.searchdelay||300))}_selectOption(t){if(!t)return this.clearSelectedOptions(),void this.setValue("");const i=this.dropdownSelectableItems.find((i=>i.optionid===t));i&&!i.selected&&(this.clearSelectedOptions(),this.selectedOptionElement=i,this.selectedOptionElement.selected=!0,this.setValue(this.selectedOptionElement.value),this.optionselect.emit(this.selectedOptionElement.optionid),this.zoomState&&setTimeout((()=>this.exitZoom()),this.blurTimeoutMs))}clearSelectedOptions(){this.dropdownSelectableItems.forEach((t=>{t.selected&&(t.selected=!1)})),this.selectedOptionElement=null}getSlotElements(){const t=[],i=[];let s=!1;this.dropdownElement&&this.dropdownElement.querySelector("slot").assignedElements().forEach((o=>{t.push(o),"cura-dropdown-search-option"===o.localName&&o.selectable&&i.push(o),"cura-dropdown-search-not-found"===o.localName&&(s=!0)})),this.dropdownSelectableItems=i,this.dropdownItems=t,this.status=s?"error":"default"}enterZoom(){this.scrollBehavior.disableScroll(),this.setZoomHeight(),this.zoomState=!0}exitZoom(){this.scrollBehavior.enableScroll(),this.setZoomHeight(),setTimeout((()=>{this.zoomState=!1}),300)}setZoomHeight(){if(null===window||void 0===window?void 0:window.visualViewport){const t=window.visualViewport.height+"px",i=window.visualViewport.offsetTop+"px";return void(this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":i}))}const t=window?window.innerHeight+"px":"100vh";this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":"0px"})}getClasses(){return{"component-container":!0,mobile:this.isMobile,zoom:this.zoomState,"dropdown-visible":this.isOnFocus&&this.dropdownItems.length>0&&!this.zoomState,error:"error"===this.status}}getHostCSSProperties(){return{"--max-height":this.maxheight||"400px"}}render(){return o(e,{key:"7a312071ecc60fe462636ad7b32bcb82b5d5c1a2",style:this.getHostCSSProperties(),role:"search","aria-label":this.label,"aria-required":this.required,"aria-disabled":this.disabled,"aria-expanded":this.zoomState},o("div",{key:"c4b906871b300013208649f8dcf9b27cf161daae",class:this.getClasses(),style:this.styles},o("div",{key:"97d3d3ae67dc79f2d04456555388cce9aec36f7d",class:"component-controls"},this.isMobile&&this.zoomState?o("cura-button-transparent",{fontColor:"dark",onClick:()=>this.handleBackClick(),iconName:"arrowLeft",size:"large",iconOnly:!0,color:"primary",id:"button-back"}):"",o("cura-input-text",{key:"53aa07646542b9941804f7a7f0d66f8c340ce664",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:this.zoomState?"transparent":"default",required:this.required,iconName:this.icon||"search",value:this.value,status:this.status,onValueChange:t=>this.handleInputValueChange(t),onInput:t=>this._preventEvent(t),onFocus:()=>this.handleFocus(),onClick:t=>this._preventEvent(t),onBlur:()=>this.handleBlur(),onFocusout:()=>this.handleFocusout(),onInputClear:t=>this.handleInputClear(t),placeholder:this.placeholder,size:this.size,onKeyDown:t=>this.handleKeyDown(t)},o("slot",{key:"fb206e8295b0139082b79cc747bfe8e424df33fa",name:"helperText"}))),o("div",{key:"8ab0ad70e667c4b01b2f7a31fc5df6056b170565",class:"dropdown-container",onMouseOver:()=>this.handleDropdownMouseOver()},o("slot",{key:"dc3cda02f7a70d7229457d6c225a606ee2e03f52",onSlotchange:()=>this.handleSlotChange()}))))}get host(){return this}static get style(){return":host{display:block;box-sizing:border-box;position:relative}:host .component-controls{display:flex;align-items:center;justify-content:center;gap:calc(var(--cura-spacing-base) * 1px)}:host .component-controls #button-back{padding:0 0 0 calc(var(--cura-spacing-base) * 3px);width:max-content}:host .component-container{box-sizing:border-box;width:100%;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:min-content 1fr}:host .component-container.zoom{position:fixed;top:var(--top-offset, 0);left:0;width:100vw;background:var(--purewhite);height:var(--height);z-index:9999;overscroll-behavior:contain}:host .component-container.zoom .component-controls{border-bottom:2px solid var(--primary);padding:calc(var(--cura-spacing-base) * 3px) 0}:host .component-container.zoom.error .component-controls{border-bottom:2px solid var(--error-dark);background-color:var(--error-lighter)}:host .component-container .dropdown-container{box-sizing:border-box;width:100%;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;padding:calc(var(--cura-spacing-base) * 3px);overscroll-behavior:contain}:host .component-container:not(.zoom) .dropdown-container{box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;bottom:0;left:0;transform:translateY(100%);max-height:var(--max-height);background-color:var(--purewhite);border-radius:0px 0px calc(var(--cura-spacing-base) * 1px) calc(var(--cura-spacing-base) * 1px);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);border-right:2px solid var(--neutral-light);display:none;z-index:9997}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-field){border-radius:4px 4px 0px 0px}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-text-helper){height:0px;overflow:hidden;margin-top:0px}:host .component-container:not(.zoom).dropdown-visible .dropdown-container{display:block}"}},[257,"cura-dropdown-search",{name:[513],size:[513],status:[1537],disabled:[516],required:[516],placeholder:[513],label:[513],icon:[513],maxheight:[513],value:[1025],searchdelay:[514],searchminchars:[514],styles:[32],zoomState:[32],isOnFocus:[32],dropdownItems:[32],setFocus:[64],selectOption:[64]}]),v=b,f=function(){"undefined"!=typeof customElements&&["cura-dropdown-search","cura-button-transparent","cura-icon","cura-input-text","cura-label","cura-loader-circle"].forEach((t=>{switch(t){case"cura-dropdown-search":customElements.get(h(t))||customElements.define(h(t),b);break;case"cura-button-transparent":customElements.get(h(t))||d();break;case"cura-icon":customElements.get(h(t))||p();break;case"cura-input-text":customElements.get(h(t))||l();break;case"cura-label":customElements.get(h(t))||u();break;case"cura-loader-circle":customElements.get(h(t))||w()}}))};export{v as CuraDropdownSearch,f as defineCustomElement}
1
+ import{p as t,H as i,k as s,i as e,j as o,t as h}from"./p-DBXUEjWh.js";import{a as n,r,c as a,b as c,d as l}from"./p-BJafC0R3.js";import{d}from"./p-BXFxWVl3.js";import{d as p}from"./p-DI66_jP6.js";import{d as u}from"./p-Cm1Vfoc6.js";import{d as w}from"./p-nqT7t82E.js";class m{constructor(t,i){this._stopPropagationEvent=t=>{this.scrollableElement.scrollHeight<=this.scrollableElement.clientHeight&&t.preventDefault(),t.stopPropagation()},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()},t&&i?(this.hostElement=t,this.scrollableElement=i):console.error("Componentes host ou scrollable não foram informados corretamente ou não existem.")}disableScroll(){this.scrollPosition=window.scrollY,window.scrollTo({top:0,behavior:"instant"}),n(),this._addEvents()}enableScroll(){r(),window.scrollTo({top:this.scrollPosition,behavior:"instant"}),this._removeEvents()}_addEvents(){this.hostElement.addEventListener("wheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("mousewheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("touchmove",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("scroll",this._preventEvent,{passive:!1}),this.scrollableElement.addEventListener("wheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("mousewheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("touchmove",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("scroll",this._stopPropagationEvent,{passive:!1})}_removeEvents(){this.hostElement.removeEventListener("wheel",this._preventEvent),this.hostElement.removeEventListener("mousewheel",this._preventEvent),this.hostElement.removeEventListener("touchmove",this._preventEvent),this.hostElement.removeEventListener("scroll",this._preventEvent),this.scrollableElement.removeEventListener("wheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("mousewheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("touchmove",this._stopPropagationEvent),this.scrollableElement.removeEventListener("scroll",this._stopPropagationEvent)}}const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.termchange=s(this,"termchange"),this.optionselect=s(this,"optionselect"),this.size="large",this.status="default",this.disabled=!1,this.required=!1,this.placeholder="",this.label="",this.icon="search",this.maxheight="400px",this.value="",this.searchdelay=400,this.searchminchars=3,this.styles={},this.zoomState=!1,this.isOnFocus=!1,this.resizeTimeoutMs=66,this.focusTimeoutMs=500,this.blurTimeoutMs=300,this.highlightedIndex=-1,this.dropdownItems=[],this.dropdownSelectableItems=[],this.handleSlotChange=()=>{this.getSlotElements()},this.handleWindowResize=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this.isMobile=a(),this.setZoomHeight()}),this.resizeTimeoutMs)},this.handleVisualViewportChange=()=>{this.zoomState&&(this.viewportTimeout&&clearTimeout(this.viewportTimeout),this.viewportTimeout=setTimeout((()=>this.setZoomHeight()),this.resizeTimeoutMs))},this.handleFocus=()=>{this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout((()=>{this.isOnFocus=!0,this.clearHighlight(),this.isMobile&&!this.zoomState&&this.enterZoom(),this.zoomState&&this.setZoomHeight(),setTimeout((()=>{var t;null===(t=this.selectedOptionElement)||void 0===t||t.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"})}),10)}),this.focusTimeoutMs)},this.handleBlur=()=>{this.blurTimeout&&clearTimeout(this.blurTimeout),this.blurTimeout=setTimeout((()=>{this.zoomState&&setTimeout((()=>this.setZoomHeight()),c?500:100),this.isOnFocus=!1}),this.blurTimeoutMs)},this.handleFocusout=()=>{this.zoomState&&this.setZoomHeight()},this.handleBackClick=()=>{this.exitZoom()},this.handleOptionActionClick=t=>{this.getInputElement().setFocus(),this._preventEvent(t)},this.handleInputClear=t=>{this.setValue(""),this.clearSelectedOptions(),this._preventEvent(t)},this.handleSelectOption=t=>{this._selectOption(t.detail),this._preventEvent(t)},this.handleInputValueChange=t=>{this.setValue(t.detail),this.selectedOptionElement&&t.detail!==this.selectedOptionElement.value&&this.clearSelectedOptions(),this._preventEvent(t)},this.handleDropdownMouseOver=()=>{(this.highlightedElement||this.highlightedIndex>=0)&&this.clearHighlight()},this.handleKeyDown=t=>{"ArrowDown"===t.key&&this.moveHighlight("next"),"ArrowUp"===t.key&&this.moveHighlight("prev"),"Enter"===t.key&&this.selectHighlight()},this.getInputElement=()=>{var t;return null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("cura-input-text")},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()}}async setFocus(){this.getInputElement().setFocus()}async selectOption(t){this._selectOption(t)}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.breakpoints=window.CuraAPI.theme.breakpoints.get(),this.styles["--info"]=window.CuraAPI.theme.colors.getColor("info-base"),this.styles["--purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor("neutral-black",.16),this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark"),this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter"),this.styles["--primary"]=window.CuraAPI.theme.colors.getColor("primary"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium,null===window||void 0===window||window.addEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.addEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.addEventListener("resize",this.handleVisualViewportChange),window.visualViewport.addEventListener("scroll",this.handleVisualViewportChange)),this.isMobile=a()}componentDidLoad(){var t;this.dropdownElement=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-container"),this.host.addEventListener("actionclick",this.handleOptionActionClick),this.host.addEventListener("selectoption",this.handleSelectOption),this.scrollBehavior=new m(this.host,this.dropdownElement),setTimeout((()=>this.getSlotElements()),10)}disconnectedCallback(){this.removeAllListeners()}removeAllListeners(){null===window||void 0===window||window.removeEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.removeEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.removeEventListener("resize",this.handleVisualViewportChange),window.visualViewport.removeEventListener("scroll",this.handleVisualViewportChange)),this.host.removeEventListener("actionclick",this.handleOptionActionClick),this.host.removeEventListener("selectoption",this.handleSelectOption)}moveHighlight(t){if(!this.dropdownSelectableItems.length)return;let i="next"===t?this.highlightedIndex+1:this.highlightedIndex-1;if(i<0)return void this.clearHighlight();const s=this.dropdownSelectableItems.length-1;i>s&&(i=s),this.highlightedElement&&(this.highlightedElement.highlighted=!1),this.highlightedIndex=i,this.highlightedElement=this.dropdownSelectableItems[i],this.highlightedElement.selected?this.moveHighlight(t):(this.highlightedElement.highlighted=!0,this.highlightedElement.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}))}clearHighlight(){this.highlightedElement&&(this.highlightedElement.highlighted=!1,this.highlightedElement=null),this.highlightedIndex=-1}selectHighlight(){this.highlightedElement&&(this._selectOption(this.highlightedElement.optionid),this.clearHighlight(),this.getInputElement().blur())}setValue(t){this.value!==t&&(this.value=t,this.valueTimeout&&clearTimeout(this.valueTimeout),this.valueTimeout=setTimeout((()=>{var t;const i=null!==(t=this.value)&&void 0!==t?t:"";this.termchange.emit(""===i||i.length<this.searchminchars?"":i)}),this.searchdelay||300))}_selectOption(t){if(!t)return this.clearSelectedOptions(),void this.setValue("");const i=this.dropdownSelectableItems.find((i=>i.optionid===t));i&&!i.selected&&(this.clearSelectedOptions(),this.selectedOptionElement=i,this.selectedOptionElement.selected=!0,this.setValue(this.selectedOptionElement.value),this.optionselect.emit(this.selectedOptionElement.optionid),this.zoomState&&setTimeout((()=>this.exitZoom()),this.blurTimeoutMs))}clearSelectedOptions(){this.dropdownSelectableItems.forEach((t=>{t.selected&&(t.selected=!1)})),this.selectedOptionElement=null}getSlotElements(){const t=[],i=[];let s=!1;this.dropdownElement&&this.dropdownElement.querySelector("slot").assignedElements().forEach((e=>{t.push(e),"cura-dropdown-search-option"===e.localName&&e.selectable&&i.push(e),"cura-dropdown-search-not-found"===e.localName&&(s=!0)})),this.dropdownSelectableItems=i,this.dropdownItems=t,this.status=s?"error":"default"}enterZoom(){this.scrollBehavior.disableScroll(),this.setZoomHeight(),this.zoomState=!0}exitZoom(){this.scrollBehavior.enableScroll(),this.setZoomHeight(),setTimeout((()=>{this.zoomState=!1}),300)}setZoomHeight(){if(null===window||void 0===window?void 0:window.visualViewport){const t=window.visualViewport.height+"px",i=window.visualViewport.offsetTop+"px";return void(this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":i}))}const t=window?window.innerHeight+"px":"100vh";this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":"0px"})}getClasses(){return{"component-container":!0,mobile:this.isMobile,zoom:this.zoomState,"dropdown-visible":this.isOnFocus&&this.dropdownItems.length>0&&!this.zoomState,error:"error"===this.status}}getHostCSSProperties(){return{"--max-height":this.maxheight||"400px"}}render(){return e(o,{key:"4eebe0e03eb20a9c056158e9bb7dafad6c5d7e36",style:this.getHostCSSProperties(),role:"search","aria-label":this.label,"aria-required":this.required,"aria-disabled":this.disabled,"aria-expanded":this.zoomState},e("div",{key:"c74a9785e747c23f853beabce244d9d79be963f6",class:this.getClasses(),style:this.styles},e("div",{key:"8e0e1b8ad5929f7a65d970da37af8da526ea1ec6",class:"component-controls"},this.isMobile&&this.zoomState?e("cura-button-transparent",{fontColor:"dark",onClick:()=>this.handleBackClick(),iconName:"arrowLeft",size:"large",iconOnly:!0,color:"primary",id:"button-back"}):"",e("cura-input-text",{key:"d6b1e0284f7f8bbd0293ca8c7e11de7e4d390729",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:this.zoomState?"transparent":"default",required:this.required,iconName:this.icon||"search",value:this.value,status:this.status,onValueChange:t=>this.handleInputValueChange(t),onInput:t=>this._preventEvent(t),onFocus:()=>this.handleFocus(),onClick:t=>this._preventEvent(t),onBlur:()=>this.handleBlur(),onFocusout:()=>this.handleFocusout(),onInputClear:t=>this.handleInputClear(t),placeholder:this.placeholder,size:this.size,onKeyDown:t=>this.handleKeyDown(t)},e("slot",{key:"3626dc325181c193081af56996804453c9dee9f5",name:"helperText"}))),e("div",{key:"c0b979983b567e35a15e756d24cecf0a0102e2bc",class:"dropdown-container",onMouseOver:()=>this.handleDropdownMouseOver()},e("slot",{key:"56fc0ae14345c88eaf214a12f6ebf545fc040aea",onSlotchange:()=>this.handleSlotChange()}))))}get host(){return this}static get style(){return":host{display:block;box-sizing:border-box;position:relative}:host .component-controls{display:flex;align-items:center;justify-content:center;gap:calc(var(--cura-spacing-base) * 1px)}:host .component-controls #button-back{padding:0 0 0 calc(var(--cura-spacing-base) * 3px);width:max-content}:host .component-container{box-sizing:border-box;width:100%;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:min-content 1fr}:host .component-container.zoom{position:fixed;top:var(--top-offset, 0);left:0;width:100vw;background:var(--purewhite);height:var(--height);z-index:9999;overscroll-behavior:contain}:host .component-container.zoom .component-controls{border-bottom:2px solid var(--primary);padding:calc(var(--cura-spacing-base) * 3px) 0}:host .component-container.zoom.error .component-controls{border-bottom:2px solid var(--error-dark);background-color:var(--error-lighter)}:host .component-container .dropdown-container{box-sizing:border-box;width:100%;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;padding:calc(var(--cura-spacing-base) * 3px);overscroll-behavior:contain}:host .component-container:not(.zoom) .dropdown-container{box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;bottom:0;left:0;transform:translateY(100%);max-height:var(--max-height);background-color:var(--purewhite);border-radius:0px 0px calc(var(--cura-spacing-base) * 1px) calc(var(--cura-spacing-base) * 1px);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);border-right:2px solid var(--neutral-light);display:none;z-index:9997}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-field){border-radius:4px 4px 0px 0px}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-text-helper){height:0px;overflow:hidden;margin-top:0px}:host .component-container:not(.zoom).dropdown-visible .dropdown-container{display:block}"}},[257,"cura-dropdown-search",{name:[513],size:[513],status:[1537],disabled:[516],required:[516],placeholder:[513],label:[513],icon:[513],maxheight:[513],value:[1025],searchdelay:[514],searchminchars:[514],styles:[32],zoomState:[32],isOnFocus:[32],dropdownItems:[32],setFocus:[64],selectOption:[64]}]),v=b,x=function(){"undefined"!=typeof customElements&&["cura-dropdown-search","cura-button-transparent","cura-icon","cura-input-text","cura-label","cura-loader-circle"].forEach((t=>{switch(t){case"cura-dropdown-search":customElements.get(h(t))||customElements.define(h(t),b);break;case"cura-button-transparent":customElements.get(h(t))||d();break;case"cura-icon":customElements.get(h(t))||p();break;case"cura-input-text":customElements.get(h(t))||l();break;case"cura-label":customElements.get(h(t))||u();break;case"cura-loader-circle":customElements.get(h(t))||w()}}))};export{v as CuraDropdownSearch,x as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-fR02COZb.js";const p=o,r=s;export{p as CuraHeading,r as defineCustomElement}
1
+ import{C as o,d as p}from"./p-BFGkepgq.js";const s=o,r=p;export{s as CuraHeading,r as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as r}from"./p-fn4zJrKE.js";const s=o,p=r;export{s as CuraIcon,p as defineCustomElement}
1
+ import{C as o,d as s}from"./p-DI66_jP6.js";const p=o,r=s;export{p as CuraIcon,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as i,i as a,j as c,t as r}from"./p-DBXUEjWh.js";import{i as s,d as t}from"./p-fn4zJrKE.js";import{d as l}from"./p-fR02COZb.js";import{d as o}from"./p-BSdkRryc.js";var n=["360","accessibility","accessibility2","accessibility3","accessibility4","addUser","airdrop","alertCircle","alertTriangle","arrowDown","arrowDownCircle","arrowLeft","arrowLeftCircle","arrowRight","arrowRightCircle","arrowUp","arrowUpCircle","attach","autism","avatarF","avatarM","bike","biometry","biop","bloodGroup","calendar","cam","camOff","cart","central","chatCircle","check","checkBadge","checkCircle","checkDouble","clock","close","closeCircle","coffee","collapse","config","contacts","currency","delete","desktop","doc","down","download","drug","duplicate","edit","elevator","exam","examDoc","expand","facebook","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","geotagUnity","geotagUnityGroup","google","graph","healthPlan","heart","height","height2","home","horizontalList","id","image","imageUp","infoCircle","instagram","key","lab","lamp","language","language2","languageEN","languagePT","lattes","left","like","link","linkExternal","linkedin","list","login","logout","mail","maintenance","medDoc","medEspec","medImg","medUser","medical","menuHamburguer","menuKebab","menuMeatballs","mic","micOff","minus","minusCircle","minusSquare","mobile","mobileClick","mobileRotate1","mobileRotate2","mobileRotate3","news","notification","npsDeslike","npsHate","npsLike","npsLove","npsNeutral","order","parking","partner","phone","play","plus","plusCircle","plusSquare","print","profile","profileCircle","questionCircle","questionSquare","range","reload","ribbon","right","schedule","scheduleCancel","scheduleCheck","scheduleHistorico","search","secure","share","siren","sound","soundOff","star","stop","store","subItem","swap","target","team","telegram","twitter","unLink","unSecure","unity","unlike","up","upload","vaccine","verticalList","viewFalse","viewTrue","weight","whatsapp","wifi","wifiOff","xray","youtube","zoomIn","zoomOut"];const d=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.sizes=Object.keys(s).filter((e=>"default"!==e)),this.colors=["primary","secondary","accent","info","warning","error","success","neutral"],this.selected=n[0],this.setSelected=e=>{this.selected=e}}connectedCallback(){this.sizes.unshift(this.sizes.pop())}render(){return a(c,{key:"08ac6235b9218c2202cd4957bb78100216b5b680"},a("div",{key:"71856330d5f050d46b83c06125d29a235532bf98",class:"iconDetail"},a("cura-heading",{key:"2520247cde8d71b1a31ce028c4525b04e6302bf1",size:"small","margin-block":"0 24px"},"Icon: ",a("b",{key:"5cf48d96ed36dd5514357c65b0ec8c9f137bb1e4"},this.selected)),a("div",{key:"7eda1e7db5efc89abb583631a5e959e31397684f",class:"iconSizes"},this.sizes.map((e=>a("div",{class:"size"},a("cura-icon",{name:this.selected,size:e}),a("span",null,e))))),a("div",{key:"f443dab7e85fe89a207da8fbefb024b0c22fa084",class:"iconSizes invert"},this.sizes.map((e=>a("div",{class:"size"},a("cura-icon",{name:this.selected,size:e,color:"neutral-white"}),a("span",null,e)))))),a("div",{key:"5ea3b71259ae5454297a94aef4ce1e154c968512",class:"icons"},n.map((e=>a("div",{class:{icon:!0,selected:e===this.selected},onClick:()=>this.setSelected(e)},a("cura-icon",{name:e,size:"32",color:e===this.selected?"accent-dark":"neutral-dark"}),a("cura-label",{size:"xsmall",weight:e===this.selected?"bold":"regular",color:e===this.selected?"accent-dark":"neutral-dark"},e))))))}static get style(){return':host{display:block;padding:24px;font-family:"Roboto", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:flex;align-items:center}.iconSizes .size{display:flex;flex-direction:column;text-align:center;align-items:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px;margin:8px 0}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#2d2d2d;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:flex;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;transition:opacity 0.2s linear;width:105px;display:flex;flex-direction:column;text-align:center;align-items:center;margin-bottom:16px;box-sizing:border-box;}.icons .icon cura-label{margin-top:8px}.icons .icon cura-paragraph{margin-top:4px}'}},[1,"cura-icons-view",{selected:[32]}]),u=d,p=function(){"undefined"!=typeof customElements&&["cura-icons-view","cura-heading","cura-icon","cura-label"].forEach((e=>{switch(e){case"cura-icons-view":customElements.get(r(e))||customElements.define(r(e),d);break;case"cura-heading":customElements.get(r(e))||l();break;case"cura-icon":customElements.get(r(e))||t();break;case"cura-label":customElements.get(r(e))||o()}}))};export{u as CuraIconsView,p as defineCustomElement}
1
+ import{p as e,H as i,i as a,j as c,t as r}from"./p-DBXUEjWh.js";import{i as s,d as t}from"./p-DI66_jP6.js";import{d as o}from"./p-BFGkepgq.js";import{d as l}from"./p-Cm1Vfoc6.js";var n=["360","accessibility","accessibility2","accessibility3","accessibility4","addUser","airdrop","alertCircle","alertTriangle","arrowDown","arrowDownCircle","arrowLeft","arrowLeftCircle","arrowRight","arrowRightCircle","arrowUp","arrowUpCircle","attach","autism","avatarF","avatarM","bike","biometry","biop","bloodGroup","calendar","cam","camOff","cart","central","chatCircle","check","checkBadge","checkCircle","checkDouble","clock","close","closeCircle","coffee","collapse","config","contacts","currency","delete","desktop","doc","down","download","drug","duplicate","edit","elevator","exam","examDoc","expand","facebook","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","geotagUnity","geotagUnityGroup","google","graph","healthPlan","heart","height","height2","home","horizontalList","id","image","imageUp","infoCircle","instagram","key","lab","lamp","language","language2","languageEN","languagePT","lattes","left","like","link","linkExternal","linkedin","list","login","logout","mail","maintenance","medDoc","medEspec","medImg","medUser","medical","menuHamburguer","menuKebab","menuMeatballs","mic","micOff","minus","minusCircle","minusSquare","mobile","mobileClick","mobileRotate1","mobileRotate2","mobileRotate3","news","notification","npsDeslike","npsHate","npsLike","npsLove","npsNeutral","order","parking","partner","phone","play","plus","plusCircle","plusSquare","print","profile","profileCircle","questionCircle","questionSquare","range","reload","ribbon","right","schedule","scheduleCancel","scheduleCheck","scheduleHistorico","search","secure","share","siren","sound","soundOff","star","stop","store","subItem","swap","target","team","telegram","twitter","unLink","unSecure","unity","unlike","up","upload","vaccine","verticalList","viewFalse","viewTrue","weight","whatsapp","wifi","wifiOff","xray","youtube","zoomIn","zoomOut"];const d=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.sizes=Object.keys(s).filter((e=>"default"!==e)),this.colors=["primary","secondary","accent","info","warning","error","success","neutral"],this.selected=n[0],this.setSelected=e=>{this.selected=e}}connectedCallback(){this.sizes.unshift(this.sizes.pop())}render(){return a(c,{key:"f25d10b3f380cc58fd5b4e77b437e09ba0787df4"},a("div",{key:"5162f1c8aff585a60f37ef9af8451dae8b310394",class:"iconDetail"},a("cura-heading",{key:"2e95f88bf98bcb3b5ea8b2ce6b015ef5d3c984e5",size:"small","margin-block":"0 24px"},"Icon: ",a("b",{key:"102d867291ca3af92c370f044a7140571b15c737"},this.selected)),a("div",{key:"e2fd0833644705ea8b406508be51c6d2d5683d24",class:"iconSizes"},this.sizes.map((e=>a("div",{class:"size"},a("cura-icon",{name:this.selected,size:e}),a("span",null,e))))),a("div",{key:"fa842318750f3cdb5e5d7f7333c9221aaf66b585",class:"iconSizes invert"},this.sizes.map((e=>a("div",{class:"size"},a("cura-icon",{name:this.selected,size:e,color:"neutral-white"}),a("span",null,e)))))),a("div",{key:"a25fd5649fe3bda93f80208e634790da44dde89b",class:"icons"},n.map((e=>a("div",{class:{icon:!0,selected:e===this.selected},onClick:()=>this.setSelected(e)},a("cura-icon",{name:e,size:"32",color:e===this.selected?"accent-dark":"neutral-dark"}),a("cura-label",{size:"xsmall",weight:e===this.selected?"bold":"regular",color:e===this.selected?"accent-dark":"neutral-dark"},e))))))}static get style(){return':host{display:block;padding:24px;font-family:"Roboto", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:flex;align-items:center}.iconSizes .size{display:flex;flex-direction:column;text-align:center;align-items:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px;margin:8px 0}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#2d2d2d;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:flex;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;transition:opacity 0.2s linear;width:105px;display:flex;flex-direction:column;text-align:center;align-items:center;margin-bottom:16px;box-sizing:border-box;}.icons .icon cura-label{margin-top:8px}.icons .icon cura-paragraph{margin-top:4px}'}},[1,"cura-icons-view",{selected:[32]}]),p=d,u=function(){"undefined"!=typeof customElements&&["cura-icons-view","cura-heading","cura-icon","cura-label"].forEach((e=>{switch(e){case"cura-icons-view":customElements.get(r(e))||customElements.define(r(e),d);break;case"cura-heading":customElements.get(r(e))||o();break;case"cura-icon":customElements.get(r(e))||t();break;case"cura-label":customElements.get(r(e))||l()}}))};export{p as CuraIconsView,u as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,k as s,i as a,j as i,t as r}from"./p-DBXUEjWh.js";import{d as n}from"./p-DXlGQp3a.js";import{i as o,a as l,d}from"./p-C05r6CQV.js";import{d as c}from"./p-fn4zJrKE.js";import{d as h}from"./p-B8xnU6YS.js";import{d as u}from"./p-BSdkRryc.js";import{d as p}from"./p-Bf21UQXV.js";import{d as m}from"./p-DxJedO3K.js";import{d as b}from"./p-BYA8glxD.js";const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.dateChange=s(this,"dateChange"),this.statusInputChange=s(this,"statusInputChange"),this.label="",this.status="default",this.size="medium",this.name="",this.iconName="",this.placeholder=null,this.calendarType="dropdown",this.styles={},this.isCalendarVisible=!1,this.dates=[],this.value="",this.dateSettings={placeholder:null,mask:"date",mode:"single"}}connectedCallback(){const{fonts:t,colors:e,spacing:s}=window.CuraAPI.theme,a=t.getWeights();this.styles={"--base-spacing":s.getSpacing(),"--neutral-purewhite":e.getColor("neutral-purewhite"),"--neutral-lighter":e.getColor("neutral-lighter"),"--neutral-base":e.getColor("neutral-base"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":a.regular}}componentWillLoad(){this.updateDateSettings()}formAssociatedCallback(t){t.ariaLabel=this.label}updateDateSettings(){const t=this.getDateSettings(this.enableRangeDates);this.shouldUpdateDateSettings(t)&&(this.dateSettings=t)}getDateSettings(t){return{placeholder:this.placeholder||(t?"dd/mm/aaaa - dd/mm/aaaa":"dd/mm/aaaa"),mask:t?"dateRange":"date",mode:t?"range":"single"}}shouldUpdateDateSettings(t){return this.dateSettings.placeholder!==t.placeholder||this.dateSettings.mask!==t.mask||this.dateSettings.mode!==t.mode}handleClick(t){this.el.contains(t.target)||this.hideCalendar()}hideCalendar(){this.isCalendarVisible=!1}showCalendar(){this.isCalendarVisible=!0}handleInputDates(t){const e=t.target.value,s=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/,a=/^(\d{2}\/\d{2}\/\d{4})$/;if(s.test(e)){const t=e.match(s),a=this.parseStringToDate(t[1]),i=this.parseStringToDate(t[2]);this.isDateValid(a)&&this.isDateValid(i)?(this.status="default",this.dates=[a,i],this.value=`${this.parseDateToString(a)} - ${this.parseDateToString(i)}`,this.dateChange.emit(this.value)):this.resetDates()}else if(a.test(e)){const t=e.match(a),s=this.parseStringToDate(t[1]);this.isDateValid(s)?(this.status="default",this.dates=[s],this.value=this.parseDateToString(s),this.dateChange.emit(this.value)):this.resetDates()}else this.dates=[]}handleChangeDates(t){""===t.detail&&(this.dates=[],this.status="default",this.value="",this.dateChange.emit(this.value),this.statusInputChange.emit(this.status))}isDateValid(t){const e=new Date;return e.setHours(0,0,0,0),this.disablePassDates?!o(t,e):!this.disableFutureDates||!l(t,e)}parseStringToDate(t){const[e,s,a]=t.split("/").map(Number);return new Date(a,s-1,e)}parseDateToString(t){return`${(t.getDate()+"").padStart(2,"0")}/${(t.getMonth()+1+"").padStart(2,"0")}/${t.getFullYear()}`}resetDates(){this.status="error",this.dates=[],this.statusInputChange.emit(this.status)}renderCalendarOrHelperText(){return this.isCalendarVisible?a("div",{class:"calendar visible"},a("cura-calendar",{customDates:this.dates,mode:this.dateSettings.mode,type:this.calendarType||"dropdown",width:"100%",maxWidth:"400px",embedded:!1,floating:!1,disableFutureDates:this.disableFutureDates,disablePassDates:this.disablePassDates,onOnchangeday:t=>{const e=t.detail.days;this.value=1===e.length?this.parseDateToString(e[0]):e.length>0?`${this.parseDateToString(e[0])} - ${this.parseDateToString(e[e.length-1])}`:"",this.dateChange.emit(this.value)}})):this.helperText}render(){return a(i,{key:"a274509eede61a43a6677fbf20dc4645c745d41d"},a("div",{key:"857056581ab374e280ab442aecc49d6b93a21cd2",class:"container",style:this.styles},a("cura-input-text",{key:"417fd4a96ea71a747f7fee55e7a5b524c6b51ef5",label:this.label,name:this.name,status:this.status,value:this.value,onFocus:()=>this.showCalendar(),size:this.size,"icon-name":this.iconName,placeholder:this.dateSettings.placeholder,"mask-preset":this.dateSettings.mask,"enable-selection-mode":!0,onKeyUp:t=>this.handleInputDates(t),autocomplete:"off",onValueChange:t=>this.handleChangeDates(t)},this.renderCalendarOrHelperText())))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{enableRangeDates:[{updateDateSettings:0}]}}static get style(){return":host{display:block}.container{display:flex;flex-direction:column;position:relative}.container .calendar{padding:0px calc(var(--cura-spacing-base) * 3px);margin-top:-8px;border-radius:0px 0px 4px 4px;border-top:0px;border-right:2px solid #D4D4D4;border-bottom:2px solid #D4D4D4;border-left:2px solid #D4D4D4;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;top:100%;z-index:10;display:none;opacity:0;pointer-events:none}.container .calendar.visible{box-sizing:border-box;display:block;opacity:1;pointer-events:all;width:100%;background-color:#fff}"}},[65,"cura-input-date",{label:[513],status:[1537],size:[513],name:[513],helperText:[513,"helper-text"],enableRangeDates:[516,"enable-range-dates"],disableFutureDates:[516,"disable-future-dates"],disablePassDates:[516,"disable-pass-dates"],iconName:[513,"icon-name"],placeholder:[513],calendarType:[513,"calendar-type"],styles:[32],isCalendarVisible:[32],dates:[32],value:[32],dateSettings:[32]},[[8,"click","handleClick"]],{enableRangeDates:[{updateDateSettings:0}]}]),g=f,x=function(){"undefined"!=typeof customElements&&["cura-input-date","cura-button-transparent","cura-calendar","cura-icon","cura-input-text","cura-label","cura-loader-circle","cura-select","cura-select-option"].forEach((t=>{switch(t){case"cura-input-date":customElements.get(r(t))||customElements.define(r(t),f);break;case"cura-button-transparent":customElements.get(r(t))||n();break;case"cura-calendar":customElements.get(r(t))||d();break;case"cura-icon":customElements.get(r(t))||c();break;case"cura-input-text":customElements.get(r(t))||h();break;case"cura-label":customElements.get(r(t))||u();break;case"cura-loader-circle":customElements.get(r(t))||p();break;case"cura-select":customElements.get(r(t))||m();break;case"cura-select-option":customElements.get(r(t))||b()}}))};export{g as CuraInputDate,x as defineCustomElement}
1
+ import{p as t,H as e,k as s,i as a,j as i,t as r}from"./p-DBXUEjWh.js";import{d as n}from"./p-BXFxWVl3.js";import{i as o,a as l,d as c}from"./p-Oyg5hynZ.js";import{d}from"./p-DI66_jP6.js";import{d as h}from"./p-BJafC0R3.js";import{d as u}from"./p-Cm1Vfoc6.js";import{d as p}from"./p-nqT7t82E.js";import{d as m}from"./p-I4AXUk2V.js";import{d as b}from"./p-BOQ-9WHP.js";const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.dateChange=s(this,"dateChange"),this.statusInputChange=s(this,"statusInputChange"),this.label="",this.status="default",this.size="medium",this.name="",this.iconName="",this.placeholder=null,this.calendarType="dropdown",this.styles={},this.isCalendarVisible=!1,this.dates=[],this.value="",this.dateSettings={placeholder:null,mask:"date",mode:"single"}}connectedCallback(){const{fonts:t,colors:e,spacing:s}=window.CuraAPI.theme,a=t.getWeights();this.styles={"--base-spacing":s.getSpacing(),"--neutral-purewhite":e.getColor("neutral-purewhite"),"--neutral-lighter":e.getColor("neutral-lighter"),"--neutral-base":e.getColor("neutral-base"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":a.regular}}componentWillLoad(){this.updateDateSettings()}formAssociatedCallback(t){t.ariaLabel=this.label}updateDateSettings(){const t=this.getDateSettings(this.enableRangeDates);this.shouldUpdateDateSettings(t)&&(this.dateSettings=t)}getDateSettings(t){return{placeholder:this.placeholder||(t?"dd/mm/aaaa - dd/mm/aaaa":"dd/mm/aaaa"),mask:t?"dateRange":"date",mode:t?"range":"single"}}shouldUpdateDateSettings(t){return this.dateSettings.placeholder!==t.placeholder||this.dateSettings.mask!==t.mask||this.dateSettings.mode!==t.mode}handleClick(t){this.el.contains(t.target)||this.hideCalendar()}hideCalendar(){this.isCalendarVisible=!1}showCalendar(){this.isCalendarVisible=!0}handleInputDates(t){const e=t.target.value,s=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/,a=/^(\d{2}\/\d{2}\/\d{4})$/;if(s.test(e)){const t=e.match(s),a=this.parseStringToDate(t[1]),i=this.parseStringToDate(t[2]);this.isDateValid(a)&&this.isDateValid(i)?(this.status="default",this.dates=[a,i],this.value=`${this.parseDateToString(a)} - ${this.parseDateToString(i)}`,this.dateChange.emit(this.value)):this.resetDates()}else if(a.test(e)){const t=e.match(a),s=this.parseStringToDate(t[1]);this.isDateValid(s)?(this.status="default",this.dates=[s],this.value=this.parseDateToString(s),this.dateChange.emit(this.value)):this.resetDates()}else this.dates=[]}handleChangeDates(t){""===t.detail&&(this.dates=[],this.status="default",this.value="",this.dateChange.emit(this.value),this.statusInputChange.emit(this.status))}isDateValid(t){const e=new Date;return e.setHours(0,0,0,0),this.disablePassDates?!o(t,e):!this.disableFutureDates||!l(t,e)}parseStringToDate(t){const[e,s,a]=t.split("/").map(Number);return new Date(a,s-1,e)}parseDateToString(t){return`${(t.getDate()+"").padStart(2,"0")}/${(t.getMonth()+1+"").padStart(2,"0")}/${t.getFullYear()}`}resetDates(){this.status="error",this.dates=[],this.statusInputChange.emit(this.status)}renderCalendarOrHelperText(){return this.isCalendarVisible?a("div",{class:"calendar visible"},a("cura-calendar",{customDates:this.dates,mode:this.dateSettings.mode,type:this.calendarType||"dropdown",width:"100%",maxWidth:"400px",embedded:!1,floating:!1,disableFutureDates:this.disableFutureDates,disablePassDates:this.disablePassDates,onOnchangeday:t=>{const e=t.detail.days;this.value=1===e.length?this.parseDateToString(e[0]):e.length>0?`${this.parseDateToString(e[0])} - ${this.parseDateToString(e[e.length-1])}`:"",this.dateChange.emit(this.value)}})):this.helperText}render(){return a(i,{key:"fe506eeb9ca1193994e8988f59f7d39aa09afb7c"},a("div",{key:"33b50ee8b32c70855ec061a0fb9747203f473a62",class:"container",style:this.styles},a("cura-input-text",{key:"8c3d0254c3b6dcd0b24a5c5a27e1b4aeda4c83df",label:this.label,name:this.name,status:this.status,value:this.value,onFocus:()=>this.showCalendar(),size:this.size,"icon-name":this.iconName,placeholder:this.dateSettings.placeholder,"mask-preset":this.dateSettings.mask,"enable-selection-mode":!0,onKeyUp:t=>this.handleInputDates(t),autocomplete:"off",onValueChange:t=>this.handleChangeDates(t)},this.renderCalendarOrHelperText())))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{enableRangeDates:[{updateDateSettings:0}]}}static get style(){return":host{display:block}.container{display:flex;flex-direction:column;position:relative}.container .calendar{padding:0px calc(var(--cura-spacing-base) * 3px);margin-top:-8px;border-radius:0px 0px 4px 4px;border-top:0px;border-right:2px solid #D4D4D4;border-bottom:2px solid #D4D4D4;border-left:2px solid #D4D4D4;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;top:100%;z-index:10;display:none;opacity:0;pointer-events:none}.container .calendar.visible{box-sizing:border-box;display:block;opacity:1;pointer-events:all;width:100%;background-color:#fff}"}},[65,"cura-input-date",{label:[513],status:[1537],size:[513],name:[513],helperText:[513,"helper-text"],enableRangeDates:[516,"enable-range-dates"],disableFutureDates:[516,"disable-future-dates"],disablePassDates:[516,"disable-pass-dates"],iconName:[513,"icon-name"],placeholder:[513],calendarType:[513,"calendar-type"],styles:[32],isCalendarVisible:[32],dates:[32],value:[32],dateSettings:[32]},[[8,"click","handleClick"]],{enableRangeDates:[{updateDateSettings:0}]}]),g=f,x=function(){"undefined"!=typeof customElements&&["cura-input-date","cura-button-transparent","cura-calendar","cura-icon","cura-input-text","cura-label","cura-loader-circle","cura-select","cura-select-option"].forEach((t=>{switch(t){case"cura-input-date":customElements.get(r(t))||customElements.define(r(t),f);break;case"cura-button-transparent":customElements.get(r(t))||n();break;case"cura-calendar":customElements.get(r(t))||c();break;case"cura-icon":customElements.get(r(t))||d();break;case"cura-input-text":customElements.get(r(t))||h();break;case"cura-label":customElements.get(r(t))||u();break;case"cura-loader-circle":customElements.get(r(t))||p();break;case"cura-select":customElements.get(r(t))||m();break;case"cura-select-option":customElements.get(r(t))||b()}}))};export{g as CuraInputDate,x as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-B8xnU6YS.js";const p=o,r=s;export{p as CuraInputText,r as defineCustomElement}
1
+ import{C as o,d as s}from"./p-BJafC0R3.js";const a=o,p=s;export{a as CuraInputText,p as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as r}from"./p-BSdkRryc.js";const s=o,p=r;export{s as CuraLabel,p as defineCustomElement}
1
+ import{C as o,d as s}from"./p-Cm1Vfoc6.js";const m=o,p=s;export{m as CuraLabel,p as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-CCkEqDZb.js";const p=o,r=s;export{p as CuraLoaderBar,r as defineCustomElement}
1
+ import{C as o,d as s}from"./p-BGBnVlL3.js";const p=o,r=s;export{p as CuraLoaderBar,r as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-Bf21UQXV.js";const p=o,r=s;export{p as CuraLoaderCircle,r as defineCustomElement}
1
+ import{C as o,d as s}from"./p-nqT7t82E.js";const t=o,p=s;export{t as CuraLoaderCircle,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as a,H as t,k as e,i as s,j as o,t as i}from"./p-DBXUEjWh.js";import{d as r}from"./p-DXlGQp3a.js";import{d as c}from"./p-fn4zJrKE.js";import{d as n}from"./p-BSdkRryc.js";import{d as l}from"./p-Bf21UQXV.js";const d=a(class extends t{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.modalClose=e(this,"modalClose"),this.open=!1,this.background="light",this.top=0,this.bottom=0,this.left=0,this.right=0,this.mobileCloseLabel="Fechar",this.canClose=!0,this.zindex="100",this.styles={},this.handleCloseOnEsc=a=>{"Escape"===a.key&&this.open&&this.canClose&&(this.open=!1,this.modalClose.emit())},this.handleClose=()=>{this.canClose&&(this.modalClose.emit(),this.open=!1)}}setColors(){const a={dark:window.CuraAPI.theme.colors.getColor("neutral-black",.4),light:window.CuraAPI.theme.colors.getColor("primary-darker",.8)};this.styles=Object.assign(Object.assign({},this.styles),{"--background-color":a[this.background]})}setOffset(a,t){this.styles=Object.assign(Object.assign({},this.styles),{[`--${a}-offset`]:t+"px"})}setTop(){this.setOffset("top",this.top)}setBottom(){this.setOffset("bottom",this.bottom)}setLeft(){this.setOffset("left",this.left)}setRight(){this.setOffset("right",this.right)}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-light":window.CuraAPI.theme.colors.getColor("neutral-light"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors(),this.setTop(),this.setBottom(),this.setLeft(),this.setRight()}disconnectedCallback(){window.removeEventListener("keydown",this.handleCloseOnEsc)}componentDidLoad(){window.addEventListener("keydown",this.handleCloseOnEsc)}render(){return s(o,{key:"a6f81dd34ff6bea8c00a6ea08ba2967d8b37890b",role:"dialog","aria-modal":"true",style:{"--zIndex":this.zindex}},s("div",{key:"87c8a89c0ae261fd6d8ed8259ed4a18b92a6bf55",class:this.open?"modal container open":"modal container",style:this.styles},s("div",{key:"1377054aaf87f31e2f27a32b813f21a3227a0679",class:this.open?"modal backdrop open":"modal backdrop",onClick:this.canClose?this.handleClose:void 0}),s("div",{key:"b8764e38f17fc18f6390b1454f73adc5b0f28024",class:"wrapper"},this.canClose&&s("div",{key:"e3b741e2885d879368b041c0da3ffa8ff1f6b1c4",class:"close desktop"},s("cura-button-transparent",{key:"5c85f8cb21415741e3af4ab8833b031597faed50",iconName:"close",color:"error",size:"small",onClick:this.handleClose,iconOnly:!0})),s("slot",{key:"fd0b51474b2fc973ad1dd6b626f42726e0972afb"}),this.canClose&&s("div",{key:"da7b3e03af84967a38f398cde77495d6baa8af35",class:"close mobile",onClick:this.handleClose},s("cura-button-transparent",{key:"d95e7ed4963e6ad678dca0b23e5fdfb609dc7f6f",color:"error",iconName:"close",size:"small"},this.mobileCloseLabel)))))}static get watchers(){return{background:[{setColors:0}],top:[{setTop:0}],bottom:[{setBottom:0}],left:[{setLeft:0}],right:[{setRight:0}]}}static get style(){return":host{display:block}.modal{position:fixed;height:100%;width:100%;top:var(--top-offset);bottom:var(--bottom-offset);left:var(--left-offset);right:var(--right-offset);z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:var(--zIndex)}.modal.open .backdrop,.modal.open .wrapper{opacity:1;visibility:visible;animation:fadeIn 0.3s ease-out}.container{display:flex;align-items:center;justify-content:center}.backdrop,.wrapper{opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.backdrop{background-color:var(--background-color);z-index:calc(var(--zIndex) - 10);animation:fadeIn 0.3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-light);border-radius:calc(var(--cura-spacing-base) * 3px);max-width:600px;min-width:200px;padding:calc(calc(var(--cura-spacing-base) * 1px) / 2) calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px);z-index:var(--zIndex);box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12));transform:scale(0.95);transition:transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease}.wrapper ::slotted(*){max-height:80vh;overflow:auto;padding-right:calc(var(--cura-spacing-base) * 5px)}.modal.open .wrapper{transform:scale(1);opacity:1;visibility:visible}.close{justify-self:flex-end;padding-top:calc(var(--cura-spacing-base) * 4px);background:none;border:none;cursor:pointer}.close.mobile{display:none}.close.desktop{display:flex;padding:0;margin-right:-8px}@media (max-width: 768px){.wrapper{position:fixed;bottom:0px;width:80%;padding-top:calc(var(--cura-spacing-base) * 4px);padding-bottom:0px;border-radius:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px) 0px 0px;border-bottom:none}.close{align-items:center;border-top:1px dashed var(--neutral-light);margin-top:calc(var(--cura-spacing-base) * 4px);padding:calc(var(--cura-spacing-base) * 2px) 0px;justify-content:center;width:100%}.close.mobile{display:flex;gap:calc(var(--cura-spacing-base) * 2px)}.close.desktop{display:none}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}"}},[257,"cura-modal",{open:[1540],background:[1],top:[2],bottom:[2],left:[2],right:[2],mobileCloseLabel:[513,"mobile-close-label"],canClose:[516,"can-close"],zindex:[513],styles:[32]},void 0,{background:[{setColors:0}],top:[{setTop:0}],bottom:[{setBottom:0}],left:[{setLeft:0}],right:[{setRight:0}]}]),p=d,b=function(){"undefined"!=typeof customElements&&["cura-modal","cura-button-transparent","cura-icon","cura-label","cura-loader-circle"].forEach((a=>{switch(a){case"cura-modal":customElements.get(i(a))||customElements.define(i(a),d);break;case"cura-button-transparent":customElements.get(i(a))||r();break;case"cura-icon":customElements.get(i(a))||c();break;case"cura-label":customElements.get(i(a))||n();break;case"cura-loader-circle":customElements.get(i(a))||l()}}))};export{p as CuraModal,b as defineCustomElement}
1
+ import{p as a,H as t,k as e,i as s,j as o,t as i}from"./p-DBXUEjWh.js";import{d as r}from"./p-BXFxWVl3.js";import{d as c}from"./p-DI66_jP6.js";import{d as n}from"./p-Cm1Vfoc6.js";import{d as l}from"./p-nqT7t82E.js";const d=a(class extends t{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.modalClose=e(this,"modalClose"),this.open=!1,this.background="light",this.top=0,this.bottom=0,this.left=0,this.right=0,this.mobileCloseLabel="Fechar",this.canClose=!0,this.zindex="100",this.styles={},this.handleCloseOnEsc=a=>{"Escape"===a.key&&this.open&&this.canClose&&(this.open=!1,this.modalClose.emit())},this.handleClose=()=>{this.canClose&&(this.modalClose.emit(),this.open=!1)}}setColors(){const a={dark:window.CuraAPI.theme.colors.getColor("neutral-black",.4),light:window.CuraAPI.theme.colors.getColor("primary-darker",.8)};this.styles=Object.assign(Object.assign({},this.styles),{"--background-color":a[this.background]})}setOffset(a,t){this.styles=Object.assign(Object.assign({},this.styles),{[`--${a}-offset`]:t+"px"})}setTop(){this.setOffset("top",this.top)}setBottom(){this.setOffset("bottom",this.bottom)}setLeft(){this.setOffset("left",this.left)}setRight(){this.setOffset("right",this.right)}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-light":window.CuraAPI.theme.colors.getColor("neutral-light"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors(),this.setTop(),this.setBottom(),this.setLeft(),this.setRight()}disconnectedCallback(){window.removeEventListener("keydown",this.handleCloseOnEsc)}componentDidLoad(){window.addEventListener("keydown",this.handleCloseOnEsc)}render(){return s(o,{key:"add6ff0d9e7596282547b9632a10d6b36ce2dd77",role:"dialog","aria-modal":"true",style:{"--zIndex":this.zindex}},s("div",{key:"0ea813bd986b4cb0e87f31511d600bc88f922d66",class:this.open?"modal container open":"modal container",style:this.styles},s("div",{key:"90ace6e14ed40371839a784d82c4370cff9c8bc2",class:this.open?"modal backdrop open":"modal backdrop",onClick:this.canClose?this.handleClose:void 0}),s("div",{key:"1593d59bed08050004b638379194f331518e93ad",class:"wrapper"},this.canClose&&s("div",{key:"348678020334e6f60794e9a22c9aa570deb32411",class:"close desktop"},s("cura-button-transparent",{key:"bcaed0130dfe074cf23a244a71138243362c6706",iconName:"close",color:"error",size:"small",onClick:this.handleClose,iconOnly:!0})),s("slot",{key:"e34ea51fa11116b235911b7303b7d2f2a70dabd7"}),this.canClose&&s("div",{key:"a262c02432b56a149773e601f14dadc05d09e64f",class:"close mobile",onClick:this.handleClose},s("cura-button-transparent",{key:"c72a85bc5a3c121829bfe6e509523811ca36e317",color:"error",iconName:"close",size:"small"},this.mobileCloseLabel)))))}static get watchers(){return{background:[{setColors:0}],top:[{setTop:0}],bottom:[{setBottom:0}],left:[{setLeft:0}],right:[{setRight:0}]}}static get style(){return":host{display:block}.modal{position:fixed;height:100%;width:100%;top:var(--top-offset);bottom:var(--bottom-offset);left:var(--left-offset);right:var(--right-offset);z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:var(--zIndex)}.modal.open .backdrop,.modal.open .wrapper{opacity:1;visibility:visible;animation:fadeIn 0.3s ease-out}.container{display:flex;align-items:center;justify-content:center}.backdrop,.wrapper{opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.backdrop{background-color:var(--background-color);z-index:calc(var(--zIndex) - 10);animation:fadeIn 0.3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-light);border-radius:calc(var(--cura-spacing-base) * 3px);max-width:600px;min-width:200px;padding:calc(calc(var(--cura-spacing-base) * 1px) / 2) calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px);z-index:var(--zIndex);box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12));transform:scale(0.95);transition:transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease}.wrapper ::slotted(*){max-height:80vh;overflow:auto;padding-right:calc(var(--cura-spacing-base) * 5px)}.modal.open .wrapper{transform:scale(1);opacity:1;visibility:visible}.close{justify-self:flex-end;padding-top:calc(var(--cura-spacing-base) * 4px);background:none;border:none;cursor:pointer}.close.mobile{display:none}.close.desktop{display:flex;padding:0;margin-right:-8px}@media (max-width: 768px){.wrapper{position:fixed;bottom:0px;width:80%;padding-top:calc(var(--cura-spacing-base) * 4px);padding-bottom:0px;border-radius:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px) 0px 0px;border-bottom:none}.close{align-items:center;border-top:1px dashed var(--neutral-light);margin-top:calc(var(--cura-spacing-base) * 4px);padding:calc(var(--cura-spacing-base) * 2px) 0px;justify-content:center;width:100%}.close.mobile{display:flex;gap:calc(var(--cura-spacing-base) * 2px)}.close.desktop{display:none}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}"}},[257,"cura-modal",{open:[1540],background:[1],top:[2],bottom:[2],left:[2],right:[2],mobileCloseLabel:[513,"mobile-close-label"],canClose:[516,"can-close"],zindex:[513],styles:[32]},void 0,{background:[{setColors:0}],top:[{setTop:0}],bottom:[{setBottom:0}],left:[{setLeft:0}],right:[{setRight:0}]}]),p=d,b=function(){"undefined"!=typeof customElements&&["cura-modal","cura-button-transparent","cura-icon","cura-label","cura-loader-circle"].forEach((a=>{switch(a){case"cura-modal":customElements.get(i(a))||customElements.define(i(a),d);break;case"cura-button-transparent":customElements.get(i(a))||r();break;case"cura-icon":customElements.get(i(a))||c();break;case"cura-label":customElements.get(i(a))||n();break;case"cura-loader-circle":customElements.get(i(a))||l()}}))};export{p as CuraModal,b as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,i as a,j as d,t as i}from"./p-DBXUEjWh.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.contentwidth="default"}connectedCallback(){this.styles={"--spacing":window.CuraAPI.theme.spacing.getSpacing()}}getClasses(){const e={};return e[this.contentwidth.toLowerCase()]=!0,e}render(){return a(d,{key:"a3b743b1f518ece009858e39716903869184d627"},a("div",{key:"f3f29d5306f612c197ded53885bbf598a377388a",style:this.styles,class:"grid-template"},a("div",{key:"2329343b116c6bfb8f35a146bbab6b9460e50cbe",id:"sub-header"},a("slot",{key:"b27e5dd020099fc64636a0ab363003024315cff6",name:"sub-header"})),a("div",{key:"45bcb4f1a574c2c0d8337635729bd603df399f20",id:"header"},a("slot",{key:"27bcdc8a59b717ab1c4a021b629a5c4a6a285f8a",name:"header"})),a("div",{key:"b19ae447a53c43d2f46127b0e38e115b792bec6b",id:"pre-content"},a("slot",{key:"b37745e63e57ad2c48cf430849b2d64c71d2b45e",name:"pre-content"})),a("div",{key:"4adbaacd79ebb4e5e5fae0233acba2b7215a74ce",id:"content-container",class:this.getClasses()},a("div",{key:"17a7d806d6a24fe67f249cfca2fce466861e25f5",id:"sidebar-left"},a("slot",{key:"6fa66175bf7e0953ce23c6c557297d6f2efb9439",name:"sidebar-left"})),a("div",{key:"450c3a5a742d40d26ccdc672c855b2f9f9ae3153",id:"content"},a("slot",{key:"ce593020ba6d60ca8a2ddd835deb8c8a4b0e33a1",name:"content"}),a("slot",{key:"1cc8b4478d78e3c6985e811cd0d1b510f00edf1b"})),a("div",{key:"4497faf9a880a4ae0eaa3f097ca02d3a155a4496",id:"sidebar-right"},a("slot",{key:"97dd82f3f0b83f93334a9ca896ace76521ab05fb",name:"sidebar-right"}))),a("div",{key:"80fb43c7b84bdc2c0722dbada31024d477326d0a",id:"post-body"},a("slot",{key:"3975794bdbefe5fd0e05d06af7715e13ff650338",name:"post-body"})),a("div",{key:"08183669839fce4b448bef3f6489fc6d8c61e898",id:"footer"},a("slot",{key:"9b1797aecc9fd4131944a70371fab08b239f0802",name:"footer"})),a("div",{key:"3e9ea1d173490ee3bf941439fad80814d3a5daf2",id:"sub-footer"},a("slot",{key:"4b0c6a8d6f4b548040195003e8b5574c83541508",name:"sub-footer"}))))}get host(){return this}static get style(){return':host{display:block}:host .grid-template{display:grid;grid-template-rows:auto;grid-template-columns:auto;grid-template-areas:"sub-header" "header" "pre-content" "content-container" "post-body" "footer" "sub-footer"}:host .grid-template #sub-header{grid-area:sub-header}:host .grid-template #header{grid-area:header}:host .grid-template #pre-content{grid-area:pre-content}:host .grid-template #content-container{grid-area:content-container}:host .grid-template #post-body{grid-area:post-body}:host .grid-template #footer{grid-area:footer}:host .grid-template #sub-footer{grid-area:sub-footer}@media (max-width: 768px){:host .grid-template{padding:0px}}@media (min-width: 769px) and (max-width: 992px){:host .grid-template{padding:0px}}@media (min-width: 993px) and (max-width: 1920px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 5px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 5px)}:host .grid-template #content-container{display:flex}:host .grid-template #content-container #content{flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}}@media (min-width: 1921px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 7px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 7px)}:host .grid-template #content-container{display:flex}:host .grid-template #content-container #content{flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}:host .grid-template #content-container.centered{max-width:1921px;justify-self:center}}'}},[257,"cura-page-template",{contentwidth:[513]}]),o=r,n=function(){"undefined"!=typeof customElements&&["cura-page-template"].forEach((e=>{"cura-page-template"===e&&(customElements.get(i(e))||customElements.define(i(e),r))}))};export{o as CuraPageTemplate,n as defineCustomElement}
1
+ import{p as e,H as t,i as a,j as d,t as i}from"./p-DBXUEjWh.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.contentwidth="default"}connectedCallback(){this.styles={"--spacing":window.CuraAPI.theme.spacing.getSpacing()}}getClasses(){const e={};return e[this.contentwidth.toLowerCase()]=!0,e}render(){return a(d,{key:"65ceac57166149f686508dd56d865092406afe4d"},a("div",{key:"c78f1ef93fd52b43285fa3b39d203db258c1bf31",style:this.styles,class:"grid-template"},a("div",{key:"cfb99058f718560bf2679e13266bf6e1447cfb1e",id:"sub-header"},a("slot",{key:"ddd2aaeb147cad4e92e16dda69f757d9aa261e2c",name:"sub-header"})),a("div",{key:"c3d87f2c1d68d08e2c46730d731e03a17e0c355d",id:"header"},a("slot",{key:"a681e8d1c9c379be1c18278811d7e99455ad0a8b",name:"header"})),a("div",{key:"aee6e5920384ecdbf0c8adb358a431e304f612de",id:"pre-content"},a("slot",{key:"4e554925885a9f8200fe8cb7b35e438e6a7dd1e8",name:"pre-content"})),a("div",{key:"30f1f9aeb3a58fb390716dec7f5855fdcc1cc82d",id:"content-container",class:this.getClasses()},a("div",{key:"259ab99ca0ec43a86536c3c188429a555eebbd45",id:"sidebar-left"},a("slot",{key:"ff359698c0b452776e558234b46745dd40746edc",name:"sidebar-left"})),a("div",{key:"14338cdc57d8ee6cfb5ca15fd5ed8fe276d83bea",id:"content"},a("slot",{key:"ea4f4a5423bf061880d580e86f015907ee5929ea",name:"content"}),a("slot",{key:"ddf40946d828b0de102e9fc21ee99201dc36342b"})),a("div",{key:"c207b0c2280033f71c2b7803b1ae9ec017ab2b5c",id:"sidebar-right"},a("slot",{key:"fd15c1b0ce197f7de9e72827dca3c1d4736b4219",name:"sidebar-right"}))),a("div",{key:"fd02b69336b4d6920975bf1a8b4a7c8a957e65d6",id:"post-body"},a("slot",{key:"205b2283d6fff54f3e3be4ed9b2b64b05c985601",name:"post-body"})),a("div",{key:"4602dc880efe376c9a951237c43ebcb6723499db",id:"footer"},a("slot",{key:"ed9314b5192194cea91dab7fc6efdbfb198016fc",name:"footer"})),a("div",{key:"53b5bd4b187a0ae6657bccfb8626a5d335bdeb73",id:"sub-footer"},a("slot",{key:"8b086fb200223ff0bf5acd2266da3ae47cc30269",name:"sub-footer"}))))}get host(){return this}static get style(){return':host{display:block}:host .grid-template{display:grid;grid-template-rows:auto;grid-template-columns:auto;grid-template-areas:"sub-header" "header" "pre-content" "content-container" "post-body" "footer" "sub-footer"}:host .grid-template #sub-header{grid-area:sub-header}:host .grid-template #header{grid-area:header}:host .grid-template #pre-content{grid-area:pre-content}:host .grid-template #content-container{grid-area:content-container}:host .grid-template #post-body{grid-area:post-body}:host .grid-template #footer{grid-area:footer}:host .grid-template #sub-footer{grid-area:sub-footer}@media (max-width: 768px){:host .grid-template{padding:0px}}@media (min-width: 769px) and (max-width: 992px){:host .grid-template{padding:0px}}@media (min-width: 993px) and (max-width: 1920px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 5px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 5px)}:host .grid-template #content-container{display:flex}:host .grid-template #content-container #content{flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}}@media (min-width: 1921px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 7px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 7px)}:host .grid-template #content-container{display:flex}:host .grid-template #content-container #content{flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}:host .grid-template #content-container.centered{max-width:1921px;justify-self:center}}'}},[257,"cura-page-template",{contentwidth:[513]}]),o=r,c=function(){"undefined"!=typeof customElements&&["cura-page-template"].forEach((e=>{"cura-page-template"===e&&(customElements.get(i(e))||customElements.define(i(e),r))}))};export{o as CuraPageTemplate,c as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-D7WNwjv-.js";const p=o,r=s;export{p as CuraParagraph,r as defineCustomElement}
1
+ import{C as r,d as o}from"./p-Bac-rr_f.js";const s=r,a=o;export{s as CuraParagraph,a as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-CG1lz5DR.js";const p=o,r=s;export{p as CuraProgressBar,r as defineCustomElement}
1
+ import{C as o,d as s}from"./p-CalvBU-U.js";const a=o,p=s;export{a as CuraProgressBar,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as r,H as e,k as a,i as s,j as t,t as o}from"./p-DBXUEjWh.js";import{f as i}from"./p-Dot54hbB.js";import{d as c}from"./p-BSdkRryc.js";import{d}from"./p-D7WNwjv-.js";const l=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.onchange=a(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.status="default",this.disabled=!1,this.required=!1,this.label="",this.position="left",this.value="",this.name="",this.background="light",this.size="medium",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.sizes={large:{size:20},medium:{size:14},small:{size:10}},this.isDarkbackground=()=>"dark"===this.background,this.handleClick=()=>{this.disabled||(this.checked=!this.checked,this.internals.setFormValue(this.value),this.onchange.emit({value:this.value,checked:this.checked}))}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-after":this.sizes[this.size].size+"px","--size":i[this.size].size+"px","--gap":i[this.size].gap+"px"})}setColors(){[{name:"--info-base",background:"info-base"},{name:"--color-light",background:this.color+"-light"},{name:"--color-base",background:this.color+"-base"},{name:"--color-dark",background:this.color+"-dark"},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--error-lighter",background:"error-lighter"},{name:"--error-base",background:"error-base"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--primary-base-neutral-white",background:this.isDarkbackground()?"primary-base":"neutral-white"},{name:"--primary-darker-neutral-white",background:this.isDarkbackground()?"primary-darker":"neutral-white"},{name:"--primary-darker-neutral-base",background:this.isDarkbackground()?"primary-darker":"neutral-base"},{name:"--primary-base-neutral-base",background:this.isDarkbackground()?"primary-base":"neutral-base"},{name:"--primary-base-neutral-dark",background:this.isDarkbackground()?"primary-base":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--success-base-dark",background:this.isDarkbackground()?"success-base":"success-dark"},{name:"--error-base-dark",background:this.isDarkbackground()?"error-base":"error-dark"}].forEach((r=>{this.styles[r.name]=window.CuraAPI.theme.colors.getColor(r.background)})),this.styles=Object.assign({},this.styles)}formAssociatedCallback(r){r.ariaLabel=this.label}formStateRestoreCallback(r){this.value=r.value,this.checked=r.checked,this.internals.setFormValue(this.value)}formResetCallback(){this.value="",this.checked=!1,this.internals.setValidity({}),this.internals.setFormValue(this.value)}formDisabledCallback(r){this.disabled=r}connectedCallback(){this.sizeHandler(),this.setColors()}getClasses(){const r={container:!0};return r.checked=this.checked,r.disabled=this.disabled,r.position="right"===this.position,r[this.status]=!0,r}assignColor(r){return this.disabled?this.isDarkbackground()?"primary-darker":"neutral-medium":{success:{label:this.isDarkbackground()?"success-lighter":"success-darker",message:this.isDarkbackground()?"success-base":"success-dark"},error:{label:this.isDarkbackground()?"error-lighter":"neutral-darker",message:this.isDarkbackground()?"error-base":"error-dark"},default:{label:this.isDarkbackground()?"neutral-white":"neutral-black",message:this.isDarkbackground()?"primary-lighter":"neutral-dark"}}[this.status][r]}render(){return s(t,{key:"550e164f2be33f4fdad6c194302723a00e51843c",role:"radio","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},s("div",{key:"ebcfef353b7dd4655b1d809025060db952927521",class:this.getClasses(),style:this.styles,onClick:this.handleClick},s("div",{key:"436ecc0f4fd72ff6a00a2a47f494e08aae65b3d6",class:"info"},s("div",{key:"4836e4ce83d1fc3b338cfd216b46a7791ba6dc90",class:"label-wrapper"},s("cura-label",{key:"434f0b816eee11b7da0b44f37880e31c52e2f853",textOverflow:this.overflowLabel,class:"label"+("single"===this.overflowLabel?" textoverflow-single":""),size:"large"===this.size?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&s("cura-paragraph",{key:"1d06464488947f469abd5c3d1c25ebb2ed63a5bd",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),s("cura-label",{key:"508bb787d2da5d25de48516ed64d6b02c94d8546",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},s("slot",{key:"f35d5c895f74ec02987474e71df9a5067ea51e70"}))),s("input",{key:"fbd6ba47d6e8a9c812ad986964749507f9d33d62",type:"radio",class:"radio "+this.size.toLocaleLowerCase(),name:this.name,value:this.value,required:this.required,tabIndex:this.ontabindex,disabled:this.disabled,checked:this.checked})))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;box-sizing:border-box;min-width:0;}:host .container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}:host .position.container{flex-direction:row}:host .position .label-wrapper{justify-content:end}:host .position .message{text-align:right}:host .position .label{order:1}:host .label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}:host .info{display:flex;flex-direction:column;overflow:hidden}:host .label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}:host .control{width:fit-content;cursor:pointer;position:relative}:host .radio{margin:0;appearance:none;-webkit-appearance:none;-moz-appearance:none;border-radius:50%;border:2px solid var(--primary-base-neutral-medium);background:var(--neutral-purewhite);box-sizing:border-box;transition:border-color 0.3s;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--size);height:var(--size);flex:0 0 var(--size)}:host .radio::after{content:"";background:var(--color-base-light);border-radius:50%;opacity:0;transition:opacity 0.3s;width:var(--size-after);height:var(--size-after)}:host .radio:focus{border-color:var(--info-base) !important}:host .success .radio{border-color:var(--success-base);background:var(--success-lighter)}:host .success .radio:hover{border-color:var(--success-base) !important}:host .success.checked .radio{border-color:var(--success-base)}:host .success.checked .radio::after{background:var(--success-base)}:host .success.checked .radio:hover{background:var(--success-lighter) !important;border-color:var(--success-base) !important}:host .success.checked .radio:hover::after{background:var(--success-base) !important}:host .error .radio{border-color:var(--error-base);background:var(--error-lighter)}:host .error .radio:hover{border-color:var(--error-base) !important}:host .error.checked .radio{border-color:var(--error-base)}:host .error.checked .radio::after{background:var(--error-base)}:host .error.checked .radio:hover{background:var(--error-lighter) !important;border-color:var(--error-base) !important}:host .error.checked .radio:hover::after{background:var(--error-base) !important}:host .checked .radio::after{opacity:1;background:var(--color-base)}:host .checked .radio{border-color:var(--color-dark)}:host .checked .radio:hover{border-color:var(--color-light) !important}:host .checked .radio:hover::after{background:var(--color-light)}:host .disabled .radio{background:var(--primary-base-neutral-white);border-color:var(--primary-darker-neutral-base);cursor:not-allowed}:host .disabled .radio::after{background:var(--neutral-lighter)}:host .disabled.checked .radio{border-color:var(--primary-base-neutral-base) !important;background:var(--primary-darker-neutral-white) !important}:host .disabled.checked .radio::after{background:var(--primary-base-neutral-base) !important}:host :not(.disabled):not(.checked) .radio:hover{border-color:var(--primary-base-neutral-dark)}'}},[321,"cura-radio",{checked:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],background:[1],size:[1],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}]}]),h=l,n=function(){"undefined"!=typeof customElements&&["cura-radio","cura-label","cura-paragraph"].forEach((r=>{switch(r){case"cura-radio":customElements.get(o(r))||customElements.define(o(r),l);break;case"cura-label":customElements.get(o(r))||c();break;case"cura-paragraph":customElements.get(o(r))||d()}}))};export{h as CuraRadio,n as defineCustomElement}
1
+ import{p as r,H as e,k as a,i as s,j as t,t as o}from"./p-DBXUEjWh.js";import{f as i}from"./p-Dot54hbB.js";import{d as c}from"./p-Cm1Vfoc6.js";import{d}from"./p-Bac-rr_f.js";const l=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.onchange=a(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.status="default",this.disabled=!1,this.required=!1,this.label="",this.position="left",this.value="",this.name="",this.background="light",this.size="medium",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.sizes={large:{size:20},medium:{size:14},small:{size:10}},this.isDarkbackground=()=>"dark"===this.background,this.handleClick=()=>{this.disabled||(this.checked=!this.checked,this.internals.setFormValue(this.value),this.onchange.emit({value:this.value,checked:this.checked}))}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-after":this.sizes[this.size].size+"px","--size":i[this.size].size+"px","--gap":i[this.size].gap+"px"})}setColors(){[{name:"--info-base",background:"info-base"},{name:"--color-light",background:this.color+"-light"},{name:"--color-base",background:this.color+"-base"},{name:"--color-dark",background:this.color+"-dark"},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--error-lighter",background:"error-lighter"},{name:"--error-base",background:"error-base"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--primary-base-neutral-white",background:this.isDarkbackground()?"primary-base":"neutral-white"},{name:"--primary-darker-neutral-white",background:this.isDarkbackground()?"primary-darker":"neutral-white"},{name:"--primary-darker-neutral-base",background:this.isDarkbackground()?"primary-darker":"neutral-base"},{name:"--primary-base-neutral-base",background:this.isDarkbackground()?"primary-base":"neutral-base"},{name:"--primary-base-neutral-dark",background:this.isDarkbackground()?"primary-base":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--success-base-dark",background:this.isDarkbackground()?"success-base":"success-dark"},{name:"--error-base-dark",background:this.isDarkbackground()?"error-base":"error-dark"}].forEach((r=>{this.styles[r.name]=window.CuraAPI.theme.colors.getColor(r.background)})),this.styles=Object.assign({},this.styles)}formAssociatedCallback(r){r.ariaLabel=this.label}formStateRestoreCallback(r){this.value=r.value,this.checked=r.checked,this.internals.setFormValue(this.value)}formResetCallback(){this.value="",this.checked=!1,this.internals.setValidity({}),this.internals.setFormValue(this.value)}formDisabledCallback(r){this.disabled=r}connectedCallback(){this.sizeHandler(),this.setColors()}getClasses(){const r={container:!0};return r.checked=this.checked,r.disabled=this.disabled,r.position="right"===this.position,r[this.status]=!0,r}assignColor(r){return this.disabled?this.isDarkbackground()?"primary-darker":"neutral-medium":{success:{label:this.isDarkbackground()?"success-lighter":"success-darker",message:this.isDarkbackground()?"success-base":"success-dark"},error:{label:this.isDarkbackground()?"error-lighter":"neutral-darker",message:this.isDarkbackground()?"error-base":"error-dark"},default:{label:this.isDarkbackground()?"neutral-white":"neutral-black",message:this.isDarkbackground()?"primary-lighter":"neutral-dark"}}[this.status][r]}render(){return s(t,{key:"3b4001cf9d095153254069f9865d865f8570c74f",role:"radio","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},s("div",{key:"2a60ebf8f84ab618580b924bf1a2ce9acf70ed81",class:this.getClasses(),style:this.styles,onClick:this.handleClick},s("div",{key:"b1bf673d26f9651696fe5e705f4978eda14e25f6",class:"info"},s("div",{key:"3f0cb6742da331c137c62b647a713781b57d25b2",class:"label-wrapper"},s("cura-label",{key:"a4bcd0b9b9265db0c7c13a47924ba6b253b01f25",textOverflow:this.overflowLabel,class:"label"+("single"===this.overflowLabel?" textoverflow-single":""),size:"large"===this.size?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&s("cura-paragraph",{key:"821198baf60494203af757451e892a79afde3e2b",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),s("cura-label",{key:"8859c2fd4e77342b1884283977b109c714fc32e6",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},s("slot",{key:"313feac58eee6ee2d2b3656d0fb971be7fc43481"}))),s("input",{key:"f9bd494bbe59443d7bacf31dafb2f516591ad596",type:"radio",class:"radio "+this.size.toLocaleLowerCase(),name:this.name,value:this.value,required:this.required,tabIndex:this.ontabindex,disabled:this.disabled,checked:this.checked})))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;box-sizing:border-box;min-width:0;}:host .container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}:host .position.container{flex-direction:row}:host .position .label-wrapper{justify-content:end}:host .position .message{text-align:right}:host .position .label{order:1}:host .label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}:host .info{display:flex;flex-direction:column;overflow:hidden}:host .label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}:host .control{width:fit-content;cursor:pointer;position:relative}:host .radio{margin:0;appearance:none;-webkit-appearance:none;-moz-appearance:none;border-radius:50%;border:2px solid var(--primary-base-neutral-medium);background:var(--neutral-purewhite);box-sizing:border-box;transition:border-color 0.3s;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--size);height:var(--size);flex:0 0 var(--size)}:host .radio::after{content:"";background:var(--color-base-light);border-radius:50%;opacity:0;transition:opacity 0.3s;width:var(--size-after);height:var(--size-after)}:host .radio:focus{border-color:var(--info-base) !important}:host .success .radio{border-color:var(--success-base);background:var(--success-lighter)}:host .success .radio:hover{border-color:var(--success-base) !important}:host .success.checked .radio{border-color:var(--success-base)}:host .success.checked .radio::after{background:var(--success-base)}:host .success.checked .radio:hover{background:var(--success-lighter) !important;border-color:var(--success-base) !important}:host .success.checked .radio:hover::after{background:var(--success-base) !important}:host .error .radio{border-color:var(--error-base);background:var(--error-lighter)}:host .error .radio:hover{border-color:var(--error-base) !important}:host .error.checked .radio{border-color:var(--error-base)}:host .error.checked .radio::after{background:var(--error-base)}:host .error.checked .radio:hover{background:var(--error-lighter) !important;border-color:var(--error-base) !important}:host .error.checked .radio:hover::after{background:var(--error-base) !important}:host .checked .radio::after{opacity:1;background:var(--color-base)}:host .checked .radio{border-color:var(--color-dark)}:host .checked .radio:hover{border-color:var(--color-light) !important}:host .checked .radio:hover::after{background:var(--color-light)}:host .disabled .radio{background:var(--primary-base-neutral-white);border-color:var(--primary-darker-neutral-base);cursor:not-allowed}:host .disabled .radio::after{background:var(--neutral-lighter)}:host .disabled.checked .radio{border-color:var(--primary-base-neutral-base) !important;background:var(--primary-darker-neutral-white) !important}:host .disabled.checked .radio::after{background:var(--primary-base-neutral-base) !important}:host :not(.disabled):not(.checked) .radio:hover{border-color:var(--primary-base-neutral-dark)}'}},[321,"cura-radio",{checked:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],background:[1],size:[1],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}]}]),h=l,n=function(){"undefined"!=typeof customElements&&["cura-radio","cura-label","cura-paragraph"].forEach((r=>{switch(r){case"cura-radio":customElements.get(o(r))||customElements.define(o(r),l);break;case"cura-label":customElements.get(o(r))||c();break;case"cura-paragraph":customElements.get(o(r))||d()}}))};export{h as CuraRadio,n as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-BYA8glxD.js";const p=o,r=s;export{p as CuraSelectOption,r as defineCustomElement}
1
+ import{C as o,d as s}from"./p-BOQ-9WHP.js";const p=o,r=s;export{p as CuraSelectOption,r as defineCustomElement}
@@ -1 +1 @@
1
- import{C as o,d as s}from"./p-DxJedO3K.js";const p=o,r=s;export{p as CuraSelect,r as defineCustomElement}
1
+ import{C as o,d as s}from"./p-I4AXUk2V.js";const p=o,r=s;export{p as CuraSelect,r as defineCustomElement}
@@ -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 m}from"./p-BmMvoH-m.js";const s=o,p=m;export{s as CuraStepperItem,p 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-DbZtk_CM.js";import{d as o}from"./p-BFGkepgq.js";import{d as l}from"./p-DI66_jP6.js";import{d as c}from"./p-Cm1Vfoc6.js";import{d as n}from"./p-Bac-rr_f.js";import{d as p}from"./p-CalvBU-U.js";import{d as h}from"./p-BmMvoH-m.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 t,k as a,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-Cm1Vfoc6.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.onchange=a(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,t){return this.disabled?(this.isDarkbackground(),"neutral-dark"):this.isDarkbackground()?e:t}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:"73c935718e0bd39d49581d81de82f3d8dfbecf39",role:"switch","aria-checked":this.checked,"aria-disabled":this.disabled},r("div",{key:"f2d813e2c863fd869c1ea48f20155a30f7e9b5bd",class:this.getClasses(),style:this.styles,onClick:this.toggleSwitch},r("div",{key:"de3b927a6ff4f599c527a370b954872990ef3632",class:"info"},r("cura-label",{key:"71729b9f502baf0de6dba5b0d9592c28a420f41d",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:"54cc521cadd2d09cae1c5356858f20c5a18d3cf8",textOverflow:this.overflowHelper,style:{textAlign:"right"===this.position?"right":"left"},color:this.assignColor("primary-lighter","neutral-dark"),size:"xsmall",class:"message"},r("slot",{key:"57d9dbd78f8e5b30677ecca1c6ba83946b459d28"}))),r("div",{key:"03d28fd476865d02010fcf7cd5820f9e50b09015",class:"control"},r("div",{key:"5fc59727c27271cba5f63651373e1e99deb4f5b7",class:"track "+this.size.toLowerCase()},r("div",{key:"cae9983998d99333e85e0da6a66c24d79f79e591",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-BBtCzdwH.js";import{d as n}from"./p-DI66_jP6.js";import{d}from"./p-Cm1Vfoc6.js";const l=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:"e1b96aaf534d4a6c65f875413a0ad28b524c7d97",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},s("button",{key:"dd6436cf0820f4038dfda6f5a45bcdf828d342bd",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:"8bebb4e66694fbcedcd218cba0f13de2253ae587",size:t,color:e,lineHeight:"0",marginBlock:"0"},s("slot",{key:"b6fab707b8b4cab36131bfec148746e9459302e8"})),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=l,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),l);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))||d()}}))};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 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 o(a,{key:"19ab029f51ded1870e7a59518c57cd4270241ac9",role:"tablist",style:this.styles,class:this.getClasses()},o("slot",{key:"eda90f855125cfdee50efdb11ffd05ec83e7cfe0"}))}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"]]]),c=i,b=function(){"undefined"!=typeof customElements&&["cura-tabs-group"].forEach((t=>{"cura-tabs-group"===t&&(customElements.get(r(t))||customElements.define(r(t),i))}))};export{c as CuraTabsGroup,b as defineCustomElement}