xv-webcomponents 0.1.23 → 0.1.25
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/LICENSE +21 -21
- package/README.md +129 -129
- package/package.json +51 -51
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/index-782b9733.js +0 -1535
- package/dist/cjs/index-782b9733.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -11
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -17
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/utils-c7652b74.js +0 -13
- package/dist/cjs/utils-c7652b74.js.map +0 -1
- package/dist/cjs/xv-accordion-v2_16.cjs.entry.js +0 -663
- package/dist/cjs/xv-accordion-v2_16.cjs.entry.js.map +0 -1
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +0 -22
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js.map +0 -1
- package/dist/cjs/xv-webcomponents.cjs.js +0 -27
- package/dist/cjs/xv-webcomponents.cjs.js.map +0 -1
- package/dist/collection/assets/fonts/fontawesome5/fa-brands-400.svg +0 -3717
- package/dist/collection/assets/fonts/fontawesome5/fa-duotone-900.svg +0 -15326
- package/dist/collection/assets/fonts/fontawesome5/fa-light-300.svg +0 -12420
- package/dist/collection/assets/fonts/fontawesome5/fa-regular-400.svg +0 -11323
- package/dist/collection/assets/fonts/fontawesome5/fa-solid-900.svg +0 -9653
- package/dist/collection/collection-manifest.json +0 -28
- package/dist/collection/components/xv-accordion/xv-accordion.css +0 -3
- package/dist/collection/components/xv-accordion/xv-accordion.js +0 -163
- package/dist/collection/components/xv-accordion/xv-accordion.js.map +0 -1
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.css +0 -68
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js +0 -132
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js.map +0 -1
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.css +0 -3
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js +0 -19
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js.map +0 -1
- package/dist/collection/components/xv-button/xv-button-v2.css +0 -153
- package/dist/collection/components/xv-button/xv-button.js +0 -138
- package/dist/collection/components/xv-button/xv-button.js.map +0 -1
- package/dist/collection/components/xv-card/xv-card.css +0 -63
- package/dist/collection/components/xv-card/xv-card.js +0 -122
- package/dist/collection/components/xv-card/xv-card.js.map +0 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +0 -108
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +0 -376
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +0 -1
- package/dist/collection/components/xv-footer/xv-footer.css +0 -230
- package/dist/collection/components/xv-footer/xv-footer.js +0 -37
- package/dist/collection/components/xv-footer/xv-footer.js.map +0 -1
- package/dist/collection/components/xv-header/xv-header.css +0 -22587
- package/dist/collection/components/xv-header/xv-header.js +0 -46
- package/dist/collection/components/xv-header/xv-header.js.map +0 -1
- package/dist/collection/components/xv-link/xv-link.css +0 -60
- package/dist/collection/components/xv-link/xv-link.js +0 -132
- package/dist/collection/components/xv-link/xv-link.js.map +0 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.css +0 -7
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +0 -70
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +0 -1
- package/dist/collection/components/xv-progress-indicator-item/xv-progress-indicator-item.css +0 -66
- package/dist/collection/components/xv-progress-indicator-item/xv-progress-indicator-item.js +0 -47
- package/dist/collection/components/xv-progress-indicator-item/xv-progress-indicator-item.js.map +0 -1
- package/dist/collection/components/xv-table/defs.js +0 -14
- package/dist/collection/components/xv-table/defs.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.css +0 -8
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js +0 -19
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.css +0 -21
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js +0 -122
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +0 -53
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +0 -299
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +0 -1
- package/dist/collection/components/xv-table/xv-table.css +0 -154
- package/dist/collection/components/xv-table/xv-table.js +0 -245
- package/dist/collection/components/xv-table/xv-table.js.map +0 -1
- package/dist/collection/components/xv-tag/xv-tag.css +0 -97
- package/dist/collection/components/xv-tag/xv-tag.js +0 -158
- package/dist/collection/components/xv-tag/xv-tag.js.map +0 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +0 -154
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +0 -70
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +0 -1
- package/dist/collection/index.js +0 -11
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/scss/xv/images/xv-sprite.svg +0 -1
- package/dist/collection/scss/xv/sprite/images/xv-sprite.svg +0 -1
- package/dist/collection/types/enum.js +0 -9
- package/dist/collection/types/enum.js.map +0 -1
- package/dist/collection/utils/utils.js +0 -14
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/index-83ab73b7.js +0 -1506
- package/dist/esm/index-83ab73b7.js.map +0 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -13
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/utils-9bb6333b.js +0 -10
- package/dist/esm/utils-9bb6333b.js.map +0 -1
- package/dist/esm/xv-accordion-v2_16.entry.js +0 -644
- package/dist/esm/xv-accordion-v2_16.entry.js.map +0 -1
- package/dist/esm/xv-breadcrumbs-v2.entry.js +0 -18
- package/dist/esm/xv-breadcrumbs-v2.entry.js.map +0 -1
- package/dist/esm/xv-webcomponents.js +0 -22
- package/dist/esm/xv-webcomponents.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/types/components/xv-accordion/xv-accordion.d.ts +0 -20
- package/dist/types/components/xv-accordion-item/xv-accordion-item.d.ts +0 -15
- package/dist/types/components/xv-breadcrumbs/xv-breadcrumbs.d.ts +0 -3
- package/dist/types/components/xv-button/xv-button.d.ts +0 -16
- package/dist/types/components/xv-card/xv-card.d.ts +0 -8
- package/dist/types/components/xv-checkbox/xv-checkbox.d.ts +0 -70
- package/dist/types/components/xv-footer/xv-footer.d.ts +0 -6
- package/dist/types/components/xv-header/xv-header.d.ts +0 -6
- package/dist/types/components/xv-link/xv-link.d.ts +0 -9
- package/dist/types/components/xv-progress-indicator/xv-progress-indicator.d.ts +0 -7
- package/dist/types/components/xv-progress-indicator-item/xv-progress-indicator-item.d.ts +0 -5
- package/dist/types/components/xv-table/defs.d.ts +0 -16
- package/dist/types/components/xv-table/xv-table-col/xv-table-col.d.ts +0 -3
- package/dist/types/components/xv-table/xv-table-header-row/xv-table-header-row.d.ts +0 -25
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +0 -59
- package/dist/types/components/xv-table/xv-table.d.ts +0 -40
- package/dist/types/components/xv-tag/xv-tag.d.ts +0 -11
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +0 -11
- package/dist/types/components.d.ts +0 -705
- package/dist/types/index.d.ts +0 -11
- package/dist/types/stencil-public-runtime.d.ts +0 -1680
- package/dist/types/types/enum.d.ts +0 -7
- package/dist/types/utils/utils.d.ts +0 -9
- package/dist/xv-webcomponents/index.esm.js +0 -2
- package/dist/xv-webcomponents/index.esm.js.map +0 -1
- package/dist/xv-webcomponents/p-59dc31ad.entry.js +0 -2
- package/dist/xv-webcomponents/p-59dc31ad.entry.js.map +0 -1
- package/dist/xv-webcomponents/p-840929c5.js +0 -3
- package/dist/xv-webcomponents/p-840929c5.js.map +0 -1
- package/dist/xv-webcomponents/p-a0b74d3c.js +0 -2
- package/dist/xv-webcomponents/p-a0b74d3c.js.map +0 -1
- package/dist/xv-webcomponents/p-c1cf7200.entry.js +0 -2
- package/dist/xv-webcomponents/p-c1cf7200.entry.js.map +0 -1
- package/dist/xv-webcomponents/p-e1255160.js +0 -2
- package/dist/xv-webcomponents/p-e1255160.js.map +0 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +0 -2
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +0 -1
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.d.ts +0 -24
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +0 -2
- package/loader/package.json +0 -11
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
export class XvTableHeaderRow {
|
|
3
|
-
constructor() {
|
|
4
|
-
/**
|
|
5
|
-
* Checkbox row checked
|
|
6
|
-
*/
|
|
7
|
-
this.checked = false;
|
|
8
|
-
this.cols = 1;
|
|
9
|
-
this.slotChangeHandle = () => {
|
|
10
|
-
this.cols = this.el.childElementCount;
|
|
11
|
-
};
|
|
12
|
-
this.checkboxChange = (e) => {
|
|
13
|
-
this.checked = e.detail;
|
|
14
|
-
this.checkedChange.emit({
|
|
15
|
-
name: this.selectionName,
|
|
16
|
-
checked: e.detail
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return (h(Host, { key: '08a4252f72db12f1006c3e7b2b8599fd08e00248', cols: this.cols }, h("div", { key: 'aeb1d8480c24e100d24c429e0a4d06c4dbd1781b', class: "left-container" }, this.selectionName !== undefined && (h("xv-checkbox-v2", { key: '0942e1f66cb81d8eac082eca22b578ecf82b628b', partial: true, name: this.selectionName, checked: this.checked, onEventChange: this.checkboxChange }))), h("slot", { key: 'fca6a4ad89bac04fe9cc68bd039a23bc58fa153e', onSlotchange: this.slotChangeHandle })));
|
|
22
|
-
}
|
|
23
|
-
static get is() { return "xv-table-v2-header-row"; }
|
|
24
|
-
static get encapsulation() { return "shadow"; }
|
|
25
|
-
static get originalStyleUrls() {
|
|
26
|
-
return {
|
|
27
|
-
"$": ["xv-table-header-row.scss"]
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
static get styleUrls() {
|
|
31
|
-
return {
|
|
32
|
-
"$": ["xv-table-header-row.css"]
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
static get properties() {
|
|
36
|
-
return {
|
|
37
|
-
"selectionName": {
|
|
38
|
-
"type": "string",
|
|
39
|
-
"mutable": false,
|
|
40
|
-
"complexType": {
|
|
41
|
-
"original": "string",
|
|
42
|
-
"resolved": "string",
|
|
43
|
-
"references": {}
|
|
44
|
-
},
|
|
45
|
-
"required": false,
|
|
46
|
-
"optional": true,
|
|
47
|
-
"docs": {
|
|
48
|
-
"tags": [],
|
|
49
|
-
"text": "Checkbox row name"
|
|
50
|
-
},
|
|
51
|
-
"getter": false,
|
|
52
|
-
"setter": false,
|
|
53
|
-
"attribute": "selection-name",
|
|
54
|
-
"reflect": true
|
|
55
|
-
},
|
|
56
|
-
"partial": {
|
|
57
|
-
"type": "boolean",
|
|
58
|
-
"mutable": false,
|
|
59
|
-
"complexType": {
|
|
60
|
-
"original": "boolean",
|
|
61
|
-
"resolved": "boolean",
|
|
62
|
-
"references": {}
|
|
63
|
-
},
|
|
64
|
-
"required": false,
|
|
65
|
-
"optional": true,
|
|
66
|
-
"docs": {
|
|
67
|
-
"tags": [],
|
|
68
|
-
"text": "Checkbox row selected partially"
|
|
69
|
-
},
|
|
70
|
-
"getter": false,
|
|
71
|
-
"setter": false,
|
|
72
|
-
"attribute": "partial",
|
|
73
|
-
"reflect": true
|
|
74
|
-
},
|
|
75
|
-
"checked": {
|
|
76
|
-
"type": "boolean",
|
|
77
|
-
"mutable": true,
|
|
78
|
-
"complexType": {
|
|
79
|
-
"original": "boolean",
|
|
80
|
-
"resolved": "boolean",
|
|
81
|
-
"references": {}
|
|
82
|
-
},
|
|
83
|
-
"required": false,
|
|
84
|
-
"optional": true,
|
|
85
|
-
"docs": {
|
|
86
|
-
"tags": [],
|
|
87
|
-
"text": "Checkbox row checked"
|
|
88
|
-
},
|
|
89
|
-
"getter": false,
|
|
90
|
-
"setter": false,
|
|
91
|
-
"attribute": "checked",
|
|
92
|
-
"reflect": true,
|
|
93
|
-
"defaultValue": "false"
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
static get states() {
|
|
98
|
-
return {
|
|
99
|
-
"cols": {}
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
static get events() {
|
|
103
|
-
return [{
|
|
104
|
-
"method": "checkedChange",
|
|
105
|
-
"name": "checkedChange",
|
|
106
|
-
"bubbles": true,
|
|
107
|
-
"cancelable": true,
|
|
108
|
-
"composed": true,
|
|
109
|
-
"docs": {
|
|
110
|
-
"tags": [],
|
|
111
|
-
"text": ""
|
|
112
|
-
},
|
|
113
|
-
"complexType": {
|
|
114
|
-
"original": "{ name: string, value?: string; checked: boolean }",
|
|
115
|
-
"resolved": "{ name: string; value?: string; checked: boolean; }",
|
|
116
|
-
"references": {}
|
|
117
|
-
}
|
|
118
|
-
}];
|
|
119
|
-
}
|
|
120
|
-
static get elementRef() { return "el"; }
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=xv-table-header-row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xv-table-header-row.js","sourceRoot":"","sources":["../../../../src/components/xv-table/xv-table-header-row/xv-table-header-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAO9F,MAAM,OAAO,gBAAgB;IAL7B;QAeE;;WAEG;QACqC,YAAO,GAAa,KAAK,CAAC;QAEzD,SAAI,GAAW,CAAC,CAAC;QAIlB,qBAAgB,GAAG,GAAG,EAAE;YAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,iBAAiB,CAAC;QACxC,CAAC,CAAA;QAEO,mBAAc,GAAG,CAAC,CAAuB,EAAE,EAAE;YACnD,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;YACxB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;gBACtB,IAAI,EAAE,IAAI,CAAC,aAAa;gBACxB,OAAO,EAAE,CAAC,CAAC,MAAM;aAClB,CAAC,CAAC;QACL,CAAC,CAAA;KAmBF;IAjBC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI;YACnB,4DAAK,KAAK,EAAC,gBAAgB,IACxB,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,CACnC,uEACE,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,IAAI,CAAC,aAAa,EACxB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,aAAa,EAAE,IAAI,CAAC,cAAc,GAClC,CACH,CACG;YACN,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC7C,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop, State, Event, EventEmitter } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'xv-table-v2-header-row',\r\n styleUrl: 'xv-table-header-row.scss',\r\n shadow: true,\r\n})\r\nexport class XvTableHeaderRow {\r\n @Element() el: HTMLElement;\r\n /**\r\n * Checkbox row name\r\n */\r\n @Prop({ reflect: true, attribute: 'selection-name' }) selectionName?: string;\r\n /**\r\n * Checkbox row selected partially\r\n */\r\n @Prop({ reflect: true }) partial?: boolean;\r\n /**\r\n * Checkbox row checked\r\n */\r\n @Prop({ reflect: true, mutable: true }) checked?: boolean = false;\r\n\r\n @State() cols: number = 1;\r\n\r\n @Event() checkedChange: EventEmitter<{ name: string, value?: string; checked: boolean }>;\r\n\r\n private slotChangeHandle = () => {\r\n this.cols = this.el.childElementCount;\r\n }\r\n\r\n private checkboxChange = (e: CustomEvent<boolean>) => {\r\n this.checked = e.detail;\r\n this.checkedChange.emit({\r\n name: this.selectionName,\r\n checked: e.detail\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n <Host cols={this.cols}>\r\n <div class=\"left-container\">\r\n {this.selectionName !== undefined && (\r\n <xv-checkbox-v2\r\n partial={true}\r\n name={this.selectionName}\r\n checked={this.checked}\r\n onEventChange={this.checkboxChange}\r\n />\r\n )}\r\n </div>\r\n <slot onSlotchange={this.slotChangeHandle}></slot>\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
:host(xv-table-v2-row) {
|
|
2
|
-
display: grid;
|
|
3
|
-
padding: 16px;
|
|
4
|
-
align-items: center;
|
|
5
|
-
transition: height 0.15s cubic-bezier(0.2, 0, 0.38, 0.9), padding 0.15s ease-in-out, background-color 0.2ms ease-in-out;
|
|
6
|
-
background: var(--layer-02, #FFF);
|
|
7
|
-
box-shadow: 0 0 0 1px #E3E3E3 inset;
|
|
8
|
-
}
|
|
9
|
-
:host(xv-table-v2-row) .left-container {
|
|
10
|
-
height: 100%;
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: flex-end;
|
|
14
|
-
gap: 16px;
|
|
15
|
-
padding: 0 16px;
|
|
16
|
-
}
|
|
17
|
-
:host(xv-table-v2-row) .expand-btn {
|
|
18
|
-
outline: none;
|
|
19
|
-
background-color: transparent;
|
|
20
|
-
display: block;
|
|
21
|
-
margin: 0 auto;
|
|
22
|
-
border: solid black;
|
|
23
|
-
border-width: 0 2px 2px 0;
|
|
24
|
-
padding: 5px;
|
|
25
|
-
transform: rotate(45deg);
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
transition: opacity 300ms ease-in-out, transform 200ms ease-in-out;
|
|
28
|
-
}
|
|
29
|
-
:host(xv-table-v2-row) .expand-btn:active {
|
|
30
|
-
opacity: 0.5;
|
|
31
|
-
}
|
|
32
|
-
:host(xv-table-v2-row) .expand-btn.expanded {
|
|
33
|
-
transform: rotate(225deg);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:host([expanded]) {
|
|
37
|
-
block-size: auto;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:host([collapsed]) {
|
|
41
|
-
block-size: 0;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
padding-top: 0;
|
|
44
|
-
padding-bottom: 0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:host([odd]) {
|
|
48
|
-
background-color: var(--layer-selected-01, #E3E3E3);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host([even]) {
|
|
52
|
-
background-color: #fff;
|
|
53
|
-
}
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
import { uidGenerator } from "../../../utils/utils";
|
|
3
|
-
export class XvTableRow {
|
|
4
|
-
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* Is row will be expandable
|
|
7
|
-
* If it's true then the next row will be collapsed
|
|
8
|
-
*/
|
|
9
|
-
this.expandable = false;
|
|
10
|
-
/**
|
|
11
|
-
* Default state of expandable
|
|
12
|
-
*/
|
|
13
|
-
this.expanded = false;
|
|
14
|
-
this.prevRowExpanded = false;
|
|
15
|
-
this.cols = 1;
|
|
16
|
-
this.checkboxChange = (e) => {
|
|
17
|
-
this.checked = e.detail;
|
|
18
|
-
this.checkedChange.emit({
|
|
19
|
-
name: this.selectionName,
|
|
20
|
-
value: this.value,
|
|
21
|
-
checked: e.detail
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Called from outside (From expandable row)
|
|
27
|
-
*/
|
|
28
|
-
async setExpandRelation(id, expanded) {
|
|
29
|
-
this.expandId = id;
|
|
30
|
-
this.prevRowExpanded = !!expanded;
|
|
31
|
-
return this.prevRowExpanded;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Called from outside (From expandable row)
|
|
35
|
-
* to change then expand or collapse
|
|
36
|
-
*/
|
|
37
|
-
async toggleExpand(id, expanded) {
|
|
38
|
-
if (this.expandId !== id)
|
|
39
|
-
return;
|
|
40
|
-
this.prevRowExpanded = expanded !== undefined ? expanded : !this.prevRowExpanded;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Watch for expandable
|
|
44
|
-
* When it's false needs to remove unnecessary properties
|
|
45
|
-
*/
|
|
46
|
-
setExpandableRelationHandle() {
|
|
47
|
-
const nextEl = this.el.nextElementSibling;
|
|
48
|
-
if (!nextEl || nextEl.tagName !== this.el.tagName)
|
|
49
|
-
this.expandable = false;
|
|
50
|
-
if (!this.expandable)
|
|
51
|
-
return;
|
|
52
|
-
if (!this.id)
|
|
53
|
-
this.id = this.el.id || uidGenerator();
|
|
54
|
-
return nextEl.setExpandRelation(this.id, this.expanded);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* When user press on the expand button
|
|
58
|
-
*/
|
|
59
|
-
changeExpandHandle() {
|
|
60
|
-
const nextRow = this.el.nextElementSibling;
|
|
61
|
-
if (!nextRow || nextRow.tagName !== this.el.tagName)
|
|
62
|
-
return;
|
|
63
|
-
this.expanded = !this.expanded;
|
|
64
|
-
// Call method from new row
|
|
65
|
-
nextRow.toggleExpand(this.id, this.expanded);
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Highlight the expanded row on hover
|
|
69
|
-
*/
|
|
70
|
-
hoverHandle(active) {
|
|
71
|
-
const prevRow = this.el.previousElementSibling;
|
|
72
|
-
const nextRow = this.el.nextElementSibling;
|
|
73
|
-
if ((nextRow === null || nextRow === void 0 ? void 0 : nextRow.tagName) === this.el.tagName && this.expandable) {
|
|
74
|
-
if (active) {
|
|
75
|
-
nextRow.setAttribute('highlighted', '');
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
nextRow.removeAttribute('highlighted');
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if ((prevRow === null || prevRow === void 0 ? void 0 : prevRow.tagName) === this.el.tagName && prevRow.hasAttribute('expandable')) {
|
|
82
|
-
if (active) {
|
|
83
|
-
prevRow.setAttribute('highlighted', '');
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
prevRow.removeAttribute('highlighted');
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
async componentWillLoad() {
|
|
91
|
-
this.id = this.el.id;
|
|
92
|
-
this.cols = this.el.childElementCount;
|
|
93
|
-
await this.setExpandableRelationHandle();
|
|
94
|
-
}
|
|
95
|
-
render() {
|
|
96
|
-
return (h(Host, { key: '0b57254472bbc02e1eebe702c76a7fd4356600e6', onMouseEnter: () => this.hoverHandle(true), onMouseLeave: () => this.hoverHandle(false), cols: this.cols, expanded: this.expandId && this.prevRowExpanded, collapsed: this.expandId && !this.prevRowExpanded }, h("div", { key: '0eedb50558cd916adf235771905215a94bca7f77', class: "left-container" }, this.expandable && (h("button", { key: 'fe5a9e4d0c13ea53e986bcbabad388f73cb800c4', class: `expand-btn ${this.expanded ? 'expanded' : ''}`, onClick: () => this.changeExpandHandle() })), this.selectionName && (h("xv-checkbox-v2", { key: 'a9c2cd165c789985a5f932936b0e9e56f0420d82', name: this.selectionName, value: this.value, checked: this.checked, onEventChange: this.checkboxChange }))), h("slot", { key: '9b057636cd6f129857b4864ba37c0f6e3b3787a7' })));
|
|
97
|
-
}
|
|
98
|
-
static get is() { return "xv-table-v2-row"; }
|
|
99
|
-
static get encapsulation() { return "shadow"; }
|
|
100
|
-
static get originalStyleUrls() {
|
|
101
|
-
return {
|
|
102
|
-
"$": ["xv-table-row.scss"]
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
static get styleUrls() {
|
|
106
|
-
return {
|
|
107
|
-
"$": ["xv-table-row.css"]
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
static get properties() {
|
|
111
|
-
return {
|
|
112
|
-
"expandable": {
|
|
113
|
-
"type": "boolean",
|
|
114
|
-
"mutable": true,
|
|
115
|
-
"complexType": {
|
|
116
|
-
"original": "boolean",
|
|
117
|
-
"resolved": "boolean",
|
|
118
|
-
"references": {}
|
|
119
|
-
},
|
|
120
|
-
"required": false,
|
|
121
|
-
"optional": false,
|
|
122
|
-
"docs": {
|
|
123
|
-
"tags": [],
|
|
124
|
-
"text": "Is row will be expandable\r\nIf it's true then the next row will be collapsed"
|
|
125
|
-
},
|
|
126
|
-
"getter": false,
|
|
127
|
-
"setter": false,
|
|
128
|
-
"attribute": "expandable",
|
|
129
|
-
"reflect": false,
|
|
130
|
-
"defaultValue": "false"
|
|
131
|
-
},
|
|
132
|
-
"expanded": {
|
|
133
|
-
"type": "boolean",
|
|
134
|
-
"mutable": true,
|
|
135
|
-
"complexType": {
|
|
136
|
-
"original": "boolean",
|
|
137
|
-
"resolved": "boolean",
|
|
138
|
-
"references": {}
|
|
139
|
-
},
|
|
140
|
-
"required": false,
|
|
141
|
-
"optional": false,
|
|
142
|
-
"docs": {
|
|
143
|
-
"tags": [],
|
|
144
|
-
"text": "Default state of expandable"
|
|
145
|
-
},
|
|
146
|
-
"getter": false,
|
|
147
|
-
"setter": false,
|
|
148
|
-
"attribute": "expanded",
|
|
149
|
-
"reflect": true,
|
|
150
|
-
"defaultValue": "false"
|
|
151
|
-
},
|
|
152
|
-
"selectionName": {
|
|
153
|
-
"type": "string",
|
|
154
|
-
"mutable": false,
|
|
155
|
-
"complexType": {
|
|
156
|
-
"original": "string",
|
|
157
|
-
"resolved": "string",
|
|
158
|
-
"references": {}
|
|
159
|
-
},
|
|
160
|
-
"required": false,
|
|
161
|
-
"optional": true,
|
|
162
|
-
"docs": {
|
|
163
|
-
"tags": [],
|
|
164
|
-
"text": "Checkbox row name"
|
|
165
|
-
},
|
|
166
|
-
"getter": false,
|
|
167
|
-
"setter": false,
|
|
168
|
-
"attribute": "selection-name",
|
|
169
|
-
"reflect": true
|
|
170
|
-
},
|
|
171
|
-
"value": {
|
|
172
|
-
"type": "string",
|
|
173
|
-
"mutable": false,
|
|
174
|
-
"complexType": {
|
|
175
|
-
"original": "string",
|
|
176
|
-
"resolved": "string",
|
|
177
|
-
"references": {}
|
|
178
|
-
},
|
|
179
|
-
"required": false,
|
|
180
|
-
"optional": true,
|
|
181
|
-
"docs": {
|
|
182
|
-
"tags": [],
|
|
183
|
-
"text": "Checkbox row value"
|
|
184
|
-
},
|
|
185
|
-
"getter": false,
|
|
186
|
-
"setter": false,
|
|
187
|
-
"attribute": "value",
|
|
188
|
-
"reflect": true
|
|
189
|
-
},
|
|
190
|
-
"checked": {
|
|
191
|
-
"type": "boolean",
|
|
192
|
-
"mutable": true,
|
|
193
|
-
"complexType": {
|
|
194
|
-
"original": "boolean",
|
|
195
|
-
"resolved": "boolean",
|
|
196
|
-
"references": {}
|
|
197
|
-
},
|
|
198
|
-
"required": false,
|
|
199
|
-
"optional": true,
|
|
200
|
-
"docs": {
|
|
201
|
-
"tags": [],
|
|
202
|
-
"text": "Checkbox row status"
|
|
203
|
-
},
|
|
204
|
-
"getter": false,
|
|
205
|
-
"setter": false,
|
|
206
|
-
"attribute": "checked",
|
|
207
|
-
"reflect": true
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
static get states() {
|
|
212
|
-
return {
|
|
213
|
-
"prevRowExpanded": {},
|
|
214
|
-
"expandId": {},
|
|
215
|
-
"id": {},
|
|
216
|
-
"cols": {}
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
static get events() {
|
|
220
|
-
return [{
|
|
221
|
-
"method": "checkedChange",
|
|
222
|
-
"name": "checkedChange",
|
|
223
|
-
"bubbles": true,
|
|
224
|
-
"cancelable": true,
|
|
225
|
-
"composed": true,
|
|
226
|
-
"docs": {
|
|
227
|
-
"tags": [],
|
|
228
|
-
"text": ""
|
|
229
|
-
},
|
|
230
|
-
"complexType": {
|
|
231
|
-
"original": "{ name: string, value?: string; checked: boolean }",
|
|
232
|
-
"resolved": "{ name: string; value?: string; checked: boolean; }",
|
|
233
|
-
"references": {}
|
|
234
|
-
}
|
|
235
|
-
}];
|
|
236
|
-
}
|
|
237
|
-
static get methods() {
|
|
238
|
-
return {
|
|
239
|
-
"setExpandRelation": {
|
|
240
|
-
"complexType": {
|
|
241
|
-
"signature": "(id?: string, expanded?: boolean) => Promise<boolean>",
|
|
242
|
-
"parameters": [{
|
|
243
|
-
"name": "id",
|
|
244
|
-
"type": "string",
|
|
245
|
-
"docs": ""
|
|
246
|
-
}, {
|
|
247
|
-
"name": "expanded",
|
|
248
|
-
"type": "boolean",
|
|
249
|
-
"docs": ""
|
|
250
|
-
}],
|
|
251
|
-
"references": {
|
|
252
|
-
"Promise": {
|
|
253
|
-
"location": "global",
|
|
254
|
-
"id": "global::Promise"
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
"return": "Promise<boolean>"
|
|
258
|
-
},
|
|
259
|
-
"docs": {
|
|
260
|
-
"text": "Called from outside (From expandable row)",
|
|
261
|
-
"tags": []
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
"toggleExpand": {
|
|
265
|
-
"complexType": {
|
|
266
|
-
"signature": "(id?: string, expanded?: boolean) => Promise<void>",
|
|
267
|
-
"parameters": [{
|
|
268
|
-
"name": "id",
|
|
269
|
-
"type": "string",
|
|
270
|
-
"docs": ""
|
|
271
|
-
}, {
|
|
272
|
-
"name": "expanded",
|
|
273
|
-
"type": "boolean",
|
|
274
|
-
"docs": ""
|
|
275
|
-
}],
|
|
276
|
-
"references": {
|
|
277
|
-
"Promise": {
|
|
278
|
-
"location": "global",
|
|
279
|
-
"id": "global::Promise"
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
"return": "Promise<void>"
|
|
283
|
-
},
|
|
284
|
-
"docs": {
|
|
285
|
-
"text": "Called from outside (From expandable row)\r\nto change then expand or collapse",
|
|
286
|
-
"tags": []
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
static get elementRef() { return "el"; }
|
|
292
|
-
static get watchers() {
|
|
293
|
-
return [{
|
|
294
|
-
"propName": "expandable",
|
|
295
|
-
"methodName": "setExpandableRelationHandle"
|
|
296
|
-
}];
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
//# sourceMappingURL=xv-table-row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xv-table-row.js","sourceRoot":"","sources":["../../../../src/components/xv-table/xv-table-row/xv-table-row.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Host, h, Element, Prop, State, Watch, Method, Event, EventEmitter } from '@stencil/core';\r\nimport { uidGenerator } from '../../../utils/utils';\r\n\r\n@Component({\r\n tag: 'xv-table-v2-row',\r\n styleUrl: 'xv-table-row.scss',\r\n shadow: true,\r\n})\r\nexport class XvTableRow {\r\n @Element() el: HTMLElement;\r\n /**\r\n * Is row will be expandable\r\n * If it's true then the next row will be collapsed\r\n */\r\n @Prop({ mutable: true }) expandable: boolean = false;\r\n /**\r\n * Default state of expandable\r\n */\r\n @Prop({ reflect: true, mutable: true }) expanded: boolean = false;\r\n /**\r\n * Checkbox row name\r\n */\r\n @Prop({ reflect: true, attribute: 'selection-name' }) selectionName?: string;\r\n /**\r\n * Checkbox row value\r\n */\r\n @Prop({ reflect: true }) value?: string;\r\n /**\r\n * Checkbox row status\r\n */\r\n @Prop({ reflect: true, mutable: true }) checked?: boolean;\r\n\r\n @State() prevRowExpanded: boolean = false;\r\n @State() expandId?: string;\r\n @State() id?: string;\r\n @State() cols: number = 1;\r\n\r\n @Event() checkedChange: EventEmitter<{ name: string, value?: string; checked: boolean }>;\r\n\r\n /**\r\n * Called from outside (From expandable row)\r\n */\r\n @Method()\r\n async setExpandRelation(id?: string, expanded?: boolean) {\r\n this.expandId = id;\r\n this.prevRowExpanded = !!expanded;\r\n return this.prevRowExpanded;\r\n }\r\n\r\n /**\r\n * Called from outside (From expandable row)\r\n * to change then expand or collapse\r\n */\r\n @Method()\r\n async toggleExpand(id?: string, expanded?: boolean) {\r\n if (this.expandId !== id) return;\r\n this.prevRowExpanded = expanded !== undefined ? expanded : !this.prevRowExpanded;\r\n }\r\n\r\n /**\r\n * Watch for expandable\r\n * When it's false needs to remove unnecessary properties\r\n */\r\n @Watch('expandable')\r\n setExpandableRelationHandle(): Promise<any> {\r\n const nextEl = this.el.nextElementSibling;\r\n\r\n if (!nextEl || nextEl.tagName !== this.el.tagName) this.expandable = false;\r\n\r\n if (!this.expandable) return;\r\n\r\n if (!this.id) this.id = this.el.id || uidGenerator();\r\n\r\n return (nextEl as any).setExpandRelation(this.id, this.expanded);\r\n }\r\n\r\n /**\r\n * When user press on the expand button\r\n */\r\n private changeExpandHandle() {\r\n const nextRow = this.el.nextElementSibling;\r\n\r\n if (!nextRow || nextRow.tagName !== this.el.tagName) return;\r\n\r\n this.expanded = !this.expanded;\r\n // Call method from new row\r\n (nextRow as any).toggleExpand(this.id, this.expanded);\r\n }\r\n\r\n /**\r\n * Highlight the expanded row on hover\r\n */\r\n private hoverHandle(active: boolean) {\r\n const prevRow = this.el.previousElementSibling as HTMLElement | null;\r\n const nextRow = this.el.nextElementSibling as HTMLElement | null;\r\n\r\n if (nextRow?.tagName === this.el.tagName && this.expandable) {\r\n if (active) {\r\n nextRow.setAttribute('highlighted', '');\r\n } else {\r\n nextRow.removeAttribute('highlighted');\r\n }\r\n }\r\n\r\n if (prevRow?.tagName === this.el.tagName && prevRow.hasAttribute('expandable')) {\r\n if (active) {\r\n prevRow.setAttribute('highlighted', '');\r\n } else {\r\n prevRow.removeAttribute('highlighted');\r\n }\r\n }\r\n }\r\n\r\n private checkboxChange = (e: CustomEvent<boolean>) => {\r\n this.checked = e.detail;\r\n this.checkedChange.emit({\r\n name: this.selectionName,\r\n value: this.value,\r\n checked: e.detail\r\n });\r\n }\r\n\r\n async componentWillLoad(){\r\n this.id = this.el.id;\r\n this.cols = this.el.childElementCount;\r\n await this.setExpandableRelationHandle();\r\n }\r\n\r\n render() {\r\n return (\r\n <Host\r\n onMouseEnter={() => this.hoverHandle(true)}\r\n onMouseLeave={() => this.hoverHandle(false)}\r\n cols={this.cols}\r\n expanded={this.expandId && this.prevRowExpanded}\r\n collapsed={this.expandId && !this.prevRowExpanded}\r\n >\r\n <div class=\"left-container\">\r\n {this.expandable && (\r\n <button\r\n class={`expand-btn ${this.expanded ? 'expanded' : ''}`}\r\n onClick={() => this.changeExpandHandle()}\r\n />\r\n )}\r\n {this.selectionName && (\r\n <xv-checkbox-v2\r\n name={this.selectionName}\r\n value={this.value}\r\n checked={this.checked}\r\n onEventChange={this.checkboxChange}\r\n />\r\n )}\r\n </div>\r\n <slot />\r\n </Host>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
:host ::slotted(xv-table-v2-header-row[cols="1"]),
|
|
2
|
-
:host ::slotted(xv-table-v2-row[cols="1"]) {
|
|
3
|
-
--xv-table-cols: 1;
|
|
4
|
-
}
|
|
5
|
-
:host ::slotted(xv-table-v2-header-row[cols="2"]),
|
|
6
|
-
:host ::slotted(xv-table-v2-row[cols="2"]) {
|
|
7
|
-
--xv-table-cols: 2;
|
|
8
|
-
}
|
|
9
|
-
:host ::slotted(xv-table-v2-header-row[cols="3"]),
|
|
10
|
-
:host ::slotted(xv-table-v2-row[cols="3"]) {
|
|
11
|
-
--xv-table-cols: 3;
|
|
12
|
-
}
|
|
13
|
-
:host ::slotted(xv-table-v2-header-row[cols="4"]),
|
|
14
|
-
:host ::slotted(xv-table-v2-row[cols="4"]) {
|
|
15
|
-
--xv-table-cols: 4;
|
|
16
|
-
}
|
|
17
|
-
:host ::slotted(xv-table-v2-header-row[cols="5"]),
|
|
18
|
-
:host ::slotted(xv-table-v2-row[cols="5"]) {
|
|
19
|
-
--xv-table-cols: 5;
|
|
20
|
-
}
|
|
21
|
-
:host ::slotted(xv-table-v2-header-row[cols="6"]),
|
|
22
|
-
:host ::slotted(xv-table-v2-row[cols="6"]) {
|
|
23
|
-
--xv-table-cols: 6;
|
|
24
|
-
}
|
|
25
|
-
:host ::slotted(xv-table-v2-header-row[cols="7"]),
|
|
26
|
-
:host ::slotted(xv-table-v2-row[cols="7"]) {
|
|
27
|
-
--xv-table-cols: 7;
|
|
28
|
-
}
|
|
29
|
-
:host ::slotted(xv-table-v2-header-row[cols="8"]),
|
|
30
|
-
:host ::slotted(xv-table-v2-row[cols="8"]) {
|
|
31
|
-
--xv-table-cols: 8;
|
|
32
|
-
}
|
|
33
|
-
:host ::slotted(xv-table-v2-header-row[cols="9"]),
|
|
34
|
-
:host ::slotted(xv-table-v2-row[cols="9"]) {
|
|
35
|
-
--xv-table-cols: 9;
|
|
36
|
-
}
|
|
37
|
-
:host ::slotted(xv-table-v2-header-row[cols="10"]),
|
|
38
|
-
:host ::slotted(xv-table-v2-row[cols="10"]) {
|
|
39
|
-
--xv-table-cols: 10;
|
|
40
|
-
}
|
|
41
|
-
:host ::slotted(xv-table-v2-header-row[cols="11"]),
|
|
42
|
-
:host ::slotted(xv-table-v2-row[cols="11"]) {
|
|
43
|
-
--xv-table-cols: 11;
|
|
44
|
-
}
|
|
45
|
-
:host ::slotted(xv-table-v2-header-row[cols="12"]),
|
|
46
|
-
:host ::slotted(xv-table-v2-row[cols="12"]) {
|
|
47
|
-
--xv-table-cols: 12;
|
|
48
|
-
}
|
|
49
|
-
:host ::slotted(xv-table-v2-header-row[cols="13"]),
|
|
50
|
-
:host ::slotted(xv-table-v2-row[cols="13"]) {
|
|
51
|
-
--xv-table-cols: 13;
|
|
52
|
-
}
|
|
53
|
-
:host ::slotted(xv-table-v2-header-row[cols="14"]),
|
|
54
|
-
:host ::slotted(xv-table-v2-row[cols="14"]) {
|
|
55
|
-
--xv-table-cols: 14;
|
|
56
|
-
}
|
|
57
|
-
:host ::slotted(xv-table-v2-header-row[cols="15"]),
|
|
58
|
-
:host ::slotted(xv-table-v2-row[cols="15"]) {
|
|
59
|
-
--xv-table-cols: 15;
|
|
60
|
-
}
|
|
61
|
-
:host ::slotted(xv-table-v2-header-row[cols="16"]),
|
|
62
|
-
:host ::slotted(xv-table-v2-row[cols="16"]) {
|
|
63
|
-
--xv-table-cols: 16;
|
|
64
|
-
}
|
|
65
|
-
:host ::slotted(xv-table-v2-header-row[cols="17"]),
|
|
66
|
-
:host ::slotted(xv-table-v2-row[cols="17"]) {
|
|
67
|
-
--xv-table-cols: 17;
|
|
68
|
-
}
|
|
69
|
-
:host ::slotted(xv-table-v2-header-row[cols="18"]),
|
|
70
|
-
:host ::slotted(xv-table-v2-row[cols="18"]) {
|
|
71
|
-
--xv-table-cols: 18;
|
|
72
|
-
}
|
|
73
|
-
:host ::slotted(xv-table-v2-header-row[cols="19"]),
|
|
74
|
-
:host ::slotted(xv-table-v2-row[cols="19"]) {
|
|
75
|
-
--xv-table-cols: 19;
|
|
76
|
-
}
|
|
77
|
-
:host ::slotted(xv-table-v2-header-row[cols="20"]),
|
|
78
|
-
:host ::slotted(xv-table-v2-row[cols="20"]) {
|
|
79
|
-
--xv-table-cols: 20;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
:host([size=xs]) ::slotted(xv-table-v2-row),
|
|
83
|
-
:host([size=xs]) ::slotted(xv-table-v2-header-row) {
|
|
84
|
-
padding: 2px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
:host([size=sm]) ::slotted(xv-table-v2-row),
|
|
88
|
-
:host([size=sm]) ::slotted(xv-table-v2-header-row) {
|
|
89
|
-
padding: 8px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
:host([size=md]) ::slotted(xv-table-v2-row),
|
|
93
|
-
:host([size=md]) ::slotted(xv-table-v2-header-row) {
|
|
94
|
-
padding: 16px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
:host([size=lg]) ::slotted(xv-table-v2-row),
|
|
98
|
-
:host([size=lg]) ::slotted(xv-table-v2-header-row) {
|
|
99
|
-
padding: 18px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host([size=xl]) ::slotted(xv-table-v2-row),
|
|
103
|
-
:host([size=xl]) ::slotted(xv-table-v2-header-row) {
|
|
104
|
-
padding: 20px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
:host([hoverable]) ::slotted(xv-table-v2-row:hover),
|
|
108
|
-
:host([hoverable]) ::slotted([highlighted]) {
|
|
109
|
-
background-color: var(--layer-hover-01, #E3E3E3);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:host(xv-table-v2) ::slotted(xv-table-v2-row),
|
|
113
|
-
:host(xv-table-v2) ::slotted(xv-table-v2-header-row) {
|
|
114
|
-
grid-template-columns: 0 repeat(var(--xv-table-cols, 1), 1fr);
|
|
115
|
-
}
|
|
116
|
-
:host(xv-table-v2) ::slotted(xv-table-v2-row[collapsed]) {
|
|
117
|
-
padding-top: 0;
|
|
118
|
-
padding-bottom: 0;
|
|
119
|
-
}
|
|
120
|
-
:host(xv-table-v2) .caption {
|
|
121
|
-
padding: 16px 16px 18px;
|
|
122
|
-
}
|
|
123
|
-
:host(xv-table-v2) .caption_title, :host(xv-table-v2) .caption_description {
|
|
124
|
-
color: var(--text-primary, #333);
|
|
125
|
-
margin: 0;
|
|
126
|
-
}
|
|
127
|
-
:host(xv-table-v2) .caption_title {
|
|
128
|
-
font-family: var(--ff-heading, "Gill Sans");
|
|
129
|
-
font-size: 21px;
|
|
130
|
-
}
|
|
131
|
-
:host(xv-table-v2) .caption_description {
|
|
132
|
-
font-family: var(--ff-body, Tahoma);
|
|
133
|
-
font-size: 14px;
|
|
134
|
-
line-height: 128.571%;
|
|
135
|
-
letter-spacing: 0.16px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
:host([expandable]) ::slotted(xv-table-v2-row),
|
|
139
|
-
:host([expandable]) ::slotted(xv-table-v2-header-row) {
|
|
140
|
-
position: relative;
|
|
141
|
-
grid-template-columns: 48px repeat(var(--xv-table-cols, 1), 1fr);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
:host([selectable]) ::slotted(xv-table-v2-row),
|
|
145
|
-
:host([selectable]) ::slotted(xv-table-v2-header-row) {
|
|
146
|
-
position: relative;
|
|
147
|
-
grid-template-columns: 50px repeat(var(--xv-table-cols, 1), 1fr);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
:host([expandable][selectable]) ::slotted(xv-table-v2-row),
|
|
151
|
-
:host([expandable][selectable]) ::slotted(xv-table-v2-header-row) {
|
|
152
|
-
position: relative;
|
|
153
|
-
grid-template-columns: 98px repeat(var(--xv-table-cols, 1), 1fr);
|
|
154
|
-
}
|