@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
@@ -1,232 +1,242 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const inlineTabsCss = ":host{outline:0 !important;box-sizing:border-box}:host *{box-sizing:border-box}.sdds-inline-tabs{overflow:hidden;outline:0}.sdds-inline-tabs-header{position:relative}.sdds-inline-tabs-main{background-color:var(--sdds-inline-tabs-main-bg);padding:24px 24px 48px}.sdds-inline-tabs-wrapper{display:flex;overflow-x:scroll;scrollbar-width:none}.sdds-inline-tabs-wrapper::-webkit-scrollbar{display:none}.sdds-inline-tabs--forward,.sdds-inline-tabs--back{cursor:pointer;width:48px;height:100%;border:0;position:absolute;top:0;background-color:var(--sdds-inlline-tabs-scroll-btn-bg);display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none}.sdds-inline-tabs--forward__show,.sdds-inline-tabs--back__show{opacity:1;pointer-events:all}.sdds-inline-tabs--forward:hover,.sdds-inline-tabs--back:hover{background-color:var(--sdds-inline-tabs-scroll-btn-hover-bg)}.sdds-inline-tabs--forward:active,.sdds-inline-tabs--back:active{background-color:var(--sdds-inline-tabs-scroll-btn-active-bg)}.sdds-inline-tabs--forward:focus,.sdds-inline-tabs--back:focus{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}.sdds-inline-tabs--back{left:0}.sdds-inline-tabs--forward{right:0}.sdds-inline-tabs--tab{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);cursor:pointer;border:0;color:var(--sdds-inline-tabs-tab-color);background-color:var(--sdds-inline-tabs-tab-bg);padding:16px;min-width:142px;text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out;white-space:nowrap;flex-shrink:0;text-align:left;outline:none}.sdds-inline-tabs--tab>*{opacity:0.6}.sdds-inline-tabs--tab:not(:last-child){border-right:1px solid var(--sdds-inline-tabs-tab-border-color)}.sdds-inline-tabs--tab::after{content:\" \";position:absolute;top:0;right:0;left:0;margin-left:auto;width:0;margin-right:auto;height:2px;background-color:var(--sdds-inline-tabs-tab-indicator-bg);transition:width 0.15s ease-in-out}.sdds-inline-tabs--tab:hover{background-color:var(--sdds-inline-tabs-tab-hover-bg);color:var(--sdds-inline-tabs-tab-hover-color);text-decoration:none}.sdds-inline-tabs--tab:focus{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}.sdds-inline-tabs--tab__active{background-color:var(--sdds-inline-tabs-tab-active-bg);color:var(--sdds-inline-tabs-tab-active-color);cursor:initial;border-right:1px solid transparent !important}.sdds-inline-tabs--tab__active>*{opacity:1}.sdds-inline-tabs--tab__active:hover{background-color:var(--sdds-inline-tabs-tab-active-bg)}.sdds-inline-tabs--tab__active::after{width:calc(100% + 2px);left:-1px;background-color:var(--sdds-inline-tabs-tab-active-indicator-bg)}.sdds-inline-tabs--tab__active::before{content:\" \";background-color:var(--sdds-inline-tabs-tab-active-bg);width:1px;top:0;bottom:0;left:-1px;display:block;position:absolute}.sdds-inline-tabs--tab__active:first-child:focus::before{left:0}.sdds-inline-tabs--tab:disabled,.sdds-inline-tabs--tab__disabled{cursor:initial;color:var(--sdds-inline-tabs-tab-color);pointer-events:none}.sdds-inline-tabs--tab:disabled>*,.sdds-inline-tabs--tab__disabled>*{opacity:0.16}.sdds-inline-tabs-primary .sdds-inline-tabs--tab__active{background-color:var(--sdds-inline-tabs-tab-active-bg)}.sdds-inline-tabs-primary .sdds-inline-tabs-main{background-color:var(--sdds-inline-tabs-main-bg)}.sdds-inline-tabs-secondary .sdds-inline-tabs--tab__active{background-color:var(--sdds-inline-tabs-tab-active-ongrey-bg)}.sdds-inline-tabs-secondary .sdds-inline-tabs-main{background-color:var(--sdds-inline-tabs-main-ongrey-bg)}";
3
+ const inlineTabsCss = ":host{outline:0 !important;box-sizing:border-box}:host *{box-sizing:border-box}.sdds-inline-tabs{overflow:hidden;outline:0}.sdds-inline-tabs-header{position:relative}.sdds-inline-tabs-main{background-color:var(--sdds-inline-tabs-main-background);padding:24px 24px 48px}.sdds-inline-tabs-wrapper{display:flex;overflow-x:scroll;scrollbar-width:none}.sdds-inline-tabs-wrapper::-webkit-scrollbar{display:none}.sdds-inline-tabs--forward,.sdds-inline-tabs--back{cursor:pointer;width:48px;height:100%;border:0;position:absolute;top:0;background-color:var(--sdds-inline-tabs-scroll-btn-background);display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none}.sdds-inline-tabs--forward__show,.sdds-inline-tabs--back__show{opacity:1;pointer-events:all}.sdds-inline-tabs--forward:hover,.sdds-inline-tabs--back:hover{background-color:var(--sdds-inline-tabs-scroll-btn-background-hover)}.sdds-inline-tabs--forward:active,.sdds-inline-tabs--back:active{background-color:var(--sdds-inline-tabs-scroll-btn-background-active)}.sdds-inline-tabs--forward:focus,.sdds-inline-tabs--back:focus{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}.sdds-inline-tabs--forward svg,.sdds-inline-tabs--back svg{fill:var(--sdds-inline-tabs-scroll-btn-color)}.sdds-inline-tabs--back{left:0}.sdds-inline-tabs--forward{right:0}.sdds-inline-tabs--tab{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);cursor:pointer;border:0;color:var(--sdds-inline-tabs-tab-color);background-color:var(--sdds-inline-tabs-tab-background);padding:16px;min-width:142px;text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out;white-space:nowrap;flex-shrink:0;text-align:left;outline:none}.sdds-inline-tabs--tab>*{opacity:0.6}.sdds-inline-tabs--tab:not(:last-child){border-right:1px solid var(--sdds-inline-tabs-tab-border-color)}.sdds-inline-tabs--tab::after{content:\" \";position:absolute;top:0;right:0;left:0;margin-left:auto;width:0;margin-right:auto;height:2px;background-color:var(--sdds-inline-tabs-tab-indicator-background);transition:width 0.15s ease-in-out}.sdds-inline-tabs--tab:hover{background-color:var(--sdds-inline-tabs-tab-background-hover);color:var(--sdds-inline-tabs-tab-color-hover);text-decoration:none}.sdds-inline-tabs--tab:focus{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}.sdds-inline-tabs--tab__active{background-color:var(--sdds-inline-tabs-tab-background-active);color:var(--sdds-inline-tabs-tab-color-active);cursor:initial;border-right:1px solid transparent !important}.sdds-inline-tabs--tab__active>*{opacity:1}.sdds-inline-tabs--tab__active:hover{background-color:var(--sdds-inline-tabs-tab-background-active)}.sdds-inline-tabs--tab__active::after{width:calc(100% + 2px);left:-1px;background-color:var(--sdds-inline-tabs-tab-indicator-background-active)}.sdds-inline-tabs--tab__active::before{content:\" \";background-color:var(--sdds-inline-tabs-tab-background-active);width:1px;top:0;bottom:0;left:-1px;display:block;position:absolute}.sdds-inline-tabs--tab__active:first-child:focus::before{left:0}.sdds-inline-tabs--tab:disabled,.sdds-inline-tabs--tab__disabled{cursor:initial;color:var(--sdds-navigation-tabs-tab-color-disabled);pointer-events:none}.sdds-inline-tabs--tab:disabled>*,.sdds-inline-tabs--tab__disabled>*{opacity:0.16}.sdds-inline-tabs--tab__active{background-color:var(--sdds-inline-tabs-tab-background-active)}.sdds-inline-tabs-main{background-color:var(--sdds-inline-tabs-main-background)}";
4
4
 
