@scania/tegel 1.13.0 → 1.13.2
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-ca8040ad.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-folder-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +2 -2
- package/dist/cjs/tds-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +2 -2
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +2 -2
- package/dist/cjs/tds-popover-canvas.cjs.entry.js +10 -2
- package/dist/cjs/tds-popover-core.cjs.entry.js +5 -1
- package/dist/cjs/tds-popover-menu.cjs.entry.js +10 -2
- package/dist/cjs/tds-table-body-input-wrapper.cjs.entry.js +85 -0
- package/dist/cjs/tds-table-body-row-expandable.cjs.entry.js +5 -5
- package/dist/cjs/tds-table-body-row.cjs.entry.js +2 -2
- package/dist/cjs/tds-table-footer.cjs.entry.js +2 -2
- package/dist/cjs/tds-table-header-input-wrapper.cjs.entry.js +85 -0
- package/dist/cjs/tds-table-header.cjs.entry.js +2 -2
- package/dist/cjs/tds-table-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/tds-text-field.cjs.entry.js +5 -5
- package/dist/cjs/tds-textarea.cjs.entry.js +3 -3
- package/dist/cjs/tds-toast.cjs.entry.js +3 -3
- package/dist/cjs/tds-toggle.cjs.entry.js +1 -1
- package/dist/cjs/tds-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js +36 -2
- package/dist/collection/components/popover-core/popover-core.js +26 -1
- package/dist/collection/components/popover-menu/popover-menu.js +36 -2
- package/dist/collection/components/table/table-body-input-wrapper/table-body-input-wrapper.css +62 -0
- package/dist/collection/components/table/table-body-input-wrapper/table-body-input-wrapper.js +124 -0
- package/dist/collection/components/table/table-body-row/table-body-row.js +2 -2
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.css +2 -0
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +4 -4
- package/dist/collection/components/table/table-footer/table-footer.js +2 -2
- package/dist/collection/components/table/table-header/table-header.js +2 -2
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +1 -1
- package/dist/collection/components/table/table-header-input-wrapper/table-header-input-wrapper.css +53 -0
- package/dist/collection/components/table/table-header-input-wrapper/table-header-input-wrapper.js +141 -0
- package/dist/collection/components/table/table-toolbar/table-toolbar.js +2 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +2 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +2 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +2 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +2 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +2 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +2 -2
- package/dist/collection/components/text-field/text-field.js +5 -5
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/components/toggle/toggle.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/components/{p-82e02472.js → p-a9609e88.js} +14 -4
- package/dist/components/{p-f0240c00.js → p-dc461e7b.js} +7 -2
- package/dist/components/tds-folder-tab.js +2 -2
- package/dist/components/tds-folder-tabs.js +2 -2
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown.js +2 -2
- package/dist/components/tds-header-launcher.js +2 -2
- package/dist/components/tds-inline-tab.js +2 -2
- package/dist/components/tds-inline-tabs.js +2 -2
- package/dist/components/tds-navigation-tab.js +2 -2
- package/dist/components/tds-navigation-tabs.js +2 -2
- package/dist/components/tds-popover-canvas.js +1 -1
- package/dist/components/tds-popover-core.js +1 -1
- package/dist/components/tds-popover-menu.js +14 -4
- package/dist/components/tds-table-body-input-wrapper.d.ts +11 -0
- package/dist/components/tds-table-body-input-wrapper.js +112 -0
- package/dist/components/tds-table-body-row-expandable.js +5 -5
- package/dist/components/tds-table-body-row.js +2 -2
- package/dist/components/tds-table-footer.js +2 -2
- package/dist/components/tds-table-header-input-wrapper.d.ts +11 -0
- package/dist/components/tds-table-header-input-wrapper.js +112 -0
- package/dist/components/tds-table-header.js +2 -2
- package/dist/components/tds-table-toolbar.js +2 -2
- package/dist/components/tds-text-field.js +5 -5
- package/dist/components/tds-textarea.js +3 -3
- package/dist/components/tds-toast.js +3 -3
- package/dist/components/tds-toggle.js +1 -1
- package/dist/components/tds-tooltip.js +3 -3
- package/dist/esm/index-51d04e39.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-folder-tab.entry.js +2 -2
- package/dist/esm/tds-folder-tabs.entry.js +2 -2
- package/dist/esm/tds-header-cell.entry.js +1 -1
- package/dist/esm/tds-inline-tab.entry.js +2 -2
- package/dist/esm/tds-inline-tabs.entry.js +2 -2
- package/dist/esm/tds-navigation-tab.entry.js +2 -2
- package/dist/esm/tds-navigation-tabs.entry.js +2 -2
- package/dist/esm/tds-popover-canvas.entry.js +10 -2
- package/dist/esm/tds-popover-core.entry.js +5 -1
- package/dist/esm/tds-popover-menu.entry.js +10 -2
- package/dist/esm/tds-table-body-input-wrapper.entry.js +81 -0
- package/dist/esm/tds-table-body-row-expandable.entry.js +5 -5
- package/dist/esm/tds-table-body-row.entry.js +2 -2
- package/dist/esm/tds-table-footer.entry.js +2 -2
- package/dist/esm/tds-table-header-input-wrapper.entry.js +81 -0
- package/dist/esm/tds-table-header.entry.js +2 -2
- package/dist/esm/tds-table-toolbar.entry.js +2 -2
- package/dist/esm/tds-text-field.entry.js +5 -5
- package/dist/esm/tds-textarea.entry.js +3 -3
- package/dist/esm/tds-toast.entry.js +3 -3
- package/dist/esm/tds-toggle.entry.js +1 -1
- package/dist/esm/tds-tooltip.entry.js +2 -2
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/p-0a4fe3db.entry.js +1 -0
- package/dist/tegel/{p-b6dd7392.entry.js → p-1ba22b41.entry.js} +1 -1
- package/dist/tegel/{p-f43bfa17.entry.js → p-2da2c193.entry.js} +1 -1
- package/dist/tegel/{p-a4bcae48.entry.js → p-3e859e33.entry.js} +1 -1
- package/dist/tegel/{p-bddc3443.entry.js → p-480c6c28.entry.js} +1 -1
- package/dist/tegel/p-4bab99d5.entry.js +1 -0
- package/dist/tegel/{p-456fa517.entry.js → p-56dfd78a.entry.js} +1 -1
- package/dist/tegel/{p-b5b95994.entry.js → p-578f6d73.entry.js} +1 -1
- package/dist/tegel/{p-f3876938.entry.js → p-5c0bb8e1.entry.js} +1 -1
- package/dist/tegel/{p-cf34d35e.entry.js → p-80edba0f.entry.js} +1 -1
- package/dist/tegel/p-9de400f4.entry.js +1 -0
- package/dist/tegel/{p-cb3bdd79.entry.js → p-a97dd06a.entry.js} +1 -1
- package/dist/tegel/{p-657273a9.entry.js → p-ac09f8d4.entry.js} +1 -1
- package/dist/tegel/{p-ddf91fe4.entry.js → p-ada411aa.entry.js} +1 -1
- package/dist/tegel/{p-2570419b.entry.js → p-b34cf70d.entry.js} +1 -1
- package/dist/tegel/{p-1ad6baed.entry.js → p-b8593b29.entry.js} +1 -1
- package/dist/tegel/{p-4af1e025.entry.js → p-c12eaac3.entry.js} +1 -1
- package/dist/tegel/{p-db7244a0.entry.js → p-cd289e17.entry.js} +1 -1
- package/dist/tegel/{p-4c0dcd84.entry.js → p-e237cdcc.entry.js} +1 -1
- package/dist/tegel/{p-fce4b1ee.entry.js → p-e6a5dda4.entry.js} +1 -1
- package/dist/tegel/p-f0d46e61.entry.js +1 -0
- package/dist/tegel/{p-d14009a8.entry.js → p-f823777e.entry.js} +1 -1
- package/dist/tegel/tegel.css +3 -3
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +3 -0
- package/dist/types/components/popover-core/popover-core.d.ts +2 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +3 -0
- package/dist/types/components/table/table-body-input-wrapper/table-body-input-wrapper.d.ts +16 -0
- package/dist/types/components/table/table-header-input-wrapper/table-header-input-wrapper.d.ts +16 -0
- package/dist/types/components.d.ts +56 -0
- package/package.json +39 -29
- package/dist/tegel/p-3534e1a7.entry.js +0 -1
- package/dist/tegel/p-ba079890.entry.js +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
const relevantTableProps = ['compactDesign'];
|
|
3
|
+
export class TdsTableBodyInputWrapper {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.showIcon = true;
|
|
6
|
+
this.renderSlot = true;
|
|
7
|
+
this.inputFocused = false;
|
|
8
|
+
this.compactDesign = false;
|
|
9
|
+
this.tableId = '';
|
|
10
|
+
}
|
|
11
|
+
internalTdsPropChangeListener(event) {
|
|
12
|
+
if (this.tableId === event.detail.tableId) {
|
|
13
|
+
event.detail.changed
|
|
14
|
+
.filter((changedProp) => relevantTableProps.includes(changedProp))
|
|
15
|
+
.forEach((changedProp) => {
|
|
16
|
+
if (typeof this[changedProp] === 'undefined') {
|
|
17
|
+
console.error(`Table prop is not supported: ${changedProp}`); // More informative error
|
|
18
|
+
throw new Error(`Table prop is not supported: ${changedProp}`);
|
|
19
|
+
}
|
|
20
|
+
this[changedProp] = event.detail[changedProp];
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
const tableEl = this.host.closest('tds-table');
|
|
26
|
+
if (tableEl) {
|
|
27
|
+
this.tableId = tableEl.getAttribute('table-id');
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.error('Failed to find parent tds-table element.');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
componentWillLoad() {
|
|
34
|
+
const tableEl = this.host.closest('tds-table');
|
|
35
|
+
if (tableEl) {
|
|
36
|
+
relevantTableProps.forEach((tablePropName) => {
|
|
37
|
+
this[tablePropName] = tableEl[tablePropName];
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
console.error('Failed to find parent tds-table element.');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
handleSlotChange() {
|
|
45
|
+
this.validateSlot();
|
|
46
|
+
}
|
|
47
|
+
validateSlot() {
|
|
48
|
+
const children = Array.from(this.host.children).filter((element) => element.tagName === 'INPUT');
|
|
49
|
+
if (children.length !== 1) {
|
|
50
|
+
console.warn('TABLE-BODY-INPUT-WRAPPER: Wrapper only accepts input as children.');
|
|
51
|
+
this.renderSlot = false;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
if (!this.renderSlot)
|
|
55
|
+
this.renderSlot = true;
|
|
56
|
+
const input = children[0];
|
|
57
|
+
input.addEventListener('focus', () => {
|
|
58
|
+
this.inputFocused = true;
|
|
59
|
+
});
|
|
60
|
+
input.addEventListener('blur', () => {
|
|
61
|
+
this.inputFocused = false;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return (h(Host, { key: 'c40a17a264d914934ea4f0e5c4a27b58f06d8055', class: {
|
|
67
|
+
'focused-input-wrapper': this.inputFocused,
|
|
68
|
+
'show-icon': this.showIcon,
|
|
69
|
+
'tds-table__compact': this.compactDesign,
|
|
70
|
+
} }, this.renderSlot ? h("slot", { onSlotchange: () => this.handleSlotChange() }) : null, this.showIcon ? (h("tds-icon", { class: "edit-icon", slot: "icon", size: "16px", name: "edit" })) : null));
|
|
71
|
+
}
|
|
72
|
+
static get is() { return "tds-table-body-input-wrapper"; }
|
|
73
|
+
static get encapsulation() { return "shadow"; }
|
|
74
|
+
static get originalStyleUrls() {
|
|
75
|
+
return {
|
|
76
|
+
"$": ["table-body-input-wrapper.scss"]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get styleUrls() {
|
|
80
|
+
return {
|
|
81
|
+
"$": ["table-body-input-wrapper.css"]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static get properties() {
|
|
85
|
+
return {
|
|
86
|
+
"showIcon": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "boolean",
|
|
91
|
+
"resolved": "boolean",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": "Controls if the edit icon is shown"
|
|
99
|
+
},
|
|
100
|
+
"attribute": "show-icon",
|
|
101
|
+
"reflect": false,
|
|
102
|
+
"defaultValue": "true"
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
static get states() {
|
|
107
|
+
return {
|
|
108
|
+
"renderSlot": {},
|
|
109
|
+
"inputFocused": {},
|
|
110
|
+
"compactDesign": {},
|
|
111
|
+
"tableId": {}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
static get elementRef() { return "host"; }
|
|
115
|
+
static get listeners() {
|
|
116
|
+
return [{
|
|
117
|
+
"name": "internalTdsTablePropChange",
|
|
118
|
+
"method": "internalTdsPropChangeListener",
|
|
119
|
+
"target": "body",
|
|
120
|
+
"capture": false,
|
|
121
|
+
"passive": false
|
|
122
|
+
}];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -48,12 +48,12 @@ export class TdsTableBodyRow {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '2b99a5336354cb5e7e2e7ef9c81bac76a55c6895', class: {
|
|
52
52
|
'tds-table__row': true,
|
|
53
53
|
'tds-table__row--selected': this.selected,
|
|
54
54
|
'tds-table__compact': this.compactDesign,
|
|
55
55
|
'tds-table--divider': this.verticalDividers,
|
|
56
|
-
} }, this.multiselect && (h("td", { key: '
|
|
56
|
+
} }, this.multiselect && (h("td", { key: '049e91ea474a539b6fbe344db4aed9de42297f3d', class: "tds-table__body-cell tds-table__body-cell--checkbox tds-form-label tds-form-label--table" }, h("tds-checkbox", { key: '2af9307e3143db71cae028c1cc2116382b20f4c9', onTdsChange: (event) => this.handleCheckboxChange(event), checked: this.selected, disabled: this.disabled }))), h("slot", { key: '2eff0d398eb53934ca0b152d25422a5febbbffbb' })));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "tds-table-body-row"; }
|
|
59
59
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js
CHANGED
|
@@ -84,18 +84,18 @@ export class TdsTableBodyRowExpandable {
|
|
|
84
84
|
this.sendValue();
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: 'cd23997b2d0b659691199b0f6a7be6aa51689ee4', class: {
|
|
88
88
|
'tds-table__row': true,
|
|
89
89
|
'tds-table__row-expand--active': this.isExpanded,
|
|
90
90
|
'tds-table__compact': this.compactDesign,
|
|
91
91
|
'tds-table--divider': this.verticalDividers,
|
|
92
|
-
} }, h("tr", { key: '
|
|
92
|
+
} }, h("tr", { key: 'a3fec49a0b97a35f61db7c31dfc023ba3acebd86', class: {
|
|
93
93
|
'tds-table__row': true,
|
|
94
94
|
'tds-table__row--expanded': this.isExpanded,
|
|
95
|
-
}, part: "row" }, h("td", { key: '
|
|
95
|
+
}, part: "row" }, h("td", { key: 'd995074fc578640544f59df3426762ff6595dd0b', class: "tds-table__cell tds-table__cell--expand" }, h("label", { key: '0f905bda5651a8c9dc30094dbc402e5e618e4030', class: "tds-table__expand-control-container" }, h("input", { key: '9b316a0e3a44cfa21851a1ac2ec0980d53d3aa54', class: "tds-table__expand-input", type: "checkbox", onChange: (event) => this.onChangeHandler(event), checked: this.isExpanded }), h("span", { key: '022d891384b907d3ebce4b2138fef4f5c6f7d44f', class: "tds-expendable-row-icon" }, h("svg", { key: 'fb7ccb4d599e72a9d7a56808f59226779ffe611b', fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { key: '1e2c766463813a4b1edc32093abbbf501b99974b', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M4.273 9.783a1 1 0 0 1 1.415 0l9.888 9.888a.6.6 0 0 0 .848 0l9.888-9.888a1 1 0 1 1 1.415 1.414l-9.889 9.889a2.6 2.6 0 0 1-3.677 0l-9.888-9.889a1 1 0 0 1 0-1.414Z", fill: "currentColor" }))))), h("slot", { key: '7f0e3d93df3da8eeff969daa9aba8eecaa1e6e23' })), h("tr", { key: '89766434b64dd9bf0aecf805fdd494aab68f8af9', class: {
|
|
96
96
|
'tds-table__row-expand': true,
|
|
97
97
|
'tds-table__row-expand--expanded': this.isExpanded,
|
|
98
|
-
}, part: "expand-row" }, h("td", { key: '
|
|
98
|
+
}, part: "expand-row" }, h("td", { key: 'f0c746d12fae92eae3e6bf9651c826fb3aacbefe', class: "tds-table__cell-expand", colSpan: this.columnsNumber }, h("slot", { key: '0a9e454379a7a6a72b3d6ea33a66a4aaaac09e8f', name: "expand-row" })))));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "tds-table-body-row-expandable"; }
|
|
101
101
|
static get encapsulation() { return "shadow"; }
|
|
@@ -94,10 +94,10 @@ export class TdsTableFooter {
|
|
|
94
94
|
this.storeLastCorrectValue(this.paginationValue);
|
|
95
95
|
}
|
|
96
96
|
render() {
|
|
97
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: 'fe6221e5dd2ec57e63afefc5e45c0b3f5ad85d8f', class: {
|
|
98
98
|
'tds-table--compact': this.compactDesign,
|
|
99
99
|
'footer__horizontal-scroll': !!this.horizontalScrollWidth,
|
|
100
|
-
}, style: this.horizontalScrollWidth ? { width: this.horizontalScrollWidth } : {} }, h("tr", { key: '
|
|
100
|
+
}, style: this.horizontalScrollWidth ? { width: this.horizontalScrollWidth } : {} }, h("tr", { key: '6f6bfca5e7719084b2c4564b86806f6eb7867601', class: "tds-table__footer-row" }, h("td", { key: '2c4389dfa2c028798246a5c4d8b9bdcc05a780f2', class: "tds-table__footer-cell", colSpan: this.columnsNumber }, this.pagination && (h("div", { key: '0831e596963e20222feee940fb7d7d489f832b5e', class: "tds-table__pagination" }, h("div", { key: '1129e67d9b69b06a1fadde589f9ad37a1bd9fcca', class: "tds-table__row-selector" }), h("div", { key: '81e685df813d615027470d4c84c468bb2c5fccca', class: "tds-table__page-selector" }, h("input", { key: '4b116837ae02fcbf6b51b940587ae6159d40f5cb', ref: (element) => (this.inputElement = element), class: "tds-table__page-selector-input", type: "number", min: "1", max: this.pages, value: this.paginationValue, pattern: "[0-9]+", dir: "ltr", onChange: (event) => this.paginationInputChange(event), onAnimationEnd: removeShakeAnimation }), h("p", { key: '927af4715b33f50679aef3ec5eccc5fd4044add7', class: "tds-table__footer-text" }, "of ", h("span", { key: '2d89421fbbbb0828623465f39edc506b9bfa82da' }, this.pages), " pages"), h("button", { key: '37916d812b7b4510b088b382f48b2d9f04d212b2', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue <= 1, onClick: () => this.previousPage() }, h("tds-icon", { key: 'd89ac980f4c48fe6c14610f27ccc05e43994631e', name: "chevron_left", size: "20px" })), h("button", { key: '246b17fc6ff26e3830d5a359a4a5de844bc93a1b', type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue >= this.pages, onClick: () => this.nextPage() }, h("tds-icon", { key: '6fa3441ed75b484974e50ee41ea1444bea7c30e2', name: "chevron_right", size: "20px" })))))))));
|
|
101
101
|
}
|
|
102
102
|
static get is() { return "tds-table-footer"; }
|
|
103
103
|
static get encapsulation() { return "shadow"; }
|
|
@@ -82,11 +82,11 @@ export class TdsTableHeaderRow {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
85
|
+
return (h(Host, { key: '5f212887d3d35e32240e9745d62685b7024100e1', class: {
|
|
86
86
|
'tds-table--compact': this.compactDesign,
|
|
87
87
|
'tds-table--divider': this.verticalDividers,
|
|
88
88
|
'tds-table--toolbar-available': this.enableToolbarDesign,
|
|
89
|
-
} }, h("tr", { key: '
|
|
89
|
+
} }, h("tr", { key: '1a40af0dddfb627c39ae5df47aedc80eb1006f04' }, this.multiselect && (h("th", { key: '17d16e6bf8964b30e0ce93a76c436112ac0a6540', class: "tds-table__header-cell tds-table__header-cell--checkbox" }, h("div", { key: '98f282baf5a0b4a929ad04c850319e04955090a0', class: "tds-form-label tds-form-label--table" }, h("tds-checkbox", { key: '9d8115deb1403df121309d32a166ccc6eac685d5', checked: this.allSelected || this.selected, disabled: this.disabled, indeterminate: this.indeterminate, onTdsChange: (event) => this.handleCheckboxChange(event) })))), this.expandableRows && (h("th", { key: '7cc0e1c0d3d7ec9f4bef917a5b8346cca8bc58ae', class: "tds-table__header-cell tds-table__header-cell--checkbox" })), h("slot", { key: '2f7aa3bd3acdd69f1f2a20d3525ad5901f0ac239' }))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "tds-table-header"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -105,7 +105,7 @@ export class TdsTableHeaderCell {
|
|
|
105
105
|
this.host.closest('tds-table').getElementsByTagName('tds-table-toolbar').length >= 1;
|
|
106
106
|
}
|
|
107
107
|
render() {
|
|
108
|
-
return (h(Host, { key: '
|
|
108
|
+
return (h(Host, { key: '6a051465b3a5af5460f7c5ac112798b521f9b4a8', class: {
|
|
109
109
|
'tds-table__header-cell': true,
|
|
110
110
|
'tds-table__header-cell--sortable': this.sortable,
|
|
111
111
|
'tds-table__header-cell--is-sorted': this.sortedByMyKey,
|
package/dist/collection/components/table/table-header-input-wrapper/table-header-input-wrapper.css
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:host(:hover) tds-icon {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host(.focused-input-wrapper) tds-icon {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
}
|
|
12
|
+
:host(.focused-input-wrapper) ::slotted(input:not(:focus)) {
|
|
13
|
+
background-color: var(--tds-table-input-background-hover);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host(.show-icon) ::slotted(input) {
|
|
17
|
+
padding-left: 35px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
tds-icon.search-icon {
|
|
21
|
+
color: var(--tds-table-input-header-icon);
|
|
22
|
+
position: absolute;
|
|
23
|
+
left: 15px;
|
|
24
|
+
top: 1px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
::slotted(input) {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
font: var(--tds-detail-02);
|
|
30
|
+
letter-spacing: var(--tds-detail-02-ls);
|
|
31
|
+
color: var(--tds-table-color);
|
|
32
|
+
padding-left: var(--tds-spacing-element-16);
|
|
33
|
+
padding-right: var(--tds-spacing-element-16);
|
|
34
|
+
height: 48px;
|
|
35
|
+
border-radius: 0;
|
|
36
|
+
background-color: transparent;
|
|
37
|
+
border: 0;
|
|
38
|
+
border-bottom: 2px solid transparent;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
::slotted(input)::placeholder {
|
|
42
|
+
color: var(--tds-table-input-header-placeholder);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
::slotted(input:focus) {
|
|
46
|
+
outline: none;
|
|
47
|
+
background-color: var(--tds-table-input-header-background-focus);
|
|
48
|
+
border-bottom: 2px solid var(--tds-text-field-bar);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host(.tds-table__compact) ::slotted(input) {
|
|
52
|
+
height: 32px; /* Reduced height for compact design */
|
|
53
|
+
}
|
package/dist/collection/components/table/table-header-input-wrapper/table-header-input-wrapper.js
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
const relevantTableProps = ['compactDesign'];
|
|
3
|
+
export class TdsTableHeaderInputWrapper {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.showIcon = true;
|
|
6
|
+
this.renderSlot = true;
|
|
7
|
+
this.inputFocused = false;
|
|
8
|
+
this.compactDesign = false;
|
|
9
|
+
this.tableId = '';
|
|
10
|
+
}
|
|
11
|
+
internalTdsPropChangeListener(event) {
|
|
12
|
+
if (this.tableId === event.detail.tableId) {
|
|
13
|
+
event.detail.changed
|
|
14
|
+
.filter((changedProp) => relevantTableProps.includes(changedProp))
|
|
15
|
+
.forEach((changedProp) => {
|
|
16
|
+
if (typeof this[changedProp] === 'undefined') {
|
|
17
|
+
console.error(`Table prop is not supported: ${changedProp}`); // More informative error
|
|
18
|
+
throw new Error(`Table prop is not supported: ${changedProp}`);
|
|
19
|
+
}
|
|
20
|
+
this[changedProp] = event.detail[changedProp];
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
const tableEl = this.host.closest('tds-table');
|
|
26
|
+
if (tableEl) {
|
|
27
|
+
this.tableId = tableEl.getAttribute('table-id');
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.error('Failed to find parent tds-table element.');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
componentWillLoad() {
|
|
34
|
+
const tableEl = this.host.closest('tds-table');
|
|
35
|
+
if (tableEl) {
|
|
36
|
+
relevantTableProps.forEach((tablePropName) => {
|
|
37
|
+
this[tablePropName] = tableEl[tablePropName];
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
console.error('Failed to find parent tds-table element.');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
handleSlotChange() {
|
|
45
|
+
this.validateSlot();
|
|
46
|
+
}
|
|
47
|
+
validateSlot() {
|
|
48
|
+
const children = Array.from(this.host.children).filter((element) => element.tagName === 'INPUT');
|
|
49
|
+
if (children.length !== 1) {
|
|
50
|
+
console.warn('TABLE-HEADER-INPUT-WRAPPER: Wrapper only accepts input as children.');
|
|
51
|
+
this.renderSlot = false;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
if (!this.renderSlot)
|
|
55
|
+
this.renderSlot = true;
|
|
56
|
+
const input = children[0];
|
|
57
|
+
input.addEventListener('focus', () => {
|
|
58
|
+
this.inputFocused = true;
|
|
59
|
+
});
|
|
60
|
+
input.addEventListener('blur', () => {
|
|
61
|
+
this.inputFocused = false;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return (h(Host, { key: '43243a6c8e1a0ef0f18d9f1f1d4cd4cba6bc15b4', class: {
|
|
67
|
+
'focused-input-wrapper': this.inputFocused,
|
|
68
|
+
'show-icon': this.showIcon,
|
|
69
|
+
'tds-table__compact': this.compactDesign,
|
|
70
|
+
} }, this.renderSlot ? h("slot", { onSlotchange: () => this.handleSlotChange() }) : null, this.showIcon ? (h("tds-icon", { class: "search-icon", slot: "icon", size: "16px", name: "search" })) : null));
|
|
71
|
+
}
|
|
72
|
+
static get is() { return "tds-table-header-input-wrapper"; }
|
|
73
|
+
static get encapsulation() { return "shadow"; }
|
|
74
|
+
static get originalStyleUrls() {
|
|
75
|
+
return {
|
|
76
|
+
"$": ["table-header-input-wrapper.scss"]
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
static get styleUrls() {
|
|
80
|
+
return {
|
|
81
|
+
"$": ["table-header-input-wrapper.css"]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static get properties() {
|
|
85
|
+
return {
|
|
86
|
+
"showIcon": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "boolean",
|
|
91
|
+
"resolved": "boolean",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": "Controls if the search icon is shown"
|
|
99
|
+
},
|
|
100
|
+
"attribute": "show-icon",
|
|
101
|
+
"reflect": false,
|
|
102
|
+
"defaultValue": "true"
|
|
103
|
+
},
|
|
104
|
+
"compactDesign": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "boolean",
|
|
109
|
+
"resolved": "boolean",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": false,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": ""
|
|
117
|
+
},
|
|
118
|
+
"attribute": "compact-design",
|
|
119
|
+
"reflect": false,
|
|
120
|
+
"defaultValue": "false"
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
static get states() {
|
|
125
|
+
return {
|
|
126
|
+
"renderSlot": {},
|
|
127
|
+
"inputFocused": {},
|
|
128
|
+
"tableId": {}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
static get elementRef() { return "host"; }
|
|
132
|
+
static get listeners() {
|
|
133
|
+
return [{
|
|
134
|
+
"name": "internalTdsTablePropChange",
|
|
135
|
+
"method": "internalTdsPropChangeListener",
|
|
136
|
+
"target": "body",
|
|
137
|
+
"capture": false,
|
|
138
|
+
"passive": false
|
|
139
|
+
}];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -56,10 +56,10 @@ export class TdsTableToolbar {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '9c864dc219ed17a50a4d84881c676e05b3e0ef92', class: {
|
|
60
60
|
'tds-table--compact': this.compactDesign,
|
|
61
61
|
'toolbar__horizontal-scroll': !!this.horizontalScrollWidth,
|
|
62
|
-
}, style: this.horizontalScrollWidth ? { width: this.horizontalScrollWidth } : {} }, h("div", { key: '
|
|
62
|
+
}, style: this.horizontalScrollWidth ? { width: this.horizontalScrollWidth } : {} }, h("div", { key: '035b5a5396344e3d682fb5370a4e1c0484045579', class: "tds-table__upper-bar-flex" }, h("caption", { key: 'f1f5ba362eda8a0ae25fb63c89a25fe3606365c9', class: "tds-table__title" }, this.tableTitle), h("div", { key: 'b94a83cf81e1aaa06d1b29a4e9207c99bccbbbbc', class: "tds-table__actionbar" }, this.filter && (h("div", { key: '358798e484d1892acb6a4e7e3b30702002ba860d', class: "tds-table__searchbar" }, h("input", { key: 'f062bf19e13e312ee9089324bdfc6d4e2e9a1db4', class: "tds-table__searchbar-input", type: "text", onKeyUp: (event) => this.handleSearch(event) }), h("span", { key: '9e874b39910b2d32b0a3193b14e01ed5f681b928', class: "tds-table__searchbar-icon" }, h("tds-icon", { key: '38d5a1b800d849b66a0c35d01d496fc4708f53c2', name: "search", size: "20px" })))), h("slot", { key: 'f362385a5719c51dbce2b213774b6397ede8714b', name: "end" })))));
|
|
63
63
|
}
|
|
64
64
|
static get is() { return "tds-table-toolbar"; }
|
|
65
65
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,8 +17,8 @@ export class TdsFolderTab {
|
|
|
17
17
|
this.selected = selected;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
21
|
-
${this.selected ? 'selected' : ''}`, style: { width: `${this.tabWidth}px` } }, h("slot", { key: '
|
|
20
|
+
return (h(Host, { key: '3c4a3fe10ff0011f1f9619232c2216cbfcbfb148', role: "listitem" }, h("div", { key: '61fb49491d4f0c2098277b33f13c41ca34782563', class: `${this.disabled ? 'disabled' : ''}
|
|
21
|
+
${this.selected ? 'selected' : ''}`, style: { width: `${this.tabWidth}px` } }, h("slot", { key: 'f57d05129e3185aa36887a84ff980b8a44ec20a4' }))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "tds-folder-tab"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
|
@@ -160,9 +160,9 @@ export class TdsFolderTabs {
|
|
|
160
160
|
this.removeEventListenerFromTabs();
|
|
161
161
|
}
|
|
162
162
|
render() {
|
|
163
|
-
return (h(Host, { key: '
|
|
163
|
+
return (h(Host, { key: '748bacbb3d58d37735385a8c926dacb637d8eff1', role: "list", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: '4c4f764a6a8c8a095bd1d030ef85a34014d8d284', class: "wrapper", ref: (el) => {
|
|
164
164
|
this.navWrapperElement = el;
|
|
165
|
-
} }, h("button", { key: '
|
|
165
|
+
} }, h("button", { key: 'ca859bdc9b9d10a7bcfaae194bbee508f308c1a2', class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, disabled: !this.showLeftScroll, onClick: () => this.scrollLeft() }, h("tds-icon", { key: '70aaa7044418b79234b9f3bd7eef2c1e0bf96e61', name: "chevron_left", size: "20px" })), h("slot", { key: 'ca1990c7333322885aa37b164cc7d74708b22116', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '6321d42b6a42a9bf63ae844b94541f56806195fd', class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, disabled: !this.showRightScroll, onClick: () => this.scrollRight() }, h("tds-icon", { key: '40a0e7a3297bdf6d4abbe5fc62114020fdb7aee3', name: "chevron_right", size: "20px" })))));
|
|
166
166
|
}
|
|
167
167
|
static get is() { return "tds-folder-tabs"; }
|
|
168
168
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,8 +12,8 @@ export class TdsInlineTab {
|
|
|
12
12
|
this.selected = selected;
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
16
|
-
${this.disabled ? 'disabled' : ''}` }, h("slot", { key: '
|
|
15
|
+
return (h(Host, { key: '56d12f8a46ac69783e0f6cc060b9f99151fbe846', role: "listitem" }, h("div", { key: '01b43d6447a5122efaf0b8d58254708dad49fa39', class: `inline-tab-item ${this.selected ? 'selected' : ''}
|
|
16
|
+
${this.disabled ? 'disabled' : ''}` }, h("slot", { key: 'bf865d7caa72ee0fa2aff284e55dd2a794ffb620' }))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "tds-inline-tab"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -160,9 +160,9 @@ export class TdsInlineTabs {
|
|
|
160
160
|
this.removeEventListenerFromTabs();
|
|
161
161
|
}
|
|
162
162
|
render() {
|
|
163
|
-
return (h(Host, { key: '
|
|
163
|
+
return (h(Host, { key: 'fdf1cc28637a8bd207c84aba91f60d145acd10c9', role: "list", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: '068e21bac127323f56d858abf59c1f905a4ee315', class: "wrapper", ref: (el) => {
|
|
164
164
|
this.navWrapperElement = el;
|
|
165
|
-
} }, h("button", { key: '
|
|
165
|
+
} }, h("button", { key: '646917420741478a9492cec16c066833d3e3266e', class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: '939eb79ed238163057dcc8316f6efdec89262ff8', name: "chevron_left", size: "20px" })), h("slot", { key: 'f3306035cce33e3efb3e89ab4650c3781703f9e5', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '6b2023939d94eb9f9822e25fd4facce715fdf227', class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: '0b2626c78903ce14239891aa667a61ed913097ac', name: "chevron_right", size: "20px" })))));
|
|
166
166
|
}
|
|
167
167
|
static get is() { return "tds-inline-tabs"; }
|
|
168
168
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,8 +12,8 @@ export class TdsNavigationTab {
|
|
|
12
12
|
this.selected = selected;
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
16
|
-
${this.disabled ? 'disabled' : ''}` }, h("slot", { key: '
|
|
15
|
+
return (h(Host, { key: 'f8daf87eb0fce9c5229c6223a4188875000b4003', role: "listitem" }, h("div", { key: '692831fb82b1822550b6d715977970b327cb3448', class: `navigation-tab-item ${this.selected ? 'selected' : ''}
|
|
16
|
+
${this.disabled ? 'disabled' : ''}` }, h("slot", { key: 'afe5caebb5389f4386aa6c6ab57f9a81d2482a61' }))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "tds-navigation-tab"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -158,9 +158,9 @@ export class TdsNavigationTabs {
|
|
|
158
158
|
this.removeEventListenerFromTabs();
|
|
159
159
|
}
|
|
160
160
|
render() {
|
|
161
|
-
return (h(Host, { key: '
|
|
161
|
+
return (h(Host, { key: 'eaf7fd47f5f4132d7920d5deafb659828cab01e9', role: "list", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: '1fe0e2f45e6cf32175a3ef6c556aa63ba3b46b97', class: "wrapper", ref: (el) => {
|
|
162
162
|
this.navWrapperElement = el;
|
|
163
|
-
} }, h("button", { key: '
|
|
163
|
+
} }, h("button", { key: 'fa71abb901a1c6ab70dde90d759d9aa537a72ec2', class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: '0aff4668869fa761e03e8c81ed054561787beb49', name: "chevron_left", size: "20px" })), h("slot", { key: '169f8b9eb18a33fb4fc739863eaf4a730e066c83', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '9c9757d3c818191ce5aec5bbd64699c04dfc07db', class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: 'e38ac8674d9e3e4aeaa67bd888cd411002353634', name: "chevron_right", size: "20px" })))));
|
|
164
164
|
}
|
|
165
165
|
static get is() { return "tds-navigation-tabs"; }
|
|
166
166
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,7 +48,7 @@ export class TdsTextField {
|
|
|
48
48
|
var _a;
|
|
49
49
|
const usesPrefixSlot = hasSlot('prefix', this.host);
|
|
50
50
|
const usesSuffixSlot = hasSlot('suffix', this.host);
|
|
51
|
-
return (h("div", { key: '
|
|
51
|
+
return (h("div", { key: '1b4348574e1a9e7e315c61a2d555b487b619f22e', class: {
|
|
52
52
|
'form-text-field-nomin': this.noMinWidth,
|
|
53
53
|
'form-text-field': !this.focusInput || this.disabled,
|
|
54
54
|
'text-field-focus': this.focusInput && !this.disabled,
|
|
@@ -62,12 +62,12 @@ export class TdsTextField {
|
|
|
62
62
|
'form-text-field-sm': this.size === 'sm',
|
|
63
63
|
'form-text-field-error': this.state === 'error',
|
|
64
64
|
'form-text-field-success': this.state === 'success',
|
|
65
|
-
} }, this.labelPosition === 'outside' && (h("div", { key: '
|
|
65
|
+
} }, this.labelPosition === 'outside' && (h("div", { key: '7f604df386ece3c8c01e5b60e75ef80de4500e81', class: "text-field-label-outside" }, h("div", { key: 'c13f468f76d9484c016a8218d9cc73b18724458f' }, this.label))), h("div", { key: '992c9076d7b1f9c6bec1847851bcfd989b6b0497', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: 'dfb616b9083ce42d90c180b5217e2e60ee3784af', class: {
|
|
66
66
|
'text-field-slot-wrap-prefix': true,
|
|
67
67
|
'text-field-error': this.state === 'error',
|
|
68
68
|
'text-field-success': this.state === 'success',
|
|
69
69
|
'text-field-default': this.state === 'default',
|
|
70
|
-
} }, h("slot", { key: '
|
|
70
|
+
} }, h("slot", { key: '98ed143615ad68a3cd51aca034999bfc279fce6b', name: "prefix" }))), h("div", { key: '8079b57a7e047255ed45f3f1ba9e28655a16ebed', class: "text-field-input-container" }, h("input", { key: '11782cd5c55f092a02ec741ecd9b20f2b8bfae91', ref: (inputEl) => (this.textInput = inputEl), class: {
|
|
71
71
|
'text-field-input': true,
|
|
72
72
|
'text-field-input-sm': this.size === 'sm',
|
|
73
73
|
'text-field-input-md': this.size === 'md',
|
|
@@ -80,13 +80,13 @@ export class TdsTextField {
|
|
|
80
80
|
if (!this.readOnly) {
|
|
81
81
|
this.handleBlur(event);
|
|
82
82
|
}
|
|
83
|
-
} }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '
|
|
83
|
+
} }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'f72126827829ec26bafee0b5d0eb29a9b96e8628', class: "text-field-label-inside" }, this.label))), h("div", { key: 'c21c6a8cd0d5c8a4814efa1a8f93a5e99b3e092e', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: '9029f584ea0ef6cc081985a087692e066394a01b', class: {
|
|
84
84
|
'text-field-slot-wrap-suffix': true,
|
|
85
85
|
'text-field-error': this.state === 'error',
|
|
86
86
|
'text-field-success': this.state === 'success',
|
|
87
87
|
'text-field-default': this.state === 'default',
|
|
88
88
|
'tds-u-display-none': this.readOnly,
|
|
89
|
-
} }, h("slot", { key: '
|
|
89
|
+
} }, h("slot", { key: 'f50d3a85bfd324529516a2b8180129e194202465', name: "suffix" }))), h("span", { key: '6f7f160b3a1b425a7ace18b748b64e50cfd8389f', class: "text-field-icon__readonly" }, h("tds-icon", { key: '82b1d06cfb8a3b08543a77c839ccfcba2e9fae13', name: "edit_inactive", size: "20px" })), h("span", { key: '0c9c2ab0b8f620db172050e1db1dd4324b3ab094', class: "text-field-icon__readonly-label" }, "This field is non-editable")), (this.helper || this.maxLength > 0) && (h("div", { key: '84c9baa2bce9159f5ea084ed35051a878cfac1f9', class: "text-field-helper" }, this.state === 'error' && (h("div", { key: '888d0185686e5ba16bf7b4a064ea1926e17d5c96', class: "text-field-helper-error-state" }, h("tds-icon", { key: '752d5c6c9dee5a7eff5abae9d60e2eb353ee2e60', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, this.maxLength > 0 && (h("div", { key: 'ead6aba2e4f11010dc4d6c17977abaac0b242e76', class: "text-field-textcounter" }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '27e1880b203314c781260116b99fd1474a6a8041', class: "text-field-textcounter-divider" }, " / "), this.maxLength))))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "tds-text-field"; }
|
|
92
92
|
static get encapsulation() { return "scoped"; }
|
|
@@ -38,7 +38,7 @@ export class TdsTextarea {
|
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
40
|
var _a;
|
|
41
|
-
return (h("div", { key: '
|
|
41
|
+
return (h("div", { key: 'f110536792da6122221dc6941b6da71900ea2111', class: `
|
|
42
42
|
textarea-container
|
|
43
43
|
${this.labelPosition === 'inside' ? 'textarea-label-inside' : ''}
|
|
44
44
|
${this.focusInput ? 'textarea-focus' : ''}
|
|
@@ -48,7 +48,7 @@ export class TdsTextarea {
|
|
|
48
48
|
${this.value ? 'textarea-data' : ''}
|
|
49
49
|
${this.state === 'error' || this.state === 'success' ? `textarea-${this.state}` : ''}
|
|
50
50
|
${this.noMinWidth ? 'no-min-width' : ''}
|
|
51
|
-
` }, this.labelPosition !== 'no-label' && h("span", { key: '
|
|
51
|
+
` }, this.labelPosition !== 'no-label' && h("span", { key: '67784499bde176257853f1f4c7a8757ce98b07ee', class: 'textarea-label' }, this.label), h("div", { key: '7ad9c6b9c897995a98af2b9e9babefc3e2ae8831', class: "textarea-wrapper" }, h("textarea", { key: '94d944bb5e9722d89f7b0c98d18199c52f81b458', class: 'textarea-input', ref: (inputEl) => (this.textEl = inputEl), disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, name: this.name, autofocus: this.autofocus, maxlength: this.maxLength, cols: this.cols, rows: this.rows, onFocus: (event) => {
|
|
52
52
|
if (!this.readOnly) {
|
|
53
53
|
this.handleFocus(event);
|
|
54
54
|
}
|
|
@@ -56,7 +56,7 @@ export class TdsTextarea {
|
|
|
56
56
|
if (!this.readOnly) {
|
|
57
57
|
this.handleBlur(event);
|
|
58
58
|
}
|
|
59
|
-
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: '
|
|
59
|
+
}, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event) }), h("span", { key: '719da60a6975556fa37b2104d435bf99fb99efa5', class: "textarea-resizer-icon" }, h("svg", { key: '6b6969d6e49824fb8791343ac62bd1a9f5c4e0fa', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '1e4d31007fef3c520cfa32686cf9b888919b314a', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.8536 0.853553C12.0488 0.658291 12.0488 0.341709 11.8536 0.146447C11.6583 -0.0488155 11.3417 -0.0488155 11.1464 0.146447L0.146447 11.1464C-0.0488155 11.3417 -0.0488155 11.6583 0.146447 11.8536C0.341709 12.0488 0.658291 12.0488 0.853553 11.8536L11.8536 0.853553ZM11.8536 4.64645C12.0488 4.84171 12.0488 5.15829 11.8536 5.35355L5.35355 11.8536C5.15829 12.0488 4.84171 12.0488 4.64645 11.8536C4.45118 11.6583 4.45118 11.3417 4.64645 11.1464L11.1464 4.64645C11.3417 4.45118 11.6583 4.45118 11.8536 4.64645ZM11.8536 8.64645C12.0488 8.84171 12.0488 9.15829 11.8536 9.35355L9.35355 11.8536C9.15829 12.0488 8.84171 12.0488 8.64645 11.8536C8.45118 11.6583 8.45118 11.3417 8.64645 11.1464L11.1464 8.64645C11.3417 8.45118 11.6583 8.45118 11.8536 8.64645Z", fill: "currentColor" }))), h("span", { key: '144143c8af4351e0d2370ebeb0c50a0124ab8f9b', class: "textarea-icon__readonly" }, h("tds-icon", { key: 'e2c0ab89e72258d46bc6479b663f4d62466fa8b0', name: "edit_inactive" })), h("span", { key: 'c07af4893c1fd32de8988c1ef6ef3b77c4a63768', class: "textarea-icon__readonly-label" }, "This field is non-editable")), h("span", { key: 'dd8ae6cbd2cdde4a08392c6905faae07bd7d58e7', class: 'textarea-helper' }, this.state === 'error' && h("tds-icon", { key: 'c282dcee39da4e70d207e41221c557852a06fb43', name: "error", size: "16px" }), this.helper), this.maxLength > 0 && (h("div", { key: '7f05bc68e67825742fe9c8c49853a39fabf1199e', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '32dd0095c4500558fbe9c9d46ba6db3eb67d9034', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "tds-textarea"; }
|
|
62
62
|
static get encapsulation() { return "scoped"; }
|