@scania/tegel 0.0.1-beta.9 → 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 (530) hide show
  1. package/dist/cjs/index-b98965c7.js +1919 -0
  2. package/dist/cjs/index.cjs.js +2 -0
  3. package/dist/cjs/loader.cjs.js +21 -0
  4. package/dist/cjs/popper-11d5f714.js +1801 -0
  5. package/dist/cjs/sdds-accordion-item.cjs.entry.js +34 -0
  6. package/dist/cjs/sdds-accordion.cjs.entry.js +21 -0
  7. package/dist/cjs/sdds-badges.cjs.entry.js +54 -0
  8. package/dist/cjs/sdds-banner.cjs.entry.js +79 -0
  9. package/dist/cjs/sdds-block.cjs.entry.js +32 -0
  10. package/dist/cjs/sdds-body-cell_2.cjs.entry.js +173 -0
  11. package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js +25 -0
  12. package/dist/cjs/sdds-breadcrumb.cjs.entry.js +23 -0
  13. package/dist/cjs/sdds-button.cjs.entry.js +37 -0
  14. package/dist/cjs/sdds-card.cjs.entry.js +56 -0
  15. package/dist/cjs/sdds-checkbox.cjs.entry.js +55 -0
  16. package/dist/cjs/sdds-datetime.cjs.entry.js +95 -0
  17. package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +92 -0
  18. package/dist/cjs/sdds-dropdown_2.cjs.entry.js +341 -0
  19. package/dist/cjs/sdds-header-cell.cjs.entry.js +139 -0
  20. package/dist/cjs/sdds-icon.cjs.entry.js +42 -0
  21. package/dist/cjs/sdds-inline-tab.cjs.entry.js +22 -0
  22. package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +98 -0
  23. package/dist/cjs/sdds-inline-tabs.cjs.entry.js +221 -0
  24. package/dist/cjs/sdds-link.cjs.entry.js +28 -0
  25. package/dist/cjs/sdds-message.cjs.entry.js +41 -0
  26. package/dist/cjs/sdds-modal.cjs.entry.js +51 -0
  27. package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +98 -0
  28. package/dist/cjs/sdds-popover-canvas.cjs.entry.js +84 -0
  29. package/dist/cjs/sdds-popover-menu.cjs.entry.js +85 -0
  30. package/dist/cjs/sdds-radio-button.cjs.entry.js +32 -0
  31. package/dist/cjs/sdds-slider.cjs.entry.js +357 -0
  32. package/dist/cjs/sdds-spinner.cjs.entry.js +21 -0
  33. package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +82 -0
  34. package/dist/cjs/sdds-table-body.cjs.entry.js +289 -0
  35. package/dist/cjs/sdds-table-footer.cjs.entry.js +164 -0
  36. package/dist/cjs/sdds-table-header.cjs.entry.js +99 -0
  37. package/dist/cjs/sdds-table-toolbar.cjs.entry.js +65 -0
  38. package/dist/cjs/sdds-table.cjs.entry.js +68 -0
  39. package/dist/cjs/sdds-textarea.cjs.entry.js +74 -0
  40. package/dist/cjs/sdds-textfield.cjs.entry.js +91 -0
  41. package/dist/cjs/sdds-toast.cjs.entry.js +86 -0
  42. package/dist/cjs/sdds-toggle.cjs.entry.js +44 -0
  43. package/dist/cjs/sdds-tooltip.cjs.entry.js +104 -0
  44. package/dist/cjs/tegel.cjs.js +19 -0
  45. package/dist/collection/collection-manifest.json +52 -0
  46. package/dist/collection/components/accordion/accordion-item/accordion-item.css +153 -0
  47. package/dist/collection/components/accordion/accordion-item/accordion-item.js +146 -0
  48. package/dist/collection/components/accordion/accordion.css +63 -0
  49. package/dist/collection/components/accordion/accordion.js +62 -0
  50. package/dist/collection/components/accordion/accordion.stories.js +90 -0
  51. package/dist/collection/components/badge/badge.stories.js +102 -0
  52. package/dist/collection/components/badge/badges.css +42 -0
  53. package/dist/collection/components/badge/badges.js +147 -0
  54. package/dist/collection/components/banner/banner.stories.js +92 -0
  55. package/dist/collection/components/banner/sdds-banner.css +88 -0
  56. package/dist/collection/components/banner/sdds-banner.js +330 -0
  57. package/dist/collection/components/banner/sdds-banner.stories.js +129 -0
  58. package/dist/collection/components/block/block-native.stories.js +48 -0
  59. package/dist/collection/components/block/sdds-block.css +22 -0
  60. package/dist/collection/components/block/sdds-block.js +55 -0
  61. package/dist/collection/components/block/sdds-block.stories.js +48 -0
  62. package/dist/collection/components/breadcrumb/breadcrumb-component.css +30 -0
  63. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.css +43 -0
  64. package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +83 -0
  65. package/dist/collection/components/breadcrumb/breadcrumb.js +22 -0
  66. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +26 -0
  67. package/dist/collection/components/button/button-component.js +155 -0
  68. package/dist/collection/components/button/button-native.stories.js +187 -0
  69. package/dist/collection/components/button/button-webcomponent.stories.js +189 -0
  70. package/dist/collection/components/button/button.css +670 -0
  71. package/dist/collection/components/card/card.stories.js +167 -0
  72. package/dist/collection/components/card/sdds-card.css +78 -0
  73. package/dist/collection/components/card/sdds-card.js +276 -0
  74. package/dist/collection/components/card/sdds-card.stories.js +168 -0
  75. package/dist/collection/components/checkbox/checkbox.stories.js +54 -0
  76. package/dist/collection/components/checkbox/sdds-checkbox.css +95 -0
  77. package/dist/collection/components/checkbox/sdds-checkbox.js +239 -0
  78. package/dist/collection/components/checkbox/sdds-checkbox.stories.js +71 -0
  79. package/dist/collection/components/chips/chips.stories.js +106 -0
  80. package/dist/collection/components/data-table/native-table.stories.js +160 -0
  81. package/dist/collection/components/data-table/table/table.css +15 -0
  82. package/dist/collection/components/data-table/table/table.js +252 -0
  83. package/dist/collection/components/data-table/table-body/table-body.css +22 -0
  84. package/dist/collection/components/data-table/table-body/table-body.js +425 -0
  85. package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +40 -0
  86. package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +168 -0
  87. package/dist/collection/components/data-table/table-body-row/table-body-row.css +175 -0
  88. package/dist/collection/components/data-table/table-body-row/table-body-row.js +165 -0
  89. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +78 -0
  90. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +156 -0
  91. package/dist/collection/components/data-table/table-component-basic.stories.js +161 -0
  92. package/dist/collection/components/data-table/table-component-batch-actions.stories.js +128 -0
  93. package/dist/collection/components/data-table/table-component-bodydata.stories.js +58 -0
  94. package/dist/collection/components/data-table/table-component-custom-width.stories.js +197 -0
  95. package/dist/collection/components/data-table/table-component-event-listeners.stories.js +151 -0
  96. package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +135 -0
  97. package/dist/collection/components/data-table/table-component-filtering.stories.js +137 -0
  98. package/dist/collection/components/data-table/table-component-multiselect.stories.js +158 -0
  99. package/dist/collection/components/data-table/table-component-pagination.stories.js +127 -0
  100. package/dist/collection/components/data-table/table-component-sorting.stories.js +126 -0
  101. package/dist/collection/components/data-table/table-footer/table-footer.css +97 -0
  102. package/dist/collection/components/data-table/table-footer/table-footer.js +354 -0
  103. package/dist/collection/components/data-table/table-header/table-header.css +190 -0
  104. package/dist/collection/components/data-table/table-header/table-header.js +152 -0
  105. package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +127 -0
  106. package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +317 -0
  107. package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +93 -0
  108. package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +141 -0
  109. package/dist/collection/components/datetime/datetime.css +385 -0
  110. package/dist/collection/components/datetime/datetime.js +352 -0
  111. package/dist/collection/components/datetime/datetime.stories.js +207 -0
  112. package/dist/collection/components/divider/divider.stories.js +133 -0
  113. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +339 -0
  114. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +130 -0
  115. package/dist/collection/components/dropdown/dropdown-native.stories.js +90 -0
  116. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +185 -0
  117. package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +167 -0
  118. package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +146 -0
  119. package/dist/collection/components/dropdown/dropdown.css +951 -0
  120. package/dist/collection/components/dropdown/dropdown.js +577 -0
  121. package/dist/collection/components/footer/footer.stories.js +117 -0
  122. package/dist/collection/components/header/header-all.stories.js +217 -0
  123. package/dist/collection/components/header/header-default.stories.js +47 -0
  124. package/dist/collection/components/header/header-inline.stories.js +113 -0
  125. package/dist/collection/components/header/header-search.stories.js +263 -0
  126. package/dist/collection/components/header/header-toolbar.stories.js +204 -0
  127. package/dist/collection/components/icon/icon-font.stories.js +57 -0
  128. package/dist/collection/components/icon/icon-web-component.stories.js +51 -0
  129. package/dist/collection/components/icon/icon.css +16 -0
  130. package/dist/collection/components/icon/icon.js +89 -0
  131. package/dist/collection/components/icon/iconsArray.js +2 -0
  132. package/dist/collection/components/link/link.stories.js +45 -0
  133. package/dist/collection/components/link/sdds-link.css +36 -0
  134. package/dist/collection/components/link/sdds-link.js +121 -0
  135. package/dist/collection/components/link/sdds-link.stories.js +70 -0
  136. package/dist/collection/components/message/message.stories.js +108 -0
  137. package/dist/collection/components/message/sdds-message.css +70 -0
  138. package/dist/collection/components/message/sdds-message.js +135 -0
  139. package/dist/collection/components/message/sdds-message.stories.js +106 -0
  140. package/dist/collection/components/modal/modal-native.stories.js +129 -0
  141. package/dist/collection/components/modal/modal-webcomponent.stories.js +86 -0
  142. package/dist/collection/components/modal/modal.css +350 -0
  143. package/dist/collection/components/modal/modal.js +148 -0
  144. package/dist/collection/components/popover-canvas/popover-canvas.css +20 -0
  145. package/dist/collection/components/popover-canvas/popover-canvas.js +219 -0
  146. package/dist/collection/components/popover-canvas/popover-canvas.stories.js +89 -0
  147. package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +121 -0
  148. package/dist/collection/components/popover-menu/popover-menu.css +19 -0
  149. package/dist/collection/components/popover-menu/popover-menu.js +220 -0
  150. package/dist/collection/components/popover-menu/popover-menu.stories.js +114 -0
  151. package/dist/collection/components/radio-button/radio-button-component.css +123 -0
  152. package/dist/collection/components/radio-button/radio-button-component.stories.js +91 -0
  153. package/dist/collection/components/radio-button/radio-button.js +160 -0
  154. package/dist/collection/components/radio-button/radio-button.stories.js +68 -0
  155. package/dist/collection/components/side-menu/side-menu.stories.js +182 -0
  156. package/dist/collection/components/slider/slider.css +297 -0
  157. package/dist/collection/components/slider/slider.js +721 -0
  158. package/dist/collection/components/slider/slider.stories.js +208 -0
  159. package/dist/collection/components/spinner/spinner.css +79 -0
  160. package/dist/collection/components/spinner/spinner.js +61 -0
  161. package/dist/collection/components/spinner/spinner.stories.js +59 -0
  162. package/dist/collection/components/stepper/stepper.stories.js +139 -0
  163. package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.css +3 -0
  164. package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.js +80 -0
  165. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +156 -0
  166. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +312 -0
  167. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +71 -0
  168. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +141 -0
  169. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +128 -0
  170. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +46 -0
  171. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +157 -0
  172. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +128 -0
  173. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +32 -0
  174. package/dist/collection/components/textarea/textarea.css +298 -0
  175. package/dist/collection/components/textarea/textarea.js +402 -0
  176. package/dist/collection/components/textarea/textarea.stories.js +169 -0
  177. package/dist/collection/components/textfield/textfield.css +502 -0
  178. package/dist/collection/components/textfield/textfield.js +439 -0
  179. package/dist/collection/components/textfield/textfield.stories.js +239 -0
  180. package/dist/collection/components/toast/sdds-toast.css +102 -0
  181. package/dist/collection/components/toast/sdds-toast.js +256 -0
  182. package/dist/collection/components/toast/sdds-toast.stories.js +86 -0
  183. package/dist/collection/components/toast/toast.stories.js +129 -0
  184. package/dist/collection/components/toggle/sdds-toggle.css +104 -0
  185. package/dist/collection/components/toggle/sdds-toggle.js +261 -0
  186. package/dist/collection/components/toggle/sdds-toggle.stories.js +92 -0
  187. package/dist/collection/components/toggle/toggle.stories.js +72 -0
  188. package/dist/collection/components/tooltip/tooltip.css +46 -0
  189. package/dist/collection/components/tooltip/tooltip.js +229 -0
  190. package/dist/collection/components/tooltip/tooltip.stories.js +115 -0
  191. package/dist/collection/components/utility/colour/background-color.stories.js +96 -0
  192. package/dist/collection/components/utility/colour/text-color.stories.js +94 -0
  193. package/dist/collection/foundations-stories/colour/colour-brand.stories.js +38 -0
  194. package/dist/collection/foundations-stories/colour/colour-scales.stories.js +71 -0
  195. package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +40 -0
  196. package/dist/collection/foundations-stories/grid/grid.stories.js +386 -0
  197. package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +100 -0
  198. package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +94 -0
  199. package/dist/collection/foundations-stories/typography/typography-body.stories.js +16 -0
  200. package/dist/collection/foundations-stories/typography/typography-detail.stories.js +17 -0
  201. package/dist/collection/foundations-stories/typography/typography-headline.stories.js +39 -0
  202. package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +12 -0
  203. package/dist/collection/index.js +1 -0
  204. package/dist/collection/stories/assets/code-brackets.svg +1 -0
  205. package/dist/collection/stories/assets/colors.svg +1 -0
  206. package/dist/collection/stories/assets/comments.svg +1 -0
  207. package/dist/collection/stories/assets/direction.svg +1 -0
  208. package/dist/collection/stories/assets/flow.svg +1 -0
  209. package/dist/collection/stories/assets/plugin.svg +1 -0
  210. package/dist/collection/stories/assets/repo.svg +1 -0
  211. package/dist/collection/stories/assets/stackalt.svg +1 -0
  212. package/dist/collection/utils/utils.js +12 -0
  213. package/dist/components/dropdown-option.js +100 -0
  214. package/dist/components/dropdown.js +303 -0
  215. package/dist/components/icon.js +58 -0
  216. package/dist/components/index.d.ts +62 -0
  217. package/dist/components/index.js +42 -0
  218. package/dist/components/popper.js +1799 -0
  219. package/dist/components/sdds-accordion-item.d.ts +11 -0
  220. package/dist/components/sdds-accordion-item.js +60 -0
  221. package/dist/components/sdds-accordion.d.ts +11 -0
  222. package/dist/components/sdds-accordion.js +38 -0
  223. package/dist/components/sdds-badges.d.ts +11 -0
  224. package/dist/components/sdds-badges.js +75 -0
  225. package/dist/components/sdds-banner.d.ts +11 -0
  226. package/dist/components/sdds-banner.js +119 -0
  227. package/dist/components/sdds-block.d.ts +11 -0
  228. package/dist/components/sdds-block.js +48 -0
  229. package/dist/components/sdds-body-cell.d.ts +11 -0
  230. package/dist/components/sdds-body-cell.js +6 -0
  231. package/dist/components/sdds-breadcrumb-item.d.ts +11 -0
  232. package/dist/components/sdds-breadcrumb-item.js +43 -0
  233. package/dist/components/sdds-breadcrumb.d.ts +11 -0
  234. package/dist/components/sdds-breadcrumb.js +37 -0
  235. package/dist/components/sdds-button.d.ts +11 -0
  236. package/dist/components/sdds-button.js +59 -0
  237. package/dist/components/sdds-card.d.ts +11 -0
  238. package/dist/components/sdds-card.js +84 -0
  239. package/dist/components/sdds-checkbox.d.ts +11 -0
  240. package/dist/components/sdds-checkbox.js +76 -0
  241. package/dist/components/sdds-datetime.d.ts +11 -0
  242. package/dist/components/sdds-datetime.js +129 -0
  243. package/dist/components/sdds-dropdown-filter.d.ts +11 -0
  244. package/dist/components/sdds-dropdown-filter.js +138 -0
  245. package/dist/components/sdds-dropdown-option.d.ts +11 -0
  246. package/dist/components/sdds-dropdown-option.js +6 -0
  247. package/dist/components/sdds-dropdown.d.ts +11 -0
  248. package/dist/components/sdds-dropdown.js +6 -0
  249. package/dist/components/sdds-header-cell.d.ts +11 -0
  250. package/dist/components/sdds-header-cell.js +170 -0
  251. package/dist/components/sdds-icon.d.ts +11 -0
  252. package/dist/components/sdds-icon.js +6 -0
  253. package/dist/components/sdds-inline-tab.d.ts +11 -0
  254. package/dist/components/sdds-inline-tab.js +40 -0
  255. package/dist/components/sdds-inline-tabs-fullbleed.d.ts +11 -0
  256. package/dist/components/sdds-inline-tabs-fullbleed.js +117 -0
  257. package/dist/components/sdds-inline-tabs.d.ts +11 -0
  258. package/dist/components/sdds-inline-tabs.js +245 -0
  259. package/dist/components/sdds-link.d.ts +11 -0
  260. package/dist/components/sdds-link.js +6 -0
  261. package/dist/components/sdds-link2.js +44 -0
  262. package/dist/components/sdds-message.d.ts +11 -0
  263. package/dist/components/sdds-message.js +67 -0
  264. package/dist/components/sdds-modal.d.ts +11 -0
  265. package/dist/components/sdds-modal.js +77 -0
  266. package/dist/components/sdds-navigation-tabs.d.ts +11 -0
  267. package/dist/components/sdds-navigation-tabs.js +117 -0
  268. package/dist/components/sdds-popover-canvas.d.ts +11 -0
  269. package/dist/components/sdds-popover-canvas.js +108 -0
  270. package/dist/components/sdds-popover-menu.d.ts +11 -0
  271. package/dist/components/sdds-popover-menu.js +109 -0
  272. package/dist/components/sdds-radio-button.d.ts +11 -0
  273. package/dist/components/sdds-radio-button.js +52 -0
  274. package/dist/components/sdds-slider.d.ts +11 -0
  275. package/dist/components/sdds-slider.js +394 -0
  276. package/dist/components/sdds-spinner.d.ts +11 -0
  277. package/dist/components/sdds-spinner.js +37 -0
  278. package/dist/components/sdds-table-body-row-expandable.d.ts +11 -0
  279. package/dist/components/sdds-table-body-row-expandable.js +105 -0
  280. package/dist/components/sdds-table-body-row.d.ts +11 -0
  281. package/dist/components/sdds-table-body-row.js +6 -0
  282. package/dist/components/sdds-table-body.d.ts +11 -0
  283. package/dist/components/sdds-table-body.js +337 -0
  284. package/dist/components/sdds-table-footer.d.ts +11 -0
  285. package/dist/components/sdds-table-footer.js +195 -0
  286. package/dist/components/sdds-table-header.d.ts +11 -0
  287. package/dist/components/sdds-table-header.js +124 -0
  288. package/dist/components/sdds-table-toolbar.d.ts +11 -0
  289. package/dist/components/sdds-table-toolbar.js +87 -0
  290. package/dist/components/sdds-table.d.ts +11 -0
  291. package/dist/components/sdds-table.js +91 -0
  292. package/dist/components/sdds-textarea.d.ts +11 -0
  293. package/dist/components/sdds-textarea.js +109 -0
  294. package/dist/components/sdds-textfield.d.ts +11 -0
  295. package/dist/components/sdds-textfield.js +127 -0
  296. package/dist/components/sdds-toast.d.ts +11 -0
  297. package/dist/components/sdds-toast.js +117 -0
  298. package/dist/components/sdds-toggle.d.ts +11 -0
  299. package/dist/components/sdds-toggle.js +69 -0
  300. package/dist/components/sdds-tooltip.d.ts +11 -0
  301. package/dist/components/sdds-tooltip.js +127 -0
  302. package/dist/components/table-body-cell.js +101 -0
  303. package/dist/components/table-body-row.js +120 -0
  304. package/dist/esm/index-32571711.js +1891 -0
  305. package/dist/esm/index.js +1 -0
  306. package/dist/esm/loader.js +17 -0
  307. package/dist/esm/polyfills/core-js.js +11 -0
  308. package/dist/esm/polyfills/css-shim.js +1 -0
  309. package/dist/esm/polyfills/dom.js +79 -0
  310. package/dist/esm/polyfills/es5-html-element.js +1 -0
  311. package/dist/esm/polyfills/index.js +34 -0
  312. package/dist/esm/polyfills/system.js +6 -0
  313. package/dist/esm/popper-f860750c.js +1799 -0
  314. package/dist/esm/sdds-accordion-item.entry.js +30 -0
  315. package/dist/esm/sdds-accordion.entry.js +17 -0
  316. package/dist/esm/sdds-badges.entry.js +50 -0
  317. package/dist/esm/sdds-banner.entry.js +75 -0
  318. package/dist/esm/sdds-block.entry.js +28 -0
  319. package/dist/esm/sdds-body-cell_2.entry.js +168 -0
  320. package/dist/esm/sdds-breadcrumb-item.entry.js +21 -0
  321. package/dist/esm/sdds-breadcrumb.entry.js +19 -0
  322. package/dist/esm/sdds-button.entry.js +33 -0
  323. package/dist/esm/sdds-card.entry.js +52 -0
  324. package/dist/esm/sdds-checkbox.entry.js +51 -0
  325. package/dist/esm/sdds-datetime.entry.js +91 -0
  326. package/dist/esm/sdds-dropdown-filter.entry.js +88 -0
  327. package/dist/esm/sdds-dropdown_2.entry.js +336 -0
  328. package/dist/esm/sdds-header-cell.entry.js +135 -0
  329. package/dist/esm/sdds-icon.entry.js +38 -0
  330. package/dist/esm/sdds-inline-tab.entry.js +18 -0
  331. package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +94 -0
  332. package/dist/esm/sdds-inline-tabs.entry.js +217 -0
  333. package/dist/esm/sdds-link.entry.js +24 -0
  334. package/dist/esm/sdds-message.entry.js +37 -0
  335. package/dist/esm/sdds-modal.entry.js +47 -0
  336. package/dist/esm/sdds-navigation-tabs.entry.js +94 -0
  337. package/dist/esm/sdds-popover-canvas.entry.js +80 -0
  338. package/dist/esm/sdds-popover-menu.entry.js +81 -0
  339. package/dist/esm/sdds-radio-button.entry.js +28 -0
  340. package/dist/esm/sdds-slider.entry.js +353 -0
  341. package/dist/esm/sdds-spinner.entry.js +17 -0
  342. package/dist/esm/sdds-table-body-row-expandable.entry.js +78 -0
  343. package/dist/esm/sdds-table-body.entry.js +285 -0
  344. package/dist/esm/sdds-table-footer.entry.js +160 -0
  345. package/dist/esm/sdds-table-header.entry.js +95 -0
  346. package/dist/esm/sdds-table-toolbar.entry.js +61 -0
  347. package/dist/esm/sdds-table.entry.js +64 -0
  348. package/dist/esm/sdds-textarea.entry.js +70 -0
  349. package/dist/esm/sdds-textfield.entry.js +87 -0
  350. package/dist/esm/sdds-toast.entry.js +82 -0
  351. package/dist/esm/sdds-toggle.entry.js +40 -0
  352. package/dist/esm/sdds-tooltip.entry.js +100 -0
  353. package/dist/esm/tegel.js +17 -0
  354. package/dist/index.cjs.js +1 -0
  355. package/dist/index.js +1 -0
  356. package/dist/node_modules/@types/jest/index.d.ts +1512 -0
  357. package/dist/tegel/index.esm.js +0 -0
  358. package/dist/tegel/p-05d3cfc8.entry.js +1 -0
  359. package/dist/tegel/p-13a25c7f.entry.js +1 -0
  360. package/dist/tegel/p-13b783f1.js +2 -0
  361. package/dist/tegel/p-1dda8de9.entry.js +1 -0
  362. package/dist/tegel/p-2248b59e.entry.js +1 -0
  363. package/dist/tegel/p-232e5c9a.entry.js +1 -0
  364. package/dist/tegel/p-2375f0eb.entry.js +1 -0
  365. package/dist/tegel/p-29deedc6.entry.js +1 -0
  366. package/dist/tegel/p-2f52021b.entry.js +1 -0
  367. package/dist/tegel/p-3344582d.entry.js +1 -0
  368. package/dist/tegel/p-4b14324d.entry.js +1 -0
  369. package/dist/tegel/p-561fbe77.entry.js +1 -0
  370. package/dist/tegel/p-5a215722.entry.js +1 -0
  371. package/dist/tegel/p-5f7b1539.entry.js +1 -0
  372. package/dist/tegel/p-6f382b38.entry.js +1 -0
  373. package/dist/tegel/p-765e2719.entry.js +1 -0
  374. package/dist/tegel/p-76f60546.entry.js +1 -0
  375. package/dist/tegel/p-7a5244b6.entry.js +1 -0
  376. package/dist/tegel/p-816ff5f7.entry.js +1 -0
  377. package/dist/tegel/p-81d2d57b.entry.js +1 -0
  378. package/dist/tegel/p-87650f36.entry.js +1 -0
  379. package/dist/tegel/p-8e6f885c.entry.js +1 -0
  380. package/dist/tegel/p-8e9dcc20.entry.js +1 -0
  381. package/dist/tegel/p-997fc919.entry.js +1 -0
  382. package/dist/tegel/p-9a057c9a.entry.js +1 -0
  383. package/dist/tegel/p-9a95e92c.entry.js +1 -0
  384. package/dist/tegel/p-a75ff060.entry.js +1 -0
  385. package/dist/tegel/p-bf1216f9.entry.js +1 -0
  386. package/dist/tegel/p-bf597564.entry.js +1 -0
  387. package/dist/tegel/p-d2217bf0.entry.js +1 -0
  388. package/dist/tegel/p-e335137d.entry.js +1 -0
  389. package/dist/tegel/p-e34cce75.entry.js +1 -0
  390. package/dist/tegel/p-e55d09f2.entry.js +1 -0
  391. package/dist/tegel/p-ebbffa8a.entry.js +1 -0
  392. package/dist/tegel/p-ec26fc38.js +1 -0
  393. package/dist/tegel/p-ed076d47.entry.js +1 -0
  394. package/dist/tegel/p-ef887910.entry.js +1 -0
  395. package/dist/tegel/p-f4b70868.entry.js +1 -0
  396. package/dist/tegel/p-f52a0b63.entry.js +1 -0
  397. package/dist/tegel/p-f5bf214b.entry.js +1 -0
  398. package/dist/tegel/p-fd1b5923.entry.js +1 -0
  399. package/dist/tegel/tegel.css +109 -0
  400. package/dist/tegel/tegel.esm.js +1 -0
  401. package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +17 -0
  402. package/dist/types/components/accordion/accordion.d.ts +7 -0
  403. package/dist/types/components/accordion/accordion.stories.d.ts +77 -0
  404. package/dist/types/components/badge/badge.stories.d.ts +66 -0
  405. package/dist/types/components/badge/badges.d.ts +16 -0
  406. package/dist/types/components/banner/banner.stories.d.ts +68 -0
  407. package/dist/types/components/banner/sdds-banner.d.ts +48 -0
  408. package/dist/types/components/banner/sdds-banner.stories.d.ts +109 -0
  409. package/dist/types/components/block/block-native.stories.d.ts +31 -0
  410. package/dist/types/components/block/sdds-block.d.ts +9 -0
  411. package/dist/types/components/block/sdds-block.stories.d.ts +32 -0
  412. package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +9 -0
  413. package/dist/types/components/breadcrumb/breadcrumb.d.ts +5 -0
  414. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +12 -0
  415. package/dist/types/components/button/button-component.d.ts +18 -0
  416. package/dist/types/components/button/button-native.stories.d.ts +148 -0
  417. package/dist/types/components/button/button-webcomponent.stories.d.ts +147 -0
  418. package/dist/types/components/card/card.stories.d.ts +138 -0
  419. package/dist/types/components/card/sdds-card.d.ts +39 -0
  420. package/dist/types/components/card/sdds-card.stories.d.ts +139 -0
  421. package/dist/types/components/checkbox/checkbox.stories.d.ts +39 -0
  422. package/dist/types/components/checkbox/sdds-checkbox.d.ts +38 -0
  423. package/dist/types/components/checkbox/sdds-checkbox.stories.d.ts +40 -0
  424. package/dist/types/components/chips/chips.stories.d.ts +77 -0
  425. package/dist/types/components/data-table/native-table.stories.d.ts +133 -0
  426. package/dist/types/components/data-table/table/table.d.ts +47 -0
  427. package/dist/types/components/data-table/table-body/table-body.d.ts +54 -0
  428. package/dist/types/components/data-table/table-body-cell/table-body-cell.d.ts +24 -0
  429. package/dist/types/components/data-table/table-body-row/table-body-row.d.ts +27 -0
  430. package/dist/types/components/data-table/table-body-row-expandable/table-body-row-expandable.d.ts +27 -0
  431. package/dist/types/components/data-table/table-component-basic.stories.d.ts +101 -0
  432. package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +99 -0
  433. package/dist/types/components/data-table/table-component-bodydata.stories.d.ts +38 -0
  434. package/dist/types/components/data-table/table-component-custom-width.stories.d.ts +148 -0
  435. package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +88 -0
  436. package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +88 -0
  437. package/dist/types/components/data-table/table-component-filtering.stories.d.ts +101 -0
  438. package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +101 -0
  439. package/dist/types/components/data-table/table-component-pagination.stories.d.ts +101 -0
  440. package/dist/types/components/data-table/table-component-sorting.stories.d.ts +100 -0
  441. package/dist/types/components/data-table/table-footer/table-footer.d.ts +50 -0
  442. package/dist/types/components/data-table/table-header/table-header.d.ts +27 -0
  443. package/dist/types/components/data-table/table-header-cell/table-header-cell.d.ts +44 -0
  444. package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +22 -0
  445. package/dist/types/components/datetime/datetime.d.ts +42 -0
  446. package/dist/types/components/datetime/datetime.stories.d.ts +127 -0
  447. package/dist/types/components/divider/divider.stories.d.ts +65 -0
  448. package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +42 -0
  449. package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.stories.d.ts +73 -0
  450. package/dist/types/components/dropdown/dropdown-native.stories.d.ts +57 -0
  451. package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +19 -0
  452. package/dist/types/components/dropdown/dropdown-wc-default.stories.d.ts +129 -0
  453. package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +115 -0
  454. package/dist/types/components/dropdown/dropdown.d.ts +58 -0
  455. package/dist/types/components/footer/footer.stories.d.ts +45 -0
  456. package/dist/types/components/header/header-all.stories.d.ts +29 -0
  457. package/dist/types/components/header/header-default.stories.d.ts +29 -0
  458. package/dist/types/components/header/header-inline.stories.d.ts +29 -0
  459. package/dist/types/components/header/header-search.stories.d.ts +29 -0
  460. package/dist/types/components/header/header-toolbar.stories.d.ts +29 -0
  461. package/dist/types/components/icon/icon-font.stories.d.ts +38 -0
  462. package/dist/types/components/icon/icon-web-component.stories.d.ts +38 -0
  463. package/dist/types/components/icon/icon.d.ts +12 -0
  464. package/dist/types/components/link/link.stories.d.ts +33 -0
  465. package/dist/types/components/link/sdds-link.d.ts +13 -0
  466. package/dist/types/components/link/sdds-link.stories.d.ts +58 -0
  467. package/dist/types/components/message/message.stories.d.ts +69 -0
  468. package/dist/types/components/message/sdds-message.d.ts +14 -0
  469. package/dist/types/components/message/sdds-message.stories.d.ts +87 -0
  470. package/dist/types/components/modal/modal-native.stories.d.ts +59 -0
  471. package/dist/types/components/modal/modal-webcomponent.stories.d.ts +52 -0
  472. package/dist/types/components/modal/modal.d.ts +17 -0
  473. package/dist/types/components/popover-canvas/popover-canvas.d.ts +24 -0
  474. package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +25 -0
  475. package/dist/types/components/popover-menu/popover-menu-icons.stories.d.ts +27 -0
  476. package/dist/types/components/popover-menu/popover-menu.d.ts +24 -0
  477. package/dist/types/components/popover-menu/popover-menu.stories.d.ts +27 -0
  478. package/dist/types/components/radio-button/radio-button-component.stories.d.ts +39 -0
  479. package/dist/types/components/radio-button/radio-button.d.ts +26 -0
  480. package/dist/types/components/radio-button/radio-button.stories.d.ts +33 -0
  481. package/dist/types/components/side-menu/side-menu.stories.d.ts +42 -0
  482. package/dist/types/components/slider/slider.d.ts +86 -0
  483. package/dist/types/components/slider/slider.stories.d.ts +169 -0
  484. package/dist/types/components/spinner/spinner.d.ts +7 -0
  485. package/dist/types/components/spinner/spinner.stories.d.ts +37 -0
  486. package/dist/types/components/stepper/stepper.stories.d.ts +56 -0
  487. package/dist/types/components/tabs/inline-tabs-default/inline-tab/inline-tab.d.ts +6 -0
  488. package/dist/types/components/tabs/inline-tabs-default/inline-tabs.d.ts +40 -0
  489. package/dist/types/components/tabs/inline-tabs-default/inline-tabs.stories.d.ts +49 -0
  490. package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.d.ts +20 -0
  491. package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.d.ts +30 -0
  492. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +20 -0
  493. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +13 -0
  494. package/dist/types/components/textarea/textarea.d.ts +48 -0
  495. package/dist/types/components/textarea/textarea.stories.d.ts +116 -0
  496. package/dist/types/components/textfield/textfield.d.ts +52 -0
  497. package/dist/types/components/textfield/textfield.stories.d.ts +180 -0
  498. package/dist/types/components/toast/sdds-toast.d.ts +36 -0
  499. package/dist/types/components/toast/sdds-toast.stories.d.ts +56 -0
  500. package/dist/types/components/toast/toast.stories.d.ts +69 -0
  501. package/dist/types/components/toggle/sdds-toggle.d.ts +34 -0
  502. package/dist/types/components/toggle/sdds-toggle.stories.d.ts +74 -0
  503. package/dist/types/components/toggle/toggle.stories.d.ts +55 -0
  504. package/dist/types/components/tooltip/tooltip.d.ts +24 -0
  505. package/dist/types/components/tooltip/tooltip.stories.d.ts +54 -0
  506. package/dist/types/components/utility/colour/background-color.stories.d.ts +58 -0
  507. package/dist/types/components/utility/colour/text-color.stories.d.ts +58 -0
  508. package/dist/types/components.d.ts +2643 -0
  509. package/dist/types/foundations-stories/colour/colour-brand.stories.d.ts +13 -0
  510. package/dist/types/foundations-stories/colour/colour-scales.stories.d.ts +13 -0
  511. package/dist/types/foundations-stories/colour/colour-semantic.stories.d.ts +13 -0
  512. package/dist/types/foundations-stories/grid/grid.stories.d.ts +35 -0
  513. package/dist/types/foundations-stories/spacing/spacing-element.stories.d.ts +8 -0
  514. package/dist/types/foundations-stories/spacing/spacing-layout.stories.d.ts +8 -0
  515. package/dist/types/foundations-stories/typography/typography-body.stories.d.ts +8 -0
  516. package/dist/types/foundations-stories/typography/typography-detail.stories.d.ts +8 -0
  517. package/dist/types/foundations-stories/typography/typography-headline.stories.d.ts +21 -0
  518. package/dist/types/foundations-stories/typography/typography-paragraph.stories.d.ts +8 -0
  519. package/dist/types/global.d.ts +2 -0
  520. package/dist/types/index.d.ts +1 -0
  521. package/dist/types/stencil-public-runtime.d.ts +1581 -0
  522. package/dist/types/utils/utils.d.ts +2 -0
  523. package/loader/cdn.js +3 -0
  524. package/loader/index.cjs.js +3 -0
  525. package/loader/index.d.ts +12 -0
  526. package/loader/index.es2017.js +3 -0
  527. package/loader/index.js +4 -0
  528. package/loader/package.json +11 -0
  529. package/package.json +1 -1
  530. package/readme.md +34 -0
