@scania/tegel 0.0.1-beta.7 → 0.0.2

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 (491) hide show
  1. package/dist/cjs/{index-e1c79686.js → index-b98965c7.js} +7 -0
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/sdds-accordion-item.cjs.entry.js +21 -21
  4. package/dist/cjs/sdds-accordion.cjs.entry.js +12 -12
  5. package/dist/cjs/sdds-badges.cjs.entry.js +45 -46
  6. package/dist/cjs/sdds-banner.cjs.entry.js +79 -0
  7. package/dist/cjs/sdds-block.cjs.entry.js +32 -0
  8. package/dist/cjs/sdds-body-cell_2.cjs.entry.js +160 -160
  9. package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js +25 -0
  10. package/dist/cjs/sdds-breadcrumb.cjs.entry.js +23 -0
  11. package/dist/cjs/sdds-button.cjs.entry.js +25 -24
  12. package/dist/cjs/sdds-card.cjs.entry.js +56 -0
  13. package/dist/cjs/sdds-checkbox.cjs.entry.js +55 -0
  14. package/dist/cjs/sdds-datetime.cjs.entry.js +78 -49
  15. package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +83 -83
  16. package/dist/cjs/sdds-dropdown_2.cjs.entry.js +327 -321
  17. package/dist/cjs/sdds-header-cell.cjs.entry.js +130 -132
  18. package/dist/cjs/sdds-icon.cjs.entry.js +30 -30
  19. package/dist/cjs/sdds-inline-tab.cjs.entry.js +22 -0
  20. package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +89 -87
  21. package/dist/cjs/sdds-inline-tabs.cjs.entry.js +212 -202
  22. package/dist/cjs/sdds-link.cjs.entry.js +28 -0
  23. package/dist/cjs/sdds-message.cjs.entry.js +41 -0
  24. package/dist/cjs/sdds-modal.cjs.entry.js +42 -40
  25. package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +89 -86
  26. package/dist/cjs/sdds-popover-canvas.cjs.entry.js +74 -66
  27. package/dist/cjs/sdds-popover-menu.cjs.entry.js +75 -65
  28. package/dist/cjs/sdds-radio-button.cjs.entry.js +32 -0
  29. package/dist/cjs/sdds-slider.cjs.entry.js +348 -327
  30. package/dist/cjs/sdds-spinner.cjs.entry.js +11 -11
  31. package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +73 -72
  32. package/dist/cjs/sdds-table-body.cjs.entry.js +235 -235
  33. package/dist/cjs/sdds-table-footer.cjs.entry.js +155 -156
  34. package/dist/cjs/sdds-table-header.cjs.entry.js +90 -91
  35. package/dist/cjs/sdds-table-toolbar.cjs.entry.js +56 -57
  36. package/dist/cjs/sdds-table.cjs.entry.js +58 -59
  37. package/dist/cjs/sdds-textarea.cjs.entry.js +57 -44
  38. package/dist/cjs/sdds-textfield.cjs.entry.js +73 -64
  39. package/dist/cjs/sdds-toast.cjs.entry.js +86 -0
  40. package/dist/cjs/sdds-toggle.cjs.entry.js +44 -0
  41. package/dist/cjs/sdds-tooltip.cjs.entry.js +94 -85
  42. package/dist/cjs/tegel.cjs.js +2 -2
  43. package/dist/collection/collection-manifest.json +12 -0
  44. package/dist/collection/components/accordion/accordion-item/accordion-item.css +30 -11
  45. package/dist/collection/components/accordion/accordion-item/accordion-item.js +142 -142
  46. package/dist/collection/components/accordion/accordion.css +2 -16
  47. package/dist/collection/components/accordion/accordion.js +62 -62
  48. package/dist/collection/components/accordion/accordion.stories.js +90 -0
  49. package/dist/collection/components/badge/badge.stories.js +102 -0
  50. package/dist/collection/components/badge/badges.css +2 -2
  51. package/dist/collection/components/badge/badges.js +147 -150
  52. package/dist/collection/components/banner/banner.stories.js +92 -0
  53. package/dist/collection/components/banner/sdds-banner.css +88 -0
  54. package/dist/collection/components/banner/sdds-banner.js +330 -0
  55. package/dist/collection/components/banner/sdds-banner.stories.js +129 -0
  56. package/dist/collection/components/block/block-native.stories.js +48 -0
  57. package/dist/collection/components/block/sdds-block.css +22 -0
  58. package/dist/collection/components/block/sdds-block.js +55 -0
  59. package/dist/collection/components/block/sdds-block.stories.js +48 -0
  60. package/dist/collection/components/breadcrumb/breadcrumb-component.css +30 -0
  61. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.css +43 -0
  62. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +83 -0
  63. package/dist/collection/components/breadcrumb/breadcrumb.js +22 -0
  64. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +26 -0
  65. package/dist/collection/components/button/button-component.js +152 -151
  66. package/dist/collection/components/button/button-native.stories.js +187 -0
  67. package/dist/collection/components/button/button-webcomponent.stories.js +189 -0
  68. package/dist/collection/components/button/button.css +63 -51
  69. package/dist/collection/components/card/card.stories.js +167 -0
  70. package/dist/collection/components/card/sdds-card.css +78 -0
  71. package/dist/collection/components/card/sdds-card.js +276 -0
  72. package/dist/collection/components/card/sdds-card.stories.js +168 -0
  73. package/dist/collection/components/checkbox/checkbox.stories.js +54 -0
  74. package/dist/collection/components/checkbox/sdds-checkbox.css +95 -0
  75. package/dist/collection/components/checkbox/sdds-checkbox.js +239 -0
  76. package/dist/collection/components/checkbox/sdds-checkbox.stories.js +71 -0
  77. package/dist/collection/components/chips/chips.stories.js +106 -0
  78. package/dist/collection/components/data-table/native-table.stories.js +160 -0
  79. package/dist/collection/components/data-table/table/table.js +252 -253
  80. package/dist/collection/components/data-table/table-body/table-body.css +1 -1
  81. package/dist/collection/components/data-table/table-body/table-body.js +425 -425
  82. package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +3 -3
  83. package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +168 -169
  84. package/dist/collection/components/data-table/table-body-row/table-body-row.css +24 -45
  85. package/dist/collection/components/data-table/table-body-row/table-body-row.js +165 -164
  86. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +23 -24
  87. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +156 -155
  88. package/dist/collection/components/data-table/table-component-basic.stories.js +161 -0
  89. package/dist/collection/components/data-table/table-component-batch-actions.stories.js +128 -0
  90. package/dist/collection/components/data-table/table-component-bodydata.stories.js +58 -0
  91. package/dist/collection/components/data-table/table-component-custom-width.stories.js +197 -0
  92. package/dist/collection/components/data-table/table-component-event-listeners.stories.js +151 -0
  93. package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +135 -0
  94. package/dist/collection/components/data-table/table-component-filtering.stories.js +137 -0
  95. package/dist/collection/components/data-table/table-component-multiselect.stories.js +158 -0
  96. package/dist/collection/components/data-table/table-component-pagination.stories.js +127 -0
  97. package/dist/collection/components/data-table/table-component-sorting.stories.js +126 -0
  98. package/dist/collection/components/data-table/table-footer/table-footer.css +9 -5
  99. package/dist/collection/components/data-table/table-footer/table-footer.js +354 -355
  100. package/dist/collection/components/data-table/table-header/table-header.css +22 -36
  101. package/dist/collection/components/data-table/table-header/table-header.js +152 -153
  102. package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +9 -8
  103. package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +317 -320
  104. package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +7 -6
  105. package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +141 -142
  106. package/dist/collection/components/datetime/datetime.css +68 -58
  107. package/dist/collection/components/datetime/datetime.js +344 -243
  108. package/dist/collection/components/datetime/datetime.stories.js +207 -0
  109. package/dist/collection/components/divider/divider.stories.js +133 -0
  110. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +339 -339
  111. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +130 -0
  112. package/dist/collection/components/dropdown/dropdown-native.stories.js +90 -0
  113. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +185 -185
  114. package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +167 -0
  115. package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +146 -0
  116. package/dist/collection/components/dropdown/dropdown.css +146 -86
  117. package/dist/collection/components/dropdown/dropdown.js +576 -553
  118. package/dist/collection/components/footer/footer.stories.js +117 -0
  119. package/dist/collection/components/header/header-all.stories.js +217 -0
  120. package/dist/collection/components/header/header-default.stories.js +47 -0
  121. package/dist/collection/components/header/header-inline.stories.js +113 -0
  122. package/dist/collection/components/header/header-search.stories.js +263 -0
  123. package/dist/collection/components/header/header-toolbar.stories.js +204 -0
  124. package/dist/collection/components/icon/icon-font.stories.js +57 -0
  125. package/dist/collection/components/icon/icon-web-component.stories.js +51 -0
  126. package/dist/collection/components/icon/icon.js +89 -89
  127. package/dist/collection/components/link/link.stories.js +45 -0
  128. package/dist/collection/components/link/sdds-link.css +36 -0
  129. package/dist/collection/components/link/sdds-link.js +121 -0
  130. package/dist/collection/components/link/sdds-link.stories.js +70 -0
  131. package/dist/collection/components/message/message.stories.js +108 -0
  132. package/dist/collection/components/message/sdds-message.css +70 -0
  133. package/dist/collection/components/message/sdds-message.js +135 -0
  134. package/dist/collection/components/message/sdds-message.stories.js +106 -0
  135. package/dist/collection/components/modal/modal-native.stories.js +129 -0
  136. package/dist/collection/components/modal/modal-webcomponent.stories.js +86 -0
  137. package/dist/collection/components/modal/modal.css +63 -37
  138. package/dist/collection/components/modal/modal.js +148 -146
  139. package/dist/collection/components/popover-canvas/popover-canvas.css +3 -3
  140. package/dist/collection/components/popover-canvas/popover-canvas.js +219 -190
  141. package/dist/collection/components/popover-canvas/popover-canvas.stories.js +89 -0
  142. package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +121 -0
  143. package/dist/collection/components/popover-menu/popover-menu.css +2 -2
  144. package/dist/collection/components/popover-menu/popover-menu.js +220 -189
  145. package/dist/collection/components/popover-menu/popover-menu.stories.js +114 -0
  146. package/dist/collection/components/radio-button/radio-button-component.css +123 -0
  147. package/dist/collection/components/radio-button/radio-button-component.stories.js +91 -0
  148. package/dist/collection/components/radio-button/radio-button.js +160 -0
  149. package/dist/collection/components/radio-button/radio-button.stories.js +68 -0
  150. package/dist/collection/components/side-menu/side-menu.stories.js +182 -0
  151. package/dist/collection/components/slider/slider.css +56 -19
  152. package/dist/collection/components/slider/slider.js +721 -682
  153. package/dist/collection/components/slider/slider.stories.js +208 -0
  154. package/dist/collection/components/spinner/spinner.js +61 -61
  155. package/dist/collection/components/spinner/spinner.stories.js +59 -0
  156. package/dist/collection/components/stepper/stepper.stories.js +139 -0
  157. package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.css +3 -0
  158. package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.js +80 -0
  159. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +21 -24
  160. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +312 -302
  161. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +71 -0
  162. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +36 -67
  163. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +128 -126
  164. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +46 -0
  165. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +22 -18
  166. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +128 -103
  167. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +32 -0
  168. package/dist/collection/components/textarea/textarea.css +60 -45
  169. package/dist/collection/components/textarea/textarea.js +394 -328
  170. package/dist/collection/components/textarea/textarea.stories.js +169 -0
  171. package/dist/collection/components/textfield/textfield.css +92 -84
  172. package/dist/collection/components/textfield/textfield.js +430 -350
  173. package/dist/collection/components/textfield/textfield.stories.js +239 -0
  174. package/dist/collection/components/toast/sdds-toast.css +102 -0
  175. package/dist/collection/components/toast/sdds-toast.js +256 -0
  176. package/dist/collection/components/toast/sdds-toast.stories.js +86 -0
  177. package/dist/collection/components/toast/toast.stories.js +129 -0
  178. package/dist/collection/components/toggle/sdds-toggle.css +104 -0
  179. package/dist/collection/components/toggle/sdds-toggle.js +261 -0
  180. package/dist/collection/components/toggle/sdds-toggle.stories.js +92 -0
  181. package/dist/collection/components/toggle/toggle.stories.js +72 -0
  182. package/dist/collection/components/tooltip/tooltip.css +3 -3
  183. package/dist/collection/components/tooltip/tooltip.js +229 -200
  184. package/dist/collection/components/tooltip/tooltip.stories.js +115 -0
  185. package/dist/collection/components/utility/colour/background-color.stories.js +96 -0
  186. package/dist/collection/components/utility/colour/text-color.stories.js +94 -0
  187. package/dist/collection/foundations-stories/colour/colour-brand.stories.js +38 -0
  188. package/dist/collection/foundations-stories/colour/colour-scales.stories.js +71 -0
  189. package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +40 -0
  190. package/dist/collection/foundations-stories/grid/grid.stories.js +386 -0
  191. package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +100 -0
  192. package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +94 -0
  193. package/dist/collection/foundations-stories/typography/typography-body.stories.js +16 -0
  194. package/dist/collection/foundations-stories/typography/typography-detail.stories.js +17 -0
  195. package/dist/collection/foundations-stories/typography/typography-headline.stories.js +39 -0
  196. package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +12 -0
  197. package/dist/collection/index.js +1 -1
  198. package/dist/collection/utils/utils.js +12 -12
  199. package/dist/components/dropdown-option.js +94 -94
  200. package/dist/components/dropdown.js +296 -289
  201. package/dist/components/icon.js +49 -49
  202. package/dist/components/index.d.ts +12 -0
  203. package/dist/components/index.js +12 -0
  204. package/dist/components/sdds-accordion-item.js +46 -46
  205. package/dist/components/sdds-accordion.js +29 -29
  206. package/dist/components/sdds-badges.js +66 -67
  207. package/dist/components/sdds-banner.d.ts +11 -0
  208. package/dist/components/sdds-banner.js +119 -0
  209. package/dist/components/sdds-block.d.ts +11 -0
  210. package/dist/components/sdds-block.js +48 -0
  211. package/dist/components/sdds-breadcrumb-item.d.ts +11 -0
  212. package/dist/components/sdds-breadcrumb-item.js +43 -0
  213. package/dist/components/sdds-breadcrumb.d.ts +11 -0
  214. package/dist/components/sdds-breadcrumb.js +37 -0
  215. package/dist/components/sdds-button.js +48 -47
  216. package/dist/components/sdds-card.d.ts +11 -0
  217. package/dist/components/sdds-card.js +84 -0
  218. package/dist/components/sdds-checkbox.d.ts +11 -0
  219. package/dist/components/sdds-checkbox.js +76 -0
  220. package/dist/components/sdds-datetime.js +112 -73
  221. package/dist/components/sdds-dropdown-filter.js +127 -127
  222. package/dist/components/sdds-header-cell.js +161 -164
  223. package/dist/components/sdds-inline-tab.d.ts +11 -0
  224. package/dist/components/sdds-inline-tab.js +40 -0
  225. package/dist/components/sdds-inline-tabs-fullbleed.js +108 -106
  226. package/dist/components/sdds-inline-tabs.js +236 -226
  227. package/dist/components/sdds-link.d.ts +11 -0
  228. package/dist/components/sdds-link.js +6 -0
  229. package/dist/components/sdds-link2.js +44 -0
  230. package/dist/components/sdds-message.d.ts +11 -0
  231. package/dist/components/sdds-message.js +67 -0
  232. package/dist/components/sdds-modal.js +68 -60
  233. package/dist/components/sdds-navigation-tabs.js +108 -104
  234. package/dist/components/sdds-popover-canvas.js +98 -87
  235. package/dist/components/sdds-popover-menu.js +99 -86
  236. package/dist/components/sdds-radio-button.d.ts +11 -0
  237. package/dist/components/sdds-radio-button.js +52 -0
  238. package/dist/components/sdds-slider.js +385 -357
  239. package/dist/components/sdds-spinner.js +27 -27
  240. package/dist/components/sdds-table-body-row-expandable.js +96 -95
  241. package/dist/components/sdds-table-body.js +281 -281
  242. package/dist/components/sdds-table-footer.js +186 -187
  243. package/dist/components/sdds-table-header.js +115 -116
  244. package/dist/components/sdds-table-toolbar.js +78 -79
  245. package/dist/components/sdds-table.js +81 -82
  246. package/dist/components/sdds-textarea.js +92 -73
  247. package/dist/components/sdds-textfield.js +109 -93
  248. package/dist/components/sdds-toast.d.ts +11 -0
  249. package/dist/components/sdds-toast.js +117 -0
  250. package/dist/components/sdds-toggle.d.ts +11 -0
  251. package/dist/components/sdds-toggle.js +69 -0
  252. package/dist/components/sdds-tooltip.js +117 -106
  253. package/dist/components/table-body-cell.js +95 -96
  254. package/dist/components/table-body-row.js +114 -113
  255. package/dist/esm/{index-b67b15a6.js → index-32571711.js} +7 -0
  256. package/dist/esm/loader.js +2 -2
  257. package/dist/esm/polyfills/core-js.js +0 -0
  258. package/dist/esm/polyfills/dom.js +0 -0
  259. package/dist/esm/polyfills/es5-html-element.js +0 -0
  260. package/dist/esm/polyfills/index.js +0 -0
  261. package/dist/esm/polyfills/system.js +0 -0
  262. package/dist/esm/sdds-accordion-item.entry.js +21 -21
  263. package/dist/esm/sdds-accordion.entry.js +12 -12
  264. package/dist/esm/sdds-badges.entry.js +45 -46
  265. package/dist/esm/sdds-banner.entry.js +75 -0
  266. package/dist/esm/sdds-block.entry.js +28 -0
  267. package/dist/esm/sdds-body-cell_2.entry.js +160 -160
  268. package/dist/esm/sdds-breadcrumb-item.entry.js +21 -0
  269. package/dist/esm/sdds-breadcrumb.entry.js +19 -0
  270. package/dist/esm/sdds-button.entry.js +25 -24
  271. package/dist/esm/sdds-card.entry.js +52 -0
  272. package/dist/esm/sdds-checkbox.entry.js +51 -0
  273. package/dist/esm/sdds-datetime.entry.js +78 -49
  274. package/dist/esm/sdds-dropdown-filter.entry.js +83 -83
  275. package/dist/esm/sdds-dropdown_2.entry.js +327 -321
  276. package/dist/esm/sdds-header-cell.entry.js +130 -132
  277. package/dist/esm/sdds-icon.entry.js +30 -30
  278. package/dist/esm/sdds-inline-tab.entry.js +18 -0
  279. package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +89 -87
  280. package/dist/esm/sdds-inline-tabs.entry.js +212 -202
  281. package/dist/esm/sdds-link.entry.js +24 -0
  282. package/dist/esm/sdds-message.entry.js +37 -0
  283. package/dist/esm/sdds-modal.entry.js +42 -40
  284. package/dist/esm/sdds-navigation-tabs.entry.js +89 -86
  285. package/dist/esm/sdds-popover-canvas.entry.js +74 -66
  286. package/dist/esm/sdds-popover-menu.entry.js +75 -65
  287. package/dist/esm/sdds-radio-button.entry.js +28 -0
  288. package/dist/esm/sdds-slider.entry.js +348 -327
  289. package/dist/esm/sdds-spinner.entry.js +11 -11
  290. package/dist/esm/sdds-table-body-row-expandable.entry.js +73 -72
  291. package/dist/esm/sdds-table-body.entry.js +235 -235
  292. package/dist/esm/sdds-table-footer.entry.js +155 -156
  293. package/dist/esm/sdds-table-header.entry.js +90 -91
  294. package/dist/esm/sdds-table-toolbar.entry.js +56 -57
  295. package/dist/esm/sdds-table.entry.js +58 -59
  296. package/dist/esm/sdds-textarea.entry.js +57 -44
  297. package/dist/esm/sdds-textfield.entry.js +73 -64
  298. package/dist/esm/sdds-toast.entry.js +82 -0
  299. package/dist/esm/sdds-toggle.entry.js +40 -0
  300. package/dist/esm/sdds-tooltip.entry.js +94 -85
  301. package/dist/esm/tegel.js +2 -2
  302. package/dist/tegel/p-05d3cfc8.entry.js +1 -0
  303. package/dist/tegel/p-13a25c7f.entry.js +1 -0
  304. package/dist/tegel/p-13b783f1.js +2 -0
  305. package/dist/tegel/p-1dda8de9.entry.js +1 -0
  306. package/dist/tegel/p-2248b59e.entry.js +1 -0
  307. package/dist/tegel/p-232e5c9a.entry.js +1 -0
  308. package/dist/tegel/p-2375f0eb.entry.js +1 -0
  309. package/dist/tegel/p-29deedc6.entry.js +1 -0
  310. package/dist/tegel/p-2f52021b.entry.js +1 -0
  311. package/dist/tegel/p-3344582d.entry.js +1 -0
  312. package/dist/tegel/{p-040efb32.entry.js → p-4b14324d.entry.js} +1 -1
  313. package/dist/tegel/p-561fbe77.entry.js +1 -0
  314. package/dist/tegel/p-5a215722.entry.js +1 -0
  315. package/dist/tegel/p-5f7b1539.entry.js +1 -0
  316. package/dist/tegel/p-6f382b38.entry.js +1 -0
  317. package/dist/tegel/p-765e2719.entry.js +1 -0
  318. package/dist/tegel/p-76f60546.entry.js +1 -0
  319. package/dist/tegel/p-7a5244b6.entry.js +1 -0
  320. package/dist/tegel/p-816ff5f7.entry.js +1 -0
  321. package/dist/tegel/p-81d2d57b.entry.js +1 -0
  322. package/dist/tegel/p-87650f36.entry.js +1 -0
  323. package/dist/tegel/p-8e6f885c.entry.js +1 -0
  324. package/dist/tegel/p-8e9dcc20.entry.js +1 -0
  325. package/dist/tegel/p-997fc919.entry.js +1 -0
  326. package/dist/tegel/p-9a057c9a.entry.js +1 -0
  327. package/dist/tegel/p-9a95e92c.entry.js +1 -0
  328. package/dist/tegel/p-a75ff060.entry.js +1 -0
  329. package/dist/tegel/p-bf1216f9.entry.js +1 -0
  330. package/dist/tegel/p-bf597564.entry.js +1 -0
  331. package/dist/tegel/p-d2217bf0.entry.js +1 -0
  332. package/dist/tegel/p-e335137d.entry.js +1 -0
  333. package/dist/tegel/p-e34cce75.entry.js +1 -0
  334. package/dist/tegel/p-e55d09f2.entry.js +1 -0
  335. package/dist/tegel/p-ebbffa8a.entry.js +1 -0
  336. package/dist/tegel/{p-a5919930.entry.js → p-ed076d47.entry.js} +1 -1
  337. package/dist/tegel/p-ef887910.entry.js +1 -0
  338. package/dist/tegel/p-f4b70868.entry.js +1 -0
  339. package/dist/tegel/p-f52a0b63.entry.js +1 -0
  340. package/dist/tegel/p-f5bf214b.entry.js +1 -0
  341. package/dist/tegel/p-fd1b5923.entry.js +1 -0
  342. package/dist/tegel/tegel.css +13 -5
  343. package/dist/tegel/tegel.esm.js +1 -1
  344. package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +17 -17
  345. package/dist/types/components/accordion/accordion.d.ts +7 -7
  346. package/dist/types/components/accordion/accordion.stories.d.ts +77 -0
  347. package/dist/types/components/badge/badge.stories.d.ts +66 -0
  348. package/dist/types/components/badge/badges.d.ts +16 -16
  349. package/dist/types/components/banner/banner.stories.d.ts +68 -0
  350. package/dist/types/components/banner/sdds-banner.d.ts +48 -0
  351. package/dist/types/components/banner/sdds-banner.stories.d.ts +109 -0
  352. package/dist/types/components/block/block-native.stories.d.ts +31 -0
  353. package/dist/types/components/block/sdds-block.d.ts +9 -0
  354. package/dist/types/components/block/sdds-block.stories.d.ts +32 -0
  355. package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +9 -0
  356. package/dist/types/components/breadcrumb/breadcrumb.d.ts +5 -0
  357. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +12 -0
  358. package/dist/types/components/button/button-component.d.ts +18 -15
  359. package/dist/types/components/button/button-native.stories.d.ts +148 -0
  360. package/dist/types/components/button/button-webcomponent.stories.d.ts +147 -0
  361. package/dist/types/components/card/card.stories.d.ts +138 -0
  362. package/dist/types/components/card/sdds-card.d.ts +39 -0
  363. package/dist/types/components/card/sdds-card.stories.d.ts +139 -0
  364. package/dist/types/components/checkbox/checkbox.stories.d.ts +39 -0
  365. package/dist/types/components/checkbox/sdds-checkbox.d.ts +38 -0
  366. package/dist/types/components/checkbox/sdds-checkbox.stories.d.ts +40 -0
  367. package/dist/types/components/chips/chips.stories.d.ts +77 -0
  368. package/dist/types/components/data-table/native-table.stories.d.ts +133 -0
  369. package/dist/types/components/data-table/table/table.d.ts +47 -47
  370. package/dist/types/components/data-table/table-body/table-body.d.ts +54 -54
  371. package/dist/types/components/data-table/table-body-cell/table-body-cell.d.ts +24 -24
  372. package/dist/types/components/data-table/table-body-row/table-body-row.d.ts +27 -27
  373. package/dist/types/components/data-table/table-body-row-expandable/table-body-row-expandable.d.ts +27 -27
  374. package/dist/types/components/data-table/table-component-basic.stories.d.ts +101 -0
  375. package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +99 -0
  376. package/dist/types/components/data-table/table-component-bodydata.stories.d.ts +38 -0
  377. package/dist/types/components/data-table/table-component-custom-width.stories.d.ts +148 -0
  378. package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +88 -0
  379. package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +88 -0
  380. package/dist/types/components/data-table/table-component-filtering.stories.d.ts +101 -0
  381. package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +101 -0
  382. package/dist/types/components/data-table/table-component-pagination.stories.d.ts +101 -0
  383. package/dist/types/components/data-table/table-component-sorting.stories.d.ts +100 -0
  384. package/dist/types/components/data-table/table-footer/table-footer.d.ts +50 -50
  385. package/dist/types/components/data-table/table-header/table-header.d.ts +27 -27
  386. package/dist/types/components/data-table/table-header-cell/table-header-cell.d.ts +44 -45
  387. package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +22 -22
  388. package/dist/types/components/datetime/datetime.d.ts +42 -32
  389. package/dist/types/components/datetime/datetime.stories.d.ts +127 -0
  390. package/dist/types/components/divider/divider.stories.d.ts +65 -0
  391. package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +42 -42
  392. package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.stories.d.ts +73 -0
  393. package/dist/types/components/dropdown/dropdown-native.stories.d.ts +57 -0
  394. package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +19 -19
  395. package/dist/types/components/dropdown/dropdown-wc-default.stories.d.ts +129 -0
  396. package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +115 -0
  397. package/dist/types/components/dropdown/dropdown.d.ts +58 -56
  398. package/dist/types/components/footer/footer.stories.d.ts +45 -0
  399. package/dist/types/components/header/header-all.stories.d.ts +29 -0
  400. package/dist/types/components/header/header-default.stories.d.ts +29 -0
  401. package/dist/types/components/header/header-inline.stories.d.ts +29 -0
  402. package/dist/types/components/header/header-search.stories.d.ts +29 -0
  403. package/dist/types/components/header/header-toolbar.stories.d.ts +29 -0
  404. package/dist/types/components/icon/icon-font.stories.d.ts +38 -0
  405. package/dist/types/components/icon/icon-web-component.stories.d.ts +38 -0
  406. package/dist/types/components/icon/icon.d.ts +12 -12
  407. package/dist/types/components/link/link.stories.d.ts +33 -0
  408. package/dist/types/components/link/sdds-link.d.ts +13 -0
  409. package/dist/types/components/link/sdds-link.stories.d.ts +58 -0
  410. package/dist/types/components/message/message.stories.d.ts +69 -0
  411. package/dist/types/components/message/sdds-message.d.ts +14 -0
  412. package/dist/types/components/message/sdds-message.stories.d.ts +87 -0
  413. package/dist/types/components/modal/modal-native.stories.d.ts +59 -0
  414. package/dist/types/components/modal/modal-webcomponent.stories.d.ts +52 -0
  415. package/dist/types/components/modal/modal.d.ts +17 -16
  416. package/dist/types/components/popover-canvas/popover-canvas.d.ts +24 -18
  417. package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +25 -0
  418. package/dist/types/components/popover-menu/popover-menu-icons.stories.d.ts +27 -0
  419. package/dist/types/components/popover-menu/popover-menu.d.ts +24 -18
  420. package/dist/types/components/popover-menu/popover-menu.stories.d.ts +27 -0
  421. package/dist/types/components/radio-button/radio-button-component.stories.d.ts +39 -0
  422. package/dist/types/components/radio-button/radio-button.d.ts +26 -0
  423. package/dist/types/components/radio-button/radio-button.stories.d.ts +33 -0
  424. package/dist/types/components/side-menu/side-menu.stories.d.ts +42 -0
  425. package/dist/types/components/slider/slider.d.ts +86 -82
  426. package/dist/types/components/slider/slider.stories.d.ts +169 -0
  427. package/dist/types/components/spinner/spinner.d.ts +7 -7
  428. package/dist/types/components/spinner/spinner.stories.d.ts +37 -0
  429. package/dist/types/components/stepper/stepper.stories.d.ts +56 -0
  430. package/dist/types/components/tabs/inline-tabs-default/inline-tab/inline-tab.d.ts +6 -0
  431. package/dist/types/components/tabs/inline-tabs-default/inline-tabs.d.ts +40 -41
  432. package/dist/types/components/tabs/inline-tabs-default/inline-tabs.stories.d.ts +49 -0
  433. package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.d.ts +20 -20
  434. package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.d.ts +30 -0
  435. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +20 -18
  436. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +13 -0
  437. package/dist/types/components/textarea/textarea.d.ts +48 -41
  438. package/dist/types/components/textarea/textarea.stories.d.ts +116 -0
  439. package/dist/types/components/textfield/textfield.d.ts +52 -42
  440. package/dist/types/components/textfield/textfield.stories.d.ts +180 -0
  441. package/dist/types/components/toast/sdds-toast.d.ts +36 -0
  442. package/dist/types/components/toast/sdds-toast.stories.d.ts +56 -0
  443. package/dist/types/components/toast/toast.stories.d.ts +69 -0
  444. package/dist/types/components/toggle/sdds-toggle.d.ts +34 -0
  445. package/dist/types/components/toggle/sdds-toggle.stories.d.ts +74 -0
  446. package/dist/types/components/toggle/toggle.stories.d.ts +55 -0
  447. package/dist/types/components/tooltip/tooltip.d.ts +24 -20
  448. package/dist/types/components/tooltip/tooltip.stories.d.ts +54 -0
  449. package/dist/types/components/utility/colour/background-color.stories.d.ts +58 -0
  450. package/dist/types/components/utility/colour/text-color.stories.d.ts +58 -0
  451. package/dist/types/components.d.ts +939 -48
  452. package/dist/types/foundations-stories/colour/colour-brand.stories.d.ts +13 -0
  453. package/dist/types/foundations-stories/colour/colour-scales.stories.d.ts +13 -0
  454. package/dist/types/foundations-stories/colour/colour-semantic.stories.d.ts +13 -0
  455. package/dist/types/foundations-stories/grid/grid.stories.d.ts +35 -0
  456. package/dist/types/foundations-stories/spacing/spacing-element.stories.d.ts +8 -0
  457. package/dist/types/foundations-stories/spacing/spacing-layout.stories.d.ts +8 -0
  458. package/dist/types/foundations-stories/typography/typography-body.stories.d.ts +8 -0
  459. package/dist/types/foundations-stories/typography/typography-detail.stories.d.ts +8 -0
  460. package/dist/types/foundations-stories/typography/typography-headline.stories.d.ts +21 -0
  461. package/dist/types/foundations-stories/typography/typography-paragraph.stories.d.ts +8 -0
  462. package/dist/types/index.d.ts +1 -1
  463. package/dist/types/utils/utils.d.ts +2 -2
  464. package/package.json +1 -1
  465. package/readme.md +41 -8
  466. package/dist/tegel/p-12ca5cfa.entry.js +0 -1
  467. package/dist/tegel/p-157e1618.js +0 -2
  468. package/dist/tegel/p-1fe61cf6.entry.js +0 -1
  469. package/dist/tegel/p-2f376504.entry.js +0 -1
  470. package/dist/tegel/p-44ced895.entry.js +0 -1
  471. package/dist/tegel/p-4880f03d.entry.js +0 -1
  472. package/dist/tegel/p-4aba73a3.entry.js +0 -1
  473. package/dist/tegel/p-4b58a02c.entry.js +0 -1
  474. package/dist/tegel/p-4cb85347.entry.js +0 -1
  475. package/dist/tegel/p-52031b5a.entry.js +0 -1
  476. package/dist/tegel/p-677baf7f.entry.js +0 -1
  477. package/dist/tegel/p-71797eaf.entry.js +0 -1
  478. package/dist/tegel/p-7373284c.entry.js +0 -1
  479. package/dist/tegel/p-7451779b.entry.js +0 -1
  480. package/dist/tegel/p-77aeea3b.entry.js +0 -1
  481. package/dist/tegel/p-8582d6a7.entry.js +0 -1
  482. package/dist/tegel/p-96021bd0.entry.js +0 -1
  483. package/dist/tegel/p-9d8caf51.entry.js +0 -1
  484. package/dist/tegel/p-b01cface.entry.js +0 -1
  485. package/dist/tegel/p-bf896643.entry.js +0 -1
  486. package/dist/tegel/p-c311725c.entry.js +0 -1
  487. package/dist/tegel/p-cf72dfd9.entry.js +0 -1
  488. package/dist/tegel/p-d91caec6.entry.js +0 -1
  489. package/dist/tegel/p-e10eec33.entry.js +0 -1
  490. package/dist/tegel/p-f2262a69.entry.js +0 -1
  491. package/dist/tegel/p-f2f7aa45.entry.js +0 -1
