@limetech/lime-elements 35.0.0-next.2 → 35.0.0-next.23

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 (231) hide show
  1. package/dist/cjs/checkbox.template-7f83d0b4.js +41 -0
  2. package/dist/cjs/{component-f7ef9087.js → component-66df95e7.js} +190 -132
  3. package/dist/cjs/{component-f532119f.js → component-67144c1c.js} +47 -3
  4. package/dist/cjs/{component-ed21410d.js → component-ae3bfacf.js} +367 -235
  5. package/dist/cjs/{component-2faaa141.js → component-cf490570.js} +213 -143
  6. package/dist/cjs/{component-10dbdd60.js → component-dd795ff0.js} +7 -5
  7. package/dist/cjs/{index-e63a89d7.js → index-43283636.js} +23 -0
  8. package/dist/cjs/lime-elements.cjs.js +3 -3
  9. package/dist/cjs/limel-badge.cjs.entry.js +3 -3
  10. package/dist/cjs/limel-banner.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-button-group.cjs.entry.js +2 -2
  12. package/dist/cjs/limel-button.cjs.entry.js +2 -2
  13. package/dist/cjs/limel-checkbox.cjs.entry.js +131 -86
  14. package/dist/cjs/limel-chip-set.cjs.entry.js +234 -190
  15. package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
  16. package/dist/cjs/limel-code-editor.cjs.entry.js +49 -22
  17. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  18. package/dist/cjs/limel-color-picker-palette_2.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-color-picker.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-config.cjs.entry.js +1 -1
  21. package/dist/cjs/limel-date-picker.cjs.entry.js +5 -5
  22. package/dist/cjs/limel-dialog.cjs.entry.js +8 -9
  23. package/dist/cjs/limel-file.cjs.entry.js +5 -5
  24. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  25. package/dist/cjs/limel-flex-container.cjs.entry.js +5 -1
  26. package/dist/cjs/limel-form.cjs.entry.js +7547 -8994
  27. package/dist/cjs/limel-grid.cjs.entry.js +1 -1
  28. package/dist/cjs/limel-header.cjs.entry.js +1 -1
  29. package/dist/cjs/limel-icon-button.cjs.entry.js +5 -5
  30. package/dist/cjs/limel-icon.cjs.entry.js +1 -1
  31. package/dist/cjs/limel-input-field.cjs.entry.js +6 -6
  32. package/dist/cjs/limel-linear-progress.cjs.entry.js +3 -3
  33. package/dist/cjs/limel-list_3.cjs.entry.js +146 -84
  34. package/dist/cjs/limel-menu-list.cjs.entry.js +85 -69
  35. package/dist/cjs/limel-menu.cjs.entry.js +1 -1
  36. package/dist/cjs/limel-picker.cjs.entry.js +2 -2
  37. package/dist/cjs/limel-popover-surface.cjs.entry.js +2 -2
  38. package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
  39. package/dist/cjs/limel-progress-flow.cjs.entry.js +1 -1
  40. package/dist/cjs/limel-select.cjs.entry.js +5 -5
  41. package/dist/cjs/limel-slider.cjs.entry.js +33 -6
  42. package/dist/cjs/limel-snackbar.cjs.entry.js +78 -72
  43. package/dist/cjs/limel-spinner.cjs.entry.js +1 -1
  44. package/dist/cjs/limel-switch.cjs.entry.js +497 -201
  45. package/dist/cjs/limel-tab-bar.cjs.entry.js +262 -185
  46. package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
  47. package/dist/cjs/limel-table.cjs.entry.js +363 -11
  48. package/dist/cjs/limel-tooltip_2.cjs.entry.js +1 -1
  49. package/dist/cjs/loader.cjs.js +3 -3
  50. package/dist/collection/collection-manifest.json +2 -2
  51. package/dist/collection/components/badge/badge.css +9 -15
  52. package/dist/collection/components/badge/badge.js +2 -2
  53. package/dist/collection/components/button/button.css +333 -145
  54. package/dist/collection/components/button-group/button-group.css +30 -5
  55. package/dist/collection/components/checkbox/checkbox.css +46 -16
  56. package/dist/collection/components/checkbox/checkbox.template.js +22 -20
  57. package/dist/collection/components/chip-set/chip-set.css +367 -34
  58. package/dist/collection/components/circular-progress/circular-progress.css +2 -2
  59. package/dist/collection/components/code-editor/code-editor.css +8 -13
  60. package/dist/collection/components/dialog/dialog.css +153 -109
  61. package/dist/collection/components/flex-container/flex-container.js +10 -0
  62. package/dist/collection/components/form/form.css +5 -1
  63. package/dist/collection/components/form/templates/common.js +4 -1
  64. package/dist/collection/components/icon-button/icon-button.css +116 -59
  65. package/dist/collection/components/icon-button/icon-button.js +1 -0
  66. package/dist/collection/components/input-field/input-field.css +351 -29
  67. package/dist/collection/components/linear-progress/linear-progress.css +14 -2
  68. package/dist/collection/components/list/list.css +912 -89
  69. package/dist/collection/components/list/list.js +13 -6
  70. package/dist/collection/components/menu-list/menu-list.css +912 -89
  71. package/dist/collection/components/menu-surface/menu-surface.css +31 -7
  72. package/dist/collection/components/picker/picker.js +1 -1
  73. package/dist/collection/components/popover-surface/popover-surface.css +1 -0
  74. package/dist/collection/components/select/select.css +430 -20
  75. package/dist/collection/components/select/select.template.js +1 -1
  76. package/dist/collection/components/slider/slider.css +54 -2
  77. package/dist/collection/components/snackbar/snackbar.css +588 -301
  78. package/dist/collection/components/switch/switch.css +592 -222
  79. package/dist/collection/components/switch/switch.js +18 -12
  80. package/dist/collection/components/tab-bar/tab-bar.css +77 -48
  81. package/dist/collection/components/table/columns.js +1 -1
  82. package/dist/collection/components/table/selection.js +111 -0
  83. package/dist/collection/components/table/table-selection.js +125 -0
  84. package/dist/collection/components/table/table.css +134 -38
  85. package/dist/collection/components/table/table.js +212 -7
  86. package/dist/collection/style/functions.scss +3 -1
  87. package/dist/collection/style/internal/lime-theme.scss +30 -31
  88. package/dist/collection/style/internal/lime-typography.scss +55 -56
  89. package/dist/collection/style/internal/shared_input-select-picker.scss +1 -0
  90. package/dist/collection/style/internal/z-index.scss +2 -1
  91. package/dist/esm/checkbox.template-f429c5b6.js +39 -0
  92. package/dist/esm/{component-89e0ce26.js → component-19eb6e2b.js} +7 -5
  93. package/dist/esm/{component-2630c3d7.js → component-288691f3.js} +367 -235
  94. package/dist/esm/{component-d682c974.js → component-410aad5a.js} +44 -4
  95. package/dist/esm/{component-429e92ee.js → component-5b4ac85a.js} +213 -143
  96. package/dist/esm/{component-2eb4e07b.js → component-fffa3419.js} +191 -133
  97. package/dist/esm/{index-2316f345.js → index-4456d4ad.js} +23 -0
  98. package/dist/esm/lime-elements.js +3 -3
  99. package/dist/esm/limel-badge.entry.js +3 -3
  100. package/dist/esm/limel-banner.entry.js +1 -1
  101. package/dist/esm/limel-button-group.entry.js +2 -2
  102. package/dist/esm/limel-button.entry.js +2 -2
  103. package/dist/esm/limel-checkbox.entry.js +132 -87
  104. package/dist/esm/limel-chip-set.entry.js +234 -190
  105. package/dist/esm/limel-circular-progress.entry.js +2 -2
  106. package/dist/esm/limel-code-editor.entry.js +49 -22
  107. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  108. package/dist/esm/limel-color-picker-palette_2.entry.js +1 -1
  109. package/dist/esm/limel-color-picker.entry.js +1 -1
  110. package/dist/esm/limel-config.entry.js +1 -1
  111. package/dist/esm/limel-date-picker.entry.js +5 -5
  112. package/dist/esm/limel-dialog.entry.js +8 -9
  113. package/dist/esm/limel-file.entry.js +5 -5
  114. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  115. package/dist/esm/limel-flex-container.entry.js +5 -1
  116. package/dist/esm/limel-form.entry.js +7550 -8997
  117. package/dist/esm/limel-grid.entry.js +1 -1
  118. package/dist/esm/limel-header.entry.js +1 -1
  119. package/dist/esm/limel-icon-button.entry.js +5 -5
  120. package/dist/esm/limel-icon.entry.js +1 -1
  121. package/dist/esm/limel-input-field.entry.js +6 -6
  122. package/dist/esm/limel-linear-progress.entry.js +4 -4
  123. package/dist/esm/limel-list_3.entry.js +147 -85
  124. package/dist/esm/limel-menu-list.entry.js +86 -70
  125. package/dist/esm/limel-menu.entry.js +1 -1
  126. package/dist/esm/limel-picker.entry.js +2 -2
  127. package/dist/esm/limel-popover-surface.entry.js +2 -2
  128. package/dist/esm/limel-progress-flow-item.entry.js +1 -1
  129. package/dist/esm/limel-progress-flow.entry.js +1 -1
  130. package/dist/esm/limel-select.entry.js +5 -5
  131. package/dist/esm/limel-slider.entry.js +34 -7
  132. package/dist/esm/limel-snackbar.entry.js +78 -72
  133. package/dist/esm/limel-spinner.entry.js +1 -1
  134. package/dist/esm/limel-switch.entry.js +497 -201
  135. package/dist/esm/limel-tab-bar.entry.js +262 -185
  136. package/dist/esm/limel-tab-panel.entry.js +1 -1
  137. package/dist/esm/limel-table.entry.js +363 -11
  138. package/dist/esm/limel-tooltip_2.entry.js +1 -1
  139. package/dist/esm/loader.js +3 -3
  140. package/dist/esm/polyfills/css-shim.js +1 -1
  141. package/dist/esm/{util-71a23335.js → util-f1bde91c.js} +1 -1
  142. package/dist/lime-elements/lime-elements.esm.js +1 -1
  143. package/dist/lime-elements/{p-a4c532a7.entry.js → p-00d485d8.entry.js} +1 -1
  144. package/dist/lime-elements/p-062a9599.entry.js +131 -0
  145. package/dist/lime-elements/{p-597cbe05.entry.js → p-0ea1cbf6.entry.js} +1 -1
  146. package/dist/lime-elements/p-1c284626.js +73 -0
  147. package/dist/lime-elements/{p-a2cf74c1.entry.js → p-255084bd.entry.js} +1 -1
  148. package/dist/lime-elements/{p-e881e98d.entry.js → p-2550ff27.entry.js} +1 -1
  149. package/dist/lime-elements/{p-13f0e4f4.entry.js → p-2a1d6f3d.entry.js} +1 -1
  150. package/dist/lime-elements/{p-31fecf5d.entry.js → p-3bef288b.entry.js} +1 -1
  151. package/dist/lime-elements/{p-58cbe99d.entry.js → p-3f440859.entry.js} +1 -1
  152. package/dist/lime-elements/p-3f5ba6f4.entry.js +1 -0
  153. package/dist/lime-elements/{p-4b5af81b.entry.js → p-41ec08c9.entry.js} +1 -1
  154. package/dist/lime-elements/{p-92146da6.js → p-44f9b6d5.js} +0 -0
  155. package/dist/lime-elements/{p-1fb5340d.entry.js → p-45689f25.entry.js} +1 -1
  156. package/dist/lime-elements/p-47ef0ebb.entry.js +1 -0
  157. package/dist/lime-elements/{p-076bd4dc.js → p-48d4ef20.js} +3 -3
  158. package/dist/lime-elements/p-4e9869f4.entry.js +126 -0
  159. package/dist/lime-elements/{p-6003f817.entry.js → p-549190f6.entry.js} +1 -1
  160. package/dist/lime-elements/p-555f774c.entry.js +82 -0
  161. package/dist/lime-elements/p-63516991.entry.js +1 -0
  162. package/dist/lime-elements/p-68c4e708.entry.js +16 -0
  163. package/dist/lime-elements/p-6acee2e5.entry.js +73 -0
  164. package/dist/lime-elements/p-6fc9a0be.entry.js +59 -0
  165. package/dist/lime-elements/{p-64549ba6.entry.js → p-70a4d004.entry.js} +3 -3
  166. package/dist/lime-elements/{p-468e940e.entry.js → p-75846313.entry.js} +1 -1
  167. package/dist/lime-elements/p-779d1567.entry.js +1 -0
  168. package/dist/lime-elements/p-7d4eb67f.entry.js +1 -0
  169. package/dist/lime-elements/{p-714fde78.entry.js → p-897a7f8a.entry.js} +1 -1
  170. package/dist/lime-elements/{p-fc30b8e3.entry.js → p-8a5ca741.entry.js} +1 -1
  171. package/dist/lime-elements/{p-8a2c1038.entry.js → p-9607b6f9.entry.js} +2 -2
  172. package/dist/lime-elements/p-9caf28bd.entry.js +1 -0
  173. package/dist/lime-elements/{p-152a6d5f.js → p-9faad6eb.js} +1 -1
  174. package/dist/lime-elements/{p-34c7872e.entry.js → p-a35e6b8a.entry.js} +1 -1
  175. package/dist/lime-elements/{p-041ae00c.entry.js → p-b808ba3d.entry.js} +1 -1
  176. package/dist/lime-elements/p-be2bd743.js +1 -0
  177. package/dist/lime-elements/p-be351178.entry.js +37 -0
  178. package/dist/lime-elements/p-c40f5030.entry.js +82 -0
  179. package/dist/lime-elements/p-c4e2eb42.entry.js +1 -0
  180. package/dist/lime-elements/{p-1876a96a.entry.js → p-c5168bda.entry.js} +1 -1
  181. package/dist/lime-elements/p-cbc43682.js +81 -0
  182. package/dist/lime-elements/{p-ace9affc.js → p-d0a7de87.js} +2 -2
  183. package/dist/lime-elements/{p-be56ffab.entry.js → p-d5f17adb.entry.js} +1 -1
  184. package/dist/lime-elements/p-d70f1c00.entry.js +59 -0
  185. package/dist/lime-elements/p-dbd61714.entry.js +1 -0
  186. package/dist/lime-elements/{p-8ad5e143.entry.js → p-dd62c71b.entry.js} +1 -1
  187. package/dist/lime-elements/p-dfba92de.js +126 -0
  188. package/dist/lime-elements/p-e55144ec.entry.js +1 -0
  189. package/dist/lime-elements/{p-dfe0a58b.entry.js → p-e6f39a71.entry.js} +1 -1
  190. package/dist/lime-elements/p-f777d8a3.entry.js +82 -0
  191. package/dist/lime-elements/style/functions.scss +3 -1
  192. package/dist/lime-elements/style/internal/lime-theme.scss +30 -31
  193. package/dist/lime-elements/style/internal/lime-typography.scss +55 -56
  194. package/dist/lime-elements/style/internal/shared_input-select-picker.scss +1 -0
  195. package/dist/lime-elements/style/internal/z-index.scss +2 -1
  196. package/dist/types/components/badge/badge.d.ts +1 -1
  197. package/dist/types/components/flex-container/flex-container.d.ts +7 -0
  198. package/dist/types/components/switch/switch.d.ts +2 -2
  199. package/dist/types/components/table/columns.d.ts +7 -0
  200. package/dist/types/components/table/selection.d.ts +79 -0
  201. package/dist/types/components/table/table-selection.d.ts +57 -0
  202. package/dist/types/components/table/table.d.ts +39 -7
  203. package/dist/types/components/table/table.types.d.ts +13 -0
  204. package/dist/types/components.d.ts +33 -1
  205. package/dist/types/stencil-public-runtime.d.ts +6 -4
  206. package/package.json +20 -20
  207. package/dist/cjs/checkbox.template-50eb8b76.js +0 -39
  208. package/dist/esm/checkbox.template-50f7c07b.js +0 -37
  209. package/dist/lime-elements/p-0ce9165f.entry.js +0 -1
  210. package/dist/lime-elements/p-0fd208f3.entry.js +0 -82
  211. package/dist/lime-elements/p-143705b1.entry.js +0 -1
  212. package/dist/lime-elements/p-250f55be.js +0 -1
  213. package/dist/lime-elements/p-31299106.js +0 -126
  214. package/dist/lime-elements/p-4932c029.entry.js +0 -1
  215. package/dist/lime-elements/p-510bb5a4.entry.js +0 -1
  216. package/dist/lime-elements/p-6215e45e.entry.js +0 -37
  217. package/dist/lime-elements/p-668795a7.js +0 -73
  218. package/dist/lime-elements/p-6cfb45a1.entry.js +0 -1
  219. package/dist/lime-elements/p-7476efe0.entry.js +0 -1
  220. package/dist/lime-elements/p-902347b9.js +0 -81
  221. package/dist/lime-elements/p-90f3e17c.entry.js +0 -37
  222. package/dist/lime-elements/p-96e44a1e.entry.js +0 -82
  223. package/dist/lime-elements/p-a77cbb08.entry.js +0 -1
  224. package/dist/lime-elements/p-b5faa40d.entry.js +0 -59
  225. package/dist/lime-elements/p-bc0dcf01.entry.js +0 -73
  226. package/dist/lime-elements/p-c35874db.entry.js +0 -1
  227. package/dist/lime-elements/p-c8c8a946.entry.js +0 -59
  228. package/dist/lime-elements/p-d2c74396.entry.js +0 -1
  229. package/dist/lime-elements/p-d48ad9f7.entry.js +0 -126
  230. package/dist/lime-elements/p-d93a3b07.entry.js +0 -16
  231. package/dist/lime-elements/p-f2c706b8.entry.js +0 -131
