@rededor/cura 2.0.0-alpha.4 → 2.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/cjs/cura-accordion_21.cjs.entry.js +69 -179
  2. package/dist/cjs/cura-accordion_21.cjs.entry.js.map +1 -1
  3. package/dist/cjs/cura-alert.cjs.entry.js +4 -3
  4. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
  5. package/dist/cjs/cura-alert.entry.cjs.js.map +1 -1
  6. package/dist/cjs/index-BK9MSAiE.js.map +1 -1
  7. package/dist/collection/components/cura-alert/cura-alert.js +4 -3
  8. package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
  9. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
  10. package/dist/components/cura-alert.js +4 -3
  11. package/dist/components/cura-alert.js.map +1 -1
  12. package/dist/components/cura-calendar.js +1 -1
  13. package/dist/components/cura-input-date.js +2 -2
  14. package/dist/components/cura-select.js +1 -1
  15. package/dist/components/{p-CvdWbsfO.js → p-Cs5scX1L.js} +71 -181
  16. package/dist/components/p-Cs5scX1L.js.map +1 -0
  17. package/dist/components/p-D1cPOZpG.js.map +1 -1
  18. package/dist/components/{p-DETZu2ie.js → p-D6PpdPRJ.js} +3 -3
  19. package/dist/components/{p-DETZu2ie.js.map → p-D6PpdPRJ.js.map} +1 -1
  20. package/dist/cura/cura-alert.entry.esm.js.map +1 -1
  21. package/dist/cura/cura.esm.js +1 -1
  22. package/dist/cura/{p-2ab58335.entry.js → p-6dfc7c02.entry.js} +2 -2
  23. package/dist/cura/p-6dfc7c02.entry.js.map +1 -0
  24. package/dist/cura/p-PPMZr_VE.js.map +1 -1
  25. package/dist/cura/p-bdfe9af2.entry.js +2 -0
  26. package/dist/cura/p-bdfe9af2.entry.js.map +1 -0
  27. package/dist/esm/cura-accordion_21.entry.js +69 -179
  28. package/dist/esm/cura-accordion_21.entry.js.map +1 -1
  29. package/dist/esm/cura-alert.entry.js +4 -3
  30. package/dist/esm/cura-alert.entry.js.map +1 -1
  31. package/dist/esm/index-OdKytJIH.js.map +1 -1
  32. package/package.json +2 -2
  33. package/dist/components/p-CvdWbsfO.js.map +0 -1
  34. package/dist/cura/p-2ab58335.entry.js.map +0 -1
  35. package/dist/cura/p-6feba852.entry.js +0 -2
  36. package/dist/cura/p-6feba852.entry.js.map +0 -1
@@ -25,10 +25,11 @@ const CuraAlert = class {
25
25
  { name: '--color-light', theme: `${this.type}-light` },
26
26
  { name: '--color-base', theme: `${this.type}-base` },
27
27
  ];
28
+ const updatedStyles = Object.assign({}, this.styles);
28
29
  colors.forEach(color => {
29
- this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);
30
+ updatedStyles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);
30
31
  });
31
- this.styles = Object.assign({}, this.styles);
32
+ this.styles = updatedStyles;
32
33
  }
