@stihl-design-system/components 1.0.0-RC.47 → 1.0.0-RC.48
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/{accordion.BQ7vavIt.js → accordion.D4XR2R7e.js} +2 -2
- package/{actionbutton.C7lqEmBx.js → actionbutton.C8hePX-D.js} +3 -3
- package/{actioncard.dgVHW0BC.js → actioncard.kDxu01xm.js} +1 -1
- package/{actionlink.CL6v1mQA.js → actionlink.dccc5JQV.js} +3 -3
- package/{arialiveregions.DC1Gq9Lo.js → arialiveregions.BniSDuPM.js} +9 -10
- package/assets/Accordion.RlqWqpGo.css +1 -0
- package/assets/ActionButton.Dw2FeIaW.css +1 -0
- package/assets/ActionCard.viEoC26n.css +1 -0
- package/assets/ActionLink.B1Jjaf7k.css +1 -0
- package/assets/Button.Bi1KUKMv.css +1 -0
- package/assets/Checkbox.C6RWhy0V.css +1 -0
- package/assets/Chip.DfamkUPw.css +1 -0
- package/assets/CustomReactSelect.CvWMmrAU.css +1 -0
- package/assets/Dialog.6AkQo8ew.css +1 -0
- package/assets/Drawer.CDOlX809.css +1 -0
- package/assets/Fieldset.BbLGXCWa.css +1 -0
- package/assets/InputFile.CDtghZtl.css +1 -0
- package/assets/InputNumber.BNpO9p7n.css +1 -0
- package/assets/InputPassword.BgZo-RUc.css +1 -0
- package/assets/InputSearch.BROFFTK9.css +1 -0
- package/assets/LinkButton.IKIlFnpH.css +1 -0
- package/assets/Notification.2B81JHOp.css +1 -0
- package/assets/Pagination.DH71DZ0j.css +1 -0
- package/assets/Popover.58Tb0dOt.css +1 -0
- package/assets/Select.CfTN3CJo.css +1 -0
- package/assets/Slider.B4kzL60S.css +1 -0
- package/assets/{SystemFeedback.DYi9QetY.css → SystemFeedback.DVMml_h9.css} +1 -1
- package/assets/TextUtility.BThulfyl.css +1 -0
- package/assets/Textarea.BO4AcRJD.css +1 -0
- package/assets/buttonround.syTU1QSI.css +1 -0
- package/assets/chipgroup.DtCnsmS7.css +1 -0
- package/assets/filelist.B-Ru0GP_.css +1 -0
- package/assets/input.Dy8VS73e.css +1 -0
- package/assets/numberindicator.CtbitPQ8.css +1 -0
- package/assets/progressindicator.tyY_RVQ9.css +1 -0
- package/assets/radio.9hUUyg8R.css +1 -0
- package/assets/switch.8v7Wp1Fj.css +1 -0
- package/assets/tabpane.DDaeSDQb.css +1 -0
- package/assets/text.BwGsYzGM.css +1 -0
- package/assets/tooltip.C_BL2kou.css +1 -0
- package/{banner.BlB_7xue.js → banner.DO7GsDL_.js} +1 -1
- package/{breadcrumb.DajORKq7.js → breadcrumb.DYov6vtt.js} +3 -3
- package/{button.EooIlFBI.js → button.qxcuzbnv.js} +2 -2
- package/buttonround.BO7_ewzA.js +101 -0
- package/{checkbox.NJj9qMnx.js → checkbox.C9kyIY9P.js} +4 -5
- package/{checkboxgroup.DELdyn0X.js → checkboxgroup.kEUxnKLf.js} +2 -2
- package/{chip.C4h8Hm9g.js → chip.5ktNLRYf.js} +3 -3
- package/chipgroup.kRU3Z98U.js +226 -0
- package/chunks/Accordion.gih2ni1d.js +179 -0
- package/chunks/ActionButton.B-wm5sUy.js +194 -0
- package/chunks/{ActionCard.Dbq2VqyZ.js → ActionCard.Bm-2ewfS.js} +44 -44
- package/chunks/ActionLink.D0KzqbH4.js +166 -0
- package/chunks/{AriaLiveRegions.utils.BPvIKT6B.js → AriaLiveRegions.utils.xoETe2Ps.js} +14 -16
- package/chunks/{Breadcrumb.Ccm79ver.js → Breadcrumb.I2G-T0zc.js} +2 -2
- package/chunks/Button.CCol--xy.js +165 -0
- package/chunks/Checkbox.BxOGR1bR.js +96 -0
- package/chunks/CheckboxGroup.TneO0tuE.js +85 -0
- package/chunks/Chip.DffaXMkV.js +148 -0
- package/chunks/{CustomReactSelect.oEQpO9iN.js → CustomReactSelect.DTAavYaz.js} +282 -277
- package/chunks/Dialog.guuxflWL.js +101 -0
- package/chunks/{Drawer.CDe_g99S.js → Drawer.CjUZu6GW.js} +27 -28
- package/chunks/Fieldset.BBMuLKps.js +94 -0
- package/chunks/{Flag.X9tB3Mfv.js → Flag.CbQYBzVC.js} +12 -13
- package/chunks/{Header.bLSdAY9-.js → Header.CvcGSuhX.js} +1 -1
- package/chunks/{Input.utils.CkmzxIrU.js → Input.utils.Wycy2SzG.js} +23 -25
- package/chunks/InputFile.y71Cd5J9.js +260 -0
- package/chunks/InputNumber.Fn2YbF_s.js +250 -0
- package/chunks/InputPassword.DtT9yrlx.js +129 -0
- package/chunks/InputSearch.BoAfGqoH.js +157 -0
- package/chunks/LinkButton.BxG7fx1O.js +150 -0
- package/chunks/LinkCard.DM-5WrSt.js +200 -0
- package/chunks/{MegaMenu.DbunD_yW.js → MegaMenu.udXR1H3W.js} +1 -1
- package/chunks/{NavigationTabList.CyrKNAer.js → NavigationTabList.thzA1pU8.js} +1 -1
- package/chunks/{NavigationTabs.DVBe-Wt3.js → NavigationTabs.BWewgBch.js} +1 -1
- package/chunks/Notification.C_o7Ge6Q.js +91 -0
- package/chunks/Pagination.BrOMUJMi.js +272 -0
- package/chunks/Popover.CxZZ_y1Z.js +230 -0
- package/chunks/RadioGroup.CO91_5hA.js +136 -0
- package/chunks/Select.EzoMdk1u.js +157 -0
- package/chunks/Slider.CX38t4Sk.js +330 -0
- package/chunks/{Stepper.KBRikedB.js → Stepper.Ds_aIEF8.js} +68 -69
- package/chunks/SystemFeedback.DhWcYjnu.js +43 -0
- package/chunks/{Tabs.xXn4zpGp.js → Tabs.BHVlgp7L.js} +2 -2
- package/chunks/Text.utils.DzlY9pJS.js +9 -0
- package/chunks/TextUtility.BZLwqyic.js +82 -0
- package/chunks/Textarea.vuJgvW6_.js +192 -0
- package/chunks/{Toast.NZfb7z3q.js → Toast.V_ZUAsf2.js} +1 -1
- package/chunks/translate.DSb-TdWR.js +2460 -0
- package/{combobox.CPsl2TC0.js → combobox.C6cPz4AJ.js} +1 -1
- package/components/Accordion/Accordion.d.ts +5 -0
- package/components/ActionButton/ActionButton.d.ts +5 -1
- package/components/ActionLink/ActionLink.d.ts +1 -1
- package/components/Button/Button.utils.d.ts +1 -1
- package/components/Checkbox/Checkbox.d.ts +8 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +9 -1
- package/components/ChipGroup/Chip.d.ts +2 -0
- package/components/ChipGroup/ChipGroup.d.ts +12 -2
- package/components/ChipGroup/ChipGroup.utils.d.ts +39 -15
- package/components/Combobox/Combobox.utils.d.ts +66 -9
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +5 -1
- package/components/Combobox/CustomReactSelect/CustomReactSelect.utils.d.ts +1 -1
- package/components/Fieldset/Fieldset.d.ts +9 -2
- package/components/Input/Input.d.ts +8 -1
- package/components/InputFile/FileList/FileList.d.ts +4 -2
- package/components/InputFile/FileList/FilePreview/FilePreview.d.ts +8 -2
- package/components/InputFile/FileList/ProgressIndicator/ProgressIndicator.d.ts +8 -2
- package/components/InputFile/InputFile.d.ts +12 -2
- package/components/InputFile/InputFile.utils.d.ts +41 -23
- package/components/InputNumber/InputNumber.d.ts +8 -1
- package/components/InputPassword/InputPassword.d.ts +8 -1
- package/components/InputSearch/InputSearch.d.ts +8 -1
- package/components/LinkCard/LinkCard.d.ts +10 -4
- package/components/LinkCard/LinkCard.utils.d.ts +2 -2
- package/components/NumberIndicator/NumberIndicator.d.ts +6 -1
- package/components/Pagination/Pagination.d.ts +10 -3
- package/components/Pagination/Pagination.utils.d.ts +22 -9
- package/components/Popover/Popover.d.ts +9 -1
- package/components/Popover/Popover.utils.d.ts +3 -2
- package/components/Radio/Radio.d.ts +5 -0
- package/components/RadioGroup/RadioGroup.d.ts +8 -0
- package/components/Select/Select.d.ts +8 -1
- package/components/Slider/Slider.d.ts +8 -1
- package/components/Stepper/Step.d.ts +1 -1
- package/components/Stepper/Step.utils.d.ts +1 -1
- package/components/Stepper/Stepper.d.ts +4 -1
- package/components/Stepper/Stepper.utils.d.ts +9 -4
- package/components/SystemFeedback/SystemFeedback.d.ts +9 -1
- package/components/Textarea/Textarea.d.ts +8 -1
- package/{customreactselect.D7BJg-2s.js → customreactselect.L0zSh3Tg.js} +4 -4
- package/{dialog.BlprGigG.js → dialog.Ddq8o8Od.js} +2 -2
- package/{drawer.BoyrTFi1.js → drawer.rbbjQvqL.js} +2 -2
- package/{fieldset.D_e2-vo_.js → fieldset.BHf3XK2q.js} +3 -3
- package/filelist.GrEwoM1u.js +143 -0
- package/filepreview.B2Ot9SZ7.js +97 -0
- package/{flag.0vpitrQ-.js → flag.fX6LAgty.js} +3 -4
- package/{floatingactionbutton.BrdE1vi2.js → floatingactionbutton.BwCiybnc.js} +1 -1
- package/{header.C3AqYBtz.js → header.BCeCjYfG.js} +1 -1
- package/index.es.js +203 -204
- package/input.Dh0ws-9j.js +187 -0
- package/inputfile.DiZh3GcT.js +17 -0
- package/{inputnumber.Box5R2An.js → inputnumber.D2cmptaH.js} +8 -9
- package/{inputpassword.CBc8GNwI.js → inputpassword.C53Kg4EA.js} +4 -4
- package/inputsearch.BrsIDUSW.js +14 -0
- package/link.DEZDbUgq.js +81 -0
- package/{linkbutton.DxEPueLb.js → linkbutton._X50W2Md.js} +3 -3
- package/{linkcard.CCY-VFWN.js → linkcard.BtM3KnjT.js} +3 -3
- package/{logo.D7LnRA1E.js → logo.D6BTxbxv.js} +0 -1
- package/{megamenu.C8OynEzk.js → megamenu.odVCUm4c.js} +2 -2
- package/{navigationtablist.iSQd5PX4.js → navigationtablist.n9DrtYe5.js} +2 -2
- package/{navigationtabs.FtkVv_qV.js → navigationtabs.D0mSyAtK.js} +2 -2
- package/{notification.Cqg8HpJ8.js → notification._X8-8vOa.js} +2 -2
- package/numberindicator.DsK65Bj3.js +39 -0
- package/package.json +6 -1
- package/pagination.B7Hrx_sk.js +14 -0
- package/partials/index.js +68 -68
- package/{popover.DYiEGSnj.js → popover.BBaqL7y9.js} +3 -3
- package/progressindicator.D9CfVD95.js +74 -0
- package/radio.DjToa2aV.js +148 -0
- package/{radiogroup.wqgExwrG.js → radiogroup.mc-8lw65.js} +3 -3
- package/{scroller.Dqnsxq2M.js → scroller.CgWp2WXG.js} +10 -11
- package/{select.DkKuGI6O.js → select.DTZ6a6Ag.js} +5 -6
- package/{skeleton.DUkBgXxO.js → skeleton.CNJdNVav.js} +10 -10
- package/{skiptocontent.CRQywi6J.js → skiptocontent.BsRpWvyu.js} +4 -4
- package/{slider.BOjqQp9n.js → slider.BMGAihY0.js} +3 -3
- package/{step.C6zDRCBu.js → step.DCQ6CawJ.js} +1 -1
- package/stepper.D7-7BdSv.js +15 -0
- package/styles/scss/ds/index.scss +2 -0
- package/styles/scss/ds/lib/border-width.scss +3 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +65 -21
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +4 -2
- package/styles/scss/ds/lib/ds-internal/_link.scss +23 -3
- package/styles/scss/ds/lib/input.scss +12 -7
- package/styles/scss/ds/lib/link.scss +2 -2
- package/styles/scss/ds/lib/radius.scss +5 -0
- package/{switch.CuNNdrkD.js → switch.tM2XBag8.js} +2 -2
- package/{systemfeedback.Da0wX0Eb.js → systemfeedback.BPPOht_9.js} +1 -1
- package/{tablist.BjKwrLz9.js → tablist.BAm0_UIG.js} +22 -23
- package/{tabpane.7vMXUKFX.js → tabpane.B9rZghU6.js} +1 -1
- package/{tabs.-U2k6Oll.js → tabs.BgTdWbTe.js} +3 -3
- package/text.BEO_ZfJq.js +72 -0
- package/{textarea.BWznY6Gg.js → textarea.Cki-uMkZ.js} +5 -6
- package/{textutility.CBLuAdaa.js → textutility.BypzssPt.js} +2 -2
- package/{toast.D9XLSgJg.js → toast.s0Hfuh5i.js} +2 -2
- package/{toastmanager.V5E05qgI.js → toastmanager.CPIPn4Io.js} +19 -20
- package/{tooltip.a1aWHK00.js → tooltip.BFQG-7VR.js} +1 -1
- package/{topbar.BdGK62KJ.js → topbar.Bbct-XkB.js} +3 -3
- package/utils/translate.d.ts +22 -6
- package/assets/Accordion.DPu2l_Kg.css +0 -1
- package/assets/ActionButton.DcQYatF1.css +0 -1
- package/assets/ActionCard.gRQVVFWz.css +0 -1
- package/assets/ActionLink.B62Aa8y9.css +0 -1
- package/assets/Button.BI6zz6Fw.css +0 -1
- package/assets/Checkbox.DknHnS9a.css +0 -1
- package/assets/Chip.CYhVB1Jh.css +0 -1
- package/assets/CustomReactSelect.lKMLwL7n.css +0 -1
- package/assets/Dialog.BKwWy1g2.css +0 -1
- package/assets/Drawer.IRb7Vc1n.css +0 -1
- package/assets/Fieldset.C4Fx4-UV.css +0 -1
- package/assets/InputFile.ne7gwc_5.css +0 -1
- package/assets/InputNumber.BIdsQuFc.css +0 -1
- package/assets/InputPassword.YSKTDTA1.css +0 -1
- package/assets/InputSearch.C3qtDQcj.css +0 -1
- package/assets/LinkButton.CmEE7Od_.css +0 -1
- package/assets/Notification.BO0Mu9No.css +0 -1
- package/assets/Pagination.OLmfdASf.css +0 -1
- package/assets/Popover.mL5g23EK.css +0 -1
- package/assets/Select.CDP-1_K9.css +0 -1
- package/assets/Slider.Cu7MgNph.css +0 -1
- package/assets/TextUtility.bwkCWEiV.css +0 -1
- package/assets/Textarea.Hsq68tg1.css +0 -1
- package/assets/buttonround.rmUb58WF.css +0 -1
- package/assets/chipgroup.BGxjdSDX.css +0 -1
- package/assets/filelist.cP3O1JeJ.css +0 -1
- package/assets/input.BEBgyvkK.css +0 -1
- package/assets/numberindicator.DSpNPJcs.css +0 -1
- package/assets/progressindicator.Dxrigyne.css +0 -1
- package/assets/radio.DsHt-9om.css +0 -1
- package/assets/switch.fwcMI6o7.css +0 -1
- package/assets/tabpane.o34hshTz.css +0 -1
- package/assets/text.Doa-APfR.css +0 -1
- package/assets/tooltip.DrSplliO.css +0 -1
- package/buttonround.BeQakrPs.js +0 -101
- package/chipgroup.BKjeuuM0.js +0 -213
- package/chunks/Accordion.8kTbiPxs.js +0 -173
- package/chunks/ActionButton.CBV1-_HP.js +0 -188
- package/chunks/ActionLink.BXxDS1Gg.js +0 -161
- package/chunks/Button.COycNYUI.js +0 -160
- package/chunks/Checkbox.CMshaWIU.js +0 -88
- package/chunks/CheckboxGroup.D3D1spfJ.js +0 -79
- package/chunks/Chip.DCJYE513.js +0 -157
- package/chunks/Dialog.lJXxzgu2.js +0 -102
- package/chunks/Fieldset.DOjI3DlI.js +0 -91
- package/chunks/InputFile.DYXvF6vT.js +0 -260
- package/chunks/InputNumber.CkWpchPo.js +0 -240
- package/chunks/InputPassword.21E6XMr5.js +0 -121
- package/chunks/InputSearch.Dy3EKa9f.js +0 -149
- package/chunks/LinkButton.BCHTLFMJ.js +0 -150
- package/chunks/LinkCard.BYmTwsS5.js +0 -197
- package/chunks/Notification.BjyLiO2h.js +0 -91
- package/chunks/Pagination.CJikF9Cw.js +0 -247
- package/chunks/Popover.ByaoNwGK.js +0 -221
- package/chunks/RadioGroup.Bh2X6pT9.js +0 -130
- package/chunks/Select.KWb09VmF.js +0 -147
- package/chunks/Slider.CxnIy51F.js +0 -309
- package/chunks/SystemFeedback.4osheYxC.js +0 -38
- package/chunks/Text.utils.BZ4nTZVu.js +0 -11
- package/chunks/TextUtility.BPrxUX-x.js +0 -82
- package/chunks/Textarea.CAOqZMUi.js +0 -181
- package/chunks/translate.nuU7uChI.js +0 -8
- package/filelist.DfAt2xJa.js +0 -128
- package/filepreview.Defs34bv.js +0 -94
- package/input.ChMzyHej.js +0 -175
- package/inputfile.DZIUs1EC.js +0 -18
- package/inputsearch.DzzYb-C0.js +0 -15
- package/link.aU1f2Xzu.js +0 -81
- package/numberindicator.Q7g4J3Ry.js +0 -36
- package/pagination.DA4PMLOq.js +0 -14
- package/progressindicator.DpmERE8T.js +0 -53
- package/radio.KQ8CUM3_.js +0 -137
- package/stepper.DHl3_XU9.js +0 -16
- package/text.CnP3baHy.js +0 -72
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as n, jsxs as E } from "react/jsx-runtime";
|
|
3
|
-
import { c as r } from "./index.DQOqod3i.js";
|
|
4
|
-
import { useRef as g, useState as F, useEffect as m } from "react";
|
|
5
|
-
import { D as W } from "./Button.COycNYUI.js";
|
|
6
|
-
import { g as x } from "./helpers.CexwVao7.js";
|
|
7
|
-
import "./index.cKLI89Eg.js";
|
|
8
|
-
import '../assets/Dialog.BKwWy1g2.css';const R = "ds-dialog_root_11kdc_5", y = "ds-dialog_content-wrapper_11kdc_166", z = "ds-dialog_content-wrapper--no-footer_11kdc_172", L = "ds-dialog_close-button_11kdc_180", M = "ds-dialog_header_11kdc_193", j = "ds-dialog_content_11kdc_166", H = "ds-dialog_footer_11kdc_195", I = "ds-dialog_header--scrollable_11kdc_216", O = "ds-dialog_header--close-button_11kdc_225", P = "ds-dialog_content--no-footer_11kdc_238", T = "ds-dialog_footer--scrollable_11kdc_273", o = {
|
|
9
|
-
root: R,
|
|
10
|
-
contentWrapper: y,
|
|
11
|
-
contentWrapperNoFooter: z,
|
|
12
|
-
closeButton: L,
|
|
13
|
-
header: M,
|
|
14
|
-
content: j,
|
|
15
|
-
footer: H,
|
|
16
|
-
headerScrollable: I,
|
|
17
|
-
headerCloseButton: O,
|
|
18
|
-
contentNoFooter: P,
|
|
19
|
-
footerScrollable: T
|
|
20
|
-
}, V = ({
|
|
21
|
-
tabIndex: c
|
|
22
|
-
}) => {
|
|
23
|
-
if (c || c === 0)
|
|
24
|
-
throw new Error(x("DSDialog", "Do not pass the tabindex property to the DSDialog component as it is not interactive and does not receive focus. The DSDialogs contents, including the close button contained in the DSDialog, can receive focus and be interactive."));
|
|
25
|
-
}, U = ({
|
|
26
|
-
children: c,
|
|
27
|
-
className: b,
|
|
28
|
-
closeButtonProps: D,
|
|
29
|
-
disableBackdropClose: S = !1,
|
|
30
|
-
footer: s,
|
|
31
|
-
header: k,
|
|
32
|
-
hideCloseButton: a = !1,
|
|
33
|
-
isOpen: d = !1,
|
|
34
|
-
onClose: l,
|
|
35
|
-
...i
|
|
36
|
-
}) => {
|
|
37
|
-
if (process.env.NODE_ENV !== "production") {
|
|
38
|
-
const {
|
|
39
|
-
tabIndex: e
|
|
40
|
-
} = i;
|
|
41
|
-
V({
|
|
42
|
-
tabIndex: e
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const {
|
|
46
|
-
label: v = "Close dialog",
|
|
47
|
-
...N
|
|
48
|
-
} = D || {}, t = g(null), u = g(null), [f, B] = F(!1);
|
|
49
|
-
m(() => {
|
|
50
|
-
const e = u.current;
|
|
51
|
-
if (e) {
|
|
52
|
-
const h = () => {
|
|
53
|
-
B(e.scrollHeight > e.clientHeight);
|
|
54
|
-
};
|
|
55
|
-
h();
|
|
56
|
-
const p = new ResizeObserver(h);
|
|
57
|
-
return p.observe(e), () => {
|
|
58
|
-
p.disconnect();
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
}, []), m(() => {
|
|
62
|
-
const e = t.current;
|
|
63
|
-
if (e)
|
|
64
|
-
return e.addEventListener("close", _), d ? e.showModal() : e.close(), () => {
|
|
65
|
-
e.removeEventListener("close", _);
|
|
66
|
-
};
|
|
67
|
-
}, [d, l]);
|
|
68
|
-
const _ = () => {
|
|
69
|
-
l && l();
|
|
70
|
-
}, w = (e) => {
|
|
71
|
-
S || t.current && e.target === t.current && t.current.close();
|
|
72
|
-
}, C = () => {
|
|
73
|
-
t.current && t.current.close();
|
|
74
|
-
};
|
|
75
|
-
return /* @__PURE__ */ n("dialog", { ...i, ref: t, className: r(o.root, b), onMouseDown: (e) => w(e), "aria-modal": "true", children: /* @__PURE__ */ E("div", { className: r(o.contentWrapper, {
|
|
76
|
-
[o.contentWrapperNoFooter]: !s
|
|
77
|
-
}), children: [
|
|
78
|
-
!a && /* @__PURE__ */ n(W, { ...N, className: o.closeButton, hideLabel: !0, iconName: "cross", size: "small", type: "button", variant: "ghost", onClick: () => C(), children: v }),
|
|
79
|
-
/* @__PURE__ */ n("header", { className: r(o.header, {
|
|
80
|
-
[o.headerCloseButton]: !a,
|
|
81
|
-
[o.headerScrollable]: f
|
|
82
|
-
}), children: k }),
|
|
83
|
-
/* @__PURE__ */ n(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
ref: u,
|
|
87
|
-
className: r(o.content, {
|
|
88
|
-
[o.contentNoFooter]: !s
|
|
89
|
-
}),
|
|
90
|
-
tabIndex: 0,
|
|
91
|
-
children: c
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
s && /* @__PURE__ */ n("footer", { className: r(o.footer, {
|
|
95
|
-
[o.footerScrollable]: f
|
|
96
|
-
}), children: s })
|
|
97
|
-
] }) });
|
|
98
|
-
};
|
|
99
|
-
export {
|
|
100
|
-
U as D,
|
|
101
|
-
V as v
|
|
102
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as l, jsx as t, Fragment as M } from "react/jsx-runtime";
|
|
3
|
-
import { c as h } from "./index.DQOqod3i.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import { u as x } from "./useBreakpoint.1txsny17.js";
|
|
6
|
-
import { Asterisk as v } from "../asterisk.Dwtdwpkq.js";
|
|
7
|
-
import { DSHeading as E } from "../heading.BHSklXho.js";
|
|
8
|
-
import { D as T } from "./Popover.ByaoNwGK.js";
|
|
9
|
-
import { D as q } from "./SystemFeedback.4osheYxC.js";
|
|
10
|
-
import { g as _ } from "./helpers.CexwVao7.js";
|
|
11
|
-
import "./index.cKLI89Eg.js";
|
|
12
|
-
import '../assets/Fieldset.C4Fx4-UV.css';const A = "ds-fieldset_root_13rpf_1", B = "ds-fieldset_child-wrapper_13rpf_98", C = "ds-fieldset_legend-wrapper_13rpf_105", L = "ds-fieldset_legend_13rpf_105", U = "ds-fieldset_legend--hidden_13rpf_116", z = "ds-fieldset_legend--utility--m_13rpf_131", I = "ds-fieldset_description_13rpf_143", O = "ds-fieldset_description--small_13rpf_157", V = "ds-fieldset_system-feedback_13rpf_161", e = {
|
|
13
|
-
root: A,
|
|
14
|
-
childWrapper: B,
|
|
15
|
-
legendWrapper: C,
|
|
16
|
-
legend: L,
|
|
17
|
-
legendHidden: U,
|
|
18
|
-
legendUtilityM: z,
|
|
19
|
-
description: I,
|
|
20
|
-
descriptionSmall: O,
|
|
21
|
-
systemFeedback: V
|
|
22
|
-
}, $ = ({
|
|
23
|
-
description: a,
|
|
24
|
-
hideLegend: s,
|
|
25
|
-
id: p,
|
|
26
|
-
legend: i,
|
|
27
|
-
popoverContent: c,
|
|
28
|
-
systemFeedback: r
|
|
29
|
-
}) => {
|
|
30
|
-
if (!p && (a || r))
|
|
31
|
-
throw new Error(_("DSFieldset", 'A unique "id" prop is required when providing the description or systemFeedback property. Please add a unique "id" prop to the DSFieldset component.'));
|
|
32
|
-
if (!i)
|
|
33
|
-
throw new Error(_("DSFieldset", "The legend prop is required. Please add the legend prop to the DSFieldset component."));
|
|
34
|
-
s && c && console.warn(_("DSFieldset", 'Setting "hideLegend" and "popoverContent" at the same time is not supported. The popover info button is part of the legend and will be hidden along with it. Please remove either "hideLegend" or "popoverContent".'));
|
|
35
|
-
}, te = ({
|
|
36
|
-
children: a,
|
|
37
|
-
legend: s,
|
|
38
|
-
className: p,
|
|
39
|
-
description: i,
|
|
40
|
-
disabled: c = !1,
|
|
41
|
-
hideLegend: r = !1,
|
|
42
|
-
id: m,
|
|
43
|
-
invalid: f = !1,
|
|
44
|
-
popoverContent: g,
|
|
45
|
-
popoverInfoButtonProps: F,
|
|
46
|
-
required: u = !1,
|
|
47
|
-
systemFeedback: d,
|
|
48
|
-
...w
|
|
49
|
-
}) => {
|
|
50
|
-
const N = x(r);
|
|
51
|
-
process.env.NODE_ENV !== "production" && $({
|
|
52
|
-
description: i,
|
|
53
|
-
hideLegend: r,
|
|
54
|
-
id: m,
|
|
55
|
-
legend: s,
|
|
56
|
-
popoverContent: g,
|
|
57
|
-
systemFeedback: d
|
|
58
|
-
});
|
|
59
|
-
let o, S, D;
|
|
60
|
-
const n = typeof s == "object" && s !== void 0;
|
|
61
|
-
n && ({
|
|
62
|
-
headingSize: o,
|
|
63
|
-
headingTag: S,
|
|
64
|
-
headingText: D
|
|
65
|
-
} = s);
|
|
66
|
-
const b = `${m}-feedback`, y = `${m}-description`, k = [f && d && b, i && y].filter(Boolean).join(" ") || void 0, P = !n || o === "small" || o === "small-uppercase", W = h(e.root, p), j = h(e.legend, {
|
|
67
|
-
[e.legendHidden]: N,
|
|
68
|
-
[e.legendUtilityM]: !n
|
|
69
|
-
}), H = h(e.description, {
|
|
70
|
-
[e.descriptionSmall]: P
|
|
71
|
-
});
|
|
72
|
-
return /* @__PURE__ */ l("fieldset", { className: W, disabled: c, ...w, "aria-invalid": f, "aria-describedby": k, children: [
|
|
73
|
-
/* @__PURE__ */ l("legend", { className: j, children: [
|
|
74
|
-
/* @__PURE__ */ t("span", { className: e.legendWrapper, children: n ? /* @__PURE__ */ l(E, { tag: S, size: o, children: [
|
|
75
|
-
D,
|
|
76
|
-
u && /* @__PURE__ */ t(v, {})
|
|
77
|
-
] }) : /* @__PURE__ */ l(M, { children: [
|
|
78
|
-
s,
|
|
79
|
-
u && /* @__PURE__ */ t(v, {})
|
|
80
|
-
] }) }),
|
|
81
|
-
g && /* @__PURE__ */ t(T, { placement: "top", defaultAnchorButtonProps: F, children: g })
|
|
82
|
-
] }),
|
|
83
|
-
i && /* @__PURE__ */ t("span", { id: y, className: H, children: i }),
|
|
84
|
-
f && d && /* @__PURE__ */ t(q, { id: b, variant: "error", message: d, className: e.systemFeedback }),
|
|
85
|
-
/* @__PURE__ */ t("div", { className: e.childWrapper, children: a })
|
|
86
|
-
] });
|
|
87
|
-
};
|
|
88
|
-
export {
|
|
89
|
-
te as D,
|
|
90
|
-
$ as v
|
|
91
|
-
};
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as m, Fragment as he, jsx as s } from "react/jsx-runtime";
|
|
3
|
-
import { c as f } from "./index.DQOqod3i.js";
|
|
4
|
-
import { forwardRef as Ie, useState as Q, useRef as ve, useCallback as Se } from "react";
|
|
5
|
-
import { t as we } from "./translate.nuU7uChI.js";
|
|
6
|
-
import { u as $ } from "./useBreakpoint.1txsny17.js";
|
|
7
|
-
import "./index.cKLI89Eg.js";
|
|
8
|
-
import { f as Fe } from "./AriaLiveRegions.utils.BPvIKT6B.js";
|
|
9
|
-
import { Asterisk as Le } from "../asterisk.Dwtdwpkq.js";
|
|
10
|
-
import { D as ze } from "./Button.COycNYUI.js";
|
|
11
|
-
import { D as Be } from "./Icon.DYtaQgbw.js";
|
|
12
|
-
import { D as ye } from "./Popover.ByaoNwGK.js";
|
|
13
|
-
import { D as Ne } from "./SystemFeedback.4osheYxC.js";
|
|
14
|
-
import { FileList as ke } from "../filelist.DfAt2xJa.js";
|
|
15
|
-
import { g as _ } from "./helpers.CexwVao7.js";
|
|
16
|
-
import '../assets/InputFile.ne7gwc_5.css';const xe = "ds-input-file_root_px31t_1", Te = "ds-input-file_browse-button--is-dragging-filled_px31t_1", Pe = "ds-input-file_browse-button--is-dragging_px31t_1", Ae = "ds-input-file_hint_px31t_14", $e = "ds-input-file_label-wrapper_px31t_14", Ce = "ds-input-file_label_px31t_14", Ue = "ds-input-file_label--disabled_px31t_33", We = "ds-input-file_label-wrapper--hidden_px31t_45", Re = "ds-input-file_feedback_px31t_73", qe = "ds-input-file_dropzone_px31t_77", Ee = "ds-input-file_dropzone--disabled_px31t_83", He = "ds-input-file_dropzone--invalid_px31t_97", Oe = "ds-input-file_dropzone--is-dragging_px31t_100", Me = "ds-input-file_hint-drop-zone_px31t_103", Ve = "ds-input-file_upload-icon_px31t_106", je = "ds-input-file_browse-button-dropzone--is-dragging_px31t_109", Ze = "ds-input-file_instructions_px31t_112", Ge = "ds-input-file_input_px31t_150", Je = "ds-input-file_required-sr-info_px31t_154", t = {
|
|
17
|
-
root: xe,
|
|
18
|
-
browseButtonIsDraggingFilled: Te,
|
|
19
|
-
browseButtonIsDragging: Pe,
|
|
20
|
-
hint: Ae,
|
|
21
|
-
labelWrapper: $e,
|
|
22
|
-
label: Ce,
|
|
23
|
-
labelDisabled: Ue,
|
|
24
|
-
labelWrapperHidden: We,
|
|
25
|
-
feedback: Re,
|
|
26
|
-
dropzone: qe,
|
|
27
|
-
dropzoneDisabled: Ee,
|
|
28
|
-
dropzoneInvalid: He,
|
|
29
|
-
dropzoneIsDragging: Oe,
|
|
30
|
-
hintDropZone: Me,
|
|
31
|
-
uploadIcon: Ve,
|
|
32
|
-
browseButtonDropzoneIsDragging: je,
|
|
33
|
-
instructions: Ze,
|
|
34
|
-
input: Ge,
|
|
35
|
-
requiredSrInfo: Je
|
|
36
|
-
}, Ke = {
|
|
37
|
-
dragAndDropInstructions: "Drag and drop files here or",
|
|
38
|
-
feedbackFileSize: "File too large. Maximum file size is",
|
|
39
|
-
feedbackFileType: "File type not allowed",
|
|
40
|
-
// {0} is the file name
|
|
41
|
-
fileListRemoveSelectionButtonLabel: "Remove {0} from selected files",
|
|
42
|
-
// {0} is the file name
|
|
43
|
-
fileListCancelUploadButtonLabel: "Cancel upload of {0}",
|
|
44
|
-
// {0} is the file name
|
|
45
|
-
fileListDeleteFileButtonLabel: "Delete file {0}",
|
|
46
|
-
// {0} is the file name
|
|
47
|
-
fileListIndeterminate: "{0} is uploading",
|
|
48
|
-
// {0} is the file name
|
|
49
|
-
fileListPreviewAltText: "Preview of {0}",
|
|
50
|
-
filesSelectedHint: "The following files are selected",
|
|
51
|
-
required: "required",
|
|
52
|
-
uploadStatus: "Upload status",
|
|
53
|
-
uploading: "Uploading...",
|
|
54
|
-
success: "Upload complete",
|
|
55
|
-
retry: "Retry upload",
|
|
56
|
-
togglePopover: "Toggle popover"
|
|
57
|
-
}, Qe = {
|
|
58
|
-
dragAndDropInstructions: "Dateien hier hin ziehen oder",
|
|
59
|
-
feedbackFileSize: "Datei zu groß. Maximale Dateigröße ist",
|
|
60
|
-
feedbackFileType: "Dateityp nicht zugelassen",
|
|
61
|
-
// {0} is the file name
|
|
62
|
-
fileListRemoveSelectionButtonLabel: "Datei {0} aus der Auswahl entfernen",
|
|
63
|
-
// {0} is the file name
|
|
64
|
-
fileListCancelUploadButtonLabel: "Upload von {0} abbrechen",
|
|
65
|
-
// {0} is the file name
|
|
66
|
-
fileListDeleteFileButtonLabel: "Datei {0} löschen",
|
|
67
|
-
// {0} is the file name
|
|
68
|
-
fileListIndeterminate: "{0} wird hochgeladen",
|
|
69
|
-
// {0} is the file name
|
|
70
|
-
fileListPreviewAltText: "Vorschau von {0}",
|
|
71
|
-
filesSelectedHint: "Die folgenden Dateien sind ausgewählt",
|
|
72
|
-
required: "erforderlich",
|
|
73
|
-
uploadStatus: "Upload-Status",
|
|
74
|
-
uploading: "Wird hochgeladen...",
|
|
75
|
-
success: "Upload abgeschlossen",
|
|
76
|
-
retry: "Upload erneut versuchen",
|
|
77
|
-
togglePopover: "Popover öffnen/schließen"
|
|
78
|
-
}, X = {
|
|
79
|
-
en: Ke,
|
|
80
|
-
de: Qe
|
|
81
|
-
}, Xe = (r, d) => {
|
|
82
|
-
const a = d.split(",").map((i) => i.trim().toLowerCase()).filter(Boolean), g = r.name.toLowerCase(), o = r.type.toLowerCase();
|
|
83
|
-
return a.some((i) => {
|
|
84
|
-
if (i.startsWith("."))
|
|
85
|
-
return g.endsWith(i);
|
|
86
|
-
if (i.endsWith("/*")) {
|
|
87
|
-
const [h] = o.split("/");
|
|
88
|
-
return h === i.slice(0, -2);
|
|
89
|
-
}
|
|
90
|
-
return o === i;
|
|
91
|
-
});
|
|
92
|
-
}, Ye = ({
|
|
93
|
-
id: r,
|
|
94
|
-
label: d,
|
|
95
|
-
inputFileButtonProps: a,
|
|
96
|
-
hideLabel: g,
|
|
97
|
-
popoverContent: o
|
|
98
|
-
}) => {
|
|
99
|
-
if (!r)
|
|
100
|
-
throw new Error(_("DSInputFile", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputFile component.'));
|
|
101
|
-
if (!d)
|
|
102
|
-
throw new Error(_("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}.`));
|
|
103
|
-
if (a && a.label?.trim() === "")
|
|
104
|
-
throw new Error(_("DSInputFile", "The input file button needs to have a label for a11y reasons. Please add a label to the inputFileButtonProps."));
|
|
105
|
-
if (a && a.variant && a.variant !== "outline" && a.variant !== "filled")
|
|
106
|
-
throw new Error(_("DSInputFile", "The inputFileButtonProps variant value can only be 'outline' for DSInputFile components inside forms or 'filled' for standalone DSInputFile components."));
|
|
107
|
-
g && o && console.warn(_("DSInputFile", "Using a popover when hideLabel is set to true is not supported."));
|
|
108
|
-
}, et = Ie(({
|
|
109
|
-
id: r,
|
|
110
|
-
label: d,
|
|
111
|
-
accept: a,
|
|
112
|
-
className: g,
|
|
113
|
-
disabled: o = !1,
|
|
114
|
-
files: i,
|
|
115
|
-
hideLabel: h = !1,
|
|
116
|
-
hint: b,
|
|
117
|
-
inputFileButtonProps: C,
|
|
118
|
-
invalid: I = !1,
|
|
119
|
-
isHintOutsideDropzone: Y = {
|
|
120
|
-
base: !0,
|
|
121
|
-
m: !1
|
|
122
|
-
},
|
|
123
|
-
lang: F = "en",
|
|
124
|
-
maxSizeInMb: L = 7,
|
|
125
|
-
multiple: D = !1,
|
|
126
|
-
popoverContent: z,
|
|
127
|
-
popoverInfoButtonProps: U,
|
|
128
|
-
required: W = !1,
|
|
129
|
-
showFileList: ee = !0,
|
|
130
|
-
showDropzone: p = !1,
|
|
131
|
-
systemFeedback: B,
|
|
132
|
-
translations: y,
|
|
133
|
-
onFilesSelect: N,
|
|
134
|
-
showProgress: te,
|
|
135
|
-
...ne
|
|
136
|
-
}, v) => {
|
|
137
|
-
const u = we(y || X[F]);
|
|
138
|
-
process.env.NODE_ENV !== "production" && Ye({
|
|
139
|
-
id: r,
|
|
140
|
-
label: d,
|
|
141
|
-
inputFileButtonProps: C,
|
|
142
|
-
hideLabel: $(h),
|
|
143
|
-
popoverContent: z
|
|
144
|
-
});
|
|
145
|
-
const {
|
|
146
|
-
label: oe = F === "en" ? `Choose File${D ? "s" : ""}` : `Datei${D ? "en" : ""} auswählen`,
|
|
147
|
-
variant: k = "outline",
|
|
148
|
-
...ie
|
|
149
|
-
} = C || {}, [R, q] = Q([]), ae = {
|
|
150
|
-
...U,
|
|
151
|
-
label: y && y.togglePopover || U?.label || X[F].togglePopover
|
|
152
|
-
}, S = ve(null), [c, x] = Q(!1), se = L * 1024 * 1024, T = `${r}-label`, E = `${r}-feedback`, P = `${r}-hint`, H = b ? ` ${P}` : "", O = $(h), M = $(Y), re = f(t.root, g), le = f(t.dropzone, {
|
|
153
|
-
[t.dropzoneDisabled]: o,
|
|
154
|
-
[t.dropzoneInvalid]: I,
|
|
155
|
-
[t.dropzoneIsDragging]: c
|
|
156
|
-
}), de = f(t.label, {
|
|
157
|
-
[t.labelDisabled]: o
|
|
158
|
-
}), pe = f(t.labelWrapper, {
|
|
159
|
-
// hide label only visually to keep them available for assistive technologies
|
|
160
|
-
[t.labelWrapperHidden]: O
|
|
161
|
-
}), ue = f(t.browseButton, {
|
|
162
|
-
[t.browseButtonIsDragging]: c && k === "outline",
|
|
163
|
-
[t.browseButtonIsDraggingFilled]: c && k === "filled"
|
|
164
|
-
}), ce = f(t.browseButtonDropzone, {
|
|
165
|
-
[t.browseButtonDropzoneIsDragging]: c
|
|
166
|
-
}), fe = [I && B && E].filter(Boolean).join(" ") || void 0, ge = (e) => {
|
|
167
|
-
S.current = e, typeof v == "function" ? v(e) : v && (v.current = e);
|
|
168
|
-
}, V = (e) => {
|
|
169
|
-
if (!e)
|
|
170
|
-
return;
|
|
171
|
-
const l = [];
|
|
172
|
-
for (const n of e)
|
|
173
|
-
if (a && !Xe(n, a) && (n.feedback = `${u("feedbackFileType")}: ${n.type}.`, n.uploadStatus = "error"), n.size > se && (n.feedback = `${u("feedbackFileSize")} ${L} MB.`, n.uploadStatus = "error"), n.uploadPercent = "indeterminate", l.push(n), !D && l.length > 0)
|
|
174
|
-
break;
|
|
175
|
-
l.length > 0 && !i && q(() => {
|
|
176
|
-
const n = [...l], w = n.map(({
|
|
177
|
-
name: A,
|
|
178
|
-
feedback: _e = ""
|
|
179
|
-
}) => `${A} ${_e}`).join(", ");
|
|
180
|
-
return setTimeout(() => {
|
|
181
|
-
me(`${u("filesSelectedHint")}: ${w}.`);
|
|
182
|
-
}, 1e3), n;
|
|
183
|
-
}), N?.(l);
|
|
184
|
-
}, j = (e) => {
|
|
185
|
-
o || (S.current?.click(), e.stopPropagation());
|
|
186
|
-
}, Z = (e) => {
|
|
187
|
-
e.preventDefault(), c || x(!0);
|
|
188
|
-
}, G = (e) => {
|
|
189
|
-
e.preventDefault(), c && x(!1);
|
|
190
|
-
}, J = Se((e) => {
|
|
191
|
-
e.preventDefault(), !o && (x(!1), V(e.dataTransfer.files));
|
|
192
|
-
}, [D, a, L, o]), be = (e) => {
|
|
193
|
-
V(e.target.files), S?.current && (S.current.value = "");
|
|
194
|
-
}, De = (e) => {
|
|
195
|
-
if (i) {
|
|
196
|
-
const l = i.filter((n, w) => w !== e);
|
|
197
|
-
N?.(l);
|
|
198
|
-
} else
|
|
199
|
-
q((l) => {
|
|
200
|
-
const n = l.filter((w, A) => A !== e);
|
|
201
|
-
return N?.(n), n;
|
|
202
|
-
});
|
|
203
|
-
}, me = (e) => {
|
|
204
|
-
Fe(e, "DSInputFile");
|
|
205
|
-
}, K = () => /* @__PURE__ */ s(ze, { ...ie, className: p ? ce : ue, type: "button", variant: k, size: p ? "small" : "medium", disabled: o, iconName: p ? void 0 : "upload", onClick: j, "aria-describedby": fe, "aria-invalid": I, children: oe });
|
|
206
|
-
return /* @__PURE__ */ m("div", { className: re, children: [
|
|
207
|
-
/* @__PURE__ */ m("div", { className: pe, children: [
|
|
208
|
-
/* @__PURE__ */ m("label", { className: de, id: T, htmlFor: r, children: [
|
|
209
|
-
d,
|
|
210
|
-
W && /* @__PURE__ */ m(he, { children: [
|
|
211
|
-
/* @__PURE__ */ s(Le, {}),
|
|
212
|
-
/* @__PURE__ */ s("span", { className: t.requiredSrInfo, children: u("required") })
|
|
213
|
-
] })
|
|
214
|
-
] }),
|
|
215
|
-
z && !O && /* @__PURE__ */ s(ye, { placement: "top", defaultAnchorButtonProps: ae, children: z })
|
|
216
|
-
] }),
|
|
217
|
-
b && (M || !p) && /* @__PURE__ */ s("div", { className: t.hint, id: P, children: b }),
|
|
218
|
-
!p && /* @__PURE__ */ s(
|
|
219
|
-
"div",
|
|
220
|
-
{
|
|
221
|
-
onDragOver: Z,
|
|
222
|
-
onDragLeave: G,
|
|
223
|
-
onDrop: J,
|
|
224
|
-
"aria-labelledby": `${T}${H}`,
|
|
225
|
-
"aria-disabled": o,
|
|
226
|
-
children: K()
|
|
227
|
-
}
|
|
228
|
-
),
|
|
229
|
-
p && /* @__PURE__ */ m(
|
|
230
|
-
"div",
|
|
231
|
-
{
|
|
232
|
-
className: le,
|
|
233
|
-
onClick: (e) => j(e),
|
|
234
|
-
onDragOver: Z,
|
|
235
|
-
onDragLeave: G,
|
|
236
|
-
onDrop: J,
|
|
237
|
-
"aria-labelledby": `${T}${H}`,
|
|
238
|
-
"aria-disabled": o,
|
|
239
|
-
children: [
|
|
240
|
-
/* @__PURE__ */ s(Be, { name: "upload", className: t.uploadIcon, size: "x-large" }),
|
|
241
|
-
/* @__PURE__ */ s("p", { id: "file-upload-instructions", className: t.instructions, children: u("dragAndDropInstructions") }),
|
|
242
|
-
K(),
|
|
243
|
-
b && !M && /* @__PURE__ */ s("div", { className: t.hintDropZone, id: P, children: b })
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
),
|
|
247
|
-
/* @__PURE__ */ s("input", { ...ne, type: "file", className: t.input, id: r, ref: ge, accept: a, multiple: D, "aria-hidden": "true", required: W, disabled: o, onChange: be }),
|
|
248
|
-
I && B && /* @__PURE__ */ s(Ne, { className: t.feedback, message: B, variant: "error", id: E }),
|
|
249
|
-
(i ? i.length > 0 : R.length > 0) && ee && /* @__PURE__ */ s(ke, { files: i || R, onRemoveFile: De, t: u, showProgress: te })
|
|
250
|
-
] });
|
|
251
|
-
});
|
|
252
|
-
et.displayName = "DSInputFile";
|
|
253
|
-
export {
|
|
254
|
-
et as D,
|
|
255
|
-
X as a,
|
|
256
|
-
Qe as b,
|
|
257
|
-
Ke as c,
|
|
258
|
-
Xe as f,
|
|
259
|
-
Ye as v
|
|
260
|
-
};
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as N, jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { c as o } from "./index.DQOqod3i.js";
|
|
4
|
-
import { forwardRef as qe, useState as m, useRef as L, useEffect as R } from "react";
|
|
5
|
-
import { h as we } from "./has-window.ut_-aShB.js";
|
|
6
|
-
import { u as J } from "./useBreakpoint.1txsny17.js";
|
|
7
|
-
import "./index.cKLI89Eg.js";
|
|
8
|
-
import { u as K } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
9
|
-
import { Asterisk as Be } from "../asterisk.Dwtdwpkq.js";
|
|
10
|
-
import { D as Q } from "./Button.COycNYUI.js";
|
|
11
|
-
import { M as E, a as W } from "./Input.utils.CkmzxIrU.js";
|
|
12
|
-
import { D as Le } from "./Popover.ByaoNwGK.js";
|
|
13
|
-
import { D as Re } from "./SystemFeedback.4osheYxC.js";
|
|
14
|
-
import { g as f } from "./helpers.CexwVao7.js";
|
|
15
|
-
import '../assets/InputNumber.BIdsQuFc.css';const Ee = "ds-input-number_input_lxujq_1", We = "ds-input-number_input--small_lxujq_9", ke = "ds-input-number_input--invalid_lxujq_121", Pe = "ds-input-number_input--has-affix_lxujq_197", Ce = "ds-input-number_input--is-ready_lxujq_211", Ve = "ds-input-number_root_lxujq_222", $e = "ds-input-number_hint_lxujq_222", He = "ds-input-number_label-wrapper_lxujq_222", Fe = "ds-input-number_wrapper_lxujq_226", Te = "ds-input-number_affix_lxujq_232", Me = "ds-input-number_affix--small_lxujq_253", Xe = "ds-input-number_prefix_lxujq_266", Ue = "ds-input-number_suffix_lxujq_272", Ge = "ds-input-number_affix--disabled_lxujq_278", Oe = "ds-input-number_affix--readonly_lxujq_289", Je = "ds-input-number_action-button_lxujq_325", Ke = "ds-input-number_label_lxujq_222", Qe = "ds-input-number_label--disabled_lxujq_344", Ye = "ds-input-number_label-wrapper--hidden_lxujq_356", Ze = "ds-input-number_feedback_lxujq_384", ze = "ds-input-number_second-action-button_lxujq_397", et = "ds-input-number_value-announcer_lxujq_401", e = {
|
|
16
|
-
input: Ee,
|
|
17
|
-
inputSmall: We,
|
|
18
|
-
inputInvalid: ke,
|
|
19
|
-
inputHasAffix: Pe,
|
|
20
|
-
inputIsReady: Ce,
|
|
21
|
-
root: Ve,
|
|
22
|
-
hint: $e,
|
|
23
|
-
labelWrapper: He,
|
|
24
|
-
wrapper: Fe,
|
|
25
|
-
affix: Te,
|
|
26
|
-
affixSmall: Me,
|
|
27
|
-
prefix: Xe,
|
|
28
|
-
suffix: Ue,
|
|
29
|
-
affixDisabled: Ge,
|
|
30
|
-
affixReadonly: Oe,
|
|
31
|
-
actionButton: Je,
|
|
32
|
-
label: Ke,
|
|
33
|
-
labelDisabled: Qe,
|
|
34
|
-
labelWrapperHidden: Ye,
|
|
35
|
-
feedback: Ze,
|
|
36
|
-
secondActionButton: ze,
|
|
37
|
-
valueAnnouncer: et
|
|
38
|
-
}, Y = (n) => n != null && n !== "", tt = ({
|
|
39
|
-
id: n,
|
|
40
|
-
label: b,
|
|
41
|
-
prefix: _,
|
|
42
|
-
suffix: h,
|
|
43
|
-
hideLabel: s,
|
|
44
|
-
popoverContent: y
|
|
45
|
-
}) => {
|
|
46
|
-
if (!n)
|
|
47
|
-
throw new Error(f("DSInputNumber", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputNumber component.'));
|
|
48
|
-
if (!b)
|
|
49
|
-
throw new Error(f("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}.`));
|
|
50
|
-
_ && _.length > E && console.warn(f("DSInputNumber", `Prefix length must not exceed ${E} characters.`)), h && h.length > W && console.warn(f("DSInputNumber", `Suffix length must not exceed ${W} characters.`)), s && y && console.warn(f("DSInputNumber", "Using a popover when hideLabel is set to true is not supported."));
|
|
51
|
-
}, nt = qe(({
|
|
52
|
-
id: n,
|
|
53
|
-
label: b,
|
|
54
|
-
announcementText: _ = "Value changed to",
|
|
55
|
-
className: h,
|
|
56
|
-
disabled: s = !1,
|
|
57
|
-
decreaseAmountButtonProps: y,
|
|
58
|
-
hint: D,
|
|
59
|
-
hideLabel: k = !1,
|
|
60
|
-
invalid: x = !1,
|
|
61
|
-
increaseAmountButtonProps: Z,
|
|
62
|
-
prefix: r,
|
|
63
|
-
max: P = 100,
|
|
64
|
-
min: C = 0,
|
|
65
|
-
popoverContent: v,
|
|
66
|
-
popoverInfoButtonProps: z,
|
|
67
|
-
readonly: i = !1,
|
|
68
|
-
required: V = !1,
|
|
69
|
-
size: l = "medium",
|
|
70
|
-
step: ee = 1,
|
|
71
|
-
suffix: c,
|
|
72
|
-
systemFeedback: A,
|
|
73
|
-
value: S,
|
|
74
|
-
onChange: $,
|
|
75
|
-
...te
|
|
76
|
-
}, I) => {
|
|
77
|
-
process.env.NODE_ENV !== "production" && tt({
|
|
78
|
-
id: n,
|
|
79
|
-
label: b,
|
|
80
|
-
prefix: r,
|
|
81
|
-
suffix: c,
|
|
82
|
-
hideLabel: J(k),
|
|
83
|
-
popoverContent: v
|
|
84
|
-
});
|
|
85
|
-
const {
|
|
86
|
-
label: ne = "Decrease",
|
|
87
|
-
tooltip: ae,
|
|
88
|
-
...se
|
|
89
|
-
} = y || {}, {
|
|
90
|
-
label: ue = "Increase",
|
|
91
|
-
tooltip: oe,
|
|
92
|
-
...le
|
|
93
|
-
} = Z || {}, [re, ie] = m(!1), [p, g] = m(S), [j, H] = m(""), [ce, pe] = m(!1), [de, me] = m({}), u = L(null), fe = (t) => {
|
|
94
|
-
u.current = t, typeof I == "function" ? I(t) : I && (I.current = t);
|
|
95
|
-
}, be = r?.substring(0, E), q = L(null), _e = c?.substring(0, W), w = L(null), F = J(k);
|
|
96
|
-
R(() => {
|
|
97
|
-
g(S);
|
|
98
|
-
}, [S]), R(() => {
|
|
99
|
-
if (j) {
|
|
100
|
-
const t = setTimeout(() => {
|
|
101
|
-
H("");
|
|
102
|
-
}, 3e3);
|
|
103
|
-
return () => clearTimeout(t);
|
|
104
|
-
}
|
|
105
|
-
}, [j]), R(() => {
|
|
106
|
-
const t = (d) => {
|
|
107
|
-
d.preventDefault();
|
|
108
|
-
};
|
|
109
|
-
return u.current?.addEventListener("wheel", t, {
|
|
110
|
-
// The { passive: false } option is used to indicate that the event listener wants to cancel the event, allowing preventDefault to work as expected.
|
|
111
|
-
passive: !1
|
|
112
|
-
}), () => {
|
|
113
|
-
u.current?.removeEventListener("wheel", t);
|
|
114
|
-
};
|
|
115
|
-
}, []), K(() => {
|
|
116
|
-
const t = l === "medium" ? 16 : 8, d = {};
|
|
117
|
-
if (q.current) {
|
|
118
|
-
const B = q.current.offsetWidth;
|
|
119
|
-
d.paddingInlineStart = t + B + "px";
|
|
120
|
-
}
|
|
121
|
-
if (w.current) {
|
|
122
|
-
const B = w.current.offsetWidth;
|
|
123
|
-
d.paddingInlineEnd = t + B + "px";
|
|
124
|
-
}
|
|
125
|
-
me(d), ie(!0);
|
|
126
|
-
}, [r, c, l, ce]), K(() => {
|
|
127
|
-
we && (async () => "fonts" in document && (await document.fonts.load('1em "STIHL Contraface Digital Text Regular"'), pe(!0)))();
|
|
128
|
-
}, []);
|
|
129
|
-
const T = o(e.affix, {
|
|
130
|
-
[e.affixSmall]: l === "small",
|
|
131
|
-
[e.affixDisabled]: s,
|
|
132
|
-
[e.affixReadonly]: i
|
|
133
|
-
}), M = `${n}-label`, X = `${n}-feedback`, U = `${n}-hint`, G = `${n}-value-announcer`, he = D ? ` ${U}` : "", xe = o(e.root, h), Ie = o(e.input, {
|
|
134
|
-
// small input
|
|
135
|
-
[e.inputSmall]: l === "small",
|
|
136
|
-
// invalid state
|
|
137
|
-
[e.inputInvalid]: x,
|
|
138
|
-
// prefix/suffix
|
|
139
|
-
[e.inputHasAffix]: r || c,
|
|
140
|
-
[e.inputIsReady]: re
|
|
141
|
-
}), Ne = o(e.label, {
|
|
142
|
-
[e.labelDisabled]: s
|
|
143
|
-
}), ye = o(e.labelWrapper, {
|
|
144
|
-
// hide label only visually to keep them available for assistive technologies
|
|
145
|
-
[e.labelWrapperHidden]: F
|
|
146
|
-
}), De = o(e.secondActionButton, {
|
|
147
|
-
[e.secondActionButtonSmall]: l === "small"
|
|
148
|
-
}), ve = o(e.actionButton, {
|
|
149
|
-
[e.actionButtonSmall]: l === "small"
|
|
150
|
-
}), Ae = () => {
|
|
151
|
-
const t = [G];
|
|
152
|
-
return x && A && t.push(X), t.join(" ");
|
|
153
|
-
}, O = () => {
|
|
154
|
-
if (u.current) {
|
|
155
|
-
g(u.current.value);
|
|
156
|
-
const t = new Event("change", {
|
|
157
|
-
bubbles: !0
|
|
158
|
-
});
|
|
159
|
-
u.current?.dispatchEvent(t), H(`${_} ${u.current.value}`);
|
|
160
|
-
}
|
|
161
|
-
}, Se = () => {
|
|
162
|
-
u.current?.stepDown(), O();
|
|
163
|
-
}, ge = () => {
|
|
164
|
-
u.current?.stepUp(), O();
|
|
165
|
-
}, je = (t) => {
|
|
166
|
-
g(t.target.value), $ && $(t);
|
|
167
|
-
};
|
|
168
|
-
return /* @__PURE__ */ N("div", { className: xe, children: [
|
|
169
|
-
/* @__PURE__ */ N("div", { className: ye, children: [
|
|
170
|
-
/* @__PURE__ */ N("label", { className: Ne, id: M, htmlFor: n, children: [
|
|
171
|
-
b,
|
|
172
|
-
V && /* @__PURE__ */ a(Be, {})
|
|
173
|
-
] }),
|
|
174
|
-
v && !F && /* @__PURE__ */ a(Le, { placement: "top", defaultAnchorButtonProps: z, children: v })
|
|
175
|
-
] }),
|
|
176
|
-
D && /* @__PURE__ */ a("div", { className: e.hint, id: U, children: D }),
|
|
177
|
-
/* @__PURE__ */ a(
|
|
178
|
-
"div",
|
|
179
|
-
{
|
|
180
|
-
"aria-live": "polite",
|
|
181
|
-
"aria-atomic": "true",
|
|
182
|
-
className: e.valueAnnouncer,
|
|
183
|
-
id: G,
|
|
184
|
-
children: j
|
|
185
|
-
}
|
|
186
|
-
),
|
|
187
|
-
/* @__PURE__ */ N("div", { className: e.wrapper, children: [
|
|
188
|
-
r && /* @__PURE__ */ a(
|
|
189
|
-
"span",
|
|
190
|
-
{
|
|
191
|
-
className: o(T, e.prefix),
|
|
192
|
-
ref: q,
|
|
193
|
-
"aria-disabled": s,
|
|
194
|
-
children: be
|
|
195
|
-
}
|
|
196
|
-
),
|
|
197
|
-
/* @__PURE__ */ a(
|
|
198
|
-
"input",
|
|
199
|
-
{
|
|
200
|
-
className: Ie,
|
|
201
|
-
id: n,
|
|
202
|
-
...te,
|
|
203
|
-
style: de,
|
|
204
|
-
ref: fe,
|
|
205
|
-
"aria-labelledby": `${M}${he}`,
|
|
206
|
-
"aria-describedby": Ae(),
|
|
207
|
-
"aria-invalid": x,
|
|
208
|
-
"aria-disabled": i,
|
|
209
|
-
disabled: s,
|
|
210
|
-
min: C,
|
|
211
|
-
max: P,
|
|
212
|
-
readOnly: i,
|
|
213
|
-
required: V,
|
|
214
|
-
step: ee,
|
|
215
|
-
type: "number",
|
|
216
|
-
value: p,
|
|
217
|
-
onChange: je
|
|
218
|
-
}
|
|
219
|
-
),
|
|
220
|
-
c && /* @__PURE__ */ a(
|
|
221
|
-
"span",
|
|
222
|
-
{
|
|
223
|
-
className: o(T, e.suffix),
|
|
224
|
-
ref: w,
|
|
225
|
-
"aria-disabled": s,
|
|
226
|
-
children: _e
|
|
227
|
-
}
|
|
228
|
-
),
|
|
229
|
-
/* @__PURE__ */ a(Q, { ...se, hideLabel: !0, theme: "light", iconName: "minus", variant: "filled", className: De, size: l, onClick: Se, tooltip: ae, disabled: s || i || Y(p) && Number(p) <= Number(C), type: "button", children: ne }),
|
|
230
|
-
/* @__PURE__ */ a(Q, { ...le, hideLabel: !0, theme: "light", iconName: "plus", variant: "filled", tooltip: oe, className: ve, size: l, onClick: ge, disabled: s || i || Y(p) && Number(p) >= Number(P), type: "button", children: ue })
|
|
231
|
-
] }),
|
|
232
|
-
x && A && /* @__PURE__ */ a(Re, { className: e.feedback, message: A, variant: "error", id: X })
|
|
233
|
-
] });
|
|
234
|
-
});
|
|
235
|
-
nt.displayName = "DSInputNumber";
|
|
236
|
-
export {
|
|
237
|
-
nt as D,
|
|
238
|
-
Y as i,
|
|
239
|
-
tt as v
|
|
240
|
-
};
|