@stihl-design-system/components 1.0.0-RC.0 → 1.0.0-RC.1

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 (105) hide show
  1. package/README.md +10 -1
  2. package/assets/Asterisk.288a3f48.css +1 -0
  3. package/assets/Button.c09c516e.css +1 -0
  4. package/assets/ButtonRound.fd628e54.css +1 -0
  5. package/assets/Checkbox.cde01607.css +1 -0
  6. package/assets/CustomReactSelect.cdb5f164.css +1 -0
  7. package/assets/Fieldset.729910fe.css +1 -0
  8. package/assets/Heading.50f5e903.css +1 -0
  9. package/assets/Input.92913cfe.css +1 -0
  10. package/assets/InputPassword.d7b9c937.css +1 -0
  11. package/assets/InputSearch.888f630a.css +1 -0
  12. package/assets/InputStepper.969db0d2.css +1 -0
  13. package/assets/Link.75834750.css +1 -0
  14. package/assets/LinkStandalone.19bdab0d.css +1 -0
  15. package/assets/OptionCheckbox.c56568a3.css +1 -0
  16. package/assets/Radio.79d98dde.css +1 -0
  17. package/assets/Select.b9c135c2.css +1 -0
  18. package/assets/Switch.781e3de6.css +1 -0
  19. package/assets/SystemFeedback.c30264c0.css +1 -0
  20. package/assets/Text.ac70cc84.css +1 -0
  21. package/assets/Textarea.12046393.css +1 -0
  22. package/assets/Title.e9e5a7e6.css +1 -0
  23. package/asterisk.cb74ea72.js +8 -0
  24. package/button.87ad387c.js +135 -0
  25. package/buttonround.ecb24c29.js +118 -0
  26. package/checkbox.42617f46.js +112 -0
  27. package/{checkboxgroup.e9e25471.js → checkboxgroup.fa110fdf.js} +2 -2
  28. package/chunks/{CustomReactSelect.9d0a378a.js → CustomReactSelect.2e4e7ba0.js} +342 -338
  29. package/chunks/Link.module.15dedc23.js +37 -0
  30. package/{combobox.f98a4472.js → combobox.d93091e0.js} +1 -1
  31. package/{customreactselect.a53f9932.js → customreactselect.7c77375a.js} +4 -4
  32. package/fieldset.fdd84bda.js +98 -0
  33. package/heading.c02dcb70.js +44 -0
  34. package/index.es.js +19 -19
  35. package/input.064e0bbf.js +230 -0
  36. package/inputpassword.f76c2f62.js +139 -0
  37. package/inputsearch.6e913fc6.js +188 -0
  38. package/inputstepper.2047ec77.js +286 -0
  39. package/{link.cd3720d1.js → link.5eb13d6e.js} +1 -1
  40. package/linkstandalone.edfd6288.js +80 -0
  41. package/optioncheckbox.2369560b.js +43 -0
  42. package/package.json +10 -1
  43. package/radio.fd841ab0.js +79 -0
  44. package/{radiogroup.6a22fe96.js → radiogroup.e1c8ea3d.js} +2 -2
  45. package/select.88d40c51.js +188 -0
  46. package/styles/fonts/STIHLContrafaceDigitalDisplayTitling.woff +0 -0
  47. package/styles/fonts/STIHLContrafaceDigitalDisplayTitling.woff2 +0 -0
  48. package/styles/fonts/STIHLContrafaceDigitalText-Bold.woff +0 -0
  49. package/styles/fonts/STIHLContrafaceDigitalText-Bold.woff2 +0 -0
  50. package/styles/fonts/STIHLContrafaceDigitalText.woff +0 -0
  51. package/styles/fonts/STIHLContrafaceDigitalText.woff2 +0 -0
  52. package/styles/fonts/font-face.min.css +1 -1
  53. package/styles/scss/lib/_heading.scss +14 -6
  54. package/styles/scss/lib/_text.scss +12 -12
  55. package/switch.96fd1689.js +65 -0
  56. package/{systemfeedback.6bbd1505.js → systemfeedback.8515a4e0.js} +10 -10
  57. package/text.de8facb9.js +57 -0
  58. package/textarea.b8c40c8b.js +189 -0
  59. package/title.7be43d50.js +36 -0
  60. package/assets/Asterisk.582f2067.css +0 -1
  61. package/assets/Button.684e8bda.css +0 -1
  62. package/assets/ButtonRound.ca8748cf.css +0 -1
  63. package/assets/Checkbox.84cf6398.css +0 -1
  64. package/assets/CustomReactSelect.d89ccccb.css +0 -1
  65. package/assets/Fieldset.5297efb8.css +0 -1
  66. package/assets/Heading.32278621.css +0 -1
  67. package/assets/Input.2c508b2f.css +0 -1
  68. package/assets/InputPassword.a534f047.css +0 -1
  69. package/assets/InputSearch.8f986307.css +0 -1
  70. package/assets/InputStepper.52fb45ca.css +0 -1
  71. package/assets/Link.03deeca0.css +0 -1
  72. package/assets/LinkStandalone.7e23a8ac.css +0 -1
  73. package/assets/OptionCheckbox.9c20f6f1.css +0 -1
  74. package/assets/Radio.be8f06f5.css +0 -1
  75. package/assets/Select.b2423b5f.css +0 -1
  76. package/assets/Switch.f3ab20de.css +0 -1
  77. package/assets/SystemFeedback.f4421d60.css +0 -1
  78. package/assets/Text.4756effe.css +0 -1
  79. package/assets/Textarea.eecf04b3.css +0 -1
  80. package/assets/Title.60d50d3e.css +0 -1
  81. package/asterisk.91abccec.js +0 -8
  82. package/button.89b2675b.js +0 -135
  83. package/buttonround.c60c8034.js +0 -118
  84. package/checkbox.7d414047.js +0 -112
  85. package/chunks/Link.module.b8230547.js +0 -37
  86. package/fieldset.fb7b7e49.js +0 -98
  87. package/heading.cb7698f4.js +0 -44
  88. package/input.abb902e3.js +0 -228
  89. package/inputpassword.11c12c66.js +0 -139
  90. package/inputsearch.0c88e71a.js +0 -188
  91. package/inputstepper.b74dac4d.js +0 -284
  92. package/linkstandalone.26b52de0.js +0 -80
  93. package/optioncheckbox.7195f001.js +0 -43
  94. package/radio.1b205d64.js +0 -79
  95. package/select.2ff31eab.js +0 -188
  96. package/styles/fonts/STIHLContrafaceDisplayTitling.woff +0 -0
  97. package/styles/fonts/STIHLContrafaceDisplayTitling.woff2 +0 -0
  98. package/styles/fonts/STIHLContrafaceText-Bold.woff +0 -0
  99. package/styles/fonts/STIHLContrafaceText-Bold.woff2 +0 -0
  100. package/styles/fonts/STIHLContrafaceText.woff +0 -0
  101. package/styles/fonts/STIHLContrafaceText.woff2 +0 -0
  102. package/switch.2f011fcc.js +0 -65
  103. package/text.8d80704f.js +0 -57
  104. package/textarea.e156b0ce.js +0 -189
  105. package/title.d855a8e4.js +0 -36
