xv-webcomponents 2.0.0-beta.2 → 2.0.0-beta.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/README.md +3 -2
  2. package/dist/angular/index.d.ts +1 -1
  3. package/dist/angular/index.js +3 -4
  4. package/dist/angular/proxies.d.ts +60 -34
  5. package/dist/angular/proxies.js +51 -67
  6. package/dist/angular/web-components.module.d.ts +1 -1
  7. package/dist/angular/web-components.module.js +10 -13
  8. package/dist/cjs/{index-Cfa6bBQW.js → index-DaTpiyaU.js} +1 -1
  9. package/dist/cjs/{index-Cixkr3sz.js → index-Dwhgrew8.js} +15 -10
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/{xv-accordion-v2_50.cjs.entry.js → xv-accordion-v2_49.cjs.entry.js} +1529 -147
  13. package/dist/cjs/xv-header-next.cjs.entry.js +2 -2
  14. package/dist/cjs/xv-mega-menu-next.cjs.entry.js +2 -2
  15. package/dist/cjs/xv-webcomponents.cjs.js +3 -3
  16. package/dist/collection/collection-manifest.json +1 -2
  17. package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +9 -8
  18. package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +129 -61
  19. package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +277 -78
  20. package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +138 -24
  21. package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +334 -168
  22. package/dist/collection/components/xv-table/xv-table.css +240 -99
  23. package/dist/collection/components/xv-table/xv-table.js +2056 -63
  24. package/dist/collection/components/xv-table/xv-table.model.js +10 -0
  25. package/dist/collection/components/xv-table/xv-table.utils.js +243 -0
  26. package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
  27. package/dist/collection/components/xv-tag/xv-tag.js +1 -1
  28. package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.js +2 -2
  29. package/dist/collection/components/xv-text-input/xv-text-input.js +2 -2
  30. package/dist/collection/components/xv-textarea/xv-textarea.js +2 -2
  31. package/dist/collection/components/xv-tile/xv-tile.js +2 -2
  32. package/dist/collection/components/xv-toggle/xv-toggle.js +1 -1
  33. package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +1 -1
  34. package/dist/collection/components/xv-tooltip/xv-tooltip.js +2 -2
  35. package/dist/collection/utils/table-layout.js +130 -0
  36. package/dist/components/index.js +1 -1
  37. package/dist/components/p-B0kwaJ8n.js +1 -0
  38. package/dist/components/{p-CbVZCn2p.js → p-BEoh0dZI.js} +1 -1
  39. package/dist/components/{p-ZYJfCCwX.js → p-BaZ-srfu.js} +1 -1
  40. package/dist/components/{p-DyGMZIub.js → p-Bej2l-wN.js} +1 -1
  41. package/dist/components/{p-Ddx5DwV5.js → p-BfhvpeQh.js} +1 -1
  42. package/dist/components/{p-kQVUwJXZ.js → p-CSYnNMKb.js} +1 -1
  43. package/dist/components/{p-BNP2Lw34.js → p-CspyoLL9.js} +1 -1
  44. package/dist/components/p-CvgDDcjp.js +1 -0
  45. package/dist/components/{p-COoj5JkZ.js → p-D4FwGeDJ.js} +1 -1
  46. package/dist/components/p-DCvH_Br_.js +1 -0
  47. package/dist/components/{p-CEjlxnKY.js → p-DFe9Mtw_.js} +1 -1
  48. package/dist/components/{p-BRZwUlfE.js → p-DFtMwE-h.js} +1 -1
  49. package/dist/components/p-DIvi4fI3.js +1 -0
  50. package/dist/components/{p-DTwz9Fsh.js → p-DNRISLNf.js} +1 -1
  51. package/dist/components/p-DPnvoOYj.js +1 -0
  52. package/dist/components/{p-Dzz9jxLm.js → p-Dwbe941A.js} +1 -1
  53. package/dist/components/{p-CMAJWZsP.js → p-JClekcEh.js} +1 -1
  54. package/dist/components/{p-DtUNYh73.js → p-NoM9oIJn.js} +1 -1
  55. package/dist/components/{p-DlLBjhuH.js → p-XEk4dHG3.js} +1 -1
  56. package/dist/components/p-i7_81si-.js +1 -0
  57. package/dist/components/{p-BRYrLHiz.js → p-i82EFiq6.js} +1 -1
  58. package/dist/components/{p-BXB4D7j4.js → p-jD7nSJaM.js} +1 -1
  59. package/dist/components/xv-accordion-v2-item.js +1 -1
  60. package/dist/components/xv-accordion-v2.js +1 -1
  61. package/dist/components/xv-breadcrumbs-v2.js +1 -1
  62. package/dist/components/xv-button-group-v2.js +1 -1
  63. package/dist/components/xv-button-v2.js +1 -1
  64. package/dist/components/xv-card-v2.js +1 -1
  65. package/dist/components/xv-checkbox-v2.js +1 -1
  66. package/dist/components/xv-content-switcher-item-v2.js +1 -1
  67. package/dist/components/xv-content-switcher-v2.js +1 -1
  68. package/dist/components/xv-data-table-cell.js +1 -1
  69. package/dist/components/xv-data-table-collapse.js +1 -1
  70. package/dist/components/xv-data-table-row.js +1 -1
  71. package/dist/components/xv-data-table.js +2 -2
  72. package/dist/components/xv-date-picker.js +1 -1
  73. package/dist/components/xv-datepicker.js +1 -1
  74. package/dist/components/xv-dropdown-v2-item.js +1 -1
  75. package/dist/components/xv-dropdown-v2.js +1 -1
  76. package/dist/components/xv-file-uploader.js +1 -1
  77. package/dist/components/xv-footer.js +1 -1
  78. package/dist/components/xv-geo-map-v2.js +1 -1
  79. package/dist/components/xv-header-next.js +1 -1
  80. package/dist/components/xv-header.js +1 -1
  81. package/dist/components/xv-image-viewer.js +1 -1
  82. package/dist/components/xv-link-v2.js +1 -1
  83. package/dist/components/xv-loader-v2.js +1 -1
  84. package/dist/components/xv-login-modal.js +1 -1
  85. package/dist/components/xv-mega-menu-next.js +1 -1
  86. package/dist/components/xv-mega-menu.js +1 -1
  87. package/dist/components/xv-modal-v2.js +1 -1
  88. package/dist/components/xv-notification-v2.js +1 -1
  89. package/dist/components/xv-number-input-v2.js +1 -1
  90. package/dist/components/xv-overflow-menu-v2-item.js +1 -1
  91. package/dist/components/xv-overflow-menu-v2.js +1 -1
  92. package/dist/components/xv-pagination.js +1 -1
  93. package/dist/components/xv-progress-indicator-v2-item.js +1 -1
  94. package/dist/components/xv-progress-indicator-v2.js +1 -1
  95. package/dist/components/xv-radio-v2.js +1 -1
  96. package/dist/components/xv-slider-v2.js +1 -1
  97. package/dist/components/xv-tab-v2.js +1 -1
  98. package/dist/components/{xv-table-v2-row.d.ts → xv-table-cell.d.ts} +4 -4
  99. package/dist/components/xv-table-cell.js +1 -0
  100. package/dist/components/{xv-table-v2-cell.d.ts → xv-table-row.d.ts} +4 -4
  101. package/dist/components/xv-table-row.js +1 -0
  102. package/dist/components/{xv-table-v2.d.ts → xv-table.d.ts} +4 -4
  103. package/dist/components/xv-table.js +1 -0
  104. package/dist/components/xv-tabs-v2.js +1 -1
  105. package/dist/components/xv-tag-combobox.js +1 -1
  106. package/dist/components/xv-tag-v2.js +1 -1
  107. package/dist/components/xv-text-input-v2.js +1 -1
  108. package/dist/components/xv-textarea.js +1 -1
  109. package/dist/components/xv-tile.js +1 -1
  110. package/dist/components/xv-toggle-tip.js +1 -1
  111. package/dist/components/xv-toggle.js +1 -1
  112. package/dist/components/xv-tooltip-v2.js +1 -1
  113. package/dist/custom-elements.json +1765 -294
  114. package/dist/docs.json +2749 -443
  115. package/dist/esm/{index-B6cY-_U1.js → index-ClusqSO5.js} +1 -1
  116. package/dist/esm/{index-Bu8SrOeR.js → index-DJC3-dS3.js} +15 -10
  117. package/dist/esm/index.js +2 -2
  118. package/dist/esm/loader.js +3 -3
  119. package/dist/esm/{xv-accordion-v2_50.entry.js → xv-accordion-v2_49.entry.js} +1527 -144
  120. package/dist/esm/xv-header-next.entry.js +2 -2
  121. package/dist/esm/xv-mega-menu-next.entry.js +2 -2
  122. package/dist/esm/xv-webcomponents.js +4 -4
  123. package/dist/react/components.d.ts +3 -4
  124. package/dist/react/components.js +3 -4
  125. package/dist/react/{xv-table-v2-expand.d.ts → xv-table-cell.d.ts} +3 -3
  126. package/dist/react/xv-table-cell.js +14 -0
  127. package/dist/react/{xv-table-v2.d.ts → xv-table-row.d.ts} +3 -3
  128. package/dist/react/{xv-table-v2.js → xv-table-row.js} +5 -5
  129. package/dist/react/xv-table.d.ts +18 -0
  130. package/dist/react/xv-table.js +22 -0
  131. package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +43 -8
  132. package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +57 -18
  133. package/dist/types/components/xv-table/xv-table.d.ts +298 -9
  134. package/dist/types/components/xv-table/xv-table.model.d.ts +78 -0
  135. package/dist/types/components/xv-table/xv-table.utils.d.ts +47 -0
  136. package/dist/types/components.d.ts +899 -118
  137. package/dist/types/stencil-public-runtime.d.ts +61 -55
  138. package/dist/types/utils/table-layout.d.ts +7 -0
  139. package/dist/vscode-data.json +347 -56
  140. package/dist/xv-webcomponents/index.esm.js +1 -1
  141. package/dist/xv-webcomponents/{p-1ffb0b4f.entry.js → p-0c30d09f.entry.js} +1 -1
  142. package/dist/xv-webcomponents/{p-eb9d7750.entry.js → p-6b58979e.entry.js} +2 -2
  143. package/dist/xv-webcomponents/{p-Bu8SrOeR.js → p-DJC3-dS3.js} +2 -2
  144. package/dist/xv-webcomponents/{p-DB4KqDJz.js → p-DSFVdw3w.js} +1 -1
  145. package/dist/xv-webcomponents/{p-d4d26ff2.entry.js → p-c4173686.entry.js} +1 -1
  146. package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
  147. package/package.json +139 -139
  148. package/dist/collection/components/xv-table/_vars.js +0 -2
  149. package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +0 -58
  150. package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +0 -75
  151. package/dist/components/p-CHtssNO9.js +0 -1
  152. package/dist/components/p-CILNPUHH.js +0 -1
  153. package/dist/components/p-DVZ2BlIP.js +0 -1
  154. package/dist/components/p-bdaoJ1tx.js +0 -1
  155. package/dist/components/xv-table-v2-cell.js +0 -1
  156. package/dist/components/xv-table-v2-expand.d.ts +0 -11
  157. package/dist/components/xv-table-v2-expand.js +0 -1
  158. package/dist/components/xv-table-v2-row.js +0 -1
  159. package/dist/components/xv-table-v2.js +0 -1
  160. package/dist/react/xv-table-v2-cell.d.ts +0 -12
  161. package/dist/react/xv-table-v2-cell.js +0 -14
  162. package/dist/react/xv-table-v2-expand.js +0 -14
  163. package/dist/react/xv-table-v2-row.d.ts +0 -13
  164. package/dist/react/xv-table-v2-row.js +0 -17
  165. package/dist/types/components/xv-table/_vars.d.ts +0 -15
  166. package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +0 -8