33
34
  connectedCallback() {
34
35
  this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
@@ -50,7 +51,7 @@ const CuraAlert = class {
50
51
  return this.icon ? this.icon : iconMapping[this.type];
51
52
  }
52
53
  render() {
53
- return (index.h(index.Host, { key: '2bb12a2c1f982aa328da2ba9fd80434459651735', role: "alert", "aria-live": "polite", "aria-atomic": "true", "aria-label": this.label }, index.h("div", { key: 'c3103080439a2d15dc530fd4d3e1945937da302a', class: this.getClasses(), style: this.styles }, index.h("cura-icon", { key: '0465d437885134eefdc41cdfe74a43a83f9e5265', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), index.h("div", { key: '15c7545a76db2032e6ee20b8f27b90199cc95020', class: "content" }, this.label ? (index.h("cura-heading", { class: "title", size: "xsmall", color: "neutral-black", weight: "bold", "margin-block": "1px 0" }, this.label)) : '', index.h("cura-paragraph", { key: 'af74fc113ffdca4cf4ce4f52133ab1ecfb94f002', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, index.h("slot", { key: '5979eac43e2729097ec8d47c1f1b58a5834e4b02' })), index.h("slot", { key: 'c74a0bf68cb024a04c36392c6c3a2303bdd8e842', name: "actions" })), this.closeable ?
54
+ return (index.h(index.Host, { key: 'f64ddb202b9436f9bebd4316979ffc1ad8d2c711', role: "alert", "aria-live": "polite", "aria-atomic": "true", "aria-label": this.label }, index.h("div", { key: 'c1320f2a8007169776bf1d8b59301c9e070d97f3', class: this.getClasses(), style: this.styles }, index.h("cura-icon", { key: '18b352ca24b9904624e10beadc8ef2a214ef3ee4', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), index.h("div", { key: '4f025525470856227ff65b36c27c8dcffc73be99', class: "content" }, this.label ? (index.h("cura-heading", { class: "title", size: "xsmall", color: "neutral-black", weight: "bold", "margin-block": "1px 0" }, this.label)) : '', index.h("cura-paragraph", { key: 'b1dcbf2fc75c387a8e30b255b94a3439d6443548', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, index.h("slot", { key: 'd4473ba49462f93fe5b4c5b2729ca018c7cc322c' })), index.h("slot", { key: '2d3d5e549a600424c13ae2642845af40fb3c0894', name: "actions" })), this.closeable ?
54
55
  (index.h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
55
56
  : '')));
56
57
  }
@@ -1 +1 @@
1
- {"file":"cura-alert.entry.cjs.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,8eAA8e;;MCMtf,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAQU,QAAA,IAAI,CAAA,IAAA,GAA6C,MAAM;AACtC,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAEhB,QAAA,IAAS,CAAA,SAAA,GAAG,IAAI;AAGhC,QAAA,IAAM,CAAA,MAAA,GAAG,EAAE;AAyCpB,QAAA,IAAW,CAAA,WAAA,GAAG,MAAK;AACjB,YAAA,IAAI,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AA,CAAS,EAAE,IAAI,EAAC,QAAQ,EAAC,WAAW,EAAC,GAAG,EAAC,UAAU,EAAC,SAAS,EAAA,EAC3GA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACE,EACjBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAQ,CACxB,EACJ,IAAI,CAAC,SAAS;AAChB,aAACA,OAAA,CAAA,WAAA,EAAA,EAAW,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAA,CAAc;AAChH,cAAE,EAAE,CACA,CACD;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/cura-alert/cura-alert.scss?tag=cura-alert&encapsulation=shadow","src/components/cura-alert/cura-alert.tsx"],"sourcesContent":["@import \"../../scss/mixins/spacing.scss\";\n\n:host {\n display: block;\n box-sizing: border-box;\n\n .conteiner {\n display: flex;\n box-sizing: border-box;\n padding: #{$spacing-xxxs};\n gap: #{$spacing-xxxs};\n flex-shrink: 0;\n border: 1px solid var(--color-base);\n border-radius: 4px;\n background-color: var(--color-lighter);\n &.floating {\n box-shadow: 0px 4px 8px 0px rgba(38, 38, 38, 0.16);\n }\n }\n\n .content {\n flex: 1;\n flex-direction: column;\n display: flex;\n gap: #{$spacing-tiny};\n }\n\n .icon-right {\n cursor: pointer;\n }\n\n}\n","import { Component, Element, Prop, Host, h, State, Watch, Event, EventEmitter } from '@stencil/core';\n@Component({\n tag: 'cura-alert',\n styleUrl: 'cura-alert.scss',\n shadow: true,\n})\nexport class CuraAlert {\n @Element() host: HTMLElement;\n\n @Prop() type: 'info' | 'success' | 'warning' | 'error' = 'info';\n @Prop({ reflect: true }) floating = false;\n @Prop({ reflect: true }) label: string;\n @Prop({ reflect: true }) closeable = true;\n @Prop({ reflect: true }) icon: string;\n\n @State() styles = {};\n\n @Event({ eventName: 'close' }) close: EventEmitter<void>;\n\n @Watch('type')\n setColors() {\n const colors = [\n { name: '--color-lighter', theme: `${this.type}-lighter` },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--color-light', theme: `${this.type}-light` },\n { name: '--color-base', theme: `${this.type}-base` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);\n });\n this.styles = {...this.styles};\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes['conteiner'] = true;\n classes['floating'] = this.floating;\n return classes;\n }\n\n getNameIcon() {\n const iconMapping = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon ? this.icon : iconMapping[this.type];\n }\n\n handleClose = () => {\n this.close.emit();\n this.host.remove();\n };\n\n render() {\n return (\n <Host role=\"alert\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-label={this.label}>\n <div class={this.getClasses()} style={this.styles}>\n <cura-icon name={this.getNameIcon()} class=\"icon-left\" size={16} color={`${this.type}-dark`}></cura-icon>\n <div class=\"content\">\n { this.label ? (\n <cura-heading class=\"title\" size=\"xsmall\" color=\"neutral-black\" weight=\"bold\" margin-block=\"1px 0\">\n {this.label}\n </cura-heading>\n ) : ''}\n <cura-paragraph class=\"text\" color={`${this.type}-darker`} size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <slot></slot>\n </cura-paragraph>\n <slot name=\"actions\"></slot>\n </div>\n { this.closeable ?\n (<cura-icon name=\"close\" size={16} color=\"error-dark\" class=\"icon-right\" onClick={this.handleClose}></cura-icon>)\n : '' }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"cura-alert.entry.cjs.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,8eAA8e;;MCMtf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,CAAA,cAAA,EAAA,EAAc,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,eAAe,EAAC,MAAM,EAAC,MAAM,kBAAc,OAAO,EAAA,EAC/F,IAAI,CAAC,KAAK,CACE,IACX,EAAE,EACNA,OAAgB,CAAA,gBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,CAAG,EAAA,IAAI,CAAC,IAAI,CAAA,OAAA,CAAS,EAAE,IAAI,EAAC,QAAQ,EAAC,WAAW,EAAC,GAAG,EAAC,UAAU,EAAC,SAAS,EAAA,EAC3GA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACE,EACjBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAQ,CACxB,EACJ,IAAI,CAAC,SAAS;AAChB,aAACA,OAAA,CAAA,WAAA,EAAA,EAAW,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAA,CAAc;AAChH,cAAE,EAAE,CACA,CACD;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/cura-alert/cura-alert.scss?tag=cura-alert&encapsulation=shadow","src/components/cura-alert/cura-alert.tsx"],"sourcesContent":["@import \"../../scss/mixins/spacing.scss\";\n\n:host {\n display: block;\n box-sizing: border-box;\n\n .conteiner {\n display: flex;\n box-sizing: border-box;\n padding: #{$spacing-xxxs};\n gap: #{$spacing-xxxs};\n flex-shrink: 0;\n border: 1px solid var(--color-base);\n border-radius: 4px;\n background-color: var(--color-lighter);\n &.floating {\n box-shadow: 0px 4px 8px 0px rgba(38, 38, 38, 0.16);\n }\n }\n\n .content {\n flex: 1;\n flex-direction: column;\n display: flex;\n gap: #{$spacing-tiny};\n }\n\n .icon-right {\n cursor: pointer;\n }\n\n}\n","import { Component, Element, Prop, Host, h, State, Watch, Event, EventEmitter } from '@stencil/core';\n@Component({\n tag: 'cura-alert',\n styleUrl: 'cura-alert.scss',\n shadow: true,\n})\nexport class CuraAlert {\n @Element() host: HTMLElement;\n\n @Prop() type: 'info' | 'success' | 'warning' | 'error' = 'info';\n @Prop({ reflect: true }) floating = false;\n @Prop({ reflect: true }) label: string;\n @Prop({ reflect: true }) closeable = true;\n @Prop({ reflect: true }) icon: string;\n\n @State() styles = {};\n\n @Event({ eventName: 'close' }) close: EventEmitter<void>;\n\n @Watch('type')\n setColors() {\n const colors = [\n { name: '--color-lighter', theme: `${this.type}-lighter` },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--color-light', theme: `${this.type}-light` },\n { name: '--color-base', theme: `${this.type}-base` },\n ];\n\n const updatedStyles = {\n ...this.styles\n }\n\n colors.forEach(color => {\n updatedStyles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);\n });\n \n this.styles = updatedStyles;\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes['conteiner'] = true;\n classes['floating'] = this.floating;\n return classes;\n }\n\n getNameIcon() {\n const iconMapping = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon ? this.icon : iconMapping[this.type];\n }\n\n handleClose = () => {\n this.close.emit();\n this.host.remove();\n };\n\n render() {\n return (\n <Host role=\"alert\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-label={this.label}>\n <div class={this.getClasses()} style={this.styles}>\n <cura-icon name={this.getNameIcon()} class=\"icon-left\" size={16} color={`${this.type}-dark`}></cura-icon>\n <div class=\"content\">\n { this.label ? (\n <cura-heading class=\"title\" size=\"xsmall\" color=\"neutral-black\" weight=\"bold\" margin-block=\"1px 0\">\n {this.label}\n </cura-heading>\n ) : ''}\n <cura-paragraph class=\"text\" color={`${this.type}-darker`} size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <slot></slot>\n </cura-paragraph>\n <slot name=\"actions\"></slot>\n </div>\n { this.closeable ?\n (<cura-icon name=\"close\" size={16} color=\"error-dark\" class=\"icon-right\" onClick={this.handleClose}></cura-icon>)\n : '' }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"version":3,"file":"cura-alert.entry.cjs.js","sources":["src/components/cura-alert/cura-alert.scss?tag=cura-alert&encapsulation=shadow","src/components/cura-alert/cura-alert.tsx"],"sourcesContent":["@import \"../../scss/mixins/spacing.scss\";\n\n:host {\n display: block;\n box-sizing: border-box;\n\n .conteiner {\n display: flex;\n box-sizing: border-box;\n padding: #{$spacing-xxxs};\n gap: #{$spacing-xxxs};\n flex-shrink: 0;\n border: 1px solid var(--color-base);\n border-radius: 4px;\n background-color: var(--color-lighter);\n &.floating {\n box-shadow: 0px 4px 8px 0px rgba(38, 38, 38, 0.16);\n }\n }\n\n .content {\n flex: 1;\n flex-direction: column;\n display: flex;\n gap: #{$spacing-tiny};\n }\n\n .icon-right {\n cursor: pointer;\n }\n\n}\n","import { Component, Element, Prop, Host, h, State, Watch, Event, EventEmitter } from '@stencil/core';\n@Component({\n tag: 'cura-alert',\n styleUrl: 'cura-alert.scss',\n shadow: true,\n})\nexport class CuraAlert {\n @Element() host: HTMLElement;\n\n @Prop() type: 'info' | 'success' | 'warning' | 'error' = 'info';\n @Prop({ reflect: true }) floating = false;\n @Prop({ reflect: true }) label: string;\n @Prop({ reflect: true }) closeable = true;\n @Prop({ reflect: true }) icon: string;\n\n @State() styles = {};\n\n @Event({ eventName: 'close' }) close: EventEmitter<void>;\n\n @Watch('type')\n setColors() {\n const colors = [\n { name: '--color-lighter', theme: `${this.type}-lighter` },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--color-light', theme: `${this.type}-light` },\n { name: '--color-base', theme: `${this.type}-base` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);\n });\n this.styles = {...this.styles};\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes['conteiner'] = true;\n classes['floating'] = this.floating;\n return classes;\n }\n\n getNameIcon() {\n const iconMapping = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon ? this.icon : iconMapping[this.type];\n }\n\n handleClose = () => {\n this.close.emit();\n this.host.remove();\n };\n\n render() {\n return (\n <Host role=\"alert\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-label={this.label}>\n <div class={this.getClasses()} style={this.styles}>\n <cura-icon name={this.getNameIcon()} class=\"icon-left\" size={16} color={`${this.type}-dark`}></cura-icon>\n <div class=\"content\">\n { this.label ? (\n <cura-heading class=\"title\" size=\"xsmall\" color=\"neutral-black\" weight=\"bold\" margin-block=\"1px 0\">\n {this.label}\n </cura-heading>\n ) : ''}\n <cura-paragraph class=\"text\" color={`${this.type}-darker`} size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <slot></slot>\n </cura-paragraph>\n <slot name=\"actions\"></slot>\n </div>\n { this.closeable ?\n (<cura-icon name=\"close\" size={16} color=\"error-dark\" class=\"icon-right\" onClick={this.handleClose}></cura-icon>)\n : '' }\n </div>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;;AAAA,MAAM,YAAY,GAAG,8eAA8e;;MCMtf,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAQU,QAAA,IAAI,CAAA,IAAA,GAA6C,MAAM;AACtC,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAEhB,QAAA,IAAS,CAAA,SAAA,GAAG,IAAI;AAGhC,QAAA,IAAM,CAAA,MAAA,GAAG,E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AAC,MAAM,EAAC,KAAK,EAAE,CAAG,EAAA,IAAI,CAAC,IAAI,CAAA,OAAA,CAAS,EAAE,IAAI,EAAC,QAAQ,EAAC,WAAW,EAAC,GAAG,EAAC,UAAU,EAAC,SAAS,EAAA,EAC3GA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACE,EACjBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAQ,CACxB,EACJ,IAAI,CAAC,SAAS;AAChB,aAACA,OAAA,CAAA,WAAA,EAAA,EAAW,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAA,CAAc;AAChH,cAAE,EAAE,CACA,CACD;;;;;;;;;;;"}
1
+ {"version":3,"file":"cura-alert.entry.cjs.js","sources":["src/components/cura-alert/cura-alert.scss?tag=cura-alert&encapsulation=shadow","src/components/cura-alert/cura-alert.tsx"],"sourcesContent":["@import \"../../scss/mixins/spacing.scss\";\n\n:host {\n display: block;\n box-sizing: border-box;\n\n .conteiner {\n display: flex;\n box-sizing: border-box;\n padding: #{$spacing-xxxs};\n gap: #{$spacing-xxxs};\n flex-shrink: 0;\n border: 1px solid var(--color-base);\n border-radius: 4px;\n background-color: var(--color-lighter);\n &.floating {\n box-shadow: 0px 4px 8px 0px rgba(38, 38, 38, 0.16);\n }\n }\n\n .content {\n flex: 1;\n flex-direction: column;\n display: flex;\n gap: #{$spacing-tiny};\n }\n\n .icon-right {\n cursor: pointer;\n }\n\n}\n","import { Component, Element, Prop, Host, h, State, Watch, Event, EventEmitter } from '@stencil/core';\n@Component({\n tag: 'cura-alert',\n styleUrl: 'cura-alert.scss',\n shadow: true,\n})\nexport class CuraAlert {\n @Element() host: HTMLElement;\n\n @Prop() type: 'info' | 'success' | 'warning' | 'error' = 'info';\n @Prop({ reflect: true }) floating = false;\n @Prop({ reflect: true }) label: string;\n @Prop({ reflect: true }) closeable = true;\n @Prop({ reflect: true }) icon: string;\n\n @State() styles = {};\n\n @Event({ eventName: 'close' }) close: EventEmitter<void>;\n\n @Watch('type')\n setColors() {\n const colors = [\n { name: '--color-lighter', theme: `${this.type}-lighter` },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--color-light', theme: `${this.type}-light` },\n { name: '--color-base', theme: `${this.type}-base` },\n ];\n\n const updatedStyles = {\n ...this.styles\n }\n\n colors.forEach(color => {\n updatedStyles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);\n });\n \n this.styles = updatedStyles;\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes['conteiner'] = true;\n classes['floating'] = this.floating;\n return classes;\n }\n\n getNameIcon() {\n const iconMapping = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon ? this.icon : iconMapping[this.type];\n }\n\n handleClose = () => {\n this.close.emit();\n this.host.remove();\n };\n\n render() {\n return (\n <Host role=\"alert\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-label={this.label}>\n <div class={this.getClasses()} style={this.styles}>\n <cura-icon name={this.getNameIcon()} class=\"icon-left\" size={16} color={`${this.type}-dark`}></cura-icon>\n <div class=\"content\">\n { this.label ? (\n <cura-heading class=\"title\" size=\"xsmall\" color=\"neutral-black\" weight=\"bold\" margin-block=\"1px 0\">\n {this.label}\n </cura-heading>\n ) : ''}\n <cura-paragraph class=\"text\" color={`${this.type}-darker`} size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <slot></slot>\n </cura-paragraph>\n <slot name=\"actions\"></slot>\n </div>\n { this.closeable ?\n (<cura-icon name=\"close\" size={16} color=\"error-dark\" class=\"icon-right\" onClick={this.handleClose}></cura-ic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