@@ -0,0 +1,79 @@
1
+ import "./assets/Radio.79d98dde.css";
2
+ import { j as s } from "./chunks/jsx-runtime.5c071667.js";
3
+ import { c as d } from "./chunks/index.8021d3e0.js";
4
+ import { forwardRef as H, useRef as I, useState as R, useCallback as S } from "react";
5
+ import { u as g } from "./chunks/useBreakpoint.6c1b06c2.js";
6
+ const B = "_root_l6los_25", V = "_root--disabled_l6los_44", w = "_radio_l6los_48", E = "_dot_l6los_63", L = "_radio--invalid_l6los_85", O = "_label_l6los_90", P = "_label--hidden_l6los_100", U = "_input_l6los_113", o = {
7
+ root: B,
8
+ "root--disabled": "_root--disabled_l6los_44",
9
+ rootDisabled: V,
10
+ radio: w,
11
+ dot: E,
12
+ "radio--invalid": "_radio--invalid_l6los_85",
13
+ radioInvalid: L,
14
+ label: O,
15
+ "label--hidden": "_label--hidden_l6los_100",
16
+ labelHidden: P,
17
+ input: U
18
+ }, q = H(
19
+ ({
20
+ label: t,
21
+ name: c,
22
+ value: _,
23
+ defaultChecked: u = !1,
24
+ disabled: a = !1,
25
+ hideLabel: f = !1,
26
+ checked: r,
27
+ invalid: m = !1,
28
+ className: p,
29
+ onChange: i,
30
+ ...b
31
+ }, e) => {
32
+ const h = I(null), [v, x] = R(u), n = r !== void 0, C = n ? r : v, j = g(f), k = d(
33
+ o.root,
34
+ {
35
+ [o.rootDisabled]: a
36
+ },
37
+ p
38
+ ), N = d(o.label, {
39
+ // hide label only visually to keep them available for assistive technologies
40
+ [o.labelHidden]: j
41
+ }), D = d(o.radio, {
42
+ [o.radioInvalid]: m
43
+ }), y = S(
44
+ (l) => {
45
+ if (a) {
46
+ l.preventDefault();
47
+ return;
48
+ }
49
+ n || x(l.target.checked), i && i(l);
50
+ },
51
+ [a, n, i]
52
+ );
53
+ return /* @__PURE__ */ s.jsxs("label", { className: k, children: [
54
+ /* @__PURE__ */ s.jsx(
55
+ "input",
56
+ {
57
+ type: "radio",
58
+ value: _,
59
+ name: c,
60
+ className: o.input,
61
+ ref: (l) => {
62
+ typeof e == "function" ? e(l) : e !== null && (e.current = l), h.current = l;
63
+ },
64
+ onChange: y,
65
+ ...b,
66
+ disabled: a,
67
+ checked: C,
68
+ "aria-label": typeof t == "string" ? t : void 0
69
+ }
70
+ ),
71
+ /* @__PURE__ */ s.jsx("span", { className: D, children: /* @__PURE__ */ s.jsx("div", { className: o.dot }) }),
72
+ /* @__PURE__ */ s.jsx("span", { className: N, children: t })
73
+ ] });
74
+ }
75
+ );
76
+ q.displayName = "DSRadio";
77
+ export {
78
+ q as DSRadio
79
+ };
@@ -2,8 +2,8 @@
2
2
  import { j as d } from "./chunks/jsx-runtime.5c071667.js";