@@ -1,30 +1,65 @@
1
- import { Host, h } from "@stencil/core";
2
- import { forEach, uidGenerator } from "../../../utils/utils";
1
+ import { h, Host } from "@stencil/core";
3
2
  import { XV_SORT_DIR } from "../../../types/enum";
3
+ /**
4
+ * One cell of a table row. It holds arbitrary markup — buttons, links, tags, nested components —
5
+ * which is why the table stays composed rather than driven only by data.
6
+ *
7
+ * In a header row it also carries the column affordances: the sort arrow, the drag grip and the
8
+ * resize handle. The table renders this same component in both modes, so a header written as
9
+ * markup can do everything a header built from `columns` can.
10
+ *
11
+ * @slot - The cell content.
12
+ * @part cell - The cell host.
13
+ * @part content - The wrapper the overflow rules are applied to.
14
+ * @part tooltip - The tooltip wrapper, present only when `tooltip` is set.
15
+ * @part grip - The column drag grip, in a header cell.
16
+ * @part resize - The column resize handle, in a header cell.
17
+ */
4
18
  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 });
19
+ constructor() {
20
+ /** Column this cell belongs to. Identifies it for sorting, resizing and the stored layout. */
21
+ this.columnId = '';
22
+ /** Horizontal alignment of the content. */
23
+ this.align = 'start';
24
+ /** How content wider than the column behaves. */
25
+ this.overflow = 'ellipsis';
26
+ /** Lines kept before clamping, when `overflow` is `clamp`. */
27
+ this.clampLines = 2;
28
+ /** Tooltip shown on hover. Only a cell that sets it pays for the tooltip component. */
29
+ this.tooltip = '';
30
+ /** Column width. Read off the header row when the table has no `columns`. Any CSS length. */
31
+ this.width = '';
32
+ /** Renders the cell as a column header. Set by the table from the row it sits in. */
33
+ this.header = false;
34
+ /** Offers the sort affordance. A header cell only. */
35
+ this.sortable = false;
36
+ /** Direction currently sorted by; empty when this column is not the active one. */
37
+ this.sortDirection = '';
38
+ /** Lets the column picker hide this column. A header cell only. */
39
+ this.hideable = false;
40
+ /** Offers the resize handle. A header cell only. */
41
+ this.resizable = false;
42
+ /** Offers the drag grip. A header cell only. */
43
+ this.reorderable = false;
44
+ /** Accessible name of the drag grip. */
45
+ this.reorderLabel = 'Drag to reorder';
46
+ }
47
+ get ariaSort() {
48
+ if (!this.header || !this.sortable)
49
+ return null;
50
+ if (this.sortDirection === XV_SORT_DIR.ASC)
51
+ return 'ascending';
52
+ if (this.sortDirection === XV_SORT_DIR.DESC)
53
+ return 'descending';
54
+ return 'none';
22
55
  }
