@stihl-design-system/components 1.0.0-RC.4 → 1.0.0-RC.6

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 (167) hide show
  1. package/Klarna.svg +1 -0
  2. package/Mastercard.svg +2 -0
  3. package/PayPal.svg +2 -0
  4. package/Placeholder.svg +1 -0
  5. package/Visa.svg +2 -0
  6. package/arialiveregions.BvZhV6hb.js +27 -0
  7. package/assets/CustomReactSelect.Bsphydqt.css +1 -0
  8. package/assets/Fieldset.D0jHAGRL.css +1 -0
  9. package/assets/Icon.Duy_0R8w.css +1 -0
  10. package/assets/InputPassword.VCNO8ANM.css +1 -0
  11. package/assets/InputSearch.BMRAb95l.css +1 -0
  12. package/assets/InputStepper.BKjqNi-i.css +1 -0
  13. package/assets/Notification.Bg63cvs4.css +1 -0
  14. package/assets/RadioGroup.Bz3_xkZU.css +1 -0
  15. package/assets/Select.Bz1TImkI.css +1 -0
  16. package/assets/Textarea.D2h5cW_t.css +1 -0
  17. package/assets/Toast.BzVaebc0.css +1 -0
  18. package/assets/{arialiveregions.VnhjP8Gr.css → arialiveregions.GsGx2USO.css} +1 -1
  19. package/assets/{asterisk.C-o6rbGQ.css → asterisk.JlyPArZu.css} +1 -1
  20. package/assets/button.BdxtFZKx.css +1 -0
  21. package/assets/buttonround.pR4StXA7.css +1 -0
  22. package/assets/checkbox.BjIn2stV.css +1 -0
  23. package/assets/dialog.CKwM2EBH.css +1 -0
  24. package/assets/floatingactionbutton.CUvMbEMf.css +1 -0
  25. package/assets/heading.CCbuI4X-.css +1 -0
  26. package/assets/input.71tOIrpp.css +1 -0
  27. package/assets/link.D61tKkSK.css +1 -0
  28. package/assets/linkstandalone.Bx8Uvo0G.css +1 -0
  29. package/assets/logo.C05WqGId.css +1 -0
  30. package/assets/optioncheckbox.BdRJHcSw.css +1 -0
  31. package/assets/radio.ewRpPo4W.css +1 -0
  32. package/assets/skiptocontent.DGVJ77cj.css +1 -0
  33. package/assets/spinner.D_Nnf1ZG.css +1 -0
  34. package/assets/switch.Ds-I_ybT.css +1 -0
  35. package/assets/{systemfeedback.WE3wClZ3.css → systemfeedback.BzJATHDd.css} +1 -1
  36. package/assets/text.B-CTuGgI.css +1 -0
  37. package/assets/{title.CE0Dm7PI.css → title.DlhX9K3W.css} +1 -1
  38. package/asterisk.Cjbk-xZi.js +8 -0
  39. package/button.L1lgCuM9.js +135 -0
  40. package/buttonround.ddSqXjYf.js +118 -0
  41. package/checkbox.DNHdo6_n.js +113 -0
  42. package/checkboxgroup.DqWlzAeR.js +9 -0
  43. package/chunks/{CheckboxGroup.CS6Q_TeZ.js → CheckboxGroup.DsQ6lI5a.js} +22 -22
  44. package/chunks/{CustomReactSelect.DtmbYZUf.js → CustomReactSelect.5dHi6PEO.js} +909 -959
  45. package/chunks/Fieldset.B1vsrHNv.js +99 -0
  46. package/chunks/{Icon.9gDIp6p4.js → Icon.n4XZrQ4N.js} +33 -27
  47. package/chunks/InputPassword.a7zHKrmM.js +140 -0
  48. package/chunks/InputSearch.DITRiB92.js +189 -0
  49. package/chunks/InputStepper.BkncCNwJ.js +291 -0
  50. package/chunks/Notification.DVVuSOqG.js +93 -0
  51. package/chunks/RadioGroup.BO4pbAJw.js +132 -0
  52. package/chunks/RadioGroup.module.BBZwHDjW.js +11 -0
  53. package/chunks/Select.COdS787F.js +191 -0
  54. package/chunks/Textarea.oqCrSopu.js +195 -0
  55. package/chunks/Toast.RON4bFPY.js +89 -0
  56. package/chunks/{jsx-runtime.C-kxDJ4g.js → jsx-runtime.C115EyI4.js} +3 -7
  57. package/{combobox.BaSkiD6f.js → combobox.CRlhqmuO.js} +2 -2
  58. package/components/Radio/Radio.d.ts +11 -3
  59. package/components/RadioGroup/RadioGroup.d.ts +6 -3
  60. package/components/RadioGroup/RadioGroup.utils.d.ts +5 -3
  61. package/components/RadioGroup/RadioGroup.utils.test.d.ts +1 -0
  62. package/components/SkipToContent/SkipToContent.d.ts +12 -0
  63. package/components/SkipToContent/SkipToContent.test.d.ts +1 -0
  64. package/customreactselect.CD58gwtp.js +13 -0
  65. package/dialog.0qPUVJha.js +45 -0
  66. package/fieldset.aY3V2jK2.js +11 -0
  67. package/floatingactionbutton.D_e4vz2G.js +87 -0
  68. package/heading.BTNroD1E.js +50 -0
  69. package/icon.D3RXjzh4.js +8 -0
  70. package/index.d.ts +1 -0
  71. package/index.es.js +66 -62
  72. package/input.ChVISFEX.js +236 -0
  73. package/inputpassword.Ba9SUUIK.js +12 -0
  74. package/inputsearch.BK-0OTwA.js +13 -0
  75. package/inputstepper.CTpTeXL9.js +13 -0
  76. package/link.SAcKvzJ3.js +115 -0
  77. package/linkstandalone.DNe0Nydm.js +79 -0
  78. package/{logo.C_oJ8isW.js → logo.BR_CUXFl.js} +16 -16
  79. package/notification.Csn5QCR2.js +9 -0
  80. package/{optioncheckbox.CUV1MQhh.js → optioncheckbox.C4l2UIak.js} +7 -7
  81. package/package.json +28 -24
  82. package/partials/index.js +51 -79
  83. package/radio.epf54-sG.js +115 -0
  84. package/radiogroup.CiENWRos.js +11 -0
  85. package/select.DLYav8gw.js +12 -0
  86. package/skiptocontent._YZRKxnc.js +44 -0
  87. package/skiptocontent.d.ts +1 -0
  88. package/spinner.DVa112nj.js +58 -0
  89. package/styles/scss/lib/_animation.scss +15 -14
  90. package/styles/scss/lib/_container-query.scss +3 -3
  91. package/styles/scss/lib/_grid-sidebar.scss +14 -7
  92. package/styles/scss/lib/_link.scss +48 -42
  93. package/styles/scss/lib/_media-query.scss +3 -3
  94. package/styles/scss/lib/_transition.scss +26 -7
  95. package/switch.rd7PdLc9.js +65 -0
  96. package/{systemfeedback.4Hkfigi-.js → systemfeedback.CUWch42u.js} +3 -3
  97. package/text.CrYUewrP.js +57 -0
  98. package/{textarea.DPy3TJJf.js → textarea.hLgeYdsI.js} +4 -4
  99. package/title.Dvp8LKJt.js +36 -0
  100. package/toast.r_yhGYEe.js +10 -0
  101. package/{toastmanager.DQ_-eTrx.js → toastmanager.D-uIi-TS.js} +2 -2
  102. package/utils/index.d.ts +1 -0
  103. package/utils/remove-spaces.d.ts +6 -0
  104. package/utils/remove-spaces.test.d.ts +1 -0
  105. package/arialiveregions.49Zyf6mj.js +0 -27
  106. package/assets/CustomReactSelect.B0rJLjN0.css +0 -1
  107. package/assets/Fieldset.xazpUXJX.css +0 -1
  108. package/assets/Icon.CB-KQmw4.css +0 -1
  109. package/assets/InputPassword.C3Uyj7oA.css +0 -1
  110. package/assets/InputSearch.tL3e9-Ob.css +0 -1
  111. package/assets/InputStepper.paPJix5A.css +0 -1
  112. package/assets/Notification.CCCbfXEz.css +0 -1
  113. package/assets/RadioGroup.Ur8Ro-XL.css +0 -1
  114. package/assets/Select.D2qBxaHP.css +0 -1
  115. package/assets/Textarea.BKbocznb.css +0 -1
  116. package/assets/Toast.CAP_EwDX.css +0 -1
  117. package/assets/button.BuIpnG-S.css +0 -1
  118. package/assets/buttonround.C3ph5Yyu.css +0 -1
  119. package/assets/checkbox.BsFEWfQe.css +0 -1
  120. package/assets/dialog.BGK3mgk7.css +0 -1
  121. package/assets/floatingactionbutton.D7ywURL3.css +0 -1
  122. package/assets/heading.CGFucb-C.css +0 -1
  123. package/assets/input.BcP5kkZ2.css +0 -1
  124. package/assets/link.DQy_OhwC.css +0 -1
  125. package/assets/linkstandalone.Dh6bE5Fb.css +0 -1
  126. package/assets/logo.BbHYgnWo.css +0 -1
  127. package/assets/optioncheckbox.C-K1FLhc.css +0 -1
  128. package/assets/radio.CSHQGdpr.css +0 -1
  129. package/assets/spinner.C5rBmKiF.css +0 -1
  130. package/assets/switch.sqve8ApJ.css +0 -1
  131. package/assets/text.DDAveG7E.css +0 -1
  132. package/asterisk.DU8THnoC.js +0 -8
  133. package/button.DX_nxoJC.js +0 -135
  134. package/buttonround.CXsBk9nL.js +0 -118
  135. package/checkbox.B43oeMeC.js +0 -112
  136. package/checkboxgroup.C7aCjYds.js +0 -9
  137. package/chunks/Fieldset.BokeZzG5.js +0 -99
  138. package/chunks/InputPassword.jpUCijp7.js +0 -140
  139. package/chunks/InputSearch.BmOtAZcR.js +0 -190
  140. package/chunks/InputStepper.DTKjUL4U.js +0 -291
  141. package/chunks/Notification.CUPOlHAX.js +0 -93
  142. package/chunks/RadioGroup.DpwnVv7u.js +0 -110
  143. package/chunks/RadioGroup.module.bi3leRes.js +0 -11
  144. package/chunks/Select.DkDZo0ky.js +0 -193
  145. package/chunks/Textarea.C938p79X.js +0 -195
  146. package/chunks/Toast.CLYrwQVO.js +0 -89
  147. package/customreactselect.LTbjaBN2.js +0 -13
  148. package/dialog.BkXwcbUh.js +0 -45
  149. package/fieldset.BXOWK-B-.js +0 -11
  150. package/floatingactionbutton.-nDRRiXY.js +0 -87
  151. package/heading.DqGbFfj2.js +0 -50
  152. package/icon.Cpp_9L1I.js +0 -8
  153. package/input.BM6tyRUm.js +0 -236
  154. package/inputpassword.DUxH1K_k.js +0 -12
  155. package/inputsearch.B-vePHle.js +0 -13
  156. package/inputstepper.C2ypADPI.js +0 -13
  157. package/link.B4XZoLDj.js +0 -115
  158. package/linkstandalone.BSfd95Pd.js +0 -79
  159. package/notification.CxxAOdNV.js +0 -9
  160. package/radio.Bhu9OUY-.js +0 -79
  161. package/radiogroup.CMJ1b38q.js +0 -11
  162. package/select.DFJK2mHF.js +0 -12
  163. package/spinner.BskX4ovu.js +0 -58
  164. package/switch.Bx2tDKx0.js +0 -65
  165. package/text.CPU8IUqY.js +0 -57
  166. package/title.icX0VDiO.js +0 -36
  167. package/toast.C-Yg5EoE.js +0 -10