3
3
  import { c as q } from "./chunks/index.8021d3e0.js";
4
4
  import { forwardRef as N, useState as P } from "react";
5
- import { DSFieldset as C } from "./fieldset.fb7b7e49.js";
6
- import { DSRadio as y } from "./radio.1b205d64.js";
5
+ import { DSFieldset as C } from "./fieldset.fdd84bda.js";
6
+ import { DSRadio as y } from "./radio.fd841ab0.js";
7
7
  import { s as c } from "./chunks/RadioGroup.module.59ca486a.js";
8
8
  import { g as s } from "./chunks/helpers.ea3ca41a.js";
9
9
  const f = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSRadioGroup component.`, z = ({
@@ -0,0 +1,188 @@
1
+ import "./assets/Select.b9c135c2.css";
2
+ import { j as s } from "./chunks/jsx-runtime.5c071667.js";
3
+ import { c as _ } from "./chunks/index.8021d3e0.js";
4
+ import { useRef as R, useState as q, useEffect as W } from "react";
5
+ import { u as F } from "./chunks/useBreakpoint.6c1b06c2.js";
6
+ import { Asterisk as M } from "./asterisk.cb74ea72.js";
7
+ import { DSIcon as O } from "./icon.b4211784.js";
8
+ import { DSSystemFeedback as V } from "./systemfeedback.8515a4e0.js";
9
+ import { g as f } from "./chunks/helpers.ea3ca41a.js";
10
+ const J = "_root_1txp8_73", K = "_hint_1txp8_81", Q = "_label_1txp8_81", T = "_wrapper_1txp8_85", U = "_affix_1txp8_91", X = "_affix--small_1txp8_109", Y = "_affix--disabled_1txp8_121", Z = "_prefix_1txp8_125", z = "_suffix_1txp8_131", G = "_action-button_1txp8_136", ee = "_label--hidden_1txp8_153", te = "_feedback_1txp8_180", se = "_select-wrapper_1txp8_185", ne = "_select_1txp8_185", ae = "_select--invalid_1txp8_304", le = "_select--small_1txp8_311", ce = "_input--has-leading-icon_1txp8_357", oe = "_input--has-action-button_1txp8_360", ie = "_input--has-second-action-button_1txp8_363", re = "_select--has-leading-icon_1txp8_366", _e = "_select--has-action-button_1txp8_369", de = "_select--has-second-action-button_1txp8_372", pe = "_select--has-affix_1txp8_375", xe = "_select--is-ready_1txp8_387", fe = "_select--placeholder_1txp8_399", ue = "_chevron_1txp8_408", he = "_chevron--small_1txp8_412", be = "_chevron--disabled_1txp8_415", e = {
11
+ root: J,
12
+ hint: K,
13
+ label: Q,
14
+ wrapper: T,
15
+ affix: U,
16
+ "affix--small": "_affix--small_1txp8_109",
17
+ affixSmall: X,
18
+ "affix--disabled": "_affix--disabled_1txp8_121",
19
+ affixDisabled: Y,
20
+ prefix: Z,
21
+ suffix: z,
22
+ "action-button": "_action-button_1txp8_136",
23
+ actionButton: G,
24
+ "label--hidden": "_label--hidden_1txp8_153",
25
+ labelHidden: ee,
26
+ feedback: te,
27
+ "select-wrapper": "_select-wrapper_1txp8_185",
28
+ selectWrapper: se,
29
+ select: ne,
30
+ "select--invalid": "_select--invalid_1txp8_304",
31
+ selectInvalid: ae,
32
+ "select--small": "_select--small_1txp8_311",
33
+ selectSmall: le,
34
+ "input--has-leading-icon": "_input--has-leading-icon_1txp8_357",
35
+ inputHasLeadingIcon: ce,
36
+ "input--has-action-button": "_input--has-action-button_1txp8_360",
37
+ inputHasActionButton: oe,
38
+ "input--has-second-action-button": "_input--has-second-action-button_1txp8_363",
39
+ inputHasSecondActionButton: ie,
40
+ "select--has-leading-icon": "_select--has-leading-icon_1txp8_366",
41
+ selectHasLeadingIcon: re,
42
+ "select--has-action-button": "_select--has-action-button_1txp8_369",
43
+ selectHasActionButton: _e,
44
+ "select--has-second-action-button": "_select--has-second-action-button_1txp8_372",
45
+ selectHasSecondActionButton: de,
46
+ "select--has-affix": "_select--has-affix_1txp8_375",
47
+ selectHasAffix: pe,
48
+ "select--is-ready": "_select--is-ready_1txp8_387",
49
+ selectIsReady: xe,
50
+ "select--placeholder": "_select--placeholder_1txp8_399",
51
+ selectPlaceholder: fe,
52
+ chevron: ue,
53
+ "chevron--small": "_chevron--small_1txp8_412",
54
+ chevronSmall: he,
55
+ "chevron--disabled": "_chevron--disabled_1txp8_415",
56
+ chevronDisabled: be
57
+ }, me = ({
58
+ id: t,
59
+ label: l,
60
+ options: a
61
+ }) => {
62
+ if (!t)
63
+ throw new Error(
64
+ f(
65
+ "DSSelect",
66
+ 'A unique "id" prop is required. Please add an unique "id" prop to the DSSelect component.'
67
+ )
68
+ );
69
+ if (!l)
70
+ throw new Error(
71
+ f(
72
+ "DSSelect",
73
+ `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSSelect component. If you don't want to display a label, set hideLabel={true}.`
74
+ )
75
+ );
76
+ if (!a || a.length === 0)
77
+ throw new Error(
78
+ f(
79
+ "DSSelect",
80
+ 'Options are always required. Please add an "options" prop to the DSSelect component.'
81
+ )
82
+ );
83
+ }, ve = (t, l, a) => t === "" || l !== void 0 && l !== "" ? !1 : !(a !== void 0 && a !== ""), Be = ({
84
+ id: t,
85
+ label: l,
86
+ options: a,
87
+ className: D,
88
+ defaultValue: u,
89
+ disabled: h = !1,
90
+ hideLabel: I = !1,
91
+ hint: d,
92
+ invalid: r = !1,
93
+ placeholder: p = "Select",
94
+ required: b = !1,
95
+ size: m = "medium",
96
+ systemFeedback: x,
97
+ value: v,
98
+ ...y
99
+ }) => {
100
+ process.env.NODE_ENV !== "production" && me({
101
+ id: t,
102
+ label: l,
103
+ options: a
104
+ });
105
+ const i = R(null), [j, A] = q(
106
+ ve(p, u, v)
107
+ );
108
+ W(() => {
109
+ if (!i.current)
110
+ return;
111
+ const c = () => {
112
+ if (!i.current)
113
+ return;
114
+ const o = i.current.value;
115
+ A(o === "");
116
+ }, n = i.current;
117
+ return n.addEventListener("change", c), () => {
118
+ n.removeEventListener("change", c);
119
+ };
120
+ }, []);
121
+ const B = F(I), S = `${t}-label`, g = `${t}-feedback`, H = `${t}-hint`, N = d ? ` ${H}` : "", P = (c) => [
122
+ p && /* @__PURE__ */ s.jsx("option", { value: "", children: p }, `${t}-hidden-option-disabled-placeholder`),
123
+ ...c.map((n) => {
124
+ if ("options" in n) {
125
+ const { label: o, options: C } = n;
126
+ return /* @__PURE__ */ s.jsx("optgroup", { label: o, children: C.map(w) }, o);
127
+ } else
128
+ return w(n);
129
+ })
130
+ ], w = ({ label: c, value: n, isDisabled: o }) => /* @__PURE__ */ s.jsx("option", { value: n, disabled: o, children: c }, n), E = _(e.root, D), L = _(e.select, {
131
+ [e.selectSmall]: m === "small",
132
+ [e.selectInvalid]: r,
133
+ [e.selectPlaceholder]: j
134
+ }), k = _(e.label, {
135
+ // hide label only visually to keep them available for assistive technologies
136
+ [e.labelHidden]: B
137
+ }), $ = _(e.chevron, {
138
+ [e.chevronSmall]: m === "small",
139
+ [e.chevronDisabled]: h
140
+ });
141
+ return /* @__PURE__ */ s.jsxs("div", { className: E, children: [
142
+ /* @__PURE__ */ s.jsxs("label", { className: k, id: S, htmlFor: t, children: [
143
+ l,
144
+ b && /* @__PURE__ */ s.jsx(M, {})
145
+ ] }),
146
+ d && /* @__PURE__ */ s.jsx("div", { className: e.hint, id: H, children: d }),
147
+ r && x && /* @__PURE__ */ s.jsx(
148
+ V,
149
+ {
150
+ className: e.feedback,
151
+ message: x,
152
+ type: "invalid",
153
+ id: g,
154
+ "aria-live": "assertive"
155
+ }
156
+ ),
157
+ /* @__PURE__ */ s.jsxs("div", { className: e.selectWrapper, children: [
158
+ /* @__PURE__ */ s.jsx(
159
+ "select",
160
+ {
161
+ ...y,
162
+ id: t,
163
+ ref: i,
164
+ className: L,
165
+ "aria-labelledby": `${S}${N}`,
166
+ "aria-describedby": r && x ? g : void 0,
167
+ "aria-invalid": r,
168
+ defaultValue: u,
169
+ value: v,
170
+ disabled: h,
171
+ required: b,
172
+ children: P(a)
173
+ }
174
+ ),
175
+ /* @__PURE__ */ s.jsx(
176
+ O,
177
+ {
178
+ name: "chevron-down",
179
+ className: $,
180
+ "aria-hidden": "true"
181
+ }
182
+ )
183
+ ] })
184
+ ] });
185
+ };
186
+ export {
187
+ Be as DSSelect
188
+ };
@@ -1 +1 @@
1
- @font-face{font-family:STIHL Contraface Display Title;font-weight:400;font-style:normal;font-display:swap;src:url(./STIHLContrafaceDisplayTitling.woff2) format("woff2"),url(./STIHLContrafaceDisplayTitling.woff) format("woff")}@font-face{font-family:STIHL Contraface Text Bold;font-weight:400;font-style:normal;font-display:swap;src:url(./STIHLContrafaceText-Bold.woff2) format("woff2"),url(./STIHLContrafaceText-Bold.woff) format("woff")}@font-face{font-family:STIHL Contraface Text Regular;font-weight:400;font-style:normal;font-display:swap;src:url(./STIHLContrafaceText.woff2) format("woff2"),url(./STIHLContrafaceText.woff) format("woff")}
1
+ @font-face{font-family:STIHL Contraface Digital Display Title;font-weight:400;font-style:normal;font-display:swap;src:url(./STIHLContrafaceDigitalDisplayTitling.woff2) format("woff2"),url(./STIHLContrafaceDigitalDisplayTitling.woff) format("woff")}@font-face{font-family:STIHL Contraface Digital Text Bold;font-weight:400;font-style:normal;font-display:swap;src:url(./STIHLContrafaceDigitalText-Bold.woff2) format("woff2"),url(./STIHLContrafaceDigitalText-Bold.woff) format("woff")}@font-face{font-family:STIHL Contraface Digital Text Regular;font-weight:400;font-style:normal;font-display:swap;src:url(./STIHLContrafaceDigitalText.woff2) format("woff2"),url(./STIHLContrafaceDigitalText.woff) format("woff")}
@@ -19,27 +19,35 @@
19
19
 
