@zywave/zui-table 4.0.0-pre.1

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 (58) hide show
  1. package/README.md +27 -0
  2. package/demo/index.html +435 -0
  3. package/dist/css/zui-table.fouc.css +1 -0
  4. package/dist/custom-elements.json +405 -0
  5. package/dist/index.d.ts +5 -0
  6. package/dist/index.js +6 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/zui-table-cell-css.d.ts +1 -0
  9. package/dist/zui-table-cell-css.js +3 -0
  10. package/dist/zui-table-cell-css.js.map +1 -0
  11. package/dist/zui-table-cell.d.ts +21 -0
  12. package/dist/zui-table-cell.js +43 -0
  13. package/dist/zui-table-cell.js.map +1 -0
  14. package/dist/zui-table-css.d.ts +1 -0
  15. package/dist/zui-table-css.js +3 -0
  16. package/dist/zui-table-css.js.map +1 -0
  17. package/dist/zui-table-footer-css.d.ts +1 -0
  18. package/dist/zui-table-footer-css.js +3 -0
  19. package/dist/zui-table-footer-css.js.map +1 -0
  20. package/dist/zui-table-footer.d.ts +17 -0
  21. package/dist/zui-table-footer.js +22 -0
  22. package/dist/zui-table-footer.js.map +1 -0
  23. package/dist/zui-table-row-css.d.ts +1 -0
  24. package/dist/zui-table-row-css.js +3 -0
  25. package/dist/zui-table-row-css.js.map +1 -0
  26. package/dist/zui-table-row.d.ts +31 -0
  27. package/dist/zui-table-row.js +52 -0
  28. package/dist/zui-table-row.js.map +1 -0
  29. package/dist/zui-table-topbar-css.d.ts +1 -0
  30. package/dist/zui-table-topbar-css.js +3 -0
  31. package/dist/zui-table-topbar-css.js.map +1 -0
  32. package/dist/zui-table-topbar.d.ts +17 -0
  33. package/dist/zui-table-topbar.js +24 -0
  34. package/dist/zui-table-topbar.js.map +1 -0
  35. package/dist/zui-table.d.ts +45 -0
  36. package/dist/zui-table.js +96 -0
  37. package/dist/zui-table.js.map +1 -0
  38. package/lab.html +467 -0
  39. package/package.json +37 -0
  40. package/src/css/zui-table.fouc.scss +137 -0
  41. package/src/index.ts +5 -0
  42. package/src/zui-table-cell-css.js +3 -0
  43. package/src/zui-table-cell.scss +5 -0
  44. package/src/zui-table-cell.ts +41 -0
  45. package/src/zui-table-css.js +3 -0
  46. package/src/zui-table-footer-css.js +3 -0
  47. package/src/zui-table-footer.scss +12 -0
  48. package/src/zui-table-footer.ts +30 -0
  49. package/src/zui-table-row-css.js +3 -0
  50. package/src/zui-table-row.scss +25 -0
  51. package/src/zui-table-row.ts +49 -0
  52. package/src/zui-table-topbar-css.js +3 -0
  53. package/src/zui-table-topbar.scss +40 -0
  54. package/src/zui-table-topbar.ts +32 -0
  55. package/src/zui-table.scss +39 -0
  56. package/src/zui-table.ts +93 -0
  57. package/test/zui-table.test.ts +129 -0
  58. package/tsconfig.build.json +10 -0
