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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/dist/components/dropdown-option.js +1 -0
  2. package/dist/components/dropdown.js +1 -0
  3. package/dist/components/icon.js +1 -0
  4. package/dist/components/sdds-accordion-item.js +1 -0
  5. package/dist/components/sdds-accordion.js +1 -0
  6. package/dist/components/sdds-badges.js +1 -0
  7. package/dist/components/sdds-button.js +1 -0
  8. package/dist/components/sdds-datetime.js +1 -0
  9. package/dist/components/sdds-dropdown-filter.js +1 -0
  10. package/dist/components/sdds-header-cell.js +1 -0
  11. package/dist/components/sdds-inline-tabs-fullbleed.js +1 -0
  12. package/dist/components/sdds-inline-tabs.js +1 -0
  13. package/dist/components/sdds-modal.js +1 -0
  14. package/dist/components/sdds-navigation-tabs.js +1 -0
  15. package/dist/components/sdds-popover-canvas.js +1 -0
  16. package/dist/components/sdds-popover-menu.js +1 -0
  17. package/dist/components/sdds-slider.js +1 -0
  18. package/dist/components/sdds-spinner.js +1 -0
  19. package/dist/components/sdds-table-body-row-expandable.js +1 -0
  20. package/dist/components/sdds-table-body.js +1 -0
  21. package/dist/components/sdds-table-footer.js +1 -0
  22. package/dist/components/sdds-table-header.js +1 -0
  23. package/dist/components/sdds-table-toolbar.js +1 -0
  24. package/dist/components/sdds-table.js +1 -0
  25. package/dist/components/sdds-textarea.js +1 -0
  26. package/dist/components/sdds-textfield.js +1 -0
  27. package/dist/components/sdds-tooltip.js +1 -0
  28. package/dist/components/table-body-cell.js +1 -0
  29. package/dist/components/table-body-row.js +1 -0
  30. package/package.json +2 -2
  31. package/dist/cjs/index-e1c79686.js +0 -1912
  32. package/dist/cjs/index.cjs.js +0 -2
  33. package/dist/cjs/loader.cjs.js +0 -21
  34. package/dist/cjs/popper-11d5f714.js +0 -1801
  35. package/dist/cjs/sdds-accordion-item.cjs.entry.js +0 -34
  36. package/dist/cjs/sdds-accordion.cjs.entry.js +0 -21
  37. package/dist/cjs/sdds-badges.cjs.entry.js +0 -55
  38. package/dist/cjs/sdds-body-cell_2.cjs.entry.js +0 -173
  39. package/dist/cjs/sdds-button.cjs.entry.js +0 -36
  40. package/dist/cjs/sdds-datetime.cjs.entry.js +0 -66
  41. package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +0 -92
  42. package/dist/cjs/sdds-dropdown_2.cjs.entry.js +0 -335
  43. package/dist/cjs/sdds-header-cell.cjs.entry.js +0 -141
  44. package/dist/cjs/sdds-icon.cjs.entry.js +0 -42
  45. package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +0 -96
  46. package/dist/cjs/sdds-inline-tabs.cjs.entry.js +0 -211
  47. package/dist/cjs/sdds-modal.cjs.entry.js +0 -49
  48. package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +0 -95
  49. package/dist/cjs/sdds-popover-canvas.cjs.entry.js +0 -76
  50. package/dist/cjs/sdds-popover-menu.cjs.entry.js +0 -75
  51. package/dist/cjs/sdds-slider.cjs.entry.js +0 -336
  52. package/dist/cjs/sdds-spinner.cjs.entry.js +0 -21
  53. package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +0 -81
  54. package/dist/cjs/sdds-table-body.cjs.entry.js +0 -289
  55. package/dist/cjs/sdds-table-footer.cjs.entry.js +0 -165
  56. package/dist/cjs/sdds-table-header.cjs.entry.js +0 -100
  57. package/dist/cjs/sdds-table-toolbar.cjs.entry.js +0 -66
  58. package/dist/cjs/sdds-table.cjs.entry.js +0 -69
  59. package/dist/cjs/sdds-textarea.cjs.entry.js +0 -61
  60. package/dist/cjs/sdds-textfield.cjs.entry.js +0 -82
  61. package/dist/cjs/sdds-tooltip.cjs.entry.js +0 -95
  62. package/dist/cjs/tegel.cjs.js +0 -19
  63. package/dist/collection/collection-manifest.json +0 -40
  64. package/dist/collection/components/accordion/accordion-item/accordion-item.css +0 -134
  65. package/dist/collection/components/accordion/accordion-item/accordion-item.js +0 -146
  66. package/dist/collection/components/accordion/accordion.css +0 -77
  67. package/dist/collection/components/accordion/accordion.js +0 -62
  68. package/dist/collection/components/accordion/accordion.stories.js +0 -91
  69. package/dist/collection/components/badge/badge.stories.js +0 -101
  70. package/dist/collection/components/badge/badges.css +0 -42
  71. package/dist/collection/components/badge/badges.js +0 -150
  72. package/dist/collection/components/banner/banner.stories.js +0 -93
  73. package/dist/collection/components/block/block.stories.js +0 -46
  74. package/dist/collection/components/breadcrumb/breadcrumb.stories.js +0 -26
  75. package/dist/collection/components/button/button-component.js +0 -154
  76. package/dist/collection/components/button/button-native.stories.js +0 -183
  77. package/dist/collection/components/button/button-webcomponent.stories.js +0 -182
  78. package/dist/collection/components/button/button.css +0 -658
  79. package/dist/collection/components/card/card.stories.js +0 -181
  80. package/dist/collection/components/checkbox/checkbox.stories.js +0 -54
  81. package/dist/collection/components/chips/chips.stories.js +0 -124
  82. package/dist/collection/components/data-table/native-table.stories.js +0 -182
  83. package/dist/collection/components/data-table/table/table.css +0 -15
  84. package/dist/collection/components/data-table/table/table.js +0 -253
  85. package/dist/collection/components/data-table/table-body/table-body.css +0 -22
  86. package/dist/collection/components/data-table/table-body/table-body.js +0 -425
  87. package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +0 -40
  88. package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +0 -169
  89. package/dist/collection/components/data-table/table-body-row/table-body-row.css +0 -196
  90. package/dist/collection/components/data-table/table-body-row/table-body-row.js +0 -164
  91. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +0 -79
  92. package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +0 -155
  93. package/dist/collection/components/data-table/table-component-basic.stories.js +0 -163
  94. package/dist/collection/components/data-table/table-component-batch-actions.stories.js +0 -129
  95. package/dist/collection/components/data-table/table-component-bodydata.stories.js +0 -58
  96. package/dist/collection/components/data-table/table-component-custom-width.stories.js +0 -198
  97. package/dist/collection/components/data-table/table-component-event-listeners.stories.js +0 -153
  98. package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +0 -137
  99. package/dist/collection/components/data-table/table-component-filtering.stories.js +0 -139
  100. package/dist/collection/components/data-table/table-component-multiselect.stories.js +0 -160
  101. package/dist/collection/components/data-table/table-component-pagination.stories.js +0 -129
  102. package/dist/collection/components/data-table/table-component-sorting.stories.js +0 -107
  103. package/dist/collection/components/data-table/table-footer/table-footer.css +0 -93
  104. package/dist/collection/components/data-table/table-footer/table-footer.js +0 -355
  105. package/dist/collection/components/data-table/table-header/table-header.css +0 -204
  106. package/dist/collection/components/data-table/table-header/table-header.js +0 -153
  107. package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +0 -126
  108. package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +0 -320
  109. package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +0 -92
  110. package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +0 -142
  111. package/dist/collection/components/datetime/datetime.css +0 -375
  112. package/dist/collection/components/datetime/datetime.js +0 -251
  113. package/dist/collection/components/datetime/datetime.stories.js +0 -149
  114. package/dist/collection/components/divider/divider.stories.js +0 -116
  115. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +0 -339
  116. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +0 -130
  117. package/dist/collection/components/dropdown/dropdown-native.stories.js +0 -90
  118. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +0 -185
  119. package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +0 -151
  120. package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +0 -146
  121. package/dist/collection/components/dropdown/dropdown.css +0 -891
  122. package/dist/collection/components/dropdown/dropdown.js +0 -554
  123. package/dist/collection/components/footer/footer.stories.js +0 -100
  124. package/dist/collection/components/header/header-all.stories.js +0 -217
  125. package/dist/collection/components/header/header-default.stories.js +0 -47
  126. package/dist/collection/components/header/header-inline.stories.js +0 -113
  127. package/dist/collection/components/header/header-search.stories.js +0 -263
  128. package/dist/collection/components/header/header-toolbar.stories.js +0 -204
  129. package/dist/collection/components/icon/icon-font.stories.js +0 -57
  130. package/dist/collection/components/icon/icon-web-component.stories.js +0 -51
  131. package/dist/collection/components/icon/icon.css +0 -16
  132. package/dist/collection/components/icon/icon.js +0 -89
  133. package/dist/collection/components/icon/iconsArray.js +0 -2
  134. package/dist/collection/components/link/link.stories.js +0 -45
  135. package/dist/collection/components/message/message.stories.js +0 -117
  136. package/dist/collection/components/modal/modal-native.stories.js +0 -121
  137. package/dist/collection/components/modal/modal-webcomponent.stories.js +0 -78
  138. package/dist/collection/components/modal/modal.css +0 -324
  139. package/dist/collection/components/modal/modal.js +0 -146
  140. package/dist/collection/components/popover-canvas/popover-canvas.css +0 -20
  141. package/dist/collection/components/popover-canvas/popover-canvas.js +0 -190
  142. package/dist/collection/components/popover-canvas/popover-canvas.stories.js +0 -87
  143. package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +0 -132
  144. package/dist/collection/components/popover-menu/popover-menu.css +0 -19
  145. package/dist/collection/components/popover-menu/popover-menu.js +0 -189
  146. package/dist/collection/components/popover-menu/popover-menu.stories.js +0 -109
  147. package/dist/collection/components/radio-button/radio-button.stories.js +0 -68
  148. package/dist/collection/components/side-menu/side-menu.stories.js +0 -182
  149. package/dist/collection/components/slider/slider.css +0 -260
  150. package/dist/collection/components/slider/slider.js +0 -682
  151. package/dist/collection/components/slider/slider.stories.js +0 -251
  152. package/dist/collection/components/spinner/spinner.css +0 -79
  153. package/dist/collection/components/spinner/spinner.js +0 -61
  154. package/dist/collection/components/spinner/spinner.stories.js +0 -59
  155. package/dist/collection/components/stepper/stepper.stories.js +0 -139
  156. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +0 -159
  157. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +0 -302
  158. package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +0 -65
  159. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +0 -172
  160. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +0 -126
  161. package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +0 -43
  162. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +0 -153
  163. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +0 -103
  164. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +0 -32
  165. package/dist/collection/components/textarea/textarea.css +0 -283
  166. package/dist/collection/components/textarea/textarea.js +0 -336
  167. package/dist/collection/components/textarea/textarea.stories.js +0 -149
  168. package/dist/collection/components/textfield/textfield.css +0 -494
  169. package/dist/collection/components/textfield/textfield.js +0 -359
  170. package/dist/collection/components/textfield/textfield.stories.js +0 -222
  171. package/dist/collection/components/toast/toast.stories.js +0 -119
  172. package/dist/collection/components/toggle/toggle.stories.js +0 -62
  173. package/dist/collection/components/tooltip/tooltip.css +0 -46
  174. package/dist/collection/components/tooltip/tooltip.js +0 -200
  175. package/dist/collection/components/tooltip/tooltip.stories.js +0 -113
  176. package/dist/collection/components/utility/colour/background-color.stories.js +0 -96
  177. package/dist/collection/components/utility/colour/text-color.stories.js +0 -94
  178. package/dist/collection/foundations-stories/colour/colour-brand.stories.js +0 -38
  179. package/dist/collection/foundations-stories/colour/colour-scales.stories.js +0 -71
  180. package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +0 -40
  181. package/dist/collection/foundations-stories/grid/grid.stories.js +0 -386
  182. package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +0 -100
  183. package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +0 -94
  184. package/dist/collection/foundations-stories/typography/typography-body.stories.js +0 -16
  185. package/dist/collection/foundations-stories/typography/typography-detail.stories.js +0 -17
  186. package/dist/collection/foundations-stories/typography/typography-headline.stories.js +0 -39
  187. package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +0 -12
  188. package/dist/collection/index.js +0 -1
  189. package/dist/collection/stories/assets/code-brackets.svg +0 -1
  190. package/dist/collection/stories/assets/colors.svg +0 -1
  191. package/dist/collection/stories/assets/comments.svg +0 -1
  192. package/dist/collection/stories/assets/direction.svg +0 -1
  193. package/dist/collection/stories/assets/flow.svg +0 -1
  194. package/dist/collection/stories/assets/plugin.svg +0 -1
  195. package/dist/collection/stories/assets/repo.svg +0 -1
  196. package/dist/collection/stories/assets/stackalt.svg +0 -1
  197. package/dist/collection/utils/utils.js +0 -12
  198. package/dist/esm/index-b67b15a6.js +0 -1884
  199. package/dist/esm/index.js +0 -1
  200. package/dist/esm/loader.js +0 -17
  201. package/dist/esm/polyfills/core-js.js +0 -11
  202. package/dist/esm/polyfills/css-shim.js +0 -1
  203. package/dist/esm/polyfills/dom.js +0 -79
  204. package/dist/esm/polyfills/es5-html-element.js +0 -1
  205. package/dist/esm/polyfills/index.js +0 -34
  206. package/dist/esm/polyfills/system.js +0 -6
  207. package/dist/esm/popper-f860750c.js +0 -1799
  208. package/dist/esm/sdds-accordion-item.entry.js +0 -30
  209. package/dist/esm/sdds-accordion.entry.js +0 -17
  210. package/dist/esm/sdds-badges.entry.js +0 -51
  211. package/dist/esm/sdds-body-cell_2.entry.js +0 -168
  212. package/dist/esm/sdds-button.entry.js +0 -32
  213. package/dist/esm/sdds-datetime.entry.js +0 -62
  214. package/dist/esm/sdds-dropdown-filter.entry.js +0 -88
  215. package/dist/esm/sdds-dropdown_2.entry.js +0 -330
  216. package/dist/esm/sdds-header-cell.entry.js +0 -137
  217. package/dist/esm/sdds-icon.entry.js +0 -38
  218. package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +0 -92
  219. package/dist/esm/sdds-inline-tabs.entry.js +0 -207
  220. package/dist/esm/sdds-modal.entry.js +0 -45
  221. package/dist/esm/sdds-navigation-tabs.entry.js +0 -91
  222. package/dist/esm/sdds-popover-canvas.entry.js +0 -72
  223. package/dist/esm/sdds-popover-menu.entry.js +0 -71
  224. package/dist/esm/sdds-slider.entry.js +0 -332
  225. package/dist/esm/sdds-spinner.entry.js +0 -17
  226. package/dist/esm/sdds-table-body-row-expandable.entry.js +0 -77
  227. package/dist/esm/sdds-table-body.entry.js +0 -285
  228. package/dist/esm/sdds-table-footer.entry.js +0 -161
  229. package/dist/esm/sdds-table-header.entry.js +0 -96
  230. package/dist/esm/sdds-table-toolbar.entry.js +0 -62
  231. package/dist/esm/sdds-table.entry.js +0 -65
  232. package/dist/esm/sdds-textarea.entry.js +0 -57
  233. package/dist/esm/sdds-textfield.entry.js +0 -78
  234. package/dist/esm/sdds-tooltip.entry.js +0 -91
  235. package/dist/esm/tegel.js +0 -17
  236. package/dist/index.cjs.js +0 -1
  237. package/dist/index.js +0 -1
  238. package/dist/tegel/index.esm.js +0 -0
  239. package/dist/tegel/p-040efb32.entry.js +0 -1
  240. package/dist/tegel/p-12ca5cfa.entry.js +0 -1
  241. package/dist/tegel/p-157e1618.js +0 -2
  242. package/dist/tegel/p-1fe61cf6.entry.js +0 -1
  243. package/dist/tegel/p-2f376504.entry.js +0 -1
  244. package/dist/tegel/p-44ced895.entry.js +0 -1
  245. package/dist/tegel/p-4880f03d.entry.js +0 -1
  246. package/dist/tegel/p-4aba73a3.entry.js +0 -1
  247. package/dist/tegel/p-4b58a02c.entry.js +0 -1
  248. package/dist/tegel/p-4cb85347.entry.js +0 -1
  249. package/dist/tegel/p-52031b5a.entry.js +0 -1
  250. package/dist/tegel/p-677baf7f.entry.js +0 -1
  251. package/dist/tegel/p-71797eaf.entry.js +0 -1
  252. package/dist/tegel/p-7373284c.entry.js +0 -1
  253. package/dist/tegel/p-7451779b.entry.js +0 -1
  254. package/dist/tegel/p-77aeea3b.entry.js +0 -1
  255. package/dist/tegel/p-8582d6a7.entry.js +0 -1
  256. package/dist/tegel/p-96021bd0.entry.js +0 -1
  257. package/dist/tegel/p-9d8caf51.entry.js +0 -1
  258. package/dist/tegel/p-a5919930.entry.js +0 -1
  259. package/dist/tegel/p-b01cface.entry.js +0 -1
  260. package/dist/tegel/p-bf896643.entry.js +0 -1
  261. package/dist/tegel/p-c311725c.entry.js +0 -1
  262. package/dist/tegel/p-cf72dfd9.entry.js +0 -1
  263. package/dist/tegel/p-d91caec6.entry.js +0 -1
  264. package/dist/tegel/p-e10eec33.entry.js +0 -1
  265. package/dist/tegel/p-ec26fc38.js +0 -1
  266. package/dist/tegel/p-f2262a69.entry.js +0 -1
  267. package/dist/tegel/p-f2f7aa45.entry.js +0 -1
  268. package/dist/tegel/tegel.css +0 -101
  269. package/dist/tegel/tegel.esm.js +0 -1
  270. package/loader/cdn.js +0 -3
  271. package/loader/index.cjs.js +0 -3
  272. package/loader/index.d.ts +0 -12
  273. package/loader/index.es2017.js +0 -3
  274. package/loader/index.js +0 -4
  275. package/loader/package.json +0 -11