20
20
  // Mixins for specific heading sizes
21
21
  @mixin ds-heading-x-large {
22
- @include base-heading('STIHL Contraface Display Title', 1.625rem, 1.2);
22
+ @include base-heading(
23
+ 'STIHL Contraface Digital Display Title',
24
+ 1.625rem,
25
+ 1.2
26
+ );
23
27
  @include responsive-heading('l', 1.875rem, 1.25);
24
28
  }
25
29
 
26
30
  @mixin ds-heading-large {
27
- @include base-heading('STIHL Contraface Display Title', 1.375rem, 1.25);
31
+ @include base-heading(
32
+ 'STIHL Contraface Digital Display Title',
33
+ 1.375rem,
34
+ 1.25
35
+ );
28
36
  @include responsive-heading('l', 1.625rem, 1.2);
29
37
  }
30
38
 
31
39
  @mixin ds-heading-medium {
32
- @include base-heading('STIHL Contraface Text Bold', 1.25rem, 1.2);
40
+ @include base-heading('STIHL Contraface Digital Text Bold', 1.25rem, 1.2);
33
41
  }
34
42
 
35
43
  @mixin ds-heading-medium-uppercase {
36
- @include base-heading('STIHL Contraface Display Title', 1.25rem, 1.2);
44
+ @include base-heading('STIHL Contraface Digital Display Title', 1.25rem, 1.2);
37
45
  }