5
- const InlineTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
- constructor() {
7
- super();
8
- this.__registerHost();
9
- this.__attachShadow();
10
- this.startingTab = null; // name of the tab to show by default (infered from either "default-tab"-prop (on component) or "default"-prop (on a slotted child)
11
- this.navWrapperElement = null; // reference to container with nav buttons
12
- this.tabWrapperElement = null; // reference to container with slotted children
13
- this.componentWidth = 0; // visible width of this component
14
- this.buttonsWidth = 0; // total width of all nav items combined
15
- this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
16
- this.useAutoHeight = false; // set height for slotted children or not
17
- this.defaultTab = '';
18
- this.autoHeight = false;
19
- this.modeVariant = 'primary';
20
- this.tabs = [];
21
- this.buttonWidth = 0;
22
- this.tabHeight = 0;
23
- this.showLeftScroll = false;
24
- this.showRightScroll = false;
25
- }
26
- /** used for switching to a tab programmatically */
27
- async showTab(key) {
28
- this.switchToTab(key);
29
- }
30
- _generateKeyFromName(name) {
31
- return name
32
- .replace(/\s/g, '-')
33
- .replace(/[^a-z0-9-]/gi, '')
34
- .toLowerCase();
35
- }
36
- componentWillLoad() {
37
- this._initComponent();
38
- }
39
- _initComponent(createInitialState = true) {
40
- this.tabs = [];
41
- if (this.autoHeight) {
42
- this.useAutoHeight = true;
43
- }
44
- Array.from(this.host.children).map((item, index) => {
45
- const name = item.dataset.name ? item.dataset.name : item.getAttribute('name') || `Tab ${index + 1}`;
46
- let key = item.dataset.tabKey ? item.dataset.tabKey : item.getAttribute('tab-key');
47
- if (!key) {
48
- key = this._generateKeyFromName(name);
49
- }
50
- if ((item.getAttribute('data-default') ? item.getAttribute('data-default') : item.getAttribute('default')) !== null) {
51
- this.startingTab = key;
52
- }
53
- let disabled = false;
54
- if ((item.getAttribute('aria-disabled') ? item.getAttribute('aria-disabled') : item.getAttribute('disabled')) !== null) {
55
- disabled = true;
56
- }
57
- this.tabs.push({
58
- name,
59
- key,
60
- element: item,
61
- disabled,
62
- visible: true,
63
- initialDisplay: window.getComputedStyle(item).display,
64
- });
65
- });
66
- createInitialState && this._setInitialState();
67
- this.tabs = Array.from(this.tabs);
68
- }
69
- _calculateButtonWidth() {
70
- const navButtons = this.navWrapperElement.querySelectorAll('button.sdds-inline-tabs--tab');
71
- let best = 0;
72
- Array.from(navButtons).forEach((navButton) => {
73
- const oldStyle = navButton.style.width;
74
- navButton.style.width = '';
75
- const width = navButton.clientWidth;
76
- navButton.style.width = oldStyle;
77
- if (navButton.clientWidth > best) {
78
- best = width;
79
- }
80
- });
81
- this.buttonWidth = best;
82
- }
83
- _calculateTabHeight() {
84
- let best = 0;
85
- this.tabs.forEach(tab => {
86
- const oldStyle = tab.element.style.display;
87
- tab.element.style.display = '';
88
- const height = tab.element.clientHeight;
89
- tab.element.style.display = oldStyle;
90
- if (height > best) {
91
- best = height;
92
- }
93
- });
94
- this.tabHeight = best;
95
- }
96
- componentDidRender() {
97
- this._calculateTabHeight();
98
- this._calculateButtonWidth();
99
- }
100
- componentDidLoad() {
101
- const mutationObserver = new MutationObserver(( /* mutations, observer */) => {
102
- const visibleTab = this.tabs.find(tab => tab.visible);
103
- this._initComponent(false);
104
- this._calculateTabHeight();
105
- this._calculateButtonWidth();
106
- visibleTab && this.switchToTab(visibleTab.key);
107
- });
108
- const resizeObserver = new ResizeObserver(entries => {
109
- for (const entry of entries) {
110
- const componentWidth = entry.contentRect.width;
111
- let buttonsWidth = 0;
112
- const navButtons = entry.target.querySelectorAll('button.sdds-inline-tabs--tab');
113
- Array.from(navButtons).forEach((navButton) => {
114
- buttonsWidth += navButton.clientWidth;
115
- });
116
- this.componentWidth = componentWidth;
117
- this.buttonsWidth = buttonsWidth;
118
- this.scrollWidth = buttonsWidth - componentWidth;
119
- if (this.buttonsWidth > this.componentWidth) {
120
- this._evaluateScrollButtons();
121
- }
122
- else {
123
- this.showLeftScroll = false;
124
- this.showRightScroll = false;
125
- }
126
- this._calculateTabHeight();
127
- }
128
- });
129
- mutationObserver.observe(this.host, {
130
- childList: true,
131
- attributes: true,
132
- });
133
- resizeObserver.observe(this.navWrapperElement);
134
- this._calculateButtonWidth();
135
- this._calculateTabHeight();
136
- }
137
- _setInitialState() {
138
- if (this.defaultTab) {
139
- this.startingTab = this.defaultTab;
140
- }
141
- this.tabs.map((tab, index) => {
142
- if (this.startingTab) {
143
- if (tab.key != this.startingTab) {
144
- this._hideTab(tab);
145
- }
146
- }
147
- else {
148
- if (index > 0) {
149
- this._hideTab(tab);
150
- }
151
- }
152
- });
153
- }
154
- _showTab(tab) {
155
- tab.element.style.display = '';
156
- tab.visible = true;
157
- }
158
- _hideTab(tab) {
159
- tab.element.style.display = 'none';
160
- tab.visible = false;
161
- }
162
- switchToTab(key) {
163
- this.tabs.map(tab => {
164
- if (tab.key == key) {
165
- this._showTab(tab);
166
- }
167
- else {
168
- this._hideTab(tab);
169
- }
170
- });
171
- this.tabs = Array.from(this.tabs);
172
- }
173
- _scrollRight() {
174
- const scroll = this.navWrapperElement.scrollLeft;
175
- this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;
176
- this._evaluateScrollButtons();
177
- }
178
- _scrollLeft() {
179
- const scroll = this.navWrapperElement.scrollLeft;
180
- this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;
181
- this._evaluateScrollButtons();
182
- }
183
- _evaluateScrollButtons() {
184
- const scroll = this.navWrapperElement.scrollLeft;
185
- if (scroll >= this.scrollWidth) {
186
- this.showRightScroll = false;
187
- }
188
- else {
189
- this.showRightScroll = true;
190
- }
191
- if (scroll <= 0) {
192
- this.showLeftScroll = false;
193
- }
194
- else {
195
- this.showLeftScroll = true;
196
- }
197
- }
198
- render() {
199
- const heightStyle = {};
200
- if (this.useAutoHeight) {
201
- heightStyle['height'] = `${this.tabHeight}px`;
202
- }
203
- return (h(Host, null, h("div", { class: `sdds-inline-tabs sdds-inline-tabs sdds-inline-tabs-${this.modeVariant}` }, h("nav", { class: "sdds-inline-tabs-header" }, h("div", { ref: el => (this.navWrapperElement = el), class: "sdds-inline-tabs-wrapper" }, this.tabs.map(tab => (h("button", { style: { width: `${this.buttonWidth}px` }, disabled: tab.disabled, class: `sdds-inline-tabs--tab ${tab.visible ? 'sdds-inline-tabs--tab__active' : ''}`, onClick: () => this.switchToTab(tab.key) }, h("span", null, tab.name))))), h("div", { class: "sdds-inline-tabs-header-navigation" }, h("button", { class: `sdds-inline-tabs--forward ${this.showRightScroll ? 'sdds-inline-tabs--back__show' : ''}`, onClick: () => this._scrollRight() }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M6.1147 17.3291C5.87062 17.0851 5.87062 16.6893 6.1147 16.4453L12.2948 10.2652C12.4412 10.1187 12.4412 9.8813 12.2948 9.73485L6.1147 3.55476C5.87062 3.31068 5.87062 2.91496 6.1147 2.67088C6.35878 2.4268 6.75451 2.4268 6.99858 2.67088L13.1787 8.85097C13.8133 9.48557 13.8133 10.5145 13.1787 11.1491L6.99858 17.3291C6.75451 17.5732 6.35878 17.5732 6.1147 17.3291Z", fill: "#0D0F13" }))), h("button", { class: `sdds-inline-tabs--back ${this.showLeftScroll ? 'sdds-inline-tabs--back__show' : ''}`, onClick: () => this._scrollLeft() }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M13.8853 2.67085C14.1294 2.91493 14.1294 3.31066 13.8853 3.55473L7.70522 9.73482C7.55878 9.88127 7.55878 10.1187 7.70522 10.2652L13.8853 16.4452C14.1294 16.6893 14.1294 17.085 13.8853 17.3291C13.6412 17.5732 13.2455 17.5732 13.0014 17.3291L6.82134 11.149C6.18674 10.5144 6.18674 9.48554 6.82134 8.85094L13.0014 2.67085C13.2455 2.42677 13.6412 2.42677 13.8853 2.67085Z", fill: "#0D0F13" }))))), h("div", { ref: el => (this.tabWrapperElement = el), class: "sdds-inline-tabs-main", style: heightStyle }, h("slot", null)))));
204
- }
205
- get host() { return this; }
206
- static get style() { return inlineTabsCss; }
207
- }, [1, "sdds-inline-tabs", {
208
- "defaultTab": [1, "default-tab"],
209
- "autoHeight": [4, "auto-height"],
210
- "modeVariant": [1, "mode-variant"],
211
- "tabs": [32],
212
- "buttonWidth": [32],
213
- "tabHeight": [32],
214
- "showLeftScroll": [32],
215
- "showRightScroll": [32],
216
- "showTab": [64]
217
- }]);
218
- function defineCustomElement$1() {
219
- if (typeof customElements === "undefined") {
220
- return;
221
- }
222
- const components = ["sdds-inline-tabs"];
223
- components.forEach(tagName => { switch (tagName) {
224
- case "sdds-inline-tabs":
225
- if (!customElements.get(tagName)) {
226
- customElements.define(tagName, InlineTabs);
227
- }
228
- break;
229
- } });
5
+ function generateKeyFromName(name) {
6
+ return name
7
+ .replace(/\s/g, '-')
8
+ .replace(/[^a-z0-9-]/gi, '')
9
+ .toLowerCase();
10
+ }
11
+ const InlineTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
12
+ constructor() {
13
+ super();
14
+ this.__registerHost();
15
+ this.__attachShadow();
16
+ this.startingTab = null; // name of the tab to show by default (infered from either "default-tab"-prop (on component) or "default"-prop (on a slotted child)
17
+ this.navWrapperElement = null; // reference to container with nav buttons
18
+ this.tabWrapperElement = null; // reference to container with slotted children
19
+ this.componentWidth = 0; // visible width of this component
20
+ this.buttonsWidth = 0; // total width of all nav items combined
21
+ this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
22
+ this.useAutoHeight = false; // set height for slotted children or not
23
+ this.defaultTab = '';
24
+ this.autoHeight = false;
25
+ this.modeVariant = null;
26
+ this.tabs = [];
27
+ this.buttonWidth = 0;
28
+ this.tabHeight = 0;
29
+ this.showLeftScroll = false;
30
+ this.showRightScroll = false;
31
+ }
32
+ /** used for switching to a tab programmatically */
33
+ async showTab(key) {
34
+ this.switchToTab(key);
35
+ }
36
+ componentWillLoad() {
37
+ this.initComponent();
38
+ }
39
+ initComponent(createInitialState = true) {
40
+ if (this.autoHeight) {
41
+ this.useAutoHeight = true;
42
+ }
43
+ this.tabs = Array.from(this.host.children).map((item, index) => {
44
+ const name = item.label ? item.label : item.getAttribute('name') || `Tab ${index + 1}`;
45
+ const key = generateKeyFromName(name);
46
+ if (item.default) {
47
+ this.startingTab = key;
48
+ }
49
+ let disabled = false;
50
+ if (item.disabled) {
51
+ disabled = true;
52
+ }
53
+ return {
54
+ name,
55
+ key,
56
+ element: item,
57
+ disabled,
58
+ visible: true,
59
+ initialDisplay: window.getComputedStyle(item).display,
60
+ };
61
+ });
62
+ if (createInitialState) {
63
+ this.setInitialState();
64
+ }
65
+ this.tabs = Array.from(this.tabs);
66
+ }
67
+ calculateButtonWidth() {
68
+ const navButtons = this.navWrapperElement.querySelectorAll('button.sdds-inline-tabs--tab');
69
+ let best = 0;
70
+ Array.from(navButtons).forEach((navButton) => {
71
+ const oldStyle = navButton.style.width;
72
+ // eslint-disable-next-line no-param-reassign
73
+ navButton.style.width = '';
74
+ const width = navButton.clientWidth;
75
+ // eslint-disable-next-line no-param-reassign
76
+ navButton.style.width = oldStyle;
77
+ if (navButton.clientWidth > best) {
78
+ best = width;
79
+ }
80
+ });
81
+ this.buttonWidth = best;
82
+ }
83
+ calculateTabHeight() {
84
+ let best = 0;
85
+ this.tabs.forEach((_, tabIndex) => {
86
+ const tab = this.tabs[tabIndex];
87
+ // TODO: add comment on what this does
88
+ const oldStyle = tab.element.style.display;
89
+ tab.element.style.display = '';
90
+ const height = tab.element.clientHeight;
91
+ tab.element.style.display = oldStyle;
92
+ if (height > best) {
93
+ best = height;
94
+ }
95
+ });
96
+ this.tabHeight = best;
97
+ }
98
+ componentDidRender() {
99
+ this.calculateTabHeight();
100
+ this.calculateButtonWidth();
101
+ }
102
+ componentDidLoad() {
103
+ const mutationObserver = new MutationObserver(( /* mutations, observer */) => {
104
+ const visibleTab = this.tabs.find((tab) => tab.visible);
105
+ this.initComponent(false);
106
+ this.calculateTabHeight();
107
+ this.calculateButtonWidth();
108
+ if (visibleTab) {
109
+ this.switchToTab(visibleTab.key);
110
+ }
111
+ });
112
+ const resizeObserver = new ResizeObserver((entries) => {
113
+ entries.forEach((entry) => {
114
+ const componentWidth = entry.contentRect.width;
115
+ let buttonsWidth = 0;
116
+ const navButtons = entry.target.querySelectorAll('button.sdds-inline-tabs--tab');
117
+ Array.from(navButtons).forEach((navButton) => {
118
+ buttonsWidth += navButton.clientWidth;
119
+ });
120
+ this.componentWidth = componentWidth;
121
+ this.buttonsWidth = buttonsWidth;
122
+ this.scrollWidth = buttonsWidth - componentWidth;
123
+ if (this.buttonsWidth > this.componentWidth) {
124
+ this.evaluateScrollButtons();
125
+ }
126
+ else {
127
+ this.showLeftScroll = false;
128
+ this.showRightScroll = false;
129
+ }
130
+ this.calculateTabHeight();
131
+ });
132
+ });
133
+ mutationObserver.observe(this.host, {
134
+ childList: true,
135
+ attributes: true,
136
+ });
137
+ resizeObserver.observe(this.navWrapperElement);
138
+ this.calculateButtonWidth();
139
+ this.calculateTabHeight();
140
+ }
141
+ setInitialState() {
142
+ if (this.defaultTab) {
143
+ this.startingTab = this.defaultTab;
144
+ }
145
+ this.tabs.forEach((tab, index) => {
146
+ if (this.startingTab) {
147
+ if (tab.key !== this.startingTab) {
148
+ this.hideTab(index);
149
+ }
150
+ }
151
+ else {
152
+ if (index > 0) {
153
+ this.hideTab(index);
154
+ }
155
+ }
156
+ });
157
+ }
158
+ unhideTab(tabIndex) {
159
+ const tab = this.tabs[tabIndex];
160
+ tab.element.style.display = '';
161
+ tab.visible = true;
162
+ }
163
+ hideTab(tabIndex) {
164
+ const tab = this.tabs[tabIndex];
165
+ tab.element.style.display = 'none';
166
+ tab.visible = false;
167
+ }
168
+ switchToTab(key) {
169
+ this.tabs.forEach((tab, index) => {
170
+ if (tab.key === key) {
171
+ this.unhideTab(index);
172
+ }
173
+ else {
174
+ this.hideTab(index);
175
+ }
176
+ });
177
+ this.tabs = Array.from(this.tabs);
178
+ }
179
+ scrollRight() {
180
+ const scroll = this.navWrapperElement.scrollLeft;
181
+ this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;
182
+ this.evaluateScrollButtons();
183
+ }
184
+ scrollLeft() {
185
+ const scroll = this.navWrapperElement.scrollLeft;
186
+ this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;
187
+ this.evaluateScrollButtons();
188
+ }
189
+ evaluateScrollButtons() {
190
+ const scroll = this.navWrapperElement.scrollLeft;
191
+ if (scroll >= this.scrollWidth) {
192
+ this.showRightScroll = false;
193
+ }
194
+ else {
195
+ this.showRightScroll = true;
196
+ }
197
+ if (scroll <= 0) {
198
+ this.showLeftScroll = false;
199
+ }
200
+ else {
201
+ this.showLeftScroll = true;
202
+ }
203
+ }
204
+ render() {
205
+ const style = {};
206
+ if (this.useAutoHeight) {
207
+ style.height = `${this.tabHeight}px`;
208
+ }
209
+ return (h(Host, { class: `${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { class: `sdds-inline-tabs sdds-inline-tabs` }, h("nav", { class: "sdds-inline-tabs-header" }, h("div", { ref: (el) => {
210
+ this.navWrapperElement = el;
211
+ }, class: "sdds-inline-tabs-wrapper" }, this.tabs.map((tab) => (h("button", { style: { width: `${this.buttonWidth}px` }, disabled: tab.disabled, class: `sdds-inline-tabs--tab ${tab.visible ? 'sdds-inline-tabs--tab__active' : ''}`, onClick: () => this.switchToTab(tab.key) }, h("span", null, tab.name))))), h("div", { class: "sdds-inline-tabs-header-navigation" }, h("button", { class: `sdds-inline-tabs--forward ${this.showRightScroll ? 'sdds-inline-tabs--back__show' : ''}`, disabled: !this.showRightScroll, onClick: () => this.scrollRight() }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M6.1147 17.3291C5.87062 17.0851 5.87062 16.6893 6.1147 16.4453L12.2948 10.2652C12.4412 10.1187 12.4412 9.8813 12.2948 9.73485L6.1147 3.55476C5.87062 3.31068 5.87062 2.91496 6.1147 2.67088C6.35878 2.4268 6.75451 2.4268 6.99858 2.67088L13.1787 8.85097C13.8133 9.48557 13.8133 10.5145 13.1787 11.1491L6.99858 17.3291C6.75451 17.5732 6.35878 17.5732 6.1147 17.3291Z" }))), h("button", { class: `sdds-inline-tabs--back ${this.showLeftScroll ? 'sdds-inline-tabs--back__show' : ''}`, disabled: !this.showLeftScroll, onClick: () => this.scrollLeft() }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M13.8853 2.67085C14.1294 2.91493 14.1294 3.31066 13.8853 3.55473L7.70522 9.73482C7.55878 9.88127 7.55878 10.1187 7.70522 10.2652L13.8853 16.4452C14.1294 16.6893 14.1294 17.085 13.8853 17.3291C13.6412 17.5732 13.2455 17.5732 13.0014 17.3291L6.82134 11.149C6.18674 10.5144 6.18674 9.48554 6.82134 8.85094L13.0014 2.67085C13.2455 2.42677 13.6412 2.42677 13.8853 2.67085Z" }))))), h("div", { ref: (el) => {
212
+ this.tabWrapperElement = el;
213
+ }, class: "sdds-inline-tabs-main", style: style }, h("slot", null)))));
214
+ }
215
+ get host() { return this; }
216
+ static get style() { return inlineTabsCss; }
217
+ }, [1, "sdds-inline-tabs", {
218
+ "defaultTab": [1, "default-tab"],
219
+ "autoHeight": [4, "auto-height"],
220
+ "modeVariant": [1, "mode-variant"],
221
+ "tabs": [32],
222
+ "buttonWidth": [32],
223
+ "tabHeight": [32],
224
+ "showLeftScroll": [32],
225
+ "showRightScroll": [32],
226
+ "showTab": [64]
227
+ }]);
228
+ function defineCustomElement$1() {
229
+ if (typeof customElements === "undefined") {
230
+ return;
231
+ }
232
+ const components = ["sdds-inline-tabs"];
233
+ components.forEach(tagName => { switch (tagName) {
234
+ case "sdds-inline-tabs":
235
+ if (!customElements.get(tagName)) {
236
+ customElements.define(tagName, InlineTabs);
237
+ }
238
+ break;
239
+ } });
230
240
  }
231
241
 
232
242
  const SddsInlineTabs = InlineTabs;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SddsLink extends Components.SddsLink, HTMLElement {}
4
+ export const SddsLink: {
5
+ prototype: SddsLink;
6
+ new (): SddsLink;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { S as SddsLink$1, d as defineCustomElement$1 } from './sdds-link2.js';
2
+
3
+ const SddsLink = SddsLink$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { SddsLink, defineCustomElement };
@@ -0,0 +1,44 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+
3
+ const sddsLinkCss = "a{cursor:pointer;outline:none;color:var(--sdds-link)}a:active{color:var(--sdds-link);text-decoration:underline;text-decoration-color:var(--sdds-link)}a:hover{color:var(--sdds-link-hover);text-decoration:underline;text-decoration-color:var(--sdds-link-hover)}a:visited{color:var(--sdds-link-visited);text-decoration-color:var(--sdds-link-visited)}a:focus{color:var(--sdds-link-focus);text-decoration:none;outline:2px solid var(--sdds-link-focus);outline-offset:-2px}a.disabled{color:var(--sdds-link-disabled);text-decoration-color:var(--sdds-link-disabled);pointer-events:none}a.no-underline{text-decoration:none}a.no-underline:hover{text-decoration:none}";
4
+
5
+ const SddsLink = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.href = undefined;
10
+ this.target = '_self';
11
+ this.disabled = false;
12
+ this.underline = true;
13
+ this.rel = 'noopener';
14
+ }
15
+ render() {
16
+ return (h("a", { class: `
17
+ ${this.disabled ? 'disabled' : ''}
18
+ ${this.underline ? '' : 'no-underline'}
19
+
20
+ `, href: this.href, target: this.target, rel: this.rel }, h("slot", null)));
21
+ }
22
+ static get style() { return sddsLinkCss; }
23
+ }, [4, "sdds-link", {
24
+ "href": [1],
25
+ "target": [1],
26
+ "disabled": [4],
27
+ "underline": [4],
28
+ "rel": [1]
29
+ }]);
30
+ function defineCustomElement() {
31
+ if (typeof customElements === "undefined") {
32
+ return;
33
+ }
34
+ const components = ["sdds-link"];
35
+ components.forEach(tagName => { switch (tagName) {
36
+ case "sdds-link":
37
+ if (!customElements.get(tagName)) {
38
+ customElements.define(tagName, SddsLink);
39
+ }
40
+ break;
41
+ } });
42
+ }
43
+
44
+ export { SddsLink as S, defineCustomElement as d };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SddsMessage extends Components.SddsMessage, HTMLElement {}
4
+ export const SddsMessage: {
5
+ prototype: SddsMessage;
6
+ new (): SddsMessage;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,67 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$2 } from './icon.js';
3
+
4
+ const sddsMessageCss = ":host .message-wrapper{display:flex;padding:16px;background-color:var(--sdds-message-background);border-radius:4px}:host .message-wrapper.information{border-left:4px solid var(--sdds-information)}:host .message-wrapper.information sdds-icon{color:var(--sdds-information)}:host .message-wrapper.success{border-left:4px solid var(--sdds-positive)}:host .message-wrapper.success sdds-icon{color:var(--sdds-positive)}:host .message-wrapper.error{background-color:var(--sdds-message-type-error-background);border-left:4px solid var(--sdds-negative)}:host .message-wrapper.error sdds-icon{color:var(--sdds-negative)}:host .message-wrapper.warning{border-left:4px solid var(--sdds-warning)}:host .message-wrapper.warning sdds-icon{color:var(--sdds-warning)}:host .message-wrapper.message-minimal{border:none;display:flex;align-items:center;padding:0;background-color:transparent}:host .message-wrapper.message-minimal .message-header{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls)}:host .message-wrapper.message-minimal sdds-icon{padding-right:8px}:host sdds-icon{padding-right:16px}:host .message-content{display:flex;flex-direction:column;gap:4px;color:var(--sdds-message-color);padding:2px 0}:host .message-content .message-header{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls)}:host .message-content .message-extended-message{color:var(--sdds-message-color);font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls)}:host .sdds-mode-variant-primary{--sdds-message-background:var(--sdds-message-background-primary)}:host .sdds-mode-variant-secondary{--sdds-message-background:var(--sdds-message-background-secondary)}";
5
+
6
+ const SddsMessage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.__attachShadow();
11
+ this.getIconName = () => {
12
+ switch (this.type) {
13
+ case 'information':
14
+ return 'info';
15
+ case 'error':
16
+ return 'error';
17
+ case 'warning':
18
+ return 'warning';
19
+ case 'success':
20
+ return 'tick';
21
+ default:
22
+ return 'info';
23
+ }
24
+ };
25
+ this.header = undefined;
26
+ this.modeVariant = null;
27
+ this.type = 'information';
28
+ this.noIcon = false;
29
+ this.minimal = false;
30
+ }
31
+ render() {
32
+ return (h(Host, null, h("div", { class: `
33
+ message-wrapper ${this.type}
34
+ ${this.minimal ? 'message-minimal' : ''}
35
+ ${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}` : ''}` }, !this.noIcon && h("sdds-icon", { name: this.getIconName(), size: "20px" }), h("div", { class: `message-content` }, this.header && h("div", { class: "message-header" }, this.header), !this.minimal && (h("div", { class: "message-extended-message" }, h("slot", null)))))));
36
+ }
37
+ static get style() { return sddsMessageCss; }
38
+ }, [1, "sdds-message", {
39
+ "header": [1],
40
+ "modeVariant": [1, "mode-variant"],
41
+ "type": [1],
42
+ "noIcon": [4, "no-icon"],
43
+ "minimal": [4]
44
+ }]);
45
+ function defineCustomElement$1() {
46
+ if (typeof customElements === "undefined") {
47
+ return;
48
+ }
49
+ const components = ["sdds-message", "sdds-icon"];
50
+ components.forEach(tagName => { switch (tagName) {
51
+ case "sdds-message":
52
+ if (!customElements.get(tagName)) {
53
+ customElements.define(tagName, SddsMessage$1);
54
+ }
55
+ break;
56
+ case "sdds-icon":
57
+ if (!customElements.get(tagName)) {
58
+ defineCustomElement$2();
59
+ }
60
+ break;
61
+ } });
62
+ }
63
+
64
+ const SddsMessage = SddsMessage$1;
65
+ const defineCustomElement = defineCustomElement$1;
66
+
67
+ export { SddsMessage, defineCustomElement };