@swisspost/design-system-styles 9.0.0-next.2 → 9.0.0-next.21

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 (321) hide show
  1. package/_svg-icon-map.scss +85 -23
  2. package/basics.css +1 -1
  3. package/basics.scss +2 -6
  4. package/cargo-external.css +7 -0
  5. package/cargo-external.scss +10 -0
  6. package/cargo-internal.css +7 -0
  7. package/cargo-internal.scss +10 -0
  8. package/cargo-tokens-external.css +1 -0
  9. package/cargo-tokens-external.scss +8 -0
  10. package/cargo-tokens-internal.css +1 -0
  11. package/cargo-tokens-internal.scss +8 -0
  12. package/components/_form-check.scss +166 -0
  13. package/components/_index.scss +21 -13
  14. package/components/appstore-badge.css +1 -0
  15. package/components/appstore-badge.scss +18 -0
  16. package/components/avatar.css +1 -0
  17. package/components/avatar.scss +41 -0
  18. package/components/badge.css +1 -1
  19. package/components/badge.scss +8 -2
  20. package/components/banner.css +1 -0
  21. package/components/banner.scss +105 -0
  22. package/components/blockquote.css +1 -0
  23. package/components/blockquote.scss +46 -0
  24. package/components/breadcrumb.css +1 -1
  25. package/components/breadcrumb.scss +4 -24
  26. package/components/breakpoints.css +1 -0
  27. package/components/breakpoints.scss +17 -0
  28. package/components/button-group.css +1 -1
  29. package/components/button-group.scss +7 -6
  30. package/components/button.css +1 -1
  31. package/components/button.scss +41 -228
  32. package/components/card-control.css +1 -1
  33. package/components/card-control.scss +33 -24
  34. package/components/card.css +1 -1
  35. package/components/card.scss +72 -68
  36. package/components/checkbox.css +1 -0
  37. package/components/checkbox.scss +127 -0
  38. package/components/chip.css +1 -1
  39. package/components/chip.scss +9 -8
  40. package/components/close.css +1 -1
  41. package/components/close.scss +0 -2
  42. package/components/datatable.css +1 -3
  43. package/components/datatable.scss +22 -17
  44. package/components/datepicker.css +1 -1
  45. package/components/datepicker.scss +6 -22
  46. package/components/dialog.css +1 -1
  47. package/components/dialog.scss +26 -38
  48. package/components/dropdown.css +1 -1
  49. package/components/dropdown.scss +9 -6
  50. package/components/fonts.css +1 -1
  51. package/components/fonts.scss +7 -45
  52. package/components/form-footer.css +1 -0
  53. package/components/form-footer.scss +18 -0
  54. package/components/form-hint.css +1 -0
  55. package/components/form-hint.scss +15 -0
  56. package/components/form-input.css +1 -0
  57. package/components/form-input.scss +301 -0
  58. package/components/form-range.css +1 -1
  59. package/components/form-range.scss +9 -9
  60. package/components/form-search-input.css +1 -0
  61. package/components/form-search-input.scss +97 -0
  62. package/components/form-select.css +1 -1
  63. package/components/form-select.scss +266 -55
  64. package/components/form-textarea.css +1 -1
  65. package/components/form-textarea.scss +172 -9
  66. package/components/globals/_index.scss +1 -0
  67. package/components/globals/post-footer.css +1 -0
  68. package/components/globals/post-footer.scss +113 -0
  69. package/components/header/_mixins.scss +48 -0
  70. package/components/header/index.css +1 -0
  71. package/components/header/index.scss +131 -0
  72. package/components/icon-button.css +1 -0
  73. package/components/icon-button.scss +19 -0
  74. package/components/icon-close-button.css +1 -0
  75. package/components/icon-close-button.scss +29 -0
  76. package/components/intranet-header/_icon.scss +1 -1
  77. package/components/intranet-header/_index.scss +0 -2
  78. package/components/intranet-header/_language-chooser.scss +3 -2
  79. package/components/intranet-header/_nav-overflow.scss +2 -2
  80. package/components/intranet-header/_scaffolding.scss +1 -1
  81. package/components/intranet-header/_searchbox.scss +1 -1
  82. package/components/intranet-header/_sidebar.scss +11 -11
  83. package/components/intranet-header/_top-navigation.scss +1 -1
  84. package/components/list-check.css +1 -0
  85. package/components/list-check.scss +79 -0
  86. package/components/list-group.css +1 -1
  87. package/components/list-group.scss +72 -127
  88. package/components/modal.css +2 -2
  89. package/components/modal.scss +2 -4
  90. package/components/offcanvas.css +1 -1
  91. package/components/offcanvas.scss +0 -2
  92. package/components/pagination.css +1 -1
  93. package/components/pagination.scss +10 -9
  94. package/components/popover.css +1 -1
  95. package/components/popover.scss +0 -2
  96. package/components/product-card.css +1 -1
  97. package/components/product-card.scss +11 -5
  98. package/components/progress.scss +0 -2
  99. package/components/radio-button.css +1 -0
  100. package/components/radio-button.scss +125 -0
  101. package/components/segmented-button.css +3 -0
  102. package/components/segmented-button.scss +207 -0
  103. package/components/skiplinks.css +1 -0
  104. package/components/skiplinks.scss +20 -0
  105. package/components/spinner.scss +0 -1
  106. package/components/stepper.css +1 -1
  107. package/components/stepper.scss +40 -33
  108. package/components/subnavigation.css +1 -1
  109. package/components/subnavigation.scss +17 -14
  110. package/components/switch.css +1 -0
  111. package/components/switch.scss +212 -0
  112. package/components/tables.css +1 -1
  113. package/components/tables.scss +0 -1
  114. package/components/tabs/_tab-title.scss +16 -55
  115. package/components/tabs/_tabs-wrapper.scss +3 -13
  116. package/components/tabs/index.css +1 -1
  117. package/components/tabs/index.scss +0 -2
  118. package/components/tag.css +1 -1
  119. package/components/tag.scss +1 -2
  120. package/components/teaser.css +1 -0
  121. package/components/teaser.scss +83 -0
  122. package/components/text-highlight.css +1 -1
  123. package/components/timepicker.css +1 -1
  124. package/components/timepicker.scss +13 -16
  125. package/components/toast.css +1 -1
  126. package/components/toast.scss +19 -16
  127. package/components/tooltip.css +1 -1
  128. package/components/tooltip.scss +0 -2
  129. package/components/transitions.scss +0 -2
  130. package/components/validation.css +1 -0
  131. package/components/validation.scss +120 -0
  132. package/elements/_index.scss +7 -1
  133. package/elements/anchor.css +1 -0
  134. package/elements/anchor.scss +33 -0
  135. package/elements/body.css +1 -1
  136. package/elements/body.scss +5 -1
  137. package/elements/fieldset-legend.css +1 -1
  138. package/elements/fieldset-legend.scss +7 -3
  139. package/elements/heading.css +1 -1
  140. package/elements/heading.scss +10 -12
  141. package/elements/list-bullet.css +1 -0
  142. package/elements/list-bullet.scss +43 -0
  143. package/elements/list-description.css +1 -0
  144. package/elements/list-description.scss +5 -0
  145. package/elements/list-number.css +1 -0
  146. package/elements/list-number.scss +33 -0
  147. package/elements/paragraph.css +1 -0
  148. package/elements/paragraph.scss +17 -0
  149. package/elements/reset.css +1 -1
  150. package/elements/reset.scss +16 -7
  151. package/elements.css +1 -0
  152. package/elements.scss +1 -0
  153. package/fonts.css +1 -1
  154. package/functions/_breakpoint.scss +26 -0
  155. package/functions/_forms.scss +46 -3
  156. package/functions/_icons.scss +2 -14
  157. package/helpers/_index.scss +4 -0
  158. package/helpers/clearfix.css +1 -0
  159. package/helpers/clearfix.scss +5 -0
  160. package/helpers/focus-ring.css +1 -0
  161. package/helpers/focus-ring.scss +5 -0
  162. package/helpers/text-truncation.css +1 -0
  163. package/helpers/text-truncation.scss +5 -0
  164. package/helpers/visually-hidden.css +1 -0
  165. package/helpers/visually-hidden.scss +5 -0
  166. package/index.css +3 -3
  167. package/index.scss +2 -5
  168. package/intranet.css +3 -3
  169. package/intranet.scss +2 -2
  170. package/layout/_containers.scss +32 -0
  171. package/layout/_section.scss +133 -0
  172. package/layout/grid/_index.scss +11 -0
  173. package/layout/grid/_mixins.scss +104 -0
  174. package/layout/grid/_variables.scss +2 -0
  175. package/layout/index.css +1 -0
  176. package/layout/index.scss +3 -0
  177. package/mixins/_button.scss +19 -15
  178. package/mixins/_form-checks.scss +1 -1
  179. package/mixins/_forms.scss +42 -33
  180. package/mixins/_icon-button.scss +27 -0
  181. package/mixins/_icons.scss +22 -32
  182. package/mixins/_index.scss +3 -2
  183. package/mixins/_layout.scss +26 -0
  184. package/mixins/_list.scss +112 -0
  185. package/mixins/_media.scss +58 -2
  186. package/mixins/_notification.scss +59 -53
  187. package/mixins/_utilities.scss +46 -25
  188. package/package.json +16 -16
  189. package/palettes/_mixins.scss +74 -0
  190. package/palettes/_utilities.scss +3 -0
  191. package/palettes/_variables.scss +2 -0
  192. package/palettes/cargo-palettes.css +1 -0
  193. package/palettes/cargo-palettes.scss +3 -0
  194. package/palettes/post-palettes.css +1 -0
  195. package/palettes/post-palettes.scss +3 -0
  196. package/placeholders/_button.scss +3 -6
  197. package/placeholders/_close.scss +2 -5
  198. package/placeholders/_schemes.scss +10 -0
  199. package/post-external.css +3 -3
  200. package/post-external.scss +7 -1
  201. package/post-internal.css +3 -3
  202. package/post-internal.scss +7 -1
  203. package/post-tokens-external.css +1 -1
  204. package/post-tokens-external.scss +1 -1
  205. package/post-tokens-internal.css +1 -1
  206. package/post-tokens-internal.scss +1 -1
  207. package/themes/bootstrap/_core.scss +0 -2
  208. package/themes/bootstrap/_forms.scss +0 -4
  209. package/themes/bootstrap/_overrides-variables.scss +0 -6
  210. package/themes/bootstrap/_utilities.scss +45 -1
  211. package/tokens/_cargo-theme.scss +8 -0
  212. package/tokens/_helpers.scss +1 -0
  213. package/tokens/_palettes.scss +9 -0
  214. package/tokens/_schemes.scss +11 -0
  215. package/tokens/_utilities_formatted.scss +1 -0
  216. package/tokens/temp/_channel.scss +4 -3
  217. package/tokens/temp/_components.scss +594 -503
  218. package/tokens/temp/_core.scss +49 -37
  219. package/tokens/temp/_device.scss +210 -239
  220. package/tokens/temp/_elements.scss +11 -11
  221. package/tokens/temp/_helpers.scss +13 -0
  222. package/tokens/temp/_index.scss +6 -4
  223. package/tokens/temp/_palettes.scss +19 -0
  224. package/tokens/temp/_scheme.scss +334 -0
  225. package/tokens/temp/_theme.scss +28 -9
  226. package/tokens/temp/_utilities-formatted.scss +128 -0
  227. package/tokens/temp/_utilities.scss +34 -58
  228. package/tokens/temp/palettes/_cargo-dark.scss +19 -0
  229. package/tokens/temp/palettes/_cargo-light.scss +19 -0
  230. package/tokens/temp/palettes/_post-dark.scss +19 -0
  231. package/tokens/temp/palettes/_post-light.scss +19 -0
  232. package/utilities/_not-defined.scss +44 -0
  233. package/utilities/_variables.scss +304 -22
  234. package/utilities/index.css +1 -0
  235. package/utilities/{_index.scss → index.scss} +1 -2
  236. package/variables/_animation.scss +10 -6
  237. package/variables/_breakpoints.scss +9 -5
  238. package/variables/_color.scss +0 -61
  239. package/variables/_commons.scss +1 -0
  240. package/variables/_elevation.scss +16 -22
  241. package/variables/_grid.scss +2 -12
  242. package/variables/_icons.scss +19 -696
  243. package/variables/_index.scss +1 -1
  244. package/variables/_sizing.scss +17 -0
  245. package/variables/_spacing.scss +0 -152
  246. package/variables/_type.scss +17 -27
  247. package/variables/components/_accordion.scss +0 -47
  248. package/variables/components/_badge.scss +9 -5
  249. package/variables/components/_button.scss +61 -113
  250. package/variables/components/_card.scss +7 -4
  251. package/variables/components/_chip.scss +13 -7
  252. package/variables/components/_close.scss +14 -8
  253. package/variables/components/_code.scss +1 -1
  254. package/variables/components/_datatable.scss +12 -8
  255. package/variables/components/_dropdowns.scss +1 -1
  256. package/variables/components/_form-check.scss +9 -46
  257. package/variables/components/_forms.scss +8 -101
  258. package/variables/components/_index.scss +0 -5
  259. package/variables/components/_modal.scss +17 -12
  260. package/variables/components/_nav.scss +3 -3
  261. package/variables/components/_navbar.scss +7 -4
  262. package/variables/components/_notification.scss +48 -37
  263. package/variables/components/_pagination.scss +14 -6
  264. package/variables/components/_spinners.scss +7 -2
  265. package/variables/components/_stepper.scss +15 -10
  266. package/variables/components/_subnavigation.scss +11 -9
  267. package/variables/components/_tables.scss +11 -6
  268. package/variables/components/_tag.scss +10 -7
  269. package/components/accordion.css +0 -1
  270. package/components/accordion.scss +0 -100
  271. package/components/alert.css +0 -1
  272. package/components/alert.scss +0 -137
  273. package/components/carousel.css +0 -1
  274. package/components/carousel.scss +0 -178
  275. package/components/elevation.css +0 -1
  276. package/components/elevation.scss +0 -8
  277. package/components/floating-label.css +0 -1
  278. package/components/floating-label.scss +0 -353
  279. package/components/form-check.css +0 -1
  280. package/components/form-check.scss +0 -297
  281. package/components/form-validation.css +0 -1
  282. package/components/form-validation.scss +0 -148
  283. package/components/forms.css +0 -1
  284. package/components/forms.scss +0 -215
  285. package/components/grid.css +0 -1
  286. package/components/grid.scss +0 -170
  287. package/components/icons.css +0 -1
  288. package/components/icons.scss +0 -60
  289. package/components/sizing.css +0 -1
  290. package/components/sizing.scss +0 -85
  291. package/components/topic-teaser.css +0 -1
  292. package/components/topic-teaser.scss +0 -196
  293. package/layouts/portal/_grid.scss +0 -85
  294. package/layouts/portal/_index.scss +0 -2
  295. package/layouts/portal/_subnavigation.scss +0 -5
  296. package/layouts/portal/_variables.scss +0 -8
  297. package/mixins/_accordion.scss +0 -16
  298. package/mixins/_elevation.scss +0 -6
  299. package/mixins/_focus.scss +0 -9
  300. package/mixins/_form-validation.scss +0 -5
  301. package/mixins/_size.scss +0 -65
  302. package/placeholders/_modes.scss +0 -10
  303. package/themes/bootstrap/_carousel.scss +0 -2
  304. package/themes/bootstrap/_containers.scss +0 -2
  305. package/themes/bootstrap/_grid.scss +0 -2
  306. package/themes/bootstrap/_overrides-mixins.scss +0 -33
  307. package/themes/bootstrap/forms/_floating-labels.scss +0 -2
  308. package/themes/bootstrap/forms/_form-control.scss +0 -2
  309. package/themes/bootstrap/forms/_form-select.scss +0 -2
  310. package/themes/bootstrap/forms/_form-text.scss +0 -2
  311. package/tokens/_modes.scss +0 -11
  312. package/tokens/temp/_mode.scss +0 -299
  313. package/utilities/_functions.scss +0 -35
  314. package/utilities/temp/_legacy.scss +0 -95
  315. package/variables/_options.scss +0 -5
  316. package/variables/components/_carousel.scss +0 -27
  317. package/variables/components/_figures.scss +0 -6
  318. package/variables/components/_form-select.scss +0 -13
  319. package/variables/components/_form-validation.scss +0 -38
  320. package/variables/components/_list-group.scss +0 -29
  321. package/variables/components/_topic-teaser.scss +0 -32
