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

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 (161) 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/spinner.LuV09jaU.css +1 -0
  33. package/assets/switch.Ds-I_ybT.css +1 -0
  34. package/assets/{systemfeedback.WE3wClZ3.css → systemfeedback.BzJATHDd.css} +1 -1
  35. package/assets/text.B-CTuGgI.css +1 -0
  36. package/assets/{title.CE0Dm7PI.css → title.DlhX9K3W.css} +1 -1
  37. package/asterisk.Cjbk-xZi.js +8 -0
  38. package/button.DlFWwHuA.js +135 -0
  39. package/buttonround.eYOQM994.js +118 -0
  40. package/checkbox.DNHdo6_n.js +113 -0
  41. package/checkboxgroup.DqWlzAeR.js +9 -0
  42. package/chunks/{CheckboxGroup.CS6Q_TeZ.js → CheckboxGroup.DsQ6lI5a.js} +22 -22
  43. package/chunks/{CustomReactSelect.DtmbYZUf.js → CustomReactSelect.5dHi6PEO.js} +909 -959
  44. package/chunks/Fieldset.B1vsrHNv.js +99 -0
  45. package/chunks/{Icon.9gDIp6p4.js → Icon.n4XZrQ4N.js} +33 -27
  46. package/chunks/InputPassword.DTqI58Z4.js +140 -0
  47. package/chunks/InputSearch.IwQATLKh.js +189 -0
  48. package/chunks/InputStepper.Jew1ETB6.js +291 -0
  49. package/chunks/Notification.DbflCBIL.js +93 -0
  50. package/chunks/RadioGroup.BO4pbAJw.js +132 -0
  51. package/chunks/RadioGroup.module.BBZwHDjW.js +11 -0
  52. package/chunks/Select.COdS787F.js +191 -0
  53. package/chunks/Textarea.oqCrSopu.js +195 -0
  54. package/chunks/Toast.BLGKvAvZ.js +89 -0
  55. package/chunks/{jsx-runtime.C-kxDJ4g.js → jsx-runtime.C115EyI4.js} +3 -7
  56. package/{combobox.BaSkiD6f.js → combobox.CRlhqmuO.js} +2 -2
  57. package/components/Radio/Radio.d.ts +11 -3
  58. package/components/RadioGroup/RadioGroup.d.ts +6 -3
  59. package/components/RadioGroup/RadioGroup.utils.d.ts +5 -3
  60. package/components/RadioGroup/RadioGroup.utils.test.d.ts +1 -0
  61. package/customreactselect.CD58gwtp.js +13 -0
  62. package/dialog.qd2pOyVc.js +45 -0
  63. package/fieldset.aY3V2jK2.js +11 -0
  64. package/floatingactionbutton.CGV3YFQq.js +87 -0
  65. package/heading.BTNroD1E.js +50 -0
  66. package/icon.D3RXjzh4.js +8 -0
  67. package/index.es.js +60 -58
  68. package/input.BAxvG272.js +236 -0
  69. package/inputpassword.mn9qFlfs.js +12 -0
  70. package/inputsearch.qQJj9yFd.js +13 -0
  71. package/inputstepper.DhbHujiM.js +13 -0
  72. package/link.SAcKvzJ3.js +115 -0
  73. package/linkstandalone.DNe0Nydm.js +79 -0
  74. package/{logo.C_oJ8isW.js → logo.BR_CUXFl.js} +16 -16
  75. package/notification.CnJOdQza.js +9 -0
  76. package/{optioncheckbox.CUV1MQhh.js → optioncheckbox.C4l2UIak.js} +7 -7
  77. package/package.json +28 -24
  78. package/partials/index.js +51 -79
  79. package/radio.epf54-sG.js +115 -0
  80. package/radiogroup.CiENWRos.js +11 -0
  81. package/select.DLYav8gw.js +12 -0
  82. package/spinner.DEtbkdfi.js +58 -0
  83. package/styles/scss/lib/_animation.scss +15 -14
  84. package/styles/scss/lib/_container-query.scss +3 -3
  85. package/styles/scss/lib/_grid-sidebar.scss +14 -7
  86. package/styles/scss/lib/_link.scss +48 -42
  87. package/styles/scss/lib/_media-query.scss +3 -3
  88. package/styles/scss/lib/_transition.scss +26 -7
  89. package/switch.BezS5z0Y.js +65 -0
  90. package/{systemfeedback.4Hkfigi-.js → systemfeedback.CUWch42u.js} +3 -3
  91. package/text.CrYUewrP.js +57 -0
  92. package/{textarea.DPy3TJJf.js → textarea.hLgeYdsI.js} +4 -4
  93. package/title.Dvp8LKJt.js +36 -0
  94. package/toast.BR7QuHOG.js +10 -0
  95. package/{toastmanager.DQ_-eTrx.js → toastmanager.DBp8B1e3.js} +2 -2
  96. package/utils/index.d.ts +1 -0
  97. package/utils/remove-spaces.d.ts +6 -0
  98. package/utils/remove-spaces.test.d.ts +1 -0
  99. package/arialiveregions.49Zyf6mj.js +0 -27
  100. package/assets/CustomReactSelect.B0rJLjN0.css +0 -1
  101. package/assets/Fieldset.xazpUXJX.css +0 -1
  102. package/assets/Icon.CB-KQmw4.css +0 -1
  103. package/assets/InputPassword.C3Uyj7oA.css +0 -1
  104. package/assets/InputSearch.tL3e9-Ob.css +0 -1
  105. package/assets/InputStepper.paPJix5A.css +0 -1
  106. package/assets/Notification.CCCbfXEz.css +0 -1
  107. package/assets/RadioGroup.Ur8Ro-XL.css +0 -1
  108. package/assets/Select.D2qBxaHP.css +0 -1
  109. package/assets/Textarea.BKbocznb.css +0 -1
  110. package/assets/Toast.CAP_EwDX.css +0 -1
  111. package/assets/button.BuIpnG-S.css +0 -1
  112. package/assets/buttonround.C3ph5Yyu.css +0 -1
  113. package/assets/checkbox.BsFEWfQe.css +0 -1
  114. package/assets/dialog.BGK3mgk7.css +0 -1
  115. package/assets/floatingactionbutton.D7ywURL3.css +0 -1
  116. package/assets/heading.CGFucb-C.css +0 -1
  117. package/assets/input.BcP5kkZ2.css +0 -1
  118. package/assets/link.DQy_OhwC.css +0 -1
  119. package/assets/linkstandalone.Dh6bE5Fb.css +0 -1
  120. package/assets/logo.BbHYgnWo.css +0 -1
  121. package/assets/optioncheckbox.C-K1FLhc.css +0 -1
  122. package/assets/radio.CSHQGdpr.css +0 -1
  123. package/assets/spinner.C5rBmKiF.css +0 -1
  124. package/assets/switch.sqve8ApJ.css +0 -1
  125. package/assets/text.DDAveG7E.css +0 -1
  126. package/asterisk.DU8THnoC.js +0 -8
  127. package/button.DX_nxoJC.js +0 -135
  128. package/buttonround.CXsBk9nL.js +0 -118
  129. package/checkbox.B43oeMeC.js +0 -112
  130. package/checkboxgroup.C7aCjYds.js +0 -9
  131. package/chunks/Fieldset.BokeZzG5.js +0 -99
  132. package/chunks/InputPassword.jpUCijp7.js +0 -140
  133. package/chunks/InputSearch.BmOtAZcR.js +0 -190
  134. package/chunks/InputStepper.DTKjUL4U.js +0 -291
  135. package/chunks/Notification.CUPOlHAX.js +0 -93
  136. package/chunks/RadioGroup.DpwnVv7u.js +0 -110
  137. package/chunks/RadioGroup.module.bi3leRes.js +0 -11
  138. package/chunks/Select.DkDZo0ky.js +0 -193
  139. package/chunks/Textarea.C938p79X.js +0 -195
  140. package/chunks/Toast.CLYrwQVO.js +0 -89
  141. package/customreactselect.LTbjaBN2.js +0 -13
  142. package/dialog.BkXwcbUh.js +0 -45
  143. package/fieldset.BXOWK-B-.js +0 -11
  144. package/floatingactionbutton.-nDRRiXY.js +0 -87
  145. package/heading.DqGbFfj2.js +0 -50
  146. package/icon.Cpp_9L1I.js +0 -8
  147. package/input.BM6tyRUm.js +0 -236
  148. package/inputpassword.DUxH1K_k.js +0 -12
  149. package/inputsearch.B-vePHle.js +0 -13
  150. package/inputstepper.C2ypADPI.js +0 -13
  151. package/link.B4XZoLDj.js +0 -115
  152. package/linkstandalone.BSfd95Pd.js +0 -79
  153. package/notification.CxxAOdNV.js +0 -9
  154. package/radio.Bhu9OUY-.js +0 -79
  155. package/radiogroup.CMJ1b38q.js +0 -11
  156. package/select.DFJK2mHF.js +0 -12
  157. package/spinner.BskX4ovu.js +0 -58
  158. package/switch.Bx2tDKx0.js +0 -65
  159. package/text.CPU8IUqY.js +0 -57
  160. package/title.icX0VDiO.js +0 -36
  161. package/toast.C-Yg5EoE.js +0 -10