@@ -0,0 +1,115 @@
1
+ "use client";
2
+ import { j as i } from "./chunks/jsx-runtime.C115EyI4.js";
3
+ import { c as _ } from "./chunks/index.CvOaL64Y.js";
4
+ import { forwardRef as $, useRef as C, useState as E, useEffect as L, useCallback as O } from "react";
5
+ import { u as P } from "./chunks/useBreakpoint.5xBNDiCf.js";
6
+ import './assets/radio.ewRpPo4W.css';const R = (r) => r.replace(/\s+/g, ""), U = "_radio-root_1f0rc_76", q = "_radio-root--disabled_1f0rc_95", z = "_radio-root--with-custom-area_1f0rc_98", F = "_radio_1f0rc_76", G = "_dot_1f0rc_119", J = "_radio--invalid_1f0rc_143", K = "_label_1f0rc_148", M = "_label--bold_1f0rc_161", Q = "_label--hidden_1f0rc_171", T = "_label--with-custom-area_1f0rc_183", X = "_custom-area_1f0rc_187", Y = "_hint_1f0rc_195", Z = "_hint--visible_1f0rc_217", ee = "_hint--unchecked-hidden_1f0rc_221", te = "_hint--hidden_1f0rc_226", oe = "_input_1f0rc_239", e = {
7
+ "radio-root": "_radio-root_1f0rc_76",
8
+ radioRoot: U,
9
+ "radio-root--disabled": "_radio-root--disabled_1f0rc_95",
10
+ radioRootDisabled: q,
11
+ "radio-root--with-custom-area": "_radio-root--with-custom-area_1f0rc_98",
12
+ radioRootWithCustomArea: z,
13
+ radio: F,
14
+ dot: G,
15
+ "radio--invalid": "_radio--invalid_1f0rc_143",
16
+ radioInvalid: J,
17
+ label: K,
18
+ "label--bold": "_label--bold_1f0rc_161",
19
+ labelBold: M,
20
+ "label--hidden": "_label--hidden_1f0rc_171",
21
+ labelHidden: Q,
22
+ "label--with-custom-area": "_label--with-custom-area_1f0rc_183",
23
+ labelWithCustomArea: T,
24
+ "custom-area": "_custom-area_1f0rc_187",
25
+ customArea: X,
26
+ hint: Y,
27
+ "hint--visible": "_hint--visible_1f0rc_217",
28
+ hintVisible: Z,
29
+ "hint--unchecked-hidden": "_hint--unchecked-hidden_1f0rc_221",
30
+ hintUncheckedHidden: ee,
31
+ "hint--hidden": "_hint--hidden_1f0rc_226",
32
+ hintHidden: te,
33
+ input: oe
34
+ }, ie = $(
35
+ ({
36
+ label: r,
37
+ name: f,
38
+ value: b,
39
+ checked: m,
40
+ className: v,
41
+ customArea: a,
42
+ defaultChecked: x = !1,
43
+ disabled: s = !1,
44
+ hideLabel: k = !1,
45
+ hint: l,
46
+ invalid: j = !1,
47
+ isBold: N = !1,
48
+ hideUncheckedHint: n = !1,
49
+ onChange: h,
50
+ ...g
51
+ }, c) => {
52
+ const H = C(null), t = C(null), [w, D] = E(x), u = m !== void 0, d = u ? m : w;
53
+ L(() => {
54
+ t.current && n && ((t.current.style.height === "0px" || t.current.style.height === "") && d ? (t.current.style.height = `${t.current.scrollHeight}px`, t.current.style.opacity = "1") : (t.current.style.opacity = "0", t.current.style.height = "0px"));
55
+ }, [t, d]);
56
+ const p = P(k), A = _(
57
+ e.radioRoot,
58
+ {
59
+ [e.radioRootDisabled]: s,
60
+ [e.radioRootWithCustomArea]: !!a
61
+ },
62
+ v
63
+ ), W = _(e.label, {
64
+ [e.labelBold]: N,
65
+ // hide label only visually to keep them available for assistive technologies
66
+ [e.labelHidden]: p,
67
+ [e.labelWithCustomArea]: !!a
68
+ }), B = () => !n && l ? !0 : !!(n && l && d), V = _(e.hint, {
69
+ [e.hintHidden]: p,
70
+ [e.hintUncheckedHidden]: n,
71
+ [e.hintVisible]: B()
72
+ }), I = _(e.radio, {
73
+ [e.radioInvalid]: j
74
+ }), S = O(
75
+ (o) => {
76
+ if (s) {
77
+ o.preventDefault();
78
+ return;
79
+ }
80
+ u || D(o.target.checked), h && h(o);
81
+ },
82
+ [s, u, h]
83
+ ), y = l ? `${R(f)}-${R(b)}-description` : void 0;
84
+ return /* @__PURE__ */ i.jsxs("label", { className: A, children: [
85
+ /* @__PURE__ */ i.jsx(
86
+ "input",
87
+ {
88
+ type: "radio",
89
+ value: b,
90
+ name: f,
91
+ className: e.input,
92
+ ref: (o) => {
93
+ typeof c == "function" ? c(o) : c !== null && (c.current = o), H.current = o;
94
+ },
95
+ onChange: S,
96
+ ...g,
97
+ disabled: s,
98
+ checked: d,
99
+ "aria-label": typeof r == "string" ? r : void 0,
100
+ "aria-describedby": y
101
+ }
102
+ ),
103
+ /* @__PURE__ */ i.jsx("span", { className: I, children: /* @__PURE__ */ i.jsx("div", { className: e.dot }) }),
104
+ /* @__PURE__ */ i.jsxs("span", { className: W, children: [
105
+ r,
106
+ a && /* @__PURE__ */ i.jsx("div", { className: e.customArea, children: a }),
107
+ /* @__PURE__ */ i.jsx("span", { id: y, className: V, ref: t, children: l })
108
+ ] })
109
+ ] });
110
+ }
111
+ );
112
+ ie.displayName = "DSRadio";
113
+ export {
114
+ ie as DSRadio
115
+ };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import "./chunks/jsx-runtime.C115EyI4.js";
3
+ import "./chunks/index.CvOaL64Y.js";
4
+ import "react";
5
+ import "./chunks/Fieldset.B1vsrHNv.js";
6
+ import "./radio.epf54-sG.js";
7
+ import "./chunks/RadioGroup.module.BBZwHDjW.js";
8
+ import { D as s } from "./chunks/RadioGroup.BO4pbAJw.js";
9
+ export {
10
+ s as DSRadioGroup
11
+ };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import "./chunks/jsx-runtime.C115EyI4.js";
3
+ import "./chunks/index.CvOaL64Y.js";
4
+ import "react";
5
+ import "./chunks/useBreakpoint.5xBNDiCf.js";
6
+ import "./asterisk.Cjbk-xZi.js";
7
+ import "./chunks/Icon.n4XZrQ4N.js";
8
+ import "./systemfeedback.CUWch42u.js";
9
+ import { D as s } from "./chunks/Select.COdS787F.js";
10
+ export {
11
+ s as DSSelect
12
+ };
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { j as a } from "./chunks/jsx-runtime.C115EyI4.js";
3
+ import { c as k } from "./chunks/index.CvOaL64Y.js";
4
+ import { DSLink as p } from "./link.SAcKvzJ3.js";
5
+ import { g as n } from "./chunks/helpers.B1JT5ShS.js";
6
+ import "react";
7
+ import './assets/skiptocontent.DGVJ77cj.css';const c = "_skip-to-content_4ockd_76", h = "_skip-to-content--dark_4ockd_83", s = {
8
+ "skip-to-content": "_skip-to-content_4ockd_76",
9
+ skipToContent: c,
10
+ "skip-to-content--dark": "_skip-to-content--dark_4ockd_83",
11
+ skipToContentDark: h
12
+ }, C = ({
13
+ children: e = "Skip to main content",
14
+ className: i,
15
+ targetElementId: t = "main",
16
+ theme: o = "light"
17
+ }) => {
18
+ t.startsWith("#") && console.warn(
19
+ n(
20
+ "DSSkipToContent",
21
+ 'The targetElementId should not start with a "#" character. Please provide the id of the element you want to skip to.'
22
+ )
23
+ ), (t.startsWith("http") || t.startsWith(".")) && console.warn(
24
+ n(
25
+ "DSSkipToContent",
26
+ 'The targetElementId should not start with "http" or ".". Please provide the id of the element you want to skip to.'
27
+ )
28
+ );
29
+ const r = k(s.skipToContent, i, {
30
+ [s.skipToContentDark]: o === "dark"
31
+ });
32
+ return /* @__PURE__ */ a.jsx(
33
+ p,
34
+ {
35
+ className: r,
36
+ href: `#${t}`,
37
+ theme: o,
38
+ children: e
39
+ }
40
+ );
41
+ };
42
+ export {
43
+ C as DSSkipToContent
44
+ };
@@ -0,0 +1 @@
1
+ export * from './components/SkipToContent/SkipToContent'
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import { j as r } from "./chunks/jsx-runtime.C115EyI4.js";
3
+ import { c as n } from "./chunks/index.CvOaL64Y.js";
4
+ import { D as _ } from "./chunks/Icon.n4XZrQ4N.js";
5
+ import './assets/spinner.D_Nnf1ZG.css';const m = "_root_11iwi_76", z = "_root-size-small_11iwi_82", c = "_root-size-medium_11iwi_86", S = "_root-size-large_11iwi_90", d = "_root-size-x-large_11iwi_94", g = "_root-size-inherit_11iwi_98", w = "_rotate_11iwi_1", u = "_screenReaderOnly_11iwi_123", e = {
6
+ root: m,
7
+ "root-size-small": "_root-size-small_11iwi_82",
8
+ rootSizeSmall: z,
9
+ "root-size-medium": "_root-size-medium_11iwi_86",
10
+ rootSizeMedium: c,
11
+ "root-size-large": "_root-size-large_11iwi_90",
12
+ rootSizeLarge: S,
13
+ "root-size-x-large": "_root-size-x-large_11iwi_94",
14
+ rootSizeXLarge: d,
15
+ "root-size-inherit": "_root-size-inherit_11iwi_98",
16
+ rootSizeInherit: g,
17
+ rotate: w,
18
+ screenReaderOnly: u
19
+ }, L = ({
20
+ aria: i,
21
+ className: t,
22
+ size: o = "small",
23
+ theme: s = "light",
24
+ ...a
25
+ }) => {
26
+ const l = n(e.root, t, {
27
+ [e.rootSizeSmall]: o === "small",
28
+ [e.rootSizeMedium]: o === "medium",
29
+ [e.rootSizeLarge]: o === "large",
30
+ [e.rootSizeXLarge]: o === "x-large",
31
+ [e.rootSizeInherit]: o === "inherit"
32
+ });
33
+ return /* @__PURE__ */ r.jsxs(
34
+ "span",
35
+ {
36
+ className: l,
37
+ role: "alert",
38
+ "aria-live": "assertive",
39
+ "aria-label": (i == null ? void 0 : i["aria-label"]) || void 0,
40
+ ...a,
41
+ children: [
42
+ /* @__PURE__ */ r.jsx("span", { className: e.screenReaderOnly, children: " " }),
43
+ /* @__PURE__ */ r.jsx(
44
+ _,
45
+ {
46
+ name: "loading-spinner",
47
+ theme: s,
48
+ focusable: "false",
49
+ "aria-hidden": "true"
50
+ }
51
+ )
52
+ ]
53
+ }
54
+ );
55
+ };
56
+ export {
57
+ L as DSSpinner
58
+ };
@@ -1,20 +1,21 @@
1
1
  $ds-animation-duration-100: var(--ds-animation-duration, 100ms);
