@scania/tegel 0.0.1-beta.2 → 0.0.1-beta.3

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 (275) hide show
  1. package/dist/components/dropdown-option.js +1 -0
  2. package/dist/components/dropdown.js +1 -0
  3. package/dist/components/icon.js +1 -0
  4. package/dist/components/sdds-accordion-item.js +1 -0
  5. package/dist/components/sdds-accordion.js +1 -0
  6. package/dist/components/sdds-badges.js +1 -0
  7. package/dist/components/sdds-button.js +1 -0
  8. package/dist/components/sdds-datetime.js +1 -0
  9. package/dist/components/sdds-dropdown-filter.js +1 -0
  10. package/dist/components/sdds-header-cell.js +1 -0
  11. package/dist/components/sdds-inline-tabs-fullbleed.js +1 -0
  12. package/dist/components/sdds-inline-tabs.js +1 -0
  13. package/dist/components/sdds-modal.js +1 -0
  14. package/dist/components/sdds-navigation-tabs.js +1 -0
  15. package/dist/components/sdds-popover-canvas.js +1 -0
  16. package/dist/components/sdds-popover-menu.js +1 -0
  17. package/dist/components/sdds-slider.js +1 -0
  18. package/dist/components/sdds-spinner.js +1 -0
  19. package/dist/components/sdds-table-body-row-expandable.js +1 -0
  20. package/dist/components/sdds-table-body.js +1 -0
  21. package/dist/components/sdds-table-footer.js +1 -0
  22. package/dist/components/sdds-table-header.js +1 -0
  23. package/dist/components/sdds-table-toolbar.js +1 -0
  24. package/dist/components/sdds-table.js +1 -0
  25. package/dist/components/sdds-textarea.js +1 -0
  26. package/dist/components/sdds-textfield.js +1 -0
  27. package/dist/components/sdds-tooltip.js +1 -0
  28. package/dist/components/table-body-cell.js +1 -0
  29. package/dist/components/table-body-row.js +1 -0
  30. package/package.json +2 -2
  31. package/dist/cjs/index-e1c79686.js +0 -1912
  32. package/dist/cjs/index.cjs.js +0 -2
  33. package/dist/cjs/loader.cjs.js +0 -21
  34. package/dist/cjs/popper-11d5f714.js +0 -1801
  35. package/dist/cjs/sdds-accordion-item.cjs.entry.js +0 -34
  36. package/dist/cjs/sdds-accordion.cjs.entry.js +0 -21
  37. package/dist/cjs/sdds-badges.cjs.entry.js +0 -55
  38. package/dist/cjs/sdds-body-cell_2.cjs.entry.js +0 -173
  39. package/dist/cjs/sdds-button.cjs.entry.js +0 -36
  40. package/dist/cjs/sdds-datetime.cjs.entry.js +0 -66
  41. package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +0 -92
  42. package/dist/cjs/sdds-dropdown_2.cjs.entry.js +0 -335
  43. package/dist/cjs/sdds-header-cell.cjs.entry.js +0 -141
  44. package/dist/cjs/sdds-icon.cjs.entry.js +0 -42
  45. package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +0 -96
  46. package/dist/cjs/sdds-inline-tabs.cjs.entry.js +0 -211
  47. package/dist/cjs/sdds-modal.cjs.entry.js +0 -49
  48. package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +0 -95
  49. package/dist/cjs/sdds-popover-canvas.cjs.entry.js +0 -76
  50. package/dist/cjs/sdds-popover-menu.cjs.entry.js +0 -75
  51. package/dist/cjs/sdds-slider.cjs.entry.js +0 -336
  52. package/dist/cjs/sdds-spinner.cjs.entry.js +0 -21
  53. package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +0 -81
  54. package/dist/cjs/sdds-table-body.cjs.entry.js +0 -289
  55. package/dist/cjs/sdds-table-footer.cjs.entry.js +0 -165
  56. package/dist/cjs/sdds-table-header.cjs.entry.js +0 -100
  57. package/dist/cjs/sdds-table-toolbar.cjs.entry.js +0 -66
  58. package/dist/cjs/sdds-table.cjs.entry.js +0 -69
  59. package/dist/cjs/sdds-textarea.cjs.entry.js +0 -61
  60. package/dist/cjs/sdds-textfield.cjs.entry.js +0 -82
  61. package/dist/cjs/sdds-tooltip.cjs.entry.js +0 -95
  62. package/dist/cjs/tegel.cjs.js +0 -19
  63. package/dist/collection/collection-manifest.json +0 -40
  64. package/dist/collection/components/accordion/accordion-item/accordion-item.css +0 -134
  65. package/dist/collection/components/accordion/accordion-item/accordion-item.js +0 -146
  66. package/dist/collection/components/accordion/accordion.css +0 -77
  67. package/dist/collection/components/accordion/accordion.js +0 -62
  68. package/dist/collection/components/accordion/accordion.stories.js +0 -91
  69. package/dist/collection/components/badge/badge.stories.js +0 -101
  70. package/dist/collection/components/badge/badges.css +0 -42
  71. package/dist/collection/components/badge/badges.js +0 -150
  72. package/dist/collection/components/banner/banner.stories.js +0 -93
  73. package/dist/collection/components/block/block.stories.js +0 -46
  74. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +0 -26
  75. package/dist/collection/components/button/button-component.js +0 -154
  76. package/dist/collection/components/button/button-native.stories.js +0 -183
  77. package/dist/collection/components/button/button-webcomponent.stories.js +0 -182
  78. package/dist/collection/components/button/button.css +0 -658
  79. package/dist/collection/components/card/card.stories.js +0 -181
  80. package/dist/collection/components/checkbox/checkbox.stories.js +0 -54
  81. package/dist/collection/components/chips/chips.stories.js +0 -124
  82. package/dist/collection/components/data-table/native-table.stories.js +0 -182
  83. package/dist/collection/components/data-table/table/table.css +0 -15
  84. package/dist/collection/components/data-table/table/table.js +0 -253
  85. package/dist/collection/components/data-table/table-body/table-body.css +0 -22
  86. package/dist/collection/components/data-table/table-body/table-body.js +0 -425
  87. package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +0 -40
  88. package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +0 -169
  89. package/dist/collection/components/data-table/table-body-row/table-body-row.css +0 -196
  90. package/dist/collection/components/data-table/table-body-row/table-body-row.js +0 -164
  91. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +0 -79
  92. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +0 -155
  93. package/dist/collection/components/data-table/table-component-basic.stories.js +0 -163
  94. package/dist/collection/components/data-table/table-component-batch-actions.stories.js +0 -129
  95. package/dist/collection/components/data-table/table-component-bodydata.stories.js +0 -58
  96. package/dist/collection/components/data-table/table-component-custom-width.stories.js +0 -198
  97. package/dist/collection/components/data-table/table-component-event-listeners.stories.js +0 -153
  98. package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +0 -137
  99. package/dist/collection/components/data-table/table-component-filtering.stories.js +0 -139
  100. package/dist/collection/components/data-table/table-component-multiselect.stories.js +0 -160
  101. package/dist/collection/components/data-table/table-component-pagination.stories.js +0 -129
  102. package/dist/collection/components/data-table/table-component-sorting.stories.js +0 -107
  103. package/dist/collection/components/data-table/table-footer/table-footer.css +0 -93
  104. package/dist/collection/components/data-table/table-footer/table-footer.js +0 -355
  105. package/dist/collection/components/data-table/table-header/table-header.css +0 -204
  106. package/dist/collection/components/data-table/table-header/table-header.js +0 -153
  107. package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +0 -126
  108. package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +0 -320
  109. package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +0 -92
  110. package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +0 -142
  111. package/dist/collection/components/datetime/datetime.css +0 -375
  112. package/dist/collection/components/datetime/datetime.js +0 -251
  113. package/dist/collection/components/datetime/datetime.stories.js +0 -149
  114. package/dist/collection/components/divider/divider.stories.js +0 -116
  115. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +0 -339
  116. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +0 -130
  117. package/dist/collection/components/dropdown/dropdown-native.stories.js +0 -90
  118. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +0 -185
  119. package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +0 -151
  120. package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +0 -146
  121. package/dist/collection/components/dropdown/dropdown.css +0 -891
  122. package/dist/collection/components/dropdown/dropdown.js +0 -554
  123. package/dist/collection/components/footer/footer.stories.js +0 -100
  124. package/dist/collection/components/header/header-all.stories.js +0 -217
  125. package/dist/collection/components/header/header-default.stories.js +0 -47
  126. package/dist/collection/components/header/header-inline.stories.js +0 -113
  127. package/dist/collection/components/header/header-search.stories.js +0 -263
  128. package/dist/collection/components/header/header-toolbar.stories.js +0 -204
  129. package/dist/collection/components/icon/icon-font.stories.js +0 -57
  130. package/dist/collection/components/icon/icon-web-component.stories.js +0 -51
  131. package/dist/collection/components/icon/icon.css +0 -16
  132. package/dist/collection/components/icon/icon.js +0 -89
  133. package/dist/collection/components/icon/iconsArray.js +0 -2
  134. package/dist/collection/components/link/link.stories.js +0 -45
  135. package/dist/collection/components/message/message.stories.js +0 -117
  136. package/dist/collection/components/modal/modal-native.stories.js +0 -121
  137. package/dist/collection/components/modal/modal-webcomponent.stories.js +0 -78
  138. package/dist/collection/components/modal/modal.css +0 -324
  139. package/dist/collection/components/modal/modal.js +0 -146
  140. package/dist/collection/components/popover-canvas/popover-canvas.css +0 -20
  141. package/dist/collection/components/popover-canvas/popover-canvas.js +0 -190
  142. package/dist/collection/components/popover-canvas/popover-canvas.stories.js +0 -87
  143. package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +0 -132
  144. package/dist/collection/components/popover-menu/popover-menu.css +0 -19
  145. package/dist/collection/components/popover-menu/popover-menu.js +0 -189
  146. package/dist/collection/components/popover-menu/popover-menu.stories.js +0 -109
  147. package/dist/collection/components/radio-button/radio-button.stories.js +0 -68
  148. package/dist/collection/components/side-menu/side-menu.stories.js +0 -182
  149. package/dist/collection/components/slider/slider.css +0 -260
  150. package/dist/collection/components/slider/slider.js +0 -682
  151. package/dist/collection/components/slider/slider.stories.js +0 -251
  152. package/dist/collection/components/spinner/spinner.css +0 -79
  153. package/dist/collection/components/spinner/spinner.js +0 -61
  154. package/dist/collection/components/spinner/spinner.stories.js +0 -59
  155. package/dist/collection/components/stepper/stepper.stories.js +0 -139
  156. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +0 -159
  157. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +0 -302
  158. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +0 -65
  159. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +0 -172
  160. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +0 -126
  161. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +0 -43
  162. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +0 -153
  163. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +0 -103
  164. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +0 -32
  165. package/dist/collection/components/textarea/textarea.css +0 -283
  166. package/dist/collection/components/textarea/textarea.js +0 -336
  167. package/dist/collection/components/textarea/textarea.stories.js +0 -149
  168. package/dist/collection/components/textfield/textfield.css +0 -494
  169. package/dist/collection/components/textfield/textfield.js +0 -359
  170. package/dist/collection/components/textfield/textfield.stories.js +0 -222
  171. package/dist/collection/components/toast/toast.stories.js +0 -119
  172. package/dist/collection/components/toggle/toggle.stories.js +0 -62
  173. package/dist/collection/components/tooltip/tooltip.css +0 -46
  174. package/dist/collection/components/tooltip/tooltip.js +0 -200
  175. package/dist/collection/components/tooltip/tooltip.stories.js +0 -113
  176. package/dist/collection/components/utility/colour/background-color.stories.js +0 -96
  177. package/dist/collection/components/utility/colour/text-color.stories.js +0 -94
  178. package/dist/collection/foundations-stories/colour/colour-brand.stories.js +0 -38
  179. package/dist/collection/foundations-stories/colour/colour-scales.stories.js +0 -71
  180. package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +0 -40
  181. package/dist/collection/foundations-stories/grid/grid.stories.js +0 -386
  182. package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +0 -100
  183. package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +0 -94
  184. package/dist/collection/foundations-stories/typography/typography-body.stories.js +0 -16
  185. package/dist/collection/foundations-stories/typography/typography-detail.stories.js +0 -17
  186. package/dist/collection/foundations-stories/typography/typography-headline.stories.js +0 -39
  187. package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +0 -12
  188. package/dist/collection/index.js +0 -1
  189. package/dist/collection/stories/assets/code-brackets.svg +0 -1
  190. package/dist/collection/stories/assets/colors.svg +0 -1
  191. package/dist/collection/stories/assets/comments.svg +0 -1
  192. package/dist/collection/stories/assets/direction.svg +0 -1
  193. package/dist/collection/stories/assets/flow.svg +0 -1
  194. package/dist/collection/stories/assets/plugin.svg +0 -1
  195. package/dist/collection/stories/assets/repo.svg +0 -1
  196. package/dist/collection/stories/assets/stackalt.svg +0 -1
  197. package/dist/collection/utils/utils.js +0 -12
  198. package/dist/esm/index-b67b15a6.js +0 -1884
  199. package/dist/esm/index.js +0 -1
  200. package/dist/esm/loader.js +0 -17
  201. package/dist/esm/polyfills/core-js.js +0 -11
  202. package/dist/esm/polyfills/css-shim.js +0 -1
  203. package/dist/esm/polyfills/dom.js +0 -79
  204. package/dist/esm/polyfills/es5-html-element.js +0 -1
  205. package/dist/esm/polyfills/index.js +0 -34
  206. package/dist/esm/polyfills/system.js +0 -6
  207. package/dist/esm/popper-f860750c.js +0 -1799
  208. package/dist/esm/sdds-accordion-item.entry.js +0 -30
  209. package/dist/esm/sdds-accordion.entry.js +0 -17
  210. package/dist/esm/sdds-badges.entry.js +0 -51
  211. package/dist/esm/sdds-body-cell_2.entry.js +0 -168
  212. package/dist/esm/sdds-button.entry.js +0 -32
  213. package/dist/esm/sdds-datetime.entry.js +0 -62
  214. package/dist/esm/sdds-dropdown-filter.entry.js +0 -88
  215. package/dist/esm/sdds-dropdown_2.entry.js +0 -330
  216. package/dist/esm/sdds-header-cell.entry.js +0 -137
  217. package/dist/esm/sdds-icon.entry.js +0 -38
  218. package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +0 -92
  219. package/dist/esm/sdds-inline-tabs.entry.js +0 -207
  220. package/dist/esm/sdds-modal.entry.js +0 -45
  221. package/dist/esm/sdds-navigation-tabs.entry.js +0 -91
  222. package/dist/esm/sdds-popover-canvas.entry.js +0 -72
  223. package/dist/esm/sdds-popover-menu.entry.js +0 -71
  224. package/dist/esm/sdds-slider.entry.js +0 -332
  225. package/dist/esm/sdds-spinner.entry.js +0 -17
  226. package/dist/esm/sdds-table-body-row-expandable.entry.js +0 -77
  227. package/dist/esm/sdds-table-body.entry.js +0 -285
  228. package/dist/esm/sdds-table-footer.entry.js +0 -161
  229. package/dist/esm/sdds-table-header.entry.js +0 -96
  230. package/dist/esm/sdds-table-toolbar.entry.js +0 -62
  231. package/dist/esm/sdds-table.entry.js +0 -65
  232. package/dist/esm/sdds-textarea.entry.js +0 -57
  233. package/dist/esm/sdds-textfield.entry.js +0 -78
  234. package/dist/esm/sdds-tooltip.entry.js +0 -91
  235. package/dist/esm/tegel.js +0 -17
  236. package/dist/index.cjs.js +0 -1
  237. package/dist/index.js +0 -1
  238. package/dist/tegel/index.esm.js +0 -0
  239. package/dist/tegel/p-040efb32.entry.js +0 -1
  240. package/dist/tegel/p-12ca5cfa.entry.js +0 -1
  241. package/dist/tegel/p-157e1618.js +0 -2
  242. package/dist/tegel/p-1fe61cf6.entry.js +0 -1
  243. package/dist/tegel/p-2f376504.entry.js +0 -1
  244. package/dist/tegel/p-44ced895.entry.js +0 -1
  245. package/dist/tegel/p-4880f03d.entry.js +0 -1
  246. package/dist/tegel/p-4aba73a3.entry.js +0 -1
  247. package/dist/tegel/p-4b58a02c.entry.js +0 -1
  248. package/dist/tegel/p-4cb85347.entry.js +0 -1
  249. package/dist/tegel/p-52031b5a.entry.js +0 -1
  250. package/dist/tegel/p-677baf7f.entry.js +0 -1
  251. package/dist/tegel/p-71797eaf.entry.js +0 -1
  252. package/dist/tegel/p-7373284c.entry.js +0 -1
  253. package/dist/tegel/p-7451779b.entry.js +0 -1
  254. package/dist/tegel/p-77aeea3b.entry.js +0 -1
  255. package/dist/tegel/p-8582d6a7.entry.js +0 -1
  256. package/dist/tegel/p-96021bd0.entry.js +0 -1
  257. package/dist/tegel/p-9d8caf51.entry.js +0 -1
  258. package/dist/tegel/p-a5919930.entry.js +0 -1
  259. package/dist/tegel/p-b01cface.entry.js +0 -1
  260. package/dist/tegel/p-bf896643.entry.js +0 -1
  261. package/dist/tegel/p-c311725c.entry.js +0 -1
  262. package/dist/tegel/p-cf72dfd9.entry.js +0 -1
  263. package/dist/tegel/p-d91caec6.entry.js +0 -1
  264. package/dist/tegel/p-e10eec33.entry.js +0 -1
  265. package/dist/tegel/p-ec26fc38.js +0 -1
  266. package/dist/tegel/p-f2262a69.entry.js +0 -1
  267. package/dist/tegel/p-f2f7aa45.entry.js +0 -1
  268. package/dist/tegel/tegel.css +0 -101
  269. package/dist/tegel/tegel.esm.js +0 -1
  270. package/loader/cdn.js +0 -3
  271. package/loader/index.cjs.js +0 -3
  272. package/loader/index.d.ts +0 -12
  273. package/loader/index.es2017.js +0 -3
  274. package/loader/index.js +0 -4
  275. package/loader/package.json +0 -11
