xv-webcomponents 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cjs/{index-888a60d0.js → index-4d938647.js} +291 -6
- package/dist/cjs/index-4d938647.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/utils-c7652b74.js +13 -0
- package/dist/cjs/utils-c7652b74.js.map +1 -0
- package/dist/cjs/xv-accordion_10.cjs.entry.js +263 -0
- package/dist/cjs/xv-accordion_10.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs.cjs.entry.js +22 -0
- package/dist/cjs/xv-breadcrumbs.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-webcomponents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +10 -1
- package/dist/collection/components/xv-accordion/xv-accordion.css +3 -0
- package/dist/collection/components/xv-accordion/xv-accordion.js +163 -0
- package/dist/collection/components/xv-accordion/xv-accordion.js.map +1 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.css +68 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js +132 -0
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js.map +1 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.css +3 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js +19 -0
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js.map +1 -0
- package/dist/collection/components/xv-button/xv-button-v2.css +150 -0
- package/dist/collection/components/xv-button/xv-button.js +12 -15
- package/dist/collection/components/xv-button/xv-button.js.map +1 -1
- package/dist/collection/components/xv-card/xv-card.css +63 -0
- package/dist/collection/components/xv-card/xv-card.js +122 -0
- package/dist/collection/components/xv-card/xv-card.js.map +1 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +1 -1
- package/dist/collection/components/xv-link/xv-link.css +60 -0
- package/dist/collection/components/xv-link/xv-link.js +132 -0
- package/dist/collection/components/xv-link/xv-link.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.css +6 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +70 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator-item/xv-progress-indicator-item.css +66 -0
- package/dist/collection/components/xv-progress-indicator-item/xv-progress-indicator-item.js +47 -0
- package/dist/collection/components/xv-progress-indicator-item/xv-progress-indicator-item.js.map +1 -0
- package/dist/collection/components/xv-tag/xv-tag.css +97 -0
- package/dist/collection/components/xv-tag/xv-tag.js +158 -0
- package/dist/collection/components/xv-tag/xv-tag.js.map +1 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +153 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +70 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/esm/{index-5147034e.js → index-60f5a964.js} +291 -7
- package/dist/esm/index-60f5a964.js.map +1 -0
- package/dist/esm/index.js +1 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/utils-9bb6333b.js +10 -0
- package/dist/esm/utils-9bb6333b.js.map +1 -0
- package/dist/esm/xv-accordion_10.entry.js +250 -0
- package/dist/esm/xv-accordion_10.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs.entry.js +18 -0
- package/dist/esm/xv-breadcrumbs.entry.js.map +1 -0
- package/dist/esm/xv-webcomponents.js +3 -3
- package/dist/types/components/xv-accordion/xv-accordion.d.ts +20 -0
- package/dist/types/components/xv-accordion-item/xv-accordion-item.d.ts +15 -0
- package/dist/types/components/xv-breadcrumbs/xv-breadcrumbs.d.ts +3 -0
- package/dist/types/components/xv-button/xv-button.d.ts +0 -3
- package/dist/types/components/xv-card/xv-card.d.ts +8 -0
- package/dist/types/components/xv-link/xv-link.d.ts +9 -0
- package/dist/types/components/xv-progress-indicator/xv-progress-indicator.d.ts +7 -0
- package/dist/types/components/xv-progress-indicator-item/xv-progress-indicator-item.d.ts +5 -0
- package/dist/types/components/xv-tag/xv-tag.d.ts +11 -0
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +11 -0
- package/dist/types/components.d.ts +236 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/index.esm.js.map +1 -1
- package/dist/xv-webcomponents/p-41bd284c.entry.js +2 -0
- package/dist/xv-webcomponents/p-41bd284c.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-543fe755.js +3 -0
- package/dist/xv-webcomponents/p-543fe755.js.map +1 -0
- package/dist/xv-webcomponents/p-6f058b7f.entry.js +2 -0
- package/dist/xv-webcomponents/p-6f058b7f.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-a0b74d3c.js +2 -0
- package/dist/xv-webcomponents/p-a0b74d3c.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- package/package.json +3 -1
- package/dist/cjs/index-888a60d0.js.map +0 -1
- package/dist/cjs/xv-button-v2_2.cjs.entry.js +0 -68
- package/dist/cjs/xv-button-v2_2.cjs.entry.js.map +0 -1
- package/dist/esm/index-5147034e.js.map +0 -1
- package/dist/esm/xv-button-v2_2.entry.js +0 -63
- package/dist/esm/xv-button-v2_2.entry.js.map +0 -1
- package/dist/xv-webcomponents/p-186c04ea.entry.js +0 -2
- package/dist/xv-webcomponents/p-186c04ea.entry.js.map +0 -1
- package/dist/xv-webcomponents/p-b6c1c52d.js +0 -3
- package/dist/xv-webcomponents/p-b6c1c52d.js.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: var(--ff-body, inherit);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:host(.xv-link_inline) {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
}
|
|
8
|
+
:host(.xv-link_inline) .xv-link {
|
|
9
|
+
text-decoration-line: underline;
|
|
10
|
+
text-decoration-style: solid;
|
|
11
|
+
text-decoration-skip-ink: none;
|
|
12
|
+
text-decoration-thickness: auto;
|
|
13
|
+
text-underline-offset: auto;
|
|
14
|
+
text-underline-position: from-font;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host(.xv-link_standalone) {
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
:host(.xv-link_standalone) .xv-link {
|
|
21
|
+
text-decoration-line: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.xv-link {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
gap: 8px;
|
|
27
|
+
align-items: center;
|
|
28
|
+
color: var(--link-primary);
|
|
29
|
+
font-family: var(--ff-body);
|
|
30
|
+
font-style: normal;
|
|
31
|
+
font-weight: 400;
|
|
32
|
+
transition: color 200ms ease-in-out;
|
|
33
|
+
}
|
|
34
|
+
.xv-link:active {
|
|
35
|
+
color: var(--text-primary);
|
|
36
|
+
}
|
|
37
|
+
.xv-link:visited {
|
|
38
|
+
color: var(--link-visted);
|
|
39
|
+
}
|
|
40
|
+
.xv-link:hover {
|
|
41
|
+
color: var(--link-primary-hover);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
.xv-link:disabled, .xv-link_disabled, .xv-link::part(disabled) {
|
|
45
|
+
color: var(--text-disabled);
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
cursor: initial;
|
|
48
|
+
}
|
|
49
|
+
.xv-link.sm {
|
|
50
|
+
font-size: var(--fz-sm);
|
|
51
|
+
line-height: 137.5%;
|
|
52
|
+
}
|
|
53
|
+
.xv-link.md {
|
|
54
|
+
font-size: var(--fz-md);
|
|
55
|
+
line-height: 128.571%;
|
|
56
|
+
}
|
|
57
|
+
.xv-link.lg {
|
|
58
|
+
font-size: var(--fz-lg);
|
|
59
|
+
line-height: 133.333%;
|
|
60
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class XvLink {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.disabled = false;
|
|
5
|
+
this.size = 'md';
|
|
6
|
+
this.variant = 'inline';
|
|
7
|
+
}
|
|
8
|
+
preventLinkHandler(e) {
|
|
9
|
+
if (!this.disabled)
|
|
10
|
+
return;
|
|
11
|
+
e.preventDefault();
|
|
12
|
+
e.stopPropagation();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h(Host, { key: 'f3434063788d5b6ffda532cb527661104df3ce38', class: `xv-link_${this.variant}` }, h("a", { key: '2482f18ac929497b2f27b3da16d12414b24e3046', href: this.href, onClick: this.preventLinkHandler.bind(this), class: `xv-link ${this.disabled ? 'xv-link_disabled' : ''} ${this.size}`, target: this.target }, h("slot", { key: '1ba29bc9189583d78808e9641588da27bdebc445', name: "icon-left" }), h("slot", { key: 'f4cfc7d01a286f74e1ed1536622a097367d47d49' }), h("slot", { key: 'a33ae557aaa112dc88c291273bce04d9425f937d', name: "icon-right" }))));
|
|
16
|
+
}
|
|
17
|
+
static get is() { return "xv-link"; }
|
|
18
|
+
static get encapsulation() { return "shadow"; }
|
|
19
|
+
static get originalStyleUrls() {
|
|
20
|
+
return {
|
|
21
|
+
"$": ["xv-link.scss"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static get styleUrls() {
|
|
25
|
+
return {
|
|
26
|
+
"$": ["xv-link.css"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static get properties() {
|
|
30
|
+
return {
|
|
31
|
+
"href": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"mutable": false,
|
|
34
|
+
"complexType": {
|
|
35
|
+
"original": "string",
|
|
36
|
+
"resolved": "string",
|
|
37
|
+
"references": {}
|
|
38
|
+
},
|
|
39
|
+
"required": false,
|
|
40
|
+
"optional": false,
|
|
41
|
+
"docs": {
|
|
42
|
+
"tags": [],
|
|
43
|
+
"text": ""
|
|
44
|
+
},
|
|
45
|
+
"getter": false,
|
|
46
|
+
"setter": false,
|
|
47
|
+
"attribute": "href",
|
|
48
|
+
"reflect": false
|
|
49
|
+
},
|
|
50
|
+
"target": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"mutable": false,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "'_self' | '_blank' | '_parent' | '_top'",
|
|
55
|
+
"resolved": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\"",
|
|
56
|
+
"references": {}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
},
|
|
64
|
+
"getter": false,
|
|
65
|
+
"setter": false,
|
|
66
|
+
"attribute": "target",
|
|
67
|
+
"reflect": false
|
|
68
|
+
},
|
|
69
|
+
"disabled": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "boolean",
|
|
74
|
+
"resolved": "boolean",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": ""
|
|
82
|
+
},
|
|
83
|
+
"getter": false,
|
|
84
|
+
"setter": false,
|
|
85
|
+
"attribute": "disabled",
|
|
86
|
+
"reflect": false,
|
|
87
|
+
"defaultValue": "false"
|
|
88
|
+
},
|
|
89
|
+
"size": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "'sm' | 'md' | 'lg'",
|
|
94
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": ""
|
|
102
|
+
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
105
|
+
"attribute": "size",
|
|
106
|
+
"reflect": false,
|
|
107
|
+
"defaultValue": "'md'"
|
|
108
|
+
},
|
|
109
|
+
"variant": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "'standalone' | 'inline'",
|
|
114
|
+
"resolved": "\"inline\" | \"standalone\"",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": ""
|
|
122
|
+
},
|
|
123
|
+
"getter": false,
|
|
124
|
+
"setter": false,
|
|
125
|
+
"attribute": "variant",
|
|
126
|
+
"reflect": false,
|
|
127
|
+
"defaultValue": "'inline'"
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=xv-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-link.js","sourceRoot":"","sources":["../../../src/components/xv-link/xv-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,MAAM;IALnB;QAQU,aAAQ,GAAY,KAAK,CAAC;QAC1B,SAAI,GAAuB,IAAI,CAAC;QAChC,YAAO,GAA4B,QAAQ,CAAC;KA2BrD;IAzBC,kBAAkB,CAAC,CAAe;QAChC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAE3B,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;IACtB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,WAAW,IAAI,CAAC,OAAO,EAAE;YACpC,0DACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC3C,KAAK,EAAE,WAAW,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,EACxE,MAAM,EAAE,IAAI,CAAC,MAAM;gBAEnB,6DAAM,IAAI,EAAC,WAAW,GAAQ;gBAE9B,8DAAa;gBAEb,6DAAM,IAAI,EAAC,YAAY,GAAQ,CAC7B,CACC,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'xv-link',\r\n styleUrl: 'xv-link.scss',\r\n shadow: true,\r\n})\r\nexport class XvLink {\r\n @Prop() href: string;\r\n @Prop() target: '_self' | '_blank' | '_parent' | '_top';\r\n @Prop() disabled: boolean = false;\r\n @Prop() size: 'sm' | 'md' | 'lg' = 'md';\r\n @Prop() variant: 'standalone' | 'inline' = 'inline';\r\n\r\n preventLinkHandler(e: PointerEvent) {\r\n if (!this.disabled) return;\r\n\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class={`xv-link_${this.variant}`}>\r\n <a\r\n href={this.href}\r\n onClick={this.preventLinkHandler.bind(this)}\r\n class={`xv-link ${this.disabled ? 'xv-link_disabled' : ''} ${this.size}`}\r\n target={this.target}\r\n >\r\n <slot name=\"icon-left\"></slot>\r\n\r\n <slot></slot>\r\n\r\n <slot name=\"icon-right\"></slot>\r\n </a>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class XvProgressIndicator {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.progress = 0;
|
|
5
|
+
}
|
|
6
|
+
// Update 'xv-progress-indicator-item' done status
|
|
7
|
+
updateChildItems() {
|
|
8
|
+
const items = this.el.children;
|
|
9
|
+
const itemsCount = this.el.childElementCount;
|
|
10
|
+
const progressPerItem = 100 / itemsCount;
|
|
11
|
+
if (!items.length || !itemsCount)
|
|
12
|
+
return;
|
|
13
|
+
Array.from(items).forEach((item, index) => {
|
|
14
|
+
const itemProgress = (index + 1) * progressPerItem;
|
|
15
|
+
const done = this.progress >= itemProgress;
|
|
16
|
+
item.setAttribute('done', done ? 'true' : 'false');
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
// Load initial done status
|
|
20
|
+
componentDidLoad() {
|
|
21
|
+
this.updateChildItems();
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return (h(Host, { key: 'ce7e68173d7ec806832282ada99ade50ecc54f92', class: "xv-progress-indicator" }, h("slot", { key: '5ebad467a8d1463d4e4e3fe014135cffe5e59c8b' })));
|
|
25
|
+
}
|
|
26
|
+
static get is() { return "xv-progress-indicator"; }
|
|
27
|
+
static get encapsulation() { return "shadow"; }
|
|
28
|
+
static get originalStyleUrls() {
|
|
29
|
+
return {
|
|
30
|
+
"$": ["xv-progress-indicator.scss"]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
static get styleUrls() {
|
|
34
|
+
return {
|
|
35
|
+
"$": ["xv-progress-indicator.css"]
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
static get properties() {
|
|
39
|
+
return {
|
|
40
|
+
"progress": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"mutable": false,
|
|
43
|
+
"complexType": {
|
|
44
|
+
"original": "number",
|
|
45
|
+
"resolved": "number",
|
|
46
|
+
"references": {}
|
|
47
|
+
},
|
|
48
|
+
"required": false,
|
|
49
|
+
"optional": false,
|
|
50
|
+
"docs": {
|
|
51
|
+
"tags": [],
|
|
52
|
+
"text": ""
|
|
53
|
+
},
|
|
54
|
+
"getter": false,
|
|
55
|
+
"setter": false,
|
|
56
|
+
"attribute": "progress",
|
|
57
|
+
"reflect": false,
|
|
58
|
+
"defaultValue": "0"
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static get elementRef() { return "el"; }
|
|
63
|
+
static get watchers() {
|
|
64
|
+
return [{
|
|
65
|
+
"propName": "progress",
|
|
66
|
+
"methodName": "updateChildItems"
|
|
67
|
+
}];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=xv-progress-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-progress-indicator.js","sourceRoot":"","sources":["../../../src/components/xv-progress-indicator/xv-progress-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,mBAAmB;IALhC;QAOU,aAAQ,GAAW,CAAC,CAAC;KA8B9B;IA5BC,kDAAkD;IAElD,gBAAgB;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC;QAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,iBAAiB,CAAC;QAC7C,MAAM,eAAe,GAAG,GAAG,GAAG,UAAU,CAAC;QAEzC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,UAAU;YAAE,OAAO;QAEzC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YACxC,MAAM,YAAY,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;YACnD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,YAAY,CAAC;YAC1C,IAAoB,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,2BAA2B;IAC3B,gBAAgB;QACd,IAAI,CAAC,gBAAgB,EAAE,CAAA;IACzB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAC,uBAAuB;YACjC,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Watch, Element } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'xv-progress-indicator',\r\n styleUrl: 'xv-progress-indicator.scss',\r\n shadow: true,\r\n})\r\nexport class XvProgressIndicator {\r\n @Element() el: HTMLElement;\r\n @Prop() progress: number = 0;\r\n\r\n // Update 'xv-progress-indicator-item' done status\r\n @Watch('progress')\r\n updateChildItems() {\r\n const items = this.el.children;\r\n const itemsCount = this.el.childElementCount;\r\n const progressPerItem = 100 / itemsCount;\r\n\r\n if (!items.length || !itemsCount) return;\r\n\r\n Array.from(items).forEach((item, index) => {\r\n const itemProgress = (index + 1) * progressPerItem;\r\n const done = this.progress >= itemProgress;\r\n (item as HTMLElement).setAttribute('done', done ? 'true' : 'false');\r\n });\r\n }\r\n\r\n // Load initial done status\r\n componentDidLoad() {\r\n this.updateChildItems()\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class=\"xv-progress-indicator\">\r\n <slot></slot>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
:host(.xv-progress-indicator-item) {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex: 1;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
padding: 10px 16px;
|
|
9
|
+
}
|
|
10
|
+
:host(.xv-progress-indicator-item):before {
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
:host(.xv-progress-indicator-item):before, :host(.xv-progress-indicator-item) .line {
|
|
14
|
+
content: "";
|
|
15
|
+
z-index: 1;
|
|
16
|
+
display: inline-block;
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
right: 0;
|
|
21
|
+
height: 2px;
|
|
22
|
+
color: inherit;
|
|
23
|
+
background-color: var(--border-subtle-01, grey);
|
|
24
|
+
}
|
|
25
|
+
:host(.xv-progress-indicator-item) .line {
|
|
26
|
+
width: 0;
|
|
27
|
+
color: inherit;
|
|
28
|
+
transition: width 250ms ease;
|
|
29
|
+
background-color: var(--background-brand, currentColor);
|
|
30
|
+
}
|
|
31
|
+
:host(.xv-progress-indicator-item) .icon {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
width: 22px;
|
|
36
|
+
height: 22px;
|
|
37
|
+
max-width: 22px;
|
|
38
|
+
max-height: 22px;
|
|
39
|
+
border: 2px dashed var(--border-subtle-01, currentColor);
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
}
|
|
42
|
+
:host(.xv-progress-indicator-item) .icon svg {
|
|
43
|
+
opacity: 0;
|
|
44
|
+
transition: opacity 500ms ease-in-out;
|
|
45
|
+
}
|
|
46
|
+
:host(.xv-progress-indicator-item) .label {
|
|
47
|
+
color: var(--text-primary);
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
font-style: normal;
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
line-height: 18px;
|
|
52
|
+
letter-spacing: 0.16px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host(.done) .icon {
|
|
56
|
+
border-color: var(--background-brand, currentColor);
|
|
57
|
+
color: var(--background-brand, inherit);
|
|
58
|
+
border-style: solid;
|
|
59
|
+
}
|
|
60
|
+
:host(.done) .icon svg {
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
:host(.done) .line {
|
|
64
|
+
width: 100% !important;
|
|
65
|
+
background-color: var(--background-brand, currentColor);
|
|
66
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class XvProgressIndicatorItem {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.done = false;
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
return (h(Host, { key: 'c26fd7f411c7eb2111c74011ba1217289541919b', class: `xv-progress-indicator-item ${this.done ? 'done' : ''}` }, h("span", { key: 'dbc80d2176c9ce9ba8e685888f44c5081af9d92c', class: "line" }), h("span", { key: '57937d7d83193248ac110257b01e548e7da850da', class: "icon" }, h("svg", { key: '83691b60f9f5c1521e8ee2abeafe716c2713fefe', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", width: 14, height: 14 }, h("path", { key: '7e4f043bb9e81434f448efa6e95683870952760c', fill: "currentColor", d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }))), h("p", { key: '4b0daea5e910474dd1167c5ed70159169c317b63', class: "label" }, h("slot", { key: '2a2afe80a3070f53d6d6d9a71a6ea7c4869cd4cd' }))));
|
|
8
|
+
}
|
|
9
|
+
static get is() { return "xv-progress-indicator-item"; }
|
|
10
|
+
static get encapsulation() { return "shadow"; }
|
|
11
|
+
static get originalStyleUrls() {
|
|
12
|
+
return {
|
|
13
|
+
"$": ["xv-progress-indicator-item.scss"]
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
static get styleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["xv-progress-indicator-item.css"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get properties() {
|
|
22
|
+
return {
|
|
23
|
+
"done": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"mutable": false,
|
|
26
|
+
"complexType": {
|
|
27
|
+
"original": "boolean",
|
|
28
|
+
"resolved": "boolean",
|
|
29
|
+
"references": {}
|
|
30
|
+
},
|
|
31
|
+
"required": false,
|
|
32
|
+
"optional": false,
|
|
33
|
+
"docs": {
|
|
34
|
+
"tags": [],
|
|
35
|
+
"text": ""
|
|
36
|
+
},
|
|
37
|
+
"getter": false,
|
|
38
|
+
"setter": false,
|
|
39
|
+
"attribute": "done",
|
|
40
|
+
"reflect": false,
|
|
41
|
+
"defaultValue": "false"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get elementRef() { return "el"; }
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=xv-progress-indicator-item.js.map
|
package/dist/collection/components/xv-progress-indicator-item/xv-progress-indicator-item.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-progress-indicator-item.js","sourceRoot":"","sources":["../../../src/components/xv-progress-indicator-item/xv-progress-indicator-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOlE,MAAM,OAAO,uBAAuB;IALpC;QAO4B,SAAI,GAAY,KAAK,CAAC;KAuBjD;IArBC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,8BAA8B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;YAClE,6DAAM,KAAK,EAAC,MAAM,GAAE;YACpB,6DAAM,KAAK,EAAC,MAAM;gBAChB,4DACE,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE;oBAEN,6DACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,sLAAsL,GACxL,CACF,CACD;YACP,0DAAG,KAAK,EAAC,OAAO;gBAAC,8DAAO,CAAI,CACvB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'xv-progress-indicator-item',\r\n styleUrl: 'xv-progress-indicator-item.scss',\r\n shadow: true,\r\n})\r\nexport class XvProgressIndicatorItem {\r\n @Element() el: HTMLElement;\r\n @Prop({ reflect: false }) done: boolean = false;\r\n\r\n render() {\r\n return (\r\n <Host class={`xv-progress-indicator-item ${this.done ? 'done' : ''}`}>\r\n <span class=\"line\"/>\r\n <span class=\"icon\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 448 512\"\r\n width={14}\r\n height={14}\r\n >\r\n <path\r\n fill=\"currentColor\"\r\n d=\"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z\"\r\n />\r\n </svg>\r\n </span>\r\n <p class=\"label\"><slot/></p>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
:host {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
border-radius: 1000px;
|
|
7
|
+
background-color: var(--background);
|
|
8
|
+
color: var(--text-primary);
|
|
9
|
+
font-family: var(--ff-body, inherit);
|
|
10
|
+
}
|
|
11
|
+
:host .xv-tag_content {
|
|
12
|
+
padding-left: 8px;
|
|
13
|
+
padding-right: 8px;
|
|
14
|
+
color: inherit;
|
|
15
|
+
font-family: var(--ff-body);
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
line-height: 16px;
|
|
19
|
+
letter-spacing: 0.32px;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
text-overflow: ellipsis;
|
|
23
|
+
}
|
|
24
|
+
:host .xv-tag_close {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
border: none;
|
|
28
|
+
background-color: inherit;
|
|
29
|
+
outline: none;
|
|
30
|
+
border-spacing: 0;
|
|
31
|
+
list-style: none outside none;
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
border-radius: 62px;
|
|
38
|
+
width: 15px;
|
|
39
|
+
height: 15px;
|
|
40
|
+
text-align: left;
|
|
41
|
+
color: inherit;
|
|
42
|
+
text-indent: 0;
|
|
43
|
+
transition: opacity 300ms ease-in-out, filter 300ms ease-in-out;
|
|
44
|
+
}
|
|
45
|
+
:host .xv-tag_close:hover {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
filter: brightness(80%);
|
|
48
|
+
}
|
|
49
|
+
:host .xv-tag_close:active {
|
|
50
|
+
opacity: 0.7;
|
|
51
|
+
}
|
|
52
|
+
:host .xv-tag_close:focus {
|
|
53
|
+
outline: 1px solid currentColor;
|
|
54
|
+
}
|
|
55
|
+
:host .xv-tag_close:after {
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
width: inherit;
|
|
58
|
+
height: inherit;
|
|
59
|
+
color: inherit;
|
|
60
|
+
font-size: 16px;
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
content: "×";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host(.sm) {
|
|
68
|
+
font-size: var(--fz-sm);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host(.md) {
|
|
72
|
+
font-size: var(--fz-md);
|
|
73
|
+
}
|
|
74
|
+
:host(.md) .xv-tag_content {
|
|
75
|
+
line-height: 24px;
|
|
76
|
+
}
|
|
77
|
+
:host(.md) .xv-tag_close {
|
|
78
|
+
height: 24px;
|
|
79
|
+
width: 24px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host(.lg) {
|
|
83
|
+
font-size: var(--fz-lg);
|
|
84
|
+
}
|
|
85
|
+
:host(.lg) .xv-tag_content {
|
|
86
|
+
line-height: 26px;
|
|
87
|
+
}
|
|
88
|
+
:host(.lg) .xv-tag_close {
|
|
89
|
+
height: 26px;
|
|
90
|
+
width: 26px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host(.disabled) {
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
background-color: var(--layer-01);
|
|
96
|
+
color: var(--text-disabled);
|
|
97
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class XvTag {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.size = 'md';
|
|
5
|
+
this.color = '';
|
|
6
|
+
this.bg = '';
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
this.closeable = false;
|
|
9
|
+
}
|
|
10
|
+
closeHandler(e) {
|
|
11
|
+
if (this.disabled)
|
|
12
|
+
return;
|
|
13
|
+
this.closeClick.emit(e);
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, { key: 'a80efe5ce83faee34abb8f23956e0a5dad597734', style: { color: this.color, background: this.bg }, class: `xv-tag ${this.disabled ? 'disabled' : ''} ${this.size}` }, h("div", { key: 'def67b2d9a6638de4941b071e529c41daf8150b0', class: "xv-tag_content" }, h("slot", { key: '0489ac38e1eea6a1ba186b78b2e17637650c4c2d' })), this.closeable && (h("button", { key: 'be5108f430f4f4d11d76a4b88a69ca2997a2c939', onClick: this.closeHandler.bind(this), class: "xv-tag_close" }))));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "xv-tag"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get originalStyleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["xv-tag.scss"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get styleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["xv-tag.css"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get properties() {
|
|
31
|
+
return {
|
|
32
|
+
"size": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"mutable": false,
|
|
35
|
+
"complexType": {
|
|
36
|
+
"original": "'sm' | 'md' | 'lg'",
|
|
37
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
38
|
+
"references": {}
|
|
39
|
+
},
|
|
40
|
+
"required": false,
|
|
41
|
+
"optional": false,
|
|
42
|
+
"docs": {
|
|
43
|
+
"tags": [],
|
|
44
|
+
"text": ""
|
|
45
|
+
},
|
|
46
|
+
"getter": false,
|
|
47
|
+
"setter": false,
|
|
48
|
+
"attribute": "size",
|
|
49
|
+
"reflect": false,
|
|
50
|
+
"defaultValue": "'md'"
|
|
51
|
+
},
|
|
52
|
+
"color": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": ""
|
|
65
|
+
},
|
|
66
|
+
"getter": false,
|
|
67
|
+
"setter": false,
|
|
68
|
+
"attribute": "color",
|
|
69
|
+
"reflect": false,
|
|
70
|
+
"defaultValue": "''"
|
|
71
|
+
},
|
|
72
|
+
"bg": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "string",
|
|
77
|
+
"resolved": "string",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": false,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": ""
|
|
85
|
+
},
|
|
86
|
+
"getter": false,
|
|
87
|
+
"setter": false,
|
|
88
|
+
"attribute": "bg",
|
|
89
|
+
"reflect": false,
|
|
90
|
+
"defaultValue": "''"
|
|
91
|
+
},
|
|
92
|
+
"disabled": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"mutable": false,
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "boolean",
|
|
97
|
+
"resolved": "boolean",
|
|
98
|
+
"references": {}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": ""
|
|
105
|
+
},
|
|
106
|
+
"getter": false,
|
|
107
|
+
"setter": false,
|
|
108
|
+
"attribute": "disabled",
|
|
109
|
+
"reflect": false,
|
|
110
|
+
"defaultValue": "false"
|
|
111
|
+
},
|
|
112
|
+
"closeable": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"mutable": false,
|
|
115
|
+
"complexType": {
|
|
116
|
+
"original": "boolean",
|
|
117
|
+
"resolved": "boolean",
|
|
118
|
+
"references": {}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": false,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": ""
|
|
125
|
+
},
|
|
126
|
+
"getter": false,
|
|
127
|
+
"setter": false,
|
|
128
|
+
"attribute": "closeable",
|
|
129
|
+
"reflect": false,
|
|
130
|
+
"defaultValue": "false"
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
static get events() {
|
|
135
|
+
return [{
|
|
136
|
+
"method": "closeClick",
|
|
137
|
+
"name": "closeClick",
|
|
138
|
+
"bubbles": true,
|
|
139
|
+
"cancelable": true,
|
|
140
|
+
"composed": true,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "PointerEvent",
|
|
147
|
+
"resolved": "PointerEvent",
|
|
148
|
+
"references": {
|
|
149
|
+
"PointerEvent": {
|
|
150
|
+
"location": "global",
|
|
151
|
+
"id": "global::PointerEvent"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=xv-tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-tag.js","sourceRoot":"","sources":["../../../src/components/xv-tag/xv-tag.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAO9E,MAAM,OAAO,KAAK;IALlB;QAMU,SAAI,GAAuB,IAAI,CAAC;QAChC,UAAK,GAAW,EAAE,CAAC;QACnB,OAAE,GAAW,EAAE,CAAC;QAChB,aAAQ,GAAY,KAAK,CAAC;QAC1B,cAAS,GAAY,KAAK,CAAC;KAwBpC;IArBC,YAAY,CAAC,CAAe;QAC1B,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAE1B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE,EACjD,KAAK,EAAE,UAAU,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE;YAE/D,4DAAK,KAAK,EAAC,gBAAgB;gBACzB,8DAAa,CACT;YACL,IAAI,CAAC,SAAS,IAAI,CACjB,+DAAQ,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAC,cAAc,GAAU,CAC9E,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'xv-tag',\r\n styleUrl: 'xv-tag.scss',\r\n shadow: true,\r\n})\r\nexport class XvTag {\r\n @Prop() size: 'sm' | 'md' | 'lg' = 'md';\r\n @Prop() color: string = '';\r\n @Prop() bg: string = '';\r\n @Prop() disabled: boolean = false;\r\n @Prop() closeable: boolean = false;\r\n @Event() closeClick: EventEmitter<PointerEvent>;\r\n\r\n closeHandler(e: PointerEvent) {\r\n if (this.disabled) return;\r\n\r\n this.closeClick.emit(e);\r\n }\r\n\r\n render() {\r\n return (\r\n <Host\r\n style={{ color: this.color, background: this.bg }}\r\n class={`xv-tag ${this.disabled ? 'disabled' : ''} ${this.size}`}\r\n >\r\n <div class=\"xv-tag_content\">\r\n <slot></slot>\r\n </div>\r\n {this.closeable && (\r\n <button onClick={this.closeHandler.bind(this)} class=\"xv-tag_close\"></button>\r\n )}\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|