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

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 (120) hide show
  1. package/assets/CustomReactSelect.CMkn-EGK.css +1 -0
  2. package/assets/Fieldset.qHYeUFZt.css +1 -0
  3. package/assets/InputPassword.Cf394z47.css +1 -0
  4. package/assets/InputSearch.eCRQoxjN.css +1 -0
  5. package/assets/InputStepper.B80KulYE.css +1 -0
  6. package/assets/Notification.DK6agBGS.css +1 -0
  7. package/assets/Select.BptsMxz4.css +1 -0
  8. package/assets/Textarea.CIIVh03G.css +1 -0
  9. package/assets/Toast.Dsvs1zdM.css +1 -0
  10. package/assets/asterisk.DlJ4YtSZ.css +1 -0
  11. package/assets/button.B1O7Yw3Q.css +1 -0
  12. package/assets/buttonround.DlH_ipDo.css +1 -0
  13. package/assets/checkbox.K4CVYK9g.css +1 -0
  14. package/assets/heading.6bER-Eac.css +1 -0
  15. package/assets/input.C0MrSbQu.css +1 -0
  16. package/assets/link.vtTST2ki.css +1 -0
  17. package/assets/linkstandalone.BtAcziZ7.css +1 -0
  18. package/assets/optioncheckbox.BJJAph5_.css +1 -0
  19. package/assets/radio.9kpIO3HC.css +1 -0
  20. package/assets/skiptocontent.CHcqLS7S.css +1 -0
  21. package/assets/switch.2DQF2zH-.css +1 -0
  22. package/assets/systemfeedback.Sq0bAIyf.css +1 -0
  23. package/assets/text.Dhb_l50R.css +1 -0
  24. package/assets/title.f74Bosn-.css +1 -0
  25. package/{asterisk.Cjbk-xZi.js → asterisk.DDn-yX4P.js} +1 -1
  26. package/button.CkHCQg3Y.js +135 -0
  27. package/buttonround.DX3u2Fio.js +118 -0
  28. package/checkbox.BbmCDJCm.js +112 -0
  29. package/{checkboxgroup.C9VX3c5W.js → checkboxgroup.CPENWSuk.js} +2 -2
  30. package/chunks/{CheckboxGroup.kG1WWhe_.js → CheckboxGroup.Dx_Hn8Dl.js} +2 -2
  31. package/chunks/CustomReactSelect.C4rTVlvy.js +3593 -0
  32. package/chunks/{Dialog.o7bcfCBf.js → Dialog.TPjJ_yxK.js} +1 -1
  33. package/chunks/{Drawer.VbG4cfgJ.js → Drawer.DrLGSch-.js} +1 -1
  34. package/chunks/{Fieldset.B1vsrHNv.js → Fieldset.P09LInkT.js} +29 -29
  35. package/chunks/{Input.utils.BGUhXCNP.js → Input.utils.ChV6RJsh.js} +19 -17
  36. package/chunks/InputPassword.CSc1c98k.js +140 -0
  37. package/chunks/{InputSearch.BbCdCCax.js → InputSearch.DrgdGFT_.js} +49 -49
  38. package/chunks/{InputStepper.DR3NR_II.js → InputStepper.DJEuIr4C.js} +76 -76
  39. package/chunks/{Notification.B6a6FOlS.js → Notification.B68mMDiB.js} +24 -24
  40. package/chunks/{RadioGroup.BO4pbAJw.js → RadioGroup.B5jRveyI.js} +2 -2
  41. package/chunks/Select.Cl2eJR1z.js +191 -0
  42. package/chunks/Textarea.Sk9-GXfs.js +195 -0
  43. package/chunks/Toast.D9DAuz2m.js +89 -0
  44. package/{combobox.Dgp3kvFR.js → combobox.jDpV6bv-.js} +1 -1
  45. package/{customreactselect.BxkJi_UE.js → customreactselect.C2QK_Q8T.js} +4 -4
  46. package/{dialog.CVFl9IVY.js → dialog.BPX7RJtQ.js} +2 -2
  47. package/{drawer.BheN3lap.js → drawer.BfEPcSsQ.js} +2 -2
  48. package/fieldset.4yvz0e7M.js +11 -0
  49. package/heading.CAkraI2D.js +50 -0
  50. package/index.es.js +26 -26
  51. package/input.lLMqAG-6.js +236 -0
  52. package/{inputpassword.CvnUeLTq.js → inputpassword.BIdYGrhB.js} +4 -4
  53. package/{inputsearch.ClX9PlYG.js → inputsearch.DleOblJp.js} +4 -4
  54. package/inputstepper.DWkHwOAn.js +13 -0
  55. package/link.KZaBufPM.js +116 -0
  56. package/linkstandalone.B6tN-NXD.js +80 -0
  57. package/{notification.BGRev3jC.js → notification.DdJjbSdM.js} +2 -2
  58. package/optioncheckbox.DwQEfxGG.js +43 -0
  59. package/package.json +5 -3
  60. package/partials/index.js +442 -442
  61. package/radio.CWGJtmKl.js +115 -0
  62. package/{radiogroup.CiENWRos.js → radiogroup.FfK4DLsV.js} +3 -3
  63. package/{select.DLYav8gw.js → select.BEuTuEFZ.js} +3 -3
  64. package/{skiptocontent.ALhHiH8t.js → skiptocontent.fP4SOp-p.js} +9 -9
  65. package/styles/scss/lib/_heading.scss +50 -9
  66. package/styles/scss/lib/_helpers.scss +12 -0
  67. package/styles/scss/lib/_link.scss +58 -94
  68. package/styles/scss/lib/_text.scss +57 -14
  69. package/switch.KO8HZPNL.js +65 -0
  70. package/{systemfeedback.CUWch42u.js → systemfeedback._8gatmgR.js} +1 -1
  71. package/text.rgDKQBrU.js +57 -0
  72. package/{textarea.hLgeYdsI.js → textarea.DV1yVty7.js} +3 -3
  73. package/title.LY1ylQsb.js +36 -0
  74. package/{toast.CtgjrtBC.js → toast.BB8L0ixD.js} +2 -2
  75. package/{toastmanager.6mUZ8eCN.js → toastmanager.DifUvJcg.js} +1 -1
  76. package/utils/index.d.ts +1 -0
  77. package/utils/useIsomorphicLayoutEffect.d.ts +26 -0
  78. package/assets/CustomReactSelect.Bsphydqt.css +0 -1
  79. package/assets/Fieldset.D0jHAGRL.css +0 -1
  80. package/assets/InputPassword.VCNO8ANM.css +0 -1
  81. package/assets/InputSearch.BMRAb95l.css +0 -1
  82. package/assets/InputStepper.BKjqNi-i.css +0 -1
  83. package/assets/Notification.Bg63cvs4.css +0 -1
  84. package/assets/Select.Bz1TImkI.css +0 -1
  85. package/assets/Textarea.D2h5cW_t.css +0 -1
  86. package/assets/Toast.ChT0hchk.css +0 -1
  87. package/assets/asterisk.JlyPArZu.css +0 -1
  88. package/assets/button.3UhhGy87.css +0 -1
  89. package/assets/buttonround.DXDlPKwD.css +0 -1
  90. package/assets/checkbox.BjIn2stV.css +0 -1
  91. package/assets/heading.CCbuI4X-.css +0 -1
  92. package/assets/input.71tOIrpp.css +0 -1
  93. package/assets/link.BJHmVrew.css +0 -1
  94. package/assets/linkstandalone.Bx8Uvo0G.css +0 -1
  95. package/assets/optioncheckbox.BdRJHcSw.css +0 -1
  96. package/assets/radio.ewRpPo4W.css +0 -1
  97. package/assets/skiptocontent.DGVJ77cj.css +0 -1
  98. package/assets/switch.Ds-I_ybT.css +0 -1
  99. package/assets/systemfeedback.BzJATHDd.css +0 -1
  100. package/assets/text.B-CTuGgI.css +0 -1
  101. package/assets/title.DlhX9K3W.css +0 -1
  102. package/button.DPrDynn_.js +0 -135
  103. package/buttonround.ix_-O4l1.js +0 -118
  104. package/checkbox.hoVQ37RP.js +0 -112
  105. package/chunks/CustomReactSelect.BVv0Zcvc.js +0 -4981
  106. package/chunks/InputPassword.TlusvIds.js +0 -140
  107. package/chunks/Select.COdS787F.js +0 -191
  108. package/chunks/Textarea.oqCrSopu.js +0 -195
  109. package/chunks/Toast.BpyBIPFW.js +0 -89
  110. package/fieldset.aY3V2jK2.js +0 -11
  111. package/heading.BTNroD1E.js +0 -50
  112. package/input.CfO9lL_o.js +0 -236
  113. package/inputstepper.Dd76qaQT.js +0 -13
  114. package/link.CIY7SOpm.js +0 -115
  115. package/linkstandalone.DNe0Nydm.js +0 -79
  116. package/optioncheckbox.C4l2UIak.js +0 -43
  117. package/radio.epf54-sG.js +0 -115
  118. package/switch.rd7PdLc9.js +0 -65
  119. package/text.CrYUewrP.js +0 -57
  120. package/title.Dvp8LKJt.js +0 -36