23
- ;
24
56
  render() {
25
- return (h(Host, { key: 'f1ae644f52064308240bda543eb23999a9a6eb8a' }, h("slot", { key: '7ce7b7c7f36cdaa8cf5e31ec5ed028af1c0db625' })));
57
+ const content = (h("div", { key: 'eefd1609b456cdcc9e802c27e524613b64a9ce39', class: "content", part: "content", style: this.overflow === 'clamp' ? { '--xv-table-cell-clamp': `${this.clampLines}` } : undefined }, h("slot", { key: 'a00460b7e2fbf775c7607af68b078a4fcff70c11' })));
58
+ return (h(Host, { key: '54976b9c9740d576bb4a81a15af65aa79a2f0888', role: this.header ? 'columnheader' : 'cell', part: "cell", "aria-sort": this.ariaSort, tabindex: this.header && this.sortable ? 0 : null }, this.header && this.reorderable && h("span", { key: 'f443393d1ea62a0c94bfa59b77c377bf5fc04a66', class: "grip", part: "grip", "aria-label": this.reorderLabel }), this.tooltip ? (
59
+ // Popper puts the panel on document.body, so the scroll container cannot clip it.
60
+ h("xv-tooltip-v2", { part: "tooltip", dashed: true, position: "top-start", message: this.tooltip }, content)) : (content), this.header && this.sortable && h("span", { key: 'c26fa895c0a9a17cbe6c33c68f9e14b05781554e', class: "sort", "aria-hidden": "true" }), this.header && this.resizable && h("span", { key: '37fa59799c363ed83f2dd0052b3203aa3bf01a6c', class: "resize", part: "resize", "aria-hidden": "true" })));
26
61
  }
