@stihl-design-system/components 1.0.0-RC.11 → 1.0.0-RC.12

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 (223) hide show
  1. package/{accordion.CEKQh-7i.js → accordion.Rvtiu8Y4.js} +3 -3
  2. package/arialiveregions.Cyycgs8g.js +27 -0
  3. package/assets/Accordion.i4k5SMQM.css +1 -0
  4. package/assets/CheckboxGroup.BH1Br1dg.css +1 -0
  5. package/assets/Chip.DSdLuzoi.css +1 -0
  6. package/assets/CustomReactSelect.vHt8qNKC.css +1 -0
  7. package/assets/Dialog.BgzebVk4.css +1 -0
  8. package/assets/Drawer.Bauwxrk7.css +1 -0
  9. package/assets/Fieldset.DOdTbb7C.css +1 -0
  10. package/assets/Icon.DxRSBRSL.css +1 -0
  11. package/assets/InputPassword.CG7Ugu73.css +1 -0
  12. package/assets/InputSearch.CseChMc-.css +1 -0
  13. package/assets/InputStepper.C0eAYr7P.css +1 -0
  14. package/assets/Notification.DbRapUJo.css +1 -0
  15. package/assets/RadioGroup.BfMo157q.css +1 -0
  16. package/assets/Select.D4EXgIbz.css +1 -0
  17. package/assets/Textarea.KJGPTYMz.css +1 -0
  18. package/assets/Toast.CuafTAf7.css +1 -0
  19. package/assets/arialiveregions.DhsijBaL.css +1 -0
  20. package/assets/asterisk.BfVAUBO7.css +1 -0
  21. package/assets/button.DF4RBeC2.css +1 -0
  22. package/assets/buttonround.19uK_-oO.css +1 -0
  23. package/assets/checkbox.ByOoFouu.css +1 -0
  24. package/assets/chipgroup.BzfZLbkv.css +1 -0
  25. package/assets/flag.B-RLcMcf.css +1 -0
  26. package/assets/floatingactionbutton.E9HekT6S.css +1 -0
  27. package/assets/heading.u4f8Mz94.css +1 -0
  28. package/assets/input.BAkFKPW3.css +1 -0
  29. package/assets/link.DDJj0D1U.css +1 -0
  30. package/assets/linkstandalone.DIazcjIv.css +1 -0
  31. package/assets/logo.CnW8alZU.css +1 -0
  32. package/assets/optioncheckbox.BZaWtRD7.css +1 -0
  33. package/assets/radio.X-RTl_jo.css +1 -0
  34. package/assets/skiptocontent.PTL3256m.css +1 -0
  35. package/assets/spinner.2iWJWKyA.css +1 -0
  36. package/assets/switch.gw6aa3kx.css +1 -0
  37. package/assets/systemfeedback.BPz5YlPC.css +1 -0
  38. package/assets/text.DjTG_qNb.css +1 -0
  39. package/assets/title.rosWPEG3.css +1 -0
  40. package/asterisk.DpzETKdT.js +8 -0
  41. package/button.M4nXjcUn.js +135 -0
  42. package/buttonround.E56F_805.js +118 -0
  43. package/checkbox.Cb2_ey6U.js +111 -0
  44. package/{checkboxgroup.BqD5IV51.js → checkboxgroup.DBDmB-zR.js} +2 -2
  45. package/{chip.B92ew-hk.js → chip.C_1tGqvZ.js} +2 -2
  46. package/chipgroup.BvTj1ziW.js +174 -0
  47. package/chunks/Accordion.CB6jB3s_.js +125 -0
  48. package/chunks/{CheckboxGroup.M3jOjhNf.js → CheckboxGroup.S6i5EOc4.js} +40 -40
  49. package/chunks/{Chip.fMG8wi5K.js → Chip.CMlPUyOJ.js} +15 -15
  50. package/chunks/{CustomReactSelect.D3jv5-fa.js → CustomReactSelect.Cg_XW3YK.js} +1189 -1189
  51. package/chunks/Dialog.CudsqNag.js +148 -0
  52. package/chunks/Drawer.ueG2Bzr9.js +154 -0
  53. package/chunks/{Fieldset.C9K8BYmH.js → Fieldset.Cjmkgxxk.js} +32 -32
  54. package/chunks/{Icon.C2o2seDb.js → Icon.BCmt_XBG.js} +45 -45
  55. package/chunks/InputPassword.CNLbBFjx.js +143 -0
  56. package/chunks/InputSearch.CHA6mkX_.js +192 -0
  57. package/chunks/InputStepper.xmWGU9pU.js +294 -0
  58. package/chunks/Notification.o6pagKQy.js +93 -0
  59. package/chunks/RadioGroup.Crj7NoOs.js +137 -0
  60. package/chunks/Select.E6gLFYLk.js +194 -0
  61. package/chunks/Textarea.DUBSOpNL.js +198 -0
  62. package/chunks/Toast.DyEi2GEP.js +89 -0
  63. package/{combobox.BeTnbG1m.js → combobox.DUzv8jzM.js} +1 -1
  64. package/components/Combobox/Combobox.d.ts +1 -1
  65. package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.d.ts +2 -2
  66. package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.utils.d.ts +1 -1
  67. package/components/Radio/Radio.d.ts +1 -1
  68. package/customreactselect.CXmBRqQ9.js +13 -0
  69. package/customreactselect.d.ts +1 -1
  70. package/{dialog.lGwNQU91.js → dialog.DYlBUsOD.js} +2 -2
  71. package/{drawer.DNi5m8wP.js → drawer.CvhbP1ra.js} +2 -2
  72. package/fieldset.CtUGEdLv.js +11 -0
  73. package/flag.BKpsdB_-.js +43 -0
  74. package/floatingactionbutton.D5L0B7zI.js +87 -0
  75. package/heading.IPIYc5vW.js +50 -0
  76. package/{icon.BoMgOmC1.js → icon.Ck0BpI34.js} +1 -1
  77. package/index.es.js +34 -34
  78. package/input.BEnCFNM-.js +239 -0
  79. package/{inputpassword.CSjh1GU7.js → inputpassword.B-D_jB9w.js} +4 -4
  80. package/{inputsearch.DyznOWLK.js → inputsearch.CaSpklR1.js} +4 -4
  81. package/{inputstepper.3BLb7s0P.js → inputstepper.C7KD1-0S.js} +4 -4
  82. package/link.DREJAoPG.js +116 -0
  83. package/linkstandalone.BBoEniZ_.js +79 -0
  84. package/logo.Hul8qCFo.js +65 -0
  85. package/{notification.0kX1GMaB.js → notification.JWhrkEcE.js} +3 -3
  86. package/optioncheckbox.BRUTnQnJ.js +43 -0
  87. package/optioncheckbox.d.ts +1 -1
  88. package/package.json +5 -3
  89. package/partials/index.js +1 -1
  90. package/radio.DEILy_lV.js +114 -0
  91. package/{radiogroup.SYkZm2DG.js → radiogroup.DeU-HdlP.js} +3 -3
  92. package/{select.CYbwR3RW.js → select.BYraFJzz.js} +4 -4
  93. package/skiptocontent.BxvpIB7H.js +45 -0
  94. package/spinner.Bq97Og-6.js +58 -0
  95. package/styles/scss/ds/index.scss +19 -0
  96. package/styles/scss/ds/lib/animation.scss +21 -0
  97. package/styles/scss/ds/lib/breakpoints.scss +15 -0
  98. package/styles/scss/ds/lib/container-query.scss +54 -0
  99. package/styles/scss/ds/lib/ds-internal/_a11y.scss +15 -0
  100. package/styles/scss/{lib → ds/lib/ds-internal}/_focus.scss +13 -15
  101. package/styles/scss/ds/lib/ds-internal/_heading.scss +37 -0
  102. package/styles/scss/ds/lib/ds-internal/_helpers.scss +32 -0
  103. package/styles/scss/ds/lib/ds-internal/_high-contrast.scss +6 -0
  104. package/styles/scss/ds/lib/ds-internal/_hover.scss +6 -0
  105. package/styles/scss/ds/lib/ds-internal/_index.scss +9 -0
  106. package/styles/scss/ds/lib/ds-internal/_link.scss +62 -0
  107. package/styles/scss/ds/lib/ds-internal/_spacing-dynamic.scss +53 -0
  108. package/styles/scss/ds/lib/ds-internal/_text.scss +30 -0
  109. package/styles/scss/ds/lib/grid-extended.scss +11 -0
  110. package/styles/scss/ds/lib/grid-full.scss +6 -0
  111. package/styles/scss/ds/lib/grid-main.scss +119 -0
  112. package/styles/scss/ds/lib/grid-narrow.scss +14 -0
  113. package/styles/scss/ds/lib/grid-sidebar-sidebar.scss +52 -0
  114. package/styles/scss/{lib/_grid-sidebar.scss → ds/lib/grid-sidebar.scss} +23 -32
  115. package/styles/scss/{lib/_grid.scss → ds/lib/grid.scss} +15 -17
  116. package/styles/scss/ds/lib/heading.scss +75 -0
  117. package/styles/scss/ds/lib/link.scss +74 -0
  118. package/styles/scss/ds/lib/media-query.scss +32 -0
  119. package/styles/scss/{lib/_shadow.scss → ds/lib/shadow.scss} +2 -2
  120. package/styles/scss/ds/lib/spacing-dynamic.scss +7 -0
  121. package/styles/scss/ds/lib/spacing.scss +20 -0
  122. package/styles/scss/ds/lib/text.scss +83 -0
  123. package/styles/scss/ds/lib/theme.scss +162 -0
  124. package/styles/scss/ds/lib/transition.scss +36 -0
  125. package/switch.DI8YYa5G.js +65 -0
  126. package/{systemfeedback.ZzRUAVYX.js → systemfeedback.C3Pfxxpp.js} +6 -6
  127. package/text.DThvTwm8.js +57 -0
  128. package/{textarea.DJc527nX.js → textarea.CBvH0ljM.js} +3 -3
  129. package/title.DqzdB2Gq.js +36 -0
  130. package/{toast.D48GFmp0.js → toast.n1QUINSA.js} +3 -3
  131. package/{toastmanager.Dl8-Q3ED.js → toastmanager.B7EZ4JSI.js} +1 -1
  132. package/arialiveregions.BKpxxK7O.js +0 -27
  133. package/assets/Accordion.DMEFgtQm.css +0 -1
  134. package/assets/CheckboxGroup.Bz3_xkZU.css +0 -1
  135. package/assets/Chip.D10_7Q82.css +0 -1
  136. package/assets/CustomReactSelect.D5XKd9vg.css +0 -1
  137. package/assets/Dialog.B0pucIEI.css +0 -1
  138. package/assets/Drawer.CATBzfY7.css +0 -1
  139. package/assets/Fieldset.CwDhKRUL.css +0 -1
  140. package/assets/Icon.Duy_0R8w.css +0 -1
  141. package/assets/InputPassword.DOAAzj-O.css +0 -1
  142. package/assets/InputSearch.CxPYaQGZ.css +0 -1
  143. package/assets/InputStepper.CYYJUu0b.css +0 -1
  144. package/assets/Notification.mhVFeSGm.css +0 -1
  145. package/assets/Select.DZKpHV4G.css +0 -1
  146. package/assets/Textarea.Cp0b7oZp.css +0 -1
  147. package/assets/Toast.Cz6wYaBv.css +0 -1
  148. package/assets/arialiveregions.GsGx2USO.css +0 -1
  149. package/assets/asterisk.DlJ4YtSZ.css +0 -1
  150. package/assets/button.C9_ejpGG.css +0 -1
  151. package/assets/buttonround.DTCqRP-0.css +0 -1
  152. package/assets/checkbox.K4CVYK9g.css +0 -1
  153. package/assets/chipgroup.BMovtKTy.css +0 -1
  154. package/assets/flag.DX_lH1v7.css +0 -1
  155. package/assets/floatingactionbutton.Do-yEH6c.css +0 -1
  156. package/assets/heading.6bER-Eac.css +0 -1
  157. package/assets/input.Q5oKkmW2.css +0 -1
  158. package/assets/link.DhZqkLMP.css +0 -1
  159. package/assets/linkstandalone.Dwz-_O8q.css +0 -1
  160. package/assets/logo.pETQEsvZ.css +0 -1
  161. package/assets/optioncheckbox.C62HtIj5.css +0 -1
  162. package/assets/radio.-Xxx5wL4.css +0 -1
  163. package/assets/skiptocontent.CHcqLS7S.css +0 -1
  164. package/assets/spinner.D_Nnf1ZG.css +0 -1
  165. package/assets/switch.C1Ei0-z8.css +0 -1
  166. package/assets/systemfeedback.Sq0bAIyf.css +0 -1
  167. package/assets/text.DxKFcfY6.css +0 -1
  168. package/assets/title.f74Bosn-.css +0 -1
  169. package/asterisk.DDn-yX4P.js +0 -8
  170. package/button.C5opEJ6x.js +0 -135
  171. package/buttonround.CUoqRyy0.js +0 -118
  172. package/checkbox.DETR3e3X.js +0 -112
  173. package/chipgroup.BJrqEfvr.js +0 -175
  174. package/chunks/Accordion.DFwFN8mX.js +0 -125
  175. package/chunks/Dialog.Fwr6vLiK.js +0 -148
  176. package/chunks/Drawer.CKoYzQHd.js +0 -154
  177. package/chunks/InputPassword.C7pNeWGx.js +0 -143
  178. package/chunks/InputSearch.B24rcIJ_.js +0 -192
  179. package/chunks/InputStepper.CEW-bieQ.js +0 -294
  180. package/chunks/Notification.BXVN7_Fs.js +0 -93
  181. package/chunks/RadioGroup.D4UOflwr.js +0 -137
  182. package/chunks/Select.Ds86q4UC.js +0 -194
  183. package/chunks/Textarea.DcB8hKnO.js +0 -198
  184. package/chunks/Toast.DrzxdzVW.js +0 -89
  185. package/customreactselect.lYJhIeyx.js +0 -13
  186. package/fieldset.BqiAjeax.js +0 -11
  187. package/flag.XJHHSP38.js +0 -43
  188. package/floatingactionbutton.CMpkTdhX.js +0 -87
  189. package/heading.CAkraI2D.js +0 -50
  190. package/input.v7qB7wPJ.js +0 -239
  191. package/link.Clk5_BYp.js +0 -116
  192. package/linkstandalone.BXERmqdN.js +0 -80
  193. package/logo.CEO6OV7u.js +0 -65
  194. package/optioncheckbox.BPN3f6l_.js +0 -43
  195. package/radio.DTZNJzMU.js +0 -115
  196. package/skiptocontent.DUQWopO4.js +0 -46
  197. package/spinner.D-xrotcu.js +0 -58
  198. package/styles/scss/_index.scss +0 -24
  199. package/styles/scss/lib/_a11y.scss +0 -15
  200. package/styles/scss/lib/_animation.scss +0 -21
  201. package/styles/scss/lib/_breakpoints.scss +0 -15
  202. package/styles/scss/lib/_container-query.scss +0 -58
  203. package/styles/scss/lib/_grid-extended.scss +0 -11
  204. package/styles/scss/lib/_grid-full.scss +0 -6
  205. package/styles/scss/lib/_grid-main.scss +0 -117
  206. package/styles/scss/lib/_grid-narrow.scss +0 -16
  207. package/styles/scss/lib/_grid-sidebar-sidebar.scss +0 -50
  208. package/styles/scss/lib/_heading.scss +0 -107
  209. package/styles/scss/lib/_helpers.scss +0 -15
  210. package/styles/scss/lib/_high-contrast.scss +0 -24
  211. package/styles/scss/lib/_hover.scss +0 -10
  212. package/styles/scss/lib/_link.scss +0 -129
  213. package/styles/scss/lib/_media-query.scss +0 -32
  214. package/styles/scss/lib/_spacing-dynamic.scss +0 -61
  215. package/styles/scss/lib/_spacing.scss +0 -32
  216. package/styles/scss/lib/_text.scss +0 -110
  217. package/styles/scss/lib/_theme.scss +0 -162
  218. package/styles/scss/lib/_transition.scss +0 -45
  219. package/switch.CoNnIhM4.js +0 -65
  220. package/text.fMcHzVbH.js +0 -57
  221. package/title.LY1ylQsb.js +0 -36
  222. /package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.utils.test.d.ts +0 -0
  223. /package/components/{CustomReactSelect → Combobox/CustomReactSelect}/OptionCheckbox.d.ts +0 -0
