@stihl-design-system/components 1.0.0-RC.34 → 1.0.0-RC.35
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/{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/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/{banner.CI5HnDqD.js → banner.D-RX60nJ.js} +1 -1
- package/{breadcrumb.CtwAux3P.js → breadcrumb.tvMByFgp.js} +3 -3
- package/button.CZupaV9L.js +12 -0
- package/buttonround.9IS0tUqw.js +96 -0
- package/{checkbox.DwccD0Mp.js → checkbox.XYQI-ubx.js} +2 -2
- package/{checkboxgroup.ZiUFfCJ1.js → checkboxgroup.CjnNJ8e6.js} +2 -2
- package/{chip.B0s_fS8L.js → chip.B-pxhsdb.js} +2 -2
- package/{chipgroup.Dpu66bo5.js → chipgroup.cGjn4LVV.js} +2 -2
- 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.Qr6bDP2N.js} +2 -2
- package/chunks/Button.Cn5yg7dG.js +138 -0
- package/chunks/{Checkbox.BcGXAuuP.js → Checkbox.D5X5T6Yg.js} +1 -1
- package/chunks/CheckboxGroup.CUR_0VMc.js +74 -0
- package/chunks/{Chip.D6pubCZV.js → Chip.DIp5hdRH.js} +1 -1
- package/chunks/{CustomReactSelect.Dg3wC_VH.js → CustomReactSelect.BA3hUVkh.js} +816 -800
- package/chunks/{Dialog.DpqSVrYR.js → Dialog.DRk_jSj5.js} +1 -1
- package/chunks/{Drawer.DISWybOa.js → Drawer.Dj6WeUC8.js} +1 -1
- package/chunks/Fieldset.C0RzpI-h.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.Bki3bs3U.js +236 -0
- package/chunks/InputNumber.B43cqBH0.js +242 -0
- package/chunks/InputPassword.DcdMjsXr.js +121 -0
- package/chunks/InputSearch.CJm6ph8W.js +149 -0
- package/chunks/LinkButton.C6F-yuLL.js +139 -0
- package/chunks/{MegaMenu.CQbOeaib.js → MegaMenu.qttkjGbD.js} +7 -8
- package/chunks/{NavigationTabs.BwM-6CRm.js → NavigationTabs.CQxlahX1.js} +1 -1
- package/chunks/{Notification.CrojkJ0E.js → Notification.Qzz88ngL.js} +1 -1
- package/chunks/{Popover.Bb0Pjmvg.js → Popover.D7McfVaH.js} +9 -10
- package/chunks/RadioGroup.B2VCD9x-.js +106 -0
- package/chunks/Select.B0uMOSSD.js +147 -0
- package/chunks/Slider.YTIktxxD.js +306 -0
- package/chunks/{Stepper.PTQdQBYf.js → Stepper.BvPmbbqw.js} +2 -2
- package/chunks/{Tabs.DyP4whX0.js → Tabs.CoO_lrhV.js} +1 -1
- package/chunks/Textarea.lYiPXerd.js +181 -0
- package/chunks/{Toast.ug_RjGgF.js → Toast.L5HAuEOn.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.CGEDlMo0.js +71 -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/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.BgYf8rKE.js} +4 -3
- package/{dialog.CzM_Cxp0.js → dialog.Bq-ZyzR8.js} +2 -2
- package/{drawer._A9MQ8Cj.js → drawer.DL5UzLWf.js} +2 -2
- package/{fieldset.CId-NtI5.js → fieldset.BFLW2D9H.js} +3 -2
- package/{filelist.DgVuWpR3.js → filelist.BG6SGVJ8.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 +38 -38
- package/input.hBWqQr3X.js +190 -0
- package/{inputfile.BjgJGefV.js → inputfile.BSZuRujU.js} +6 -5
- package/{inputnumber.BcrxBVv0.js → inputnumber.CA4JiUmq.js} +7 -6
- package/{inputpassword.CddmBW-T.js → inputpassword.Cju_crMi.js} +4 -4
- package/{inputsearch.CFOASqrd.js → inputsearch.CU9AhVVv.js} +6 -5
- package/{link.f8MMZo-w.js → link.DoiK003-.js} +2 -2
- package/{linkbutton.BYAvi-_V.js → linkbutton.CWco_B7v.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.zhRZHjgs.js} +2 -2
- package/{notification.B-norGiB.js → notification.BiXdWNo7.js} +2 -2
- package/package.json +2 -1
- package/partials/index.js +30 -30
- package/{popover.DFVDZY-m.js → popover.79Voiadz.js} +3 -3
- package/{radiogroup.DaThoMfq.js → radiogroup.CwBh7u9L.js} +2 -2
- package/{scroller.Cu7H_VCT.js → scroller.IpfbFV8B.js} +1 -1
- package/{select.CMdKf7tC.js → select.NHaEtX_u.js} +5 -4
- package/{skiptocontent.CHVh0hbr.js → skiptocontent.X4USTODk.js} +1 -1
- package/slider.jnNGEyBq.js +12 -0
- package/{step.DKf4CHGr.js → step.D5p7qppy.js} +1 -1
- package/{stepper.CCP_igpJ.js → stepper.DnMc4ex6.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.BFE6RAPD.js} +1 -1
- package/{tabs.BkoT7feH.js → tabs.CsOxxQyQ.js} +2 -2
- package/{textarea.DMn20z4p.js → textarea.C9OAAjhG.js} +4 -3
- package/{toast.Dvs8woTH.js → toast.OBI9qnAM.js} +2 -2
- package/{toastmanager.pi_Fhd5t.js → toastmanager.CgsA-1y_.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/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/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/slider.C5dK6KcG.js +0 -11
- /package/components/InputNumber/{InputNumberutils.test.d.ts → InputNumber.utils.test.d.ts} +0 -0
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as h, jsx as a, Fragment as pe } from "react/jsx-runtime";
|
|
3
|
-
import { c as b } from "./index.DL9mof6u.js";
|
|
4
|
-
import { forwardRef as ge, useState as U, useRef as be, useCallback as me } from "react";
|
|
5
|
-
import { t as De } from "./translate.nuU7uChI.js";
|
|
6
|
-
import { u as Z } from "./useBreakpoint.BzR_yaIv.js";
|
|
7
|
-
import "./index.D-sRdssb.js";
|
|
8
|
-
import { g as _e } from "./AriaLiveRegions.utils.CybNIBSa.js";
|
|
9
|
-
import { Asterisk as he } from "../asterisk.B2ih8VwF.js";
|
|
10
|
-
import { D as Ie } from "./Button.DCZgBNmA.js";
|
|
11
|
-
import { FileList as ve } from "../filelist.DgVuWpR3.js";
|
|
12
|
-
import { D as Se } from "./Icon.CDLyB7Pv.js";
|
|
13
|
-
import { D as we } from "./SystemFeedback.CjlARKki.js";
|
|
14
|
-
import { g as I } from "./helpers.CexwVao7.js";
|
|
15
|
-
import '../assets/InputFile.BnIvK65P.css';const Fe = "ds-input-file_root_1snnq_1", qe = "ds-input-file_hint_1snnq_1", ze = "ds-input-file_label_1snnq_1", Ne = "ds-input-file_browse-button--is-dragging-filled_1snnq_4", Le = "ds-input-file_browse-button--is-dragging_1snnq_4", ke = "ds-input-file_label--hidden_1snnq_35", ye = "ds-input-file_label--disabled_1snnq_48", Be = "ds-input-file_feedback_1snnq_68", Te = "ds-input-file_dropzone_1snnq_72", Ae = "ds-input-file_dropzone--disabled_1snnq_78", $e = "ds-input-file_dropzone--invalid_1snnq_92", Ce = "ds-input-file_dropzone--is-dragging_1snnq_95", Re = "ds-input-file_hint-drop-zone_1snnq_98", Ee = "ds-input-file_upload-icon_1snnq_101", Pe = "ds-input-file_browse-button-dropzone--is-dragging_1snnq_104", xe = "ds-input-file_instructions_1snnq_107", He = "ds-input-file_input_1snnq_144", Oe = "ds-input-file_required-sr-info_1snnq_148", n = {
|
|
16
|
-
root: Fe,
|
|
17
|
-
hint: qe,
|
|
18
|
-
label: ze,
|
|
19
|
-
browseButtonIsDraggingFilled: Ne,
|
|
20
|
-
browseButtonIsDragging: Le,
|
|
21
|
-
labelHidden: ke,
|
|
22
|
-
labelDisabled: ye,
|
|
23
|
-
feedback: Be,
|
|
24
|
-
dropzone: Te,
|
|
25
|
-
dropzoneDisabled: Ae,
|
|
26
|
-
dropzoneInvalid: $e,
|
|
27
|
-
dropzoneIsDragging: Ce,
|
|
28
|
-
hintDropZone: Re,
|
|
29
|
-
uploadIcon: Ee,
|
|
30
|
-
browseButtonDropzoneIsDragging: Pe,
|
|
31
|
-
instructions: xe,
|
|
32
|
-
input: He,
|
|
33
|
-
requiredSrInfo: Oe
|
|
34
|
-
}, We = {
|
|
35
|
-
dragAndDropInstructions: "Drag and drop files here or",
|
|
36
|
-
feedbackFileSize: "File too large. Maximum file size is",
|
|
37
|
-
feedbackFileType: "File type not allowed",
|
|
38
|
-
// {0} is the file name
|
|
39
|
-
fileListRemoveSelectionButtonLabel: "Remove {0} from selected files",
|
|
40
|
-
fileListPreviewAltText: "Preview of",
|
|
41
|
-
filesSelectedHint: "The following files are selected",
|
|
42
|
-
required: "required"
|
|
43
|
-
}, Ve = {
|
|
44
|
-
dragAndDropInstructions: "Dateien hier hin ziehen oder",
|
|
45
|
-
feedbackFileSize: "Datei zu groß. Maximale Dateigröße ist",
|
|
46
|
-
feedbackFileType: "Dateityp nicht zugelassen",
|
|
47
|
-
// {0} is the file name
|
|
48
|
-
fileListRemoveSelectionButtonLabel: "Datei {0} aus der Auswahl entfernen",
|
|
49
|
-
fileListPreviewAltText: "Vorschau von",
|
|
50
|
-
filesSelectedHint: "Die folgenden Dateien sind ausgewählt",
|
|
51
|
-
required: "erforderlich"
|
|
52
|
-
}, je = {
|
|
53
|
-
en: We,
|
|
54
|
-
de: Ve
|
|
55
|
-
}, Me = (s, d) => {
|
|
56
|
-
const t = d.split(",").map((l) => l.trim().toLowerCase()).filter(Boolean), v = s.name.toLowerCase(), i = s.type.toLowerCase();
|
|
57
|
-
return t.some((l) => {
|
|
58
|
-
if (l.startsWith("."))
|
|
59
|
-
return v.endsWith(l);
|
|
60
|
-
if (l.endsWith("/*")) {
|
|
61
|
-
const [S] = i.split("/");
|
|
62
|
-
return S === l.slice(0, -2);
|
|
63
|
-
}
|
|
64
|
-
return i === l;
|
|
65
|
-
});
|
|
66
|
-
}, Ue = ({
|
|
67
|
-
id: s,
|
|
68
|
-
label: d,
|
|
69
|
-
inputFileButtonProps: t
|
|
70
|
-
}) => {
|
|
71
|
-
if (!s)
|
|
72
|
-
throw new Error(I("DSInputFile", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputFile component.'));
|
|
73
|
-
if (!d)
|
|
74
|
-
throw new Error(I("DSInputFile", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputFile component. If you don't want to display a label, set hideLabel={true}.`));
|
|
75
|
-
if (t && t.label?.trim() === "")
|
|
76
|
-
throw new Error(I("DSInputFile", "The input file button needs to have a label for a11y reasons. Please add a label to the inputFileButtonProps."));
|
|
77
|
-
if (t && t.variant && t.variant !== "outline" && t.variant !== "filled")
|
|
78
|
-
throw new Error(I("DSInputFile", "The inputFileButtonProps variant value can only be 'outline' for DSInputFile components inside forms or 'filled' for standalone DSInputFile components."));
|
|
79
|
-
}, Ze = ge(({
|
|
80
|
-
id: s,
|
|
81
|
-
label: d,
|
|
82
|
-
accept: t,
|
|
83
|
-
className: v,
|
|
84
|
-
disabled: i = !1,
|
|
85
|
-
fileListItemRemoveButtonProps: l,
|
|
86
|
-
hideLabel: S = !1,
|
|
87
|
-
hint: p,
|
|
88
|
-
inputFileButtonProps: y,
|
|
89
|
-
invalid: m = !1,
|
|
90
|
-
isHintOutsideDropzone: G = {
|
|
91
|
-
base: !0,
|
|
92
|
-
m: !1
|
|
93
|
-
},
|
|
94
|
-
lang: B = "en",
|
|
95
|
-
maxSizeInMb: w = 7,
|
|
96
|
-
multiple: g = !1,
|
|
97
|
-
required: T = !1,
|
|
98
|
-
showFileList: J = !0,
|
|
99
|
-
showDropzone: c = !1,
|
|
100
|
-
systemFeedback: F,
|
|
101
|
-
translations: K,
|
|
102
|
-
onFilesSelect: A,
|
|
103
|
-
...Q
|
|
104
|
-
}, D) => {
|
|
105
|
-
const u = De(K || je[B]);
|
|
106
|
-
process.env.NODE_ENV !== "production" && Ue({
|
|
107
|
-
id: s,
|
|
108
|
-
label: d,
|
|
109
|
-
inputFileButtonProps: y
|
|
110
|
-
});
|
|
111
|
-
const {
|
|
112
|
-
label: X = B === "en" ? `Choose File${g ? "s" : ""}` : `Datei${g ? "en" : ""} auswählen`,
|
|
113
|
-
variant: q = "outline",
|
|
114
|
-
...Y
|
|
115
|
-
} = y || {}, [$, C] = U([]), _ = be(null), [f, z] = U(!1), ee = w * 1024 * 1024, N = `${s}-label`, R = `${s}-feedback`, L = `${s}-hint`, E = p ? ` ${L}` : "", ne = Z(S), P = Z(G), te = b(n.root, v), ie = b(n.dropzone, {
|
|
116
|
-
[n.dropzoneDisabled]: i,
|
|
117
|
-
[n.dropzoneInvalid]: m,
|
|
118
|
-
[n.dropzoneIsDragging]: f
|
|
119
|
-
}), oe = b(n.label, {
|
|
120
|
-
// hide label only visually to keep them available for assistive technologies
|
|
121
|
-
[n.labelHidden]: ne,
|
|
122
|
-
[n.labelDisabled]: i
|
|
123
|
-
}), se = b(n.browseButton, {
|
|
124
|
-
[n.browseButtonIsDragging]: f && q === "outline",
|
|
125
|
-
[n.browseButtonIsDraggingFilled]: f && q === "filled"
|
|
126
|
-
}), re = b(n.browseButtonDropzone, {
|
|
127
|
-
[n.browseButtonDropzoneIsDragging]: f
|
|
128
|
-
}), ae = [m && F && R].filter(Boolean).join(" ") || void 0, le = (e) => {
|
|
129
|
-
_.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
130
|
-
}, x = (e) => {
|
|
131
|
-
if (!e)
|
|
132
|
-
return;
|
|
133
|
-
const r = [];
|
|
134
|
-
for (const o of e)
|
|
135
|
-
if (t && !Me(o, t) && (o.feedback = `${u("feedbackFileType")}: ${o.type}.`), o.size > ee && (o.feedback = `${u("feedbackFileSize")} ${w} MB.`), r.push(o), !g && r.length > 0)
|
|
136
|
-
break;
|
|
137
|
-
r.length > 0 && (C(() => {
|
|
138
|
-
const o = [...r], M = o.map(({
|
|
139
|
-
name: k,
|
|
140
|
-
feedback: fe = ""
|
|
141
|
-
}) => `${k} ${fe}`).join(", ");
|
|
142
|
-
return setTimeout(() => {
|
|
143
|
-
ue(`${u("filesSelectedHint")}: ${M}.`);
|
|
144
|
-
}, 1e3), o;
|
|
145
|
-
}), A?.(r));
|
|
146
|
-
}, H = (e) => {
|
|
147
|
-
i || (_.current?.click(), e.stopPropagation());
|
|
148
|
-
}, O = (e) => {
|
|
149
|
-
e.preventDefault(), f || z(!0);
|
|
150
|
-
}, W = (e) => {
|
|
151
|
-
e.preventDefault(), f && z(!1);
|
|
152
|
-
}, V = me((e) => {
|
|
153
|
-
e.preventDefault(), !i && (z(!1), x(e.dataTransfer.files));
|
|
154
|
-
}, [g, t, w, i]), de = (e) => {
|
|
155
|
-
x(e.target.files), _?.current && (_.current.value = "");
|
|
156
|
-
}, ce = (e) => {
|
|
157
|
-
C((r) => {
|
|
158
|
-
const o = r.filter((M, k) => k !== e);
|
|
159
|
-
return A?.(o), o;
|
|
160
|
-
});
|
|
161
|
-
}, ue = (e) => {
|
|
162
|
-
const r = _e();
|
|
163
|
-
r && (r.innerText = e, setTimeout(() => {
|
|
164
|
-
r.innerText = "";
|
|
165
|
-
}, 350));
|
|
166
|
-
}, j = () => /* @__PURE__ */ a(Ie, { ...Y, className: c ? re : se, type: "button", variant: q, size: c ? "small" : "medium", disabled: i, iconName: c ? void 0 : "upload", onClick: H, "aria-describedby": ae, "aria-invalid": m, children: X });
|
|
167
|
-
return /* @__PURE__ */ h("div", { className: te, children: [
|
|
168
|
-
/* @__PURE__ */ h("label", { className: oe, id: N, htmlFor: s, children: [
|
|
169
|
-
d,
|
|
170
|
-
T && /* @__PURE__ */ h(pe, { children: [
|
|
171
|
-
/* @__PURE__ */ a(he, {}),
|
|
172
|
-
/* @__PURE__ */ a("span", { className: n.requiredSrInfo, children: u("required") })
|
|
173
|
-
] })
|
|
174
|
-
] }),
|
|
175
|
-
p && (P || !c) && /* @__PURE__ */ a("div", { className: n.hint, id: L, children: p }),
|
|
176
|
-
!c && /* @__PURE__ */ a(
|
|
177
|
-
"div",
|
|
178
|
-
{
|
|
179
|
-
onDragOver: O,
|
|
180
|
-
onDragLeave: W,
|
|
181
|
-
onDrop: V,
|
|
182
|
-
"aria-labelledby": `${N}${E}`,
|
|
183
|
-
"aria-disabled": i,
|
|
184
|
-
children: j()
|
|
185
|
-
}
|
|
186
|
-
),
|
|
187
|
-
c && /* @__PURE__ */ h(
|
|
188
|
-
"div",
|
|
189
|
-
{
|
|
190
|
-
className: ie,
|
|
191
|
-
onClick: (e) => H(e),
|
|
192
|
-
onDragOver: O,
|
|
193
|
-
onDragLeave: W,
|
|
194
|
-
onDrop: V,
|
|
195
|
-
"aria-labelledby": `${N}${E}`,
|
|
196
|
-
"aria-disabled": i,
|
|
197
|
-
children: [
|
|
198
|
-
/* @__PURE__ */ a(Se, { name: "upload", className: n.uploadIcon, size: "x-large" }),
|
|
199
|
-
/* @__PURE__ */ a("p", { id: "file-upload-instructions", className: n.instructions, children: u("dragAndDropInstructions") }),
|
|
200
|
-
j(),
|
|
201
|
-
p && !P && /* @__PURE__ */ a("div", { className: n.hintDropZone, id: L, children: p })
|
|
202
|
-
]
|
|
203
|
-
}
|
|
204
|
-
),
|
|
205
|
-
/* @__PURE__ */ a("input", { ...Q, type: "file", className: n.input, id: s, ref: le, accept: t, multiple: g, "aria-hidden": "true", required: T, disabled: i, onChange: de }),
|
|
206
|
-
m && F && /* @__PURE__ */ a(we, { className: n.feedback, message: F, variant: "error", id: R }),
|
|
207
|
-
$.length > 0 && J && /* @__PURE__ */ a(ve, { files: $, onRemoveFile: ce, fileListItemRemoveButtonProps: l, t: u })
|
|
208
|
-
] });
|
|
209
|
-
});
|
|
210
|
-
Ze.displayName = "DSInputFile";
|
|
211
|
-
export {
|
|
212
|
-
Ze as D,
|
|
213
|
-
We as a,
|
|
214
|
-
Ve as b,
|
|
215
|
-
je as c,
|
|
216
|
-
Me as f,
|
|
217
|
-
Ue as v
|
|
218
|
-
};
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as v, jsxs as bt } from "react/jsx-runtime";
|
|
3
|
-
import { d as Lt } from "./index.D-sRdssb.js";
|
|
4
|
-
import { c as R } from "./index.DL9mof6u.js";
|
|
5
|
-
import { forwardRef as Et, useState as Ae, useRef as _t, useEffect as yt } from "react";
|
|
6
|
-
import { h as Rt } from "./has-window.ut_-aShB.js";
|
|
7
|
-
import { u as Ct } from "./useBreakpoint.BzR_yaIv.js";
|
|
8
|
-
import { u as kt } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
9
|
-
import { Asterisk as Ft } from "../asterisk.B2ih8VwF.js";
|
|
10
|
-
import { D as It } from "./Button.DCZgBNmA.js";
|
|
11
|
-
import { M as ht, a as xt } from "./Input.utils.Dkw7gRrr.js";
|
|
12
|
-
import { D as Pt } from "./SystemFeedback.CjlARKki.js";
|
|
13
|
-
import { g as Ke } from "./helpers.CexwVao7.js";
|
|
14
|
-
import '../assets/InputNumber.BoiCIR1f.css';const $t = "ds-input-number_input_1yj2k_1", Vt = "ds-input-number_input--small_1yj2k_9", Ht = "ds-input-number_input--invalid_1yj2k_121", Tt = "ds-input-number_input--has-affix_1yj2k_197", qt = "ds-input-number_input--is-ready_1yj2k_211", Wt = "ds-input-number_root_1yj2k_222", Mt = "ds-input-number_hint_1yj2k_222", Xt = "ds-input-number_label_1yj2k_222", zt = "ds-input-number_wrapper_1yj2k_226", Gt = "ds-input-number_affix_1yj2k_232", Ot = "ds-input-number_affix--small_1yj2k_253", Ut = "ds-input-number_prefix_1yj2k_266", Jt = "ds-input-number_suffix_1yj2k_272", Kt = "ds-input-number_affix--disabled_1yj2k_278", Qt = "ds-input-number_affix--readonly_1yj2k_289", Yt = "ds-input-number_action-button_1yj2k_325", Zt = "ds-input-number_label--hidden_1yj2k_343", en = "ds-input-number_label--disabled_1yj2k_356", tn = "ds-input-number_feedback_1yj2k_376", nn = "ds-input-number_second-action-button_1yj2k_389", sn = "ds-input-number_value-announcer_1yj2k_393", t = {
|
|
15
|
-
input: $t,
|
|
16
|
-
inputSmall: Vt,
|
|
17
|
-
inputInvalid: Ht,
|
|
18
|
-
inputHasAffix: Tt,
|
|
19
|
-
inputIsReady: qt,
|
|
20
|
-
root: Wt,
|
|
21
|
-
hint: Mt,
|
|
22
|
-
label: Xt,
|
|
23
|
-
wrapper: zt,
|
|
24
|
-
affix: Gt,
|
|
25
|
-
affixSmall: Ot,
|
|
26
|
-
prefix: Ut,
|
|
27
|
-
suffix: Jt,
|
|
28
|
-
affixDisabled: Kt,
|
|
29
|
-
affixReadonly: Qt,
|
|
30
|
-
actionButton: Yt,
|
|
31
|
-
labelHidden: Zt,
|
|
32
|
-
labelDisabled: en,
|
|
33
|
-
feedback: tn,
|
|
34
|
-
secondActionButton: nn,
|
|
35
|
-
valueAnnouncer: sn
|
|
36
|
-
}, Nt = (f) => f != null && f !== "", ln = ({
|
|
37
|
-
id: f,
|
|
38
|
-
label: k,
|
|
39
|
-
prefix: e,
|
|
40
|
-
suffix: m
|
|
41
|
-
}) => {
|
|
42
|
-
if (!f)
|
|
43
|
-
throw new Error(Ke("DSInputNumber", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputNumber component.'));
|
|
44
|
-
if (!k)
|
|
45
|
-
throw new Error(Ke("DSInputNumber", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputNumber component. If you don't want to display a label, set hideLabel={true}.`));
|
|
46
|
-
e && e.length > ht && console.warn(Ke("DSInputNumber", `Prefix length must not exceed ${ht} characters.`)), m && m.length > xt && console.warn(Ke("DSInputNumber", `Suffix length must not exceed ${xt} characters.`));
|
|
47
|
-
}, an = Et((f, k) => {
|
|
48
|
-
const e = Lt.c(201);
|
|
49
|
-
let m, F, p, l, P, b, _, a, I, o, d, ae, oe, re, ue, ce, de, fe, me, pe, be, N;
|
|
50
|
-
e[0] !== f ? ({
|
|
51
|
-
id: l,
|
|
52
|
-
label: b,
|
|
53
|
-
announcementText: ae,
|
|
54
|
-
className: m,
|
|
55
|
-
disabled: re,
|
|
56
|
-
decreaseAmountButtonProps: F,
|
|
57
|
-
hint: p,
|
|
58
|
-
hideLabel: ue,
|
|
59
|
-
invalid: ce,
|
|
60
|
-
increaseAmountButtonProps: P,
|
|
61
|
-
prefix: a,
|
|
62
|
-
max: de,
|
|
63
|
-
min: fe,
|
|
64
|
-
readonly: me,
|
|
65
|
-
required: pe,
|
|
66
|
-
size: be,
|
|
67
|
-
step: oe,
|
|
68
|
-
suffix: o,
|
|
69
|
-
systemFeedback: d,
|
|
70
|
-
value: N,
|
|
71
|
-
onChange: _,
|
|
72
|
-
...I
|
|
73
|
-
} = f, e[0] = f, e[1] = m, e[2] = F, e[3] = p, e[4] = l, e[5] = P, e[6] = b, e[7] = _, e[8] = a, e[9] = I, e[10] = o, e[11] = d, e[12] = ae, e[13] = oe, e[14] = re, e[15] = ue, e[16] = ce, e[17] = de, e[18] = fe, e[19] = me, e[20] = pe, e[21] = be, e[22] = N) : (m = e[1], F = e[2], p = e[3], l = e[4], P = e[5], b = e[6], _ = e[7], a = e[8], I = e[9], o = e[10], d = e[11], ae = e[12], oe = e[13], re = e[14], ue = e[15], ce = e[16], de = e[17], fe = e[18], me = e[19], pe = e[20], be = e[21], N = e[22]);
|
|
74
|
-
const _e = ae === void 0 ? "Value changed to" : ae, s = re === void 0 ? !1 : re, At = ue === void 0 ? !1 : ue, r = ce === void 0 ? !1 : ce, A = de === void 0 ? 100 : de, S = fe === void 0 ? 0 : fe, u = me === void 0 ? !1 : me, D = pe === void 0 ? !1 : pe, n = be === void 0 ? "medium" : be, ye = oe === void 0 ? 1 : oe;
|
|
75
|
-
process.env.NODE_ENV !== "production" && ln({
|
|
76
|
-
id: l,
|
|
77
|
-
label: b,
|
|
78
|
-
prefix: a,
|
|
79
|
-
suffix: o
|
|
80
|
-
});
|
|
81
|
-
let $;
|
|
82
|
-
e[23] !== F ? ($ = F || {}, e[23] = F, e[24] = $) : $ = e[24];
|
|
83
|
-
let V, H, he;
|
|
84
|
-
e[25] !== $ ? ({
|
|
85
|
-
label: he,
|
|
86
|
-
tooltip: V,
|
|
87
|
-
...H
|
|
88
|
-
} = $, e[25] = $, e[26] = V, e[27] = H, e[28] = he) : (V = e[26], H = e[27], he = e[28]);
|
|
89
|
-
const Qe = he === void 0 ? "Decrease" : he;
|
|
90
|
-
let T;
|
|
91
|
-
e[29] !== P ? (T = P || {}, e[29] = P, e[30] = T) : T = e[30];
|
|
92
|
-
let q, W, xe;
|
|
93
|
-
e[31] !== T ? ({
|
|
94
|
-
label: xe,
|
|
95
|
-
tooltip: q,
|
|
96
|
-
...W
|
|
97
|
-
} = T, e[31] = T, e[32] = q, e[33] = W, e[34] = xe) : (q = e[32], W = e[33], xe = e[34]);
|
|
98
|
-
const Ye = xe === void 0 ? "Increase" : xe, [ve, St] = Ae(!1), [c, Ze] = Ae(N), [y, vt] = Ae(""), [et, Dt] = Ae(!1);
|
|
99
|
-
let Se;
|
|
100
|
-
e[35] === Symbol.for("react.memo_cache_sentinel") ? (Se = {}, e[35] = Se) : Se = e[35];
|
|
101
|
-
const [ke, gt] = Ae(Se), h = _t(null);
|
|
102
|
-
let De;
|
|
103
|
-
e[36] !== k ? (De = (i) => {
|
|
104
|
-
h.current = i, typeof k == "function" ? k(i) : k && (k.current = i);
|
|
105
|
-
}, e[36] = k, e[37] = De) : De = e[37];
|
|
106
|
-
const Ie = De;
|
|
107
|
-
let ge;
|
|
108
|
-
e[38] !== a ? (ge = a?.substring(0, ht), e[38] = a, e[39] = ge) : ge = e[39];
|
|
109
|
-
const tt = ge, nt = _t(null);
|
|
110
|
-
let je;
|
|
111
|
-
e[40] !== o ? (je = o?.substring(0, xt), e[40] = o, e[41] = je) : je = e[41];
|
|
112
|
-
const st = je, lt = _t(null), Ne = Ct(At);
|
|
113
|
-
let Be, we;
|
|
114
|
-
e[42] !== N ? (Be = () => {
|
|
115
|
-
Ze(N);
|
|
116
|
-
}, we = [N], e[42] = N, e[43] = Be, e[44] = we) : (Be = e[43], we = e[44]), yt(Be, we);
|
|
117
|
-
let Le, Ee;
|
|
118
|
-
e[45] !== y ? (Le = () => {
|
|
119
|
-
if (y) {
|
|
120
|
-
const i = setTimeout(() => {
|
|
121
|
-
vt("");
|
|
122
|
-
}, 3e3);
|
|
123
|
-
return () => clearTimeout(i);
|
|
124
|
-
}
|
|
125
|
-
}, Ee = [y], e[45] = y, e[46] = Le, e[47] = Ee) : (Le = e[46], Ee = e[47]), yt(Le, Ee);
|
|
126
|
-
let Re, Ce;
|
|
127
|
-
e[48] === Symbol.for("react.memo_cache_sentinel") ? (Re = () => {
|
|
128
|
-
const i = on;
|
|
129
|
-
return h.current?.addEventListener("wheel", i, {
|
|
130
|
-
passive: !1
|
|
131
|
-
}), () => {
|
|
132
|
-
h.current?.removeEventListener("wheel", i);
|
|
133
|
-
};
|
|
134
|
-
}, Ce = [], e[48] = Re, e[49] = Ce) : (Re = e[48], Ce = e[49]), yt(Re, Ce);
|
|
135
|
-
let Fe;
|
|
136
|
-
e[50] !== n ? (Fe = () => {
|
|
137
|
-
const i = n === "medium" ? 16 : 8, L = {};
|
|
138
|
-
if (nt.current) {
|
|
139
|
-
const E = nt.current.offsetWidth;
|
|
140
|
-
L.paddingInlineStart = i + E + "px";
|
|
141
|
-
}
|
|
142
|
-
if (lt.current) {
|
|
143
|
-
const E = lt.current.offsetWidth;
|
|
144
|
-
L.paddingInlineEnd = i + E + "px";
|
|
145
|
-
}
|
|
146
|
-
gt(L), St(!0);
|
|
147
|
-
}, e[50] = n, e[51] = Fe) : Fe = e[51];
|
|
148
|
-
let Pe;
|
|
149
|
-
e[52] !== et || e[53] !== a || e[54] !== n || e[55] !== o ? (Pe = [a, o, n, et], e[52] = et, e[53] = a, e[54] = n, e[55] = o, e[56] = Pe) : Pe = e[56], kt(Fe, Pe);
|
|
150
|
-
let $e, Ve;
|
|
151
|
-
e[57] === Symbol.for("react.memo_cache_sentinel") ? ($e = () => {
|
|
152
|
-
Rt && (async () => {
|
|
153
|
-
"fonts" in document && (await document.fonts.load('1em "STIHL Contraface Digital Text Regular"'), Dt(!0));
|
|
154
|
-
})();
|
|
155
|
-
}, Ve = [], e[57] = $e, e[58] = Ve) : ($e = e[57], Ve = e[58]), kt($e, Ve);
|
|
156
|
-
const it = n === "small";
|
|
157
|
-
let M, X, z, G, x, O, U, g, J, K, j, B, w;
|
|
158
|
-
if (e[59] !== _e || e[60] !== m || e[61] !== s || e[62] !== tt || e[63] !== st || e[64] !== Ie || e[65] !== Ne || e[66] !== p || e[67] !== l || e[68] !== ke || e[69] !== c || e[70] !== r || e[71] !== ve || e[72] !== b || e[73] !== A || e[74] !== S || e[75] !== _ || e[76] !== a || e[77] !== u || e[78] !== D || e[79] !== I || e[80] !== n || e[81] !== ye || e[82] !== o || e[83] !== d || e[84] !== it || e[85] !== y) {
|
|
159
|
-
const i = R(t.affix, {
|
|
160
|
-
[t.affixSmall]: it,
|
|
161
|
-
[t.affixDisabled]: s,
|
|
162
|
-
[t.affixReadonly]: u
|
|
163
|
-
}), L = `${l}-label`;
|
|
164
|
-
x = `${l}-feedback`;
|
|
165
|
-
const E = `${l}-hint`, se = `${l}-value-announcer`, jt = p ? ` ${E}` : "";
|
|
166
|
-
let Te;
|
|
167
|
-
e[99] !== m ? (Te = R(t.root, m), e[99] = m, e[100] = Te) : Te = e[100];
|
|
168
|
-
const Bt = Te, at = n === "small", ot = a || o;
|
|
169
|
-
let qe;
|
|
170
|
-
e[101] !== r || e[102] !== ve || e[103] !== at || e[104] !== ot ? (qe = R(t.input, {
|
|
171
|
-
[t.inputSmall]: at,
|
|
172
|
-
[t.inputInvalid]: r,
|
|
173
|
-
[t.inputHasAffix]: ot,
|
|
174
|
-
[t.inputIsReady]: ve
|
|
175
|
-
}), e[101] = r, e[102] = ve, e[103] = at, e[104] = ot, e[105] = qe) : qe = e[105];
|
|
176
|
-
const rt = qe;
|
|
177
|
-
let We;
|
|
178
|
-
e[106] !== s || e[107] !== Ne ? (We = R(t.label, {
|
|
179
|
-
[t.labelHidden]: Ne,
|
|
180
|
-
[t.labelDisabled]: s
|
|
181
|
-
}), e[106] = s, e[107] = Ne, e[108] = We) : We = e[108];
|
|
182
|
-
const ut = We, ct = n === "small";
|
|
183
|
-
let Me;
|
|
184
|
-
e[109] !== ct ? (Me = R(t.secondActionButton, {
|
|
185
|
-
[t.secondActionButtonSmall]: ct
|
|
186
|
-
}), e[109] = ct, e[110] = Me) : Me = e[110], M = Me;
|
|
187
|
-
const dt = n === "small";
|
|
188
|
-
let Xe;
|
|
189
|
-
e[111] !== dt ? (Xe = R(t.actionButton, {
|
|
190
|
-
[t.actionButtonSmall]: dt
|
|
191
|
-
}), e[111] = dt, e[112] = Xe) : Xe = e[112], G = Xe;
|
|
192
|
-
let ze;
|
|
193
|
-
e[113] !== r || e[114] !== d || e[115] !== x || e[116] !== se ? (ze = () => {
|
|
194
|
-
const C = [se];
|
|
195
|
-
return r && d && C.push(x), C.join(" ");
|
|
196
|
-
}, e[113] = r, e[114] = d, e[115] = x, e[116] = se, e[117] = ze) : ze = e[117];
|
|
197
|
-
const wt = ze;
|
|
198
|
-
let Ge;
|
|
199
|
-
e[118] !== _e ? (Ge = () => {
|
|
200
|
-
if (h.current) {
|
|
201
|
-
Ze(h.current.value);
|
|
202
|
-
const C = new Event("change", {
|
|
203
|
-
bubbles: !0
|
|
204
|
-
});
|
|
205
|
-
h.current?.dispatchEvent(C), vt(`${_e} ${h.current.value}`);
|
|
206
|
-
}
|
|
207
|
-
}, e[118] = _e, e[119] = Ge) : Ge = e[119];
|
|
208
|
-
const le = Ge;
|
|
209
|
-
let Oe;
|
|
210
|
-
e[120] !== le ? (Oe = () => {
|
|
211
|
-
h.current?.stepDown(), le();
|
|
212
|
-
}, e[120] = le, e[121] = Oe) : Oe = e[121], X = Oe;
|
|
213
|
-
let Ue;
|
|
214
|
-
e[122] !== le ? (Ue = () => {
|
|
215
|
-
h.current?.stepUp(), le();
|
|
216
|
-
}, e[122] = le, e[123] = Ue) : Ue = e[123], z = Ue;
|
|
217
|
-
let Je;
|
|
218
|
-
e[124] !== _ ? (Je = (C) => {
|
|
219
|
-
Ze(C.target.value), _ && _(C);
|
|
220
|
-
}, e[124] = _, e[125] = Je) : Je = e[125];
|
|
221
|
-
const ft = Je;
|
|
222
|
-
K = Bt;
|
|
223
|
-
let ie;
|
|
224
|
-
e[126] !== D ? (ie = D && /* @__PURE__ */ v(Ft, {}), e[126] = D, e[127] = ie) : ie = e[127], e[128] !== l || e[129] !== L || e[130] !== b || e[131] !== ut || e[132] !== ie ? (j = /* @__PURE__ */ bt("label", { className: ut, id: L, htmlFor: l, children: [
|
|
225
|
-
b,
|
|
226
|
-
ie
|
|
227
|
-
] }), e[128] = l, e[129] = L, e[130] = b, e[131] = ut, e[132] = ie, e[133] = j) : j = e[133], e[134] !== p || e[135] !== E ? (B = p && /* @__PURE__ */ v("div", { className: t.hint, id: E, children: p }), e[134] = p, e[135] = E, e[136] = B) : B = e[136], e[137] !== y || e[138] !== se ? (w = /* @__PURE__ */ v("div", { "aria-live": "polite", "aria-atomic": "true", className: t.valueAnnouncer, id: se, children: y }), e[137] = y, e[138] = se, e[139] = w) : w = e[139], O = t.wrapper, U = a && /* @__PURE__ */ v("span", { className: R(i, t.prefix), ref: nt, "aria-disabled": s, children: tt });
|
|
228
|
-
const mt = `${L}${jt}`, pt = wt();
|
|
229
|
-
e[140] !== s || e[141] !== Ie || e[142] !== ft || e[143] !== l || e[144] !== rt || e[145] !== ke || e[146] !== c || e[147] !== r || e[148] !== A || e[149] !== S || e[150] !== u || e[151] !== D || e[152] !== I || e[153] !== ye || e[154] !== mt || e[155] !== pt ? (g = /* @__PURE__ */ v("input", { className: rt, id: l, ...I, style: ke, ref: Ie, "aria-labelledby": mt, "aria-describedby": pt, "aria-invalid": r, "aria-disabled": u, disabled: s, min: S, max: A, readOnly: u, required: D, step: ye, type: "number", value: c, onChange: ft }), e[140] = s, e[141] = Ie, e[142] = ft, e[143] = l, e[144] = rt, e[145] = ke, e[146] = c, e[147] = r, e[148] = A, e[149] = S, e[150] = u, e[151] = D, e[152] = I, e[153] = ye, e[154] = mt, e[155] = pt, e[156] = g) : g = e[156], J = o && /* @__PURE__ */ v("span", { className: R(i, t.suffix), ref: lt, "aria-disabled": s, children: st }), e[59] = _e, e[60] = m, e[61] = s, e[62] = tt, e[63] = st, e[64] = Ie, e[65] = Ne, e[66] = p, e[67] = l, e[68] = ke, e[69] = c, e[70] = r, e[71] = ve, e[72] = b, e[73] = A, e[74] = S, e[75] = _, e[76] = a, e[77] = u, e[78] = D, e[79] = I, e[80] = n, e[81] = ye, e[82] = o, e[83] = d, e[84] = it, e[85] = y, e[86] = M, e[87] = X, e[88] = z, e[89] = G, e[90] = x, e[91] = O, e[92] = U, e[93] = g, e[94] = J, e[95] = K, e[96] = j, e[97] = B, e[98] = w;
|
|
230
|
-
} else
|
|
231
|
-
M = e[86], X = e[87], z = e[88], G = e[89], x = e[90], O = e[91], U = e[92], g = e[93], J = e[94], K = e[95], j = e[96], B = e[97], w = e[98];
|
|
232
|
-
let Q;
|
|
233
|
-
e[157] !== s || e[158] !== c || e[159] !== S || e[160] !== u ? (Q = s || u || Nt(c) && Number(c) <= Number(S), e[157] = s, e[158] = c, e[159] = S, e[160] = u, e[161] = Q) : Q = e[161];
|
|
234
|
-
let Y;
|
|
235
|
-
e[162] !== M || e[163] !== Qe || e[164] !== V || e[165] !== X || e[166] !== H || e[167] !== n || e[168] !== Q ? (Y = /* @__PURE__ */ v(It, { ...H, hideLabel: !0, theme: "light", iconName: "minus", variant: "filled", className: M, size: n, onClick: X, tooltip: V, disabled: Q, type: "button", children: Qe }), e[162] = M, e[163] = Qe, e[164] = V, e[165] = X, e[166] = H, e[167] = n, e[168] = Q, e[169] = Y) : Y = e[169];
|
|
236
|
-
let Z;
|
|
237
|
-
e[170] !== s || e[171] !== c || e[172] !== A || e[173] !== u ? (Z = s || u || Nt(c) && Number(c) >= Number(A), e[170] = s, e[171] = c, e[172] = A, e[173] = u, e[174] = Z) : Z = e[174];
|
|
238
|
-
let ee;
|
|
239
|
-
e[175] !== z || e[176] !== Ye || e[177] !== q || e[178] !== G || e[179] !== W || e[180] !== n || e[181] !== Z ? (ee = /* @__PURE__ */ v(It, { ...W, hideLabel: !0, theme: "light", iconName: "plus", variant: "filled", tooltip: q, className: G, size: n, onClick: z, disabled: Z, type: "button", children: Ye }), e[175] = z, e[176] = Ye, e[177] = q, e[178] = G, e[179] = W, e[180] = n, e[181] = Z, e[182] = ee) : ee = e[182];
|
|
240
|
-
let te;
|
|
241
|
-
e[183] !== O || e[184] !== U || e[185] !== g || e[186] !== J || e[187] !== Y || e[188] !== ee ? (te = /* @__PURE__ */ bt("div", { className: O, children: [
|
|
242
|
-
U,
|
|
243
|
-
g,
|
|
244
|
-
J,
|
|
245
|
-
Y,
|
|
246
|
-
ee
|
|
247
|
-
] }), e[183] = O, e[184] = U, e[185] = g, e[186] = J, e[187] = Y, e[188] = ee, e[189] = te) : te = e[189];
|
|
248
|
-
let ne;
|
|
249
|
-
e[190] !== r || e[191] !== d || e[192] !== x ? (ne = r && d && /* @__PURE__ */ v(Pt, { className: t.feedback, message: d, variant: "error", id: x }), e[190] = r, e[191] = d, e[192] = x, e[193] = ne) : ne = e[193];
|
|
250
|
-
let He;
|
|
251
|
-
return e[194] !== K || e[195] !== j || e[196] !== B || e[197] !== w || e[198] !== te || e[199] !== ne ? (He = /* @__PURE__ */ bt("div", { className: K, children: [
|
|
252
|
-
j,
|
|
253
|
-
B,
|
|
254
|
-
w,
|
|
255
|
-
te,
|
|
256
|
-
ne
|
|
257
|
-
] }), e[194] = K, e[195] = j, e[196] = B, e[197] = w, e[198] = te, e[199] = ne, e[200] = He) : He = e[200], He;
|
|
258
|
-
});
|
|
259
|
-
an.displayName = "DSInputNumber";
|
|
260
|
-
function on(f) {
|
|
261
|
-
f.preventDefault();
|
|
262
|
-
}
|
|
263
|
-
export {
|
|
264
|
-
an as D,
|
|
265
|
-
Nt as i,
|
|
266
|
-
ln as v
|
|
267
|
-
};
|
|
@@ -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
|
-
};
|