27
- static get is() { return "xv-table-v2-cell"; }
62
+ static get is() { return "xv-table-cell"; }
28
63
  static get encapsulation() { return "shadow"; }
29
64
  static get originalStyleUrls() {
30
65
  return {
@@ -38,66 +73,183 @@ export class XvTableCell {
38
73
  }
39
74
  static get properties() {
40
75
  return {
41
- "multiline": {
42
- "type": "boolean",
76
+ "columnId": {
77
+ "type": "string",
43
78
  "mutable": false,
44
79
  "complexType": {
45
- "original": "boolean",
46
- "resolved": "boolean",
80
+ "original": "string",
81
+ "resolved": "string",
47
82
  "references": {}
48
83
  },
49
84
  "required": false,
50
- "optional": true,
85
+ "optional": false,
86
+ "docs": {
87
+ "tags": [],
88
+ "text": "Column this cell belongs to. Identifies it for sorting, resizing and the stored layout."
89
+ },
90
+ "getter": false,
91
+ "setter": false,
92
+ "reflect": true,
93
+ "attribute": "column-id",
94
+ "defaultValue": "''"
95
+ },
96
+ "align": {
97
+ "type": "string",
98
+ "mutable": false,
99
+ "complexType": {
100
+ "original": "XvCellAlign",
101
+ "resolved": "\"center\" | \"end\" | \"start\"",
102
+ "references": {
103
+ "XvCellAlign": {
104
+ "location": "import",
105
+ "path": "../xv-table.model",
106
+ "id": "src/components/xv-table/xv-table.model.ts::XvCellAlign",
107
+ "referenceLocation": "XvCellAlign"
108
+ }
109
+ }
110
+ },
111
+ "required": false,
112
+ "optional": false,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": "Horizontal alignment of the content."
116
+ },
117
+ "getter": false,
118
+ "setter": false,
119
+ "reflect": true,
120
+ "attribute": "align",
121
+ "defaultValue": "'start'"
122
+ },
123
+ "overflow": {
124
+ "type": "string",
125
+ "mutable": false,
126
+ "complexType": {
127
+ "original": "XvCellOverflow",
128
+ "resolved": "\"clamp\" | \"ellipsis\" | \"wrap\"",
129
+ "references": {
130
+ "XvCellOverflow": {
131
+ "location": "import",
132
+ "path": "../xv-table.model",
133
+ "id": "src/components/xv-table/xv-table.model.ts::XvCellOverflow",
134
+ "referenceLocation": "XvCellOverflow"
135
+ }
136
+ }
137
+ },
138
+ "required": false,
139
+ "optional": false,
51
140
  "docs": {
52
141
  "tags": [],
53
- "text": ""
142
+ "text": "How content wider than the column behaves."
54
143
  },
55
144
  "getter": false,
56
145
  "setter": false,
57
146
  "reflect": true,
58
- "attribute": "multiline"
147
+ "attribute": "overflow",
148
+ "defaultValue": "'ellipsis'"
59
149
  },
60
- "name": {
150
+ "clampLines": {
151
+ "type": "number",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "number",
155
+ "resolved": "number",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": false,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": "Lines kept before clamping, when `overflow` is `clamp`."
163
+ },
164
+ "getter": false,
165
+ "setter": false,
166
+ "reflect": false,
167
+ "attribute": "clamp-lines",
168
+ "defaultValue": "2"
169
+ },
170
+ "tooltip": {
61
171
  "type": "string",
62
- "mutable": true,
172
+ "mutable": false,
63
173
  "complexType": {
64
174
  "original": "string",
65
175
  "resolved": "string",
66
176
  "references": {}
67
177
  },
68
178
  "required": false,
69
- "optional": true,
179
+ "optional": false,
70
180
  "docs": {
71
181
  "tags": [],
72
- "text": ""
182
+ "text": "Tooltip shown on hover. Only a cell that sets it pays for the tooltip component."
73
183
  },
74
184
  "getter": false,
75
185
  "setter": false,
76
- "reflect": true,
77
- "attribute": "name"
186
+ "reflect": false,
187
+ "attribute": "tooltip",
188
+ "defaultValue": "''"
78
189
  },
79
- "align": {
190
+ "width": {
80
191
  "type": "string",
81
192
  "mutable": false,
82
193
  "complexType": {
83
- "original": "'left' | 'right' | 'center'",
84
- "resolved": "\"center\" | \"left\" | \"right\"",
194
+ "original": "string",
195
+ "resolved": "string",
196
+ "references": {}
197
+ },
198
+ "required": false,
199
+ "optional": false,
200
+ "docs": {
201
+ "tags": [],
202
+ "text": "Column width. Read off the header row when the table has no `columns`. Any CSS length."
203
+ },
204
+ "getter": false,
205
+ "setter": false,
206
+ "reflect": false,
207
+ "attribute": "width",
208
+ "defaultValue": "''"
209
+ },
210
+ "header": {
211
+ "type": "boolean",
212
+ "mutable": false,
213
+ "complexType": {
214
+ "original": "boolean",
215
+ "resolved": "boolean",
216
+ "references": {}
217
+ },
218
+ "required": false,
219
+ "optional": false,
220
+ "docs": {
221
+ "tags": [],
222
+ "text": "Renders the cell as a column header. Set by the table from the row it sits in."
223
+ },
224
+ "getter": false,
225
+ "setter": false,
226
+ "reflect": true,
227
+ "attribute": "header",
228
+ "defaultValue": "false"
229
+ },
230
+ "sortable": {
231
+ "type": "boolean",
232
+ "mutable": false,
233
+ "complexType": {
234
+ "original": "boolean",
235
+ "resolved": "boolean",
85
236
  "references": {}
86
237
  },
87
238
  "required": false,
88
- "optional": true,
239
+ "optional": false,
89
240
  "docs": {
90
241
  "tags": [],
91
- "text": ""
242
+ "text": "Offers the sort affordance. A header cell only."
92
243
  },
93
244
  "getter": false,
94
245
  "setter": false,
95
246
  "reflect": true,
96
- "attribute": "align"
247
+ "attribute": "sortable",
248
+ "defaultValue": "false"
97
249
  },
98
- "sort": {
250
+ "sortDirection": {
99
251
  "type": "string",
100
- "mutable": true,
252
+ "mutable": false,
101
253
  "complexType": {
102
254
  "original": "XV_SORT_DIR | ''",
103
255
  "resolved": "\"\" | XV_SORT_DIR.ASC | XV_SORT_DIR.DESC | XV_SORT_DIR.NONE",
@@ -111,51 +263,98 @@ export class XvTableCell {
111
263
  }
112
264
  },
113
265
  "required": false,
114
- "optional": true,
266
+ "optional": false,
115
267
  "docs": {
116
268
  "tags": [],
117
- "text": ""
269
+ "text": "Direction currently sorted by; empty when this column is not the active one."
118
270
  },
119
271
  "getter": false,
120
272
  "setter": false,
121
273
  "reflect": true,
122
- "attribute": "sort"
123
- }
124
- };
125
- }
126
- static get events() {
127
- return [{
128
- "method": "sortChange",
129
- "name": "sortChange",
130
- "bubbles": true,
131
- "cancelable": true,
132
- "composed": true,
274
+ "attribute": "sort-direction",
275
+ "defaultValue": "''"
276
+ },
277
+ "hideable": {
278
+ "type": "boolean",
279
+ "mutable": false,
280
+ "complexType": {
281
+ "original": "boolean",
282
+ "resolved": "boolean",
283
+ "references": {}
284
+ },
285
+ "required": false,
286
+ "optional": false,
133
287
  "docs": {
134
288
  "tags": [],
135
- "text": ""
289
+ "text": "Lets the column picker hide this column. A header cell only."
136
290
  },
291
+ "getter": false,
292
+ "setter": false,
293
+ "reflect": true,
294
+ "attribute": "hideable",
295
+ "defaultValue": "false"
296
+ },
297
+ "resizable": {
298
+ "type": "boolean",
299
+ "mutable": false,
137
300
  "complexType": {
138
- "original": "XVTableSortDto",
139
- "resolved": "XVTableSortDto",
140
- "references": {
141
- "XVTableSortDto": {
142
- "location": "import",
143
- "path": "../_vars",
144
- "id": "src/components/xv-table/_vars.ts::XVTableSortDto",
145
- "referenceLocation": "XVTableSortDto"
146
- }
147
- }
148
- }
149
- }];
301
+ "original": "boolean",
302
+ "resolved": "boolean",
303
+ "references": {}
304
+ },
305
+ "required": false,
306
+ "optional": false,
307
+ "docs": {
308
+ "tags": [],
309
+ "text": "Offers the resize handle. A header cell only."
310
+ },
311
+ "getter": false,
312
+ "setter": false,
313
+ "reflect": true,
314
+ "attribute": "resizable",
315
+ "defaultValue": "false"
316
+ },
317
+ "reorderable": {
318
+ "type": "boolean",
319
+ "mutable": false,
320
+ "complexType": {
321
+ "original": "boolean",
322
+ "resolved": "boolean",
323
+ "references": {}
324
+ },
325
+ "required": false,
326
+ "optional": false,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "Offers the drag grip. A header cell only."
330
+ },
331
+ "getter": false,
332
+ "setter": false,
333
+ "reflect": true,
334
+ "attribute": "reorderable",
335
+ "defaultValue": "false"
336
+ },
337
+ "reorderLabel": {
338
+ "type": "string",
339
+ "mutable": false,
340
+ "complexType": {
341
+ "original": "string",
342
+ "resolved": "string",
343
+ "references": {}
344
+ },
345
+ "required": false,
346
+ "optional": false,
347
+ "docs": {
348
+ "tags": [],
349
+ "text": "Accessible name of the drag grip."
350
+ },
351
+ "getter": false,
352
+ "setter": false,
353
+ "reflect": false,
354
+ "attribute": "reorder-label",
355
+ "defaultValue": "'Drag to reorder'"
356
+ }
357
+ };
150
358
  }
