@rededor/cura 2.0.0-alpha.12 → 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 (161) hide show
  1. package/dist/cjs/{cura-accordion_21.cjs.entry.js → cura-accordion_22.cjs.entry.js} +6923 -16
  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/index.cjs.js +1140 -0
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/collection/components/cura-calendar/cura-calendar.css +40 -1
  21. package/dist/collection/components/cura-calendar/cura-calendar.js +154 -3
  22. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +39 -1
  23. package/dist/collection/components/cura-calendar/cura-calendar.type.js +1 -0
  24. package/dist/collection/components/cura-card/cura-card.js +1 -1
  25. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-category/cura-dropdown-search-category.js +1 -1
  26. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js +1 -1
  27. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +1 -1
  28. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +1 -1
  29. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  30. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  31. package/dist/collection/components/cura-modal/cura-modal.js +1 -1
  32. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  33. package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +1 -1
  34. package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +1 -1
  35. package/dist/collection/components/cura-stepper/cura-stepper.js +1 -1
  36. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  37. package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
  38. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  39. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
  40. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  41. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  42. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  43. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  44. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  45. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  46. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  47. package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +1 -1
  48. package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +1 -1
  49. package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +1 -1
  50. package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +1 -1
  51. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  52. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  53. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  54. package/dist/collection/index.js +2 -0
  55. package/dist/components/cura-accordion-item.js +1 -1
  56. package/dist/components/cura-alert.js +1 -1
  57. package/dist/components/cura-badge-counter.js +1 -1
  58. package/dist/components/cura-badge-distance.js +1 -1
  59. package/dist/components/cura-badge-pill.js +1 -1
  60. package/dist/components/cura-button-outline.js +1 -1
  61. package/dist/components/cura-button-select.js +1 -1
  62. package/dist/components/cura-button-transparent.js +1 -1
  63. package/dist/components/cura-button.js +1 -1
  64. package/dist/components/cura-calendar.js +1 -1
  65. package/dist/components/cura-card.js +1 -1
  66. package/dist/components/cura-checkbox.js +1 -1
  67. package/dist/components/cura-display.js +1 -1
  68. package/dist/components/cura-dropdown-search-category.js +1 -1
  69. package/dist/components/cura-dropdown-search-not-found.js +1 -1
  70. package/dist/components/cura-dropdown-search-option.js +1 -1
  71. package/dist/components/cura-dropdown-search.js +1 -1
  72. package/dist/components/cura-heading.js +1 -1
  73. package/dist/components/cura-icon.js +1 -1
  74. package/dist/components/cura-icons-view.js +1 -1
  75. package/dist/components/cura-input-date.js +1 -1
  76. package/dist/components/cura-input-text.js +1 -1
  77. package/dist/components/cura-label.js +1 -1
  78. package/dist/components/cura-loader-bar.js +1 -1
  79. package/dist/components/cura-loader-circle.js +1 -1
  80. package/dist/components/cura-modal.js +1 -1
  81. package/dist/components/cura-page-template.js +1 -1
  82. package/dist/components/cura-paragraph.js +1 -1
  83. package/dist/components/cura-progress-bar.js +1 -1
  84. package/dist/components/cura-radio.js +1 -1
  85. package/dist/components/cura-select-option.js +1 -1
  86. package/dist/components/cura-select.js +1 -1
  87. package/dist/components/cura-stepper-item.js +1 -1
  88. package/dist/components/cura-stepper.js +1 -1
  89. package/dist/components/cura-switch.js +1 -1
  90. package/dist/components/cura-tabs-button.js +1 -1
  91. package/dist/components/cura-tabs-group.js +1 -1
  92. package/dist/components/cura-tabs-transparent.js +1 -1
  93. package/dist/components/cura-tabs.js +1 -1
  94. package/dist/components/cura-toast.js +1 -1
  95. package/dist/components/cura-tooltip.js +1 -1
  96. package/dist/components/index.js +1 -1
  97. package/dist/components/{p-B2RN7oe_.js → p-BBtCzdwH.js} +1 -1
  98. package/dist/components/{p-fR02COZb.js → p-BFGkepgq.js} +1 -1
  99. package/dist/components/{p-CCkEqDZb.js → p-BGBnVlL3.js} +1 -1
  100. package/dist/components/{p-B8xnU6YS.js → p-BJafC0R3.js} +1 -1
  101. package/dist/components/{p-BYA8glxD.js → p-BOQ-9WHP.js} +1 -1
  102. package/dist/components/{p-DXlGQp3a.js → p-BXFxWVl3.js} +1 -1
  103. package/dist/components/{p-D7WNwjv-.js → p-Bac-rr_f.js} +1 -1
  104. package/dist/components/{p-C7so9xnO.js → p-BmMvoH-m.js} +1 -1
  105. package/dist/components/p-CalvBU-U.js +1 -0
  106. package/dist/components/{p-BSdkRryc.js → p-Cm1Vfoc6.js} +1 -1
  107. package/dist/components/{p-fn4zJrKE.js → p-DI66_jP6.js} +1 -1
  108. package/dist/components/{p-D6xuYQiO.js → p-DbZtk_CM.js} +1 -1
  109. package/dist/components/{p-DxJedO3K.js → p-I4AXUk2V.js} +1 -1
  110. package/dist/components/{p-CpmZ68rD.js → p-Oyg5hynZ.js} +1 -1
  111. package/dist/components/p-nqT7t82E.js +1 -0
  112. package/dist/cura/cura.esm.js +1 -1
  113. package/dist/cura/index.esm.js +1 -1
  114. package/dist/cura/{p-b14ae206.entry.js → p-04b5c710.entry.js} +1 -1
  115. package/dist/cura/{p-bf99e8bf.entry.js → p-18a1cadf.entry.js} +1 -1
  116. package/dist/cura/{p-2e2e2b4d.entry.js → p-1ecb2249.entry.js} +1 -1
  117. package/dist/cura/{p-b7369d04.entry.js → p-2572a4f9.entry.js} +1 -1
  118. package/dist/cura/{p-42e72d12.entry.js → p-604f1c1d.entry.js} +1 -1
  119. package/dist/cura/{p-ddf4d240.entry.js → p-71fffffa.entry.js} +1 -1
  120. package/dist/cura/{p-c247c93b.entry.js → p-8b29b763.entry.js} +1 -1
  121. package/dist/cura/{p-9de85de6.entry.js → p-906c8b66.entry.js} +1 -1
  122. package/dist/cura/{p-7965fe63.entry.js → p-a5c4849c.entry.js} +1 -1
  123. package/dist/cura/{p-3a3202f0.entry.js → p-a72db13d.entry.js} +1 -1
  124. package/dist/cura/{p-f911a6c5.entry.js → p-b447fca2.entry.js} +1 -1
  125. package/dist/cura/p-c287c69e.entry.js +1 -0
  126. package/dist/cura/{p-c18d7f16.entry.js → p-c987ddde.entry.js} +1 -1
  127. package/dist/cura/{p-1dc9c478.entry.js → p-f072b011.entry.js} +1 -1
  128. package/dist/cura/{p-5357f7bd.entry.js → p-f407bd73.entry.js} +1 -1
  129. package/dist/cura/p-f638eda8.entry.js +1 -0
  130. package/dist/esm/{cura-accordion_21.entry.js → cura-accordion_22.entry.js} +6923 -17
  131. package/dist/esm/cura-checkbox.entry.js +1 -1
  132. package/dist/esm/cura-display.entry.js +1 -1
  133. package/dist/esm/cura-dropdown-search-not-found.entry.js +1 -1
  134. package/dist/esm/cura-icons-view.entry.js +1 -1
  135. package/dist/esm/cura-input-date.entry.js +1 -1
  136. package/dist/esm/cura-loader-bar.entry.js +1 -1
  137. package/dist/esm/cura-modal.entry.js +1 -1
  138. package/dist/esm/cura-progress-bar_2.entry.js +2 -2
  139. package/dist/esm/cura-radio.entry.js +1 -1
  140. package/dist/esm/cura-stepper.entry.js +1 -1
  141. package/dist/esm/cura-switch.entry.js +1 -1
  142. package/dist/esm/cura-tabs-button.entry.js +1 -1
  143. package/dist/esm/cura-tabs-transparent.entry.js +1 -1
  144. package/dist/esm/cura-toast.entry.js +1 -1
  145. package/dist/esm/cura-tooltip.entry.js +1 -1
  146. package/dist/esm/cura.js +1 -1
  147. package/dist/esm/index.js +1140 -0
  148. package/dist/esm/loader.js +1 -1
  149. package/dist/types/components/cura-calendar/cura-calendar.d.ts +32 -0
  150. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +40 -0
  151. package/dist/types/components/cura-calendar/cura-calendar.type.d.ts +4 -0
  152. package/dist/types/components.d.ts +35 -0
  153. package/dist/types/index.d.ts +1 -0
  154. package/package.json +2 -2
  155. package/dist/cjs/cura-calendar.cjs.entry.js +0 -6840
  156. package/dist/components/p-Bf21UQXV.js +0 -1
  157. package/dist/components/p-CG1lz5DR.js +0 -1
  158. package/dist/cura/p-27ba7ef5.entry.js +0 -1
  159. package/dist/cura/p-54624944.entry.js +0 -1
  160. package/dist/cura/p-cbe8c690.entry.js +0 -1
  161. package/dist/esm/cura-calendar.entry.js +0 -6838
