xv-webcomponents 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-782b9733.js → index-5ee1b884.js} +43 -2
- package/dist/cjs/index-5ee1b884.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-aa46f72a.js → utils-22c0eda0.js} +1 -16
- package/dist/cjs/utils-22c0eda0.js.map +1 -0
- package/dist/cjs/{xv-accordion-v2_28.cjs.entry.js → xv-accordion-v2_26.cjs.entry.js} +191 -440
- package/dist/cjs/xv-accordion-v2_26.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +1 -1
- package/dist/cjs/xv-webcomponents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -3
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +4 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js.map +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +41 -11
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.js +1 -1
- package/dist/collection/components/xv-link/xv-link.css +5 -0
- package/dist/collection/components/xv-link/xv-link.js +3 -3
- package/dist/collection/components/xv-link/xv-link.js.map +1 -1
- package/dist/collection/components/xv-modal/xv-modal.css +8 -4
- package/dist/collection/components/xv-modal/xv-modal.js +31 -7
- package/dist/collection/components/xv-modal/xv-modal.js.map +1 -1
- package/dist/collection/components/xv-notification/xv-notification.js +3 -3
- package/dist/collection/components/xv-notification/xv-notification.js.map +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.css +3 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +2 -2
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js.map +1 -1
- package/dist/collection/components/xv-table/_vars.js +9 -0
- package/dist/collection/components/xv-table/_vars.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +93 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +160 -0
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js.map +1 -0
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +55 -114
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +28 -151
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +27 -34
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +165 -106
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js.map +1 -1
- package/dist/collection/components/xv-table/xv-table.css +101 -141
- package/dist/collection/components/xv-table/xv-table.js +70 -196
- package/dist/collection/components/xv-table/xv-table.js.map +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.css +7 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +44 -3
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js.map +1 -1
- package/dist/collection/components/xv-tabs/xv-tabs.css +60 -12
- package/dist/collection/components/xv-tabs/xv-tabs.js +97 -48
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-text-input/xv-text-input.js +53 -10
- package/dist/collection/components/xv-text-input/xv-text-input.js.map +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +6 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +22 -3
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -1
- package/dist/esm/{index-83ab73b7.js → index-590eb7d2.js} +43 -3
- package/dist/esm/index-590eb7d2.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-0d1c18d5.js → utils-a9c71376.js} +2 -16
- package/dist/esm/utils-a9c71376.js.map +1 -0
- package/dist/esm/{xv-accordion-v2_28.entry.js → xv-accordion-v2_26.entry.js} +191 -438
- package/dist/esm/xv-accordion-v2_26.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +1 -1
- package/dist/esm/xv-webcomponents.js +3 -3
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +2 -0
- package/dist/types/components/xv-link/xv-link.d.ts +1 -1
- package/dist/types/components/xv-modal/xv-modal.d.ts +5 -1
- package/dist/types/components/xv-table/_vars.d.ts +19 -0
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +12 -0
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +4 -20
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +16 -46
- package/dist/types/components/xv-table/xv-table.d.ts +10 -32
- package/dist/types/components/xv-tabs/xv-tab/xv-tab.d.ts +2 -0
- package/dist/types/components/xv-tabs/xv-tabs.d.ts +15 -11
- package/dist/types/components/xv-text-input/xv-text-input.d.ts +3 -0
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +127 -265
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/p-51113bf3.entry.js +2 -0
- package/dist/xv-webcomponents/p-51113bf3.entry.js.map +1 -0
- package/dist/xv-webcomponents/p-612356e6.js +3 -0
- package/dist/xv-webcomponents/p-612356e6.js.map +1 -0
- package/dist/xv-webcomponents/p-c09a0bfe.entry.js +2 -0
- package/dist/xv-webcomponents/p-f98a1845.js +2 -0
- package/dist/xv-webcomponents/p-f98a1845.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-782b9733.js.map +0 -1
- package/dist/cjs/utils-aa46f72a.js.map +0 -1
- package/dist/cjs/xv-accordion-v2_28.cjs.entry.js.map +0 -1
- package/dist/collection/components/xv-table/defs.js +0 -28
- 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 -13
- package/dist/collection/components/xv-table/xv-table-col/xv-table-col.js +0 -111
- 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 -80
- package/dist/collection/components/xv-table/xv-table-header-row/xv-table-header-row.js +0 -172
- 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-toolbar/xv-table-toolbar.css +0 -47
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js +0 -78
- package/dist/collection/components/xv-table/xv-table-toolbar/xv-table-toolbar.js.map +0 -1
- package/dist/esm/index-83ab73b7.js.map +0 -1
- package/dist/esm/utils-0d1c18d5.js.map +0 -1
- package/dist/esm/xv-accordion-v2_28.entry.js.map +0 -1
- package/dist/types/components/xv-table/defs.d.ts +0 -38
- package/dist/types/components/xv-table/xv-table-col/xv-table-col.d.ts +0 -9
- package/dist/types/components/xv-table/xv-table-header-row/xv-table-header-row.d.ts +0 -28
- package/dist/types/components/xv-table/xv-table-toolbar/xv-table-toolbar.d.ts +0 -6
- package/dist/xv-webcomponents/p-39bf1511.js +0 -2
- package/dist/xv-webcomponents/p-39bf1511.js.map +0 -1
- package/dist/xv-webcomponents/p-5f18d718.entry.js +0 -2
- package/dist/xv-webcomponents/p-840929c5.js +0 -3
- package/dist/xv-webcomponents/p-840929c5.js.map +0 -1
- package/dist/xv-webcomponents/p-cc83f7ea.entry.js +0 -2
- package/dist/xv-webcomponents/p-cc83f7ea.entry.js.map +0 -1
- /package/dist/xv-webcomponents/{p-5f18d718.entry.js.map → p-c09a0bfe.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xv-progress-indicator.js","sourceRoot":"","sources":["../../../src/components/xv-progress-indicator/xv-progress-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAO5C,MAAM,OAAO,mBAAmB;IALhC;QAOE;;;WAGG;
|
|
1
|
+
{"version":3,"file":"xv-progress-indicator.js","sourceRoot":"","sources":["../../../src/components/xv-progress-indicator/xv-progress-indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAO5C,MAAM,OAAO,mBAAmB;IALhC;QAOE;;;WAGG;QACsB,aAAQ,GAAW,CAAC,CAAC;QAC9C;;;;WAIG;QACK,YAAO,GAAsB,iBAAiB,CAAC,OAAO,CAAC;QAC/D;;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AAC,CAAC,CAAC;IACL,CAAC;IAED,2BAA2B;IAC3B,gBAAgB;QACd,IAAI,CAAC,gBAAgB,EAAE,CAAA;IACzB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,uBAAuB,EAAE,IAAI,EAAE;YACpF,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Watch, Element } from '@stencil/core';\nimport { PROGRESS_ITEM_STATUS, PROGRESS_VARIANTS } from './_vars';\nimport { SIZE_VAR } from '../../types/enum';\nimport { forEach } from '../../utils/utils';\n\n@Component({\n tag: 'xv-progress-indicator-v2',\n styleUrl: 'xv-progress-indicator.scss',\n shadow: true,\n})\nexport class XvProgressIndicator {\n @Element() el: HTMLElement;\n /**\n * Current progress\n * from 0 to 100\n */\n @Prop({ reflect: true }) progress: number = 0;\n /**\n * Progress variant\n * enum PROGRESS_VARIANTS\n * possible option `horizontal`\n */\n @Prop() variant: PROGRESS_VARIANTS = PROGRESS_VARIANTS.DEFAULT;\n /**\n * Size of progress\n * enum SIZE_VAR\n * possible options `XS | SM | MD | LG | XL`\n */\n @Prop() size: SIZE_VAR = SIZE_VAR.MD;\n\n // Update 'xv-progress-indicator-item' done status\n @Watch('progress')\n updateChildItems() {\n const items = this.el.children;\n const itemsCount = this.el.childElementCount;\n const progressPerItem = 100 / itemsCount;\n\n if (!items.length || !itemsCount) return;\n\n forEach(items, (item, index) => {\n const itemProgressStart = index * progressPerItem;\n let status: PROGRESS_ITEM_STATUS;\n const localProgress = Math.min(\n Math.max((this.progress - itemProgressStart) / progressPerItem, 0), 1\n ) * 100;\n\n if (localProgress >= 100) {\n status = PROGRESS_ITEM_STATUS.DONE;\n } else if (localProgress > 0) {\n status = PROGRESS_ITEM_STATUS.IN_PROGRESS;\n } else {\n status = PROGRESS_ITEM_STATUS.NO_STARTED;\n }\n\n // Set item current status\n (item as HTMLElement).setAttribute('status', status);\n\n // Update progress line\n const line = (item as HTMLElement)?.shadowRoot?.querySelector('.line') as HTMLElement;\n if (line) line.style.width = `${localProgress}%`;\n });\n }\n\n // Load initial done status\n componentDidLoad() {\n this.updateChildItems()\n }\n\n render() {\n return (\n <Host variant={this.variant} size={this.size} class={{ 'xv-progress-indicator': true }}>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var XV_SORT_DIR;
|
|
2
|
+
(function (XV_SORT_DIR) {
|
|
3
|
+
XV_SORT_DIR["ASC"] = "asc";
|
|
4
|
+
XV_SORT_DIR["DESC"] = "desc";
|
|
5
|
+
XV_SORT_DIR["NONE"] = "none";
|
|
6
|
+
})(XV_SORT_DIR || (XV_SORT_DIR = {}));
|
|
7
|
+
export const XV_EXPANDABLE_KEY = 'expandable';
|
|
8
|
+
export const XV_TABLE_TAG = 'xv-table-v2';
|
|
9
|
+
//# sourceMappingURL=_vars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_vars.js","sourceRoot":"","sources":["../../../src/components/xv-table/_vars.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,4BAAa,CAAA;IACb,4BAAa,CAAA;AACf,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAC9C,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC","sourcesContent":["export interface SelectRowDto {\n name: string;\n checked: boolean;\n value?: string | number | object;\n partial?: boolean;\n header?: boolean;\n expandable?: boolean;\n}\n\nexport enum XV_SORT_DIR {\n ASC = 'asc',\n DESC = 'desc',\n NONE = 'none'\n}\n\nexport const XV_EXPANDABLE_KEY = 'expandable';\nexport const XV_TABLE_TAG = 'xv-table-v2';\n\nexport interface XVTableSortDto {\n name?: string;\n value: XV_SORT_DIR;\n}\n"]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
:host {
|
|
3
|
+
white-space: nowrap;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
text-overflow: ellipsis;
|
|
6
|
+
padding: var(--xv-table-padding-y) var(--xv-table-padding-x);
|
|
7
|
+
color: var(--text-primary, #333);
|
|
8
|
+
font-family: var(--ff-body, Tahoma);
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
line-height: 1.2;
|
|
13
|
+
letter-spacing: 0.16px;
|
|
14
|
+
transition: 0.25s ease-in-out background-color;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host([multiline]) {
|
|
18
|
+
display: -webkit-box;
|
|
19
|
+
-webkit-line-clamp: 2;
|
|
20
|
+
-webkit-box-orient: vertical;
|
|
21
|
+
white-space: initial;
|
|
22
|
+
padding-bottom: 1px;
|
|
23
|
+
padding-top: 0;
|
|
24
|
+
line-height: 1.2;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([align=left]) {
|
|
28
|
+
text-align: left;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([align=right]) {
|
|
32
|
+
text-align: right;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([align=center]) {
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([sort]) {
|
|
40
|
+
position: relative;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
user-select: none;
|
|
43
|
+
}
|
|
44
|
+
:host([sort]):before, :host([sort]):after {
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
line-height: 10px;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
position: absolute;
|
|
52
|
+
right: 8px;
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
transition: 350ms ease-in-out opacity;
|
|
55
|
+
opacity: 0;
|
|
56
|
+
}
|
|
57
|
+
:host([sort]):before {
|
|
58
|
+
content: "▲";
|
|
59
|
+
top: 50%;
|
|
60
|
+
transform: translateY(calc(-50% - 5px));
|
|
61
|
+
}
|
|
62
|
+
:host([sort])::after {
|
|
63
|
+
content: "▼";
|
|
64
|
+
top: 50%;
|
|
65
|
+
transform: translateY(calc(-50% + 5px));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([sort]:hover) {
|
|
69
|
+
background-color: var(--layer-accent-hover-01, #E3E3E3);
|
|
70
|
+
}
|
|
71
|
+
:host([sort]:hover)::before, :host([sort]:hover)::after {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([sort=asc]) {
|
|
76
|
+
background-color: var(--layer-accent-active-01, #D1D1D1);
|
|
77
|
+
}
|
|
78
|
+
:host([sort=asc])::before {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
:host([sort=asc])::after {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([sort=desc]) {
|
|
86
|
+
background-color: var(--layer-accent-active-01, #D1D1D1);
|
|
87
|
+
}
|
|
88
|
+
:host([sort=desc])::before {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
:host([sort=desc])::after {
|
|
92
|
+
opacity: 1;
|
|
93
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { XV_SORT_DIR } from "../_vars";
|
|
3
|
+
import { forEach, uidGenerator } from "../../../utils/utils";
|
|
4
|
+
export class XvTableCell {
|
|
5
|
+
handleSort() {
|
|
6
|
+
if (this.sort === undefined)
|
|
7
|
+
return;
|
|
8
|
+
let sort = this.sort;
|
|
9
|
+
if (this.sort === '')
|
|
10
|
+
sort = XV_SORT_DIR.NONE;
|
|
11
|
+
this.sort = sort === XV_SORT_DIR.NONE ?
|
|
12
|
+
XV_SORT_DIR.ASC : sort === XV_SORT_DIR.ASC ?
|
|
13
|
+
XV_SORT_DIR.DESC : XV_SORT_DIR.NONE;
|
|
14
|
+
forEach(this.el.parentElement.children, (cell) => {
|
|
15
|
+
if (cell !== this.el && cell.hasAttribute('sort')) {
|
|
16
|
+
cell.setAttribute('sort', 'none');
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
if (!this.name)
|
|
20
|
+
this.name = uidGenerator();
|
|
21
|
+
this.sortChange.emit({ name: this.name, value: this.sort });
|
|
22
|
+
}
|
|
23
|
+
;
|
|
24
|
+
render() {
|
|
25
|
+
return (h(Host, { key: 'a2b8e397dcc44ae5a4e018f655586ef4e4900564' }, h("slot", { key: '9b2f63ba4c33f03cb55030d87b4da14a2745ecc3' })));
|
|
26
|
+
}
|
|
27
|
+
static get is() { return "xv-table-v2-cell"; }
|
|
28
|
+
static get encapsulation() { return "shadow"; }
|
|
29
|
+
static get originalStyleUrls() {
|
|
30
|
+
return {
|
|
31
|
+
"$": ["xv-table-cell.scss"]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static get styleUrls() {
|
|
35
|
+
return {
|
|
36
|
+
"$": ["xv-table-cell.css"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static get properties() {
|
|
40
|
+
return {
|
|
41
|
+
"multiline": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"mutable": false,
|
|
44
|
+
"complexType": {
|
|
45
|
+
"original": "boolean",
|
|
46
|
+
"resolved": "boolean",
|
|
47
|
+
"references": {}
|
|
48
|
+
},
|
|
49
|
+
"required": false,
|
|
50
|
+
"optional": true,
|
|
51
|
+
"docs": {
|
|
52
|
+
"tags": [],
|
|
53
|
+
"text": ""
|
|
54
|
+
},
|
|
55
|
+
"getter": false,
|
|
56
|
+
"setter": false,
|
|
57
|
+
"attribute": "multiline",
|
|
58
|
+
"reflect": true
|
|
59
|
+
},
|
|
60
|
+
"name": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"mutable": true,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "string",
|
|
65
|
+
"resolved": "string",
|
|
66
|
+
"references": {}
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"optional": true,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": ""
|
|
73
|
+
},
|
|
74
|
+
"getter": false,
|
|
75
|
+
"setter": false,
|
|
76
|
+
"attribute": "name",
|
|
77
|
+
"reflect": true
|
|
78
|
+
},
|
|
79
|
+
"align": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"mutable": false,
|
|
82
|
+
"complexType": {
|
|
83
|
+
"original": "'left' | 'right' | 'center'",
|
|
84
|
+
"resolved": "\"center\" | \"left\" | \"right\"",
|
|
85
|
+
"references": {}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": true,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": ""
|
|
92
|
+
},
|
|
93
|
+
"getter": false,
|
|
94
|
+
"setter": false,
|
|
95
|
+
"attribute": "align",
|
|
96
|
+
"reflect": true
|
|
97
|
+
},
|
|
98
|
+
"sort": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"mutable": true,
|
|
101
|
+
"complexType": {
|
|
102
|
+
"original": "XV_SORT_DIR | ''",
|
|
103
|
+
"resolved": "\"\" | XV_SORT_DIR.ASC | XV_SORT_DIR.DESC | XV_SORT_DIR.NONE",
|
|
104
|
+
"references": {
|
|
105
|
+
"XV_SORT_DIR": {
|
|
106
|
+
"location": "import",
|
|
107
|
+
"path": "../_vars",
|
|
108
|
+
"id": "src/components/xv-table/_vars.ts::XV_SORT_DIR"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": true,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": ""
|
|
117
|
+
},
|
|
118
|
+
"getter": false,
|
|
119
|
+
"setter": false,
|
|
120
|
+
"attribute": "sort",
|
|
121
|
+
"reflect": true
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
static get events() {
|
|
126
|
+
return [{
|
|
127
|
+
"method": "sortChange",
|
|
128
|
+
"name": "sortChange",
|
|
129
|
+
"bubbles": true,
|
|
130
|
+
"cancelable": true,
|
|
131
|
+
"composed": true,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": ""
|
|
135
|
+
},
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "XVTableSortDto",
|
|
138
|
+
"resolved": "XVTableSortDto",
|
|
139
|
+
"references": {
|
|
140
|
+
"XVTableSortDto": {
|
|
141
|
+
"location": "import",
|
|
142
|
+
"path": "../_vars",
|
|
143
|
+
"id": "src/components/xv-table/_vars.ts::XVTableSortDto"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}];
|
|
148
|
+
}
|
|
149
|
+
static get elementRef() { return "el"; }
|
|
150
|
+
static get listeners() {
|
|
151
|
+
return [{
|
|
152
|
+
"name": "click",
|
|
153
|
+
"method": "handleSort",
|
|
154
|
+
"target": undefined,
|
|
155
|
+
"capture": false,
|
|
156
|
+
"passive": false
|
|
157
|
+
}];
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=xv-table-cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xv-table-cell.js","sourceRoot":"","sources":["../../../../src/components/xv-table/xv-table-cell/xv-table-cell.tsx"],"names":[],"mappings":"AAAA,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L,EAAC,IAAI;YAAC,8DAAQ,CAAO,CACtB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Prop, Event, EventEmitter, Listen } from '@stencil/core';\nimport { XV_SORT_DIR, XVTableSortDto } from '../_vars';\nimport { forEach, uidGenerator } from '../../../utils/utils';\n\n@Component({\n tag: 'xv-table-v2-cell',\n styleUrl: 'xv-table-cell.scss',\n shadow: true,\n})\nexport class XvTableCell {\n @Element() el: HTMLElement;\n @Prop({ reflect: true }) multiline?: boolean;\n @Prop({ reflect: true, mutable: true }) name?: string;\n @Prop({ reflect: true }) align?: 'left' | 'right' | 'center';\n @Prop({ reflect: true, mutable: true }) sort?: XV_SORT_DIR | '';\n @Event({ eventName: 'sortChange' }) sortChange: EventEmitter<XVTableSortDto>;\n\n @Listen('click')\n handleSort() {\n if (this.sort === undefined) return;\n let sort: XV_SORT_DIR | '' = this.sort;\n if (this.sort === '') sort = XV_SORT_DIR.NONE;\n\n this.sort = sort === XV_SORT_DIR.NONE ?\n XV_SORT_DIR.ASC : sort === XV_SORT_DIR.ASC ?\n XV_SORT_DIR.DESC : XV_SORT_DIR.NONE;\n\n forEach(this.el.parentElement.children, (cell) => {\n if (cell !== this.el && cell.hasAttribute('sort')) {\n cell.setAttribute('sort', 'none');\n }\n });\n\n if (!this.name) this.name = uidGenerator();\n this.sortChange.emit({ name: this.name, value: this.sort });\n };\n\n render() {\n return (\n <Host><slot /></Host>\n );\n }\n}\n"]}
|
|
@@ -1,116 +1,57 @@
|
|
|
1
|
-
:host
|
|
2
|
-
:
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
:host
|
|
7
|
-
:
|
|
8
|
-
:
|
|
9
|
-
--xv-table-
|
|
10
|
-
|
|
11
|
-
:
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
:
|
|
18
|
-
:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
:
|
|
23
|
-
:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
:
|
|
27
|
-
|
|
28
|
-
:host
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
:host
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
:host ::slotted(xv-table-v2-header-row[cols="8"]),
|
|
37
|
-
:host ::slotted(xv-table-v2-row[cols="8"]),
|
|
38
|
-
:host ::slotted(xv-table-v2-expand[cols="8"]) {
|
|
39
|
-
--xv-table-cols: 8;
|
|
40
|
-
}
|
|
41
|
-
:host ::slotted(xv-table-v2-header-row[cols="9"]),
|
|
42
|
-
:host ::slotted(xv-table-v2-row[cols="9"]),
|
|
43
|
-
:host ::slotted(xv-table-v2-expand[cols="9"]) {
|
|
44
|
-
--xv-table-cols: 9;
|
|
45
|
-
}
|
|
46
|
-
:host ::slotted(xv-table-v2-header-row[cols="10"]),
|
|
47
|
-
:host ::slotted(xv-table-v2-row[cols="10"]),
|
|
48
|
-
:host ::slotted(xv-table-v2-expand[cols="10"]) {
|
|
49
|
-
--xv-table-cols: 10;
|
|
50
|
-
}
|
|
51
|
-
:host ::slotted(xv-table-v2-header-row[cols="11"]),
|
|
52
|
-
:host ::slotted(xv-table-v2-row[cols="11"]),
|
|
53
|
-
:host ::slotted(xv-table-v2-expand[cols="11"]) {
|
|
54
|
-
--xv-table-cols: 11;
|
|
55
|
-
}
|
|
56
|
-
:host ::slotted(xv-table-v2-header-row[cols="12"]),
|
|
57
|
-
:host ::slotted(xv-table-v2-row[cols="12"]),
|
|
58
|
-
:host ::slotted(xv-table-v2-expand[cols="12"]) {
|
|
59
|
-
--xv-table-cols: 12;
|
|
60
|
-
}
|
|
61
|
-
:host ::slotted(xv-table-v2-header-row[cols="13"]),
|
|
62
|
-
:host ::slotted(xv-table-v2-row[cols="13"]),
|
|
63
|
-
:host ::slotted(xv-table-v2-expand[cols="13"]) {
|
|
64
|
-
--xv-table-cols: 13;
|
|
65
|
-
}
|
|
66
|
-
:host ::slotted(xv-table-v2-header-row[cols="14"]),
|
|
67
|
-
:host ::slotted(xv-table-v2-row[cols="14"]),
|
|
68
|
-
:host ::slotted(xv-table-v2-expand[cols="14"]) {
|
|
69
|
-
--xv-table-cols: 14;
|
|
70
|
-
}
|
|
71
|
-
:host ::slotted(xv-table-v2-header-row[cols="15"]),
|
|
72
|
-
:host ::slotted(xv-table-v2-row[cols="15"]),
|
|
73
|
-
:host ::slotted(xv-table-v2-expand[cols="15"]) {
|
|
74
|
-
--xv-table-cols: 15;
|
|
75
|
-
}
|
|
76
|
-
:host ::slotted(xv-table-v2-header-row[cols="16"]),
|
|
77
|
-
:host ::slotted(xv-table-v2-row[cols="16"]),
|
|
78
|
-
:host ::slotted(xv-table-v2-expand[cols="16"]) {
|
|
79
|
-
--xv-table-cols: 16;
|
|
80
|
-
}
|
|
81
|
-
:host ::slotted(xv-table-v2-header-row[cols="17"]),
|
|
82
|
-
:host ::slotted(xv-table-v2-row[cols="17"]),
|
|
83
|
-
:host ::slotted(xv-table-v2-expand[cols="17"]) {
|
|
84
|
-
--xv-table-cols: 17;
|
|
85
|
-
}
|
|
86
|
-
:host ::slotted(xv-table-v2-header-row[cols="18"]),
|
|
87
|
-
:host ::slotted(xv-table-v2-row[cols="18"]),
|
|
88
|
-
:host ::slotted(xv-table-v2-expand[cols="18"]) {
|
|
89
|
-
--xv-table-cols: 18;
|
|
90
|
-
}
|
|
91
|
-
:host ::slotted(xv-table-v2-header-row[cols="19"]),
|
|
92
|
-
:host ::slotted(xv-table-v2-row[cols="19"]),
|
|
93
|
-
:host ::slotted(xv-table-v2-expand[cols="19"]) {
|
|
94
|
-
--xv-table-cols: 19;
|
|
95
|
-
}
|
|
96
|
-
:host ::slotted(xv-table-v2-header-row[cols="20"]),
|
|
97
|
-
:host ::slotted(xv-table-v2-row[cols="20"]),
|
|
98
|
-
:host ::slotted(xv-table-v2-expand[cols="20"]) {
|
|
99
|
-
--xv-table-cols: 20;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
:host(xv-table-v2-expand) ::slotted(xv-table-v2-row) {
|
|
103
|
-
block-size: auto;
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
position: relative;
|
|
4
|
+
transition: 0.25s ease-in-out background-color;
|
|
5
|
+
}
|
|
6
|
+
:host .expand-btn {
|
|
7
|
+
z-index: 9;
|
|
8
|
+
position: absolute;
|
|
9
|
+
left: max(10px, var(--xv-table-padding-x));
|
|
10
|
+
top: max(2px, var(--xv-table-padding-y) + 2px);
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
outline: none;
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
display: block;
|
|
18
|
+
width: 8.5px;
|
|
19
|
+
height: 8.5px;
|
|
20
|
+
border-top: none;
|
|
21
|
+
border-left: none;
|
|
22
|
+
border-right: 2px solid var(--icon-primary, #333);
|
|
23
|
+
border-bottom: 2px solid var(--icon-primary, #333);
|
|
24
|
+
transform: rotate(45deg);
|
|
25
|
+
transform-origin: center center;
|
|
26
|
+
transition: 0.2s ease-in-out transform;
|
|
27
|
+
}
|
|
28
|
+
:host .expand-btn:disabled {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
opacity: 0.5;
|
|
31
|
+
}
|
|
32
|
+
:host .expand-btn.open {
|
|
33
|
+
transform: rotate(-135deg);
|
|
34
|
+
}
|
|
35
|
+
:host .expandableContent {
|
|
104
36
|
overflow: hidden;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
:
|
|
115
|
-
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
max-height: 0;
|
|
40
|
+
transition: 250ms ease max-height;
|
|
41
|
+
}
|
|
42
|
+
:host .expandableContent.open {
|
|
43
|
+
max-height: 600px;
|
|
44
|
+
}
|
|
45
|
+
:host ::slotted([slot=expandable]) {
|
|
46
|
+
display: grid;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
:host ::slotted(xv-table-v2-row),
|
|
50
|
+
:host ::slotted([slot=expandable]) {
|
|
51
|
+
padding-inline-start: calc(max(10px, var(--xv-table-padding-x)) * 2 + 10px);
|
|
52
|
+
}
|
|
53
|
+
:host ::slotted([disabled]) {
|
|
54
|
+
opacity: 0.4;
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
user-select: none;
|
|
116
57
|
}
|