@stihl-design-system/components 1.0.0-RC.13 → 1.0.0-RC.14

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 (85) hide show
  1. package/{accordion.Rvtiu8Y4.js → accordion.C6_sqiW2.js} +1 -1
  2. package/{arialiveregions.Cyycgs8g.js → arialiveregions.2dxodwBP.js} +1 -1
  3. package/assets/TabPane.zywjfwo8.css +1 -0
  4. package/assets/Tabs.DUqlqP6R.css +1 -0
  5. package/assets/numberindicator.BJ9vFpnd.css +1 -0
  6. package/{button.M4nXjcUn.js → button.BfcWQZhx.js} +1 -1
  7. package/{checkbox.Cb2_ey6U.js → checkbox.Dt0OWryN.js} +1 -1
  8. package/{checkboxgroup.DBDmB-zR.js → checkboxgroup.je32bRPr.js} +2 -2
  9. package/{chip.C_1tGqvZ.js → chip.CpnDX4Ro.js} +1 -1
  10. package/{chipgroup.BvTj1ziW.js → chipgroup.Cy76KMWu.js} +17 -16
  11. package/chunks/{Accordion.CB6jB3s_.js → Accordion.Bza3TO4Y.js} +1 -1
  12. package/chunks/AriaLiveRegions.utils.Bq6Mp2bE.js +40 -0
  13. package/chunks/{CheckboxGroup.S6i5EOc4.js → CheckboxGroup.C_2ZwEQJ.js} +38 -35
  14. package/chunks/{Chip.CMlPUyOJ.js → Chip.BvlKC503.js} +30 -24
  15. package/chunks/{CustomReactSelect.CQ1uexBH.js → CustomReactSelect.CB41lklE.js} +3 -3
  16. package/chunks/{Dialog.CudsqNag.js → Dialog.ClBjJWOh.js} +2 -2
  17. package/chunks/{Drawer.ueG2Bzr9.js → Drawer.ReDW3ohH.js} +2 -2
  18. package/chunks/{Fieldset.Cjmkgxxk.js → Fieldset.Ct_JFRs9.js} +2 -2
  19. package/chunks/{Input.utils.ChV6RJsh.js → Input.utils.DYbmWlx6.js} +19 -21
  20. package/chunks/{InputPassword.CNLbBFjx.js → InputPassword.Cvk5J8w1.js} +18 -18
  21. package/chunks/{InputSearch.CHA6mkX_.js → InputSearch.BIIW-ERk.js} +4 -4
  22. package/chunks/{InputStepper.xmWGU9pU.js → InputStepper.DGzR3KY6.js} +49 -47
  23. package/chunks/{Notification.nx5vTamN.js → Notification.uAEjPywP.js} +1 -1
  24. package/chunks/RadioGroup.D10-pe9H.js +146 -0
  25. package/chunks/{Select.E6gLFYLk.js → Select.DsLnW29U.js} +3 -3
  26. package/chunks/TabPane.CYuUi0oL.js +51 -0
  27. package/chunks/Tabs.D_JAsvoh.js +270 -0
  28. package/chunks/{Textarea.DUBSOpNL.js → Textarea.Dh9R9YdZ.js} +19 -18
  29. package/chunks/{Toast.DyEi2GEP.js → Toast.j7LPnQ36.js} +1 -1
  30. package/chunks/has-window.ut_-aShB.js +5 -0
  31. package/chunks/helpers.CcqWV-wZ.js +8 -0
  32. package/chunks/{useBreakpoint.5xBNDiCf.js → useBreakpoint.B8XxjSVJ.js} +9 -9
  33. package/chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js +7 -0
  34. package/{combobox.CzBpi97e.js → combobox.D6zXg976.js} +1 -1
  35. package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +2 -2
  36. package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +1 -1
  37. package/components/Input/Input.d.ts +6 -0
  38. package/components/InputPassword/InputPassword.d.ts +3 -3
  39. package/components/NumberIndicator/NumberIndicator.d.ts +12 -0
  40. package/components/NumberIndicator/NumberIndicator.test.d.ts +1 -0
  41. package/components/NumberIndicator/NumberIndicator.utils.d.ts +2 -0
  42. package/components/Tabs/TabPane/TabPane.d.ts +10 -0
  43. package/components/Tabs/TabPane/TabPane.utils.d.ts +3 -0
  44. package/components/Tabs/TabPane/TabPane.utils.test.d.ts +1 -0
  45. package/components/Tabs/Tabs.d.ts +42 -0
  46. package/components/Tabs/Tabs.test.d.ts +1 -0
  47. package/components/Tabs/Tabs.utils.d.ts +11 -0
  48. package/components/Tabs/Tabs.utils.test.d.ts +1 -0
  49. package/{customreactselect.qf7CIeFs.js → customreactselect.BcjDvZG6.js} +2 -2
  50. package/{dialog.DYlBUsOD.js → dialog.BkVOgeWY.js} +2 -2
  51. package/{drawer.CvhbP1ra.js → drawer.DM_NKGTQ.js} +2 -2
  52. package/{fieldset.CtUGEdLv.js → fieldset.CSNoVbL1.js} +1 -1
  53. package/index.d.ts +4 -2
  54. package/index.es.js +134 -127
  55. package/{input.BEnCFNM-.js → input.BbnmbMCI.js} +49 -47
  56. package/{inputpassword.B-D_jB9w.js → inputpassword.KnZRwWCQ.js} +3 -3
  57. package/{inputsearch.CaSpklR1.js → inputsearch.DgYJPZ2v.js} +4 -4
  58. package/inputstepper.T_of1Gz0.js +15 -0
  59. package/{link.DREJAoPG.js → link.L8O_InKe.js} +1 -1
  60. package/{notification.6M0OdGXK.js → notification.Bt9TbAAt.js} +2 -2
  61. package/numberindicator.UU7FSouT.js +26 -0
  62. package/numberindicator.d.ts +2 -0
  63. package/package.json +3 -3
  64. package/{radio.DEILy_lV.js → radio.B-2uuWHq.js} +1 -1
  65. package/{radiogroup.DeU-HdlP.js → radiogroup.DM_lF4hI.js} +3 -3
  66. package/{select.BYraFJzz.js → select.COLuwr89.js} +2 -2
  67. package/{skiptocontent.BxvpIB7H.js → skiptocontent.DxogCFvU.js} +2 -2
  68. package/styles/scss/ds/lib/theme.scss +2 -0
  69. package/tabpane.BnQBzVXw.js +8 -0
  70. package/tabpane.d.ts +2 -0
  71. package/tabs.BaELlVri.js +15 -0
  72. package/tabs.d.ts +2 -0
  73. package/textarea.Wcl_pVBb.js +13 -0
  74. package/{toast.n1QUINSA.js → toast.DQlMWU6I.js} +2 -2
  75. package/{toastmanager.B7EZ4JSI.js → toastmanager.DxHFtr5C.js} +17 -17
  76. package/utils/helpers.d.ts +7 -0
  77. package/utils/index.d.ts +1 -0
  78. package/utils/isAnimationDisabled.d.ts +1 -0
  79. package/chunks/AriaLiveRegions.utils.BGSZafnS.js +0 -34
  80. package/chunks/RadioGroup.Crj7NoOs.js +0 -137
  81. package/chunks/has-document.r9i9TxKV.js +0 -5
  82. package/chunks/helpers.B1JT5ShS.js +0 -7
  83. package/inputstepper.C7KD1-0S.js +0 -13
  84. package/textarea.CBvH0ljM.js +0 -12
  85. package/utils/has-document.d.ts +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stihl-design-system/components",