2
2
  $ds-animation-duration-250: var(--ds-animation-duration, 250ms);
3
3
  $ds-animation-duration-400: var(--ds-animation-duration, 400ms);
4
- // TODO remove or move to spinner component after discussion with design took place
5
- $ds-animation-duration-spinner: var(--ds-animation-duration, 1100ms);
6
4
 
7
- $ds-animation-timing-function-ease-in-out: ease-in-out;
8
- $ds-animation-timing-function-motion-functional-linear: linear;
9
- $ds-animation-timing-function-motion-functional-ease-in: cubic-bezier(
10
- 0.5,
11
- 0,
12
- 1,
13
- 1
5
+ $ds-animation-durations: (
6
+ '100': $ds-animation-duration-100,
7
+ '250': $ds-animation-duration-250,
8
+ '400': $ds-animation-duration-400,
14
9
  );
15
- $ds-animation-timing-function-motion-functional-ease-out: cubic-bezier(
16
- 0,
17
- 0,
18
- 0.5,
19
- 1
10
+
11
+ $ds-motion-functional-linear: linear;
12
+ $ds-motion-functional-ease-in: cubic-bezier(0.5, 0, 1, 1);
13
+ $ds-motion-functional-ease-out: cubic-bezier(0, 0, 0.5, 1);
14
+ $ds-motion-functional-ease-in-out: cubic-bezier(0.5, 0, 0.5, 1);
15
+
16
+ $ds-animation-easing-functions: (
17
+ 'linear': $ds-motion-functional-linear,
18
+ 'ease-in': $ds-motion-functional-ease-in,
19
+ 'ease-out': $ds-motion-functional-ease-out,
20
+ 'ease-in-out': $ds-motion-functional-ease-in-out,
20
21
  );
@@ -13,7 +13,7 @@
13
13
  }
14
14
  }
