@limetech/lime-elements 35.0.0-next.1 → 35.0.0-next.13

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 (93) hide show
  1. package/dist/cjs/checkbox.template-b7b0460f.js +41 -0
  2. package/dist/cjs/lime-elements.cjs.js +2 -2
  3. package/dist/cjs/limel-badge.cjs.entry.js +2 -2
  4. package/dist/cjs/limel-checkbox.cjs.entry.js +2 -2
  5. package/dist/cjs/limel-chip-set.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-code-editor.cjs.entry.js +48 -21
  7. package/dist/cjs/limel-form.cjs.entry.js +7545 -8992
  8. package/dist/cjs/limel-input-field.cjs.entry.js +1 -1
  9. package/dist/cjs/limel-list_3.cjs.entry.js +128 -73
  10. package/dist/cjs/limel-menu-list.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-select.cjs.entry.js +2 -2
  12. package/dist/cjs/limel-slider.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-tab-bar.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-table.cjs.entry.js +362 -10
  15. package/dist/cjs/loader.cjs.js +2 -2
  16. package/dist/collection/collection-manifest.json +1 -1
  17. package/dist/collection/components/badge/badge.css +8 -15
  18. package/dist/collection/components/badge/badge.js +2 -2
  19. package/dist/collection/components/checkbox/checkbox.css +1 -3
  20. package/dist/collection/components/checkbox/checkbox.template.js +22 -20
  21. package/dist/collection/components/chip-set/chip-set.css +1 -1
  22. package/dist/collection/components/code-editor/code-editor.css +8 -13
  23. package/dist/collection/components/form/templates/common.js +4 -1
  24. package/dist/collection/components/input-field/input-field.css +14 -0
  25. package/dist/collection/components/list/list.css +2 -3
  26. package/dist/collection/components/menu-list/menu-list.css +2 -3
  27. package/dist/collection/components/select/select.css +6 -3
  28. package/dist/collection/components/select/select.template.js +1 -1
  29. package/dist/collection/components/slider/slider.css +5 -0
  30. package/dist/collection/components/tab-bar/tab-bar.css +14 -12
  31. package/dist/collection/components/table/columns.js +1 -1
  32. package/dist/collection/components/table/selection.js +111 -0
  33. package/dist/collection/components/table/table-selection.js +125 -0
  34. package/dist/collection/components/table/table.css +115 -32
  35. package/dist/collection/components/table/table.js +212 -7
  36. package/dist/collection/style/internal/lime-theme.scss +30 -31
  37. package/dist/collection/style/internal/lime-typography.scss +55 -56
  38. package/dist/collection/style/internal/shared_input-select-picker.scss +1 -0
  39. package/dist/collection/style/internal/z-index.scss +2 -1
  40. package/dist/esm/checkbox.template-b4bacc2e.js +39 -0
  41. package/dist/esm/{component-2eb4e07b.js → component-834d85a1.js} +1 -1
  42. package/dist/esm/lime-elements.js +2 -2
  43. package/dist/esm/limel-badge.entry.js +3 -3
  44. package/dist/esm/limel-checkbox.entry.js +3 -3
  45. package/dist/esm/limel-chip-set.entry.js +1 -1
  46. package/dist/esm/limel-code-editor.entry.js +48 -21
  47. package/dist/esm/limel-form.entry.js +7548 -8995
  48. package/dist/esm/limel-input-field.entry.js +1 -1
  49. package/dist/esm/limel-linear-progress.entry.js +1 -1
  50. package/dist/esm/limel-list_3.entry.js +130 -75
  51. package/dist/esm/limel-menu-list.entry.js +3 -3
  52. package/dist/esm/limel-select.entry.js +2 -2
  53. package/dist/esm/limel-slider.entry.js +2 -2
  54. package/dist/esm/limel-tab-bar.entry.js +1 -1
  55. package/dist/esm/limel-table.entry.js +362 -10
  56. package/dist/esm/loader.js +2 -2
  57. package/dist/esm/{util-71a23335.js → util-f1bde91c.js} +1 -1
  58. package/dist/lime-elements/lime-elements.esm.js +1 -1
  59. package/dist/lime-elements/{p-f2c706b8.entry.js → p-169fd2eb.entry.js} +1 -1
  60. package/dist/lime-elements/p-22c60ff3.js +1 -0
  61. package/dist/lime-elements/{p-138c0d50.entry.js → p-24d97176.entry.js} +1 -1
  62. package/dist/lime-elements/{p-13f0e4f4.entry.js → p-268cf1fa.entry.js} +1 -1
  63. package/dist/lime-elements/p-3dc1ddbe.entry.js +1 -0
  64. package/dist/lime-elements/{p-d48ad9f7.entry.js → p-51aa6433.entry.js} +1 -1
  65. package/dist/lime-elements/{p-6215e45e.entry.js → p-67a10143.entry.js} +1 -1
  66. package/dist/lime-elements/{p-bc0dcf01.entry.js → p-84689828.entry.js} +4 -4
  67. package/dist/lime-elements/p-8590a1b7.entry.js +16 -0
  68. package/dist/lime-elements/{p-31299106.js → p-90c6fa15.js} +1 -1
  69. package/dist/lime-elements/{p-152a6d5f.js → p-9faad6eb.js} +1 -1
  70. package/dist/lime-elements/{p-a77cbb08.entry.js → p-ca664c9f.entry.js} +1 -1
  71. package/dist/lime-elements/{p-050e8972.entry.js → p-d8167c28.entry.js} +2 -2
  72. package/dist/lime-elements/{p-b5faa40d.entry.js → p-df8faeb4.entry.js} +2 -2
  73. package/dist/lime-elements/{p-64549ba6.entry.js → p-e275f502.entry.js} +2 -2
  74. package/dist/lime-elements/p-e6e76954.entry.js +1 -0
  75. package/dist/lime-elements/style/internal/lime-theme.scss +30 -31
  76. package/dist/lime-elements/style/internal/lime-typography.scss +55 -56
  77. package/dist/lime-elements/style/internal/shared_input-select-picker.scss +1 -0
  78. package/dist/lime-elements/style/internal/z-index.scss +2 -1
  79. package/dist/types/components/badge/badge.d.ts +1 -1
  80. package/dist/types/components/table/columns.d.ts +7 -0
  81. package/dist/types/components/table/selection.d.ts +79 -0
  82. package/dist/types/components/table/table-selection.d.ts +57 -0
  83. package/dist/types/components/table/table.d.ts +39 -7
  84. package/dist/types/components/table/table.types.d.ts +13 -0
  85. package/dist/types/components.d.ts +33 -1
  86. package/dist/types/stencil-public-runtime.d.ts +6 -4
  87. package/package.json +17 -17
  88. package/dist/cjs/checkbox.template-50eb8b76.js +0 -39
  89. package/dist/esm/checkbox.template-50f7c07b.js +0 -37
  90. package/dist/lime-elements/p-0ce9165f.entry.js +0 -1
  91. package/dist/lime-elements/p-250f55be.js +0 -1
  92. package/dist/lime-elements/p-d2c74396.entry.js +0 -1
  93. package/dist/lime-elements/p-d93a3b07.entry.js +0 -16