3
3
  "private": false,
4
- "version": "1.0.0-RC.13",
4
+ "version": "1.0.0-RC.14",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://designsystem.stihl.de/",
7
7
  "keywords": [
@@ -139,8 +139,8 @@
139
139
  },
140
140
  "peerDependencies": {
141
141
  "classnames": "^2.5.1",
142
- "react": ">=17.0.0 <=19",
143
- "react-dom": ">=17.0.0 <=19",
142
+ "react": ">=17.0.0 <20",
143
+ "react-dom": ">=17.0.0 <20",
144
144
  "react-intersection-observer": "^9.10.2",
145
145
  "react-select": "^5.8.1"
146
146
  }
@@ -2,7 +2,7 @@
2
2
  import { j as i } from "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import { c as h } from "./chunks/index.CvOaL64Y.js";
4
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";
5
+ import { u as P } from "./chunks/useBreakpoint.B8XxjSVJ.js";
6
6
  import './assets/radio.X-RTl_jo.css';const v = (o) => o.replace(/\s+/g, ""), U = "ds-radio_root_tdhm5_1", q = "ds-radio_root--disabled_tdhm5_21", z = "ds-radio_root--with-custom-area_tdhm5_24", F = "ds-radio_radio_tdhm5_28", G = "ds-radio_dot_tdhm5_45", J = "ds-radio_radio--invalid_tdhm5_69", K = "ds-radio_label_tdhm5_74", M = "ds-radio_label--bold_tdhm5_88", Q = "ds-radio_label--hidden_tdhm5_99", T = "ds-radio_label--with-custom-area_tdhm5_111", X = "ds-radio_custom-area_tdhm5_115", Y = "ds-radio_hint_tdhm5_123", Z = "ds-radio_hint--visible_tdhm5_146", tt = "ds-radio_hint--unchecked-hidden_tdhm5_150", dt = "ds-radio_hint--hidden_tdhm5_155", et = "ds-radio_input_tdhm5_168", t = {
7
7
  root: U,
8
8
  "root--disabled": "ds-radio_root--disabled_tdhm5_21",
@@ -2,9 +2,9 @@
2
2
  import "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import "./chunks/index.CvOaL64Y.js";
4
4
  import "react";
5
- import "./chunks/Fieldset.Cjmkgxxk.js";
6
- import "./radio.DEILy_lV.js";
7
- import { D as a } from "./chunks/RadioGroup.Crj7NoOs.js";
5
+ import "./chunks/Fieldset.Ct_JFRs9.js";
6
+ import "./radio.B-2uuWHq.js";
7
+ import { D as a } from "./chunks/RadioGroup.D10-pe9H.js";
8
8
  export {
9
9
  a as DSRadioGroup
10
10
  };
@@ -2,11 +2,11 @@
2
2
  import "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import "./chunks/index.CvOaL64Y.js";
4
4
  import "react";
5
- import "./chunks/useBreakpoint.5xBNDiCf.js";
5
+ import "./chunks/useBreakpoint.B8XxjSVJ.js";
6
6
  import "./asterisk.DpzETKdT.js";
7
7
  import "./chunks/Icon.BCmt_XBG.js";
8
8
  import "./systemfeedback.C3Pfxxpp.js";
9
- import { D as s } from "./chunks/Select.E6gLFYLk.js";
9
+ import { D as s } from "./chunks/Select.DsLnW29U.js";
10
10
  export {
11
11
  s as DSSelect
12
12
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { j as k } from "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import { c as p } from "./chunks/index.CvOaL64Y.js";
4
- import { g as s } from "./chunks/helpers.B1JT5ShS.js";
4
+ import { g as s } from "./chunks/helpers.CcqWV-wZ.js";
5
5
  import "react";
6
- import { DSLink as c } from "./link.DREJAoPG.js";
6
+ import { DSLink as c } from "./link.L8O_InKe.js";
7
7
  import './assets/skiptocontent.PTL3256m.css';const h = "ds-skip-to-content_root_uqkjt_1", m = "ds-skip-to-content_root--dark_uqkjt_8", r = {
8
8
  root: h,
9
9
  "root--dark": "ds-skip-to-content_root--dark_uqkjt_8",
@@ -69,6 +69,7 @@ $theme-light-background-color-sustainability: $color-core-forest-light;
69
69
  $theme-light-background-color-tertiary: $color-core-grey-light;
70
70
  $theme-light-background-color-transparent-hover: $color-core-black-opacity-10;
71
71
  $theme-light-background-color-transparent-pressed: $color-core-black-opacity-10;
72
+ $theme-light-background-color-transparent: $color-core-black-opacity-10;
72
73
  $theme-light-border-color-feedback-error: $color-core-red-base;
73
74
  $theme-light-border-color-feedback-info: $color-core-grey-dark;
74
75
  $theme-light-border-color-feedback-success: $color-core-green-base;
@@ -127,6 +128,7 @@ $theme-dark-background-color-sustainability: $color-core-grey-deep;
127
128
  $theme-dark-background-color-tertiary: $color-core-grey-ultra-deep;
128
129
  $theme-dark-background-color-transparent-hover: $color-core-white-opacity-15;
129
130
  $theme-dark-background-color-transparent-pressed: $color-core-white-opacity-15;
131
+ $theme-dark-background-color-transparent: $color-core-white-opacity-15;
130
132
  $theme-dark-border-color-feedback-error: $color-core-red-base;
131
133
  $theme-dark-border-color-feedback-info: $color-core-grey-dark;
132
134
  $theme-dark-border-color-feedback-success: $color-core-green-base;
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import "./chunks/jsx-runtime.C115EyI4.js";
3
+ import "./chunks/index.CvOaL64Y.js";
4
+ import "react";
5
+ import { T as m } from "./chunks/TabPane.CYuUi0oL.js";
6
+ export {
7
+ m as TabPane
8
+ };
package/tabpane.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/Tabs/TabPane/TabPane'
2
+ export {}
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import "./chunks/jsx-runtime.C115EyI4.js";
3
+ import "./chunks/index.CvOaL64Y.js";
4
+ import "react";
5
+ import "./chunks/has-window.ut_-aShB.js";
6
+ import "./chunks/helpers.CcqWV-wZ.js";
7
+ import { D as f } from "./chunks/Tabs.D_JAsvoh.js";
8
+ import "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
9
+ import "./button.BfcWQZhx.js";
10
+ import "./chunks/Icon.BCmt_XBG.js";
11
+ import "./numberindicator.UU7FSouT.js";
12
+ import "./chunks/TabPane.CYuUi0oL.js";
13
+ export {
14
+ f as DSTabs
15
+ };
package/tabs.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/Tabs/Tabs'
2
+ export {}
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import "./chunks/jsx-runtime.C115EyI4.js";
3
+ import "./chunks/index.CvOaL64Y.js";
4
+ import "react";
5
+ import "./chunks/has-window.ut_-aShB.js";
6
+ import "./chunks/helpers.CcqWV-wZ.js";
7
+ import "./chunks/useBreakpoint.B8XxjSVJ.js";
8
+ import "./asterisk.DpzETKdT.js";
9
+ import "./systemfeedback.C3Pfxxpp.js";
10
+ import { D } from "./chunks/Textarea.Dh9R9YdZ.js";
11
+ export {
12
+ D as DSTextarea
13
+ };
@@ -2,9 +2,9 @@
2
2
  import "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import "./chunks/index.CvOaL64Y.js";
4
4
  import "react";
5
- import "./button.M4nXjcUn.js";
5
+ import "./button.BfcWQZhx.js";
6
6
  import "./chunks/Icon.BCmt_XBG.js";
7
- import { D as s } from "./chunks/Toast.DyEi2GEP.js";
7
+ import { D as s } from "./chunks/Toast.j7LPnQ36.js";
8
8
  export {
9
9
  s as DSToast
10
10
  };
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { j as g } from "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import { createContext as y, useContext as C, useState as S, useRef as O, useEffect as A, useMemo as j } from "react";
4
- import { g as a } from "./chunks/helpers.B1JT5ShS.js";
5
- import { b as E, g as w } from "./chunks/AriaLiveRegions.utils.BGSZafnS.js";
6
- import { D as _, s as U } from "./chunks/Toast.DyEi2GEP.js";
7
- import { h as q } from "./chunks/has-document.r9i9TxKV.js";
4
+ import { g as a } from "./chunks/helpers.CcqWV-wZ.js";
5
+ import { b as D, g as E } from "./chunks/AriaLiveRegions.utils.Bq6Mp2bE.js";
6
+ import { D as _, s as U } from "./chunks/Toast.j7LPnQ36.js";
7
+ import { h as q } from "./chunks/has-window.ut_-aShB.js";
8
8
  const Q = () => {
9
- if (!E() || !w())
9
+ if (!D() || !E())
10
10
  throw new Error(
11
11
  a(
12
12
  "DSToast",
@@ -23,7 +23,7 @@ const Q = () => {
23
23
  'The destructured "toast" element should only be used once in the DOM.'
24
24
  )
25
25
  );
26
- }, i = "data-ds-toast-timeout-id", D = "closing", B = 1e4, x = y(void 0), J = () => {
26
+ }, i = "data-ds-toast-timeout-id", w = "closing", B = 1e4, x = y(void 0), H = () => {
27
27
  const n = C(x);
28
28
  if (!n)
29
29
  throw new Error(
@@ -33,7 +33,7 @@ const Q = () => {
33
33
  )
34
34
  );
35
35
  return n;
36
- }, K = ({
36
+ }, J = ({
37
37
  children: n
38
38
  }) => {
39
39
  const [u, c] = S([]), [s, l] = S(null), o = O(null);
@@ -44,10 +44,10 @@ const Q = () => {
44
44
  }, [u]), A(() => {
45
45
  s && (L(s.message, s.variant), I());
46
46
  }, [s]);
47
- const m = () => {
47
+ const T = () => {
48
48
  var e;
49
49
  return ((e = o.current) == null ? void 0 : e.getAttribute(i)) || null;
50
- }, T = (e) => {
50
+ }, m = (e) => {
51
51
  var t;
52
52
  (t = o.current) == null || t.setAttribute(i, e);
53
53
  }, p = () => {
@@ -55,10 +55,10 @@ const Q = () => {
55
55
  return (e = o.current) == null ? void 0 : e.removeAttribute(i);
56
56
  }, L = (e, t) => {
57
57
  if (t === "warning") {
58
- const r = E();
58
+ const r = D();
59
59
  r && (r.innerText = e);
60
60
  } else if (t === "success" || t === "info") {
61
- const r = w();
61
+ const r = E();
62
62
  r && (r.innerText = e);
63
63
  }
64
64
  }, d = (e, t) => {
@@ -78,20 +78,20 @@ const Q = () => {
78
78
  f();
79
79
  }, f = () => {
80
80
  var t;
81
- const e = m();
81
+ const e = T();
82
82
  e && (clearTimeout(e), (t = o.current) == null || t.removeAttribute(i));
83
83
  }, h = () => {
84
84
  const e = setTimeout(() => {
85
85
  v();
86
86
  }, B);
87
- T(String(e));
87
+ m(String(e));
88
88
  }, R = () => {
89
- m() !== D && o.current && h();
89
+ T() !== w && o.current && h();
90
90
  }, I = () => {
91
91
  var e;
92
92
  k(), s && ((e = o.current) != null && e.showPopover) && (o.current.showPopover(), h());
93
93
  }, v = () => {
94
- f(), T(D), o.current && (o.current.addEventListener(
94
+ f(), m(w), o.current && (o.current.addEventListener(
95
95
  "animationend",
96
96
  () => {
97
97
  var e;
@@ -114,6 +114,6 @@ const Q = () => {
114
114
  ] });
115
115
  };
116
116
  export {
117
- K as DSToastProvider,
118
- J as useDSToast
117
+ J as DSToastProvider,
118
+ H as useDSToast
119
119
  };
@@ -17,6 +17,13 @@ export declare const pixelToRem: (px: number) => number;
17
17
  * @returns {string} A message with a standardized format: "[STIHL Design System] - [componentName]: message".
18
18
  */
19
19
  export declare const generateDSMessage: (componentName: string, message: string) => string;
20
+ /**
21
+ * Generates a message for a required prop that is missing from a component.
22
+ *
23
+ * @param {string} propName - The name of the prop that is required.
24
+ * @param {string} componentName - The name of the component that is missing the required prop.
25
+ */
26
+ export declare const requiredPropMessage: (propName: string, componentName: string) => string;
20
27
  /**
21
28
  * Retrieves the closest ancestor of the given element that matches a specified selector.
22
29
  *
package/utils/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './has-window';
2
2
  export * from './helpers';
3
+ export * from './isAnimationDisabled';
3
4
  export * from './remove-spaces';
4
5
  export * from './theme';
5
6
  export * from './translate';
@@ -0,0 +1 @@
1
+ export declare const isAnimationDisabled: () => boolean;
@@ -1,34 +0,0 @@
1
- "use client";
2
- import { g as i } from "./helpers.B1JT5ShS.js";
3
- import "react";
4
- import { h as s } from "./has-document.r9i9TxKV.js";
5
- const e = "ds-alert-live-region", t = "ds-status-live-region", g = () => document.getElementById(e), c = () => document.getElementById(t), m = () => {
6
- if (!s)
7
- return;
8
- const n = document.querySelectorAll(
9
- `#${e}`
10
- ), o = document.querySelectorAll(
11
- `#${t}`
12
- );
13
- if (n.length > 1)
14
- throw new Error(
15
- i(
16
- "DSAriaLiveRegions",
17
- `The DSAriaLiveRegions component with id="${e}" should only be present once on the page. Found ${n.length} instances.`
18
- )
19
- );
20
- if (o.length > 1)
21
- throw new Error(
22
- i(
23
- "DSAriaLiveRegions",
24
- `The DSAriaLiveRegions component with id="${t}" should only be present once on the page. Found ${o.length} instances.`
25
- )
26
- );
27
- };
28
- export {
29
- e as A,
30
- t as a,
31
- g as b,
32
- c as g,
33
- m as v
34
- };
@@ -1,137 +0,0 @@
1
- "use client";
2
- import { j as h } from "./jsx-runtime.C115EyI4.js";
3
- import { c as y } from "./index.CvOaL64Y.js";
4
- import { forwardRef as C, useState as N } from "react";
5
- import { D as I } from "./Fieldset.Cjmkgxxk.js";
6
- import { DSRadio as A } from "../radio.DEILy_lV.js";
7
- import { g as a } from "./helpers.B1JT5ShS.js";
8
- import '../assets/RadioGroup.BfMo157q.css';const B = "ds-radio-group_root_12fot_1", M = "ds-radio-group_root--horizontal_12fot_9", O = "ds-radio-group_root--invalid_12fot_12", f = {
9
- root: B,
10
- "root--horizontal": "ds-radio-group_root--horizontal_12fot_9",
11
- rootHorizontal: M,
12
- "root--invalid": "ds-radio-group_root--invalid_12fot_12",
13
- rootInvalid: O
14
- }, m = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSRadioGroup component.`, v = (o) => o.some(({ hint: e }) => !!e), z = (o) => o.some(({ customArea: e }) => !!e), V = ({
15
- legend: o,
16
- name: e,
17
- options: t,
18
- description: l,
19
- direction: i,
20
- id: s,
21
- systemFeedback: n
22
- }) => {
23
- if (!s && (l || n))
24
- throw new Error(
25
- a(
26
- "DSRadioGroup",
27
- 'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSRadioGroup component.'
28
- )
29
- );
30
- if (!o)
31
- throw new Error(
32
- a("DSRadioGroup", m("legend"))
33
- );
34
- if (!e)
35
- throw new Error(
36
- a("DSRadioGroup", m("name"))
37
- );
38
- if (!t)
39
- throw new Error(
40
- a("DSRadioGroup", m("options"))
41
- );
42
- if (i === "horizontal" && v(t))
43
- throw new Error(
44
- a(
45
- "DSRadioGroup",
46
- "Horizontal direction is not possible when options contain a hint. Please remove hints or change direction property to 'vertical'."
47
- )
48
- );
49
- if (i === "horizontal" && z(t))
50
- throw new Error(
51
- a(
52
- "DSRadioGroup",
53
- "Horizontal direction is not possible when options contain a custom area. Please remove custom areas or change direction property to 'vertical'."
54
- )
55
- );
56
- }, $ = C(
57
- ({
58
- legend: o,
59
- name: e,
60
- options: t,
61
- className: l,
62
- defaultValue: i,
63
- description: s,
64
- direction: n = "vertical",
65
- disabled: d = !1,
66
- hideUncheckedHints: D = !1,
67
- id: c,
68
- invalid: p = !1,
69
- required: w = !1,
70
- systemFeedback: u,
71
- value: S,
72
- onChange: _,
73
- ...G
74
- }, E) => {
75
- process.env.NODE_ENV !== "production" && V({
76
- legend: o,
77
- name: e,
78
- options: t,
79
- description: s,
80
- direction: n,
81
- id: c,
82
- systemFeedback: u
83
- });
84
- const [H, x] = N(i), g = S !== void 0, R = g ? S : H, P = y(f.root, {
85
- // In case of longer copy, use vertical direction
86
- [f.rootHorizontal]: n === "horizontal" && !v(t) && !z(t),
87
- [f.rootInvalid]: p && !!u
88
- }), j = (r) => {
89
- if (d) {
90
- r.preventDefault();
91
- return;
92
- }
93
- g || x(
94
- r.target.value
95
- ), _ && _(r);
96
- }, q = v(t) && !D;
97
- return /* @__PURE__ */ h.jsx(
98
- I,
99
- {
100
- id: c,
101
- legend: o,
102
- className: l,
103
- description: s,
104
- disabled: d,
105
- required: w,
106
- invalid: p,
107
- systemFeedback: u,
108
- ...G,
109
- role: "radiogroup",
110
- onChange: j,
111
- children: /* @__PURE__ */ h.jsx("div", { className: P, children: t.map((r) => /* @__PURE__ */ h.jsx(
112
- A,
113
- {
114
- name: e,
115
- checked: r.value === R,
116
- disabled: d,
117
- hideUncheckedHint: D,
118
- hint: r.hint,
119
- invalid: p,
120
- isBold: q,
121
- required: w,
122
- ref: r.value === R ? E : null,
123
- ...r
124
- },
125
- c + r.label + r.value + r.hint
126
- )) })
127
- }
128
- );
129
- }
130
- );
131
- $.displayName = "DSRadioGroup";
132
- export {
133
- $ as D,
134
- z as a,
135
- v as o,
136
- V as v
137
- };
@@ -1,5 +0,0 @@
1
- "use client";
2
- const e = typeof document < "u";
3
- export {
4
- e as h
5
- };
@@ -1,7 +0,0 @@
1
- "use client";
2
- const e = (s) => typeof s != "number" || isNaN(s) ? 0 : s / 16, r = (s, t) => `[STIHL Design System] - [${s}]: ${t}`, n = (s, t) => s == null ? void 0 : s.closest(t);
3
- export {
4
- n as a,
5
- r as g,
6
- e as p
7
- };
@@ -1,13 +0,0 @@
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 "./chunks/Input.utils.ChV6RJsh.js";
7
- import "./asterisk.DpzETKdT.js";
8
- import "./button.M4nXjcUn.js";
9
- import "./systemfeedback.C3Pfxxpp.js";
10
- import { D } from "./chunks/InputStepper.xmWGU9pU.js";
11
- export {
12
- D as DSInputStepper
13
- };
@@ -1,12 +0,0 @@
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 "./chunks/helpers.B1JT5ShS.js";
7
- import "./asterisk.DpzETKdT.js";
8
- import "./systemfeedback.C3Pfxxpp.js";
9
- import { D as x } from "./chunks/Textarea.DUBSOpNL.js";
10
- export {
11
- x as DSTextarea
12
- };
@@ -1 +0,0 @@
1
- export declare const hasDocument: boolean;