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

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 (83) hide show
  1. package/Notification-additional-information.jpeg +0 -0
  2. package/Notification-confirm-error.jpg +0 -0
  3. package/Notification-confirm-warn.jpeg +0 -0
  4. package/Notification-overview.jpeg +0 -0
  5. package/Notification-success.jpeg +0 -0
  6. package/{arialiveregions.BvZhV6hb.js → arialiveregions.BK4T7Vhk.js} +1 -1
  7. package/assets/Dialog.DdLMmOLt.css +1 -0
  8. package/assets/Drawer.BqBgbSuP.css +1 -0
  9. package/assets/Toast.ChT0hchk.css +1 -0
  10. package/assets/button.3UhhGy87.css +1 -0
  11. package/assets/buttonround.DXDlPKwD.css +1 -0
  12. package/assets/link.BJHmVrew.css +1 -0
  13. package/assets/logo.pETQEsvZ.css +1 -0
  14. package/button.DPrDynn_.js +135 -0
  15. package/buttonround.ix_-O4l1.js +118 -0
  16. package/{checkbox.DNHdo6_n.js → checkbox.hoVQ37RP.js} +31 -32
  17. package/{checkboxgroup.DqWlzAeR.js → checkboxgroup.C9VX3c5W.js} +1 -1
  18. package/chunks/AriaLiveRegions.utils.D2ni4Yrf.js +34 -0
  19. package/chunks/{CheckboxGroup.DsQ6lI5a.js → CheckboxGroup.kG1WWhe_.js} +1 -1
  20. package/chunks/{CustomReactSelect.5dHi6PEO.js → CustomReactSelect.BVv0Zcvc.js} +4 -6
  21. package/chunks/Dialog.o7bcfCBf.js +148 -0
  22. package/chunks/Drawer.VbG4cfgJ.js +154 -0
  23. package/chunks/{Input.utils.AKWCNkpA.js → Input.utils.BGUhXCNP.js} +14 -13
  24. package/chunks/{InputPassword.a7zHKrmM.js → InputPassword.TlusvIds.js} +1 -1
  25. package/chunks/{InputSearch.DITRiB92.js → InputSearch.BbCdCCax.js} +1 -1
  26. package/chunks/{InputStepper.BkncCNwJ.js → InputStepper.DR3NR_II.js} +2 -2
  27. package/chunks/{Notification.DVVuSOqG.js → Notification.B6a6FOlS.js} +4 -4
  28. package/chunks/Toast.BpyBIPFW.js +89 -0
  29. package/chunks/has-document.r9i9TxKV.js +5 -0
  30. package/{combobox.CRlhqmuO.js → combobox.Dgp3kvFR.js} +1 -1
  31. package/components/Button/Button.d.ts +1 -1
  32. package/components/Checkbox/Checkbox.d.ts +1 -1
  33. package/components/CustomReactSelect/CustomReactSelect.d.ts +2 -2
  34. package/components/Dialog/Dialog.d.ts +22 -3
  35. package/components/Dialog/Dialog.test.d.ts +1 -0
  36. package/components/Dialog/Dialog.utils.d.ts +12 -0
  37. package/components/Dialog/Dialog.utils.test.d.ts +1 -0
  38. package/components/Drawer/Drawer.d.ts +31 -0
  39. package/components/Drawer/Drawer.test.d.ts +1 -0
  40. package/components/Drawer/Drawer.utils.d.ts +14 -0
  41. package/components/Drawer/Drawer.utils.test.d.ts +1 -0
  42. package/components/Input/Input.d.ts +1 -1
  43. package/components/InputSearch/InputSearch.d.ts +1 -1
  44. package/components/LinkStandalone/LinkStandalone.d.ts +1 -1
  45. package/components/Notification/Notification.d.ts +3 -1
  46. package/components/Radio/Radio.d.ts +1 -1
  47. package/components/RadioGroup/RadioGroup.d.ts +1 -1
  48. package/components/SkipToContent/SkipToContent.d.ts +1 -1
  49. package/components/Switch/Switch.d.ts +1 -1
  50. package/components/Toast/Toast.d.ts +3 -0
  51. package/components/Toast/ToastManager.d.ts +7 -3
  52. package/{customreactselect.CD58gwtp.js → customreactselect.BxkJi_UE.js} +1 -1
  53. package/dialog.CVFl9IVY.js +9 -0
  54. package/drawer.BheN3lap.js +9 -0
  55. package/drawer.d.ts +1 -0
  56. package/index.d.ts +5 -0
  57. package/index.es.js +96 -86
  58. package/{input.ChVISFEX.js → input.CfO9lL_o.js} +2 -2
  59. package/{inputpassword.Ba9SUUIK.js → inputpassword.CvnUeLTq.js} +2 -2
  60. package/{inputsearch.BK-0OTwA.js → inputsearch.ClX9PlYG.js} +2 -2
  61. package/{inputstepper.CTpTeXL9.js → inputstepper.Dd76qaQT.js} +3 -3
  62. package/link.CIY7SOpm.js +115 -0
  63. package/{logo.BR_CUXFl.js → logo.CqukakYv.js} +32 -36
  64. package/{notification.Csn5QCR2.js → notification.BGRev3jC.js} +2 -2
  65. package/package.json +3 -3
  66. package/{skiptocontent._YZRKxnc.js → skiptocontent.ALhHiH8t.js} +15 -13
  67. package/{toast.r_yhGYEe.js → toast.CtgjrtBC.js} +2 -2
  68. package/toastmanager.6mUZ8eCN.js +119 -0
  69. package/utils/render-in-iframe.d.ts +15 -0
  70. package/utils/vitest.setup.d.ts +2 -0
  71. package/assets/Toast.BzVaebc0.css +0 -1
  72. package/assets/button.BdxtFZKx.css +0 -1
  73. package/assets/buttonround.pR4StXA7.css +0 -1
  74. package/assets/dialog.CKwM2EBH.css +0 -1
  75. package/assets/link.D61tKkSK.css +0 -1
  76. package/assets/logo.C05WqGId.css +0 -1
  77. package/button.L1lgCuM9.js +0 -135
  78. package/buttonround.ddSqXjYf.js +0 -118
  79. package/chunks/AriaLiveRegions.utils.DzWI5KCU.js +0 -31
  80. package/chunks/Toast.RON4bFPY.js +0 -89
  81. package/dialog.0qPUVJha.js +0 -45
  82. package/link.SAcKvzJ3.js +0 -115
  83. package/toastmanager.D-uIi-TS.js +0 -96