@@ -1,118 +0,0 @@
1
- "use client";
2
- import { j as l } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c as _ } from "./chunks/index.CvOaL64Y.js";
4
- import { D as y } from "./chunks/Icon.9gDIp6p4.js";
5
- import { DSSpinner as H } from "./spinner.BskX4ovu.js";
6
- import './assets/buttonround.C3ph5Yyu.css';const p = "_root_eez0z_125", F = "_root--highlight_eez0z_194", O = "_root--dark-highlight_eez0z_194", G = "_root--filled_eez0z_272", I = "_root--outline_eez0z_300", S = "_root--ghost_eez0z_327", x = "_root--ghost-flush_eez0z_352", j = "_root--small_eez0z_358", L = "_root--dark-filled_eez0z_433", C = "_root--dark-outline_eez0z_492", N = "_root--dark-ghost_eez0z_550", R = "_root--dark-ghost-flush_eez0z_606", B = "_root--icon-left_eez0z_665", E = "_root--icon-only_eez0z_681", T = "_root--icon-only-small_eez0z_690", q = "_loader_eez0z_701", w = "_icon--hidden_eez0z_713", A = "_label--hidden_eez0z_717", J = "_label--loading_eez0z_729", o = {
7
- root: p,
8
- "root--highlight": "_root--highlight_eez0z_194",
9
- rootHighlight: F,
10
- "root--dark-highlight": "_root--dark-highlight_eez0z_194",
11
- rootDarkHighlight: O,
12
- "root--filled": "_root--filled_eez0z_272",
13
- rootFilled: G,
14
- "root--outline": "_root--outline_eez0z_300",
15
- rootOutline: I,
16
- "root--ghost": "_root--ghost_eez0z_327",
17
- rootGhost: S,
18
- "root--ghost-flush": "_root--ghost-flush_eez0z_352",
19
- rootGhostFlush: x,
20
- "root--small": "_root--small_eez0z_358",
21
- rootSmall: j,
22
- "root--dark-filled": "_root--dark-filled_eez0z_433",
23
- rootDarkFilled: L,
24
- "root--dark-outline": "_root--dark-outline_eez0z_492",
25
- rootDarkOutline: C,
26
- "root--dark-ghost": "_root--dark-ghost_eez0z_550",
27
- rootDarkGhost: N,
28
- "root--dark-ghost-flush": "_root--dark-ghost-flush_eez0z_606",
29
- rootDarkGhostFlush: R,
30
- "root--icon-left": "_root--icon-left_eez0z_665",
31
- rootIconLeft: B,
32
- "root--icon-only": "_root--icon-only_eez0z_681",
33
- rootIconOnly: E,
34
- "root--icon-only-small": "_root--icon-only-small_eez0z_690",
35
- rootIconOnlySmall: T,
36
- loader: q,
37
- "icon--hidden": "_icon--hidden_eez0z_713",
38
- iconHidden: w,
39
- "label--hidden": "_label--hidden_eez0z_717",
40
- labelHidden: A,
41
- "label--loading": "_label--loading_eez0z_729",
42
- labelLoading: J
43
- }, U = ({
44
- children: d,
45
- aria: z,
46
- className: c,
47
- dataTrackingid: g,
48
- disabled: i = !1,
49
- iconName: n = "placeholder",
50
- iconSource: s,
51
- loading: t = !1,
52
- theme: r = "light",
53
- variant: e = "filled",
54
- onClick: a,
55
- ...k
56
- }) => {
57
- const u = _(
58
- o.root,
59
- o.rootIconOnlySmall,
60
- c,
61
- {
62
- // variant
63
- [o.rootFilled]: e === "filled",
64
- [o.rootHighlight]: e === "highlight",
65
- // dark theme
66
- [o.rootDarkFilled]: r === "dark" && e === "filled",
67
- [o.rootDarkHighlight]: r === "dark" && e === "highlight"
68
- }
69
- ), f = _(o.label, o.labelHidden, {
70
- // set label opacity to 0 when loading to prevent button size from changing
71
- [o.labelLoading]: t
72
- }), m = _(o.icon, {
73
- // set icon opacity to 0 when loading to prevent button size from changing
74
- [o.iconHidden]: t
75
- }), b = r === "light" && e === "filled" ? "dark" : "light", D = (h) => {
76
- if (i || t) {
77
- h.preventDefault();
78
- return;
79
- }
80
- a && a(h);
81
- };
82
- return /* @__PURE__ */ l.jsxs(
83
- "button",
84
- {
85
- className: u,
86
- "data-trackingid": g,
87
- type: "button",
88
- onClick: D,
89
- ...z,
90
- ...k,
91
- "aria-disabled": i || t,
92
- "aria-busy": t,
93
- children: [
94
- t && /* @__PURE__ */ l.jsx(
95
- H,
96
- {
97
- className: o.loader,
98
- aria: { "aria-label": "Loading state" }
99
- }
100
- ),
101
- /* @__PURE__ */ l.jsx("span", { className: f, children: d }),
102
- (n || s) && /* @__PURE__ */ l.jsx(
103
- y,
104
- {
105
- name: n,
106
- theme: b,
107
- source: s,
108
- className: m,
109
- "aria-hidden": "true"
110
- }
111
- )
112
- ]
113
- }
114
- );
115
- };
116
- export {
117
- U as DSButtonRound
118
- };
@@ -1,112 +0,0 @@
1
- "use client";
2
- import { j as c } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c as d } from "./chunks/index.CvOaL64Y.js";
4
- import { forwardRef as I, useRef as H, useState as M, useEffect as g, useCallback as B } from "react";
5
- import { u as E } from "./chunks/useBreakpoint.5xBNDiCf.js";
6
- import { D as b } from "./chunks/Icon.9gDIp6p4.js";
7
- import { DSSystemFeedback as V } from "./systemfeedback.4Hkfigi-.js";
8
- import './assets/checkbox.BsFEWfQe.css';const w = "_root_10jm0_125", L = "_root--disabled_10jm0_144", O = "_checkbox_10jm0_148", P = "_icon-check_10jm0_162", R = "_icon-minus_10jm0_163", U = "_checkbox--invalid_10jm0_184", q = "_label--hidden_10jm0_189", z = "_input_10jm0_202", A = "_label_10jm0_189", F = "_feedback_10jm0_316", e = {
9
- root: w,
10
- "root--disabled": "_root--disabled_10jm0_144",
11
- rootDisabled: L,
12
- checkbox: O,
13
- "icon-check": "_icon-check_10jm0_162",
14
- iconCheck: P,
15
- "icon-minus": "_icon-minus_10jm0_163",
16
- iconMinus: R,
17
- "checkbox--invalid": "_checkbox--invalid_10jm0_184",
18
- checkboxInvalid: U,
19
- "label--hidden": "_label--hidden_10jm0_189",
20
- labelHidden: q,
21
- input: z,
22
- label: A,
23
- feedback: F
24
- }, G = I(
25
- ({
26
- label: _,
27
- checked: m,
28
- className: k,
29
- defaultChecked: f = !1,
30
- disabled: s = !1,
31
- hideLabel: x = !1,
32
- indeterminate: i = !1,
33
- invalid: l = !1,
34
- systemFeedback: h,
35
- onChange: t,
36
- ...j
37
- }, n) => {
38
- const a = H(null), [p, C] = M(f), D = E(x);
39
- g(() => {
40
- a && a.current && (a.current.indeterminate = i);
41
- }, [i]);
42
- const r = m !== void 0, u = r ? m : p, N = d(e.root, {
43
- [e.rootDisabled]: s
44
- }), v = d(e.label, {
45
- // hide label only visually to keep them available for assistive technologies
46
- [e.labelHidden]: D
47
- }), S = d(e.checkbox, {
48
- [e.checkboxInvalid]: l
49
- }), y = B(
50
- (o) => {
51
- if (s) {
52
- o.preventDefault();
53
- return;
54
- }
55
- r || C(o.target.checked), t && t(o);
56
- },
57
- [s, r, t]
58
- );
59
- return /* @__PURE__ */ c.jsxs("div", { className: k, children: [
60
- /* @__PURE__ */ c.jsxs("label", { className: N, children: [
61
- /* @__PURE__ */ c.jsx(
62
- "input",
63
- {
64
- type: "checkbox",
65
- className: e.input,
66
- ref: (o) => {
67
- typeof n == "function" ? n(o) : n !== null && (n.current = o), a.current = o;
68
- },
69
- ...j,
70
- checked: u,
71
- disabled: s,
72
- "aria-label": _,
73
- "aria-invalid": l,
74
- "aria-checked": i ? "mixed" : u,
75
- onChange: y
76
- }
77
- ),
78
- /* @__PURE__ */ c.jsxs("span", { className: S, children: [
79
- /* @__PURE__ */ c.jsx(
80
- b,
81
- {
82
- name: "check",
83
- className: e.iconCheck,
84
- "aria-hidden": "true"
85
- }
86
- ),
87
- /* @__PURE__ */ c.jsx(
88
- b,
89
- {
90
- name: "minus",
91
- className: e.iconMinus,
92
- "aria-hidden": "true"
93
- }
94
- )
95
- ] }),
96
- /* @__PURE__ */ c.jsx("span", { className: v, children: _ })
97
- ] }),
98
- l && h && /* @__PURE__ */ c.jsx(
99
- V,
100
- {
101
- className: e.feedback,
102
- message: h,
103
- type: "invalid"
104
- }
105
- )
106
- ] });
107
- }
108
- );
109
- G.displayName = "DSCheckbox";
110
- export {
111
- G as DSCheckbox
112
- };
@@ -1,9 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "./chunks/Fieldset.BokeZzG5.js";
5
- import "./chunks/RadioGroup.module.bi3leRes.js";
6
- import { D as e } from "./chunks/CheckboxGroup.CS6Q_TeZ.js";
7
- export {
8
- e as DSCheckboxGroup
9
- };
@@ -1,99 +0,0 @@
1
- "use client";
2
- import { j as e } from "./jsx-runtime.C-kxDJ4g.js";
3
- import { c } from "./index.CvOaL64Y.js";
4
- import "react";
5
- import { Asterisk as f } from "../asterisk.DU8THnoC.js";
6
- import { DSHeading as v } from "../heading.DqGbFfj2.js";
7
- import { DSSystemFeedback as w } from "../systemfeedback.4Hkfigi-.js";
8
- import { g as y } from "./helpers.B1JT5ShS.js";
9
- import '../assets/Fieldset.xazpUXJX.css';const N = "_root_189b3_63", E = "_child-wrapper_189b3_69", M = "_legend_189b3_76", q = "_legend--utility--m_189b3_80", C = "_description_189b3_91", P = "_description--small_189b3_104", T = "_system-feedback_189b3_108", i = {
10
- root: N,
11
- "child-wrapper": "_child-wrapper_189b3_69",
12
- childWrapper: E,
13
- legend: M,
14
- "legend--utility--m": "_legend--utility--m_189b3_80",
15
- legendUtilityM: q,
16
- description: C,
17
- "description--small": "_description--small_189b3_104",
18
- descriptionSmall: P,
19
- "system-feedback": "_system-feedback_189b3_108",
20
- systemFeedback: T
21
- }, U = ({
22
- description: a,
23
- id: s,
24
- legend: n,
25
- systemFeedback: t
26
- }) => {
27
- if (!s && (a || t))
28
- throw new Error(
29
- y(
30
- "DSFieldset",
31
- 'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSFieldset component.'
32
- )
33
- );
34
- if (!n)
35
- throw new Error(
36
- y(
37
- "DSFieldset",
38
- "The legend prop is required. Please add the legend prop to the DSFieldset component."
39
- )
40
- );
41
- }, H = ({
42
- children: a,
43
- legend: s,
44
- className: n,
45
- description: t,
46
- disabled: j = !1,
47
- id: d,
48
- invalid: p = !1,
49
- required: m = !1,
50
- systemFeedback: o,
51
- ...S
52
- }) => {
53
- process.env.NODE_ENV !== "production" && U({ description: t, id: d, legend: s, systemFeedback: o });
54
- let r, _, b;
55
- const l = typeof s == "object" && s !== void 0;
56
- l && ({ headingSize: r, headingTag: _, headingText: b } = s);
57
- const g = `${d}-feedback`, h = `${d}-description`, u = [
58
- o && g,
59
- t && h
60
- ].filter(Boolean).join(" "), x = !l || r === "small" || r === "small-uppercase", D = c(i.root, n), F = c(i.legend, {
61
- [i.legendUtilityM]: !l
62
- }), k = c(i.description, {
63
- [i.descriptionSmall]: x
64
- });
65
- return /* @__PURE__ */ e.jsxs(
66
- "fieldset",
67
- {
68
- className: D,
69
- disabled: j,
70
- ...S,
71
- "aria-invalid": p,
72
- "aria-describedby": u || void 0,
73
- children: [
74
- /* @__PURE__ */ e.jsx("legend", { className: F, children: l ? /* @__PURE__ */ e.jsxs(v, { tag: _, size: r, children: [
75
- b,
76
- m && /* @__PURE__ */ e.jsx(f, {})
77
- ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
78
- s,
79
- m && /* @__PURE__ */ e.jsx(f, {})
80
- ] }) }),
81
- t && /* @__PURE__ */ e.jsx("span", { id: h, className: k, children: t }),
82
- p && o && /* @__PURE__ */ e.jsx(
83
- w,
84
- {
85
- id: g,
86
- type: "invalid",
87
- message: o,
88
- className: i.systemFeedback
89
- }
90
- ),
91
- /* @__PURE__ */ e.jsx("div", { className: i.childWrapper, children: a })
92
- ]
93
- }
94
- );
95
- };
96
- export {
97
- H as D,
98
- U as v
99
- };
@@ -1,140 +0,0 @@
1
- "use client";
2
- import { j as a } from "./jsx-runtime.C-kxDJ4g.js";
3
- import { c as i } from "./index.CvOaL64Y.js";
4
- import { useState as A } from "react";
5
- import { u as D } from "./useBreakpoint.5xBNDiCf.js";
6
- import { Asterisk as C } from "../asterisk.DU8THnoC.js";
7
- import { DSButton as L } from "../button.DX_nxoJC.js";
8
- import { DSSystemFeedback as $ } from "../systemfeedback.4Hkfigi-.js";
9
- import { g as b } from "./helpers.B1JT5ShS.js";
10
- import '../assets/InputPassword.C3Uyj7oA.css';const E = "_input_8z84y_187", q = "_input--invalid_8z84y_297", R = "_input--small_8z84y_304", V = "_input--has-leading-icon_8z84y_350", O = "_input--has-action-button_8z84y_353", F = "_input--has-second-action-button_8z84y_356", M = "_input--has-affix_8z84y_368", T = "_input--is-ready_8z84y_380", G = "_root_8z84y_387", J = "_hint_8z84y_395", K = "_label_8z84y_395", Q = "_wrapper_8z84y_399", U = "_action-button_8z84y_405", W = "_label--hidden_8z84y_422", X = "_feedback_8z84y_449", t = {
11
- input: E,
12
- "input--invalid": "_input--invalid_8z84y_297",
13
- inputInvalid: q,
14
- "input--small": "_input--small_8z84y_304",
15
- inputSmall: R,
16
- "input--has-leading-icon": "_input--has-leading-icon_8z84y_350",
17
- inputHasLeadingIcon: V,
18
- "input--has-action-button": "_input--has-action-button_8z84y_353",
19
- inputHasActionButton: O,
20
- "input--has-second-action-button": "_input--has-second-action-button_8z84y_356",
21
- inputHasSecondActionButton: F,
22
- "input--has-affix": "_input--has-affix_8z84y_368",
23
- inputHasAffix: M,
24
- "input--is-ready": "_input--is-ready_8z84y_380",
25
- inputIsReady: T,
26
- root: G,
27
- hint: J,
28
- label: K,
29
- wrapper: Q,
30
- "action-button": "_action-button_8z84y_405",
31
- actionButton: U,
32
- "label--hidden": "_label--hidden_8z84y_422",
33
- labelHidden: W,
34
- feedback: X
35
- }, Y = ({ id: n, label: s }) => {
36
- if (!n)
37
- throw new Error(
38
- b(
39
- "DSInputPassword",
40
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSInputPassword component.'
41
- )
42
- );
43
- if (!s)
44
- throw new Error(
45
- b(
46
- "DSInputPassword",
47
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputPassword component. If you don't want to display a label, set hideLabel={true}.`
48
- )
49
- );
50
- }, lt = ({
51
- id: n,
52
- label: s,
53
- autocomplete: h = "new-password",
54
- className: f,
55
- disabled: c = !1,
56
- hidePasswordText: w = "Hide password",
57
- hint: e,
58
- hideLabel: z = !1,
59
- invalid: o = !1,
60
- readonly: r = !1,
61
- required: d = !1,
62
- showPasswordText: S = "Show password",
63
- size: l = "medium",
64
- systemFeedback: u,
65
- ...x
66
- }) => {
67
- process.env.NODE_ENV !== "production" && Y({
68
- id: n,
69
- label: s
70
- });
71
- const [p, I] = A(!1), _ = `${n}-label`, m = `${n}-feedback`, y = `${n}-hint`, v = e ? ` ${y}` : "", B = D(z), H = i(t.root, f), g = i(t.input, {
72
- // small input
73
- [t.inputSmall]: l === "small",
74
- // invalid state
75
- [t.inputInvalid]: o,
76
- // action button - input password always has an action button
77
- [t.inputHasActionButton]: !0
78
- }), P = i(t.label, {
79
- // hide label only visually to keep them available for assistive technologies
80
- [t.labelHidden]: B
81
- }), N = i(t.actionButton, {
82
- [t.actionButtonSmall]: l === "small"
83
- }), j = () => {
84
- I((k) => !k);
85
- };
86
- return /* @__PURE__ */ a.jsxs("div", { className: H, children: [
87
- /* @__PURE__ */ a.jsxs("label", { className: P, id: _, htmlFor: n, children: [
88
- s,
89
- d && /* @__PURE__ */ a.jsx(C, {})
90
- ] }),
91
- e && /* @__PURE__ */ a.jsx("div", { className: t.hint, id: y, children: e }),
92
- o && u && /* @__PURE__ */ a.jsx(
93
- $,
94
- {
95
- className: t.feedback,
96
- message: u,
97
- type: "invalid",
98
- id: m
99
- }
100
- ),
101
- /* @__PURE__ */ a.jsxs("div", { className: t.wrapper, children: [
102
- /* @__PURE__ */ a.jsx(
103
- "input",
104
- {
105
- className: g,
106
- id: n,
107
- ...x,
108
- "aria-labelledby": `${_}${v}`,
109
- "aria-describedby": o && u ? m : void 0,
110
- "aria-invalid": o,
111
- "aria-disabled": r,
112
- readOnly: r,
113
- required: d,
114
- disabled: c,
115
- autoComplete: h,
116
- type: p ? "text" : "password"
117
- }
118
- ),
119
- /* @__PURE__ */ a.jsx(
120
- L,
121
- {
122
- hideLabel: !0,
123
- theme: "light",
124
- iconName: p ? "eye-closed" : "eye",
125
- variant: "ghost",
126
- className: N,
127
- size: l,
128
- onClick: j,
129
- type: "button",
130
- disabled: c,
131
- children: p ? w : S
132
- }
133
- )
134
- ] })
135
- ] });
136
- };
137
- export {
138
- lt as D,
139
- Y as v
140
- };
@@ -1,190 +0,0 @@
1
- "use client";
2
- import { j as e } from "./jsx-runtime.C-kxDJ4g.js";
3
- import { c } from "./index.CvOaL64Y.js";
4
- import { useState as J, useRef as w, useEffect as D } from "react";
5
- import { g as y, a as K } from "./helpers.B1JT5ShS.js";
6
- import { u as Q } from "./useBreakpoint.5xBNDiCf.js";
7
- import { Asterisk as U } from "../asterisk.DU8THnoC.js";
8
- import { DSButton as A } from "../button.DX_nxoJC.js";
9
- import { DSSystemFeedback as X } from "../systemfeedback.4Hkfigi-.js";
10
- import '../assets/InputSearch.tL3e9-Ob.css';const Y = "_input_17rym_187", Z = "_input--invalid_17rym_297", z = "_input--small_17rym_304", tt = "_input--has-leading-icon_17rym_350", nt = "_input--has-action-button_17rym_353", et = "_input--has-second-action-button_17rym_356", at = "_input--has-affix_17rym_368", st = "_input--is-ready_17rym_380", ot = "_root_17rym_387", it = "_hint_17rym_395", ct = "_label_17rym_395", rt = "_wrapper_17rym_399", ut = "_action-button_17rym_405", lt = "_second-action-button_17rym_409", pt = "_label--hidden_17rym_426", mt = "_feedback_17rym_453", t = {
11
- input: Y,
12
- "input--invalid": "_input--invalid_17rym_297",
13
- inputInvalid: Z,
14
- "input--small": "_input--small_17rym_304",
15
- inputSmall: z,
16
- "input--has-leading-icon": "_input--has-leading-icon_17rym_350",
17
- inputHasLeadingIcon: tt,
18
- "input--has-action-button": "_input--has-action-button_17rym_353",
19
- inputHasActionButton: nt,
20
- "input--has-second-action-button": "_input--has-second-action-button_17rym_356",
21
- inputHasSecondActionButton: et,
22
- "input--has-affix": "_input--has-affix_17rym_368",
23
- inputHasAffix: at,
24
- "input--is-ready": "_input--is-ready_17rym_380",
25
- inputIsReady: st,
26
- root: ot,
27
- hint: it,
28
- label: ct,
29
- wrapper: rt,
30
- "action-button": "_action-button_17rym_405",
31
- actionButton: ut,
32
- "second-action-button": "_second-action-button_17rym_409",
33
- secondActionButton: lt,
34
- "label--hidden": "_label--hidden_17rym_426",
35
- labelHidden: pt,
36
- feedback: mt
37
- }, _t = ({ id: n, label: r }) => {
38
- if (!n)
39
- throw new Error(
40
- y(
41
- "DSInputSearch",
42
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSInputSearch component.'
43
- )
44
- );
45
- if (!r)
46
- throw new Error(
47
- y(
48
- "DSInputSearch",
49
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputSearch component. If you don't want to display a label, set hideLabel={true}.`
50
- )
51
- );
52
- }, dt = (n) => !!K(n, "form"), Bt = ({
53
- id: n,
54
- label: r,
55
- className: H,
56
- clearButtonLabel: E = "Clear search field",
57
- disabled: u = !1,
58
- hint: d,
59
- hideLabel: j = !1,
60
- invalid: l = !1,
61
- readonly: s = !1,
62
- required: S = !1,
63
- size: o = "medium",
64
- submitButtonLabel: C = "Search",
65
- systemFeedback: h,
66
- value: b,
67
- submitButtonOnClick: k,
68
- onChange: I,
69
- ...L
70
- }) => {
71
- process.env.NODE_ENV !== "production" && _t({
72
- id: n,
73
- label: r
74
- });
75
- const [p, g] = J(b), f = w(null), m = w(null), V = Q(j);
76
- D(() => {
77
- g(b);
78
- }, [b]), D(() => {
79
- f.current && !dt(f.current) && process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.warn(
80
- y(
81
- "DSInputSearch",
82
- `The DSInputSearch component with the id "${n}" is not within a form element. This may cause issues with form submission. Please ensure the DSInputSearch component is within a form element.`
83
- )
84
- );
85
- }, []);
86
- const v = `${n}-label`, B = `${n}-feedback`, x = `${n}-hint`, O = d ? ` ${x}` : "", N = p !== "" && p !== void 0 && p !== null, P = c(t.root, H), $ = c(t.input, {
87
- // small input
88
- [t.inputSmall]: o === "small",
89
- // invalid state
90
- [t.inputInvalid]: l,
91
- // action button - input password always has an action button
92
- [t.inputHasActionButton]: !0,
93
- // action second action button
94
- [t.inputHasSecondActionButton]: N && !s && !u
95
- }), R = c(t.label, {
96
- // hide label only visually to keep them available for assistive technologies
97
- [t.labelHidden]: V
98
- }), q = c(t.actionButton, {
99
- [t.actionButtonSmall]: o === "small"
100
- }), T = c(t.secondActionButton, {
101
- [t.secondActionButtonSmall]: o === "small"
102
- }), F = (a, i) => {
103
- const G = Object.getPrototypeOf(a), _ = Object.getOwnPropertyDescriptor(
104
- G,
105
- "value"
106
- );
107
- _ != null && _.set ? _.set.call(a, i) : a.value = i;
108
- }, M = () => {
109
- var i;
110
- if (!m.current)
111
- return;
112
- F(m.current, "");
113
- const a = new Event("change", { bubbles: !0 });
114
- (i = m.current) == null || i.dispatchEvent(a);
115
- }, W = (a) => {
116
- g(a.target.value), I && I(a);
117
- };
118
- return /* @__PURE__ */ e.jsxs("div", { className: P, ref: f, children: [
119
- /* @__PURE__ */ e.jsxs("label", { className: R, id: v, htmlFor: n, children: [
120
- r,
121
- S && /* @__PURE__ */ e.jsx(U, {})
122
- ] }),
123
- d && /* @__PURE__ */ e.jsx("div", { className: t.hint, id: x, children: d }),
124
- l && h && /* @__PURE__ */ e.jsx(
125
- X,
126
- {
127
- className: t.feedback,
128
- message: h,
129
- type: "invalid",
130
- id: B
131
- }
132
- ),
133
- /* @__PURE__ */ e.jsxs("div", { className: t.wrapper, children: [
134
- /* @__PURE__ */ e.jsx(
135
- "input",
136
- {
137
- className: $,
138
- id: n,
139
- ref: m,
140
- ...L,
141
- "aria-labelledby": `${v}${O}`,
142
- "aria-describedby": l && h ? B : void 0,
143
- "aria-invalid": l,
144
- "aria-disabled": s,
145
- readOnly: s,
146
- required: S,
147
- disabled: u,
148
- type: "search",
149
- value: p,
150
- onChange: W
151
- }
152
- ),
153
- N && !s && !u && /* @__PURE__ */ e.jsx(
154
- A,
155
- {
156
- hideLabel: !0,
157
- theme: "light",
158
- iconName: "cross",
159
- className: T,
160
- variant: "ghost",
161
- size: o,
162
- onClick: M,
163
- type: "button",
164
- tabIndex: -1,
165
- children: E
166
- }
167
- ),
168
- /* @__PURE__ */ e.jsx(
169
- A,
170
- {
171
- hideLabel: !0,
172
- theme: "light",
173
- iconName: "magnifying-glass",
174
- className: q,
175
- variant: "ghost",
176
- size: o,
177
- onClick: k,
178
- type: "submit",
179
- disabled: u || s,
180
- children: C
181
- }
182
- )
183
- ] })
184
- ] });
185
- };
186
- export {
187
- Bt as D,
188
- dt as i,
189
- _t as v
190
- };