@rededor/cura 2.0.0-alpha.13 → 2.0.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cura-accordion_22.cjs.entry.js +65 -74
- package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/cura-display.cjs.entry.js +1 -1
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +1 -1
- package/dist/cjs/cura-icons-view.cjs.entry.js +1 -1
- package/dist/cjs/cura-input-date.cjs.entry.js +1 -1
- package/dist/cjs/cura-input-textarea.cjs.entry.js +236 -0
- package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
- package/dist/cjs/cura-modal.cjs.entry.js +1 -1
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/cura-radio.cjs.entry.js +1 -1
- package/dist/cjs/cura-stepper.cjs.entry.js +1 -1
- package/dist/cjs/cura-switch.cjs.entry.js +1 -1
- package/dist/cjs/cura-tabs-button.cjs.entry.js +1 -1
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js +1 -1
- package/dist/cjs/cura-toast.cjs.entry.js +1 -1
- package/dist/cjs/cura-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/cura.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/utils-DMHZ2n4p.js +47 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/cura-calendar/cura-calendar.css +13 -1
- package/dist/collection/components/cura-calendar/cura-calendar.js +92 -11
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js +29 -1
- package/dist/collection/components/cura-calendar/cura-calendar.type.js +1 -0
- package/dist/collection/components/cura-card/cura-card.js +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-category/cura-dropdown-search-category.js +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
- package/dist/collection/components/cura-modal/cura-modal.js +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper.js +1 -1
- package/dist/collection/components/cura-toast/cura-toast.js +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
- package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.css +174 -0
- package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.js +613 -0
- package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.stories.js +222 -0
- package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
- package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +1 -1
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +1 -1
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +1 -1
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +1 -1
- package/dist/collection/components/text/cura-display/cura-display.js +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
- package/dist/components/cura-accordion-item.js +1 -1
- package/dist/components/cura-alert.js +1 -1
- package/dist/components/cura-badge-counter.js +1 -1
- package/dist/components/cura-badge-distance.js +1 -1
- package/dist/components/cura-badge-pill.js +1 -1
- package/dist/components/cura-button-outline.js +1 -1
- package/dist/components/cura-button-select.js +1 -1
- package/dist/components/cura-button-transparent.js +1 -1
- package/dist/components/cura-button.js +1 -1
- package/dist/components/cura-calendar.js +1 -1
- package/dist/components/cura-card.js +1 -1
- package/dist/components/cura-checkbox.js +1 -1
- package/dist/components/cura-display.js +1 -1
- package/dist/components/cura-dropdown-search-category.js +1 -1
- package/dist/components/cura-dropdown-search-not-found.js +1 -1
- package/dist/components/cura-dropdown-search-option.js +1 -1
- package/dist/components/cura-dropdown-search.js +1 -1
- package/dist/components/cura-heading.js +1 -1
- package/dist/components/cura-icon.js +1 -1
- package/dist/components/cura-icons-view.js +1 -1
- package/dist/components/cura-input-date.js +1 -1
- package/dist/components/cura-input-text.js +1 -1
- package/dist/components/cura-input-textarea.d.ts +11 -0
- package/dist/components/cura-input-textarea.js +1 -0
- package/dist/components/cura-label.js +1 -1
- package/dist/components/cura-loader-bar.js +1 -1
- package/dist/components/cura-loader-circle.js +1 -1
- package/dist/components/cura-modal.js +1 -1
- package/dist/components/cura-page-template.js +1 -1
- package/dist/components/cura-paragraph.js +1 -1
- package/dist/components/cura-progress-bar.js +1 -1
- package/dist/components/cura-radio.js +1 -1
- package/dist/components/cura-select-option.js +1 -1
- package/dist/components/cura-select.js +1 -1
- package/dist/components/cura-stepper-item.js +1 -1
- package/dist/components/cura-stepper.js +1 -1
- package/dist/components/cura-switch.js +1 -1
- package/dist/components/cura-tabs-button.js +1 -1
- package/dist/components/cura-tabs-group.js +1 -1
- package/dist/components/cura-tabs-transparent.js +1 -1
- package/dist/components/cura-tabs.js +1 -1
- package/dist/components/cura-toast.js +1 -1
- package/dist/components/cura-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-B2TDH4aP.js +1 -0
- package/dist/components/{p-C05r6CQV.js → p-BHVSbubb.js} +1 -1
- package/dist/components/{p-B2RN7oe_.js → p-BKDpza6x.js} +1 -1
- package/dist/components/{p-BYA8glxD.js → p-BuETJyzc.js} +1 -1
- package/dist/components/p-CalvBU-U.js +1 -0
- package/dist/components/{p-CCkEqDZb.js → p-CksTHXxZ.js} +1 -1
- package/dist/components/{p-DxJedO3K.js → p-D4hCuriT.js} +1 -1
- package/dist/components/{p-fn4zJrKE.js → p-DI66_jP6.js} +1 -1
- package/dist/components/{p-Bf21UQXV.js → p-DQP7jRHp.js} +1 -1
- package/dist/components/p-DgK8dEko.js +1 -0
- package/dist/components/{p-DXlGQp3a.js → p-DgQJ968V.js} +1 -1
- package/dist/components/{p-fR02COZb.js → p-Dmalf4Oj.js} +1 -1
- package/dist/components/{p-D6xuYQiO.js → p-KovUKiTX.js} +1 -1
- package/dist/components/{p-D7WNwjv-.js → p-PiUhcFob.js} +1 -1
- package/dist/components/{p-C7so9xnO.js → p-TnCIk87O.js} +1 -1
- package/dist/components/{p-BSdkRryc.js → p-i55vIhdM.js} +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/{p-bf99e8bf.entry.js → p-18a1cadf.entry.js} +1 -1
- package/dist/cura/{p-ddf4d240.entry.js → p-1c48aaa7.entry.js} +1 -1
- package/dist/cura/{p-b7369d04.entry.js → p-4178e3e6.entry.js} +1 -1
- package/dist/cura/p-5b26a166.entry.js +1 -0
- package/dist/cura/{p-42e72d12.entry.js → p-604f1c1d.entry.js} +1 -1
- package/dist/cura/{p-9de85de6.entry.js → p-906c8b66.entry.js} +1 -1
- package/dist/cura/p-CUmwazb8.js +1 -0
- package/dist/cura/p-a305e17a.entry.js +1 -0
- package/dist/cura/{p-3a3202f0.entry.js → p-a72db13d.entry.js} +1 -1
- package/dist/cura/{p-c247c93b.entry.js → p-b157025d.entry.js} +1 -1
- package/dist/cura/{p-f911a6c5.entry.js → p-b447fca2.entry.js} +1 -1
- package/dist/cura/{p-2e2e2b4d.entry.js → p-bd649bed.entry.js} +1 -1
- package/dist/cura/{p-c18d7f16.entry.js → p-c987ddde.entry.js} +1 -1
- package/dist/cura/{p-b14ae206.entry.js → p-d43fb791.entry.js} +1 -1
- package/dist/cura/{p-7965fe63.entry.js → p-d64ef37d.entry.js} +1 -1
- package/dist/cura/{p-1dc9c478.entry.js → p-f072b011.entry.js} +1 -1
- package/dist/cura/{p-5357f7bd.entry.js → p-f407bd73.entry.js} +1 -1
- package/dist/cura/p-f638eda8.entry.js +1 -0
- package/dist/esm/cura-accordion_22.entry.js +58 -67
- package/dist/esm/cura-checkbox.entry.js +1 -1
- package/dist/esm/cura-display.entry.js +1 -1
- package/dist/esm/cura-dropdown-search-not-found.entry.js +1 -1
- package/dist/esm/cura-icons-view.entry.js +1 -1
- package/dist/esm/cura-input-date.entry.js +1 -1
- package/dist/esm/cura-input-textarea.entry.js +234 -0
- package/dist/esm/cura-loader-bar.entry.js +1 -1
- package/dist/esm/cura-modal.entry.js +1 -1
- package/dist/esm/cura-progress-bar_2.entry.js +2 -2
- package/dist/esm/cura-radio.entry.js +1 -1
- package/dist/esm/cura-stepper.entry.js +1 -1
- package/dist/esm/cura-switch.entry.js +1 -1
- package/dist/esm/cura-tabs-button.entry.js +1 -1
- package/dist/esm/cura-tabs-transparent.entry.js +1 -1
- package/dist/esm/cura-toast.entry.js +1 -1
- package/dist/esm/cura-tooltip.entry.js +1 -1
- package/dist/esm/cura.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/utils-BZCR971L.js +41 -0
- package/dist/types/components/cura-calendar/cura-calendar.d.ts +20 -2
- package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +29 -0
- package/dist/types/components/cura-calendar/cura-calendar.type.d.ts +4 -0
- package/dist/types/components/forms/cura-input-textarea/cura-input-textarea.d.ts +116 -0
- package/dist/types/components/forms/cura-input-textarea/cura-input-textarea.stories.d.ts +188 -0
- package/dist/types/components.d.ts +232 -0
- package/package.json +2 -2
- package/dist/components/p-B8xnU6YS.js +0 -1
- package/dist/components/p-CG1lz5DR.js +0 -1
- package/dist/cura/p-47fdb124.entry.js +0 -1
- package/dist/cura/p-cbe8c690.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as o,i as a,j as i,t as s}from"./p-DBXUEjWh.js";import{l as e}from"./p-BSI2FkNn.js";import{d as n}from"./p-
|
|
1
|
+
import{p as t,H as o,i as a,j as i,t as s}from"./p-DBXUEjWh.js";import{l as e}from"./p-BSI2FkNn.js";import{d as n}from"./p-DI66_jP6.js";import{d as r}from"./p-i55vIhdM.js";import{d as c}from"./p-DQP7jRHp.js";const l=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.internals=this.attachInternals(),this.type="button",this.size="large",this.disabled=!1,this.isLoading=!1,this.iconset="default",this.iconPosition="left",this.iconOnly=!1,this.target="_self",this.color="accent",this.background="light",this.fontColor="dark",this.textAlign="left",this.justify=!1,this.styles={},this.hovered=!1}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing(),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium,this.styles["--text-align"]=this.textAlign,this.setColors()}setColors(){[{name:"--color-base-neutral-purewhite",theme:"light"===this.background?this.color+"-base":"neutral-pale"},{name:"--color-base-color-light",theme:"light"===this.background?this.color+"-base":this.color+"-lighter"},{name:"--color-dark-color-light",theme:"light"===this.background?this.color+"-dark":this.color+"-light"},{name:"--color-dark-color-base",theme:"light"===this.background?this.color+"-dark":this.color+"-base"},{name:"--neutral-pale-neutral-black",theme:"light"===this.background?"neutral-pale":"neutral-black"}].forEach((t=>this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))),this.styles=Object.assign({},this.styles)}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}getClasses(){var t,o;const a={};return a[""+(null===(t=this.size)||void 0===t?void 0:t.toLowerCase())]=!0,a["icon-"+(null===(o=this.iconPosition)||void 0===o?void 0:o.toLowerCase())]=!0,a["icon-only"]=this.iconOnly,a.disabled=this.disabled,a.isLoading=this.isLoading,a.justify=this.justify,a}getIcon(){return this.iconName?a("cura-icon",{name:this.iconName,iconset:this.iconset,size:"large"===this.size?20:16,color:this.getSymbolColor()}):""}getSymbolColor(){return this.disabled?"neutral-dark":"light"===this.fontColor?"neutral-white":"neutral-black"}handleClick(t){this.disabled||this.isLoading?t.preventDefault():this.href||("submit"===this.type&&this.internals.form&&this.internals.form.submit(),"reset"===this.type&&this.internals.form&&this.internals.form.reset())}render(){const t=this.getSymbolColor(),o=e[this.size]||e.default;return a(i,{key:"7f9528e42c3c38a3aed09ac8bbe669aabde4c0d9",role:this.href?"link":this.type,"aria-disabled":this.disabled},this.href?a("a",{href:this.disabled?"":this.href,target:this.target,class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},a("span",{class:"button-container"},this.getIcon(),a("cura-label",{class:"label",size:o,lineHeight:"normal",color:t},a("slot",null))),a("cura-loader-circle",{size:this.size,color:t})):a("button",{class:this.getClasses(),style:this.styles,disabled:this.disabled||null,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave(),type:this.type},a("span",{class:"button-container"},this.getIcon(),a("cura-label",{class:"label",size:o,lineHeight:"normal",color:t},a("slot",null))),a("cura-loader-circle",{size:this.size,color:t})))}static get formAssociated(){return!0}static get watchers(){return{background:[{setColors:0}],color:[{setColors:0}]}}static get style(){return':host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}: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:var(--color-base-neutral-purewhite);box-sizing:border-box;border:none}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button::before,:host a::before{content:"";width:100%;height:100%;position:absolute;left:0px;top:0px;box-sizing:border-box;border:2px solid transparent;border-radius:var(--border-radius)}:host button:not(.disabled):not(.isLoading)::before,:host a:not(.disabled):not(.isLoading)::before{border:2px solid var(--color-base-color-light)}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background:var(--color-base-color-light);box-shadow:0px 4px 8px 0px rgba(38, 38, 38, 0.16)}:host button:not(.disabled):not(.isLoading):hover::before,:host a:not(.disabled):not(.isLoading):hover::before{border-color:var(--color-dark-color-base)}:host button:not(.isLoading):not(.disabled):active,:host a:not(.isLoading):not(.disabled):active{background-color:var(--color-dark-color-light)}:host button:not(.isLoading):not(.disabled):active::before,:host a:not(.isLoading):not(.disabled):active::before{border-color:var(--color-dark-color-light)}:host button:hover,:host a:hover{box-shadow:0 4px 8px 0 rgba(38, 38, 38, 0.16)}:host button.medium:hover,:host a.medium:hover{box-shadow:0 3px 6px 0 rgba(38, 38, 38, 0.16)}:host button.small:hover,:host a.small:hover{box-shadow:0 2px 5px 0 rgba(38, 38, 38, 0.16)}:host button:active,:host button.disabled:hover,:host button.isLoading:hover,:host a:active,:host a.disabled:hover,:host a.isLoading:hover{box-shadow:none !important}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, "left")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-pale-neutral-black)}:host button.icon-only,:host a.icon-only{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--cura-spacing-base) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--cura-spacing-base) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}'}},[321,"cura-button",{type:[513],size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],background:[513],fontColor:[513,"font-color"],textAlign:[513,"text-align"],justify:[516],styles:[32],hovered:[32]},void 0,{background:[{setColors:0}],color:[{setColors:0}]}]),h=l,u=function(){"undefined"!=typeof customElements&&["cura-button","cura-icon","cura-label","cura-loader-circle"].forEach((t=>{switch(t){case"cura-button":customElements.get(s(t))||customElements.define(s(t),l);break;case"cura-icon":customElements.get(s(t))||n();break;case"cura-label":customElements.get(s(t))||r();break;case"cura-loader-circle":customElements.get(s(t))||c()}}))};export{h as CuraButton,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as
|
|
1
|
+
import{C as o,d as s}from"./p-BHVSbubb.js";const b=o,p=s;export{b as CuraCalendar,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as r,H as a,i as t,j as d,t as i}from"./p-DBXUEjWh.js";const o=r(class extends a{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.hasPadding=!0,this.hasShadow=!1,this.type="solid",this.colorMode="light",this.target="_self",this.styles={}}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing(),this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor("neutral-white"),this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor("neutral-base"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--neutral-black"]=window.CuraAPI.theme.colors.getColor("neutral-black"),this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor("neutral-black",.16),this.styles["--primary-lighter"]=window.CuraAPI.theme.colors.getColor("primary-lighter"),this.styles["--primary-base"]=window.CuraAPI.theme.colors.getColor("primary-base"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium}getClasses(){const r={};return r[this.type]=!0,r.cardLink=this.href,r[this.colorMode]=!0,r.hasPadding=this.hasPadding,r.hasShadow=this.hasShadow,r}render(){return t(d,{key:"
|
|
1
|
+
import{p as r,H as a,i as t,j as d,t as i}from"./p-DBXUEjWh.js";const o=r(class extends a{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.hasPadding=!0,this.hasShadow=!1,this.type="solid",this.colorMode="light",this.target="_self",this.styles={}}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing(),this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor("neutral-white"),this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor("neutral-base"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--neutral-black"]=window.CuraAPI.theme.colors.getColor("neutral-black"),this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor("neutral-black",.16),this.styles["--primary-lighter"]=window.CuraAPI.theme.colors.getColor("primary-lighter"),this.styles["--primary-base"]=window.CuraAPI.theme.colors.getColor("primary-base"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium}getClasses(){const r={};return r[this.type]=!0,r.cardLink=this.href,r[this.colorMode]=!0,r.hasPadding=this.hasPadding,r.hasShadow=this.hasShadow,r}render(){return t(d,{key:"73f399ec63b8a0933a22c4a6d605dbb4bc8bf2c3",role:this.href?"link":"div"},this.href?t("a",{class:this.getClasses(),target:this.target,style:this.styles,href:this.href},t("slot",null)):t("div",{class:this.getClasses(),style:this.styles},t("slot",null)))}static get style(){return":host{display:block;box-sizing:border-box;font-size:var(--font-size);font-family:var(--font-family)}:host ::slotted(*){display:flex;align-items:center;justify-content:center;font-size:var(--font-size);font-family:var(--font-family)}a{display:block;text-decoration:none !important;color:inherit}.solid{background-color:var(--neutral-purewhite);border:2px solid var(--neutral-base);border-radius:12px;overflow:hidden;padding:0px;box-shadow:none}.solid ::slotted(*){border-radius:0}.solid.hasPadding{padding:20px}.solid.hasPadding ::slotted(*){border-radius:4px !important}.solid.hasShadow{border:2px solid var(--neutral-base);box-shadow:0px 1px 4px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}.solid.cardLink{background-color:var(--neutral-purewhite);border:2px solid var(--primary-base);border-radius:12px;padding:0px;box-shadow:none;cursor:pointer}.solid.cardLink ::slotted(*){border-radius:0px}.solid.cardLink:hover{border:2px solid var(--primary-lighter) !important}.solid.cardLink.hasPadding{padding:20px}.solid.cardLink.hasPadding ::slotted(*){border-radius:4px !important}.solid.cardLink.hasPadding:hover{border:2px solid var(--primary-lighter) !important}.solid.cardLink.hasShadow{border:2px solid var(--primary-base);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}.solid.cardLink:not(.hasPadding).hasShadow ::slotted(*){border-radius:12px !important}.solid.cardLink.dark{background-color:var(--neutral-purewhite);border:2px solid var(--neutral-purewhite)}.solid.cardLink.dark:hover{border:2px solid var(--primary-lighter)}.transparent{background-color:transparent;border:0;border-radius:12px;padding:0px;overflow:hidden}.transparent ::slotted(*){border-radius:12px}.transparent.hasPadding{padding:20px}.transparent.hasPadding ::slotted(*){border-radius:4px}.transparent.cardLink{background-color:transparent;border:2px solid var(--primary-base);overflow:hidden;border-radius:12px;padding:0px;box-shadow:none}.transparent.cardLink ::slotted(*){border-radius:0px !important}.transparent.cardLink:hover{border:2px solid var(--primary-lighter) !important}.transparent.cardLink.light{background-color:var(--neutral-purewhite);border:2px solid var(--primary-base)}.transparent.cardLink.light ::slotted(*){border-radius:12px !important}.transparent.cardLink.light:hover{border-color:var(--primary-lighter) !important}.transparent.cardLink.dark{background-color:transparent;border:2px solid var(--neutral-purewhite)}.transparent.cardLink.dark:hover{border:0}.transparent.cardLink.hasPadding{padding:20px}.transparent.cardLink.hasPadding ::slotted(*){border-radius:4px !important}"}},[257,"cura-card",{hasPadding:[1028,"has-padding"],hasShadow:[1028,"has-shadow"],type:[1025],colorMode:[1025,"color-mode"],href:[1537],target:[513],styles:[32]}]),s=o,e=function(){"undefined"!=typeof customElements&&["cura-card"].forEach((r=>{"cura-card"===r&&(customElements.get(i(r))||customElements.define(i(r),o))}))};export{s as CuraCard,e as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as r,k as a,i as s,j as t,t as o}from"./p-DBXUEjWh.js";import{f as c}from"./p-Dot54hbB.js";import{d as i}from"./p-fn4zJrKE.js";import{d as n}from"./p-BSdkRryc.js";import{d as l}from"./p-D7WNwjv-.js";const b=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.onchange=a(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.indeterminate=!1,this.status="default",this.disabled=!1,this.required=!1,this.ontabindex=0,this.position="left",this.size="medium",this.background="light",this.iconColor="dark",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.isDarkBackground=()=>"dark"===this.background,this.isDarkIconColor=()=>"dark"===this.iconColor,this.handleClick=()=>{this.disabled||(this.indeterminate=!1,this.checked=!this.checked,this.internals.setFormValue(this.value),this.onchange.emit({value:this.value,checked:this.checked,indeterminate:this.indeterminate}))}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size":c[this.size].size+"px","--gap":c[this.size].gap+"px"})}setColors(){[{name:"--color-base",background:this.color+"-base"},{name:"--color-lighter",background:this.color+"-lighter"},{name:"--color-light",background:this.color+"-light"},{name:"--color-dark",background:this.color+"-dark"},{name:"--info-base",background:"info-base"},{name:"--error-base",background:"error-base"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--success-dark",background:"success-dark"},{name:"--error-lighter",background:"error-lighter"},{name:"--neutral-black",background:"neutral-black"},{name:"--primary-base-neutral-white",background:this.isDarkBackground()?"primary-base":"neutral-white"},{name:"--neutral-base-neutral-medium",background:this.isDarkBackground()?"neutral-base":"neutral-medium"},{name:"--neutral-black-neutral-purewhite",background:this.isDarkBackground()?"neutral-black":"neutral-purewhite"},{name:"--neutral-black-neutral-white",background:this.isDarkBackground()?"neutral-black":"neutral-white"},{name:"--neutral-darker-neutral-base",background:this.isDarkBackground()?"neutral-darker":"neutral-base"},{name:"--neutral-base-neutral-base",background:this.isDarkBackground()?"primary-base":"neutral-base"},{name:"--neutral-purewhite-neutral-dark",background:this.isDarkBackground()?"neutral-purewhite":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkBackground()?"primary-base":"neutral-medium"},{name:"--success-base-lighter",background:this.isDarkBackground()?"success-base":"success-lighter"},{name:"--success-dark-base",background:this.isDarkBackground()?"success-dark":"success-base"},{name:"--error-base-lighter",background:this.isDarkBackground()?"error-base":"error-lighter"},{name:"--error-dark-base",background:this.isDarkBackground()?"error-dark":"error-base"}].forEach((e=>{this.styles[e.name]=window.CuraAPI.theme.colors.getColor(e.background)})),this.styles=Object.assign({},this.styles)}connectedCallback(){this.sizeHandler(),this.setColors()}formAssociatedCallback(e){e.ariaLabel=this.label}formStateRestoreCallback(e){this.value=e.value,this.checked=e.checked,this.indeterminate=e.indeterminate,this.internals.setFormValue(this.value)}formResetCallback(){this.value="",this.checked=!1,this.indeterminate=!1,this.internals.setValidity({}),this.internals.setFormValue(this.value)}formDisabledCallback(e){this.disabled=e}getClasses(){const e={container:!0};return e.checked=this.checked,e.disabled=this.disabled,e[this.background]=!0,e.indeterminate=this.indeterminate,e.position="right"===this.position,e[this.status]=!0,e}assignColor(e){return this.disabled?(this.isDarkBackground(),"neutral-dark"):{success:{icon:"success-dark",label:this.isDarkBackground()?"success-lighter":"success-darker",message:this.isDarkBackground()?"success-base":"success-dark"},error:{icon:"error-dark",label:this.isDarkBackground()?"error-lighter":"neutral-darker",message:this.isDarkBackground()?"error-base":"error-dark"},default:{icon:this.isDarkIconColor()?"neutral-black":"neutral-purewhite",label:this.isDarkBackground()?"neutral-white":"neutral-black",message:this.isDarkBackground()?"primary-lighter":"neutral-dark"}}[this.status][e]}getIcon(){const e=this.indeterminate?"minus":"check",r=this.assignColor("icon");return s("cura-icon",{class:"icon",name:e,size:"large"===this.size?20:"micro",color:r})}render(){return s(t,{key:"2e951be46f80c67ea87aaf1c613e29ae7a1cc856",role:"checkbox","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},s("div",{key:"341a30934dd6660b03e6be161999fad24fb005ef",class:this.getClasses(),style:this.styles,onClick:this.handleClick},s("div",{key:"58f32f6b047d19b8af2468b6007cf2dfb1297476",class:"info"},s("div",{key:"e23407390368c638e4e8cd9119ad3ccd1767d861",class:"label-wrapper"},s("cura-label",{key:"d7ce7b39441203e9058b0227edbfc75dd320806f",textOverflow:this.overflowLabel,class:"label"+("single"===this.overflowLabel?" textoverflow-single":""),weight:"bold",size:"large"===this.size?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&s("cura-paragraph",{key:"0684b9ab1f517083bc681bd0731aedf6d38c9873",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),s("cura-label",{key:"499419ee720a7c7ba7e42fc8fcebccfb4e0b0c42",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},s("slot",{key:"7c9637fa4a8082f6451851452db1b751218a20ec"}))),s("div",{key:"91b0a1f42d65d72aca24ff8a852d3c6f461a9cb7",class:"checkbox",tabIndex:this.ontabindex},s("input",{key:"4f1db30730b2d68d3d0f3036fd5924a9da1b541b",type:"checkbox",name:this.name,value:this.value,disabled:this.disabled,required:this.required,checked:this.checked,indeterminate:this.indeterminate}),this.getIcon())))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}.position.container{flex-direction:row}.position .label-wrapper{justify-content:end}.position .message{text-align:right}.position .label{order:1}.info{display:flex;flex-direction:column;overflow:hidden}.label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}.label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}.control{width:fit-content;cursor:pointer;position:relative}.checkbox{appearance:none;border:2px solid var(--neutral-base-neutral-medium);border-radius:4px;background:var(--neutral-black-neutral-purewhite);flex:1 0;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;box-sizing:border-box;width:var(--size);height:var(--size);flex:0 0 var(--size)}.icon{position:absolute;display:flex;opacity:0;transition:opacity 0.3s}.checkbox:focus{border-color:var(--info-base) !important}.disabled .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base);cursor:not-allowed}.disabled .checkbox:hover{border-color:var(--neutral-darker-neutral-base) !important}.disabled.checked .checkbox,.disabled.indeterminate .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base)}.disabled.checked .checkbox:hover,.disabled.indeterminate .checkbox:hover{border-color:var(--neutral-base-neutral-white);background:var(--primary-base-neutral-white)}.disabled .checkbox:focus{border-color:var(--neutral-darker-neutral-base) !important}.checked .checkbox{border-color:var(--color-dark);background:var(--color-base)}.checked .checkbox:hover{border-color:var(--color-base) !important;background:var(--color-light)}.indeterminate .checkbox{border-color:var(--color-base);background:var(--color-light)}.indeterminate .checkbox:hover{border-color:var(--color-dark) !important;background:var(--color-base)}.checked .icon,.indeterminate .icon{opacity:1}:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover{border-color:var(--neutral-purewhite-neutral-dark)}.success.dark .checkbox{background:var(--neutral-black)}.success .checkbox{border-color:var(--success-base);background:var(--success-lighter)}.success .checkbox:hover{border-color:var(--success-base) !important}.success.checked .checkbox{border-color:var(--success-dark-base);background:var(--success-base-lighter)}.success.checked .checkbox:hover{border-color:var(--success-dark-base)}.error.dark .checkbox{background:var(--neutral-black)}.error .checkbox{border-color:var(--error-base);background:var(--error-lighter)}.error .checkbox:hover{border-color:var(--error-base) !important}.error.checked .checkbox{border-color:var(--error-dark-base);background:var(--error-base-lighter)}.error.checked .checkbox:hover{border-color:var(--error-dark-base)}input{appearance:none;-webkit-appearance:none;-moz-appearance:none}'}},[321,"cura-checkbox",{checked:[1540],indeterminate:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],size:[513],background:[1],iconColor:[1,"icon-color"],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor:0}]}]),h=b,d=function(){"undefined"!=typeof customElements&&["cura-checkbox","cura-icon","cura-label","cura-paragraph"].forEach((e=>{switch(e){case"cura-checkbox":customElements.get(o(e))||customElements.define(o(e),b);break;case"cura-icon":customElements.get(o(e))||i();break;case"cura-label":customElements.get(o(e))||n();break;case"cura-paragraph":customElements.get(o(e))||l()}}))};export{h as CuraCheckbox,d as defineCustomElement}
|
|
1
|
+
import{p as e,H as r,k as a,i as s,j as t,t as o}from"./p-DBXUEjWh.js";import{f as c}from"./p-Dot54hbB.js";import{d as i}from"./p-DI66_jP6.js";import{d as n}from"./p-i55vIhdM.js";import{d as l}from"./p-PiUhcFob.js";const h=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.onchange=a(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.indeterminate=!1,this.status="default",this.disabled=!1,this.required=!1,this.ontabindex=0,this.position="left",this.size="medium",this.background="light",this.iconColor="dark",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.isDarkBackground=()=>"dark"===this.background,this.isDarkIconColor=()=>"dark"===this.iconColor,this.handleClick=()=>{this.disabled||(this.indeterminate=!1,this.checked=!this.checked,this.internals.setFormValue(this.value),this.onchange.emit({value:this.value,checked:this.checked,indeterminate:this.indeterminate}))}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size":c[this.size].size+"px","--gap":c[this.size].gap+"px"})}setColors(){[{name:"--color-base",background:this.color+"-base"},{name:"--color-lighter",background:this.color+"-lighter"},{name:"--color-light",background:this.color+"-light"},{name:"--color-dark",background:this.color+"-dark"},{name:"--info-base",background:"info-base"},{name:"--error-base",background:"error-base"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--success-dark",background:"success-dark"},{name:"--error-lighter",background:"error-lighter"},{name:"--neutral-black",background:"neutral-black"},{name:"--primary-base-neutral-white",background:this.isDarkBackground()?"primary-base":"neutral-white"},{name:"--neutral-base-neutral-medium",background:this.isDarkBackground()?"neutral-base":"neutral-medium"},{name:"--neutral-black-neutral-purewhite",background:this.isDarkBackground()?"neutral-black":"neutral-purewhite"},{name:"--neutral-black-neutral-white",background:this.isDarkBackground()?"neutral-black":"neutral-white"},{name:"--neutral-darker-neutral-base",background:this.isDarkBackground()?"neutral-darker":"neutral-base"},{name:"--neutral-base-neutral-base",background:this.isDarkBackground()?"primary-base":"neutral-base"},{name:"--neutral-purewhite-neutral-dark",background:this.isDarkBackground()?"neutral-purewhite":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkBackground()?"primary-base":"neutral-medium"},{name:"--success-base-lighter",background:this.isDarkBackground()?"success-base":"success-lighter"},{name:"--success-dark-base",background:this.isDarkBackground()?"success-dark":"success-base"},{name:"--error-base-lighter",background:this.isDarkBackground()?"error-base":"error-lighter"},{name:"--error-dark-base",background:this.isDarkBackground()?"error-dark":"error-base"}].forEach((e=>{this.styles[e.name]=window.CuraAPI.theme.colors.getColor(e.background)})),this.styles=Object.assign({},this.styles)}connectedCallback(){this.sizeHandler(),this.setColors()}formAssociatedCallback(e){e.ariaLabel=this.label}formStateRestoreCallback(e){this.value=e.value,this.checked=e.checked,this.indeterminate=e.indeterminate,this.internals.setFormValue(this.value)}formResetCallback(){this.value="",this.checked=!1,this.indeterminate=!1,this.internals.setValidity({}),this.internals.setFormValue(this.value)}formDisabledCallback(e){this.disabled=e}getClasses(){const e={container:!0};return e.checked=this.checked,e.disabled=this.disabled,e[this.background]=!0,e.indeterminate=this.indeterminate,e.position="right"===this.position,e[this.status]=!0,e}assignColor(e){return this.disabled?(this.isDarkBackground(),"neutral-dark"):{success:{icon:"success-dark",label:this.isDarkBackground()?"success-lighter":"success-darker",message:this.isDarkBackground()?"success-base":"success-dark"},error:{icon:"error-dark",label:this.isDarkBackground()?"error-lighter":"neutral-darker",message:this.isDarkBackground()?"error-base":"error-dark"},default:{icon:this.isDarkIconColor()?"neutral-black":"neutral-purewhite",label:this.isDarkBackground()?"neutral-white":"neutral-black",message:this.isDarkBackground()?"primary-lighter":"neutral-dark"}}[this.status][e]}getIcon(){const e=this.indeterminate?"minus":"check",r=this.assignColor("icon");return s("cura-icon",{class:"icon",name:e,size:"large"===this.size?20:"micro",color:r})}render(){return s(t,{key:"9236b8f9d487c042e00800a624e1b729e36b296d",role:"checkbox","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},s("div",{key:"4472e8ee4fa4d1ea6c6f4cf9ba347acc66f7df2a",class:this.getClasses(),style:this.styles,onClick:this.handleClick},s("div",{key:"1c74e35fbfbcfcbe113edcd5522e674d197b2212",class:"info"},s("div",{key:"75e7fdf6050f38473379fb3e4a5880f9eb34e88e",class:"label-wrapper"},s("cura-label",{key:"eeac634dd87a72922c0d89e1877d0e0b132e6cd9",textOverflow:this.overflowLabel,class:"label"+("single"===this.overflowLabel?" textoverflow-single":""),weight:"bold",size:"large"===this.size?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&s("cura-paragraph",{key:"7d590fd046c2ba90dbef7846f51a774d50418ca7",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),s("cura-label",{key:"f7c750b3d3ce6afaaba514ac835ceed38674a048",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},s("slot",{key:"d83d9f24b5a5274233e61256add788bfa2ee0f92"}))),s("div",{key:"3f67839bbbf8a583d41765a2a6450c71f5063066",class:"checkbox",tabIndex:this.ontabindex},s("input",{key:"ab742442fc98838433f6db949478bef6ee2e0d45",type:"checkbox",name:this.name,value:this.value,disabled:this.disabled,required:this.required,checked:this.checked,indeterminate:this.indeterminate}),this.getIcon())))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}.position.container{flex-direction:row}.position .label-wrapper{justify-content:end}.position .message{text-align:right}.position .label{order:1}.info{display:flex;flex-direction:column;overflow:hidden}.label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}.label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}.control{width:fit-content;cursor:pointer;position:relative}.checkbox{appearance:none;border:2px solid var(--neutral-base-neutral-medium);border-radius:4px;background:var(--neutral-black-neutral-purewhite);flex:1 0;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;box-sizing:border-box;width:var(--size);height:var(--size);flex:0 0 var(--size)}.icon{position:absolute;display:flex;opacity:0;transition:opacity 0.3s}.checkbox:focus{border-color:var(--info-base) !important}.disabled .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base);cursor:not-allowed}.disabled .checkbox:hover{border-color:var(--neutral-darker-neutral-base) !important}.disabled.checked .checkbox,.disabled.indeterminate .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base)}.disabled.checked .checkbox:hover,.disabled.indeterminate .checkbox:hover{border-color:var(--neutral-base-neutral-white);background:var(--primary-base-neutral-white)}.disabled .checkbox:focus{border-color:var(--neutral-darker-neutral-base) !important}.checked .checkbox{border-color:var(--color-dark);background:var(--color-base)}.checked .checkbox:hover{border-color:var(--color-base) !important;background:var(--color-light)}.indeterminate .checkbox{border-color:var(--color-base);background:var(--color-light)}.indeterminate .checkbox:hover{border-color:var(--color-dark) !important;background:var(--color-base)}.checked .icon,.indeterminate .icon{opacity:1}:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover{border-color:var(--neutral-purewhite-neutral-dark)}.success.dark .checkbox{background:var(--neutral-black)}.success .checkbox{border-color:var(--success-base);background:var(--success-lighter)}.success .checkbox:hover{border-color:var(--success-base) !important}.success.checked .checkbox{border-color:var(--success-dark-base);background:var(--success-base-lighter)}.success.checked .checkbox:hover{border-color:var(--success-dark-base)}.error.dark .checkbox{background:var(--neutral-black)}.error .checkbox{border-color:var(--error-base);background:var(--error-lighter)}.error .checkbox:hover{border-color:var(--error-base) !important}.error.checked .checkbox{border-color:var(--error-dark-base);background:var(--error-base-lighter)}.error.checked .checkbox:hover{border-color:var(--error-dark-base)}input{appearance:none;-webkit-appearance:none;-moz-appearance:none}'}},[321,"cura-checkbox",{checked:[1540],indeterminate:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],size:[513],background:[1],iconColor:[1,"icon-color"],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}],iconColor:[{assignColor:0}]}]),b=h,d=function(){"undefined"!=typeof customElements&&["cura-checkbox","cura-icon","cura-label","cura-paragraph"].forEach((e=>{switch(e){case"cura-checkbox":customElements.get(o(e))||customElements.define(o(e),h);break;case"cura-icon":customElements.get(o(e))||i();break;case"cura-label":customElements.get(o(e))||n();break;case"cura-paragraph":customElements.get(o(e))||l()}}))};export{b as CuraCheckbox,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,i as o,j as h,t as l}from"./p-DBXUEjWh.js";const e=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.level=1,this.size="large",this.spotColor="accent-dark",this.marginBlock="1.25em",this.lineHeight="120%",this.theme=window.CuraAPI.theme,this.styles={}}handleChangeColor(){this.setColors()}connectedCallback(){this.setFontProperties(),this.setColors()}setFontProperties(){this.weights=this.theme.fonts.getWeights(),this.fontSizeBase=this.theme.fonts.getSize(),this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("display"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-bold":this.weights.bold,"--font-weight-medium":this.weights.medium}}hostCSSProperties(){return{"--margin-block":this.marginBlock,"--font-size-base":this.fontSizeBase,"--line-height":this.lineHeight}}setColors(){const t=this.color?this.theme.colors.getColor(this.color):this.theme.fonts.getColor();this.styles=Object.assign(Object.assign({},this.styles),{"--color-body":t||this.theme.colors.getColor("neutral-darker"),"--color-link":this.theme.colors.getColor(""+this.spotColor)})}getClasses(){var t;const s={};return s[""+(null===(t=this.size)||void 0===t?void 0:t.toLowerCase())]=!0,s}getHeadingTag(){const t=this.getClasses(),s={1:o("h1",{style:this.styles,class:t},o("slot",null)),2:o("h2",{style:this.styles,class:t},o("slot",null)),3:o("h3",{style:this.styles,class:t},o("slot",null)),4:o("h4",{style:this.styles,class:t},o("slot",null)),5:o("h5",{style:this.styles,class:t},o("slot",null)),6:o("h6",{style:this.styles,class:t},o("slot",null)),default:o("h1",{style:this.styles,class:t},o("slot",null))};return s[""+this.level]||s.default}render(){return o(h,{key:"
|
|
1
|
+
import{p as t,H as s,i as o,j as h,t as l}from"./p-DBXUEjWh.js";const e=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.level=1,this.size="large",this.spotColor="accent-dark",this.marginBlock="1.25em",this.lineHeight="120%",this.theme=window.CuraAPI.theme,this.styles={}}handleChangeColor(){this.setColors()}connectedCallback(){this.setFontProperties(),this.setColors()}setFontProperties(){this.weights=this.theme.fonts.getWeights(),this.fontSizeBase=this.theme.fonts.getSize(),this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("display"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-bold":this.weights.bold,"--font-weight-medium":this.weights.medium}}hostCSSProperties(){return{"--margin-block":this.marginBlock,"--font-size-base":this.fontSizeBase,"--line-height":this.lineHeight}}setColors(){const t=this.color?this.theme.colors.getColor(this.color):this.theme.fonts.getColor();this.styles=Object.assign(Object.assign({},this.styles),{"--color-body":t||this.theme.colors.getColor("neutral-darker"),"--color-link":this.theme.colors.getColor(""+this.spotColor)})}getClasses(){var t;const s={};return s[""+(null===(t=this.size)||void 0===t?void 0:t.toLowerCase())]=!0,s}getHeadingTag(){const t=this.getClasses(),s={1:o("h1",{style:this.styles,class:t},o("slot",null)),2:o("h2",{style:this.styles,class:t},o("slot",null)),3:o("h3",{style:this.styles,class:t},o("slot",null)),4:o("h4",{style:this.styles,class:t},o("slot",null)),5:o("h5",{style:this.styles,class:t},o("slot",null)),6:o("h6",{style:this.styles,class:t},o("slot",null)),default:o("h1",{style:this.styles,class:t},o("slot",null))};return s[""+this.level]||s.default}render(){return o(h,{key:"b9264ba7f3ff79b474f02107824441c9f6e67ec1",style:this.hostCSSProperties(),role:"heading","aria-level":this.level},this.getHeadingTag())}get host(){return this}static get watchers(){return{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}}static get style(){return":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:3em;font-weight:var(--font-weight-bold);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.2857142857em;letter-spacing:-1.68px}:host h1 ::slotted(b),:host h1 ::slotted(strong),:host h2 ::slotted(b),:host h2 ::slotted(strong),:host h3 ::slotted(b),:host h3 ::slotted(strong),:host h4 ::slotted(b),:host h4 ::slotted(strong),:host h5 ::slotted(b),:host h5 ::slotted(strong),:host h6 ::slotted(b),:host h6 ::slotted(strong){font-weight:var(--font-weight-bold)}:host h1 ::slotted(a),:host h2 ::slotted(a),:host h3 ::slotted(a),:host h4 ::slotted(a),:host h5 ::slotted(a),:host h6 ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host h1 ::slotted(u),:host h2 ::slotted(u),:host h3 ::slotted(u),:host h4 ::slotted(u),:host h5 ::slotted(u),:host h6 ::slotted(u){text-underline-offset:10%}:host h1 ::slotted(i),:host h1 ::slotted(em),:host h2 ::slotted(i),:host h2 ::slotted(em),:host h3 ::slotted(i),:host h3 ::slotted(em),:host h4 ::slotted(i),:host h4 ::slotted(em),:host h5 ::slotted(i),:host h5 ::slotted(em),:host h6 ::slotted(i),:host h6 ::slotted(em){font-style:italic;font-weight:var(--font-weight-medium)}:host h1 ::slotted(abbr),:host h2 ::slotted(abbr),:host h3 ::slotted(abbr),:host h4 ::slotted(abbr),:host h5 ::slotted(abbr),:host h6 ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:3.429em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.8571428571em;letter-spacing:-1.92px}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.286em;line-height:calc(var(--line-height) + 5%)}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.5714285714em;letter-spacing:-1.2px}}"}},[257,"cura-display",{level:[514],size:[513],spotColor:[1,"spot-color"],color:[1],marginBlock:[513,"margin-block"],lineHeight:[513,"line-height"],styles:[32]},void 0,{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}]),i=e,a=function(){"undefined"!=typeof customElements&&["cura-display"].forEach((t=>{"cura-display"===t&&(customElements.get(l(t))||customElements.define(l(t),e))}))};export{i as CuraDisplay,a as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as a,i as t,j as o,t as
|
|
1
|
+
import{p as e,H as a,i as t,j as o,t as c}from"./p-DBXUEjWh.js";import{d as r}from"./p-Dmalf4Oj.js";const s=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.styles={"--neutral-light":this.theme.colors.getColor("neutral-light")}}render(){return t(o,{key:"d80c4ebc3e7edee04eb7e3b405cc11ea1cb65111"},t("div",{key:"af087ac20e0e2075acb87b64573734e16bdd7b62",class:"component-container",style:this.styles},t("cura-heading",{key:"f48f5ca2cd5fdb7b2862ae20e51b3963461db945",size:"xsmall",weight:"bold",color:"neutral-dark",marginBlock:"0",lineHeight:"1em"},t("slot",{key:"13030d0abe5ac052fa3c3a7e04694ecfd7a3ab23"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);padding:calc(var(--cura-spacing-base) * 3px) 0}:host(:last-child) .component-container{border-bottom:none !important}"}},[257,"cura-dropdown-search-category"]),n=s,i=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-category","cura-heading"].forEach((e=>{switch(e){case"cura-dropdown-search-category":customElements.get(c(e))||customElements.define(c(e),s);break;case"cura-heading":customElements.get(c(e))||r()}}))};export{n as CuraDropdownSearchCategory,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as o,k as
|
|
1
|
+
import{p as e,H as o,k as a,i as t,j as r,t as s}from"./p-DBXUEjWh.js";import{d as c}from"./p-Dmalf4Oj.js";const n=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.actionclick=a(this,"actionclick"),this.handleClick=e=>{this.actionclick.emit(),e.preventDefault(),e.stopPropagation()}}render(){return t(r,{key:"6b57806eb3a2c3be73c76876bfce0062e36a97fa"},t("div",{key:"5a294ef5d53177d439816d881a8d5c90b60b621e",class:"component-container",onClick:this.handleClick},t("cura-heading",{key:"ff92297c1261d69ef9fa8c2b9cdbfee6365b08f2",size:"xsmall",weight:"bold",color:"error-dark"},t("slot",{key:"b84f981ba0cff218b5bf0c94a014c83daaa184ac"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);border-bottom:none;cursor:default}:host .component-container cura-heading{--margin-block:0 !important;flex:1}"}},[257,"cura-dropdown-search-not-found"]),i=n,d=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-not-found","cura-heading"].forEach((e=>{switch(e){case"cura-dropdown-search-not-found":customElements.get(s(e))||customElements.define(s(e),n);break;case"cura-heading":customElements.get(s(e))||c()}}))};export{i as CuraDropdownSearchNotFound,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,k as a,i as
|
|
1
|
+
import{p as t,H as e,k as a,i as c,j as o,t as r}from"./p-DBXUEjWh.js";const i=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.actionclick=a(this,"actionclick"),this.selectoption=a(this,"selectoption"),this.selectable=!0,this.selected=!1,this.highlighted=!1,this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.styles={"--neutral-light":this.theme.colors.getColor("neutral-light"),"--neutral-white":this.theme.colors.getColor("neutral-white"),"--neutral-dark":this.theme.colors.getColor("neutral-dark"),"--neutral-black":this.theme.colors.getColor("neutral-black"),"--primary-lighter-50":this.theme.colors.getColor("primary-lighter",.5),"--primary-light":this.theme.colors.getColor("primary-light"),"--primary":this.theme.colors.getColor("primary-base")}}handleSelect(){this.selectable?this.selectoption.emit(this.optionid):this.actionclick.emit()}handleActionsClick(){this.actionclick.emit()}getClasses(){return{"component-container":!0,selected:this.selected,highlighted:this.highlighted,"not-selectable":!this.selectable}}render(){return c(o,{key:"e01c513f3c2cf8ad1b4b118f2b59d5228a052112"},c("div",{key:"b59ae795fc8905929ed91fc2e18e465b0d1632f0",class:this.getClasses(),style:this.styles},c("div",{key:"f3d163ac57e5c6cbc15f4b7d822273afa1279816",class:"selectable-container",onClick:()=>this.handleSelect()},c("slot",{key:"ed9427e3251354825ee9652f653f9597ccf79383",name:"image"}),c("div",{key:"a78dcf1bfd71e42542b9f7bdb7fb43e3acc628ba",class:"content"},c("slot",{key:"7ad2f91f434cf69b5f45674e887d29fe4188cd9e"}))),c("div",{key:"7f9cac5875885a80505b7455de49c090aca7848c",class:"actions-container",onClick:()=>this.handleActionsClick()},c("slot",{key:"12496150bea58f08dc7c5a868d866f67903e545c",name:"actions"}))))}static get style(){return":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);transition:background-color 0.15s linear}:host .component-container:not(.selected):not(.not-selectable):has(.selectable-container:hover),:host .component-container:not(.selected):not(.not-selectable).highlighted{background-color:var(--neutral-white)}:host .selectable-container{flex:1;display:flex;align-items:center;justify-content:flex-start;padding:calc(var(--cura-spacing-base) * 3px) 0;min-height:calc(var(--cura-spacing-base) * 10px);min-width:0;gap:calc(var(--cura-spacing-base) * 1px);cursor:pointer}:host .selectable-container .content{flex:1;align-items:center;justify-content:flex-end;padding-right:calc(var(--cura-spacing-base) * 1px);min-width:0}:host .selectable-container ::slotted(cura-icon){--color:var(--neutral-dark) !important;margin:0 10px}:host .selectable-container ::slotted(cura-avatar){margin:0 calc(var(--cura-spacing-base) * 1px)}:host .selectable-container ::slotted(cura-heading),:host .selectable-container ::slotted(cura-paragraph){--margin-block:0 !important;--color-spot:var(--primary) !important}:host .selectable-container ::slotted(cura-heading){--color-body:var(--neutral-black) !important}:host .selectable-container ::slotted(cura-paragraph){--color-body:var(--neutral-dark) !important}:host .selected{background-color:var(--primary-lighter-50);border-bottom-color:var(--primary-light)}:host .selected .selectable-container{cursor:default}:host .selected .selectable-container ::slotted(cura-icon){--color:var(--primary) !important}:host .selected .selectable-container ::slotted(cura-heading){--color-body:var(--primary) !important}:host .actions-container{display:flex}:host .actions-container ::slotted(*){padding-left:calc(var(--cura-spacing-base) * 1px)}:host .not-selectable .selectable-container{cursor:default}:host(:last-child) .component-container{border-bottom:none !important}"}},[257,"cura-dropdown-search-option",{value:[1],optionid:[1],selectable:[516],selected:[516],highlighted:[516]}]),n=i,s=function(){"undefined"!=typeof customElements&&["cura-dropdown-search-option"].forEach((t=>{"cura-dropdown-search-option"===t&&(customElements.get(r(t))||customElements.define(r(t),i))}))};export{n as CuraDropdownSearchOption,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,k as s,i as o,j as e,t as h}from"./p-DBXUEjWh.js";import{a as n,r,c as a,b as c,d as l}from"./p-B8xnU6YS.js";import{d}from"./p-DXlGQp3a.js";import{d as p}from"./p-fn4zJrKE.js";import{d as u}from"./p-BSdkRryc.js";import{d as w}from"./p-Bf21UQXV.js";class m{constructor(t,i){this._stopPropagationEvent=t=>{this.scrollableElement.scrollHeight<=this.scrollableElement.clientHeight&&t.preventDefault(),t.stopPropagation()},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()},t&&i?(this.hostElement=t,this.scrollableElement=i):console.error("Componentes host ou scrollable não foram informados corretamente ou não existem.")}disableScroll(){this.scrollPosition=window.scrollY,window.scrollTo({top:0,behavior:"instant"}),n(),this._addEvents()}enableScroll(){r(),window.scrollTo({top:this.scrollPosition,behavior:"instant"}),this._removeEvents()}_addEvents(){this.hostElement.addEventListener("wheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("mousewheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("touchmove",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("scroll",this._preventEvent,{passive:!1}),this.scrollableElement.addEventListener("wheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("mousewheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("touchmove",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("scroll",this._stopPropagationEvent,{passive:!1})}_removeEvents(){this.hostElement.removeEventListener("wheel",this._preventEvent),this.hostElement.removeEventListener("mousewheel",this._preventEvent),this.hostElement.removeEventListener("touchmove",this._preventEvent),this.hostElement.removeEventListener("scroll",this._preventEvent),this.scrollableElement.removeEventListener("wheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("mousewheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("touchmove",this._stopPropagationEvent),this.scrollableElement.removeEventListener("scroll",this._stopPropagationEvent)}}const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.termchange=s(this,"termchange"),this.optionselect=s(this,"optionselect"),this.size="large",this.status="default",this.disabled=!1,this.required=!1,this.placeholder="",this.label="",this.icon="search",this.maxheight="400px",this.value="",this.searchdelay=400,this.searchminchars=3,this.styles={},this.zoomState=!1,this.isOnFocus=!1,this.resizeTimeoutMs=66,this.focusTimeoutMs=500,this.blurTimeoutMs=300,this.highlightedIndex=-1,this.dropdownItems=[],this.dropdownSelectableItems=[],this.handleSlotChange=()=>{this.getSlotElements()},this.handleWindowResize=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this.isMobile=a(),this.setZoomHeight()}),this.resizeTimeoutMs)},this.handleVisualViewportChange=()=>{this.zoomState&&(this.viewportTimeout&&clearTimeout(this.viewportTimeout),this.viewportTimeout=setTimeout((()=>this.setZoomHeight()),this.resizeTimeoutMs))},this.handleFocus=()=>{this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout((()=>{this.isOnFocus=!0,this.clearHighlight(),this.isMobile&&!this.zoomState&&this.enterZoom(),this.zoomState&&this.setZoomHeight(),setTimeout((()=>{var t;null===(t=this.selectedOptionElement)||void 0===t||t.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"})}),10)}),this.focusTimeoutMs)},this.handleBlur=()=>{this.blurTimeout&&clearTimeout(this.blurTimeout),this.blurTimeout=setTimeout((()=>{this.zoomState&&setTimeout((()=>this.setZoomHeight()),c?500:100),this.isOnFocus=!1}),this.blurTimeoutMs)},this.handleFocusout=()=>{this.zoomState&&this.setZoomHeight()},this.handleBackClick=()=>{this.exitZoom()},this.handleOptionActionClick=t=>{this.getInputElement().setFocus(),this._preventEvent(t)},this.handleInputClear=t=>{this.setValue(""),this.clearSelectedOptions(),this._preventEvent(t)},this.handleSelectOption=t=>{this._selectOption(t.detail),this._preventEvent(t)},this.handleInputValueChange=t=>{this.setValue(t.detail),this.selectedOptionElement&&t.detail!==this.selectedOptionElement.value&&this.clearSelectedOptions(),this._preventEvent(t)},this.handleDropdownMouseOver=()=>{(this.highlightedElement||this.highlightedIndex>=0)&&this.clearHighlight()},this.handleKeyDown=t=>{"ArrowDown"===t.key&&this.moveHighlight("next"),"ArrowUp"===t.key&&this.moveHighlight("prev"),"Enter"===t.key&&this.selectHighlight()},this.getInputElement=()=>{var t;return null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("cura-input-text")},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()}}async setFocus(){this.getInputElement().setFocus()}async selectOption(t){this._selectOption(t)}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.breakpoints=window.CuraAPI.theme.breakpoints.get(),this.styles["--info"]=window.CuraAPI.theme.colors.getColor("info-base"),this.styles["--purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor("neutral-black",.16),this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark"),this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter"),this.styles["--primary"]=window.CuraAPI.theme.colors.getColor("primary"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium,null===window||void 0===window||window.addEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.addEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.addEventListener("resize",this.handleVisualViewportChange),window.visualViewport.addEventListener("scroll",this.handleVisualViewportChange)),this.isMobile=a()}componentDidLoad(){var t;this.dropdownElement=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-container"),this.host.addEventListener("actionclick",this.handleOptionActionClick),this.host.addEventListener("selectoption",this.handleSelectOption),this.scrollBehavior=new m(this.host,this.dropdownElement),setTimeout((()=>this.getSlotElements()),10)}disconnectedCallback(){this.removeAllListeners()}removeAllListeners(){null===window||void 0===window||window.removeEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.removeEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.removeEventListener("resize",this.handleVisualViewportChange),window.visualViewport.removeEventListener("scroll",this.handleVisualViewportChange)),this.host.removeEventListener("actionclick",this.handleOptionActionClick),this.host.removeEventListener("selectoption",this.handleSelectOption)}moveHighlight(t){if(!this.dropdownSelectableItems.length)return;let i="next"===t?this.highlightedIndex+1:this.highlightedIndex-1;if(i<0)return void this.clearHighlight();const s=this.dropdownSelectableItems.length-1;i>s&&(i=s),this.highlightedElement&&(this.highlightedElement.highlighted=!1),this.highlightedIndex=i,this.highlightedElement=this.dropdownSelectableItems[i],this.highlightedElement.selected?this.moveHighlight(t):(this.highlightedElement.highlighted=!0,this.highlightedElement.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}))}clearHighlight(){this.highlightedElement&&(this.highlightedElement.highlighted=!1,this.highlightedElement=null),this.highlightedIndex=-1}selectHighlight(){this.highlightedElement&&(this._selectOption(this.highlightedElement.optionid),this.clearHighlight(),this.getInputElement().blur())}setValue(t){this.value!==t&&(this.value=t,this.valueTimeout&&clearTimeout(this.valueTimeout),this.valueTimeout=setTimeout((()=>{var t;const i=null!==(t=this.value)&&void 0!==t?t:"";this.termchange.emit(""===i||i.length<this.searchminchars?"":i)}),this.searchdelay||300))}_selectOption(t){if(!t)return this.clearSelectedOptions(),void this.setValue("");const i=this.dropdownSelectableItems.find((i=>i.optionid===t));i&&!i.selected&&(this.clearSelectedOptions(),this.selectedOptionElement=i,this.selectedOptionElement.selected=!0,this.setValue(this.selectedOptionElement.value),this.optionselect.emit(this.selectedOptionElement.optionid),this.zoomState&&setTimeout((()=>this.exitZoom()),this.blurTimeoutMs))}clearSelectedOptions(){this.dropdownSelectableItems.forEach((t=>{t.selected&&(t.selected=!1)})),this.selectedOptionElement=null}getSlotElements(){const t=[],i=[];let s=!1;this.dropdownElement&&this.dropdownElement.querySelector("slot").assignedElements().forEach((o=>{t.push(o),"cura-dropdown-search-option"===o.localName&&o.selectable&&i.push(o),"cura-dropdown-search-not-found"===o.localName&&(s=!0)})),this.dropdownSelectableItems=i,this.dropdownItems=t,this.status=s?"error":"default"}enterZoom(){this.scrollBehavior.disableScroll(),this.setZoomHeight(),this.zoomState=!0}exitZoom(){this.scrollBehavior.enableScroll(),this.setZoomHeight(),setTimeout((()=>{this.zoomState=!1}),300)}setZoomHeight(){if(null===window||void 0===window?void 0:window.visualViewport){const t=window.visualViewport.height+"px",i=window.visualViewport.offsetTop+"px";return void(this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":i}))}const t=window?window.innerHeight+"px":"100vh";this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":"0px"})}getClasses(){return{"component-container":!0,mobile:this.isMobile,zoom:this.zoomState,"dropdown-visible":this.isOnFocus&&this.dropdownItems.length>0&&!this.zoomState,error:"error"===this.status}}getHostCSSProperties(){return{"--max-height":this.maxheight||"400px"}}render(){return o(e,{key:"7a312071ecc60fe462636ad7b32bcb82b5d5c1a2",style:this.getHostCSSProperties(),role:"search","aria-label":this.label,"aria-required":this.required,"aria-disabled":this.disabled,"aria-expanded":this.zoomState},o("div",{key:"c4b906871b300013208649f8dcf9b27cf161daae",class:this.getClasses(),style:this.styles},o("div",{key:"97d3d3ae67dc79f2d04456555388cce9aec36f7d",class:"component-controls"},this.isMobile&&this.zoomState?o("cura-button-transparent",{fontColor:"dark",onClick:()=>this.handleBackClick(),iconName:"arrowLeft",size:"large",iconOnly:!0,color:"primary",id:"button-back"}):"",o("cura-input-text",{key:"53aa07646542b9941804f7a7f0d66f8c340ce664",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:this.zoomState?"transparent":"default",required:this.required,iconName:this.icon||"search",value:this.value,status:this.status,onValueChange:t=>this.handleInputValueChange(t),onInput:t=>this._preventEvent(t),onFocus:()=>this.handleFocus(),onClick:t=>this._preventEvent(t),onBlur:()=>this.handleBlur(),onFocusout:()=>this.handleFocusout(),onInputClear:t=>this.handleInputClear(t),placeholder:this.placeholder,size:this.size,onKeyDown:t=>this.handleKeyDown(t)},o("slot",{key:"fb206e8295b0139082b79cc747bfe8e424df33fa",name:"helperText"}))),o("div",{key:"8ab0ad70e667c4b01b2f7a31fc5df6056b170565",class:"dropdown-container",onMouseOver:()=>this.handleDropdownMouseOver()},o("slot",{key:"dc3cda02f7a70d7229457d6c225a606ee2e03f52",onSlotchange:()=>this.handleSlotChange()}))))}get host(){return this}static get style(){return":host{display:block;box-sizing:border-box;position:relative}:host .component-controls{display:flex;align-items:center;justify-content:center;gap:calc(var(--cura-spacing-base) * 1px)}:host .component-controls #button-back{padding:0 0 0 calc(var(--cura-spacing-base) * 3px);width:max-content}:host .component-container{box-sizing:border-box;width:100%;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:min-content 1fr}:host .component-container.zoom{position:fixed;top:var(--top-offset, 0);left:0;width:100vw;background:var(--purewhite);height:var(--height);z-index:9999;overscroll-behavior:contain}:host .component-container.zoom .component-controls{border-bottom:2px solid var(--primary);padding:calc(var(--cura-spacing-base) * 3px) 0}:host .component-container.zoom.error .component-controls{border-bottom:2px solid var(--error-dark);background-color:var(--error-lighter)}:host .component-container .dropdown-container{box-sizing:border-box;width:100%;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;padding:calc(var(--cura-spacing-base) * 3px);overscroll-behavior:contain}:host .component-container:not(.zoom) .dropdown-container{box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;bottom:0;left:0;transform:translateY(100%);max-height:var(--max-height);background-color:var(--purewhite);border-radius:0px 0px calc(var(--cura-spacing-base) * 1px) calc(var(--cura-spacing-base) * 1px);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);border-right:2px solid var(--neutral-light);display:none;z-index:9997}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-field){border-radius:4px 4px 0px 0px}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-text-helper){height:0px;overflow:hidden;margin-top:0px}:host .component-container:not(.zoom).dropdown-visible .dropdown-container{display:block}"}},[257,"cura-dropdown-search",{name:[513],size:[513],status:[1537],disabled:[516],required:[516],placeholder:[513],label:[513],icon:[513],maxheight:[513],value:[1025],searchdelay:[514],searchminchars:[514],styles:[32],zoomState:[32],isOnFocus:[32],dropdownItems:[32],setFocus:[64],selectOption:[64]}]),v=b,f=function(){"undefined"!=typeof customElements&&["cura-dropdown-search","cura-button-transparent","cura-icon","cura-input-text","cura-label","cura-loader-circle"].forEach((t=>{switch(t){case"cura-dropdown-search":customElements.get(h(t))||customElements.define(h(t),b);break;case"cura-button-transparent":customElements.get(h(t))||d();break;case"cura-icon":customElements.get(h(t))||p();break;case"cura-input-text":customElements.get(h(t))||l();break;case"cura-label":customElements.get(h(t))||u();break;case"cura-loader-circle":customElements.get(h(t))||w()}}))};export{v as CuraDropdownSearch,f as defineCustomElement}
|
|
1
|
+
import{p as t,H as i,k as s,i as o,j as e,t as h}from"./p-DBXUEjWh.js";import{a as n,r,c as a,b as c}from"./p-B2TDH4aP.js";import{d as l}from"./p-DgQJ968V.js";import{d}from"./p-DI66_jP6.js";import{d as p}from"./p-DgK8dEko.js";import{d as u}from"./p-i55vIhdM.js";import{d as w}from"./p-DQP7jRHp.js";class m{constructor(t,i){this._stopPropagationEvent=t=>{this.scrollableElement.scrollHeight<=this.scrollableElement.clientHeight&&t.preventDefault(),t.stopPropagation()},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()},t&&i?(this.hostElement=t,this.scrollableElement=i):console.error("Componentes host ou scrollable não foram informados corretamente ou não existem.")}disableScroll(){this.scrollPosition=window.scrollY,window.scrollTo({top:0,behavior:"instant"}),n(),this._addEvents()}enableScroll(){r(),window.scrollTo({top:this.scrollPosition,behavior:"instant"}),this._removeEvents()}_addEvents(){this.hostElement.addEventListener("wheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("mousewheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("touchmove",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("scroll",this._preventEvent,{passive:!1}),this.scrollableElement.addEventListener("wheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("mousewheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("touchmove",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("scroll",this._stopPropagationEvent,{passive:!1})}_removeEvents(){this.hostElement.removeEventListener("wheel",this._preventEvent),this.hostElement.removeEventListener("mousewheel",this._preventEvent),this.hostElement.removeEventListener("touchmove",this._preventEvent),this.hostElement.removeEventListener("scroll",this._preventEvent),this.scrollableElement.removeEventListener("wheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("mousewheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("touchmove",this._stopPropagationEvent),this.scrollableElement.removeEventListener("scroll",this._stopPropagationEvent)}}const b=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.termchange=s(this,"termchange"),this.optionselect=s(this,"optionselect"),this.size="large",this.status="default",this.disabled=!1,this.required=!1,this.placeholder="",this.label="",this.icon="search",this.maxheight="400px",this.value="",this.searchdelay=400,this.searchminchars=3,this.styles={},this.zoomState=!1,this.isOnFocus=!1,this.resizeTimeoutMs=66,this.focusTimeoutMs=500,this.blurTimeoutMs=300,this.highlightedIndex=-1,this.dropdownItems=[],this.dropdownSelectableItems=[],this.handleSlotChange=()=>{this.getSlotElements()},this.handleWindowResize=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this.isMobile=a(),this.setZoomHeight()}),this.resizeTimeoutMs)},this.handleVisualViewportChange=()=>{this.zoomState&&(this.viewportTimeout&&clearTimeout(this.viewportTimeout),this.viewportTimeout=setTimeout((()=>this.setZoomHeight()),this.resizeTimeoutMs))},this.handleFocus=()=>{this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout((()=>{this.isOnFocus=!0,this.clearHighlight(),this.isMobile&&!this.zoomState&&this.enterZoom(),this.zoomState&&this.setZoomHeight(),setTimeout((()=>{var t;null===(t=this.selectedOptionElement)||void 0===t||t.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"})}),10)}),this.focusTimeoutMs)},this.handleBlur=()=>{this.blurTimeout&&clearTimeout(this.blurTimeout),this.blurTimeout=setTimeout((()=>{this.zoomState&&setTimeout((()=>this.setZoomHeight()),c?500:100),this.isOnFocus=!1}),this.blurTimeoutMs)},this.handleFocusout=()=>{this.zoomState&&this.setZoomHeight()},this.handleBackClick=()=>{this.exitZoom()},this.handleOptionActionClick=t=>{this.getInputElement().setFocus(),this._preventEvent(t)},this.handleInputClear=t=>{this.setValue(""),this.clearSelectedOptions(),this._preventEvent(t)},this.handleSelectOption=t=>{this._selectOption(t.detail),this._preventEvent(t)},this.handleInputValueChange=t=>{this.setValue(t.detail),this.selectedOptionElement&&t.detail!==this.selectedOptionElement.value&&this.clearSelectedOptions(),this._preventEvent(t)},this.handleDropdownMouseOver=()=>{(this.highlightedElement||this.highlightedIndex>=0)&&this.clearHighlight()},this.handleKeyDown=t=>{"ArrowDown"===t.key&&this.moveHighlight("next"),"ArrowUp"===t.key&&this.moveHighlight("prev"),"Enter"===t.key&&this.selectHighlight()},this.getInputElement=()=>{var t;return null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("cura-input-text")},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()}}async setFocus(){this.getInputElement().setFocus()}async selectOption(t){this._selectOption(t)}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.breakpoints=window.CuraAPI.theme.breakpoints.get(),this.styles["--info"]=window.CuraAPI.theme.colors.getColor("info-base"),this.styles["--purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor("neutral-black",.16),this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark"),this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter"),this.styles["--primary"]=window.CuraAPI.theme.colors.getColor("primary"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium,null===window||void 0===window||window.addEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.addEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.addEventListener("resize",this.handleVisualViewportChange),window.visualViewport.addEventListener("scroll",this.handleVisualViewportChange)),this.isMobile=a()}componentDidLoad(){var t;this.dropdownElement=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-container"),this.host.addEventListener("actionclick",this.handleOptionActionClick),this.host.addEventListener("selectoption",this.handleSelectOption),this.scrollBehavior=new m(this.host,this.dropdownElement),setTimeout((()=>this.getSlotElements()),10)}disconnectedCallback(){this.removeAllListeners()}removeAllListeners(){null===window||void 0===window||window.removeEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.removeEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.removeEventListener("resize",this.handleVisualViewportChange),window.visualViewport.removeEventListener("scroll",this.handleVisualViewportChange)),this.host.removeEventListener("actionclick",this.handleOptionActionClick),this.host.removeEventListener("selectoption",this.handleSelectOption)}moveHighlight(t){if(!this.dropdownSelectableItems.length)return;let i="next"===t?this.highlightedIndex+1:this.highlightedIndex-1;if(i<0)return void this.clearHighlight();const s=this.dropdownSelectableItems.length-1;i>s&&(i=s),this.highlightedElement&&(this.highlightedElement.highlighted=!1),this.highlightedIndex=i,this.highlightedElement=this.dropdownSelectableItems[i],this.highlightedElement.selected?this.moveHighlight(t):(this.highlightedElement.highlighted=!0,this.highlightedElement.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}))}clearHighlight(){this.highlightedElement&&(this.highlightedElement.highlighted=!1,this.highlightedElement=null),this.highlightedIndex=-1}selectHighlight(){this.highlightedElement&&(this._selectOption(this.highlightedElement.optionid),this.clearHighlight(),this.getInputElement().blur())}setValue(t){this.value!==t&&(this.value=t,this.valueTimeout&&clearTimeout(this.valueTimeout),this.valueTimeout=setTimeout((()=>{var t;const i=null!==(t=this.value)&&void 0!==t?t:"";this.termchange.emit(""===i||i.length<this.searchminchars?"":i)}),this.searchdelay||300))}_selectOption(t){if(!t)return this.clearSelectedOptions(),void this.setValue("");const i=this.dropdownSelectableItems.find((i=>i.optionid===t));i&&!i.selected&&(this.clearSelectedOptions(),this.selectedOptionElement=i,this.selectedOptionElement.selected=!0,this.setValue(this.selectedOptionElement.value),this.optionselect.emit(this.selectedOptionElement.optionid),this.zoomState&&setTimeout((()=>this.exitZoom()),this.blurTimeoutMs))}clearSelectedOptions(){this.dropdownSelectableItems.forEach((t=>{t.selected&&(t.selected=!1)})),this.selectedOptionElement=null}getSlotElements(){const t=[],i=[];let s=!1;this.dropdownElement&&this.dropdownElement.querySelector("slot").assignedElements().forEach((o=>{t.push(o),"cura-dropdown-search-option"===o.localName&&o.selectable&&i.push(o),"cura-dropdown-search-not-found"===o.localName&&(s=!0)})),this.dropdownSelectableItems=i,this.dropdownItems=t,this.status=s?"error":"default"}enterZoom(){this.scrollBehavior.disableScroll(),this.setZoomHeight(),this.zoomState=!0}exitZoom(){this.scrollBehavior.enableScroll(),this.setZoomHeight(),setTimeout((()=>{this.zoomState=!1}),300)}setZoomHeight(){if(null===window||void 0===window?void 0:window.visualViewport){const t=window.visualViewport.height+"px",i=window.visualViewport.offsetTop+"px";return void(this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":i}))}const t=window?window.innerHeight+"px":"100vh";this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":"0px"})}getClasses(){return{"component-container":!0,mobile:this.isMobile,zoom:this.zoomState,"dropdown-visible":this.isOnFocus&&this.dropdownItems.length>0&&!this.zoomState,error:"error"===this.status}}getHostCSSProperties(){return{"--max-height":this.maxheight||"400px"}}render(){return o(e,{key:"4eebe0e03eb20a9c056158e9bb7dafad6c5d7e36",style:this.getHostCSSProperties(),role:"search","aria-label":this.label,"aria-required":this.required,"aria-disabled":this.disabled,"aria-expanded":this.zoomState},o("div",{key:"c74a9785e747c23f853beabce244d9d79be963f6",class:this.getClasses(),style:this.styles},o("div",{key:"8e0e1b8ad5929f7a65d970da37af8da526ea1ec6",class:"component-controls"},this.isMobile&&this.zoomState?o("cura-button-transparent",{fontColor:"dark",onClick:()=>this.handleBackClick(),iconName:"arrowLeft",size:"large",iconOnly:!0,color:"primary",id:"button-back"}):"",o("cura-input-text",{key:"d6b1e0284f7f8bbd0293ca8c7e11de7e4d390729",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:this.zoomState?"transparent":"default",required:this.required,iconName:this.icon||"search",value:this.value,status:this.status,onValueChange:t=>this.handleInputValueChange(t),onInput:t=>this._preventEvent(t),onFocus:()=>this.handleFocus(),onClick:t=>this._preventEvent(t),onBlur:()=>this.handleBlur(),onFocusout:()=>this.handleFocusout(),onInputClear:t=>this.handleInputClear(t),placeholder:this.placeholder,size:this.size,onKeyDown:t=>this.handleKeyDown(t)},o("slot",{key:"3626dc325181c193081af56996804453c9dee9f5",name:"helperText"}))),o("div",{key:"c0b979983b567e35a15e756d24cecf0a0102e2bc",class:"dropdown-container",onMouseOver:()=>this.handleDropdownMouseOver()},o("slot",{key:"56fc0ae14345c88eaf214a12f6ebf545fc040aea",onSlotchange:()=>this.handleSlotChange()}))))}get host(){return this}static get style(){return":host{display:block;box-sizing:border-box;position:relative}:host .component-controls{display:flex;align-items:center;justify-content:center;gap:calc(var(--cura-spacing-base) * 1px)}:host .component-controls #button-back{padding:0 0 0 calc(var(--cura-spacing-base) * 3px);width:max-content}:host .component-container{box-sizing:border-box;width:100%;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:min-content 1fr}:host .component-container.zoom{position:fixed;top:var(--top-offset, 0);left:0;width:100vw;background:var(--purewhite);height:var(--height);z-index:9999;overscroll-behavior:contain}:host .component-container.zoom .component-controls{border-bottom:2px solid var(--primary);padding:calc(var(--cura-spacing-base) * 3px) 0}:host .component-container.zoom.error .component-controls{border-bottom:2px solid var(--error-dark);background-color:var(--error-lighter)}:host .component-container .dropdown-container{box-sizing:border-box;width:100%;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;padding:calc(var(--cura-spacing-base) * 3px);overscroll-behavior:contain}:host .component-container:not(.zoom) .dropdown-container{box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;bottom:0;left:0;transform:translateY(100%);max-height:var(--max-height);background-color:var(--purewhite);border-radius:0px 0px calc(var(--cura-spacing-base) * 1px) calc(var(--cura-spacing-base) * 1px);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);border-right:2px solid var(--neutral-light);display:none;z-index:9997}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-field){border-radius:4px 4px 0px 0px}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-text-helper){height:0px;overflow:hidden;margin-top:0px}:host .component-container:not(.zoom).dropdown-visible .dropdown-container{display:block}"}},[257,"cura-dropdown-search",{name:[513],size:[513],status:[1537],disabled:[516],required:[516],placeholder:[513],label:[513],icon:[513],maxheight:[513],value:[1025],searchdelay:[514],searchminchars:[514],styles:[32],zoomState:[32],isOnFocus:[32],dropdownItems:[32],setFocus:[64],selectOption:[64]}]),v=b,x=function(){"undefined"!=typeof customElements&&["cura-dropdown-search","cura-button-transparent","cura-icon","cura-input-text","cura-label","cura-loader-circle"].forEach((t=>{switch(t){case"cura-dropdown-search":customElements.get(h(t))||customElements.define(h(t),b);break;case"cura-button-transparent":customElements.get(h(t))||l();break;case"cura-icon":customElements.get(h(t))||d();break;case"cura-input-text":customElements.get(h(t))||p();break;case"cura-label":customElements.get(h(t))||u();break;case"cura-loader-circle":customElements.get(h(t))||w()}}))};export{v as CuraDropdownSearch,x as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as s}from"./p-
|
|
1
|
+
import{C as o,d as s}from"./p-Dmalf4Oj.js";const a=o,m=s;export{a as CuraHeading,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as
|
|
1
|
+
import{C as o,d as s}from"./p-DI66_jP6.js";const p=o,r=s;export{p as CuraIcon,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as i,i as a,j as c,t as r}from"./p-DBXUEjWh.js";import{i as s,d as t}from"./p-
|
|
1
|
+
import{p as e,H as i,i as a,j as c,t as r}from"./p-DBXUEjWh.js";import{i as s,d as t}from"./p-DI66_jP6.js";import{d as l}from"./p-Dmalf4Oj.js";import{d as o}from"./p-i55vIhdM.js";var n=["360","accessibility","accessibility2","accessibility3","accessibility4","addUser","airdrop","alertCircle","alertTriangle","arrowDown","arrowDownCircle","arrowLeft","arrowLeftCircle","arrowRight","arrowRightCircle","arrowUp","arrowUpCircle","attach","autism","avatarF","avatarM","bike","biometry","biop","bloodGroup","calendar","cam","camOff","cart","central","chatCircle","check","checkBadge","checkCircle","checkDouble","clock","close","closeCircle","coffee","collapse","config","contacts","currency","delete","desktop","doc","down","download","drug","duplicate","edit","elevator","exam","examDoc","expand","facebook","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","geotagUnity","geotagUnityGroup","google","graph","healthPlan","heart","height","height2","home","horizontalList","id","image","imageUp","infoCircle","instagram","key","lab","lamp","language","language2","languageEN","languagePT","lattes","left","like","link","linkExternal","linkedin","list","login","logout","mail","maintenance","medDoc","medEspec","medImg","medUser","medical","menuHamburguer","menuKebab","menuMeatballs","mic","micOff","minus","minusCircle","minusSquare","mobile","mobileClick","mobileRotate1","mobileRotate2","mobileRotate3","news","notification","npsDeslike","npsHate","npsLike","npsLove","npsNeutral","order","parking","partner","phone","play","plus","plusCircle","plusSquare","print","profile","profileCircle","questionCircle","questionSquare","range","reload","ribbon","right","schedule","scheduleCancel","scheduleCheck","scheduleHistorico","search","secure","share","siren","sound","soundOff","star","stop","store","subItem","swap","target","team","telegram","twitter","unLink","unSecure","unity","unlike","up","upload","vaccine","verticalList","viewFalse","viewTrue","weight","whatsapp","wifi","wifiOff","xray","youtube","zoomIn","zoomOut"];const d=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.sizes=Object.keys(s).filter((e=>"default"!==e)),this.colors=["primary","secondary","accent","info","warning","error","success","neutral"],this.selected=n[0],this.setSelected=e=>{this.selected=e}}connectedCallback(){this.sizes.unshift(this.sizes.pop())}render(){return a(c,{key:"f25d10b3f380cc58fd5b4e77b437e09ba0787df4"},a("div",{key:"5162f1c8aff585a60f37ef9af8451dae8b310394",class:"iconDetail"},a("cura-heading",{key:"2e95f88bf98bcb3b5ea8b2ce6b015ef5d3c984e5",size:"small","margin-block":"0 24px"},"Icon: ",a("b",{key:"102d867291ca3af92c370f044a7140571b15c737"},this.selected)),a("div",{key:"e2fd0833644705ea8b406508be51c6d2d5683d24",class:"iconSizes"},this.sizes.map((e=>a("div",{class:"size"},a("cura-icon",{name:this.selected,size:e}),a("span",null,e))))),a("div",{key:"fa842318750f3cdb5e5d7f7333c9221aaf66b585",class:"iconSizes invert"},this.sizes.map((e=>a("div",{class:"size"},a("cura-icon",{name:this.selected,size:e,color:"neutral-white"}),a("span",null,e)))))),a("div",{key:"a25fd5649fe3bda93f80208e634790da44dde89b",class:"icons"},n.map((e=>a("div",{class:{icon:!0,selected:e===this.selected},onClick:()=>this.setSelected(e)},a("cura-icon",{name:e,size:"32",color:e===this.selected?"accent-dark":"neutral-dark"}),a("cura-label",{size:"xsmall",weight:e===this.selected?"bold":"regular",color:e===this.selected?"accent-dark":"neutral-dark"},e))))))}static get style(){return':host{display:block;padding:24px;font-family:"Roboto", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:flex;align-items:center}.iconSizes .size{display:flex;flex-direction:column;text-align:center;align-items:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px;margin:8px 0}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#2d2d2d;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:flex;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;transition:opacity 0.2s linear;width:105px;display:flex;flex-direction:column;text-align:center;align-items:center;margin-bottom:16px;box-sizing:border-box;}.icons .icon cura-label{margin-top:8px}.icons .icon cura-paragraph{margin-top:4px}'}},[1,"cura-icons-view",{selected:[32]}]),u=d,p=function(){"undefined"!=typeof customElements&&["cura-icons-view","cura-heading","cura-icon","cura-label"].forEach((e=>{switch(e){case"cura-icons-view":customElements.get(r(e))||customElements.define(r(e),d);break;case"cura-heading":customElements.get(r(e))||l();break;case"cura-icon":customElements.get(r(e))||t();break;case"cura-label":customElements.get(r(e))||o()}}))};export{u as CuraIconsView,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,k as s,i as a,j as i,t as r}from"./p-DBXUEjWh.js";import{d as n}from"./p-
|
|
1
|
+
import{p as t,H as e,k as s,i as a,j as i,t as r}from"./p-DBXUEjWh.js";import{d as n}from"./p-DgQJ968V.js";import{i as o,a as l,d as c}from"./p-BHVSbubb.js";import{d}from"./p-DI66_jP6.js";import{d as h}from"./p-DgK8dEko.js";import{d as u}from"./p-i55vIhdM.js";import{d as p}from"./p-DQP7jRHp.js";import{d as m}from"./p-D4hCuriT.js";import{d as b}from"./p-BuETJyzc.js";const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.dateChange=s(this,"dateChange"),this.statusInputChange=s(this,"statusInputChange"),this.label="",this.status="default",this.size="medium",this.name="",this.iconName="",this.placeholder=null,this.calendarType="dropdown",this.styles={},this.isCalendarVisible=!1,this.dates=[],this.value="",this.dateSettings={placeholder:null,mask:"date",mode:"single"}}connectedCallback(){const{fonts:t,colors:e,spacing:s}=window.CuraAPI.theme,a=t.getWeights();this.styles={"--base-spacing":s.getSpacing(),"--neutral-purewhite":e.getColor("neutral-purewhite"),"--neutral-lighter":e.getColor("neutral-lighter"),"--neutral-base":e.getColor("neutral-base"),"--font-size":t.getSize(),"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-weight-regular":a.regular}}componentWillLoad(){this.updateDateSettings()}formAssociatedCallback(t){t.ariaLabel=this.label}updateDateSettings(){const t=this.getDateSettings(this.enableRangeDates);this.shouldUpdateDateSettings(t)&&(this.dateSettings=t)}getDateSettings(t){return{placeholder:this.placeholder||(t?"dd/mm/aaaa - dd/mm/aaaa":"dd/mm/aaaa"),mask:t?"dateRange":"date",mode:t?"range":"single"}}shouldUpdateDateSettings(t){return this.dateSettings.placeholder!==t.placeholder||this.dateSettings.mask!==t.mask||this.dateSettings.mode!==t.mode}handleClick(t){this.el.contains(t.target)||this.hideCalendar()}hideCalendar(){this.isCalendarVisible=!1}showCalendar(){this.isCalendarVisible=!0}handleInputDates(t){const e=t.target.value,s=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/,a=/^(\d{2}\/\d{2}\/\d{4})$/;if(s.test(e)){const t=e.match(s),a=this.parseStringToDate(t[1]),i=this.parseStringToDate(t[2]);this.isDateValid(a)&&this.isDateValid(i)?(this.status="default",this.dates=[a,i],this.value=`${this.parseDateToString(a)} - ${this.parseDateToString(i)}`,this.dateChange.emit(this.value)):this.resetDates()}else if(a.test(e)){const t=e.match(a),s=this.parseStringToDate(t[1]);this.isDateValid(s)?(this.status="default",this.dates=[s],this.value=this.parseDateToString(s),this.dateChange.emit(this.value)):this.resetDates()}else this.dates=[]}handleChangeDates(t){""===t.detail&&(this.dates=[],this.status="default",this.value="",this.dateChange.emit(this.value),this.statusInputChange.emit(this.status))}isDateValid(t){const e=new Date;return e.setHours(0,0,0,0),this.disablePassDates?!o(t,e):!this.disableFutureDates||!l(t,e)}parseStringToDate(t){const[e,s,a]=t.split("/").map(Number);return new Date(a,s-1,e)}parseDateToString(t){return`${(t.getDate()+"").padStart(2,"0")}/${(t.getMonth()+1+"").padStart(2,"0")}/${t.getFullYear()}`}resetDates(){this.status="error",this.dates=[],this.statusInputChange.emit(this.status)}renderCalendarOrHelperText(){return this.isCalendarVisible?a("div",{class:"calendar visible"},a("cura-calendar",{customDates:this.dates,mode:this.dateSettings.mode,type:this.calendarType||"dropdown",width:"100%",maxWidth:"400px",embedded:!1,floating:!1,disableFutureDates:this.disableFutureDates,disablePassDates:this.disablePassDates,onOnchangeday:t=>{const e=t.detail.days;this.value=1===e.length?this.parseDateToString(e[0]):e.length>0?`${this.parseDateToString(e[0])} - ${this.parseDateToString(e[e.length-1])}`:"",this.dateChange.emit(this.value)}})):this.helperText}render(){return a(i,{key:"fe506eeb9ca1193994e8988f59f7d39aa09afb7c"},a("div",{key:"33b50ee8b32c70855ec061a0fb9747203f473a62",class:"container",style:this.styles},a("cura-input-text",{key:"8c3d0254c3b6dcd0b24a5c5a27e1b4aeda4c83df",label:this.label,name:this.name,status:this.status,value:this.value,onFocus:()=>this.showCalendar(),size:this.size,"icon-name":this.iconName,placeholder:this.dateSettings.placeholder,"mask-preset":this.dateSettings.mask,"enable-selection-mode":!0,onKeyUp:t=>this.handleInputDates(t),autocomplete:"off",onValueChange:t=>this.handleChangeDates(t)},this.renderCalendarOrHelperText())))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{enableRangeDates:[{updateDateSettings:0}]}}static get style(){return":host{display:block}.container{display:flex;flex-direction:column;position:relative}.container .calendar{padding:0px calc(var(--cura-spacing-base) * 3px);margin-top:-8px;border-radius:0px 0px 4px 4px;border-top:0px;border-right:2px solid #D4D4D4;border-bottom:2px solid #D4D4D4;border-left:2px solid #D4D4D4;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;top:100%;z-index:10;display:none;opacity:0;pointer-events:none}.container .calendar.visible{box-sizing:border-box;display:block;opacity:1;pointer-events:all;width:100%;background-color:#fff}"}},[65,"cura-input-date",{label:[513],status:[1537],size:[513],name:[513],helperText:[513,"helper-text"],enableRangeDates:[516,"enable-range-dates"],disableFutureDates:[516,"disable-future-dates"],disablePassDates:[516,"disable-pass-dates"],iconName:[513,"icon-name"],placeholder:[513],calendarType:[513,"calendar-type"],styles:[32],isCalendarVisible:[32],dates:[32],value:[32],dateSettings:[32]},[[8,"click","handleClick"]],{enableRangeDates:[{updateDateSettings:0}]}]),g=f,D=function(){"undefined"!=typeof customElements&&["cura-input-date","cura-button-transparent","cura-calendar","cura-icon","cura-input-text","cura-label","cura-loader-circle","cura-select","cura-select-option"].forEach((t=>{switch(t){case"cura-input-date":customElements.get(r(t))||customElements.define(r(t),f);break;case"cura-button-transparent":customElements.get(r(t))||n();break;case"cura-calendar":customElements.get(r(t))||c();break;case"cura-icon":customElements.get(r(t))||d();break;case"cura-input-text":customElements.get(r(t))||h();break;case"cura-label":customElements.get(r(t))||u();break;case"cura-loader-circle":customElements.get(r(t))||p();break;case"cura-select":customElements.get(r(t))||m();break;case"cura-select-option":customElements.get(r(t))||b()}}))};export{g as CuraInputDate,D as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as s}from"./p-
|
|
1
|
+
import{C as o,d as s}from"./p-DgK8dEko.js";const p=o,r=s;export{p as CuraInputText,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CuraInputTextarea extends Components.CuraInputTextarea, HTMLElement {}
|
|
4
|
+
export const CuraInputTextarea: {
|
|
5
|
+
prototype: CuraInputTextarea;
|
|
6
|
+
new (): CuraInputTextarea;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,H as r,k as a,i as t,j as i,t as s}from"./p-DBXUEjWh.js";import{c as o,b as l,f as c}from"./p-B2TDH4aP.js";import{d as u}from"./p-DI66_jP6.js";import{d as n}from"./p-i55vIhdM.js";import{d}from"./p-DQP7jRHp.js";const h=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.valueChange=a(this,"valueChange"),this.inputClear=a(this,"inputClear"),this.internals=this.attachInternals(),this.status="default",this.size="medium",this.label="",this.name="",this.placeholder=null,this.value="",this.iconName="",this.disabled=!1,this.required=!1,this.readOnly=!1,this.resizable=!0,this.isLoading=!1,this.isHovered=!1,this.isFocused=!1,this.currentValue="",this.fieldStyles={height:"auto"},this.hideErrorIcon=!1,this.autocomplete="on",this.styles={}}async setFocus(){const e=o()&&l()?1e3:200;let r=c(this.host);setTimeout((()=>{this.inputRef.focus(),r&&r.remove()}),e)}formStateRestoreCallback(e){this.currentValue=e.value,this.internals.setFormValue(this.currentValue)}formAssociatedCallback(e){e.ariaLabel=this.label}formResetCallback(){this.handleClearInput(),this.internals.setValidity({}),this.internals.setFormValue("")}formDisabledCallback(e){this.disabled=e}connectedCallback(){this.styles["--primary-base"]=window.CuraAPI.theme.colors.getColor("primary-base"),this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor("neutral-white"),this.styles["--neutral-black"]=window.CuraAPI.theme.colors.getColor("neutral-black"),this.styles["--neutral-medium"]=window.CuraAPI.theme.colors.getColor("neutral-medium"),this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor("neutral-base"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--success-dark"]=window.CuraAPI.theme.colors.getColor("success-dark"),this.styles["--success-darker"]=window.CuraAPI.theme.colors.getColor("success-darker"),this.styles["--success-lighter"]=window.CuraAPI.theme.colors.getColor("success-lighter"),this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter"),this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark"),this.styles["--error-darker"]=window.CuraAPI.theme.colors.getColor("error-darker"),this.styles["--error-base"]=window.CuraAPI.theme.colors.getColor("error-base"),this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor("info-base"),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-color"]=window.CuraAPI.theme.fonts.getColor(),this.weights=window.CuraAPI.theme.fonts.getWeights(),this.breakpoints=window.CuraAPI.theme.breakpoints.get(),this.styles["--font-weight-medium"]=this.weights.medium,this.styles["--font-weight-bold"]=this.weights.bold,this.styles["--font-weight-regular"]=this.weights.regular}componentWillLoad(){this.currentValue=this.value}getClasses(){return{[this.size.toLowerCase()]:!0,disabled:!!this.disabled,isLoading:!!this.isLoading,isFocused:this.isFocused&&!this.disabled&&!this.readOnly&&!this.isLoading,isHovered:this.isHovered,[this.status]:!0,resizable:!!this.resizable}}getLabelColor(){return this.disabled?"neutral-medium":(this.isFocused||this.isHovered||"success"===this.status||"error"===this.status)&&!this.readOnly||this.isHovered?"neutral-black":"neutral-dark"}renderIcon(){if(""===this.iconName&&"default"===this.status)return;if("error"===this.status&&this.hideErrorIcon)return;const e={loading:{name:this.iconName,color:"primary-base"},success:{name:"checkCircle",color:"success-dark"},error:{name:"alertCircle",color:"error-dark"},default:{name:this.iconName,color:"neutral-dark"},disabled:{name:this.iconName,color:"neutral-medium"}}[this.isLoading?"loading":this.disabled?"disabled":this.status||"default"];return t("div",{class:"feedback-icon",style:this.styles},t("cura-icon",{name:e.name,iconset:"default",size:"large"===this.size?20:16,color:e.color}))}renderHelperText(){const e="error"===this.status,r="success"===this.status,a="default"===this.status,i="large"===this.size?"small":"xsmall",s=(()=>this.disabled?"neutral-medium":this.isLoading?"primary-base":this.isFocused||this.isHovered?"neutral-black":"neutral-dark")();return t("div",{style:this.styles,class:"helper-text",part:"cura-input-text-helper"},a&&t("cura-label",{size:i,color:s},t("slot",null)),e&&t("cura-label",{size:i,lineHeight:"xsmall",color:"error-dark"},t("slot",null)),r&&t("cura-label",{size:i,lineHeight:"xsmall",color:"success-dark"},t("slot",null)))}renderMaxLength(){var e;return this.maxlength?t("div",{class:"max-length"},t("cura-label",{size:"xsmall",weight:"bold",color:"neutral-dark"},""+((null===(e=this.currentValue)||void 0===e?void 0:(""+e).length)||0)),t("cura-label",{size:"xsmall",weight:"bold",color:"neutral-darker"},"/"+this.maxlength)):null}handleMouseEnter(){this.isHovered=!0}handleMouseLeave(){this.isHovered=!1}handleClearInput(){this.currentValue="",this.inputRef.value="",this.valueChange.emit(this.currentValue),this.inputClear.emit(this.currentValue),this.setFocus()}handleInputFocus(){this.isFocused=!0}handleInputBlur(){setTimeout((()=>{this.isFocused=!1}),150)}handleInputChange(e){const r=e.target.value;this.valueChange.emit(r),this.handleTextInputChange(r),this.internals.setFormValue(this.currentValue)}handleTextInputChange(e){this.currentValue=e}render(){return t(i,{key:"05f1a1a3b51e4bb1bc54cab3c8d5b6062a95d32a",role:"textbox","aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},t("div",{key:"47eb10b6f3c3e697ae1558fd53d4d9cb9a2b6065",style:this.styles,onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave(),class:Object.assign({"cura-textarea-group":!0},this.getClasses())},t("div",{key:"c090b7b2eb353dbe929810c4835f49860bfe9c80",class:"input-wrapper"},this.label&&t("cura-label",{key:"a957db2fb6e2779d3c33f7504124cff353e41c2c",class:"label",weight:"bold",size:"large"===this.size?"small":"xsmall",color:this.getLabelColor()},this.label," ",this.required&&t("span",{key:"1928a3597976bd5b1f4076c49dae803a69139cb5",class:"required"},"* ")),t("div",{key:"58c1cab70c203e9ca106ddec09d606943814b65c",class:"cura-textarea-field",part:"cura-textarea-field",style:this.fieldStyles},this.renderIcon(),t("textarea",{key:"d6a59a727dfc5a8655ea496111dd46718101b0be",name:this.name?this.name:"",onBlur:this.handleInputBlur.bind(this),onFocus:this.handleInputFocus.bind(this),onInput:e=>this.handleInputChange(e),class:this.getClasses(),style:this.styles,placeholder:this.placeholder,disabled:this.disabled||this.isLoading,required:this.required,readonly:this.readOnly,maxlength:this.maxlength,value:null!=this.currentValue?this.currentValue:"",autocomplete:this.autocomplete}),this.isLoading&&t("cura-loader-circle",{key:"0476538f94ba6ffc0dc89b4bd125c048f420d415",size:"large"===this.size?"medium":"small",color:"primary-base"})),t("div",{key:"84b14a2904cfa97adc766bd65cbbf48cb390d6c6",class:"helper-max-wrapper"},this.renderHelperText()," ",this.renderMaxLength()))))}static get formAssociated(){return!0}get host(){return this}static get style(){return":host{display:block;box-sizing:border-box;width:100%}.required{color:var(--error-base)}.cura-textarea-group{width:100%;font-family:var(--font-family);text-align:left !important}.cura-textarea-group .helper-max-wrapper{display:flex;justify-content:space-between;align-items:center}.cura-textarea-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-textarea-group .max-length{display:flex}.cura-textarea-group cura-label{margin-bottom:8px}.cura-textarea-group .cura-textarea-field{width:100%;height:64px;display:flex;flex-direction:row;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-textarea-group .cura-textarea-field textarea{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:16px 16px 0px 8px;min-height:64px;resize:vertical}.cura-textarea-group .cura-textarea-field textarea:not(.resizable){resize:none}.cura-textarea-group .cura-textarea-field textarea::placeholder{color:var(--neutral-dark)}.cura-textarea-group .cura-textarea-field .feedback-icon{padding-left:16px;padding-top:16px}.cura-textarea-group .cura-textarea-field cura-loader-circle{margin:0px 12px}.cura-textarea-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly) .cura-textarea-field{border-color:var(--neutral-dark)}.cura-textarea-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly) .cura-textarea-field textarea{color:var(--neutral-dark)}.cura-textarea-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly) .cura-textarea-field textarea::placeholder{color:var(--neutral-dark)}.cura-textarea-group:focus-within .cura-textarea-field{border:2px solid var(--info-base) !important;background-color:var(--neutral-purewhite);outline:none}.cura-textarea-group:focus-within .cura-textarea-field textarea{color:var(--neutral-black) !important}.cura-textarea-group.success .cura-textarea-field{border:2px solid var(--success-dark) !important;background-color:var(--success-lighter) !important}.cura-textarea-group.success .cura-textarea-field textarea{color:var(--success-darker) !important}.cura-textarea-group.success .cura-textarea-field textarea::placeholder{color:var(--success-darker) !important}.cura-textarea-group.error .cura-textarea-field{border:2px solid var(--error-dark) !important;background-color:var(--error-lighter) !important}.cura-textarea-group.error .cura-textarea-field textarea{color:var(--error-darker) !important}.cura-textarea-group.error .cura-textarea-field textarea::placeholder{color:var(--error-darker) !important}.cura-textarea-group.isLoading{cursor:wait}.cura-textarea-group.isLoading .cura-textarea-field{background-color:var(--neutral-white) !important;border:2px solid var(--primary-base) !important}.cura-textarea-group.isLoading .cura-textarea-field textarea{cursor:wait;color:var(--primary-base) !important}.cura-textarea-group.isLoading .cura-textarea-field textarea::placeholder{color:var(--primary-base) !important}.cura-textarea-group.disabled .cura-textarea-field{background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.cura-textarea-group.disabled .cura-textarea-field textarea{color:var(--neutral-medium)}.cura-textarea-group.disabled .cura-textarea-field textarea::placeholder{color:var(--neutral-medium)}.cura-textarea-group.readOnly[read-only] .cura-textarea-field{cursor:default}.cura-textarea-group.readOnly[read-only] .cura-textarea-field textarea{cursor:default}.cura-textarea-group.small .cura-textarea-field{height:64px}.cura-textarea-group.small .cura-textarea-field textarea{font-size:12px;line-height:13px;letter-spacing:0.72px;min-height:64px}.cura-textarea-group.small .helper-text{font-weight:var(--font-weight-regular)}.cura-textarea-group.medium .cura-textarea-field{height:64px}.cura-textarea-group.medium .cura-textarea-field textarea{font-size:14px;line-height:16px;letter-spacing:0.56px;min-height:64px}.cura-textarea-group.medium .helper-text{font-weight:var(--font-weight-regular)}.cura-textarea-group.large .cura-textarea-field{height:64px}.cura-textarea-group.large .cura-textarea-field textarea{font-size:16px;min-height:64px}.cura-textarea-group.large .helper-text{font-weight:var(--font-weight-bold)}"}},[321,"cura-input-textarea",{status:[513],size:[513],label:[513],name:[513],placeholder:[513],value:[520],iconName:[513,"icon-name"],helperText:[513,"helper-text"],disabled:[1540],required:[516],maxlength:[514],readOnly:[516,"read-only"],resizable:[516],isLoading:[516,"is-loading"],hideErrorIcon:[4,"hide-error-icon"],autocomplete:[513],isHovered:[32],isFocused:[32],currentValue:[32],fieldStyles:[32],setFocus:[64]}]),p=h,x=function(){"undefined"!=typeof customElements&&["cura-input-textarea","cura-icon","cura-label","cura-loader-circle"].forEach((e=>{switch(e){case"cura-input-textarea":customElements.get(s(e))||customElements.define(s(e),h);break;case"cura-icon":customElements.get(s(e))||u();break;case"cura-label":customElements.get(s(e))||n();break;case"cura-loader-circle":customElements.get(s(e))||d()}}))};export{p as CuraInputTextarea,x as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as
|
|
1
|
+
import{C as o,d as s}from"./p-i55vIhdM.js";const p=o,r=s;export{p as CuraLabel,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as
|
|
1
|
+
import{C as s,d as o}from"./p-CksTHXxZ.js";const p=s,r=o;export{p as CuraLoaderBar,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as
|
|
1
|
+
import{C as o,d as p}from"./p-DQP7jRHp.js";const s=o,r=p;export{s as CuraLoaderCircle,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,H as t,k as e,i as s,j as o,t as i}from"./p-DBXUEjWh.js";import{d as r}from"./p-
|
|
1
|
+
import{p as a,H as t,k as e,i as s,j as o,t as i}from"./p-DBXUEjWh.js";import{d as r}from"./p-DgQJ968V.js";import{d as c}from"./p-DI66_jP6.js";import{d as n}from"./p-i55vIhdM.js";import{d as l}from"./p-DQP7jRHp.js";const d=a(class extends t{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.modalClose=e(this,"modalClose"),this.open=!1,this.background="light",this.top=0,this.bottom=0,this.left=0,this.right=0,this.mobileCloseLabel="Fechar",this.canClose=!0,this.zindex="100",this.styles={},this.handleCloseOnEsc=a=>{"Escape"===a.key&&this.open&&this.canClose&&(this.open=!1,this.modalClose.emit())},this.handleClose=()=>{this.canClose&&(this.modalClose.emit(),this.open=!1)}}setColors(){const a={dark:window.CuraAPI.theme.colors.getColor("neutral-black",.4),light:window.CuraAPI.theme.colors.getColor("primary-darker",.8)};this.styles=Object.assign(Object.assign({},this.styles),{"--background-color":a[this.background]})}setOffset(a,t){this.styles=Object.assign(Object.assign({},this.styles),{[`--${a}-offset`]:t+"px"})}setTop(){this.setOffset("top",this.top)}setBottom(){this.setOffset("bottom",this.bottom)}setLeft(){this.setOffset("left",this.left)}setRight(){this.setOffset("right",this.right)}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--neutral-light":window.CuraAPI.theme.colors.getColor("neutral-light"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors(),this.setTop(),this.setBottom(),this.setLeft(),this.setRight()}disconnectedCallback(){window.removeEventListener("keydown",this.handleCloseOnEsc)}componentDidLoad(){window.addEventListener("keydown",this.handleCloseOnEsc)}render(){return s(o,{key:"add6ff0d9e7596282547b9632a10d6b36ce2dd77",role:"dialog","aria-modal":"true",style:{"--zIndex":this.zindex}},s("div",{key:"0ea813bd986b4cb0e87f31511d600bc88f922d66",class:this.open?"modal container open":"modal container",style:this.styles},s("div",{key:"90ace6e14ed40371839a784d82c4370cff9c8bc2",class:this.open?"modal backdrop open":"modal backdrop",onClick:this.canClose?this.handleClose:void 0}),s("div",{key:"1593d59bed08050004b638379194f331518e93ad",class:"wrapper"},this.canClose&&s("div",{key:"348678020334e6f60794e9a22c9aa570deb32411",class:"close desktop"},s("cura-button-transparent",{key:"bcaed0130dfe074cf23a244a71138243362c6706",iconName:"close",color:"error",size:"small",onClick:this.handleClose,iconOnly:!0})),s("slot",{key:"e34ea51fa11116b235911b7303b7d2f2a70dabd7"}),this.canClose&&s("div",{key:"a262c02432b56a149773e601f14dadc05d09e64f",class:"close mobile",onClick:this.handleClose},s("cura-button-transparent",{key:"c72a85bc5a3c121829bfe6e509523811ca36e317",color:"error",iconName:"close",size:"small"},this.mobileCloseLabel)))))}static get watchers(){return{background:[{setColors:0}],top:[{setTop:0}],bottom:[{setBottom:0}],left:[{setLeft:0}],right:[{setRight:0}]}}static get style(){return":host{display:block}.modal{position:fixed;height:100%;width:100%;top:var(--top-offset);bottom:var(--bottom-offset);left:var(--left-offset);right:var(--right-offset);z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:var(--zIndex)}.modal.open .backdrop,.modal.open .wrapper{opacity:1;visibility:visible;animation:fadeIn 0.3s ease-out}.container{display:flex;align-items:center;justify-content:center}.backdrop,.wrapper{opacity:0;visibility:hidden;transition:opacity 0.3s ease, visibility 0.3s ease}.backdrop{background-color:var(--background-color);z-index:calc(var(--zIndex) - 10);animation:fadeIn 0.3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-light);border-radius:calc(var(--cura-spacing-base) * 3px);max-width:600px;min-width:200px;padding:calc(calc(var(--cura-spacing-base) * 1px) / 2) calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px) calc(var(--cura-spacing-base) * 4px);z-index:var(--zIndex);box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12));transform:scale(0.95);transition:transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease}.wrapper ::slotted(*){max-height:80vh;overflow:auto;padding-right:calc(var(--cura-spacing-base) * 5px)}.modal.open .wrapper{transform:scale(1);opacity:1;visibility:visible}.close{justify-self:flex-end;padding-top:calc(var(--cura-spacing-base) * 4px);background:none;border:none;cursor:pointer}.close.mobile{display:none}.close.desktop{display:flex;padding:0;margin-right:-8px}@media (max-width: 768px){.wrapper{position:fixed;bottom:0px;width:80%;padding-top:calc(var(--cura-spacing-base) * 4px);padding-bottom:0px;border-radius:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px) 0px 0px;border-bottom:none}.close{align-items:center;border-top:1px dashed var(--neutral-light);margin-top:calc(var(--cura-spacing-base) * 4px);padding:calc(var(--cura-spacing-base) * 2px) 0px;justify-content:center;width:100%}.close.mobile{display:flex;gap:calc(var(--cura-spacing-base) * 2px)}.close.desktop{display:none}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}"}},[257,"cura-modal",{open:[1540],background:[1],top:[2],bottom:[2],left:[2],right:[2],mobileCloseLabel:[513,"mobile-close-label"],canClose:[516,"can-close"],zindex:[513],styles:[32]},void 0,{background:[{setColors:0}],top:[{setTop:0}],bottom:[{setBottom:0}],left:[{setLeft:0}],right:[{setRight:0}]}]),p=d,b=function(){"undefined"!=typeof customElements&&["cura-modal","cura-button-transparent","cura-icon","cura-label","cura-loader-circle"].forEach((a=>{switch(a){case"cura-modal":customElements.get(i(a))||customElements.define(i(a),d);break;case"cura-button-transparent":customElements.get(i(a))||r();break;case"cura-icon":customElements.get(i(a))||c();break;case"cura-label":customElements.get(i(a))||n();break;case"cura-loader-circle":customElements.get(i(a))||l()}}))};export{p as CuraModal,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,i as a,j as d,t as i}from"./p-DBXUEjWh.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.contentwidth="default"}connectedCallback(){this.styles={"--spacing":window.CuraAPI.theme.spacing.getSpacing()}}getClasses(){const e={};return e[this.contentwidth.toLowerCase()]=!0,e}render(){return a(d,{key:"
|
|
1
|
+
import{p as e,H as t,i as a,j as d,t as i}from"./p-DBXUEjWh.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.contentwidth="default"}connectedCallback(){this.styles={"--spacing":window.CuraAPI.theme.spacing.getSpacing()}}getClasses(){const e={};return e[this.contentwidth.toLowerCase()]=!0,e}render(){return a(d,{key:"65ceac57166149f686508dd56d865092406afe4d"},a("div",{key:"c78f1ef93fd52b43285fa3b39d203db258c1bf31",style:this.styles,class:"grid-template"},a("div",{key:"cfb99058f718560bf2679e13266bf6e1447cfb1e",id:"sub-header"},a("slot",{key:"ddd2aaeb147cad4e92e16dda69f757d9aa261e2c",name:"sub-header"})),a("div",{key:"c3d87f2c1d68d08e2c46730d731e03a17e0c355d",id:"header"},a("slot",{key:"a681e8d1c9c379be1c18278811d7e99455ad0a8b",name:"header"})),a("div",{key:"aee6e5920384ecdbf0c8adb358a431e304f612de",id:"pre-content"},a("slot",{key:"4e554925885a9f8200fe8cb7b35e438e6a7dd1e8",name:"pre-content"})),a("div",{key:"30f1f9aeb3a58fb390716dec7f5855fdcc1cc82d",id:"content-container",class:this.getClasses()},a("div",{key:"259ab99ca0ec43a86536c3c188429a555eebbd45",id:"sidebar-left"},a("slot",{key:"ff359698c0b452776e558234b46745dd40746edc",name:"sidebar-left"})),a("div",{key:"14338cdc57d8ee6cfb5ca15fd5ed8fe276d83bea",id:"content"},a("slot",{key:"ea4f4a5423bf061880d580e86f015907ee5929ea",name:"content"}),a("slot",{key:"ddf40946d828b0de102e9fc21ee99201dc36342b"})),a("div",{key:"c207b0c2280033f71c2b7803b1ae9ec017ab2b5c",id:"sidebar-right"},a("slot",{key:"fd15c1b0ce197f7de9e72827dca3c1d4736b4219",name:"sidebar-right"}))),a("div",{key:"fd02b69336b4d6920975bf1a8b4a7c8a957e65d6",id:"post-body"},a("slot",{key:"205b2283d6fff54f3e3be4ed9b2b64b05c985601",name:"post-body"})),a("div",{key:"4602dc880efe376c9a951237c43ebcb6723499db",id:"footer"},a("slot",{key:"ed9314b5192194cea91dab7fc6efdbfb198016fc",name:"footer"})),a("div",{key:"53b5bd4b187a0ae6657bccfb8626a5d335bdeb73",id:"sub-footer"},a("slot",{key:"8b086fb200223ff0bf5acd2266da3ae47cc30269",name:"sub-footer"}))))}get host(){return this}static get style(){return':host{display:block}:host .grid-template{display:grid;grid-template-rows:auto;grid-template-columns:auto;grid-template-areas:"sub-header" "header" "pre-content" "content-container" "post-body" "footer" "sub-footer"}:host .grid-template #sub-header{grid-area:sub-header}:host .grid-template #header{grid-area:header}:host .grid-template #pre-content{grid-area:pre-content}:host .grid-template #content-container{grid-area:content-container}:host .grid-template #post-body{grid-area:post-body}:host .grid-template #footer{grid-area:footer}:host .grid-template #sub-footer{grid-area:sub-footer}@media (max-width: 768px){:host .grid-template{padding:0px}}@media (min-width: 769px) and (max-width: 992px){:host .grid-template{padding:0px}}@media (min-width: 993px) and (max-width: 1920px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 5px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 5px)}:host .grid-template #content-container{display:flex}:host .grid-template #content-container #content{flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}}@media (min-width: 1921px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 7px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 7px)}:host .grid-template #content-container{display:flex}:host .grid-template #content-container #content{flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}:host .grid-template #content-container.centered{max-width:1921px;justify-self:center}}'}},[257,"cura-page-template",{contentwidth:[513]}]),o=r,c=function(){"undefined"!=typeof customElements&&["cura-page-template"].forEach((e=>{"cura-page-template"===e&&(customElements.get(i(e))||customElements.define(i(e),r))}))};export{o as CuraPageTemplate,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as s}from"./p-
|
|
1
|
+
import{C as o,d as s}from"./p-PiUhcFob.js";const p=o,r=s;export{p as CuraParagraph,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as s}from"./p-
|
|
1
|
+
import{C as o,d as s}from"./p-CalvBU-U.js";const a=o,p=s;export{a as CuraProgressBar,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as r,H as e,k as a,i as s,j as t,t as o}from"./p-DBXUEjWh.js";import{f as i}from"./p-Dot54hbB.js";import{d as c}from"./p-
|
|
1
|
+
import{p as r,H as e,k as a,i as s,j as t,t as o}from"./p-DBXUEjWh.js";import{f as i}from"./p-Dot54hbB.js";import{d as c}from"./p-i55vIhdM.js";import{d}from"./p-PiUhcFob.js";const l=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.onchange=a(this,"onchange"),this.internals=this.attachInternals(),this.checked=!1,this.status="default",this.disabled=!1,this.required=!1,this.label="",this.position="left",this.value="",this.name="",this.background="light",this.size="medium",this.color="accent",this.overflowLabel="none",this.overflowHelper="none",this.styles={},this.sizes={large:{size:20},medium:{size:14},small:{size:10}},this.isDarkbackground=()=>"dark"===this.background,this.handleClick=()=>{this.disabled||(this.checked=!this.checked,this.internals.setFormValue(this.value),this.onchange.emit({value:this.value,checked:this.checked}))}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size-after":this.sizes[this.size].size+"px","--size":i[this.size].size+"px","--gap":i[this.size].gap+"px"})}setColors(){[{name:"--info-base",background:"info-base"},{name:"--color-light",background:this.color+"-light"},{name:"--color-base",background:this.color+"-base"},{name:"--color-dark",background:this.color+"-dark"},{name:"--neutral-purewhite",background:"neutral-purewhite"},{name:"--success-lighter",background:"success-lighter"},{name:"--success-base",background:"success-base"},{name:"--error-lighter",background:"error-lighter"},{name:"--error-base",background:"error-base"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--primary-base-neutral-white",background:this.isDarkbackground()?"primary-base":"neutral-white"},{name:"--primary-darker-neutral-white",background:this.isDarkbackground()?"primary-darker":"neutral-white"},{name:"--primary-darker-neutral-base",background:this.isDarkbackground()?"primary-darker":"neutral-base"},{name:"--primary-base-neutral-base",background:this.isDarkbackground()?"primary-base":"neutral-base"},{name:"--primary-base-neutral-dark",background:this.isDarkbackground()?"primary-base":"neutral-dark"},{name:"--primary-base-neutral-medium",background:this.isDarkbackground()?"primary-base":"neutral-medium"},{name:"--success-base-dark",background:this.isDarkbackground()?"success-base":"success-dark"},{name:"--error-base-dark",background:this.isDarkbackground()?"error-base":"error-dark"}].forEach((r=>{this.styles[r.name]=window.CuraAPI.theme.colors.getColor(r.background)})),this.styles=Object.assign({},this.styles)}formAssociatedCallback(r){r.ariaLabel=this.label}formStateRestoreCallback(r){this.value=r.value,this.checked=r.checked,this.internals.setFormValue(this.value)}formResetCallback(){this.value="",this.checked=!1,this.internals.setValidity({}),this.internals.setFormValue(this.value)}formDisabledCallback(r){this.disabled=r}connectedCallback(){this.sizeHandler(),this.setColors()}getClasses(){const r={container:!0};return r.checked=this.checked,r.disabled=this.disabled,r.position="right"===this.position,r[this.status]=!0,r}assignColor(r){return this.disabled?this.isDarkbackground()?"primary-darker":"neutral-medium":{success:{label:this.isDarkbackground()?"success-lighter":"success-darker",message:this.isDarkbackground()?"success-base":"success-dark"},error:{label:this.isDarkbackground()?"error-lighter":"neutral-darker",message:this.isDarkbackground()?"error-base":"error-dark"},default:{label:this.isDarkbackground()?"neutral-white":"neutral-black",message:this.isDarkbackground()?"primary-lighter":"neutral-dark"}}[this.status][r]}render(){return s(t,{key:"7db2e7898ed5509b27a22a5ef06d580b6bfe58bc",role:"radio","aria-checked":this.checked,"aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},s("div",{key:"a48dbced2eb1be2ff162282b40b767ed90d35470",class:this.getClasses(),style:this.styles,onClick:this.handleClick},s("div",{key:"d332710c196dff35ab6cbcdd780d7bf89ad101ac",class:"info"},s("div",{key:"651604209885f847e02af4a11fbd4cd9f42719e2",class:"label-wrapper"},s("cura-label",{key:"13db1f1fe2dfb79cedce79ddb0cc2af9b04db77f",textOverflow:this.overflowLabel,class:"label"+("single"===this.overflowLabel?" textoverflow-single":""),size:"large"===this.size?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&s("cura-paragraph",{key:"9cd6e5aaaa8007c766730b26b667a4e1f14a9324",lineHeight:"0%",marginBlock:"0",color:"error-base"},"*"," ")),s("cura-label",{key:"8e4c761b331bea1d1247d5827ead8e42f04ac2c0",textOverflow:this.overflowHelper,color:this.assignColor("message"),size:"xsmall",class:"message"},s("slot",{key:"bc8c9b14e175dae86a94e21e110afcf74e8faf49"}))),s("input",{key:"26a944b0af74465d83a9bd05c181924b9cfb1c38",type:"radio",class:"radio "+this.size.toLocaleLowerCase(),name:this.name,value:this.value,required:this.required,tabIndex:this.ontabindex,disabled:this.disabled,checked:this.checked})))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}]}}static get style(){return'@charset "UTF-8";:host{display:block;box-sizing:border-box;min-width:0;}:host .container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}:host .position.container{flex-direction:row}:host .position .label-wrapper{justify-content:end}:host .position .message{text-align:right}:host .position .label{order:1}:host .label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}:host .info{display:flex;flex-direction:column;overflow:hidden}:host .label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}:host .control{width:fit-content;cursor:pointer;position:relative}:host .radio{margin:0;appearance:none;-webkit-appearance:none;-moz-appearance:none;border-radius:50%;border:2px solid var(--primary-base-neutral-medium);background:var(--neutral-purewhite);box-sizing:border-box;transition:border-color 0.3s;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--size);height:var(--size);flex:0 0 var(--size)}:host .radio::after{content:"";background:var(--color-base-light);border-radius:50%;opacity:0;transition:opacity 0.3s;width:var(--size-after);height:var(--size-after)}:host .radio:focus{border-color:var(--info-base) !important}:host .success .radio{border-color:var(--success-base);background:var(--success-lighter)}:host .success .radio:hover{border-color:var(--success-base) !important}:host .success.checked .radio{border-color:var(--success-base)}:host .success.checked .radio::after{background:var(--success-base)}:host .success.checked .radio:hover{background:var(--success-lighter) !important;border-color:var(--success-base) !important}:host .success.checked .radio:hover::after{background:var(--success-base) !important}:host .error .radio{border-color:var(--error-base);background:var(--error-lighter)}:host .error .radio:hover{border-color:var(--error-base) !important}:host .error.checked .radio{border-color:var(--error-base)}:host .error.checked .radio::after{background:var(--error-base)}:host .error.checked .radio:hover{background:var(--error-lighter) !important;border-color:var(--error-base) !important}:host .error.checked .radio:hover::after{background:var(--error-base) !important}:host .checked .radio::after{opacity:1;background:var(--color-base)}:host .checked .radio{border-color:var(--color-dark)}:host .checked .radio:hover{border-color:var(--color-light) !important}:host .checked .radio:hover::after{background:var(--color-light)}:host .disabled .radio{background:var(--primary-base-neutral-white);border-color:var(--primary-darker-neutral-base);cursor:not-allowed}:host .disabled .radio::after{background:var(--neutral-lighter)}:host .disabled.checked .radio{border-color:var(--primary-base-neutral-base) !important;background:var(--primary-darker-neutral-white) !important}:host .disabled.checked .radio::after{background:var(--primary-base-neutral-base) !important}:host :not(.disabled):not(.checked) .radio:hover{border-color:var(--primary-base-neutral-dark)}'}},[321,"cura-radio",{checked:[1540],status:[1537],disabled:[516],required:[516],label:[513],ontabindex:[514],position:[513],value:[513],name:[513],background:[1],size:[1],color:[1],overflowLabel:[513,"overflow-label"],overflowHelper:[513,"overflow-helper"],styles:[32]},void 0,{size:[{sizeHandler:0}],color:[{setColors:0}],background:[{setColors:0},{assignColor:0}]}]),h=l,n=function(){"undefined"!=typeof customElements&&["cura-radio","cura-label","cura-paragraph"].forEach((r=>{switch(r){case"cura-radio":customElements.get(o(r))||customElements.define(o(r),l);break;case"cura-label":customElements.get(o(r))||c();break;case"cura-paragraph":customElements.get(o(r))||d()}}))};export{h as CuraRadio,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as s}from"./p-
|
|
1
|
+
import{C as o,d as s}from"./p-BuETJyzc.js";const p=o,r=s;export{p as CuraSelectOption,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as o,d as
|
|
1
|
+
import{C as o,d as r}from"./p-D4hCuriT.js";const s=o,p=r;export{s as CuraSelect,p as defineCustomElement}
|