@@ -1,159 +0,0 @@
1
- :host {
2
- outline: 0 !important;
3
- box-sizing: border-box;
4
- }
5
- :host * {
6
- box-sizing: border-box;
7
- }
8
-
9
- .sdds-inline-tabs {
10
- overflow: hidden;
11
- outline: 0;
12
- }
13
- .sdds-inline-tabs-header {
14
- position: relative;
15
- }
16
- .sdds-inline-tabs-main {
17
- background-color: var(--sdds-inline-tabs-main-bg);
18
- padding: 24px 24px 48px;
19
- }
20
- .sdds-inline-tabs-wrapper {
21
- display: flex;
22
- overflow-x: scroll;
23
- scrollbar-width: none;
24
- }
25
- .sdds-inline-tabs-wrapper::-webkit-scrollbar {
26
- display: none;
27
- }
28
- .sdds-inline-tabs--forward, .sdds-inline-tabs--back {
29
- cursor: pointer;
30
- width: 48px;
31
- height: 100%;
32
- border: 0;
33
- position: absolute;
34
- top: 0;
35
- background-color: var(--sdds-inlline-tabs-scroll-btn-bg);
36
- display: flex;
37
- justify-content: center;
38
- align-items: center;
39
- opacity: 0;
40
- pointer-events: none;
41
- }
42
- .sdds-inline-tabs--forward__show, .sdds-inline-tabs--back__show {
43
- opacity: 1;
44
- pointer-events: all;
45
- }
46
- .sdds-inline-tabs--forward:hover, .sdds-inline-tabs--back:hover {
47
- background-color: var(--sdds-inline-tabs-scroll-btn-hover-bg);
48
- }
49
- .sdds-inline-tabs--forward:active, .sdds-inline-tabs--back:active {
50
- background-color: var(--sdds-inline-tabs-scroll-btn-active-bg);
51
- }
52
- .sdds-inline-tabs--forward:focus, .sdds-inline-tabs--back:focus {
53
- outline: 2px solid var(--sdds-blue-400);
54
- outline-offset: -2px;
55
- }
56
- .sdds-inline-tabs--back {
57
- left: 0;
58
- }
59
- .sdds-inline-tabs--forward {
60
- right: 0;
61
- }
62
- .sdds-inline-tabs--tab {
63
- font: var(--sdds-headline-07);
64
- letter-spacing: var(--sdds-headline-07-ls);
65
- cursor: pointer;
66
- border: 0;
67
- color: var(--sdds-inline-tabs-tab-color);
68
- background-color: var(--sdds-inline-tabs-tab-bg);
69
- padding: 16px;
70
- min-width: 142px;
71
- text-decoration: none;
72
- display: block;
73
- position: relative;
74
- transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
75
- white-space: nowrap;
76
- flex-shrink: 0;
77
- text-align: left;
78
- outline: none;
79
- }
80
- .sdds-inline-tabs--tab > * {
81
- opacity: 0.6;
82
- }
83
- .sdds-inline-tabs--tab:not(:last-child) {
84
- border-right: 1px solid var(--sdds-inline-tabs-tab-border-color);
85
- }
86
- .sdds-inline-tabs--tab::after {
87
- content: " ";
88
- position: absolute;
89
- top: 0;
90
- right: 0;
91
- left: 0;
92
- margin-left: auto;
93
- width: 0;
94
- margin-right: auto;
95
- height: 2px;
96
- background-color: var(--sdds-inline-tabs-tab-indicator-bg);
97
- transition: width 0.15s ease-in-out;
98
- }
99
- .sdds-inline-tabs--tab:hover {
100
- background-color: var(--sdds-inline-tabs-tab-hover-bg);
101
- color: var(--sdds-inline-tabs-tab-hover-color);
102
- text-decoration: none;
103
- }
104
- .sdds-inline-tabs--tab:focus {
105
- outline: 2px solid var(--sdds-blue-400);
106
- outline-offset: -2px;
107
- }
108
- .sdds-inline-tabs--tab__active {
109
- background-color: var(--sdds-inline-tabs-tab-active-bg);
110
- color: var(--sdds-inline-tabs-tab-active-color);
111
- cursor: initial;
112
- border-right: 1px solid transparent !important;
113
- }
114
- .sdds-inline-tabs--tab__active > * {
115
- opacity: 1;
116
- }
117
- .sdds-inline-tabs--tab__active:hover {
118
- background-color: var(--sdds-inline-tabs-tab-active-bg);
119
- }
120
- .sdds-inline-tabs--tab__active::after {
121
- width: calc(100% + 2px);
122
- left: -1px;
123
- background-color: var(--sdds-inline-tabs-tab-active-indicator-bg);
124
- }
125
- .sdds-inline-tabs--tab__active::before {
126
- content: " ";
127
- background-color: var(--sdds-inline-tabs-tab-active-bg);
128
- width: 1px;
129
- top: 0;
130
- bottom: 0;
131
- left: -1px;
132
- display: block;
133
- position: absolute;
134
- }
135
- .sdds-inline-tabs--tab__active:first-child:focus::before {
136
- left: 0;
137
- }
138
- .sdds-inline-tabs--tab:disabled, .sdds-inline-tabs--tab__disabled {
139
- cursor: initial;
140
- color: var(--sdds-inline-tabs-tab-color);
141
- pointer-events: none;
142
- }
143
- .sdds-inline-tabs--tab:disabled > *, .sdds-inline-tabs--tab__disabled > * {
144
- opacity: 0.16;
145
- }
146
-
147
- .sdds-inline-tabs-primary .sdds-inline-tabs--tab__active {
148
- background-color: var(--sdds-inline-tabs-tab-active-bg);
149
- }
150
- .sdds-inline-tabs-primary .sdds-inline-tabs-main {
151
- background-color: var(--sdds-inline-tabs-main-bg);
152
- }
153
-
154
- .sdds-inline-tabs-secondary .sdds-inline-tabs--tab__active {
155
- background-color: var(--sdds-inline-tabs-tab-active-ongrey-bg);
156
- }
157
- .sdds-inline-tabs-secondary .sdds-inline-tabs-main {
158
- background-color: var(--sdds-inline-tabs-main-ongrey-bg);
159
- }
@@ -1,302 +0,0 @@
1
- import { Host, h } from '@stencil/core';
2
- export class InlineTabs {
3
- constructor() {
4
- 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)
5
- this.navWrapperElement = null; // reference to container with nav buttons
6
- this.tabWrapperElement = null; // reference to container with slotted children
7
- this.componentWidth = 0; // visible width of this component
8
- this.buttonsWidth = 0; // total width of all nav items combined
9
- this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
10
- this.useAutoHeight = false; // set height for slotted children or not
11
- this.defaultTab = '';
12
- this.autoHeight = false;
13
- this.modeVariant = 'primary';
14
- this.tabs = [];
15
- this.buttonWidth = 0;
16
- this.tabHeight = 0;
17
- this.showLeftScroll = false;
18
- this.showRightScroll = false;
19
- }
20
- /** used for switching to a tab programmatically */
21
- async showTab(key) {
22
- this.switchToTab(key);
23
- }
24
- _generateKeyFromName(name) {
25
- return name
26
- .replace(/\s/g, '-')
27
- .replace(/[^a-z0-9-]/gi, '')
28
- .toLowerCase();
29
- }
30
- componentWillLoad() {
31
- this._initComponent();
32
- }
33
- _initComponent(createInitialState = true) {
34
- this.tabs = [];
35
- if (this.autoHeight) {
36
- this.useAutoHeight = true;
37
- }
38
- Array.from(this.host.children).map((item, index) => {
39
- const name = item.dataset.name ? item.dataset.name : item.getAttribute('name') || `Tab ${index + 1}`;
40
- let key = item.dataset.tabKey ? item.dataset.tabKey : item.getAttribute('tab-key');
41
- if (!key) {
42
- key = this._generateKeyFromName(name);
43
- }
44
- if ((item.getAttribute('data-default') ? item.getAttribute('data-default') : item.getAttribute('default')) !== null) {
45
- this.startingTab = key;
46
- }
47
- let disabled = false;
48
- if ((item.getAttribute('aria-disabled') ? item.getAttribute('aria-disabled') : item.getAttribute('disabled')) !== null) {
49
- disabled = true;
50
- }
51
- this.tabs.push({
52
- name,
53
- key,
54
- element: item,
55
- disabled,
56
- visible: true,
57
- initialDisplay: window.getComputedStyle(item).display,
58
- });
59
- });
60
- createInitialState && this._setInitialState();
61
- this.tabs = Array.from(this.tabs);
62
- }
63
- _calculateButtonWidth() {
64
- const navButtons = this.navWrapperElement.querySelectorAll('button.sdds-inline-tabs--tab');
65
- let best = 0;
66
- Array.from(navButtons).forEach((navButton) => {
67
- const oldStyle = navButton.style.width;
68
- navButton.style.width = '';
69
- const width = navButton.clientWidth;
70
- navButton.style.width = oldStyle;
71
- if (navButton.clientWidth > best) {
72
- best = width;
73
- }
74
- });
75
- this.buttonWidth = best;
76
- }
77
- _calculateTabHeight() {
78
- let best = 0;
79
- this.tabs.forEach(tab => {
80
- const oldStyle = tab.element.style.display;
81
- tab.element.style.display = '';
82
- const height = tab.element.clientHeight;
83
- tab.element.style.display = oldStyle;
84
- if (height > best) {
85
- best = height;
86
- }
87
- });
88
- this.tabHeight = best;
89
- }
90
- componentDidRender() {
91
- this._calculateTabHeight();
92
- this._calculateButtonWidth();
93
- }
94
- componentDidLoad() {
95
- const mutationObserver = new MutationObserver(( /* mutations, observer */) => {
96
- const visibleTab = this.tabs.find(tab => tab.visible);
97
- this._initComponent(false);
98
- this._calculateTabHeight();
99
- this._calculateButtonWidth();
100
- visibleTab && this.switchToTab(visibleTab.key);
101
- });
102
- const resizeObserver = new ResizeObserver(entries => {
103
- for (const entry of entries) {
104
- const componentWidth = entry.contentRect.width;
105
- let buttonsWidth = 0;
106
- const navButtons = entry.target.querySelectorAll('button.sdds-inline-tabs--tab');
107
- Array.from(navButtons).forEach((navButton) => {
108
- buttonsWidth += navButton.clientWidth;
109
- });
110
- this.componentWidth = componentWidth;
111
- this.buttonsWidth = buttonsWidth;
112
- this.scrollWidth = buttonsWidth - componentWidth;
113
- if (this.buttonsWidth > this.componentWidth) {
114
- this._evaluateScrollButtons();
115
- }
116
- else {
117
- this.showLeftScroll = false;
118
- this.showRightScroll = false;
119
- }
120
- this._calculateTabHeight();
121
- }
122
- });
123
- mutationObserver.observe(this.host, {
124
- childList: true,
125
- attributes: true,
126
- });
127
- resizeObserver.observe(this.navWrapperElement);
128
- this._calculateButtonWidth();
129
- this._calculateTabHeight();
130
- }
131
- _setInitialState() {
132
- if (this.defaultTab) {
133
- this.startingTab = this.defaultTab;
134
- }
135
- this.tabs.map((tab, index) => {
136
- if (this.startingTab) {
137
- if (tab.key != this.startingTab) {
138
- this._hideTab(tab);
139
- }
140
- }
141
- else {
142
- if (index > 0) {
143
- this._hideTab(tab);
144
- }
145
- }
146
- });
147
- }
148
- _showTab(tab) {
149
- tab.element.style.display = '';
150
- tab.visible = true;
151
- }
152
- _hideTab(tab) {
153
- tab.element.style.display = 'none';
154
- tab.visible = false;
155
- }
156
- switchToTab(key) {
157
- this.tabs.map(tab => {
158
- if (tab.key == key) {
159
- this._showTab(tab);
160
- }
161
- else {
162
- this._hideTab(tab);
163
- }
164
- });
165
- this.tabs = Array.from(this.tabs);
166
- }
167
- _scrollRight() {
168
- const scroll = this.navWrapperElement.scrollLeft;
169
- this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;
170
- this._evaluateScrollButtons();
171
- }
172
- _scrollLeft() {
173
- const scroll = this.navWrapperElement.scrollLeft;
174
- this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;
175
- this._evaluateScrollButtons();
176
- }
177
- _evaluateScrollButtons() {
178
- const scroll = this.navWrapperElement.scrollLeft;
179
- if (scroll >= this.scrollWidth) {
180
- this.showRightScroll = false;
181
- }
182
- else {
183
- this.showRightScroll = true;
184
- }
185
- if (scroll <= 0) {
186
- this.showLeftScroll = false;
187
- }
188
- else {
189
- this.showLeftScroll = true;
190
- }
191
- }
192
- render() {
193
- const heightStyle = {};
194
- if (this.useAutoHeight) {
195
- heightStyle['height'] = `${this.tabHeight}px`;
196
- }
197
- 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)))));
198
- }
199
- static get is() { return "sdds-inline-tabs"; }
200
- static get encapsulation() { return "shadow"; }
201
- static get originalStyleUrls() {
202
- return {
203
- "$": ["inline-tabs.scss"]
204
- };
205
- }
206
- static get styleUrls() {
207
- return {
208
- "$": ["inline-tabs.css"]
209
- };
210
- }
211
- static get properties() {
212
- return {
213
- "defaultTab": {
214
- "type": "string",
215
- "mutable": false,
216
- "complexType": {
217
- "original": "string",
218
- "resolved": "string",
219
- "references": {}
220
- },
221
- "required": false,
222
- "optional": false,
223
- "docs": {
224
- "tags": [],
225
- "text": "either use this (default-tab=\"...\") or read attribute \"default\" from one of the slotted children."
226
- },
227
- "attribute": "default-tab",
228
- "reflect": false,
229
- "defaultValue": "''"
230
- },
231
- "autoHeight": {
232
- "type": "boolean",
233
- "mutable": false,
234
- "complexType": {
235
- "original": "boolean",
236
- "resolved": "boolean",
237
- "references": {}
238
- },
239
- "required": false,
240
- "optional": false,
241
- "docs": {
242
- "tags": [],
243
- "text": "different height settings. right now only supports \"auto\", otherwise ignored"
244
- },
245
- "attribute": "auto-height",
246
- "reflect": false,
247
- "defaultValue": "false"
248
- },
249
- "modeVariant": {
250
- "type": "string",
251
- "mutable": false,
252
- "complexType": {
253
- "original": "'primary' | 'secondary'",
254
- "resolved": "\"primary\" | \"secondary\"",
255
- "references": {}
256
- },
257
- "required": false,
258
- "optional": false,
259
- "docs": {
260
- "tags": [],
261
- "text": "Variant of the tabs, primary= on white, secondary= on grey50"
262
- },
263
- "attribute": "mode-variant",
264
- "reflect": false,
265
- "defaultValue": "'primary'"
266
- }
267
- };
268
- }
269
- static get states() {
270
- return {
271
- "tabs": {},
272
- "buttonWidth": {},
273
- "tabHeight": {},
274
- "showLeftScroll": {},
275
- "showRightScroll": {}
276
- };
277
- }
278
- static get methods() {
279
- return {
280
- "showTab": {
281
- "complexType": {
282
- "signature": "(key: string) => Promise<void>",
283
- "parameters": [{
284
- "tags": [],
285
- "text": ""
286
- }],
287
- "references": {
288
- "Promise": {
289
- "location": "global"
290
- }
291
- },
292
- "return": "Promise<void>"
293
- },
294
- "docs": {
295
- "text": "used for switching to a tab programmatically",
296
- "tags": []
297
- }
298
- }
299
- };
300
- }
301
- static get elementRef() { return "host"; }
302
- }
@@ -1,65 +0,0 @@
1
- import { formatHtmlPreview } from '../../../utils/utils';
2
- import readme from './readme.md';
3
- export default {
4
- title: 'Components/Tabs',
5
- parameters: {
6
- notes: readme,
7
- backgrounds: { default: 'white' },
8
- design: [
9
- {
10
- name: 'Figma',
11
- type: 'figma',
12
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10544%3A32834&t=Ne6myqwca5m00de7-1',
13
- },
14
- {
15
- name: 'Link',
16
- type: 'link',
17
- url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10544%3A32834&t=Ne6myqwca5m00de7-1',
18
- },
19
- ],
20
- },
21
- argTypes: {
22
- autoHeight: {
23
- name: 'Same height',
24
- description: 'Make all tab panels as tall as the tallest tab panel',
25
- control: {
26
- type: 'boolean',
27
- },
28
- },
29
- modeVariant: {
30
- name: "Mode variant",
31
- control: {
32
- type: 'radio'
33
- },
34
- options: ['Primary', 'Secondary'],
35
- },
36
- backgrounds: {
37
- table: {
38
- disable: true,
39
- },
40
- },
41
- },
42
- args: {
43
- autoHeight: false,
44
- modeVariant: 'Primary'
45
- },
46
- };
47
- // eslint-disable-next-line arrow-body-style
48
- const Template = ({ autoHeight = false, modeVariant }) => {
49
- return formatHtmlPreview(`
50
- <sdds-inline-tabs ${autoHeight ? 'auto-height' : ''} mode-variant="${modeVariant.toLowerCase()}">
51
- <div data-name="Tab with tall content">
52
- Tab panel 1
53
- <div style="width:200px; height:200px; background: linear-gradient(125deg,rgba(255, 0, 0, 1) 0%,rgba(255, 255, 0, 1) 33%,rgba(0, 192, 255, 1) 66%,rgba(192, 0, 255, 1) 100%);"></div>
54
- </div>
55
- <div data-name="Default tab" data-default="true">
56
- Tab panel 2
57
- </div>
58
- <div data-name="Disabled tab" aria-disabled="true">
59
- Tab panel 3
60
- </div>
61
- </sdds-inline-tabs>
62
- `);
63
- };
64
- export const InlineTabs = Template.bind({});
65
- InlineTabs.args = {};
@@ -1,172 +0,0 @@
1
- .sdds-inline-tabs-fullbleed {
2
- box-sizing: border-box;
3
- display: flex;
4
- position: relative;
5
- /* tab */
6
- /* tab states */
7
- }
8
- .sdds-inline-tabs-fullbleed * {
9
- box-sizing: border-box;
10
- }
11
- .sdds-inline-tabs-fullbleed::after {
12
- content: " ";
13
- display: block;
14
- border-bottom: 1px solid var(--sdds-inline-tabs-fullbleed-horizontal-divider-bg);
15
- left: 0;
16
- right: 0;
17
- bottom: 0;
18
- position: absolute;
19
- }
20
- .sdds-inline-tabs-fullbleed-wrapper {
21
- display: flex;
22
- flex-wrap: nowrap;
23
- width: 100%;
24
- overflow-x: scroll;
25
- scrollbar-width: none;
26
- }
27
- .sdds-inline-tabs-fullbleed-wrapper::-webkit-scrollbar {
28
- display: none;
29
- }
30
- .sdds-inline-tabs-fullbleed--forward {
31
- cursor: pointer;
32
- width: 48px;
33
- height: 100%;
34
- border: 0;
35
- position: absolute;
36
- right: 0;
37
- top: 0;
38
- background-color: var(--sdds-inline-tabs-fullbleed-scroll-btn-bg);
39
- display: flex;
40
- justify-content: center;
41
- align-items: center;
42
- opacity: 0;
43
- pointer-events: none;
44
- }
45
- .sdds-inline-tabs-fullbleed--forward__show {
46
- opacity: 1;
47
- pointer-events: all;
48
- }
49
- .sdds-inline-tabs-fullbleed--forward:hover {
50
- background-color: var(--sdds-inline-tabs-fullbleed-scroll-btn-hover-bg);
51
- }
52
- .sdds-inline-tabs-fullbleed--forward:active {
53
- background-color: var(--sdds-inline-tabs-fullbleed-scroll-btn-active-bg);
54
- }
55
- .sdds-inline-tabs-fullbleed--forward:focus {
56
- outline: 2px solid var(--sdds-blue-400);
57
- outline-offset: -2px;
58
- }
59
- .sdds-inline-tabs-fullbleed--back {
60
- cursor: pointer;
61
- width: 48px;
62
- height: 100%;
63
- border: 0;
64
- position: absolute;
65
- left: 0;
66
- top: 0;
67
- background-color: var(--sdds-inline-tabs-fullbleed-scroll-btn-bg);
68
- display: flex;
69
- justify-content: center;
70
- align-items: center;
71
- opacity: 0;
72
- pointer-events: none;
73
- }
74
- .sdds-inline-tabs-fullbleed--back__show {
75
- opacity: 1;
76
- pointer-events: all;
77
- }
78
- .sdds-inline-tabs-fullbleed--back:hover {
79
- background-color: var(--sdds-inline-tabs-fullbleed-scroll-btn-hover-bg);
80
- }
81
- .sdds-inline-tabs-fullbleed--back:active {
82
- background-color: var(--sdds-inline-tabs-fullbleed-scroll-btn-active-bg);
83
- }
84
- .sdds-inline-tabs-fullbleed--back:focus {
85
- outline: 2px solid var(--sdds-blue-400);
86
- outline-offset: -2px;
87
- }
88
- .sdds-inline-tabs-fullbleed-centered {
89
- justify-content: center;
90
- }
91
- ::slotted(.sdds-inline-tabs-fullbleed--tab) {
92
- font: var(--sdds-headline-07);
93
- letter-spacing: var(--sdds-headline-07-ls);
94
- color: rgba(0, 21, 51, 0.6);
95
- padding: 16px 0;
96
- margin-right: 32px;
97
- text-decoration: none;
98
- display: block;
99
- position: relative;
100
- transition: color 0.15s ease-in-out;
101
- white-space: nowrap;
102
- text-align: left;
103
- }
104
- ::slotted(.sdds-inline-tabs-fullbleed--tab)::after {
105
- content: " ";
106
- position: absolute;
107
- bottom: 0;
108
- right: 0;
109
- left: 0;
110
- margin-left: auto;
111
- width: 0;
112
- margin-right: auto;
113
- height: 2px;
114
- background-color: var(--sdds-inline-tabs-fullbleed-tab-hover-indicator-bg);
115
- transition: width 0.15s ease-in-out;
116
- z-index: 10;
117
- }
118
- ::slotted(.sdds-inline-tabs-fullbleed--tab:first-child) {
119
- margin-left: 32px;
120
- }
121
- ::slotted(.sdds-inline-tabs-fullbleed--tab:last-child) {
122
- margin-right: 32px;
123
- }
124
- ::slotted(.sdds-inline-tabs-fullbleed--tab:hover) {
125
- color: var(--sdds-inline-tabs-fullbleed-tab-hover-color);
126
- }
127
- ::slotted(.sdds-inline-tabs-fullbleed--tab:hover)::after {
128
- width: 100%;
129
- }
130
- ::slotted(.sdds-inline-tabs-fullbleed--tab:focus) {
131
- outline: 2px solid var(--sdds-blue-400);
132
- outline-offset: -2px;
133
- color: var(--sdds-inline-tabs-fullbleed-tab-focus-color);
134
- }
135
- ::slotted(.sdds-inline-tabs-fullbleed--tab:focus)::after {
136
- width: 0;
137
- }
138
- ::slotted(.sdds-inline-tabs-fullbleed--tab__active) {
139
- color: var(--sdds-inline-tabs-fullbleed-tab-active-color);
140
- }
141
- ::slotted(.sdds-inline-tabs-fullbleed--tab__active)::after {
142
- width: 100%;
143
- background-color: var(--sdds-inline-tabs-fullbleed-tab-active-indicator-bg);
144
- }
145
- ::slotted(.sdds-inline-tabs-fullbleed--tab__active:focus)::after {
146
- width: 100%;
147
- }
148
- ::slotted(.sdds-inline-tabs-fullbleed--tab__disabled) {
149
- color: var(--sdds-inline-tabs-fullbleed-tab-active-color);
150
- pointer-events: none;
151
- opacity: 0.16;
152
- }
153
-
154
- .sdds-inline-tabs-fullbleed-primary {
155
- background-color: var(--sdds-white);
156
- }
157
- .sdds-inline-tabs-fullbleed-primary .sdds-inline-tabs-fullbleed--forward {
158
- background-color: var(--sdds-white);
159
- }
160
- .sdds-inline-tabs-fullbleed-primary .sdds-inline-tabs-fullbleed--back {
161
- background-color: var(--sdds-white);
162
- }
163
-
164
- .sdds-inline-tabs-fullbleed-secondary {
165
- background-color: var(--sdds-grey-50);
166
- }
167
- .sdds-inline-tabs-fullbleed-secondary .sdds-inline-tabs-fullbleed--forward {
168
- background-color: var(--sdds-grey-50);
169
- }
170
- .sdds-inline-tabs-fullbleed-secondary .sdds-inline-tabs-fullbleed--back {
171
- background-color: var(--sdds-grey-50);
172
- }