@@ -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;
@@ -6,5 +6,5 @@ export declare class Badge {
6
6
  * Label to display in the badge
7
7
  */
8
8
  label: number;
9
- render(): any;
9
+ render(): string;
10
10
  }
@@ -1,5 +1,11 @@
1
1
  import { FlexContainerAlign, FlexContainerDirection, FlexContainerJustify } from '@limetech/lime-elements';
2
2
  /**
3
+ * This component is deprecated and will be removed in a future version of
4
+ * Lime Elements. Please use CSS for your flexible container needs 🙂
5
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox
6
+ *
7
+ * @deprecated
8
+ * @private
3
9
  * @exampleComponent limel-example-flex-container
4
10
  * @slot - Container content
5
11
  */
@@ -20,5 +26,6 @@ export declare class FlexContainer {
20
26
  * Reverse the order of the items
21
27
  */
22
28
  reverse: boolean;
29
+ componentWillLoad(): void;
23
30
  render(): any;
24
31
  }
@@ -35,6 +35,6 @@ export declare class Switch {
35
35
  private initialize;
36
36
  disconnectedCallback(): void;
37
37
  render(): any[];
38
- protected valueWatcher(newValue: any, oldValue: any): void;
39
- private onChange;
38
+ protected valueWatcher(newValue: boolean): void;
39
+ private handleClick;
40
40
  }