@@ -0,0 +1,148 @@
1
+ "use client";
2
+ import { j as n } from "./jsx-runtime.C115EyI4.js";
3
+ import { c as s } from "./index.CvOaL64Y.js";
4
+ import { useRef as v, useState as x, useEffect as b } from "react";
5
+ import { DSButton as j } from "../button.DPrDynn_.js";
6
+ import { g as B } from "./helpers.B1JT5ShS.js";
7
+ import '../assets/Dialog.DdLMmOLt.css';const E = "_dialog_qvh8h_80", C = "_content-wrapper_qvh8h_151", F = "_content-wrapper--no-footer_qvh8h_157", W = "_close-button_qvh8h_165", k = "_header_qvh8h_178", R = "_content_qvh8h_151", y = "_footer_qvh8h_180", z = "_header--scrollable_qvh8h_201", L = "_header--close-button_qvh8h_210", M = "_content--no-footer_qvh8h_223", H = "_footer--scrollable_qvh8h_230", o = {
8
+ dialog: E,
9
+ "content-wrapper": "_content-wrapper_qvh8h_151",
10
+ contentWrapper: C,
11
+ "content-wrapper--no-footer": "_content-wrapper--no-footer_qvh8h_157",
12
+ contentWrapperNoFooter: F,
13
+ "close-button": "_close-button_qvh8h_165",
14
+ closeButton: W,
15
+ header: k,
16
+ content: R,
17
+ footer: y,
18
+ "header--scrollable": "_header--scrollable_qvh8h_201",
19
+ headerScrollable: z,
20
+ "header--close-button": "_header--close-button_qvh8h_210",
21
+ headerCloseButton: L,
22
+ "content--no-footer": "_content--no-footer_qvh8h_223",
23
+ contentNoFooter: M,
24
+ "footer--scrollable": "_footer--scrollable_qvh8h_230",
25
+ footerScrollable: H
26
+ }, I = ({ tabIndex: r }) => {
27
+ if (r || r === 0)
28
+ throw new Error(
29
+ B(
30
+ "DSDialog",
31
+ "Do not pass the tabindex property to the DSDialog component as it is not interactive and does not receive focus. The DSDialogs contents, including the close button contained in the DSDialog, can receive focus and be interactive."
32
+ )
33
+ );
34
+ }, G = ({
35
+ children: r,
36
+ className: m,
37
+ closeButtonLabel: g = "Close dialog",
38
+ disableBackdropClose: q = !1,
39
+ footer: c,
40
+ header: D,
41
+ hideCloseButton: a = !1,
42
+ isOpen: h,
43
+ onClose: l,
44
+ ...i
45
+ }) => {
46
+ if (process.env.NODE_ENV !== "production") {
47
+ const { tabIndex: e } = i;
48
+ I({
49
+ tabIndex: e
50
+ });
51
+ }
52
+ const t = v(null), _ = v(null), [d, S] = x(!1);
53
+ b(() => {
54
+ const e = _.current;
55
+ if (e) {
56
+ const f = () => {
57
+ S(
58
+ e.scrollHeight > e.clientHeight
59
+ );
60
+ };
61
+ f();
62
+ const p = new ResizeObserver(f);
63
+ return p.observe(e), () => {
64
+ p.disconnect();
65
+ };
66
+ }
67
+ }, []), b(() => {
68
+ const e = t.current;
69
+ if (e)
70
+ return e.addEventListener("close", u), h ? e.showModal() : e.close(), () => {
71
+ e.removeEventListener("close", u);
72
+ };
73
+ }, [h, l]);
74
+ const u = () => {
75
+ l && l();
76
+ }, N = (e) => {
77
+ q || t.current && e.target === t.current && t.current.close();
78
+ }, w = () => {
79
+ t.current && t.current.close();
80
+ };
81
+ return /* @__PURE__ */ n.jsx(
82
+ "dialog",
83
+ {
84
+ ...i,
85
+ ref: t,
86
+ className: o.dialog,
87
+ onMouseDown: (e) => N(e),
88
+ "aria-modal": "true",
89
+ children: /* @__PURE__ */ n.jsxs(
90
+ "div",
91
+ {
92
+ className: s(o.contentWrapper, m, {
93
+ [o.contentWrapperNoFooter]: !c
94
+ }),
95
+ children: [
96
+ !a && /* @__PURE__ */ n.jsx(
97
+ j,
98
+ {
99
+ className: o.closeButton,
100
+ hideLabel: !0,
101
+ iconName: "cross",
102
+ size: "small",
103
+ type: "button",
104
+ variant: "ghost",
105
+ onClick: () => w(),
106
+ children: g
107
+ }
108
+ ),
109
+ /* @__PURE__ */ n.jsx(
110
+ "header",
111
+ {
112
+ className: s(o.header, {
113
+ [o.headerCloseButton]: !a,
114
+ [o.headerScrollable]: d
115
+ }),
116
+ children: D
117
+ }
118
+ ),
119
+ /* @__PURE__ */ n.jsx(
120
+ "div",
121
+ {
122
+ ref: _,
123
+ className: s(o.content, {
124
+ [o.contentNoFooter]: !c
125
+ }),
126
+ tabIndex: 0,
127
+ children: r
128
+ }
129
+ ),
130
+ c && /* @__PURE__ */ n.jsx(
131
+ "footer",
132
+ {
133
+ className: s(o.footer, {
134
+ [o.footerScrollable]: d
135
+ }),
136
+ children: c
137
+ }
138
+ )
139
+ ]
140
+ }
141
+ )
142
+ }
143
+ );
144
+ };
145
+ export {
146
+ G as D,
147
+ I as v
148
+ };
@@ -0,0 +1,154 @@
1
+ "use client";
2
+ import { j as r } from "./jsx-runtime.C115EyI4.js";
3
+ import { c as n } from "./index.CvOaL64Y.js";
4
+ import { useRef as b, useState as j, useEffect as w } from "react";
5
+ import { DSButton as B } from "../button.DPrDynn_.js";
6
+ import { g as R } from "./helpers.B1JT5ShS.js";
7
+ import '../assets/Drawer.BqBgbSuP.css';const W = "_drawer_h62s5_85", C = "_drawer--end_h62s5_143", F = "_content-wrapper_h62s5_161", k = "_content-wrapper--no-footer_h62s5_167", I = "_close-button_h62s5_170", O = "_header_h62s5_183", y = "_content_h62s5_161", z = "_footer_h62s5_185", L = "_header--scrollable_h62s5_206", M = "_header--close-button_h62s5_215", H = "_content--no-footer_h62s5_229", P = "_footer--scrollable_h62s5_236", o = {
8
+ drawer: W,
9
+ "drawer--end": "_drawer--end_h62s5_143",
10
+ drawerEnd: C,
11
+ "content-wrapper": "_content-wrapper_h62s5_161",
12
+ contentWrapper: F,
13
+ "content-wrapper--no-footer": "_content-wrapper--no-footer_h62s5_167",
14
+ contentWrapperNoFooter: k,
15
+ "close-button": "_close-button_h62s5_170",
16
+ closeButton: I,
17
+ header: O,
18
+ content: y,
19
+ footer: z,
20
+ "header--scrollable": "_header--scrollable_h62s5_206",
21
+ headerScrollable: L,
22
+ "header--close-button": "_header--close-button_h62s5_215",
23
+ headerCloseButton: M,
24
+ "content--no-footer": "_content--no-footer_h62s5_229",
25
+ contentNoFooter: H,
26
+ "footer--scrollable": "_footer--scrollable_h62s5_236",
27
+ footerScrollable: P
28
+ }, K = ["start", "end"], T = ({ tabIndex: s }) => {
29
+ if (s || s === 0)
30
+ throw new Error(
31
+ R(
32
+ "DSDrawer",
33
+ "Do not pass the tabindex property to the DSDrawer component as it is not interactive and does not receive focus. The DSDrawers contents, including the close button contained in the DSDrawer, can receive focus and be interactive."
34
+ )
35
+ );
36
+ }, Q = ({
37
+ children: s,
38
+ className: m,
39
+ closeButtonLabel: D = "Close modal",
40
+ disableBackdropClose: S = !1,
41
+ footer: c,
42
+ header: N,
43
+ hideCloseButton: l = !1,
44
+ position: v = "start",
45
+ isOpen: d,
46
+ onClose: a,
47
+ ..._
48
+ }) => {
49
+ if (process.env.NODE_ENV !== "production") {
50
+ const { tabIndex: e } = _;
51
+ T({
52
+ tabIndex: e
53
+ });
54
+ }
55
+ const t = b(null), h = b(null), [i, E] = j(!1);
56
+ w(() => {
57
+ const e = h.current;
58
+ if (e) {
59
+ const f = () => {
60
+ E(
61
+ e.scrollHeight > e.clientHeight
62
+ );
63
+ };
64
+ f();
65
+ const p = new ResizeObserver(f);
66
+ return p.observe(e), () => {
67
+ p.disconnect();
68
+ };
69
+ }
70
+ }, []), w(() => {
71
+ const e = t.current;
72
+ if (e)
73
+ return e.addEventListener("close", u), d ? e.showModal() : e.close(), () => {
74
+ e.removeEventListener("close", u);
75
+ };
76
+ }, [d, a]);
77
+ const u = () => {
78
+ a && a();
79
+ }, x = (e) => {
80
+ S || t.current && e.target === t.current && t.current.close();
81
+ }, g = () => {
82
+ t.current && t.current.close();
83
+ };
84
+ return /* @__PURE__ */ r.jsx(
85
+ "dialog",
86
+ {
87
+ ..._,
88
+ ref: t,
89
+ className: n(o.drawer, {
90
+ [o.drawerEnd]: v === "end"
91
+ }),
92
+ onMouseDown: (e) => x(e),
93
+ "aria-modal": "true",
94
+ children: /* @__PURE__ */ r.jsxs(
95
+ "div",
96
+ {
97
+ className: n(o.contentWrapper, m, {
98
+ [o.contentWrapperNoFooter]: !c
99
+ }),
100
+ children: [
101
+ !l && /* @__PURE__ */ r.jsx(
102
+ B,
103
+ {
104
+ className: o.closeButton,
105
+ hideLabel: !0,
106
+ iconName: "cross",
107
+ size: "small",
108
+ type: "button",
109
+ variant: "ghost",
110
+ onClick: () => g(),
111
+ children: D
112
+ }
113
+ ),
114
+ /* @__PURE__ */ r.jsx(
115
+ "header",
116
+ {
117
+ className: n(o.header, {
118
+ [o.headerCloseButton]: !l,
119
+ [o.headerScrollable]: i
120
+ }),
121
+ children: N
122
+ }
123
+ ),
124
+ /* @__PURE__ */ r.jsx(
125
+ "div",
126
+ {
127
+ ref: h,
128
+ className: n(o.content, {
129
+ [o.contentNoFooter]: !c
130
+ }),
131
+ tabIndex: 0,
132
+ children: s
133
+ }
134
+ ),
135
+ c && /* @__PURE__ */ r.jsx(
136
+ "footer",
137
+ {
138
+ className: n(o.footer, {
139
+ [o.footerScrollable]: i
140
+ }),
141
+ children: c
142
+ }
143
+ )
144
+ ]
145
+ }
146
+ )
147
+ }
148
+ );
149
+ };
150
+ export {
151
+ Q as D,
152
+ K as a,
153
+ T as v
154
+ };
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { g as t } from "./helpers.B1JT5ShS.js";
3
3
  import "react";
