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,402 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class XvCheckbox {
|
|
3
|
+
constructor() {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
/**
|
|
6
|
+
* Default checked status
|
|
7
|
+
*/
|
|
8
|
+
this.checked = false;
|
|
9
|
+
/**
|
|
10
|
+
* Using for forms
|
|
11
|
+
*/
|
|
12
|
+
this.indeterminate = false;
|
|
13
|
+
/**
|
|
14
|
+
* Disabled status
|
|
15
|
+
*/
|
|
16
|
+
this.disabled = false;
|
|
17
|
+
/**
|
|
18
|
+
* Input value
|
|
19
|
+
*/
|
|
20
|
+
this.value = 'on';
|
|
21
|
+
/**
|
|
22
|
+
* Input readonly
|
|
23
|
+
*/
|
|
24
|
+
this.readonly = false;
|
|
25
|
+
/**
|
|
26
|
+
* The same like default checkbox prop
|
|
27
|
+
*/
|
|
28
|
+
this.required = false;
|
|
29
|
+
/**
|
|
30
|
+
* Change checkmark icon to minus
|
|
31
|
+
*/
|
|
32
|
+
this.partial = false;
|
|
33
|
+
this.hasFocus = false;
|
|
34
|
+
this.onInput = (e) => {
|
|
35
|
+
const target = e.target;
|
|
36
|
+
this.checked = target.checked;
|
|
37
|
+
this.inputEvent.emit(this.checked);
|
|
38
|
+
};
|
|
39
|
+
this.onChange = (e) => {
|
|
40
|
+
if (this.disabled || this.readonly)
|
|
41
|
+
return;
|
|
42
|
+
const target = e.target;
|
|
43
|
+
this.checked = target.checked;
|
|
44
|
+
this.changeEvent.emit(this.checked);
|
|
45
|
+
};
|
|
46
|
+
this.onFocus = () => {
|
|
47
|
+
this.hasFocus = true;
|
|
48
|
+
this.focusEvent.emit();
|
|
49
|
+
};
|
|
50
|
+
this.onBlur = () => {
|
|
51
|
+
this.hasFocus = false;
|
|
52
|
+
this.blurEvent.emit();
|
|
53
|
+
};
|
|
54
|
+
this.internals = ((_b = (_a = this.el).attachInternals) === null || _b === void 0 ? void 0 : _b.call(_a)) || {};
|
|
55
|
+
}
|
|
56
|
+
connectedCallback() {
|
|
57
|
+
var _a;
|
|
58
|
+
if ((_a = this.internals) === null || _a === void 0 ? void 0 : _a.setFormValue) {
|
|
59
|
+
this.internals.setFormValue(this.checked ? this.value : null);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
onCheckedChange(newValue) {
|
|
63
|
+
var _a;
|
|
64
|
+
if ((_a = this.internals) === null || _a === void 0 ? void 0 : _a.setFormValue) {
|
|
65
|
+
this.internals.setFormValue(newValue ? this.value : null);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return (h(Host, { key: 'bcaedf1b88ff4b64cec1ca477a214dc8987c6ed0' }, h("label", { key: '85770d8c9326340f63e024893c5fd28bc79f85a7', class: { 'xv-checkbox': true, disabled: this.disabled, readonly: this.readonly } }, h("input", { key: '156869a713eed4506123e267dc8e4b0ed74e73bb', ref: el => (this.inputEl = el), type: "checkbox", readonly: this.readonly, name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.readonly, required: this.required, indeterminate: this.indeterminate, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }), h("span", { key: '1b2a979ae6d31e48e03ab41a054236cd5dbaab26', class: `checkmark ${this.partial ? 'checkmark-partial' : ''}` }), h("div", { key: '5bb240548e68a3e44fd665a917ccc75d2bd423b1', class: "label" }, h("slot", { key: '7ac3876f675592624c2fd252d8dc9941ad823de9' }, this.label))), h("slot", { key: 'e5fd949bec961b2586eb25bc806964b517413872', name: "info" }), !!this.error && h("span", { key: '86c608eada3710b63d54cb6796d738aaff695c33', class: "error" }, this.error)));
|
|
70
|
+
}
|
|
71
|
+
componentDidLoad() {
|
|
72
|
+
if (this.indeterminate) {
|
|
73
|
+
this.inputEl.indeterminate = true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
componentDidUpdate() {
|
|
77
|
+
if (this.inputEl) {
|
|
78
|
+
this.inputEl.indeterminate = this.indeterminate;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
formResetCallback() {
|
|
82
|
+
this.checked = false;
|
|
83
|
+
}
|
|
84
|
+
formStateRestoreCallback(state) {
|
|
85
|
+
this.checked = state === this.value;
|
|
86
|
+
}
|
|
87
|
+
static get is() { return "xv-checkbox-v2"; }
|
|
88
|
+
static get encapsulation() { return "shadow"; }
|
|
89
|
+
static get formAssociated() { return true; }
|
|
90
|
+
static get originalStyleUrls() {
|
|
91
|
+
return {
|
|
92
|
+
"$": ["xv-checkbox.scss"]
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
static get styleUrls() {
|
|
96
|
+
return {
|
|
97
|
+
"$": ["xv-checkbox.css"]
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
static get properties() {
|
|
101
|
+
return {
|
|
102
|
+
"checked": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"mutable": true,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "boolean",
|
|
107
|
+
"resolved": "boolean",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": "Default checked status"
|
|
115
|
+
},
|
|
116
|
+
"getter": false,
|
|
117
|
+
"setter": false,
|
|
118
|
+
"attribute": "checked",
|
|
119
|
+
"reflect": true,
|
|
120
|
+
"defaultValue": "false"
|
|
121
|
+
},
|
|
122
|
+
"indeterminate": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "boolean",
|
|
127
|
+
"resolved": "boolean",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": "Using for forms"
|
|
135
|
+
},
|
|
136
|
+
"getter": false,
|
|
137
|
+
"setter": false,
|
|
138
|
+
"attribute": "indeterminate",
|
|
139
|
+
"reflect": true,
|
|
140
|
+
"defaultValue": "false"
|
|
141
|
+
},
|
|
142
|
+
"disabled": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "boolean",
|
|
147
|
+
"resolved": "boolean",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": "Disabled status"
|
|
155
|
+
},
|
|
156
|
+
"getter": false,
|
|
157
|
+
"setter": false,
|
|
158
|
+
"attribute": "disabled",
|
|
159
|
+
"reflect": true,
|
|
160
|
+
"defaultValue": "false"
|
|
161
|
+
},
|
|
162
|
+
"name": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"mutable": false,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "string",
|
|
167
|
+
"resolved": "string",
|
|
168
|
+
"references": {}
|
|
169
|
+
},
|
|
170
|
+
"required": false,
|
|
171
|
+
"optional": false,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": "Input name"
|
|
175
|
+
},
|
|
176
|
+
"getter": false,
|
|
177
|
+
"setter": false,
|
|
178
|
+
"attribute": "name",
|
|
179
|
+
"reflect": true
|
|
180
|
+
},
|
|
181
|
+
"value": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "string",
|
|
186
|
+
"resolved": "string",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": "Input value"
|
|
194
|
+
},
|
|
195
|
+
"getter": false,
|
|
196
|
+
"setter": false,
|
|
197
|
+
"attribute": "value",
|
|
198
|
+
"reflect": true,
|
|
199
|
+
"defaultValue": "'on'"
|
|
200
|
+
},
|
|
201
|
+
"readonly": {
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"mutable": false,
|
|
204
|
+
"complexType": {
|
|
205
|
+
"original": "boolean",
|
|
206
|
+
"resolved": "boolean",
|
|
207
|
+
"references": {}
|
|
208
|
+
},
|
|
209
|
+
"required": false,
|
|
210
|
+
"optional": false,
|
|
211
|
+
"docs": {
|
|
212
|
+
"tags": [],
|
|
213
|
+
"text": "Input readonly"
|
|
214
|
+
},
|
|
215
|
+
"getter": false,
|
|
216
|
+
"setter": false,
|
|
217
|
+
"attribute": "readonly",
|
|
218
|
+
"reflect": true,
|
|
219
|
+
"defaultValue": "false"
|
|
220
|
+
},
|
|
221
|
+
"required": {
|
|
222
|
+
"type": "boolean",
|
|
223
|
+
"mutable": false,
|
|
224
|
+
"complexType": {
|
|
225
|
+
"original": "boolean",
|
|
226
|
+
"resolved": "boolean",
|
|
227
|
+
"references": {}
|
|
228
|
+
},
|
|
229
|
+
"required": false,
|
|
230
|
+
"optional": false,
|
|
231
|
+
"docs": {
|
|
232
|
+
"tags": [],
|
|
233
|
+
"text": "The same like default checkbox prop"
|
|
234
|
+
},
|
|
235
|
+
"getter": false,
|
|
236
|
+
"setter": false,
|
|
237
|
+
"attribute": "required",
|
|
238
|
+
"reflect": true,
|
|
239
|
+
"defaultValue": "false"
|
|
240
|
+
},
|
|
241
|
+
"partial": {
|
|
242
|
+
"type": "boolean",
|
|
243
|
+
"mutable": false,
|
|
244
|
+
"complexType": {
|
|
245
|
+
"original": "boolean",
|
|
246
|
+
"resolved": "boolean",
|
|
247
|
+
"references": {}
|
|
248
|
+
},
|
|
249
|
+
"required": false,
|
|
250
|
+
"optional": false,
|
|
251
|
+
"docs": {
|
|
252
|
+
"tags": [],
|
|
253
|
+
"text": "Change checkmark icon to minus"
|
|
254
|
+
},
|
|
255
|
+
"getter": false,
|
|
256
|
+
"setter": false,
|
|
257
|
+
"attribute": "partial",
|
|
258
|
+
"reflect": true,
|
|
259
|
+
"defaultValue": "false"
|
|
260
|
+
},
|
|
261
|
+
"label": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"mutable": false,
|
|
264
|
+
"complexType": {
|
|
265
|
+
"original": "string",
|
|
266
|
+
"resolved": "string",
|
|
267
|
+
"references": {}
|
|
268
|
+
},
|
|
269
|
+
"required": false,
|
|
270
|
+
"optional": false,
|
|
271
|
+
"docs": {
|
|
272
|
+
"tags": [],
|
|
273
|
+
"text": "Can be used like property or like slot"
|
|
274
|
+
},
|
|
275
|
+
"getter": false,
|
|
276
|
+
"setter": false,
|
|
277
|
+
"attribute": "label",
|
|
278
|
+
"reflect": false
|
|
279
|
+
},
|
|
280
|
+
"size": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"mutable": false,
|
|
283
|
+
"complexType": {
|
|
284
|
+
"original": "SIZE_VAR",
|
|
285
|
+
"resolved": "SIZE_VAR.LG | SIZE_VAR.MD | SIZE_VAR.SM | SIZE_VAR.XL | SIZE_VAR.XS",
|
|
286
|
+
"references": {
|
|
287
|
+
"SIZE_VAR": {
|
|
288
|
+
"location": "import",
|
|
289
|
+
"path": "../../types/enum",
|
|
290
|
+
"id": "src/types/enum.ts::SIZE_VAR"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"required": false,
|
|
295
|
+
"optional": true,
|
|
296
|
+
"docs": {
|
|
297
|
+
"tags": [],
|
|
298
|
+
"text": ""
|
|
299
|
+
},
|
|
300
|
+
"getter": false,
|
|
301
|
+
"setter": false,
|
|
302
|
+
"attribute": "size",
|
|
303
|
+
"reflect": true
|
|
304
|
+
},
|
|
305
|
+
"error": {
|
|
306
|
+
"type": "any",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "string | boolean",
|
|
310
|
+
"resolved": "boolean | string",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": true,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": ""
|
|
318
|
+
},
|
|
319
|
+
"getter": false,
|
|
320
|
+
"setter": false,
|
|
321
|
+
"attribute": "error",
|
|
322
|
+
"reflect": true
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
static get states() {
|
|
327
|
+
return {
|
|
328
|
+
"hasFocus": {}
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
static get events() {
|
|
332
|
+
return [{
|
|
333
|
+
"method": "changeEvent",
|
|
334
|
+
"name": "eventChange",
|
|
335
|
+
"bubbles": true,
|
|
336
|
+
"cancelable": true,
|
|
337
|
+
"composed": true,
|
|
338
|
+
"docs": {
|
|
339
|
+
"tags": [],
|
|
340
|
+
"text": "event 'onEventChange'"
|
|
341
|
+
},
|
|
342
|
+
"complexType": {
|
|
343
|
+
"original": "boolean",
|
|
344
|
+
"resolved": "boolean",
|
|
345
|
+
"references": {}
|
|
346
|
+
}
|
|
347
|
+
}, {
|
|
348
|
+
"method": "inputEvent",
|
|
349
|
+
"name": "eventInput",
|
|
350
|
+
"bubbles": true,
|
|
351
|
+
"cancelable": true,
|
|
352
|
+
"composed": true,
|
|
353
|
+
"docs": {
|
|
354
|
+
"tags": [],
|
|
355
|
+
"text": "event 'onEventInput'"
|
|
356
|
+
},
|
|
357
|
+
"complexType": {
|
|
358
|
+
"original": "boolean",
|
|
359
|
+
"resolved": "boolean",
|
|
360
|
+
"references": {}
|
|
361
|
+
}
|
|
362
|
+
}, {
|
|
363
|
+
"method": "focusEvent",
|
|
364
|
+
"name": "eventFocus",
|
|
365
|
+
"bubbles": true,
|
|
366
|
+
"cancelable": true,
|
|
367
|
+
"composed": true,
|
|
368
|
+
"docs": {
|
|
369
|
+
"tags": [],
|
|
370
|
+
"text": "event 'onEventFocus'"
|
|
371
|
+
},
|
|
372
|
+
"complexType": {
|
|
373
|
+
"original": "void",
|
|
374
|
+
"resolved": "void",
|
|
375
|
+
"references": {}
|
|
376
|
+
}
|
|
377
|
+
}, {
|
|
378
|
+
"method": "blurEvent",
|
|
379
|
+
"name": "eventBlur",
|
|
380
|
+
"bubbles": true,
|
|
381
|
+
"cancelable": true,
|
|
382
|
+
"composed": true,
|
|
383
|
+
"docs": {
|
|
384
|
+
"tags": [],
|
|
385
|
+
"text": "event 'onEventBlur'"
|
|
386
|
+
},
|
|
387
|
+
"complexType": {
|
|
388
|
+
"original": "void",
|
|
389
|
+
"resolved": "void",
|
|
390
|
+
"references": {}
|
|
391
|
+
}
|
|
392
|
+
}];
|
|
393
|
+
}
|
|
394
|
+
static get elementRef() { return "el"; }
|
|
395
|
+
static get watchers() {
|
|
396
|
+
return [{
|
|
397
|
+
"propName": "checked",
|
|
398
|
+
"methodName": "onCheckedChange"
|
|
399
|
+
}];
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
//# sourceMappingURL=xv-checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-checkbox.js","sourceRoot":"","sources":["../../../src/components/xv-checkbox/xv-checkbox.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, h, Element, Prop, State, Event, EventEmitter, Watch, Host } from '@stencil/core';\nimport { SIZE_VAR } from '../../types/enum';\n\n@Component({\n tag: 'xv-checkbox-v2',\n styleUrl: 'xv-checkbox.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class XvCheckbox {\n private inputEl: HTMLInputElement;\n private internals: ElementInternals;\n\n @Element() el!: HTMLElement;\n\n /**\n * Default checked status\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Using for forms\n */\n @Prop({ reflect: true }) indeterminate: boolean = false;\n /**\n * Disabled status\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Input name\n */\n @Prop({ reflect: true }) name: string;\n /**\n * Input value\n */\n @Prop({ reflect: true }) value: string = 'on';\n /**\n * Input readonly\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n /**\n * The same like default checkbox prop\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Change checkmark icon to minus\n */\n @Prop({ reflect: true }) partial: boolean = false;\n /**\n * Can be used like property or like slot\n */\n @Prop() label: string;\n\n @Prop({ reflect: true }) size?: SIZE_VAR;\n @Prop({ reflect: true }) error?: string | boolean;\n\n @State() hasFocus: boolean = false;\n /**\n * event 'onEventChange'\n */\n @Event({ eventName: 'eventChange' }) changeEvent: EventEmitter<boolean>;\n /**\n * event 'onEventInput'\n */\n @Event({ eventName: 'eventInput' }) inputEvent: EventEmitter<boolean>;\n /**\n * event 'onEventFocus'\n */\n @Event({ eventName: 'eventFocus' }) focusEvent: EventEmitter<void>;\n /**\n * event 'onEventBlur'\n */\n @Event({ eventName: 'eventBlur' }) blurEvent: EventEmitter<void>;\n\n constructor() {\n this.internals = (this.el as any).attachInternals?.() || {};\n }\n\n connectedCallback() {\n if (this.internals?.setFormValue) {\n this.internals.setFormValue(this.checked ? this.value : null);\n }\n }\n\n @Watch('checked')\n onCheckedChange(newValue: boolean) {\n if (this.internals?.setFormValue) {\n this.internals.setFormValue(newValue ? this.value : null);\n }\n }\n\n private onInput = (e: Event) => {\n const target = e.target as HTMLInputElement;\n this.checked = target.checked;\n this.inputEvent.emit(this.checked);\n };\n\n private onChange = (e: Event) => {\n if (this.disabled || this.readonly) return;\n const target = e.target as HTMLInputElement;\n this.checked = target.checked;\n this.changeEvent.emit(this.checked);\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.focusEvent.emit();\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n this.blurEvent.emit();\n };\n\n render() {\n return (\n <Host>\n <label class={{ 'xv-checkbox': true, disabled: this.disabled, readonly: this.readonly }}>\n <input\n ref={el => (this.inputEl = el)}\n type=\"checkbox\"\n readonly={this.readonly}\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled || this.readonly}\n required={this.required}\n indeterminate={this.indeterminate}\n onInput={this.onInput}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n <span class={`checkmark ${this.partial ? 'checkmark-partial' : ''}`} />\n <div class=\"label\">\n <slot>{this.label}</slot>\n </div>\n </label>\n <slot name=\"info\" />\n {!!this.error && <span class=\"error\">{this.error}</span>}\n </Host>\n );\n }\n\n componentDidLoad() {\n if (this.indeterminate) {\n this.inputEl.indeterminate = true;\n }\n }\n\n componentDidUpdate() {\n if (this.inputEl) {\n this.inputEl.indeterminate = this.indeterminate;\n }\n }\n\n formResetCallback() {\n this.checked = false;\n }\n\n formStateRestoreCallback(state: string) {\n this.checked = state === this.value;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_vars.js","sourceRoot":"","sources":["../../../src/components/xv-dropdown/_vars.ts"],"names":[],"mappings":"","sourcesContent":["export interface DropdownItemData {\n value: string | number;\n text: string;\n selected: boolean;\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
:host .checkmark {
|
|
5
|
+
position: absolute;
|
|
6
|
+
right: 12px;
|
|
7
|
+
top: var(--dropdown-padding-y, 10px);
|
|
8
|
+
width: 5px;
|
|
9
|
+
height: 10px;
|
|
10
|
+
border: solid var(--icon-primary, #333);
|
|
11
|
+
border-width: 0 2px 2px 0;
|
|
12
|
+
transform: rotate(45deg);
|
|
13
|
+
transition: opacity 0.2s;
|
|
14
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { uidGenerator } from "../../../utils/utils";
|
|
3
|
+
/**
|
|
4
|
+
* xv-dropdown-item — custom dropdown list item
|
|
5
|
+
* if you want to create new dropdown list item you need to extend current class properties and
|
|
6
|
+
* events
|
|
7
|
+
* should be created and emitted 'itemSelected' event
|
|
8
|
+
*/
|
|
9
|
+
export class XvDropdownItem {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.disabled = false;
|
|
12
|
+
this.value = uidGenerator();
|
|
13
|
+
this.selected = false;
|
|
14
|
+
}
|
|
15
|
+
handleClick() {
|
|
16
|
+
if (this.disabled)
|
|
17
|
+
return;
|
|
18
|
+
// this.selected = !this.selected;
|
|
19
|
+
this.itemSelected.emit({
|
|
20
|
+
selected: !this.selected,
|
|
21
|
+
value: this.value,
|
|
22
|
+
text: this.el.innerText
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return (h(Host, { key: '3bb6d09f7989b0a696499d4ac233d2621ecceb10', class: "xv-dropdown-item", value: this.value, role: "option", tabindex: this.disabled ? -1 : false }, h("slot", { key: '8b140702188709ed9b54bc3f4cc506ce6c4f3010' }), this.selected && h("span", { key: 'b82ce38b08fd91ae9d154646c522a367b8493974', class: "checkmark" })));
|
|
27
|
+
}
|
|
28
|
+
static get is() { return "xv-dropdown-v2-item"; }
|
|
29
|
+
static get encapsulation() { return "shadow"; }
|
|
30
|
+
static get originalStyleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["xv-dropdown-item.scss"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get styleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["xv-dropdown-item.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get properties() {
|
|
41
|
+
return {
|
|
42
|
+
"disabled": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "boolean",
|
|
47
|
+
"resolved": "boolean",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": ""
|
|
55
|
+
},
|
|
56
|
+
"getter": false,
|
|
57
|
+
"setter": false,
|
|
58
|
+
"attribute": "disabled",
|
|
59
|
+
"reflect": false,
|
|
60
|
+
"defaultValue": "false"
|
|
61
|
+
},
|
|
62
|
+
"value": {
|
|
63
|
+
"type": "any",
|
|
64
|
+
"mutable": false,
|
|
65
|
+
"complexType": {
|
|
66
|
+
"original": "DropdownItemData['value']",
|
|
67
|
+
"resolved": "number | string",
|
|
68
|
+
"references": {
|
|
69
|
+
"DropdownItemData": {
|
|
70
|
+
"location": "import",
|
|
71
|
+
"path": "../_vars",
|
|
72
|
+
"id": "src/components/xv-dropdown/_vars.ts::DropdownItemData"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": false,
|
|
77
|
+
"optional": false,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [],
|
|
80
|
+
"text": ""
|
|
81
|
+
},
|
|
82
|
+
"getter": false,
|
|
83
|
+
"setter": false,
|
|
84
|
+
"attribute": "value",
|
|
85
|
+
"reflect": true,
|
|
86
|
+
"defaultValue": "uidGenerator()"
|
|
87
|
+
},
|
|
88
|
+
"selected": {
|
|
89
|
+
"type": "boolean",
|
|
90
|
+
"mutable": true,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "DropdownItemData['selected']",
|
|
93
|
+
"resolved": "boolean",
|
|
94
|
+
"references": {
|
|
95
|
+
"DropdownItemData": {
|
|
96
|
+
"location": "import",
|
|
97
|
+
"path": "../_vars",
|
|
98
|
+
"id": "src/components/xv-dropdown/_vars.ts::DropdownItemData"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": false,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": ""
|
|
107
|
+
},
|
|
108
|
+
"getter": false,
|
|
109
|
+
"setter": false,
|
|
110
|
+
"attribute": "selected",
|
|
111
|
+
"reflect": true,
|
|
112
|
+
"defaultValue": "false"
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static get events() {
|
|
117
|
+
return [{
|
|
118
|
+
"method": "itemSelected",
|
|
119
|
+
"name": "itemSelected",
|
|
120
|
+
"bubbles": true,
|
|
121
|
+
"cancelable": true,
|
|
122
|
+
"composed": true,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": ""
|
|
126
|
+
},
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "DropdownItemData",
|
|
129
|
+
"resolved": "DropdownItemData",
|
|
130
|
+
"references": {
|
|
131
|
+
"DropdownItemData": {
|
|
132
|
+
"location": "import",
|
|
133
|
+
"path": "../_vars",
|
|
134
|
+
"id": "src/components/xv-dropdown/_vars.ts::DropdownItemData"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}];
|
|
139
|
+
}
|
|
140
|
+
static get elementRef() { return "el"; }
|
|
141
|
+
static get listeners() {
|
|
142
|
+
return [{
|
|
143
|
+
"name": "click",
|
|
144
|
+
"method": "handleClick",
|
|
145
|
+
"target": undefined,
|
|
146
|
+
"capture": false,
|
|
147
|
+
"passive": false
|
|
148
|
+
}];
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=xv-dropdown-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-dropdown-item.js","sourceRoot":"","sources":["../../../../src/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE/F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;GAKG;AAMH,MAAM,OAAO,cAAc;IAL3B;QAOU,aAAQ,GAAY,KAAK,CAAC;QACT,UAAK,GAA8B,YAAY,EAAE,CAAC;QACnC,aAAQ,GAAiC,KAAK,CAAC;KAwBxF;IApBC,WAAW;QACT,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAE1B,kCAAkC;QAClC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;YACrB,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,SAAS;SACxB,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAC,kBAAkB,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK;YAClG,8DAAa;YAEZ,IAAI,CAAC,QAAQ,IAAI,6DAAM,KAAK,EAAC,WAAW,GAAG,CACvC,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Event, EventEmitter, Listen, Prop, Element } from '@stencil/core';\nimport { DropdownItemData } from '../_vars';\nimport { uidGenerator } from '../../../utils/utils';\n\n/**\n * xv-dropdown-item — custom dropdown list item\n * if you want to create new dropdown list item you need to extend current class properties and\n * events\n * should be created and emitted 'itemSelected' event\n */\n@Component({\n tag: 'xv-dropdown-v2-item',\n styleUrl: 'xv-dropdown-item.scss',\n shadow: true,\n})\nexport class XvDropdownItem {\n @Element() el: HTMLElement;\n @Prop() disabled: boolean = false;\n @Prop({ reflect: true }) value: DropdownItemData['value'] = uidGenerator();\n @Prop({ reflect: true, mutable: true }) selected: DropdownItemData['selected'] = false;\n @Event() itemSelected: EventEmitter<DropdownItemData>;\n\n @Listen('click')\n handleClick() {\n if (this.disabled) return;\n\n // this.selected = !this.selected;\n this.itemSelected.emit({\n selected: !this.selected,\n value: this.value,\n text: this.el.innerText\n });\n }\n\n render() {\n return (\n <Host class=\"xv-dropdown-item\" value={this.value} role=\"option\" tabindex={this.disabled ? -1 : false}>\n <slot></slot>\n\n {this.selected && <span class=\"checkmark\" />}\n </Host>\n );\n }\n}\n"]}
|