@@ -0,0 +1,405 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/zui-table-cell.ts",
8
+ "declarations": [
9
+ {
10
+ "kind": "class",
11
+ "description": "",
12
+ "name": "ZuiTableCellElement",
13
+ "cssProperties": [
14
+ {
15
+ "description": "- Override cell padding",
16
+ "name": "--zui-table-cell-padding",
17
+ "default": "13px 20px"
18
+ }
19
+ ],
20
+ "slots": [
21
+ {
22
+ "description": "Default slot; table cell content goes here",
23
+ "name": "-"
24
+ }
25
+ ],
26
+ "members": [
27
+ {
28
+ "kind": "field",
29
+ "name": "span",
30
+ "default": "1",
31
+ "type": {
32
+ "text": "number"
33
+ },
34
+ "description": "- Set number of columns the table cell should span"
35
+ }
36
+ ],
37
+ "attributes": [
38
+ {
39
+ "type": {
40
+ "text": "number"
41
+ },
42
+ "description": "- Set number of columns the table cell should span",
43
+ "name": "span",
44
+ "default": "1",
45
+ "fieldName": "span"
46
+ }
47
+ ],
48
+ "superclass": {
49
+ "name": "ZuiBaseElement"
50
+ },
51
+ "tagName": "zui-table-cell",
52
+ "customElement": true
53
+ }
54
+ ],
55
+ "exports": [
56
+ {
57
+ "kind": "js",
58
+ "name": "ZuiTableCellElement",
59
+ "declaration": {
60
+ "name": "ZuiTableCellElement",
61
+ "module": "src/zui-table-cell.ts"
62
+ }
63
+ },
64
+ {
65
+ "kind": "custom-element-definition",
66
+ "name": "zui-table-cell",
67
+ "declaration": {
68
+ "name": "ZuiTableCellElement",
69
+ "module": "src/zui-table-cell.ts"
70
+ }
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ "kind": "javascript-module",
76
+ "path": "src/zui-table-footer.ts",
77
+ "declarations": [
78
+ {
79
+ "kind": "class",
80
+ "description": "",
81
+ "name": "ZuiTableFooterElement",
82
+ "cssProperties": [
83
+ {
84
+ "description": "- Margin between the table and footer of the table",
85
+ "name": "--zui-table-footer-margin",
86
+ "default": "10px"
87
+ }
88
+ ],
89
+ "slots": [
90
+ {
91
+ "description": "Default slot; table footer content goes here",
92
+ "name": "-"
93
+ }
94
+ ],
95
+ "members": [],
96
+ "superclass": {
97
+ "name": "ZuiBaseElement"
98
+ },
99
+ "tagName": "zui-table-footer",
100
+ "customElement": true
101
+ }
102
+ ],
103
+ "exports": [
104
+ {
105
+ "kind": "js",
106
+ "name": "ZuiTableFooterElement",
107
+ "declaration": {
108
+ "name": "ZuiTableFooterElement",
109
+ "module": "src/zui-table-footer.ts"
110
+ }
111
+ },
112
+ {
113
+ "kind": "custom-element-definition",
114
+ "name": "zui-table-footer",
115
+ "declaration": {
116
+ "name": "ZuiTableFooterElement",
117
+ "module": "src/zui-table-footer.ts"
118
+ }
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "kind": "javascript-module",
124
+ "path": "src/zui-table-row.ts",
125
+ "declarations": [
126
+ {
127
+ "kind": "class",
128
+ "description": "",
129
+ "name": "ZuiTableRowElement",
130
+ "cssProperties": [
131
+ {
132
+ "description": "- Set the table summary background color",
133
+ "name": "--zui-table-summary-background-color",
134
+ "default": "var(--zui-gray-600)"
135
+ },
136
+ {
137
+ "description": "- Set the the table summary text color",
138
+ "name": "--zui-table-summary-text-color",
139
+ "default": "#fff"
140
+ }
141
+ ],
142
+ "slots": [
143
+ {
144
+ "description": "Default slot; `<zui-table-cell>`s are declared here",
145
+ "name": "-"
146
+ }
147
+ ],
148
+ "members": [
149
+ {
150
+ "kind": "field",
151
+ "name": "header",
152
+ "description": "- Set table header row",
153
+ "type": {
154
+ "text": "boolean"
155
+ }
156
+ },
157
+ {
158
+ "kind": "field",
159
+ "name": "summary",
160
+ "description": "- Set table summary row",
161
+ "type": {
162
+ "text": "boolean"
163
+ }
164
+ }
165
+ ],
166
+ "attributes": [
167
+ {
168
+ "type": {
169
+ "text": "boolean"
170
+ },
171
+ "description": "- Set table header row",
172
+ "name": "header",
173
+ "fieldName": "header"
174
+ },
175
+ {
176
+ "type": {
177
+ "text": "boolean"
178
+ },
179
+ "description": "- Set table summary row",
180
+ "name": "summary",
181
+ "fieldName": "summary"
182
+ }
183
+ ],
184
+ "superclass": {
185
+ "name": "ZuiBaseElement"
186
+ },
187
+ "tagName": "zui-table-row",
188
+ "customElement": true
189
+ }
190
+ ],
191
+ "exports": [
192
+ {
193
+ "kind": "js",
194
+ "name": "ZuiTableRowElement",
195
+ "declaration": {
196
+ "name": "ZuiTableRowElement",
197
+ "module": "src/zui-table-row.ts"
198
+ }
199
+ },
200
+ {
201
+ "kind": "custom-element-definition",
202
+ "name": "zui-table-row",
203
+ "declaration": {
204
+ "name": "ZuiTableRowElement",
205
+ "module": "src/zui-table-row.ts"
206
+ }
207
+ }
208
+ ]
209
+ },
210
+ {
211
+ "kind": "javascript-module",
212
+ "path": "src/zui-table-topbar.ts",
213
+ "declarations": [
214
+ {
215
+ "kind": "class",
216
+ "description": "",
217
+ "name": "ZuiTableTopbarElement",
218
+ "slots": [
219
+ {
220
+ "description": "Default slot; table cell content goes here",
221
+ "name": "-"
222
+ },
223
+ {
224
+ "description": "- Total number of results from table goes here",
225
+ "name": "counter"
226
+ },
227
+ {
228
+ "description": "- Action(s) that affect the whole table goes here",
229
+ "name": "action"
230
+ }
231
+ ],
232
+ "members": [],
233
+ "superclass": {
234
+ "name": "ZuiBaseElement"
235
+ },
236
+ "tagName": "zui-table-topbar",
237
+ "customElement": true
238
+ }
239
+ ],
240
+ "exports": [
241
+ {
242
+ "kind": "js",
243
+ "name": "ZuiTableTopbarElement",
244
+ "declaration": {
245
+ "name": "ZuiTableTopbarElement",
246
+ "module": "src/zui-table-topbar.ts"
247
+ }
248
+ },
249
+ {
250
+ "kind": "custom-element-definition",
251
+ "name": "zui-table-topbar",
252
+ "declaration": {
253
+ "name": "ZuiTableTopbarElement",
254
+ "module": "src/zui-table-topbar.ts"
255
+ }
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "kind": "javascript-module",
261
+ "path": "src/zui-table.ts",
262
+ "declarations": [
263
+ {
264
+ "kind": "class",
265
+ "description": "",
266
+ "name": "ZuiTableElement",
267
+ "cssProperties": [
268
+ {
269
+ "description": "- Override cell padding",
270
+ "name": "--zui-table-cell-padding",
271
+ "default": "13px 20px"
272
+ },
273
+ {
274
+ "description": "- Set the table summary background color",
275
+ "name": "--zui-table-summary-background-color",
276
+ "default": "var(--zui-gray-600)"
277
+ },
278
+ {
279
+ "description": "- Set the the table summary text color",
280
+ "name": "--zui-table-summary-text-color",
281
+ "default": "#fff"
282
+ },
283
+ {
284
+ "description": "- Margin between the table and footer of the table",
285
+ "name": "--zui-table-footer-margin",
286
+ "default": "10px"
287
+ }
288
+ ],
289
+ "slots": [
290
+ {
291
+ "description": "Default slot; all table content will appear here, such as table rows",
292
+ "name": "-"
293
+ },
294
+ {
295
+ "description": "- Customize the no results message that is shown when `<zui-table>` has the attribute `no-results`: `<zui-table no-results>`",
296
+ "name": "no-results-message"
297
+ },
298
+ {
299
+ "description": "- Only for `<zui-table-footer>`. When there is a `<zui-table-footer>` present inside `<zui-table>`, it will be auto-assigned to this slot in order to place it outside of the rendered table for styling purposes.",
300
+ "name": "footer"
301
+ }
302
+ ],
303
+ "members": [
304
+ {
305
+ "kind": "field",
306
+ "name": "columns",
307
+ "description": "- Amount of columns to show in the table",
308
+ "default": "1",
309
+ "type": {
310
+ "text": "number"
311
+ }
312
+ },
313
+ {
314
+ "kind": "field",
315
+ "name": "banded",
316
+ "description": "- Style option to alternate row background colors",
317
+ "type": {
318
+ "text": "boolean"
319
+ }
320
+ },
321
+ {
322
+ "kind": "field",
323
+ "name": "noResults",
324
+ "description": "- To show or hide no results message when there are no results",
325
+ "type": {
326
+ "text": "boolean"
327
+ }
328
+ },
329
+ {
330
+ "kind": "field",
331
+ "name": "_slotEl",
332
+ "type": {
333
+ "text": "HTMLSlotElement"
334
+ },
335
+ "privacy": "private"
336
+ },
337
+ {
338
+ "kind": "field",
339
+ "name": "_footer",
340
+ "privacy": "private"
341
+ },
342
+ {
343
+ "kind": "method",
344
+ "name": "#renderNoResultsView"
345
+ },
346
+ {
347
+ "kind": "method",
348
+ "name": "#reassignFooter"
349
+ }
350
+ ],
351
+ "attributes": [
352
+ {
353
+ "type": {
354
+ "text": "number"
355
+ },
356
+ "description": "- Amount of columns to show in the table",
357
+ "name": "columns",
358
+ "default": "1",
359
+ "fieldName": "columns"
360
+ },
361
+ {
362
+ "type": {
363
+ "text": "boolean"
364
+ },
365
+ "description": "- Style option to alternate row background colors",
366
+ "name": "banded",
367
+ "fieldName": "banded"
368
+ },
369
+ {
370
+ "type": {
371
+ "text": "boolean"
372
+ },
373
+ "description": "- To show or hide no results message when there are no results",
374
+ "name": "no-results",
375
+ "fieldName": "noResults"
376
+ }
377
+ ],
378
+ "superclass": {
379
+ "name": "ZuiBaseElement"
380
+ },
381
+ "tagName": "zui-table",
382
+ "customElement": true
383
+ }
384
+ ],
385
+ "exports": [
386
+ {
387
+ "kind": "js",
388
+ "name": "ZuiTableElement",
389
+ "declaration": {
390
+ "name": "ZuiTableElement",
391
+ "module": "src/zui-table.ts"
392
+ }
393
+ },
394
+ {
395
+ "kind": "custom-element-definition",
396
+ "name": "zui-table",
397
+ "declaration": {
398
+ "name": "ZuiTableElement",
399
+ "module": "src/zui-table.ts"
400
+ }
401
+ }
402
+ ]
403
+ }
404
+ ]
405
+ }
@@ -0,0 +1,5 @@
1
+ export * from './zui-table.js';
2
+ export * from './zui-table-topbar.js';
3
+ export * from './zui-table-footer.js';
4
+ export * from './zui-table-row.js';
5
+ export * from './zui-table-cell.js';
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ export * from './zui-table.js';
2
+ export * from './zui-table-topbar.js';
3
+ export * from './zui-table-footer.js';
4
+ export * from './zui-table-row.js';
5
+ export * from './zui-table-cell.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './zui-table.js';\nexport * from './zui-table-topbar.js';\nexport * from './zui-table-footer.js';\nexport * from './zui-table-row.js';\nexport * from './zui-table-cell.js';\n"]}
@@ -0,0 +1 @@
1
+ export const style: import("lit").CSSResult;
@@ -0,0 +1,3 @@
1
+ import { css } from 'lit';
2
+ export const style = css `div{padding:var(--zui-table-cell-padding, 0.8125rem 1.25rem)}`;
3
+ //# sourceMappingURL=zui-table-cell-css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zui-table-cell-css.js","sourceRoot":"","sources":["../src/zui-table-cell-css.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA,+DAA+D,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const style = css`div{padding:var(--zui-table-cell-padding, 0.8125rem 1.25rem)}`;\n"]}
@@ -0,0 +1,21 @@
1
+ import { ZuiBaseElement } from '@zywave/zui-base';
2
+ /**
3
+ * @element zui-table-cell
4
+ *
5
+ * @slot - Default slot; table cell content goes here
6
+ *
7
+ * @attr {number} span - Set number of columns the table cell should span
8
+ * @prop {number} span - Set number of columns the table cell should span
9
+ *
10
+ * @cssprop [--zui-table-cell-padding=13px 20px] - Override cell padding
11
+ */
12
+ export declare class ZuiTableCellElement extends ZuiBaseElement {
13
+ span: number;
14
+ static get styles(): (import("lit").CSSResult | import("lit").CSSResultArray)[];
15
+ render(): import("lit-html").TemplateResult<1>;
16
+ }
17
+ declare global {
18
+ interface HTMLElementTagNameMap {
19
+ 'zui-table-cell': ZuiTableCellElement;
20
+ }
21
+ }
@@ -0,0 +1,43 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { ZuiBaseElement } from '@zywave/zui-base';
8
+ import { html } from 'lit';
9
+ import { property } from 'lit/decorators.js';
10
+ import { style } from './zui-table-cell-css.js';
11
+ /**
12
+ * @element zui-table-cell
13
+ *
14
+ * @slot - Default slot; table cell content goes here
15
+ *
16
+ * @attr {number} span - Set number of columns the table cell should span
17
+ * @prop {number} span - Set number of columns the table cell should span
18
+ *
19
+ * @cssprop [--zui-table-cell-padding=13px 20px] - Override cell padding
20
+ */
21
+ export class ZuiTableCellElement extends ZuiBaseElement {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.span = 1;
25
+ }
26
+ static get styles() {
27
+ return [super.styles, style];
28
+ }
29
+ // TODO: change role="cell" to role="columnheader" if parent is <zui-table-row header>
30
+ render() {
31
+ const spanStyle = html `<style>
32
+ :host {
33
+ grid-column: span ${this.span} !important;
34
+ }
35
+ </style>`;
36
+ return html `${this.span >= 1 ? spanStyle : ''}<div role="cell"><slot></slot></div>`;
37
+ }
38
+ }
39
+ __decorate([
40
+ property({ type: Number })
41
+ ], ZuiTableCellElement.prototype, "span", void 0);
42
+ window.customElements.define('zui-table-cell', ZuiTableCellElement);
43
+ //# sourceMappingURL=zui-table-cell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zui-table-cell.js","sourceRoot":"","sources":["../src/zui-table-cell.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD;;;;;;;;;GASG;AACH,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IAAvD;;QAEE,SAAI,GAAG,CAAC,CAAC;IAeX,CAAC;IAbC,MAAM,KAAK,MAAM;QACf,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,sFAAsF;IACtF,MAAM;QACJ,MAAM,SAAS,GAAG,IAAI,CAAA;;4BAEE,IAAI,CAAC,IAAI;;aAExB,CAAC;QACV,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,sCAAsC,CAAC;IACtF,CAAC;CACF;AAfC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAClB;AAiBX,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { ZuiBaseElement } from '@zywave/zui-base';\nimport { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { style } from './zui-table-cell-css.js';\n\n/**\n * @element zui-table-cell\n *\n * @slot - Default slot; table cell content goes here\n *\n * @attr {number} span - Set number of columns the table cell should span\n * @prop {number} span - Set number of columns the table cell should span\n *\n * @cssprop [--zui-table-cell-padding=13px 20px] - Override cell padding\n */\nexport class ZuiTableCellElement extends ZuiBaseElement {\n @property({ type: Number })\n span = 1;\n\n static get styles() {\n return [super.styles, style];\n }\n\n // TODO: change role=\"cell\" to role=\"columnheader\" if parent is <zui-table-row header>\n render() {\n const spanStyle = html`<style>\n :host {\n grid-column: span ${this.span} !important;\n }\n </style>`;\n return html`${this.span >= 1 ? spanStyle : ''}<div role=\"cell\"><slot></slot></div>`;\n }\n}\n\nwindow.customElements.define('zui-table-cell', ZuiTableCellElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'zui-table-cell': ZuiTableCellElement;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export const style: import("lit").CSSResult;
@@ -0,0 +1,3 @@
1
+ import { css } from 'lit';
2
+ export const style = css `:host{display:block}:host([banded]) ::slotted(zui-table-row:not([header]):nth-child(even)){background-color:var(--zui-gray-25)}:host([banded]) ::slotted(zui-table-row:not([header])){border:0}:host([no-results]) .no-results{padding:.75rem 1.25rem}::slotted(zui-table-row:not([header])){border-bottom:1px solid var(--zui-gray-100)}::slotted(zui-table-row:not([header]):last-of-type){border-bottom:0}.table{display:flex;width:100%;flex-direction:column;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.29);border-collapse:collapse;border-spacing:0}`;
3
+ //# sourceMappingURL=zui-table-css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zui-table-css.js","sourceRoot":"","sources":["../src/zui-table-css.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA,yiBAAyiB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const style = css`:host{display:block}:host([banded]) ::slotted(zui-table-row:not([header]):nth-child(even)){background-color:var(--zui-gray-25)}:host([banded]) ::slotted(zui-table-row:not([header])){border:0}:host([no-results]) .no-results{padding:.75rem 1.25rem}::slotted(zui-table-row:not([header])){border-bottom:1px solid var(--zui-gray-100)}::slotted(zui-table-row:not([header]):last-of-type){border-bottom:0}.table{display:flex;width:100%;flex-direction:column;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.29);border-collapse:collapse;border-spacing:0}`;\n"]}
@@ -0,0 +1 @@
1
+ export const style: import("lit").CSSResult;
@@ -0,0 +1,3 @@
1
+ import { css } from 'lit';
2
+ export const style = css `.footer{display:flex;justify-content:center;align-items:center;margin-top:var(--zui-table-footer-margin, 0.625rem)}::slotted(zui-pager){width:100%}`;
3
+ //# sourceMappingURL=zui-table-footer-css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zui-table-footer-css.js","sourceRoot":"","sources":["../src/zui-table-footer-css.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA,qJAAqJ,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const style = css`.footer{display:flex;justify-content:center;align-items:center;margin-top:var(--zui-table-footer-margin, 0.625rem)}::slotted(zui-pager){width:100%}`;\n"]}
@@ -0,0 +1,17 @@
1
+ import { ZuiBaseElement } from '@zywave/zui-base';
2
+ /**
3
+ * @element zui-table-footer
4
+ *
5
+ * @slot - Default slot; table footer content goes here
6
+ *
7
+ * @cssprop [--zui-table-footer-margin=10px] - Margin between the table and footer of the table
8
+ */
9
+ export declare class ZuiTableFooterElement extends ZuiBaseElement {
10
+ static get styles(): (import("lit").CSSResult | import("lit").CSSResultArray)[];
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'zui-table-footer': ZuiTableFooterElement;
16
+ }
17
+ }
@@ -0,0 +1,22 @@
1
+ import { ZuiBaseElement } from '@zywave/zui-base';
2
+ import { html } from 'lit';
3
+ import { style } from './zui-table-footer-css.js';
4
+ /**
5
+ * @element zui-table-footer
6
+ *
7
+ * @slot - Default slot; table footer content goes here
8
+ *
9
+ * @cssprop [--zui-table-footer-margin=10px] - Margin between the table and footer of the table
10
+ */
11
+ export class ZuiTableFooterElement extends ZuiBaseElement {
12
+ static get styles() {
13
+ return [super.styles, style];
14
+ }
15
+ render() {
16
+ return html `<div class="footer">
17
+ <slot></slot>
18
+ </div>`;
19
+ }
20
+ }
21
+ window.customElements.define('zui-table-footer', ZuiTableFooterElement);
22
+ //# sourceMappingURL=zui-table-footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zui-table-footer.js","sourceRoot":"","sources":["../src/zui-table-footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,OAAO,qBAAsB,SAAQ,cAAc;IACvD,MAAM,KAAK,MAAM;QACf,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;;WAEJ,CAAC;IACV,CAAC;CACF;AAED,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import { ZuiBaseElement } from '@zywave/zui-base';\nimport { html } from 'lit';\nimport { style } from './zui-table-footer-css.js';\n\n/**\n * @element zui-table-footer\n *\n * @slot - Default slot; table footer content goes here\n *\n * @cssprop [--zui-table-footer-margin=10px] - Margin between the table and footer of the table\n */\nexport class ZuiTableFooterElement extends ZuiBaseElement {\n static get styles() {\n return [super.styles, style];\n }\n\n render() {\n return html`<div class=\"footer\">\n <slot></slot>\n </div>`;\n }\n}\n\nwindow.customElements.define('zui-table-footer', ZuiTableFooterElement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'zui-table-footer': ZuiTableFooterElement;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export const style: import("lit").CSSResult;
@@ -0,0 +1,3 @@
1
+ import { css } from 'lit';
2
+ export const style = css `:host([header]){background-color:#fff;border-bottom:1px solid var(--zui-gray-200)}:host([header]) ::slotted(zui-table-cell){--zui-table-cell-padding: 0.53125rem 1.25rem;font-weight:600}div{display:grid;grid-template-columns:repeat(var(--zui-table-columns), minmax(0, 1fr))}:host([summary]){background-color:var(--zui-table-summary-background-color, var(--zui-gray-600)) !important}:host([summary]) ::slotted(zui-table-cell){font-weight:600;color:var(--zui-table-summary-text-color, #fff)}`;
3
+ //# sourceMappingURL=zui-table-row-css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zui-table-row-css.js","sourceRoot":"","sources":["../src/zui-table-row-css.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA,0eAA0e,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const style = css`:host([header]){background-color:#fff;border-bottom:1px solid var(--zui-gray-200)}:host([header]) ::slotted(zui-table-cell){--zui-table-cell-padding: 0.53125rem 1.25rem;font-weight:600}div{display:grid;grid-template-columns:repeat(var(--zui-table-columns), minmax(0, 1fr))}:host([summary]){background-color:var(--zui-table-summary-background-color, var(--zui-gray-600)) !important}:host([summary]) ::slotted(zui-table-cell){font-weight:600;color:var(--zui-table-summary-text-color, #fff)}`;\n"]}
@@ -0,0 +1,31 @@
1
+ import { ZuiBaseElement } from '@zywave/zui-base';
2
+ /**
3
+ * @element zui-table-row
4
+ *
5
+ * @slot - Default slot; `<zui-table-cell>`s are declared here
6
+ *
7
+ * @attr {boolean} header - Set table header row
8
+ * @attr {boolean} summary - Set table summary row
9
+ * @prop {boolean} header - Set table header row
10
+ * @prop {boolean} summary - Set table summary row
11
+ *
12
+ * @cssprop [--zui-table-summary-background-color=var(--zui-gray-600)] - Set the table summary background color
13
+ * @cssprop [--zui-table-summary-text-color=#fff] - Set the the table summary text color
14
+ */
15
+ export declare class ZuiTableRowElement extends ZuiBaseElement {
16
+ /**
17
+ * property to declare the first row as the table header row
18
+ */
19
+ header: boolean;
20
+ /**
21
+ * property to declare a summary row; typically the last row in zui-table before zui-table-footer
22
+ */
23
+ summary: boolean;
24
+ static get styles(): (import("lit").CSSResult | import("lit").CSSResultArray)[];
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ 'zui-table-row': ZuiTableRowElement;
30
+ }
31
+ }