@rededor/cura 1.6.1-alpha.10 → 1.6.1-alpha.11

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.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-60783089.js');
6
6
 
7
- const curaModalCss = ":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-white);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}}";
7
+ const curaModalCss = ":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}}";
8
8
  const CuraModalStyle0 = curaModalCss;
9
9
 
10
10
  const CuraModal = class {
@@ -55,7 +55,7 @@ const CuraModal = class {
55
55
  this.setOffset('right', this.right);
56
56
  }
57
57
  connectedCallback() {
58
- 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() });
58
+ 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() });
59
59
  this.setColors();
60
60
  this.setTop();
61
61
  this.setBottom();
@@ -69,7 +69,7 @@ const CuraModal = class {
69
69
  window.addEventListener('keydown', this.handleCloseOnEsc);
70
70
  }
71
71
  render() {
72
- return (index.h(index.Host, { key: 'e61daa046292367d64aeaaf82e8cdd223b2f7dc5', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, index.h("div", { key: 'f2b9cd2b8a3790c0fcab87343ea8a425bb76c264', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, index.h("div", { key: '3cf96f5a6a316c0a5df6abaf224d518a6a0a2934', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), index.h("div", { key: 'f297ec70cf7ef9a71d4620339ba364e71e4337f8', class: "wrapper" }, index.h("div", { key: 'd4a2151cd5be6877ff1be66f263c83941b604d5f', class: "close desktop" }, index.h("cura-button-transparent", { key: '27bbb629ac2988b98dfcbccdc72f08b2de70c9bc', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), index.h("slot", { key: 'f5e5b7931668446fb796184ede3796dfacdd38ef' }), index.h("div", { key: '014df19d65e3db1420f9e8dc33e56fb3aed8a1cf', class: "close mobile", onClick: this.handleClose }, index.h("cura-button-transparent", { key: '0fa3373474539e8220c41ba0fefb276e30f86315', color: "error", iconName: "close", size: "small" }, "Fechar"))))));
72
+ return (index.h(index.Host, { key: '4ccdb55c36abada0f1a7c8f44b79603e3e3432cc', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, index.h("div", { key: '1b7248b7549a903a7a9b08aa219f209e0f159d30', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, index.h("div", { key: '6977bffb5232d6e45d217bf2db4f61748daf7ccf', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), index.h("div", { key: '71f7c2cf8c56d4f0fdf443209e0f5e96e285e36e', class: "wrapper" }, index.h("div", { key: '80b99d594ee94b214318479e815194be75f3fea7', class: "close desktop" }, index.h("cura-button-transparent", { key: '9abea3d67b08611313ee28b44bf6775a37b9ab79', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), index.h("slot", { key: '85364906c3b59f2ac7b95cd316babff55de10a0f' }), index.h("div", { key: 'a4106cee880560a7fdcb92b63f98feefbe8f283a', class: "close mobile", onClick: this.handleClose }, index.h("cura-button-transparent", { key: '794ab5cfdece8aa94ff85d37655a83c9df7a854a', color: "error", iconName: "close", size: "small" }, this.mobileCloseLabel))))));
73
73
  }
74
74
  static get watchers() { return {
75
75
  "background": ["setColors"],
@@ -1 +1 @@
1
- {"file":"cura-modal.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,op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B,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,GAAQ,EACnGA,kEAAK,KAAK,EAAC,SAAS,IAElBA,kEAAK,KAAK,EAAC,eAAe,IACxBA,sFACE,QAAQ,EAAC,OAAO,EAChB,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,SACiB,CACvB,EACNA,oEAAa,EAEbA,kEAAK,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACjDA,sFAAyB,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,aAAiC,CACjG,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;","names":["h","Host"],"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: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\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: calc(var(--zIndex) - 10);\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 max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\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 padding: 0;\n margin-right: -8px;\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-mini} #{$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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return\n }\n\n this.open = false\n this.modalClose.emit()\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.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc)\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc)\n }\n\n render() {\n return (\n <Host role=\"dialog\"\n aria-modal=\"true\"\n style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent\n iconName=\"close\"\n color=\"error\"\n size=\"small\"\n onClick={this.handleClose}\n iconOnly\n ></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">Fechar</cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"cura-modal.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,wpEAAwpE,CAAC;AAC9qE,wBAAe,YAAY;;MCMd,SAAS;;;;QAwFpB,qBAAgB,GAAG,CAAC,GAAkB;YACpC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACtC,OAAO;aACR;YAED,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;SACxB,CAAC;QAgBM,gBAAW,GAAG;YACpB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;SACnB,CAAC;oBA7GuD,KAAK;0BAKtB,OAAO;mBAKxB,CAAC;sBAKE,CAAC;oBAKH,CAAC;qBAKA,CAAC;gCAK0B,QAAQ;sBAKlB,KAAK;sBAM7B,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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AAC,QAAQ,EAAE,CAAC;KACjB;IAOD,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;KAC9D;IAED,gBAAgB;QACd,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;KAC3D;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,IAAI,EAAC,QAAQ,gBAAY,MAAM,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,IACtED,kEAAK,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,sBAAsB,GAAG,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IACpFA,kEAAK,KAAK,EAAE,IAAI,CAAC,IAAI,GAAG,qBAAqB,GAAG,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,GAAQ,EACnGA,kEAAK,KAAK,EAAC,SAAS,IAElBA,kEAAK,KAAK,EAAC,eAAe,IACxBA,sFAAyB,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,SAA2B,CAC/H,EACNA,oEAAa,EAEbA,kEAAK,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACjDA,sFAAyB,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,IACjE,IAAI,CAAC,gBAAgB,CACE,CACtB,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;","names":["h","Host"],"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: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\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: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\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 padding: 0;\n margin-right: -8px;\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-mini} #{$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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -134,7 +134,7 @@
134
134
 
135
135
  .wrapper {
136
136
  position: fixed;
137
- background-color: var(--neutral-white);
137
+ background-color: var(--neutral-purewhite);
138
138
  border: 2px solid var(--neutral-light);
139
139
  border-radius: calc(var(--cura-spacing-base) * 3px);
140
140
  max-width: 600px;
@@ -45,7 +45,7 @@ export class CuraModal {
45
45
  this.setOffset('right', this.right);
46
46
  }
47
47
  connectedCallback() {
48
- 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() });
48
+ 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() });
49
49
  this.setColors();
50
50
  this.setTop();
51
51
  this.setBottom();
@@ -59,7 +59,7 @@ export class CuraModal {
59
59
  window.addEventListener('keydown', this.handleCloseOnEsc);
60
60
  }
61
61
  render() {
62
- return (h(Host, { key: 'e61daa046292367d64aeaaf82e8cdd223b2f7dc5', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, h("div", { key: 'f2b9cd2b8a3790c0fcab87343ea8a425bb76c264', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: '3cf96f5a6a316c0a5df6abaf224d518a6a0a2934', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: 'f297ec70cf7ef9a71d4620339ba364e71e4337f8', class: "wrapper" }, h("div", { key: 'd4a2151cd5be6877ff1be66f263c83941b604d5f', class: "close desktop" }, h("cura-button-transparent", { key: '27bbb629ac2988b98dfcbccdc72f08b2de70c9bc', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), h("slot", { key: 'f5e5b7931668446fb796184ede3796dfacdd38ef' }), h("div", { key: '014df19d65e3db1420f9e8dc33e56fb3aed8a1cf', class: "close mobile", onClick: this.handleClose }, h("cura-button-transparent", { key: '0fa3373474539e8220c41ba0fefb276e30f86315', color: "error", iconName: "close", size: "small" }, "Fechar"))))));
62
+ return (h(Host, { key: '4ccdb55c36abada0f1a7c8f44b79603e3e3432cc', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, h("div", { key: '1b7248b7549a903a7a9b08aa219f209e0f159d30', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: '6977bffb5232d6e45d217bf2db4f61748daf7ccf', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: '71f7c2cf8c56d4f0fdf443209e0f5e96e285e36e', class: "wrapper" }, h("div", { key: '80b99d594ee94b214318479e815194be75f3fea7', class: "close desktop" }, h("cura-button-transparent", { key: '9abea3d67b08611313ee28b44bf6775a37b9ab79', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), h("slot", { key: '85364906c3b59f2ac7b95cd316babff55de10a0f' }), h("div", { key: 'a4106cee880560a7fdcb92b63f98feefbe8f283a', class: "close mobile", onClick: this.handleClose }, h("cura-button-transparent", { key: '794ab5cfdece8aa94ff85d37655a83c9df7a854a', color: "error", iconName: "close", size: "small" }, this.mobileCloseLabel))))));
63
63
  }
64
64
  static get is() { return "cura-modal"; }
65
65
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-modal.js","sourceRoot":"","sources":["../../../src/components/cura-modal/cura-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO5F,MAAM,OAAO,SAAS;;QAwFpB,qBAAgB,GAAG,CAAC,GAAkB,EAAE,EAAE;YACxC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACvC,OAAM;YACR,CAAC;YAED,IAAI,CAAC,IAAI,GAAG,KAAK,CAAA;YACjB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;QACxB,CAAC,CAAA;QAgBO,gBAAW,GAAG,G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I,EAAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,SACiB,CACvB;oBACN,8DAAa;oBAEb,4DAAK,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW;wBACjD,gFAAyB,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,aAAiC,CACjG,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return\n }\n\n this.open = false\n this.modalClose.emit()\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.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc)\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc)\n }\n\n render() {\n return (\n <Host role=\"dialog\"\n aria-modal=\"true\"\n style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent\n iconName=\"close\"\n color=\"error\"\n size=\"small\"\n onClick={this.handleClose}\n iconOnly\n ></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">Fechar</cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-modal.js","sourceRoot":"","sources":["../../../src/components/cura-modal/cura-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO5F,MAAM,OAAO,SAAS;;QAwFpB,qBAAgB,GAAG,CAAC,GAAkB,EAAE,EAAE;YACxC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACvC,OAAO;YACT,CAAC;YAED,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACzB,CAAC,CAAC;QAgBM,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC;oBA7GuD,KAAK;0BAKtB,OAAO;mBAKxB,CAAC;sBAKE,CAAC;oBAKH,CAAC;qBAKA,CAAC;gCAK0B,QAAQ;sBAKlB,KAAK;sBAM7B,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,KAC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sourcesContent":["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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -4,7 +4,7 @@ import { d as defineCustomElement$4 } from './cura-icon2.js';
4
4
  import { d as defineCustomElement$3 } from './cura-label2.js';
5
5
  import { d as defineCustomElement$2 } from './cura-loader-circle2.js';
6
6
 
7
- const curaModalCss = ":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-white);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}}";
7
+ const curaModalCss = ":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}}";
8
8
  const CuraModalStyle0 = curaModalCss;
9
9
 
10
10
  const CuraModal$1 = /*@__PURE__*/ proxyCustomElement(class CuraModal extends HTMLElement {
@@ -57,7 +57,7 @@ const CuraModal$1 = /*@__PURE__*/ proxyCustomElement(class CuraModal extends HTM
57
57
  this.setOffset('right', this.right);
58
58
  }
59
59
  connectedCallback() {
60
- 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() });
60
+ 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() });
61
61
  this.setColors();
62
62
  this.setTop();
63
63
  this.setBottom();
@@ -71,7 +71,7 @@ const CuraModal$1 = /*@__PURE__*/ proxyCustomElement(class CuraModal extends HTM
71
71
  window.addEventListener('keydown', this.handleCloseOnEsc);
72
72
  }
73
73
  render() {
74
- return (h(Host, { key: 'e61daa046292367d64aeaaf82e8cdd223b2f7dc5', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, h("div", { key: 'f2b9cd2b8a3790c0fcab87343ea8a425bb76c264', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: '3cf96f5a6a316c0a5df6abaf224d518a6a0a2934', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: 'f297ec70cf7ef9a71d4620339ba364e71e4337f8', class: "wrapper" }, h("div", { key: 'd4a2151cd5be6877ff1be66f263c83941b604d5f', class: "close desktop" }, h("cura-button-transparent", { key: '27bbb629ac2988b98dfcbccdc72f08b2de70c9bc', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), h("slot", { key: 'f5e5b7931668446fb796184ede3796dfacdd38ef' }), h("div", { key: '014df19d65e3db1420f9e8dc33e56fb3aed8a1cf', class: "close mobile", onClick: this.handleClose }, h("cura-button-transparent", { key: '0fa3373474539e8220c41ba0fefb276e30f86315', color: "error", iconName: "close", size: "small" }, "Fechar"))))));
74
+ return (h(Host, { key: '4ccdb55c36abada0f1a7c8f44b79603e3e3432cc', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, h("div", { key: '1b7248b7549a903a7a9b08aa219f209e0f159d30', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: '6977bffb5232d6e45d217bf2db4f61748daf7ccf', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: '71f7c2cf8c56d4f0fdf443209e0f5e96e285e36e', class: "wrapper" }, h("div", { key: '80b99d594ee94b214318479e815194be75f3fea7', class: "close desktop" }, h("cura-button-transparent", { key: '9abea3d67b08611313ee28b44bf6775a37b9ab79', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), h("slot", { key: '85364906c3b59f2ac7b95cd316babff55de10a0f' }), h("div", { key: 'a4106cee880560a7fdcb92b63f98feefbe8f283a', class: "close mobile", onClick: this.handleClose }, h("cura-button-transparent", { key: '794ab5cfdece8aa94ff85d37655a83c9df7a854a', color: "error", iconName: "close", size: "small" }, this.mobileCloseLabel))))));
75
75
  }
76
76
  static get watchers() { return {
77
77
  "background": ["setColors"],
@@ -1 +1 @@
1
- {"file":"cura-modal.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,opEAAopE,CAAC;AAC1qE,wBAAe,YAAY;;MCMdA,WAAS;;;;;;QAwFpB,qBAAgB,GAAG,CAAC,GAAkB;YACpC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACtC,OAAM;aACP;YAED,IAAI,CAAC,IAAI,GAAG,KAAK,CAAA;YACjB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;SACvB,CAAA;QAgBO,gBAAW,GAAG;YACpB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,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,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,aAAiC,CACjG,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraModal"],"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: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\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: calc(var(--zIndex) - 10);\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 max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\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 padding: 0;\n margin-right: -8px;\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-mini} #{$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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return\n }\n\n this.open = false\n this.modalClose.emit()\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.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc)\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc)\n }\n\n render() {\n return (\n <Host role=\"dialog\"\n aria-modal=\"true\"\n style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent\n iconName=\"close\"\n color=\"error\"\n size=\"small\"\n onClick={this.handleClose}\n iconOnly\n ></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">Fechar</cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"cura-modal.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,wpEAAwpE,CAAC;AAC9qE,wBAAe,YAAY;;MCMdA,WAAS;;;;;;QAwFpB,qBAAgB,GAAG,CAAC,GAAkB;YACpC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACtC,OAAO;aACR;YAED,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;SACxB,CAAC;QAgBM,gBAAW,GAAG;YACpB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;SACnB,CAAC;oBA7GuD,KAAK;0BAKtB,OAAO;mBAKxB,CAAC;sBAKE,CAAC;oBAKH,CAAC;qBAKA,CAAC;gCAK0B,QAAQ;sBAKlB,KAAK;sBAM7B,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;IAED,SAAS,CAAC,IAAY,EAAE,KAAa;QACnC,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,CAAC,KAA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AE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,IACtE,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,4DAAK,KAAK,EAAC,eAAe,IACxB,gFAAyB,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,SAA2B,CAC/H,EACN,8DAAa,EAEb,4DAAK,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACjD,gFAAyB,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,IACjE,IAAI,CAAC,gBAAgB,CACE,CACtB,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraModal"],"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: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\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: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\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 padding: 0;\n margin-right: -8px;\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-mini} #{$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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,2 +1,2 @@
1
- import{p as e,b as o}from"./p-4ee8efca.js";export{s as setNonce}from"./p-4ee8efca.js";import{g as l}from"./p-0c25333f.js";import"./p-bf8e2037.js";import"./p-2db4deb3.js";var a=()=>{const o=import.meta.url;const l={};if(o!==""){l.resourcesUrl=new URL(".",o).href}return e(l)};a().then((async e=>{await l();return o(JSON.parse('[["p-d936d5cf",[[1,"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]}],[65,"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]},null,{"background":["setColors"],"color":["setColors"]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"labelIcon":[513,"label-icon"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"colorMode":[1,"color-mode"],"level":[514],"opened":[1540],"styles":[32]}],[1,"cura-badge-distance",{"distance":[2],"label":[513],"styles":[32],"displayDistance":[32]},null,{"distance":["formatDistance"]}],[1,"cura-dropdown-search-category"],[1,"cura-accordion",{"color":[513],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"labelIcon":[513,"label-icon"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"behavior":[513],"level":[514],"styles":[32]},null,{"color":["handleChangeColor"]}],[1,"cura-avatar",{"size":[1],"backgroundColor":[513,"background-color"],"borderColor":[513,"border-color"],"borderRadius":[513,"border-radius"],"border":[516],"type":[513],"imageSrc":[1537,"image-src"],"imageSrcDefault":[513,"image-src-default"],"floating":[516],"styles":[32]},null,{"size":["sizeHandler"]}],[1,"cura-dropdown-search-option",{"value":[1],"optionid":[1],"selectable":[516],"selected":[516],"highlighted":[516]}],[1,"cura-page-template",{"contentwidth":[513]}],[65,"cura-input-text",{"mode":[1537],"status":[1537],"size":[1537],"type":[513],"inputMode":[513,"input-mode"],"label":[513],"name":[513],"placeholder":[513],"value":[1544],"iconName":[1537,"icon-name"],"helperText":[1537,"helper-text"],"disabled":[516],"required":[516],"maskPreset":[8,"mask-preset"],"enableSelectionMode":[1540,"enable-selection-mode"],"maskRegex":[1537,"mask-regex"],"maskAdvanced":[1544,"mask-advanced"],"maxlength":[1538],"readOnly":[516,"read-only"],"isLoading":[1540,"is-loading"],"clearIcon":[1540,"clear-icon"],"hideErrorIcon":[4,"hide-error-icon"],"autocomplete":[513],"isHovered":[32],"isFocused":[32],"styles":[32],"setFocus":[64]},null,{"styles":["connectedCallback"],"size":["getClasses"],"status":["renderIcon"],"mode":["renderIcon"],"maskPreset":["initializeMask"],"maskRegex":["initializeMask"],"maskAdvanced":["initializeMask"]}],[65,"cura-select",{"label":[513],"placeholder":[513],"value":[1537],"mode":[513],"size":[513],"iconName":[1,"icon-name"],"status":[1537],"disabled":[516],"required":[516],"searchBehavior":[516,"search-behavior"],"caseSensitive":[516,"case-sensitive"],"maxHeight":[513,"max-height"],"isHovered":[32],"isFocused":[32],"isOpen":[32],"options":[32],"activeIndex":[32],"textInput":[32]},null,{"activeIndex":["updateOptionHighlights"],"textInput":["filterOptions"],"value":["handleValueChange"]}],[1,"cura-select-option",{"value":[513],"selected":[516],"active":[516],"size":[1],"styles":[32]},null,{"size":["getSize"]}],[65,"cura-button-transparent",{"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":[513],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"justify":[516],"hovered":[32],"styles":[32]},null,{"fontColor":["getSymbolColor"],"color":["getSymbolColor"]}],[1,"cura-paragraph",{"size":[513],"spotColor":[513,"spot-color"],"color":[513],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"textOverflow":[513,"text-overflow"],"styles":[32]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[513],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"textOverflow":[513,"text-overflow"],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]},null,{"size":["sizeHandler"],"color":["colorHandler"],"disabled":["colorHandler"]}],[1,"cura-label",{"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"textOverflow":[513,"text-overflow"],"styles":[32]},null,{"color":["handleChangeColor"],"spotColor":["handleChangeColor"]}]]],["p-d97719bc",[[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],"styles":[32],"isCalendarVisible":[32],"dates":[32],"value":[32],"dateSettings":[32]},[[8,"click","handleClick"]],{"enableRangeDates":["updateDateSettings"]}]]],["p-202dc01a",[[1,"cura-stepper",{"activeStepIndex":[514,"active-step-index"],"errorInCurrentStep":[516,"error-in-current-step"],"displayHeading":[516,"display-heading"],"variant":[513],"steps":[1],"styles":[32],"stepList":[32]}]]],["p-0b872499",[[1,"cura-tooltip",{"elementId":[1,"element-id"],"interactive":[4],"delay":[2],"maxWidth":[1,"max-width"],"position":[513],"label":[513],"closeButton":[516,"close-button"],"isMobile":[32]},[[9,"resize","onWindowResize"],[9,"scroll","onWindowScroll"]]]]],["p-9fce5ec5",[[1,"cura-modal",{"open":[1540],"background":[1],"top":[2],"bottom":[2],"left":[2],"right":[2],"mobileCloseLabel":[513,"mobile-close-label"],"zindex":[513],"styles":[32]},null,{"background":["setColors"],"top":["setTop"],"bottom":["setBottom"],"left":["setLeft"],"right":["setRight"]}]]],["p-5a43e745",[[1,"cura-toast",{"type":[1],"position":[1],"icon":[513],"label":[513],"closeButton":[516,"close-button"],"loader":[516],"autoCloseDelay":[514,"auto-close-delay"],"styles":[32],"progress":[32],"close":[64]},null,{"type":["handleChangeType"],"position":["handleChangeType"]}]]],["p-0aeaf57a",[[1,"cura-alert",{"type":[1],"floating":[516],"label":[513],"closeable":[516],"icon":[513],"styles":[32]},null,{"type":["setColors"]}]]],["p-b60a6aaa",[[65,"cura-button-outline",{"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":[1],"fontColor":[1,"font-color"],"textAlign":[513,"text-align"],"justify":[516],"styles":[32],"hovered":[32]},null,{"background":["setColors"],"color":["setColors","getSymbolColor"],"fontColor":["getSymbolColor"]}]]],["p-197213c0",[[1,"cura-badge-counter",{"number":[514],"color":[1],"disabled":[4],"type":[1],"styles":[32]},null,{"disabled":["handleColorChange"],"color":["handleColorChange"],"type":["handleColorChange"]}]]],["p-633c13cd",[[1,"cura-button-select",{"selected":[1540],"iconName":[1537,"icon-name"],"size":[513],"counter":[1538],"disabled":[516],"background":[1],"color":[1],"iconPosition":[513,"icon-position"],"hovered":[32],"styles":[32]},null,{"background":["setColors"],"color":["setColors"]}]]],["p-d8e1e182",[[65,"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]},null,{"size":["sizeHandler"],"color":["setColors"],"background":["setColors","assignColor"],"iconColor":["assignColor"]}]]],["p-07817634",[[1,"cura-icons-view",{"selected":[32]}]]],["p-0ccde0ff",[[65,"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]},null,{"size":["sizeHandler"],"color":["setColors"],"background":["setColors","assignColor"]}]]],["p-b254bbe4",[[1,"cura-dropdown-search-not-found"]]],["p-7a68835f",[[65,"cura-switch",{"checked":[1540],"disabled":[516],"label":[513],"ontabindex":[514],"position":[513],"size":[513],"background":[1],"color":[1],"overflowLabel":[513,"overflow-label"],"overflowHelper":[513,"overflow-helper"],"styles":[32]},null,{"size":["sizeHandler"],"color":["setColors"],"background":["setColors"]}]]],["p-ac0c90af",[[1,"cura-badge-dot",{"color":[1],"disabled":[516],"type":[513],"styles":[32]}]]],["p-53d68d72",[[1,"cura-card",{"hasPadding":[1028,"has-padding"],"hasShadow":[1028,"has-shadow"],"type":[1025],"colorMode":[1025,"color-mode"],"href":[1537],"target":[513],"styles":[32]}]]],["p-ac01bec2",[[1,"cura-display",{"level":[514],"size":[513],"spotColor":[1,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]},null,{"color":["handleChangeColor"],"spotColor":["handleChangeColor"]}]]],["p-12a4ae7e",[[1,"cura-calendar",{"period":[513],"width":[513],"minWidth":[513,"min-width"],"maxWidth":[513,"max-width"],"mode":[513],"dateFormat":[1537,"date-format"],"locale":[513],"type":[513],"disable":[16],"enable":[16],"defaultDate":[1537,"default-date"],"showToday":[516,"show-today"],"customDates":[16],"limitRange":[514,"limit-range"],"disablePassDates":[1540,"disable-pass-dates"],"disableFutureDates":[1540,"disable-future-dates"],"collapsed":[1540],"floating":[1540],"embedded":[1540],"selectLabelColorMode":[1537,"select-label-color-mode"],"selectedDates":[32],"rangeStart":[32],"defaultDates":[32],"currentDate":[32],"selectMonth":[32],"selectYear":[32],"styles":[32]},null,{"defaultDate":["initializeDefaultDates","handleDefaultDateChange"],"customDates":["watchDefaultDatesArray"]}]]],["p-20b05d8f",[[1,"cura-loader-bar",{"color":[1],"progress":[2],"styles":[32]},null,{"color":["handleChangeColor"],"progress":["handleProgress"]}]]],["p-7e10b146",[[1,"cura-badge-pill",{"type":[513],"color":[1],"iconName":[513,"icon-name"],"iconset":[513],"disabled":[516],"iconOnly":[516,"icon-only"],"borderRadius":[513,"border-radius"],"styles":[32]},null,{"color":["watchColorChange"]}]]],["p-137f003b",[[1,"cura-stepper-item",{"displayHeading":[516,"display-heading"],"heading":[513],"label":[513],"status":[513],"styles":[32]}],[1,"cura-progress-bar",{"progressColor":[513,"progress-color"],"progress":[514],"size":[514],"strokeWidth":[514,"stroke-width"],"active":[516]}]]]]'),e)}));
1
+ import{p as e,b as o}from"./p-4ee8efca.js";export{s as setNonce}from"./p-4ee8efca.js";import{g as l}from"./p-0c25333f.js";import"./p-bf8e2037.js";import"./p-2db4deb3.js";var a=()=>{const o=import.meta.url;const l={};if(o!==""){l.resourcesUrl=new URL(".",o).href}return e(l)};a().then((async e=>{await l();return o(JSON.parse('[["p-d936d5cf",[[1,"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]}],[65,"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]},null,{"background":["setColors"],"color":["setColors"]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"labelIcon":[513,"label-icon"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"colorMode":[1,"color-mode"],"level":[514],"opened":[1540],"styles":[32]}],[1,"cura-badge-distance",{"distance":[2],"label":[513],"styles":[32],"displayDistance":[32]},null,{"distance":["formatDistance"]}],[1,"cura-dropdown-search-category"],[1,"cura-accordion",{"color":[513],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"labelIcon":[513,"label-icon"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"behavior":[513],"level":[514],"styles":[32]},null,{"color":["handleChangeColor"]}],[1,"cura-avatar",{"size":[1],"backgroundColor":[513,"background-color"],"borderColor":[513,"border-color"],"borderRadius":[513,"border-radius"],"border":[516],"type":[513],"imageSrc":[1537,"image-src"],"imageSrcDefault":[513,"image-src-default"],"floating":[516],"styles":[32]},null,{"size":["sizeHandler"]}],[1,"cura-dropdown-search-option",{"value":[1],"optionid":[1],"selectable":[516],"selected":[516],"highlighted":[516]}],[1,"cura-page-template",{"contentwidth":[513]}],[65,"cura-input-text",{"mode":[1537],"status":[1537],"size":[1537],"type":[513],"inputMode":[513,"input-mode"],"label":[513],"name":[513],"placeholder":[513],"value":[1544],"iconName":[1537,"icon-name"],"helperText":[1537,"helper-text"],"disabled":[516],"required":[516],"maskPreset":[8,"mask-preset"],"enableSelectionMode":[1540,"enable-selection-mode"],"maskRegex":[1537,"mask-regex"],"maskAdvanced":[1544,"mask-advanced"],"maxlength":[1538],"readOnly":[516,"read-only"],"isLoading":[1540,"is-loading"],"clearIcon":[1540,"clear-icon"],"hideErrorIcon":[4,"hide-error-icon"],"autocomplete":[513],"isHovered":[32],"isFocused":[32],"styles":[32],"setFocus":[64]},null,{"styles":["connectedCallback"],"size":["getClasses"],"status":["renderIcon"],"mode":["renderIcon"],"maskPreset":["initializeMask"],"maskRegex":["initializeMask"],"maskAdvanced":["initializeMask"]}],[65,"cura-select",{"label":[513],"placeholder":[513],"value":[1537],"mode":[513],"size":[513],"iconName":[1,"icon-name"],"status":[1537],"disabled":[516],"required":[516],"searchBehavior":[516,"search-behavior"],"caseSensitive":[516,"case-sensitive"],"maxHeight":[513,"max-height"],"isHovered":[32],"isFocused":[32],"isOpen":[32],"options":[32],"activeIndex":[32],"textInput":[32]},null,{"activeIndex":["updateOptionHighlights"],"textInput":["filterOptions"],"value":["handleValueChange"]}],[1,"cura-select-option",{"value":[513],"selected":[516],"active":[516],"size":[1],"styles":[32]},null,{"size":["getSize"]}],[65,"cura-button-transparent",{"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":[513],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"justify":[516],"hovered":[32],"styles":[32]},null,{"fontColor":["getSymbolColor"],"color":["getSymbolColor"]}],[1,"cura-paragraph",{"size":[513],"spotColor":[513,"spot-color"],"color":[513],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"textOverflow":[513,"text-overflow"],"styles":[32]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[513],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"textOverflow":[513,"text-overflow"],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]},null,{"size":["sizeHandler"],"color":["colorHandler"],"disabled":["colorHandler"]}],[1,"cura-label",{"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"textOverflow":[513,"text-overflow"],"styles":[32]},null,{"color":["handleChangeColor"],"spotColor":["handleChangeColor"]}]]],["p-d97719bc",[[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],"styles":[32],"isCalendarVisible":[32],"dates":[32],"value":[32],"dateSettings":[32]},[[8,"click","handleClick"]],{"enableRangeDates":["updateDateSettings"]}]]],["p-202dc01a",[[1,"cura-stepper",{"activeStepIndex":[514,"active-step-index"],"errorInCurrentStep":[516,"error-in-current-step"],"displayHeading":[516,"display-heading"],"variant":[513],"steps":[1],"styles":[32],"stepList":[32]}]]],["p-0b872499",[[1,"cura-tooltip",{"elementId":[1,"element-id"],"interactive":[4],"delay":[2],"maxWidth":[1,"max-width"],"position":[513],"label":[513],"closeButton":[516,"close-button"],"isMobile":[32]},[[9,"resize","onWindowResize"],[9,"scroll","onWindowScroll"]]]]],["p-1ef21ae9",[[1,"cura-modal",{"open":[1540],"background":[1],"top":[2],"bottom":[2],"left":[2],"right":[2],"mobileCloseLabel":[513,"mobile-close-label"],"zindex":[513],"styles":[32]},null,{"background":["setColors"],"top":["setTop"],"bottom":["setBottom"],"left":["setLeft"],"right":["setRight"]}]]],["p-5a43e745",[[1,"cura-toast",{"type":[1],"position":[1],"icon":[513],"label":[513],"closeButton":[516,"close-button"],"loader":[516],"autoCloseDelay":[514,"auto-close-delay"],"styles":[32],"progress":[32],"close":[64]},null,{"type":["handleChangeType"],"position":["handleChangeType"]}]]],["p-0aeaf57a",[[1,"cura-alert",{"type":[1],"floating":[516],"label":[513],"closeable":[516],"icon":[513],"styles":[32]},null,{"type":["setColors"]}]]],["p-b60a6aaa",[[65,"cura-button-outline",{"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":[1],"fontColor":[1,"font-color"],"textAlign":[513,"text-align"],"justify":[516],"styles":[32],"hovered":[32]},null,{"background":["setColors"],"color":["setColors","getSymbolColor"],"fontColor":["getSymbolColor"]}]]],["p-197213c0",[[1,"cura-badge-counter",{"number":[514],"color":[1],"disabled":[4],"type":[1],"styles":[32]},null,{"disabled":["handleColorChange"],"color":["handleColorChange"],"type":["handleColorChange"]}]]],["p-633c13cd",[[1,"cura-button-select",{"selected":[1540],"iconName":[1537,"icon-name"],"size":[513],"counter":[1538],"disabled":[516],"background":[1],"color":[1],"iconPosition":[513,"icon-position"],"hovered":[32],"styles":[32]},null,{"background":["setColors"],"color":["setColors"]}]]],["p-d8e1e182",[[65,"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]},null,{"size":["sizeHandler"],"color":["setColors"],"background":["setColors","assignColor"],"iconColor":["assignColor"]}]]],["p-07817634",[[1,"cura-icons-view",{"selected":[32]}]]],["p-0ccde0ff",[[65,"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]},null,{"size":["sizeHandler"],"color":["setColors"],"background":["setColors","assignColor"]}]]],["p-b254bbe4",[[1,"cura-dropdown-search-not-found"]]],["p-7a68835f",[[65,"cura-switch",{"checked":[1540],"disabled":[516],"label":[513],"ontabindex":[514],"position":[513],"size":[513],"background":[1],"color":[1],"overflowLabel":[513,"overflow-label"],"overflowHelper":[513,"overflow-helper"],"styles":[32]},null,{"size":["sizeHandler"],"color":["setColors"],"background":["setColors"]}]]],["p-ac0c90af",[[1,"cura-badge-dot",{"color":[1],"disabled":[516],"type":[513],"styles":[32]}]]],["p-53d68d72",[[1,"cura-card",{"hasPadding":[1028,"has-padding"],"hasShadow":[1028,"has-shadow"],"type":[1025],"colorMode":[1025,"color-mode"],"href":[1537],"target":[513],"styles":[32]}]]],["p-ac01bec2",[[1,"cura-display",{"level":[514],"size":[513],"spotColor":[1,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]},null,{"color":["handleChangeColor"],"spotColor":["handleChangeColor"]}]]],["p-12a4ae7e",[[1,"cura-calendar",{"period":[513],"width":[513],"minWidth":[513,"min-width"],"maxWidth":[513,"max-width"],"mode":[513],"dateFormat":[1537,"date-format"],"locale":[513],"type":[513],"disable":[16],"enable":[16],"defaultDate":[1537,"default-date"],"showToday":[516,"show-today"],"customDates":[16],"limitRange":[514,"limit-range"],"disablePassDates":[1540,"disable-pass-dates"],"disableFutureDates":[1540,"disable-future-dates"],"collapsed":[1540],"floating":[1540],"embedded":[1540],"selectLabelColorMode":[1537,"select-label-color-mode"],"selectedDates":[32],"rangeStart":[32],"defaultDates":[32],"currentDate":[32],"selectMonth":[32],"selectYear":[32],"styles":[32]},null,{"defaultDate":["initializeDefaultDates","handleDefaultDateChange"],"customDates":["watchDefaultDatesArray"]}]]],["p-20b05d8f",[[1,"cura-loader-bar",{"color":[1],"progress":[2],"styles":[32]},null,{"color":["handleChangeColor"],"progress":["handleProgress"]}]]],["p-7e10b146",[[1,"cura-badge-pill",{"type":[513],"color":[1],"iconName":[513,"icon-name"],"iconset":[513],"disabled":[516],"iconOnly":[516,"icon-only"],"borderRadius":[513,"border-radius"],"styles":[32]},null,{"color":["watchColorChange"]}]]],["p-137f003b",[[1,"cura-stepper-item",{"displayHeading":[516,"display-heading"],"heading":[513],"label":[513],"status":[513],"styles":[32]}],[1,"cura-progress-bar",{"progressColor":[513,"progress-color"],"progress":[514],"size":[514],"strokeWidth":[514,"stroke-width"],"active":[516]}]]]]'),e)}));
2
2
  //# sourceMappingURL=cura.esm.js.map
@@ -0,0 +1,2 @@
1
+ import{r as a,c as e,h as t,H as i}from"./p-4ee8efca.js";const s=":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}}";const o=s;const r=class{constructor(t){a(this,t);this.modalClose=e(this,"modalClose",7);this.handleCloseOnEsc=a=>{if(a.key!=="Escape"||!this.open){return}this.open=false;this.modalClose.emit()};this.handleClose=()=>{this.modalClose.emit();this.open=false};this.open=false;this.background="light";this.top=0;this.bottom=0;this.left=0;this.right=0;this.mobileCloseLabel="Fechar";this.zindex="100";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]})}setOffset(a,e){this.styles=Object.assign(Object.assign({},this.styles),{[`--${a}-offset`]:`${e}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 t(i,{key:"4ccdb55c36abada0f1a7c8f44b79603e3e3432cc",role:"dialog","aria-modal":"true",style:{"--zIndex":this.zindex}},t("div",{key:"1b7248b7549a903a7a9b08aa219f209e0f159d30",class:this.open?"modal container open":"modal container",style:this.styles},t("div",{key:"6977bffb5232d6e45d217bf2db4f61748daf7ccf",class:this.open?"modal backdrop open":"modal backdrop",onClick:this.handleClose}),t("div",{key:"71f7c2cf8c56d4f0fdf443209e0f5e96e285e36e",class:"wrapper"},t("div",{key:"80b99d594ee94b214318479e815194be75f3fea7",class:"close desktop"},t("cura-button-transparent",{key:"9abea3d67b08611313ee28b44bf6775a37b9ab79",iconName:"close",color:"error",size:"small",onClick:this.handleClose,iconOnly:true})),t("slot",{key:"85364906c3b59f2ac7b95cd316babff55de10a0f"}),t("div",{key:"a4106cee880560a7fdcb92b63f98feefbe8f283a",class:"close mobile",onClick:this.handleClose},t("cura-button-transparent",{key:"794ab5cfdece8aa94ff85d37655a83c9df7a854a",color:"error",iconName:"close",size:"small"},this.mobileCloseLabel)))))}static get watchers(){return{background:["setColors"],top:["setTop"],bottom:["setBottom"],left:["setLeft"],right:["setRight"]}}};r.style=o;export{r as cura_modal};
2
+ //# sourceMappingURL=p-1ef21ae9.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["curaModalCss","CuraModalStyle0","CuraModal","this","handleCloseOnEsc","evt","key","open","modalClose","emit","handleClose","setColors","backgroundTheme","dark","window","CuraAPI","theme","colors","getColor","light","styles","Object","assign","background","setOffset","name","value","setTop","top","setBottom","bottom","setLeft","left","setRight","right","connectedCallback","spacing","getSpacing","disconnectedCallback","removeEventListener","componentDidLoad","addEventListener","render","h","Host","role","style","zindex","class","onClick","iconName","color","size","iconOnly","mobileCloseLabel"],"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: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\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: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\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 padding: 0;\n margin-right: -8px;\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-mini} #{$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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAe,ypEACrB,MAAAC,EAAeD,E,MCMFE,EAAS,M,gEAwFpBC,KAAAC,iBAAoBC,IAClB,GAAIA,EAAIC,MAAQ,WAAaH,KAAKI,KAAM,CACtC,M,CAGFJ,KAAKI,KAAO,MACZJ,KAAKK,WAAWC,MAAM,EAiBhBN,KAAAO,YAAc,KACpBP,KAAKK,WAAWC,OAChBN,KAAKI,KAAO,KAAK,E,UA5GsC,M,gBAKjB,Q,SAKjB,E,YAKG,E,UAKF,E,WAKC,E,sBAK2B,S,YAKV,M,YAMxB,E,CAGlB,SAAAI,GACE,MAAMC,EAAkB,CACtBC,KAAMC,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,gBAAiB,IAC5DC,MAAOL,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,iBAAkB,KAGhEf,KAAKiB,OAAMC,OAAAC,OAAAD,OAAAC,OAAA,GACNnB,KAAKiB,QAAM,CACd,qBAAsBR,EAAgBT,KAAKoB,a,CAI/C,SAAAC,CAAUC,EAAcC,GACtBvB,KAAKiB,OAAMC,OAAAC,OAAAD,OAAAC,OAAA,GACNnB,KAAKiB,QAAM,CACd,CAAC,KAAKK,YAAgB,GAAGC,O,CAK7B,MAAAC,GACExB,KAAKqB,UAAU,MAAOrB,KAAKyB,I,CAI7B,SAAAC,GACE1B,KAAKqB,UAAU,SAAUrB,KAAK2B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AKmD,qB","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-21683715.js';
2
2
 
3
- const curaModalCss = ":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-white);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}}";
3
+ const curaModalCss = ":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}}";
4
4
  const CuraModalStyle0 = curaModalCss;
5
5
 
6
6
  const CuraModal = class {
@@ -51,7 +51,7 @@ const CuraModal = class {
51
51
  this.setOffset('right', this.right);
52
52
  }
53
53
  connectedCallback() {
54
- 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() });
54
+ 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() });
55
55
  this.setColors();
56
56
  this.setTop();
57
57
  this.setBottom();
@@ -65,7 +65,7 @@ const CuraModal = class {
65
65
  window.addEventListener('keydown', this.handleCloseOnEsc);
66
66
  }
67
67
  render() {
68
- return (h(Host, { key: 'e61daa046292367d64aeaaf82e8cdd223b2f7dc5', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, h("div", { key: 'f2b9cd2b8a3790c0fcab87343ea8a425bb76c264', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: '3cf96f5a6a316c0a5df6abaf224d518a6a0a2934', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: 'f297ec70cf7ef9a71d4620339ba364e71e4337f8', class: "wrapper" }, h("div", { key: 'd4a2151cd5be6877ff1be66f263c83941b604d5f', class: "close desktop" }, h("cura-button-transparent", { key: '27bbb629ac2988b98dfcbccdc72f08b2de70c9bc', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), h("slot", { key: 'f5e5b7931668446fb796184ede3796dfacdd38ef' }), h("div", { key: '014df19d65e3db1420f9e8dc33e56fb3aed8a1cf', class: "close mobile", onClick: this.handleClose }, h("cura-button-transparent", { key: '0fa3373474539e8220c41ba0fefb276e30f86315', color: "error", iconName: "close", size: "small" }, "Fechar"))))));
68
+ return (h(Host, { key: '4ccdb55c36abada0f1a7c8f44b79603e3e3432cc', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, h("div", { key: '1b7248b7549a903a7a9b08aa219f209e0f159d30', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: '6977bffb5232d6e45d217bf2db4f61748daf7ccf', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: '71f7c2cf8c56d4f0fdf443209e0f5e96e285e36e', class: "wrapper" }, h("div", { key: '80b99d594ee94b214318479e815194be75f3fea7', class: "close desktop" }, h("cura-button-transparent", { key: '9abea3d67b08611313ee28b44bf6775a37b9ab79', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true })), h("slot", { key: '85364906c3b59f2ac7b95cd316babff55de10a0f' }), h("div", { key: 'a4106cee880560a7fdcb92b63f98feefbe8f283a', class: "close mobile", onClick: this.handleClose }, h("cura-button-transparent", { key: '794ab5cfdece8aa94ff85d37655a83c9df7a854a', color: "error", iconName: "close", size: "small" }, this.mobileCloseLabel))))));
69
69
  }
70
70
  static get watchers() { return {
71
71
  "background": ["setColors"],
@@ -1 +1 @@
1
- {"file":"cura-modal.entry.js","mappings":";;AAAA,MAAM,YAAY,GAAG,opEAAopE,CAAC;AAC1qE,wBAAe,YAAY;;MCMd,SAAS;;;;QAwFpB,qBAAgB,GAAG,CAAC,GAAkB;YACpC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACt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AAC,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,SACiB,CACvB,EACN,8DAAa,EAEb,4DAAK,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACjD,gFAAyB,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,aAAiC,CACjG,CACF,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: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\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: calc(var(--zIndex) - 10);\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 max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\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 padding: 0;\n margin-right: -8px;\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-mini} #{$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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return\n }\n\n this.open = false\n this.modalClose.emit()\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.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc)\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc)\n }\n\n render() {\n return (\n <Host role=\"dialog\"\n aria-modal=\"true\"\n style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent\n iconName=\"close\"\n color=\"error\"\n size=\"small\"\n onClick={this.handleClose}\n iconOnly\n ></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">Fechar</cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"cura-modal.entry.js","mappings":";;AAAA,MAAM,YAAY,GAAG,wpEAAwpE,CAAC;AAC9qE,wBAAe,YAAY;;MCMd,SAAS;;;;QAwFpB,qBAAgB,GAAG,CAAC,GAAkB;YACpC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACtC,OAAO;aACR;YAED,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;SACxB,CAAC;QAgBM,gBAAW,GAAG;YACpB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;SACnB,CAAC;oBA7GuD,KAAK;0BAKtB,OAAO;mBAKxB,CAAC;sBAKE,CAAC;oBAKH,CAAC;qBAKA,CAAC;gCAK0B,QAAQ;sBAKlB,KAAK;sBAM7B,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,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BAAgB,CAAC,CAAC;KAC3D;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,IAAI,EAAC,QAAQ,gBAAY,MAAM,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,IACtE,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,4DAAK,KAAK,EAAC,eAAe,IACxB,gFAAyB,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,SAA2B,CAC/H,EACN,8DAAa,EAEb,4DAAK,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACjD,gFAAyB,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,IACjE,IAAI,CAAC,gBAAgB,CACE,CACtB,CACF,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: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\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: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\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 padding: 0;\n margin-right: -8px;\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-mini} #{$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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rededor/cura",
3
- "version": "1.6.1-alpha.10",
3
+ "version": "1.6.1-alpha.11",
4
4
  "description": "Cura Design System",
5
5
  "author": "Rede D`Or São Luiz",
6
6
  "license": "MIT",
@@ -55,5 +55,5 @@
55
55
  "storybook": "^7.6.10",
56
56
  "svgo": "^3.3.2"
57
57
  },
58
- "gitHead": "60733f28bd66ef180bf5d6c9504e25946b658a2f"
58
+ "gitHead": "2122c28aef9a4e24ba300ef10fb935ec1676a838"
59
59
  }
@@ -1,2 +0,0 @@
1
- import{r as a,c as e,h as t,H as i}from"./p-4ee8efca.js";const s=":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-white);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}}";const o=s;const c=class{constructor(t){a(this,t);this.modalClose=e(this,"modalClose",7);this.handleCloseOnEsc=a=>{if(a.key!=="Escape"||!this.open){return}this.open=false;this.modalClose.emit()};this.handleClose=()=>{this.modalClose.emit();this.open=false};this.open=false;this.background="light";this.top=0;this.bottom=0;this.left=0;this.right=0;this.mobileCloseLabel="Fechar";this.zindex="100";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]})}setOffset(a,e){this.styles=Object.assign(Object.assign({},this.styles),{[`--${a}-offset`]:`${e}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-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.setTop();this.setBottom();this.setLeft();this.setRight()}disconnectedCallback(){window.removeEventListener("keydown",this.handleCloseOnEsc)}componentDidLoad(){window.addEventListener("keydown",this.handleCloseOnEsc)}render(){return t(i,{key:"e61daa046292367d64aeaaf82e8cdd223b2f7dc5",role:"dialog","aria-modal":"true",style:{"--zIndex":this.zindex}},t("div",{key:"f2b9cd2b8a3790c0fcab87343ea8a425bb76c264",class:this.open?"modal container open":"modal container",style:this.styles},t("div",{key:"3cf96f5a6a316c0a5df6abaf224d518a6a0a2934",class:this.open?"modal backdrop open":"modal backdrop",onClick:this.handleClose}),t("div",{key:"f297ec70cf7ef9a71d4620339ba364e71e4337f8",class:"wrapper"},t("div",{key:"d4a2151cd5be6877ff1be66f263c83941b604d5f",class:"close desktop"},t("cura-button-transparent",{key:"27bbb629ac2988b98dfcbccdc72f08b2de70c9bc",iconName:"close",color:"error",size:"small",onClick:this.handleClose,iconOnly:true})),t("slot",{key:"f5e5b7931668446fb796184ede3796dfacdd38ef"}),t("div",{key:"014df19d65e3db1420f9e8dc33e56fb3aed8a1cf",class:"close mobile",onClick:this.handleClose},t("cura-button-transparent",{key:"0fa3373474539e8220c41ba0fefb276e30f86315",color:"error",iconName:"close",size:"small"},"Fechar")))))}static get watchers(){return{background:["setColors"],top:["setTop"],bottom:["setBottom"],left:["setLeft"],right:["setRight"]}}};c.style=o;export{c as cura_modal};
2
- //# sourceMappingURL=p-9fce5ec5.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["curaModalCss","CuraModalStyle0","CuraModal","this","handleCloseOnEsc","evt","key","open","modalClose","emit","handleClose","setColors","backgroundTheme","dark","window","CuraAPI","theme","colors","getColor","light","styles","Object","assign","background","setOffset","name","value","setTop","top","setBottom","bottom","setLeft","left","setRight","right","connectedCallback","spacing","getSpacing","disconnectedCallback","removeEventListener","componentDidLoad","addEventListener","render","h","Host","role","style","zindex","class","onClick","iconName","color","size","iconOnly"],"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: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\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: calc(var(--zIndex) - 10);\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 max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\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 padding: 0;\n margin-right: -8px;\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-mini} #{$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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return\n }\n\n this.open = false\n this.modalClose.emit()\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.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc)\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc)\n }\n\n render() {\n return (\n <Host role=\"dialog\"\n aria-modal=\"true\"\n style={{ '--zIndex': this.zindex }}>\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 <div class=\"close desktop\">\n <cura-button-transparent\n iconName=\"close\"\n color=\"error\"\n size=\"small\"\n onClick={this.handleClose}\n iconOnly\n ></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">Fechar</cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAe,qpEACrB,MAAAC,EAAeD,E,MCMFE,EAAS,M,gEAwFpBC,KAAAC,iBAAoBC,IAClB,GAAIA,EAAIC,MAAQ,WAAaH,KAAKI,KAAM,CACtC,M,CAGFJ,KAAKI,KAAO,MACZJ,KAAKK,WAAWC,MAAM,EAiBhBN,KAAAO,YAAc,KACpBP,KAAKK,WAAWC,OAChBN,KAAKI,KAAO,KAAK,E,UA5GsC,M,gBAKjB,Q,SAKjB,E,YAKG,E,UAKF,E,WAKC,E,sBAK2B,S,YAKV,M,YAMxB,E,CAGlB,SAAAI,GACE,MAAMC,EAAkB,CACtBC,KAAMC,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,gBAAiB,IAC5DC,MAAOL,OAAOC,QAAQC,MAAMC,OAAOC,SAAS,iBAAkB,KAGhEf,KAAKiB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