@rededor/cura 1.3.0 → 1.4.0-alpha.0
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_12.cjs.entry.js +9 -9
- 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-option-title.cjs.entry.js +1 -1
- package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +2 -2
- package/dist/cjs/cura-dropdown-search.cjs.entry.js +2 -2
- package/dist/cjs/cura-input-date.cjs.entry.js +1 -1
- package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
- package/dist/cjs/cura-modal.cjs.entry.js +50 -0
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-radio.cjs.entry.js +1 -1
- package/dist/cjs/cura-switch.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/collection/collection-manifest.json +1 -0
- package/dist/collection/components/cura-modal/cura-modal.css +211 -0
- package/dist/collection/components/cura-modal/cura-modal.js +134 -0
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -0
- package/dist/collection/components/cura-modal/cura-modal.stories.js +85 -0
- package/dist/collection/components/cura-modal/cura-modal.stories.js.map +1 -0
- package/dist/collection/components/cura-page-template/cura-page-template.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-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +2 -2
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
- 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/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-checkbox.js +1 -1
- package/dist/components/cura-display.js +1 -1
- package/dist/components/cura-dropdown-search-option-title.js +1 -1
- package/dist/components/cura-dropdown-search-option.js +2 -2
- package/dist/components/cura-dropdown-search.js +2 -2
- package/dist/components/cura-heading2.js +1 -1
- package/dist/components/cura-input-date.js +1 -1
- package/dist/components/cura-label2.js +1 -1
- package/dist/components/cura-loader-bar2.js +1 -1
- package/dist/components/cura-loader-circle2.js +1 -1
- package/dist/components/cura-modal.d.ts +11 -0
- package/dist/components/cura-modal.js +84 -0
- package/dist/components/cura-modal.js.map +1 -0
- package/dist/components/cura-page-template.js +1 -1
- package/dist/components/cura-paragraph2.js +1 -1
- package/dist/components/cura-radio.js +1 -1
- package/dist/components/cura-select-option2.js +1 -1
- package/dist/components/cura-select2.js +3 -3
- package/dist/components/cura-switch.js +1 -1
- package/dist/components/cura-toast.js +1 -1
- package/dist/components/cura-tooltip.js +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/{p-022b22b6.entry.js → p-075b02de.entry.js} +2 -2
- package/dist/cura/{p-df851816.entry.js → p-0e28f1c8.entry.js} +2 -2
- package/dist/cura/{p-c444e692.entry.js → p-1f53580a.entry.js} +2 -2
- package/dist/cura/{p-2b9eadc7.entry.js → p-3536c96b.entry.js} +2 -2
- package/dist/cura/{p-22e921d9.entry.js → p-7090d4a7.entry.js} +2 -2
- package/dist/cura/{p-93525d68.entry.js → p-71a2dcef.entry.js} +2 -2
- package/dist/cura/p-9a7e3f48.entry.js +2 -0
- package/dist/cura/p-9a7e3f48.entry.js.map +1 -0
- package/dist/cura/{p-e3d3bc3d.entry.js → p-dbd9eab3.entry.js} +2 -2
- package/dist/cura/{p-b883e098.entry.js → p-e5b0dd74.entry.js} +2 -2
- package/dist/cura/p-ebed83d1.entry.js +2 -0
- package/dist/cura/{p-639c1b67.entry.js → p-ed839f1e.entry.js} +2 -2
- package/dist/cura/{p-2c0f5497.entry.js → p-eea093b2.entry.js} +2 -2
- package/dist/cura/{p-9e3d26fe.entry.js → p-f375a612.entry.js} +2 -2
- package/dist/esm/cura-accordion_12.entry.js +9 -9
- package/dist/esm/cura-checkbox.entry.js +1 -1
- package/dist/esm/cura-display.entry.js +1 -1
- package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
- package/dist/esm/cura-dropdown-search-option.entry.js +2 -2
- package/dist/esm/cura-dropdown-search.entry.js +2 -2
- package/dist/esm/cura-input-date.entry.js +1 -1
- package/dist/esm/cura-loader-bar.entry.js +1 -1
- package/dist/esm/cura-modal.entry.js +46 -0
- package/dist/esm/cura-modal.entry.js.map +1 -0
- package/dist/esm/cura-radio.entry.js +1 -1
- package/dist/esm/cura-switch.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/types/components/cura-modal/cura-modal.d.ts +28 -0
- package/dist/types/components/cura-modal/cura-modal.stories.d.ts +70 -0
- package/dist/types/components.d.ts +56 -0
- package/package.json +2 -2
- package/dist/cura/p-9991f7db.entry.js +0 -2
- /package/dist/cura/{p-022b22b6.entry.js.map → p-075b02de.entry.js.map} +0 -0
- /package/dist/cura/{p-df851816.entry.js.map → p-0e28f1c8.entry.js.map} +0 -0
- /package/dist/cura/{p-c444e692.entry.js.map → p-1f53580a.entry.js.map} +0 -0
- /package/dist/cura/{p-2b9eadc7.entry.js.map → p-3536c96b.entry.js.map} +0 -0
- /package/dist/cura/{p-22e921d9.entry.js.map → p-7090d4a7.entry.js.map} +0 -0
- /package/dist/cura/{p-93525d68.entry.js.map → p-71a2dcef.entry.js.map} +0 -0
- /package/dist/cura/{p-e3d3bc3d.entry.js.map → p-dbd9eab3.entry.js.map} +0 -0
- /package/dist/cura/{p-b883e098.entry.js.map → p-e5b0dd74.entry.js.map} +0 -0
- /package/dist/cura/{p-9991f7db.entry.js.map → p-ebed83d1.entry.js.map} +0 -0
- /package/dist/cura/{p-639c1b67.entry.js.map → p-ed839f1e.entry.js.map} +0 -0
- /package/dist/cura/{p-2c0f5497.entry.js.map → p-eea093b2.entry.js.map} +0 -0
- /package/dist/cura/{p-9e3d26fe.entry.js.map → p-f375a612.entry.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as a,c as e,h as o,H as i}from"./p-fd5ed6b0.js";const s=":host{display:block}.modal{position:fixed;height:100%;width:100%;top:0px;bottom:0px;z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:100}.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:90;animation:fadeIn 0.3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-white);border:2px solid var(--neutral-light);border-radius:calc(var(--base-spacing) * 3px);width:700px;max-width:600px;min-width:200px;padding:0px calc(var(--base-spacing) * 4px) calc(var(--base-spacing) * 4px) calc(var(--base-spacing) * 4px);z-index:100;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(--base-spacing) * 5px)}.modal.open .wrapper{transform:scale(1);opacity:1;visibility:visible}.close{justify-self:flex-end;padding-top:calc(var(--base-spacing) * 4px);background:none;border:none;cursor:pointer}.close.mobile{display:none}.close.desktop{display:flex}@media (max-width: 768px){.wrapper{position:fixed;bottom:0px;width:80%;padding-top:calc(var(--base-spacing) * 4px);padding-bottom:0px;border-radius:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 3px) 0px 0px;border-bottom:none}.close{align-items:center;border-top:1px dashed var(--neutral-light);margin-top:calc(var(--base-spacing) * 4px);padding:calc(var(--base-spacing) * 4px) 0px;justify-content:center;width:100%}.close.mobile{display:flex;gap:calc(var(--base-spacing) * 2px)}.close.desktop{display:none}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}";const t=s;const c=class{constructor(o){a(this,o);this.modalClose=e(this,"modalClose",7);this.handleClose=()=>{this.modalClose.emit();this.open=false};this.open=false;this.background="light";this.topOffset=0;this.styles={}}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]})}setOffsetTop(){this.styles=Object.assign(Object.assign({},this.styles),{"--offset-top":`${this.topOffset}px`})}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-white":window.CuraAPI.theme.colors.getColor("neutral-white"),"--neutral-light":window.CuraAPI.theme.colors.getColor("neutral-light"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()});this.setColors();this.setOffsetTop()}render(){return o(i,{key:"002525d3ad03f3271b11b0dacfd748ccfbfbaf1c",role:"dialog","aria-modal":"true"},o("div",{key:"a684163919124acc33469b38cffeb6826dd2dd8d",class:this.open?"modal container open":"modal container",style:this.styles},o("div",{key:"bff07303351e5f7a75870b9c0f2b4a16736110bc",class:this.open?"modal backdrop open":"modal backdrop",onClick:this.handleClose}),o("div",{key:"4e8ac2fd00c10abf24060c644bbdcd6a5275bacb",class:"wrapper"},o("button",{key:"6a0ab79a39181216882559f115107edf1c20a2c7",class:"close desktop",onClick:this.handleClose},o("cura-icon",{key:"3be3e5ee04fc5caa8786efaac0e03c946d0bdd14",name:"close",color:"error-dark",size:"small"})),o("slot",{key:"90fbd8951a449d41e2409ba10445a61e296c45e5"}),o("button",{key:"3075523254d90f7f7f4ca75f28a5724b2402f7d5",class:"close mobile",onClick:this.handleClose},o("cura-icon",{key:"9bfd171b87d0f1ff625b17f043ff90fa9dbad6e7",name:"close",color:"error-dark",size:"16"}),o("cura-paragraph",{key:"c17191a5570c08400cfb1409fa1ebf3f0e03a270",color:"error-dark",size:"small",marginBlock:"0"},"Fechar")))))}static get watchers(){return{background:["setColors"],topOffset:["setOffsetTop"]}}};c.style=t;export{c as cura_modal};
|
|
2
|
+
//# sourceMappingURL=p-9a7e3f48.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["curaModalCss","CuraModalStyle0","CuraModal","this","handleClose","modalClose","emit","open","setColors","backgroundTheme","dark","window","CuraAPI","theme","colors","getColor","light","styles","Object","assign","background","setOffsetTop","topOffset","connectedCallback","spacing","getSpacing","render","h","Host","key","role","class","style","onClick","name","color","size","marginBlock"],"sources":["src/components/cura-modal/cura-modal.scss?tag=cura-modal&encapsulation=shadow","src/components/cura-modal/cura-modal.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/spacing.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/animations.scss';\n\n:host {\n display: block;\n}\n\n.modal {\n position: fixed;\n height: 100%;\n width: 100%;\n top: #{$spacing-none};\n bottom: #{$spacing-none};\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: 100;\n\n .backdrop,\n .wrapper {\n opacity: 1;\n visibility: visible;\n animation: fadeIn 0.3s ease-out;\n }\n }\n}\n\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.backdrop,\n.wrapper {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.backdrop {\n background-color: var(--background-color);\n z-index: 90;\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-white);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n width: 700px;\n max-width: 600px;\n min-width: 200px;\n padding: #{$spacing-none} #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: 100;\n\n @include shadow-level4();\n\n transform: scale(0.95);\n transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;\n\n ::slotted(*) {\n max-height: 80vh;\n overflow: auto;\n padding-right: #{$spacing-xs};\n }\n}\n\n.modal.open .wrapper {\n transform: scale(1);\n opacity: 1;\n visibility: visible;\n}\n\n.close {\n justify-self: flex-end;\n padding-top: #{$spacing-xxs};\n background: none;\n border: none;\n cursor: pointer;\n\n &.mobile {\n display: none;\n }\n\n &.desktop {\n display: flex;\n }\n}\n\n@include mobile-only() {\n .wrapper {\n position: fixed;\n bottom: #{$spacing-none};\n width: 80%;\n padding-top: #{$spacing-xxs};\n padding-bottom: #{$spacing-none};\n border-radius: #{$spacing-xxxs} #{$spacing-xxxs} #{$spacing-none} #{$spacing-none};\n border-bottom: none;\n }\n\n .close {\n align-items: center;\n border-top: 1px dashed var(--neutral-light);\n margin-top: #{$spacing-xxs};\n padding: #{$spacing-xxs} #{$spacing-none};\n justify-content: center;\n width: 100%;\n\n &.mobile {\n display: flex;\n gap: #{$spacing-mini};\n }\n\n &.desktop {\n display: none;\n }\n }\n}\n\n@include fadeIn();\n@include fadeOut();\n","import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property offsetTop to control modal top position.\n * Default: 0px\n */\n @Prop() topOffset?: number = 0;\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n @Watch('topOffset')\n setOffsetTop() {\n this.styles = {\n ...this.styles,\n '--offset-top': `${this.topOffset}px`,\n };\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-white': window.CuraAPI.theme.colors.getColor('neutral-white'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setOffsetTop();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\">\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.handleClose}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n <button class=\"close desktop\" onClick={this.handleClose}>\n <cura-icon name=\"close\" color=\"error-dark\" size=\"small\"></cura-icon>\n </button>\n <slot></slot>\n {/* Mobile button */}\n <button class=\"close mobile\" onClick={this.handleClose}>\n <cura-icon name=\"close\" color=\"error-dark\" size=\"16\"></cura-icon>\n <cura-paragraph color=\"error-dark\" size=\"small\" marginBlock=\"0\">\n Fechar\n </cura-paragraph>\n </button>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAe,m6DACrB,MAAAC,EAAeD,E,MCMFE,EAAS,M,gEAuDZC,KAAAC,YAAc,KACpBD,KAAKE,WAAWC,OAChBH,KAAKI,KAAO,KAAK,E,UApDsC,M,gBAKjB,Q,eAKX,E,YAMX,E,CAGlB,SAAAC,GACE,MAAMC,EAAkB,CACtBC,KAAMC,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,gBAAiB,IAC5DC,MAAOL,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,iBAAkB,KAGhEZ,KAAKc,OAAMC,OAAAC,OAAAD,OAAAC,OAAA,GACNhB,KAAKc,QAAM,CACd,qBAAsBR,EAAgBN,KAAKiB,a,CAK/C,YAAAC,GACElB,KAAKc,OAAMC,OAAAC,OAAAD,OAAAC,OAAA,GACNhB,KAAKc,QAAM,CACd,eAAgB,GAAGd,KAAKmB,e,CAI5B,iBAAAC,GACEpB,KAAKc,OAAMC,OAAAC,OAAAD,OAAAC,OAAA,GACNhB,KAAKc,QAAM,CACd,kBAAmBN,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,iBACxD,kBAAmBJ,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,iBACxD,iBAAkBJ,OAAOC,QAAQC,MAAMW,QAAQC,eAEjDtB,KAAKK,YACLL,KAAKkB,c,CAQP,MAAAK,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACC,KAAK,SAAQ,aAAY,QAC7BH,EAAA,OAAAE,IAAA,2CAAKE,MAAO5B,KAAKI,KAAO,uBAAyB,kBAAmByB,MAAO7B,KAAKc,QAC9EU,EAAA,OAAAE,IAAA,2CAAKE,MAAO5B,KAAKI,KAAO,sBAAwB,iBAAkB0B,QAAS9B,KAAKC,cAChFuB,EAAA,OAAAE,IAAA,2CAAKE,MAAM,WAETJ,EAAA,UAAAE,IAAA,2CAAQE,MAAM,gBAAgBE,QAAS9B,KAAKC,aAC1CuB,EAAA,aAAAE,IAAA,2CAAWK,KAAK,QAAQC,MAAM,aAAaC,KAAK,WAElDT,EAAA,QAAAE,IAAA,6CAEAF,EAAA,UAAAE,IAAA,2CAAQE,MAAM,eAAeE,QAAS9B,KAAKC,aACzCuB,EAAA,aAAAE,IAAA,2CAAWK,KAAK,QAAQC,MAAM,aAAaC,KAAK,OAChDT,EAAA,kBAAAE,IAAA,2CAAgBM,MAAM,aAAaC,KAAK,QAAQC,YAAY,KAAG,a","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,c as r,h as a,H as s,g as t}from"./p-fd5ed6b0.js";import{f as c}from"./p-f9b8f665.js";const o='@charset "UTF-8";:host{display:block;width:fit-content;box-sizing:border-box}.container{display:flex;align-items:center;flex-direction:row-reverse;gap:var(--gap)}.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}.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}';const i=o;const n=class{constructor(a){e(this,a);this.onchange=r(this,"onchange",7);if(a.$hostElement$["s-ei"]){this.internals=a.$hostElement$["s-ei"]}else{this.internals=a.$hostElement$.attachInternals();a.$hostElement$["s-ei"]=this.internals}this.isDarkBackground=()=>this.background==="dark";this.isDarkIconColor=()=>this.iconColor==="dark";this.handleClick=()=>{if(this.disabled)return;this.indeterminate=false;this.checked=!this.checked;this.internals.setFormValue(this.value);this.onchange.emit({value:this.value,checked:this.checked,indeterminate:this.indeterminate})};this.checked=false;this.indeterminate=false;this.status="default";this.disabled=false;this.required=false;this.label=undefined;this.ontabindex=0;this.position="left";this.value=undefined;this.name=undefined;this.size="medium";this.background="light";this.iconColor="dark";this.color="accent";this.styles={}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size":`${c[this.size].size}px`,"--gap":`${c[this.size].gap}px`})}setColors(){const e=[{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"}];e.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=false;this.indeterminate=false;this.internals.setValidity({});this.internals.setFormValue(this.value)}formDisabledCallback(e){this.disabled=e}getClasses(){const e={};e["container"]=true;e["checked"]=this.checked;e["disabled"]=this.disabled;e[this.background]=true;e["indeterminate"]=this.indeterminate;e["position"]=this.position==="right";e[this.status]=true;return e}assignColor(e){if(this.disabled)return this.isDarkBackground()?"neutral-dark":"neutral-dark";const r={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"}};return r[this.status][e]}getIcon(){const e=this.indeterminate?"minus":"check";const r=this.assignColor("icon");const s=this.size==="large"?20:"micro";return a("cura-icon",{class:"icon",name:e,size:s,color:r})}render(){return a(s,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as e,c as r,h as a,H as s,g as t}from"./p-fd5ed6b0.js";import{f as c}from"./p-f9b8f665.js";const o='@charset "UTF-8";:host{display:block;width:fit-content;box-sizing:border-box}.container{display:flex;align-items:center;flex-direction:row-reverse;gap:var(--gap)}.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}.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}';const i=o;const n=class{constructor(a){e(this,a);this.onchange=r(this,"onchange",7);if(a.$hostElement$["s-ei"]){this.internals=a.$hostElement$["s-ei"]}else{this.internals=a.$hostElement$.attachInternals();a.$hostElement$["s-ei"]=this.internals}this.isDarkBackground=()=>this.background==="dark";this.isDarkIconColor=()=>this.iconColor==="dark";this.handleClick=()=>{if(this.disabled)return;this.indeterminate=false;this.checked=!this.checked;this.internals.setFormValue(this.value);this.onchange.emit({value:this.value,checked:this.checked,indeterminate:this.indeterminate})};this.checked=false;this.indeterminate=false;this.status="default";this.disabled=false;this.required=false;this.label=undefined;this.ontabindex=0;this.position="left";this.value=undefined;this.name=undefined;this.size="medium";this.background="light";this.iconColor="dark";this.color="accent";this.styles={}}sizeHandler(){this.styles=Object.assign(Object.assign({},this.styles),{"--size":`${c[this.size].size}px`,"--gap":`${c[this.size].gap}px`})}setColors(){const e=[{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"}];e.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=false;this.indeterminate=false;this.internals.setValidity({});this.internals.setFormValue(this.value)}formDisabledCallback(e){this.disabled=e}getClasses(){const e={};e["container"]=true;e["checked"]=this.checked;e["disabled"]=this.disabled;e[this.background]=true;e["indeterminate"]=this.indeterminate;e["position"]=this.position==="right";e[this.status]=true;return e}assignColor(e){if(this.disabled)return this.isDarkBackground()?"neutral-dark":"neutral-dark";const r={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"}};return r[this.status][e]}getIcon(){const e=this.indeterminate?"minus":"check";const r=this.assignColor("icon");const s=this.size==="large"?20:"micro";return a("cura-icon",{class:"icon",name:e,size:s,color:r})}render(){return a(s,{key:"876fa0a7aa0fc7110cbf0ffeb2d95d529fa78e64"},a("div",{key:"3e6d730765590ee75d7e045cadc7d03e5fc035e2",class:this.getClasses(),style:this.styles,onClick:this.handleClick},a("div",{key:"0f7f6f3bc61a80e899d940d76fee266af1914f5a",class:"info"},a("div",{key:"a836cb0d7751a1a812364fe93a30403b02ec5c95",class:"label-wrapper"},a("cura-label",{key:"5d180552ec71e22ddd8822727bd32d4167215f33",class:"label",weight:"bold",size:this.size==="large"?"medium":"xsmall",color:this.assignColor("label")},this.label),this.required&&a("cura-paragraph",{key:"047413aa21a28bc33984d19ad4dc10a38289c205",lineHeight:"0%",marginBlock:"0",color:"error-base"},"* ")),a("cura-label",{key:"68c9dd6f228ec3204647795f1cae32a8f8797bc2",color:this.assignColor("message"),size:"xsmall",class:"message"},a("slot",{key:"3a35a1219f135002f1b9ae64c0eb4227529bc904"}))),a("div",{key:"fe969ee332b3c64a259ec552f411b5d2d4bc81e4",class:"checkbox",tabIndex:this.ontabindex},a("input",{key:"2cbcbe56130bddb5853cfcc3a8ef1b421f39bc7b",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 true}get host(){return t(this)}static get watchers(){return{size:["sizeHandler"],color:["setColors"],background:["setColors","assignColor"],iconColor:["assignColor"]}}};n.style=i;export{n as cura_checkbox};
|
|
2
|
+
//# sourceMappingURL=p-dbd9eab3.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as s,H as h,g as o}from"./p-fd5ed6b0.js";const l=":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}@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}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host ::slotted(u){text-underline-offset:10%}:host ::slotted(i),:host ::slotted(em){font-style:italic;font-weight:var(--font-weight-medium)}:host ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";const e=l;const i=class{constructor(s){t(this,s);this.theme=window.CuraAPI.theme;this.level=1;this.size="large";this.spotColor="accent-dark";this.color=undefined;this.marginBlock="1.25em";this.lineHeight="120%";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={};s[`${(t=this.size)===null||t===void 0?void 0:t.toLowerCase()}`]=true;return s}getHeadingTag(){const t=this.getClasses();const h={1:s("h1",{style:this.styles,class:t},s("slot",null)),2:s("h2",{style:this.styles,class:t},s("slot",null)),3:s("h3",{style:this.styles,class:t},s("slot",null)),4:s("h4",{style:this.styles,class:t},s("slot",null)),5:s("h5",{style:this.styles,class:t},s("slot",null)),6:s("h6",{style:this.styles,class:t},s("slot",null)),default:s("h1",{style:this.styles,class:t},s("slot",null))};return h[`${this.level}`]||h["default"]}render(){return s(h,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as s,H as h,g as o}from"./p-fd5ed6b0.js";const l=":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}@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}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host ::slotted(u){text-underline-offset:10%}:host ::slotted(i),:host ::slotted(em){font-style:italic;font-weight:var(--font-weight-medium)}:host ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";const e=l;const i=class{constructor(s){t(this,s);this.theme=window.CuraAPI.theme;this.level=1;this.size="large";this.spotColor="accent-dark";this.color=undefined;this.marginBlock="1.25em";this.lineHeight="120%";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={};s[`${(t=this.size)===null||t===void 0?void 0:t.toLowerCase()}`]=true;return s}getHeadingTag(){const t=this.getClasses();const h={1:s("h1",{style:this.styles,class:t},s("slot",null)),2:s("h2",{style:this.styles,class:t},s("slot",null)),3:s("h3",{style:this.styles,class:t},s("slot",null)),4:s("h4",{style:this.styles,class:t},s("slot",null)),5:s("h5",{style:this.styles,class:t},s("slot",null)),6:s("h6",{style:this.styles,class:t},s("slot",null)),default:s("h1",{style:this.styles,class:t},s("slot",null))};return h[`${this.level}`]||h["default"]}render(){return s(h,{key:"9d75215eaa43baaf9ca9aada36dfdbff4596afb2",style:this.hostCSSProperties()},this.getHeadingTag())}get host(){return o(this)}static get watchers(){return{color:["handleChangeColor"],spotColor:["handleChangeColor"]}}};i.style=e;export{i as cura_display};
|
|
2
|
+
//# sourceMappingURL=p-e5b0dd74.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as a,h as o,H as e}from"./p-fd5ed6b0.js";const r=":host{display:block;box-sizing:border-box;width:100%}cura-label{padding:12px 0px;border-bottom:1px solid var(--neutral-light)}";const t=r;const c=class{constructor(o){a(this,o)}render(){return o(e,{key:"ed1d2aeeba08c3c53f04f434fa46cb178271f405",slot:"dropdown-search-option"},o("cura-label",{key:"910b1ada8d333ace0171a3180ba6320e813e4fce",color:"neutral-dark",size:"xsmall",lineHeight:"16px",marginBlock:"0"},o("slot",{key:"20816c3a0c9805a88074f36e060ad850157427e2"})))}};c.style=t;export{c as cura_dropdown_search_option_title};
|
|
2
|
+
//# sourceMappingURL=p-ebed83d1.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,h as i,H as a,g as o}from"./p-fd5ed6b0.js";const s=":host{display:block;box-sizing:border-box}:host .container{position:fixed;z-index:99999;display:flex;box-sizing:border-box;min-width:328px;height:fit-content;padding:16px;border:1px solid var(--color-base);border-radius:12px;background-color:var(--neutral-purewhite);overflow:hidden;box-shadow:0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12))}:host .container.loader{padding:16px 16px 20px}:host .container.top{top:24px}:host .container.top.center{top:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, top 0.5s ease-in-out}:host .container.top.center.active{top:24px;opacity:1}:host .container.bottom{bottom:24px}:host .container.bottom.center{bottom:-100%;left:50%;transform:translateX(-50%);opacity:0;transition:opacity 0.5s ease-in-out, bottom 0.5s ease-in-out}:host .container.bottom.center.active{bottom:24px;opacity:1}:host .container.left{left:-100%;opacity:0;transition:opacity 0.5s ease-in-out, left 0.5s ease-in-out}@media (max-width: 768px){:host .container.left{right:unset;left:50%;transform:translateX(-50%)}}:host .container.left.active{left:24px;opacity:1}:host .container.right{right:-100%;opacity:0;transition:opacity 0.5s ease-in-out, right 0.5s ease-in-out}@media (max-width: 768px){:host .container.right{right:unset;left:50%;transform:translateX(-50%)}}:host .container.right.active{right:24px;opacity:1}:host .container .content{flex:1 1 0;display:flex;flex-direction:column;gap:4px}:host .container .default-icon{margin-right:12px}:host .container .close-icon{margin-left:12px;cursor:pointer}";const n=s;const r=class{constructor(i){t(this,i);this.toastClosed=e(this,"toastClosed",7);this.handleClose=()=>{this.closeContainer()};this.type="info";this.position="top-right";this.icon=undefined;this.label=undefined;this.closeButton=true;this.loader=true;this.autoCloseDelay=1e4;this.styles={};this.progress=0}handleChangeType(){this.setStyle()}connectedCallback(){this.setStyle()}render(){return i(a,{key:"467952f8386d659d44090163f3e14c0231dfcafd"},i("div",{key:"f510e12d309c79842d30cc24409b61433a6fe58e",class:this.getClasses(),style:this.styles},i("cura-icon",{key:"acd2a9d52ad91565c7bd36bc205753bdfe6e3e59",class:"default-icon",name:this.getNameIcon(),size:16,color:`${this.type}-dark`}),i("div",{key:"dced39ca17901673360dacbf27764b1387eff20d",class:"content"},i("cura-heading",{key:"6ac55c8ae757f654c808b72b4f44b54dc822107c",level:4,size:"xsmall",color:`${this.type}-dark`,weight:"bold","margin-block":"0"},this.label),i("cura-paragraph",{key:"e8e83b891e0b7e02901999f1622a183afc94c28e",color:`${this.type}-darker`,size:"xsmall",marginBlock:"0",lineHeight:"133.33%"},i("slot",{key:"080891767b1b552520d7d3ed59002a9478eb0288"})),i("slot",{key:"0a43f99bbaf2e4cdd2fd7dc1d5a0431602b76361",name:"actions"})),this.closeButton&&i("cura-icon",{key:"1ec27e6d6d44b82ed26a59cb6ba967858b4c8809",class:"close-icon",name:"close",size:16,color:"error-dark",onClick:this.handleClose}),this.loader&&!!this.autoCloseDelay&&i("cura-loader-bar",{key:"6457bb003e4706d3f60b85aa3faa3e0b6b276869",color:`${this.type}-base`,progress:this.progress})))}componentDidLoad(){this.openContainer();this.startAnimation()}setStyle(){this.styles=Object.assign(Object.assign({},this.styles),{"--neutral-purewhite":window.CuraAPI.theme.colors.getColor(`neutral-purewhite`),"--neutral-base":window.CuraAPI.theme.colors.getColor(`neutral-base`,.2),"--primary-base":window.CuraAPI.theme.colors.getColor(`primary-base`),"--color-base":window.CuraAPI.theme.colors.getColor(`${this.type}-base`)})}getClasses(){const[t,e]=this.position.split("-");const i={};i["container"]=true;i[t]=true;i[e]=true;if(this.loader){i["loader"]=true}return i}getNameIcon(){const t={info:"infoCircle",success:"checkCircle",warning:"alertCircle",error:"alertTriangle"};return this.icon?this.icon:t[this.type]}openContainer(){this.container=this.host.shadowRoot.querySelector(".container");this.container.classList.add("active")}closeContainer(){this.container.classList.remove("active");setTimeout((()=>{this.toastClosed.emit();this.host.remove()}),500)}startAnimation(){if(!!this.autoCloseDelay){if(this.loader){this.progress=0;let t=setInterval((()=>{if(this.progress>=100){clearInterval(t);this.closeContainer()}else{this.progress++}}),this.autoCloseDelay/100)}else{let t=setInterval((()=>{clearInterval(t);this.closeContainer()}),this.autoCloseDelay)}}}get host(){return o(this)}static get watchers(){return{type:["handleChangeType"],position:["handleChangeType"]}}};r.style=n;export{r as cura_toast};
|
|
2
|
+
//# sourceMappingURL=p-ed839f1e.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as o,g as n}from"./p-fd5ed6b0.js";const a=":host{display:block;box-sizing:border-box;width:100%}:host(:last-of-type) .content-container{border-bottom:none}.option-container{width:100%;display:flex}.option-container:hover:not(.disabled):not(.selected) .content-container{background-color:var(--neutral-white)}.option-container.selected .content-container{background-color:var(--primary-lighter)}.option-container.disabled{cursor:default}.content-container{display:flex;width:100%;box-sizing:border-box;padding:calc(var(--base-spacing) * 2px) calc(var(--base-spacing) * 1px);background-color:var(--neutral-purewhite);border-bottom:1px solid var(--neutral-light)}.content-container ::slotted(div[slot=action]){display:flex;justify-content:end}.option-info{width:100%;display:flex;align-items:center;align-content:center;justify-content:center;gap:calc(var(--base-spacing) * 2px);flex-direction:row;box-sizing:border-box;cursor:pointer}.option-info cura-heading{width:100%;margin-block:0px}.option-info ::slotted(div[slot=image]){min-width:calc(var(--base-spacing) * 8px);display:flex;justify-content:center;align-items:center}";const
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,h as i,H as o,g as n}from"./p-fd5ed6b0.js";const a=":host{display:block;box-sizing:border-box;width:100%}:host(:last-of-type) .content-container{border-bottom:none}.option-container{width:100%;display:flex}.option-container:hover:not(.disabled):not(.selected) .content-container{background-color:var(--neutral-white)}.option-container.selected .content-container{background-color:var(--primary-lighter)}.option-container.disabled{cursor:default}.content-container{display:flex;width:100%;box-sizing:border-box;padding:calc(var(--base-spacing) * 2px) calc(var(--base-spacing) * 1px);background-color:var(--neutral-purewhite);border-bottom:1px solid var(--neutral-light)}.content-container ::slotted(div[slot=action]){display:flex;justify-content:end}.option-info{width:100%;display:flex;align-items:center;align-content:center;justify-content:center;gap:calc(var(--base-spacing) * 2px);flex-direction:row;box-sizing:border-box;cursor:pointer}.option-info cura-heading{width:100%;margin-block:0px}.option-info ::slotted(div[slot=image]){min-width:calc(var(--base-spacing) * 8px);display:flex;justify-content:center;align-items:center}";const c=a;const s=class{constructor(i){t(this,i);this.optionSelected=e(this,"optionSelected",7);this.handleOptionClick=t=>{if(this.selectable){this.selected=!this.selected;this.optionSelected.emit(this.value);this.updateIconColor()}else{t.preventDefault();t.stopImmediatePropagation()}};this.value=undefined;this.selected=false;this.selectable=true;this.hovered=false;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-light"]=window.CuraAPI.theme.colors.getColor(`neutral-light`);this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor(`neutral-white`);this.styles["--primary-lighter"]=window.CuraAPI.theme.colors.getColor(`primary-lighter`,50)}componentDidLoad(){this.updateIconColor()}updateIconColor(){const t=this.hostElement.querySelector('[slot="image"] cura-icon');if(t){t.setAttribute("color",this.selected?"primary":"neutral-dark")}}render(){return i(o,{key:"0dfb8d67f1aee692af5abdad170f2fc3e6c5ffc6",slot:"dropdown-search-option"},i("div",{key:"6596c224bbfc0e9b5c3d2a39d064852019af5b74",style:this.styles,class:{"option-container":true,hovered:this.selectable?this.hovered:false,selected:this.selected,disabled:!this.selectable}},i("div",{key:"b73badabbcde37615c58707d8a62832363deb694",class:"content-container"},i("div",{key:"6ea1e5cfa3aa5f7bb7d0a4a2c9c8aff6e076304c",class:"option-info",onClick:t=>this.handleOptionClick(t)},i("slot",{key:"9e6272b220a723fbc1b52a23f59873cb4eea0986",name:"image"}),i("cura-heading",{key:"4bec4f91fd5ef5759373d846c0876678e67b1b48",size:"xsmall",lineHeight:"16px",marginBlock:"0px",weight:"bold",color:"neutral-black"},i("slot",{key:"c485bfd68ddf4b5bcfa0c590c11344352939fe87"}))),i("slot",{key:"0ce8978f72401af3580c72919b6079ef222dcc0d",name:"action"}))))}get hostElement(){return n(this)}static get watchers(){return{selected:["updateIconColor"]}}};s.style=c;export{s as cura_dropdown_search_option};
|
|
2
|
+
//# sourceMappingURL=p-eea093b2.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,h as s,H as i,g as a}from"./p-fd5ed6b0.js";import{i as n,a as h}from"./p-272c784a.js";const r=":host{display:block}.container{display:flex;flex-direction:column;position:relative}.container .calendar{padding:0px calc(var(--base-spacing) * 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:auto;width:100%;background-color:#fff}";const o=r;const d=class{constructor(s){t(this,s);this.dateChange=e(this,"dateChange",7);this.statusInputChange=e(this,"statusInputChange",7);this.label="";this.status="default";this.size="medium";this.name="";this.helperText=undefined;this.enableRangeDates=undefined;this.disableFutureDates=undefined;this.disablePassDates=undefined;this.iconName="";this.placeholder=null;this.styles={};this.isCalendarVisible=false;this.dates=[];this.value="";this.dateSettings={placeholder:null,mask:"date",mode:"single"}}connectedCallback(){const{fonts:t,colors:e,spacing:s}=window.CuraAPI.theme;const i=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":i.regular}}componentWillLoad(){this.updateDateSettings()}formAssociatedCallback(t){t.ariaLabel=this.label}updateDateSettings(){const t=this.getDateSettings(this.enableRangeDates);if(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){if(this.el.contains(t.target)){return}this.hideCalendar()}hideCalendar(){this.isCalendarVisible=false}showCalendar(){this.isCalendarVisible=true}handleInputDates(t){const e=t.target.value;const s=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/;const i=/^(\d{2}\/\d{2}\/\d{4})$/;if(s.test(e)){const t=e.match(s);const i=this.parseStringToDate(t[1]);const a=this.parseStringToDate(t[2]);if(this.isDateValid(i)&&this.isDateValid(a)){this.status="default";this.dates=[i,a];this.value=`${this.parseDateToString(i)} - ${this.parseDateToString(a)}`;this.dateChange.emit(this.value)}else{this.resetDates()}}else if(i.test(e)){const t=e.match(i);const s=this.parseStringToDate(t[1]);if(this.isDateValid(s)){this.status="default";this.dates=[s];this.value=this.parseDateToString(s);this.dateChange.emit(this.value)}else{this.resetDates()}}else{this.dates=[]}}handleChangeDates(t){if(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;e.setHours(0,0,0,0);if(this.disablePassDates)return!n(t,e);if(this.disableFutureDates)return!h(t,e);return true}parseStringToDate(t){const[e,s,i]=t.split("/").map(Number);return new Date(i,s-1,e)}parseDateToString(t){const e=String(t.getDate()).padStart(2,"0");const s=String(t.getMonth()+1).padStart(2,"0");const i=t.getFullYear();return`${e}/${s}/${i}`}resetDates(){this.status="error";this.dates=[];this.statusInputChange.emit(this.status)}renderCalendarOrHelperText(){if(this.isCalendarVisible){return s("div",{class:"calendar visible"},s("cura-calendar",{customDates:this.dates,mode:this.dateSettings.mode,width:"100%",maxWidth:"400px",embedded:false,floating:false,disableFutureDates:this.disableFutureDates,disablePassDates:this.disablePassDates,onOnchangeday:t=>{const e=t.detail.days;if(e.length===1){this.value=this.parseDateToString(e[0])}else if(e.length>0){this.value=`${this.parseDateToString(e[0])} - ${this.parseDateToString(e[e.length-1])}`}else{this.value=""}this.dateChange.emit(this.value)}}))}else{return this.helperText}}render(){return s(i,{key:"bcda0a8a2601f24d445775e40535d1c8a80be5c0"},s("div",{key:"3a3e11f1bd7082d563537a8679f69f976f242a4a",class:"container",style:this.styles},s("cura-input-text",{key:"86ce4be158090c4ad4bfaa1e5196548fa5e1c105",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":true,onKeyUp:t=>this.handleInputDates(t),autocomplete:"off",onValueChange:t=>this.handleChangeDates(t)},this.renderCalendarOrHelperText())))}static get formAssociated(){return true}get el(){return a(this)}static get watchers(){return{enableRangeDates:["updateDateSettings"]}}};d.style=o;export{d as cura_input_date};
|
|
2
|
+
//# sourceMappingURL=p-f375a612.entry.js.map
|
|
@@ -303,7 +303,7 @@ const CuraHeading = class {
|
|
|
303
303
|
return tags[`${this.level}`] || tags['default'];
|
|
304
304
|
}
|
|
305
305
|
render() {
|
|
306
|
-
return (h(Host, { key: '
|
|
306
|
+
return (h(Host, { key: '83a6a2a08051c3654f609f0e1824f41f48a6ff83', style: this.hostCSSProperties() }, this.getHeadingTag()));
|
|
307
307
|
}
|
|
308
308
|
get host() { return getElement(this); }
|
|
309
309
|
static get watchers() { return {
|
|
@@ -4365,7 +4365,7 @@ const CuraLabel = class {
|
|
|
4365
4365
|
};
|
|
4366
4366
|
}
|
|
4367
4367
|
render() {
|
|
4368
|
-
return (h(Host, { key: '
|
|
4368
|
+
return (h(Host, { key: '8d691e1d4c38c30d1e50bc981b9e6de89b3506e0', style: this.hostCSSProperties() }, h("p", { key: 'b68944f4fe1e65aecf6a627f3bba547418bc125b', style: this.styles, class: this.getClasses() }, h("slot", { key: 'f8ac467674d94fe94adc075743b12111d1e32469' }))));
|
|
4369
4369
|
}
|
|
4370
4370
|
get host() { return getElement(this); }
|
|
4371
4371
|
static get watchers() { return {
|
|
@@ -4399,7 +4399,7 @@ const CuraLoaderCircle = class {
|
|
|
4399
4399
|
};
|
|
4400
4400
|
}
|
|
4401
4401
|
render() {
|
|
4402
|
-
return (h(Host, { key: '
|
|
4402
|
+
return (h(Host, { key: '9ef3dd91b5958a5aeb90fe51120f5d9cc768ca62', style: this.getStyles() }, h("svg", { key: '96b6a2ac1ee77c14b68ea7ee462bae4a122f0c1f', viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { key: '01e9425e96b2f8b63a0115dfba358a46d86574c5' }, h("circle", { key: '5ba2e9d288de3b48d33c57ef9c8c282511683739', cx: "8", cy: "8", r: "7", stroke: "url(#paint0_linear_13485_11488)", "stroke-width": "2" }), h("path", { key: 'b2069b38fc2a810c6b838eb4c924619a14ef5648', d: "M1 8C1 4.13401 4.11877 1 7.96596 1C9.53445 1 10.9819 1.52093 12.1462 2.4C12.8959 2.96601 13.5282 3.68049 14 4.5", "stroke-width": "2" })), h("defs", { key: '4e04a92c3cb8ba0084112f1a14a7815317ca92c5' }, h("linearGradient", { key: '4369f1a5c6d66b37cc00ca88c3e5c77867867fbf', id: "paint0_linear_13485_11488", x1: "15.7", y1: "4.5", x2: "4.15", y2: "11.5", gradientUnits: "userSpaceOnUse" }, h("stop", { key: '224eac239fcd4f22e3ca7b044d89942757381b9e' }), h("stop", { key: '35236a39f2156fefea7878a60dd1e559d3d1f850', offset: "1" }))))));
|
|
4403
4403
|
}
|
|
4404
4404
|
};
|
|
4405
4405
|
CuraLoaderCircle.style = CuraLoaderCircleStyle0;
|
|
@@ -4423,7 +4423,7 @@ const CuraPageTemplate = class {
|
|
|
4423
4423
|
return classes;
|
|
4424
4424
|
}
|
|
4425
4425
|
render() {
|
|
4426
|
-
return (h(Host, { key: '
|
|
4426
|
+
return (h(Host, { key: 'd79c3d22ccbd93d8a56c700e3016507d18720464' }, h("div", { key: 'a717f44d6b5df9f00ffe61fff816721705748040', style: this.styles, class: "grid-template" }, h("div", { key: '7a3d585d4213799b32e2043327442b21833fd4fc', id: "sub-header" }, h("slot", { key: 'dbab9738fe221a426642e5d63e88130e1f351591', name: 'sub-header' })), h("div", { key: '39f2878cac260b70b8e53b57b6b9b5b07f658251', id: "header" }, h("slot", { key: '511af91f30dfcfde3ced7bce4c341a2802c88db8', name: 'header' })), h("div", { key: 'ed8d1b1e0d5ffca939c525ee8320da7f2afde95d', id: "pre-content" }, h("slot", { key: 'dd8c722ddd113f49965a6397625980aace8b78e8', name: 'pre-content' })), h("div", { key: '64a5767bbc858f18e44a3339b6bb567b3e5a8c0d', id: "content-container", class: this.getClasses() }, h("div", { key: '919e9d54e10f1469264f193545e80b680b63c801', id: "sidebar-left" }, h("slot", { key: '8ddeb7358bd9f6d0e08b1e3f323219b8980eec9c', name: 'sidebar-left' })), h("div", { key: '48e3860c1674658c386124c80a35b85bdb085e3e', id: "content" }, h("slot", { key: '8bc21a187897a5e9cd2e922285364a02425cefa6', name: "content" }), h("slot", { key: '587d13eed3fedcbf9e33dc4084cb2554ba70125d' })), h("div", { key: '7f620fd04b4cf4a051954dca8a95293c2a7c1d9a', id: "sidebar-right" }, h("slot", { key: '3499275e67a00fcaab4f044535dbeb19c1040569', name: 'sidebar-right' }))), h("div", { key: '59b9e4a5fe541f2ad6dac53a40588482b33e0cad', id: "post-body" }, h("slot", { key: '7493b3b330cabf263990a149c1b526501260de95', name: 'post-body' })), h("div", { key: '4a35c95f7ad04f04bb8673babc06d243e1b8f931', id: "footer" }, h("slot", { key: 'f69ffbd9c9cabe72e1ee4f147f7a1448311a7f0c', name: 'footer' })), h("div", { key: 'd53b60b2d9170797e7dc12b3179c24b7f76ac41d', id: "sub-footer" }, h("slot", { key: '75dcebb2f223ed1d0b1181ea3773fbb6bf096e33', name: 'sub-footer' })))));
|
|
4427
4427
|
}
|
|
4428
4428
|
get host() { return getElement(this); }
|
|
4429
4429
|
};
|
|
@@ -4479,7 +4479,7 @@ const CuraParagraph = class {
|
|
|
4479
4479
|
};
|
|
4480
4480
|
}
|
|
4481
4481
|
render() {
|
|
4482
|
-
return (h(Host, { key: '
|
|
4482
|
+
return (h(Host, { key: 'fc146c5173887dd80bb1798d58b7fbe29775e2de', style: this.hostCSSProperties() }, h("p", { key: '0defc510c08182261e22a4ab47a24d939199db24', style: this.styles, class: this.setsizeClass() }, h("slot", { key: 'e70c68a1da0596dc8d2273f5679c9193a354e313' }))));
|
|
4483
4483
|
}
|
|
4484
4484
|
get host() { return getElement(this); }
|
|
4485
4485
|
static get watchers() { return {
|
|
@@ -4767,13 +4767,13 @@ const CuraSelect = class {
|
|
|
4767
4767
|
return (h("cura-icon", { class: 'feedback-icon', name: icon, iconset: 'default', size: this.size === 'large' ? 20 : 16, color: this.getColor('icon'), style: this.styles }));
|
|
4768
4768
|
}
|
|
4769
4769
|
render() {
|
|
4770
|
-
return (h(Host, { key: '
|
|
4770
|
+
return (h(Host, { key: 'f01b52d0da1c417723c9da0ce7002155b3cbb07d', style: this.styles }, h("div", { key: '2798e5cd7f16e8679520900374e569cca1e5bee8', class: this.getClasses(), onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), onClick: this.handleClick }, this.label && (h("cura-label", { key: '5f9f645c3199e6299f000f5ab167139f536442b8', class: 'label', weight: 'bold', size: this.size === 'large' ? 'small' : 'xsmall', color: this.getColor('label') }, this.label, " ", this.required && h("span", { key: '2bca7ed64c1d44152161c2d71173f70b8b2fbacc', class: 'required' }, "* "))), h("div", { key: 'c1e77ccc2d1853b8749fea57e5ca3554363ef168', class: {
|
|
4771
4771
|
'cura-input-field': true,
|
|
4772
4772
|
'open': this.isOpen
|
|
4773
|
-
} }, this.renderIcon(), h("input", { key: '
|
|
4773
|
+
} }, this.renderIcon(), h("input", { key: '66e99e0a7c3b00516cc2f1240d08511c9434201b', type: "text", autocomplete: 'off', onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), onKeyDown: this.handleKeyNavigation, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error'), onInput: this.handleInputChange, style: this.styles, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.textInput, readonly: this.searchBehavior ? null : true }), h("cura-icon", { key: '4efde985b30016b633818f9fafe6c1f538b4776e', name: this.isOpen ? 'up' : 'down', class: "up-down-icon", color: this.disabled ? 'neutral-dark' : 'primary-base', size: 16, iconset: 'default' })), h("cura-label", { key: 'ead6b6a9f95acc7f2cf2e7474f72c1627e0bd8cd', class: "helper-text", size: 'xsmall', color: this.getColor('text'), weight: this.mode === 'transparent' ? 'bold' : 'regular' }, h("slot", { key: 'e01c6c99fecb78822d092a41db0b969ca160cea1' })), this.isOpen && (h("div", { key: '0fedad3cac056457810c984eb471bd9a703f2ff4', class: {
|
|
4774
4774
|
'menu': true,
|
|
4775
4775
|
'open': this.isOpen
|
|
4776
|
-
} }, h("slot", { key: '
|
|
4776
|
+
} }, h("slot", { key: '1330a45037f002b5fd20a356f1fe5b982999e512', name: 'option' }))))));
|
|
4777
4777
|
}
|
|
4778
4778
|
static get formAssociated() { return true; }
|
|
4779
4779
|
get host() { return getElement(this); }
|
|
@@ -4823,7 +4823,7 @@ const CuraSelectOption = class {
|
|
|
4823
4823
|
};
|
|
4824
4824
|
}
|
|
4825
4825
|
render() {
|
|
4826
|
-
return (h(Host, { key: '
|
|
4826
|
+
return (h(Host, { key: '42fe72a8cadcb2745fa41cced2bf8f571ca0fb81', slot: "option" }, h("div", { key: '275c6ba6baaf1c28af3c6cce6abc36dc8c496e13', class: this.getClasses(), style: this.styles }, h("cura-label", { key: 'a5f2e672f55fe16b749f6f5d33c1ba64eb415ca8', color: `${this.selected ? 'primary-base' : 'neutral-black'}`, size: this.getSize('label'), "margin-block": "0" }, h("slot", { key: '37b09097f6f51515fe63f07a5b6bb2449ba51e60' })), this.selected && h("cura-icon", { key: '88b01b9505ea9c46ddd19be78db4bd084601687d', name: 'check', size: this.getSize('icon'), color: "primary-base" }))));
|
|
4827
4827
|
}
|
|
4828
4828
|
get host() { return getElement(this); }
|
|
4829
4829
|
static get watchers() { return {
|
|
@@ -160,7 +160,7 @@ const CuraCheckbox = class {
|
|
|
160
160
|
return h("cura-icon", { class: "icon", name: iconName, size: iconSize, color: iconColor });
|
|
161
161
|
}
|
|
162
162
|
render() {
|
|
163
|
-
return (h(Host, { key: '
|
|
163
|
+
return (h(Host, { key: '876fa0a7aa0fc7110cbf0ffeb2d95d529fa78e64' }, h("div", { key: '3e6d730765590ee75d7e045cadc7d03e5fc035e2', class: this.getClasses(), style: this.styles, onClick: this.handleClick }, h("div", { key: '0f7f6f3bc61a80e899d940d76fee266af1914f5a', class: "info" }, h("div", { key: 'a836cb0d7751a1a812364fe93a30403b02ec5c95', class: "label-wrapper" }, h("cura-label", { key: '5d180552ec71e22ddd8822727bd32d4167215f33', class: "label", weight: 'bold', size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: '047413aa21a28bc33984d19ad4dc10a38289c205', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: '68c9dd6f228ec3204647795f1cae32a8f8797bc2', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: '3a35a1219f135002f1b9ae64c0eb4227529bc904' }))), h("div", { key: 'fe969ee332b3c64a259ec552f411b5d2d4bc81e4', class: 'checkbox', tabIndex: this.ontabindex }, h("input", { key: '2cbcbe56130bddb5853cfcc3a8ef1b421f39bc7b', type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
|
|
164
164
|
}
|
|
165
165
|
static get formAssociated() { return true; }
|
|
166
166
|
get host() { return getElement(this); }
|
|
@@ -65,7 +65,7 @@ const CuraDisplay = class {
|
|
|
65
65
|
return tags[`${this.level}`] || tags['default'];
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: '9d75215eaa43baaf9ca9aada36dfdbff4596afb2', style: this.hostCSSProperties() }, this.getHeadingTag()));
|
|
69
69
|
}
|
|
70
70
|
get host() { return getElement(this); }
|
|
71
71
|
static get watchers() { return {
|
|
@@ -8,7 +8,7 @@ const CuraDropdownSearchOptionTitle = class {
|
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: 'ed1d2aeeba08c3c53f04f434fa46cb178271f405', slot: "dropdown-search-option" }, h("cura-label", { key: '910b1ada8d333ace0171a3180ba6320e813e4fce', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, h("slot", { key: '20816c3a0c9805a88074f36e060ad850157427e2' }))));
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
CuraDropdownSearchOptionTitle.style = CuraDropdownSearchOptionTitleStyle0;
|
|
@@ -42,12 +42,12 @@ const CuraDropdownSearchOption = class {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '0dfb8d67f1aee692af5abdad170f2fc3e6c5ffc6', slot: "dropdown-search-option" }, h("div", { key: '6596c224bbfc0e9b5c3d2a39d064852019af5b74', style: this.styles, class: {
|
|
46
46
|
"option-container": true,
|
|
47
47
|
hovered: this.selectable ? this.hovered : false,
|
|
48
48
|
selected: this.selected,
|
|
49
49
|
disabled: !this.selectable
|
|
50
|
-
} }, h("div", { key: '
|
|
50
|
+
} }, h("div", { key: 'b73badabbcde37615c58707d8a62832363deb694', class: "content-container" }, h("div", { key: '6ea1e5cfa3aa5f7bb7d0a4a2c9c8aff6e076304c', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, h("slot", { key: '9e6272b220a723fbc1b52a23f59873cb4eea0986', name: "image" }), h("cura-heading", { key: '4bec4f91fd5ef5759373d846c0876678e67b1b48', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, h("slot", { key: 'c485bfd68ddf4b5bcfa0c590c11344352939fe87' }))), h("slot", { key: '0ce8978f72401af3580c72919b6079ef222dcc0d', name: "action" })))));
|
|
51
51
|
}
|
|
52
52
|
get hostElement() { return getElement(this); }
|
|
53
53
|
static get watchers() { return {
|
|
@@ -244,9 +244,9 @@ const CuraDropdownSearch = class {
|
|
|
244
244
|
}
|
|
245
245
|
render() {
|
|
246
246
|
const isMobileDropdown = this.isMobile && this.isDropdownOpen;
|
|
247
|
-
return (h(Host, { key: '
|
|
247
|
+
return (h(Host, { key: 'fb9a745e5ae24c5abbf9c3c6ce8f0df2d5fcf01f', style: this.hostCSSProperties(), class: "dropdown-overlay" }, h("div", { key: 'efc455c59f27bb254a10bbe4c62eec3e627eebb7', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, h("div", { key: '4542af0eede7676c2a4ce7e4e88fa8983c0eec15', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (h("cura-button-transparent", { key: '2100335a869d32e7d4f6820bc64e02e308ab29e1', fontColor: "dark", onClick: () => (this.isMobile = false), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), h("cura-input-text", { key: 'fe1c21c892226c704c36107d250aac5f5b3cf0e0', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: isMobileDropdown ? 'transparent' : 'default', required: this.required, hideErrorIcon: this.status === 'error', iconName: this.iconName || 'search', value: this.value, status: this.status, onValueChange: e => this.onValueChange(e.target.value), onInput: e => this.handleInputChange(e), onFocus: () => this.handleOnFocus(), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
|
|
248
248
|
this.handleOnBlur();
|
|
249
|
-
}, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, h("slot", { key: '
|
|
249
|
+
}, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, h("slot", { key: 'b03a633b3e9e45fc4539d4e7a2282ae388bb2e96', name: "helperText" }))), h("div", { key: 'e8e88a4f884e386de33cea7f3bcf175a7e78b168', id: "dropdown-search-list", class: this.getDropdownClasses() }, h("slot", { key: 'f3aa2664cd496ccdd984a58c25f84fd9f616d157', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
|
|
250
250
|
}
|
|
251
251
|
get host() { return getElement(this); }
|
|
252
252
|
static get watchers() { return {
|
|
@@ -169,7 +169,7 @@ const CuraInputDate = class {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
render() {
|
|
172
|
-
return (h(Host, { key: '
|
|
172
|
+
return (h(Host, { key: 'bcda0a8a2601f24d445775e40535d1c8a80be5c0' }, h("div", { key: '3a3e11f1bd7082d563537a8679f69f976f242a4a', class: "container", style: this.styles }, h("cura-input-text", { key: '86ce4be158090c4ad4bfaa1e5196548fa5e1c105', 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": true, onKeyUp: event => this.handleInputDates(event), autocomplete: "off", onValueChange: event => this.handleChangeDates(event) }, this.renderCalendarOrHelperText()))));
|
|
173
173
|
}
|
|
174
174
|
static get formAssociated() { return true; }
|
|
175
175
|
get el() { return getElement(this); }
|
|
@@ -21,7 +21,7 @@ const CuraLoaderBar = class {
|
|
|
21
21
|
this.setProgress();
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'b24471535bdf9ada29ae81baa05f5c9abe7b79f9' }, h("div", { key: '15eb6b0b6abb45246c98d9e5957c492f44544062', id: "progress-bar", class: "progress-bar", style: this.styles }, h("span", { key: '032eee4ae4da0d5ad88f0df735d93ed37b8be26b', class: "progress-bar-fill" }))));
|
|
25
25
|
}
|
|
26
26
|
setColor() {
|
|
27
27
|
this.styles = Object.assign(Object.assign({}, this.styles), { '--neutral-base': window.CuraAPI.theme.colors.getColor(`neutral-base`, 0.2), '--color-base': window.CuraAPI.theme.colors.getColor(this.color) });
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-747aad85.js';
|
|
2
|
+
|
|
3
|
+
const curaModalCss = ":host{display:block}.modal{position:fixed;height:100%;width:100%;top:0px;bottom:0px;z-index:-1;margin-top:var(--offset-top)}.modal.open{z-index:100}.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:90;animation:fadeIn 0.3s ease-out}.wrapper{position:fixed;background-color:var(--neutral-white);border:2px solid var(--neutral-light);border-radius:calc(var(--base-spacing) * 3px);width:700px;max-width:600px;min-width:200px;padding:0px calc(var(--base-spacing) * 4px) calc(var(--base-spacing) * 4px) calc(var(--base-spacing) * 4px);z-index:100;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(--base-spacing) * 5px)}.modal.open .wrapper{transform:scale(1);opacity:1;visibility:visible}.close{justify-self:flex-end;padding-top:calc(var(--base-spacing) * 4px);background:none;border:none;cursor:pointer}.close.mobile{display:none}.close.desktop{display:flex}@media (max-width: 768px){.wrapper{position:fixed;bottom:0px;width:80%;padding-top:calc(var(--base-spacing) * 4px);padding-bottom:0px;border-radius:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 3px) 0px 0px;border-bottom:none}.close{align-items:center;border-top:1px dashed var(--neutral-light);margin-top:calc(var(--base-spacing) * 4px);padding:calc(var(--base-spacing) * 4px) 0px;justify-content:center;width:100%}.close.mobile{display:flex;gap:calc(var(--base-spacing) * 2px)}.close.desktop{display:none}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}";
|
|
4
|
+
const CuraModalStyle0 = curaModalCss;
|
|
5
|
+
|
|
6
|
+
const CuraModal = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.modalClose = createEvent(this, "modalClose", 7);
|
|
10
|
+
this.handleClose = () => {
|
|
11
|
+
this.modalClose.emit();
|
|
12
|
+
this.open = false;
|
|
13
|
+
};
|
|
14
|
+
this.open = false;
|
|
15
|
+
this.background = 'light';
|
|
16
|
+
this.topOffset = 0;
|
|
17
|
+
this.styles = {};
|
|
18
|
+
}
|
|
19
|
+
setColors() {
|
|
20
|
+
const backgroundTheme = {
|
|
21
|
+
dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),
|
|
22
|
+
light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),
|
|
23
|
+
};
|
|
24
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': backgroundTheme[this.background] });
|
|
25
|
+
}
|
|
26
|
+
setOffsetTop() {
|
|
27
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--offset-top': `${this.topOffset}px` });
|
|
28
|
+
}
|
|
29
|
+
connectedCallback() {
|
|
30
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--neutral-white': window.CuraAPI.theme.colors.getColor('neutral-white'), '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'), '--base-spacing': window.CuraAPI.theme.spacing.getSpacing() });
|
|
31
|
+
this.setColors();
|
|
32
|
+
this.setOffsetTop();
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return (h(Host, { key: '002525d3ad03f3271b11b0dacfd748ccfbfbaf1c', role: "dialog", "aria-modal": "true" }, h("div", { key: 'a684163919124acc33469b38cffeb6826dd2dd8d', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: 'bff07303351e5f7a75870b9c0f2b4a16736110bc', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: '4e8ac2fd00c10abf24060c644bbdcd6a5275bacb', class: "wrapper" }, h("button", { key: '6a0ab79a39181216882559f115107edf1c20a2c7', class: "close desktop", onClick: this.handleClose }, h("cura-icon", { key: '3be3e5ee04fc5caa8786efaac0e03c946d0bdd14', name: "close", color: "error-dark", size: "small" })), h("slot", { key: '90fbd8951a449d41e2409ba10445a61e296c45e5' }), h("button", { key: '3075523254d90f7f7f4ca75f28a5724b2402f7d5', class: "close mobile", onClick: this.handleClose }, h("cura-icon", { key: '9bfd171b87d0f1ff625b17f043ff90fa9dbad6e7', name: "close", color: "error-dark", size: "16" }), h("cura-paragraph", { key: 'c17191a5570c08400cfb1409fa1ebf3f0e03a270', color: "error-dark", size: "small", marginBlock: "0" }, "Fechar"))))));
|
|
36
|
+
}
|
|
37
|
+
static get watchers() { return {
|
|
38
|
+
"background": ["setColors"],
|
|
39
|
+
"topOffset": ["setOffsetTop"]
|
|
40
|
+
}; }
|
|
41
|
+
};
|
|
42
|
+
CuraModal.style = CuraModalStyle0;
|
|
43
|
+
|
|
44
|
+
export { CuraModal as cura_modal };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=cura-modal.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-modal.entry.js","mappings":";;AAAA,MAAM,YAAY,GAAG,k6DAAk6D,CAAC;AACx7D,wBAAe,YAAY;;MCMd,SAAS;;;;QAuDZ,gBAAW,GAAG;YACpB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;SACnB,CAAC;oBArDuD,KAAK;0BAKtB,OAAO;yBAKlB,CAAC;sBAMZ,EAAE;;IAGpB,SAAS;QACP,MAAM,eAAe,GAAG;YACtB,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC;YAChE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC;SACnE,CAAC;QAEF,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,oBAAoB,EAAE,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,GACvD,CAAC;KACH;IAGD,YAAY;QACV,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,cAAc,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,GACtC,CAAC;KACH;IAED,iBAAiB;QACf,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EACxE,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EACxE,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,GAC5D,CAAC;QACF,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;KACrB;IAOD,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,IAAI,EAAC,QAAQ,gBAAY,MAAM,IACnC,4DAAK,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,sBAAsB,GAAG,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IACpF,4DAAK,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,qBAAqB,GAAG,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,GAAQ,EACnG,4DAAK,KAAK,EAAC,SAAS,IAElB,+DAAQ,KAAK,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACrD,kEAAW,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,GAAa,CAC7D,EACT,8DAAa,EAEb,+DAAQ,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACpD,kEAAW,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAa,EACjE,uEAAgB,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,GAAG,aAE9C,CACV,CACL,CACF,CACD,EACP;KACH;;;;;;;;;;","names":[],"sources":["src/components/cura-modal/cura-modal.scss?tag=cura-modal&encapsulation=shadow","src/components/cura-modal/cura-modal.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/spacing.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/animations.scss';\n\n:host {\n display: block;\n}\n\n.modal {\n position: fixed;\n height: 100%;\n width: 100%;\n top: #{$spacing-none};\n bottom: #{$spacing-none};\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: 100;\n\n .backdrop,\n .wrapper {\n opacity: 1;\n visibility: visible;\n animation: fadeIn 0.3s ease-out;\n }\n }\n}\n\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.backdrop,\n.wrapper {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.backdrop {\n background-color: var(--background-color);\n z-index: 90;\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-white);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n width: 700px;\n max-width: 600px;\n min-width: 200px;\n padding: #{$spacing-none} #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: 100;\n\n @include shadow-level4();\n\n transform: scale(0.95);\n transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;\n\n ::slotted(*) {\n max-height: 80vh;\n overflow: auto;\n padding-right: #{$spacing-xs};\n }\n}\n\n.modal.open .wrapper {\n transform: scale(1);\n opacity: 1;\n visibility: visible;\n}\n\n.close {\n justify-self: flex-end;\n padding-top: #{$spacing-xxs};\n background: none;\n border: none;\n cursor: pointer;\n\n &.mobile {\n display: none;\n }\n\n &.desktop {\n display: flex;\n }\n}\n\n@include mobile-only() {\n .wrapper {\n position: fixed;\n bottom: #{$spacing-none};\n width: 80%;\n padding-top: #{$spacing-xxs};\n padding-bottom: #{$spacing-none};\n border-radius: #{$spacing-xxxs} #{$spacing-xxxs} #{$spacing-none} #{$spacing-none};\n border-bottom: none;\n }\n\n .close {\n align-items: center;\n border-top: 1px dashed var(--neutral-light);\n margin-top: #{$spacing-xxs};\n padding: #{$spacing-xxs} #{$spacing-none};\n justify-content: center;\n width: 100%;\n\n &.mobile {\n display: flex;\n gap: #{$spacing-mini};\n }\n\n &.desktop {\n display: none;\n }\n }\n}\n\n@include fadeIn();\n@include fadeOut();\n","import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property offsetTop to control modal top position.\n * Default: 0px\n */\n @Prop() topOffset?: number = 0;\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n @Watch('topOffset')\n setOffsetTop() {\n this.styles = {\n ...this.styles,\n '--offset-top': `${this.topOffset}px`,\n };\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-white': window.CuraAPI.theme.colors.getColor('neutral-white'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setOffsetTop();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\">\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.handleClose}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n <button class=\"close desktop\" onClick={this.handleClose}>\n <cura-icon name=\"close\" color=\"error-dark\" size=\"small\"></cura-icon>\n </button>\n <slot></slot>\n {/* Mobile button */}\n <button class=\"close mobile\" onClick={this.handleClose}>\n <cura-icon name=\"close\" color=\"error-dark\" size=\"16\"></cura-icon>\n <cura-paragraph color=\"error-dark\" size=\"small\" marginBlock=\"0\">\n Fechar\n </cura-paragraph>\n </button>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -133,7 +133,7 @@ const CuraRadio = class {
|
|
|
133
133
|
return statusColors[this.status][type];
|
|
134
134
|
}
|
|
135
135
|
render() {
|
|
136
|
-
return (h(Host, { key: '
|
|
136
|
+
return (h(Host, { key: '07ed893348b28a188a67ee6b5e8eedb0598d2309' }, h("div", { key: 'b80a2b0e3db1f5dcac77617ecb9629b219460dbe', class: this.getClasses(), style: this.styles }, h("div", { key: '945ceedc874bf7b8ecb48683d26fa626449fb377', class: "info" }, h("div", { key: '3257b5a46d040d0177e8a791a2d810bf278f7517', class: "label-wrapper" }, h("cura-label", { key: '8c68882b6e2f852a2d1929449b3c82469474fab3', class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: 'e9adfe5998b2c5f705589461bff38705f0ddbbc7', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: '50063f682a67c74a0ce2292cc823c21e6db90bcd', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: 'c746a61b3e7ea6d4a63143b794fd8c482829e834' }))), h("input", { key: '078275db7eb3a4878d93d77b120c3caaa0b5e0b7', 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, onClick: this.handleClick }))));
|
|
137
137
|
}
|
|
138
138
|
static get formAssociated() { return true; }
|
|
139
139
|
get host() { return getElement(this); }
|
|
@@ -105,7 +105,7 @@ const CuraSwitch = class {
|
|
|
105
105
|
return classes;
|
|
106
106
|
}
|
|
107
107
|
render() {
|
|
108
|
-
return (h(Host, { key: '
|
|
108
|
+
return (h(Host, { key: '7d90b4378da63462ce63f48a54b73c1ae73e75cd' }, h("div", { key: '880d8117e073b11e33acfe2915b4aa2695f6eda4', class: this.getClasses(), style: this.styles }, h("div", { key: '475056ce32564bd91dc48cd0d9d08059db77c030', class: "info" }, h("cura-label", { key: 'f391c5eb73fbae218a7037d0381fd49b9c739298', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, class: "label", weight: "bold", size: this.size === 'large' ? 'medium' : 'xsmall', lineHeight: "125%", color: this.assignColor('neutral-white', 'neutral-black') }, this.label), h("cura-label", { key: 'd587a5d17813f65a77563ce70f0c5e924bbf737d', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, h("slot", { key: '9cb6d99b2c6e7f0f398fb2899823717c9b1b565e' }))), h("div", { key: 'c7fd172953c607baa30186dd1429b39af28093ca', onClick: this.toggleSwitch, class: "control" }, h("div", { key: '0392a5ea1bd31068aa8af7f95fe21f3c7bf7797e', class: `track ${this.size.toLowerCase()}` }, h("div", { key: '98d36e0853ec222beaefd6da984483cbc872a5fa', class: `thumb ${this.size.toLowerCase()}`, tabIndex: this.ontabindex }))))));
|
|
109
109
|
}
|
|
110
110
|
static get formAssociated() { return true; }
|
|
111
111
|
static get watchers() { return {
|
|
@@ -27,7 +27,7 @@ const CuraToast = class {
|
|
|
27
27
|
this.setStyle();
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '467952f8386d659d44090163f3e14c0231dfcafd' }, h("div", { key: 'f510e12d309c79842d30cc24409b61433a6fe58e', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: 'acd2a9d52ad91565c7bd36bc205753bdfe6e3e59', class: "default-icon", name: this.getNameIcon(), size: 16, color: `${this.type}-dark` }), h("div", { key: 'dced39ca17901673360dacbf27764b1387eff20d', class: "content" }, h("cura-heading", { key: '6ac55c8ae757f654c808b72b4f44b54dc822107c', level: 4, size: "xsmall", color: `${this.type}-dark`, weight: "bold", "margin-block": "0" }, this.label), h("cura-paragraph", { key: 'e8e83b891e0b7e02901999f1622a183afc94c28e', color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: '080891767b1b552520d7d3ed59002a9478eb0288' })), h("slot", { key: '0a43f99bbaf2e4cdd2fd7dc1d5a0431602b76361', name: "actions" })), this.closeButton && h("cura-icon", { key: '1ec27e6d6d44b82ed26a59cb6ba967858b4c8809', class: "close-icon", name: "close", size: 16, color: "error-dark", onClick: this.handleClose }), this.loader && !!this.autoCloseDelay && h("cura-loader-bar", { key: '6457bb003e4706d3f60b85aa3faa3e0b6b276869', color: `${this.type}-base`, progress: this.progress }))));
|
|
31
31
|
}
|
|
32
32
|
componentDidLoad() {
|
|
33
33
|
this.openContainer();
|
|
@@ -31,7 +31,7 @@ const CuraTooltip = class {
|
|
|
31
31
|
this.setStyle();
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '732345360f527ffc69743818657643616b2ee611', role: "tooltip", id: this.elementId }, h("div", { key: '166aa0dd54c933f8b3b8ecc5c5c76824ef180d71', class: "container", style: this.styles }, h("div", { key: '7b54ec53f3b454979c45415ddcd164a71a9ab2b0', class: "content" }, h("cura-heading", { key: '71bf328ed2f9e5d704e6d06989a4bef6d7c4993d', level: 4, size: "xsmall", color: "neutral-black", weight: "bold", "margin-block": "0" }, this.label), h("cura-paragraph", { key: 'a427a4b9df7bfae50300c9947db9df825a2f7da0', color: "neutral-dark", "spot-color": "secondary-darker", size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: '65875debf5bd3eec9f3070ab96cf644460897c3b' }))), this.closeButton && !this.isMobile && h("cura-icon", { key: 'dac8229dc0f348b45ea3af9392c2001f638a0efb', class: "close-icon", name: "close", size: 16, color: "error-dark", onClick: this.handleClose }), this.isMobile && h("cura-button-transparent", { key: '6c90921145206d47ab84eaee972a08b9dcad7cf0', class: "close-button", size: "small", type: "button", color: "error", "icon-name": "close", "icon-position": "right", onClick: this.handleClose }, "OK, entendi."))));
|
|
35
35
|
}
|
|
36
36
|
componentDidLoad() {
|
|
37
37
|
this.targetElement = document.querySelector(`[aria-labelledby="${this.elementId}"]`);
|