@@ -45,6 +45,13 @@ export declare function formatCell(cell: Tabulator.CellComponent, column: Column
45
45
  * @returns {HTMLElement} custom component that renders a value in the table
46
46
  */
47
47
  export declare function createCustomComponent(cell: Tabulator.CellComponent, column: Column, value: string, pool: ElementPool): HTMLElement;
48
+ /**
49
+ * Set all properties for a custom element, including event listeners
50
+ *
51
+ * @param {HTMLElement} element the custom element
52
+ * @param {object} props object of properties and event listeners
53
+ */
54
+ export declare function setElementProperties(element: HTMLElement, props: object): void;
48
55
  interface TabulatorSorter extends Tabulator.Sorter {
49
56
  field: string;
50
57
  }
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Contains changes made to a selection
3
+ */
4
+ export interface SelectionChangeSet {
5
+ /**
6
+ * Tells whether the items were selected or deselected
7
+ */
8
+ selected: boolean;
9
+ /**
10
+ * Gets the affected items
11
+ */
12
+ items: any[];
13
+ /**
14
+ * Gets the indexes of the affected items
15
+ */
16
+ indexes: number[];
17
+ }
18
+ /**
19
+ * Contains a set of selected data objects with methods for adding and removing
20
+ * items to the selection by referring to them by their index/position.
21
+ * Maintains a memory of the last toggled item which can be used to select or
22
+ * deselect a range of items between the last toggled item and a given item.
23
+ */
24
+ export declare class Selection {
25
+ private getDataByIndex;
26
+ private selectedItems;
27
+ private lastToggledIndex;
28
+ /**
29
+ * Creates an instance of the Selection class.
30
+ * The provided function `getDataByIndex` is used to provide data for the
31
+ * selected items when selection is toggled by using the item index,
32
+ * which can be the row position in a table.
33
+ *
34
+ * @param {Function} getDataByIndex A function that returns the data at the given index
35
+ */
36
+ constructor(getDataByIndex: (number: any) => any);
37
+ /**
38
+ * @returns {number} The size of the selection
39
+ */
40
+ get size(): number;
41
+ /**
42
+ * @returns {any[]} The selected items
43
+ */
44
+ get items(): any[];
45
+ /**
46
+ * @param {any[]} items The selected items
47
+ */
48
+ set items(items: any[]);
49
+ /**
50
+ * Checks whether the given item exist in the selection
51
+ *
52
+ * @param {any} data The data to look up
53
+ * @returns {boolean} `true` if the given data exist in the selection, otherwise `false`
54
+ */
55
+ has(data: any): boolean;
56
+ /**
57
+ * Toggles the item at the given index in the selection
58
+ *
59
+ * @param {number} index The index of the item to toggle
60
+ * @returns {SelectionChangeSet} The changes made to the selection
61
+ */
62
+ toggleSelection(index: number): SelectionChangeSet;
63
+ /**
64
+ * Toggles the items from the last toggled index to the given index in the selection.
65
+ * The toggled items will be toggled as the item at the given index no matter
66
+ * their current state in the selection.
67
+ * Initially, when no last toggled index exist, this function behaves like
68
+ * `toggleSelection`.
69
+ *
70
+ * @param {number} index The index of the item to toggle
71
+ * @returns {SelectionChangeSet} The changes made to the selection
72
+ */
73
+ toggleSelectionFromLastIndex(index: number): SelectionChangeSet;
74
+ /**
75
+ * Clears the current selection and resets last toggled index
76
+ */
77
+ clear(): void;
78
+ private toggleRange;
79
+ }
@@ -0,0 +1,57 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import Tabulator from 'tabulator-tables';
3
+ import { ElementPool } from './element-pool';
4
+ /**
5
+ * Provides row selection to Tabulator with shift-click support for range selections
6
+ */
7
+ export declare class TableSelection {
8
+ private getTable;
9
+ private pool;
10
+ private selectEvent;
11
+ private selection;
12
+ /**
13
+ * Creates an instance of the TableSelection class
14
+ *
15
+ * @param {Function} getTable Function that returns the Tabulator instance
16
+ * @param {ElementPool} pool The element pool used to cache the checkbox components
17
+ * @param {EventEmitter<object[]>} selectEvent The event emitter to use when checkboxes are toggled
18
+ */
19
+ constructor(getTable: () => Tabulator, pool: ElementPool, selectEvent: EventEmitter<object[]>);
20
+ /**
21
+ * @returns {boolean} Returns `true` when the selection is non-empty, otherwise `false`
22
+ */
23
+ get hasSelection(): boolean;
24
+ /**
25
+ * Clears the selection
26
+ */
27
+ clear(): void;
28
+ /**
29
+ * Sets the selected items
30
+ *
31
+ * @param {any[]} data The selected items
32
+ */
33
+ setSelection(data: any[]): void;
34
+ /**
35
+ * Prepends a checkbox column used for row selection to the given column definitions
36
+ *
37
+ * @param {Tabulator.ColumnDefinition[]} columnDefinitions The column definition for the table
38
+ * @returns {Tabulator.ColumnDefinition[]} The column definitions with the checkbox column prepended to it
39
+ */
40
+ getColumnDefinitions(columnDefinitions: Tabulator.ColumnDefinition[]): Tabulator.ColumnDefinition[];
41
+ private getRowSelectorColumnDefinition;
42
+ private headerClick;
43
+ private getRowSelectorFormatter;
44
+ /**
45
+ * Tabulator cell click handler that updates the selection for the clicked
46
+ * row and toggles the selection from the last clicked row if the shift key
47
+ * is pressed down.
48
+ *
49
+ * @param {PointerEvent} ev The pointer event
50
+ * @param {Tabulator.CellComponent} cell The clicked cell component
51
+ */
52
+ protected rowSelectorCellClick: (ev: PointerEvent, cell: Tabulator.CellComponent) => void;
53
+ private updateRowSelectors;
54
+ private updateRowSelector;
55
+ private getActiveRows;
56
+ private getRowByIndex;
57
+ }
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { Column, TableParams, ColumnSorter } from './table.types';
2
+ import { Column, TableParams, ColumnSorter, ColumnAggregate } from './table.types';
3
3
  /**
4
4
  * @exampleComponent limel-example-table
5
5
  * @exampleComponent limel-example-table-custom-components
@@ -8,6 +8,7 @@ import { Column, TableParams, ColumnSorter } from './table.types';
8
8
  * @exampleComponent limel-example-table-local
9
9
  * @exampleComponent limel-example-table-remote
10
10
  * @exampleComponent limel-example-table-activate-row
11
+ * @exampleComponent limel-example-table-selectable-rows
11
12
  * @exampleComponent limel-example-table-default-sorted
12
13
  * @exampleComponent limel-example-table-low-density
13
14
  */
@@ -67,6 +68,18 @@ export declare class Table {
67
68
  * A message to display when the table has no data
68
69
  */
69
70
  emptyMessage: string;
71
+ /**
72
+ * Column aggregates to be displayed in the table
73
+ */
74
+ aggregates: ColumnAggregate[];
75
+ /**
76
+ * Enables row selection
77
+ */
78
+ selectable: boolean;
79
+ /**
80
+ * Selected data. Requires `selectable` to be true.
81
+ */
82
+ selection: object[];
70
83
  /**
71
84
  * Emitted when `mode` is `remote` and the table is loading new data. The
72
85
  * consumer is responsible for giving the table new data
@@ -80,6 +93,14 @@ export declare class Table {
80
93
  * Emitted when the columns have been changed
81
94
  */
82
95
  changeColumns: EventEmitter<Column[]>;
96
+ /**
97
+ * Emitted when the row selection has been changed
98
+ */
99
+ select: EventEmitter<object[]>;
100
+ /**
101
+ * Emitted when the select all rows state is toggled
102
+ */
103
+ selectAll: EventEmitter<boolean>;
83
104
  private host;
84
105
  private currentLoad;
85
106
  private tabulator;
@@ -87,23 +108,29 @@ export declare class Table {
87
108
  private columnFactory;
88
109
  private firstRequest;
89
110
  private currentSorting;
111
+ private tableSelection;
90
112
  constructor();
91
113
  componentWillLoad(): void;
92
114
  componentDidLoad(): void;
93
115
  disconnectedCallback(): void;
94
- totalRowsChanged(): void;
95
- pageSizeChanged(): void;
96
- pageChanged(): void;
97
- activeRowChanged(): void;
98
- updateData(newData?: any[], oldData?: any[]): void;
99
- updateColumns(newColumns: Column[], oldColumns: Column[]): void;
116
+ protected totalRowsChanged(): void;
117
+ protected pageSizeChanged(): void;
118
+ protected pageChanged(): void;
119
+ protected activeRowChanged(): void;
120
+ protected updateData(newData?: any[], oldData?: any[]): void;
121
+ protected updateColumns(newColumns: Column[], oldColumns: Column[]): void;
122
+ protected updateAggregates(newAggregates: ColumnAggregate[], oldAggregates: ColumnAggregate[]): void;
123
+ protected updateSelection(newSelection: any[]): void;
100
124
  private areSameColumns;
125
+ private haveSameAggregateFields;
101
126
  private init;
102
127
  private initTabulatorComponent;
128
+ private setSelection;
103
129
  private updateMaxPage;
104
130
  private getOptions;
105
131
  private getColumnSorter;
106
132
  private getColumnDefinitions;
133
+ private addColumnAggregator;
107
134
  private getAjaxOptions;
108
135
  private handleAjaxRequesting;
109
136
  private getPaginationOptions;
@@ -112,6 +139,10 @@ export declare class Table {
112
139
  private handleDataSorting;
113
140
  private handlePageLoaded;
114
141
  private onClickRow;
142
+ private getActiveRows;
143
+ private getActiveRowsData;
144
+ private selectAllOnChange;
145
+ private formatRows;
115
146
  private formatRow;
116
147
  private calculatePageCount;
117
148
  private hasAggregation;
@@ -119,5 +150,6 @@ export declare class Table {
119
150
  private handleMoveColumn;
120
151
  private findColumn;
121
152
  render(): any;
153
+ private renderSelectAll;
122
154
  private renderEmptyMessage;
123
155
  }
@@ -130,3 +130,16 @@ export declare enum ColumnAggregatorType {
130
130
  * @returns {*} the aggregated data
131
131
  */
132
132
  export declare type ColumnAggregatorFunction<T = object> = (column?: Column, values?: any[], data?: T[]) => any;
133
+ /**
134
+ * Defines aggregate values for columns
135
+ */
136
+ export interface ColumnAggregate {
137
+ /**
138
+ * The name of the `Column` field
139
+ */
140
+ field: string;
141
+ /**
142
+ * The aggregate value
143
+ */
144
+ value: any;
145
+ }
@@ -17,7 +17,7 @@ import { ActionPosition, ActionScrollBehavior } from "./components/picker/action
17
17
  import { OpenDirection as OpenDirection1 } from "./components/menu/menu.types";
18
18
  import { FlowItem } from "./components/progress-flow/progress-flow.types";
19
19
  import { Tab } from "./components/tab-bar/tab.types";
20
- import { Column, ColumnSorter, TableParams } from "./components/table/table.types";
20
+ import { Column, ColumnAggregate, ColumnSorter, TableParams } from "./components/table/table.types";
21
21
  export namespace Components {
22
22
  interface LimelBadge {
23
23
  /**
@@ -965,6 +965,10 @@ export namespace Components {
965
965
  * Active row in the table
966
966
  */
967
967
  "activeRow": object;
968
+ /**
969
+ * Column aggregates to be displayed in the table
970
+ */
971
+ "aggregates": ColumnAggregate[];
968
972
  /**
969
973
  * Columns used to display the data
970
974
  */
@@ -997,6 +1001,14 @@ export namespace Components {
997
1001
  * Number of rows per page
998
1002
  */
999
1003
  "pageSize": number;
1004
+ /**
1005
+ * Enables row selection
1006
+ */
1007
+ "selectable": boolean;
1008
+ /**
1009
+ * Selected data. Requires `selectable` to be true.
1010
+ */
1011
+ "selection": object[];
1000
1012
  /**
1001
1013
  * The initial sorted columns
1002
1014
  */
@@ -2438,6 +2450,10 @@ declare namespace LocalJSX {
2438
2450
  * Active row in the table
2439
2451
  */
2440
2452
  "activeRow"?: object;
2453
+ /**
2454
+ * Column aggregates to be displayed in the table
2455
+ */
2456
+ "aggregates"?: ColumnAggregate[];
2441
2457
  /**
2442
2458
  * Columns used to display the data
2443
2459
  */
@@ -2478,6 +2494,14 @@ declare namespace LocalJSX {
2478
2494
  * Emitted when `mode` is `remote` and the table is loading new data. The consumer is responsible for giving the table new data
2479
2495
  */
2480
2496
  "onLoad"?: (event: CustomEvent<TableParams>) => void;
2497
+ /**
2498
+ * Emitted when the row selection has been changed
2499
+ */
2500
+ "onSelect"?: (event: CustomEvent<object[]>) => void;
2501
+ /**
2502
+ * Emitted when the select all rows state is toggled
2503
+ */
2504
+ "onSelectAll"?: (event: CustomEvent<boolean>) => void;
2481
2505
  /**
2482
2506
  * Emitted when `mode` is `local` the data is sorted
2483
2507
  */
@@ -2490,6 +2514,14 @@ declare namespace LocalJSX {
2490
2514
  * Number of rows per page
2491
2515
  */
2492
2516
  "pageSize"?: number;
2517
+ /**
2518
+ * Enables row selection
2519
+ */
2520
+ "selectable"?: boolean;
2521
+ /**
2522
+ * Selected data. Requires `selectable` to be true.
2523
+ */
2524
+ "selection"?: object[];
2493
2525
  /**
2494
2526
  * The initial sorted columns
2495
2527
  */
@@ -666,7 +666,7 @@ export declare namespace JSXBase {
666
666
  use: JSXBase.SVGAttributes;
667
667
  view: JSXBase.SVGAttributes;
668
668
  }
669
- interface SlotAttributes {
669
+ interface SlotAttributes extends JSXAttributes {
670
670
  name?: string;
671
671
  slot?: string;
672
672
  onSlotchange?: (event: Event) => void;
@@ -1427,9 +1427,7 @@ export declare namespace JSXBase {
1427
1427
  z?: number | string;
1428
1428
  zoomAndPan?: string;
1429
1429
  }
1430
- interface DOMAttributes<T = Element> {
1431
- key?: string | number;
1432
- ref?: (elm?: T) => void;
1430
+ interface DOMAttributes<T> extends JSXAttributes<T> {
1433
1431
  slot?: string;
1434
1432
  part?: string;
1435
1433
  exportparts?: string;
@@ -1550,6 +1548,10 @@ export declare namespace JSXBase {
1550
1548
  onTransitionEndCapture?: (event: TransitionEvent) => void;
1551
1549
  }
1552
1550
  }
1551
+ export interface JSXAttributes<T = Element> {
1552
+ key?: string | number;
1553
+ ref?: (elm?: T) => void;
1554
+ }
1553
1555
  export interface CustomElementsDefineOptions {
1554
1556
  exclude?: string[];
1555
1557
  resourcesUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "35.0.0-next.2",
3
+ "version": "35.0.0-next.23",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -41,54 +41,54 @@
41
41
  "generate": "stencil generate"
42
42
  },
43
43
  "devDependencies": {
44
- "@commitlint/config-conventional": "^13.1.0",
44
+ "@commitlint/config-conventional": "^16.0.0",
45
45
  "@lundalogik/cz-conventional-changelog": "^3.1.0",
46
46
  "@lundalogik/lime-icons8": "^2.7.0",
47
47
  "@popperjs/core": "^2.9.3",
48
- "@rjsf/core": "^2.5.1",
49
- "@stencil/core": "^2.10.0",
48
+ "@rjsf/core": "^3.2.1",
49
+ "@stencil/core": "^2.13.0",
50
50
  "@stencil/eslint-plugin": "^0.4.0",
51
- "@stencil/sass": "^1.4.1",
51
+ "@stencil/sass": "^1.5.2",
52
52
  "@types/codemirror": "^5.60.2",
53
53
  "@types/html-escaper": "^3.0.0",
54
- "@types/jest": "^26.0.24",
54
+ "@types/jest": "^27.4.0",
55
55
  "@types/lodash-es": "^4.17.4",
56
56
  "@types/puppeteer": "^5.4.4",
57
- "@types/react": "^16.14.14",
57
+ "@types/react": "^17.0.39",
58
58
  "@types/tabulator-tables": "^4.9.3",
59
- "@typescript-eslint/eslint-plugin": "^4.31.2",
60
- "@typescript-eslint/parser": "^4.31.2",
59
+ "@typescript-eslint/eslint-plugin": "^5.11.0",
60
+ "@typescript-eslint/parser": "^5.11.0",
61
61
  "ajv": "^6.12.6",
62
62
  "awesome-debounce-promise": "^2.1.0",
63
63
  "codemirror": "^5.62.3",
64
64
  "commitizen": "^4.2.4",
65
65
  "cross-env": "^7.0.3",
66
66
  "dayjs": "^1.10.6",
67
- "eslint": "^7.32.0",
67
+ "eslint": "^8.8.0",
68
68
  "eslint-config-prettier": "^8.3.0",
69
- "eslint-plugin-jsdoc": "^37.0.3",
69
+ "eslint-plugin-jsdoc": "^37.8.0",
70
70
  "eslint-plugin-prefer-arrow": "^1.2.3",
71
71
  "eslint-plugin-prettier": "^4.0.0",
72
- "eslint-plugin-react": "^7.27.1",
73
- "eslint-plugin-sonarjs": "^0.10.0",
72
+ "eslint-plugin-react": "^7.28.0",
73
+ "eslint-plugin-sonarjs": "^0.11.0",
74
74
  "flatpickr": "^4.6.9",
75
75
  "html-escaper": "^3.0.3",
76
76
  "jest": "^26.6.3",
77
- "jest-cli": "^26.6.3",
77
+ "jest-cli": "^27.5.0",
78
78
  "jsx-dom": "^7.0.4",
79
79
  "kompendium": "^0.10.3",
80
80
  "lodash-es": "^4.17.21",
81
- "material-components-web": "^11.0.0",
81
+ "material-components-web": "^13.0.0",
82
82
  "moment": "^2.29.1",
83
83
  "number-abbreviate": "^2.0.0",
84
- "prettier": "^2.4.1",
85
- "puppeteer": "^10.2.0",
86
- "react": "^16.14.0",
87
- "react-dom": "^16.14.0",
84
+ "prettier": "^2.5.1",
85
+ "puppeteer": "^13.3.0",
86
+ "react": "^17.0.2",
87
+ "react-dom": "^17.0.2",
88
88
  "react-shadow-dom-retarget-events": "^1.1.0",
89
89
  "replace-in-file": "^6.2.0",
90
90
  "shelljs": "0.8.5",
91
- "showdown": "1.9.1",
91
+ "showdown": "2.0.0",
92
92
  "shx": "^0.3.3",
93
93
  "tabulator-tables": "^4.9.3",
94
94
  "typescript": "^4.3.5"