@@ -2,164 +2,163 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e1c79686.js');
5
+ const index = require('./index-b98965c7.js');
6
6
 
7
- const tableFooterCss = ":host{box-sizing:border-box;display:table-footer-group;height:48px}:host *{box-sizing:border-box}:host .sdds-table__footer-row{background-color:var(--sdds-grey-100)}:host .sdds-table__footer-cell{padding:0 16px}:host .sdds-table__footer-cell .sdds-table__pagination{height:48px;display:flex;align-items:center;justify-content:space-between}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__row-selector,:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector{display:flex;align-items:center}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);background-color:var(--sdds-grey-50);width:36px;height:30px;border:none;border-radius:4px;transition:background-color 250ms ease;margin-right:4px;padding-right:8px}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input:hover{background-color:var(--sdds-white)}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input:disabled{color:var(--sdds-grey-600)}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input--shake{animation:sdds-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);backface-visibility:hidden;perspective:1000px}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-text{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);padding:1px 8px 0 0}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn{display:flex;justify-content:center;align-items:center;border:none;background-color:transparent;cursor:pointer;height:32px;width:32px;border-radius:4px;transition:background-color 250ms ease}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:hover{background-color:var(--sdds-grey-300)}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:disabled{cursor:default}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:disabled:hover{background-color:transparent}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn-svg{height:20px;width:20px}:host(.sdds-table--compact){height:32px}:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination{height:32px}:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input{height:24px}:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn{height:28px;width:28px}";
7
+ const tableFooterCss = ":host{box-sizing:border-box;display:table-footer-group;height:48px}:host *{box-sizing:border-box}:host .sdds-table__footer-row{background-color:var(--sdds-data-table-footer-background);color:var(--sdds-data-table-color)}:host .sdds-table__footer-cell{padding:0 16px}:host .sdds-table__footer-cell .sdds-table__pagination{height:48px;display:flex;align-items:center;justify-content:space-between}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__row-selector,:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector{display:flex;align-items:center}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);background-color:var(--sdds-data-table-footer-page-selector-input-background);color:var(--sdds-data-table-color);width:36px;height:30px;border:none;border-radius:4px;transition:background-color 250ms ease;margin-right:4px;padding-right:8px}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input:hover{background-color:var(--sdds-data-table-footer-page-selector-input-background-hover)}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input:disabled{color:var(--sdds-data-table-footer-page-selector-input-color-disabled)}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input--shake{animation:sdds-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);backface-visibility:hidden;perspective:1000px}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-text{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);padding:1px 8px 0 0}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn{display:flex;justify-content:center;align-items:center;border:none;background-color:transparent;cursor:pointer;height:32px;width:32px;border-radius:4px;transition:background-color 250ms ease}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:hover{background-color:var(--sdds-data-table-footer-btn-hover)}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:disabled{cursor:default;opacity:0.38}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn:disabled:hover{background-color:transparent}:host .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn-svg{height:20px;width:20px;fill:var(--sdds-data-table-color)}:host(.sdds-table--compact){height:32px}:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination{height:32px}:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination .sdds-table__page-selector-input{height:24px}:host(.sdds-table--compact) .sdds-table__footer-cell .sdds-table__pagination .sdds-table__footer-btn{height:28px;width:28px}";
8
8
 