38
46
 
39
47
  @mixin ds-heading-small {
40
- @include base-heading('STIHL Contraface Text Bold', 1rem, 1.5);
48
+ @include base-heading('STIHL Contraface Digital Text Bold', 1rem, 1.5);
41
49
  }
42
50
 
43
51
  @mixin ds-heading-small-uppercase {
44
- @include base-heading('STIHL Contraface Display Title', 1rem, 1.5);
52
+ @include base-heading('STIHL Contraface Digital Display Title', 1rem, 1.5);
45
53
  }
@@ -14,50 +14,50 @@
14
14
 
15
15
  // Mixins for specific text sizes
16
16
  @mixin ds-text-large {
17
- @include base-text('STIHL Contraface Text Regular', 1.25rem, 1.6);
17
+ @include base-text('STIHL Contraface Digital Text Regular', 1.25rem, 1.6);
18
18
  }
19
19
 
20
20
  @mixin ds-text-large-bold {
21
- @include base-text('STIHL Contraface Text Bold', 1.25rem, 1.6);
21
+ @include base-text('STIHL Contraface Digital Text Bold', 1.25rem, 1.6);
22
22
  }
23
23
 
24
24
  @mixin ds-text-medium {
25
- @include base-text('STIHL Contraface Text Regular', 1rem, 1.5);
25
+ @include base-text('STIHL Contraface Digital Text Regular', 1rem, 1.5);
26
26
  }
