@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
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as I, Fragment as ve, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { c as p } from "./index.DQOqod3i.js";
|
|
4
|
+
import { forwardRef as Se, useState as te, useRef as Fe, useCallback as we } from "react";
|
|
5
|
+
import { f as ke } from "./AriaLiveRegions.utils.xoETe2Ps.js";
|
|
6
|
+
import { Asterisk as ze } from "../asterisk.Dwtdwpkq.js";
|
|
7
|
+
import { D as Ne } from "./Button.CCol--xy.js";
|
|
8
|
+
import { D as Le } from "./Icon.DYtaQgbw.js";
|
|
9
|
+
import { D as Be } from "./Popover.CxZZ_y1Z.js";
|
|
10
|
+
import { D as Pe } from "./SystemFeedback.DhWcYjnu.js";
|
|
11
|
+
import { FileList as Te } from "../filelist.GrEwoM1u.js";
|
|
12
|
+
import { g as y } from "./helpers.CexwVao7.js";
|
|
13
|
+
import { u as q } from "./useBreakpoint.1txsny17.js";
|
|
14
|
+
import { t as Ce } from "./translate.DSb-TdWR.js";
|
|
15
|
+
import '../assets/InputFile.CDtghZtl.css';const Ae = "ds-input-file_root_sryt8_1", $e = "ds-input-file_browse-button--is-dragging-filled_sryt8_1", Ue = "ds-input-file_browse-button--is-dragging_sryt8_1", We = "ds-input-file_hint_sryt8_14", qe = "ds-input-file_label-wrapper_sryt8_14", Re = "ds-input-file_label_sryt8_14", Ee = "ds-input-file_label--disabled_sryt8_33", xe = "ds-input-file_label--dark_sryt8_37", He = "ds-input-file_label-wrapper--hidden_sryt8_53", Me = "ds-input-file_hint--dark_sryt8_80", Oe = "ds-input-file_feedback_sryt8_84", Ve = "ds-input-file_dropzone_sryt8_88", je = "ds-input-file_dropzone--disabled_sryt8_94", Ze = "ds-input-file_dropzone--invalid_sryt8_108", Ge = "ds-input-file_dropzone--is-dragging_sryt8_111", Je = "ds-input-file_hint-drop-zone_sryt8_114", Ke = "ds-input-file_upload-icon_sryt8_117", Qe = "ds-input-file_browse-button-dropzone--is-dragging_sryt8_120", Xe = "ds-input-file_instructions_sryt8_123", Ye = "ds-input-file_root--dark_sryt8_161", et = "ds-input-file_dropzone--dark_sryt8_168", tt = "ds-input-file_input_sryt8_199", ot = "ds-input-file_required-sr-info_sryt8_203", e = {
|
|
16
|
+
root: Ae,
|
|
17
|
+
browseButtonIsDraggingFilled: $e,
|
|
18
|
+
browseButtonIsDragging: Ue,
|
|
19
|
+
hint: We,
|
|
20
|
+
labelWrapper: qe,
|
|
21
|
+
label: Re,
|
|
22
|
+
labelDisabled: Ee,
|
|
23
|
+
labelDark: xe,
|
|
24
|
+
labelWrapperHidden: He,
|
|
25
|
+
hintDark: Me,
|
|
26
|
+
feedback: Oe,
|
|
27
|
+
dropzone: Ve,
|
|
28
|
+
dropzoneDisabled: je,
|
|
29
|
+
dropzoneInvalid: Ze,
|
|
30
|
+
dropzoneIsDragging: Ge,
|
|
31
|
+
hintDropZone: Je,
|
|
32
|
+
uploadIcon: Ke,
|
|
33
|
+
browseButtonDropzoneIsDragging: Qe,
|
|
34
|
+
instructions: Xe,
|
|
35
|
+
rootDark: Ye,
|
|
36
|
+
dropzoneDark: et,
|
|
37
|
+
input: tt,
|
|
38
|
+
requiredSrInfo: ot
|
|
39
|
+
}, nt = {
|
|
40
|
+
dragAndDropInstructions: "Drag and drop files here or",
|
|
41
|
+
feedbackFileSize: "File too large. Maximum file size is",
|
|
42
|
+
feedbackFileType: "File type not allowed",
|
|
43
|
+
fileListRemoveSelectionButtonLabel: "Remove {fileName} from selected files",
|
|
44
|
+
fileListCancelUploadButtonLabel: "Cancel upload of {fileName}",
|
|
45
|
+
fileListDeleteFileButtonLabel: "Delete file {fileName}",
|
|
46
|
+
fileListIndeterminate: "{fileName} is uploading",
|
|
47
|
+
fileListPreviewAltText: "Preview of {fileName}",
|
|
48
|
+
filesSelectedHint: "The following files are selected",
|
|
49
|
+
required: "required",
|
|
50
|
+
uploadStatus: "Upload status",
|
|
51
|
+
uploading: "Uploading...",
|
|
52
|
+
success: "Upload complete",
|
|
53
|
+
retry: "Retry upload",
|
|
54
|
+
togglePopover: "Toggle popover"
|
|
55
|
+
}, it = {
|
|
56
|
+
dragAndDropInstructions: "Dateien hier hin ziehen oder",
|
|
57
|
+
feedbackFileSize: "Datei zu groß. Maximale Dateigröße ist",
|
|
58
|
+
feedbackFileType: "Dateityp nicht zugelassen",
|
|
59
|
+
fileListRemoveSelectionButtonLabel: "Datei {fileName} aus der Auswahl entfernen",
|
|
60
|
+
fileListCancelUploadButtonLabel: "Upload von {fileName} abbrechen",
|
|
61
|
+
fileListDeleteFileButtonLabel: "Datei {fileName} löschen",
|
|
62
|
+
fileListIndeterminate: "{fileName} wird hochgeladen",
|
|
63
|
+
fileListPreviewAltText: "Vorschau von {fileName}",
|
|
64
|
+
filesSelectedHint: "Die folgenden Dateien sind ausgewählt",
|
|
65
|
+
required: "erforderlich",
|
|
66
|
+
uploadStatus: "Upload-Status",
|
|
67
|
+
uploading: "Wird hochgeladen...",
|
|
68
|
+
success: "Upload abgeschlossen",
|
|
69
|
+
retry: "Upload erneut versuchen",
|
|
70
|
+
togglePopover: "Popover öffnen/schließen"
|
|
71
|
+
}, z = {
|
|
72
|
+
en: nt,
|
|
73
|
+
de: it
|
|
74
|
+
}, st = (c, d) => {
|
|
75
|
+
const n = d.split(",").map((a) => a.trim().toLowerCase()).filter(Boolean), u = c.name.toLowerCase(), r = c.type.toLowerCase();
|
|
76
|
+
return n.some((a) => {
|
|
77
|
+
if (a.startsWith("."))
|
|
78
|
+
return u.endsWith(a);
|
|
79
|
+
if (a.endsWith("/*")) {
|
|
80
|
+
const [s] = r.split("/");
|
|
81
|
+
return s === a.slice(0, -2);
|
|
82
|
+
}
|
|
83
|
+
return r === a;
|
|
84
|
+
});
|
|
85
|
+
}, rt = ({
|
|
86
|
+
id: c,
|
|
87
|
+
label: d,
|
|
88
|
+
inputFileButtonProps: n,
|
|
89
|
+
hideLabel: u,
|
|
90
|
+
popoverContent: r
|
|
91
|
+
}) => {
|
|
92
|
+
if (!c)
|
|
93
|
+
throw new Error(y("DSInputFile", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputFile component.'));
|
|
94
|
+
if (!d)
|
|
95
|
+
throw new Error(y("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}.`));
|
|
96
|
+
if (n && n.label?.trim() === "")
|
|
97
|
+
throw new Error(y("DSInputFile", "The input file button needs to have a label for a11y reasons. Please add a label to the inputFileButtonProps."));
|
|
98
|
+
if (n && n.variant && n.variant !== "outline" && n.variant !== "filled")
|
|
99
|
+
throw new Error(y("DSInputFile", "The inputFileButtonProps variant value can only be 'outline' for DSInputFile components inside forms or 'filled' for standalone DSInputFile components."));
|
|
100
|
+
u && r && console.warn(y("DSInputFile", "Using a popover when hideLabel is set to true is not supported."));
|
|
101
|
+
}, at = Se((c, d) => {
|
|
102
|
+
const {
|
|
103
|
+
id: n,
|
|
104
|
+
label: u,
|
|
105
|
+
accept: r,
|
|
106
|
+
className: a,
|
|
107
|
+
disabled: s = !1,
|
|
108
|
+
files: f,
|
|
109
|
+
hideLabel: R = !1,
|
|
110
|
+
hint: h,
|
|
111
|
+
inputFileButtonProps: E,
|
|
112
|
+
invalid: v = !1,
|
|
113
|
+
isHintOutsideDropzone: oe = {
|
|
114
|
+
base: !0,
|
|
115
|
+
m: !1
|
|
116
|
+
},
|
|
117
|
+
lang: S = "en",
|
|
118
|
+
maxSizeInMb: N = 7,
|
|
119
|
+
multiple: _ = !1,
|
|
120
|
+
popoverContent: L,
|
|
121
|
+
popoverInfoButtonProps: x,
|
|
122
|
+
required: H = !1,
|
|
123
|
+
showFileList: ne = !0,
|
|
124
|
+
showDropzone: b = !1,
|
|
125
|
+
systemFeedback: B,
|
|
126
|
+
theme: g = "light",
|
|
127
|
+
translations: P,
|
|
128
|
+
onFilesSelect: T,
|
|
129
|
+
showProgress: ie,
|
|
130
|
+
...se
|
|
131
|
+
} = c, m = Ce(P || z[S] || z.en, S);
|
|
132
|
+
process.env.NODE_ENV !== "production" && rt({
|
|
133
|
+
id: n,
|
|
134
|
+
label: u,
|
|
135
|
+
inputFileButtonProps: E,
|
|
136
|
+
hideLabel: q(R),
|
|
137
|
+
popoverContent: L
|
|
138
|
+
});
|
|
139
|
+
const {
|
|
140
|
+
label: re = S === "en" ? `Choose File${_ ? "s" : ""}` : `Datei${_ ? "en" : ""} auswählen`,
|
|
141
|
+
variant: C = "outline",
|
|
142
|
+
...ae
|
|
143
|
+
} = E || {}, [M, O] = te([]), le = {
|
|
144
|
+
...x,
|
|
145
|
+
label: P && P.togglePopover || x?.label || (z[S] || z.en).togglePopover
|
|
146
|
+
}, F = Fe(null), [D, A] = te(!1), de = N * 1024 * 1024, $ = `${n}-label`, V = `${n}-feedback`, U = `${n}-hint`, j = h ? ` ${U}` : "", Z = q(R), G = q(oe), w = g === "dark", pe = p(e.root, a, {
|
|
147
|
+
[e.rootDark]: w
|
|
148
|
+
}), ce = p(e.dropzone, {
|
|
149
|
+
[e.dropzoneDark]: w,
|
|
150
|
+
[e.dropzoneDisabled]: s,
|
|
151
|
+
[e.dropzoneInvalid]: v,
|
|
152
|
+
[e.dropzoneIsDragging]: D
|
|
153
|
+
}), ue = p(e.label, {
|
|
154
|
+
[e.labelDark]: w,
|
|
155
|
+
[e.labelDisabled]: s
|
|
156
|
+
}), fe = p(e.labelWrapper, {
|
|
157
|
+
// hide label only visually to keep them available for assistive technologies
|
|
158
|
+
[e.labelWrapperHidden]: Z
|
|
159
|
+
}), be = p(e.browseButton, {
|
|
160
|
+
[e.browseButtonIsDragging]: D && C === "outline",
|
|
161
|
+
[e.browseButtonIsDraggingFilled]: D && C === "filled"
|
|
162
|
+
}), ge = p(e.browseButtonDropzone, {
|
|
163
|
+
[e.browseButtonDropzoneIsDragging]: D
|
|
164
|
+
}), me = [v && B && V].filter(Boolean).join(" ") || void 0, De = (t) => {
|
|
165
|
+
F.current = t, typeof d == "function" ? d(t) : d && (d.current = t);
|
|
166
|
+
}, J = (t) => {
|
|
167
|
+
if (!t)
|
|
168
|
+
return;
|
|
169
|
+
const l = [];
|
|
170
|
+
for (const o of t)
|
|
171
|
+
if (r && !st(o, r) && (o.feedback = `${m("feedbackFileType")}: ${o.type}.`, o.uploadStatus = "error"), o.size > de && (o.feedback = `${m("feedbackFileSize")} ${N} MB.`, o.uploadStatus = "error"), o.uploadPercent = "indeterminate", l.push(o), !_ && l.length > 0)
|
|
172
|
+
break;
|
|
173
|
+
l.length > 0 && !f && O(() => {
|
|
174
|
+
const o = [...l], k = o.map(({
|
|
175
|
+
name: W,
|
|
176
|
+
feedback: ye = ""
|
|
177
|
+
}) => `${W} ${ye}`).join(", ");
|
|
178
|
+
return setTimeout(() => {
|
|
179
|
+
Ie(`${m("filesSelectedHint")}: ${k}.`);
|
|
180
|
+
}, 1e3), o;
|
|
181
|
+
}), T?.(l);
|
|
182
|
+
}, K = (t) => {
|
|
183
|
+
s || (F.current?.click(), t.stopPropagation());
|
|
184
|
+
}, Q = (t) => {
|
|
185
|
+
t.preventDefault(), D || A(!0);
|
|
186
|
+
}, X = (t) => {
|
|
187
|
+
t.preventDefault(), D && A(!1);
|
|
188
|
+
}, Y = we((t) => {
|
|
189
|
+
t.preventDefault(), !s && (A(!1), J(t.dataTransfer.files));
|
|
190
|
+
}, [_, r, N, s]), he = (t) => {
|
|
191
|
+
J(t.target.files), F?.current && (F.current.value = "");
|
|
192
|
+
}, _e = (t) => {
|
|
193
|
+
if (f) {
|
|
194
|
+
const l = f.filter((o, k) => k !== t);
|
|
195
|
+
T?.(l);
|
|
196
|
+
} else
|
|
197
|
+
O((l) => {
|
|
198
|
+
const o = l.filter((k, W) => W !== t);
|
|
199
|
+
return T?.(o), o;
|
|
200
|
+
});
|
|
201
|
+
}, Ie = (t) => {
|
|
202
|
+
ke(t, "DSInputFile");
|
|
203
|
+
}, ee = () => /* @__PURE__ */ i(Ne, { ...ae, className: b ? ge : be, type: "button", variant: C, size: b ? "small" : "medium", disabled: s, iconName: b ? void 0 : "upload", onClick: K, "aria-describedby": me, "aria-invalid": v, theme: g, children: re });
|
|
204
|
+
return /* @__PURE__ */ I("div", { className: pe, children: [
|
|
205
|
+
/* @__PURE__ */ I("div", { className: fe, children: [
|
|
206
|
+
/* @__PURE__ */ I("label", { className: ue, id: $, htmlFor: n, children: [
|
|
207
|
+
u,
|
|
208
|
+
H && /* @__PURE__ */ I(ve, { children: [
|
|
209
|
+
/* @__PURE__ */ i(ze, {}),
|
|
210
|
+
/* @__PURE__ */ i("span", { className: e.requiredSrInfo, children: m("required") })
|
|
211
|
+
] })
|
|
212
|
+
] }),
|
|
213
|
+
L && !Z && /* @__PURE__ */ i(Be, { placement: "top", defaultAnchorButtonProps: le, theme: g, children: L })
|
|
214
|
+
] }),
|
|
215
|
+
h && (G || !b) && /* @__PURE__ */ i("div", { className: p(e.hint, {
|
|
216
|
+
[e.hintDark]: w
|
|
217
|
+
}), id: U, children: h }),
|
|
218
|
+
!b && /* @__PURE__ */ i(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
onDragOver: Q,
|
|
222
|
+
onDragLeave: X,
|
|
223
|
+
onDrop: Y,
|
|
224
|
+
"aria-labelledby": `${$}${j}`,
|
|
225
|
+
"aria-disabled": s,
|
|
226
|
+
children: ee()
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
b && /* @__PURE__ */ I(
|
|
230
|
+
"div",
|
|
231
|
+
{
|
|
232
|
+
className: ce,
|
|
233
|
+
onClick: (t) => K(t),
|
|
234
|
+
onDragOver: Q,
|
|
235
|
+
onDragLeave: X,
|
|
236
|
+
onDrop: Y,
|
|
237
|
+
"aria-labelledby": `${$}${j}`,
|
|
238
|
+
"aria-disabled": s,
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ i(Le, { name: "upload", className: e.uploadIcon, size: "x-large", theme: g }),
|
|
241
|
+
/* @__PURE__ */ i("p", { id: "file-upload-instructions", className: e.instructions, children: m("dragAndDropInstructions") }),
|
|
242
|
+
ee(),
|
|
243
|
+
h && !G && /* @__PURE__ */ i("div", { className: e.hintDropZone, id: U, children: h })
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ i("input", { ...se, type: "file", className: e.input, id: n, ref: De, accept: r, multiple: _, "aria-hidden": "true", required: H, disabled: s, onChange: he }),
|
|
248
|
+
v && B && /* @__PURE__ */ i(Pe, { className: e.feedback, message: B, variant: "error", id: V, theme: g }),
|
|
249
|
+
(f ? f.length > 0 : M.length > 0) && ne && /* @__PURE__ */ i(Te, { files: f || M, onRemoveFile: _e, t: m, showProgress: ie, theme: g })
|
|
250
|
+
] });
|
|
251
|
+
});
|
|
252
|
+
at.displayName = "DSInputFile";
|
|
253
|
+
export {
|
|
254
|
+
at as D,
|
|
255
|
+
z as a,
|
|
256
|
+
it as b,
|
|
257
|
+
nt as c,
|
|
258
|
+
st as f,
|
|
259
|
+
rt as v
|
|
260
|
+
};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { c as r } from "./index.DQOqod3i.js";
|
|
4
|
+
import { forwardRef as Ce, useState as h, useRef as E, useEffect as P } from "react";
|
|
5
|
+
import { u as K } from "./useBreakpoint.1txsny17.js";
|
|
6
|
+
import { Asterisk as Re } from "../asterisk.Dwtdwpkq.js";
|
|
7
|
+
import { D as Q } from "./Button.CCol--xy.js";
|
|
8
|
+
import { M as W, a as F } from "./Input.utils.Wycy2SzG.js";
|
|
9
|
+
import { D as Ee } from "./Popover.CxZZ_y1Z.js";
|
|
10
|
+
import { D as Pe } from "./SystemFeedback.DhWcYjnu.js";
|
|
11
|
+
import { g as x } from "./helpers.CexwVao7.js";
|
|
12
|
+
import { u as Y } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
13
|
+
import { h as We } from "./has-window.ut_-aShB.js";
|
|
14
|
+
import '../assets/InputNumber.BNpO9p7n.css';const Fe = "ds-input-number_input_urrt1_1", Ve = "ds-input-number_input--small_urrt1_9", $e = "ds-input-number_input--invalid_urrt1_127", He = "ds-input-number_input--dark_urrt1_145", Te = "ds-input-number_input--is-ready_urrt1_241", qe = "ds-input-number_input--has-affix_urrt1_311", Me = "ds-input-number_root_urrt1_342", Xe = "ds-input-number_hint_urrt1_342", je = "ds-input-number_label-wrapper_urrt1_342", Ue = "ds-input-number_wrapper_urrt1_346", Ge = "ds-input-number_affix_urrt1_352", Oe = "ds-input-number_affix--small_urrt1_373", ze = "ds-input-number_prefix_urrt1_386", Je = "ds-input-number_suffix_urrt1_392", Ke = "ds-input-number_affix--disabled_urrt1_398", Qe = "ds-input-number_affix--readonly_urrt1_414", Ye = "ds-input-number_affix--dark_urrt1_449", Ze = "ds-input-number_action-button_urrt1_511", et = "ds-input-number_label_urrt1_342", tt = "ds-input-number_label--disabled_urrt1_530", nt = "ds-input-number_label--dark_urrt1_534", at = "ds-input-number_label-wrapper--hidden_urrt1_550", rt = "ds-input-number_hint--dark_urrt1_577", st = "ds-input-number_feedback_urrt1_581", it = "ds-input-number_second-action-button_urrt1_594", ut = "ds-input-number_value-announcer_urrt1_598", e = {
|
|
15
|
+
input: Fe,
|
|
16
|
+
inputSmall: Ve,
|
|
17
|
+
inputInvalid: $e,
|
|
18
|
+
inputDark: He,
|
|
19
|
+
inputIsReady: Te,
|
|
20
|
+
inputHasAffix: qe,
|
|
21
|
+
root: Me,
|
|
22
|
+
hint: Xe,
|
|
23
|
+
labelWrapper: je,
|
|
24
|
+
wrapper: Ue,
|
|
25
|
+
affix: Ge,
|
|
26
|
+
affixSmall: Oe,
|
|
27
|
+
prefix: ze,
|
|
28
|
+
suffix: Je,
|
|
29
|
+
affixDisabled: Ke,
|
|
30
|
+
affixReadonly: Qe,
|
|
31
|
+
affixDark: Ye,
|
|
32
|
+
actionButton: Ze,
|
|
33
|
+
label: et,
|
|
34
|
+
labelDisabled: tt,
|
|
35
|
+
labelDark: nt,
|
|
36
|
+
labelWrapperHidden: at,
|
|
37
|
+
hintDark: rt,
|
|
38
|
+
feedback: st,
|
|
39
|
+
secondActionButton: it,
|
|
40
|
+
valueAnnouncer: ut
|
|
41
|
+
}, Z = (u) => u != null && u !== "", ot = ({
|
|
42
|
+
id: u,
|
|
43
|
+
label: l,
|
|
44
|
+
prefix: n,
|
|
45
|
+
suffix: c,
|
|
46
|
+
hideLabel: I,
|
|
47
|
+
popoverContent: N
|
|
48
|
+
}) => {
|
|
49
|
+
if (!u)
|
|
50
|
+
throw new Error(x("DSInputNumber", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputNumber component.'));
|
|
51
|
+
if (!l)
|
|
52
|
+
throw new Error(x("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}.`));
|
|
53
|
+
n && n.length > W && console.warn(x("DSInputNumber", `Prefix length must not exceed ${W} characters.`)), c && c.length > F && console.warn(x("DSInputNumber", `Suffix length must not exceed ${F} characters.`)), I && N && console.warn(x("DSInputNumber", "Using a popover when hideLabel is set to true is not supported."));
|
|
54
|
+
}, lt = Ce((u, l) => {
|
|
55
|
+
const {
|
|
56
|
+
id: n,
|
|
57
|
+
label: c,
|
|
58
|
+
announcementText: I = "Value changed to",
|
|
59
|
+
className: N,
|
|
60
|
+
disabled: o = !1,
|
|
61
|
+
decreaseAmountButtonProps: ee,
|
|
62
|
+
hint: k,
|
|
63
|
+
hideLabel: V = !1,
|
|
64
|
+
invalid: D = !1,
|
|
65
|
+
increaseAmountButtonProps: te,
|
|
66
|
+
prefix: d,
|
|
67
|
+
max: $ = 100,
|
|
68
|
+
min: H = 0,
|
|
69
|
+
popoverContent: A,
|
|
70
|
+
popoverInfoButtonProps: ne,
|
|
71
|
+
readonly: p = !1,
|
|
72
|
+
required: T = !1,
|
|
73
|
+
size: i = "medium",
|
|
74
|
+
step: ae = 1,
|
|
75
|
+
suffix: f,
|
|
76
|
+
systemFeedback: S,
|
|
77
|
+
theme: m = "light",
|
|
78
|
+
value: g,
|
|
79
|
+
onChange: q,
|
|
80
|
+
...re
|
|
81
|
+
} = u;
|
|
82
|
+
process.env.NODE_ENV !== "production" && ot({
|
|
83
|
+
id: n,
|
|
84
|
+
label: c,
|
|
85
|
+
prefix: d,
|
|
86
|
+
suffix: f,
|
|
87
|
+
hideLabel: K(V),
|
|
88
|
+
popoverContent: A
|
|
89
|
+
});
|
|
90
|
+
const {
|
|
91
|
+
label: se = "Decrease",
|
|
92
|
+
tooltip: ie,
|
|
93
|
+
...ue
|
|
94
|
+
} = ee || {}, {
|
|
95
|
+
label: oe = "Increase",
|
|
96
|
+
tooltip: le,
|
|
97
|
+
...ce
|
|
98
|
+
} = te || {}, [de, pe] = h(!1), [b, B] = h(g), [w, M] = h(""), [fe, me] = h(!1), [be, _e] = h({}), s = E(null), he = (t) => {
|
|
99
|
+
s.current = t, typeof l == "function" ? l(t) : l && (l.current = t);
|
|
100
|
+
}, xe = d?.substring(0, W), L = E(null), De = f?.substring(0, F), C = E(null), X = K(V);
|
|
101
|
+
P(() => {
|
|
102
|
+
B(g);
|
|
103
|
+
}, [g]), P(() => {
|
|
104
|
+
if (w) {
|
|
105
|
+
const t = setTimeout(() => {
|
|
106
|
+
M("");
|
|
107
|
+
}, 3e3);
|
|
108
|
+
return () => clearTimeout(t);
|
|
109
|
+
}
|
|
110
|
+
}, [w]), P(() => {
|
|
111
|
+
const t = (_) => {
|
|
112
|
+
_.preventDefault();
|
|
113
|
+
};
|
|
114
|
+
return s.current?.addEventListener("wheel", t, {
|
|
115
|
+
// The { passive: false } option is used to indicate that the event listener wants to cancel the event, allowing preventDefault to work as expected.
|
|
116
|
+
passive: !1
|
|
117
|
+
}), () => {
|
|
118
|
+
s.current?.removeEventListener("wheel", t);
|
|
119
|
+
};
|
|
120
|
+
}, []), Y(() => {
|
|
121
|
+
const t = i === "medium" ? 16 : 8, _ = {};
|
|
122
|
+
if (L.current) {
|
|
123
|
+
const R = L.current.offsetWidth;
|
|
124
|
+
_.paddingInlineStart = t + R + "px";
|
|
125
|
+
}
|
|
126
|
+
if (C.current) {
|
|
127
|
+
const R = C.current.offsetWidth;
|
|
128
|
+
_.paddingInlineEnd = t + R + "px";
|
|
129
|
+
}
|
|
130
|
+
_e(_), pe(!0);
|
|
131
|
+
}, [d, f, i, fe]), Y(() => {
|
|
132
|
+
We && (async () => "fonts" in document && (await document.fonts.load('1em "STIHL Contraface Digital Text Regular"'), me(!0)))();
|
|
133
|
+
}, []);
|
|
134
|
+
const v = m === "dark", j = r(e.affix, {
|
|
135
|
+
[e.affixDark]: v,
|
|
136
|
+
[e.affixSmall]: i === "small",
|
|
137
|
+
[e.affixDisabled]: o,
|
|
138
|
+
[e.affixReadonly]: p
|
|
139
|
+
}), U = `${n}-label`, G = `${n}-feedback`, O = `${n}-hint`, z = `${n}-value-announcer`, ve = k ? ` ${O}` : "", ye = r(e.root, N), Ie = r(e.input, {
|
|
140
|
+
[e.inputDark]: v,
|
|
141
|
+
// small input
|
|
142
|
+
[e.inputSmall]: i === "small",
|
|
143
|
+
// invalid state
|
|
144
|
+
[e.inputInvalid]: D,
|
|
145
|
+
// prefix/suffix
|
|
146
|
+
[e.inputHasAffix]: d || f,
|
|
147
|
+
[e.inputIsReady]: de
|
|
148
|
+
}), Ne = r(e.label, {
|
|
149
|
+
[e.labelDark]: v,
|
|
150
|
+
[e.labelDisabled]: o
|
|
151
|
+
}), ke = r(e.labelWrapper, {
|
|
152
|
+
// hide label only visually to keep them available for assistive technologies
|
|
153
|
+
[e.labelWrapperHidden]: X
|
|
154
|
+
}), Ae = r(e.secondActionButton, {
|
|
155
|
+
[e.secondActionButtonSmall]: i === "small"
|
|
156
|
+
}), Se = r(e.actionButton, {
|
|
157
|
+
[e.actionButtonSmall]: i === "small"
|
|
158
|
+
}), ge = () => {
|
|
159
|
+
const t = [z];
|
|
160
|
+
return D && S && t.push(G), t.join(" ");
|
|
161
|
+
}, J = () => {
|
|
162
|
+
if (s.current) {
|
|
163
|
+
B(s.current.value);
|
|
164
|
+
const t = new Event("change", {
|
|
165
|
+
bubbles: !0
|
|
166
|
+
});
|
|
167
|
+
s.current?.dispatchEvent(t), M(`${I} ${s.current.value}`);
|
|
168
|
+
}
|
|
169
|
+
}, Be = () => {
|
|
170
|
+
s.current?.stepDown(), J();
|
|
171
|
+
}, we = () => {
|
|
172
|
+
s.current?.stepUp(), J();
|
|
173
|
+
}, Le = (t) => {
|
|
174
|
+
B(t.target.value), q && q(t);
|
|
175
|
+
};
|
|
176
|
+
return /* @__PURE__ */ y("div", { className: ye, children: [
|
|
177
|
+
/* @__PURE__ */ y("div", { className: ke, children: [
|
|
178
|
+
/* @__PURE__ */ y("label", { className: Ne, id: U, htmlFor: n, children: [
|
|
179
|
+
c,
|
|
180
|
+
T && /* @__PURE__ */ a(Re, {})
|
|
181
|
+
] }),
|
|
182
|
+
A && !X && /* @__PURE__ */ a(Ee, { placement: "top", theme: m, defaultAnchorButtonProps: ne, children: A })
|
|
183
|
+
] }),
|
|
184
|
+
k && /* @__PURE__ */ a("div", { className: r(e.hint, {
|
|
185
|
+
[e.hintDark]: v
|
|
186
|
+
}), id: O, children: k }),
|
|
187
|
+
/* @__PURE__ */ a(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
"aria-live": "polite",
|
|
191
|
+
"aria-atomic": "true",
|
|
192
|
+
className: e.valueAnnouncer,
|
|
193
|
+
id: z,
|
|
194
|
+
children: w
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ y("div", { className: e.wrapper, children: [
|
|
198
|
+
d && /* @__PURE__ */ a(
|
|
199
|
+
"span",
|
|
200
|
+
{
|
|
201
|
+
className: r(j, e.prefix),
|
|
202
|
+
ref: L,
|
|
203
|
+
"aria-disabled": o,
|
|
204
|
+
children: xe
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
/* @__PURE__ */ a(
|
|
208
|
+
"input",
|
|
209
|
+
{
|
|
210
|
+
className: Ie,
|
|
211
|
+
id: n,
|
|
212
|
+
...re,
|
|
213
|
+
style: be,
|
|
214
|
+
ref: he,
|
|
215
|
+
"aria-labelledby": `${U}${ve}`,
|
|
216
|
+
"aria-describedby": ge(),
|
|
217
|
+
"aria-invalid": D,
|
|
218
|
+
"aria-disabled": p,
|
|
219
|
+
disabled: o,
|
|
220
|
+
min: H,
|
|
221
|
+
max: $,
|
|
222
|
+
readOnly: p,
|
|
223
|
+
required: T,
|
|
224
|
+
step: ae,
|
|
225
|
+
type: "number",
|
|
226
|
+
value: b,
|
|
227
|
+
onChange: Le
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
f && /* @__PURE__ */ a(
|
|
231
|
+
"span",
|
|
232
|
+
{
|
|
233
|
+
className: r(j, e.suffix),
|
|
234
|
+
ref: C,
|
|
235
|
+
"aria-disabled": o,
|
|
236
|
+
children: De
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ a(Q, { ...ue, hideLabel: !0, theme: m, iconName: "minus", variant: "filled", className: Ae, size: i, onClick: Be, tooltip: ie, disabled: o || p || Z(b) && Number(b) <= Number(H), type: "button", children: se }),
|
|
240
|
+
/* @__PURE__ */ a(Q, { ...ce, hideLabel: !0, theme: m, iconName: "plus", variant: "filled", tooltip: le, className: Se, size: i, onClick: we, disabled: o || p || Z(b) && Number(b) >= Number($), type: "button", children: oe })
|
|
241
|
+
] }),
|
|
242
|
+
D && S && /* @__PURE__ */ a(Pe, { className: e.feedback, message: S, variant: "error", id: G, theme: m })
|
|
243
|
+
] });
|
|
244
|
+
});
|
|
245
|
+
lt.displayName = "DSInputNumber";
|
|
246
|
+
export {
|
|
247
|
+
lt as D,
|
|
248
|
+
Z as i,
|
|
249
|
+
ot as v
|
|
250
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { c as o } from "./index.DQOqod3i.js";
|
|
4
|
+
import { forwardRef as U, useState as G, useRef as J } from "react";
|
|
5
|
+
import { u as B } from "./useBreakpoint.1txsny17.js";
|
|
6
|
+
import { Asterisk as K } from "../asterisk.Dwtdwpkq.js";
|
|
7
|
+
import { D as Q } from "./Button.CCol--xy.js";
|
|
8
|
+
import { D as X } from "./Popover.CxZZ_y1Z.js";
|
|
9
|
+
import { D as Y } from "./SystemFeedback.DhWcYjnu.js";
|
|
10
|
+
import { g as h } from "./helpers.CexwVao7.js";
|
|
11
|
+
import '../assets/InputPassword.BgZo-RUc.css';const Z = "ds-input-password_input_1gisg_1", ss = "ds-input-password_input--small_1gisg_9", as = "ds-input-password_input--invalid_1gisg_127", ts = "ds-input-password_input--dark_1gisg_145", es = "ds-input-password_input--has-action-button_1gisg_296", os = "ds-input-password_root_1gisg_338", is = "ds-input-password_hint_1gisg_338", ns = "ds-input-password_label-wrapper_1gisg_338", rs = "ds-input-password_wrapper_1gisg_342", ls = "ds-input-password_action-button_1gisg_348", ds = "ds-input-password_label_1gisg_338", ps = "ds-input-password_label--disabled_1gisg_367", us = "ds-input-password_label--dark_1gisg_371", cs = "ds-input-password_label-wrapper--hidden_1gisg_387", bs = "ds-input-password_hint--dark_1gisg_414", ws = "ds-input-password_feedback_1gisg_418", s = {
|
|
12
|
+
input: Z,
|
|
13
|
+
inputSmall: ss,
|
|
14
|
+
inputInvalid: as,
|
|
15
|
+
inputDark: ts,
|
|
16
|
+
inputHasActionButton: es,
|
|
17
|
+
root: os,
|
|
18
|
+
hint: is,
|
|
19
|
+
labelWrapper: ns,
|
|
20
|
+
wrapper: rs,
|
|
21
|
+
actionButton: ls,
|
|
22
|
+
label: ds,
|
|
23
|
+
labelDisabled: ps,
|
|
24
|
+
labelDark: us,
|
|
25
|
+
labelWrapperHidden: cs,
|
|
26
|
+
hintDark: bs,
|
|
27
|
+
feedback: ws
|
|
28
|
+
}, _s = ({
|
|
29
|
+
id: p,
|
|
30
|
+
label: t,
|
|
31
|
+
hideLabel: a,
|
|
32
|
+
popoverContent: n
|
|
33
|
+
}) => {
|
|
34
|
+
if (!p)
|
|
35
|
+
throw new Error(h("DSInputPassword", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputPassword component.'));
|
|
36
|
+
if (!t)
|
|
37
|
+
throw new Error(h("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}.`));
|
|
38
|
+
a && n && console.warn(h("DSInputPassword", "Using a popover when hideLabel is set to true is not supported."));
|
|
39
|
+
}, ms = U((p, t) => {
|
|
40
|
+
const {
|
|
41
|
+
id: a,
|
|
42
|
+
label: n,
|
|
43
|
+
autoComplete: I = "new-password",
|
|
44
|
+
className: N,
|
|
45
|
+
disabled: u = !1,
|
|
46
|
+
hint: c,
|
|
47
|
+
hideLabel: f = !1,
|
|
48
|
+
invalid: r = !1,
|
|
49
|
+
popoverContent: b,
|
|
50
|
+
popoverInfoButtonProps: C,
|
|
51
|
+
readonly: D = !1,
|
|
52
|
+
required: k = !1,
|
|
53
|
+
togglePasswordVisibilityButtonProps: H,
|
|
54
|
+
size: w = "medium",
|
|
55
|
+
systemFeedback: _,
|
|
56
|
+
theme: l = "light",
|
|
57
|
+
...L
|
|
58
|
+
} = p;
|
|
59
|
+
process.env.NODE_ENV !== "production" && _s({
|
|
60
|
+
id: a,
|
|
61
|
+
label: n,
|
|
62
|
+
hideLabel: B(f),
|
|
63
|
+
popoverContent: b
|
|
64
|
+
});
|
|
65
|
+
const {
|
|
66
|
+
hidePasswordText: A = "Hide password",
|
|
67
|
+
showPasswordText: W = "Show password",
|
|
68
|
+
...x
|
|
69
|
+
} = H || {}, [m, $] = G(!1), P = `${a}-label`, y = `${a}-feedback`, v = `${a}-hint`, q = c ? ` ${v}` : "", T = [r && _ && y].filter(Boolean).join(" ") || void 0, S = B(f), V = o(s.root, N), g = l === "dark", E = o(s.input, {
|
|
70
|
+
[s.inputDark]: g,
|
|
71
|
+
// small input
|
|
72
|
+
[s.inputSmall]: w === "small",
|
|
73
|
+
// invalid state
|
|
74
|
+
[s.inputInvalid]: r,
|
|
75
|
+
// action button - input password always has an action button
|
|
76
|
+
[s.inputHasActionButton]: !0
|
|
77
|
+
}), F = o(s.label, {
|
|
78
|
+
[s.labelDark]: g,
|
|
79
|
+
[s.labelDisabled]: u
|
|
80
|
+
}), R = o(s.labelWrapper, {
|
|
81
|
+
// hide label only visually to keep them available for assistive technologies
|
|
82
|
+
[s.labelWrapperHidden]: S
|
|
83
|
+
}), j = o(s.actionButton, {
|
|
84
|
+
[s.actionButtonSmall]: w === "small"
|
|
85
|
+
}), O = J(null), z = (i) => {
|
|
86
|
+
O.current = i, typeof t == "function" ? t(i) : t && (t.current = i);
|
|
87
|
+
}, M = () => {
|
|
88
|
+
$((i) => !i);
|
|
89
|
+
};
|
|
90
|
+
return /* @__PURE__ */ d("div", { className: V, children: [
|
|
91
|
+
/* @__PURE__ */ d("div", { className: R, children: [
|
|
92
|
+
/* @__PURE__ */ d("label", { className: F, id: P, htmlFor: a, children: [
|
|
93
|
+
n,
|
|
94
|
+
k && /* @__PURE__ */ e(K, {})
|
|
95
|
+
] }),
|
|
96
|
+
b && !S && /* @__PURE__ */ e(X, { placement: "top", theme: l, defaultAnchorButtonProps: C, children: b })
|
|
97
|
+
] }),
|
|
98
|
+
c && /* @__PURE__ */ e("div", { className: o(s.hint, {
|
|
99
|
+
[s.hintDark]: g
|
|
100
|
+
}), id: v, children: c }),
|
|
101
|
+
/* @__PURE__ */ d("div", { className: s.wrapper, children: [
|
|
102
|
+
/* @__PURE__ */ e(
|
|
103
|
+
"input",
|
|
104
|
+
{
|
|
105
|
+
className: E,
|
|
106
|
+
id: a,
|
|
107
|
+
...L,
|
|
108
|
+
ref: z,
|
|
109
|
+
"aria-labelledby": `${P}${q}`,
|
|
110
|
+
"aria-describedby": T,
|
|
111
|
+
"aria-invalid": r,
|
|
112
|
+
"aria-disabled": D,
|
|
113
|
+
readOnly: D,
|
|
114
|
+
required: k,
|
|
115
|
+
disabled: u,
|
|
116
|
+
autoComplete: I,
|
|
117
|
+
type: m ? "text" : "password"
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ e(Q, { ...x, hideLabel: !0, theme: l, iconName: m ? "eye-closed" : "eye", variant: "ghost", className: j, size: w, onClick: M, type: "button", disabled: u, children: m ? A : W })
|
|
121
|
+
] }),
|
|
122
|
+
r && _ && /* @__PURE__ */ e(Y, { className: s.feedback, message: _, variant: "error", id: y, theme: l })
|
|
123
|
+
] });
|
|
124
|
+
});
|
|
125
|
+
ms.displayName = "DSInputPassword";
|
|
126
|
+
export {
|
|
127
|
+
ms as D,
|
|
128
|
+
_s as v
|
|
129
|
+
};
|