@@ -0,0 +1,17 @@
1
+ import { r as registerInstance, h } from './index-32571711.js';
2
+
3
+ const spinnerCss = ":root,html{--sdds-spinner-background:var(--sdds-blue-400);--sdds-spinner-background-inverted:var(--sdds-white);--sdds-spinner-speed:1.8s;--sdds-spinner-speed-lg:2s;--sdds-spinner-radius-xs:8px;--sdds-spinner-radius-sm:12px;--sdds-spinner-radius-md:26px;--sdds-spinner-radius-lg:42px;--sdds-spinner-radius:var(--sdds-spinner-radius-lg);--sdds-spinner-stroke-width-xs:3px;--sdds-spinner-stroke-width-sm:4px;--sdds-spinner-stroke-width-md:6px;--sdds-spinner-stroke-width-lg:8px;--sdds-spinner-stroke-width:var(--sdds-spinner-stroke-width-lg);--PI:3.14159265358979}:host{box-sizing:border-box;display:block}:host *{box-sizing:border-box}.sdds-spinner-svg{width:calc(var(--sdds-spinner-radius) * 2);height:calc(var(--sdds-spinner-radius) * 2);transform:scale(-1, 1) rotate(-90deg)}.sdds-spinner-svg-xs{--sdds-spinner-radius:var(--sdds-spinner-radius-xs);--sdds-spinner-stroke-width:var(--sdds-spinner-stroke-width-xs);--sdds-spinner-animation-speed:var(--sdds-spinner-speed)}.sdds-spinner-svg-sm{--sdds-spinner-radius:var(--sdds-spinner-radius-sm);--sdds-spinner-stroke-width:var(--sdds-spinner-stroke-width-sm);--sdds-spinner-animation-speed:var(--sdds-spinner-speed)}.sdds-spinner-svg-md{--sdds-spinner-radius:var(--sdds-spinner-radius-md);--sdds-spinner-stroke-width:var(--sdds-spinner-stroke-width-md);--sdds-spinner-animation-speed:var(--sdds-spinner-speed)}.sdds-spinner-svg-lg{--sdds-spinner-radius:var(--sdds-spinner-radius-lg);--sdds-spinner-stroke-width:var(--sdds-spinner-stroke-width-lg);--sdds-spinner-animation-speed:var(--sdds-spinner-speed-lg)}.sdds-spinner-circle{cx:var(--sdds-spinner-radius);cy:var(--sdds-spinner-radius);r:calc(var(--sdds-spinner-radius) - var(--sdds-spinner-stroke-width) / 2);stroke-width:var(--sdds-spinner-stroke-width);fill:none;--sdds-spinner-stroke-dash:calc((2 * var(--PI)) * var(--sdds-spinner-radius));stroke-dasharray:var(--sdds-spinner-stroke-dash);stroke-width:var(--sdds-spinner-stroke-width);animation:dash var(--sdds-spinner-animation-speed) cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite}.sdds-spinner-circle-standard{stroke:var(--sdds-spinner-background)}.sdds-spinner-circle-inverted{stroke:var(--sdds-spinner-background-inverted)}@keyframes dash{from{stroke-dashoffset:calc(-1 * var(--sdds-spinner-stroke-dash))}to{stroke-dashoffset:var(--sdds-spinner-stroke-dash)}}";
4
+
5
+ const Spinner = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.size = 'lg';
9
+ this.variant = 'standard';
10
+ }
11
+ render() {
12
+ return (h("div", { "aria-live": "assertive", role: "status", "aria-label": "loading" }, h("svg", { class: `sdds-spinner-svg sdds-spinner-svg-${this.size}`, "aria-hidden": "true" }, h("circle", { class: `sdds-spinner-circle sdds-spinner-circle-${this.variant}` }))));
13
+ }
14
+ };
15
+ Spinner.style = spinnerCss;
16
+
17
+ export { Spinner as sdds_spinner };
@@ -0,0 +1,78 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-32571711.js';
2
+
3
+ const tableBodyRowExpandableCss = ":host{box-sizing:border-box;display:contents}:host *{box-sizing:border-box}:host .sdds-table__row,:host .sdds-table__row-extend{display:table-row;border-bottom:1px solid var(--sdds-data-table-divider);background-color:var(--sdds-data-table-body-row-background);transition:background-color 200ms ease;color:var(--sdds-data-table-color)}:host .sdds-table__row:hover,:host .sdds-table__row-extend:hover{background-color:var(--sdds-data-table-body-row-background-hover)}:host .sdds-table__expand-control-container{display:flex;justify-content:center;align-items:center;height:46px;cursor:pointer;padding:0 16px;position:relative}:host .sdds-table__expand-control-container .sdds-table__expand-input{all:unset;position:absolute;top:0;left:0;width:100%;height:100%;position:absolute;cursor:pointer}:host .sdds-table__expand-control-container .sdds-table__expand-input:focus{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}:host .sdds-table__expand-control-container .sdds-expendable-row-icon{height:16px;width:16px;transition:transform 200ms ease;transform:rotate(0)}:host .sdds-table__row-expand{display:none;transition:background-color 200ms ease}:host .sdds-table__row-expand .sdds-table__cell-expand{padding:16px 16px 16px 66px;color:var(--sdds-data-table-color)}:host(.sdds-table__row-expand--active) .sdds-table__row{background-color:var(--sdds-data-table-body-row-background-selected)}:host(.sdds-table__row-expand--active) .sdds-table__expand-control-container .sdds-expendable-row-icon{transform:rotate(180deg)}:host(.sdds-table__row-expand--active) .sdds-table__row-expand{background-color:var(--sdds-data-table-body-row-background-selected);display:table-row}:host(.sdds-table__compact) .sdds-table__expand-control-container{height:30px}:host(.sdds-table__compact) .sdds-table__row-expand .sdds-table__cell-expand{padding:8px 16px 8px 66px}:host(.sdds-table--divider) .sdds-table__cell--expand{border-right:1px solid var(--sdds-data-table-divider)}";
4
+
5
+ const relevantTableProps = [
6
+ 'verticalDividers',
7
+ 'compactDesign',
8
+ 'noMinWidth',
9
+ 'modeVariant',
10
+ ];
11
+ const TableBodyRowExpandable = class {
12
+ constructor(hostRef) {
13
+ registerInstance(this, hostRef);
14
+ this.singleRowExpandedEvent = createEvent(this, "singleRowExpandedEvent", 7);
15
+ this.runPaginationEvent = createEvent(this, "runPaginationEvent", 7);
16
+ this.colSpan = null;
17
+ this.isExpanded = false;
18
+ this.tableId = '';
19
+ this.columnsNumber = null;
20
+ this.verticalDividers = false;
21
+ this.compactDesign = false;
22
+ this.noMinWidth = false;
23
+ this.modeVariant = null;
24
+ }
25
+ tablePropsChangedEventListener(event) {
26
+ if (this.tableId === event.detail.tableId) {
27
+ event.detail.changed
28
+ .filter((changedProp) => relevantTableProps.includes(changedProp))
29
+ .forEach((changedProp) => {
30
+ if (typeof this[changedProp] === 'undefined') {
31
+ throw new Error(`Table prop is not supported: ${changedProp}`);
32
+ }
33
+ this[changedProp] = event.detail[changedProp];
34
+ });
35
+ }
36
+ }
37
+ connectedCallback() {
38
+ this.tableEl = this.host.closest('sdds-table');
39
+ this.tableId = this.tableEl.tableId;
40
+ }
41
+ componentWillLoad() {
42
+ relevantTableProps.forEach((tablePropName) => {
43
+ this[tablePropName] = this.tableEl[tablePropName];
44
+ });
45
+ }
46
+ componentDidLoad() {
47
+ this.runPaginationEvent.emit(this.tableId);
48
+ }
49
+ componentWillRender() {
50
+ if (this.colSpan !== null) {
51
+ this.columnsNumber = this.colSpan;
52
+ }
53
+ else {
54
+ this.columnsNumber = this.tableEl.querySelector('sdds-table-header').childElementCount + 1;
55
+ }
56
+ }
57
+ sendValue() {
58
+ this.singleRowExpandedEvent.emit([this.tableId, this.isExpanded]);
59
+ }
60
+ onChangeHandler(event) {
61
+ this.isExpanded = event.currentTarget.checked === true;
62
+ this.sendValue();
63
+ }
64
+ render() {
65
+ return (h(Host, { class: {
66
+ 'sdds-table__row': true,
67
+ 'sdds-table__row-expand--active': this.isExpanded,
68
+ 'sdds-table__compact': this.compactDesign,
69
+ 'sdds-table--divider': this.verticalDividers,
70
+ 'sdds-mode-variant-primary': this.modeVariant === 'primary',
71
+ 'sdds-mode-variant-secondary': this.modeVariant === 'secondary',
72
+ } }, h("tr", { class: "sdds-table__row" }, h("td", { class: "sdds-table__cell sdds-table__cell--expand" }, h("label", { class: "sdds-table__expand-control-container" }, h("input", { class: "sdds-table__expand-input", type: "checkbox", onChange: (event) => this.onChangeHandler(event), checked: this.isExpanded }), h("span", { class: "sdds-expendable-row-icon" }, h("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M4.273 9.783a1 1 0 0 1 1.415 0l9.888 9.888a.6.6 0 0 0 .848 0l9.888-9.888a1 1 0 1 1 1.415 1.414l-9.889 9.889a2.6 2.6 0 0 1-3.677 0l-9.888-9.889a1 1 0 0 1 0-1.414Z", fill: "currentColor" }))))), h("slot", null)), h("tr", { class: "sdds-table__row-expand" }, h("td", { class: "sdds-table__cell-expand", colSpan: this.columnsNumber }, h("slot", { name: "expand-row" })))));
73
+ }
74
+ get host() { return getElement(this); }
75
+ };
76
+ TableBodyRowExpandable.style = tableBodyRowExpandableCss;
77
+
78
+ export { TableBodyRowExpandable as sdds_table_body_row_expandable };
@@ -0,0 +1,285 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-32571711.js';
2
+
3
+ const dummyData = [
4
+ {
5
+ truck: "L-series",
6
+ driver: "Sonya Bruce",
7
+ country: "Brazil",
8
+ mileage: 123987
9
+ },
10
+ {
11
+ truck: "P-series",
12
+ driver: "Guerra Bowman",
13
+ country: "Sweden",
14
+ mileage: 2000852
15
+ },
16
+ {
17
+ truck: "G-series",
18
+ driver: "Ferrell Wallace",
19
+ country: "Germany",
20
+ mileage: 564
21
+ },
22
+ {
23
+ truck: "R-series",
24
+ driver: "Cox Burris",
25
+ country: "Spain",
26
+ mileage: 1789357
27
+ },
28
+ {
29
+ truck: "S-series",
30
+ driver: "Montgomery Cervantes",
31
+ country: "Croatia",
32
+ mileage: 65
33
+ },
34
+ {
35
+ truck: "L-series",
36
+ driver: "Sheryl Nielsen",
37
+ country: "Greece",
38
+ mileage: 365784
39
+ },
40
+ {
41
+ truck: "G-series",
42
+ driver: "Benton Gomez",
43
+ country: "France",
44
+ mileage: 80957
45
+ }
46
+ ];
47
+
48
+ const tableBodyCss = ":host,sdds-table-body{box-sizing:border-box;display:table-row-group}:host *,sdds-table-body *{box-sizing:border-box}:host .sdds-table__info-message,sdds-table-body .sdds-table__info-message{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls);display:table-cell;box-sizing:border-box;color:var(--sdds-data-table-color);padding:var(--sdds-spacing-element-16);min-width:192px;vertical-align:top;background-color:transparent;transition:background-color 200ms ease}";
49
+
50
+ const relevantTableProps = [
51
+ 'enableMultiselect',
52
+ 'enableExpandableRows',
53
+ ];
54
+ const TableBody = class {
55
+ constructor(hostRef) {
56
+ registerInstance(this, hostRef);
57
+ this.sortingSwitcherEvent = createEvent(this, "sortingSwitcherEvent", 7);
58
+ this.updateBodyCheckboxesEvent = createEvent(this, "updateBodyCheckboxesEvent", 7);
59
+ this.updateMainCheckboxEvent = createEvent(this, "updateMainCheckboxEvent", 7);
60
+ this.uncheckAll = () => {
61
+ this.mainCheckboxStatus = false;
62
+ this.updateMainCheckboxEvent.emit([this.tableId, this.mainCheckboxStatus]);
63
+ this.updateBodyCheckboxesEvent.emit([this.tableId, this.mainCheckboxStatus]);
64
+ };
65
+ this.selectedDataExporter = () => {
66
+ const selectedRows = this.host.getElementsByClassName('sdds-table__row--selected');
67
+ this.multiselectArray = [];
68
+ for (let j = 0; j < selectedRows.length; j++) {
69
+ const rowCells = selectedRows[j].getElementsByTagName('sdds-body-cell');
70
+ const selectedObject = {};
71
+ for (let i = 0; i < rowCells.length; i++) {
72
+ const currentCellKey = rowCells[i].getAttribute('cell-key');
73
+ const currentCellValue = rowCells[i].getAttribute('cell-value');
74
+ selectedObject[currentCellKey] = currentCellValue;
75
+ }
76
+ this.multiselectArray.push(selectedObject);
77
+ }
78
+ this.multiselectArrayJSON = JSON.stringify(this.multiselectArray);
79
+ };
80
+ this.bodyCheckBoxClicked = () => {
81
+ const numberOfRows = this.host.getElementsByClassName('sdds-table__row').length;
82
+ const numberOfRowsSelected = this.host.getElementsByClassName('sdds-table__row--selected').length;
83
+ this.mainCheckboxStatus = numberOfRows === numberOfRowsSelected;
84
+ this.updateMainCheckboxEvent.emit([this.tableId, this.mainCheckboxStatus]);
85
+ this.selectedDataExporter();
86
+ };
87
+ this.disableFilteringFunction = false;
88
+ this.disableSortingFunction = false;
89
+ this.bodyData = undefined;
90
+ this.enableDummyData = false;
91
+ this.dummyData = JSON.stringify(dummyData);
92
+ this.rowsPerPage = 1;
93
+ this.enableMultiselect = false;
94
+ this.enablePaginationTableBody = false;
95
+ this.enableExpandableRows = true;
96
+ this.innerBodyData = [];
97
+ this.bodyDataManipulated = [];
98
+ this.bodyDataOriginal = [];
99
+ this.multiselectArray = [];
100
+ this.multiselectArrayJSON = undefined;
101
+ this.mainCheckboxStatus = false;
102
+ this.columnsNumber = 0;
103
+ this.disableAllSorting = false;
104
+ this.numberOfPages = 0;
105
+ this.paginationValue = 1;
106
+ this.tempPaginationDisable = false;
107
+ this.showNoResultsMessage = false;
108
+ this.tableId = '';
109
+ }
110
+ arrayDataWatcher(newValue) {
111
+ if (typeof newValue === 'string') {
112
+ this.innerBodyData = JSON.parse(newValue);
113
+ }
114
+ else {
115
+ this.innerBodyData = newValue;
116
+ }
117
+ this.bodyDataManipulated = [...this.innerBodyData];
118
+ this.bodyDataOriginal = [...this.innerBodyData];
119
+ }
120
+ tablePropsChangedEventListener(event) {
121
+ if (this.tableId === event.detail.tableId) {
122
+ event.detail.changed
123
+ .filter((changedProp) => relevantTableProps.includes(changedProp))
124
+ .forEach((changedProp) => {
125
+ if (typeof this[changedProp] === 'undefined') {
126
+ throw new Error(`Table prop is not supported: ${changedProp}`);
127
+ }
128
+ this[changedProp] = event.detail[changedProp];
129
+ });
130
+ }
131
+ }
132
+ static compareValues(key, order = 'asc') {
133
+ return function innerSort(a, b) {
134
+ // eslint-disable-next-line no-prototype-builtins
135
+ if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
136
+ // property doesn't exist on either object
137
+ return 0;
138
+ }
139
+ const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key];
140
+ const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key];
141
+ let comparison = 0;
142
+ if (varA > varB) {
143
+ comparison = 1;
144
+ }
145
+ else if (varA < varB) {
146
+ comparison = -1;
147
+ }
148
+ return order === 'desc' ? comparison * -1 : comparison;
149
+ };
150
+ }
151
+ sortData(keyValue, sortingDirection) {
152
+ if (!this.disableSortingFunction) {
153
+ if (this.enableMultiselect) {
154
+ // Uncheck all checkboxes as state of checkbox is lost on sorting. Do it only in case multiSelect is True.
155
+ this.uncheckAll();
156
+ }
157
+ // use spread operator to make enable sorting and modifying array, same as using .slice()
158
+ this.bodyDataManipulated = [...this.bodyDataManipulated];
159
+ this.bodyDataManipulated.sort(TableBody.compareValues(keyValue, sortingDirection));
160
+ }
161
+ }
162
+ // Listen to sortColumnData from data-table-header-element
163
+ updateOptionsContent(event) {
164
+ const [receivedID, receivedKeyValue, receivedSortingDirection] = event.detail;
165
+ if (this.tableId === receivedID) {
166
+ this.sortData(receivedKeyValue, receivedSortingDirection);
167
+ }
168
+ }
169
+ headCheckboxListener(event) {
170
+ if (this.tableId === event.detail[0]) {
171
+ [, this.mainCheckboxStatus] = event.detail;
172
+ this.selectedDataExporter();
173
+ }
174
+ }
175
+ // No need to read the value, event is here just to trigger another function
176
+ bodyCheckboxListener() {
177
+ this.bodyCheckBoxClicked();
178
+ }
179
+ searchFunction(searchTerm) {
180
+ if (!this.disableFilteringFunction) {
181
+ /*
182
+ // Logic for filtering JSON data on all columns
183
+ // Really nice solution, do not delete, might be needed in future
184
+ // Reason to go with upper one is not to lose selected state on checkboxes
185
+ if (searchTerm.length > 0) {
186
+ this.bodyDataManipulated = this.bodyDataOriginal.filter((option) =>
187
+ Object.keys(option).some(
188
+ (key) =>
189
+ String(option[key] ?? '')
190
+ .toLowerCase()
191
+ .indexOf(searchTerm) >= 0
192
+ )
193
+ );
194
+ } else {
195
+ this.bodyDataManipulated = this.bodyDataOriginal;
196
+ }
197
+ */
198
+ // grab all rows in body
199
+ const dataRowsFiltering = this.host.querySelectorAll('sdds-table-body-row');
200
+ if (searchTerm.length > 0) {
201
+ if (this.enablePaginationTableBody) {
202
+ this.tempPaginationDisable = true;
203
+ }
204
+ dataRowsFiltering.forEach((item) => {
205
+ const cells = item.querySelectorAll('sdds-body-cell');
206
+ const cellValuesArray = [];
207
+ // go through cells and save cell-values in array
208
+ cells.forEach((cellItem) => {
209
+ const cellValue = cellItem.getAttribute('cell-value').toLowerCase();
210
+ cellValuesArray.push(cellValue);
211
+ });
212
+ // iterate over array of values and see if one matches search string
213
+ const matchCounter = cellValuesArray.find((element) => element.includes(searchTerm));
214
+ // if matches, show parent row, otherwise hide the row
215
+ if (matchCounter) {
216
+ item.classList.remove('sdds-table__row--hidden');
217
+ }
218
+ else {
219
+ item.classList.add('sdds-table__row--hidden');
220
+ }
221
+ });
222
+ this.disableAllSorting = true;
223
+ this.sortingSwitcherEvent.emit([this.tableId, this.disableAllSorting]);
224
+ const dataRowsHidden = this.host.querySelectorAll('.sdds-table__row--hidden');
225
+ // If same, info message will be shown
226
+ this.showNoResultsMessage = dataRowsHidden.length === dataRowsFiltering.length;
227
+ }
228
+ else {
229
+ if (this.enablePaginationTableBody) {
230
+ this.tempPaginationDisable = false;
231
+ }
232
+ // Check if pagination is ON in order to prevent showing all rows
233
+ if (this.enablePaginationTableBody) ;
234
+ else {
235
+ dataRowsFiltering.forEach((item) => {
236
+ item.classList.remove('sdds-table__row--hidden');
237
+ });
238
+ }
239
+ this.disableAllSorting = false;
240
+ this.sortingSwitcherEvent.emit([this.tableId, this.disableAllSorting]);
241
+ }
242
+ }
243
+ }
244
+ // Listen to tableFilteringTerm from tableToolbar component
245
+ tableFilteringTermListener(event) {
246
+ if (this.tableId === event.detail[0]) {
247
+ this.searchFunction(event.detail[1]);
248
+ }
249
+ }
250
+ connectedCallback() {
251
+ this.tableEl = this.host.closest('sdds-table');
252
+ this.tableId = this.tableEl.tableId;
253
+ }
254
+ componentWillLoad() {
255
+ relevantTableProps.forEach((tablePropName) => {
256
+ this[tablePropName] = this.tableEl[tablePropName];
257
+ });
258
+ if (this.enableDummyData) {
259
+ this.bodyData = this.dummyData;
260
+ }
261
+ else if (this.bodyData) {
262
+ this.arrayDataWatcher(this.bodyData);
263
+ }
264
+ }
265
+ componentWillRender() {
266
+ const headerColumnsNo = this.host.parentElement.querySelector('sdds-table-header').children.length;
267
+ // multiselect and expended features requires one extra column for controls...
268
+ if (this.enableMultiselect || this.enableExpandableRows) {
269
+ this.columnsNumber = headerColumnsNo + 1;
270
+ }
271
+ else {
272
+ this.columnsNumber = headerColumnsNo;
273
+ }
274
+ }
275
+ render() {
276
+ return (h(Host, { "data-selected-rows": this.multiselectArrayJSON }, this.bodyDataManipulated.map((row) => (h("sdds-table-body-row", null, Object.keys(row).map((cellData) => (h("sdds-body-cell", { "cell-key": cellData, "cell-value": row[cellData] })))))), this.showNoResultsMessage && (h("tr", null, h("td", { class: "sdds-table__info-message", colSpan: this.columnsNumber }, "Unfortunately, no data matches your search term \uD83D\uDE15"))), h("slot", null)));
277
+ }
278
+ get host() { return getElement(this); }
279
+ static get watchers() { return {
280
+ "bodyData": ["arrayDataWatcher"]
281
+ }; }
282
+ };
283
+ TableBody.style = tableBodyCss;
284
+
285
+ export { TableBody as sdds_table_body };
@@ -0,0 +1,160 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-32571711.js';
2
+
3
+ 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}";
4
+
5
+ const relevantTableProps = [
6
+ 'compactDesign',
7
+ 'noMinWidth',
8
+ 'verticalDividers',
9
+ ];
10
+ function removeShakeAnimation(e) {
11
+ e.target.classList.remove('sdds-table__page-selector-input--shake');
12
+ }
13
+ const TableFooter = class {
14
+ constructor(hostRef) {
15
+ registerInstance(this, hostRef);
16
+ this.enablePaginationEvent = createEvent(this, "enablePaginationEvent", 7);
17
+ this.currentPageValueEvent = createEvent(this, "currentPageValueEvent", 7);
18
+ this.paginationPrev = (event) => {
19
+ event.preventDefault();
20
+ // Enable lowering until 1st page
21
+ if (this.paginationValue >= 2) {
22
+ this.paginationValue--;
23
+ this.runPagination();
24
+ }
25
+ };
26
+ this.paginationNext = (event) => {
27
+ event.preventDefault();
28
+ // Enable increasing until the max number of pages
29
+ if (this.paginationValue <= this.numberOfPages) {
30
+ this.paginationValue++;
31
+ this.runPagination();
32
+ }
33
+ };
34
+ this.runPagination = () => {
35
+ if (!this.disablePaginationFunction) {
36
+ // grab all rows in body
37
+ const dataRowsPagination = this.host.parentNode
38
+ .querySelector('sdds-table-body')
39
+ .querySelectorAll('.sdds-table__row');
40
+ dataRowsPagination.forEach((item, i) => {
41
+ // for making logic easier 1st result, 2nd result...
42
+ const index = i + 1;
43
+ if (this.tempPaginationDisable) {
44
+ this.paginationValue = 1;
45
+ }
46
+ else {
47
+ const lastResult = this.rowsPerPage * this.paginationValue;
48
+ const firstResult = lastResult - this.rowsPerPage;
49
+ if (index > firstResult && index <= lastResult) {
50
+ item.classList.remove('sdds-table__row--hidden');
51
+ }
52
+ else {
53
+ item.classList.add('sdds-table__row--hidden');
54
+ }
55
+ }
56
+ });
57
+ }
58
+ };
59
+ this.clientPaginationPrev = (event) => {
60
+ event.preventDefault();
61
+ // Enable lowering until 1st page
62
+ if (this.clientPaginationValue >= 2) {
63
+ this.clientPaginationValue--;
64
+ this.sendPaginationValue(this.clientPaginationValue);
65
+ }
66
+ };
67
+ this.clientPaginationNext = (event) => {
68
+ event.preventDefault();
69
+ // Enable increasing until the max number of pages
70
+ if (this.clientPaginationValue <= this.clientMaxPages) {
71
+ this.clientPaginationValue++;
72
+ this.sendPaginationValue(this.clientPaginationValue);
73
+ }
74
+ };
75
+ this.enablePagination = false;
76
+ this.rowsPerPage = 5;
77
+ this.enableClientPagination = false;
78
+ this.clientPaginationValue = 1;
79
+ this.clientMaxPages = 1;
80
+ this.clientSetColumnsNumber = null;
81
+ this.disablePaginationFunction = false;
82
+ this.columnsNumber = 0;
83
+ this.numberOfPages = 0;
84
+ this.paginationValue = 1;
85
+ this.tempPaginationDisable = false;
86
+ this.verticalDividers = false;
87
+ this.compactDesign = false;
88
+ this.noMinWidth = false;
89
+ this.whiteBackground = false;
90
+ this.tableId = '';
91
+ }
92
+ tablePropsChangedEventListener(event) {
93
+ if (this.tableId === event.detail.tableId) {
94
+ event.detail.changed
95
+ .filter((changedProp) => relevantTableProps.includes(changedProp))
96
+ .forEach((changedProp) => {
97
+ if (typeof this[changedProp] === 'undefined') {
98
+ throw new Error(`Table prop is not supported: ${changedProp}`);
99
+ }
100
+ this[changedProp] = event.detail[changedProp];
101
+ });
102
+ }
103
+ }
104
+ connectedCallback() {
105
+ this.tableEl = this.host.closest('sdds-table');
106
+ this.tableId = this.tableEl.tableId;
107
+ }
108
+ componentWillLoad() {
109
+ relevantTableProps.forEach((tablePropName) => {
110
+ this[tablePropName] = this.tableEl[tablePropName];
111
+ });
112
+ const numberOfRows = this.host.parentElement.querySelector('sdds-table-body').childElementCount;
113
+ const numberOfColumns = this.host.parentElement.querySelector('sdds-table-header').childElementCount;
114
+ this.numberOfPages = Math.ceil(numberOfRows / this.rowsPerPage);
115
+ if (this.clientSetColumnsNumber !== null) {
116
+ this.columnsNumber = this.clientSetColumnsNumber;
117
+ }
118
+ else {
119
+ this.columnsNumber = numberOfColumns;
120
+ }
121
+ this.enablePaginationEvent.emit(this.tableId);
122
+ }
123
+ paginationInputChange(event) {
124
+ const insertedValue = event.target.value;
125
+ if (insertedValue > this.numberOfPages || insertedValue < 1) {
126
+ event.target.classList.add('sdds-table__page-selector-input--shake');
127
+ this.paginationValue = event.target.max;
128
+ }
129
+ else {
130
+ this.paginationValue = event.target.value;
131
+ }
132
+ this.runPagination();
133
+ }
134
+ runPaginationEventListener(event) {
135
+ if (this.tableId === event.detail) {
136
+ this.runPagination();
137
+ }
138
+ }
139
+ sendPaginationValue(value) {
140
+ this.currentPageValueEvent.emit([this.tableId, value]);
141
+ }
142
+ clientPaginationInputChange(event) {
143
+ const insertedValue = event.target.value;
144
+ if (insertedValue > this.clientMaxPages || insertedValue < 1) {
145
+ event.target.classList.add('sdds-table__page-selector-input--shake');
146
+ this.clientPaginationValue = event.target.max;
147
+ }
148
+ else {
149
+ this.clientPaginationValue = event.target.value;
150
+ }
151
+ this.sendPaginationValue(this.clientPaginationValue);
152
+ }
153
+ render() {
154
+ return (h(Host, { class: this.compactDesign ? 'sdds-table--compact' : '' }, h("tr", { class: "sdds-table__footer-row" }, h("td", { class: "sdds-table__footer-cell", colSpan: this.columnsNumber }, this.enablePagination && !this.enableClientPagination && (h("div", { class: "sdds-table__pagination" }, h("div", { class: "sdds-table__row-selector" }), h("div", { class: "sdds-table__page-selector" }, 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 }), h("p", { class: "sdds-table__footer-text" }, "of ", h("span", null, this.tempPaginationDisable ? 1 : this.numberOfPages), " pages"), h("button", { class: "sdds-table__footer-btn", disabled: this.paginationValue <= 1 || this.tempPaginationDisable, onClick: (event) => this.paginationPrev(event) }, h("svg", { class: "sdds-table__footer-btn-svg", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, 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" }))), h("button", { class: "sdds-table__footer-btn", disabled: this.paginationValue >= this.numberOfPages || this.tempPaginationDisable, onClick: (event) => this.paginationNext(event) }, h("svg", { class: "sdds-table__footer-btn-svg", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, 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 && (h("div", { class: "sdds-table__pagination" }, h("div", { class: "sdds-table__row-selector" }), h("div", { class: "sdds-table__page-selector" }, 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 }), h("p", { class: "sdds-table__footer-text" }, "of ", h("span", null, this.clientMaxPages), " pages"), h("button", { class: "sdds-table__footer-btn", disabled: this.clientPaginationValue <= 1, onClick: (event) => this.clientPaginationPrev(event) }, h("svg", { class: "sdds-table__footer-btn-svg", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, 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" }))), h("button", { class: "sdds-table__footer-btn", disabled: this.clientPaginationValue >= this.clientMaxPages, onClick: (event) => this.clientPaginationNext(event) }, h("svg", { class: "sdds-table__footer-btn-svg", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, 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" }))))))))));
155
+ }
156
+ get host() { return getElement(this); }
157
+ };
158
+ TableFooter.style = tableFooterCss;
159
+
160
+ export { TableFooter as sdds_table_footer };
@@ -0,0 +1,95 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-32571711.js';
2
+
3
+ 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}";
4
+
5
+ const relevantTableProps = [
6
+ 'enableMultiselect',
7
+ 'enableExpandableRows',
8
+ 'verticalDividers',
9
+ 'compactDesign',
10
+ 'noMinWidth',
11
+ ];
12
+ const TableHeaderRow = class {
13
+ constructor(hostRef) {
14
+ registerInstance(this, hostRef);
15
+ this.mainCheckboxSelectedEvent = createEvent(this, "mainCheckboxSelectedEvent", 7);
16
+ this.enableMultiselect = false;
17
+ this.enableExpandableRows = false;
18
+ this.mainCheckboxSelected = false;
19
+ this.mainExpendSelected = false;
20
+ this.verticalDividers = false;
21
+ this.compactDesign = false;
22
+ this.noMinWidth = false;
23
+ this.whiteBackground = false;
24
+ this.enableToolbarDesign = false;
25
+ this.tableId = '';
26
+ }
27
+ tablePropsChangedEventListener(event) {
28
+ if (this.tableId === event.detail.tableId) {
29
+ event.detail.changed
30
+ .filter((changedProp) => relevantTableProps.includes(changedProp))
31
+ .forEach((changedProp) => {
32
+ if (typeof this[changedProp] === 'undefined') {
33
+ throw new Error(`Table prop is not supported: ${changedProp}`);
34
+ }
35
+ this[changedProp] = event.detail[changedProp];
36
+ });
37
+ }
38
+ }
39
+ updateMainCheckboxEventListener(event) {
40
+ const [receivedID, receivedMainCheckboxStatus] = event.detail;
41
+ if (this.tableId === receivedID) {
42
+ this.mainCheckboxSelected = receivedMainCheckboxStatus;
43
+ }
44
+ }
45
+ singleRowExpandedEventListener(event) {
46
+ if (this.tableId === event.detail[0]) {
47
+ // TODO: Improve this logic. Why we get late repose in DOM?
48
+ setTimeout(() => {
49
+ this.bodyExpandClicked();
50
+ }, 100);
51
+ }
52
+ }
53
+ bodyExpandClicked() {
54
+ const numberOfExtendRowsActive = this.host.parentElement
55
+ .querySelector('sdds-table-body')
56
+ .getElementsByClassName('sdds-table__row-extend--active').length;
57
+ const numberOfExtendRows = this.host.parentElement
58
+ .querySelector('sdds-table-body')
59
+ .getElementsByTagName('sdds-table-body-row-expendable').length;
60
+ if (numberOfExtendRows === numberOfExtendRowsActive) {
61
+ this.mainExpendSelected = true;
62
+ }
63
+ else {
64
+ this.mainExpendSelected = false;
65
+ }
66
+ }
67
+ connectedCallback() {
68
+ this.tableEl = this.host.closest('sdds-table');
69
+ this.tableId = this.tableEl.tableId;
70
+ }
71
+ componentWillLoad() {
72
+ relevantTableProps.forEach((tablePropName) => {
73
+ this[tablePropName] = this.tableEl[tablePropName];
74
+ });
75
+ }
76
+ componentWillRender() {
77
+ this.enableToolbarDesign =
78
+ this.host.closest('sdds-table').getElementsByTagName('sdds-table-toolbar').length >= 1;
79
+ }
80
+ headCheckBoxClicked(event) {
81
+ this.mainCheckboxSelected = event.currentTarget.checked;
82
+ this.mainCheckboxSelectedEvent.emit([this.tableId, this.mainCheckboxSelected]);
83
+ }
84
+ render() {
85
+ return (h(Host, { class: {
86
+ 'sdds-table--compact': this.compactDesign,
87
+ 'sdds-table--divider': this.verticalDividers,
88
+ 'sdds-table--toolbar-available': this.enableToolbarDesign,
89
+ } }, h("tr", null, this.enableMultiselect && (h("th", { class: "sdds-table__header-cell sdds-table__header-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: (e) => this.headCheckBoxClicked(e), checked: this.mainCheckboxSelected }))))), this.enableExpandableRows && (h("th", { class: "sdds-table__header-cell sdds-table__header-cell--checkbox" })), h("slot", null))));
90
+ }
91
+ get host() { return getElement(this); }
92
+ };
93
+ TableHeaderRow.style = tableHeaderCss;
94
+
95
+ export { TableHeaderRow as sdds_table_header };