27
27
 
28
28
  @mixin ds-text-medium-bold {
29
- @include base-text('STIHL Contraface Text Bold', 1rem, 1.5);
29
+ @include base-text('STIHL Contraface Digital Text Bold', 1rem, 1.5);
30
30
  }
31
31
 
32
32
  @mixin ds-text-small {
33
- @include base-text('STIHL Contraface Text Regular', 0.875rem, 1.14);
33
+ @include base-text('STIHL Contraface Digital Text Regular', 0.875rem, 1.14);
34
34
  }
35
35
 
36
36
  @mixin ds-text-small-bold {
37
- @include base-text('STIHL Contraface Text Bold', 0.875rem, 1.14);
37
+ @include base-text('STIHL Contraface Digital Text Bold', 0.875rem, 1.14);
38
38
  }
39
39
 
40
40
  @mixin ds-text-x-small {
41
- @include base-text('STIHL Contraface Text Regular', 0.75rem, 1.33);
41
+ @include base-text('STIHL Contraface Digital Text Regular', 0.75rem, 1.33);
42
42
  }
43
43
 
44
44
  @mixin ds-text-x-small-bold {
45
- @include base-text('STIHL Contraface Text Bold', 0.75rem, 1.33);
45
+ @include base-text('STIHL Contraface Digital Text Bold', 0.75rem, 1.33);
46
46
  }
