@rededor/cura 0.4.7 → 0.4.9
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/assets/icons/iconset-default-list.ts +1 -1
- package/dist/assets/icons/iconset-default.svg +1 -1
- package/dist/cjs/{app-globals-11fb6b23.js → app-globals-a9efc5b2.js} +18 -1
- package/dist/cjs/app-globals-a9efc5b2.js.map +1 -0
- package/dist/cjs/{cura-button_10.cjs.entry.js → cura-accordion_12.cjs.entry.js} +128 -3
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +3 -3
- package/dist/cjs/{index-0e874533.js → index-72217b50.js} +10 -2
- package/dist/cjs/index-72217b50.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/api/theme-presets/theme-legacy-default.js +18 -0
- package/dist/collection/api/theme-presets/theme-legacy-default.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-presets.js +2 -0
- package/dist/collection/api/theme-presets/theme-presets.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets-raw/icons/default/geotagUnityGroup.svg +3 -0
- package/dist/collection/assets-raw/icons/default/heart.svg +3 -0
- package/dist/collection/assets-raw/icons/default/siren.svg +12 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.css +14 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +271 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +160 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +142 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +199 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -0
- package/dist/components/cura-accordion-item.d.ts +11 -0
- package/dist/components/cura-accordion-item.js +76 -0
- package/dist/components/cura-accordion-item.js.map +1 -0
- package/dist/components/cura-accordion.d.ts +11 -0
- package/dist/components/cura-accordion.js +120 -0
- package/dist/components/cura-accordion.js.map +1 -0
- package/dist/components/cura-icons-view.js +1 -1
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/index.js +21 -0
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/p-0ac3b5f1.system.js +2 -0
- package/dist/cura/p-0ac3b5f1.system.js.map +1 -0
- package/dist/cura/p-2cbf52f1.js +3 -0
- package/dist/cura/p-2cbf52f1.js.map +1 -0
- package/dist/cura/{p-a84ae34f.system.js → p-8da635b7.system.js} +3 -3
- package/dist/cura/{p-cbc91ac5.js.map → p-8da635b7.system.js.map} +1 -1
- package/dist/cura/p-95d99b0d.entry.js +2 -0
- package/dist/cura/p-95d99b0d.entry.js.map +1 -0
- package/dist/cura/p-9ae6b01a.system.entry.js +2 -0
- package/dist/cura/p-9ae6b01a.system.entry.js.map +1 -0
- package/dist/cura/p-bd027c48.system.js +2 -0
- package/dist/cura/p-bd027c48.system.js.map +1 -0
- package/dist/cura/p-d7cd7699.js +2 -0
- package/dist/cura/p-d7cd7699.js.map +1 -0
- package/dist/esm/{app-globals-5009a324.js → app-globals-70cb334e.js} +18 -1
- package/dist/esm/app-globals-70cb334e.js.map +1 -0
- package/dist/esm/{cura-button_10.entry.js → cura-accordion_12.entry.js} +127 -4
- package/dist/esm/cura-accordion_12.entry.js.map +1 -0
- package/dist/esm/cura.js +4 -4
- package/dist/esm/{index-92c824be.js → index-9af0cdbd.js} +10 -2
- package/dist/esm/index-9af0cdbd.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm-es5/{app-globals-5009a324.js → app-globals-70cb334e.js} +2 -2
- package/dist/esm-es5/app-globals-70cb334e.js.map +1 -0
- package/dist/esm-es5/cura-accordion_12.entry.js +2 -0
- package/dist/esm-es5/cura-accordion_12.entry.js.map +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/cura.js.map +1 -1
- package/dist/esm-es5/{index-92c824be.js → index-9af0cdbd.js} +2 -2
- package/dist/esm-es5/index-9af0cdbd.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/api/theme-presets/theme-legacy-default.d.ts +29 -0
- package/dist/types/api/theme-presets/theme-presets.d.ts +29 -0
- package/dist/types/components/accordion/cura-accordion/cura-accordion.d.ts +39 -0
- package/dist/types/components/accordion/cura-accordion/cura-accordion.stories.d.ts +154 -0
- package/dist/types/components/accordion/cura-accordion-item/cura-accordion-item.d.ts +29 -0
- package/dist/types/components.d.ts +114 -0
- package/package.json +2 -2
- package/dist/assets/icons/iconset-default-tmp.svg +0 -951
- package/dist/cjs/app-globals-11fb6b23.js.map +0 -1
- package/dist/cjs/cura-button_10.cjs.entry.js.map +0 -1
- package/dist/cjs/index-0e874533.js.map +0 -1
- package/dist/collection/assets/icons/iconset-default-tmp.svg +0 -951
- package/dist/cura/p-0bb24006.system.js +0 -2
- package/dist/cura/p-0bb24006.system.js.map +0 -1
- package/dist/cura/p-0e6b48da.js +0 -2
- package/dist/cura/p-0e6b48da.js.map +0 -1
- package/dist/cura/p-19176c44.system.js +0 -2
- package/dist/cura/p-19176c44.system.js.map +0 -1
- package/dist/cura/p-a84ae34f.system.js.map +0 -1
- package/dist/cura/p-cbc91ac5.js +0 -3
- package/dist/cura/p-d184517b.entry.js +0 -2
- package/dist/cura/p-d184517b.entry.js.map +0 -1
- package/dist/cura/p-eec653ca.system.entry.js +0 -2
- package/dist/cura/p-eec653ca.system.entry.js.map +0 -1
- package/dist/esm/app-globals-5009a324.js.map +0 -1
- package/dist/esm/cura-button_10.entry.js.map +0 -1
- package/dist/esm/index-92c824be.js.map +0 -1
- package/dist/esm-es5/app-globals-5009a324.js.map +0 -1
- package/dist/esm-es5/cura-button_10.entry.js +0 -2
- package/dist/esm-es5/cura-button_10.entry.js.map +0 -1
- package/dist/esm-es5/index-92c824be.js.map +0 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class CuraAccordionItem {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.label = '';
|
|
5
|
+
this.iconSize = 32;
|
|
6
|
+
this.openIcon = 'down';
|
|
7
|
+
this.closeIcon = 'up';
|
|
8
|
+
this.iconColor = '';
|
|
9
|
+
this.iconActiveColor = '';
|
|
10
|
+
this.colorMode = 'dark';
|
|
11
|
+
this.opened = false;
|
|
12
|
+
this.styles = {};
|
|
13
|
+
}
|
|
14
|
+
getIconColor() {
|
|
15
|
+
const inverted = this.colorMode === 'light';
|
|
16
|
+
const iconColor = inverted ? 'neutral-lighter' : `${this.iconColor}-base`;
|
|
17
|
+
const iconActiveColor = inverted ? 'neutral-purewhite' : `${this.iconActiveColor}-base`;
|
|
18
|
+
return this.opened ? iconActiveColor : iconColor;
|
|
19
|
+
}
|
|
20
|
+
getClasses() {
|
|
21
|
+
const classes = {};
|
|
22
|
+
classes['accordion-item'] = true;
|
|
23
|
+
classes['active'] = this.opened;
|
|
24
|
+
classes['inverted'] = this.colorMode === 'light';
|
|
25
|
+
return classes;
|
|
26
|
+
}
|
|
27
|
+
accordionItemClick(_) {
|
|
28
|
+
this.opened = !this.opened;
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (h(Host, { slot: "accordion-item" }, h("div", { class: this.getClasses(), style: this.styles }, h("div", { class: "label", onClick: e => this.accordionItemClick(e) }, h("div", { class: "label-container" }, h("span", null, this.label), h("cura-icon", { name: this.opened ? this.closeIcon : this.openIcon, size: this.iconSize, color: this.getIconColor() }))), h("div", { class: 'content' }, h("div", { class: "content-wrapper" }, h("slot", null))))));
|
|
32
|
+
}
|
|
33
|
+
static get is() { return "cura-accordion-item"; }
|
|
34
|
+
static get encapsulation() { return "shadow"; }
|
|
35
|
+
static get originalStyleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["cura-accordion-item.scss"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get styleUrls() {
|
|
41
|
+
return {
|
|
42
|
+
"$": ["cura-accordion-item.css"]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get properties() {
|
|
46
|
+
return {
|
|
47
|
+
"label": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "string",
|
|
52
|
+
"resolved": "string",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": "Text label for accordion item"
|
|
60
|
+
},
|
|
61
|
+
"attribute": "label",
|
|
62
|
+
"reflect": true,
|
|
63
|
+
"defaultValue": "''"
|
|
64
|
+
},
|
|
65
|
+
"iconSize": {
|
|
66
|
+
"type": "number",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "number",
|
|
70
|
+
"resolved": "number",
|
|
71
|
+
"references": {}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": "Accordion items icons"
|
|
78
|
+
},
|
|
79
|
+
"attribute": "icon-size",
|
|
80
|
+
"reflect": true,
|
|
81
|
+
"defaultValue": "32"
|
|
82
|
+
},
|
|
83
|
+
"openIcon": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "string",
|
|
88
|
+
"resolved": "string",
|
|
89
|
+
"references": {}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": ""
|
|
96
|
+
},
|
|
97
|
+
"attribute": "open-icon",
|
|
98
|
+
"reflect": true,
|
|
99
|
+
"defaultValue": "'down'"
|
|
100
|
+
},
|
|
101
|
+
"closeIcon": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"mutable": false,
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "string",
|
|
106
|
+
"resolved": "string",
|
|
107
|
+
"references": {}
|
|
108
|
+
},
|
|
109
|
+
"required": false,
|
|
110
|
+
"optional": false,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": ""
|
|
114
|
+
},
|
|
115
|
+
"attribute": "close-icon",
|
|
116
|
+
"reflect": true,
|
|
117
|
+
"defaultValue": "'up'"
|
|
118
|
+
},
|
|
119
|
+
"iconColor": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "string",
|
|
124
|
+
"resolved": "string",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "Color scheme base color\n(By default, the icon will use the same color of 'color' and 'activeColor')"
|
|
132
|
+
},
|
|
133
|
+
"attribute": "icon-color",
|
|
134
|
+
"reflect": true,
|
|
135
|
+
"defaultValue": "''"
|
|
136
|
+
},
|
|
137
|
+
"iconActiveColor": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "string",
|
|
142
|
+
"resolved": "string",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": false,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": ""
|
|
150
|
+
},
|
|
151
|
+
"attribute": "icon-active-color",
|
|
152
|
+
"reflect": true,
|
|
153
|
+
"defaultValue": "''"
|
|
154
|
+
},
|
|
155
|
+
"colorMode": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"mutable": false,
|
|
158
|
+
"complexType": {
|
|
159
|
+
"original": "'dark' | 'light'",
|
|
160
|
+
"resolved": "\"dark\" | \"light\"",
|
|
161
|
+
"references": {}
|
|
162
|
+
},
|
|
163
|
+
"required": false,
|
|
164
|
+
"optional": false,
|
|
165
|
+
"docs": {
|
|
166
|
+
"tags": [],
|
|
167
|
+
"text": "Set the color mode to dark or light"
|
|
168
|
+
},
|
|
169
|
+
"attribute": "color-mode",
|
|
170
|
+
"reflect": false,
|
|
171
|
+
"defaultValue": "'dark'"
|
|
172
|
+
},
|
|
173
|
+
"opened": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"mutable": true,
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "boolean",
|
|
178
|
+
"resolved": "boolean",
|
|
179
|
+
"references": {}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": false,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"attribute": "opened",
|
|
188
|
+
"reflect": true,
|
|
189
|
+
"defaultValue": "false"
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
static get states() {
|
|
194
|
+
return {
|
|
195
|
+
"styles": {}
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=cura-accordion-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-accordion-item.js","sourceRoot":"","sources":["../../../../src/components/accordion/cura-accordion-item/cura-accordion-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA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C,CAAC;UACzD,WAAK,KAAK,EAAC,iBAAiB;YAC1B,gBAAO,IAAI,CAAC,KAAK,CAAQ;YACzB,iBAAW,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,GAAc,CACxH,CACF;QACN,WAAK,KAAK,EAAC,SAAS;UAClB,WAAK,KAAK,EAAC,iBAAiB;YAC1B,eAAa,CACT,CACF,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-accordion-item',\n styleUrl: 'cura-accordion-item.scss',\n shadow: true,\n})\nexport class CuraAccordionItem {\n\n /**\n * Text label for accordion item\n */\n @Prop({reflect: true}) label: string = '';\n\n /** ***Properties below are inherited from the cura-accordion*** */\n /**\n * Accordion items icons\n */\n @Prop({reflect: true}) iconSize = 32;\n @Prop({reflect: true}) openIcon = 'down';\n @Prop({reflect: true}) closeIcon = 'up';\n\n /**\n * Color scheme base color\n * (By default, the icon will use the same color of 'color' and 'activeColor')\n */\n @Prop({reflect: true}) iconColor = '';\n @Prop({reflect: true}) iconActiveColor = '';\n\n /**\n * Set the color mode to dark or light\n */\n @Prop() colorMode: 'dark' | 'light' = 'dark';\n\n @Prop({ reflect: true, mutable: true }) opened: boolean = false;\n\n @State() styles = {};\n\n getIconColor() {\n const inverted = this.colorMode === 'light';\n const iconColor = inverted ? 'neutral-lighter' : `${this.iconColor}-base`;\n const iconActiveColor = inverted ? 'neutral-purewhite' : `${this.iconActiveColor}-base`;\n return this.opened ? iconActiveColor : iconColor;\n }\n\n getClasses() {\n const classes = {};\n classes['accordion-item'] = true;\n classes['active'] = this.opened;\n classes['inverted'] = this.colorMode === 'light';\n return classes;\n }\n\n accordionItemClick(_: Event) {\n this.opened = !this.opened;\n }\n\n render() {\n return (\n <Host slot=\"accordion-item\">\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"label\" onClick={e => this.accordionItemClick(e)}>\n <div class=\"label-container\">\n <span>{this.label}</span>\n <cura-icon name={this.opened ? this.closeIcon : this.openIcon} size={this.iconSize} color={this.getIconColor()}></cura-icon>\n </div>\n </div>\n <div class='content'>\n <div class=\"content-wrapper\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CuraAccordionItem extends Components.CuraAccordionItem, HTMLElement {}
|
|
4
|
+
export const CuraAccordionItem: {
|
|
5
|
+
prototype: CuraAccordionItem;
|
|
6
|
+
new (): CuraAccordionItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './cura-icon2.js';
|
|
3
|
+
|
|
4
|
+
const curaAccordionItemCss = ":host{display:block}:host .accordion-item{width:100%}:host .accordion-item .label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .accordion-item .label::before{content:\"\";display:block;border-top:solid 1px var(--neutral-base);width:100%}:host .accordion-item .label .label-container{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:calc(var(--base-spacing) * 2px);min-height:40px;word-break:break-word;cursor:pointer;font-size:1.14em;font-weight:var(--font-weight-regular);color:var(--color-base);padding:0px}:host .accordion-item .label .label-container cura-icon{margin-right:4px}:host .accordion-item .label .label-container:hover{color:var(--color-light)}:host .accordion-item .label .label-container:hover cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item .label .label-container:active{color:var(--color-dark)}:host .accordion-item .label .label-container:active cura-icon{--color:var(--icon-color-dark) !important}:host .accordion-item .content{font-size:1em;overflow:hidden;max-height:0;-webkit-transition:max-height 0.25s ease;transition:max-height 0.25s ease}:host .accordion-item .content .content-wrapper{padding:calc(var(--base-spacing) * 2px) 0px;border-top:solid 1px var(--neutral-base)}:host .accordion-item.active .label .label-container{color:var(--color-active-base)}:host .accordion-item.active .label .label-container:hover{color:var(--color-active-light)}:host .accordion-item.active .label .label-container:hover cura-icon{--color:var(--icon-color-active-light) !important}:host .accordion-item.active .label .label-container:active{color:var(--color-active-dark)}:host .accordion-item.active .label .label-container:active cura-icon{--color:var(--icon-color-active-dark) !important}:host .accordion-item.active .content{max-height:200vh;overflow-y:auto;-webkit-transition:max-height 0.5s ease 0.14s;transition:max-height 0.5s ease 0.14s}:host .accordion-item.inverted .label .label-container{color:var(--neutral-lighter)}:host .accordion-item.inverted .label .label-container:hover{color:var(--color-lighter)}:host .accordion-item.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-lighter) !important}:host .accordion-item.inverted .label .label-container:active{color:var(--color-light)}:host .accordion-item.inverted .label .label-container:active cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item.active.inverted .label .label-container{color:var(--neutral-purewhite)}:host .accordion-item.active.inverted .label .label-container:hover{color:var(--color-active-lighter)}:host .accordion-item.active.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-active-lighter) !important}:host .accordion-item.active.inverted .label .label-container:active{color:var(--color-active-light)}:host .accordion-item.active.inverted .label .label-container:active cura-icon{--color:var(--icon-color-active-light) !important}@media (min-width: 768px) and (max-width: 1365px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}@media (min-width: 1366px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}";
|
|
5
|
+
|
|
6
|
+
const CuraAccordionItem$1 = /*@__PURE__*/ proxyCustomElement(class CuraAccordionItem extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.label = '';
|
|
12
|
+
this.iconSize = 32;
|
|
13
|
+
this.openIcon = 'down';
|
|
14
|
+
this.closeIcon = 'up';
|
|
15
|
+
this.iconColor = '';
|
|
16
|
+
this.iconActiveColor = '';
|
|
17
|
+
this.colorMode = 'dark';
|
|
18
|
+
this.opened = false;
|
|
19
|
+
this.styles = {};
|
|
20
|
+
}
|
|
21
|
+
getIconColor() {
|
|
22
|
+
const inverted = this.colorMode === 'light';
|
|
23
|
+
const iconColor = inverted ? 'neutral-lighter' : `${this.iconColor}-base`;
|
|
24
|
+
const iconActiveColor = inverted ? 'neutral-purewhite' : `${this.iconActiveColor}-base`;
|
|
25
|
+
return this.opened ? iconActiveColor : iconColor;
|
|
26
|
+
}
|
|
27
|
+
getClasses() {
|
|
28
|
+
const classes = {};
|
|
29
|
+
classes['accordion-item'] = true;
|
|
30
|
+
classes['active'] = this.opened;
|
|
31
|
+
classes['inverted'] = this.colorMode === 'light';
|
|
32
|
+
return classes;
|
|
33
|
+
}
|
|
34
|
+
accordionItemClick(_) {
|
|
35
|
+
this.opened = !this.opened;
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return (h(Host, { slot: "accordion-item" }, h("div", { class: this.getClasses(), style: this.styles }, h("div", { class: "label", onClick: e => this.accordionItemClick(e) }, h("div", { class: "label-container" }, h("span", null, this.label), h("cura-icon", { name: this.opened ? this.closeIcon : this.openIcon, size: this.iconSize, color: this.getIconColor() }))), h("div", { class: 'content' }, h("div", { class: "content-wrapper" }, h("slot", null))))));
|
|
39
|
+
}
|
|
40
|
+
static get style() { return curaAccordionItemCss; }
|
|
41
|
+
}, [1, "cura-accordion-item", {
|
|
42
|
+
"label": [513],
|
|
43
|
+
"iconSize": [514, "icon-size"],
|
|
44
|
+
"openIcon": [513, "open-icon"],
|
|
45
|
+
"closeIcon": [513, "close-icon"],
|
|
46
|
+
"iconColor": [513, "icon-color"],
|
|
47
|
+
"iconActiveColor": [513, "icon-active-color"],
|
|
48
|
+
"colorMode": [1, "color-mode"],
|
|
49
|
+
"opened": [1540],
|
|
50
|
+
"styles": [32]
|
|
51
|
+
}]);
|
|
52
|
+
function defineCustomElement$1() {
|
|
53
|
+
if (typeof customElements === "undefined") {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const components = ["cura-accordion-item", "cura-icon"];
|
|
57
|
+
components.forEach(tagName => { switch (tagName) {
|
|
58
|
+
case "cura-accordion-item":
|
|
59
|
+
if (!customElements.get(tagName)) {
|
|
60
|
+
customElements.define(tagName, CuraAccordionItem$1);
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
case "cura-icon":
|
|
64
|
+
if (!customElements.get(tagName)) {
|
|
65
|
+
defineCustomElement$2();
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
} });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const CuraAccordionItem = CuraAccordionItem$1;
|
|
72
|
+
const defineCustomElement = defineCustomElement$1;
|
|
73
|
+
|
|
74
|
+
export { CuraAccordionItem, defineCustomElement };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=cura-accordion-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-accordion-item.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,6zGAA6zG;;MCO70GA,mBAAiB;;;;;iBAKW,EAAE;oBAMP,EAAE;oBACF,MAAM;qBACL,IAAI;qBAMJ,EAAE;2BACI,EAAE;qBA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EAAC,SAAS,IAClB,WAAK,KAAK,EAAC,iBAAiB,IAC1B,eAAa,CACT,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraAccordionItem"],"sources":["./src/components/accordion/cura-accordion-item/cura-accordion-item.scss?tag=cura-accordion-item&encapsulation=shadow","./src/components/accordion/cura-accordion-item/cura-accordion-item.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n\n .accordion-item {\n width: 100%;\n\n .label {\n display: flex;\n flex-direction: column;\n &::before {\n content: \"\";\n display: block;\n border-top: solid 1px var(--neutral-base);\n width: 100%;\n }\n .label-container {\n display: flex;\n flex-grow: 1;\n justify-content: space-between;\n align-items: center;\n gap: calc(var(--base-spacing) * 2px);\n min-height: 40px;\n word-break: break-word;\n cursor: pointer;\n font-size: 1.14em;\n font-weight: var(--font-weight-regular);\n color: var(--color-base);\n padding: 0px;\n\n cura-icon {\n margin-right: 4px;\n }\n\n &:hover {\n color: var(--color-light);\n cura-icon {\n --color: var(--icon-color-light) !important;\n }\n }\n &:active {\n color: var(--color-dark);\n cura-icon {\n --color: var(--icon-color-dark) !important;\n }\n }\n }\n }\n\n .content {\n font-size: 1em;\n overflow: hidden;\n max-height: 0;\n transition: max-height .25s ease;\n .content-wrapper {\n padding: calc(var(--base-spacing) * 2px) 0px;\n border-top: solid 1px var(--neutral-base);\n }\n }\n\n &.active {\n .label .label-container {\n color: var(--color-active-base);\n &:hover {\n color: var(--color-active-light);\n cura-icon {\n --color: var(--icon-color-active-light) !important;\n }\n }\n &:active {\n color: var(--color-active-dark);\n cura-icon {\n --color: var(--icon-color-active-dark) !important;\n }\n }\n }\n\n .content {\n max-height: 200vh;\n overflow-y: auto;\n transition: max-height .5s ease .14s;\n }\n }\n\n &.inverted {\n .label .label-container {\n color: var(--neutral-lighter);\n &:hover {\n color: var(--color-lighter);\n cura-icon {\n --color: var(--icon-color-lighter) !important;\n }\n }\n &:active {\n color: var(--color-light);\n cura-icon {\n --color: var(--icon-color-light) !important;\n }\n }\n }\n }\n\n &.active.inverted {\n .label .label-container {\n color: var(--neutral-purewhite);\n &:hover {\n color: var(--color-active-lighter);\n cura-icon {\n --color: var(--icon-color-active-lighter) !important;\n }\n }\n &:active {\n color: var(--color-active-light);\n cura-icon {\n --color: var(--icon-color-active-light) !important;\n }\n }\n }\n }\n }\n\n @include medium-only() {\n .accordion-item {\n .label .label-container {\n font-size: 1.29em;\n }\n\n .content {\n font-size: 1.14em;\n }\n }\n }\n\n @include large-up() {\n .accordion-item {\n .label .label-container {\n font-size: 1.29em;\n }\n\n .content {\n font-size: 1.14em;\n }\n }\n }\n}\n","import { Component, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-accordion-item',\n styleUrl: 'cura-accordion-item.scss',\n shadow: true,\n})\nexport class CuraAccordionItem {\n\n /**\n * Text label for accordion item\n */\n @Prop({reflect: true}) label: string = '';\n\n /** ***Properties below are inherited from the cura-accordion*** */\n /**\n * Accordion items icons\n */\n @Prop({reflect: true}) iconSize = 32;\n @Prop({reflect: true}) openIcon = 'down';\n @Prop({reflect: true}) closeIcon = 'up';\n\n /**\n * Color scheme base color\n * (By default, the icon will use the same color of 'color' and 'activeColor')\n */\n @Prop({reflect: true}) iconColor = '';\n @Prop({reflect: true}) iconActiveColor = '';\n\n /**\n * Set the color mode to dark or light\n */\n @Prop() colorMode: 'dark' | 'light' = 'dark';\n\n @Prop({ reflect: true, mutable: true }) opened: boolean = false;\n\n @State() styles = {};\n\n getIconColor() {\n const inverted = this.colorMode === 'light';\n const iconColor = inverted ? 'neutral-lighter' : `${this.iconColor}-base`;\n const iconActiveColor = inverted ? 'neutral-purewhite' : `${this.iconActiveColor}-base`;\n return this.opened ? iconActiveColor : iconColor;\n }\n\n getClasses() {\n const classes = {};\n classes['accordion-item'] = true;\n classes['active'] = this.opened;\n classes['inverted'] = this.colorMode === 'light';\n return classes;\n }\n\n accordionItemClick(_: Event) {\n this.opened = !this.opened;\n }\n\n render() {\n return (\n <Host slot=\"accordion-item\">\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"label\" onClick={e => this.accordionItemClick(e)}>\n <div class=\"label-container\">\n <span>{this.label}</span>\n <cura-icon name={this.opened ? this.closeIcon : this.openIcon} size={this.iconSize} color={this.getIconColor()}></cura-icon>\n </div>\n </div>\n <div class='content'>\n <div class=\"content-wrapper\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CuraAccordion extends Components.CuraAccordion, HTMLElement {}
|
|
4
|
+
export const CuraAccordion: {
|
|
5
|
+
prototype: CuraAccordion;
|
|
6
|
+
new (): CuraAccordion;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const curaAccordionCss = ":host{display:block;color:var(--font-color);font-size:var(--font-size);font-size:var(--font-size);font-family:var(--font-family);font-weight:var(--font-weight-regular)}:host::after{content:\"\";display:block;border-bottom:solid 1px var(--neutral-base);width:100%}";
|
|
4
|
+
|
|
5
|
+
const CuraAccordion$1 = /*@__PURE__*/ proxyCustomElement(class CuraAccordion extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.mutationObserverCallback = (mutations, _) => {
|
|
11
|
+
var _a;
|
|
12
|
+
for (const mutation of mutations) {
|
|
13
|
+
if (mutation.type === 'attributes' && mutation.attributeName === 'opened' && ((_a = mutation.target) === null || _a === void 0 ? void 0 : _a['opened'])) {
|
|
14
|
+
if (this.behavior !== 'default')
|
|
15
|
+
continue;
|
|
16
|
+
this.host.querySelectorAll('cura-accordion-item').forEach(item => {
|
|
17
|
+
if (item != mutation.target) {
|
|
18
|
+
item.opened = false;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (mutation.type === 'childList') {
|
|
23
|
+
const addedNodes = Array.from(mutation.addedNodes || []);
|
|
24
|
+
for (let node of addedNodes) {
|
|
25
|
+
this.setChildProperties(node);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
this.mutationObserver = new MutationObserver(this.mutationObserverCallback);
|
|
31
|
+
this.color = 'primary';
|
|
32
|
+
this.activeColor = 'accent';
|
|
33
|
+
this.colorMode = 'dark';
|
|
34
|
+
this.iconSize = 32;
|
|
35
|
+
this.openIcon = 'down';
|
|
36
|
+
this.closeIcon = 'up';
|
|
37
|
+
this.iconColor = '';
|
|
38
|
+
this.iconActiveColor = '';
|
|
39
|
+
this.behavior = 'default';
|
|
40
|
+
this.styles = {};
|
|
41
|
+
}
|
|
42
|
+
handleChangeColor() {
|
|
43
|
+
this.setColors();
|
|
44
|
+
}
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
const weights = window.CuraAPI.theme.fonts.getWeights();
|
|
47
|
+
this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
|
|
48
|
+
this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);
|
|
49
|
+
this.styles['--neutral-lighter'] = window.CuraAPI.theme.colors.getColor(`neutral-lighter`);
|
|
50
|
+
this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);
|
|
51
|
+
this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
|
|
52
|
+
this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();
|
|
53
|
+
this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
|
|
54
|
+
this.styles['--font-weight-regular'] = weights.regular;
|
|
55
|
+
this.setColors();
|
|
56
|
+
}
|
|
57
|
+
componentDidLoad() {
|
|
58
|
+
this.host.querySelectorAll('cura-accordion-item').forEach(item => {
|
|
59
|
+
this.setChildProperties(item);
|
|
60
|
+
});
|
|
61
|
+
const options = { childList: true, subtree: true, attributes: true };
|
|
62
|
+
this.mutationObserver.observe(this.host, options);
|
|
63
|
+
}
|
|
64
|
+
disconnectedCallback() {
|
|
65
|
+
this.mutationObserver.disconnect();
|
|
66
|
+
}
|
|
67
|
+
setChildProperties(item) {
|
|
68
|
+
// Theme
|
|
69
|
+
item.colorMode = this.colorMode;
|
|
70
|
+
item.iconColor = this.iconColor || this.color;
|
|
71
|
+
item.iconActiveColor = this.iconActiveColor || this.activeColor;
|
|
72
|
+
// Icon
|
|
73
|
+
item.iconSize = this.iconSize;
|
|
74
|
+
item.openIcon = this.openIcon;
|
|
75
|
+
item.closeIcon = this.closeIcon;
|
|
76
|
+
}
|
|
77
|
+
setColors() {
|
|
78
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color-lighter': window.CuraAPI.theme.colors.getColor(`${this.color}-lighter`), '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`), '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`), '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`), '--color-active-lighter': window.CuraAPI.theme.colors.getColor(`${this.activeColor}-lighter`), '--color-active-light': window.CuraAPI.theme.colors.getColor(`${this.activeColor}-light`), '--color-active-base': window.CuraAPI.theme.colors.getColor(`${this.activeColor}-base`), '--color-active-dark': window.CuraAPI.theme.colors.getColor(`${this.activeColor}-dark`), '--icon-color-lighter': window.CuraAPI.theme.colors.getColor(`${this.iconColor || this.color}-lighter`), '--icon-color-light': window.CuraAPI.theme.colors.getColor(`${this.iconColor || this.color}-light`), '--icon-color-base': window.CuraAPI.theme.colors.getColor(`${this.iconColor || this.color}-base`), '--icon-color-dark': window.CuraAPI.theme.colors.getColor(`${this.iconColor || this.color}-dark`), '--icon-color-active-lighter': window.CuraAPI.theme.colors.getColor(`${this.iconActiveColor || this.activeColor}-lighter`), '--icon-color-active-light': window.CuraAPI.theme.colors.getColor(`${this.iconActiveColor || this.activeColor}-light`), '--icon-color-active-base': window.CuraAPI.theme.colors.getColor(`${this.iconActiveColor || this.activeColor}-base`), '--icon-color-active-dark': window.CuraAPI.theme.colors.getColor(`${this.iconActiveColor || this.activeColor}-dark`) });
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
return (h(Host, { style: this.styles }, h("slot", { name: 'accordion-item' })));
|
|
82
|
+
}
|
|
83
|
+
get host() { return this; }
|
|
84
|
+
static get watchers() { return {
|
|
85
|
+
"color": ["handleChangeColor"],
|
|
86
|
+
"activeColor": ["handleChangeColor"]
|
|
87
|
+
}; }
|
|
88
|
+
static get style() { return curaAccordionCss; }
|
|
89
|
+
}, [1, "cura-accordion", {
|
|
90
|
+
"color": [513],
|
|
91
|
+
"activeColor": [513, "active-color"],
|
|
92
|
+
"colorMode": [513, "color-mode"],
|
|
93
|
+
"iconSize": [514, "icon-size"],
|
|
94
|
+
"openIcon": [513, "open-icon"],
|
|
95
|
+
"closeIcon": [513, "close-icon"],
|
|
96
|
+
"iconColor": [513, "icon-color"],
|
|
97
|
+
"iconActiveColor": [513, "icon-active-color"],
|
|
98
|
+
"behavior": [513],
|
|
99
|
+
"styles": [32]
|
|
100
|
+
}]);
|
|
101
|
+
function defineCustomElement$1() {
|
|
102
|
+
if (typeof customElements === "undefined") {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const components = ["cura-accordion"];
|
|
106
|
+
components.forEach(tagName => { switch (tagName) {
|
|
107
|
+
case "cura-accordion":
|
|
108
|
+
if (!customElements.get(tagName)) {
|
|
109
|
+
customElements.define(tagName, CuraAccordion$1);
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
} });
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const CuraAccordion = CuraAccordion$1;
|
|
116
|
+
const defineCustomElement = defineCustomElement$1;
|
|
117
|
+
|
|
118
|
+
export { CuraAccordion, defineCustomElement };
|
|
119
|
+
|
|
120
|
+
//# sourceMappingURL=cura-accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"cura-accordion.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,yQAAyQ;;MCOrRA,eAAa;;;;;IAwCxB,6BAAwB,GAAG,CAAC,SAA2B,EAAE,CAAmB;;MAC1E,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QAChC,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,IAAI,QAAQ,CAAC,aAAa,KAAK,QAAQ,KAAI,MAAA,QAAQ,CAAC,MAAM,0CAAG,QAAQ,CAAC,CAAA,EAAE;UACxG,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS;YAAE,SAAS;UAC1C,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,IAAI;YAC5D,IAAI,IAAI,IAAI,QAAQ,CAAC,MAAM,EAAE;cAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;aACrB;WACF,CAAC,CAAC;SACJ;QACD,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,EAAE;UACjC,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;UACzD,KAAI,IAAI,IAAI,IAAI,UAAU,EAAE;YAC1B,IAAI,CAAC,kBAAkB,CAAC,IAAoC,CAAC,CAAC;WAC/D;SACF;OACF;KACF,CAAA;IACD,qBAAgB,GAAqB,IAAI,gBAAgB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;iBAnD1D,SAAS;uBACH,QAAQ;qBAUQ,MAAM;oBAKzB,EAAE;oBACF,MAAM;qBACL,IAAI;qBAMJ,EAAE;2BACI,EA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C,eAAe,IAAI,IAAI,CAAC,WAAW,UAAU,CAAC,EAC1H,2BAA2B,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,WAAW,QAAQ,CAAC,EACtH,0BAA0B,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,WAAW,OAAO,CAAC,EACpH,0BAA0B,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,WAAW,OAAO,CAAC,GACrH,CAAC;GACH;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IACtB,YAAM,IAAI,EAAC,gBAAgB,GAAQ,CAC9B,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraAccordion"],"sources":["./src/components/accordion/cura-accordion/cura-accordion.scss?tag=cura-accordion&encapsulation=shadow","./src/components/accordion/cura-accordion/cura-accordion.tsx"],"sourcesContent":[":host {\n display: block;\n color: var(--font-color);\n font-size: var(--font-size);\n font-size: var(--font-size);\n font-family: var(--font-family);\n font-weight: var(--font-weight-regular);\n\n &::after {\n content: \"\";\n display: block;\n border-bottom: solid 1px var(--neutral-base);\n width: 100%;\n }\n}\n\n","import { Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-accordion',\n styleUrl: 'cura-accordion.scss',\n shadow: true,\n})\nexport class CuraAccordion {\n\n @Element() host: HTMLElement;\n\n /**\n * Color scheme base color\n */\n @Prop({reflect: true}) color = 'primary';\n @Prop({reflect: true}) activeColor = 'accent';\n @Watch('color')\n @Watch('activeColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * Set the color mode to dark or light\n */\n @Prop({reflect: true}) colorMode: 'dark' | 'light' = 'dark';\n\n /**\n * Accordion items icons\n */\n @Prop({reflect: true}) iconSize = 32;\n @Prop({reflect: true}) openIcon = 'down';\n @Prop({reflect: true}) closeIcon = 'up';\n\n /**\n * Color scheme base color\n * (By default, the icon will use the same color of 'color' and 'activeColor')\n */\n @Prop({reflect: true}) iconColor = '';\n @Prop({reflect: true}) iconActiveColor = '';\n\n /**\n * Accordion behavior when item is clicked\n * (The default will close all items except the current one)\n */\n @Prop({reflect: true}) behavior: 'default' | 'keep-open' = 'default';\n\n mutationObserverCallback = (mutations: MutationRecord[], _: MutationObserver) => {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'opened' && mutation.target?.['opened']) {\n if (this.behavior !== 'default') continue;\n this.host.querySelectorAll('cura-accordion-item').forEach(item => {\n if (item != mutation.target) {\n item.opened = false;\n }\n });\n }\n if (mutation.type === 'childList') {\n const addedNodes = Array.from(mutation.addedNodes || []);\n for(let node of addedNodes) {\n this.setChildProperties(node as HTMLCuraAccordionItemElement);\n }\n }\n }\n }\n mutationObserver: MutationObserver = new MutationObserver(this.mutationObserverCallback);\n\n @State() styles = {};\n\n connectedCallback() {\n const weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);\n this.styles['--neutral-lighter'] = window.CuraAPI.theme.colors.getColor(`neutral-lighter`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-regular'] = weights.regular;\n this.setColors();\n }\n\n componentDidLoad() {\n this.host.querySelectorAll('cura-accordion-item').forEach(item => {\n this.setChildProperties(item);\n });\n const options: MutationObserverInit = {childList: true, subtree: true, attributes: true}\n this.mutationObserver.observe(this.host, options)\n }\n\n disconnectedCallback() {\n this.mutationObserver.disconnect();\n }\n\n setChildProperties(item: HTMLCuraAccordionItemElement) {\n // Theme\n item.colorMode = this.colorMode;\n item.iconColor = this.iconColor || this.color;\n item.iconActiveColor = this.iconActiveColor || this.activeColor;\n // Icon\n item.iconSize = this.iconSize;\n item.openIcon = this.openIcon;\n item.closeIcon = this.closeIcon;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-lighter': window.CuraAPI.theme.colors.getColor(`${this.color}-lighter`),\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`),\n '--color-active-lighter': window.CuraAPI.theme.colors.getColor(`${this.activeColor}-lighter`),\n '--color-active-light': window.CuraAPI.theme.colors.getColor(`${this.activeColor}-light`),\n '--color-active-base': window.CuraAPI.theme.colors.getColor(`${this.activeColor}-base`),\n '--color-active-dark': window.CuraAPI.theme.colors.getColor(`${this.activeColor}-dark`),\n\n '--icon-color-lighter': window.CuraAPI.theme.colors.getColor(`${this.iconColor || this.color}-lighter`),\n '--icon-color-light': window.CuraAPI.theme.colors.getColor(`${this.iconColor || this.color}-light`),\n '--icon-color-base': window.CuraAPI.theme.colors.getColor(`${this.iconColor || this.color}-base`),\n '--icon-color-dark': window.CuraAPI.theme.colors.getColor(`${this.iconColor || this.color}-dark`),\n '--icon-color-active-lighter': window.CuraAPI.theme.colors.getColor(`${this.iconActiveColor || this.activeColor}-lighter`),\n '--icon-color-active-light': window.CuraAPI.theme.colors.getColor(`${this.iconActiveColor || this.activeColor}-light`),\n '--icon-color-active-base': window.CuraAPI.theme.colors.getColor(`${this.iconActiveColor || this.activeColor}-base`),\n '--icon-color-active-dark': window.CuraAPI.theme.colors.getColor(`${this.iconActiveColor || this.activeColor}-dark`),\n };\n }\n\n render() {\n return (\n <Host style={this.styles}>\n <slot name='accordion-item'></slot>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './cura-icon2.js';
|
|
3
3
|
|
|
4
|
-
const iconsetdefaulticons = ["360", "accessibility", "addUser", "airdrop", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "delete", "desktop", "doc", "down", "download", "duplicate", "edit", "exam", "examDoc", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "geotagUnity", "google", "graph", "healthPlan", "height", "height2", "home", "horizontalList", "imageUp", "infoCircle", "instagram", "key", "lamp", "language", "language2", "languageEN", "languagePT", "lattes", "left", "like", "link", "linkExternal", "linkedin", "list", "login", "logout", "mail", "maintenance", "medDoc", "medEspec", "medImg", "medUser", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "news", "notification", "npsDeslike", "npsHate", "npsLike", "npsLove", "npsNeutral", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profileCircle", "questionCircle", "questionSquare", "range", "reload", "ribbon", "right", "schedule", "scheduleCheck", "scheduleHistorico", "search", "secure", "share", "sound", "soundOff", "subItem", "target", "team", "telegram", "twitter", "unLink", "unSecure", "unity", "unlike", "up", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "wifiOff", "youtube", "zoomIn", "zoomOut"];
|
|
4
|
+
const iconsetdefaulticons = ["360", "accessibility", "addUser", "airdrop", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "delete", "desktop", "doc", "down", "download", "duplicate", "edit", "exam", "examDoc", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "geotagUnity", "geotagUnityGroup", "google", "graph", "healthPlan", "heart", "height", "height2", "home", "horizontalList", "imageUp", "infoCircle", "instagram", "key", "lamp", "language", "language2", "languageEN", "languagePT", "lattes", "left", "like", "link", "linkExternal", "linkedin", "list", "login", "logout", "mail", "maintenance", "medDoc", "medEspec", "medImg", "medUser", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "news", "notification", "npsDeslike", "npsHate", "npsLike", "npsLove", "npsNeutral", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profileCircle", "questionCircle", "questionSquare", "range", "reload", "ribbon", "right", "schedule", "scheduleCheck", "scheduleHistorico", "search", "secure", "share", "siren", "sound", "soundOff", "subItem", "target", "team", "telegram", "twitter", "unLink", "unSecure", "unity", "unlike", "up", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "wifiOff", "youtube", "zoomIn", "zoomOut"];
|
|
5
5
|
|
|
6
6
|
const curaIconsViewCss = ":host{display:block;padding:24px;font-family:\"Roboto\", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#262626;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.icons .icon span{font-size:12px;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#000;color:#FFF;border-radius:2px;position:absolute;top:-2px;left:50%;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);display:none}.icons .icon:hover{opacity:1}.icons .icon:hover span{display:block}";
|
|
7
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-icons-view.js","mappings":";;;AAAA,4BAAe,CAAC,KAAK,EAAC,eAAe,EAAC,SAAS,EAAC,SAAS,EAAC,aAAa,EAAC,eAAe,EAAC,WAAW,EAAC,iBAAiB,EAAC,WAAW,EAAC,iBAAiB,EAAC,YAAY,EAAC,kBAAkB,EAAC,SAAS,EAAC,eAAe,EAAC,QAAQ,EAAC,SAAS,EAAC,SAAS,EAAC,UAAU,EAAC,YAAY,EAAC,UAAU,EAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,YAAY,EAAC,OAAO,EAAC,YAAY,EAAC,aAAa,EAAC,aAAa,EAAC,OAAO,EAAC,OAAO,EAAC,aAAa,EAAC,UAAU,EAAC,QAAQ,EAAC,QAAQ,EAAC,SAAS,EAAC,KAAK,EAAC,MAAM,EAAC,UAAU,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,EAAC,UAAU,EAAC,SAAS,EAAC,SAAS,EAAC,SAAS,EAAC,SAAS,EAAC,YAAY,EAAC,SAAS,EAAC,QAAQ,EAAC,YAAY,EAAC,SAAS,EAAC,QAAQ,EAAC,aAAa,EAAC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AEpB,WAAK,KAAK,EAAC,MAAM,IACf,iBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAc,EACxD,gBAAQ,IAAI,CAAS,CACjB,CACP,CACG,EACN,WAAK,KAAK,EAAC,kBAAkB,IACzB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAE,IAAI,IAEpB,WAAK,KAAK,EAAC,MAAM,IACf,iBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,eAAe,GAAa,EAC9E,gBAAQ,IAAI,CAAS,CACjB,CACP,CACG,EACN,WAAK,KAAK,EAAC,WAAW,IAClB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAE,KAAK,IACtB,WAAK,KAAK,EAAC,MAAM,IACf,iBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAc,EAC1D,gBAAQ,KAAK,CAAS,CAClB,CACP,EACD,WAAK,KAAK,EAAC,MAAM,IACf,iBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,SAAa,EACrD,2BAAqB,CACjB,CACF,CACF,EACN,WAAK,KAAK,EAAC,OAAO,IACd,mBAAmB,CAAC,GAAG,CAAC,IAAI,IAC5B,WAAK,KAAK,EAAC,MAAM,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IACrD,iBAAW,IAAI,EAAE,IAAI,GAAc,EACnC,gBAAO,IAAI,CAAQ,CACf,CACP,CACG,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraIconsView"],"sources":["./src/assets/icons/iconset-default-list.ts","./src/components/cura-icons-view/cura-icons-view.scss?tag=cura-icons-view&encapsulation=shadow","./src/components/cura-icons-view/cura-icons-view.tsx"],"sourcesContent":["export default [\"360\",\"accessibility\",\"addUser\",\"airdrop\",\"alertCircle\",\"alertTriangle\",\"arrowDown\",\"arrowDownCircle\",\"arrowLeft\",\"arrowLeftCircle\",\"arrowRight\",\"arrowRightCircle\",\"arrowUp\",\"arrowUpCircle\",\"attach\",\"avatarF\",\"avatarM\",\"biometry\",\"bloodGroup\",\"calendar\",\"cam\",\"camOff\",\"central\",\"chatCircle\",\"check\",\"checkBadge\",\"checkCircle\",\"checkDouble\",\"clock\",\"close\",\"closeCircle\",\"collapse\",\"config\",\"delete\",\"desktop\",\"doc\",\"down\",\"download\",\"duplicate\",\"edit\",\"exam\",\"examDoc\",\"expand\",\"facebook\",\"fileBmp\",\"fileJpg\",\"filePdf\",\"filePng\",\"fileUpload\",\"fileXls\",\"filter\",\"fullscreen\",\"gallery\",\"geotag\",\"geotagUnity\",\"geotagUnityGroup\",\"google\",\"graph\",\"healthPlan\",\"heart\",\"height\",\"height2\",\"home\",\"horizontalList\",\"imageUp\",\"infoCircle\",\"instagram\",\"key\",\"lamp\",\"language\",\"language2\",\"languageEN\",\"languagePT\",\"lattes\",\"left\",\"like\",\"link\",\"linkExternal\",\"linkedin\",\"list\",\"login\",\"logout\",\"mail\",\"maintenance\",\"medDoc\",\"medEspec\",\"medImg\",\"medUser\",\"medical\",\"menuHamburguer\",\"menuKebab\",\"menuMeatballs\",\"mic\",\"micOff\",\"minus\",\"minusCircle\",\"minusSquare\",\"mobile\",\"news\",\"notification\",\"npsDeslike\",\"npsHate\",\"npsLike\",\"npsLove\",\"npsNeutral\",\"order\",\"partner\",\"phone\",\"play\",\"plus\",\"plusCircle\",\"plusSquare\",\"print\",\"profile\",\"profileCircle\",\"questionCircle\",\"questionSquare\",\"range\",\"reload\",\"ribbon\",\"right\",\"schedule\",\"scheduleCheck\",\"scheduleHistorico\",\"search\",\"secure\",\"share\",\"siren\",\"sound\",\"soundOff\",\"subItem\",\"target\",\"team\",\"telegram\",\"twitter\",\"unLink\",\"unSecure\",\"unity\",\"unlike\",\"up\",\"upload\",\"verticalList\",\"viewFalse\",\"viewTrue\",\"weight\",\"whatsapp\",\"wifi\",\"wifiOff\",\"youtube\",\"zoomIn\",\"zoomOut\"];",":host {\n display: block;\n padding: 24px;\n font-family: 'Roboto', Arial, Helvetica, sans-serif;\n}\n\n.iconDetail {\n display: block;\n}\n\n.iconSizes {\n display: flex;\n align-items: center;\n\n\n .size {\n display: flex;\n flex-direction: column;\n text-align: center;\n margin-right: 9px;\n padding: 8px;\n\n &:last-child { margin-right: 0; }\n span {\n font-size: 10px;\n }\n }\n\n &.invert {\n margin-top: 12px;\n\n .size {\n background-color: #262626;\n color: #F6F6F6;\n border-radius: 3px;\n }\n }\n}\n\n.icons {\n margin-top: 28px;\n display: flex;\n flex-wrap: wrap;\n position: relative;\n\n .icon {\n position: relative;\n padding: 4px;\n cursor: pointer;\n opacity: .6;\n transition: opacity .2s linear;\n span {\n font-size: 12px;\n padding: 6px;\n box-sizing: border-box;\n background: #000;\n color: #FFF;\n border-radius: 2px;\n position: absolute;\n top: -2px;\n left: 50%;\n transform: translateX(-50%) translateY(-100%);\n display: none;\n }\n\n &:hover {\n opacity: 1;\n\n span { display: block; }\n }\n }\n}\n\n","import { Component, Host, h, State } from '@stencil/core';\nimport iconsetdefaulticons from '../../assets/icons/iconset-default-list';\n\n@Component({\n tag: 'cura-icons-view',\n styleUrl: 'cura-icons-view.scss',\n shadow: true,\n})\nexport class CuraIconsView {\n\n sizes = [16, 20, 24, 32, 40, 48, 64, 72, 128];\n colors = ['primary', 'secondary', 'accent', 'info', 'warning', 'error', 'success', 'neutral'];\n @State() selected = '360';\n\n setSelected = (icon) => {\n this.selected = icon;\n }\n\n render() {\n return (\n <Host>\n <div class=\"iconDetail\">\n <h4>{ this.selected }</h4>\n <div class=\"iconSizes\">\n { this.sizes.map( size =>\n\n <div class=\"size\">\n <cura-icon name={this.selected} size={size}></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n <div class=\"iconSizes invert\">\n { this.sizes.map( size =>\n\n <div class=\"size\">\n <cura-icon name={this.selected} size={size} color=\"neutral-white\"></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n <div class=\"iconSizes\">\n { this.colors.map( color =>\n <div class=\"size\">\n <cura-icon name={this.selected} color={color}></cura-icon>\n <span>{ color }</span>\n </div>\n )}\n <div class=\"size\">\n <cura-icon name={this.selected} disabled></cura-icon>\n <span>Disabled</span>\n </div>\n </div>\n </div>\n <div class=\"icons\">\n { iconsetdefaulticons.map(icon =>\n <div class=\"icon\" onClick={() => this.setSelected(icon)}>\n <cura-icon name={icon}></cura-icon>\n <span>{icon}</span>\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
package/dist/components/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CuraAccordion } from './cura-accordion.js';
|
|
2
|
+
import { CuraAccordionItem } from './cura-accordion-item.js';
|
|
1
3
|
import { CuraButton } from './cura-button.js';
|
|
2
4
|
import { CuraButtonOutline } from './cura-button-outline.js';
|
|
3
5
|
import { CuraButtonTransparent } from './cura-button-transparent.js';
|
|
@@ -155,10 +157,27 @@ const ThemeOncology = Object.assign(Object.assign({}, ThemeDefault), {
|
|
|
155
157
|
},
|
|
156
158
|
} });
|
|
157
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Legacy Default Theme
|
|
162
|
+
*/
|
|
163
|
+
const ThemeLegacyDefault = Object.assign(Object.assign({}, ThemeDefault), {
|
|
164
|
+
/* Custom */
|
|
165
|
+
/* Colors */
|
|
166
|
+
color: {
|
|
167
|
+
primary: {
|
|
168
|
+
'100': '#CCD9E7',
|
|
169
|
+
'300': '#85A0BC',
|
|
170
|
+
'500': '#004186',
|
|
171
|
+
'700': '#002B59',
|
|
172
|
+
'900': '#002042'
|
|
173
|
+
}
|
|
174
|
+
} });
|
|
175
|
+
|
|
158
176
|
const ThemePresets = {
|
|
159
177
|
'default': ThemeDefault,
|
|
160
178
|
'maternidade': ThemeMaternity,
|
|
161
179
|
'oncologia': ThemeOncology,
|
|
180
|
+
'legacyDefault': ThemeLegacyDefault
|
|
162
181
|
};
|
|
163
182
|
|
|
164
183
|
/**
|
|
@@ -488,6 +507,8 @@ globalScripts();
|
|
|
488
507
|
const defineCustomElements = (opts) => {
|
|
489
508
|
if (typeof customElements !== 'undefined') {
|
|
490
509
|
[
|
|
510
|
+
CuraAccordion,
|
|
511
|
+
CuraAccordionItem,
|
|
491
512
|
CuraButton,
|
|
492
513
|
CuraButtonOutline,
|
|
493
514
|
CuraButtonTransparent,
|