package/input.CfO9lL_o.js DELETED
@@ -1,236 +0,0 @@
1
- "use client";
2
- import { j as n } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as l } from "./chunks/index.CvOaL64Y.js";
4
- import { useState as x, useRef as k, useLayoutEffect as w, useEffect as ia } from "react";
5
- import { u as sa } from "./chunks/useBreakpoint.5xBNDiCf.js";
6
- import { Asterisk as ea } from "./asterisk.Cjbk-xZi.js";
7
- import { DSButton as E } from "./button.DPrDynn_.js";
8
- import { D as la } from "./chunks/Icon.n4XZrQ4N.js";
9
- import { DSSystemFeedback as oa } from "./systemfeedback.CUWch42u.js";
10
- import { v as da, b as ca, M as _a, a as ua, s as fa, c as ra, i as v } from "./chunks/Input.utils.BGUhXCNP.js";
11
- import './assets/input.71tOIrpp.css';const pa = "_input_1jdyx_226", xa = "_input--invalid_1jdyx_336", ma = "_input--small_1jdyx_343", ya = "_input--has-leading-icon_1jdyx_395", ja = "_input--has-action-button_1jdyx_398", ha = "_input--has-second-action-button_1jdyx_401", ba = "_input--has-affix_1jdyx_413", ga = "_input--is-ready_1jdyx_427", Ia = "_root_1jdyx_434", Sa = "_hint_1jdyx_442", Ha = "_label_1jdyx_442", ka = "_wrapper_1jdyx_446", va = "_affix_1jdyx_452", Ca = "_affix--small_1jdyx_472", Ra = "_affix--disabled_1jdyx_484", Da = "_prefix_1jdyx_487", La = "_affix--readonly_1jdyx_490", Aa = "_suffix_1jdyx_500", Na = "_leading-icon_1jdyx_507", Ba = "_leading-icon--small_1jdyx_519", wa = "_leading-icon--disabled_1jdyx_522", Ea = "_action-button_1jdyx_531", Ta = "_label--hidden_1jdyx_548", Fa = "_feedback_1jdyx_575", a = {
12
- input: pa,
13
- "input--invalid": "_input--invalid_1jdyx_336",
14
- inputInvalid: xa,
15
- "input--small": "_input--small_1jdyx_343",
16
- inputSmall: ma,
17
- "input--has-leading-icon": "_input--has-leading-icon_1jdyx_395",
18
- inputHasLeadingIcon: ya,
19
- "input--has-action-button": "_input--has-action-button_1jdyx_398",
20
- inputHasActionButton: ja,
21
- "input--has-second-action-button": "_input--has-second-action-button_1jdyx_401",
22
- inputHasSecondActionButton: ha,
23
- "input--has-affix": "_input--has-affix_1jdyx_413",
24
- inputHasAffix: ba,
25
- "input--is-ready": "_input--is-ready_1jdyx_427",
26
- inputIsReady: ga,
27
- root: Ia,
28
- hint: Sa,
29
- label: Ha,
30
- wrapper: ka,
31
- affix: va,
32
- "affix--small": "_affix--small_1jdyx_472",
33
- affixSmall: Ca,
34
- "affix--disabled": "_affix--disabled_1jdyx_484",
35
- affixDisabled: Ra,
36
- prefix: Da,
37
- "affix--readonly": "_affix--readonly_1jdyx_490",
38
- affixReadonly: La,
39
- suffix: Aa,
40
- "leading-icon": "_leading-icon_1jdyx_507",
41
- leadingIcon: Na,
42
- "leading-icon--small": "_leading-icon--small_1jdyx_519",
43
- leadingIconSmall: Ba,
44
- "leading-icon--disabled": "_leading-icon--disabled_1jdyx_522",
45
- leadingIconDisabled: wa,
46
- "action-button": "_action-button_1jdyx_531",
47
- actionButton: Ea,
48
- "label--hidden": "_label--hidden_1jdyx_548",
49
- labelHidden: Ta,
50
- feedback: Fa
51
- }, Ja = ({
52
- id: c,
53
- label: C,
54
- actionButtonLabel: T,
55
- actionButtonIconName: u,
56
- actionButtonIconSource: m,
57
- actionButtonOnClick: F,
58
- className: P,
59
- disabled: i = !1,
60
- hint: y,
61
- hideLabel: O = !1,
62
- invalid: f = !1,
63
- leadingIconName: r,
64
- leadingIconSource: p,
65
- prefix: s,
66
- readonly: _ = !1,
67
- required: R = !1,
68
- size: e = "medium",
69
- suffix: t,
70
- systemFeedback: j,
71
- type: o = "text",
72
- ...$
73
- }) => {
74
- process.env.NODE_ENV !== "production" && (da({
75
- id: c,
76
- label: C,
77
- prefix: s,
78
- suffix: t,
79
- leadingIconName: r,
80
- leadingIconSource: p,
81
- actionButtonIconName: u,
82
- actionButtonIconSource: m
83
- }), ca(o));
84
- const [W, X] = x(!1), [M, V] = x(!1), [h, G] = x(!1), [U, J] = x({}), b = k(null), K = s == null ? void 0 : s.substring(0, _a), g = k(null), Q = t == null ? void 0 : t.substring(0, ua), I = k(null), Y = sa(O);
85
- w(() => {
86
- const d = e === "medium" ? 16 : 8, S = {};
87
- if (g.current) {
88
- const H = g.current.offsetWidth;
89
- S.paddingInlineStart = d + H + "px";
90
- }
91
- if (I.current) {
92
- const H = I.current.offsetWidth;
93
- S.paddingInlineEnd = d + H + "px";
94
- }
95
- J(S), X(!0);
96
- }, [s, t, e, M]), w(() => {
97
- (async () => {
98
- "fonts" in document && (await document.fonts.load(
99
- '1em "STIHL Contraface Digital Text Regular"'
100
- ), V(!0));
101
- })();
102
- }, []), ia(() => {
103
- const d = fa(
104
- v(o),
105
- ra(o)
106
- );
107
- G(d);
108
- }, [o]);
109
- const D = l(a.affix, {
110
- [a.affixSmall]: e === "small",
111
- [a.affixDisabled]: i,
112
- [a.affixReadonly]: _
113
- }), L = `${c}-label`, A = `${c}-feedback`, N = `${c}-hint`, Z = y ? ` ${N}` : "", q = l(a.root, P), z = l(a.input, {
114
- // small input
115
- [a.inputSmall]: e === "small",
116
- // invalid state
117
- [a.inputInvalid]: f,
118
- // leading icon
119
- [a.inputHasLeadingIcon]: r || p,
120
- // prefix/suffix
121
- [a.inputHasAffix]: s || t,
122
- // action button
123
- [a.inputHasActionButton]: u || m || h,
124
- [a.inputIsReady]: W
125
- }), aa = l(a.label, {
126
- // hide label only visually to keep them available for assistive technologies
127
- [a.labelHidden]: Y
128
- }), na = l(a.leadingIcon, {
129
- [a.leadingIconSmall]: e === "small",
130
- [a.leadingIconDisabled]: i
131
- }), B = l(a.actionButton, {
132
- [a.actionButtonSmall]: e === "small"
133
- }), ta = (d) => {
134
- b.current && !i && !_ && b.current.showPicker(), d.preventDefault();
135
- };
136
- return /* @__PURE__ */ n.jsxs("div", { className: q, children: [
137
- /* @__PURE__ */ n.jsxs("label", { className: aa, id: L, htmlFor: c, children: [
138
- C,
139
- R && /* @__PURE__ */ n.jsx(ea, {})
140
- ] }),
141
- y && /* @__PURE__ */ n.jsx("div", { className: a.hint, id: N, children: y }),
142
- f && j && /* @__PURE__ */ n.jsx(
143
- oa,
144
- {
145
- className: a.feedback,
146
- message: j,
147
- type: "invalid",
148
- id: A
149
- }
150
- ),
151
- /* @__PURE__ */ n.jsxs("div", { className: a.wrapper, children: [
152
- s && /* @__PURE__ */ n.jsx(
153
- "span",
154
- {
155
- className: l(D, a.prefix),
156
- ref: g,
157
- "aria-disabled": i,
158
- children: K
159
- }
160
- ),
161
- !s && (r || p) && /* @__PURE__ */ n.jsx(
162
- la,
163
- {
164
- name: r,
165
- theme: "light",
166
- source: p,
167
- className: na,
168
- "aria-hidden": "true"
169
- }
170
- ),
171
- /* @__PURE__ */ n.jsx(
172
- "input",
173
- {
174
- type: o,
175
- className: z,
176
- id: c,
177
- ref: b,
178
- ...$,
179
- style: U,
180
- "aria-labelledby": `${L}${Z}`,
181
- "aria-describedby": f && j ? A : void 0,
182
- "aria-invalid": f,
183
- "aria-disabled": _,
184
- readOnly: _,
185
- required: R,
186
- disabled: i
187
- }
188
- ),
189
- t && /* @__PURE__ */ n.jsx(
190
- "span",
191
- {
192
- className: l(D, a.suffix),
193
- ref: I,
194
- "aria-disabled": i,
195
- children: Q
196
- }
197
- ),
198
- !t && !h && (u || m) && /* @__PURE__ */ n.jsx(
199
- E,
200
- {
201
- hideLabel: !0,
202
- theme: "light",
203
- iconName: u,
204
- variant: "ghost",
205
- className: B,
206
- size: e,
207
- onClick: F,
208
- type: "button",
209
- disabled: i || _,
210
- children: T
211
- }
212
- ),
213
- !t && h && !_ && !i && /* @__PURE__ */ n.jsxs(
214
- E,
215
- {
216
- hideLabel: !0,
217
- theme: "light",
218
- iconName: v(o) ? "calendar" : "clock",
219
- variant: "ghost",
220
- className: B,
221
- size: e,
222
- onClick: ta,
223
- type: "button",
224
- children: [
225
- "Open ",
226
- v(o) ? "date" : "time",
227
- " picker"
228
- ]
229
- }
230
- )
231
- ] })
232
- ] });
233
- };
234
- export {
235
- Ja as DSInput
236
- };
@@ -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 "./asterisk.Cjbk-xZi.js";
7
- import "./button.DPrDynn_.js";
8
- import "./chunks/Input.utils.BGUhXCNP.js";
9
- import "./systemfeedback.CUWch42u.js";
10
- import { D } from "./chunks/InputStepper.DR3NR_II.js";
11
- export {
12
- D as DSInputStepper
13
- };
package/link.CIY7SOpm.js DELETED
@@ -1,115 +0,0 @@
1
- "use client";
2
- import { j as _ } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as g } from "./chunks/index.CvOaL64Y.js";
4
- import { u as i } from "./chunks/useBreakpoint.5xBNDiCf.js";
5
- import { D as F } from "./chunks/Icon.n4XZrQ4N.js";
6
- import './assets/link.BJHmVrew.css';const H = "_root_zrvhl_151", S = "_root--highlight_zrvhl_218", x = "_root--dark-highlight_zrvhl_218", b = "_root--filled_zrvhl_296", j = "_root--outline_zrvhl_324", L = "_root--ghost_zrvhl_351", C = "_root--ghost-flush_zrvhl_376", N = "_root--small_zrvhl_382", T = "_root--dark-filled_zrvhl_459", B = "_root--dark-outline_zrvhl_518", E = "_root--dark-ghost_zrvhl_576", R = "_root--dark-ghost-flush_zrvhl_632", V = "_root--icon-left_zrvhl_691", q = "_root--icon-only_zrvhl_707", w = "_root--icon-only-small_zrvhl_716", A = "_label--hidden_zrvhl_727", o = {
7
- root: H,
8
- "root--highlight": "_root--highlight_zrvhl_218",
9
- rootHighlight: S,
10
- "root--dark-highlight": "_root--dark-highlight_zrvhl_218",
11
- rootDarkHighlight: x,
12
- "root--filled": "_root--filled_zrvhl_296",
13
- rootFilled: b,
14
- "root--outline": "_root--outline_zrvhl_324",
15
- rootOutline: j,
16
- "root--ghost": "_root--ghost_zrvhl_351",
17
- rootGhost: L,
18
- "root--ghost-flush": "_root--ghost-flush_zrvhl_376",
19
- rootGhostFlush: C,
20
- "root--small": "_root--small_zrvhl_382",
21
- rootSmall: N,
22
- "root--dark-filled": "_root--dark-filled_zrvhl_459",
23
- rootDarkFilled: T,
24
- "root--dark-outline": "_root--dark-outline_zrvhl_518",
25
- rootDarkOutline: B,
26
- "root--dark-ghost": "_root--dark-ghost_zrvhl_576",
27
- rootDarkGhost: E,
28
- "root--dark-ghost-flush": "_root--dark-ghost-flush_zrvhl_632",
29
- rootDarkGhostFlush: R,
30
- "root--icon-left": "_root--icon-left_zrvhl_691",
31
- rootIconLeft: V,
32
- "root--icon-only": "_root--icon-only_zrvhl_707",
33
- rootIconOnly: q,
34
- "root--icon-only-small": "_root--icon-only-small_zrvhl_716",
35
- rootIconOnlySmall: w,
36
- "label--hidden": "_label--hidden_zrvhl_727",
37
- labelHidden: A
38
- }, Q = ({
39
- children: c,
40
- aria: k,
41
- className: u,
42
- dataTrackingid: f,
43
- download: z,
44
- hideLabel: h = !1,
45
- href: n,
46
- iconName: a,
47
- iconPosition: m = "left",
48
- iconSource: e,
49
- isFlush: r = !1,
50
- referrerPolicy: v,
51
- rel: D,
52
- size: s = "medium",
53
- target: y = "_self",
54
- theme: l = "light",
55
- variant: t = "filled",
56
- ...G
57
- }) => {
58
- const O = g(o.root, u, {
59
- // variant
60
- [o.rootFilled]: t === "filled",
61
- [o.rootHighlight]: t === "highlight",
62
- [o.rootOutline]: t === "outline",
63
- [o.rootGhost]: t === "ghost" && r !== !0,
64
- // isFlush
65
- [o.rootGhostFlush]: t === "ghost" && r === !0,
66
- // dark theme
67
- [o.rootDarkFilled]: l === "dark" && t === "filled",
68
- [o.rootDarkHighlight]: l === "dark" && t === "highlight",
69
- [o.rootDarkOutline]: l === "dark" && t === "outline",
70
- [o.rootDarkGhost]: l === "dark" && t === "ghost" && r !== !0,
71
- // dark isFlush
72
- [o.rootDarkGhostFlush]: l === "dark" && t === "ghost" && r === !0,
73
- // size
74
- [o.rootSmall]: s === "small",
75
- // icon position
76
- [o.rootIconLeft]: m === "left",
77
- // icon only
78
- [o.rootIconOnly]: i(h) && s === "medium",
79
- [o.rootIconOnlySmall]: i(h) && s === "small"
80
- }), I = g({
81
- // hide label only visually to keep them available for assistive technologies
82
- [o.labelHidden]: i(h)
83
- }), p = l === "light" && t === "filled" || l === "dark" && t === "outline" || l === "dark" && t === "ghost" ? "dark" : "light", d = n === void 0 ? "span" : "a";
84
- return /* @__PURE__ */ _.jsxs(
85
- d,
86
- {
87
- className: O,
88
- "data-trackingid": f,
89
- ...d === "a" && {
90
- href: n,
91
- target: y,
92
- rel: D,
93
- referrerPolicy: v,
94
- download: z
95
- },
96
- ...k,
97
- ...G,
98
- children: [
99
- /* @__PURE__ */ _.jsx("span", { className: I, children: c }),
100
- (a || e) && /* @__PURE__ */ _.jsx(
101
- F,
102
- {
103
- name: a,
104
- theme: p,
105
- source: e,
106
- "aria-hidden": "true"
107
- }
108
- )
109
- ]
110
- }
111
- );
112
- };
113
- export {
114
- Q as DSLink
115
- };
@@ -1,79 +0,0 @@
1
- "use client";
2
- import { j as i } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as x } from "./chunks/index.CvOaL64Y.js";
4
- import { D as H } from "./chunks/Icon.n4XZrQ4N.js";
5
- import "react";
6
- import './assets/linkstandalone.Bx8Uvo0G.css';const j = "_root_79ned_76", v = "_root--highlight_79ned_152", L = "_root--neutral-dark_79ned_228", N = "_root--highlight-dark_79ned_304", I = "_root--active_79ned_380", A = "_root--icon-left_79ned_386", o = {
7
- root: j,
8
- "root--highlight": "_root--highlight_79ned_152",
9
- rootHighlight: v,
10
- "root--neutral-dark": "_root--neutral-dark_79ned_228",
11
- rootNeutralDark: L,
12
- "root--highlight-dark": "_root--highlight-dark_79ned_304",
13
- rootHighlightDark: N,
14
- "root--active": "_root--active_79ned_380",
15
- rootActive: I,
16
- "root--icon-left": "_root--icon-left_79ned_386",
17
- rootIconLeft: A
18
- }, C = ({
19
- children: h,
20
- aria: s,
21
- active: _,
22
- className: g,
23
- dataTrackingid: c,
24
- download: d,
25
- href: e,
26
- iconName: a,
27
- iconPosition: k = "left",
28
- iconSource: n,
29
- referrerPolicy: u,
30
- rel: f,
31
- target: m = "_self",
32
- theme: t = "light",
33
- variant: r = "neutral",
34
- ...D
35
- }) => {
36
- const p = x(o.root, g, {
37
- // variant
38
- [o.rootHighlight]: r === "highlight",
39
- // theme
40
- [o.rootNeutralDark]: t === "dark" && r === "neutral",
41
- [o.rootHighlightDark]: t === "dark" && r === "highlight",
42
- // active
43
- [o.rootActive]: _,
44
- // icon position
45
- [o.rootIconLeft]: k === "left"
46
- }), l = e === void 0 ? "span" : "a";
47
- return /* @__PURE__ */ i.jsxs(
48
- l,
49
- {
50
- className: p,
51
- "data-trackingid": c,
52
- ...l === "a" && {
53
- href: e,
54
- target: m,
55
- rel: f,
56
- referrerPolicy: u,
57
- download: d
58
- },
59
- ...s,
60
- ...D,
61
- children: [
62
- /* @__PURE__ */ i.jsx("span", { className: o.label, children: h }),
63
- (a || n) && /* @__PURE__ */ i.jsx(
64
- H,
65
- {
66
- name: a,
67
- theme: t,
68
- source: n,
69
- size: "medium",
70
- "aria-hidden": "true"
71
- }
72
- )
73
- ]
74
- }
75
- );
76
- };
77
- export {
78
- C as DSLinkStandalone
79
- };
@@ -1,43 +0,0 @@
1
- "use client";
2
- import { j as e } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as s } from "./chunks/index.CvOaL64Y.js";
4
- import { D as _ } from "./chunks/Icon.n4XZrQ4N.js";
5
- import './assets/optioncheckbox.BdRJHcSw.css';const l = "_root_1v9si_151", k = "_root--disabled_1v9si_170", d = "_checkbox_1v9si_174", n = "_icon-check_1v9si_190", r = "_checkbox--checked_1v9si_211", x = "_checkbox--disabled_1v9si_214", m = "_label_1v9si_231", c = {
6
- root: l,
7
- "root--disabled": "_root--disabled_1v9si_170",
8
- rootDisabled: k,
9
- checkbox: d,
10
- "icon-check": "_icon-check_1v9si_190",
11
- iconCheck: n,
12
- "checkbox--checked": "_checkbox--checked_1v9si_211",
13
- checkboxChecked: r,
14
- "checkbox--disabled": "_checkbox--disabled_1v9si_214",
15
- checkboxDisabled: x,
16
- label: m
17
- }, D = ({
18
- label: i,
19
- checked: h,
20
- className: a,
21
- disabled: o
22
- }) => {
23
- const b = s(c.root, {
24
- [c.rootDisabled]: o
25
- }), t = s(c.checkbox, {
26
- [c.checkboxDisabled]: o,
27
- [c.checkboxChecked]: h
28
- });
29
- return /* @__PURE__ */ e.jsx("div", { className: a, children: /* @__PURE__ */ e.jsxs("div", { className: b, children: [
30
- /* @__PURE__ */ e.jsx("span", { className: t, children: /* @__PURE__ */ e.jsx(
31
- _,
32
- {
33
- name: "check",
34
- className: c.iconCheck,
35
- "aria-hidden": "true"
36
- }
37
- ) }),
38
- /* @__PURE__ */ e.jsx("span", { className: c.label, children: i })
39
- ] }) });
40
- };
41
- export {
42
- D as OptionCheckbox
43
- };
package/radio.epf54-sG.js DELETED
@@ -1,115 +0,0 @@
1
- "use client";
2
- import { j as i } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as _ } from "./chunks/index.CvOaL64Y.js";
4
- import { forwardRef as $, useRef as C, useState as E, useEffect as L, useCallback as O } from "react";
5
- import { u as P } from "./chunks/useBreakpoint.5xBNDiCf.js";
6
- import './assets/radio.ewRpPo4W.css';const R = (r) => r.replace(/\s+/g, ""), U = "_radio-root_1f0rc_76", q = "_radio-root--disabled_1f0rc_95", z = "_radio-root--with-custom-area_1f0rc_98", F = "_radio_1f0rc_76", G = "_dot_1f0rc_119", J = "_radio--invalid_1f0rc_143", K = "_label_1f0rc_148", M = "_label--bold_1f0rc_161", Q = "_label--hidden_1f0rc_171", T = "_label--with-custom-area_1f0rc_183", X = "_custom-area_1f0rc_187", Y = "_hint_1f0rc_195", Z = "_hint--visible_1f0rc_217", ee = "_hint--unchecked-hidden_1f0rc_221", te = "_hint--hidden_1f0rc_226", oe = "_input_1f0rc_239", e = {
7
- "radio-root": "_radio-root_1f0rc_76",
8
- radioRoot: U,
9
- "radio-root--disabled": "_radio-root--disabled_1f0rc_95",
10
- radioRootDisabled: q,
11
- "radio-root--with-custom-area": "_radio-root--with-custom-area_1f0rc_98",
12
- radioRootWithCustomArea: z,
13
- radio: F,
14
- dot: G,
15
- "radio--invalid": "_radio--invalid_1f0rc_143",
16
- radioInvalid: J,
17
- label: K,
18
- "label--bold": "_label--bold_1f0rc_161",
19
- labelBold: M,
20
- "label--hidden": "_label--hidden_1f0rc_171",
21
- labelHidden: Q,
22
- "label--with-custom-area": "_label--with-custom-area_1f0rc_183",
23
- labelWithCustomArea: T,
24
- "custom-area": "_custom-area_1f0rc_187",
25
- customArea: X,
26
- hint: Y,
27
- "hint--visible": "_hint--visible_1f0rc_217",
28
- hintVisible: Z,
29
- "hint--unchecked-hidden": "_hint--unchecked-hidden_1f0rc_221",
30
- hintUncheckedHidden: ee,
31
- "hint--hidden": "_hint--hidden_1f0rc_226",
32
- hintHidden: te,
33
- input: oe
34
- }, ie = $(
35
- ({
36
- label: r,
37
- name: f,
38
- value: b,
39
- checked: m,
40
- className: v,
41
- customArea: a,
42
- defaultChecked: x = !1,
43
- disabled: s = !1,
44
- hideLabel: k = !1,
45
- hint: l,
46
- invalid: j = !1,
47
- isBold: N = !1,
48
- hideUncheckedHint: n = !1,
49
- onChange: h,
50
- ...g
51
- }, c) => {
52
- const H = C(null), t = C(null), [w, D] = E(x), u = m !== void 0, d = u ? m : w;
53
- L(() => {
54
- t.current && n && ((t.current.style.height === "0px" || t.current.style.height === "") && d ? (t.current.style.height = `${t.current.scrollHeight}px`, t.current.style.opacity = "1") : (t.current.style.opacity = "0", t.current.style.height = "0px"));
55
- }, [t, d]);
56
- const p = P(k), A = _(
57
- e.radioRoot,
58
- {
59
- [e.radioRootDisabled]: s,
60
- [e.radioRootWithCustomArea]: !!a
61
- },
62
- v
63
- ), W = _(e.label, {
64
- [e.labelBold]: N,
65
- // hide label only visually to keep them available for assistive technologies
66
- [e.labelHidden]: p,
67
- [e.labelWithCustomArea]: !!a
68
- }), B = () => !n && l ? !0 : !!(n && l && d), V = _(e.hint, {
69
- [e.hintHidden]: p,
70
- [e.hintUncheckedHidden]: n,
71
- [e.hintVisible]: B()
72
- }), I = _(e.radio, {
73
- [e.radioInvalid]: j
74
- }), S = O(
75
- (o) => {
76
- if (s) {
77
- o.preventDefault();
78
- return;
79
- }
80
- u || D(o.target.checked), h && h(o);
81
- },
82
- [s, u, h]
83
- ), y = l ? `${R(f)}-${R(b)}-description` : void 0;
84
- return /* @__PURE__ */ i.jsxs("label", { className: A, children: [
85
- /* @__PURE__ */ i.jsx(
86
- "input",
87
- {
88
- type: "radio",
89
- value: b,
90
- name: f,
91
- className: e.input,
92
- ref: (o) => {
93
- typeof c == "function" ? c(o) : c !== null && (c.current = o), H.current = o;
94
- },
95
- onChange: S,
96
- ...g,
97
- disabled: s,
98
- checked: d,
99
- "aria-label": typeof r == "string" ? r : void 0,
100
- "aria-describedby": y
101
- }
102
- ),
103
- /* @__PURE__ */ i.jsx("span", { className: I, children: /* @__PURE__ */ i.jsx("div", { className: e.dot }) }),
104
- /* @__PURE__ */ i.jsxs("span", { className: W, children: [
105
- r,
106
- a && /* @__PURE__ */ i.jsx("div", { className: e.customArea, children: a }),
107
- /* @__PURE__ */ i.jsx("span", { id: y, className: V, ref: t, children: l })
108
- ] })
109
- ] });
110
- }
111
- );
112
- ie.displayName = "DSRadio";
113
- export {
114
- ie as DSRadio
115
- };
@@ -1,65 +0,0 @@
1
- "use client";
2
- import { j as t } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as b } from "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import { D as p } from "./chunks/Icon.n4XZrQ4N.js";
6
- import { DSSpinner as f } from "./spinner.DVa112nj.js";
7
- import './assets/switch.Ds-I_ybT.css';const v = "_root_vzlrg_76", x = "_root--label-right_vzlrg_114", z = "_root--stretched_vzlrg_117", j = "_loader_vzlrg_127", k = "_thumb_vzlrg_180", S = "_root--checked_vzlrg_195", r = {
8
- root: v,
9
- "root--label-right": "_root--label-right_vzlrg_114",
10
- rootLabelRight: x,
11
- "root--stretched": "_root--stretched_vzlrg_117",
12
- rootStretched: z,
13
- switch: "_switch_vzlrg_122",
14
- loader: j,
15
- thumb: k,
16
- "root--checked": "_root--checked_vzlrg_195",
17
- rootChecked: S
18
- }, R = ({
19
- children: l,
20
- aria: h,
21
- alignLabel: i = "left",
22
- checked: e = !1,
23
- className: _,
24
- dataTrackingid: n,
25
- disabled: s = !1,
26
- loading: o = !1,
27
- stretched: d = !1,
28
- onClick: a,
29
- ...m
30
- }) => {
31
- const g = b(r.root, _, {
32
- [r.rootChecked]: e === !0,
33
- [r.rootStretched]: d === !0,
34
- [r.rootLabelRight]: i === "right"
35
- }), u = (c) => {
36
- if (s || o) {
37
- c.preventDefault();
38
- return;
39
- }
40
- a && a(c);
41
- };
42
- return /* @__PURE__ */ t.jsxs(
43
- "button",
44
- {
45
- className: g,
46
- "data-trackingid": n,
47
- onClick: u,
48
- ...h,
49
- ...m,
50
- type: "button",
51
- role: "switch",
52
- "aria-checked": e,
53
- "aria-disabled": s || o,
54
- "aria-busy": o,
55
- children: [
56
- /* @__PURE__ */ t.jsx("span", { children: l }),
57
- !o && /* @__PURE__ */ t.jsx("span", { className: r.switch, children: /* @__PURE__ */ t.jsx("span", { className: r.thumb, children: /* @__PURE__ */ t.jsx(p, { name: "check", "aria-hidden": "true" }) }) }),
58
- o && /* @__PURE__ */ t.jsx("span", { className: r.loader, children: /* @__PURE__ */ t.jsx(f, { aria: { "aria-label": "Loading state" } }) })
59
- ]
60
- }
61
- );
62
- };
63
- export {
64
- R as DSSwitch
65
- };