@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.
- package/dist/cjs/cura-accordion_21.cjs.entry.js +69 -179
- package/dist/cjs/cura-accordion_21.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js +4 -3
- package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.entry.cjs.js.map +1 -1
- package/dist/cjs/index-BK9MSAiE.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js +4 -3
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
- package/dist/components/cura-alert.js +4 -3
- package/dist/components/cura-alert.js.map +1 -1
- package/dist/components/cura-calendar.js +1 -1
- package/dist/components/cura-input-date.js +2 -2
- package/dist/components/cura-select.js +1 -1
- package/dist/components/{p-CvdWbsfO.js → p-Cs5scX1L.js} +71 -181
- package/dist/components/p-Cs5scX1L.js.map +1 -0
- package/dist/components/p-D1cPOZpG.js.map +1 -1
- package/dist/components/{p-DETZu2ie.js → p-D6PpdPRJ.js} +3 -3
- package/dist/components/{p-DETZu2ie.js.map → p-D6PpdPRJ.js.map} +1 -1
- package/dist/cura/cura-alert.entry.esm.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/{p-2ab58335.entry.js → p-6dfc7c02.entry.js} +2 -2
- package/dist/cura/p-6dfc7c02.entry.js.map +1 -0
- package/dist/cura/p-PPMZr_VE.js.map +1 -1
- package/dist/cura/p-bdfe9af2.entry.js +2 -0
- package/dist/cura/p-bdfe9af2.entry.js.map +1 -0
- package/dist/esm/cura-accordion_21.entry.js +69 -179
- package/dist/esm/cura-accordion_21.entry.js.map +1 -1
- package/dist/esm/cura-alert.entry.js +4 -3
- package/dist/esm/cura-alert.entry.js.map +1 -1
- package/dist/esm/index-OdKytJIH.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/p-CvdWbsfO.js.map +0 -1
- package/dist/cura/p-2ab58335.entry.js.map +0 -1
- package/dist/cura/p-6feba852.entry.js +0 -2
- package/dist/cura/p-6feba852.entry.js.map +0 -1
|
@@ -17,10 +17,11 @@ export class CuraAlert {
|
|
|
17
17
|
{ name: '--color-light', theme: `${this.type}-light` },
|
|
18
18
|
{ name: '--color-base', theme: `${this.type}-base` },
|
|
19
19
|
];
|
|
20
|
+
const updatedStyles = Object.assign({}, this.styles);
|
|
20
21
|
colors.forEach(color => {
|
|
21
|
-
|
|
22
|
+
updatedStyles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);
|
|
22
23
|
});
|
|
23
|
-
this.styles =
|
|
24
|
+
this.styles = updatedStyles;
|
|
24
25
|
}
|
|
25
26
|
connectedCallback() {
|
|
26
27
|
this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
|
|
@@ -42,7 +43,7 @@ export class CuraAlert {
|
|
|
42
43
|
return this.icon ? this.icon : iconMapping[this.type];
|
|
43
44
|
}
|
|
44
45
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: 'f64ddb202b9436f9bebd4316979ffc1ad8d2c711', role: "alert", "aria-live": "polite", "aria-atomic": "true", "aria-label": this.label }, h("div", { key: 'c1320f2a8007169776bf1d8b59301c9e070d97f3', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: '18b352ca24b9904624e10beadc8ef2a214ef3ee4', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), h("div", { key: '4f025525470856227ff65b36c27c8dcffc73be99', class: "content" }, this.label ? (h("cura-heading", { class: "title", size: "xsmall", color: "neutral-black", weight: "bold", "margin-block": "1px 0" }, this.label)) : '', h("cura-paragraph", { key: 'b1dcbf2fc75c387a8e30b255b94a3439d6443548', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: 'd4473ba49462f93fe5b4c5b2729ca018c7cc322c' })), h("slot", { key: '2d3d5e549a600424c13ae2642845af40fb3c0894', name: "actions" })), this.closeable ?
|
|
46
47
|
(h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
|
|
47
48
|
: '')));
|
|
48
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-alert.js","sourceRoot":"","sources":["../../../src/components/cura-alert/cura-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAMrG,MAAM,OAAO,SAAS;IALtB;QAQU,SAAI,GAA6C,MAAM,CAAC;QACvC,aAAQ,GAAG,KAAK,CAAC;QAEjB,cAAS,GAAG,IAAI,CAAC;QAGjC,WAAM,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"cura-alert.js","sourceRoot":"","sources":["../../../src/components/cura-alert/cura-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAMrG,MAAM,OAAO,SAAS;IALtB;QAQU,SAAI,GAA6C,MAAM,CAAC;QACvC,aAAQ,GAAG,KAAK,CAAC;QAEjB,cAAS,GAAG,IAAI,CAAC;QAGjC,WAAM,GAAG,EAAE,CAAC;QA8CrB,gBAAW,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACrB,CAAC,CAAC;KA4BH;IAxEC,SAAS;QACP,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,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;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -647,7 +647,7 @@ export class CuraInputText {
|
|
|
647
647
|
"references": {
|
|
648
648
|
"MaskPreset": {
|
|
649
649
|
"location": "local",
|
|
650
|
-
"path": "/
|
|
650
|
+
"path": "/home/marcus/Documentos/www/rededor/web/cura/packages/component-lib/src/components/forms/cura-input-text/cura-input-text.tsx",
|
|
651
651
|
"id": "src/components/forms/cura-input-text/cura-input-text.tsx::MaskPreset"
|
|
652
652
|
}
|
|
653
653
|
}
|
|
@@ -27,10 +27,11 @@ const CuraAlert$1 = /*@__PURE__*/ proxyCustomElement(class CuraAlert extends H {
|
|
|
27
27
|
{ name: '--color-light', theme: `${this.type}-light` },
|
|
28
28
|
{ name: '--color-base', theme: `${this.type}-base` },
|
|
29
29
|
];
|
|
30
|
+
const updatedStyles = Object.assign({}, this.styles);
|
|
30
31
|
colors.forEach(color => {
|
|
31
|
-
|
|
32
|
+
updatedStyles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);
|
|
32
33
|
});
|
|
33
|
-
this.styles =
|
|
34
|
+
this.styles = updatedStyles;
|
|
34
35
|
}
|
|
35
36
|
connectedCallback() {
|
|
36
37
|
this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
|
|
@@ -52,7 +53,7 @@ const CuraAlert$1 = /*@__PURE__*/ proxyCustomElement(class CuraAlert extends H {
|
|
|
52
53
|
return this.icon ? this.icon : iconMapping[this.type];
|
|
53
54
|
}
|
|
54
55
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: 'f64ddb202b9436f9bebd4316979ffc1ad8d2c711', role: "alert", "aria-live": "polite", "aria-atomic": "true", "aria-label": this.label }, h("div", { key: 'c1320f2a8007169776bf1d8b59301c9e070d97f3', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: '18b352ca24b9904624e10beadc8ef2a214ef3ee4', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), h("div", { key: '4f025525470856227ff65b36c27c8dcffc73be99', class: "content" }, this.label ? (h("cura-heading", { class: "title", size: "xsmall", color: "neutral-black", weight: "bold", "margin-block": "1px 0" }, this.label)) : '', h("cura-paragraph", { key: 'b1dcbf2fc75c387a8e30b255b94a3439d6443548', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: 'd4473ba49462f93fe5b4c5b2729ca018c7cc322c' })), h("slot", { key: '2d3d5e549a600424c13ae2642845af40fb3c0894', name: "actions" })), this.closeable ?
|
|
56
57
|
(h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
|
|
57
58
|
: '')));
|
|
58
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-alert.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,8eAA8e;;MCMtfA,WAAS,iBAAAC,kBAAA,CAAA,MAAA,SAAA,SAAAC,CAAA,CAAA;AALtB,IAAA,WAAA,GAAA;;;;;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;
|
|
1
|
+
{"file":"cura-alert.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,8eAA8e;;MCMtfA,WAAS,iBAAAC,kBAAA,CAAA,MAAA,SAAA,SAAAC,CAAA,CAAA;AALtB,IAAA,WAAA,GAAA;;;;;AAQU,QAAA,IAAI,CAAA,IA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Ae,EAAC,MAAM,EAAC,MAAM,kBAAc,OAAO,EAAA,EAC/F,IAAI,CAAC,KAAK,CACE,IACX,EAAE,EACN,CAAgB,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,EAC3G,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACE,EACjB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAQ,CACxB,EACJ,IAAI,CAAC,SAAS;AAChB,aAAC,CAAA,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":["CuraAlert","__stencil_proxyCustomElement","HTMLElement"],"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,11 +1,11 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, e as createEvent, h, d as Host } from './p-D1cPOZpG.js';
|
|
2
2
|
import { d as defineCustomElement$9 } from './p-BRDqwZ4N.js';
|
|
3
|
-
import { i as isBefore, a as isAfter, d as defineCustomElement$8 } from './p-
|
|
3
|
+
import { i as isBefore, a as isAfter, d as defineCustomElement$8 } from './p-D6PpdPRJ.js';
|
|
4
4
|
import { d as defineCustomElement$7 } from './p-B5aO1chh.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './p-CgMS6FUK.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './p-DR1RHrEX.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './p-Dqm2sAwv.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './p-
|
|
8
|
+
import { d as defineCustomElement$3 } from './p-Cs5scX1L.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './p-Dt450DkQ.js';
|
|
10
10
|
|
|
11
11
|
const curaInputDateCss = ":host{display:block}.container{display:flex;flex-direction:column;position:relative}.container .calendar{padding:0px calc(var(--cura-spacing-base) * 3px);margin-top:-8px;border-radius:0px 0px 4px 4px;border-top:0px;border-right:2px solid #D4D4D4;border-bottom:2px solid #D4D4D4;border-left:2px solid #D4D4D4;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;top:100%;z-index:10;display:none;opacity:0;pointer-events:none}.container .calendar.visible{box-sizing:border-box;display:block;opacity:1;pointer-events:all;width:100%;background-color:#fff}";
|