@@ -0,0 +1 @@
1
+ @counter-style post-bullet{system:extends disc;suffix:"    "}ul{list-style:post-bullet;margin-block:var(--post-device-spacing-padding-block-8);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ul>li::marker{line-height:1}ul.list-bullet{list-style:none;margin-block:var(--post-device-spacing-padding-block-8);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ul.list-bullet>li{margin:0;padding-inline:0;padding-block:var(--post-device-spacing-padding-block-6)}ul.list-bullet>li~li{margin-block-start:var(--post-device-spacing-gap-1)}ul.list-bullet>li::before{display:block;content:"";box-sizing:content-box;float:inline-start;margin-block-start:calc(var(--post-device-line-height-content)*.5em - var(--post-device-sizing-interactive-button-icon-6)*.5);margin-inline-start:calc(var(--post-device-sizing-notification-icon-3)*-0.5 + var(--post-device-sizing-interactive-button-icon-6)*-0.5 + var(--post-device-spacing-gap-inline-10)*-1);width:var(--post-device-sizing-interactive-button-icon-6);height:var(--post-device-sizing-interactive-button-icon-6);background-color:currentColor;border-radius:50%}ul.list-inline{all:unset;display:block;list-style:none;display:flex;flex-wrap:wrap;row-gap:var(--post-device-spacing-gap-1);column-gap:calc(var(--post-device-spacing-gap-inline-10)*2);margin-block:var(--post-device-spacing-padding-block-8)}ul.list-inline>li{all:unset;display:list-item}ul.list-inline>li~li{all:unset;display:list-item}ul.list-inline>li::before{all:unset}ul.list-revert{all:revert}ul.list-revert>li{all:revert}ul.list-revert>li~li{all:revert}ul.list-revert>li::before{all:revert}ul.list-unstyled{all:unset;display:block;list-style:none}ul.list-unstyled>li{all:unset;display:list-item}ul.list-unstyled>li~li{all:unset;display:list-item}ul.list-unstyled>li::before{all:unset}
@@ -0,0 +1,43 @@
1
+ @use '../functions/tokens';
2
+ @use '../tokens/elements';
3
+ @use '../mixins/list' as list-mx;
4
+
5
+ tokens.$default-map: elements.$post-listbullet;
6
+
7
+ /* The chars used in suffix are spaces with different widths
8
+ For more information, visit: https://www.fileformat.info/info/unicode/char/search.htm?q=space
9
+ */
10
+ @counter-style post-bullet {
11
+ system: extends disc;
12
+ suffix: '\2007\2009\200a\200a';
13
+ }
14
+
15
+ ul {
16
+ list-style: post-bullet;
17
+ margin-block: tokens.get('list-bullet-margin-block');
18
+ padding-inline-start: calc(
19
+ #{tokens.get('list-bullet-item-icon-size')} + #{tokens.get('list-bullet-item-icon-gap-inline')}
20
+ );
21
+
22
+ > li {
23
+ &::marker {
24
+ line-height: 1;
25
+ }
26
+ }
27
+
28
+ &.list-bullet {
29
+ @include list-mx.list-bullet();
30
+ }
31
+
32
+ &.list-inline {
33
+ @include list-mx.list-inline();
34
+ }
35
+
36
+ &.list-revert {
37
+ @include list-mx.list-revert();
38
+ }
39
+
40
+ &.list-unstyled {
41
+ @include list-mx.list-unstyled();
42
+ }
43
+ }
@@ -0,0 +1 @@
1
+ dl dd{margin:0}
@@ -0,0 +1,5 @@
1
+ dl {
2
+ dd {
3
+ margin: 0;
4
+ }
5
+ }
@@ -0,0 +1 @@
1
+ ol{margin-block:var(--post-device-spacing-gap-1);padding-inline-end:var(--post-device-spacing-gap-1);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ol ::marker{font-weight:var(--post-device-font-weight-bold)}ol.list-number{margin-block:var(--post-device-spacing-gap-1);padding-inline-end:var(--post-device-spacing-gap-1);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ol.list-number>li{margin-block-end:var(--post-device-spacing-padding-block-8);padding-inline-start:var(--post-device-spacing-gap-inline-10);padding-block:var(--post-device-spacing-padding-block-6)}ol.list-number>li:last-child{margin-block-end:0}ol.list-inline{all:unset;display:block;list-style:none;display:flex;flex-wrap:wrap;row-gap:var(--post-device-spacing-gap-1);column-gap:calc(var(--post-device-spacing-gap-inline-10)*2);margin-block:var(--post-device-spacing-padding-block-8)}ol.list-inline>li{all:unset;display:list-item}ol.list-inline>li~li{all:unset;display:list-item}ol.list-inline>li::before{all:unset}ol.list-revert{all:revert}ol.list-revert>li{all:revert}ol.list-revert>li~li{all:revert}ol.list-revert>li::before{all:revert}ol.list-unstyled{all:unset;display:block;list-style:none}ol.list-unstyled>li{all:unset;display:list-item}ol.list-unstyled>li~li{all:unset;display:list-item}ol.list-unstyled>li::before{all:unset}
@@ -0,0 +1,33 @@
1
+ @use '../functions/tokens';
2
+ @use '../tokens/elements';
3
+ @use '../mixins/list';
4
+
5
+ tokens.$default-map: elements.$post-listnumber;
6
+
7
+ ol {
8
+ margin-block: tokens.get('list-number-item-gap-block');
9
+ padding-inline-end: tokens.get('list-number-item-gap-block');
10
+ padding-inline-start: calc(
11
+ tokens.get('list-number-item-icon-size') + tokens.get('list-number-item-icon-gap-inline')
12
+ );
13
+
14
+ ::marker {
15
+ font-weight: tokens.get('list-number-item-icon-font-weight');
16
+ }
17
+
18
+ &.list-number {
19
+ @include list.list-number();
20
+ }
21
+
22
+ &.list-inline {
23
+ @include list.list-inline();
24
+ }
25
+
26
+ &.list-revert {
27
+ @include list.list-revert();
28
+ }
29
+
30
+ &.list-unstyled {
31
+ @include list.list-unstyled();
32
+ }
33
+ }
@@ -0,0 +1 @@
1
+ p{margin-block:var(--post-device-spacing-margin-3)}p:first-child{margin-block-start:0}p:last-child{margin-block-end:0}
@@ -0,0 +1,17 @@
1
+ @use 'sass:map';
2
+ @use '../functions/tokens';
3
+ @use '../tokens/elements';
4
+
5
+ tokens.$default-map: elements.$post-paragraph;
6
+
7
+ p {
8
+ margin-block: tokens.get('paragraph-margin-block-start');
9
+
10
+ &:first-child {
11
+ margin-block-start: 0;
12
+ }
13
+
14
+ &:last-child {
15
+ margin-block-end: 0;
16
+ }
17
+ }
@@ -1 +1 @@
1
- *,*::before,*::after{box-sizing:border-box}*{margin:0}body{-webkit-font-smoothing:antialiased}img,picture,video,canvas,svg{display:block;max-width:100%}button,input,textarea,select{font:inherit}button:not(:disabled),[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled){cursor:pointer}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;hyphens:auto}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}code,kbd,samp{font-family:monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{caption-side:bottom;border-collapse:collapse}thead,tbody,tfoot,tr,td,th{border-color:inherit;border-style:solid;border-width:0}fieldset,legend{padding:0}fieldset{border:0}
1
+ @supports(interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}*,*::before,*::after{box-sizing:border-box}body{-webkit-font-smoothing:antialiased;margin:0}img,picture,video,canvas,svg{display:block;max-width:100%;height:auto}button,input,textarea,select{font:inherit}button:not(:disabled),[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled){cursor:pointer}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;hyphens:auto}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}code,kbd,samp{font-family:monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{caption-side:bottom;border-collapse:collapse}thead,tbody,tfoot,tr,td,th{border-color:inherit;border-style:solid;border-width:0}fieldset,legend{padding:0}fieldset{border:0}input,select,textarea{margin:0}
@@ -1,3 +1,11 @@
1
+ // Enable transitions to height: auto and the like
2
+ // https://utilitybend.com/blog/added-to-my-css-reset-interpolate-size-the-quality-of-life-feature-we-all-wanted-at-some-point
3
+ :root {
4
+ @supports (interpolate-size: allow-keywords) {
5
+ interpolate-size: allow-keywords;
6
+ }
7
+ }
8
+
1
9
  /* === Source: Josh Comeau, https://www.joshwcomeau.com/css/custom-css-reset/ (adapted) === */
2
10
 
3
11
  /*
@@ -9,13 +17,6 @@
9
17
  box-sizing: border-box;
10
18
  }
11
19
 
12
- /*
13
- Remove default margin
14
- */
15
- * {
16
- margin: 0;
17
- }
18
-
19
20
  /*
20
21
  Typographic tweaks!
21
22
  - Add accessible line-height
@@ -23,6 +24,7 @@
23
24
  */
24
25
  body {
25
26
  -webkit-font-smoothing: antialiased;
27
+ margin: 0;
26
28
  }
27
29
 
28
30
  /*
@@ -35,6 +37,7 @@ canvas,
35
37
  svg {
36
38
  display: block;
37
39
  max-width: 100%;
40
+ height: auto;
38
41
  }
39
42
 
40
43
  /*
@@ -152,3 +155,9 @@ legend {
152
155
  fieldset {
153
156
  border: 0;
154
157
  }
158
+
159
+ input,
160
+ select,
161
+ textarea {
162
+ margin: 0;
163
+ }
package/elements.css ADDED
@@ -0,0 +1 @@
1
+ @supports(interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}*,*::before,*::after{box-sizing:border-box}body{-webkit-font-smoothing:antialiased;margin:0}img,picture,video,canvas,svg{display:block;max-width:100%;height:auto}button,input,textarea,select{font:inherit}button:not(:disabled),[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled){cursor:pointer}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;hyphens:auto}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}code,kbd,samp{font-family:monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{caption-side:bottom;border-collapse:collapse}thead,tbody,tfoot,tr,td,th{border-color:inherit;border-style:solid;border-width:0}fieldset,legend{padding:0}fieldset{border:0}input,select,textarea{margin:0}@font-face{font-family:"Swiss Post Sans";font-weight:900;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Black.woff2") format("woff2")}@font-face{font-family:"Swiss Post Sans";font-weight:700;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Bold.woff2") format("woff2")}@font-face{font-family:"Swiss Post Sans";font-weight:400;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Regular.woff2") format("woff2")}body{font-family:var(--post-device-font-family-default),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-regular);line-height:var(--post-device-line-height-content);letter-spacing:var(--post-core-letter-spacing-default);font-variant-numeric:proportional-nums;color:var(--post-scheme-color-surface-default-fg);min-height:100vh}a{-webkit-text-decoration:var(--post-core-text-decoration-underline);text-decoration:var(--post-core-text-decoration-underline);border-radius:var(--post-device-border-radius-focus);color:inherit}a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}a{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){a:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){a,a:focus{color:LinkText !important}a:hover{text-decoration-thickness:2px}a:visited{color:VisitedText}}@counter-style post-bullet{system:extends disc;suffix:"    "}ul{list-style:post-bullet;margin-block:var(--post-device-spacing-padding-block-8);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ul>li::marker{line-height:1}ul.list-bullet{list-style:none;margin-block:var(--post-device-spacing-padding-block-8);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ul.list-bullet>li{margin:0;padding-inline:0;padding-block:var(--post-device-spacing-padding-block-6)}ul.list-bullet>li~li{margin-block-start:var(--post-device-spacing-gap-1)}ul.list-bullet>li::before{display:block;content:"";box-sizing:content-box;float:inline-start;margin-block-start:calc(var(--post-device-line-height-content)*.5em - var(--post-device-sizing-interactive-button-icon-6)*.5);margin-inline-start:calc(var(--post-device-sizing-notification-icon-3)*-0.5 + var(--post-device-sizing-interactive-button-icon-6)*-0.5 + var(--post-device-spacing-gap-inline-10)*-1);width:var(--post-device-sizing-interactive-button-icon-6);height:var(--post-device-sizing-interactive-button-icon-6);background-color:currentColor;border-radius:50%}ul.list-inline{all:unset;display:block;list-style:none;display:flex;flex-wrap:wrap;row-gap:var(--post-device-spacing-gap-1);column-gap:calc(var(--post-device-spacing-gap-inline-10)*2);margin-block:var(--post-device-spacing-padding-block-8)}ul.list-inline>li{all:unset;display:list-item}ul.list-inline>li~li{all:unset;display:list-item}ul.list-inline>li::before{all:unset}ul.list-revert{all:revert}ul.list-revert>li{all:revert}ul.list-revert>li~li{all:revert}ul.list-revert>li::before{all:revert}ul.list-unstyled{all:unset;display:block;list-style:none}ul.list-unstyled>li{all:unset;display:list-item}ul.list-unstyled>li~li{all:unset;display:list-item}ul.list-unstyled>li::before{all:unset}dl dd{margin:0}ol{margin-block:var(--post-device-spacing-gap-1);padding-inline-end:var(--post-device-spacing-gap-1);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ol ::marker{font-weight:var(--post-device-font-weight-bold)}ol.list-number{margin-block:var(--post-device-spacing-gap-1);padding-inline-end:var(--post-device-spacing-gap-1);padding-inline-start:calc(var(--post-device-sizing-notification-icon-3) + var(--post-device-spacing-gap-inline-10))}ol.list-number>li{margin-block-end:var(--post-device-spacing-padding-block-8);padding-inline-start:var(--post-device-spacing-gap-inline-10);padding-block:var(--post-device-spacing-padding-block-6)}ol.list-number>li:last-child{margin-block-end:0}ol.list-inline{all:unset;display:block;list-style:none;display:flex;flex-wrap:wrap;row-gap:var(--post-device-spacing-gap-1);column-gap:calc(var(--post-device-spacing-gap-inline-10)*2);margin-block:var(--post-device-spacing-padding-block-8)}ol.list-inline>li{all:unset;display:list-item}ol.list-inline>li~li{all:unset;display:list-item}ol.list-inline>li::before{all:unset}ol.list-revert{all:revert}ol.list-revert>li{all:revert}ol.list-revert>li~li{all:revert}ol.list-revert>li::before{all:revert}ol.list-unstyled{all:unset;display:block;list-style:none}ol.list-unstyled>li{all:unset;display:list-item}ol.list-unstyled>li~li{all:unset;display:list-item}ol.list-unstyled>li::before{all:unset}p{margin-block:var(--post-device-spacing-margin-3)}p:first-child{margin-block-start:0}p:last-child{margin-block-end:0}legend{margin-bottom:var(--post-core-dimension-16);font-weight:var(--post-device-font-weight-bold);line-height:var(--post-device-line-height-legend);width:100%}legend.large{font-size:var(--post-device-font-size-3);padding-block-start:var(--post-device-spacing-margin-1);padding-block-end:calc(var(--post-device-spacing-padding-17) - var(--post-device-border-width-default));margin-block-end:var(--post-device-spacing-margin-4);border-bottom:var(--post-device-border-width-default) var(--post-scheme-color-surface-default-stroke) var(--post-core-border-style-solid)}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-black)}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6):first-child{margin-block-start:0}:is(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6):last-child{margin-block-end:0}h1,.h1{font-size:var(--post-device-font-size-1);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-2)}h2,.h2{font-size:var(--post-device-font-size-2);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-2)}h3,.h3{font-size:var(--post-device-font-size-3);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-3)}h4,.h4{font-size:var(--post-device-font-size-4);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-3)}h5,.h5{font-size:var(--post-device-font-size-5);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-3)}h6,.h6{font-size:var(--post-device-font-size-6);margin-block-start:var(--post-device-spacing-margin-1);margin-block-end:var(--post-device-spacing-margin-3)}
package/elements.scss ADDED
@@ -0,0 +1 @@
1
+ @use './elements/index';
package/fonts.css CHANGED
@@ -1 +1 @@
1
- @font-face{font-display:swap;font-family:"Swiss Post Sans v005";font-weight:900;src:url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-XBlk.woff2") format("woff2"),url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-XBlk.woff") format("woff")}@font-face{font-display:swap;font-family:"Swiss Post Sans v005";font-weight:900;font-style:italic;src:url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-XBlkIt.woff2") format("woff2"),url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-XBlkIt.woff") format("woff")}@font-face{font-display:swap;font-family:"Swiss Post Sans v005";font-weight:700;src:url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff2") format("woff2"),url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Bold.woff") format("woff")}@font-face{font-display:swap;font-family:"Swiss Post Sans v005";font-weight:700;font-style:italic;src:url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff2") format("woff2"),url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-BdIt.woff") format("woff")}@font-face{font-display:swap;font-family:"Swiss Post Sans v005";font-weight:400;src:url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff2") format("woff2"),url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-Rg.woff") format("woff")}@font-face{font-display:swap;font-family:"Swiss Post Sans v005";font-weight:400;font-style:italic;src:url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff2") format("woff2"),url("https://fonts.post.ch/frutigerneueforpost/v2/FrutigerNeueforPostW05-It.woff") format("woff")}
1
+ @font-face{font-family:"Swiss Post Sans";font-weight:900;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Black.woff2") format("woff2")}@font-face{font-family:"Swiss Post Sans";font-weight:700;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Bold.woff2") format("woff2")}@font-face{font-family:"Swiss Post Sans";font-weight:400;font-display:swap;src:url("https://fonts.post.ch/swiss-post-sans/v1/SwissPostSans-Regular.woff2") format("woff2")}
@@ -0,0 +1,26 @@
1
+ @use 'sass:map';
2
+ @use 'sass:list';
3
+ @use '../variables/breakpoints';
4
+
5
+ /**
6
+ Gets a breakpoint from the map based on the key
7
+ */
8
+ @function min-width($key) {
9
+ @return map.get(breakpoints.$grid-breakpoints, $key);
10
+ }
11
+
12
+ /**
13
+ Gets a breakpoint infix
14
+ */
15
+ @function infix($key) {
16
+ @return if(min-width($key) == 0, '', '-#{$key}');
17
+ }
18
+
19
+ /**
20
+ * Gets the next breakpoint key
21
+ */
22
+ @function next($key) {
23
+ $breakpoint-names: map.keys(breakpoints.$grid-breakpoints);
24
+ $n: list.index($breakpoint-names, $key);
25
+ @return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null);
26
+ }
@@ -1,3 +1,11 @@
1
+ @use 'sass:map';
2
+
3
+ @use './color';
4
+ @use '../functions/tokens';
5
+ @use '../functions/icons';
6
+ @use '../functions/utilities';
7
+ @use '../variables/components/forms';
8
+
1
9
  // Source: https://kovart.github.io/dashed-border-generator/ + added stroke-vector-effect
2
10
  @function get-background-svg-stroke(
3
11
  $type,
@@ -12,11 +20,46 @@
12
20
  @if ($type == 'circle') {
13
21
  $svg-additional-attributes: "rx='100' ry='100'";
14
22
  }
23
+ @if ($type == 'switch') {
24
+ $svg-additional-attributes: "rx='12' ry='12'";
25
+ }
15
26
  @if ($stroke-pathlength != 'initial') {
16
27
  $stroke-pathlength-attribute: " pathLength='" + $stroke-pathlength + "'";
17
28
  }
18
29
  @return "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' " +
19
- $svg-additional-attributes + " fill='none' stroke='" + $color + "' stroke-width='" +
20
- $stroke-width "' stroke-dasharray='" + $stroke-dasharray + "'" + $stroke-pathlength-attribute +
21
- ' /%3e%3c/svg%3e';
30
+ $svg-additional-attributes + " fill='none' stroke='" + #{color.encode-uri-color($color)} + "' stroke-width='" +
31
+ $stroke-width "' stroke-dasharray='" + $stroke-dasharray + "'" + $stroke-pathlength-attribute + ' /%3e%3c/svg%3e';
32
+ }
33
+
34
+ @function select-arrow-icon($state: null, $mode: 'light') {
35
+ // Hardcoded colors because CSS variables cannot be used as fill color of background-image
36
+ $arrow-color-map: (
37
+ 'enabled-light': #050400,
38
+ 'enabled-dark': #fff,
39
+ 'hover-light': #504f4b,
40
+ 'hover-dark': #fff,
41
+ 'selected-light': #050400,
42
+ 'selected-dark': #fff,
43
+ 'disabled-light': #696864,
44
+ 'disabled-dark': #fff,
45
+ 'enabled-hcm-light': #050400,
46
+ 'enabled-hcm-dark': #fff,
47
+ 'selected-hcm-dark': #fff,
48
+ 'hover-hcm-dark': #fff,
49
+ 'hover-hcm-light': #050400,
50
+ );
51
+
52
+ @if ($state) {
53
+ $state: url('#{icons.get-colored-svg-url('2052', map.get($arrow-color-map, '#{$state}-#{$mode}'))}');
54
+ }
55
+
56
+ @return $state;
57
+ }
58
+
59
+ @function success-icon($color: #107800) {
60
+ @return url('#{icons.get-colored-svg-url('success', $color)}');
61
+ }
62
+
63
+ @function warning-icon($color: #b20000) {
64
+ @return url('#{icons.get-colored-svg-url('warning', $color)}');
22
65
  }
@@ -61,9 +61,9 @@
61
61
 
62
62
  @if (map.has-key(icons.$svg-icon-map, #{$icon-name})) {
63
63
  $svg-url: map.get(icons.$svg-icon-map, #{$icon-name});
64
- } @else if(map.has-key(icons.$svg-unofficial-icon-map, #{$icon-name})) {
64
+ } @else if(map.has-key(icons.$other-icons, #{$icon-name})) {
65
65
  $svg-url: icons.$svg-pre-path +
66
- map.get(icons.$svg-unofficial-icon-map, #{$icon-name}) +
66
+ map.get(icons.$other-icons, #{$icon-name}) +
67
67
  icons.$svg-post-path;
68
68
  } @else {
69
69
  @error "Icon '#{$icon-name}' does not exist.";
@@ -75,15 +75,3 @@
75
75
  @function get-colored-svg-url($icon-name, $color) {
76
76
  @return add-fill-color(get-svg-url($icon-name), $color);
77
77
  }
78
-
79
- @function get-pre-colored-svg-url($icon-name) {
80
- $path-definition: map.get(icons.$svg-pre-colored-icon-map, #{$icon-name});
81
-
82
- @if (not map.has-key(icons.$svg-pre-colored-icon-map, #{$icon-name})) {
83
- @error "Icon '#{$icon-name}' does not exist.";
84
- }
85
-
86
- $svg-url: icons.$svg-pre-path + $path-definition + icons.$svg-post-path;
87
-
88
- @return $svg-url;
89
- }
@@ -0,0 +1,4 @@
1
+ @use 'clearfix';
2
+ @use 'visually-hidden';
3
+ @use 'text-truncation';
4
+ @use 'focus-ring';
@@ -0,0 +1 @@
1
+ .clearfix::after{content:"";display:block;clear:both}
@@ -0,0 +1,5 @@
1
+ .clearfix::after {
2
+ content: '';
3
+ display: block;
4
+ clear: both;
5
+ }
@@ -0,0 +1 @@
1
+ .focus-ring{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.focus-ring:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.focus-ring:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.focus-ring:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.focus-ring:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}
@@ -0,0 +1,5 @@
1
+ @use './../mixins/utilities';
2
+
3
+ .focus-ring {
4
+ @include utilities.focus-style;
5
+ }
@@ -0,0 +1 @@
1
+ .text-truncate{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
@@ -0,0 +1,5 @@
1
+ .text-truncate {
2
+ overflow: hidden;
3
+ white-space: nowrap;
4
+ text-overflow: ellipsis;
5
+ }
@@ -0,0 +1 @@
1
+ .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
@@ -0,0 +1,5 @@
1
+ @use './../mixins/utilities';
2
+
3
+ .visually-hidden {
4
+ @include utilities.visuallyhidden;
5
+ }