9
- const relevantTableProps = [
10
- 'compactDesign',
11
- 'noMinWidth',
12
- 'verticalDividers',
13
- 'whiteBackground',
14
- ];
15
- function removeShakeAnimation(e) {
16
- e.target.classList.remove('sdds-table__page-selector-input--shake');
17
- }
18
- const TableFooter = class {
19
- constructor(hostRef) {
20
- index.registerInstance(this, hostRef);
21
- this.enablePaginationEvent = index.createEvent(this, "enablePaginationEvent", 7);
22
- this.currentPageValueEvent = index.createEvent(this, "currentPageValueEvent", 7);
23
- this.paginationPrev = (event) => {
24
- event.preventDefault();
25
- // Enable lowering until 1st page
26
- if (this.paginationValue >= 2) {
27
- this.paginationValue--;
28
- this.runPagination();
29
- }
30
- };
31
- this.paginationNext = (event) => {
32
- event.preventDefault();
33
- // Enable increasing until the max number of pages
34
- if (this.paginationValue <= this.numberOfPages) {
35
- this.paginationValue++;
36
- this.runPagination();
37
- }
38
- };
39
- this.runPagination = () => {
40
- if (!this.disablePaginationFunction) {
41
- // grab all rows in body
42
- const dataRowsPagination = this.host.parentNode
43
- .querySelector('sdds-table-body')
44
- .querySelectorAll('.sdds-table__row');
45
- dataRowsPagination.forEach((item, i) => {
46
- // for making logic easier 1st result, 2nd result...
47
- const index = i + 1;
48
- if (this.tempPaginationDisable) {
49
- this.paginationValue = 1;
50
- }
51
- else {
52
- const lastResult = this.rowsPerPage * this.paginationValue;
53
- const firstResult = lastResult - this.rowsPerPage;
54
- if (index > firstResult && index <= lastResult) {
55
- item.classList.remove('sdds-table__row--hidden');
56
- }
57
- else {
58
- item.classList.add('sdds-table__row--hidden');
59
- }
60
- }
61
- });
62
- }
63
- };
64
- this.clientPaginationPrev = (event) => {
65
- event.preventDefault();
66
- // Enable lowering until 1st page
67
- if (this.clientPaginationValue >= 2) {
68
- this.clientPaginationValue--;
69
- this.sendPaginationValue(this.clientPaginationValue);
70
- }
71
- };
72
- this.clientPaginationNext = (event) => {
73
- event.preventDefault();
74
- // Enable increasing until the max number of pages
75
- if (this.clientPaginationValue <= this.clientMaxPages) {
76
- this.clientPaginationValue++;
77
- this.sendPaginationValue(this.clientPaginationValue);
78
- }
79
- };
80
- this.enablePagination = false;
81
- this.rowsPerPage = 5;
82
- this.enableClientPagination = false;
83
- this.clientPaginationValue = 1;
84
- this.clientMaxPages = 1;
85
- this.clientSetColumnsNumber = null;
86
- this.disablePaginationFunction = false;
87
- this.columnsNumber = 0;
88
- this.numberOfPages = 0;
89
- this.paginationValue = 1;
90
- this.tempPaginationDisable = false;
91
- this.verticalDividers = false;
92
- this.compactDesign = false;
93
- this.noMinWidth = false;
94
- this.whiteBackground = false;
95
- this.tableId = '';
96
- }
97
- tablePropsChangedEventListener(event) {
98
- if (this.tableId === event.detail.tableId) {
99
- event.detail.changed
100
- .filter((changedProp) => relevantTableProps.includes(changedProp))
101
- .forEach((changedProp) => {
102
- if (typeof this[changedProp] === 'undefined') {
103
- throw new Error(`Table prop is not supported: ${changedProp}`);
104
- }
105
- this[changedProp] = event.detail[changedProp];
106
- });
107
- }
108
- }
109
- connectedCallback() {
110
- this.tableEl = this.host.closest('sdds-table');
111
- this.tableId = this.tableEl.tableId;
112
- }
113
- componentWillLoad() {
114
- relevantTableProps.forEach((tablePropName) => {
115
- this[tablePropName] = this.tableEl[tablePropName];
116
- });
117
- const numberOfRows = this.host.parentElement.querySelector('sdds-table-body').childElementCount;
118
- const numberOfColumns = this.host.parentElement.querySelector('sdds-table-header').childElementCount;
119
- this.numberOfPages = Math.ceil(numberOfRows / this.rowsPerPage);
120
- if (this.clientSetColumnsNumber !== null) {
121
- this.columnsNumber = this.clientSetColumnsNumber;
122
- }
123
- else {
124
- this.columnsNumber = numberOfColumns;
125
- }
126
- this.enablePaginationEvent.emit(this.tableId);
127
- }
128
- paginationInputChange(event) {
129
- const insertedValue = event.target.value;
130
- if (insertedValue > this.numberOfPages || insertedValue < 1) {
131
- event.target.classList.add('sdds-table__page-selector-input--shake');
132
- this.paginationValue = event.target.max;
133
- }
134
- else {
135
- this.paginationValue = event.target.value;
136
- }
137
- this.runPagination();
138
- }
139
- runPaginationEventListener(event) {
140
- if (this.tableId === event.detail) {
141
- this.runPagination();
142
- }
143
- }
144
- sendPaginationValue(value) {
145
- this.currentPageValueEvent.emit([this.tableId, value]);
146
- }
147
- clientPaginationInputChange(event) {
148
- const insertedValue = event.target.value;
149
- if (insertedValue > this.clientMaxPages || insertedValue < 1) {
150
- event.target.classList.add('sdds-table__page-selector-input--shake');
151
- this.clientPaginationValue = event.target.max;
152
- }
153
- else {
154
- this.clientPaginationValue = event.target.value;
155
- }
156
- this.sendPaginationValue(this.clientPaginationValue);
157
- }
158
- render() {
159
- return (index.h(index.Host, { class: this.compactDesign ? 'sdds-table--compact' : '' }, index.h("tr", { class: "sdds-table__footer-row" }, index.h("td", { class: "sdds-table__footer-cell", colSpan: this.columnsNumber }, this.enablePagination && !this.enableClientPagination && (index.h("div", { class: "sdds-table__pagination" }, index.h("div", { class: "sdds-table__row-selector" }), index.h("div", { class: "sdds-table__page-selector" }, index.h("input", { class: "sdds-table__page-selector-input", type: "number", min: "1", max: this.numberOfPages, value: this.paginationValue, pattern: "[0-9]+", dir: "rtl", onChange: (event) => this.paginationInputChange(event), onFocusout: (event) => this.paginationInputChange(event), onAnimationEnd: removeShakeAnimation, disabled: this.tempPaginationDisable }), index.h("p", { class: "sdds-table__footer-text" }, "of ", index.h("span", null, this.tempPaginationDisable ? 1 : this.numberOfPages), " pages"), index.h("button", { class: "sdds-table__footer-btn", disabled: this.paginationValue <= 1 || this.tempPaginationDisable, onClick: (event) => this.paginationPrev(event) }, index.h("svg", { class: "sdds-table__footer-btn-svg", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22.217 4.273a1 1 0 0 1 0 1.415l-9.888 9.888a.6.6 0 0 0 0 .848l9.888 9.888a1 1 0 0 1-1.414 1.415l-9.889-9.889a2.6 2.6 0 0 1 0-3.677l9.889-9.888a1 1 0 0 1 1.414 0Z", fill: "currentColor" }))), index.h("button", { class: "sdds-table__footer-btn", disabled: this.paginationValue >= this.numberOfPages || this.tempPaginationDisable, onClick: (event) => this.paginationNext(event) }, index.h("svg", { class: "sdds-table__footer-btn-svg", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M9.783 27.727a1 1 0 0 1 0-1.415l9.888-9.888a.6.6 0 0 0 0-.848L9.783 5.688a1 1 0 0 1 1.414-1.415l9.889 9.889a2.6 2.6 0 0 1 0 3.676l-9.889 9.889a1 1 0 0 1-1.414 0Z", fill: "currentColor" })))))), this.enableClientPagination && !this.enablePagination && (index.h("div", { class: "sdds-table__pagination" }, index.h("div", { class: "sdds-table__row-selector" }), index.h("div", { class: "sdds-table__page-selector" }, index.h("input", { class: "sdds-table__page-selector-input", type: "number", min: "1", max: this.clientMaxPages, value: this.clientPaginationValue, pattern: "[0-9]+", dir: "rtl", onChange: (event) => this.clientPaginationInputChange(event), onFocusout: (event) => this.clientPaginationInputChange(event), onAnimationEnd: removeShakeAnimation }), index.h("p", { class: "sdds-table__footer-text" }, "of ", index.h("span", null, this.clientMaxPages), " pages"), index.h("button", { class: "sdds-table__footer-btn", disabled: this.clientPaginationValue <= 1, onClick: (event) => this.clientPaginationPrev(event) }, index.h("svg", { class: "sdds-table__footer-btn-svg", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22.217 4.273a1 1 0 0 1 0 1.415l-9.888 9.888a.6.6 0 0 0 0 .848l9.888 9.888a1 1 0 0 1-1.414 1.415l-9.889-9.889a2.6 2.6 0 0 1 0-3.677l9.889-9.888a1 1 0 0 1 1.414 0Z", fill: "currentColor" }))), index.h("button", { class: "sdds-table__footer-btn", disabled: this.clientPaginationValue >= this.clientMaxPages, onClick: (event) => this.clientPaginationNext(event) }, index.h("svg", { class: "sdds-table__footer-btn-svg", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M9.783 27.727a1 1 0 0 1 0-1.415l9.888-9.888a.6.6 0 0 0 0-.848L9.783 5.688a1 1 0 0 1 1.414-1.415l9.889 9.889a2.6 2.6 0 0 1 0 3.676l-9.889 9.889a1 1 0 0 1-1.414 0Z", fill: "currentColor" }))))))))));
160
- }
161
- get host() { return index.getElement(this); }
162
- };
9
+ const relevantTableProps = [
10
+ 'compactDesign',
11
+ 'noMinWidth',
12
+ 'verticalDividers',
13
+ ];
14
+ function removeShakeAnimation(e) {
15
+ e.target.classList.remove('sdds-table__page-selector-input--shake');
16
+ }
17
+ const TableFooter = class {
18
+ constructor(hostRef) {
19
+ index.registerInstance(this, hostRef);
20
+ this.enablePaginationEvent = index.createEvent(this, "enablePaginationEvent", 7);
21
+ this.currentPageValueEvent = index.createEvent(this, "currentPageValueEvent", 7);
22
+ this.paginationPrev = (event) => {
23
+ event.preventDefault();
24
+ // Enable lowering until 1st page
25
+ if (this.paginationValue >= 2) {
26
+ this.paginationValue--;
27
+ this.runPagination();
28
+ }
29
+ };
30
+ this.paginationNext = (event) => {
31
+ event.preventDefault();
32
+ // Enable increasing until the max number of pages
33
+ if (this.paginationValue <= this.numberOfPages) {
34
+ this.paginationValue++;
35
+ this.runPagination();
36
+ }
37
+ };
38
+ this.runPagination = () => {
39
+ if (!this.disablePaginationFunction) {
40
+ // grab all rows in body
41
+ const dataRowsPagination = this.host.parentNode
42
+ .querySelector('sdds-table-body')
43
+ .querySelectorAll('.sdds-table__row');
44
+ dataRowsPagination.forEach((item, i) => {
45
+ // for making logic easier 1st result, 2nd result...
46
+ const index = i + 1;
47
+ if (this.tempPaginationDisable) {
48
+ this.paginationValue = 1;
49
+ }
50
+ else {
51
+ const lastResult = this.rowsPerPage * this.paginationValue;
52
+ const firstResult = lastResult - this.rowsPerPage;
53
+ if (index > firstResult && index <= lastResult) {
54
+ item.classList.remove('sdds-table__row--hidden');
55
+ }
56
+ else {
57
+ item.classList.add('sdds-table__row--hidden');
58
+ }
59
+ }
60
+ });
61
+ }
62
+ };
63
+ this.clientPaginationPrev = (event) => {
64
+ event.preventDefault();
65
+ // Enable lowering until 1st page
66
+ if (this.clientPaginationValue >= 2) {
67
+ this.clientPaginationValue--;
68
+ this.sendPaginationValue(this.clientPaginationValue);
69
+ }
70
+ };
71
+ this.clientPaginationNext = (event) => {
72
+ event.preventDefault();
73
+ // Enable increasing until the max number of pages
74
+ if (this.clientPaginationValue <= this.clientMaxPages) {
75
+ this.clientPaginationValue++;
76
+ this.sendPaginationValue(this.clientPaginationValue);
77
+ }
78
+ };
79
+ this.enablePagination = false;
80
+ this.rowsPerPage = 5;
81
+ this.enableClientPagination = false;
82
+ this.clientPaginationValue = 1;
83
+ this.clientMaxPages = 1;
84
+ this.clientSetColumnsNumber = null;
85
+ this.disablePaginationFunction = false;
86
+ this.columnsNumber = 0;
87
+ this.numberOfPages = 0;
88
+ this.paginationValue = 1;
89
+ this.tempPaginationDisable = false;
90
+ this.verticalDividers = false;
91
+ this.compactDesign = false;
92
+ this.noMinWidth = false;
93
+ this.whiteBackground = false;
94
+ this.tableId = '';
95
+ }
96
+ tablePropsChangedEventListener(event) {
97
+ if (this.tableId === event.detail.tableId) {
98
+ event.detail.changed
99
+ .filter((changedProp) => relevantTableProps.includes(changedProp))
100
+ .forEach((changedProp) => {
101
+ if (typeof this[changedProp] === 'undefined') {
102
+ throw new Error(`Table prop is not supported: ${changedProp}`);
103
+ }
104
+ this[changedProp] = event.detail[changedProp];
105
+ });
106
+ }
107
+ }
108
+ connectedCallback() {
109
+ this.tableEl = this.host.closest('sdds-table');
110
+ this.tableId = this.tableEl.tableId;
111
+ }
112
+ componentWillLoad() {
113
+ relevantTableProps.forEach((tablePropName) => {
114
+ this[tablePropName] = this.tableEl[tablePropName];
115
+ });
116
+ const numberOfRows = this.host.parentElement.querySelector('sdds-table-body').childElementCount;
117
+ const numberOfColumns = this.host.parentElement.querySelector('sdds-table-header').childElementCount;
118
+ this.numberOfPages = Math.ceil(numberOfRows / this.rowsPerPage);
119
+ if (this.clientSetColumnsNumber !== null) {
120
+ this.columnsNumber = this.clientSetColumnsNumber;
121
+ }
122
+ else {
123
+ this.columnsNumber = numberOfColumns;
124
+ }
125
+ this.enablePaginationEvent.emit(this.tableId);
126
+ }
127
+ paginationInputChange(event) {
128
+ const insertedValue = event.target.value;
129
+ if (insertedValue > this.numberOfPages || insertedValue < 1) {
130
+ event.target.classList.add('sdds-table__page-selector-input--shake');
131
+ this.paginationValue = event.target.max;
132
+ }
133
+ else {
134
+ this.paginationValue = event.target.value;
135
+ }
136
+ this.runPagination();
137
+ }
138
+ runPaginationEventListener(event) {
139
+ if (this.tableId === event.detail) {
140
+ this.runPagination();
141
+ }
142
+ }
143
+ sendPaginationValue(value) {
144
+ this.currentPageValueEvent.emit([this.tableId, value]);
145
+ }
146
+ clientPaginationInputChange(event) {
147
+ const insertedValue = event.target.value;
148
+ if (insertedValue > this.clientMaxPages || insertedValue < 1) {
149
+ event.target.classList.add('sdds-table__page-selector-input--shake');
150
+ this.clientPaginationValue = event.target.max;
151
+ }
152
+ else {
153
+ this.clientPaginationValue = event.target.value;
154
+ }
155
+ this.sendPaginationValue(this.clientPaginationValue);
156
+ }
157
+ render() {
158
+ return (index.h(index.Host, { class: this.compactDesign ? 'sdds-table--compact' : '' }, index.h("tr", { class: "sdds-table__footer-row" }, index.h("td", { class: "sdds-table__footer-cell", colSpan: this.columnsNumber }, this.enablePagination && !this.enableClientPagination && (index.h("div", { class: "sdds-table__pagination" }, index.h("div", { class: "sdds-table__row-selector" }), index.h("div", { class: "sdds-table__page-selector" }, index.h("input", { class: "sdds-table__page-selector-input", type: "number", min: "1", max: this.numberOfPages, value: this.paginationValue, pattern: "[0-9]+", dir: "rtl", onChange: (event) => this.paginationInputChange(event), onFocusout: (event) => this.paginationInputChange(event), onAnimationEnd: removeShakeAnimation, disabled: this.tempPaginationDisable }), index.h("p", { class: "sdds-table__footer-text" }, "of ", index.h("span", null, this.tempPaginationDisable ? 1 : this.numberOfPages), " pages"), index.h("button", { class: "sdds-table__footer-btn", disabled: this.paginationValue <= 1 || this.tempPaginationDisable, onClick: (event) => this.paginationPrev(event) }, index.h("svg", { class: "sdds-table__footer-btn-svg", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22.217 4.273a1 1 0 0 1 0 1.415l-9.888 9.888a.6.6 0 0 0 0 .848l9.888 9.888a1 1 0 0 1-1.414 1.415l-9.889-9.889a2.6 2.6 0 0 1 0-3.677l9.889-9.888a1 1 0 0 1 1.414 0Z" }))), index.h("button", { class: "sdds-table__footer-btn", disabled: this.paginationValue >= this.numberOfPages || this.tempPaginationDisable, onClick: (event) => this.paginationNext(event) }, index.h("svg", { class: "sdds-table__footer-btn-svg", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M9.783 27.727a1 1 0 0 1 0-1.415l9.888-9.888a.6.6 0 0 0 0-.848L9.783 5.688a1 1 0 0 1 1.414-1.415l9.889 9.889a2.6 2.6 0 0 1 0 3.676l-9.889 9.889a1 1 0 0 1-1.414 0Z" })))))), this.enableClientPagination && !this.enablePagination && (index.h("div", { class: "sdds-table__pagination" }, index.h("div", { class: "sdds-table__row-selector" }), index.h("div", { class: "sdds-table__page-selector" }, index.h("input", { class: "sdds-table__page-selector-input", type: "number", min: "1", max: this.clientMaxPages, value: this.clientPaginationValue, pattern: "[0-9]+", dir: "rtl", onChange: (event) => this.clientPaginationInputChange(event), onFocusout: (event) => this.clientPaginationInputChange(event), onAnimationEnd: removeShakeAnimation }), index.h("p", { class: "sdds-table__footer-text" }, "of ", index.h("span", null, this.clientMaxPages), " pages"), index.h("button", { class: "sdds-table__footer-btn", disabled: this.clientPaginationValue <= 1, onClick: (event) => this.clientPaginationPrev(event) }, index.h("svg", { class: "sdds-table__footer-btn-svg", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22.217 4.273a1 1 0 0 1 0 1.415l-9.888 9.888a.6.6 0 0 0 0 .848l9.888 9.888a1 1 0 0 1-1.414 1.415l-9.889-9.889a2.6 2.6 0 0 1 0-3.677l9.889-9.888a1 1 0 0 1 1.414 0Z" }))), index.h("button", { class: "sdds-table__footer-btn", disabled: this.clientPaginationValue >= this.clientMaxPages, onClick: (event) => this.clientPaginationNext(event) }, index.h("svg", { class: "sdds-table__footer-btn-svg", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M9.783 27.727a1 1 0 0 1 0-1.415l9.888-9.888a.6.6 0 0 0 0-.848L9.783 5.688a1 1 0 0 1 1.414-1.415l9.889 9.889a2.6 2.6 0 0 1 0 3.676l-9.889 9.889a1 1 0 0 1-1.414 0Z" }))))))))));
159
+ }
160
+ get host() { return index.getElement(this); }
161
+ };
163
162
  TableFooter.style = tableFooterCss;
