@stihl-design-system/components 1.0.0-RC.34 → 1.0.0-RC.36
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.
- package/Placeholder.svg +1 -1
- package/{actionbutton.DLQJU6AV.js → actionbutton.Du5CT-Mt.js} +2 -2
- package/{actionlink.DEBrWfN3.js → actionlink.BK9CaQUY.js} +2 -2
- package/assets/Button.CmeGVEAY.css +1 -0
- package/assets/CustomReactSelect.BihX36Uo.css +1 -0
- package/assets/Fieldset.Oqu7pOBv.css +1 -0
- package/assets/InputFile.D7Ihod7B.css +1 -0
- package/assets/InputNumber.z_UqRYdv.css +1 -0
- package/assets/InputPassword.DZENjxJ9.css +1 -0
- package/assets/InputSearch.GBH9Eh6F.css +1 -0
- package/assets/LinkButton.88j5ckLu.css +1 -0
- package/assets/RadioGroup.q1lQ-HIZ.css +1 -0
- package/assets/Select.CL0fqx7X.css +1 -0
- package/assets/Slider.DWLuIsNj.css +1 -0
- package/assets/Textarea.B1HOakic.css +1 -0
- package/assets/buttonround.DBpMesfr.css +1 -0
- package/assets/input.RPDR8qdT.css +1 -0
- package/assets/radio.CsfCywxz.css +1 -0
- package/{banner.CI5HnDqD.js → banner.AhUeW3HM.js} +1 -1
- package/{breadcrumb.CtwAux3P.js → breadcrumb.DpIAQk3r.js} +3 -3
- package/button.CqNYOfSj.js +12 -0
- package/buttonround.9IS0tUqw.js +96 -0
- package/{checkbox.DwccD0Mp.js → checkbox.XYQI-ubx.js} +2 -2
- package/{checkboxgroup.ZiUFfCJ1.js → checkboxgroup.C66ZwglF.js} +2 -2
- package/{chip.B0s_fS8L.js → chip.B-pxhsdb.js} +2 -2
- package/{chipgroup.Dpu66bo5.js → chipgroup.CY3pWyLO.js} +4 -3
- package/chunks/{ActionButton.DOYsEHPr.js → ActionButton.BOYQYo5M.js} +1 -1
- package/chunks/{ActionLink.DbyciN3Y.js → ActionLink.BlwvrnPN.js} +1 -1
- package/chunks/{Breadcrumb.BgnpTo01.js → Breadcrumb.C_Yaz_vw.js} +2 -2
- package/chunks/Button.CQlIao-Z.js +139 -0
- package/chunks/{Checkbox.BcGXAuuP.js → Checkbox.D5X5T6Yg.js} +1 -1
- package/chunks/CheckboxGroup.BIspWqeW.js +74 -0
- package/chunks/{Chip.D6pubCZV.js → Chip.DIp5hdRH.js} +1 -1
- package/chunks/{CustomReactSelect.Dg3wC_VH.js → CustomReactSelect.D4kopDzX.js} +816 -800
- package/chunks/{Dialog.DpqSVrYR.js → Dialog.DMxHRrxo.js} +1 -1
- package/chunks/{Drawer.DISWybOa.js → Drawer.CatmvDHJ.js} +1 -1
- package/chunks/Fieldset.Bk8W5h13.js +81 -0
- package/chunks/{Header.7TQL_J9t.js → Header.18sOO0Gf.js} +1 -1
- package/chunks/{Input.utils.Dkw7gRrr.js → Input.utils.CL1u4Ctq.js} +27 -25
- package/chunks/InputFile.CjK3gEst.js +236 -0
- package/chunks/InputNumber.wfDjnz58.js +242 -0
- package/chunks/InputPassword.Ctb0xbwg.js +121 -0
- package/chunks/InputSearch.C-r5ktR8.js +149 -0
- package/chunks/LinkButton.CWibqvhs.js +140 -0
- package/chunks/{MegaMenu.CQbOeaib.js → MegaMenu.qttkjGbD.js} +7 -8
- package/chunks/{NavigationTabs.BwM-6CRm.js → NavigationTabs.SBNLx87A.js} +1 -1
- package/chunks/{Notification.CrojkJ0E.js → Notification.DYl1rcGu.js} +1 -1
- package/chunks/{Popover.Bb0Pjmvg.js → Popover.C9tT8xkE.js} +9 -10
- package/chunks/RadioGroup.BDsVAhCK.js +125 -0
- package/chunks/Select.BjBPN-6W.js +147 -0
- package/chunks/Slider.Bh2jhGKn.js +306 -0
- package/chunks/{Stepper.PTQdQBYf.js → Stepper.D1Yzw-gL.js} +2 -2
- package/chunks/{Tabs.DyP4whX0.js → Tabs.BvG-OPWa.js} +1 -1
- package/chunks/Textarea.DibBqiam.js +181 -0
- package/chunks/{Toast.ug_RjGgF.js → Toast.ldZRNpGM.js} +1 -1
- package/chunks/floating-ui.react.COTL3jH5.js +2984 -0
- package/chunks/{useBreakpoint.BzR_yaIv.js → useBreakpoint.1txsny17.js} +8 -5
- package/combobox.C2XUM4fM.js +67 -0
- package/components/Button/Button.d.ts +5 -0
- package/components/Button/Button.utils.d.ts +4 -5
- package/components/CheckboxGroup/CheckboxGroup.d.ts +14 -1
- package/components/Combobox/Combobox.utils.d.ts +3 -2
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +13 -0
- package/components/Fieldset/Fieldset.d.ts +14 -1
- package/components/Input/Input.d.ts +13 -0
- package/components/Input/Input.utils.d.ts +2 -2
- package/components/InputFile/InputFile.d.ts +13 -0
- package/components/InputFile/InputFile.utils.d.ts +4 -2
- package/components/InputNumber/InputNumber.d.ts +17 -4
- package/components/InputNumber/InputNumber.utils.d.ts +2 -2
- package/components/InputPassword/InputPassword.d.ts +13 -0
- package/components/InputPassword/InputPassword.utils.d.ts +2 -2
- package/components/InputSearch/InputSearch.d.ts +13 -0
- package/components/InputSearch/InputSearch.utils.d.ts +2 -2
- package/components/LinkButton/LinkButton.d.ts +5 -0
- package/components/LinkButton/LinkButton.utils.d.ts +4 -5
- package/components/RadioGroup/RadioGroup.d.ts +13 -0
- package/components/RadioGroup/RadioGroup.utils.d.ts +3 -2
- package/components/Scroller/Scroller.test.d.ts +1 -0
- package/components/Select/Select.d.ts +13 -0
- package/components/Select/Select.utils.d.ts +2 -2
- package/components/Slider/Slider.d.ts +13 -0
- package/components/Textarea/Textarea.d.ts +13 -0
- package/components/Textarea/Textarea.utils.d.ts +2 -2
- package/{customreactselect.BFN8cYJi.js → customreactselect.BNwzk8Qi.js} +4 -3
- package/{dialog.CzM_Cxp0.js → dialog.D5geKDtZ.js} +2 -2
- package/{drawer._A9MQ8Cj.js → drawer.ucjhpIF4.js} +2 -2
- package/{fieldset.CId-NtI5.js → fieldset.Crx4Cb9a.js} +3 -2
- package/{filelist.DgVuWpR3.js → filelist.Bcu6TZRj.js} +1 -1
- package/{floatingactionbutton.Bsnncudt.js → floatingactionbutton.B5hJ2At2.js} +1 -1
- package/{header.CelAkqtp.js → header.A77yIAH3.js} +1 -1
- package/index.es.js +103 -102
- package/input.DL_M_Pg3.js +190 -0
- package/{inputfile.BjgJGefV.js → inputfile.iwsNHjrc.js} +6 -5
- package/{inputnumber.BcrxBVv0.js → inputnumber.raC_7KIP.js} +7 -6
- package/{inputpassword.CddmBW-T.js → inputpassword.Brte78Sr.js} +4 -4
- package/{inputsearch.CFOASqrd.js → inputsearch.BP0EzFcF.js} +6 -5
- package/{link.f8MMZo-w.js → link.BtZeNdii.js} +2 -2
- package/{linkbutton.BYAvi-_V.js → linkbutton.In_ROT0Z.js} +4 -4
- package/{logo100years.B4d_DIiB.js → logo100years.DDzCrczW.js} +10 -10
- package/{megamenu.Cy9Cc-mC.js → megamenu.BurL9MfF.js} +3 -3
- package/{navigationtabs.Dp7D2fnc.js → navigationtabs.EbmfKv1R.js} +2 -2
- package/{notification.B-norGiB.js → notification.tadg6lCc.js} +2 -2
- package/package.json +4 -3
- package/partials/index.js +32 -32
- package/{popover.DFVDZY-m.js → popover.CXq7VoZt.js} +3 -3
- package/radio.pyM5ma9s.js +134 -0
- package/{radiogroup.DaThoMfq.js → radiogroup.sdob0iPE.js} +3 -3
- package/{scroller.Cu7H_VCT.js → scroller.B1LijjCF.js} +1 -1
- package/{select.CMdKf7tC.js → select.CZ0C3yJD.js} +5 -4
- package/{skiptocontent.CHVh0hbr.js → skiptocontent.CAQy194o.js} +1 -1
- package/slider.B3u5du_Q.js +12 -0
- package/{step.DKf4CHGr.js → step.DaJFsafj.js} +1 -1
- package/{stepper.CCP_igpJ.js → stepper.DcaZESJi.js} +3 -3
- package/styles/scss/ds/lib/ds-internal/_input.scss +12 -3
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +10 -2
- package/styles/scss/ds/lib/link-button.scss +11 -3
- package/{tablist.DZgo49nZ.js → tablist.mX5nQWwH.js} +1 -1
- package/{tabs.BkoT7feH.js → tabs.DjWfks34.js} +2 -2
- package/{textarea.DMn20z4p.js → textarea.69r-5faY.js} +4 -3
- package/{toast.Dvs8woTH.js → toast.FzO5KoiK.js} +2 -2
- package/{toastmanager.pi_Fhd5t.js → toastmanager.BGIYNKkT.js} +1 -1
- package/{tooltip.QJe_bfO-.js → tooltip.Cj3AvYgB.js} +22 -23
- package/{topbar.Bxwvp9Lf.js → topbar.CAujTZAE.js} +2 -2
- package/utils/useIsomorphicLayoutEffect.d.ts +2 -2
- package/assets/Button.C8sNwIeW.css +0 -1
- package/assets/CustomReactSelect.E_jJFVew.css +0 -1
- package/assets/Fieldset.CW9dBvAo.css +0 -1
- package/assets/InputFile.BnIvK65P.css +0 -1
- package/assets/InputNumber.BoiCIR1f.css +0 -1
- package/assets/InputPassword.Dk3_vNLV.css +0 -1
- package/assets/InputSearch.C1_4cVCi.css +0 -1
- package/assets/LinkButton.B86yacK5.css +0 -1
- package/assets/RadioGroup.CM2mYOzc.css +0 -1
- package/assets/Select.COxLltX7.css +0 -1
- package/assets/Slider.DPEmJ3HD.css +0 -1
- package/assets/Textarea.y3MW7VW0.css +0 -1
- package/assets/buttonround.BN3vUDc_.css +0 -1
- package/assets/input.DTu4g_iA.css +0 -1
- package/assets/radio.CgpGvYc-.css +0 -1
- package/button.DHuKanZP.js +0 -13
- package/buttonround.CMlmEDaN.js +0 -96
- package/chunks/Button.DCZgBNmA.js +0 -142
- package/chunks/CheckboxGroup.BuFd1luB.js +0 -72
- package/chunks/Fieldset.DiMtr6Vw.js +0 -74
- package/chunks/InputFile.C8nt9Fu8.js +0 -218
- package/chunks/InputNumber.CbH1XJfl.js +0 -267
- package/chunks/InputPassword.DbdjuSiJ.js +0 -136
- package/chunks/InputSearch.joxmugiv.js +0 -173
- package/chunks/LinkButton.BZgIGgc8.js +0 -132
- package/chunks/RadioGroup.CexC4v2Z.js +0 -104
- package/chunks/Select.BEIdNMML.js +0 -164
- package/chunks/Slider.CR0zYHeZ.js +0 -291
- package/chunks/Textarea.Du2RII5u.js +0 -168
- package/chunks/floating-ui.dom.BT8pKtCQ.js +0 -1005
- package/chunks/floating-ui.react.3FjeMiuN.js +0 -1999
- package/combobox.jG5GRA7C.js +0 -65
- package/input.DuEbg7d6.js +0 -206
- package/radio.DHUfSPai.js +0 -126
- package/slider.C5dK6KcG.js +0 -11
- /package/components/InputNumber/{InputNumberutils.test.d.ts → InputNumber.utils.test.d.ts} +0 -0
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as q, jsxs as rt } from "react/jsx-runtime";
|
|
3
|
-
import { d as ht } from "./index.D-sRdssb.js";
|
|
4
|
-
import { c as J } from "./index.DL9mof6u.js";
|
|
5
|
-
import { forwardRef as vt, useState as yt, useRef as Pt } from "react";
|
|
6
|
-
import { u as St } from "./useBreakpoint.BzR_yaIv.js";
|
|
7
|
-
import { Asterisk as Dt } from "../asterisk.B2ih8VwF.js";
|
|
8
|
-
import { D as Bt } from "./Button.DCZgBNmA.js";
|
|
9
|
-
import { D as It } from "./SystemFeedback.CjlARKki.js";
|
|
10
|
-
import { g as ct } from "./helpers.CexwVao7.js";
|
|
11
|
-
import '../assets/InputPassword.Dk3_vNLV.css';const gt = "ds-input-password_input_22l92_1", kt = "ds-input-password_input--small_22l92_9", Nt = "ds-input-password_input--invalid_22l92_121", xt = "ds-input-password_input--has-action-button_22l92_182", Ct = "ds-input-password_root_22l92_218", Ht = "ds-input-password_hint_22l92_218", Lt = "ds-input-password_label_22l92_218", $t = "ds-input-password_wrapper_22l92_222", qt = "ds-input-password_action-button_22l92_228", At = "ds-input-password_label--hidden_22l92_246", Tt = "ds-input-password_label--disabled_22l92_259", Et = "ds-input-password_feedback_22l92_279", s = {
|
|
12
|
-
input: gt,
|
|
13
|
-
inputSmall: kt,
|
|
14
|
-
inputInvalid: Nt,
|
|
15
|
-
inputHasActionButton: xt,
|
|
16
|
-
root: Ct,
|
|
17
|
-
hint: Ht,
|
|
18
|
-
label: Lt,
|
|
19
|
-
wrapper: $t,
|
|
20
|
-
actionButton: qt,
|
|
21
|
-
labelHidden: At,
|
|
22
|
-
labelDisabled: Tt,
|
|
23
|
-
feedback: Et
|
|
24
|
-
}, Vt = ({
|
|
25
|
-
id: d,
|
|
26
|
-
label: i
|
|
27
|
-
}) => {
|
|
28
|
-
if (!d)
|
|
29
|
-
throw new Error(ct("DSInputPassword", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputPassword component.'));
|
|
30
|
-
if (!i)
|
|
31
|
-
throw new Error(ct("DSInputPassword", `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}.`));
|
|
32
|
-
}, Ft = vt((d, i) => {
|
|
33
|
-
const t = ht.c(82);
|
|
34
|
-
let c, n, e, r, p, l, B, I, g, k, N, x, C, u;
|
|
35
|
-
t[0] !== d ? ({
|
|
36
|
-
id: e,
|
|
37
|
-
label: r,
|
|
38
|
-
autoComplete: B,
|
|
39
|
-
className: c,
|
|
40
|
-
disabled: I,
|
|
41
|
-
hint: n,
|
|
42
|
-
hideLabel: g,
|
|
43
|
-
invalid: k,
|
|
44
|
-
readonly: N,
|
|
45
|
-
required: x,
|
|
46
|
-
togglePasswordVisibilityButtonProps: u,
|
|
47
|
-
size: C,
|
|
48
|
-
systemFeedback: l,
|
|
49
|
-
...p
|
|
50
|
-
} = d, t[0] = d, t[1] = c, t[2] = n, t[3] = e, t[4] = r, t[5] = p, t[6] = l, t[7] = B, t[8] = I, t[9] = g, t[10] = k, t[11] = N, t[12] = x, t[13] = C, t[14] = u) : (c = t[1], n = t[2], e = t[3], r = t[4], p = t[5], l = t[6], B = t[7], I = t[8], g = t[9], k = t[10], N = t[11], x = t[12], C = t[13], u = t[14]);
|
|
51
|
-
const K = B === void 0 ? "new-password" : B, a = I === void 0 ? !1 : I, pt = g === void 0 ? !1 : g, o = k === void 0 ? !1 : k, A = N === void 0 ? !1 : N, b = x === void 0 ? !1 : x, H = C === void 0 ? "medium" : C;
|
|
52
|
-
process.env.NODE_ENV !== "production" && Vt({
|
|
53
|
-
id: e,
|
|
54
|
-
label: r
|
|
55
|
-
});
|
|
56
|
-
let f;
|
|
57
|
-
t[15] !== u ? (f = u || {}, t[15] = u, t[16] = f) : f = t[16];
|
|
58
|
-
let m, L, $;
|
|
59
|
-
t[17] !== f ? ({
|
|
60
|
-
hidePasswordText: $,
|
|
61
|
-
showPasswordText: L,
|
|
62
|
-
...m
|
|
63
|
-
} = f, t[17] = f, t[18] = m, t[19] = L, t[20] = $) : (m = t[18], L = t[19], $ = t[20]);
|
|
64
|
-
const ut = $ === void 0 ? "Hide password" : $, bt = L === void 0 ? "Show password" : L, [Q, ft] = yt(!1), T = `${e}-label`, w = `${e}-feedback`, E = `${e}-hint`, mt = n ? ` ${E}` : "";
|
|
65
|
-
let V;
|
|
66
|
-
t[21] !== o || t[22] !== l || t[23] !== w ? (V = [o && l && w].filter(Boolean).join(" ") || void 0, t[21] = o, t[22] = l, t[23] = w, t[24] = V) : V = t[24];
|
|
67
|
-
const U = V, W = St(pt);
|
|
68
|
-
let F;
|
|
69
|
-
t[25] !== c ? (F = J(s.root, c), t[25] = c, t[26] = F) : F = t[26];
|
|
70
|
-
const X = F, Y = H === "small";
|
|
71
|
-
let R;
|
|
72
|
-
t[27] !== o || t[28] !== Y ? (R = J(s.input, {
|
|
73
|
-
[s.inputSmall]: Y,
|
|
74
|
-
[s.inputInvalid]: o,
|
|
75
|
-
[s.inputHasActionButton]: !0
|
|
76
|
-
}), t[27] = o, t[28] = Y, t[29] = R) : R = t[29];
|
|
77
|
-
const Z = R;
|
|
78
|
-
let j;
|
|
79
|
-
t[30] !== a || t[31] !== W ? (j = J(s.label, {
|
|
80
|
-
[s.labelHidden]: W,
|
|
81
|
-
[s.labelDisabled]: a
|
|
82
|
-
}), t[30] = a, t[31] = W, t[32] = j) : j = t[32];
|
|
83
|
-
const tt = j, et = H === "small";
|
|
84
|
-
let z;
|
|
85
|
-
t[33] !== et ? (z = J(s.actionButton, {
|
|
86
|
-
[s.actionButtonSmall]: et
|
|
87
|
-
}), t[33] = et, t[34] = z) : z = t[34];
|
|
88
|
-
const st = z, wt = Pt(null);
|
|
89
|
-
let O;
|
|
90
|
-
t[35] !== i ? (O = (dt) => {
|
|
91
|
-
wt.current = dt, typeof i == "function" ? i(dt) : i && (i.current = dt);
|
|
92
|
-
}, t[35] = i, t[36] = O) : O = t[36];
|
|
93
|
-
const ot = O;
|
|
94
|
-
let M;
|
|
95
|
-
t[37] === Symbol.for("react.memo_cache_sentinel") ? (M = () => {
|
|
96
|
-
ft(Rt);
|
|
97
|
-
}, t[37] = M) : M = t[37];
|
|
98
|
-
const _t = M;
|
|
99
|
-
let _;
|
|
100
|
-
t[38] !== b ? (_ = b && /* @__PURE__ */ q(Dt, {}), t[38] = b, t[39] = _) : _ = t[39];
|
|
101
|
-
let h;
|
|
102
|
-
t[40] !== e || t[41] !== T || t[42] !== r || t[43] !== tt || t[44] !== _ ? (h = /* @__PURE__ */ rt("label", { className: tt, id: T, htmlFor: e, children: [
|
|
103
|
-
r,
|
|
104
|
-
_
|
|
105
|
-
] }), t[40] = e, t[41] = T, t[42] = r, t[43] = tt, t[44] = _, t[45] = h) : h = t[45];
|
|
106
|
-
let v;
|
|
107
|
-
t[46] !== n || t[47] !== E ? (v = n && /* @__PURE__ */ q("div", { className: s.hint, id: E, children: n }), t[46] = n, t[47] = E, t[48] = v) : v = t[48];
|
|
108
|
-
const lt = `${T}${mt}`, at = Q ? "text" : "password";
|
|
109
|
-
let y;
|
|
110
|
-
t[49] !== U || t[50] !== K || t[51] !== a || t[52] !== ot || t[53] !== e || t[54] !== Z || t[55] !== o || t[56] !== A || t[57] !== b || t[58] !== p || t[59] !== lt || t[60] !== at ? (y = /* @__PURE__ */ q("input", { className: Z, id: e, ...p, ref: ot, "aria-labelledby": lt, "aria-describedby": U, "aria-invalid": o, "aria-disabled": A, readOnly: A, required: b, disabled: a, autoComplete: K, type: at }), t[49] = U, t[50] = K, t[51] = a, t[52] = ot, t[53] = e, t[54] = Z, t[55] = o, t[56] = A, t[57] = b, t[58] = p, t[59] = lt, t[60] = at, t[61] = y) : y = t[61];
|
|
111
|
-
const it = Q ? "eye-closed" : "eye", nt = Q ? ut : bt;
|
|
112
|
-
let P;
|
|
113
|
-
t[62] !== st || t[63] !== a || t[64] !== m || t[65] !== H || t[66] !== it || t[67] !== nt ? (P = /* @__PURE__ */ q(Bt, { ...m, hideLabel: !0, theme: "light", iconName: it, variant: "ghost", className: st, size: H, onClick: _t, type: "button", disabled: a, children: nt }), t[62] = st, t[63] = a, t[64] = m, t[65] = H, t[66] = it, t[67] = nt, t[68] = P) : P = t[68];
|
|
114
|
-
let S;
|
|
115
|
-
t[69] !== y || t[70] !== P ? (S = /* @__PURE__ */ rt("div", { className: s.wrapper, children: [
|
|
116
|
-
y,
|
|
117
|
-
P
|
|
118
|
-
] }), t[69] = y, t[70] = P, t[71] = S) : S = t[71];
|
|
119
|
-
let D;
|
|
120
|
-
t[72] !== o || t[73] !== l || t[74] !== w ? (D = o && l && /* @__PURE__ */ q(It, { className: s.feedback, message: l, variant: "error", id: w }), t[72] = o, t[73] = l, t[74] = w, t[75] = D) : D = t[75];
|
|
121
|
-
let G;
|
|
122
|
-
return t[76] !== X || t[77] !== h || t[78] !== v || t[79] !== S || t[80] !== D ? (G = /* @__PURE__ */ rt("div", { className: X, children: [
|
|
123
|
-
h,
|
|
124
|
-
v,
|
|
125
|
-
S,
|
|
126
|
-
D
|
|
127
|
-
] }), t[76] = X, t[77] = h, t[78] = v, t[79] = S, t[80] = D, t[81] = G) : G = t[81], G;
|
|
128
|
-
});
|
|
129
|
-
Ft.displayName = "DSInputPassword";
|
|
130
|
-
function Rt(d) {
|
|
131
|
-
return !d;
|
|
132
|
-
}
|
|
133
|
-
export {
|
|
134
|
-
Ft as D,
|
|
135
|
-
Vt as v
|
|
136
|
-
};
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as L, jsxs as gt } from "react/jsx-runtime";
|
|
3
|
-
import { d as Pt } from "./index.D-sRdssb.js";
|
|
4
|
-
import { c as R } from "./index.DL9mof6u.js";
|
|
5
|
-
import { forwardRef as Vt, useState as Ot, useRef as wt, useEffect as Et } from "react";
|
|
6
|
-
import { g as qt, a as $t } from "./helpers.CexwVao7.js";
|
|
7
|
-
import { u as jt } from "./useBreakpoint.BzR_yaIv.js";
|
|
8
|
-
import { Asterisk as xt } from "../asterisk.B2ih8VwF.js";
|
|
9
|
-
import { D as kt } from "./Button.DCZgBNmA.js";
|
|
10
|
-
import { D as Ft } from "./SystemFeedback.CjlARKki.js";
|
|
11
|
-
import '../assets/InputSearch.C1_4cVCi.css';const Rt = "ds-input-search_input_142qf_1", Tt = "ds-input-search_input--small_142qf_9", zt = "ds-input-search_input--invalid_142qf_121", Mt = "ds-input-search_input--has-action-button_142qf_182", Wt = "ds-input-search_input--has-second-action-button_142qf_185", Gt = "ds-input-search_root_142qf_218", Jt = "ds-input-search_hint_142qf_218", Kt = "ds-input-search_label_142qf_218", Qt = "ds-input-search_wrapper_142qf_222", Ut = "ds-input-search_action-button_142qf_228", Xt = "ds-input-search_second-action-button_142qf_232", Yt = "ds-input-search_label--hidden_142qf_250", Zt = "ds-input-search_label--disabled_142qf_263", te = "ds-input-search_feedback_142qf_283", s = {
|
|
12
|
-
input: Rt,
|
|
13
|
-
inputSmall: Tt,
|
|
14
|
-
inputInvalid: zt,
|
|
15
|
-
inputHasActionButton: Mt,
|
|
16
|
-
inputHasSecondActionButton: Wt,
|
|
17
|
-
root: Gt,
|
|
18
|
-
hint: Jt,
|
|
19
|
-
label: Kt,
|
|
20
|
-
wrapper: Qt,
|
|
21
|
-
actionButton: Ut,
|
|
22
|
-
secondActionButton: Xt,
|
|
23
|
-
labelHidden: Yt,
|
|
24
|
-
labelDisabled: Zt,
|
|
25
|
-
feedback: te
|
|
26
|
-
}, ee = ({
|
|
27
|
-
id: a,
|
|
28
|
-
label: i
|
|
29
|
-
}) => {
|
|
30
|
-
if (!a)
|
|
31
|
-
throw new Error(qt("DSInputSearch", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputSearch component.'));
|
|
32
|
-
if (!i)
|
|
33
|
-
throw new Error(qt("DSInputSearch", `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}.`));
|
|
34
|
-
}, se = (a) => !!$t(a, "form"), ne = Vt((a, i) => {
|
|
35
|
-
const t = Pt.c(103);
|
|
36
|
-
let c, d, e, h, b, m, _, o, H, P, V, O, $, j, x, p;
|
|
37
|
-
t[0] !== a ? ({
|
|
38
|
-
id: e,
|
|
39
|
-
label: h,
|
|
40
|
-
className: c,
|
|
41
|
-
clearButtonLabel: H,
|
|
42
|
-
disabled: P,
|
|
43
|
-
hint: d,
|
|
44
|
-
hideLabel: V,
|
|
45
|
-
invalid: O,
|
|
46
|
-
readonly: $,
|
|
47
|
-
required: j,
|
|
48
|
-
size: x,
|
|
49
|
-
systemFeedback: o,
|
|
50
|
-
value: p,
|
|
51
|
-
submitButtonProps: _,
|
|
52
|
-
onChange: b,
|
|
53
|
-
...m
|
|
54
|
-
} = a, t[0] = a, t[1] = c, t[2] = d, t[3] = e, t[4] = h, t[5] = b, t[6] = m, t[7] = _, t[8] = o, t[9] = H, t[10] = P, t[11] = V, t[12] = O, t[13] = $, t[14] = j, t[15] = x, t[16] = p) : (c = t[1], d = t[2], e = t[3], h = t[4], b = t[5], m = t[6], _ = t[7], o = t[8], H = t[9], P = t[10], V = t[11], O = t[12], $ = t[13], j = t[14], x = t[15], p = t[16]);
|
|
55
|
-
const lt = H === void 0 ? "Clear search field" : H, l = P === void 0 ? !1 : P, At = V === void 0 ? !1 : V, n = O === void 0 ? !1 : O, r = $ === void 0 ? !1 : $, v = j === void 0 ? !1 : j, u = x === void 0 ? "medium" : x;
|
|
56
|
-
process.env.NODE_ENV !== "production" && ee({
|
|
57
|
-
id: e,
|
|
58
|
-
label: h
|
|
59
|
-
});
|
|
60
|
-
let S;
|
|
61
|
-
t[17] !== _ ? (S = _ || {}, t[17] = _, t[18] = S) : S = t[18];
|
|
62
|
-
let y, B, F;
|
|
63
|
-
t[19] !== S ? ({
|
|
64
|
-
label: F,
|
|
65
|
-
onClick: y,
|
|
66
|
-
...B
|
|
67
|
-
} = S, t[19] = S, t[20] = y, t[21] = B, t[22] = F) : (y = t[20], B = t[21], F = t[22]);
|
|
68
|
-
const ot = F === void 0 ? "Search" : F, [D, Nt] = Ot(p), ct = wt(null), T = wt(null);
|
|
69
|
-
let z;
|
|
70
|
-
t[23] !== i ? (z = (f) => {
|
|
71
|
-
T.current = f, typeof i == "function" ? i(f) : i && (i.current = f);
|
|
72
|
-
}, t[23] = i, t[24] = z) : z = t[24];
|
|
73
|
-
const rt = z, ut = jt(At);
|
|
74
|
-
let M, W;
|
|
75
|
-
t[25] !== p ? (M = () => {
|
|
76
|
-
Nt(p);
|
|
77
|
-
}, W = [p], t[25] = p, t[26] = M, t[27] = W) : (M = t[26], W = t[27]), Et(M, W);
|
|
78
|
-
let G;
|
|
79
|
-
t[28] !== e ? (G = () => {
|
|
80
|
-
ct.current && !se(ct.current) && process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.warn(qt("DSInputSearch", `The DSInputSearch component with the id "${e}" is not within a form element. This may cause issues with form submission. Please ensure the DSInputSearch component is within a form element.`));
|
|
81
|
-
}, t[28] = e, t[29] = G) : G = t[29];
|
|
82
|
-
let J;
|
|
83
|
-
t[30] === Symbol.for("react.memo_cache_sentinel") ? (J = [], t[30] = J) : J = t[30], Et(G, J);
|
|
84
|
-
const K = `${e}-label`, I = `${e}-feedback`, Q = `${e}-hint`, Ct = d ? ` ${Q}` : "";
|
|
85
|
-
let U;
|
|
86
|
-
t[31] !== n || t[32] !== o || t[33] !== I ? (U = [n && o && I].filter(Boolean).join(" ") || void 0, t[31] = n, t[32] = o, t[33] = I, t[34] = U) : U = t[34];
|
|
87
|
-
const dt = U, X = D !== "" && D !== void 0 && D !== null;
|
|
88
|
-
let Y;
|
|
89
|
-
t[35] !== c ? (Y = R(s.root, c), t[35] = c, t[36] = Y) : Y = t[36];
|
|
90
|
-
const pt = Y, ft = u === "small", ht = X && !r && !l;
|
|
91
|
-
let Z;
|
|
92
|
-
t[37] !== n || t[38] !== ft || t[39] !== ht ? (Z = R(s.input, {
|
|
93
|
-
[s.inputSmall]: ft,
|
|
94
|
-
[s.inputInvalid]: n,
|
|
95
|
-
[s.inputHasActionButton]: !0,
|
|
96
|
-
[s.inputHasSecondActionButton]: ht
|
|
97
|
-
}), t[37] = n, t[38] = ft, t[39] = ht, t[40] = Z) : Z = t[40];
|
|
98
|
-
const bt = Z;
|
|
99
|
-
let tt;
|
|
100
|
-
t[41] !== l || t[42] !== ut ? (tt = R(s.label, {
|
|
101
|
-
[s.labelHidden]: ut,
|
|
102
|
-
[s.labelDisabled]: l
|
|
103
|
-
}), t[41] = l, t[42] = ut, t[43] = tt) : tt = t[43];
|
|
104
|
-
const mt = tt, _t = u === "small";
|
|
105
|
-
let et;
|
|
106
|
-
t[44] !== _t ? (et = R(s.actionButton, {
|
|
107
|
-
[s.actionButtonSmall]: _t
|
|
108
|
-
}), t[44] = _t, t[45] = et) : et = t[45];
|
|
109
|
-
const vt = et, St = u === "small";
|
|
110
|
-
let st;
|
|
111
|
-
t[46] !== St ? (st = R(s.secondActionButton, {
|
|
112
|
-
[s.secondActionButtonSmall]: St
|
|
113
|
-
}), t[46] = St, t[47] = st) : st = t[47];
|
|
114
|
-
const yt = st, Lt = ae;
|
|
115
|
-
let nt;
|
|
116
|
-
t[48] === Symbol.for("react.memo_cache_sentinel") ? (nt = () => {
|
|
117
|
-
if (!T.current)
|
|
118
|
-
return;
|
|
119
|
-
Lt(T.current, "");
|
|
120
|
-
const f = new Event("change", {
|
|
121
|
-
bubbles: !0
|
|
122
|
-
});
|
|
123
|
-
T.current?.dispatchEvent(f);
|
|
124
|
-
}, t[48] = nt) : nt = t[48];
|
|
125
|
-
const Ht = nt;
|
|
126
|
-
let at;
|
|
127
|
-
t[49] !== b ? (at = (f) => {
|
|
128
|
-
Nt(f.target.value), b && b(f);
|
|
129
|
-
}, t[49] = b, t[50] = at) : at = t[50];
|
|
130
|
-
const Bt = at;
|
|
131
|
-
let g;
|
|
132
|
-
t[51] !== v ? (g = v && /* @__PURE__ */ L(xt, {}), t[51] = v, t[52] = g) : g = t[52];
|
|
133
|
-
let q;
|
|
134
|
-
t[53] !== e || t[54] !== K || t[55] !== h || t[56] !== mt || t[57] !== g ? (q = /* @__PURE__ */ gt("label", { className: mt, id: K, htmlFor: e, children: [
|
|
135
|
-
h,
|
|
136
|
-
g
|
|
137
|
-
] }), t[53] = e, t[54] = K, t[55] = h, t[56] = mt, t[57] = g, t[58] = q) : q = t[58];
|
|
138
|
-
let N;
|
|
139
|
-
t[59] !== d || t[60] !== Q ? (N = d && /* @__PURE__ */ L("div", { className: s.hint, id: Q, children: d }), t[59] = d, t[60] = Q, t[61] = N) : N = t[61];
|
|
140
|
-
const Dt = `${K}${Ct}`;
|
|
141
|
-
let w;
|
|
142
|
-
t[62] !== dt || t[63] !== l || t[64] !== rt || t[65] !== Bt || t[66] !== e || t[67] !== bt || t[68] !== D || t[69] !== n || t[70] !== r || t[71] !== v || t[72] !== m || t[73] !== Dt ? (w = /* @__PURE__ */ L("input", { className: bt, id: e, ...m, ref: rt, "aria-labelledby": Dt, "aria-describedby": dt, "aria-invalid": n, "aria-disabled": r, readOnly: r, required: v, disabled: l, type: "search", value: D, onChange: Bt }), t[62] = dt, t[63] = l, t[64] = rt, t[65] = Bt, t[66] = e, t[67] = bt, t[68] = D, t[69] = n, t[70] = r, t[71] = v, t[72] = m, t[73] = Dt, t[74] = w) : w = t[74];
|
|
143
|
-
let E;
|
|
144
|
-
t[75] !== yt || t[76] !== lt || t[77] !== l || t[78] !== X || t[79] !== r || t[80] !== u ? (E = X && !r && !l && /* @__PURE__ */ L(kt, { hideLabel: !0, theme: "light", iconName: "cross", className: yt, variant: "ghost", size: u, onClick: Ht, type: "button", tabIndex: -1, children: lt }), t[75] = yt, t[76] = lt, t[77] = l, t[78] = X, t[79] = r, t[80] = u, t[81] = E) : E = t[81];
|
|
145
|
-
const It = l || r;
|
|
146
|
-
let k;
|
|
147
|
-
t[82] !== y || t[83] !== B || t[84] !== u || t[85] !== vt || t[86] !== ot || t[87] !== It ? (k = /* @__PURE__ */ L(kt, { ...B, hideLabel: !0, theme: "light", iconName: "magnifying-glass", className: vt, variant: "ghost", size: u, onClick: y, type: "submit", disabled: It, children: ot }), t[82] = y, t[83] = B, t[84] = u, t[85] = vt, t[86] = ot, t[87] = It, t[88] = k) : k = t[88];
|
|
148
|
-
let A;
|
|
149
|
-
t[89] !== w || t[90] !== E || t[91] !== k ? (A = /* @__PURE__ */ gt("div", { className: s.wrapper, children: [
|
|
150
|
-
w,
|
|
151
|
-
E,
|
|
152
|
-
k
|
|
153
|
-
] }), t[89] = w, t[90] = E, t[91] = k, t[92] = A) : A = t[92];
|
|
154
|
-
let C;
|
|
155
|
-
t[93] !== n || t[94] !== o || t[95] !== I ? (C = n && o && /* @__PURE__ */ L(Ft, { className: s.feedback, message: o, variant: "error", id: I }), t[93] = n, t[94] = o, t[95] = I, t[96] = C) : C = t[96];
|
|
156
|
-
let it;
|
|
157
|
-
return t[97] !== pt || t[98] !== q || t[99] !== N || t[100] !== A || t[101] !== C ? (it = /* @__PURE__ */ gt("div", { className: pt, ref: ct, children: [
|
|
158
|
-
q,
|
|
159
|
-
N,
|
|
160
|
-
A,
|
|
161
|
-
C
|
|
162
|
-
] }), t[97] = pt, t[98] = q, t[99] = N, t[100] = A, t[101] = C, t[102] = it) : it = t[102], it;
|
|
163
|
-
});
|
|
164
|
-
ne.displayName = "DSInputSearch";
|
|
165
|
-
function ae(a, i) {
|
|
166
|
-
const t = Object.getPrototypeOf(a), c = Object.getOwnPropertyDescriptor(t, "value");
|
|
167
|
-
c?.set ? c.set.call(a, i) : a.value = i;
|
|
168
|
-
}
|
|
169
|
-
export {
|
|
170
|
-
ne as D,
|
|
171
|
-
se as i,
|
|
172
|
-
ee as v
|
|
173
|
-
};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as go, jsx as z } from "react/jsx-runtime";
|
|
3
|
-
import { d as ko } from "./index.D-sRdssb.js";
|
|
4
|
-
import { c as ao } from "./index.DL9mof6u.js";
|
|
5
|
-
import { forwardRef as mo } from "react";
|
|
6
|
-
import { u as co } from "./useBreakpoint.BzR_yaIv.js";
|
|
7
|
-
import { D as fo } from "./Icon.CDLyB7Pv.js";
|
|
8
|
-
import { Tooltip as ho } from "../tooltip.QJe_bfO-.js";
|
|
9
|
-
import { g as uo } from "./helpers.CexwVao7.js";
|
|
10
|
-
import '../assets/LinkButton.B86yacK5.css';const bo = "ds-link-button_root_oblg9_1", vo = "ds-link-button_root--highlight_oblg9_75", po = "ds-link-button_root--dark-highlight_oblg9_75", Do = "ds-link-button_root--filled_oblg9_151", No = "ds-link-button_root--outline_oblg9_179", Oo = "ds-link-button_root--ghost_oblg9_206", Lo = "ds-link-button_root--ghost-flush_oblg9_231", So = "ds-link-button_root--small_oblg9_237", Fo = "ds-link-button_root--navigation_oblg9_317", Io = "ds-link-button_root--dark-filled_oblg9_393", Go = "ds-link-button_root--dark-outline_oblg9_450", yo = "ds-link-button_root--dark-ghost_oblg9_506", Bo = "ds-link-button_root--dark-ghost-flush_oblg9_560", Ho = "ds-link-button_root--icon-left_oblg9_635", To = "ds-link-button_root--icon-only_oblg9_638", wo = "ds-link-button_root--icon-only-small_oblg9_647", Eo = "ds-link-button_icon--navigation_oblg9_659", Po = "ds-link-button_label--hidden_oblg9_667", l = {
|
|
11
|
-
root: bo,
|
|
12
|
-
rootHighlight: vo,
|
|
13
|
-
rootDarkHighlight: po,
|
|
14
|
-
rootFilled: Do,
|
|
15
|
-
rootOutline: No,
|
|
16
|
-
rootGhost: Oo,
|
|
17
|
-
rootGhostFlush: Lo,
|
|
18
|
-
rootSmall: So,
|
|
19
|
-
rootNavigation: Fo,
|
|
20
|
-
rootDarkFilled: Io,
|
|
21
|
-
rootDarkOutline: Go,
|
|
22
|
-
rootDarkGhost: yo,
|
|
23
|
-
rootDarkGhostFlush: Bo,
|
|
24
|
-
rootIconLeft: Ho,
|
|
25
|
-
rootIconOnly: To,
|
|
26
|
-
rootIconOnlySmall: wo,
|
|
27
|
-
iconNavigation: Eo,
|
|
28
|
-
labelHidden: Po
|
|
29
|
-
}, Zo = ["medium", "small"], $o = ["filled", "highlight", "outline", "ghost", "navigation"], Ao = ({
|
|
30
|
-
variant: D,
|
|
31
|
-
size: N,
|
|
32
|
-
theme: o
|
|
33
|
-
}) => {
|
|
34
|
-
if (D === "navigation" && (N === "small" && console.warn(uo("DSLinkButton", 'A "size" prop should not be used in combination with variant="navigation". Please remove the "size" prop.')), o === "dark"))
|
|
35
|
-
throw new Error(uo("DSLinkButton", 'A DSLinkButton with variant="navigation" does not support theme="dark". Please remove the "theme" prop.'));
|
|
36
|
-
}, xo = mo((D, N) => {
|
|
37
|
-
const o = ko.c(71);
|
|
38
|
-
let a, c, d, h, i, s, e, g, u, _, O, L, S, F, I, G, y, r;
|
|
39
|
-
o[0] !== D ? ({
|
|
40
|
-
children: c,
|
|
41
|
-
aria: a,
|
|
42
|
-
className: d,
|
|
43
|
-
download: h,
|
|
44
|
-
hideLabel: O,
|
|
45
|
-
href: i,
|
|
46
|
-
iconName: s,
|
|
47
|
-
iconPosition: L,
|
|
48
|
-
iconSource: e,
|
|
49
|
-
isFlush: S,
|
|
50
|
-
referrerPolicy: g,
|
|
51
|
-
rel: u,
|
|
52
|
-
size: F,
|
|
53
|
-
target: I,
|
|
54
|
-
theme: G,
|
|
55
|
-
variant: y,
|
|
56
|
-
tooltip: r,
|
|
57
|
-
..._
|
|
58
|
-
} = D, o[0] = D, o[1] = a, o[2] = c, o[3] = d, o[4] = h, o[5] = i, o[6] = s, o[7] = e, o[8] = g, o[9] = u, o[10] = _, o[11] = O, o[12] = L, o[13] = S, o[14] = F, o[15] = I, o[16] = G, o[17] = y, o[18] = r) : (a = o[1], c = o[2], d = o[3], h = o[4], i = o[5], s = o[6], e = o[7], g = o[8], u = o[9], _ = o[10], O = o[11], L = o[12], S = o[13], F = o[14], I = o[15], G = o[16], y = o[17], r = o[18]);
|
|
59
|
-
const C = O === void 0 ? !1 : O, _o = L === void 0 ? "left" : L, B = S === void 0 ? !1 : S, H = F === void 0 ? "medium" : F, V = I === void 0 ? "_self" : I, n = G === void 0 ? "light" : G, t = y === void 0 ? "filled" : y;
|
|
60
|
-
process.env.NODE_ENV !== "production" && Ao({
|
|
61
|
-
variant: t,
|
|
62
|
-
size: H,
|
|
63
|
-
theme: n
|
|
64
|
-
});
|
|
65
|
-
const j = t === "filled", K = t === "highlight", R = t === "outline", U = t === "ghost" && B !== !0, M = t === "navigation", Z = t === "ghost" && B === !0, $ = n === "dark" && t === "filled", q = n === "dark" && t === "highlight", J = n === "dark" && t === "outline", Q = n === "dark" && t === "ghost" && B !== !0, W = n === "dark" && t === "ghost" && B === !0, X = H === "small" || t === "navigation", Y = _o === "left", oo = co(C) && H === "medium" && t !== "navigation", to = co(C) && H === "small" && t !== "navigation";
|
|
66
|
-
let T;
|
|
67
|
-
o[19] !== d || o[20] !== R || o[21] !== U || o[22] !== M || o[23] !== Z || o[24] !== $ || o[25] !== q || o[26] !== J || o[27] !== Q || o[28] !== W || o[29] !== X || o[30] !== Y || o[31] !== oo || o[32] !== to || o[33] !== j || o[34] !== K ? (T = ao(l.root, d, {
|
|
68
|
-
[l.rootFilled]: j,
|
|
69
|
-
[l.rootHighlight]: K,
|
|
70
|
-
[l.rootOutline]: R,
|
|
71
|
-
[l.rootGhost]: U,
|
|
72
|
-
[l.rootNavigation]: M,
|
|
73
|
-
[l.rootGhostFlush]: Z,
|
|
74
|
-
[l.rootDarkFilled]: $,
|
|
75
|
-
[l.rootDarkHighlight]: q,
|
|
76
|
-
[l.rootDarkOutline]: J,
|
|
77
|
-
[l.rootDarkGhost]: Q,
|
|
78
|
-
[l.rootDarkGhostFlush]: W,
|
|
79
|
-
[l.rootSmall]: X,
|
|
80
|
-
[l.rootIconLeft]: Y,
|
|
81
|
-
[l.rootIconOnly]: oo,
|
|
82
|
-
[l.rootIconOnlySmall]: to
|
|
83
|
-
}), o[19] = d, o[20] = R, o[21] = U, o[22] = M, o[23] = Z, o[24] = $, o[25] = q, o[26] = J, o[27] = Q, o[28] = W, o[29] = X, o[30] = Y, o[31] = oo, o[32] = to, o[33] = j, o[34] = K, o[35] = T) : T = o[35];
|
|
84
|
-
const lo = T, no = co(C) && t !== "navigation";
|
|
85
|
-
let w;
|
|
86
|
-
o[36] !== no ? (w = ao({
|
|
87
|
-
[l.labelHidden]: no
|
|
88
|
-
}), o[36] = no, o[37] = w) : w = o[37];
|
|
89
|
-
const io = w, so = t === "navigation";
|
|
90
|
-
let E;
|
|
91
|
-
o[38] !== so ? (E = ao({
|
|
92
|
-
[l.iconNavigation]: so
|
|
93
|
-
}), o[38] = so, o[39] = E) : E = o[39];
|
|
94
|
-
const eo = E, ro = n === "light" && t === "filled" || n === "dark" && t === "outline" || n === "dark" && t === "ghost" ? "dark" : "light", k = i === void 0 ? "span" : "a";
|
|
95
|
-
let m;
|
|
96
|
-
o[40] !== k || o[41] !== h || o[42] !== i || o[43] !== g || o[44] !== u || o[45] !== V ? (m = k === "a" && {
|
|
97
|
-
href: i,
|
|
98
|
-
target: V,
|
|
99
|
-
rel: u,
|
|
100
|
-
referrerPolicy: g,
|
|
101
|
-
download: h
|
|
102
|
-
}, o[40] = k, o[41] = h, o[42] = i, o[43] = g, o[44] = u, o[45] = V, o[46] = m) : m = o[46];
|
|
103
|
-
let f;
|
|
104
|
-
o[47] !== c || o[48] !== io ? (f = /* @__PURE__ */ z("span", { className: io, children: c }), o[47] = c, o[48] = io, o[49] = f) : f = o[49];
|
|
105
|
-
let b;
|
|
106
|
-
o[50] !== eo || o[51] !== s || o[52] !== e || o[53] !== ro ? (b = (s || e) && /* @__PURE__ */ z(fo, { name: s, theme: ro, source: e, className: eo, "aria-hidden": "true" }), o[50] = eo, o[51] = s, o[52] = e, o[53] = ro, o[54] = b) : b = o[54];
|
|
107
|
-
let P;
|
|
108
|
-
o[55] !== k || o[56] !== a || o[57] !== N || o[58] !== _ || o[59] !== lo || o[60] !== m || o[61] !== f || o[62] !== b ? (P = /* @__PURE__ */ go(k, { className: lo, ...m, ...a, ..._, ref: N, children: [
|
|
109
|
-
f,
|
|
110
|
-
b
|
|
111
|
-
] }), o[55] = k, o[56] = a, o[57] = N, o[58] = _, o[59] = lo, o[60] = m, o[61] = f, o[62] = b, o[63] = P) : P = o[63];
|
|
112
|
-
const A = P;
|
|
113
|
-
if (r) {
|
|
114
|
-
let v;
|
|
115
|
-
o[64] !== A ? (v = /* @__PURE__ */ z(ho.Anchor, { children: A }), o[64] = A, o[65] = v) : v = o[65];
|
|
116
|
-
let p;
|
|
117
|
-
o[66] !== r ? (p = /* @__PURE__ */ z(ho.Content, { children: r }), o[66] = r, o[67] = p) : p = o[67];
|
|
118
|
-
let x;
|
|
119
|
-
return o[68] !== v || o[69] !== p ? (x = /* @__PURE__ */ go(ho, { placement: "top", tooltipOffset: 6, children: [
|
|
120
|
-
v,
|
|
121
|
-
p
|
|
122
|
-
] }), o[68] = v, o[69] = p, o[70] = x) : x = o[70], x;
|
|
123
|
-
}
|
|
124
|
-
return A;
|
|
125
|
-
});
|
|
126
|
-
xo.displayName = "DSLinkButton";
|
|
127
|
-
export {
|
|
128
|
-
xo as D,
|
|
129
|
-
Zo as L,
|
|
130
|
-
$o as a,
|
|
131
|
-
Ao as v
|
|
132
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as F } from "react/jsx-runtime";
|
|
3
|
-
import { d as $ } from "./index.D-sRdssb.js";
|
|
4
|
-
import { c as J } from "./index.DL9mof6u.js";
|
|
5
|
-
import { forwardRef as K, useState as Q } from "react";
|
|
6
|
-
import { D as W } from "./Fieldset.DiMtr6Vw.js";
|
|
7
|
-
import { DSRadio as X } from "../radio.DHUfSPai.js";
|
|
8
|
-
import { g as m, r as V } from "./helpers.CexwVao7.js";
|
|
9
|
-
import '../assets/RadioGroup.CM2mYOzc.css';const Y = "ds-radio-group_root_12fot_1", Z = "ds-radio-group_root--horizontal_12fot_9", oo = "ds-radio-group_root--invalid_12fot_12", B = {
|
|
10
|
-
root: Y,
|
|
11
|
-
rootHorizontal: Z,
|
|
12
|
-
rootInvalid: oo
|
|
13
|
-
}, M = (i) => i.some(({
|
|
14
|
-
hint: s
|
|
15
|
-
}) => !!s), j = (i) => i.some(({
|
|
16
|
-
customArea: s,
|
|
17
|
-
isCustomAreaAbove: o
|
|
18
|
-
}) => !!s && !o), eo = ({
|
|
19
|
-
legend: i,
|
|
20
|
-
name: s,
|
|
21
|
-
options: o,
|
|
22
|
-
description: l,
|
|
23
|
-
direction: c,
|
|
24
|
-
id: a,
|
|
25
|
-
systemFeedback: e
|
|
26
|
-
}) => {
|
|
27
|
-
if (!a && (l || e))
|
|
28
|
-
throw new Error(m("DSRadioGroup", 'A unique "id" prop is required when providing the description or systemFeedback property. Please add a unique "id" prop to the DSRadioGroup component.'));
|
|
29
|
-
if (!i)
|
|
30
|
-
throw new Error(m("DSRadioGroup", V("legend", "DSRadioGroup")));
|
|
31
|
-
if (!s)
|
|
32
|
-
throw new Error(m("DSRadioGroup", V("name", "DSRadioGroup")));
|
|
33
|
-
if (Array.isArray(o)) {
|
|
34
|
-
if (o.length === 0)
|
|
35
|
-
throw new Error(m("DSRadioGroup", "The options array must not be empty."));
|
|
36
|
-
} else throw new Error(m("DSRadioGroup", V("options", "DSRadioGroup")));
|
|
37
|
-
if (c === "horizontal" && M(o))
|
|
38
|
-
throw new Error(m("DSRadioGroup", "Horizontal direction is not possible when options contain a hint. Please remove hints or change direction property to 'vertical'."));
|
|
39
|
-
if (c === "horizontal" && j(o))
|
|
40
|
-
throw new Error(m("DSRadioGroup", "Horizontal direction is not possible when options contain a custom area without isCustomAreaAbove set to true. Please remove custom areas, change direction property to 'vertical' or set isCustomAreaAbove to true."));
|
|
41
|
-
}, to = K((i, s) => {
|
|
42
|
-
const o = $.c(53);
|
|
43
|
-
let l, c, a, e, u, p, h, t, v, d, G, R, b, y, H, E;
|
|
44
|
-
o[0] !== i ? ({
|
|
45
|
-
legend: u,
|
|
46
|
-
name: p,
|
|
47
|
-
options: t,
|
|
48
|
-
className: l,
|
|
49
|
-
defaultValue: c,
|
|
50
|
-
description: a,
|
|
51
|
-
direction: G,
|
|
52
|
-
disabled: R,
|
|
53
|
-
hideUncheckedHints: b,
|
|
54
|
-
id: e,
|
|
55
|
-
invalid: y,
|
|
56
|
-
required: H,
|
|
57
|
-
systemFeedback: d,
|
|
58
|
-
value: E,
|
|
59
|
-
onChange: h,
|
|
60
|
-
...v
|
|
61
|
-
} = i, o[0] = i, o[1] = l, o[2] = c, o[3] = a, o[4] = e, o[5] = u, o[6] = p, o[7] = h, o[8] = t, o[9] = v, o[10] = d, o[11] = G, o[12] = R, o[13] = b, o[14] = y, o[15] = H, o[16] = E) : (l = o[1], c = o[2], a = o[3], e = o[4], u = o[5], p = o[6], h = o[7], t = o[8], v = o[9], d = o[10], G = o[11], R = o[12], b = o[13], y = o[14], H = o[15], E = o[16]);
|
|
62
|
-
const O = G === void 0 ? "vertical" : G, n = R === void 0 ? !1 : R, D = b === void 0 ? !1 : b, f = y === void 0 ? !1 : y, w = H === void 0 ? !1 : H;
|
|
63
|
-
process.env.NODE_ENV !== "production" && eo({
|
|
64
|
-
legend: u,
|
|
65
|
-
name: p,
|
|
66
|
-
options: t,
|
|
67
|
-
description: a,
|
|
68
|
-
direction: O,
|
|
69
|
-
id: e,
|
|
70
|
-
systemFeedback: d
|
|
71
|
-
});
|
|
72
|
-
const [L, T] = Q(c), _ = E !== void 0, z = _ ? E : L, N = O === "horizontal" && !M(t) && !j(t), I = f && !!d;
|
|
73
|
-
let A;
|
|
74
|
-
o[17] !== N || o[18] !== I ? (A = J(B.root, {
|
|
75
|
-
[B.rootHorizontal]: N,
|
|
76
|
-
[B.rootInvalid]: I
|
|
77
|
-
}), o[17] = N, o[18] = I, o[19] = A) : A = o[19];
|
|
78
|
-
const P = A;
|
|
79
|
-
let C;
|
|
80
|
-
o[20] !== n || o[21] !== _ || o[22] !== h ? (C = (r) => {
|
|
81
|
-
if (n) {
|
|
82
|
-
r.preventDefault();
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
_ || T(r.target.value), h && h(r);
|
|
86
|
-
}, o[20] = n, o[21] = _, o[22] = h, o[23] = C) : C = o[23];
|
|
87
|
-
const U = C;
|
|
88
|
-
let k;
|
|
89
|
-
o[24] !== D || o[25] !== t ? (k = M(t) && !D, o[24] = D, o[25] = t, o[26] = k) : k = o[26];
|
|
90
|
-
const x = k;
|
|
91
|
-
let S;
|
|
92
|
-
o[27] !== x || o[28] !== z || o[29] !== n || o[30] !== D || o[31] !== e || o[32] !== f || o[33] !== p || o[34] !== t || o[35] !== s || o[36] !== w ? (S = t.map((r) => /* @__PURE__ */ F(X, { name: p, checked: r.value === z, disabled: n, fieldsetId: e, hideUncheckedHint: D, hint: r.hint, invalid: f, isBold: x, required: w, ref: r.value === z ? s : null, ...r }, e + r.label + r.value + r.hint)), o[27] = x, o[28] = z, o[29] = n, o[30] = D, o[31] = e, o[32] = f, o[33] = p, o[34] = t, o[35] = s, o[36] = w, o[37] = S) : S = o[37];
|
|
93
|
-
let g;
|
|
94
|
-
o[38] !== P || o[39] !== S ? (g = /* @__PURE__ */ F("div", { className: P, children: S }), o[38] = P, o[39] = S, o[40] = g) : g = o[40];
|
|
95
|
-
let q;
|
|
96
|
-
return o[41] !== l || o[42] !== a || o[43] !== n || o[44] !== U || o[45] !== e || o[46] !== f || o[47] !== u || o[48] !== w || o[49] !== v || o[50] !== d || o[51] !== g ? (q = /* @__PURE__ */ F(W, { id: e, legend: u, className: l, description: a, disabled: n, required: w, invalid: f, systemFeedback: d, ...v, role: "radiogroup", onChange: U, children: g }), o[41] = l, o[42] = a, o[43] = n, o[44] = U, o[45] = e, o[46] = f, o[47] = u, o[48] = w, o[49] = v, o[50] = d, o[51] = g, o[52] = q) : q = o[52], q;
|
|
97
|
-
});
|
|
98
|
-
to.displayName = "DSRadioGroup";
|
|
99
|
-
export {
|
|
100
|
-
to as D,
|
|
101
|
-
j as a,
|
|
102
|
-
M as o,
|
|
103
|
-
eo as v
|
|
104
|
-
};
|