@@ -1 +1 @@
1
- import{C as o}from"./p-DQopj-k5.js";import"./p-BTIDzOyO.js";import"./p-DfJS7YqS.js";function p(o,p=window){p.CuraInit=o}function n(p){return(new o).loadVarsSSR(p)}export{p as CuraInit,n as InitVarsTheme}
1
+ import{C as e}from"./p-DQopj-k5.js";import"./p-BTIDzOyO.js";import"./p-DfJS7YqS.js";const t=new WeakMap,a=new WeakMap,i=new WeakMap,n=new WeakMap,r=new WeakMap,o=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,m=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,w=(e,t,a)=>{e.getAttribute(t)!==a&&e.setAttribute(t,a)},y=(e,t)=>{e.toggleAttribute("internals-disabled",t),t?w(e,"aria-disabled","true"):e.removeAttribute("aria-disabled"),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},b=e=>{i.get(e).forEach((e=>{e.remove()})),i.set(e,[])},E=(e,t)=>{const a=document.createElement("input");return a.type="hidden",a.name=e.getAttribute("name"),e.after(a),i.get(t).push(a),a},M=(e,t)=>{if(t.length){const a=Array.from(t);a.forEach((t=>t.addEventListener("click",e.click.bind(e))));const[i]=a;let n=i.id;i.id||(n=`${i.htmlFor}_Label`,i.id=n),w(e,"aria-labelledby",n)}},v=e=>{const t=Array.from(e.elements).filter((e=>!e.tagName.includes("-")&&e.validity)).map((e=>e.validity.valid)),a=l.get(e)||[],i=[...t,...Array.from(a).filter((e=>e.isConnected)).map((e=>n.get(e).validity.valid))].includes(!1);e.toggleAttribute("internals-invalid",i),e.toggleAttribute("internals-valid",!i)},T=e=>{v(k(e.target))},g=e=>{v(k(e.target))},x=e=>{const t=l.get(e.target);t&&t.size&&t.forEach((e=>{e.constructor.formAssociated&&e.formResetCallback&&e.formResetCallback.apply(e)}))},F=(e,t,a)=>{if(t){const i=l.get(t);if(i)i.add(e);else{const a=new Set;a.add(e),l.set(t,a),(e=>{const t=["button[type=submit]","input[type=submit]","button:not([type])"].map((e=>`${e}:not([disabled])`)).map((t=>`${t}:not([form])${e.id?`,${t}[form='${e.id}']`:""}`)).join(",");e.addEventListener("click",(a=>{if(a.target.closest(t)){const t=l.get(e);if(e.noValidate)return;t.size&&Array.from(t).reverse().map((e=>n.get(e).reportValidity())).includes(!1)&&a.preventDefault()}}))})(t),t.addEventListener("reset",x),t.addEventListener("input",T),t.addEventListener("change",g)}o.set(t,{ref:e,internals:a}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout((()=>{e.formAssociatedCallback.apply(e,[t])}),0),v(t)}},k=e=>{let t=e.parentNode;return t&&"FORM"!==t.tagName&&(t=k(t)),t},I=(e,t,a=DOMException)=>{if(!e.constructor.formAssociated)throw new a(t)},O=(e,t,a)=>{const i=l.get(e);return i&&i.size&&i.forEach((e=>{n.get(e)[a]()||(t=!1)})),t},V=e=>{let t=!1;if(e.constructor.formAssociated){let a=n.get(e);void 0===a&&(e.attachInternals(),a=n.get(e),t=!0);const{labels:i,form:r}=a;M(e,i),F(e,r,a)}return t};function L(){return"undefined"!=typeof MutationObserver}const H={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"};function S(e){const t=n.get(e),{form:a}=t;F(e,a,t),M(e,t.labels)}const W=(e,t=!1)=>{const a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>n.has(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let i=a.nextNode();const r=!t||e.disabled;for(;i;)i.formDisabledCallback&&r&&y(i,e.disabled),i=a.nextNode()},C={attributes:!0,attributeFilter:["disabled","name"]},D=L()?new MutationObserver((e=>{for(const t of e){const e=t.target;if("disabled"===t.attributeName&&(e.constructor.formAssociated?y(e,e.hasAttribute("disabled")):"fieldset"===e.localName&&W(e)),"name"===t.attributeName&&e.constructor.formAssociated){const t=n.get(e),a=c.get(e);t.setFormValue(a)}}})):{};function j(e){e.forEach((e=>{const{addedNodes:t,removedNodes:a}=e,r=Array.from(t),o=Array.from(a);r.forEach((e=>{if(n.has(e)&&e.constructor.formAssociated&&S(e),d.has(e)){const t=d.get(e);Object.keys(H).filter((e=>null!==t[e])).forEach((a=>{w(e,H[a],t[a])})),d.delete(e)}if(p.has(e)){const t=p.get(e);w(e,"internals-valid",t.validity.valid.toString()),w(e,"internals-invalid",(!t.validity.valid).toString()),w(e,"aria-invalid",(!t.validity.valid).toString()),p.delete(e)}if("form"===e.localName){const t=l.get(e),a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>!n.has(e)||!e.constructor.formAssociated||t&&t.has(e)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});let i=a.nextNode();for(;i;)S(i),i=a.nextNode()}"fieldset"===e.localName&&(D.observe?.(e,C),W(e,!0))})),o.forEach((e=>{const t=n.get(e);t&&i.get(t)&&b(t),s.has(e)&&s.get(e).disconnect()}))}))}function R(e){e.forEach((e=>{const{removedNodes:t}=e;t.forEach((t=>{const a=h.get(e.target);n.has(t)&&V(t),a.disconnect()}))}))}!L()||new MutationObserver(j);const $={childList:!0,subtree:!0};class N{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const A=new WeakMap;function P(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}class q extends Set{static get isPolyfilled(){return!0}constructor(e){if(super(),!e||!e.tagName||-1===e.tagName.indexOf("-"))throw new TypeError("Illegal constructor");A.set(this,e)}add(e){if(!/^--/.test(e)||"string"!=typeof e)throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${e} must start with '--'.`);const t=super.add(e),a=A.get(this),i=`state${e}`;return a.isConnected?P(a,i):setTimeout((()=>{P(a,i)})),t}clear(){for(let[e]of this.entries())this.delete(e);super.clear()}delete(e){const t=super.delete(e),a=A.get(this);return a.isConnected?(a.toggleAttribute(`state${e}`,!1),a.part&&a.part.remove(`state${e}`)):setTimeout((()=>{a.toggleAttribute(`state${e}`,!1),a.part&&a.part.remove(`state${e}`)})),t}}var z,B=function(e,t,a,i){if("a"===a&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?i:"a"===a?i.call(e):i?i.value:t.get(e)};class J{constructor(e){z.set(this,void 0),function(e,t,a,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?n.call(e,a):n?n.value=a:t.set(e,a)}(this,z,e,"f");for(let t=0;t<e.length;t++){let a=e[t];this[t]=a,a.hasAttribute("name")&&(this[a.getAttribute("name")]=a)}Object.freeze(this)}get length(){return B(this,z,"f").length}[(z=new WeakMap,Symbol.iterator)](){return B(this,z,"f")[Symbol.iterator]()}item(e){return null==this[e]?null:this[e]}namedItem(e){return null==this[e]?null:this[e]}}class K{static get isPolyfilled(){return!0}constructor(e){if(!e||!e.tagName||-1===e.tagName.indexOf("-"))throw new TypeError("Illegal constructor");const r=e.getRootNode(),o=new N;this.states=new q(e),t.set(this,e),a.set(this,o),n.set(e,this),((e,t)=>{for(let a in H){t[a]=null;let i=null;const n=H[a];Object.defineProperty(t,a,{get:()=>i,set(a){i=a,e.isConnected?w(e,n,a):d.set(e,t)}})}})(e,this),(e=>{i.set(this,[]),D.observe?.(e,C)})(e),Object.seal(this),r instanceof DocumentFragment&&(e=>{const t=new MutationObserver(R);window?.ShadyDOM?.inUse&&e.mode&&e.host&&(e=e.host),t.observe?.(e,{childList:!0}),h.set(e,t)})(r)}checkValidity(){const e=t.get(this);if(I(e,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const i=a.get(this);if(!i.valid){const t=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});e.dispatchEvent(t)}return i.valid}get form(){const e=t.get(this);let a;return I(e,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element."),!0===e.constructor.formAssociated&&(a=k(e)),a}get labels(){const e=t.get(this);I(e,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const a=e.getAttribute("id"),i=e.getRootNode();return i&&a?i.querySelectorAll(`[for="${a}"]`):[]}reportValidity(){const e=t.get(this);if(I(e,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const a=this.checkValidity(),i=m.get(this);if(i&&!e.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!a&&i&&(e.focus(),i.focus()),a}setFormValue(e){const a=t.get(this);I(a,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),b(this),null==e||e instanceof FormData?null!=e&&e instanceof FormData&&Array.from(e).reverse().forEach((([e,t])=>{if("string"==typeof t){const i=E(a,this);i.name=e,i.value=t}})):a.getAttribute("name")&&(E(a,this).value=e),c.set(a,e)}setValidity(e,i,n){const o=t.get(this);if(I(o,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!e)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");m.set(this,n);const s=a.get(this),l={};for(const t in e)l[t]=e[t];var c;0===Object.keys(l).length&&((c=s).badInput=!1,c.customError=!1,c.patternMismatch=!1,c.rangeOverflow=!1,c.rangeUnderflow=!1,c.stepMismatch=!1,c.tooLong=!1,c.tooShort=!1,c.typeMismatch=!1,c.valid=!0,c.valueMissing=!1);const d={...s,...l};delete d.valid;const{valid:u}=((e,t,a)=>(e.valid=(e=>{let t=!0;for(let a in e)"valid"!==a&&!1!==e[a]&&(t=!1);return t})(t),Object.keys(t).forEach((a=>e[a]=t[a])),a&&v(a),e))(s,d,this.form);if(!u&&!i)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");r.set(this,u?"":i),o.isConnected?(o.toggleAttribute("internals-invalid",!u),o.toggleAttribute("internals-valid",u),w(o,"aria-invalid",`${!u}`)):p.set(o,this)}get shadowRoot(){const e=t.get(this);return u.get(e)||null}get validationMessage(){const e=t.get(this);return I(e,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),r.get(this)}get validity(){const e=t.get(this);return I(e,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),a.get(this)}get willValidate(){const e=t.get(this);return I(e,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(e.matches(":disabled")||e.disabled||e.hasAttribute("disabled")||e.hasAttribute("readonly"))}}let Q=!1,U=!1;function Y(e){U||(U=!0,window.CustomStateSet=q,e&&(HTMLElement.prototype.attachInternals=function(...t){const a=e.call(this,t);return a.states=new q(this),a}))}function _(e,t=window){t.CuraInit=e}function G(t){return(new e).loadVarsSSR(t)}customElements.polyfillWrapFlushCallback||(function(){if("undefined"==typeof window||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(t,e);const a=new e;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every((e=>e in a.internals))}()?"undefined"==typeof window||window.CustomStateSet||Y(HTMLElement.prototype.attachInternals):function(e=!0){let t=!1;if(!Q){if(Q=!0,"undefined"!=typeof window&&(window.ElementInternals=K),"undefined"!=typeof CustomElementRegistry){const a=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(e,i,n){if(i.formAssociated){const e=i.prototype.connectedCallback;i.prototype.connectedCallback=function(){f.has(this)||(f.set(this,!0),this.hasAttribute("disabled")&&y(this,!0)),null!=e&&e.apply(this),t=V(this)}}a.call(this,e,i,n)}}if("undefined"!=typeof HTMLElement&&(HTMLElement.prototype.attachInternals=function(){if(!this.tagName)return{};if(-1===this.tagName.indexOf("-"))throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");if(n.has(this)&&!t)throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new K(this)}),"undefined"!=typeof Element){function i(...e){const t=r.apply(this,e);if(u.set(this,t),L()){const e=new MutationObserver(j);window.ShadyDOM?e.observe(this,$):e.observe(t,$),s.set(this,e)}return t}const r=Element.prototype.attachShadow;Element.prototype.attachShadow=i}L()&&"undefined"!=typeof document&&new MutationObserver(j).observe(document.documentElement,$),"undefined"!=typeof HTMLFormElement&&function(){const e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=function(...t){let a=e.apply(this,t);return O(this,a,"checkValidity")};const t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=function(...e){let a=t.apply(this,e);return O(this,a,"reportValidity")};const{get:a}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...e){const t=a.call(this,...e),i=Array.from(l.get(this)||[]);if(0===i.length)return t;const n=Array.from(t).concat(i).sort(((e,t)=>e.compareDocumentPosition?2&e.compareDocumentPosition(t)?1:-1:0));return new J(n)}})}(),(e||"undefined"!=typeof window&&!window.CustomStateSet)&&Y()}}(!1));export{_ as CuraInit,G as InitVarsTheme}
@@ -1 +1 @@
1
- import{r as s,h as r,H as e,g as a}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const t=class{constructor(r){s(this,r),this.color="primary-base",this.progress=0,this.styles={}}handleChangeColor(){this.setColor()}handleProgress(){this.setProgress()}connectedCallback(){this.setColor(),this.setProgress()}render(){return r(e,{key:"397073d5ad18c49fedee1832e89c15108b693e01",role:"progressbar","aria-valuenow":this.progress,"aria-valuemin":0,"aria-valuemax":100},r("div",{key:"e3c46bc440ee9c54b308679fa8358df4f10c6a9c",id:"progress-bar",class:"progress-bar",style:this.styles},r("span",{key:"1635e7d72dd6b34455a1891f6a1907f603c91cb7",class:"progress-bar-fill"})))}setColor(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-base":window.CuraAPI.theme.colors.getColor("neutral-base",.2),"--color-base":window.CuraAPI.theme.colors.getColor(this.color)})}setProgress(){this.styles=Object.assign(Object.assign({},this.styles),{"--bar-width":`${this.progress}%`})}get host(){return a(this)}static get watchers(){return{color:[{handleChangeColor:0}],progress:[{handleProgress:0}]}}};t.style=":host{display:block}:host .progress-bar{position:absolute;left:0;bottom:0;width:100%;height:4px;background-color:var(--neutral-base)}:host .progress-bar span{position:absolute;left:0;bottom:0;width:var(--bar-width);height:100%;border-radius:0 2px 2px 0;background-color:var(--color-base);transition:width 0.2s linear}";export{t as cura_loader_bar}
1
+ import{r as s,h as r,H as e,g as a}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const t=class{constructor(r){s(this,r),this.color="primary-base",this.progress=0,this.styles={}}handleChangeColor(){this.setColor()}handleProgress(){this.setProgress()}connectedCallback(){this.setColor(),this.setProgress()}render(){return r(e,{key:"dd27615093a7ab333175afb1e48bbe5455d7406b",role:"progressbar","aria-valuenow":this.progress,"aria-valuemin":0,"aria-valuemax":100},r("div",{key:"c3c76b76826c558769d43e441d9e0c573fb7eb7b",id:"progress-bar",class:"progress-bar",style:this.styles},r("span",{key:"0e8e361bdf63e558fa34cca67c3446b1147c2643",class:"progress-bar-fill"})))}setColor(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-base":window.CuraAPI.theme.colors.getColor("neutral-base",.2),"--color-base":window.CuraAPI.theme.colors.getColor(this.color)})}setProgress(){this.styles=Object.assign(Object.assign({},this.styles),{"--bar-width":`${this.progress}%`})}get host(){return a(this)}static get watchers(){return{color:[{handleChangeColor:0}],progress:[{handleProgress:0}]}}};t.style=":host{display:block}:host .progress-bar{position:absolute;left:0;bottom:0;width:100%;height:4px;background-color:var(--neutral-base)}:host .progress-bar span{position:absolute;left:0;bottom:0;width:var(--bar-width);height:100%;border-radius:0 2px 2px 0;background-color:var(--color-base);transition:width 0.2s linear}";export{t as cura_loader_bar}
@@ -1 +1 @@
1
- import{r as e,c as r,h as a,H as s,g as t}from"./p-BxFVLGIR.js";import{f as o}from"./p-Dot54hbB.js";import"./p-BTIDzOyO.js";const c=class{constructor(a){e(this,a),this.onchange=r(this,"onchange"),a.$hostElement$["s-ei"]?this.internals=a.$hostElement$["s-ei"]:(this.internals=a.$hostElement$.attachInternals(),a.$hostElement$["s-ei"]=this.internals),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":`${o[this.size].size}px`,"--gap":`${o[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 a("cura-icon",{class:"icon",name:e,size:"large"===this.size?20:"micro",color:r})}render(){return a(s,{key:"2e951be46f80c67ea87aaf1c613e29ae7a1cc856",role:"checkbox","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},a("div",{key:"341a30934dd6660b03e6be161999fad24fb005ef",class:this.getClasses(),style:this.styles,onClick:this.handleClick},a("div",{key:"58f32f6b047d19b8af2468b6007cf2dfb1297476",class:"info"},a("div",{key:"e23407390368c638e4e8cd9119ad3ccd1767d861",class:"label-wrapper"},a("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&&a("cura-paragraph",{key:"0684b9ab1f517083bc681bd0731aedf6d38c9873",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),a("cura-label",{key:"499419ee720a7c7ba7e42fc8fcebccfb4e0b0c42",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},a("slot",{key:"7c9637fa4a8082f6451851452db1b751218a20ec"}))),a("div",{key:"91b0a1f42d65d72aca24ff8a852d3c6f461a9cb7",class:"checkbox",tabIndex:this.ontabindex},a("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 t(this)}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor:0}]}}};c.style='@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}';export{c as cura_checkbox}
1
+ import{r as e,c as r,h as a,H as s,g as t}from"./p-BxFVLGIR.js";import{f as o}from"./p-Dot54hbB.js";import"./p-BTIDzOyO.js";const i=class{constructor(a){e(this,a),this.onchange=r(this,"onchange"),a.$hostElement$["s-ei"]?this.internals=a.$hostElement$["s-ei"]:(this.internals=a.$hostElement$.attachInternals(),a.$hostElement$["s-ei"]=this.internals),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":`${o[this.size].size}px`,"--gap":`${o[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 a("cura-icon",{class:"icon",name:e,size:"large"===this.size?20:"micro",color:r})}render(){return a(s,{key:"9236b8f9d487c042e00800a624e1b729e36b296d",role:"checkbox","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},a("div",{key:"4472e8ee4fa4d1ea6c6f4cf9ba347acc66f7df2a",class:this.getClasses(),style:this.styles,onClick:this.handleClick},a("div",{key:"1c74e35fbfbcfcbe113edcd5522e674d197b2212",class:"info"},a("div",{key:"75e7fdf6050f38473379fb3e4a5880f9eb34e88e",class:"label-wrapper"},a("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&&a("cura-paragraph",{key:"7d590fd046c2ba90dbef7846f51a774d50418ca7",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),a("cura-label",{key:"f7c750b3d3ce6afaaba514ac835ceed38674a048",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},a("slot",{key:"d83d9f24b5a5274233e61256add788bfa2ee0f92"}))),a("div",{key:"3f67839bbbf8a583d41765a2a6450c71f5063066",class:"checkbox",tabIndex:this.ontabindex},a("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 t(this)}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor:0}]}}};i.style='@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}';export{i as cura_checkbox}
@@ -1 +1 @@
1
- import{r as t,c as e,h as r,H as a}from"./p-BxFVLGIR.js";import{l as o}from"./p-CHcd-uKK.js";import"./p-BTIDzOyO.js";const s=class{constructor(r){t(this,r),this.tabSelect=e(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 r("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 r("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=o[this.size]||o.default,e=this.computeContentColor();return r(a,{key:"9410b9c68061ffb5d838fe6ab2f409be9b90c6ac",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},r("button",{key:"1ac26d9b41e072f1ec3668d66fee83679640c54f",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(),r("cura-label",{key:"ff854d36883b062d699388e71e6315f76f008f79",size:t,color:e,lineHeight:"0",marginBlock:"0"},r("slot",{key:"6ab5c0cdea38f9094bb382943fe25c3967a681ab"})),this.counter>0&&this.getCounter()))}static get watchers(){return{colorMode:[{setColors:0}]}}};s.style=":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)}";export{s as cura_tabs_button}
1
+ import{r as t,c as e,h as r,H as a}from"./p-BxFVLGIR.js";import{l as o}from"./p-CHcd-uKK.js";import"./p-BTIDzOyO.js";const s=class{constructor(r){t(this,r),this.tabSelect=e(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 r("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 r("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=o[this.size]||o.default,e=this.computeContentColor();return r(a,{key:"e1b96aaf534d4a6c65f875413a0ad28b524c7d97",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},r("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(),r("cura-label",{key:"8bebb4e66694fbcedcd218cba0f13de2253ae587",size:t,color:e,lineHeight:"0",marginBlock:"0"},r("slot",{key:"b6fab707b8b4cab36131bfec148746e9459302e8"})),this.counter>0&&this.getCounter()))}static get watchers(){return{colorMode:[{setColors:0}]}}};s.style=":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)}";export{s as cura_tabs_button}
@@ -1 +1 @@
1
- import{r,c as e,h as a,H as s,g as t}from"./p-BxFVLGIR.js";import{f as i}from"./p-Dot54hbB.js";import"./p-BTIDzOyO.js";const o=class{constructor(a){r(this,a),this.onchange=e(this,"onchange"),a.$hostElement$["s-ei"]?this.internals=a.$hostElement$["s-ei"]:(this.internals=a.$hostElement$.attachInternals(),a.$hostElement$["s-ei"]=this.internals),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 a(s,{key:"550e164f2be33f4fdad6c194302723a00e51843c",role:"radio","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},a("div",{key:"ebcfef353b7dd4655b1d809025060db952927521",class:this.getClasses(),style:this.styles,onClick:this.handleClick},a("div",{key:"436ecc0f4fd72ff6a00a2a47f494e08aae65b3d6",class:"info"},a("div",{key:"4836e4ce83d1fc3b338cfd216b46a7791ba6dc90",class:"label-wrapper"},a("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&&a("cura-paragraph",{key:"1d06464488947f469abd5c3d1c25ebb2ed63a5bd",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),a("cura-label",{key:"508bb787d2da5d25de48516ed64d6b02c94d8546",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},a("slot",{key:"f35d5c895f74ec02987474e71df9a5067ea51e70"}))),a("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 t(this)}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}]}}};o.style='@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)}';export{o as cura_radio}
1
+ import{r,c as e,h as a,H as s,g as t}from"./p-BxFVLGIR.js";import{f as i}from"./p-Dot54hbB.js";import"./p-BTIDzOyO.js";const o=class{constructor(a){r(this,a),this.onchange=e(this,"onchange"),a.$hostElement$["s-ei"]?this.internals=a.$hostElement$["s-ei"]:(this.internals=a.$hostElement$.attachInternals(),a.$hostElement$["s-ei"]=this.internals),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 a(s,{key:"3b4001cf9d095153254069f9865d865f8570c74f",role:"radio","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},a("div",{key:"2a60ebf8f84ab618580b924bf1a2ce9acf70ed81",class:this.getClasses(),style:this.styles,onClick:this.handleClick},a("div",{key:"b1bf673d26f9651696fe5e705f4978eda14e25f6",class:"info"},a("div",{key:"3f0cb6742da331c137c62b647a713781b57d25b2",class:"label-wrapper"},a("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&&a("cura-paragraph",{key:"821198baf60494203af757451e892a79afde3e2b",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),a("cura-label",{key:"8859c2fd4e77342b1884283977b109c714fc32e6",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},a("slot",{key:"313feac58eee6ee2d2b3656d0fb971be7fc43481"}))),a("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 t(this)}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}]}}};o.style='@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)}';export{o as cura_radio}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e,H as i,g as a}from"./p-BxFVLGIR.js";import{i as h,a as n}from"./p-964stZ3D.js";import"./p-BTIDzOyO.js";const r=class{constructor(e){t(this,e),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:s,spacing:e}=window.CuraAPI.theme,i=t.getWeights();this.styles={"--base-spacing":e.getSpacing(),"--neutral-purewhite":s.getColor("neutral-purewhite"),"--neutral-lighter":s.getColor("neutral-lighter"),"--neutral-base":s.getColor("neutral-base"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":i.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 s=t.target.value,e=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/,i=/^(\d{2}\/\d{2}\/\d{4})$/;if(e.test(s)){const t=s.match(e),i=this.parseStringToDate(t[1]),a=this.parseStringToDate(t[2]);this.isDateValid(i)&&this.isDateValid(a)?(this.status="default",this.dates=[i,a],this.value=`${this.parseDateToString(i)} - ${this.parseDateToString(a)}`,this.dateChange.emit(this.value)):this.resetDates()}else if(i.test(s)){const t=s.match(i),e=this.parseStringToDate(t[1]);this.isDateValid(e)?(this.status="default",this.dates=[e],this.value=this.parseDateToString(e),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 s=new Date;return s.setHours(0,0,0,0),this.disablePassDates?!h(t,s):!this.disableFutureDates||!n(t,s)}parseStringToDate(t){const[s,e,i]=t.split("/").map(Number);return new Date(i,e-1,s)}parseDateToString(t){return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}resetDates(){this.status="error",this.dates=[],this.statusInputChange.emit(this.status)}renderCalendarOrHelperText(){return this.isCalendarVisible?e("div",{class:"calendar visible"},e("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 s=t.detail.days;this.value=1===s.length?this.parseDateToString(s[0]):s.length>0?`${this.parseDateToString(s[0])} - ${this.parseDateToString(s[s.length-1])}`:"",this.dateChange.emit(this.value)}})):this.helperText}render(){return e(i,{key:"a274509eede61a43a6677fbf20dc4645c745d41d"},e("div",{key:"857056581ab374e280ab442aecc49d6b93a21cd2",class:"container",style:this.styles},e("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 a(this)}static get watchers(){return{enableRangeDates:[{updateDateSettings:0}]}}};r.style=":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}";export{r as cura_input_date}
1
+ import{r as t,c as s,h as e,H as i,g as a}from"./p-BxFVLGIR.js";import{i as h,a as n}from"./p-964stZ3D.js";import"./p-BTIDzOyO.js";const r=class{constructor(e){t(this,e),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:s,spacing:e}=window.CuraAPI.theme,i=t.getWeights();this.styles={"--base-spacing":e.getSpacing(),"--neutral-purewhite":s.getColor("neutral-purewhite"),"--neutral-lighter":s.getColor("neutral-lighter"),"--neutral-base":s.getColor("neutral-base"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":i.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 s=t.target.value,e=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/,i=/^(\d{2}\/\d{2}\/\d{4})$/;if(e.test(s)){const t=s.match(e),i=this.parseStringToDate(t[1]),a=this.parseStringToDate(t[2]);this.isDateValid(i)&&this.isDateValid(a)?(this.status="default",this.dates=[i,a],this.value=`${this.parseDateToString(i)} - ${this.parseDateToString(a)}`,this.dateChange.emit(this.value)):this.resetDates()}else if(i.test(s)){const t=s.match(i),e=this.parseStringToDate(t[1]);this.isDateValid(e)?(this.status="default",this.dates=[e],this.value=this.parseDateToString(e),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 s=new Date;return s.setHours(0,0,0,0),this.disablePassDates?!h(t,s):!this.disableFutureDates||!n(t,s)}parseStringToDate(t){const[s,e,i]=t.split("/").map(Number);return new Date(i,e-1,s)}parseDateToString(t){return`${String(t.getDate()).padStart(2,"0")}/${String(t.getMonth()+1).padStart(2,"0")}/${t.getFullYear()}`}resetDates(){this.status="error",this.dates=[],this.statusInputChange.emit(this.status)}renderCalendarOrHelperText(){return this.isCalendarVisible?e("div",{class:"calendar visible"},e("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 s=t.detail.days;this.value=1===s.length?this.parseDateToString(s[0]):s.length>0?`${this.parseDateToString(s[0])} - ${this.parseDateToString(s[s.length-1])}`:"",this.dateChange.emit(this.value)}})):this.helperText}render(){return e(i,{key:"fe506eeb9ca1193994e8988f59f7d39aa09afb7c"},e("div",{key:"33b50ee8b32c70855ec061a0fb9747203f473a62",class:"container",style:this.styles},e("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 a(this)}static get watchers(){return{enableRangeDates:[{updateDateSettings:0}]}}};r.style=":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}";export{r as cura_input_date}
@@ -1 +1 @@
1
- import{r as e,c as a,h as t,H as r}from"./p-BxFVLGIR.js";import{f as i}from"./p-Dot54hbB.js";import"./p-BTIDzOyO.js";const s=class{constructor(t){e(this,t),this.onchange=a(this,"onchange"),t.$hostElement$["s-ei"]?this.internals=t.$hostElement$["s-ei"]:(this.internals=t.$hostElement$.attachInternals(),t.$hostElement$["s-ei"]=this.internals),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.toString()),this.onchange.emit({checked:this.checked})}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-track":`${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:"--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.toString())}formResetCallback(){this.checked=!1,this.internals.setValidity({}),this.internals.setFormValue(this.checked.toString())}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 t(r,{key:"39e910a3c68672eb23a123529a77f8ee0d1093aa",role:"switch","aria-checked":this.checked,"aria-disabled":this.disabled},t("div",{key:"649b89d2709b8afa30cfc1ba549d45ac3c9c04a1",class:this.getClasses(),style:this.styles,onClick:this.toggleSwitch},t("div",{key:"4b1c7d704f0db997a4738abbd248c3a0bbcfdfcd",class:"info"},t("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),t("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"},t("slot",{key:"d9ed12c05133baeec10aa149f26d6dc01b2e3cd8"}))),t("div",{key:"d51364956de2b53735285109dd457cbff9500eb7",class:"control"},t("div",{key:"5f1ce68eba5430eac69d670a72c4abd48a79a90d",class:`track ${this.size.toLowerCase()}`},t("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}]}}};s.style='@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)}';export{s as cura_switch}
1
+ import{r as e,c as a,h as t,H as r}from"./p-BxFVLGIR.js";import{f as i}from"./p-Dot54hbB.js";import"./p-BTIDzOyO.js";const s=class{constructor(t){e(this,t),this.onchange=a(this,"onchange"),t.$hostElement$["s-ei"]?this.internals=t.$hostElement$["s-ei"]:(this.internals=t.$hostElement$.attachInternals(),t.$hostElement$["s-ei"]=this.internals),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.toString()),this.onchange.emit({checked:this.checked})}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-track":`${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:"--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.toString())}formResetCallback(){this.checked=!1,this.internals.setValidity({}),this.internals.setFormValue(this.checked.toString())}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 t(r,{key:"73c935718e0bd39d49581d81de82f3d8dfbecf39",role:"switch","aria-checked":this.checked,"aria-disabled":this.disabled},t("div",{key:"f2d813e2c863fd869c1ea48f20155a30f7e9b5bd",class:this.getClasses(),style:this.styles,onClick:this.toggleSwitch},t("div",{key:"de3b927a6ff4f599c527a370b954872990ef3632",class:"info"},t("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),t("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"},t("slot",{key:"57d9dbd78f8e5b30677ecca1c6ba83946b459d28"}))),t("div",{key:"03d28fd476865d02010fcf7cd5820f9e50b09015",class:"control"},t("div",{key:"5fc59727c27271cba5f63651373e1e99deb4f5b7",class:`track ${this.size.toLowerCase()}`},t("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}]}}};s.style='@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)}';export{s as cura_switch}
@@ -1 +1 @@
1
- import{r as t,h as s,H as h,g as o}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const l=class{constructor(s){t(this,s),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(),h={1:s("h1",{style:this.styles,class:t},s("slot",null)),2:s("h2",{style:this.styles,class:t},s("slot",null)),3:s("h3",{style:this.styles,class:t},s("slot",null)),4:s("h4",{style:this.styles,class:t},s("slot",null)),5:s("h5",{style:this.styles,class:t},s("slot",null)),6:s("h6",{style:this.styles,class:t},s("slot",null)),default:s("h1",{style:this.styles,class:t},s("slot",null))};return h[`${this.level}`]||h.default}render(){return s(h,{key:"264f7e93aac5ecb7a775c6e505f230518e3959f4",style:this.hostCSSProperties(),role:"heading","aria-level":this.level},this.getHeadingTag())}get host(){return o(this)}static get watchers(){return{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}}};l.style=":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}}";export{l as cura_display}
1
+ import{r as t,h as s,H as h,g as o}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const l=class{constructor(s){t(this,s),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(),h={1:s("h1",{style:this.styles,class:t},s("slot",null)),2:s("h2",{style:this.styles,class:t},s("slot",null)),3:s("h3",{style:this.styles,class:t},s("slot",null)),4:s("h4",{style:this.styles,class:t},s("slot",null)),5:s("h5",{style:this.styles,class:t},s("slot",null)),6:s("h6",{style:this.styles,class:t},s("slot",null)),default:s("h1",{style:this.styles,class:t},s("slot",null))};return h[`${this.level}`]||h.default}render(){return s(h,{key:"343caf7e121561a5339ea553ccadb8aeed553c37",style:this.hostCSSProperties(),role:"heading","aria-level":this.level},this.getHeadingTag())}get host(){return o(this)}static get watchers(){return{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}}};l.style=":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}}";export{l as cura_display}
@@ -1 +1 @@
1
- import{r as a,c as t,h as e,H as i}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const s=class{constructor(e){a(this,e),this.modalClose=t(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 e(i,{key:"a6f81dd34ff6bea8c00a6ea08ba2967d8b37890b",role:"dialog","aria-modal":"true",style:{"--zIndex":this.zindex}},e("div",{key:"87c8a89c0ae261fd6d8ed8259ed4a18b92a6bf55",class:this.open?"modal container open":"modal container",style:this.styles},e("div",{key:"1377054aaf87f31e2f27a32b813f21a3227a0679",class:this.open?"modal backdrop open":"modal backdrop",onClick:this.canClose?this.handleClose:void 0}),e("div",{key:"b8764e38f17fc18f6390b1454f73adc5b0f28024",class:"wrapper"},this.canClose&&e("div",{key:"e3b741e2885d879368b041c0da3ffa8ff1f6b1c4",class:"close desktop"},e("cura-button-transparent",{key:"5c85f8cb21415741e3af4ab8833b031597faed50",iconName:"close",color:"error",size:"small",onClick:this.handleClose,iconOnly:!0})),e("slot",{key:"fd0b51474b2fc973ad1dd6b626f42726e0972afb"}),this.canClose&&e("div",{key:"da7b3e03af84967a38f398cde77495d6baa8af35",class:"close mobile",onClick:this.handleClose},e("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}]}}};s.style=":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}}";export{s as cura_modal}
1
+ import{r as a,c as t,h as e,H as i}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const s=class{constructor(e){a(this,e),this.modalClose=t(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 e(i,{key:"add6ff0d9e7596282547b9632a10d6b36ce2dd77",role:"dialog","aria-modal":"true",style:{"--zIndex":this.zindex}},e("div",{key:"0ea813bd986b4cb0e87f31511d600bc88f922d66",class:this.open?"modal container open":"modal container",style:this.styles},e("div",{key:"90ace6e14ed40371839a784d82c4370cff9c8bc2",class:this.open?"modal backdrop open":"modal backdrop",onClick:this.canClose?this.handleClose:void 0}),e("div",{key:"1593d59bed08050004b638379194f331518e93ad",class:"wrapper"},this.canClose&&e("div",{key:"348678020334e6f60794e9a22c9aa570deb32411",class:"close desktop"},e("cura-button-transparent",{key:"bcaed0130dfe074cf23a244a71138243362c6706",iconName:"close",color:"error",size:"small",onClick:this.handleClose,iconOnly:!0})),e("slot",{key:"e34ea51fa11116b235911b7303b7d2f2a70dabd7"}),this.canClose&&e("div",{key:"a262c02432b56a149773e601f14dadc05d09e64f",class:"close mobile",onClick:this.handleClose},e("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}]}}};s.style=":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}}";export{s as cura_modal}
@@ -1 +1 @@
1
- import{r as t,c as e,h as o,H as r}from"./p-BxFVLGIR.js";import{l as s}from"./p-CHcd-uKK.js";import"./p-BTIDzOyO.js";const a=class{constructor(o){t(this,o),this.tabSelect=e(this,"tabSelect"),this.selected=!1,this.disabled=!1,this.borderBottom=!0,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--border-bottom-color",theme:"light"===this.colorMode?"neutral-base":"primary"},{name:"--border-bottom-color-selected",theme:"light"===this.colorMode?"primary-dark":"primary-lighter"}].forEach((t=>{t.theme&&(this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"primary-lighter":"neutral-purewhite":this.hovered&&!this.selected?"primary-dark":this.selected?"primary-base":"neutral-black"}getIcon(){if(!this.iconName)return"";const t="large"===this.size?20:16,e=this.computeContentColor();return o("cura-icon",{name:this.iconName,size:t,color:e})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled,"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(t){this.disabled?t.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const t=s[this.size]||s.default,e=this.computeContentColor();return o(r,{key:"d3c9e277a079381def09397dc922d697aa99d70a",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},o("button",{key:"ab4cac9782f48c367c4ada4e303f9422971dc38e",class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),disabled:this.disabled,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this)},this.getIcon(),o("cura-label",{key:"c6567bdf7b80efc3380a8a93bf52de966e1caa7d",size:t,color:e,lineHeight:"0",marginBlock:"0"},o("slot",{key:"93c392107790a2c0e3499e5b7bd742219203a980"}))))}static get watchers(){return{colorMode:[{setColors:0}]}}};a.style=":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:not(.selected),:host a:not(.selected){border-color:var(--border-color)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer}:host button.selected:not(.disabled),:host a.selected:not(.disabled){border-bottom:1px solid var(--border-bottom-color-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}";export{a as cura_tabs_transparent}
1
+ import{r as t,c as e,h as o,H as r}from"./p-BxFVLGIR.js";import{l as s}from"./p-CHcd-uKK.js";import"./p-BTIDzOyO.js";const a=class{constructor(o){t(this,o),this.tabSelect=e(this,"tabSelect"),this.selected=!1,this.disabled=!1,this.borderBottom=!0,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--border-bottom-color",theme:"light"===this.colorMode?"neutral-base":"primary"},{name:"--border-bottom-color-selected",theme:"light"===this.colorMode?"primary-dark":"primary-lighter"}].forEach((t=>{t.theme&&(this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"primary-lighter":"neutral-purewhite":this.hovered&&!this.selected?"primary-dark":this.selected?"primary-base":"neutral-black"}getIcon(){if(!this.iconName)return"";const t="large"===this.size?20:16,e=this.computeContentColor();return o("cura-icon",{name:this.iconName,size:t,color:e})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled,"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(t){this.disabled?t.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const t=s[this.size]||s.default,e=this.computeContentColor();return o(r,{key:"09e06aa0e52ca852fa5e4409429f50242fa5c6a9",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},o("button",{key:"a4c5f800f22b23e24b89366766660c02abfd7091",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(),o("cura-label",{key:"73de8c0f84a1128a92fd840c4b6d9b3415071a99",size:t,color:e,lineHeight:"0",marginBlock:"0"},o("slot",{key:"2514d0f1bd9752635fcc2d453c8994d09ef7f5d1"}))))}static get watchers(){return{colorMode:[{setColors:0}]}}};a.style=":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:not(.selected),:host a:not(.selected){border-color:var(--border-color)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer}:host button.selected:not(.disabled),:host a.selected:not(.disabled){border-bottom:1px solid var(--border-bottom-color-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}";export{a as cura_tabs_transparent}
@@ -1 +1 @@
1
- import{r as t,h as e,H as s,g as r}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const i=class{constructor(e){t(this,e),this.errorInCurrentStep=!1,this.displayHeading=!1,this.variant="default",this.steps=[],this.styles={},this.stepList=[]}connectedCallback(){this.initializeSteps();const{fonts:t,colors:e,spacing:s}=window.CuraAPI.theme,r=t.getWeights();this.styles=this.generateStyles(e,t,s,r)}generateStyles(t,e,s,r){return{"--base-spacing":s.getSpacing(),"--neutral-purewhite":t.getColor("neutral-purewhite"),"--neutral-lighter":t.getColor("neutral-lighter"),"--neutral-base":t.getColor("neutral-base"),"--neutral-light":t.getColor("neutral-light"),"--success-light":t.getColor("success-light"),"--info-light":t.getColor("info-light"),"--error-light":t.getColor("error-light"),"--font-size":e.getSize(),"--font-color":e.getColor(),"--font-family":e.getFamily(),"--font-weight-regular":r.regular}}initializeSteps(){this.stepList="string"==typeof this.steps?JSON.parse(this.steps||"[]"):this.steps}getStepStatus(t){return this.activeStepIndex===t&&this.errorInCurrentStep?"stop":this.activeStepIndex===t&&this.stepList.length!==t?"active":this.activeStepIndex>=t?"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 t;const s=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===(t=this.stepList[this.activeStepIndex])||void 0===t?void 0:t.title,i=this.activeStepIndex===this.stepList.length,a=!(i||this.errorInCurrentStep),{progressColor:o,activeStepTextColor:l,nextStepTextColor:n}=this.getProgressStyles();return e("div",{class:"container compact",style:this.styles},e("cura-progress-bar",{progress:100*this.activeStepIndex/this.stepList.length,progressColor:o,active:0!==this.activeStepIndex},a?e("cura-heading",{color:"neutral-dark",size:"xsmall"},this.activeStepIndex,"/",this.stepList.length):e("cura-icon",{name:this.errorInCurrentStep?"alertCircle":"checkCircle",color:this.errorInCurrentStep?"error-dark":"success-dark",size:"16"})),this.displayHeading&&e("div",{class:"heading"},e("cura-heading",{size:"small",weight:"bold",color:l},s),!i&&e("cura-heading",{size:"xsmall",weight:"regular",color:n},"Próximo: ",r)))}renderStep(t,s){const r=this.getStepStatus(s+1),i="default"!==r?"100%":"0";return e("div",{class:"step "+(s===this.stepList.length-1?"last":""),key:t.title},e("cura-stepper-item",{heading:t.title,label:t.label,displayHeading:this.displayHeading,status:r}),s<this.stepList.length-1&&e("div",{class:"wrapper"},e("div",{class:"divider"}),e("div",{class:`divider ${r} animation`,style:{"--progress-width":i}})))}renderStepper(){return e("div",{class:"container",style:this.styles},e("div",{class:"stepper-list"},this.stepList.map(((t,e)=>this.renderStep(t,e)))))}render(){return e(s,{key:"6593f8a294abd6f729cbf493e3a773f358c10cf7"},"default"===this.variant?this.renderStepper():this.renderCompactStepper())}get host(){return r(this)}};i.style=":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}";export{i as cura_stepper}
1
+ import{r as t,h as e,H as s,g as r}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const i=class{constructor(e){t(this,e),this.errorInCurrentStep=!1,this.displayHeading=!1,this.variant="default",this.steps=[],this.styles={},this.stepList=[]}connectedCallback(){this.initializeSteps();const{fonts:t,colors:e,spacing:s}=window.CuraAPI.theme,r=t.getWeights();this.styles=this.generateStyles(e,t,s,r)}generateStyles(t,e,s,r){return{"--base-spacing":s.getSpacing(),"--neutral-purewhite":t.getColor("neutral-purewhite"),"--neutral-lighter":t.getColor("neutral-lighter"),"--neutral-base":t.getColor("neutral-base"),"--neutral-light":t.getColor("neutral-light"),"--success-light":t.getColor("success-light"),"--info-light":t.getColor("info-light"),"--error-light":t.getColor("error-light"),"--font-size":e.getSize(),"--font-color":e.getColor(),"--font-family":e.getFamily(),"--font-weight-regular":r.regular}}initializeSteps(){this.stepList="string"==typeof this.steps?JSON.parse(this.steps||"[]"):this.steps}getStepStatus(t){return this.activeStepIndex===t&&this.errorInCurrentStep?"stop":this.activeStepIndex===t&&this.stepList.length!==t?"active":this.activeStepIndex>=t?"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 t;const s=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===(t=this.stepList[this.activeStepIndex])||void 0===t?void 0:t.title,i=this.activeStepIndex===this.stepList.length,a=!(i||this.errorInCurrentStep),{progressColor:o,activeStepTextColor:l,nextStepTextColor:n}=this.getProgressStyles();return e("div",{class:"container compact",style:this.styles},e("cura-progress-bar",{progress:100*this.activeStepIndex/this.stepList.length,progressColor:o,active:0!==this.activeStepIndex},a?e("cura-heading",{color:"neutral-dark",size:"xsmall"},this.activeStepIndex,"/",this.stepList.length):e("cura-icon",{name:this.errorInCurrentStep?"alertCircle":"checkCircle",color:this.errorInCurrentStep?"error-dark":"success-dark",size:"16"})),this.displayHeading&&e("div",{class:"heading"},e("cura-heading",{size:"small",weight:"bold",color:l},s),!i&&e("cura-heading",{size:"xsmall",weight:"regular",color:n},"Próximo: ",r)))}renderStep(t,s){const r=this.getStepStatus(s+1),i="default"!==r?"100%":"0";return e("div",{class:"step "+(s===this.stepList.length-1?"last":""),key:t.title},e("cura-stepper-item",{heading:t.title,label:t.label,displayHeading:this.displayHeading,status:r}),s<this.stepList.length-1&&e("div",{class:"wrapper"},e("div",{class:"divider"}),e("div",{class:`divider ${r} animation`,style:{"--progress-width":i}})))}renderStepper(){return e("div",{class:"container",style:this.styles},e("div",{class:"stepper-list"},this.stepList.map(((t,e)=>this.renderStep(t,e)))))}render(){return e(s,{key:"34f5acc0bded7a19276667cbdb84e0617232d73b"},"default"===this.variant?this.renderStepper():this.renderCompactStepper())}get host(){return r(this)}};i.style=":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}";export{i as cura_stepper}
@@ -1 +1 @@
1
- import{r as t,c as a,h as r,H as e,g as o}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const i=class{constructor(r){t(this,r),this.tooltipClosed=a(this,"tooltipClosed"),this.elementId="",this.interactive=!0,this.delay=250,this.maxWidth="280px",this.position="top",this.closeButton=!1,this.isMobile=!1,this.styles={},this.handleClose=()=>{this.closeContainer()}}onWindowResize(){this.setPosition(this.targetElement)}onWindowScroll(){this.setPosition(this.targetElement)}connectedCallback(){this.setStyle()}render(){return r(e,{key:"655c6aae9efc3aad790c6a45a7192ef01baeac97",role:"tooltip",id:this.elementId},r("div",{key:"c552ffd20262eed5e71f4cd93c078852cc52c1ca",class:"container",style:this.styles},r("div",{key:"110f11205496428b674431e1b2bc8c3f95f9397a",class:"content"},r("cura-heading",{key:"d2a0caf6a338c9c0b839ea8671c6d524b943ca86",level:4,size:"xsmall",color:"neutral-black",weight:"bold","margin-block":"0"},this.label),r("cura-paragraph",{key:"bd7addb352119fead424151294e01eae111915e2",color:"neutral-dark","spot-color":"secondary-darker",size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},r("slot",{key:"2323f1af541803e16caa042e9969953557a28976"}))),this.closeButton&&!this.isMobile&&r("cura-icon",{key:"92a672d383b057c53ce1771bea1ff9374a9a50a7",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.isMobile&&r("cura-button-transparent",{key:"a31de7e78e092b4fbf6b0e0b85c0c664399081a0",class:"close-button",size:"small",type:"button",color:"error","icon-name":"close","icon-position":"right",onClick:this.handleClose},"OK, entendi.")))}componentDidLoad(){var t,a,r,e,o;if(this.targetElement=document.querySelector(`[aria-labelledby="${this.elementId}"]`),this.interactive){this.host.style.visibility="hidden";let i=null,s=null;null===(t=this.targetElement)||void 0===t||t.addEventListener("mouseenter",(()=>{clearTimeout(s),i=setTimeout((()=>{this.host.style.visibility="visible"}),"number"==typeof this.delay&&this.delay>250?this.delay:250)})),null===(a=this.targetElement)||void 0===a||a.addEventListener("mouseleave",(()=>{clearTimeout(i),s=setTimeout((()=>{this.handleClose()}),"number"==typeof this.delay&&this.delay>250?this.delay:250)})),null===(r=this.host)||void 0===r||r.addEventListener("mouseenter",(()=>{"visible"===window.getComputedStyle(this.host).visibility&&clearTimeout(s)})),null===(e=this.host)||void 0===e||e.addEventListener("mouseleave",(()=>{clearTimeout(i),this.handleClose()})),null===(o=this.targetElement)||void 0===o||o.addEventListener("click",(()=>{"hidden"===window.getComputedStyle(this.host).visibility?i=setTimeout((()=>{this.host.style.visibility="visible"}),"number"==typeof this.delay&&this.delay>250?this.delay:250):(clearTimeout(i),this.handleClose())})),null===document||void 0===document||document.addEventListener("click",(t=>{this.targetElement.contains(t.target)||this.host.contains(t.target)||(clearTimeout(i),this.handleClose())}))}else this.host.style.visibility="visible";setTimeout((()=>{this.setPosition(this.targetElement)}),100)}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--max-width":this.maxWidth,"--base-spacing":window.CuraAPI.theme.spacing.getSpacing(),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-light":window.CuraAPI.theme.colors.getColor("neutral-light"),"--neutral-black-shadow":window.CuraAPI.theme.colors.getColor("neutral-black",.16)})}getClasses(){const[t,a]=this.position.split("-"),r={container:!0};return t&&(r[t]=!0),a&&(r[a]=!0),r}setPosition(t){const a=window.innerWidth,r=window.innerHeight,e=this.host.shadowRoot.querySelector(".container");if(this.isMobile=a<=768,this.host.style.position=this.isMobile?"fixed":"absolute",this.host.style.bottom=this.isMobile?"0":"unset",e.style.flexDirection=this.isMobile?"column":"row",this.isMobile)return this.host.style.left="0",void(this.host.style.top="unset");const o=t.offsetTop,i=t.offsetLeft,s=t.offsetWidth,n=t.offsetHeight,c=this.host.getBoundingClientRect(),l=10,h=10,p=.5*s+18,d=.5*n+18,u=this.styles["--neutral-light"];let b=0,x=0;const w=Object.keys(this.getClasses()).filter((t=>["top","left","bottom","right","start","end"].includes(t))),m=({arrowTop:t="",arrowLeft:a="",translate:r="",borderColor:e=""})=>{a&&this.host.style.setProperty("--arrow-left",a),t&&this.host.style.setProperty("--arrow-top",t),r&&this.host.style.setProperty("--arrow-translate",r),e&&this.host.style.setProperty("--arrow-border-color",e)};(w.includes("top")||w.includes("bottom"))&&(m({arrowLeft:"50%",translate:"translateX(-50%)"}),w.includes("top")&&(x=o-c.height-h,m({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${u} ${u} transparent`}),x<l&&(x=o+n+h,m({arrowTop:"-6px",borderColor:`${u} transparent transparent ${u}`}))),w.includes("bottom")&&(x=o+n+h,m({arrowTop:"-6px",borderColor:`${u} transparent transparent ${u}`}),x+c.height>r-l&&(x=o-c.height-h,m({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${u} ${u} transparent`}))),b=i+(s-c.width)/2,w.includes("start")&&(b=i-c.width+p,m({arrowLeft:"calc(100% - 18px)"}),b<l&&(b=i+s-p,m({arrowLeft:"18px"}))),w.includes("end")&&(b=i+s-p,m({arrowLeft:"18px"}),b+c.width>a-l&&(b=i-c.width+p,m({arrowLeft:"calc(100% - 18px)"})))),(w.includes("right")||w.includes("left"))&&(m({arrowTop:"50%",translate:"translateY(-50%)"}),w.includes("right")&&(b=i+s+h,m({arrowLeft:"-6px",borderColor:`transparent transparent ${u} ${u}`}),b+c.width>a-l&&(b=i-c.width-h,m({arrowLeft:"calc(100% - 6px)",borderColor:`${u} ${u} transparent transparent`}))),w.includes("left")&&(b=i-c.width-h,m({arrowLeft:"calc(100% - 6px)",borderColor:`${u} ${u} transparent transparent`}),b<l&&(b=i+s+h,m({arrowLeft:"-6px",borderColor:`transparent transparent ${u} ${u}`}))),x=o+(n-c.height)/2,w.includes("start")&&(x=o-c.height+d,m({arrowTop:"calc(100% - 18px)"}),x<l&&(x=o+n-d,m({arrowTop:"18px"}))),w.includes("end")&&(x=o+n-d,m({arrowTop:"18px"}),x+c.height>r-l&&(x=o-c.height+d,m({arrowTop:"calc(100% - 18px)"})))),this.host.style.left=`${b}px`,this.host.style.top=`${x}px`}closeContainer(){this.host.style.visibility="hidden",this.tooltipClosed.emit()}get host(){return o(this)}};i.style=':host{position:absolute;z-index:99998;display:block;width:fit-content;height:fit-content;box-sizing:border-box}@media (max-width: 768px){:host{width:100%}}:host .container{display:flex;box-sizing:border-box;max-width:var(--max-width);height:auto;padding:calc(var(--cura-spacing-base) * 2px);border:1px solid var(--neutral-light);border-radius:calc(var(--cura-spacing-base) * 1px);background-color:var(--neutral-purewhite);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}@media (max-width: 768px){:host .container{max-width:90%;height:fit-content;padding:calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px) 0 calc(var(--cura-spacing-base) * 4px);margin:0 auto;border:2px solid;border-radius:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px) 0 0;border-color:var(--neutral-light) var(--neutral-light) transparent var(--neutral-light)}}:host .container::after{content:"";position:absolute;z-index:99999;width:calc(var(--cura-spacing-base) * 2.5px);height:calc(var(--cura-spacing-base) * 2.5px);border:1px solid;border-radius:2px;background-color:var(--neutral-purewhite);left:var(--arrow-left);top:var(--arrow-top);border-color:var(--arrow-border-color);transform:var(--arrow-translate) rotate(45deg)}@media (max-width: 768px){:host .container::after{display:none}}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:calc(var(--cura-spacing-base) * 1px)}@media (max-width: 768px){:host .container .content{padding-bottom:calc(var(--cura-spacing-base) * 4px);border-bottom:1px dashed var(--neutral-light)}}:host .container .close-icon{margin-left:calc(var(--cura-spacing-base) * 3px);cursor:pointer}:host .container .close-button{padding:calc(var(--cura-spacing-base) * 2px) 0}';export{i as cura_tooltip}
1
+ import{r as t,c as r,h as a,H as e,g as o}from"./p-BxFVLGIR.js";import"./p-BTIDzOyO.js";const i=class{constructor(a){t(this,a),this.tooltipClosed=r(this,"tooltipClosed"),this.elementId="",this.interactive=!0,this.delay=250,this.maxWidth="280px",this.position="top",this.closeButton=!1,this.isMobile=!1,this.styles={},this.handleClose=()=>{this.closeContainer()}}onWindowResize(){this.setPosition(this.targetElement)}onWindowScroll(){this.setPosition(this.targetElement)}connectedCallback(){this.setStyle()}render(){return a(e,{key:"721cf76abdc6eb079edbc8540d2deaa74559c809",role:"tooltip",id:this.elementId},a("div",{key:"51c94531a0d28de3844ac109f0b941062b17c013",class:"container",style:this.styles},a("div",{key:"b80521a83e983ba8939fb21183570de5dfacf544",class:"content"},a("cura-heading",{key:"fc16d66d76800d5c8b778bea1cf325d1ce500f72",level:4,size:"xsmall",color:"neutral-black",weight:"bold","margin-block":"0"},this.label),a("cura-paragraph",{key:"1e0bd7fcbec98be145c83ef8cfa62e2b8e40211c",color:"neutral-dark","spot-color":"secondary-darker",size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},a("slot",{key:"4c4509441c4aa22b3810e1b66939e4cea05f48aa"}))),this.closeButton&&!this.isMobile&&a("cura-icon",{key:"35910c2bb5122c25f10c38ed90c5c633daeb7891",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.isMobile&&a("cura-button-transparent",{key:"1cec8c66efb24e8eda4e09354dd335e03abd99ed",class:"close-button",size:"small",type:"button",color:"error","icon-name":"close","icon-position":"right",onClick:this.handleClose},"OK, entendi.")))}componentDidLoad(){var t,r,a,e,o;if(this.targetElement=document.querySelector(`[aria-labelledby="${this.elementId}"]`),this.interactive){this.host.style.visibility="hidden";let i=null,s=null;null===(t=this.targetElement)||void 0===t||t.addEventListener("mouseenter",(()=>{clearTimeout(s),i=setTimeout((()=>{this.host.style.visibility="visible"}),"number"==typeof this.delay&&this.delay>250?this.delay:250)})),null===(r=this.targetElement)||void 0===r||r.addEventListener("mouseleave",(()=>{clearTimeout(i),s=setTimeout((()=>{this.handleClose()}),"number"==typeof this.delay&&this.delay>250?this.delay:250)})),null===(a=this.host)||void 0===a||a.addEventListener("mouseenter",(()=>{"visible"===window.getComputedStyle(this.host).visibility&&clearTimeout(s)})),null===(e=this.host)||void 0===e||e.addEventListener("mouseleave",(()=>{clearTimeout(i),this.handleClose()})),null===(o=this.targetElement)||void 0===o||o.addEventListener("click",(()=>{"hidden"===window.getComputedStyle(this.host).visibility?i=setTimeout((()=>{this.host.style.visibility="visible"}),"number"==typeof this.delay&&this.delay>250?this.delay:250):(clearTimeout(i),this.handleClose())})),null===document||void 0===document||document.addEventListener("click",(t=>{this.targetElement.contains(t.target)||this.host.contains(t.target)||(clearTimeout(i),this.handleClose())}))}else this.host.style.visibility="visible";setTimeout((()=>{this.setPosition(this.targetElement)}),100)}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--max-width":this.maxWidth,"--base-spacing":window.CuraAPI.theme.spacing.getSpacing(),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-light":window.CuraAPI.theme.colors.getColor("neutral-light"),"--neutral-black-shadow":window.CuraAPI.theme.colors.getColor("neutral-black",.16)})}getClasses(){const[t,r]=this.position.split("-"),a={container:!0};return t&&(a[t]=!0),r&&(a[r]=!0),a}setPosition(t){const r=window.innerWidth,a=window.innerHeight,e=this.host.shadowRoot.querySelector(".container");if(this.isMobile=r<=768,this.host.style.position=this.isMobile?"fixed":"absolute",this.host.style.bottom=this.isMobile?"0":"unset",e.style.flexDirection=this.isMobile?"column":"row",this.isMobile)return this.host.style.left="0",void(this.host.style.top="unset");const o=t.offsetTop,i=t.offsetLeft,s=t.offsetWidth,n=t.offsetHeight,c=this.host.getBoundingClientRect(),l=10,h=10,d=.5*s+18,p=.5*n+18,b=this.styles["--neutral-light"];let u=0,x=0;const w=Object.keys(this.getClasses()).filter((t=>["top","left","bottom","right","start","end"].includes(t))),m=({arrowTop:t="",arrowLeft:r="",translate:a="",borderColor:e=""})=>{r&&this.host.style.setProperty("--arrow-left",r),t&&this.host.style.setProperty("--arrow-top",t),a&&this.host.style.setProperty("--arrow-translate",a),e&&this.host.style.setProperty("--arrow-border-color",e)};(w.includes("top")||w.includes("bottom"))&&(m({arrowLeft:"50%",translate:"translateX(-50%)"}),w.includes("top")&&(x=o-c.height-h,m({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${b} ${b} transparent`}),x<l&&(x=o+n+h,m({arrowTop:"-6px",borderColor:`${b} transparent transparent ${b}`}))),w.includes("bottom")&&(x=o+n+h,m({arrowTop:"-6px",borderColor:`${b} transparent transparent ${b}`}),x+c.height>a-l&&(x=o-c.height-h,m({arrowTop:"calc(100% - 6px)",borderColor:`transparent ${b} ${b} transparent`}))),u=i+(s-c.width)/2,w.includes("start")&&(u=i-c.width+d,m({arrowLeft:"calc(100% - 18px)"}),u<l&&(u=i+s-d,m({arrowLeft:"18px"}))),w.includes("end")&&(u=i+s-d,m({arrowLeft:"18px"}),u+c.width>r-l&&(u=i-c.width+d,m({arrowLeft:"calc(100% - 18px)"})))),(w.includes("right")||w.includes("left"))&&(m({arrowTop:"50%",translate:"translateY(-50%)"}),w.includes("right")&&(u=i+s+h,m({arrowLeft:"-6px",borderColor:`transparent transparent ${b} ${b}`}),u+c.width>r-l&&(u=i-c.width-h,m({arrowLeft:"calc(100% - 6px)",borderColor:`${b} ${b} transparent transparent`}))),w.includes("left")&&(u=i-c.width-h,m({arrowLeft:"calc(100% - 6px)",borderColor:`${b} ${b} transparent transparent`}),u<l&&(u=i+s+h,m({arrowLeft:"-6px",borderColor:`transparent transparent ${b} ${b}`}))),x=o+(n-c.height)/2,w.includes("start")&&(x=o-c.height+p,m({arrowTop:"calc(100% - 18px)"}),x<l&&(x=o+n-p,m({arrowTop:"18px"}))),w.includes("end")&&(x=o+n-p,m({arrowTop:"18px"}),x+c.height>a-l&&(x=o-c.height+p,m({arrowTop:"calc(100% - 18px)"})))),this.host.style.left=`${u}px`,this.host.style.top=`${x}px`}closeContainer(){this.host.style.visibility="hidden",this.tooltipClosed.emit()}get host(){return o(this)}};i.style=':host{position:absolute;z-index:99998;display:block;width:fit-content;height:fit-content;box-sizing:border-box}@media (max-width: 768px){:host{width:100%}}:host .container{display:flex;box-sizing:border-box;max-width:var(--max-width);height:auto;padding:calc(var(--cura-spacing-base) * 2px);border:1px solid var(--neutral-light);border-radius:calc(var(--cura-spacing-base) * 1px);background-color:var(--neutral-purewhite);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}@media (max-width: 768px){:host .container{max-width:90%;height:fit-content;padding:calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px) 0 calc(var(--cura-spacing-base) * 4px);margin:0 auto;border:2px solid;border-radius:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px) 0 0;border-color:var(--neutral-light) var(--neutral-light) transparent var(--neutral-light)}}:host .container::after{content:"";position:absolute;z-index:99999;width:calc(var(--cura-spacing-base) * 2.5px);height:calc(var(--cura-spacing-base) * 2.5px);border:1px solid;border-radius:2px;background-color:var(--neutral-purewhite);left:var(--arrow-left);top:var(--arrow-top);border-color:var(--arrow-border-color);transform:var(--arrow-translate) rotate(45deg)}@media (max-width: 768px){:host .container::after{display:none}}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:calc(var(--cura-spacing-base) * 1px)}@media (max-width: 768px){:host .container .content{padding-bottom:calc(var(--cura-spacing-base) * 4px);border-bottom:1px dashed var(--neutral-light)}}:host .container .close-icon{margin-left:calc(var(--cura-spacing-base) * 3px);cursor:pointer}:host .container .close-button{padding:calc(var(--cura-spacing-base) * 2px) 0}';export{i as cura_tooltip}