xv-webcomponents 0.1.39 → 0.1.42
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/{index-D41mMXvd.js → index-MLh9SbX2.js} +349 -8
- package/dist/cjs/index-MLh9SbX2.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{xv-accordion-v2_27.cjs.entry.js → xv-accordion-v2_34.cjs.entry.js} +2323 -97
- package/dist/cjs/xv-accordion-v2_34.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +1 -1
- package/dist/cjs/xv-webcomponents.cjs.js +3 -3
- package/dist/cjs/xv-webcomponents.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/xv-button/xv-button-v2.css +136 -118
- package/dist/collection/components/xv-button/xv-button.js +132 -67
- package/dist/collection/components/xv-button/xv-button.js.map +1 -1
- package/dist/collection/components/xv-card/xv-card.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +3 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +1 -1
- package/dist/collection/components/xv-data-table/_vars.js +3 -0
- package/dist/collection/components/xv-data-table/_vars.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.css +90 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +182 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.css +7 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js +101 -0
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.css +71 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +354 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table.css +104 -0
- package/dist/collection/components/xv-data-table/xv-data-table.js +114 -0
- package/dist/collection/components/xv-data-table/xv-data-table.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +6 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +20 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
- package/dist/collection/components/xv-file-uploader/_vars.js +6 -0
- package/dist/collection/components/xv-file-uploader/_vars.js.map +1 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.css +136 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +448 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js.map +1 -0
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.js +1 -1
- package/dist/collection/components/xv-link/xv-link.css +1 -0
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-notification/xv-notification.css +1 -0
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-number-input/xv-number-input.css +128 -0
- package/dist/collection/components/xv-number-input/xv-number-input.js +373 -0
- package/dist/collection/components/xv-number-input/xv-number-input.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +1 -1
- package/dist/collection/components/xv-table/_vars.js +0 -6
- package/dist/collection/components/xv-table/_vars.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +4 -4
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +1 -1
- package/dist/collection/components/xv-table/xv-table.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tabs.js +1 -2
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-text-input/xv-text-input.css +110 -89
- package/dist/collection/components/xv-text-input/xv-text-input.js +113 -80
- package/dist/collection/components/xv-text-input/xv-text-input.js.map +1 -1
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.css +95 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +201 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js.map +1 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +31 -147
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +59 -34
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -1
- package/dist/collection/types/enum.js +6 -0
- package/dist/collection/types/enum.js.map +1 -1
- package/dist/esm/{index-Datpns0U.js → index-DLYJiP99.js} +349 -8
- package/dist/esm/index-DLYJiP99.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{xv-accordion-v2_27.entry.js → xv-accordion-v2_34.entry.js} +2317 -98
- package/dist/esm/xv-accordion-v2_34.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +1 -1
- package/dist/esm/xv-webcomponents.js +4 -4
- package/dist/esm/xv-webcomponents.js.map +1 -1
- package/dist/types/components/xv-button/xv-button.d.ts +21 -12
- package/dist/types/components/xv-data-table/_vars.d.ts +11 -0
- package/dist/types/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.d.ts +13 -0
- package/dist/types/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.d.ts +9 -0
- package/dist/types/components/xv-data-table/xv-data-table-row/xv-data-table-row.d.ts +25 -0
- package/dist/types/components/xv-data-table/xv-data-table.d.ts +9 -0
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +1 -0
- package/dist/types/components/xv-file-uploader/_vars.d.ts +4 -0
- package/dist/types/components/xv-file-uploader/xv-file-uploader.d.ts +36 -0
- package/dist/types/components/xv-number-input/xv-number-input.d.ts +26 -0
- package/dist/types/components/xv-table/_vars.d.ts +1 -5
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +2 -1
- package/dist/types/components/xv-text-input/xv-text-input.d.ts +10 -11
- package/dist/types/components/xv-toggle-tip/xv-toggle-tip.d.ts +19 -0
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +10 -8
- package/dist/types/components.d.ts +761 -53
- package/dist/types/types/enum.d.ts +5 -0
- package/dist/xv-webcomponents/{p-054f5d59.entry.js → p-5b63a259.entry.js} +2 -2
- package/dist/xv-webcomponents/p-9c06f44c.entry.js +2 -0
- package/dist/xv-webcomponents/p-9c06f44c.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-DLYJiP99.js +3 -0
- package/dist/xv-webcomponents/p-DLYJiP99.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 +6 -4
- package/dist/cjs/index-D41mMXvd.js.map +0 -1
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js.map +0 -1
- package/dist/collection/components/xv-text-input/_vars.js +0 -7
- package/dist/collection/components/xv-text-input/_vars.js.map +0 -1
- package/dist/esm/index-Datpns0U.js.map +0 -1
- package/dist/esm/xv-accordion-v2_27.entry.js.map +0 -1
- package/dist/types/components/xv-text-input/_vars.d.ts +0 -5
- package/dist/xv-webcomponents/p-6a4cc790.entry.js +0 -2
- package/dist/xv-webcomponents/p-6a4cc790.entry.js.map +0 -1
- package/dist/xv-webcomponents/p-Datpns0U.js +0 -3
- package/dist/xv-webcomponents/p-Datpns0U.js.map +0 -1
- /package/dist/xv-webcomponents/{p-054f5d59.entry.js.map → p-5b63a259.entry.js.map} +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { createPopper } from "@popperjs/core";
|
|
3
|
+
export class XvToggleTip {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.open = false;
|
|
6
|
+
this.position = 'auto';
|
|
7
|
+
this.destroyPopper = () => {
|
|
8
|
+
if (this.popperInstance) {
|
|
9
|
+
this.popperInstance.destroy();
|
|
10
|
+
this.popperInstance = undefined;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
openChangeHandle() {
|
|
15
|
+
if (this.open) {
|
|
16
|
+
requestAnimationFrame(() => this.createPopper());
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
this.destroyPopper();
|
|
20
|
+
}
|
|
21
|
+
this.openChange.emit(this.open);
|
|
22
|
+
}
|
|
23
|
+
handleClickOutside(e) {
|
|
24
|
+
if (this.open && !this.el.contains(e.target)) {
|
|
25
|
+
this.open = false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
;
|
|
29
|
+
handleKeyDown(e) {
|
|
30
|
+
if (e.key === 'Escape' && this.open) {
|
|
31
|
+
this.open = false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
async setPopover(open) {
|
|
36
|
+
if (open === this.open)
|
|
37
|
+
return;
|
|
38
|
+
this.open = open;
|
|
39
|
+
return this.open;
|
|
40
|
+
}
|
|
41
|
+
;
|
|
42
|
+
createPopper() {
|
|
43
|
+
if (!this.triggerEl || !this.popoverEl) {
|
|
44
|
+
console.warn('XvToggleTip can`t find the trigger or popover container!');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.popperInstance = createPopper(this.triggerEl, this.popoverEl, {
|
|
48
|
+
placement: this.position,
|
|
49
|
+
modifiers: [
|
|
50
|
+
{
|
|
51
|
+
name: 'offset',
|
|
52
|
+
options: {
|
|
53
|
+
offset: [0, 8],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'preventOverflow',
|
|
58
|
+
options: {
|
|
59
|
+
boundary: 'viewport',
|
|
60
|
+
padding: 8,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
;
|
|
67
|
+
render() {
|
|
68
|
+
return (h(Host, { key: '7b125738966144a7fdafe1ae26d77b72085b8003', class: "xv-toggle-tip" }, h("div", { key: '0fefcfc966714aa98d98672a1727aa2fc6bfadf2', class: "trigger", role: "button", tabindex: "0", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": "popover", onClick: () => this.setPopover(!this.open), ref: (el) => (this.triggerEl = el) }, h("slot", { key: '752b5bf8be01660d12a6911e4a594c69da6b1e0c', name: "trigger" }, h("svg", { key: '6a594cfd8a4ff05d30d70fdda25a01157f6f94ee', class: "trigger_icon", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: 16, height: 16 }, h("path", { key: '133a8b6e0f4d04e3c4df60209517191d5fd508fe', 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" })))), h("div", { key: 'ee2d9238662f276f76669353139a25867708f625', class: { popover: true }, role: "tooltip", tabindex: "-1", ref: (el) => (this.popoverEl = el) }, h("div", { key: '3c9f9455849855757051aeeac26cba84123f6f7d', class: "popover-tip", part: "tip", "data-popper-arrow": "" }), h("div", { key: 'cfb0da55d009997e002f072b7ff36efaf14fb06f', class: "popover-content" }, h("slot", { key: 'f2dc06851b50ed5002f819e018f2bf191011fbf3', name: "header" }), h("slot", { key: '2dc5b57ffd60fa4586dc43b3e9534e4ede376199', name: "body" }), h("slot", { key: '1c236e27d751fd957fdeaf2605d8b24495b59daf', name: "footer" })))));
|
|
69
|
+
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
this.destroyPopper();
|
|
72
|
+
}
|
|
73
|
+
static get is() { return "xv-toggle-tip"; }
|
|
74
|
+
static get encapsulation() { return "shadow"; }
|
|
75
|
+
static get originalStyleUrls() {
|
|
76
|
+
return {
|
|
77
|
+
"$": ["xv-toggle-tip.scss"]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static get styleUrls() {
|
|
81
|
+
return {
|
|
82
|
+
"$": ["xv-toggle-tip.css"]
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
static get properties() {
|
|
86
|
+
return {
|
|
87
|
+
"open": {
|
|
88
|
+
"type": "boolean",
|
|
89
|
+
"attribute": "open",
|
|
90
|
+
"mutable": true,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "boolean",
|
|
93
|
+
"resolved": "boolean",
|
|
94
|
+
"references": {}
|
|
95
|
+
},
|
|
96
|
+
"required": false,
|
|
97
|
+
"optional": false,
|
|
98
|
+
"docs": {
|
|
99
|
+
"tags": [],
|
|
100
|
+
"text": ""
|
|
101
|
+
},
|
|
102
|
+
"getter": false,
|
|
103
|
+
"setter": false,
|
|
104
|
+
"reflect": true,
|
|
105
|
+
"defaultValue": "false"
|
|
106
|
+
},
|
|
107
|
+
"position": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"attribute": "position",
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "Placement",
|
|
113
|
+
"resolved": "\"auto\" | \"auto-end\" | \"auto-start\" | \"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
114
|
+
"references": {
|
|
115
|
+
"Placement": {
|
|
116
|
+
"location": "import",
|
|
117
|
+
"path": "@popperjs/core",
|
|
118
|
+
"id": "node_modules::Placement"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": ""
|
|
127
|
+
},
|
|
128
|
+
"getter": false,
|
|
129
|
+
"setter": false,
|
|
130
|
+
"reflect": false,
|
|
131
|
+
"defaultValue": "'auto'"
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
static get events() {
|
|
136
|
+
return [{
|
|
137
|
+
"method": "openChange",
|
|
138
|
+
"name": "openChange",
|
|
139
|
+
"bubbles": true,
|
|
140
|
+
"cancelable": true,
|
|
141
|
+
"composed": true,
|
|
142
|
+
"docs": {
|
|
143
|
+
"tags": [],
|
|
144
|
+
"text": ""
|
|
145
|
+
},
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "boolean",
|
|
148
|
+
"resolved": "boolean",
|
|
149
|
+
"references": {}
|
|
150
|
+
}
|
|
151
|
+
}];
|
|
152
|
+
}
|
|
153
|
+
static get methods() {
|
|
154
|
+
return {
|
|
155
|
+
"setPopover": {
|
|
156
|
+
"complexType": {
|
|
157
|
+
"signature": "(open: boolean) => Promise<boolean>",
|
|
158
|
+
"parameters": [{
|
|
159
|
+
"name": "open",
|
|
160
|
+
"type": "boolean",
|
|
161
|
+
"docs": ""
|
|
162
|
+
}],
|
|
163
|
+
"references": {
|
|
164
|
+
"Promise": {
|
|
165
|
+
"location": "global",
|
|
166
|
+
"id": "global::Promise"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"return": "Promise<boolean>"
|
|
170
|
+
},
|
|
171
|
+
"docs": {
|
|
172
|
+
"text": "",
|
|
173
|
+
"tags": []
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
static get elementRef() { return "el"; }
|
|
179
|
+
static get watchers() {
|
|
180
|
+
return [{
|
|
181
|
+
"propName": "open",
|
|
182
|
+
"methodName": "openChangeHandle"
|
|
183
|
+
}];
|
|
184
|
+
}
|
|
185
|
+
static get listeners() {
|
|
186
|
+
return [{
|
|
187
|
+
"name": "click",
|
|
188
|
+
"method": "handleClickOutside",
|
|
189
|
+
"target": "document",
|
|
190
|
+
"capture": false,
|
|
191
|
+
"passive": false
|
|
192
|
+
}, {
|
|
193
|
+
"name": "keydown",
|
|
194
|
+
"method": "handleKeyDown",
|
|
195
|
+
"target": undefined,
|
|
196
|
+
"capture": false,
|
|
197
|
+
"passive": false
|
|
198
|
+
}];
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=xv-toggle-tip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-toggle-tip.js","sourceRoot":"","sources":["../../../src/components/xv-toggle-tip/xv-toggle-tip.tsx"],"names":[],"mappings":"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","sourcesContent":["import { h, Event, Prop, Listen, Watch, Method, Element, Component, Host, EventEmitter } from '@stencil/core';\nimport { createPopper, Instance, Placement } from '@popperjs/core';\n\n@Component({\n tag: 'xv-toggle-tip',\n styleUrl: 'xv-toggle-tip.scss',\n shadow: true,\n})\nexport class XvToggleTip {\n @Element() el: HTMLElement;\n\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n @Prop() position: Placement = 'auto';\n @Event({ eventName: 'openChange' }) openChange: EventEmitter<boolean>;\n\n private triggerEl!: HTMLElement;\n private popoverEl!: HTMLElement;\n private popperInstance?: Instance;\n\n @Watch('open')\n openChangeHandle() {\n if (this.open) {\n requestAnimationFrame(() => this.createPopper());\n } else {\n this.destroyPopper();\n }\n this.openChange.emit(this.open);\n }\n\n @Listen('click', { target: 'document' })\n handleClickOutside(e: MouseEvent) {\n if (this.open && !this.el.contains(e.target as Node)) {\n this.open = false;\n }\n };\n\n @Listen('keydown')\n handleKeyDown(e: KeyboardEvent) {\n if (e.key === 'Escape' && this.open) {\n this.open = false;\n }\n };\n\n @Method()\n async setPopover(open: boolean) {\n if (open === this.open) return;\n this.open = open;\n\n return this.open;\n };\n\n private createPopper() {\n if (!this.triggerEl || !this.popoverEl) {\n console.warn('XvToggleTip can`t find the trigger or popover container!');\n return;\n }\n\n this.popperInstance = createPopper(this.triggerEl, this.popoverEl, {\n placement: this.position,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n {\n name: 'preventOverflow',\n options: {\n boundary: 'viewport',\n padding: 8,\n },\n },\n ],\n });\n };\n\n private destroyPopper = () => {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = undefined;\n }\n };\n\n render() {\n return (\n <Host class=\"xv-toggle-tip\">\n <div\n class=\"trigger\"\n role=\"button\"\n tabindex=\"0\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls=\"popover\"\n onClick={() => this.setPopover(!this.open)}\n ref={(el) => (this.triggerEl = el)}\n >\n <slot name=\"trigger\">\n <svg class=\"trigger_icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" width={16} height={16}>\n <path\n fill=\"currentColor\"\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\"\n />\n </svg>\n </slot>\n </div>\n\n <div\n class={{ popover: true }}\n role=\"tooltip\"\n tabindex=\"-1\"\n ref={(el) => (this.popoverEl = el)}\n >\n <div class=\"popover-tip\" part=\"tip\" data-popper-arrow=\"\"></div>\n <div class=\"popover-content\">\n <slot name=\"header\"></slot>\n <slot name=\"body\"></slot>\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.destroyPopper();\n }\n}\n"]}
|
|
@@ -1,159 +1,43 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
position: relative;
|
|
3
|
-
display:
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
line-height: 0.5;
|
|
3
|
+
display: contents;
|
|
6
4
|
}
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
:host::before,
|
|
10
|
-
:host::after {
|
|
6
|
+
.xv-tooltip[role=tooltip] {
|
|
11
7
|
position: absolute;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
text-overflow: ellipsis;
|
|
28
|
-
max-width: 70vw;
|
|
29
|
-
font-family: var(--fz-body, Tahoma);
|
|
30
|
-
font-size: var(fz-md, 14px);
|
|
31
|
-
font-weight: 400;
|
|
32
|
-
line-height: 18px;
|
|
33
|
-
letter-spacing: 0.16px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host([multiline])::before {
|
|
37
|
-
white-space: normal;
|
|
38
|
-
min-width: 300px;
|
|
8
|
+
background-color: var(--background-inverse);
|
|
9
|
+
color: var(--text-on-color);
|
|
10
|
+
padding: var(--spacing-03) var(--spacing-04);
|
|
11
|
+
border-radius: 3px;
|
|
12
|
+
font-size: var(--fz-md);
|
|
13
|
+
z-index: 999;
|
|
14
|
+
max-width: min(400px, 90vw);
|
|
15
|
+
overflow: visible;
|
|
16
|
+
}
|
|
17
|
+
.xv-tooltip[role=tooltip] [data-popper-arrow] {
|
|
18
|
+
position: absolute;
|
|
19
|
+
width: 10px;
|
|
20
|
+
height: 10px;
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
z-index: -1;
|
|
39
23
|
}
|
|
40
|
-
|
|
41
|
-
/* Arrow */
|
|
42
|
-
:host::after {
|
|
24
|
+
.xv-tooltip[role=tooltip] [data-popper-arrow]:before {
|
|
43
25
|
content: "";
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
:
|
|
49
|
-
:host(:hover)::after,
|
|
50
|
-
:host(:focus)::before,
|
|
51
|
-
:host(:focus)::after {
|
|
52
|
-
opacity: 1;
|
|
53
|
-
visibility: visible;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* Tooltip positions */
|
|
57
|
-
:host(.xv-tooltip_top)::before {
|
|
58
|
-
bottom: 100%;
|
|
59
|
-
left: 50%;
|
|
60
|
-
transform: translateX(-50%) translateY(-5px);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host(.xv-tooltip_top)::after {
|
|
64
|
-
bottom: 100%;
|
|
65
|
-
left: 50%;
|
|
66
|
-
border-top-color: var(--background-inverse, #333);
|
|
67
|
-
transform: translateX(-50%) translateY(5px);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:host(.xv-tooltip_top-left)::before {
|
|
71
|
-
bottom: 100%;
|
|
72
|
-
left: 0;
|
|
73
|
-
transform: translateY(-5px);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host(.xv-tooltip_top-left)::after {
|
|
77
|
-
bottom: 100%;
|
|
78
|
-
left: 10px;
|
|
79
|
-
border-top-color: black;
|
|
80
|
-
transform: translateY(5px);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
:host(.xv-tooltip_top-right)::before {
|
|
84
|
-
bottom: 100%;
|
|
85
|
-
right: 0;
|
|
86
|
-
transform: translateY(-5px);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:host(.xv-tooltip_top-right)::after {
|
|
90
|
-
bottom: 100%;
|
|
91
|
-
right: 10px;
|
|
92
|
-
border-top-color: var(--background-inverse, #333);
|
|
93
|
-
transform: translateY(5px);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:host(.xv-tooltip_bottom)::before {
|
|
97
|
-
top: 100%;
|
|
98
|
-
left: 50%;
|
|
99
|
-
transform: translateX(-50%) translateY(5px);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host(.xv-tooltip_bottom)::after {
|
|
103
|
-
top: 100%;
|
|
104
|
-
left: 50%;
|
|
105
|
-
border-bottom-color: black;
|
|
106
|
-
transform: translateX(-50%) translateY(-5px);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
:host(.xv-tooltip_bottom-left)::before {
|
|
110
|
-
top: 100%;
|
|
111
|
-
left: 0;
|
|
112
|
-
transform: translateY(5px);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
:host(.xv-tooltip_bottom-left)::after {
|
|
116
|
-
top: 100%;
|
|
117
|
-
left: 10px;
|
|
118
|
-
border-bottom-color: var(--background-inverse, #333);
|
|
119
|
-
transform: translateY(-5px);
|
|
26
|
+
transform: rotate(45deg);
|
|
27
|
+
background-color: var(--background-inverse);
|
|
28
|
+
width: inherit;
|
|
29
|
+
height: inherit;
|
|
30
|
+
display: inline-block;
|
|
120
31
|
}
|
|
121
|
-
|
|
122
|
-
:
|
|
123
|
-
top: 100%;
|
|
124
|
-
right: 0;
|
|
125
|
-
transform: translateY(5px);
|
|
32
|
+
.xv-tooltip[role=tooltip][data-popper-placement^=top] [data-popper-arrow] {
|
|
33
|
+
bottom: 1px;
|
|
126
34
|
}
|
|
127
|
-
|
|
128
|
-
:
|
|
129
|
-
top: 100%;
|
|
130
|
-
right: 10px;
|
|
131
|
-
border-bottom-color: var(--background-inverse, #333);
|
|
132
|
-
transform: translateY(-5px);
|
|
35
|
+
.xv-tooltip[role=tooltip][data-popper-placement^=bottom] [data-popper-arrow] {
|
|
36
|
+
top: -10px;
|
|
133
37
|
}
|
|
134
|
-
|
|
135
|
-
:
|
|
136
|
-
right: 100%;
|
|
137
|
-
top: 50%;
|
|
138
|
-
transform: translateY(-50%) translateX(-5px);
|
|
38
|
+
.xv-tooltip[role=tooltip][data-popper-placement^=left] [data-popper-arrow] {
|
|
39
|
+
right: -4px;
|
|
139
40
|
}
|
|
140
|
-
|
|
141
|
-
:
|
|
142
|
-
right: 100%;
|
|
143
|
-
top: 50%;
|
|
144
|
-
border-left-color: var(--background-inverse, #333);
|
|
145
|
-
transform: translateY(-50%) translateX(5px);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
:host(.xv-tooltip_right)::before {
|
|
149
|
-
left: 100%;
|
|
150
|
-
top: 50%;
|
|
151
|
-
transform: translateY(-50%) translateX(5px);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
:host(.xv-tooltip_right)::after {
|
|
155
|
-
left: 100%;
|
|
156
|
-
top: 50%;
|
|
157
|
-
border-right-color: var(--background-inverse, #333);
|
|
158
|
-
transform: translateY(-50%) translateX(-5px);
|
|
41
|
+
.xv-tooltip[role=tooltip][data-popper-placement^=right] [data-popper-arrow] {
|
|
42
|
+
left: -4px;
|
|
159
43
|
}
|
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { createPopper } from "@popperjs/core";
|
|
2
3
|
export class XvTooltip {
|
|
3
4
|
constructor() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
this.
|
|
5
|
+
this.position = 'auto';
|
|
6
|
+
this.visible = false;
|
|
7
|
+
}
|
|
8
|
+
onMouseEnter() {
|
|
9
|
+
this.visible = true;
|
|
10
|
+
requestAnimationFrame(() => this.createPopper());
|
|
11
|
+
}
|
|
12
|
+
onMouseLeave() {
|
|
13
|
+
this.visible = false;
|
|
14
|
+
this.destroyPopper();
|
|
15
|
+
}
|
|
16
|
+
createPopper() {
|
|
17
|
+
if (this.tooltipEl) {
|
|
18
|
+
this.popperInstance = createPopper(this.el, this.tooltipEl, {
|
|
19
|
+
placement: this.position,
|
|
20
|
+
modifiers: [{ name: 'offset', options: { offset: [0, 8] } }],
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
destroyPopper() {
|
|
25
|
+
var _a;
|
|
26
|
+
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
27
|
+
this.popperInstance = null;
|
|
10
28
|
}
|
|
11
29
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: 'd1f0178c3853f96716217630ff0349a0396f33a0' }, h("slot", { key: '11af6ea09c3d833318118164f0493bf4c98316a3' }, h("svg", { key: '614c37cd6eda62cc3745f49252627f1383a46166', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: 16, height: 16 }, h("path", { key: '11f2da0b818971c6f17145e1fa5b17b1852faafd', 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" }))), this.visible && (h("div", { key: '8f0db2decd3ff2993b0b618e2111cac861fec058', class: "xv-tooltip", ref: (el) => (this.tooltipEl = el), role: "tooltip" }, this.message, h("div", { key: 'a8e05a8dbe988e7df14da6a16f42e528a68708c0', class: "xv-tooltip-arrow", "data-popper-arrow": "" })))));
|
|
13
31
|
}
|
|
14
32
|
static get is() { return "xv-tooltip-v2"; }
|
|
15
|
-
static get encapsulation() { return "shadow"; }
|
|
16
33
|
static get originalStyleUrls() {
|
|
17
34
|
return {
|
|
18
35
|
"$": ["xv-tooltip.scss"]
|
|
@@ -38,40 +55,26 @@ export class XvTooltip {
|
|
|
38
55
|
"optional": false,
|
|
39
56
|
"docs": {
|
|
40
57
|
"tags": [],
|
|
41
|
-
"text": "
|
|
58
|
+
"text": ""
|
|
42
59
|
},
|
|
43
60
|
"getter": false,
|
|
44
61
|
"setter": false,
|
|
45
|
-
"reflect":
|
|
62
|
+
"reflect": false
|
|
46
63
|
},
|
|
47
64
|
"position": {
|
|
48
65
|
"type": "string",
|
|
49
66
|
"attribute": "position",
|
|
50
67
|
"mutable": false,
|
|
51
68
|
"complexType": {
|
|
52
|
-
"original": "
|
|
53
|
-
"resolved": "\"bottom\" | \"bottom-
|
|
54
|
-
"references": {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
"getter": false,
|
|
63
|
-
"setter": false,
|
|
64
|
-
"reflect": true,
|
|
65
|
-
"defaultValue": "'top'"
|
|
66
|
-
},
|
|
67
|
-
"multiline": {
|
|
68
|
-
"type": "boolean",
|
|
69
|
-
"attribute": "multiline",
|
|
70
|
-
"mutable": false,
|
|
71
|
-
"complexType": {
|
|
72
|
-
"original": "boolean",
|
|
73
|
-
"resolved": "boolean",
|
|
74
|
-
"references": {}
|
|
69
|
+
"original": "Placement",
|
|
70
|
+
"resolved": "\"auto\" | \"auto-end\" | \"auto-start\" | \"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
71
|
+
"references": {
|
|
72
|
+
"Placement": {
|
|
73
|
+
"location": "import",
|
|
74
|
+
"path": "@popperjs/core",
|
|
75
|
+
"id": "node_modules::Placement"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
75
78
|
},
|
|
76
79
|
"required": false,
|
|
77
80
|
"optional": false,
|
|
@@ -81,9 +84,31 @@ export class XvTooltip {
|
|
|
81
84
|
},
|
|
82
85
|
"getter": false,
|
|
83
86
|
"setter": false,
|
|
84
|
-
"reflect":
|
|
87
|
+
"reflect": false,
|
|
88
|
+
"defaultValue": "'auto'"
|
|
85
89
|
}
|
|
86
90
|
};
|
|
87
91
|
}
|
|
92
|
+
static get states() {
|
|
93
|
+
return {
|
|
94
|
+
"visible": {}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
static get elementRef() { return "el"; }
|
|
98
|
+
static get listeners() {
|
|
99
|
+
return [{
|
|
100
|
+
"name": "mouseenter",
|
|
101
|
+
"method": "onMouseEnter",
|
|
102
|
+
"target": undefined,
|
|
103
|
+
"capture": false,
|
|
104
|
+
"passive": true
|
|
105
|
+
}, {
|
|
106
|
+
"name": "mouseleave",
|
|
107
|
+
"method": "onMouseLeave",
|
|
108
|
+
"target": undefined,
|
|
109
|
+
"capture": false,
|
|
110
|
+
"passive": true
|
|
111
|
+
}];
|
|
112
|
+
}
|
|
88
113
|
}
|
|
89
114
|
//# sourceMappingURL=xv-tooltip.js.map
|
|
@@ -1 +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;
|
|
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,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AAOnE,MAAM,OAAO,SAAS;IALtB;QASU,aAAQ,GAAc,MAAM,CAAC;QAE5B,YAAO,GAAY,KAAK,CAAC;KAuDnC;IAjDC,YAAY;QACV,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,qBAAqB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IACnD,CAAC;IAGD,YAAY;QACV,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAEO,YAAY;QAClB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE;gBAC1D,SAAS,EAAE,IAAI,CAAC,QAAQ;gBACxB,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;aAC7D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAEO,aAAa;;QACnB,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH;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;YACN,IAAI,CAAC,OAAO,IAAI,CACf,4DACE,KAAK,EAAC,YAAY,EAClB,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAClC,IAAI,EAAC,SAAS;gBAEb,IAAI,CAAC,OAAO;gBACb,4DAAK,KAAK,EAAC,kBAAkB,uBAAmB,EAAE,GAAG,CACjD,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, State, Listen } from '@stencil/core';\nimport { createPopper, Placement, Instance } from '@popperjs/core';\n\n@Component({\n tag: 'xv-tooltip-v2',\n styleUrl: 'xv-tooltip.scss',\n shadow: false,\n})\nexport class XvTooltip {\n @Element() el: HTMLElement;\n\n @Prop() message: string;\n @Prop() position: Placement = 'auto';\n\n @State() visible: boolean = false;\n\n private tooltipEl: HTMLElement;\n private popperInstance: Instance;\n\n @Listen('mouseenter')\n onMouseEnter() {\n this.visible = true;\n requestAnimationFrame(() => this.createPopper());\n }\n\n @Listen('mouseleave')\n onMouseLeave() {\n this.visible = false;\n this.destroyPopper();\n }\n\n private createPopper() {\n if (this.tooltipEl) {\n this.popperInstance = createPopper(this.el, this.tooltipEl, {\n placement: this.position,\n modifiers: [{ name: 'offset', options: { offset: [0, 8] } }],\n });\n }\n }\n\n private destroyPopper() {\n this.popperInstance?.destroy();\n this.popperInstance = null;\n }\n\n render() {\n return (\n <Host>\n <slot>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" width={16} height={16}>\n <path\n fill=\"currentColor\"\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\"\n />\n </svg>\n </slot>\n {this.visible && (\n <div\n class=\"xv-tooltip\"\n ref={(el) => (this.tooltipEl = el)}\n role=\"tooltip\"\n >\n {this.message}\n <div class=\"xv-tooltip-arrow\" data-popper-arrow=\"\" />\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -6,4 +6,10 @@ export var SIZE_VAR;
|
|
|
6
6
|
SIZE_VAR["LG"] = "lg";
|
|
7
7
|
SIZE_VAR["XL"] = "xl";
|
|
8
8
|
})(SIZE_VAR || (SIZE_VAR = {}));
|
|
9
|
+
export var XV_SORT_DIR;
|
|
10
|
+
(function (XV_SORT_DIR) {
|
|
11
|
+
XV_SORT_DIR["ASC"] = "asc";
|
|
12
|
+
XV_SORT_DIR["DESC"] = "desc";
|
|
13
|
+
XV_SORT_DIR["NONE"] = "none";
|
|
14
|
+
})(XV_SORT_DIR || (XV_SORT_DIR = {}));
|
|
9
15
|
//# sourceMappingURL=enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/types/enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,qBAAS,CAAA;AACX,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB","sourcesContent":["export enum SIZE_VAR {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n XL = 'xl',\n}\n"]}
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/types/enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,qBAAS,CAAA;IACT,qBAAS,CAAA;AACX,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB","sourcesContent":["export enum SIZE_VAR {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n XL = 'xl',\n}\n\nexport enum XV_SORT_DIR {\n ASC = 'asc',\n DESC = 'desc',\n NONE = 'none'\n}\n"]}
|