xv-webcomponents 0.1.10 → 0.1.12
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/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/index-4d938647.js +1483 -0
- package/dist/cjs/index-4d938647.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- 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 +27 -0
- package/dist/cjs/xv-webcomponents.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +22 -0
- 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 +116 -0
- package/dist/collection/components/xv-button/xv-button.js.map +1 -0
- 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/{xv-webcomponents/xv-checkbox-v2.entry.js → collection/components/xv-checkbox/xv-checkbox.js} +7 -12
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -0
- 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/index.js +11 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/utils.js +7 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/esm/index-60f5a964.js +1454 -0
- package/dist/esm/index-60f5a964.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.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/{xv-webcomponents → esm}/xv-breadcrumbs.entry.js +3 -2
- package/dist/esm/xv-breadcrumbs.entry.js.map +1 -0
- package/dist/esm/xv-webcomponents.js +22 -0
- package/dist/esm/xv-webcomponents.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/xv-webcomponents/index.esm.js +1 -12
- 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/p-e1255160.js +2 -0
- package/dist/xv-webcomponents/p-e1255160.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -48
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/xv-webcomponents/index-7b4633e7.js +0 -3971
- package/dist/xv-webcomponents/index-7b4633e7.js.map +0 -1
- package/dist/xv-webcomponents/xv-accordion-item.entry.js +0 -35
- package/dist/xv-webcomponents/xv-accordion-item.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-accordion.entry.js +0 -40
- package/dist/xv-webcomponents/xv-accordion.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-breadcrumbs.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-button-v2.entry.js +0 -31
- package/dist/xv-webcomponents/xv-button-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-card.entry.js +0 -18
- package/dist/xv-webcomponents/xv-card.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-checkbox-v2.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-link.entry.js +0 -26
- package/dist/xv-webcomponents/xv-link.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-progress-indicator-item.entry.js +0 -19
- package/dist/xv-webcomponents/xv-progress-indicator-item.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-progress-indicator.entry.js +0 -39
- package/dist/xv-webcomponents/xv-progress-indicator.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-tag.entry.js +0 -28
- package/dist/xv-webcomponents/xv-tag.entry.js.map +0 -1
- package/dist/xv-webcomponents/xv-tooltip.entry.js +0 -23
- package/dist/xv-webcomponents/xv-tooltip.entry.js.map +0 -1
- /package/dist/{xv-webcomponents → esm}/app-globals-0f993ce5.js +0 -0
- /package/dist/{xv-webcomponents → esm}/app-globals-0f993ce5.js.map +0 -0
- /package/dist/{xv-webcomponents → esm}/utils-9bb6333b.js +0 -0
- /package/dist/{xv-webcomponents → esm}/utils-9bb6333b.js.map +0 -0
|
@@ -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"]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* General styles for tooltip */
|
|
8
|
+
:host::before,
|
|
9
|
+
:host::after {
|
|
10
|
+
position: absolute;
|
|
11
|
+
opacity: 0;
|
|
12
|
+
visibility: hidden;
|
|
13
|
+
transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
|
|
14
|
+
z-index: 10;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Tooltip */
|
|
18
|
+
:host::before {
|
|
19
|
+
content: attr(tooltip);
|
|
20
|
+
background: var(--background-inverse, #333);
|
|
21
|
+
color: var(--icon-inverse, #fff);
|
|
22
|
+
padding: var(--gap-sm, 5px) var(--gap-md, 16px);
|
|
23
|
+
border-radius: 2px;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
max-width: 70vw;
|
|
28
|
+
font-family: var(--fz-body, Tahoma);
|
|
29
|
+
font-size: var(fz-md, 14px);
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
line-height: 18px;
|
|
32
|
+
letter-spacing: 0.16px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Arrow */
|
|
36
|
+
:host::after {
|
|
37
|
+
content: "";
|
|
38
|
+
border: 6px solid transparent;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Show Tooltip and arrow */
|
|
42
|
+
:host(:hover)::before,
|
|
43
|
+
:host(:hover)::after,
|
|
44
|
+
:host(:focus)::before,
|
|
45
|
+
:host(:focus)::after {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
visibility: visible;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Tooltip positions */
|
|
51
|
+
:host(.xv-tooltip_top)::before {
|
|
52
|
+
bottom: 100%;
|
|
53
|
+
left: 50%;
|
|
54
|
+
transform: translateX(-50%) translateY(-5px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host(.xv-tooltip_top)::after {
|
|
58
|
+
bottom: 100%;
|
|
59
|
+
left: 50%;
|
|
60
|
+
border-top-color: var(--background-inverse, #333);
|
|
61
|
+
transform: translateX(-50%) translateY(5px);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host(.xv-tooltip_top-left)::before {
|
|
65
|
+
bottom: 100%;
|
|
66
|
+
left: 0;
|
|
67
|
+
transform: translateY(-5px);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host(.xv-tooltip_top-left)::after {
|
|
71
|
+
bottom: 100%;
|
|
72
|
+
left: 10px;
|
|
73
|
+
border-top-color: black;
|
|
74
|
+
transform: translateY(5px);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host(.xv-tooltip_top-right)::before {
|
|
78
|
+
bottom: 100%;
|
|
79
|
+
right: 0;
|
|
80
|
+
transform: translateY(-5px);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host(.xv-tooltip_top-right)::after {
|
|
84
|
+
bottom: 100%;
|
|
85
|
+
right: 10px;
|
|
86
|
+
border-top-color: var(--background-inverse, #333);
|
|
87
|
+
transform: translateY(5px);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host(.xv-tooltip_bottom)::before {
|
|
91
|
+
top: 100%;
|
|
92
|
+
left: 50%;
|
|
93
|
+
transform: translateX(-50%) translateY(5px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host(.xv-tooltip_bottom)::after {
|
|
97
|
+
top: 100%;
|
|
98
|
+
left: 50%;
|
|
99
|
+
border-bottom-color: black;
|
|
100
|
+
transform: translateX(-50%) translateY(-5px);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:host(.xv-tooltip_bottom-left)::before {
|
|
104
|
+
top: 100%;
|
|
105
|
+
left: 0;
|
|
106
|
+
transform: translateY(5px);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:host(.xv-tooltip_bottom-left)::after {
|
|
110
|
+
top: 100%;
|
|
111
|
+
left: 10px;
|
|
112
|
+
border-bottom-color: var(--background-inverse, #333);
|
|
113
|
+
transform: translateY(-5px);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host(.xv-tooltip_bottom-right)::before {
|
|
117
|
+
top: 100%;
|
|
118
|
+
right: 0;
|
|
119
|
+
transform: translateY(5px);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:host(.xv-tooltip_bottom-right)::after {
|
|
123
|
+
top: 100%;
|
|
124
|
+
right: 10px;
|
|
125
|
+
border-bottom-color: var(--background-inverse, #333);
|
|
126
|
+
transform: translateY(-5px);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:host(.xv-tooltip_left)::before {
|
|
130
|
+
right: 100%;
|
|
131
|
+
top: 50%;
|
|
132
|
+
transform: translateY(-50%) translateX(-5px);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host(.xv-tooltip_left)::after {
|
|
136
|
+
right: 100%;
|
|
137
|
+
top: 50%;
|
|
138
|
+
border-left-color: var(--background-inverse, #333);
|
|
139
|
+
transform: translateY(-50%) translateX(5px);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:host(.xv-tooltip_right)::before {
|
|
143
|
+
left: 100%;
|
|
144
|
+
top: 50%;
|
|
145
|
+
transform: translateY(-50%) translateX(5px);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:host(.xv-tooltip_right)::after {
|
|
149
|
+
left: 100%;
|
|
150
|
+
top: 50%;
|
|
151
|
+
border-right-color: var(--background-inverse, #333);
|
|
152
|
+
transform: translateY(-50%) translateX(-5px);
|
|
153
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class XvTooltip {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Tooltip and arrow position related to element
|
|
6
|
+
* possible options: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right'.
|
|
7
|
+
* By default, "top"
|
|
8
|
+
*/
|
|
9
|
+
this.position = 'top';
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, { key: 'd91cba6a2425ac5188d0c3908d670887849ddf9b', tooltip: this.message, class: `xv-tooltip_${this.position}` }, h("slot", { key: 'f8b284b78d72f5a1e53880173e9df9a286e4ab59' }, h("svg", { key: '2b3dc074585eff9515c3383dd1415f7655425c0e', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: 16, height: 16 }, h("path", { key: 'd2d1e7eb69b531ae9212ee6da186628f57482317', fill: "currentColor", d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-88c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l24 0 0 64-24 0zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" })))));
|
|
13
|
+
}
|
|
14
|
+
static get is() { return "xv-tooltip"; }
|
|
15
|
+
static get encapsulation() { return "shadow"; }
|
|
16
|
+
static get originalStyleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["xv-tooltip.scss"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get styleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["xv-tooltip.css"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get properties() {
|
|
27
|
+
return {
|
|
28
|
+
"message": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"mutable": false,
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "string",
|
|
33
|
+
"resolved": "string",
|
|
34
|
+
"references": {}
|
|
35
|
+
},
|
|
36
|
+
"required": false,
|
|
37
|
+
"optional": false,
|
|
38
|
+
"docs": {
|
|
39
|
+
"tags": [],
|
|
40
|
+
"text": "Message what will be shown for tooltip *"
|
|
41
|
+
},
|
|
42
|
+
"getter": false,
|
|
43
|
+
"setter": false,
|
|
44
|
+
"attribute": "message",
|
|
45
|
+
"reflect": false
|
|
46
|
+
},
|
|
47
|
+
"position": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right'",
|
|
52
|
+
"resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"left\" | \"right\" | \"top\" | \"top-left\" | \"top-right\"",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": "Tooltip and arrow position related to element\r\npossible options: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right'.\r\nBy default, \"top\""
|
|
60
|
+
},
|
|
61
|
+
"getter": false,
|
|
62
|
+
"setter": false,
|
|
63
|
+
"attribute": "position",
|
|
64
|
+
"reflect": false,
|
|
65
|
+
"defaultValue": "'top'"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=xv-tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-tooltip.js","sourceRoot":"","sources":["../../../src/components/xv-tooltip/xv-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,SAAS;IALtB;QAQE;;;;WAIG;QACK,aAAQ,GAAoG,KAAK,CAAC;KAgB3H;IAdC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,IAAI,CAAC,QAAQ,EAAE;YAC/D;gBACE,4DAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;oBACjF,6DACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,yTAAyT,GAC3T,CACE,CACD,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'xv-tooltip',\r\n styleUrl: 'xv-tooltip.scss',\r\n shadow: true,\r\n})\r\nexport class XvTooltip {\r\n /** Message what will be shown for tooltip **/\r\n @Prop() message: string;\r\n /**\r\n * Tooltip and arrow position related to element\r\n * possible options: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right'.\r\n * By default, \"top\"\r\n */\r\n @Prop() position: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right' = 'top';\r\n\r\n render() {\r\n return (\r\n <Host tooltip={this.message} class={`xv-tooltip_${this.position}`}>\r\n <slot>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" width={16} height={16}>\r\n <path\r\n fill=\"currentColor\"\r\n d=\"M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-88c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l24 0 0 64-24 0zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z\"\r\n />\r\n </svg>\r\n </slot>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview entry point for your component library
|
|
3
|
+
*
|
|
4
|
+
* This is the entry point for your component library. Use this file to export utilities,
|
|
5
|
+
* constants or data structure that accompany your components.
|
|
6
|
+
*
|
|
7
|
+
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
8
|
+
* to consume components of this package as outlined in the `README.md`.
|
|
9
|
+
*/
|
|
10
|
+
export { format } from './utils/utils';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC","sourcesContent":["/**\r\n * @fileoverview entry point for your component library\r\n *\r\n * This is the entry point for your component library. Use this file to export utilities,\r\n * constants or data structure that accompany your components.\r\n *\r\n * DO NOT use this file to export your components. Instead, use the recommended approaches\r\n * to consume components of this package as outlined in the `README.md`.\r\n */\r\n\r\nexport { format } from './utils/utils';\r\nexport type * from './components.d.ts';\r\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function format(first, middle, last) {
|
|
2
|
+
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
3
|
+
}
|
|
4
|
+
export function uidGenerator() {
|
|
5
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c => (+c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,MAAe,EAAE,IAAa;IACnE,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjF,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,sCAAsC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAClE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAChF,CAAC;AACJ,CAAC","sourcesContent":["export function format(first?: string, middle?: string, last?: string): string {\r\n return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');\r\n}\r\n\r\nexport function uidGenerator() {\r\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, c =>\r\n (+c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +c / 4).toString(16)\r\n );\r\n}\r\n"]}
|