151
359
  static get elementRef() { return "el"; }
152
- static get listeners() {
153
- return [{
154
- "name": "click",
155
- "method": "handleSort",
156
- "target": undefined,
157
- "capture": false,
158
- "passive": false
159
- }];
160
- }
161
360
  }
@@ -1,39 +1,153 @@
1
1
  :host {
2
+ /**
3
+ * @prop --xv-table-row-bg: Row background. Switched by hover, selected and group.
4
+ * @prop --xv-table-row-height: Minimum row height. Inherited from the table's size ladder.
5
+ * @prop --xv-table-row-disabled-opacity: How far a disabled row fades.
6
+ */
7
+ --xv-table-row-bg: var(--layer-02);
8
+ --xv-table-row-height: var(--xv-table-height, 40px);
9
+ --xv-table-row-disabled-opacity: 0.5;
10
+ grid-column: 1/-1;
2
11
  display: grid;
3
- grid-template-columns: var(--xv-table-cols-template, repeat(auto-fit, minmax(0, 1fr)));
4
- border-bottom: 1px solid #E3E3E3;
5
- border-right: 1px solid #E3E3E3;
6
- border-left: 1px solid #E3E3E3;
7
- min-height: var(--xv-table-min-height);
8
- align-items: center;
9
- align-content: center;
10
- transition: 0.25s ease-in-out background-color;
12
+ grid-template-columns: subgrid;
13
+ align-items: stretch;
14
+ min-height: var(--xv-table-row-height);
15
+ background: var(--xv-table-row-bg);
16
+ box-shadow: inset 0 -1px 0 0 var(--border-subtle-00);
11
17
  }