@@ -3,6 +3,7 @@ import TabulatorTable from 'tabulator-tables';
3
3
  import { ColumnDefinitionFactory, createColumnSorter } from './columns';
4
4
  import { isEqual, has } from 'lodash-es';
5
5
  import { ElementPool } from './element-pool';
6
+ import { TableSelection } from './table-selection';
6
7
  const FIRST_PAGE = 1;
7
8
  /**
8
9
  * @exampleComponent limel-example-table
@@ -12,6 +13,7 @@ const FIRST_PAGE = 1;
12
13
  * @exampleComponent limel-example-table-local
13
14
  * @exampleComponent limel-example-table-remote
14
15
  * @exampleComponent limel-example-table-activate-row
16
+ * @exampleComponent limel-example-table-selectable-rows
15
17
  * @exampleComponent limel-example-table-default-sorted
16
18
  * @exampleComponent limel-example-table-low-density
17
19
  */
@@ -44,6 +46,27 @@ export class Table {
44
46
  * The page to show
45
47
  */
46
48
  this.page = FIRST_PAGE;
49
+ this.getActiveRows = () => {
50
+ if (!this.tabulator) {
51
+ return [];
52
+ }
53
+ return this.tabulator.getRows('active');
54
+ };
55
+ this.getActiveRowsData = () => {
56
+ // Note: Tabulator.getData() creates copies of each data object
57
+ // and will break this.selection.has checks, hence why this function
58
+ // intentionally retrieves the data using the row components
59
+ return this.getActiveRows().map((row) => row.getData());
60
+ };
61
+ this.selectAllOnChange = (ev) => {
62
+ const selectAll = ev.detail;
63
+ ev.stopPropagation();
64
+ ev.preventDefault();
65
+ const newSelection = selectAll ? this.getActiveRowsData() : [];
66
+ this.select.emit(newSelection);
67
+ this.tableSelection.setSelection(newSelection);
68
+ this.selectAll.emit(selectAll);
69
+ };
47
70
  this.getColumnOptions = () => {
48
71
  if (!this.movableColumns) {
49
72
  return {};
@@ -54,7 +77,7 @@ export class Table {
54
77
  };
55
78
  };
56
79
  this.handleMoveColumn = (_, components) => {
57
- const columns = components.map(this.findColumn);
80
+ const columns = components.map(this.findColumn).filter((c) => c);
58
81
  this.changeColumns.emit(columns);
59
82
  };
60
83
  this.findColumn = (component) => {
@@ -69,13 +92,20 @@ export class Table {
69
92
  this.requestData = this.requestData.bind(this);
70
93
  this.onClickRow = this.onClickRow.bind(this);
71
94
  this.formatRow = this.formatRow.bind(this);
95
+ this.formatRows = this.formatRows.bind(this);
72
96
  this.updateMaxPage = this.updateMaxPage.bind(this);
73
97
  this.initTabulatorComponent = this.initTabulatorComponent.bind(this);
98
+ this.setSelection = this.setSelection.bind(this);
99
+ this.addColumnAggregator = this.addColumnAggregator.bind(this);
74
100
  this.pool = new ElementPool(document);
75
101
  this.columnFactory = new ColumnDefinitionFactory(this.pool);
76
102
  }
77
103
  componentWillLoad() {
78
104
  this.firstRequest = this.mode === 'remote';
105
+ if (this.selectable) {
106
+ this.tableSelection = new TableSelection(() => this.tabulator, this.pool, this.select);
107
+ this.tableSelection.setSelection(this.selection);
108
+ }
79
109
  }
80
110
  componentDidLoad() {
81
111
  this.init();
@@ -102,7 +132,7 @@ export class Table {
102
132
  if (!this.tabulator) {
103
133
  return;
104
134
  }
105
- this.tabulator.getRows().forEach(this.formatRow);
135
+ this.formatRows();
106
136
  }
107
137
  updateData(newData = [], oldData = []) {
108
138
  if (isEqual(newData, oldData)) {
@@ -114,6 +144,7 @@ export class Table {
114
144
  return;
115
145
  }
116
146
  this.tabulator.replaceData(this.data);
147
+ this.setSelection();
117
148
  });
118
149
  }
119
150
  updateColumns(newColumns, oldColumns) {
@@ -123,20 +154,46 @@ export class Table {
123
154
  if (this.areSameColumns(newColumns, oldColumns)) {
124
155
  return;
125
156
  }
126
- const existingColumns = this.tabulator
157
+ const columnsInTable = this.tabulator
127
158
  .getColumns()
128
- .map(this.findColumn);
129
- if (this.areSameColumns(newColumns, existingColumns)) {
159
+ .filter((c) => c.getField());
160
+ const oldColumnsInTable = columnsInTable.map((c) => oldColumns.find((old) => old.field === c.getField()));
161
+ if (this.areSameColumns(newColumns, oldColumnsInTable)) {
130
162
  return;
131
163
  }
132
164
  // Updating columns requires a reinitialization otherwise sorting will not work
133
165
  // afterwards
134
166
  this.init();
135
167
  }
168
+ updateAggregates(newAggregates, oldAggregates) {
169
+ if (!this.tabulator) {
170
+ return;
171
+ }
172
+ if (isEqual(newAggregates, oldAggregates)) {
173
+ return;
174
+ }
175
+ if (!this.haveSameAggregateFields(newAggregates, oldAggregates)) {
176
+ this.init();
177
+ return;
178
+ }
179
+ this.tabulator.recalc();
180
+ this.tabulator.rowManager.redraw();
181
+ }
182
+ updateSelection(newSelection) {
183
+ if (!this.tableSelection) {
184
+ return;
185
+ }
186
+ this.tableSelection.setSelection(newSelection);
187
+ }
136
188
  areSameColumns(newColumns, oldColumns) {
137
189
  return (newColumns.length === oldColumns.length &&
138
190
  newColumns.every((column) => oldColumns.includes(column)));
139
191
  }
192
+ haveSameAggregateFields(newAggregates, oldAggregates) {
193
+ const oldAggregateFields = (oldAggregates === null || oldAggregates === void 0 ? void 0 : oldAggregates.map((a) => a.field)) || [];
194
+ return ((newAggregates === null || newAggregates === void 0 ? void 0 : newAggregates.length) === (oldAggregates === null || oldAggregates === void 0 ? void 0 : oldAggregates.length) &&
195
+ !!(newAggregates === null || newAggregates === void 0 ? void 0 : newAggregates.every((a) => oldAggregateFields.includes(a.field))));
196
+ }
140
197
  init() {
141
198
  if (this.tabulator) {
142
199
  this.pool.releaseAll();
@@ -163,14 +220,22 @@ export class Table {
163
220
  // matter if its rendered or not.
164
221
  if (!('ResizeObserver' in window)) {
165
222
  this.tabulator = new TabulatorTable(table, options);
223
+ this.setSelection();
166
224
  return;
167
225
  }
168
226
  const observer = new ResizeObserver(() => {
169
227
  this.tabulator = new TabulatorTable(table, options);
228
+ this.setSelection();
170
229
  observer.unobserve(table);
171
230
  });
172
231
  observer.observe(table);
173
232
  }
233
+ setSelection() {
234
+ if (!(this.tabulator && this.tableSelection)) {
235
+ return;
236
+ }
237
+ this.tableSelection.setSelection(this.selection);
238
+ }
174
239
  updateMaxPage() {
175
240
  var _a;
176
241
  (_a = this.tabulator) === null || _a === void 0 ? void 0 : _a.setMaxPage(this.calculatePageCount());
@@ -192,7 +257,38 @@ export class Table {
192
257
  });
193
258
  }
194
259
  getColumnDefinitions() {
195
- return this.columns.map(this.columnFactory.create);
260
+ const columnDefinitions = this.columns
261
+ .map(this.addColumnAggregator)
262
+ .map(this.columnFactory.create);
263
+ if (this.tableSelection) {
264
+ return this.tableSelection.getColumnDefinitions(columnDefinitions);
265
+ }
266
+ return columnDefinitions;
267
+ }
268
+ addColumnAggregator(column) {
269
+ var _a;
270
+ if (!((_a = this.aggregates) === null || _a === void 0 ? void 0 : _a.length) || column.aggregator) {
271
+ return column;
272
+ }
273
+ const aggregate = this.aggregates.find((a) => a.field === column.field);
274
+ if (aggregate) {
275
+ column.aggregator = (col,
276
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
277
+ _values,
278
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
279
+ _data) => {
280
+ var _a;
281
+ if (!col) {
282
+ return undefined;
283
+ }
284
+ const value = (_a = this.aggregates.find((a) => a.field === col.field)) === null || _a === void 0 ? void 0 : _a.value;
285
+ if (col.formatter) {
286
+ return col.formatter(value);
287
+ }
288
+ return value;
289
+ };
290
+ }
291
+ return column;
196
292
  }
197
293
  getAjaxOptions() {
198
294
  if (!this.isRemoteMode()) {
@@ -291,7 +387,11 @@ export class Table {
291
387
  }
292
388
  this.changePage.emit(page);
293
389
  }
294
- onClickRow(_, row) {
390
+ onClickRow(_ev, row) {
391
+ if (typeof row.getPosition === 'undefined') {
392
+ // Not a data row, probably a CalcComponent
393
+ return;
394
+ }
295
395
  if (this.activeRow === row.getData()) {
296
396
  this.activeRow = null;
297
397
  }
@@ -300,6 +400,9 @@ export class Table {
300
400
  }
301
401
  this.activate.emit(this.activeRow);
302
402
  }
403
+ formatRows() {
404
+ this.tabulator.getRows().forEach(this.formatRow);
405
+ }
303
406
  formatRow(row) {
304
407
  if (this.activeRow === row.getData()) {
305
408
  row.getElement().classList.add('active');
@@ -319,16 +422,30 @@ export class Table {
319
422
  return columns.some((column) => has(column, 'aggregator'));
320
423
  }
321
424
  render() {
425
+ var _a;
322
426
  return (h("div", { id: "tabulator-container" },
323
427
  h("div", { id: "tabulator-loader", style: { display: this.loading ? 'flex' : 'none' } },
324
428
  h("limel-spinner", { size: "large" })),
325
429
  this.renderEmptyMessage(),
430
+ this.renderSelectAll(),
326
431
  h("div", { id: "tabulator-table", class: {
327
432
  'has-pagination': this.totalRows > this.pageSize,
328
433
  'has-aggregation': this.hasAggregation(this.columns),
329
434
  'has-movable-columns': this.movableColumns,
435
+ 'has-rowselector': this.selectable,
436
+ 'has-selection': (_a = this.tableSelection) === null || _a === void 0 ? void 0 : _a.hasSelection,
330
437
  } })));
331
438
  }
439
+ renderSelectAll() {
440
+ var _a, _b, _c;
441
+ if (!this.selectable) {
442
+ return;
443
+ }
444
+ const showSelectAll = !this.loading && this.tableSelection;
445
+ return (h("div", { class: "select-all", style: { display: showSelectAll ? 'inline-block' : 'none' } },
446
+ h("limel-checkbox", { onChange: this.selectAllOnChange, checked: (_a = this.tableSelection) === null || _a === void 0 ? void 0 : _a.hasSelection, indeterminate: ((_b = this.tableSelection) === null || _b === void 0 ? void 0 : _b.hasSelection) &&
447
+ ((_c = this.selection) === null || _c === void 0 ? void 0 : _c.length) < this.data.length })));
448
+ }
332
449
  renderEmptyMessage() {
333
450
  const showEmptyMessage = !this.loading && !this.data.length && this.emptyMessage;
334
451
  return (h("div", { id: "tabulator-empty-text", style: { display: showEmptyMessage ? 'flex' : 'none' } },
@@ -537,6 +654,58 @@ export class Table {
537
654
  },
538
655
  "attribute": "empty-message",
539
656
  "reflect": false
657
+ },
658
+ "aggregates": {
659
+ "type": "unknown",
660
+ "mutable": false,
661
+ "complexType": {
662
+ "original": "ColumnAggregate[]",
663
+ "resolved": "ColumnAggregate[]",
664
+ "references": {
665
+ "ColumnAggregate": {
666
+ "location": "import",
667
+ "path": "./table.types"
668
+ }
669
+ }
670
+ },
671
+ "required": false,
672
+ "optional": false,
673
+ "docs": {
674
+ "tags": [],
675
+ "text": "Column aggregates to be displayed in the table"
676
+ }
677
+ },
678
+ "selectable": {
679
+ "type": "boolean",
680
+ "mutable": false,
681
+ "complexType": {
682
+ "original": "boolean",
683
+ "resolved": "boolean",
684
+ "references": {}
685
+ },
686
+ "required": false,
687
+ "optional": false,
688
+ "docs": {
689
+ "tags": [],
690
+ "text": "Enables row selection"
691
+ },
692
+ "attribute": "selectable",
693
+ "reflect": false
694
+ },
695
+ "selection": {
696
+ "type": "unknown",
697
+ "mutable": false,
698
+ "complexType": {
699
+ "original": "object[]",
700
+ "resolved": "object[]",
701
+ "references": {}
702
+ },
703
+ "required": false,
704
+ "optional": false,
705
+ "docs": {
706
+ "tags": [],
707
+ "text": "Selected data. Requires `selectable` to be true."
708
+ }
540
709
  }
541
710
  }; }
542
711
  static get events() { return [{
@@ -629,6 +798,36 @@ export class Table {
629
798
  }
630
799
  }
631
800
  }
801
+ }, {
802
+ "method": "select",
803
+ "name": "select",
804
+ "bubbles": true,
805
+ "cancelable": true,
806
+ "composed": true,
807
+ "docs": {
808
+ "tags": [],
809
+ "text": "Emitted when the row selection has been changed"
810
+ },
811
+ "complexType": {
812
+ "original": "object[]",
813
+ "resolved": "object[]",
814
+ "references": {}
815
+ }
816
+ }, {
817
+ "method": "selectAll",
818
+ "name": "selectAll",
819
+ "bubbles": true,
820
+ "cancelable": true,
821
+ "composed": true,
822
+ "docs": {
823
+ "tags": [],
824
+ "text": "Emitted when the select all rows state is toggled"
825
+ },
826
+ "complexType": {
827
+ "original": "boolean",
828
+ "resolved": "boolean",
829
+ "references": {}
830
+ }
632
831
  }]; }
633
832
  static get elementRef() { return "host"; }
634
833
  static get watchers() { return [{
@@ -649,5 +848,11 @@ export class Table {
649
848
  }, {
650
849
  "propName": "columns",
651
850
  "methodName": "updateColumns"
851
+ }, {
852
+ "propName": "aggregates",
853
+ "methodName": "updateAggregates"
854
+ }, {
855
+ "propName": "selection",
856
+ "methodName": "updateSelection"
652
857
  }]; }
653
858
  }
@@ -10,37 +10,36 @@
10
10
  @use '../brand-colors';
11
11
  @use '../_theme-color-variables';
12
12
 
13
- @use '@material/theme' with
14
- (
15
- $primary: brand-colors.$lime-turquoise,
16
- $secondary: brand-colors.$lime-dark-grey,
17
- $background: #fff,
18
- $surface: #fff,
19
- $error: #b00020,
20
- $on-primary: #fff,
21
- $on-secondary: #fff,
22
- $on-surface: #000,
23
- $on-error: #fff,
24
- // $text-disabled-on-background: rgba(0, 0, 0, 0.38),
25
- // $text-hint-on-light: rgba(0, 0, 0, 0.38),
26
- // $text-primary-on-background: rgba(0, 0, 0, 0.87),
27
- // $text-secondary-on-background: rgba(0, 0, 0, 0.54),
28
- //
29
- // The following variables are also available to be set if needed
30
- // (note by Ads: they probably aren't available in MDC v11)
31
- //
32
- // $text-hint-on-background: rgba(0, 0, 0, 0.38),
33
- // $text-icon-on-background: rgba(0, 0, 0, 0.38),
34
- // $text-primary-on-light: rgba(0, 0, 0, 0.87),
35
- // $text-secondary-on-light: rgba(0, 0, 0, 0.54),
36
- // $text-disabled-on-light: rgba(0, 0, 0, 0.38),
37
- // $text-icon-on-light: rgba(0, 0, 0, 0.38),
38
- // $text-primary-on-dark: white,
39
- // $text-secondary-on-dark: rgba(255, 255, 255, 0.7),
40
- // $text-hint-on-dark: rgba(255, 255, 255, 0.5),
41
- // $text-disabled-on-dark: rgba(255, 255, 255, 0.5),
42
- // $text-icon-on-dark: rgba(255, 255, 255, 0.5),
43
- );
13
+ @use '@material/theme' with (
14
+ $primary: brand-colors.$lime-turquoise,
15
+ $secondary: brand-colors.$lime-dark-grey,
16
+ $background: #fff,
17
+ $surface: #fff,
18
+ $error: #b00020,
19
+ $on-primary: #fff,
20
+ $on-secondary: #fff,
21
+ $on-surface: #000,
22
+ $on-error: #fff,
23
+ // $text-disabled-on-background: rgba(0, 0, 0, 0.38),
24
+ // $text-hint-on-light: rgba(0, 0, 0, 0.38),
25
+ // $text-primary-on-background: rgba(0, 0, 0, 0.87),
26
+ // $text-secondary-on-background: rgba(0, 0, 0, 0.54),
27
+ //
28
+ // The following variables are also available to be set if needed
29
+ // (note by Ads: they probably aren't available in MDC v11)
30
+ //
31
+ // $text-hint-on-background: rgba(0, 0, 0, 0.38),
32
+ // $text-icon-on-background: rgba(0, 0, 0, 0.38),
33
+ // $text-primary-on-light: rgba(0, 0, 0, 0.87),
34
+ // $text-secondary-on-light: rgba(0, 0, 0, 0.54),
35
+ // $text-disabled-on-light: rgba(0, 0, 0, 0.38),
36
+ // $text-icon-on-light: rgba(0, 0, 0, 0.38),
37
+ // $text-primary-on-dark: white,
38
+ // $text-secondary-on-dark: rgba(255, 255, 255, 0.7),
39
+ // $text-hint-on-dark: rgba(255, 255, 255, 0.5),
40
+ // $text-disabled-on-dark: rgba(255, 255, 255, 0.5),
41
+ // $text-icon-on-dark: rgba(255, 255, 255, 0.5),
42
+ );
44
43
  @forward '@material/theme';
45
44
 
46
45
  @use './lime-typography';
@@ -9,60 +9,59 @@
9
9
 
10
10
  @use '../functions';
11
11
 
12
- @use '@material/typography' with
13
- (
14
- $styles-headline1: (
15
- font-size: functions.pxToRem(22),
16
- line-height: functions.pxToRem(22),
17
- ),
18
- $styles-headline2: (
19
- font-size: functions.pxToRem(16),
20
- line-height: functions.pxToRem(14),
21
- ),
22
- $styles-headline3: (
23
- font-size: functions.pxToRem(16),
24
- line-height: functions.pxToRem(14),
25
- ),
26
- $styles-headline4: (
27
- font-size: functions.pxToRem(16),
28
- line-height: functions.pxToRem(14),
29
- ),
30
- $styles-headline5: (
31
- font-size: functions.pxToRem(14),
32
- line-height: functions.pxToRem(14),
33
- ),
34
- $styles-headline6: (
35
- font-size: functions.pxToRem(14),
36
- line-height: functions.pxToRem(14),
37
- ),
38
- $styles-subtitle1: (
39
- font-size: functions.pxToRem(14),
40
- line-height: functions.pxToRem(18),
41
- ),
42
- $styles-subtitle2: (
43
- font-size: functions.pxToRem(13),
44
- line-height: functions.pxToRem(18),
45
- ),
46
- $styles-body1: (
47
- font-size: functions.pxToRem(13),
48
- line-height: functions.pxToRem(24),
49
- ),
50
- $styles-body2: (
51
- font-size: functions.pxToRem(13),
52
- line-height: functions.pxToRem(26),
53
- ),
54
- $styles-caption: (
55
- font-size: functions.pxToRem(11),
56
- line-height: functions.pxToRem(14),
57
- ),
58
- $styles-button: (
59
- font-size: functions.pxToRem(14),
60
- line-height: functions.pxToRem(36),
61
- text-transform: none,
62
- ),
63
- $styles-overline: (
64
- font-size: functions.pxToRem(11),
65
- line-height: functions.pxToRem(14),
66
- )
67
- );
12
+ @use '@material/typography' with (
13
+ $styles-headline1: (
14
+ font-size: functions.pxToRem(22),
15
+ line-height: functions.pxToRem(22),
16
+ ),
17
+ $styles-headline2: (
18
+ font-size: functions.pxToRem(16),
19
+ line-height: functions.pxToRem(14),
20
+ ),
21
+ $styles-headline3: (
22
+ font-size: functions.pxToRem(16),
23
+ line-height: functions.pxToRem(14),
24
+ ),
25
+ $styles-headline4: (
26
+ font-size: functions.pxToRem(16),
27
+ line-height: functions.pxToRem(14),
28
+ ),
29
+ $styles-headline5: (
30
+ font-size: functions.pxToRem(14),
31
+ line-height: functions.pxToRem(14),
32
+ ),
33
+ $styles-headline6: (
34
+ font-size: functions.pxToRem(14),
35
+ line-height: functions.pxToRem(14),
36
+ ),
37
+ $styles-subtitle1: (
38
+ font-size: functions.pxToRem(14),
39
+ line-height: functions.pxToRem(18),
40
+ ),
41
+ $styles-subtitle2: (
42
+ font-size: functions.pxToRem(13),
43
+ line-height: functions.pxToRem(18),
44
+ ),
45
+ $styles-body1: (
46
+ font-size: functions.pxToRem(13),
47
+ line-height: functions.pxToRem(24),
48
+ ),
49
+ $styles-body2: (
50
+ font-size: functions.pxToRem(13),
51
+ line-height: functions.pxToRem(26),
52
+ ),
53
+ $styles-caption: (
54
+ font-size: functions.pxToRem(11),
55
+ line-height: functions.pxToRem(14),
56
+ ),
57
+ $styles-button: (
58
+ font-size: functions.pxToRem(14),
59
+ line-height: functions.pxToRem(36),
60
+ text-transform: none,
61
+ ),
62
+ $styles-overline: (
63
+ font-size: functions.pxToRem(11),
64
+ line-height: functions.pxToRem(14),
65
+ )
66
+ );
68
67
  @forward '@material/typography';
@@ -54,6 +54,7 @@ $cropped-label-hack--font-size: 0.875rem; //14px
54
54
  -moz-osx-font-smoothing: grayscale;
55
55
  -webkit-font-smoothing: antialiased;
56
56
 
57
+ color: $input-text-color;
57
58
  font-size: functions.pxToRem(14);
58
59
  font-weight: 400;
59
60
  letter-spacing: 0.009375em;
@@ -9,7 +9,8 @@ $input-field--mdc-text-field__input--readonly: 1 !default;
9
9
  $list--has-interactive-items--mdc-list-item--hover: 1 !default;
10
10
  $list-static-actions-list: 1 !default;
11
11
  $tab-bar--active-tab: 2 !default;
12
- $table--has-interactive-rows--selectable-row--hover: 1 !default;
12
+ $table--has-interactive-rows--selectable-row--hover: 2 !default;
13
+ $table--limel-table--row-selector: 1 !default;
13
14
  $popover-before: -1 !default;
14
15
  $button-group-radio-button-keyboard-focused: 1 !default;
15
16
  $list-mdc-list-item: 0 !default;
@@ -0,0 +1,39 @@
1
+ import { h } from './index-2316f345.js';
2
+
3
+ const CheckboxTemplate = (props) => {
4
+ const inputProps = {};
5
+ if (props.indeterminate) {
6
+ inputProps['data-indeterminate'] = 'true';
7
+ }
8
+ return [
9
+ h("div", { class: "mdc-form-field " },
10
+ h("div", { class: {
11
+ 'mdc-checkbox': true,
12
+ 'mdc-checkbox--invalid': props.invalid,
13
+ 'mdc-checkbox--disabled': props.disabled,
14
+ 'mdc-checkbox--required': props.required,
15
+ 'mdc-checkbox--indeterminate': props.indeterminate,
16
+ } },
17
+ h("input", Object.assign({ type: "checkbox", class: "mdc-checkbox__native-control", id: props.id, checked: props.checked, disabled: props.disabled, required: props.required, onChange: props.onChange }, inputProps)),
18
+ h("div", { class: "mdc-checkbox__background" },
19
+ h("svg", { class: "mdc-checkbox__checkmark", viewBox: "0 0 24 24" },
20
+ h("path", { class: "mdc-checkbox__checkmark-path", fill: "none", d: "M1.73,12.91 8.1,19.28 22.79,4.59" })),
21
+ h("div", { class: "mdc-checkbox__mixedmark" }))),
22
+ h("label", { class: {
23
+ 'mdc-checkbox--invalid': props.invalid,
24
+ 'mdc-checkbox--disabled': props.disabled,
25
+ 'mdc-checkbox--required': props.required,
26
+ 'mdc-checkbox--indeterminate': props.indeterminate,
27
+ }, htmlFor: props.id }, props.label)),
28
+ h(HelperText, { text: props.helperText }),
29
+ ];
30
+ };
31
+ const HelperText = (props) => {
32
+ if (typeof props.text !== 'string') {
33
+ return;
34
+ }
35
+ return (h("div", { class: "limel-checkbox-helper-line" },
36
+ h("p", { class: "limel-checkbox-helper-text", "aria-hidden": "true" }, props.text.trim())));
37
+ };
38
+
39
+ export { CheckboxTemplate as C };
@@ -1,7 +1,7 @@
1
1
  import { M as MDCFoundation, a as MDCComponent } from './component-d682c974.js';
2
2
  import { m as matches, c as closest } from './ponyfill-30263d5e.js';
3
3
  import { n as normalizeKey } from './keyboard-4b9e12e3.js';
4
- import { a as getCorrectPropertyName } from './util-71a23335.js';
4
+ import { g as getCorrectPropertyName } from './util-f1bde91c.js';
5
5
 
6
6
  /**
7
7
  * @license