15
15
  } @else {
16
- @error "Passed #{$min} breakpoint is not available for used ds-container-query-min() mixin.";
16
+ @error "[STIHL Design System] - [ds-container-query-min()]: Passed '#{$min}' breakpoint is not available in ds-container-query-min() mixin.";
17
17
  }
18
18
  }
19
19
 
@@ -30,7 +30,7 @@
30
30
  }
31
31
  }
32
32
  } @else {
33
- @error "Passed #{$max} breakpoint is not available for used ds-container-query-max() mixin.";
33
+ @error "[STIHL Design System] - [ds-container-query-max()]: Passed '#{$max}' breakpoint is not available in ds-container-query-max() mixin.";
34
34
  }
35
35
  }
36
36
 
@@ -53,6 +53,6 @@
53
53
  }
54
54
  }
55
55
  } @else {
56
- @error "Passed #{$min} and/or #{$max} breakpoint is not available for used ds-container-query-min-max() mixin.";
56
+ @error "[STIHL Design System] - [ds-container-query-min-max()]: Passed '#{$min}' and/or '#{$max}' breakpoint is not available in ds-container-query-min-max() mixin.";
57
57
  }
58
58
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  @mixin ds-grid-sidebar($is-sidebar-1-open: false, $is-sidebar-2-open: false) {
4
4
  @if $is-sidebar-1-open == false and $is-sidebar-2-open == true {
5
- @error "Sidebar 1 cannot be visually closed when sidebar 2 is open";
5
+ @error "[STIHL Design System] - [ds-grid-sidebar()]: Sidebar 1 cannot be visually closed when sidebar 2 is open";
6
6
  }
7
7
 
8
8
  display: grid;
@@ -63,9 +63,7 @@
63
63
  // The children get a margin-block-end to imitate row-gap behavior
64
64
  // This is counteracted for the last row in the parent
65
65
  margin-block-end: -24px;
66
- & > * {
67
- margin-block-end: 24px;
68
- }
66
+
69
67
  @if $is-sidebar-1-open == false {
70
68
  grid-template-columns:
71
69
  [sidebar-1-start] fit-content(64px)
@@ -102,6 +100,12 @@
102
100
  --ds-grid-span-one-half: span 3;
103
101
  --ds-grid-span-one-third: span 2;
104
102
  --ds-grid-span-two-thirds: span 4;
103
+
104
+ // The children get a margin-block-end to imitate row-gap behavior
105
+ // This is counteracted for the last row in the parent
106
+ & > * {
107
+ margin-block-end: 24px;
108
+ }
105
109
  }
106
110
 
107
111
  @include ds-media-query-min('xl') {
@@ -109,9 +113,6 @@
109
113
  // The children get a margin-block-end to imitate row-gap behavior
110
114
  // This is counteracted for the last row in the parent
111
115
  margin-block-end: -32px;
112
- & > * {
113
- margin-block-end: 32px;
114
- }
115
116
 
116
117
  @if $is-sidebar-1-open == false {
117
118
  grid-template-columns:
@@ -149,6 +150,12 @@
149
150
  --ds-grid-span-one-half: span 6;
150
151
  --ds-grid-span-one-third: span 4;
151
152
  --ds-grid-span-two-thirds: span 8;
153
+
154
+ // The children get a margin-block-end to imitate row-gap behavior
155
+ // This is counteracted for the last row in the parent
156
+ & > * {
157
+ margin-block-end: 32px;
158
+ }
152
159
  }
153
160
 
154
161
  @media (min-width: 2304px) {
@@ -1,4 +1,5 @@
1
1
  @import '_hover';
2
+ @import '_transition';
2
3
  @import '_spacing';
3
4
 
4
5
  // Encode a color to be used in a data url.
@@ -19,7 +20,9 @@
19
20
  $background-color-hover,
20
21
  $content-color-hover
21
22
  ) {
22
- color: $content-color;
23
+ & {
24
+ color: $content-color;
25
+ }
23
26
 
24
27
  &:link,
25
28
  &:visited {
@@ -97,29 +100,30 @@
97
100
 
98
101
  // Type
99
102
  @if ($type == 'inline') {
100
- // Inline link
101
- @include link-underline;
102
-
103
- display: inline;
104
- padding-inline-end: $ds-spacing-2;
105
- padding-inline-start: $ds-spacing-2;
106
- padding-block-start: 0;
107
- padding-block-end: 0;
108
- line-height: inherit;
109
- font-size: inherit;
110
-
111
- // Inline links do have two predefined icons for external links and anchors.
112
- // The icons are added via the ::after pseudo element as svg data urls to
113
- // enable the change of the icon color via the fill property.
114
- :where(&)[href^="http://"]::after,
115
- :where(&)[href^="https://"]::after,
116
- :where(&)[href^='#']::after {
117
- display: inline-block;
118
- margin-inline-start: 0.375em;
119
- width: 0.75em;
120
- height: 0.75em;
103
+ & {
104
+ // Inline link
105
+ @include link-underline;
106
+
107
+ display: inline;
108
+ padding-inline-end: $ds-spacing-2;
109
+ padding-inline-start: $ds-spacing-2;
110
+ padding-block-start: 0;
111
+ padding-block-end: 0;
112
+ line-height: inherit;
113
+ font-size: inherit;
114
+
115
+ // Inline links do have two predefined icons for external links and anchors.
116
+ // The icons are added via the ::after pseudo element as svg data urls to
117
+ // enable the change of the icon color via the fill property.
118
+ :where(&)[href^="http://"]::after,
119
+ :where(&)[href^="https://"]::after,
120
+ :where(&)[href^='#']::after {
121
+ display: inline-block;
122
+ margin-inline-start: 0.375em;
123
+ width: 0.75em;
124
+ height: 0.75em;
125
+ }
121
126
  }
122
-
123
127
  &[href^="http://"]::after,
124
128
  &[href^="https://"]::after
125
129
  {
@@ -130,27 +134,29 @@
130
134
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{urlEncodeHexColor($link-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");
131
135
  }
132
136
  } @else {
133
- // Standalone link
134
- @include ds-utility-medium;
135
-
136
- display: inline-flex;
137
- align-items: center;
138
- height: fit-content;
139
- gap: $ds-spacing-6;
140
- padding-inline-end: $ds-spacing-4;
141
- padding-inline-start: $ds-spacing-4;
142
- padding-block-start: $ds-spacing-2;
143
- padding-block-end: $ds-spacing-2;
144
- // Set color to transparent instead of text-decoration: none to support forced colors link decoration
145
- text-decoration-color: transparent;
146
-
147
- // The DSLinkStandalone component uses the DSIcon component to render a
148
- // selectable icon. The icon is colored with the current text color.
149
- svg {
150
- fill: currentColor;
137
+ & {
138
+ // Standalone link
139
+ @include ds-utility-medium;
140
+
141
+ display: inline-flex;
142
+ align-items: center;
143
+ height: fit-content;
144
+ gap: $ds-spacing-6;
145
+ padding-inline-end: $ds-spacing-4;
146
+ padding-inline-start: $ds-spacing-4;
147
+ padding-block-start: $ds-spacing-2;
148
+ padding-block-end: $ds-spacing-2;
149
+ // Set color to transparent instead of text-decoration: none to support forced colors link decoration
150
+ text-decoration-color: transparent;
151
+
152
+ // The DSLinkStandalone component uses the DSIcon component to render a
153
+ // selectable icon. The icon is colored with the current text color.
154
+ svg {
155
+ fill: currentColor;
156
+ }
151
157
  }
152
158
  }
153
159
 
154
160
  // Transition
155
- @include transition(background-color, border-color, color);
161
+ @include ds-transition((background-color, border-color, color));
156
162
  }
@@ -6,7 +6,7 @@
6
6
  @content;
7
7
  }
8
8
  } @else {
9
- @error "Passed #{$min} breakpoint is not available for used ds-media-query-min() mixin.";
9
+ @error "[STIHL Design System] - [ds-media-query-min()]: Passed '#{$min}' breakpoint is not available in ds-media-query-min() mixin.";
10
10
  }
11
11
  }
12
12
 
@@ -16,7 +16,7 @@
16
16
  @content;
17
17
  }
18
18
  } @else {
19
- @error "Passed #{$max} breakpoint is not available for used ds-media-query-max() mixin.";
19
+ @error "[STIHL Design System] - [ds-media-query-max()]: Passed '#{$max}' breakpoint is not available in ds-media-query-max() mixin.";
20
20
  }
21
21
  }
22
22
 
@@ -27,6 +27,6 @@
27
27
  @content;
28
28
  }
