@scania/tegel 0.0.1-beta.6 → 0.0.1-beta.9

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 (415) hide show
  1. package/package.json +4 -4
  2. package/readme.md +7 -8
  3. package/dist/cjs/index-e1c79686.js +0 -1912
  4. package/dist/cjs/index.cjs.js +0 -2
  5. package/dist/cjs/loader.cjs.js +0 -21
  6. package/dist/cjs/popper-11d5f714.js +0 -1801
  7. package/dist/cjs/sdds-accordion-item.cjs.entry.js +0 -34
  8. package/dist/cjs/sdds-accordion.cjs.entry.js +0 -21
  9. package/dist/cjs/sdds-badges.cjs.entry.js +0 -55
  10. package/dist/cjs/sdds-body-cell_2.cjs.entry.js +0 -173
  11. package/dist/cjs/sdds-button.cjs.entry.js +0 -36
  12. package/dist/cjs/sdds-datetime.cjs.entry.js +0 -66
  13. package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +0 -92
  14. package/dist/cjs/sdds-dropdown_2.cjs.entry.js +0 -335
  15. package/dist/cjs/sdds-header-cell.cjs.entry.js +0 -141
  16. package/dist/cjs/sdds-icon.cjs.entry.js +0 -42
  17. package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +0 -96
  18. package/dist/cjs/sdds-inline-tabs.cjs.entry.js +0 -211
  19. package/dist/cjs/sdds-modal.cjs.entry.js +0 -49
  20. package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +0 -95
  21. package/dist/cjs/sdds-popover-canvas.cjs.entry.js +0 -76
  22. package/dist/cjs/sdds-popover-menu.cjs.entry.js +0 -75
  23. package/dist/cjs/sdds-slider.cjs.entry.js +0 -336
  24. package/dist/cjs/sdds-spinner.cjs.entry.js +0 -21
  25. package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +0 -81
  26. package/dist/cjs/sdds-table-body.cjs.entry.js +0 -289
  27. package/dist/cjs/sdds-table-footer.cjs.entry.js +0 -165
  28. package/dist/cjs/sdds-table-header.cjs.entry.js +0 -100
  29. package/dist/cjs/sdds-table-toolbar.cjs.entry.js +0 -66
  30. package/dist/cjs/sdds-table.cjs.entry.js +0 -69
  31. package/dist/cjs/sdds-textarea.cjs.entry.js +0 -61
  32. package/dist/cjs/sdds-textfield.cjs.entry.js +0 -82
  33. package/dist/cjs/sdds-tooltip.cjs.entry.js +0 -95
  34. package/dist/cjs/tegel.cjs.js +0 -19
  35. package/dist/collection/collection-manifest.json +0 -40
  36. package/dist/collection/components/accordion/accordion-item/accordion-item.css +0 -134
  37. package/dist/collection/components/accordion/accordion-item/accordion-item.js +0 -146
  38. package/dist/collection/components/accordion/accordion.css +0 -77
  39. package/dist/collection/components/accordion/accordion.js +0 -62
  40. package/dist/collection/components/accordion/accordion.stories.js +0 -91
  41. package/dist/collection/components/badge/badge.stories.js +0 -101
  42. package/dist/collection/components/badge/badges.css +0 -42
  43. package/dist/collection/components/badge/badges.js +0 -150
  44. package/dist/collection/components/banner/banner.stories.js +0 -93
  45. package/dist/collection/components/block/block.stories.js +0 -46
  46. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +0 -26
  47. package/dist/collection/components/button/button-component.js +0 -154
  48. package/dist/collection/components/button/button-native.stories.js +0 -183
  49. package/dist/collection/components/button/button-webcomponent.stories.js +0 -182
  50. package/dist/collection/components/button/button.css +0 -658
  51. package/dist/collection/components/card/card.stories.js +0 -181
  52. package/dist/collection/components/checkbox/checkbox.stories.js +0 -54
  53. package/dist/collection/components/chips/chips.stories.js +0 -124
  54. package/dist/collection/components/data-table/native-table.stories.js +0 -182
  55. package/dist/collection/components/data-table/table/table.css +0 -15
  56. package/dist/collection/components/data-table/table/table.js +0 -253
  57. package/dist/collection/components/data-table/table-body/table-body.css +0 -22
  58. package/dist/collection/components/data-table/table-body/table-body.js +0 -425
  59. package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +0 -40
  60. package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +0 -169
  61. package/dist/collection/components/data-table/table-body-row/table-body-row.css +0 -196
  62. package/dist/collection/components/data-table/table-body-row/table-body-row.js +0 -164
  63. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +0 -79
  64. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +0 -155
  65. package/dist/collection/components/data-table/table-component-basic.stories.js +0 -163
  66. package/dist/collection/components/data-table/table-component-batch-actions.stories.js +0 -129
  67. package/dist/collection/components/data-table/table-component-bodydata.stories.js +0 -58
  68. package/dist/collection/components/data-table/table-component-custom-width.stories.js +0 -198
  69. package/dist/collection/components/data-table/table-component-event-listeners.stories.js +0 -153
  70. package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +0 -137
  71. package/dist/collection/components/data-table/table-component-filtering.stories.js +0 -139
  72. package/dist/collection/components/data-table/table-component-multiselect.stories.js +0 -160
  73. package/dist/collection/components/data-table/table-component-pagination.stories.js +0 -129
  74. package/dist/collection/components/data-table/table-component-sorting.stories.js +0 -107
  75. package/dist/collection/components/data-table/table-footer/table-footer.css +0 -93
  76. package/dist/collection/components/data-table/table-footer/table-footer.js +0 -355
  77. package/dist/collection/components/data-table/table-header/table-header.css +0 -204
  78. package/dist/collection/components/data-table/table-header/table-header.js +0 -153
  79. package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +0 -126
  80. package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +0 -320
  81. package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +0 -92
  82. package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +0 -142
  83. package/dist/collection/components/datetime/datetime.css +0 -375
  84. package/dist/collection/components/datetime/datetime.js +0 -251
  85. package/dist/collection/components/datetime/datetime.stories.js +0 -149
  86. package/dist/collection/components/divider/divider.stories.js +0 -116
  87. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +0 -339
  88. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +0 -130
  89. package/dist/collection/components/dropdown/dropdown-native.stories.js +0 -90
  90. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +0 -185
  91. package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +0 -151
  92. package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +0 -146
  93. package/dist/collection/components/dropdown/dropdown.css +0 -891
  94. package/dist/collection/components/dropdown/dropdown.js +0 -554
  95. package/dist/collection/components/footer/footer.stories.js +0 -100
  96. package/dist/collection/components/header/header-all.stories.js +0 -217
  97. package/dist/collection/components/header/header-default.stories.js +0 -47
  98. package/dist/collection/components/header/header-inline.stories.js +0 -113
  99. package/dist/collection/components/header/header-search.stories.js +0 -263
  100. package/dist/collection/components/header/header-toolbar.stories.js +0 -204
  101. package/dist/collection/components/icon/icon-font.stories.js +0 -57
  102. package/dist/collection/components/icon/icon-web-component.stories.js +0 -51
  103. package/dist/collection/components/icon/icon.css +0 -16
  104. package/dist/collection/components/icon/icon.js +0 -89
  105. package/dist/collection/components/icon/iconsArray.js +0 -2
  106. package/dist/collection/components/link/link.stories.js +0 -45
  107. package/dist/collection/components/message/message.stories.js +0 -117
  108. package/dist/collection/components/modal/modal-native.stories.js +0 -121
  109. package/dist/collection/components/modal/modal-webcomponent.stories.js +0 -78
  110. package/dist/collection/components/modal/modal.css +0 -324
  111. package/dist/collection/components/modal/modal.js +0 -146
  112. package/dist/collection/components/popover-canvas/popover-canvas.css +0 -20
  113. package/dist/collection/components/popover-canvas/popover-canvas.js +0 -190
  114. package/dist/collection/components/popover-canvas/popover-canvas.stories.js +0 -87
  115. package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +0 -132
  116. package/dist/collection/components/popover-menu/popover-menu.css +0 -19
  117. package/dist/collection/components/popover-menu/popover-menu.js +0 -189
  118. package/dist/collection/components/popover-menu/popover-menu.stories.js +0 -109
  119. package/dist/collection/components/radio-button/radio-button.stories.js +0 -68
  120. package/dist/collection/components/side-menu/side-menu.stories.js +0 -182
  121. package/dist/collection/components/slider/slider.css +0 -260
  122. package/dist/collection/components/slider/slider.js +0 -682
  123. package/dist/collection/components/slider/slider.stories.js +0 -251
  124. package/dist/collection/components/spinner/spinner.css +0 -79
  125. package/dist/collection/components/spinner/spinner.js +0 -61
  126. package/dist/collection/components/spinner/spinner.stories.js +0 -59
  127. package/dist/collection/components/stepper/stepper.stories.js +0 -139
  128. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +0 -159
  129. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +0 -302
  130. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +0 -65
  131. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +0 -172
  132. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +0 -126
  133. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +0 -43
  134. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +0 -153
  135. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +0 -103
  136. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +0 -32
  137. package/dist/collection/components/textarea/textarea.css +0 -283
  138. package/dist/collection/components/textarea/textarea.js +0 -336
  139. package/dist/collection/components/textarea/textarea.stories.js +0 -149
  140. package/dist/collection/components/textfield/textfield.css +0 -494
  141. package/dist/collection/components/textfield/textfield.js +0 -359
  142. package/dist/collection/components/textfield/textfield.stories.js +0 -222
  143. package/dist/collection/components/toast/toast.stories.js +0 -119
  144. package/dist/collection/components/toggle/toggle.stories.js +0 -62
  145. package/dist/collection/components/tooltip/tooltip.css +0 -46
  146. package/dist/collection/components/tooltip/tooltip.js +0 -200
  147. package/dist/collection/components/tooltip/tooltip.stories.js +0 -113
  148. package/dist/collection/components/utility/colour/background-color.stories.js +0 -96
  149. package/dist/collection/components/utility/colour/text-color.stories.js +0 -94
  150. package/dist/collection/foundations-stories/colour/colour-brand.stories.js +0 -38
  151. package/dist/collection/foundations-stories/colour/colour-scales.stories.js +0 -71
  152. package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +0 -40
  153. package/dist/collection/foundations-stories/grid/grid.stories.js +0 -386
  154. package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +0 -100
  155. package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +0 -94
  156. package/dist/collection/foundations-stories/typography/typography-body.stories.js +0 -16
  157. package/dist/collection/foundations-stories/typography/typography-detail.stories.js +0 -17
  158. package/dist/collection/foundations-stories/typography/typography-headline.stories.js +0 -39
  159. package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +0 -12
  160. package/dist/collection/index.js +0 -1
  161. package/dist/collection/stories/assets/code-brackets.svg +0 -1
  162. package/dist/collection/stories/assets/colors.svg +0 -1
  163. package/dist/collection/stories/assets/comments.svg +0 -1
  164. package/dist/collection/stories/assets/direction.svg +0 -1
  165. package/dist/collection/stories/assets/flow.svg +0 -1
  166. package/dist/collection/stories/assets/plugin.svg +0 -1
  167. package/dist/collection/stories/assets/repo.svg +0 -1
  168. package/dist/collection/stories/assets/stackalt.svg +0 -1
  169. package/dist/collection/utils/utils.js +0 -12
  170. package/dist/components/dropdown-option.js +0 -100
  171. package/dist/components/dropdown.js +0 -296
  172. package/dist/components/icon.js +0 -58
  173. package/dist/components/index.d.ts +0 -50
  174. package/dist/components/index.js +0 -30
  175. package/dist/components/popper.js +0 -1799
  176. package/dist/components/sdds-accordion-item.d.ts +0 -11
  177. package/dist/components/sdds-accordion-item.js +0 -60
  178. package/dist/components/sdds-accordion.d.ts +0 -11
  179. package/dist/components/sdds-accordion.js +0 -38
  180. package/dist/components/sdds-badges.d.ts +0 -11
  181. package/dist/components/sdds-badges.js +0 -76
  182. package/dist/components/sdds-body-cell.d.ts +0 -11
  183. package/dist/components/sdds-body-cell.js +0 -6
  184. package/dist/components/sdds-button.d.ts +0 -11
  185. package/dist/components/sdds-button.js +0 -58
  186. package/dist/components/sdds-datetime.d.ts +0 -11
  187. package/dist/components/sdds-datetime.js +0 -90
  188. package/dist/components/sdds-dropdown-filter.d.ts +0 -11
  189. package/dist/components/sdds-dropdown-filter.js +0 -138
  190. package/dist/components/sdds-dropdown-option.d.ts +0 -11
  191. package/dist/components/sdds-dropdown-option.js +0 -6
  192. package/dist/components/sdds-dropdown.d.ts +0 -11
  193. package/dist/components/sdds-dropdown.js +0 -6
  194. package/dist/components/sdds-header-cell.d.ts +0 -11
  195. package/dist/components/sdds-header-cell.js +0 -173
  196. package/dist/components/sdds-icon.d.ts +0 -11
  197. package/dist/components/sdds-icon.js +0 -6
  198. package/dist/components/sdds-inline-tabs-fullbleed.d.ts +0 -11
  199. package/dist/components/sdds-inline-tabs-fullbleed.js +0 -115
  200. package/dist/components/sdds-inline-tabs.d.ts +0 -11
  201. package/dist/components/sdds-inline-tabs.js +0 -235
  202. package/dist/components/sdds-modal.d.ts +0 -11
  203. package/dist/components/sdds-modal.js +0 -69
  204. package/dist/components/sdds-navigation-tabs.d.ts +0 -11
  205. package/dist/components/sdds-navigation-tabs.js +0 -113
  206. package/dist/components/sdds-popover-canvas.d.ts +0 -11
  207. package/dist/components/sdds-popover-canvas.js +0 -97
  208. package/dist/components/sdds-popover-menu.d.ts +0 -11
  209. package/dist/components/sdds-popover-menu.js +0 -96
  210. package/dist/components/sdds-slider.d.ts +0 -11
  211. package/dist/components/sdds-slider.js +0 -366
  212. package/dist/components/sdds-spinner.d.ts +0 -11
  213. package/dist/components/sdds-spinner.js +0 -37
  214. package/dist/components/sdds-table-body-row-expandable.d.ts +0 -11
  215. package/dist/components/sdds-table-body-row-expandable.js +0 -104
  216. package/dist/components/sdds-table-body-row.d.ts +0 -11
  217. package/dist/components/sdds-table-body-row.js +0 -6
  218. package/dist/components/sdds-table-body.d.ts +0 -11
  219. package/dist/components/sdds-table-body.js +0 -337
  220. package/dist/components/sdds-table-footer.d.ts +0 -11
  221. package/dist/components/sdds-table-footer.js +0 -196
  222. package/dist/components/sdds-table-header.d.ts +0 -11
  223. package/dist/components/sdds-table-header.js +0 -125
  224. package/dist/components/sdds-table-toolbar.d.ts +0 -11
  225. package/dist/components/sdds-table-toolbar.js +0 -88
  226. package/dist/components/sdds-table.d.ts +0 -11
  227. package/dist/components/sdds-table.js +0 -92
  228. package/dist/components/sdds-textarea.d.ts +0 -11
  229. package/dist/components/sdds-textarea.js +0 -90
  230. package/dist/components/sdds-textfield.d.ts +0 -11
  231. package/dist/components/sdds-textfield.js +0 -111
  232. package/dist/components/sdds-tooltip.d.ts +0 -11
  233. package/dist/components/sdds-tooltip.js +0 -116
  234. package/dist/components/table-body-cell.js +0 -102
  235. package/dist/components/table-body-row.js +0 -119
  236. package/dist/esm/index-b67b15a6.js +0 -1884
  237. package/dist/esm/index.js +0 -1
  238. package/dist/esm/loader.js +0 -17
  239. package/dist/esm/polyfills/core-js.js +0 -11
  240. package/dist/esm/polyfills/css-shim.js +0 -1
  241. package/dist/esm/polyfills/dom.js +0 -79
  242. package/dist/esm/polyfills/es5-html-element.js +0 -1
  243. package/dist/esm/polyfills/index.js +0 -34
  244. package/dist/esm/polyfills/system.js +0 -6
  245. package/dist/esm/popper-f860750c.js +0 -1799
  246. package/dist/esm/sdds-accordion-item.entry.js +0 -30
  247. package/dist/esm/sdds-accordion.entry.js +0 -17
  248. package/dist/esm/sdds-badges.entry.js +0 -51
  249. package/dist/esm/sdds-body-cell_2.entry.js +0 -168
  250. package/dist/esm/sdds-button.entry.js +0 -32
  251. package/dist/esm/sdds-datetime.entry.js +0 -62
  252. package/dist/esm/sdds-dropdown-filter.entry.js +0 -88
  253. package/dist/esm/sdds-dropdown_2.entry.js +0 -330
  254. package/dist/esm/sdds-header-cell.entry.js +0 -137
  255. package/dist/esm/sdds-icon.entry.js +0 -38
  256. package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +0 -92
  257. package/dist/esm/sdds-inline-tabs.entry.js +0 -207
  258. package/dist/esm/sdds-modal.entry.js +0 -45
  259. package/dist/esm/sdds-navigation-tabs.entry.js +0 -91
  260. package/dist/esm/sdds-popover-canvas.entry.js +0 -72
  261. package/dist/esm/sdds-popover-menu.entry.js +0 -71
  262. package/dist/esm/sdds-slider.entry.js +0 -332
  263. package/dist/esm/sdds-spinner.entry.js +0 -17
  264. package/dist/esm/sdds-table-body-row-expandable.entry.js +0 -77
  265. package/dist/esm/sdds-table-body.entry.js +0 -285
  266. package/dist/esm/sdds-table-footer.entry.js +0 -161
  267. package/dist/esm/sdds-table-header.entry.js +0 -96
  268. package/dist/esm/sdds-table-toolbar.entry.js +0 -62
  269. package/dist/esm/sdds-table.entry.js +0 -65
  270. package/dist/esm/sdds-textarea.entry.js +0 -57
  271. package/dist/esm/sdds-textfield.entry.js +0 -78
  272. package/dist/esm/sdds-tooltip.entry.js +0 -91
  273. package/dist/esm/tegel.js +0 -17
  274. package/dist/index.cjs.js +0 -1
  275. package/dist/index.js +0 -1
  276. package/dist/node_modules/@types/jest/index.d.ts +0 -1512
  277. package/dist/tegel/index.esm.js +0 -0
  278. package/dist/tegel/p-040efb32.entry.js +0 -1
  279. package/dist/tegel/p-12ca5cfa.entry.js +0 -1
  280. package/dist/tegel/p-157e1618.js +0 -2
  281. package/dist/tegel/p-1fe61cf6.entry.js +0 -1
  282. package/dist/tegel/p-2f376504.entry.js +0 -1
  283. package/dist/tegel/p-44ced895.entry.js +0 -1
  284. package/dist/tegel/p-4880f03d.entry.js +0 -1
  285. package/dist/tegel/p-4aba73a3.entry.js +0 -1
  286. package/dist/tegel/p-4b58a02c.entry.js +0 -1
  287. package/dist/tegel/p-4cb85347.entry.js +0 -1
  288. package/dist/tegel/p-52031b5a.entry.js +0 -1
  289. package/dist/tegel/p-677baf7f.entry.js +0 -1
  290. package/dist/tegel/p-71797eaf.entry.js +0 -1
  291. package/dist/tegel/p-7373284c.entry.js +0 -1
  292. package/dist/tegel/p-7451779b.entry.js +0 -1
  293. package/dist/tegel/p-77aeea3b.entry.js +0 -1
  294. package/dist/tegel/p-8582d6a7.entry.js +0 -1
  295. package/dist/tegel/p-96021bd0.entry.js +0 -1
  296. package/dist/tegel/p-9d8caf51.entry.js +0 -1
  297. package/dist/tegel/p-a5919930.entry.js +0 -1
  298. package/dist/tegel/p-b01cface.entry.js +0 -1
  299. package/dist/tegel/p-bf896643.entry.js +0 -1
  300. package/dist/tegel/p-c311725c.entry.js +0 -1
  301. package/dist/tegel/p-cf72dfd9.entry.js +0 -1
  302. package/dist/tegel/p-d91caec6.entry.js +0 -1
  303. package/dist/tegel/p-e10eec33.entry.js +0 -1
  304. package/dist/tegel/p-ec26fc38.js +0 -1
  305. package/dist/tegel/p-f2262a69.entry.js +0 -1
  306. package/dist/tegel/p-f2f7aa45.entry.js +0 -1
  307. package/dist/tegel/tegel.css +0 -101
  308. package/dist/tegel/tegel.esm.js +0 -1
  309. package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +0 -17
  310. package/dist/types/components/accordion/accordion.d.ts +0 -7
  311. package/dist/types/components/accordion/accordion.stories.d.ts +0 -77
  312. package/dist/types/components/badge/badge.stories.d.ts +0 -66
  313. package/dist/types/components/badge/badges.d.ts +0 -16
  314. package/dist/types/components/banner/banner.stories.d.ts +0 -68
  315. package/dist/types/components/block/block.stories.d.ts +0 -31
  316. package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +0 -12
  317. package/dist/types/components/button/button-component.d.ts +0 -15
  318. package/dist/types/components/button/button-native.stories.d.ts +0 -144
  319. package/dist/types/components/button/button-webcomponent.stories.d.ts +0 -143
  320. package/dist/types/components/card/card.stories.d.ts +0 -114
  321. package/dist/types/components/checkbox/checkbox.stories.d.ts +0 -39
  322. package/dist/types/components/chips/chips.stories.d.ts +0 -81
  323. package/dist/types/components/data-table/native-table.stories.d.ts +0 -147
  324. package/dist/types/components/data-table/table/table.d.ts +0 -47
  325. package/dist/types/components/data-table/table-body/table-body.d.ts +0 -54
  326. package/dist/types/components/data-table/table-body-cell/table-body-cell.d.ts +0 -24
  327. package/dist/types/components/data-table/table-body-row/table-body-row.d.ts +0 -27
  328. package/dist/types/components/data-table/table-body-row-expandable/table-body-row-expandable.d.ts +0 -27
  329. package/dist/types/components/data-table/table-component-basic.stories.d.ts +0 -100
  330. package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +0 -98
  331. package/dist/types/components/data-table/table-component-bodydata.stories.d.ts +0 -38
  332. package/dist/types/components/data-table/table-component-custom-width.stories.d.ts +0 -147
  333. package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +0 -87
  334. package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +0 -87
  335. package/dist/types/components/data-table/table-component-filtering.stories.d.ts +0 -100
  336. package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +0 -100
  337. package/dist/types/components/data-table/table-component-pagination.stories.d.ts +0 -100
  338. package/dist/types/components/data-table/table-component-sorting.stories.d.ts +0 -79
  339. package/dist/types/components/data-table/table-footer/table-footer.d.ts +0 -50
  340. package/dist/types/components/data-table/table-header/table-header.d.ts +0 -27
  341. package/dist/types/components/data-table/table-header-cell/table-header-cell.d.ts +0 -45
  342. package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +0 -22
  343. package/dist/types/components/datetime/datetime.d.ts +0 -32
  344. package/dist/types/components/datetime/datetime.stories.d.ts +0 -80
  345. package/dist/types/components/divider/divider.stories.d.ts +0 -72
  346. package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +0 -42
  347. package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.stories.d.ts +0 -73
  348. package/dist/types/components/dropdown/dropdown-native.stories.d.ts +0 -57
  349. package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +0 -19
  350. package/dist/types/components/dropdown/dropdown-wc-default.stories.d.ts +0 -115
  351. package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +0 -115
  352. package/dist/types/components/dropdown/dropdown.d.ts +0 -56
  353. package/dist/types/components/footer/footer.stories.d.ts +0 -23
  354. package/dist/types/components/header/header-all.stories.d.ts +0 -29
  355. package/dist/types/components/header/header-default.stories.d.ts +0 -29
  356. package/dist/types/components/header/header-inline.stories.d.ts +0 -29
  357. package/dist/types/components/header/header-search.stories.d.ts +0 -29
  358. package/dist/types/components/header/header-toolbar.stories.d.ts +0 -29
  359. package/dist/types/components/icon/icon-font.stories.d.ts +0 -38
  360. package/dist/types/components/icon/icon-web-component.stories.d.ts +0 -38
  361. package/dist/types/components/icon/icon.d.ts +0 -12
  362. package/dist/types/components/link/link.stories.d.ts +0 -33
  363. package/dist/types/components/message/message.stories.d.ts +0 -67
  364. package/dist/types/components/modal/modal-native.stories.d.ts +0 -51
  365. package/dist/types/components/modal/modal-webcomponent.stories.d.ts +0 -44
  366. package/dist/types/components/modal/modal.d.ts +0 -16
  367. package/dist/types/components/popover-canvas/popover-canvas.d.ts +0 -18
  368. package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +0 -25
  369. package/dist/types/components/popover-menu/popover-menu-icons.stories.d.ts +0 -27
  370. package/dist/types/components/popover-menu/popover-menu.d.ts +0 -18
  371. package/dist/types/components/popover-menu/popover-menu.stories.d.ts +0 -27
  372. package/dist/types/components/radio-button/radio-button.stories.d.ts +0 -41
  373. package/dist/types/components/side-menu/side-menu.stories.d.ts +0 -42
  374. package/dist/types/components/slider/slider.d.ts +0 -82
  375. package/dist/types/components/slider/slider.stories.d.ts +0 -156
  376. package/dist/types/components/spinner/spinner.d.ts +0 -7
  377. package/dist/types/components/spinner/spinner.stories.d.ts +0 -37
  378. package/dist/types/components/stepper/stepper.stories.d.ts +0 -56
  379. package/dist/types/components/tabs/inline-tabs-default/inline-tabs.d.ts +0 -41
  380. package/dist/types/components/tabs/inline-tabs-default/inline-tabs.stories.d.ts +0 -41
  381. package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.d.ts +0 -20
  382. package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.d.ts +0 -25
  383. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +0 -18
  384. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +0 -13
  385. package/dist/types/components/textarea/textarea.d.ts +0 -41
  386. package/dist/types/components/textarea/textarea.stories.d.ts +0 -111
  387. package/dist/types/components/textfield/textfield.d.ts +0 -42
  388. package/dist/types/components/textfield/textfield.stories.d.ts +0 -176
  389. package/dist/types/components/toast/toast.stories.d.ts +0 -58
  390. package/dist/types/components/toggle/toggle.stories.d.ts +0 -42
  391. package/dist/types/components/tooltip/tooltip.d.ts +0 -20
  392. package/dist/types/components/tooltip/tooltip.stories.d.ts +0 -54
  393. package/dist/types/components/utility/colour/background-color.stories.d.ts +0 -58
  394. package/dist/types/components/utility/colour/text-color.stories.d.ts +0 -58
  395. package/dist/types/components.d.ts +0 -1752
  396. package/dist/types/foundations-stories/colour/colour-brand.stories.d.ts +0 -13
  397. package/dist/types/foundations-stories/colour/colour-scales.stories.d.ts +0 -13
  398. package/dist/types/foundations-stories/colour/colour-semantic.stories.d.ts +0 -13
  399. package/dist/types/foundations-stories/grid/grid.stories.d.ts +0 -35
  400. package/dist/types/foundations-stories/spacing/spacing-element.stories.d.ts +0 -8
  401. package/dist/types/foundations-stories/spacing/spacing-layout.stories.d.ts +0 -8
  402. package/dist/types/foundations-stories/typography/typography-body.stories.d.ts +0 -8
  403. package/dist/types/foundations-stories/typography/typography-detail.stories.d.ts +0 -8
  404. package/dist/types/foundations-stories/typography/typography-headline.stories.d.ts +0 -21
  405. package/dist/types/foundations-stories/typography/typography-paragraph.stories.d.ts +0 -8
  406. package/dist/types/global.d.ts +0 -2
  407. package/dist/types/index.d.ts +0 -1
  408. package/dist/types/stencil-public-runtime.d.ts +0 -1581
  409. package/dist/types/utils/utils.d.ts +0 -2
  410. package/loader/cdn.js +0 -3
  411. package/loader/index.cjs.js +0 -3
  412. package/loader/index.d.ts +0 -12
  413. package/loader/index.es2017.js +0 -3
  414. package/loader/index.js +0 -4
  415. package/loader/package.json +0 -11
