xv-webcomponents 0.1.26 → 0.1.28
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-782b9733.js +1535 -0
- package/dist/cjs/index-782b9733.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-aa46f72a.js +50 -0
- package/dist/cjs/utils-aa46f72a.js.map +1 -0
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js +1358 -0
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +22 -0
- package/dist/cjs/xv-breadcrumbs-v2.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/assets/fonts/fontawesome5/fa-brands-400.svg +3717 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-duotone-900.svg +15326 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-light-300.svg +12420 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-regular-400.svg +11323 -0
- package/dist/collection/assets/fonts/fontawesome5/fa-solid-900.svg +9653 -0
- package/dist/collection/collection-manifest.json +39 -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 +154 -0
- package/dist/collection/components/xv-button/xv-button.js +138 -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/collection/components/xv-checkbox/xv-checkbox.css +132 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +402 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -0
- package/dist/collection/components/xv-dropdown/_vars.js +2 -0
- package/dist/collection/components/xv-dropdown/_vars.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.css +14 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +151 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +227 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +340 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -0
- package/dist/collection/components/xv-footer/xv-footer.css +230 -0
- package/dist/collection/components/xv-footer/xv-footer.js +37 -0
- package/dist/collection/components/xv-footer/xv-footer.js.map +1 -0
- package/dist/collection/components/xv-header/xv-header.css +22587 -0
- package/dist/collection/components/xv-header/xv-header.js +46 -0
- package/dist/collection/components/xv-header/xv-header.js.map +1 -0
- package/dist/collection/components/xv-link/xv-link.css +61 -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-loader/xv-loader.css +65 -0
- package/dist/collection/components/xv-loader/xv-loader.js +106 -0
- package/dist/collection/components/xv-loader/xv-loader.js.map +1 -0
- package/dist/collection/components/xv-modal/xv-modal.css +98 -0
- package/dist/collection/components/xv-modal/xv-modal.js +202 -0
- package/dist/collection/components/xv-modal/xv-modal.js.map +1 -0
- package/dist/collection/components/xv-notification/_vars.js +8 -0
- package/dist/collection/components/xv-notification/_vars.js.map +1 -0
- package/dist/collection/components/xv-notification/xv-notification.css +112 -0
- package/dist/collection/components/xv-notification/xv-notification.js +118 -0
- package/dist/collection/components/xv-notification/xv-notification.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/_vars.js +6 -0
- package/dist/collection/components/xv-overflow-menu/_vars.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css +45 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +137 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.css +102 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +202 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/_vars.js +12 -0
- package/dist/collection/components/xv-progress-indicator/_vars.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.css +96 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +54 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js.map +1 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.css +45 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +157 -0
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -0
- package/dist/collection/components/xv-table/defs.js +28 -0
- package/dist/collection/components/xv-table/defs.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.css +13 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js +111 -0
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +116 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +199 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.css +80 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js +172 -0
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +46 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +275 -0
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.css +47 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js +78 -0
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table.css +165 -0
- package/dist/collection/components/xv-table/xv-table.js +284 -0
- package/dist/collection/components/xv-table/xv-table.js.map +1 -0
- package/dist/collection/components/xv-tabs/_vars.js +11 -0
- package/dist/collection/components/xv-tabs/_vars.js.map +1 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.css +3 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +65 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js.map +1 -0
- package/dist/collection/components/xv-tabs/xv-tabs.css +79 -0
- package/dist/collection/components/xv-tabs/xv-tabs.js +158 -0
- package/dist/collection/components/xv-tabs/xv-tabs.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 +154 -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/scss/xv/images/xv-sprite.svg +1 -0
- package/dist/collection/scss/xv/sprite/images/xv-sprite.svg +1 -0
- package/dist/collection/types/enum.js +9 -0
- package/dist/collection/types/enum.js.map +1 -0
- package/dist/collection/utils/utils.js +46 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/index-83ab73b7.js +1506 -0
- package/dist/esm/index-83ab73b7.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/utils-0d1c18d5.js +44 -0
- package/dist/esm/utils-0d1c18d5.js.map +1 -0
- package/dist/esm/xv-accordion-v2_27.entry.js +1328 -0
- package/dist/esm/xv-accordion-v2_27.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +18 -0
- package/dist/esm/xv-breadcrumbs-v2.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/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 +16 -0
- package/dist/types/components/xv-card/xv-card.d.ts +8 -0
- package/dist/types/components/xv-checkbox/xv-checkbox.d.ts +74 -0
- package/dist/types/components/xv-dropdown/_vars.d.ts +5 -0
- package/dist/types/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.d.ts +17 -0
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +28 -0
- package/dist/types/components/xv-footer/xv-footer.d.ts +6 -0
- package/dist/types/components/xv-header/xv-header.d.ts +6 -0
- package/dist/types/components/xv-link/xv-link.d.ts +9 -0
- package/dist/types/components/xv-loader/xv-loader.d.ts +16 -0
- package/dist/types/components/xv-modal/xv-modal.d.ts +26 -0
- package/dist/types/components/xv-notification/_vars.d.ts +6 -0
- package/dist/types/components/xv-notification/xv-notification.d.ts +11 -0
- package/dist/types/components/xv-overflow-menu/_vars.d.ts +8 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.d.ts +10 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu.d.ts +21 -0
- package/dist/types/components/xv-progress-indicator/_vars.d.ts +9 -0
- package/dist/types/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.d.ts +6 -0
- package/dist/types/components/xv-progress-indicator/xv-progress-indicator.d.ts +25 -0
- package/dist/types/components/xv-table/defs.d.ts +38 -0
- package/dist/types/components/xv-table/xv-table-col/xv-table-col.d.ts +9 -0
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +24 -0
- package/dist/types/components/xv-table/xv-table-header-row/xv-table-header-row.d.ts +28 -0
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +52 -0
- package/dist/types/components/xv-table/xv-table-toolbar/xv-table-toolbar.d.ts +6 -0
- package/dist/types/components/xv-table/xv-table.d.ts +37 -0
- package/dist/types/components/xv-tabs/_vars.d.ts +7 -0
- package/dist/types/components/xv-tabs/xv-tab/xv-tab.d.ts +5 -0
- package/dist/types/components/xv-tabs/xv-tabs.d.ts +36 -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 +1217 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/types/enum.d.ts +7 -0
- package/dist/types/utils/utils.d.ts +17 -0
- package/dist/xv-webcomponents/index.esm.js +2 -0
- package/dist/xv-webcomponents/index.esm.js.map +1 -0
- package/dist/xv-webcomponents/p-07dfeba3.entry.js +2 -0
- package/dist/xv-webcomponents/p-07dfeba3.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-39bf1511.js +2 -0
- package/dist/xv-webcomponents/p-39bf1511.js.map +1 -0
- package/dist/xv-webcomponents/p-5f18d718.entry.js +2 -0
- package/dist/xv-webcomponents/p-5f18d718.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-840929c5.js +3 -0
- package/dist/xv-webcomponents/p-840929c5.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 +2 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { SIZE_VAR } from "../../types/enum";
|
|
3
|
+
export class XvModal {
|
|
4
|
+
constructor() {
|
|
5
|
+
/**
|
|
6
|
+
* Is modal opened
|
|
7
|
+
*/
|
|
8
|
+
this.open = false;
|
|
9
|
+
/**
|
|
10
|
+
* If true then modal not be closed on backdrop click
|
|
11
|
+
*/
|
|
12
|
+
this.permanent = false;
|
|
13
|
+
/**
|
|
14
|
+
* Size of modal. But max size is 90% view width
|
|
15
|
+
*/
|
|
16
|
+
this.size = SIZE_VAR.MD;
|
|
17
|
+
this.triggerEl = null;
|
|
18
|
+
this.onBackdropClick = async (e) => {
|
|
19
|
+
if (this.permanent)
|
|
20
|
+
return;
|
|
21
|
+
// click on backdrop
|
|
22
|
+
if (e.target === e.currentTarget) {
|
|
23
|
+
await this.closeModal();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.removeTriggerListener = () => {
|
|
27
|
+
var _a;
|
|
28
|
+
(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', this.openModal.bind(this));
|
|
29
|
+
};
|
|
30
|
+
this.setupTrigger = () => {
|
|
31
|
+
this.removeTriggerListener();
|
|
32
|
+
const slot = this.el.shadowRoot.querySelector('slot[name="trigger"]');
|
|
33
|
+
if (slot) {
|
|
34
|
+
const assigned = slot.assignedElements();
|
|
35
|
+
if (assigned.length > 0) {
|
|
36
|
+
this.triggerEl = assigned[0];
|
|
37
|
+
this.triggerEl.addEventListener('click', this.openModal.bind(this));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
async openModal() {
|
|
43
|
+
var _a;
|
|
44
|
+
this.open = true;
|
|
45
|
+
(_a = this.changeOpen) === null || _a === void 0 ? void 0 : _a.emit(this.open);
|
|
46
|
+
return this.open;
|
|
47
|
+
}
|
|
48
|
+
;
|
|
49
|
+
async closeModal() {
|
|
50
|
+
var _a;
|
|
51
|
+
this.open = false;
|
|
52
|
+
(_a = this.changeOpen) === null || _a === void 0 ? void 0 : _a.emit(this.open);
|
|
53
|
+
return this.open;
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
var _a;
|
|
57
|
+
return (h(Host, { key: '6402def40d1bd383381fc2d696daaed05ef2589e', role: "dialog", size: this.size, id: this.el.id }, h("slot", { key: '1552ccbc352a3d6544681576114ba4eed1787f99', name: "trigger", onSlotchange: this.setupTrigger }), h("div", { key: '5e7e1cd0a0abdd923d563fadaa9bcc54802a8e98', class: { backdrop: true }, onClick: this.onBackdropClick }, h("div", { key: '985c3257ce78509d1a749a32f0e4d9df2ffdf728', class: "modal" }, h("button", { key: '6b2073798e6911ef8fc79d9772f7bf59395e01d3', class: "modal_close", onClick: this.closeModal.bind(this) }, "\u00D7"), h("div", { key: '0e84498948e35e92d0a35717fe50d77e32884e73', class: "modal_header" }, h("slot", { key: '31aedf3610813334c0abc4f9a25017289acc7224', name: "header" }, ((_a = this.el) === null || _a === void 0 ? void 0 : _a.title) && h("h5", { key: 'a38797b67a494fffc28c6126a6f47640b522bba3', class: "modal_header__title" }, this.el.title))), h("div", { key: '919757268480698659e7f524eb63bc06f73466e6', class: "modal_content" }, h("slot", { key: '5c310e5285f3dd0fb013a4cb92f969bb697b03d1' })), h("div", { key: '0ecf04b9c83ee114decfaea71792df727c6642f5', class: "modal_footer" }, h("slot", { key: 'd72b63333e9a6287d0d2d27189bf3bf16d12e297', name: "footer" }))))));
|
|
58
|
+
}
|
|
59
|
+
disconnectedCallback() {
|
|
60
|
+
this.removeTriggerListener();
|
|
61
|
+
}
|
|
62
|
+
static get is() { return "xv-modal-v2"; }
|
|
63
|
+
static get encapsulation() { return "shadow"; }
|
|
64
|
+
static get originalStyleUrls() {
|
|
65
|
+
return {
|
|
66
|
+
"$": ["xv-modal.scss"]
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get styleUrls() {
|
|
70
|
+
return {
|
|
71
|
+
"$": ["xv-modal.css"]
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
static get properties() {
|
|
75
|
+
return {
|
|
76
|
+
"open": {
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"mutable": true,
|
|
79
|
+
"complexType": {
|
|
80
|
+
"original": "boolean",
|
|
81
|
+
"resolved": "boolean",
|
|
82
|
+
"references": {}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": "Is modal opened"
|
|
89
|
+
},
|
|
90
|
+
"getter": false,
|
|
91
|
+
"setter": false,
|
|
92
|
+
"attribute": "open",
|
|
93
|
+
"reflect": true,
|
|
94
|
+
"defaultValue": "false"
|
|
95
|
+
},
|
|
96
|
+
"permanent": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"mutable": false,
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "boolean",
|
|
101
|
+
"resolved": "boolean",
|
|
102
|
+
"references": {}
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"optional": false,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": "If true then modal not be closed on backdrop click"
|
|
109
|
+
},
|
|
110
|
+
"getter": false,
|
|
111
|
+
"setter": false,
|
|
112
|
+
"attribute": "permanent",
|
|
113
|
+
"reflect": false,
|
|
114
|
+
"defaultValue": "false"
|
|
115
|
+
},
|
|
116
|
+
"size": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "SIZE_VAR",
|
|
121
|
+
"resolved": "SIZE_VAR.LG | SIZE_VAR.MD | SIZE_VAR.SM | SIZE_VAR.XL | SIZE_VAR.XS",
|
|
122
|
+
"references": {
|
|
123
|
+
"SIZE_VAR": {
|
|
124
|
+
"location": "import",
|
|
125
|
+
"path": "../../types/enum",
|
|
126
|
+
"id": "src/types/enum.ts::SIZE_VAR"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": "Size of modal. But max size is 90% view width"
|
|
135
|
+
},
|
|
136
|
+
"getter": false,
|
|
137
|
+
"setter": false,
|
|
138
|
+
"attribute": "size",
|
|
139
|
+
"reflect": false,
|
|
140
|
+
"defaultValue": "SIZE_VAR.MD"
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static get events() {
|
|
145
|
+
return [{
|
|
146
|
+
"method": "changeOpen",
|
|
147
|
+
"name": "changeOpen",
|
|
148
|
+
"bubbles": true,
|
|
149
|
+
"cancelable": true,
|
|
150
|
+
"composed": true,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": ""
|
|
154
|
+
},
|
|
155
|
+
"complexType": {
|
|
156
|
+
"original": "boolean",
|
|
157
|
+
"resolved": "boolean",
|
|
158
|
+
"references": {}
|
|
159
|
+
}
|
|
160
|
+
}];
|
|
161
|
+
}
|
|
162
|
+
static get methods() {
|
|
163
|
+
return {
|
|
164
|
+
"openModal": {
|
|
165
|
+
"complexType": {
|
|
166
|
+
"signature": "() => Promise<boolean>",
|
|
167
|
+
"parameters": [],
|
|
168
|
+
"references": {
|
|
169
|
+
"Promise": {
|
|
170
|
+
"location": "global",
|
|
171
|
+
"id": "global::Promise"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"return": "Promise<boolean>"
|
|
175
|
+
},
|
|
176
|
+
"docs": {
|
|
177
|
+
"text": "",
|
|
178
|
+
"tags": []
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"closeModal": {
|
|
182
|
+
"complexType": {
|
|
183
|
+
"signature": "() => Promise<boolean>",
|
|
184
|
+
"parameters": [],
|
|
185
|
+
"references": {
|
|
186
|
+
"Promise": {
|
|
187
|
+
"location": "global",
|
|
188
|
+
"id": "global::Promise"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"return": "Promise<boolean>"
|
|
192
|
+
},
|
|
193
|
+
"docs": {
|
|
194
|
+
"text": "",
|
|
195
|
+
"tags": []
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
static get elementRef() { return "el"; }
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=xv-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-modal.js","sourceRoot":"","sources":["../../../src/components/xv-modal/xv-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS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EAAC,cAAc;wBACvB,6DAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,qBAAqB,EAAE,CAAC;IAC/B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, Event, EventEmitter, Method } from '@stencil/core';\nimport { SIZE_VAR } from '../../types/enum';\n\n@Component({\n tag: 'xv-modal-v2',\n styleUrl: 'xv-modal.scss',\n shadow: true,\n})\nexport class XvModal {\n @Element() el: HTMLElement;\n /**\n * Is modal opened\n */\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n /**\n * If true then modal not be closed on backdrop click\n */\n @Prop() permanent: boolean = false;\n /**\n * Size of modal. But max size is 90% view width\n */\n @Prop() size: SIZE_VAR = SIZE_VAR.MD;\n\n @Event() changeOpen: EventEmitter<boolean>;\n\n private triggerEl: HTMLElement | null = null;\n\n @Method()\n async openModal() {\n this.open = true;\n this.changeOpen?.emit(this.open);\n return this.open\n };\n\n @Method()\n async closeModal() {\n this.open = false;\n this.changeOpen?.emit(this.open);\n return this.open\n }\n\n private onBackdropClick = async (e: MouseEvent) => {\n if (this.permanent) return;\n // click on backdrop\n if (e.target === e.currentTarget) {\n await this.closeModal();\n }\n };\n\n private removeTriggerListener = () => {\n this.triggerEl?.removeEventListener('click', this.openModal.bind(this));\n };\n\n private setupTrigger = () => {\n this.removeTriggerListener();\n const slot = this.el.shadowRoot.querySelector('slot[name=\"trigger\"]') as HTMLSlotElement;\n\n if (slot) {\n const assigned = slot.assignedElements();\n if (assigned.length > 0) {\n this.triggerEl = assigned[0] as HTMLElement;\n this.triggerEl.addEventListener('click', this.openModal.bind(this));\n }\n }\n }\n\n render() {\n return (\n <Host role=\"dialog\" size={this.size} id={this.el.id}>\n <slot name=\"trigger\" onSlotchange={this.setupTrigger} />\n\n <div class={{ backdrop: true }} onClick={this.onBackdropClick}>\n <div class=\"modal\">\n <button class=\"modal_close\" onClick={this.closeModal.bind(this)}>×</button>\n <div class=\"modal_header\">\n <slot name=\"header\">\n {this.el?.title && <h5 class=\"modal_header__title\">{this.el.title}</h5>}\n </slot>\n </div>\n\n <div class=\"modal_content\">\n <slot />\n </div>\n\n <div class=\"modal_footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n this.removeTriggerListener();\n }\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var NOTIFICATION_VARIANTS;
|
|
2
|
+
(function (NOTIFICATION_VARIANTS) {
|
|
3
|
+
NOTIFICATION_VARIANTS["INFO"] = "info";
|
|
4
|
+
NOTIFICATION_VARIANTS["SUCCESS"] = "success";
|
|
5
|
+
NOTIFICATION_VARIANTS["WARNING"] = "warning";
|
|
6
|
+
NOTIFICATION_VARIANTS["ERROR"] = "error";
|
|
7
|
+
})(NOTIFICATION_VARIANTS || (NOTIFICATION_VARIANTS = {}));
|
|
8
|
+
//# sourceMappingURL=_vars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_vars.js","sourceRoot":"","sources":["../../../src/components/xv-notification/_vars.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;AACjB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC","sourcesContent":["export enum NOTIFICATION_VARIANTS {\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n ERROR = 'error'\n}\n"]}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--notification-icon-size: 20px;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
justify-content: flex-start;
|
|
7
|
+
border-radius: 3px;
|
|
8
|
+
padding: var(--gap-md, 16px);
|
|
9
|
+
column-gap: var(--gap-md, 16px);
|
|
10
|
+
border: 1px solid;
|
|
11
|
+
}
|
|
12
|
+
:host .content {
|
|
13
|
+
flex: 1;
|
|
14
|
+
text-align: left;
|
|
15
|
+
color: var(--text-primary, #333);
|
|
16
|
+
font-family: var(--ff-body, Tahoma);
|
|
17
|
+
font-size: var(--fz-md, 14px);
|
|
18
|
+
line-height: 128%;
|
|
19
|
+
letter-spacing: 0.16px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
row-gap: var(--spacing-06, 24px);
|
|
23
|
+
}
|
|
24
|
+
:host .content_title {
|
|
25
|
+
text-align: left;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
line-height: var(--notification-icon-size);
|
|
30
|
+
}
|
|
31
|
+
:host .icon {
|
|
32
|
+
width: var(--notification-icon-size);
|
|
33
|
+
height: var(--notification-icon-size);
|
|
34
|
+
font-size: var(--notification-icon-size);
|
|
35
|
+
fill: currentColor;
|
|
36
|
+
}
|
|
37
|
+
:host .close {
|
|
38
|
+
--notification-close-size: 16px;
|
|
39
|
+
background-color: transparent;
|
|
40
|
+
border: none;
|
|
41
|
+
width: var(--notification-close-size);
|
|
42
|
+
height: var(--notification-close-size);
|
|
43
|
+
min-width: var(--notification-close-size);
|
|
44
|
+
min-height: var(--notification-close-size);
|
|
45
|
+
position: relative;
|
|
46
|
+
padding: 0;
|
|
47
|
+
margin: 0;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
transition: 300ms ease-in-out opacity;
|
|
54
|
+
}
|
|
55
|
+
:host .close:after, :host .close:before {
|
|
56
|
+
content: "";
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: calc(50% - var(--notification-close-size) / 2);
|
|
59
|
+
left: calc(50% - 1px);
|
|
60
|
+
display: inline-block;
|
|
61
|
+
width: 2px;
|
|
62
|
+
height: 90%;
|
|
63
|
+
background-color: var(--button-tertiary, #273435);
|
|
64
|
+
}
|
|
65
|
+
:host .close:after {
|
|
66
|
+
transform: rotate(45deg);
|
|
67
|
+
}
|
|
68
|
+
:host .close:before {
|
|
69
|
+
transform: rotate(-45deg);
|
|
70
|
+
}
|
|
71
|
+
:host .close:hover {
|
|
72
|
+
opacity: 0.7;
|
|
73
|
+
}
|
|
74
|
+
:host .close:active {
|
|
75
|
+
opacity: 0.3;
|
|
76
|
+
}
|
|
77
|
+
:host ::slotted([slot=footer]) {
|
|
78
|
+
margin: 0;
|
|
79
|
+
padding: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([type=info]) {
|
|
83
|
+
border-color: var(--support-info, #1B87B2);
|
|
84
|
+
background-color: var(--support-info-background, #E2F5F8);
|
|
85
|
+
}
|
|
86
|
+
:host([type=info]) .icon {
|
|
87
|
+
color: var(--support-info, #1B87B2);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:host([type=success]) {
|
|
91
|
+
border-color: var(--support-success, #97BF0D);
|
|
92
|
+
background-color: var(--support-success-background, #F4F7E5);
|
|
93
|
+
}
|
|
94
|
+
:host([type=success]) .icon {
|
|
95
|
+
color: var(--support-success, #1B87B2);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host([type=warning]) {
|
|
99
|
+
border-color: var(--support-warning, #FF7F04);
|
|
100
|
+
background-color: var(--support-warning-backround, #FFF9C2);
|
|
101
|
+
}
|
|
102
|
+
:host([type=warning]) .icon {
|
|
103
|
+
color: var(--support-warning, #FF7F04);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([type=error]) {
|
|
107
|
+
border-color: var(--support-error, #F1290E);
|
|
108
|
+
background-color: var(--support-error-background, #FEE9E8);
|
|
109
|
+
}
|
|
110
|
+
:host([type=error]) .icon {
|
|
111
|
+
color: var(--support-error, #F1290E);
|
|
112
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { NOTIFICATION_VARIANTS } from "./_vars";
|
|
3
|
+
export class XvNotification {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.variant = NOTIFICATION_VARIANTS.INFO;
|
|
6
|
+
this.dismissible = false;
|
|
7
|
+
this.closeHandle = (e) => this.close.emit(e);
|
|
8
|
+
this.renderIcon = (variant, cls = 'icon') => {
|
|
9
|
+
switch (variant) {
|
|
10
|
+
case NOTIFICATION_VARIANTS.ERROR: {
|
|
11
|
+
return (h("svg", { class: cls, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z" })));
|
|
12
|
+
}
|
|
13
|
+
case NOTIFICATION_VARIANTS.INFO: {
|
|
14
|
+
return (h("svg", { class: cls, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z" })));
|
|
15
|
+
}
|
|
16
|
+
case NOTIFICATION_VARIANTS.SUCCESS: {
|
|
17
|
+
return (h("svg", { class: cls, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" })));
|
|
18
|
+
}
|
|
19
|
+
case NOTIFICATION_VARIANTS.WARNING: {
|
|
20
|
+
return (h("svg", { class: cls, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { d: "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z" })));
|
|
21
|
+
}
|
|
22
|
+
default:
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return (h(Host, { key: '9a0744259a817b6a28a5e6bf0841b28c67c38c4d', class: "xv-notification", type: this.variant }, this.renderIcon(this.variant), h("div", { key: 'e7602dc421de6d9c81893df0938a8f8a752d50ac', class: "content" }, h("div", { key: '7dee10b112988942cd31301bdac111ea335ef471', class: "content_wrapper" }, this.el.title && h("h5", { key: '020c0d0eca5349549b5100701406756cc2871ffa', class: "content_title" }, this.el.title), h("slot", { key: '8b8e6f865d10b14f38b5d622fb7cd8b23c139eb2' })), h("slot", { key: 'cad5e543aabcba222ced7e26331bbb71239451fe', name: "footer" })), this.dismissible && h("button", { key: 'd5d67c83075389832315cbec1fe3852b72552d73', class: "close", onClick: this.closeHandle })));
|
|
29
|
+
}
|
|
30
|
+
static get is() { return "xv-notification-v2"; }
|
|
31
|
+
static get encapsulation() { return "shadow"; }
|
|
32
|
+
static get originalStyleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["xv-notification.scss"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get styleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["xv-notification.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get assetsDirs() { return ["xv-notification/icons"]; }
|
|
43
|
+
static get properties() {
|
|
44
|
+
return {
|
|
45
|
+
"variant": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "NOTIFICATION_VARIANTS",
|
|
50
|
+
"resolved": "NOTIFICATION_VARIANTS.ERROR | NOTIFICATION_VARIANTS.INFO | NOTIFICATION_VARIANTS.SUCCESS | NOTIFICATION_VARIANTS.WARNING",
|
|
51
|
+
"references": {
|
|
52
|
+
"NOTIFICATION_VARIANTS": {
|
|
53
|
+
"location": "import",
|
|
54
|
+
"path": "./_vars",
|
|
55
|
+
"id": "src/components/xv-notification/_vars.ts::NOTIFICATION_VARIANTS"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": ""
|
|
64
|
+
},
|
|
65
|
+
"getter": false,
|
|
66
|
+
"setter": false,
|
|
67
|
+
"attribute": "variant",
|
|
68
|
+
"reflect": false,
|
|
69
|
+
"defaultValue": "NOTIFICATION_VARIANTS.INFO"
|
|
70
|
+
},
|
|
71
|
+
"dismissible": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"mutable": false,
|
|
74
|
+
"complexType": {
|
|
75
|
+
"original": "boolean",
|
|
76
|
+
"resolved": "boolean",
|
|
77
|
+
"references": {}
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"optional": false,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": ""
|
|
84
|
+
},
|
|
85
|
+
"getter": false,
|
|
86
|
+
"setter": false,
|
|
87
|
+
"attribute": "dismissible",
|
|
88
|
+
"reflect": false,
|
|
89
|
+
"defaultValue": "false"
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static get events() {
|
|
94
|
+
return [{
|
|
95
|
+
"method": "close",
|
|
96
|
+
"name": "close",
|
|
97
|
+
"bubbles": true,
|
|
98
|
+
"cancelable": true,
|
|
99
|
+
"composed": true,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": ""
|
|
103
|
+
},
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "MouseEvent",
|
|
106
|
+
"resolved": "MouseEvent",
|
|
107
|
+
"references": {
|
|
108
|
+
"MouseEvent": {
|
|
109
|
+
"location": "global",
|
|
110
|
+
"id": "global::MouseEvent"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}];
|
|
115
|
+
}
|
|
116
|
+
static get elementRef() { return "el"; }
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=xv-notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-notification.js","sourceRoot":"","sources":["../../../src/components/xv-notification/xv-notification.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAQhD,MAAM,OAAO,cAAc;IAN3B;QAQU,YAAO,GAA0B,qB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AC,iBAAiB,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO;YAC7C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;YAE9B,4DAAK,KAAK,EAAC,SAAS;gBAClB,4DAAK,KAAK,EAAC,iBAAiB;oBACzB,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,2DAAI,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,CAAM;oBAChE,8DAAa,CACT;gBACN,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB;YAEL,IAAI,CAAC,WAAW,IAAI,+DAAQ,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,GAAI,CACnE,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCF","sourcesContent":["import { Component, Host, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\nimport { NOTIFICATION_VARIANTS } from './_vars';\n\n@Component({\n tag: 'xv-notification-v2',\n styleUrl: 'xv-notification.scss',\n shadow: true,\n assetsDirs: ['xv-notification/icons']\n})\nexport class XvNotification {\n @Element() el: HTMLElement;\n @Prop() variant: NOTIFICATION_VARIANTS = NOTIFICATION_VARIANTS.INFO;\n @Prop() dismissible: boolean = false;\n @Event() close: EventEmitter<MouseEvent>;\n\n private closeHandle = (e: MouseEvent) => this.close.emit(e);\n\n render() {\n return (\n <Host class=\"xv-notification\" type={this.variant}>\n {this.renderIcon(this.variant)}\n\n <div class=\"content\">\n <div class=\"content_wrapper\">\n {this.el.title && <h5 class=\"content_title\">{this.el.title}</h5>}\n <slot></slot>\n </div>\n <slot name=\"footer\"></slot>\n </div>\n\n {this.dismissible && <button class=\"close\" onClick={this.closeHandle} />}\n </Host>\n );\n }\n\n private renderIcon = (variant: NOTIFICATION_VARIANTS, cls: string = 'icon') => {\n switch (variant) {\n case NOTIFICATION_VARIANTS.ERROR: {\n return (\n <svg class={cls} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z\" />\n </svg>\n );\n }\n case NOTIFICATION_VARIANTS.INFO: {\n return (\n <svg class={cls} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z\" />\n </svg>\n );\n }\n case NOTIFICATION_VARIANTS.SUCCESS: {\n return (\n <svg class={cls} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z\" />\n </svg>\n )\n }\n case NOTIFICATION_VARIANTS.WARNING: {\n return (\n <svg class={cls} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z\" />\n </svg>\n );\n }\n default:\n return null;\n }\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_vars.js","sourceRoot":"","sources":["../../../src/components/xv-overflow-menu/_vars.ts"],"names":[],"mappings":"AAKA,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,mCAAY,CAAA;IACZ,wCAAiB,CAAA;AACnB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B","sourcesContent":["export interface OverflowMenuEvent {\n value: string | number | object | undefined;\n event: PointerEvent;\n}\n\nexport enum OverflowMenuVariant {\n DEFAULT = '',\n DANGER = 'danger',\n}\n"]}
|
package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
flex: 1;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
background-color: transparent;
|
|
5
|
+
transition: 200ms ease background-color;
|
|
6
|
+
user-select: none;
|
|
7
|
+
text-align: left;
|
|
8
|
+
color: var(--text-secondary, #515151);
|
|
9
|
+
font-family: var(--ff-body, Tahoma);
|
|
10
|
+
font-size: var(--fz-md, 14px);
|
|
11
|
+
line-height: 128.571%;
|
|
12
|
+
letter-spacing: 0.16px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host(:hover) {
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
background-color: var(--layer-hover-01, #E9E9E9);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host(:active) {
|
|
21
|
+
background-color: var(--layer-active-01, #D1D1D1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host(:focus) {
|
|
25
|
+
border: 2px solid var(--focus, #273435);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([variant=danger]) {
|
|
29
|
+
background-color: var(--text-error, #D62512);
|
|
30
|
+
color: var(--text-on-color, #FFF);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([variant=danger]:hover) {
|
|
34
|
+
background-color: var(--support-error, #F1290E);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([variant=danger]:active) {
|
|
38
|
+
background-color: var(--text-error, #D62512);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([disabled]) {
|
|
42
|
+
background-color: var(--layer-01, #F7F7F7) !important;
|
|
43
|
+
color: var(--text-disabled) !important;
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
}
|
package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { OverflowMenuVariant } from "../_vars";
|
|
3
|
+
export class XvOverflowMenuItem {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.disabled = false;
|
|
6
|
+
this.variant = OverflowMenuVariant.DEFAULT;
|
|
7
|
+
}
|
|
8
|
+
handleClick(event) {
|
|
9
|
+
if (this.disabled)
|
|
10
|
+
return;
|
|
11
|
+
this.itemClick.emit({ event, value: this.value });
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h(Host, { key: '8abe8cdfa428125612c4c8f399be07b101d7faff', class: "xv-overflow-menu-item", role: "menuitem", disabled: this.disabled }, h("slot", { key: '08c7c14f181c7980bc9ff4fc8dd511753b4b6c9e' })));
|
|
15
|
+
}
|
|
16
|
+
static get is() { return "xv-overflow-menu-v2-item"; }
|
|
17
|
+
static get encapsulation() { return "shadow"; }
|
|
18
|
+
static get originalStyleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["xv-overflow-menu-item.scss"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static get styleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["xv-overflow-menu-item.css"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get properties() {
|
|
29
|
+
return {
|
|
30
|
+
"disabled": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"mutable": false,
|
|
33
|
+
"complexType": {
|
|
34
|
+
"original": "boolean",
|
|
35
|
+
"resolved": "boolean",
|
|
36
|
+
"references": {}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": ""
|
|
43
|
+
},
|
|
44
|
+
"getter": false,
|
|
45
|
+
"setter": false,
|
|
46
|
+
"attribute": "disabled",
|
|
47
|
+
"reflect": true,
|
|
48
|
+
"defaultValue": "false"
|
|
49
|
+
},
|
|
50
|
+
"value": {
|
|
51
|
+
"type": "any",
|
|
52
|
+
"mutable": false,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "OverflowMenuEvent['value']",
|
|
55
|
+
"resolved": "number | object | string",
|
|
56
|
+
"references": {
|
|
57
|
+
"OverflowMenuEvent": {
|
|
58
|
+
"location": "import",
|
|
59
|
+
"path": "../_vars",
|
|
60
|
+
"id": "src/components/xv-overflow-menu/_vars.ts::OverflowMenuEvent"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": false,
|
|
65
|
+
"optional": false,
|
|
66
|
+
"docs": {
|
|
67
|
+
"tags": [],
|
|
68
|
+
"text": ""
|
|
69
|
+
},
|
|
70
|
+
"getter": false,
|
|
71
|
+
"setter": false,
|
|
72
|
+
"attribute": "value",
|
|
73
|
+
"reflect": true
|
|
74
|
+
},
|
|
75
|
+
"variant": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "OverflowMenuVariant",
|
|
80
|
+
"resolved": "OverflowMenuVariant.DANGER | OverflowMenuVariant.DEFAULT",
|
|
81
|
+
"references": {
|
|
82
|
+
"OverflowMenuVariant": {
|
|
83
|
+
"location": "import",
|
|
84
|
+
"path": "../_vars",
|
|
85
|
+
"id": "src/components/xv-overflow-menu/_vars.ts::OverflowMenuVariant"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": false,
|
|
90
|
+
"optional": false,
|
|
91
|
+
"docs": {
|
|
92
|
+
"tags": [],
|
|
93
|
+
"text": ""
|
|
94
|
+
},
|
|
95
|
+
"getter": false,
|
|
96
|
+
"setter": false,
|
|
97
|
+
"attribute": "variant",
|
|
98
|
+
"reflect": false,
|
|
99
|
+
"defaultValue": "OverflowMenuVariant.DEFAULT"
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get events() {
|
|
104
|
+
return [{
|
|
105
|
+
"method": "itemClick",
|
|
106
|
+
"name": "itemClick",
|
|
107
|
+
"bubbles": true,
|
|
108
|
+
"cancelable": true,
|
|
109
|
+
"composed": true,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": ""
|
|
113
|
+
},
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "OverflowMenuEvent",
|
|
116
|
+
"resolved": "OverflowMenuEvent",
|
|
117
|
+
"references": {
|
|
118
|
+
"OverflowMenuEvent": {
|
|
119
|
+
"location": "import",
|
|
120
|
+
"path": "../_vars",
|
|
121
|
+
"id": "src/components/xv-overflow-menu/_vars.ts::OverflowMenuEvent"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}];
|
|
126
|
+
}
|
|
127
|
+
static get listeners() {
|
|
128
|
+
return [{
|
|
129
|
+
"name": "click",
|
|
130
|
+
"method": "handleClick",
|
|
131
|
+
"target": undefined,
|
|
132
|
+
"capture": false,
|
|
133
|
+
"passive": false
|
|
134
|
+
}];
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=xv-overflow-menu-item.js.map
|