164
163
 
165
164
  exports.sdds_table_footer = TableFooter;
@@ -2,99 +2,98 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e1c79686.js');
5
+ const index = require('./index-b98965c7.js');
6
6
 
7
- const tableHeaderCss = ":root,.sdds-theme-light{--sdds-checkbox-color:var(--sdds-grey-900);--sdds-checkbox-interaction-01:var(--sdds-blue-800);--sdds-checkbox-interaction-02:var(--sdds-white);--sdds-checkbox-bg-hover:var(--sdds-blue-800);--sdds-checkbox-bg-focus:var(--sdds-blue-800);--sdds-checkbox-disabled:var(--sdds-grey-400);--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>\");--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>\");--sdds-checkbox-border-color-disabled-after:var(--sdds-grey-500);--sdds-checkbox-color-disabled-after:var(--sdds-grey-500)}:root .sdds-theme-dark,.sdds-theme-light .sdds-theme-dark{--sdds-checkbox-color:var(--sdds-white);--sdds-checkbox-interaction-01:var(--sdds-white);--sdds-checkbox-interaction-02:var(--sdds-grey-958);--sdds-checkbox-bg-hover:white;--sdds-checkbox-bg-focus:white;--sdds-checkbox-disabled:white;--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>\");--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>\");--sdds-checkbox-border-color-disabled-after:var(--sdds-grey-700);--sdds-checkbox-color-disabled-after:var(--sdds-grey-700)}.sdds-checkbox-item{box-sizing:border-box;font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);color:var(--sdds-checkbox-text);display:flex;align-items:center;margin-left:-4px}.sdds-checkbox-item *{box-sizing:border-box}.sdds-checkbox-item .sdds-form-input[type=checkbox]{appearance:none;outline:none;margin:0;border:0;border-radius:2px;width:24px;height:24px;position:relative;cursor:pointer}.sdds-checkbox-item .sdds-form-input[type=checkbox]+label{color:var(--sdds-checkbox-color);padding-left:var(--sdds-spacing-element-8);padding-top:var(--sdds-spacing-element-4);padding-bottom:var(--sdds-spacing-element-4);cursor:pointer}.sdds-checkbox-item .sdds-form-input[type=checkbox]::before,.sdds-checkbox-item .sdds-form-input[type=checkbox]::after{content:\"\";position:absolute;box-sizing:border-box;border-radius:2px}.sdds-checkbox-item .sdds-form-input[type=checkbox]::before{width:24px;height:24px;left:0;top:0}.sdds-checkbox-item .sdds-form-input[type=checkbox]::after{border:1px solid var(--sdds-checkbox-interaction-01);background-color:var(--sdds-checkbox-interaction-02);width:16px;height:16px;left:4px;top:4px}.sdds-checkbox-item .sdds-form-input[type=checkbox]:hover::before{background-color:var(--sdds-checkbox-bg-hover);opacity:0.12}.sdds-checkbox-item .sdds-form-input[type=checkbox]:focus::before{background-color:var(--sdds-checkbox-bg-focus);opacity:0.24;animation:cb-focus 0.4s cubic-bezier(0.65, 0.05, 0.38, 0.95) forwards}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled{cursor:not-allowed}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled::after,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled::after{border-color:var(--sdds-checkbox-border-color-disabled-after)}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled+label,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled+label{color:var(--sdds-grey-600);cursor:not-allowed}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled:hover::before,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled:hover::before{display:none}.sdds-form-input[type=checkbox]:checked::after{background-image:var(--sdds-checkbox-bg-img);background-color:var(--sdds-checkbox-interaction-01);background-repeat:no-repeat;background-position:center}.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{display:block;width:16px;height:16px;left:4px;top:4px;border:1px solid #b0b7c4}.sdds-form-input[type=checkbox]:checked:disabled::after,.sdds-form-input[type=checkbox]:checked.disabled::after{background-image:var(--sdds-checkbox-bg-img-disabled);background-color:var(--sdds-checkbox-interaction-02);color:var(--sdds-checkbox-color-disabled-after)}@keyframes cb-focus{0%{transform:scale(0);opacity:0}50%{transform:scale(1);opacity:1}100%{transform:scale(1);opacity:0}}:host{box-sizing:border-box;display:table-header-group}:host *{box-sizing:border-box}:host .sdds-table__header-cell--checkbox{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);display:table-cell;text-align:left;color:var(--sdds-grey-958);background-color:var(--sdds-grey-300);border-bottom:1px solid var(--sdds-grey-400);height:48px;box-sizing:border-box;overflow:hidden;transition:background-color 200ms ease;min-width:unset;width:48px;padding:0;border-top-left-radius:4px}:host .sdds-form-label--data-table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host .sdds-table__expand-control-container{display:flex;justify-content:center;align-items:center;height:48px;cursor:pointer}:host .sdds-table__expand-control-container .sdds-table__expand-input{display:none}:host .sdds-table__expand-control-container .sdds-expandable-row-icon{height:20px;width:20px;transition:transform 200ms ease;transform:rotate(0)}:host .sdds-table__expand-control-container .sdds-expandable-row-icon--opened{transform:rotate(180deg)}:host ::slotted(sdds-header-cell:hover){background-color:var(--sdds-grey-400)}:host(.sdds-table--compact) .sdds-table__header-cell--checkbox{height:32px}:host(.sdds-table--compact) .sdds-form-label--data-table{height:32px}:host(.sdds-table--divider) .sdds-table__header-cell--checkbox{border-right:1px solid var(--sdds-grey-400)}:host(.sdds-table--toolbar-available) .sdds-table__header-cell--checkbox{border-top-left-radius:0}";
7
+ const tableHeaderCss = ":root,.sdds-mode-light{--sdds-checkbox-color:var(--sdds-grey-900);--sdds-checkbox-interaction-01:var(--sdds-blue-800);--sdds-checkbox-interaction-02:var(--sdds-white);--sdds-checkbox-background-hover:var(--sdds-blue-800);--sdds-checkbox-background-focus:var(--sdds-blue-800);--sdds-checkbox-disabled:var(--sdds-grey-400);--sdds-checkbox-background-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>\");--sdds-checkbox-background-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>\");--sdds-checkbox-border-color-disabled-after:var(--sdds-grey-500);--sdds-checkbox-color-disabled-after:var(--sdds-grey-500)}:root .sdds-mode-dark,.sdds-mode-light .sdds-mode-dark{--sdds-checkbox-color:var(--sdds-white);--sdds-checkbox-interaction-01:var(--sdds-white);--sdds-checkbox-interaction-02:var(--sdds-grey-958);--sdds-checkbox-background-hover:white;--sdds-checkbox-background-focus:white;--sdds-checkbox-disabled:white;--sdds-checkbox-background-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>\");--sdds-checkbox-background-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>\");--sdds-checkbox-border-color-disabled-after:var(--sdds-grey-700);--sdds-checkbox-color-disabled-after:var(--sdds-grey-700)}.sdds-checkbox-item{box-sizing:border-box;font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);color:var(--sdds-checkbox-text);display:flex;align-items:center;margin-left:-4px}.sdds-checkbox-item *{box-sizing:border-box}.sdds-checkbox-item .sdds-form-input[type=checkbox]{appearance:none;outline:none;margin:0;border:0;border-radius:2px;width:24px;height:24px;position:relative;cursor:pointer}.sdds-checkbox-item .sdds-form-input[type=checkbox]+label{color:var(--sdds-checkbox-color);padding-left:var(--sdds-spacing-element-4);padding-top:var(--sdds-spacing-element-4);padding-bottom:var(--sdds-spacing-element-4);cursor:pointer}.sdds-checkbox-item .sdds-form-input[type=checkbox]::before,.sdds-checkbox-item .sdds-form-input[type=checkbox]::after{content:\"\";position:absolute;box-sizing:border-box;border-radius:2px}.sdds-checkbox-item .sdds-form-input[type=checkbox]::before{width:24px;height:24px;left:0;top:0}.sdds-checkbox-item .sdds-form-input[type=checkbox]::after{border:1px solid var(--sdds-checkbox-interaction-01);background-color:var(--sdds-checkbox-interaction-02);width:16px;height:16px;left:4px;top:4px}.sdds-checkbox-item .sdds-form-input[type=checkbox]:hover::before{background-color:var(--sdds-checkbox-background-hover);opacity:0.12}.sdds-checkbox-item .sdds-form-input[type=checkbox]:focus::before{background-color:var(--sdds-checkbox-background-focus);opacity:0.24;transition:opacity 0.2s ease-in-out}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled{cursor:not-allowed}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled::after,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled::after{border-color:var(--sdds-checkbox-border-color-disabled-after)}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled+label,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled+label{color:var(--sdds-grey-600);cursor:not-allowed}.sdds-checkbox-item .sdds-form-input[type=checkbox]:disabled:hover::before,.sdds-checkbox-item .sdds-form-input[type=checkbox].disabled:hover::before{display:none}.sdds-form-input[type=checkbox]:checked::after{background-image:var(--sdds-checkbox-background-img);background-color:var(--sdds-checkbox-interaction-01);background-repeat:no-repeat;background-position:center}.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{display:block;width:16px;height:16px;left:4px;top:4px;border:1px solid #b0b7c4}.sdds-form-input[type=checkbox]:checked:disabled::after,.sdds-form-input[type=checkbox]:checked.disabled::after{background-image:var(--sdds-checkbox-background-img-disabled);background-color:var(--sdds-checkbox-interaction-02);color:var(--sdds-checkbox-color-disabled-after)}:host{box-sizing:border-box;display:table-header-group}:host *{box-sizing:border-box}:host .sdds-table__header-cell--checkbox{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);display:table-cell;text-align:left;color:var(--sdds-data-table-color);background-color:var(--sdds-data-table-header-background);border-bottom:1px solid var(--sdds-data-table-divider);height:48px;box-sizing:border-box;overflow:hidden;transition:background-color 200ms ease;min-width:unset;width:48px;padding:0;border-top-left-radius:4px}:host .sdds-form-label--data-table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host .sdds-table__expand-control-container{display:flex;justify-content:center;align-items:center;height:48px;cursor:pointer}:host .sdds-table__expand-control-container .sdds-table__expand-input{display:none}:host .sdds-table__expand-control-container .sdds-expandable-row-icon{height:20px;width:20px;transition:transform 200ms ease;transform:rotate(0)}:host .sdds-table__expand-control-container .sdds-expandable-row-icon--opened{transform:rotate(180deg)}:host ::slotted(sdds-header-cell:hover){background-color:var(--sdds-data-table-header-background-hover)}:host(.sdds-table--compact) .sdds-table__header-cell--checkbox{height:32px}:host(.sdds-table--compact) .sdds-form-label--data-table{height:32px}:host(.sdds-table--divider) .sdds-table__header-cell--checkbox{border-right:1px solid var(--sdds-data-table-divider)}:host(.sdds-table--toolbar-available) .sdds-table__header-cell--checkbox{border-top-left-radius:0}";
8
8
 