@@ -1,40 +0,0 @@
1
- :host(.sdds-table__body-cell) {
2
- box-sizing: border-box;
3
- font: var(--sdds-detail-02);
4
- letter-spacing: var(--sdds-detail-02-ls);
5
- display: table-cell;
6
- box-sizing: border-box;
7
- color: var(--sdds-grey-958);
8
- padding: var(--sdds-spacing-element-16);
9
- min-width: 192px;
10
- vertical-align: top;
11
- background-color: transparent;
12
- transition: background-color 200ms ease;
13
- }
14
- :host(.sdds-table__body-cell) * {
15
- box-sizing: border-box;
16
- }
17
-
18
- :host(.sdds-table__body-cell--no-padding) {
19
- padding: 0;
20
- }
21
-
22
- :host(.sdds-table__body-cell--hover) {
23
- background-color: var(--sdds-grey-200);
24
- }
25
-
26
- :host(.sdds-table__compact) {
27
- padding: var(--sdds-spacing-element-8) var(--sdds-spacing-element-16);
28
- }
29
-
30
- :host(.sdds-table--divider) {
31
- border-right: 1px solid var(--sdds-grey-400);
32
- }
33
-
34
- :host(.sdds-table--divider:last-of-type) {
35
- border-right: none;
36
- }
37
-
38
- :host(.sdds-table--no-min-width) {
39
- min-width: unset;
40
- }
@@ -1,169 +0,0 @@
1
- import { h, Host } from '@stencil/core';
2
- const relevantTableProps = [
3
- 'verticalDividers',
4
- 'compactDesign',
5
- 'noMinWidth',
6
- 'whiteBackground',
7
- ];
8
- export class TableBodyCell {
9
- constructor() {
10
- this.cellValue = undefined;
11
- this.cellKey = undefined;
12
- this.disablePadding = false;
13
- this.textAlignState = undefined;
14
- this.activeSorting = false;
15
- this.verticalDividers = false;
16
- this.compactDesign = false;
17
- this.noMinWidth = false;
18
- this.whiteBackground = false;
19
- this.tableId = '';
20
- }
21
- tablePropsChangedEventListener(event) {
22
- if (this.tableId === event.detail.tableId) {
23
- event.detail.changed
24
- .filter((changedProp) => relevantTableProps.includes(changedProp))
25
- .forEach((changedProp) => {
26
- if (typeof this[changedProp] === 'undefined') {
27
- throw new Error(`Table prop is not supported: ${changedProp}`);
28
- }
29
- this[changedProp] = event.detail[changedProp];
30
- });
31
- }
32
- }
33
- // Listen to headKey from data-table-header-element
34
- headCellHoverEventListener(event) {
35
- const [receivedID, receivedKeyValue] = event.detail;
36
- if (this.tableId === receivedID) {
37
- this.activeSorting = this.cellKey === receivedKeyValue;
38
- }
39
- }
40
- // Listen to textAlignEvent from data-table-header-element
41
- textAlignEventListener(event) {
42
- const [receivedID, receivedKey, receivedTextAlign] = event.detail;
43
- if (this.tableId === receivedID) {
44
- if (this.cellKey === receivedKey) {
45
- this.textAlignState = receivedTextAlign;
46
- }
47
- }
48
- }
49
- connectedCallback() {
50
- this.tableEl = this.host.closest('sdds-table');
51
- this.tableId = this.tableEl.tableId;
52
- }
53
- componentWillLoad() {
54
- relevantTableProps.forEach((tablePropName) => {
55
- this[tablePropName] = this.tableEl[tablePropName];
56
- });
57
- }
58
- render() {
59
- return (h(Host, { class: {
60
- 'sdds-table__body-cell': true,
61
- 'sdds-table__body-cell--hover': this.activeSorting,
62
- 'sdds-table__compact': this.compactDesign,
63
- 'sdds-table--divider': this.verticalDividers,
64
- 'sdds-table--no-min-width': this.noMinWidth,
65
- 'sdds-table__body-cell--no-padding': this.disablePadding,
66
- }, style: { textAlign: this.textAlignState } }, this.cellValue, h("slot", null)));
67
- }
68
- static get is() { return "sdds-body-cell"; }
69
- static get encapsulation() { return "shadow"; }
70
- static get originalStyleUrls() {
71
- return {
72
- "$": ["table-body-cell.scss"]
73
- };
74
- }
75
- static get styleUrls() {
76
- return {
77
- "$": ["table-body-cell.css"]
78
- };
79
- }
80
- static get properties() {
81
- return {
82
- "cellValue": {
83
- "type": "any",
84
- "mutable": false,
85
- "complexType": {
86
- "original": "string | number",
87
- "resolved": "number | string",
88
- "references": {}
89
- },
90
- "required": false,
91
- "optional": false,
92
- "docs": {
93
- "tags": [],
94
- "text": "Value that will be presented as text inside a cell"
95
- },
96
- "attribute": "cell-value",
97
- "reflect": true
98
- },
99
- "cellKey": {
100
- "type": "any",
101
- "mutable": false,
102
- "complexType": {
103
- "original": "any",
104
- "resolved": "any",
105
- "references": {}
106
- },
107
- "required": false,
108
- "optional": false,
109
- "docs": {
110
- "tags": [],
111
- "text": "Passing same cell key for all body cells which is used in head cell enables features of text align and hovering"
112
- },
113
- "attribute": "cell-key",
114
- "reflect": true
115
- },
116
- "disablePadding": {
117
- "type": "boolean",
118
- "mutable": false,
119
- "complexType": {
120
- "original": "boolean",
121
- "resolved": "boolean",
122
- "references": {}
123
- },
124
- "required": false,
125
- "optional": false,
126
- "docs": {
127
- "tags": [],
128
- "text": "Disables internal padding. Useful when passing other components to cell."
129
- },
130
- "attribute": "disable-padding",
131
- "reflect": true,
132
- "defaultValue": "false"
133
- }
134
- };
135
- }
136
- static get states() {
137
- return {
138
- "textAlignState": {},
139
- "activeSorting": {},
140
- "verticalDividers": {},
141
- "compactDesign": {},
142
- "noMinWidth": {},
143
- "whiteBackground": {},
144
- "tableId": {}
145
- };
146
- }
147
- static get elementRef() { return "host"; }
148
- static get listeners() {
149
- return [{
150
- "name": "tablePropsChangedEvent",
151
- "method": "tablePropsChangedEventListener",
152
- "target": "body",
153
- "capture": false,
154
- "passive": false
155
- }, {
156
- "name": "headCellHoverEvent",
157
- "method": "headCellHoverEventListener",
158
- "target": "body",
159
- "capture": false,
160
- "passive": false
161
- }, {
162
- "name": "textAlignEvent",
163
- "method": "textAlignEventListener",
164
- "target": "body",
165
- "capture": false,
166
- "passive": false
167
- }];
168
- }
169
- }
@@ -1,196 +0,0 @@
1
- /* As checkbox is not a web component, we have to import them here in order to have styles available - shadow DOM is a reason */
2
- :root,
3
- .sdds-theme-light {
4
- --sdds-checkbox-color: var(--sdds-grey-900);
5
- --sdds-checkbox-interaction-01: var(--sdds-blue-800);
6
- --sdds-checkbox-interaction-02: var(--sdds-white);
7
- --sdds-checkbox-bg-hover: var(--sdds-blue-800);
8
- --sdds-checkbox-bg-focus: var(--sdds-blue-800);
9
- --sdds-checkbox-disabled: var(--sdds-grey-400);
10
- --sdds-checkbox-bg-img: url("data:image/svg+xml;utf8,<svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 2.33333L3.4 5C4.80589 3.4379 5.59411 2.5621 7 1' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round'/></svg>");
11
- --sdds-checkbox-bg-img-disabled: url("data:image/svg+xml;utf8,<svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 2.33333L3.4 5C4.80589 3.4379 5.59411 2.5621 7 1' stroke='%23b0b7c4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
12
- --sdds-checkbox-border-color-disabled-after: var(--sdds-grey-500);
13
- --sdds-checkbox-color-disabled-after: var(--sdds-grey-500);
14
- }
15
- :root .sdds-theme-dark,
16
- .sdds-theme-light .sdds-theme-dark {
17
- --sdds-checkbox-color: var(--sdds-white);
18
- --sdds-checkbox-interaction-01: var(--sdds-white);
19
- --sdds-checkbox-interaction-02: var(--sdds-grey-958);
20
- --sdds-checkbox-bg-hover: white;
21
- --sdds-checkbox-bg-focus: white;
22
- --sdds-checkbox-disabled: white;
23
- --sdds-checkbox-bg-img: url("data:image/svg+xml;utf8,<svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 2.33333L3.4 5C4.80589 3.4379 5.59411 2.5621 7 1' stroke='%230D0F13' stroke-linecap='round' stroke-linejoin='round'/></svg>");
24
- --sdds-checkbox-bg-img-disabled: url("data:image/svg+xml;utf8,<svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 2.33333L3.4 5C4.80589 3.4379 5.59411 2.5621 7 1' stroke='%2356657A' stroke-linecap='round' stroke-linejoin='round'/></svg>");
25
- --sdds-checkbox-border-color-disabled-after: var(--sdds-grey-700);
26
- --sdds-checkbox-color-disabled-after: var(--sdds-grey-700);
27
- }
28
-
29
- .sdds-checkbox-item {
30
- box-sizing: border-box;
31
- font: var(--sdds-detail-02);
32
- letter-spacing: var(--sdds-detail-02-ls);
33
- color: var(--sdds-checkbox-text);
34
- display: flex;
35
- align-items: center;
36
- margin-left: -4px;
37
- }
38
- .sdds-checkbox-item * {
39
- box-sizing: border-box;
40
- }
41
- .sdds-checkbox-item .sdds-form-input[type=checkbox] {
42
- appearance: none;
43
- outline: none;
44
- margin: 0;
45
- border: 0;
46
- border-radius: 2px;
47
- width: 24px;
48
- height: 24px;
49
- position: relative;
50
- cursor: pointer;
51
- }
52
- .sdds-checkbox-item .sdds-form-input[type=checkbox] + label {
53
- color: var(--sdds-checkbox-color);
54
- padding-left: var(--sdds-spacing-element-8);
55
- padding-top: var(--sdds-spacing-element-4);
56
- padding-bottom: var(--sdds-spacing-element-4);
57
- cursor: pointer;
58
- }
59
- .sdds-checkbox-item .sdds-form-input[type=checkbox]::before, .sdds-checkbox-item .sdds-form-input[type=checkbox]::after {
60
- content: "";
61
- position: absolute;
62
- box-sizing: border-box;
63
- border-radius: 2px;
64
- }
65
- .sdds-checkbox-item .sdds-form-input[type=checkbox]::before {
66
- width: 24px;
67
- height: 24px;
68
- left: 0;
69
- top: 0;
70
- }
71
- .sdds-checkbox-item .sdds-form-input[type=checkbox]::after {
72
- border: 1px solid var(--sdds-checkbox-interaction-01);
73
- background-color: var(--sdds-checkbox-interaction-02);
74
- width: 16px;
75
- height: 16px;
76
- left: 4px;
77
- top: 4px;
78
- }
79
- .sdds-checkbox-item .sdds-form-input[type=checkbox]:hover::before {
80
- background-color: var(--sdds-checkbox-bg-hover);
81
- opacity: 0.12;
82
- }
83
- .sdds-checkbox-item .sdds-form-input[type=checkbox]:focus::before {
84
- background-color: var(--sdds-checkbox-bg-focus);
85
- opacity: 0.24;
86
- animation: cb-focus 0.4s cubic-bezier(0.65, 0.05, 0.38, 0.95) forwards;
87
- }
88
- .sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled, .sdds-checkbox-item .sdds-form-input[type=checkbox].disabled {
89
- cursor: not-allowed;
90
- }
91
- .sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled::after, .sdds-checkbox-item .sdds-form-input[type=checkbox].disabled::after {
92
- border-color: var(--sdds-checkbox-border-color-disabled-after);
93
- }
94
- .sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled + label, .sdds-checkbox-item .sdds-form-input[type=checkbox].disabled + label {
95
- color: var(--sdds-grey-600);
96
- cursor: not-allowed;
97
- }
98
- .sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled:hover::before, .sdds-checkbox-item .sdds-form-input[type=checkbox].disabled:hover::before {
99
- display: none;
100
- }
101
-
102
- .sdds-form-input[type=checkbox]:checked::after {
103
- background-image: var(--sdds-checkbox-bg-img);
104
- background-color: var(--sdds-checkbox-interaction-01);
105
- background-repeat: no-repeat;
106
- background-position: center;
107
- }
108
- .sdds-form-input[type=checkbox]:checked:disabled:hover::before, .sdds-form-input[type=checkbox]:checked:disabled::before, .sdds-form-input[type=checkbox]:checked.disabled:hover::before, .sdds-form-input[type=checkbox]:checked.disabled::before {
109
- display: block;
110
- width: 16px;
111
- height: 16px;
112
- left: 4px;
113
- top: 4px;
114
- border: 1px solid #b0b7c4;
115
- }
116
- .sdds-form-input[type=checkbox]:checked:disabled::after, .sdds-form-input[type=checkbox]:checked.disabled::after {
117
- background-image: var(--sdds-checkbox-bg-img-disabled);
118
- background-color: var(--sdds-checkbox-interaction-02);
119
- color: var(--sdds-checkbox-color-disabled-after);
120
- }
121
-
122
- @keyframes cb-focus {
123
- 0% {
124
- transform: scale(0);
125
- opacity: 0;
126
- }
127
- 50% {
128
- transform: scale(1);
129
- opacity: 1;
130
- }
131
- 100% {
132
- transform: scale(1);
133
- opacity: 0;
134
- }
135
- }
136
- :host(.sdds-table__row) {
137
- box-sizing: border-box;
138
- display: table-row;
139
- border-bottom: 1px solid var(--sdds-grey-400);
140
- background-color: var(--sdds-white);
141
- transition: background-color 200ms ease;
142
- }
143
- :host(.sdds-table__row) * {
144
- box-sizing: border-box;
145
- }
146
- :host(.sdds-table__row) .sdds-table__body-cell--checkbox {
147
- min-width: 48px;
148
- width: 48px;
149
- padding: 0;
150
- }
151
-
152
- :host(.sdds-table__row:hover) {
153
- background-color: var(--sdds-grey-100);
154
- }
155
-
156
- :host(.sdds-table__row--selected) {
157
- background-color: var(--sdds-grey-300);
158
- }
159
-
160
- :host(.sdds-table__row--selected:hover) {
161
- background-color: var(--sdds-grey-400);
162
- }
163
-
164
- :host(.sdds-table__row--hidden) {
165
- display: none;
166
- }
167
-
168
- :host(.sdds-table__row--expended) {
169
- width: 100%;
170
- background-color: pink;
171
- }
172
-
173
- :host .sdds-form-label--data-table {
174
- width: 100%;
175
- height: 48px;
176
- display: flex;
177
- justify-content: center;
178
- align-items: center;
179
- cursor: pointer;
180
- }
181
-
182
- :host(.sdds-table__compact) .sdds-form-label--data-table {
183
- height: 32px;
184
- }
185
-
186
- :host(.sdds-table--divider) .sdds-table__body-cell--checkbox {
187
- border-right: 1px solid var(--sdds-grey-400);
188
- }
189
-
190
- :host(.sdds-table--on-white-bg) {
191
- background-color: var(--sdds-grey-50);
192
- }
193
-
194
- :host(.sdds-table--on-white-bg:hover) {
195
- background-color: var(--sdds-grey-200);
196
- }
@@ -1,164 +0,0 @@
1
- import { h, Host } from '@stencil/core';
2
- const relevantTableProps = [
3
- 'enableMultiselect',
4
- 'verticalDividers',
5
- 'compactDesign',
6
- 'whiteBackground',
7
- ];
8
- export class TableBodyRow {
9
- constructor() {
10
- this.enableMultiselect = false;
11
- this.bodyCheckBoxStatus = false;
12
- this.mainCheckBoxStatus = false;
13
- this.verticalDividers = false;
14
- this.compactDesign = false;
15
- this.noMinWidth = false;
16
- this.whiteBackground = false;
17
- this.tableId = '';
18
- }
19
- bodyCheckBoxClicked(event) {
20
- const row = this.host;
21
- this.bodyCheckBoxStatus = event.currentTarget.checked;
22
- if (this.bodyCheckBoxStatus === true) {
23
- row.classList.add('sdds-table__row--selected');
24
- }
25
- else {
26
- row.classList.remove('sdds-table__row--selected');
27
- }
28
- this.bodyRowToTable.emit(this.bodyCheckBoxStatus);
29
- }
30
- bodyCheckBoxStatusUpdater(status) {
31
- this.mainCheckBoxStatus = status;
32
- this.bodyCheckBoxStatus = this.mainCheckBoxStatus;
33
- const row = this.host;
34
- if (this.bodyCheckBoxStatus === true) {
35
- row.classList.add('sdds-table__row--selected');
36
- }
37
- else {
38
- row.classList.remove('sdds-table__row--selected');
39
- }
40
- this.bodyRowToTable.emit(this.bodyCheckBoxStatus);
41
- }
42
- tablePropsChangedEventListener(event) {
43
- if (this.tableId === event.detail.tableId) {
44
- event.detail.changed
45
- .filter((changedProp) => relevantTableProps.includes(changedProp))
46
- .forEach((changedProp) => {
47
- if (typeof this[changedProp] === 'undefined') {
48
- throw new Error(`Table prop is not supported: ${changedProp}`);
49
- }
50
- this[changedProp] = event.detail[changedProp];
51
- });
52
- }
53
- }
54
- headCheckboxListener(event) {
55
- if (this.tableId === event.detail[0]) {
56
- this.bodyCheckBoxStatusUpdater(event.detail[1]);
57
- }
58
- }
59
- updateBodyCheckboxesEventListener(event) {
60
- const [receivedID, receivedBodyCheckboxStatus] = event.detail;
61
- if (this.tableId === receivedID) {
62
- this.bodyCheckBoxStatusUpdater(receivedBodyCheckboxStatus);
63
- }
64
- }
65
- connectedCallback() {
66
- this.tableEl = this.host.closest('sdds-table');
67
- this.tableId = this.tableEl.tableId;
68
- }
69
- componentWillLoad() {
70
- relevantTableProps.forEach((tablePropName) => {
71
- this[tablePropName] = this.tableEl[tablePropName];
72
- });
73
- }
74
- componentDidLoad() {
75
- this.runPaginationEvent.emit(this.tableId);
76
- }
77
- render() {
78
- return (h(Host, { class: {
79
- 'sdds-table__row': true,
80
- 'sdds-table__compact': this.compactDesign,
81
- 'sdds-table--divider': this.verticalDividers,
82
- 'sdds-table--on-white-bg': this.whiteBackground,
83
- } }, this.enableMultiselect && (h("td", { class: "sdds-table__body-cell sdds-table__body-cell--checkbox" }, h("div", { class: "sdds-checkbox-item" }, h("label", { class: "sdds-form-label sdds-form-label--data-table" }, h("input", { class: "sdds-form-input", type: "checkbox", onChange: (event) => this.bodyCheckBoxClicked(event), checked: this.bodyCheckBoxStatus }))))), h("slot", null)));
84
- }
85
- static get is() { return "sdds-table-body-row"; }
86
- static get encapsulation() { return "shadow"; }
87
- static get originalStyleUrls() {
88
- return {
89
- "$": ["table-body-row.scss"]
90
- };
91
- }
92
- static get styleUrls() {
93
- return {
94
- "$": ["table-body-row.css"]
95
- };
96
- }
97
- static get states() {
98
- return {
99
- "enableMultiselect": {},
100
- "bodyCheckBoxStatus": {},
101
- "mainCheckBoxStatus": {},
102
- "verticalDividers": {},
103
- "compactDesign": {},
104
- "noMinWidth": {},
105
- "whiteBackground": {},
106
- "tableId": {}
107
- };
108
- }
109
- static get events() {
110
- return [{
111
- "method": "bodyRowToTable",
112
- "name": "bodyRowToTable",
113
- "bubbles": true,
114
- "cancelable": true,
115
- "composed": true,
116
- "docs": {
117
- "tags": [],
118
- "text": "Send status of single row to the parent, sdds-table component that hold logic for data export and main checkbox control"
119
- },
120
- "complexType": {
121
- "original": "boolean",
122
- "resolved": "boolean",
123
- "references": {}
124
- }
125
- }, {
126
- "method": "runPaginationEvent",
127
- "name": "runPaginationEvent",
128
- "bubbles": true,
129
- "cancelable": true,
130
- "composed": true,
131
- "docs": {
132
- "tags": [],
133
- "text": "Event that triggers pagination function. Needed as first rows have to be rendered in order for pagination to run"
134
- },
135
- "complexType": {
136
- "original": "string",
137
- "resolved": "string",
138
- "references": {}
139
- }
140
- }];
141
- }
142
- static get elementRef() { return "host"; }
143
- static get listeners() {
144
- return [{
145
- "name": "tablePropsChangedEvent",
146
- "method": "tablePropsChangedEventListener",
147
- "target": "body",
148
- "capture": false,
149
- "passive": false
150
- }, {
151
- "name": "mainCheckboxSelectedEvent",
152
- "method": "headCheckboxListener",
153
- "target": "body",
154
- "capture": false,
155
- "passive": false
156
- }, {
157
- "name": "updateBodyCheckboxesEvent",
158
- "method": "updateBodyCheckboxesEventListener",
159
- "target": "body",
160
- "capture": false,
161
- "passive": false
162
- }];
163
- }
164
- }
@@ -1,79 +0,0 @@
1
- :host {
2
- box-sizing: border-box;
3
- display: contents;
4
- }
5
- :host * {
6
- box-sizing: border-box;
7
- }
8
- :host .sdds-table__row,
9
- :host .sdds-table__row-extend {
10
- display: table-row;
11
- border-bottom: 1px solid var(--sdds-grey-400);
12
- background-color: var(--sdds-white);
13
- transition: background-color 200ms ease;
14
- }
15
- :host .sdds-table__row:hover,
16
- :host .sdds-table__row-extend:hover {
17
- background-color: var(--sdds-grey-100);
18
- }
19
- :host .sdds-table__expand-control-container {
20
- display: flex;
21
- justify-content: center;
22
- align-items: center;
23
- height: 46px;
24
- cursor: pointer;
25
- padding: 0 16px;
26
- }
27
- :host .sdds-table__expand-control-container .sdds-table__expand-input {
28
- display: none;
29
- }
30
- :host .sdds-table__expand-control-container .sdds-expendable-row-icon {
31
- height: 16px;
32
- width: 16px;
33
- transition: transform 200ms ease;
34
- transform: rotate(0);
35
- }
36
- :host .sdds-table__row-expand {
37
- visibility: collapse;
38
- transition: background-color 200ms ease;
39
- }
40
- :host .sdds-table__row-expand .sdds-table__cell-expand {
41
- padding: 16px 16px 16px 66px;
42
- }
43
-
44
- :host(.sdds-table__row-expand--active) .sdds-table__row {
45
- background-color: var(--sdds-grey-300);
46
- }
47
- :host(.sdds-table__row-expand--active) .sdds-table__expand-control-container .sdds-expendable-row-icon {
48
- transform: rotate(180deg);
49
- }
50
- :host(.sdds-table__row-expand--active) .sdds-table__row-expand {
51
- background-color: var(--sdds-grey-300);
52
- visibility: visible;
53
- }
54
-
55
- :host(.sdds-table__compact) .sdds-table__expand-control-container {
56
- height: 30px;
57
- }
58
- :host(.sdds-table__compact) .sdds-table__row-expand .sdds-table__cell-expand {
59
- padding: 8px 16px 8px 66px;
60
- }
61
-
62
- :host(.sdds-table--divider) .sdds-table__cell--expand {
63
- border-right: 1px solid var(--sdds-grey-400);
64
- }
65
-
66
- :host(.sdds-table--on-white-bg) .sdds-table__row,
67
- :host(.sdds-table--on-white-bg) .sdds-table__row-extend {
68
- background-color: var(--sdds-grey-50);
69
- }
70
-
71
- :host(.sdds-table--on-white-bg:hover) .sdds-table__row,
72
- :host(.sdds-table--on-white-bg:hover) .sdds-table__row-extend {
73
- background-color: var(--sdds-grey-200);
74
- }
75
-
76
- :host(.sdds-table__row-expand--active.sdds-table--on-white-bg) .sdds-table__row,
77
- :host(.sdds-table__row-expand--active.sdds-table--on-white-bg) .sdds-table__row-extend {
78
- background-color: var(--sdds-grey-300);
79
- }