4
- const p = typeof document < "u", a = 8, i = 5, I = ["medium", "small"], u = [
4
+ import { h as p } from "./has-document.r9i9TxKV.js";
5
+ const a = 8, i = 5, T = ["medium", "small"], u = [
5
6
  "color",
6
7
  "date",
7
8
  "datetime-local",
@@ -26,15 +27,15 @@ const p = typeof document < "u", a = 8, i = 5, I = ["medium", "small"], u = [
26
27
  "submit",
27
28
  "image",
28
29
  "datetime"
29
- ], T = ({
30
+ ], b = ({
30
31
  id: e,
31
32
  label: n,
32
33
  prefix: o,
33
34
  suffix: s,
34
35
  leadingIconName: r,
35
36
  leadingIconSource: d,
36
- actionButtonIconName: c,
37
- actionButtonIconSource: m
37
+ actionButtonIconName: m,
38
+ actionButtonIconSource: c
38
39
  }) => {
39
40
  if (!e)
40
41
  throw new Error(
@@ -65,13 +66,13 @@ const p = typeof document < "u", a = 8, i = 5, I = ["medium", "small"], u = [
65
66
  "DSInput",
66
67
  "Prefix and a leading Icon cannot be used at the same time."
67
68
  )
68
- ), s && (c || m) && console.warn(
69
+ ), s && (m || c) && console.warn(
69
70
  t(
70
71
  "DSInput",
71
72
  "Suffix and an action button cannot be used at the same time."
72
73
  )
73
74
  );
74
- }, b = (e) => {
75
+ }, D = (e) => {
75
76
  if (!u.includes(e) && !l.includes(e))
76
77
  throw new Error(
77
78
  t(
@@ -94,17 +95,17 @@ const p = typeof document < "u", a = 8, i = 5, I = ["medium", "small"], u = [
94
95
  hidden: 'Type hidden is not supported by DSInput component. Use a default <input type="hidden" /> element instead.'
95
96
  };
96
97
  n[e] && console.warn(t("DSInput", n[e]));
97
- }, h = () => p && "showPicker" in HTMLInputElement.prototype && !!window.navigator.userAgent.match(/chrome|chromium|crios|edg/i), D = (e, n) => h() && (e || n), y = (e) => e === "date" || e === "datetime-local" || e === "month", U = (e) => e === "time";
98
+ }, h = () => p && "showPicker" in HTMLInputElement.prototype && !!window.navigator.userAgent.match(/chrome|chromium|crios|edg/i), y = (e, n) => h() && (e || n), U = (e) => e === "date" || e === "datetime-local" || e === "month", P = (e) => e === "time";
98
99
  export {
99
- I,
100
+ T as I,
100
101
  a as M,
101
102
  u as S,
102
103
  l as U,
103
104
  i as a,
104
- b,
105
- U as c,
105
+ D as b,
106
+ P as c,
106
107
  h,
107
- y as i,
108
- D as s,
109
- T as v
108
+ U as i,
109
+ y as s,
110
+ b as v
110
111
  };
@@ -4,7 +4,7 @@ import { c as i } from "./index.CvOaL64Y.js";
4
4
  import { useState as D } from "react";
5
5
  import { u as C } from "./useBreakpoint.5xBNDiCf.js";
6
6
  import { Asterisk as L } from "../asterisk.Cjbk-xZi.js";
7
- import { DSButton as $ } from "../button.L1lgCuM9.js";
7
+ import { DSButton as $ } from "../button.DPrDynn_.js";
8
8
  import { DSSystemFeedback as E } from "../systemfeedback.CUWch42u.js";
9
9
  import { g as b } from "./helpers.B1JT5ShS.js";
10
10
  import '../assets/InputPassword.VCNO8ANM.css';const q = "_input_1s7sy_226", R = "_input--invalid_1s7sy_336", V = "_input--small_1s7sy_343", O = "_input--has-leading-icon_1s7sy_395", F = "_input--has-action-button_1s7sy_398", M = "_input--has-second-action-button_1s7sy_401", T = "_input--has-affix_1s7sy_413", G = "_input--is-ready_1s7sy_427", J = "_root_1s7sy_434", K = "_hint_1s7sy_442", Q = "_label_1s7sy_442", U = "_wrapper_1s7sy_446", W = "_action-button_1s7sy_452", X = "_label--hidden_1s7sy_469", Y = "_feedback_1s7sy_496", s = {
@@ -5,7 +5,7 @@ import { useState as G, useRef as N, useEffect as w } from "react";
5
5
  import { g as S, a as J } from "./helpers.B1JT5ShS.js";
6
6
  import { u as K } from "./useBreakpoint.5xBNDiCf.js";
7
7
  import { Asterisk as Q } from "../asterisk.Cjbk-xZi.js";
8
- import { DSButton as D } from "../button.L1lgCuM9.js";
8
+ import { DSButton as D } from "../button.DPrDynn_.js";
9
9
  import { DSSystemFeedback as U } from "../systemfeedback.CUWch42u.js";
10
10
  import '../assets/InputSearch.BMRAb95l.css';const X = "_input_12zpu_226", Y = "_input--invalid_12zpu_336", Z = "_input--small_12zpu_343", tt = "_input--has-leading-icon_12zpu_395", nt = "_input--has-action-button_12zpu_398", et = "_input--has-second-action-button_12zpu_401", at = "_input--has-affix_12zpu_413", st = "_input--is-ready_12zpu_427", ot = "_root_12zpu_434", it = "_hint_12zpu_442", ut = "_label_12zpu_442", ct = "_wrapper_12zpu_446", lt = "_action-button_12zpu_452", pt = "_second-action-button_12zpu_456", rt = "_label--hidden_12zpu_473", _t = "_feedback_12zpu_500", t = {
11
11
  input: X,
@@ -4,8 +4,8 @@ import { c } from "./index.CvOaL64Y.js";
4
4
  import { useState as _, useRef as N, useEffect as w, useLayoutEffect as M } from "react";
5
5
  import { u as _t } from "./useBreakpoint.5xBNDiCf.js";
6
6
  import { Asterisk as ft } from "../asterisk.Cjbk-xZi.js";
7
- import { DSButton as X } from "../button.L1lgCuM9.js";
8
- import { M as E, a as H } from "./Input.utils.AKWCNkpA.js";
7
+ import { DSButton as X } from "../button.DPrDynn_.js";
8
+ import { M as E, a as H } from "./Input.utils.BGUhXCNP.js";
9
9
  import { DSSystemFeedback as ht } from "../systemfeedback.CUWch42u.js";
10
10
  import { g as y } from "./helpers.B1JT5ShS.js";
11
11
  import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt = "_input--invalid_xdphx_336", St = "_input--small_xdphx_343", yt = "_input--has-leading-icon_xdphx_395", vt = "_input--has-action-button_xdphx_398", It = "_input--has-second-action-button_xdphx_401", gt = "_input--has-affix_xdphx_413", At = "_input--is-ready_xdphx_427", Bt = "_root_xdphx_437", Dt = "_hint_xdphx_445", Nt = "_label_xdphx_445", wt = "_wrapper_xdphx_449", Et = "_affix_xdphx_455", Ht = "_affix--small_xdphx_475", Lt = "_affix--disabled_xdphx_487", jt = "_prefix_xdphx_490", Rt = "_affix--readonly_xdphx_493", kt = "_suffix_xdphx_503", Ct = "_action-button_xdphx_510", $t = "_label--hidden_xdphx_527", Ft = "_feedback_xdphx_554", Vt = "_second-action-button_xdphx_568", Pt = "_value-announcer_xdphx_572", n = {
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { j as e } from "./jsx-runtime.C115EyI4.js";
3
3
  import { c as s } from "./index.CvOaL64Y.js";
4
- import { D as p } from "./Icon.n4XZrQ4N.js";
5
- import { DSButton as g } from "../button.L1lgCuM9.js";
4
+ import { DSButton as p } from "../button.DPrDynn_.js";
5
+ import { D as g } from "./Icon.n4XZrQ4N.js";
6
6
  import '../assets/Notification.Bg63cvs4.css';const N = "_root_l12pe_76", f = "_root--success_l12pe_100", h = "_root--error_l12pe_104", I = "_root--warning_l12pe_108", x = "_root--hide-icon_l12pe_112", A = "_content_l12pe_126", C = "_content--hide-close-button_l12pe_133", H = "_content--hide-icon_l12pe_136", j = "_icon_l12pe_140", S = "_message_l12pe_144", w = "_custom-action-area_l12pe_157", o = {
7
7
  root: N,
8
8
  "root--success": "_root--success_l12pe_100",
@@ -61,7 +61,7 @@ import '../assets/Notification.Bg63cvs4.css';const N = "_root_l12pe_76", f = "_r
61
61
  return /* @__PURE__ */ e.jsxs("div", { className: d, ...m, role: T[t], children: [
62
62
  /* @__PURE__ */ e.jsxs("div", { className: u, children: [
63
63
  !n && /* @__PURE__ */ e.jsx(
64
- p,
64
+ g,
65
65
  {
66
66
  name: O[t],
67
67
  className: o.icon,
@@ -70,7 +70,7 @@ import '../assets/Notification.Bg63cvs4.css';const N = "_root_l12pe_76", f = "_r
70
70
  ),
71
71
  /* @__PURE__ */ e.jsx("div", { className: o.message, children: i }),
72
72
  !r && /* @__PURE__ */ e.jsx(
73
- g,
73
+ p,
74
74
  {
75
75
  hideLabel: !0,
76
76
  iconName: "cross",
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { j as c } from "./jsx-runtime.C115EyI4.js";
3
+ import { c as e } from "./index.CvOaL64Y.js";
4
+ import { forwardRef as u } from "react";
5
+ import { DSButton as g } from "../button.DPrDynn_.js";
6
+ import { D as h } from "./Icon.n4XZrQ4N.js";
7
+ import '../assets/Toast.ChT0hchk.css';const p = "_root_cdscl_80", x = "_root--closing_cdscl_94", I = "_fade-out_cdscl_1", S = "_move-in_cdscl_1", N = "_root--success_cdscl_129", j = "_root--info_cdscl_133", v = "_root--warning_cdscl_137", w = "_content_cdscl_142", C = "_content--hide-icon_cdscl_149", D = "_icon_cdscl_153", O = "_message_cdscl_157", o = {
8
+ root: p,
9
+ "root--closing": "_root--closing_cdscl_94",
10
+ rootClosing: x,
11
+ "fade-out": "_fade-out_cdscl_1",
12
+ fadeOut: I,
13
+ "move-in": "_move-in_cdscl_1",
14
+ moveIn: S,
15
+ "root--success": "_root--success_cdscl_129",
16
+ rootSuccess: N,
17
+ "root--info": "_root--info_cdscl_133",
18
+ rootInfo: j,
19
+ "root--warning": "_root--warning_cdscl_137",
20
+ rootWarning: v,
21
+ content: w,
22
+ "content--hide-icon": "_content--hide-icon_cdscl_149",
23
+ contentHideIcon: C,
24
+ icon: D,
25
+ message: O
26
+ }, T = {
27
+ success: "circle-check-colored",
28
+ warning: "triangle-exclamationmark-colored",
29
+ info: "circle-info-colored"
30
+ }, H = u(
31
+ ({
32
+ message: n,
33
+ className: r,
34
+ hideIcon: t = !1,
35
+ variant: s = "info",
36
+ onClick: i,
37
+ onMouseEnter: a,
38
+ onMouseLeave: _,
39
+ ...l
40
+ }, d) => {
41
+ const m = e(o.root, r, {
42
+ [o.rootSuccess]: s === "success",
43
+ [o.rootWarning]: s === "warning",
44
+ [o.rootInfo]: s === "info"
45
+ }), f = e(o.content, {
46
+ [o.contentHideIcon]: t
47
+ });
48
+ return /* @__PURE__ */ c.jsx(
49
+ "aside",
50
+ {
51
+ className: m,
52
+ ref: d,
53
+ popover: "manual",
54
+ "data-ds-toast": !0,
55
+ onMouseEnter: a,
56
+ onMouseLeave: _,
57
+ "aria-label": n,
58
+ ...l,
59
+ children: /* @__PURE__ */ c.jsxs("div", { className: f, children: [
60
+ !t && /* @__PURE__ */ c.jsx(
61
+ h,
62
+ {
63
+ name: T[s],
64
+ className: o.icon,
65
+ "aria-hidden": "true"
66
+ }
67
+ ),
68
+ /* @__PURE__ */ c.jsx("div", { className: o.message, children: n }),
69
+ /* @__PURE__ */ c.jsx(
70
+ g,
71
+ {
72
+ hideLabel: !0,
73
+ iconName: "cross",
74
+ size: "small",
75
+ variant: "ghost",
76
+ onClick: i,
77
+ children: "Close toast"
78
+ }
79
+ )
80
+ ] })
81
+ }
82
+ );
83
+ }
84
+ );
85
+ H.displayName = "DSToast";
86
+ export {
87
+ H as D,
88
+ o as s
89
+ };
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ const e = typeof document < "u";
3
+ export {
4
+ e as h
5
+ };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { j as u } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { v as x, c as C } from "./chunks/CustomReactSelect.5dHi6PEO.js";
3
+ import { v as x, c as C } from "./chunks/CustomReactSelect.BVv0Zcvc.js";
4
4
  const v = ({
5
5
  id: s,
6
6
  label: o,
@@ -37,7 +37,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
37
37
  theme?: Theme;
38
38
  /** Visual style variant of the button */
39
39
  variant?: ButtonVariant;
40
- /** Callback function triggered when the button is clicked */
40
+ /** Callback function called when the button is clicked */
41
41
  onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
42
42
  }
43
43
  /**
@@ -18,7 +18,7 @@ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
18
18
  invalid?: boolean;
19
19
  /** Defines a system feedback message, shown when `invalid={true}` */
20
20
  systemFeedback?: string;
21
- /** Callback function triggered when the state of the checkbox changes */
21
+ /** Callback function called when the state of the checkbox changes */
22
22
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
23
23
  }
24
24
  /**
@@ -47,9 +47,9 @@ export interface CustomReactSelectProps<IsMulti extends boolean> extends PickedR
47
47
  translations?: ComboboxAriaTranslations;
48
48
  /** Value of the DSCombobox */
49
49
  value?: IsMulti extends true ? ComboboxOption[] : ComboboxOption;
50
- /** Callback function triggered when the selection of the DSCombobox changes */
50
+ /** Callback function called when the selection of the DSCombobox changes */
51
51
  onChange?: (newValue: IsMulti extends true ? ComboboxOption[] : ComboboxOption) => void;
52
- /** Callback function triggered when the value of the DSCombobox input changes */
52
+ /** Callback function called when the value of the DSCombobox input changes */
53
53
  onInputChange?: (newValue: string) => void;
54
54
  }
55
55
  /**
@@ -1,11 +1,30 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
 
3
- type DialogProps = {
3
+ export type DialogProps = {
4
+ /** Content within the Dialog */
4
5
  children: React.ReactNode;
6
+ /** Label for the close button */
7
+ closeButtonLabel?: string;
8
+ /** Disables closing the Dialog by clicking on the backdrop */
9
+ disableBackdropClose?: boolean;
10
+ /** Content within the Dialog's footer. For example a CTA button. */
5
11
  footer?: React.ReactNode;
12
+ /** Content within the Dialog's header. For example a Heading. */
6
13
  header?: React.ReactNode;
14
+ /**
15
+ * If `true`, hides the close button. Ensure you provide an alternative method for closing,
16
+ * such as a button in the footer or within the children components.
17
+ */
18
+ hideCloseButton?: boolean;
19
+ /** Determines if the Dialog is open */
7
20
  isOpen?: boolean;
21
+ /** Callback function called when the Dialog is closed */
8
22
  onClose?: () => void;
9
23
  } & HTMLAttributes<HTMLDialogElement>;
10
- export declare const DSDialog: ({ children, className, footer, header, isOpen, onClose, }: DialogProps) => JSX.Element;
11
- export {};
24
+ /**
25
+ * A component that renders a modal dialog, which can be used for displaying
26
+ * important messages, forms, or confirmations.
27
+ *
28
+ * <div className="ds-info">For more information on the different types of notifications and to determine which is best suited for your needs, please refer to our [Notification Guidelines](/docs/templates-notification-guidelines--documentation) and explore the decision trees provided.</div>
29
+ */
30
+ export declare const DSDialog: ({ children, className, closeButtonLabel, disableBackdropClose, footer, header, hideCloseButton, isOpen, onClose, ...rest }: DialogProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { DialogProps } from './Dialog';
2
+
3
+ type ValidationProps = Pick<DialogProps, 'tabIndex'>;
4
+ /**
5
+ * Validates the given properties of the DSDialog component for common configuration errors.
6
+ * This function is intended to be used in development mode to provide developers with
7
+ * warnings about potential misuse of the component.
8
+ *
9
+ * @param validationProps - The subset of DSDialog properties to validate.
10
+ */
11
+ export declare const validateDialogProps: ({ tabIndex }: ValidationProps) => void;
12
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { DrawerPosition } from './Drawer.utils';
3
+
4
+ export type DrawerProps = {
5
+ /** Content within the Drawer */
6
+ children: React.ReactNode;
7
+ /** Label for the close button */
8
+ closeButtonLabel?: string;
9
+ /** Disables closing the Drawer by clicking on the backdrop */
10
+ disableBackdropClose?: boolean;
11
+ /** Content within the Drawer's footer. For example a CTA button. */
12
+ footer?: React.ReactNode;
13
+ /** Content within the Drawer's header. For example a Heading. */
14
+ header?: React.ReactNode;
15
+ /**
16
+ * If `true`, hides the close button. Ensure you provide an alternative method for closing,
17
+ * such as a button in the footer or within the children components.
18
+ */
19
+ hideCloseButton?: boolean;
20
+ /** Determines if the Drawer is open */
21
+ isOpen?: boolean;
22
+ /** Specifies the final position of the Drawer after opening. */
23
+ position?: DrawerPosition;
24
+ /** Callback function called when the Drawer is closed */
25
+ onClose?: () => void;
26
+ } & HTMLAttributes<HTMLDialogElement>;
27
+ /**
28
+ * A component that renders a modal drawer, which can be used for navigation,
29
+ * displaying additional information, or providing extra controls.
30
+ */
31
+ export declare const DSDrawer: ({ children, className, closeButtonLabel, disableBackdropClose, footer, header, hideCloseButton, position, isOpen, onClose, ...rest }: DrawerProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export {};