@@ -1,12 +1,12 @@
1
- @import '_theme';
2
- @import '_high-contrast';
1
+ @use '../theme' as *;
2
+ @use '_high-contrast' as *;
3
3
 
4
4
  @mixin outline($theme, $offset, $thickness: 2px) {
5
5
  outline: $thickness solid;
6
6
  outline-color: if(
7
7
  $theme == 'light',
8
- $ds-theme-light-border-color-focus,
9
- $ds-theme-dark-border-color-focus
8
+ $theme-light-border-color-focus,
9
+ $theme-dark-border-color-focus
10
10
  );
11
11
  outline-offset: $offset;
12
12
 
@@ -16,29 +16,27 @@
16
16
  }
17
17
  }
18
18
 
19
- // Read more here: https://www.tpgi.com/focus-visible-and-backwards-compatibility/
20
- @mixin ds-focus($theme: 'light', $offset: 2px, $thickness: 2px) {
19
+
20
+ @mixin focus($theme: 'light', $offset: 2px, $thickness: 2px) {
21
21
  &:focus {
22
22
  @include outline($theme, $offset, $thickness);
23
23
  }
24
24
  @supports selector(:focus-visible) {
25
25
  &:focus {
26
- /* revert all the above focus styles */
26
+
27
27
  outline: revert;
28
28
  outline-offset: revert;
29
29
  }
30
30
  &:focus-visible {
31
- /* and then reapply the styles here instead */
31
+
32
32
  @include outline($theme, $offset, $thickness);
33
33
  }
34
34
  }
35
35
  }
36
36
 
37
- /**
38
- * Adds focus to the before pseudo element, removing the original focus behavior on the parent element
39
- */
40
- @mixin ds-focus-pseudo($theme: 'light', $offset: 2px, $thickness: 2px) {
41
- // remove focus from actual element
37
+
38
+ @mixin focus-pseudo($theme: 'light', $offset: 2px, $thickness: 2px) {
39
+
42
40
  &:focus,
43
41
  &:focus-visible {
44
42
  outline: none;
@@ -50,12 +48,12 @@
50
48
 
51
49
  @supports selector(:focus-visible) {
52
50
  &:focus::before {
53
- /* revert all the above focus styles */
51
+
54
52
  outline: revert;
55
53
  outline-offset: revert;
56
54
  }
57
55
  &:focus-visible::before {
58
- /* and then reapply the styles here instead */
56
+
59
57
  @include outline($theme, $offset, $thickness);
60
58
  }
61
59
  }
@@ -0,0 +1,37 @@
1
+ @use 'sass:string';
2
+ @use '../media-query' as *;
3
+
4
+
5
+ @mixin base-heading($fontFamily, $fontSize, $lineHeight) {
6
+ font-family: #{string.unquote(
7
+ $fontFamily +
8
+ ', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif'
9
+ )};
10
+ font-style: normal;
11
+ font-variant: normal;
12
+ font-weight: normal;
13
+ font-size: $fontSize;
14
+ line-height: $lineHeight;
15
+ }
16
+
17
+
18
+ @mixin base-heading-bold($fontFamily, $fontSize, $lineHeight) {
19
+ @include base-heading($fontFamily, $fontSize, $lineHeight);
20
+
21
+
22
+ font-size-adjust: 0.426;
23
+ }
24
+
25
+
26
+ @mixin base-heading-display-title($fontFamily, $fontSize, $lineHeight) {
27
+ @include base-heading($fontFamily, $fontSize, $lineHeight);
28
+
29
+ font-size-adjust: cap-height 0.68;
30
+ }
31
+
32
+ @mixin responsive-heading($min, $fontSize, $lineHeight) {
33
+ @include media-query-min($min: $min) {
34
+ font-size: $fontSize;
35
+ line-height: $lineHeight;
36
+ }
37
+ }
@@ -0,0 +1,32 @@
1
+ @use 'sass:color';
2
+ @use 'sass:meta';
3
+ @use 'sass:string';
4
+ @use '../spacing' as *;
5
+
6
+ @function px-to-rem($pixels, $base-font-size: 16px) {
7
+ @return #{calc($pixels / $base-font-size)}rem;
8
+ }
9
+
10
+
11
+ @function urlEncodeHexColor($string) {
12
+ @if meta.type-of($string) == 'color' and string.index(#{$string}, '#') == 1 {
13
+ $hex: string.slice(color.ie-hex-str($string), 4);
14
+ $string: string.unquote('#{$hex}');
15
+
16
+ @return '%23' + $string;
17
+ }
18
+
19
+ @return $string;
20
+ }
21
+
22
+
23
+
24
+
25
+
26
+ @function adjust-spacing-for-border-1($spacing) {
27
+ @return #{calc($spacing - $spacing-1)};
28
+ }
29
+
30
+ @function adjust-spacing-for-border-2($spacing) {
31
+ @return #{calc($spacing - $spacing-2)};
32
+ }
@@ -0,0 +1,6 @@
1
+
2
+ @mixin high-contrast-media-query {
3
+ @media screen and (forced-colors: active) {
4
+ @content;
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+
2
+ @mixin hover-media-query {
3
+ @media (hover: hover) {
4
+ @content;
5
+ }
6
+ }
@@ -0,0 +1,9 @@
1
+ @forward '_a11y';
2
+ @forward '_focus';
3
+ @forward '_hover';
4
+ @forward '_heading';
5
+ @forward '_helpers';
6
+ @forward '_high-contrast';
7
+ @forward '_link';
8
+ @forward '_spacing-dynamic';
9
+ @forward '_text';
@@ -0,0 +1,62 @@
1
+ @use '_focus' as *;
2
+ @use '_helpers' as *;
3
+ @use '_high-contrast' as *;
4
+ @use '_hover' as *;
5
+
6
+
7
+
8
+
9
+
10
+ @mixin link-variant(
11
+ $content-color,
12
+ $background-color-hover,
13
+ $content-color-hover,
14
+ $theme: 'light'
15
+ ) {
16
+ & {
17
+ color: $content-color;
18
+ }
19
+
20
+ &:link,
21
+ &:visited {
22
+ color: $content-color;
23
+ }
24
+
25
+ &:active {
26
+ background-color: $background-color-hover;
27
+ color: $content-color-hover;
28
+ }
29
+
30
+ @include hover-media-query {
31
+ &:hover {
32
+ background-color: $background-color-hover;
33
+ color: $content-color-hover;
34
+ @include high-contrast-media-query {
35
+ background-color: Canvas;
36
+ }
37
+ }
38
+ }
39
+
40
+ &[href^="http://"]::after,
41
+ &[href^="https://"]::after
42
+ {
43
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{urlEncodeHexColor($content-color)}' viewBox='0 0 16 16' focusable='false' width='100%25' height='100%25'%3E%3Cpath fill-rule='evenodd' d='M9 2V0h7v7h-2V3.4L8.1 9.3 6.7 7.9 12.6 2H9Zm5 8h-2v4H2V4h4V2H0v14h14v-6Z' clip-rule='evenodd'/%3E%3C/svg%3E");
44
+ }
45
+
46
+ &[href^='#']::after {
47
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{urlEncodeHexColor($content-color)}' viewBox='0 0 16 16' focusable='false' width='100%25' height='100%25'%3E%3Cpath d='M14.4 9.6 8 16 1.6 9.6 3 8.2l4 4V0h2v12.2l4-4 1.4 1.4Z'/%3E%3C/svg%3E");
48
+ }
49
+
50
+
51
+
52
+ @include focus($theme, $offset: 0);
53
+ }
54
+
55
+
56
+ @mixin link-underline {
57
+ text-decoration-skip-ink: auto;
58
+ text-decoration-line: underline;
59
+ text-underline-offset: 2px;
60
+ text-decoration-thickness: 1px;
61
+ text-decoration-color: currentColor;
62
+ }
@@ -0,0 +1,53 @@
1
+ @use '../spacing.scss' as *;
2
+
3
+
4
+ $spacing-dynamic-values: (
5
+ 'xs': (
6
+ 'base': $spacing-16,
7
+ 's': $spacing-16,
8
+ 'm': $spacing-24,
9
+ 'l': $spacing-24,
10
+ 'xl': $spacing-32,
11
+ 'xxl': $spacing-32,
12
+ ),
13
+ 's': (
14
+ 'base': $spacing-24,
15
+ 's': $spacing-24,
16
+ 'm': $spacing-32,
17
+ 'l': $spacing-32,
18
+ 'xl': $spacing-40,
19
+ 'xxl': $spacing-40,
20
+ ),
21
+ 'm': (
22
+ 'base': $spacing-32,
23
+ 's': $spacing-32,
24
+ 'm': $spacing-40,
25
+ 'l': $spacing-40,
26
+ 'xl': $spacing-48,
27
+ 'xxl': $spacing-48,
28
+ ),
29
+ 'l': (
30
+ 'base': $spacing-40,
31
+ 's': $spacing-40,
32
+ 'm': $spacing-48,
33
+ 'l': $spacing-48,
34
+ 'xl': $spacing-56,
35
+ 'xxl': $spacing-56,
36
+ ),
37
+ 'xl': (
38
+ 'base': $spacing-56,
39
+ 's': $spacing-56,
40
+ 'm': $spacing-64,
41
+ 'l': $spacing-64,
42
+ 'xl': $spacing-80,
43
+ 'xxl': $spacing-80,
44
+ ),
45
+ 'xxl': (
46
+ 'base': $spacing-80,
47
+ 's': $spacing-80,
48
+ 'm': $spacing-96,
49
+ 'l': $spacing-96,
50
+ 'xl': $spacing-128,
51
+ 'xxl': $spacing-128,
52
+ ),
53
+ );
@@ -0,0 +1,30 @@
1
+ @use 'sass:string';
2
+
3
+
4
+ @mixin base-text($fontFamily, $fontSize, $lineHeight) {
5
+ font-family: #{string.unquote(
6
+ $fontFamily +
7
+ ', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif'
8
+ )};
9
+ font-style: normal;
10
+ font-variant: normal;
11
+ hyphens: manual;
12
+ overflow-wrap: break-word;
13
+ font-weight: normal;
14
+ font-size: $fontSize;
15
+ line-height: $lineHeight;
16
+ }
17
+
18
+
19
+ @mixin base-text-regular($fontFamily, $fontSize, $lineHeight) {
20
+ @include base-text($fontFamily, $fontSize, $lineHeight);
21
+
22
+ font-size-adjust: 0.414;
23
+ }
24
+
25
+
26
+ @mixin base-text-bold($fontFamily, $fontSize, $lineHeight) {
27
+ @include base-text($fontFamily, $fontSize, $lineHeight);
28
+
29
+ font-size-adjust: 0.426;
30
+ }
@@ -0,0 +1,11 @@
1
+ $grid-extended-column-start: extended-start;
2
+ $grid-extended-column-end: extended-end;
3
+
4
+ @mixin grid-extended-column {
5
+ grid-column: $grid-extended-column-start / $grid-extended-column-end;
6
+
7
+ @media (min-width: 1668px) {
8
+ margin-inline-start: -32px;
9
+ margin-inline-end: -32px;
10
+ }
11
+ }
@@ -0,0 +1,6 @@
1
+ $grid-full-column-start: full-start;
2
+ $grid-full-column-end: full-end;
3
+
4
+ @mixin grid-full-column {
5
+ grid-column: $grid-full-column-start / $grid-full-column-end;
6
+ }
@@ -0,0 +1,119 @@
1
+ @use 'media-query' as *;
2
+
3
+ $grid-main-column-start: main-start;
4
+ $grid-main-column-end: main-end;
5
+ $grid-sidebar-main-column-start: $grid-main-column-start;
6
+ $grid-sidebar-main-column-end: $grid-main-column-end;
7
+
8
+ @mixin grid-main-column {
9
+ grid-column: $grid-main-column-start / $grid-main-column-end;
10
+ }
11
+
12
+ @mixin grid-sidebar-main-column {
13
+ @include grid-main-column;
14
+ }
15
+
16
+
17
+ @mixin grid-span-first-half {
18
+ grid-column: $grid-main-column-start / $grid-span-one-half;
19
+ }
20
+ @mixin grid-span-second-half {
21
+ grid-column: $grid-span-one-half / $grid-main-column-end;
22
+ }
23
+
24
+ @mixin grid-sidebar-span-first-half {
25
+ @include grid-span-first-half;
26
+ }
27
+ @mixin grid-sidebar-span-second-half {
28
+ @include grid-span-second-half;
29
+ }
30
+
31
+
32
+ @mixin grid-span-first-third {
33
+ grid-column: $grid-main-column-start / $grid-main-column-end;
34
+ @include media-query-min('m') {
35
+ grid-column: $grid-main-column-start / $grid-span-one-third;
36
+ }
37
+ }
38
+ @mixin grid-span-one-third {
39
+ grid-column: $grid-main-column-start / $grid-main-column-end;
40
+ @include media-query-min('m') {
41
+ grid-column: $grid-span-one-third;
42
+ }
43
+ }
44
+
45
+ @mixin grid-sidebar-span-first-third {
46
+ @include grid-span-first-third;
47
+ }
48
+ @mixin grid-sidebar-span-one-third {
49
+ @include grid-span-one-third;
50
+ }
51
+
52
+
53
+ @mixin grid-span-first-two-thirds {
54
+ grid-column: $grid-main-column-start / $grid-main-column-end;
55
+ @include media-query-min('m') {
56
+ grid-column: $grid-main-column-start / $grid-span-two-thirds;
57
+ }
58
+ }
59
+ @mixin grid-span-two-thirds {
60
+ grid-column: $grid-main-column-start / $grid-main-column-end;
61
+ @include media-query-min('m') {
62
+ grid-column: $grid-span-two-thirds / $grid-main-column-end;
63
+ }
64
+ }
65
+
66
+ @mixin grid-sidebar-span-first-two-thirds {
67
+ @include grid-span-first-two-thirds;
68
+ }
69
+ @mixin grid-sidebar-span-two-thirds {
70
+ @include grid-span-two-thirds;
71
+ }
72
+
73
+
74
+ @mixin grid-span-first-quarter {
75
+ grid-column: $grid-main-column-start / $grid-span-one-quarter;
76
+ }
77
+ @mixin grid-span-one-quarter {
78
+ grid-column: $grid-span-one-quarter;
79
+
80
+
81
+
82
+ &:nth-of-type(odd) {
83
+ grid-column: $grid-main-column-start / $grid-span-one-quarter;
84
+ }
85
+ @include media-query-min('l') {
86
+ &:nth-of-type(odd) {
87
+ grid-column: $grid-span-one-quarter;
88
+ }
89
+ }
90
+ }
91
+
92
+ @mixin grid-sidebar-span-first-quarter {
93
+ @include grid-span-first-quarter;
94
+ }
95
+
96
+ @mixin grid-sidebar-span-one-quarter {
97
+ grid-column: $grid-span-one-quarter;
98
+
99
+
100
+
101
+ &:nth-of-type(odd) {
102
+ grid-column: $grid-main-column-start / $grid-span-one-quarter;
103
+ }
104
+ @include media-query-min('xl') {
105
+ &:nth-of-type(odd) {
106
+ grid-column: $grid-span-one-quarter;
107
+ }
108
+ }
109
+ }
110
+
111
+ $grid-span-one-half: var(--ds-grid-span-one-half);
112
+ $grid-span-one-third: var(--ds-grid-span-one-third);
113
+ $grid-span-two-thirds: var(--ds-grid-span-two-thirds);
114
+ $grid-span-one-quarter: var(--ds-grid-span-one-quarter);
115
+
116
+ $grid-sidebar-span-one-half: $grid-span-one-half;
117
+ $grid-sidebar-span-one-third: $grid-span-one-third;
118
+ $grid-sidebar-span-two-thirds: $grid-span-two-thirds;
119
+ $grid-sidebar-span-one-quarter: $grid-span-one-quarter;
@@ -0,0 +1,14 @@
1
+
2
+ $grid-narrow-max-width: 948px;
3
+ $grid-narrow-left-column-start: narrow-left-start;
4
+ $grid-narrow-left-column-end: narrow-left-end;
5
+ $grid-narrow-center-column-start: narrow-center-start;
6
+ $grid-narrow-center-column-end: narrow-center-end;
7
+
8
+ @mixin grid-narrow-left-column {
9
+ grid-column: $grid-narrow-left-column-start / $grid-narrow-left-column-end;
10
+ }
11
+
12
+ @mixin grid-narrow-center-column {
13
+ grid-column: $grid-narrow-center-column-start / $grid-narrow-center-column-end;
14
+ }
@@ -0,0 +1,52 @@
1
+ @use 'media-query' as *;
2
+
3
+ $grid-sidebar-sidebar-1-column-start: sidebar-1-start;
4
+ $grid-sidebar-sidebar-1-column-end: sidebar-1-end;
5
+ $grid-sidebar-sidebar-2-column-start: sidebar-2-start;
6
+ $grid-sidebar-sidebar-2-column-end: sidebar-2-end;
7
+
8
+
9
+ @mixin grid-sidebar-sidebar-1($is-open: false) {
10
+ display: none;
11
+ @include media-query-min('l') {
12
+ display: unset;
13
+
14
+
15
+
16
+
17
+ grid-row: span 300;
18
+ grid-column: $grid-sidebar-sidebar-1-column-start /
19
+ $grid-sidebar-sidebar-1-column-end;
20
+ margin-block-end: 0;
21
+ @if ($is-open == true) {
22
+ width: 264px;
23
+ max-width: 264px;
24
+ } @else {
25
+ width: 64px;
26
+ max-width: 64px;
27
+ }
28
+ }
29
+ }
30
+
31
+ @mixin grid-sidebar-sidebar-2($is-open: false) {
32
+ display: none;
33
+ @include media-query-min('l') {
34
+
35
+
36
+
37
+
38
+ grid-row: span 300;
39
+ margin-block-end: 0;
40
+ @if ($is-open == true) {
41
+ grid-column: $grid-sidebar-sidebar-2-column-start /
42
+ $grid-sidebar-sidebar-2-column-end;
43
+ display: unset;
44
+ width: 320px;
45
+ max-width: 320px;
46
+ margin-inline-start: -24px;
47
+ }
48
+ }
49
+ @media (min-width: 1535px) {
50
+ margin-inline-start: -32px;
51
+ }
52
+ }
@@ -1,8 +1,9 @@
1
- @import './_grid-sidebar-sidebar.scss';
1
+ @use 'grid-sidebar-sidebar' as *;
2
+ @use 'media-query' as *;
2
3
 
3
- @mixin ds-grid-sidebar($is-sidebar-1-open: false, $is-sidebar-2-open: false) {
4
+ @mixin grid-sidebar($is-sidebar-1-open: false, $is-sidebar-2-open: false) {
4
5
  @if $is-sidebar-1-open == false and $is-sidebar-2-open == true {
5
- @error "[STIHL Design System] - [ds-grid-sidebar()]: Sidebar 1 cannot be visually closed when sidebar 2 is open";
6
+ @error "[STIHL Design System] - [ds.grid-sidebar()]: Sidebar 1 cannot be visually closed when sidebar 2 is open";
6
7
  }
7
8
 
8
9
  display: grid;
@@ -21,28 +22,28 @@
21
22
 
22
23
  @if $is-sidebar-1-open == false {
23
24
  & > :first-child {
24
- @include ds-grid-sidebar-sidebar-1(false);
25
+ @include grid-sidebar-sidebar-1(false);
25
26
  }
26
27
  & > :nth-child(2) {
27
- @include ds-grid-sidebar-sidebar-2(false);
28
+ @include grid-sidebar-sidebar-2(false);
28
29
  }
29
30
  } @else if $is-sidebar-1-open == true and $is-sidebar-2-open == false {
30
31
  & > :first-child {
31
- @include ds-grid-sidebar-sidebar-1(true);
32
+ @include grid-sidebar-sidebar-1(true);
32
33
  }
33
34
  & > :nth-child(2) {
34
- @include ds-grid-sidebar-sidebar-2(false);
35
+ @include grid-sidebar-sidebar-2(false);
35
36
  }
36
37
  } @else if $is-sidebar-1-open == true and $is-sidebar-2-open == true {
37
38
  & > :first-child {
38
- @include ds-grid-sidebar-sidebar-1(true);
39
+ @include grid-sidebar-sidebar-1(true);
39
40
  }
40
41
  & > :nth-child(2) {
41
- @include ds-grid-sidebar-sidebar-2(true);
42
+ @include grid-sidebar-sidebar-2(true);
42
43
  }
43
44
  }
44
45
 
45
- @include ds-media-query-min('m') {
46
+ @include media-query-min('m') {
46
47
  --ds-grid-sidebar-gap: 24px;
47
48
  gap: var(--ds-grid-sidebar-gap);
48
49
  grid-template-columns:
@@ -56,12 +57,12 @@
56
57
  --ds-grid-span-one-quarter: span 3;
57
58
  }
58
59
 
59
- @include ds-media-query-min('l') {
60
+ @include media-query-min('l') {
60
61
  --ds-grid-sidebar-gap: 0px;
61
62
  gap: var(--ds-grid-sidebar-gap);
62
63
  column-gap: 24px;
63
- // The children get a margin-block-end to imitate row-gap behavior
64
- // This is counteracted for the last row in the parent
64
+
65
+
65
66
  margin-block-end: -24px;
66
67
 
67
68
  @if $is-sidebar-1-open == false {
@@ -89,29 +90,24 @@
89
90
  }
90
91
 
91
92
  --ds-internal-grid-safe-zone-left: 2px;
92
- /**
93
- * The safe zone + gap equal to what is called "margin" in the designs.
94
- * The "margin" on the right differs ONLY in Figma, based on the status of the sidebar 1 and 2.
95
- * HOWEVER, in code, the margins are always the same!
96
- * 26 + 24 = 50
97
- */
93
+
98
94
  --ds-internal-grid-safe-zone-right: 26px;
99
95
 
100
96
  --ds-grid-span-one-half: span 3;
101
97
  --ds-grid-span-one-third: span 2;
102
98
  --ds-grid-span-two-thirds: span 4;
103
99
 
104
- // The children get a margin-block-end to imitate row-gap behavior
105
- // This is counteracted for the last row in the parent
100
+
101
+
106
102
  & > * {
107
103
  margin-block-end: 24px;
108
104
  }
109
105
  }
110
106
 
111
- @include ds-media-query-min('xl') {
107
+ @include media-query-min('xl') {
112
108
  column-gap: 32px;
113
- // The children get a margin-block-end to imitate row-gap behavior
114
- // This is counteracted for the last row in the parent
109
+
110
+
115
111
  margin-block-end: -32px;
116
112
 
117
113
  @if $is-sidebar-1-open == false {
@@ -139,20 +135,15 @@
139
135
  }
140
136
 
141
137
  --ds-internal-grid-safe-zone-left: 0px;
142
- /**
143
- * The safe zone + gap equal to what is called "margin" in the designs.
144
- * The "margin" on the right differs ONLY in Figma, based on the status of the sidebar 1 and 2.
145
- * HOWEVER, in code, the margins are always the same!
146
- * 32 + 32 = 64
147
- */
138
+
148
139
  --ds-internal-grid-safe-zone-right: 32px;
149
140
 
150
141
  --ds-grid-span-one-half: span 6;
151
142
  --ds-grid-span-one-third: span 4;
152
143
  --ds-grid-span-two-thirds: span 8;
153
144
 
154
- // The children get a margin-block-end to imitate row-gap behavior
155
- // This is counteracted for the last row in the parent
145
+
146
+
156
147
  & > * {
157
148
  margin-block-end: 32px;
158
149
  }