29
29
  } @else {
30
- @error "Passed #{$min} and/or #{$max} breakpoint is not available for used ds-media-query-min-max() mixin.";
30
+ @error "[STIHL Design System] - [ds-media-query-min-max()]: Passed '#{$min}' and/or '#{$max}' breakpoint is not available in ds-media-query-min-max() mixin.";
31
31
  }
32
32
  }
@@ -1,3 +1,4 @@
1
+ @import '_animation.scss';
1
2
  /**
2
3
  *
3
4
  * This mixin provides a concise way to set transitions with a default
@@ -7,20 +8,38 @@
7
8
  * motion and adjusts the transition duration accordingly.
8
9
  *
9
10
  * Example Usage:
10
- * @include transition(opacity, transform);
11
+ * @include ds-transition((opacity, transform), '250', 'ease-out');
12
+ * @include ds-transition(width, $easing-key: 'ease-out');
11
13
  */
12
- @mixin transition($properties...) {
14
+ @mixin ds-transition($properties, $duration-key: '100', $easing-key: 'linear') {
13
15
  @if length($properties) == 0 or $properties == null {
14
- @error "No properties provided for transition mixin.";
16
+ @error "[STIHL Design System] - [ds-transition()]: No properties provided for ds-transition() mixin.";
17
+ }
18
+
19
+ $duration: map-get($ds-animation-durations, $duration-key);
20
+ $easing: map-get($ds-animation-easing-functions, $easing-key);
21
+
22
+ @if not map-has-key($ds-animation-durations, $duration-key) {
23
+ @error "[STIHL Design System] - [ds-transition()]: Duration key '#{$duration-key}' is not available in the ds-transition() mixin.";
24
+ }
25
+
26
+ @if not map-has-key($ds-animation-easing-functions, $easing-key) {
27
+ @error "[STIHL Design System] - [ds-transition()]: Easing key '#{$easing-key}' is not available in the ds-transition() mixin.";
15
28
  }
16
29
 
17
30
  $transition-values: ();
18
31
  @each $prop in $properties {
19
- $transition-values: append($transition-values, #{$prop} 0.3s ease, comma);
32
+ $transition-values: append(
33
+ $transition-values,
34
+ #{$prop} #{$duration} #{$easing},
35
+ comma
36
+ );
20
37
  }
21
- transition: $transition-values;
38
+ & {
39
+ transition: $transition-values;
22
40
 
23
- @media (prefers-reduced-motion: reduce) {
24
- transition-duration: 0ms;
41
+ @media (prefers-reduced-motion: reduce) {
42
+ transition-duration: 0ms;
43
+ }
25
44
  }
26
45
  }
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { j as t } from "./chunks/jsx-runtime.C115EyI4.js";
3
+ import { c as b } from "./chunks/index.CvOaL64Y.js";
4
+ import "react";
5
+ import { D as p } from "./chunks/Icon.n4XZrQ4N.js";
6
+ import { DSSpinner as f } from "./spinner.DVa112nj.js";
7
+ import './assets/switch.Ds-I_ybT.css';const v = "_root_vzlrg_76", x = "_root--label-right_vzlrg_114", z = "_root--stretched_vzlrg_117", j = "_loader_vzlrg_127", k = "_thumb_vzlrg_180", S = "_root--checked_vzlrg_195", r = {
8
+ root: v,
9
+ "root--label-right": "_root--label-right_vzlrg_114",
10
+ rootLabelRight: x,
11
+ "root--stretched": "_root--stretched_vzlrg_117",
12
+ rootStretched: z,
13
+ switch: "_switch_vzlrg_122",
14
+ loader: j,
15
+ thumb: k,
16
+ "root--checked": "_root--checked_vzlrg_195",
17
+ rootChecked: S
18
+ }, R = ({
19
+ children: l,
20
+ aria: h,
21
+ alignLabel: i = "left",
22
+ checked: e = !1,
23
+ className: _,
24
+ dataTrackingid: n,
25
+ disabled: s = !1,
26
+ loading: o = !1,
27
+ stretched: d = !1,
28
+ onClick: a,
29
+ ...m
30
+ }) => {
31
+ const g = b(r.root, _, {
32
+ [r.rootChecked]: e === !0,
33
+ [r.rootStretched]: d === !0,
34
+ [r.rootLabelRight]: i === "right"
35
+ }), u = (c) => {
36
+ if (s || o) {
37
+ c.preventDefault();
38
+ return;
39
+ }
40
+ a && a(c);
41
+ };
42
+ return /* @__PURE__ */ t.jsxs(
43
+ "button",
44
+ {
45
+ className: g,
46
+ "data-trackingid": n,
47
+ onClick: u,
48
+ ...h,
49
+ ...m,
50
+ type: "button",
51
+ role: "switch",
52
+ "aria-checked": e,
53
+ "aria-disabled": s || o,
54
+ "aria-busy": o,
55
+ children: [
56
+ /* @__PURE__ */ t.jsx("span", { children: l }),
57
+ !o && /* @__PURE__ */ t.jsx("span", { className: r.switch, children: /* @__PURE__ */ t.jsx("span", { className: r.thumb, children: /* @__PURE__ */ t.jsx(p, { name: "check", "aria-hidden": "true" }) }) }),
58
+ o && /* @__PURE__ */ t.jsx("span", { className: r.loader, children: /* @__PURE__ */ t.jsx(f, { aria: { "aria-label": "Loading state" } }) })
59
+ ]
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ R as DSSwitch
65
+ };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { j as o } from "./chunks/jsx-runtime.C-kxDJ4g.js";
2
+ import { j as o } from "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import { c } from "./chunks/index.CvOaL64Y.js";
4
- import { D as n } from "./chunks/Icon.9gDIp6p4.js";
5
- import './assets/systemfeedback.WE3wClZ3.css';const i = "_root_18s1i_63", l = {
4
+ import { D as n } from "./chunks/Icon.n4XZrQ4N.js";
5
+ import './assets/systemfeedback.BzJATHDd.css';const i = "_root_5hd20_76", l = {
6
6
  root: i
7
7
  }, m = {
8
8
  valid: "circle-check-colored",