12
- :host .cell-control {
13
- min-height: 20px;
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
18
+
19
+ @supports not (grid-template-columns: subgrid) {
20
+ :host {
21
+ display: contents;
22
+ }
23
+ }
24
+ :host([hover]:not([disabled]):hover) {
25
+ --xv-table-row-bg: var(--layer-hover-01);
26
+ }
27
+
28
+ :host([selected]) {
29
+ --xv-table-row-bg: var(--layer-selected-01);
30
+ }
31
+
32
+ :host([selected][hover]:hover) {
33
+ --xv-table-row-bg: var(--layer-selected-hover-01);
17
34
  }
18
35
 
19
- :host([variant]) {
20
- grid-template-columns: minmax(47.97px, min-content) var(--xv-table-cols-template, repeat(auto-fit, minmax(0, 1fr)));
36
+ :host([row-reorderable][draggable=true]) {
37
+ cursor: grab;
21
38
  }
22
39
 
23
- :host([hover]:not([header]):hover) {
24
- background-color: var(--layer-hover-01, #E9E9E9);
40
+ :host(.is-dragging) {
41
+ opacity: 0.4;
25
42
  }
26
43
 
27
- :host([checked]) {
28
- background-color: var(--layer-selected-01, #E3E3E3);
44
+ :host(.drop-above) {
45
+ box-shadow: inset 0 2px 0 0 var(--interactive-01);
29
46
  }
30
47
 
31
- :host([checked]:hover) {
32
- background-color: var(--layer-selected-hover-01, #DADADA);
48
+ :host(.drop-below) {
49
+ box-shadow: inset 0 -2px 0 0 var(--interactive-01);
50
+ }
51
+
52
+ :host([group]) {
53
+ --xv-table-row-bg: var(--layer-accent-01);
54
+ font-weight: 600;
55
+ }
56
+
57
+ :host(.has-children) {
58
+ --xv-table-row-bg: var(--layer-accent-01);
59
+ }
60
+
61
+ :host(.has-children[hover]:hover) {
62
+ --xv-table-row-bg: var(--layer-accent-hover-01);
33
63
  }
34
64
 
35
65
  :host([header]) {
36
- background-color: var(--layer-accent-01, #F7F7F7);
37
- box-shadow: 0 0 0 1px #E3E3E3 inset;
38
- border-bottom: none;
66
+ --xv-table-row-bg: var(--xv-table-header-bg, var(--layer-accent-01));
67
+ box-shadow: inset 0 -1px 0 0 var(--border-subtle-01);
68
+ font-weight: 600;
69
+ }
70
+
71
+ :host([disabled]:not([header])) {
72
+ cursor: not-allowed;
73
+ color: var(--text-disabled);
74
+ pointer-events: none;
75
+ opacity: var(--xv-table-row-disabled-opacity);
76
+ }
77
+
78
+ .control {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ padding: 0 var(--spacing-03);
83
+ }
84
+ .control--grip {
85
+ order: -3;
86
+ }
87
+ .control--expand {
88
+ order: -2;
89
+ }
90
+ .control--lead {
91
+ order: -1;
92
+ }
93
+ .control_grip {
94
+ width: 8px;
95
+ height: 14px;
96
+ opacity: 0.4;
97
+ cursor: grab;
98
+ background-image: radial-gradient(currentColor 1px, transparent 1px);
99
+ background-size: 4px 4px;
100
+ }
101
+ .control_grip:active {
102
+ cursor: grabbing;
103
+ }
104
+ .control_expand {
105
+ width: 24px;
106
+ height: 24px;
107
+ padding: 0;
108
+ border: 0;
109
+ background: none;
110
+ color: var(--icon-primary);
111
+ cursor: pointer;
112
+ }
113
+ .control_expand::before {
114
+ content: "";
115
+ display: block;
116
+ width: 8px;
117
+ height: 8px;
118
+ margin: 0 auto;
119
+ border-right: 1px solid currentColor;
120
+ border-bottom: 1px solid currentColor;
121
+ transform: rotate(45deg) translate(-2px, -2px);
122
+ transition: transform 0.15s ease;
123
+ }
124
+ .control_expand.open::before {
125
+ transform: rotate(-135deg) translate(-2px, -2px);
126
+ }
127
+ .control_expand:disabled {
128
+ color: var(--icon-disabled);
129
+ cursor: not-allowed;
130
+ }
131
+ .control_expand:focus-visible {
132
+ outline: 2px solid var(--focus);
133
+ outline-offset: 0;
134
+ }
135
+ .control_expand:focus-visible {
136
+ outline-offset: -2px;
137
+ }
138
+
139
+ .expand {
140
+ order: 10000;
141
+ grid-column: 1/-1;
142
+ padding: var(--spacing-05);
143
+ background: var(--layer-01);
144
+ box-shadow: inset 0 1px 0 0 var(--border-subtle-00);
145
+ }
146
+
147
+ .expand[hidden] {
148
+ display: none;
149
+ }
150
+
151
+ :host([hidden]) {
152
+ display: none;
39
153
  }