47
47
 
48
48
  @mixin ds-text-xx-small {
49
- @include base-text('STIHL Contraface Text Regular', 0.625rem, 1.6);
49
+ @include base-text('STIHL Contraface Digital Text Regular', 0.625rem, 1.6);
50
50
  }
51
51
 
52
52
  // Utility text styles
53
53
  @mixin ds-utility-medium {
54
- @include base-text('STIHL Contraface Text Regular', 1rem, 1.25);
54
+ @include base-text('STIHL Contraface Digital Text Regular', 1rem, 1.25);
55
55
  }
56
56
 
57
57
  @mixin ds-utility-medium-bold {
58
- @include base-text('STIHL Contraface Text Bold', 1rem, 1.25);
58
+ @include base-text('STIHL Contraface Digital Text Bold', 1rem, 1.25);
59
59
  }
60
60
 
61
61
  @mixin ds-utility-small {
62
- @include base-text('STIHL Contraface Text Regular', 0.875rem, 1.14);
62
+ @include base-text('STIHL Contraface Digital Text Regular', 0.875rem, 1.14);
63
63
  }
@@ -0,0 +1,65 @@
1
+ import "./assets/Switch.781e3de6.css";
2
+ import { j as t } from "./chunks/jsx-runtime.5c071667.js";
3
+ import { c as u } from "./chunks/index.8021d3e0.js";
4
+ import "react";
5
+ import { DSIcon as b } from "./icon.b4211784.js";
6
+ import { DSSpinner as f } from "./spinner.ee015469.js";
7
+ const x = "_root_19ej2_25", k = "_root--label-right_19ej2_53", S = "_root--stretched_19ej2_56", g = "_loader_19ej2_66", w = "_thumb_19ej2_119", C = "_root--checked_19ej2_134", e = {
8
+ root: x,
9
+ "root--label-right": "_root--label-right_19ej2_53",
10
+ rootLabelRight: k,
11
+ "root--stretched": "_root--stretched_19ej2_56",
12
+ rootStretched: S,
13
+ switch: "_switch_19ej2_61",
14
+ loader: g,
15
+ thumb: w,
16
+ "root--checked": "_root--checked_19ej2_134",
17
+ rootChecked: C
18
+ }, I = ({
19
+ children: h,
20
+ aria: i,
21
+ alignLabel: l = "left",
22
+ checked: r = !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 j = u(e.root, _, {
32
+ [e.rootChecked]: r === !0,
33
+ [e.rootStretched]: d === !0,
34
+ [e.rootLabelRight]: l === "right"
35
+ }), p = (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: j,
46
+ "data-trackingid": n,
47
+ onClick: p,
48
+ ...i,
49
+ ...m,
50
+ type: "button",
51
+ role: "switch",
52
+ "aria-checked": r,
53
+ "aria-disabled": s || o,
54
+ "aria-busy": o,
55
+ children: [
56
+ /* @__PURE__ */ t.jsx("span", { children: h }),
57
+ !o && /* @__PURE__ */ t.jsx("span", { className: e.switch, children: /* @__PURE__ */ t.jsx("span", { className: e.thumb, children: /* @__PURE__ */ t.jsx(b, { name: "check", "aria-hidden": "true" }) }) }),
58
+ o && /* @__PURE__ */ t.jsx("span", { className: e.loader, children: /* @__PURE__ */ t.jsx(f, { aria: { "aria-label": "Loading state" } }) })
59
+ ]
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ I as DSSwitch
65
+ };
@@ -1,25 +1,25 @@
1
- import "./assets/SystemFeedback.f4421d60.css";
1
+ import "./assets/SystemFeedback.c30264c0.css";
2
2
  import { j as o } from "./chunks/jsx-runtime.5c071667.js";
3
3
  import { c } from "./chunks/index.8021d3e0.js";
4
4
  import { DSIcon as n } from "./icon.b4211784.js";
5
- const i = "_root_1f2l9_25", l = {
5
+ const i = "_root_1adys_25", m = {
6
6
  root: i
7
- }, m = {
7
+ }, l = {
8
8
  valid: "circle-check-colored",
9
9
  invalid: "diamond-exclamationmark-colored",
10
10
  warning: "triangle-exclamationmark-colored"
11
- }, f = ({
11
+ }, j = ({
12
12
  className: r,
13
13
  message: e,
14
- type: t,
15
- ...s
14
+ type: s,
15
+ ...t
16
16
  }) => {
17
- const a = c(l.root, r);
18
- return /* @__PURE__ */ o.jsxs("div", { className: a, ...s, role: "alert", children: [
19
- /* @__PURE__ */ o.jsx(n, { name: m[t], "aria-hidden": "true" }),
17
+ const a = c(m.root, r);
18
+ return /* @__PURE__ */ o.jsxs("div", { className: a, ...t, role: "alert", children: [
19
+ /* @__PURE__ */ o.jsx(n, { name: l[s], "aria-hidden": "true" }),
20
20
  e
21
21
  ] });
22
22
  };
23
23
  export {
24
- f as DSSystemFeedback
24
+ j as DSSystemFeedback
25
25
  };
@@ -0,0 +1,57 @@
1
+ import "./assets/Text.ac70cc84.css";
2
+ import { j } from "./chunks/jsx-runtime.5c071667.js";
3
+ import { c as x } from "./chunks/index.8021d3e0.js";
4
+ const c = "_root_1d3j7_25", n = "_root--large_1d3j7_31", u = "_root--large-bold_1d3j7_41", b = "_root--medium_1d3j7_51", S = "_root--medium-bold_1d3j7_61", g = "_root--small_1d3j7_71", B = "_root--small-bold_1d3j7_81", i = "_root--x-small_1d3j7_91", X = "_root--x-small-bold_1d3j7_101", k = "_root--xx-small_1d3j7_111", p = "_root--theme-dark_1d3j7_121", o = {
5
+ root: c,
6
+ "root--large": "_root--large_1d3j7_31",
7
+ rootLarge: n,
8
+ "root--large-bold": "_root--large-bold_1d3j7_41",
9
+ rootLargeBold: u,
10
+ "root--medium": "_root--medium_1d3j7_51",
11
+ rootMedium: b,
12
+ "root--medium-bold": "_root--medium-bold_1d3j7_61",
13
+ rootMediumBold: S,
14
+ "root--small": "_root--small_1d3j7_71",
15
+ rootSmall: g,
16
+ "root--small-bold": "_root--small-bold_1d3j7_81",
17
+ rootSmallBold: B,
18
+ "root--x-small": "_root--x-small_1d3j7_91",
19
+ rootXSmall: i,
20
+ "root--x-small-bold": "_root--x-small-bold_1d3j7_101",
21
+ rootXSmallBold: X,
22
+ "root--xx-small": "_root--xx-small_1d3j7_111",
23
+ rootXxSmall: k,
24
+ "root--theme-dark": "_root--theme-dark_1d3j7_121",
25
+ rootThemeDark: p
26
+ }, h = ({
27
+ children: t,
28
+ className: m,
29
+ size: l = "medium",
30
+ tag: d = "p",
31
+ theme: a = "light",
32
+ weight: r = "normal",
33
+ ..._
34
+ }) => {
35
+ const s = d, e = x(o.root, m, {
36
+ // large
37
+ [o.rootLarge]: l === "large",
38
+ [o.rootLargeBold]: l === "large" && r === "bold",
39
+ // medium
40
+ [o.rootMedium]: l == "medium",
41
+ [o.rootMediumBold]: l === "medium" && r === "bold",
42
+ // small
43
+ [o.rootSmall]: l == "small",
44
+ [o.rootSmallBold]: l == "small" && r === "bold",
45
+ // x-small
46
+ [o.rootXSmall]: l == "x-small",
47
+ [o.rootXSmallBold]: l == "x-small" && r === "bold",
48
+ // xx-small
49
+ [o.rootXxSmall]: l == "xx-small",
50
+ // dark theme
51
+ [o.rootThemeDark]: a === "dark"
52
+ });
53
+ return /* @__PURE__ */ j.jsx(s, { className: e, ..._, children: t });
54
+ };
55
+ export {
56
+ h as DSText
57
+ };