9
- const relevantTableProps = [
10
- 'enableMultiselect',
11
- 'enableExpandableRows',
12
- 'verticalDividers',
13
- 'compactDesign',
14
- 'noMinWidth',
15
- 'whiteBackground',
16
- ];
17
- const TableHeaderRow = class {
18
- constructor(hostRef) {
19
- index.registerInstance(this, hostRef);
20
- this.mainCheckboxSelectedEvent = index.createEvent(this, "mainCheckboxSelectedEvent", 7);
21
- this.enableMultiselect = false;
22
- this.enableExpandableRows = false;
23
- this.mainCheckboxSelected = false;
24
- this.mainExpendSelected = false;
25
- this.verticalDividers = false;
26
- this.compactDesign = false;
27
- this.noMinWidth = false;
28
- this.whiteBackground = false;
29
- this.enableToolbarDesign = false;
30
- this.tableId = '';
31
- }
32
- tablePropsChangedEventListener(event) {
33
- if (this.tableId === event.detail.tableId) {
34
- event.detail.changed
35
- .filter((changedProp) => relevantTableProps.includes(changedProp))
36
- .forEach((changedProp) => {
37
- if (typeof this[changedProp] === 'undefined') {
38
- throw new Error(`Table prop is not supported: ${changedProp}`);
39
- }
40
- this[changedProp] = event.detail[changedProp];
41
- });
42
- }
43
- }
44
- updateMainCheckboxEventListener(event) {
45
- const [receivedID, receivedMainCheckboxStatus] = event.detail;
46
- if (this.tableId === receivedID) {
47
- this.mainCheckboxSelected = receivedMainCheckboxStatus;
48
- }
49
- }
50
- singleRowExpandedEventListener(event) {
51
- if (this.tableId === event.detail[0]) {
52
- // TODO: Improve this logic. Why we get late repose in DOM?
53
- setTimeout(() => {
54
- this.bodyExpandClicked();
55
- }, 100);
56
- }
57
- }
58
- bodyExpandClicked() {
59
- const numberOfExtendRowsActive = this.host.parentElement
60
- .querySelector('sdds-table-body')
61
- .getElementsByClassName('sdds-table__row-extend--active').length;
62
- const numberOfExtendRows = this.host.parentElement
63
- .querySelector('sdds-table-body')
64
- .getElementsByTagName('sdds-table-body-row-expendable').length;
65
- if (numberOfExtendRows === numberOfExtendRowsActive) {
66
- this.mainExpendSelected = true;
67
- }
68
- else {
69
- this.mainExpendSelected = false;
70
- }
71
- }
72
- connectedCallback() {
73
- this.tableEl = this.host.closest('sdds-table');
74
- this.tableId = this.tableEl.tableId;
75
- }
76
- componentWillLoad() {
77
- relevantTableProps.forEach((tablePropName) => {
78
- this[tablePropName] = this.tableEl[tablePropName];
79
- });
80
- }
81
- componentWillRender() {
82
- this.enableToolbarDesign =
83
- this.host.closest('sdds-table').getElementsByTagName('sdds-table-toolbar').length >= 1;
84
- }
85
- headCheckBoxClicked(event) {
86
- this.mainCheckboxSelected = event.currentTarget.checked;
87
- this.mainCheckboxSelectedEvent.emit([this.tableId, this.mainCheckboxSelected]);
88
- }
89
- render() {
90
- return (index.h(index.Host, { class: {
91
- 'sdds-table--compact': this.compactDesign,
92
- 'sdds-table--divider': this.verticalDividers,
93
- 'sdds-table--toolbar-available': this.enableToolbarDesign,
94
- } }, index.h("tr", null, this.enableMultiselect && (index.h("th", { class: "sdds-table__header-cell sdds-table__header-cell--checkbox" }, index.h("div", { class: "sdds-checkbox-item" }, index.h("label", { class: "sdds-form-label sdds-form-label--data-table" }, index.h("input", { class: "sdds-form-input", type: "checkbox", onChange: (e) => this.headCheckBoxClicked(e), checked: this.mainCheckboxSelected }))))), this.enableExpandableRows && (index.h("th", { class: "sdds-table__header-cell sdds-table__header-cell--checkbox" })), index.h("slot", null))));
95
- }
96
- get host() { return index.getElement(this); }
97
- };
9
+ const relevantTableProps = [
10
+ 'enableMultiselect',
11
+ 'enableExpandableRows',
12
+ 'verticalDividers',
13
+ 'compactDesign',
14
+ 'noMinWidth',
15
+ ];
16
+ const TableHeaderRow = class {
17
+ constructor(hostRef) {
18
+ index.registerInstance(this, hostRef);
19
+ this.mainCheckboxSelectedEvent = index.createEvent(this, "mainCheckboxSelectedEvent", 7);
20
+ this.enableMultiselect = false;
21
+ this.enableExpandableRows = false;
22
+ this.mainCheckboxSelected = false;
23
+ this.mainExpendSelected = false;
24
+ this.verticalDividers = false;
25
+ this.compactDesign = false;
26
+ this.noMinWidth = false;
27
+ this.whiteBackground = false;
28
+ this.enableToolbarDesign = false;
29
+ this.tableId = '';
30
+ }
31
+ tablePropsChangedEventListener(event) {
32
+ if (this.tableId === event.detail.tableId) {
33
+ event.detail.changed
34
+ .filter((changedProp) => relevantTableProps.includes(changedProp))
35
+ .forEach((changedProp) => {
36
+ if (typeof this[changedProp] === 'undefined') {
37
+ throw new Error(`Table prop is not supported: ${changedProp}`);
38
+ }
39
+ this[changedProp] = event.detail[changedProp];
40
+ });
41
+ }
42
+ }
43
+ updateMainCheckboxEventListener(event) {
44
+ const [receivedID, receivedMainCheckboxStatus] = event.detail;
45
+ if (this.tableId === receivedID) {
46
+ this.mainCheckboxSelected = receivedMainCheckboxStatus;
47
+ }
48
+ }
49
+ singleRowExpandedEventListener(event) {
50
+ if (this.tableId === event.detail[0]) {
51
+ // TODO: Improve this logic. Why we get late repose in DOM?
52
+ setTimeout(() => {
53
+ this.bodyExpandClicked();
54
+ }, 100);
55
+ }
56
+ }
57
+ bodyExpandClicked() {
58
+ const numberOfExtendRowsActive = this.host.parentElement
59
+ .querySelector('sdds-table-body')
60
+ .getElementsByClassName('sdds-table__row-extend--active').length;
61
+ const numberOfExtendRows = this.host.parentElement
62
+ .querySelector('sdds-table-body')
63
+ .getElementsByTagName('sdds-table-body-row-expendable').length;
64
+ if (numberOfExtendRows === numberOfExtendRowsActive) {
65
+ this.mainExpendSelected = true;
66
+ }
67
+ else {
68
+ this.mainExpendSelected = false;
69
+ }
70
+ }
71
+ connectedCallback() {
72
+ this.tableEl = this.host.closest('sdds-table');
73
+ this.tableId = this.tableEl.tableId;
74
+ }
75
+ componentWillLoad() {
76
+ relevantTableProps.forEach((tablePropName) => {
77
+ this[tablePropName] = this.tableEl[tablePropName];
78
+ });
79
+ }
80
+ componentWillRender() {
81
+ this.enableToolbarDesign =
82
+ this.host.closest('sdds-table').getElementsByTagName('sdds-table-toolbar').length >= 1;
83
+ }
84
+ headCheckBoxClicked(event) {
85
+ this.mainCheckboxSelected = event.currentTarget.checked;
86
+ this.mainCheckboxSelectedEvent.emit([this.tableId, this.mainCheckboxSelected]);
87
+ }
88
+ render() {
89
+ return (index.h(index.Host, { class: {
90
+ 'sdds-table--compact': this.compactDesign,
91
+ 'sdds-table--divider': this.verticalDividers,
92
+ 'sdds-table--toolbar-available': this.enableToolbarDesign,
93
+ } }, index.h("tr", null, this.enableMultiselect && (index.h("th", { class: "sdds-table__header-cell sdds-table__header-cell--checkbox" }, index.h("div", { class: "sdds-checkbox-item" }, index.h("label", { class: "sdds-form-label sdds-form-label--data-table" }, index.h("input", { class: "sdds-form-input", type: "checkbox", onChange: (e) => this.headCheckBoxClicked(e), checked: this.mainCheckboxSelected }))))), this.enableExpandableRows && (index.h("th", { class: "sdds-table__header-cell sdds-table__header-cell--checkbox" })), index.h("slot", null))));
94
+ }
95
+ get host() { return index.getElement(this); }
96
+ };
98
97
  TableHeaderRow.style = tableHeaderCss;
99
98
 
100
99
  exports.sdds_table_header = TableHeaderRow;