@@ -1,93 +0,0 @@
1
- import { formatHtmlPreview } from '../../utils/utils';
2
- // FIXME: CMS: Change state to type in Code tab of component
3
- export default {
4
- title: 'Components/Banner',
5
- parameters: {
6
- layout: 'fullscreen',
7
- design: [
8
- {
9
- name: 'Figma',
10
- type: 'figma',
11
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=5927%3A497&t=rVXuTOgTmXPauyHd-1',
12
- },
13
- {
14
- name: 'Link',
15
- type: 'link',
16
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=5927%3A497&t=rVXuTOgTmXPauyHd-1',
17
- },
18
- ],
19
- },
20
- argTypes: {
21
- state: {
22
- name: 'Type',
23
- description: 'Changes type of component',
24
- options: ['Default', 'Error', 'Info'],
25
- control: {
26
- type: 'radio',
27
- },
28
- table: {
29
- defaultValue: { summary: 'default' },
30
- },
31
- },
32
- header: {
33
- name: 'Header',
34
- description: 'Text to display in header section',
35
- control: {
36
- type: 'text',
37
- },
38
- },
39
- subheader: {
40
- name: 'Subheader',
41
- description: 'Text to display in subheader section',
42
- control: {
43
- type: 'text',
44
- },
45
- },
46
- link: {
47
- name: 'Link',
48
- description: 'Text to display in link section',
49
- control: {
50
- type: 'text',
51
- },
52
- },
53
- prefix: {
54
- name: 'Show icon',
55
- description: 'If an icon should be displayed. For type default the truck icon is used in this example, but it should be changed to suit your needs.',
56
- control: {
57
- type: 'boolean',
58
- },
59
- table: {
60
- defaultValue: { summary: 'true' },
61
- },
62
- },
63
- },
64
- args: {
65
- state: 'Default',
66
- header: 'This is a header text area',
67
- subheader: 'SubHeader text area',
68
- link: 'Learn more',
69
- prefix: true,
70
- },
71
- };
72
- const Template = ({ state, prefix, header, subheader, link }) => formatHtmlPreview(`
73
- <div class="sdds-banner sdds-banner-${state.toLowerCase()}">
74
- ${prefix && state === 'error'
75
- ? '<span class="sdds-banner-prefix"><sdds-icon name="error" size="20px"></sdds-icon></span>'
76
- : ''}
77
- ${prefix && state === 'info'
78
- ? '<span class="sdds-banner-prefix"><sdds-icon name="info" size="20px"></sdds-icon></span>'
79
- : ''}
80
- ${prefix && !(state === 'info' || state === 'error')
81
- ? '<span class="sdds-banner-prefix"><sdds-icon name="truck" size="20px"></sdds-icon></span>'
82
- : ''}
83
- <div class="sdds-banner-body">
84
- ${header && `<h6 class="sdds-banner-header">${header}</h6>`}
85
- ${subheader && `<div class="sdds-banner-subheader">${subheader}</div>`}
86
- ${link && `<a class="sdds-link sdds-banner-link">${link}</a>`}
87
- </div>
88
- <button type="button" aria-label="close" class="sdds-banner-close">
89
- <sdds-icon name="cross" size="20px"></sdds-icon>
90
- </button>
91
- </div>
92
- `);
93
- export const Default = Template.bind({});
@@ -1,46 +0,0 @@
1
- import { formatHtmlPreview } from '../../utils/utils';
2
- export default {
3
- title: 'Components/Block',
4
- parameters: {
5
- layout: 'padded',
6
- design: [
7
- {
8
- name: 'Figma',
9
- type: 'figma',
10
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9743%3A24020&t=rVXuTOgTmXPauyHd-1',
11
- },
12
- {
13
- name: 'Link',
14
- type: 'link',
15
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9743%3A24020&t=rVXuTOgTmXPauyHd-1',
16
- },
17
- ],
18
- },
19
- argTypes: {
20
- type: {
21
- name: 'Mode variation',
22
- description: 'Mode variation adjusts component colors to have better visibility depending on global mode and background. ',
23
- control: {
24
- type: 'radio',
25
- },
26
- options: ['Primary', 'Secondary'],
27
- table: {
28
- defaultValue: { summary: 'Primary' },
29
- },
30
- },
31
- },
32
- args: {
33
- type: 'Primary',
34
- },
35
- };
36
- const Template = ({ type }) => formatHtmlPreview(`
37
- <div class="sdds-block sdds-block-${type.toLowerCase()}">
38
- <h2 class="sdds-headline-02">Block</h2>
39
- <p class="sdds-body-01">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In condimentum nisi ut eleifend ultrices. Nunc venenatis maximus sapien, ac bibendum nisl aliquam in. Morbi ac velit et ligula consectetur interdum. Vestibulum condimentum, augue vitae lobortis rhoncus, mi est ultricies mi, sed tincidunt magna nibh in lectus. Pellentesque vel vulputate orci, vel lacinia orci. Sed suscipit leo at diam ullamcorper, vitae volutpat neque dapibus. Maecenas sit amet rhoncus arcu. Sed sed molestie elit. Nullam in interdum est, vitae aliquam ipsum. Nunc rutrum nibh ut arcu egestas egestas.</p>
40
- <div class="sdds-block">
41
- <h3 class="sdds-headline-03">Block in a block</h3>
42
- <p class="sdds-body-02">Lorem ipsum dolor sit amet, consectetur adipiscing elit. In condimentum nisi ut eleifend ultrices. Nunc venenatis maximus sapien, ac bibendum nisl aliquam in. Morbi ac velit et ligula consectetur interdum. Vestibulum condimentum, augue vitae lobortis rhoncus, mi est ultricies mi, sed tincidunt magna nibh in lectus. Pellentesque vel vulputate orci, vel lacinia orci. Sed suscipit leo at diam ullamcorper, vitae volutpat neque dapibus. Maecenas sit amet rhoncus arcu. Sed sed molestie elit. Nullam in interdum est, vitae aliquam ipsum. Nunc rutrum nibh ut arcu egestas egestas.</p>
43
- </div>
44
- </div>
45
- `);
46
- export const Default = Template.bind({});
@@ -1,26 +0,0 @@
1
- export default {
2
- title: 'Components/Breadcrumb',
3
- parameters: {
4
- design: [
5
- {
6
- name: 'Figma',
7
- type: 'figma',
8
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=2703%3A4725&t=rVXuTOgTmXPauyHd-1',
9
- },
10
- {
11
- name: 'Link',
12
- type: 'link',
13
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=2703%3A4725&t=rVXuTOgTmXPauyHd-1',
14
- },
15
- ],
16
- }
17
- };
18
- const Template = () => `
19
- <div class="sdds-breadcrumb">
20
- <div class="sdds-breadcrumb-item"><a href="#">Page 1</a></div>
21
- <div class="sdds-breadcrumb-item"><a href="#">Page 2</a></div>
22
- <div class="sdds-breadcrumb-item sdds-breadcrumb-item-current"><a aria-current="page">Page 3</a></div>
23
- </div>
24
- `;
25
- export const Default = Template.bind({});
26
- Default.args = {};
@@ -1,154 +0,0 @@
1
- import { h } from '@stencil/core';
2
- export class SddsButton {
3
- constructor() {
4
- this.text = '';
5
- this.type = 'primary';
6
- this.variant = 'default';
7
- this.size = 'lg';
8
- this.disabled = false;
9
- this.fullbleed = false;
10
- this.onlyIcon = false;
11
- }
12
- componentWillLoad() {
13
- if (this.text === '') {
14
- this.onlyIcon = true;
15
- }
16
- }
17
- render() {
18
- return (h("button", { class: `sdds-btn sdds-btn-${this.type}
19
- ${`sdds-btn-${this.size}`}
20
- ${this.disabled ? 'disabled' : ''}
21
- ${this.fullbleed ? 'sdds-btn-fullbleed' : ''}
22
- ${this.variant === 'variant' ? 'sdds-on-white-bg' : ''}
23
- ${this.onlyIcon ? 'sdds-btn-only-icon' : ''}` }, h("span", { class: "sdds-btn-text" }, this.text), h("slot", { name: "icon" })));
24
- }
25
- static get is() { return "sdds-button"; }
26
- static get encapsulation() { return "shadow"; }
27
- static get originalStyleUrls() {
28
- return {
29
- "$": ["button.scss"]
30
- };
31
- }
32
- static get styleUrls() {
33
- return {
34
- "$": ["button.css"]
35
- };
36
- }
37
- static get properties() {
38
- return {
39
- "text": {
40
- "type": "string",
41
- "mutable": false,
42
- "complexType": {
43
- "original": "string",
44
- "resolved": "string",
45
- "references": {}
46
- },
47
- "required": false,
48
- "optional": false,
49
- "docs": {
50
- "tags": [],
51
- "text": "Text inside a button"
52
- },
53
- "attribute": "text",
54
- "reflect": false,
55
- "defaultValue": "''"
56
- },
57
- "type": {
58
- "type": "string",
59
- "mutable": false,
60
- "complexType": {
61
- "original": "'primary' | 'secondary' | 'ghost' | 'danger'",
62
- "resolved": "\"danger\" | \"ghost\" | \"primary\" | \"secondary\"",
63
- "references": {}
64
- },
65
- "required": false,
66
- "optional": false,
67
- "docs": {
68
- "tags": [],
69
- "text": "Type of button"
70
- },
71
- "attribute": "type",
72
- "reflect": false,
73
- "defaultValue": "'primary'"
74
- },
75
- "variant": {
76
- "type": "string",
77
- "mutable": false,
78
- "complexType": {
79
- "original": "'default' | 'variant'",
80
- "resolved": "\"default\" | \"variant\"",
81
- "references": {}
82
- },
83
- "required": false,
84
- "optional": false,
85
- "docs": {
86
- "tags": [],
87
- "text": ""
88
- },
89
- "attribute": "variant",
90
- "reflect": false,
91
- "defaultValue": "'default'"
92
- },
93
- "size": {
94
- "type": "string",
95
- "mutable": false,
96
- "complexType": {
97
- "original": "'xs' | 'sm' | 'md' | 'lg'",
98
- "resolved": "\"lg\" | \"md\" | \"sm\" | \"xs\"",
99
- "references": {}
100
- },
101
- "required": false,
102
- "optional": false,
103
- "docs": {
104
- "tags": [],
105
- "text": ""
106
- },
107
- "attribute": "size",
108
- "reflect": false,
109
- "defaultValue": "'lg'"
110
- },
111
- "disabled": {
112
- "type": "boolean",
113
- "mutable": false,
114
- "complexType": {
115
- "original": "boolean",
116
- "resolved": "boolean",
117
- "references": {}
118
- },
119
- "required": false,
120
- "optional": false,
121
- "docs": {
122
- "tags": [],
123
- "text": "Control for disabled state of component"
124
- },
125
- "attribute": "disabled",
126
- "reflect": false,
127
- "defaultValue": "false"
128
- },
129
- "fullbleed": {
130
- "type": "boolean",
131
- "mutable": false,
132
- "complexType": {
133
- "original": "boolean",
134
- "resolved": "boolean",
135
- "references": {}
136
- },
137
- "required": false,
138
- "optional": false,
139
- "docs": {
140
- "tags": [],
141
- "text": "When enabled, makes button take 100% width"
142
- },
143
- "attribute": "fullbleed",
144
- "reflect": false,
145
- "defaultValue": "false"
146
- }
147
- };
148
- }
149
- static get states() {
150
- return {
151
- "onlyIcon": {}
152
- };
153
- }
154
- }
@@ -1,183 +0,0 @@
1
- import { formatHtmlPreview } from '../../utils/utils';
2
- import { iconsNames } from '../icon/iconsArray';
3
- export default {
4
- title: 'Components/Button',
5
- parameters: {
6
- layout: 'padded',
7
- chromatic: {
8
- disableSnapshot: false, // enables snapshotting for the component
9
- },
10
- design: [
11
- {
12
- name: 'Figma',
13
- type: 'figma',
14
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1574%3A72148&t=rVXuTOgTmXPauyHd-1',
15
- },
16
- {
17
- name: 'Link',
18
- type: 'link',
19
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1574%3A72148&t=rVXuTOgTmXPauyHd-1',
20
- },
21
- ],
22
- },
23
- argTypes: {
24
- text: {
25
- name: 'Text',
26
- description: 'The text to be displayed on the button',
27
- control: {
28
- type: 'text',
29
- },
30
- },
31
- btnType: {
32
- name: 'Type',
33
- description: 'Four different button types to help the user to distinguish the level of importance of the task they represent',
34
- control: {
35
- type: 'radio',
36
- },
37
- options: ['Primary', 'Secondary', 'Ghost', 'Danger'],
38
- table: {
39
- defaultValue: { summary: 'primary' },
40
- },
41
- },
42
- size: {
43
- name: 'Size',
44
- description: 'Size of the button',
45
- control: {
46
- type: 'radio',
47
- },
48
- options: ['Large', 'Medium', 'Small', 'Extra small'],
49
- table: {
50
- defaultValue: { summary: 'lg' },
51
- },
52
- },
53
- variant: {
54
- name: 'Variant',
55
- description: 'Button variant.',
56
- control: {
57
- type: 'radio',
58
- },
59
- options: ['On light', 'On dark'],
60
- table: {
61
- defaultValue: { summary: 'on-dark' },
62
- },
63
- },
64
- fullbleed: {
65
- name: 'Fullbleed',
66
- defaultValue: false,
67
- description: 'Fluid width in certain components-old',
68
- control: {
69
- type: 'boolean',
70
- },
71
- table: {
72
- defaultValue: { summary: false },
73
- },
74
- if: { arg: 'onlyIcon', eq: false },
75
- },
76
- disabled: {
77
- name: 'Disabled',
78
- type: 'boolean',
79
- description: 'Choose to disable the button',
80
- table: {
81
- defaultValue: { summary: false },
82
- },
83
- },
84
- onlyIcon: {
85
- name: 'Only Icon',
86
- description: 'Displays only the icon and excludes any text from the button',
87
- control: {
88
- type: 'boolean',
89
- },
90
- table: {
91
- defaultValue: { summary: false },
92
- },
93
- if: { arg: 'size', neq: 'Extra small' },
94
- },
95
- icon: {
96
- name: 'Icon',
97
- description: 'Icon to display on the button. Choose "none" to exclude the icon.',
98
- control: {
99
- type: 'select',
100
- },
101
- options: ['none', ...iconsNames],
102
- if: { arg: 'size', neq: 'Extra small' },
103
- },
104
- iconType: {
105
- name: 'Icon type',
106
- description: 'Native/Web Component',
107
- control: {
108
- type: 'radio',
109
- },
110
- options: ['Native', 'Web Component'],
111
- if: { arg: 'icon', neq: 'none' },
112
- },
113
- },
114
- args: {
115
- text: 'Button',
116
- btnType: 'Primary',
117
- size: 'Large',
118
- variant: 'On dark',
119
- fullbleed: false,
120
- disabled: false,
121
- onlyIcon: false,
122
- icon: 'none',
123
- iconType: 'Native',
124
- },
125
- };
126
- const NativeTemplate = ({ size, variant, btnType, fullbleed, text = 'Button', disabled = '', onlyIcon, icon, iconType, }) => {
127
- const fbClass = fullbleed ? 'sdds-btn-fullbleed' : '';
128
- const onlyIconCss = onlyIcon ? 'sdds-btn-icon' : '';
129
- const btnTypeLookUp = {
130
- Primary: 'primary',
131
- Secondary: 'secondary',
132
- Ghost: 'ghost',
133
- Danger: 'danger',
134
- };
135
- const sizeLookUp = {
136
- 'Large': 'lg',
137
- 'Medium': 'md',
138
- 'Small': 'sm',
139
- 'Extra small': 'xs',
140
- };
141
- const varaintLookup = {
142
- 'On light': 'on-light',
143
- 'On dark': 'on-dark',
144
- };
145
- return formatHtmlPreview(`
146
- <style>
147
- /* demo-wrapper is for demonstration purposes only*/
148
- ${icon && iconType === 'Native'
149
- ? `@import url('https://cdn.digitaldesign.scania.com/icons/webfont/css/sdds-icons.css');
150
- i.sdds-btn-icon{
151
- font-size: ${size === 'Small' ? '16' : '20'}px;
152
- }\n `
153
- : ''}\ .demo-wrapper{
154
- width: 100%;
155
- }
156
- </style>
157
-
158
- <div class="demo-wrapper">
159
- <button class="sdds-btn sdds-btn-${btnTypeLookUp[btnType]} sdds-btn-${sizeLookUp[size]} ${fbClass} ${disabled ? 'disabled' : ''} ${onlyIconCss} ${varaintLookup[variant] === 'on-light' ? 'sdds-on-white-bg' : ''} ${onlyIcon ? 'sdds-btn-only-icon' : ''}">
160
- ${!onlyIcon ? `<span class="sdds-btn-text">${text}</span>` : ''}
161
- ${onlyIcon || (icon && icon !== 'none')
162
- ? `
163
- ${iconType === 'Native'
164
- ? `<i class="sdds-btn-icon sdds-icon ${icon}"></i>`
165
- : `<sdds-icon class='sdds-btn-icon ' size='${sizeLookUp[size] === 'sm' ? '16px' : '20px'}' name='${icon}'></sdds-icon>`}
166
- `
167
- : ''}
168
- </button>
169
- </div>
170
- `);
171
- };
172
- export const Native = NativeTemplate.bind({});
173
- Native.args = {};
174
- export const NativeWithIcon = NativeTemplate.bind({});
175
- NativeWithIcon.args = {
176
- icon: 'truck',
177
- };
178
- export const NativeOnlyIcon = NativeTemplate.bind({});
179
- NativeOnlyIcon.args = {
180
- text: '',
181
- onlyIcon: true,
182
- icon: 'truck',
183
- };
@@ -1,182 +0,0 @@
1
- import { formatHtmlPreview } from '../../utils/utils';
2
- import { iconsNames } from '../icon/iconsArray';
3
- import readme from './readme.md';
4
- export default {
5
- title: 'Components/Button',
6
- parameters: {
7
- notes: readme,
8
- layout: 'padded',
9
- chromatic: {
10
- disableSnapshot: false, // enables snapshotting for the component
11
- },
12
- design: [
13
- {
14
- name: 'Figma',
15
- type: 'figma',
16
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1574%3A72148&t=rVXuTOgTmXPauyHd-1',
17
- },
18
- {
19
- name: 'Link',
20
- type: 'link',
21
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1574%3A72148&t=rVXuTOgTmXPauyHd-1',
22
- },
23
- ],
24
- },
25
- argTypes: {
26
- text: {
27
- name: 'Text',
28
- description: 'The text to be displayed on the button',
29
- control: {
30
- type: 'text',
31
- },
32
- },
33
- btnType: {
34
- name: 'Type',
35
- description: 'Four different button types to help the user to distinguish the level of importance of the task they represent',
36
- control: {
37
- type: 'radio',
38
- },
39
- options: ['Primary', 'Secondary', 'Ghost', 'Danger'],
40
- table: {
41
- defaultValue: { summary: 'primary' },
42
- },
43
- },
44
- size: {
45
- name: 'Size',
46
- control: {
47
- type: 'radio',
48
- },
49
- options: ['Large', 'Medium', 'Small', 'Extra small'],
50
- table: {
51
- defaultValue: { summary: 'lg' },
52
- },
53
- description: 'Size of the button',
54
- },
55
- variant: {
56
- name: 'Variant',
57
- control: {
58
- type: 'radio',
59
- },
60
- options: ['On light', 'On dark'],
61
- description: 'Button variant.',
62
- table: {
63
- defaultValue: { summary: 'on-dark' },
64
- },
65
- },
66
- fullbleed: {
67
- name: 'Fullbleed',
68
- type: 'boolean',
69
- description: 'Fluid width in certain components-old',
70
- table: {
71
- defaultValue: { summary: false },
72
- },
73
- if: { arg: 'onlyIcon', truthy: false },
74
- },
75
- disabled: {
76
- name: 'Disabled',
77
- type: 'boolean',
78
- description: 'Choose to disable the button',
79
- table: {
80
- defaultValue: { summary: false },
81
- },
82
- },
83
- onlyIcon: {
84
- name: 'Only Icon',
85
- description: 'Displays only the icon and excludes any text from the button',
86
- control: {
87
- type: 'boolean',
88
- },
89
- table: {
90
- defaultValue: { summary: false },
91
- },
92
- if: { arg: 'size', neq: 'Extra small' },
93
- },
94
- icon: {
95
- name: 'Icon',
96
- description: 'Icon to display on the button. Choose "none" to exclude the icon.',
97
- control: {
98
- type: 'select',
99
- },
100
- options: ['none', ...iconsNames],
101
- if: { arg: 'size', neq: 'Extra small' },
102
- },
103
- iconType: {
104
- name: 'Icon type',
105
- description: 'Native/Web Component',
106
- control: {
107
- type: 'radio',
108
- },
109
- options: ['Native', 'Web Component'],
110
- if: { arg: 'icon', neq: 'none' },
111
- },
112
- },
113
- args: {
114
- text: 'Button',
115
- btnType: 'Primary',
116
- size: 'Large',
117
- variant: 'On dark',
118
- fullbleed: false,
119
- disabled: false,
120
- onlyIcon: false,
121
- icon: 'none',
122
- iconType: 'Webcomponent',
123
- },
124
- };
125
- const WebComponentTemplate = ({ onlyIcon, size, variant, btnType, fullbleed, disabled, icon, iconType, text = 'Button', }) => {
126
- const btnTypeLookUp = {
127
- Primary: 'primary',
128
- Secondary: 'secondary',
129
- Ghost: 'ghost',
130
- Danger: 'danger',
131
- };
132
- const sizeLookUp = {
133
- 'Large': 'lg',
134
- 'Medium': 'md',
135
- 'Small': 'sm',
136
- 'Extra small': 'xs',
137
- };
138
- const varaintLookup = {
139
- 'On light': 'on-light',
140
- 'On dark': 'on-dark',
141
- };
142
- return formatHtmlPreview(`
143
- <style>
144
- /* demo-wrapper is for demonstration purposes only*/${icon && iconType === 'Native'
145
- ? `@import url('https://cdn.digitaldesign.scania.com/icons/webfont/css/sdds-icons.css');
146
- i.sdds-icon::before{
147
- font-size: ${size === 'Large' || size === 'Medium' ? '20' : '16'}px;
148
- }`
149
- : ''}
150
- .demo-wrapper{
151
- width: 100%;
152
- }
153
- </style>
154
-
155
- <div class="demo-wrapper">
156
- <sdds-button ${onlyIcon ? 'onlyIcon' : ''} type="${btnTypeLookUp[btnType]}" size="${sizeLookUp[size]}" ${disabled ? 'disabled' : ''} ${fullbleed ? 'fullbleed' : ''} text="${onlyIcon ? '' : text}" variant="${varaintLookup[variant]}" >
157
- ${onlyIcon || (icon && icon !== 'none')
158
- ? `
159
- ${iconType === 'Native'
160
- ? `<i class="sdds-btn-icon sdds-icon ${icon}" slot="icon"></i>`
161
- : `<sdds-icon slot="icon" class='sdds-btn-icon ' size='${sizeLookUp[size] == 'sm' ? '16px' : '20px'}' name='${icon}'></sdds-icon>`}
162
- `
163
- : ''}
164
- </sdds-button>
165
- </div>
166
- `);
167
- };
168
- /** Button as web component */
169
- export const WebComponent = WebComponentTemplate.bind({});
170
- WebComponent.args = {};
171
- export const WebComponentWithIcon = WebComponentTemplate.bind({});
172
- WebComponentWithIcon.args = {
173
- icon: 'truck',
174
- iconType: 'Webcomponent',
175
- };
176
- export const WebComponentOnlyIcon = WebComponentTemplate.bind({});
177
- WebComponentOnlyIcon.args = {
178
- text: '',
179
- iconType: 'Webcomponent',
180
- onlyIcon: true,
181
- icon: 'truck',
182
- };