@stihl-design-system/components 1.0.0-RC.46 → 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.Dvt4S5qg.js → accordion.D4XR2R7e.js} +3 -3
- package/actionbutton.C8hePX-D.js +12 -0
- package/{actioncard.BwquHtM_.js → actioncard.kDxu01xm.js} +1 -1
- package/actionlink.dccc5JQV.js +12 -0
- package/{arialiveregions.BF6mUlPU.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/Breadcrumb.BJ6sa2am.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/Flag.qP1xbolI.css +1 -0
- package/assets/Header.CSPbSqR5.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/LinkCard.pJtgJRIh.css +1 -0
- package/assets/NavigationTabList.D5VV0C7Y.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/Stepper.BCpjMiOX.css +1 -0
- package/assets/SystemFeedback.DVMml_h9.css +1 -0
- package/assets/TextUtility.BThulfyl.css +1 -0
- package/assets/Textarea.BO4AcRJD.css +1 -0
- package/assets/Toast.ChXfv24m.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/link.EZrauC8s.css +1 -0
- package/assets/numberindicator.CtbitPQ8.css +1 -0
- package/assets/optioncheckbox.BwkbIDOt.css +1 -0
- package/assets/progressindicator.tyY_RVQ9.css +1 -0
- package/assets/radio.9hUUyg8R.css +1 -0
- package/assets/step.DOAmuuEQ.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.CwZXWMc_.js → banner.DO7GsDL_.js} +1 -1
- package/{breadcrumb.DMqAgUyk.js → breadcrumb.DYov6vtt.js} +3 -3
- package/{button.BDCfI_fj.js → button.qxcuzbnv.js} +4 -4
- package/buttonround.BO7_ewzA.js +101 -0
- package/checkbox.C9kyIY9P.js +11 -0
- package/{checkboxgroup.DDWYxYzk.js → checkboxgroup.kEUxnKLf.js} +2 -2
- package/chip.5ktNLRYf.js +12 -0
- package/chipgroup.kRU3Z98U.js +226 -0
- package/chunks/Accordion.gih2ni1d.js +179 -0
- package/chunks/ActionButton.B-wm5sUy.js +194 -0
- package/chunks/{ActionCard.DJSGkwVG.js → ActionCard.Bm-2ewfS.js} +38 -38
- package/chunks/ActionLink.D0KzqbH4.js +166 -0
- package/chunks/{AriaLiveRegions.utils.8ofDlHnN.js → AriaLiveRegions.utils.xoETe2Ps.js} +16 -18
- package/chunks/{Breadcrumb.BkP2B-Vm.js → Breadcrumb.I2G-T0zc.js} +14 -14
- 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.yVERtd4R.js → CustomReactSelect.DTAavYaz.js} +250 -245
- package/chunks/Dialog.guuxflWL.js +101 -0
- package/chunks/Drawer.CjUZu6GW.js +106 -0
- package/chunks/Fieldset.BBMuLKps.js +94 -0
- package/chunks/Flag.CbQYBzVC.js +74 -0
- package/chunks/{Header.DyqOlV8L.js → Header.CvcGSuhX.js} +140 -140
- package/chunks/{Icon.B0WqYErA.js → Icon.DYtaQgbw.js} +1 -1
- package/chunks/{Input.utils.D78E4MGO.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.CiSiMlE3.js → MegaMenu.udXR1H3W.js} +2 -2
- package/chunks/NavigationTabList.thzA1pU8.js +68 -0
- package/chunks/{NavigationTabs.BqaUbfFC.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.Bqnak38-.js → Stepper.Ds_aIEF8.js} +72 -73
- package/chunks/SystemFeedback.DhWcYjnu.js +43 -0
- package/chunks/{Tabs.cMCZMPCy.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.V_ZUAsf2.js +76 -0
- package/chunks/floating-ui.react.Chmq0RmI.js +3014 -0
- package/chunks/translate.DSb-TdWR.js +2460 -0
- package/{combobox.CpX-Vlyd.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/Flag/Flag.d.ts +3 -3
- package/components/Flag/Flag.utils.d.ts +7 -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.B1FFXsJ8.js → customreactselect.L0zSh3Tg.js} +6 -6
- package/{dialog.ZQ-HnvZs.js → dialog.Ddq8o8Od.js} +2 -2
- package/{drawer.D0-RM0WZ.js → drawer.rbbjQvqL.js} +2 -2
- package/{fieldset.BzOeuWjO.js → fieldset.BHf3XK2q.js} +3 -3
- package/filelist.GrEwoM1u.js +143 -0
- package/filepreview.B2Ot9SZ7.js +97 -0
- package/flag.fX6LAgty.js +10 -0
- package/{floatingactionbutton.AVc4qY0u.js → floatingactionbutton.BwCiybnc.js} +3 -3
- package/{header.BtGgmM59.js → header.BCeCjYfG.js} +1 -1
- package/{icon.DrTLVrpN.js → icon.CRr1FGOu.js} +1 -1
- package/index.es.js +231 -230
- package/input.Dh0ws-9j.js +187 -0
- package/inputfile.DiZh3GcT.js +17 -0
- package/{inputnumber.r0iVYkjd.js → inputnumber.D2cmptaH.js} +8 -9
- package/{inputpassword.PXBZo3f0.js → inputpassword.C53Kg4EA.js} +4 -4
- package/inputsearch.BrsIDUSW.js +14 -0
- package/link.DEZDbUgq.js +81 -0
- package/{linkbutton.DVFXzn-A.js → linkbutton._X50W2Md.js} +3 -3
- package/{linkcard.BwSMt03V.js → linkcard.BtM3KnjT.js} +4 -4
- package/{logo.D7LnRA1E.js → logo.D6BTxbxv.js} +0 -1
- package/{megamenu.CUjk3_h2.js → megamenu.odVCUm4c.js} +3 -3
- package/navigationtablist.n9DrtYe5.js +10 -0
- package/{navigationtabs.DmcYShPs.js → navigationtabs.D0mSyAtK.js} +2 -2
- package/{notification.BVoapVVg.js → notification._X8-8vOa.js} +3 -3
- package/numberindicator.DsK65Bj3.js +39 -0
- package/optioncheckbox.tlMEoyT0.js +48 -0
- package/package.json +38 -33
- package/pagination.B7Hrx_sk.js +14 -0
- package/partials/index.js +91 -91
- package/{popover.OcE_5SfG.js → popover.BBaqL7y9.js} +4 -4
- package/progressindicator.D9CfVD95.js +74 -0
- package/radio.DjToa2aV.js +148 -0
- package/{radiogroup.N06_e0b8.js → radiogroup.mc-8lw65.js} +3 -3
- package/{scroller.CwTXbzb8.js → scroller.CgWp2WXG.js} +10 -11
- package/select.DTZ6a6Ag.js +13 -0
- package/{skeleton.DUkBgXxO.js → skeleton.CNJdNVav.js} +10 -10
- package/{skiptocontent.Bujq9t3i.js → skiptocontent.BsRpWvyu.js} +4 -4
- package/{slider.JAKEAwOB.js → slider.BMGAihY0.js} +3 -3
- package/{spinner.D1W-X96t.js → spinner.DtLnsqVV.js} +1 -1
- package/step.DCQ6CawJ.js +82 -0
- package/stepper.D7-7BdSv.js +15 -0
- package/styles/js/index.d.ts +1 -0
- package/styles/js/index.es.js +24 -4
- package/styles/js/lib/spacing-rem.d.ts +21 -0
- package/styles/js/lib/spacing.d.ts +0 -1
- package/styles/scss/ds/index.scss +4 -1
- package/styles/scss/ds/lib/border-width.scss +3 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +71 -26
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +7 -4
- package/styles/scss/ds/lib/ds-internal/_link.scss +23 -3
- package/styles/scss/ds/lib/ds-internal/_text.scss +3 -1
- package/styles/scss/ds/lib/grid-narrow.scss +1 -0
- 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/styles/scss/ds/lib/spacing-rem.scss +19 -0
- package/styles/scss/ds/lib/spacing.scss +0 -1
- package/switch.tM2XBag8.js +66 -0
- package/{systemfeedback.B8FBckG4.js → systemfeedback.BPPOht_9.js} +2 -2
- package/{tablist.D3n9E4KM.js → tablist.BAm0_UIG.js} +22 -23
- package/{tabpane.7vMXUKFX.js → tabpane.B9rZghU6.js} +1 -1
- package/{tabs.IVNsM5Gn.js → tabs.BgTdWbTe.js} +3 -3
- package/text.BEO_ZfJq.js +72 -0
- package/{textarea.gjb8VGgh.js → textarea.Cki-uMkZ.js} +5 -6
- package/{textutility.CNWCGYOy.js → textutility.BypzssPt.js} +2 -2
- package/{toast.DU8Sd_4c.js → toast.s0Hfuh5i.js} +3 -3
- package/{toastmanager.UlkvsO5p.js → toastmanager.CPIPn4Io.js} +22 -23
- package/{tooltip.C6HKano9.js → tooltip.BFQG-7VR.js} +22 -22
- package/{topbar.Z9NNkxKU.js → topbar.Bbct-XkB.js} +3 -3
- package/utils/translate.d.ts +22 -6
- package/actionbutton.D6qmbuAA.js +0 -12
- package/actionlink.fWwe7J0H.js +0 -12
- package/assets/Accordion.Cr1dbVTH.css +0 -1
- package/assets/ActionButton.BLOWs6IZ.css +0 -1
- package/assets/ActionCard.BG8w8xUC.css +0 -1
- package/assets/ActionLink.BJDUVdT7.css +0 -1
- package/assets/Breadcrumb.BavNNzAA.css +0 -1
- package/assets/Button.C-UYIggc.css +0 -1
- package/assets/Checkbox.ZAPIO2N8.css +0 -1
- package/assets/Chip.D3vV0wyV.css +0 -1
- package/assets/CustomReactSelect.Ctze4SRN.css +0 -1
- package/assets/Dialog.BKwWy1g2.css +0 -1
- package/assets/Drawer.BU-fi5Hk.css +0 -1
- package/assets/Fieldset.DCmr1Yir.css +0 -1
- package/assets/Header.BNYL2Y78.css +0 -1
- package/assets/InputFile.BUMCNCrj.css +0 -1
- package/assets/InputNumber.Bmz8cNKg.css +0 -1
- package/assets/InputPassword.CutbykTm.css +0 -1
- package/assets/InputSearch.Sr9jVpKt.css +0 -1
- package/assets/LinkButton.CxJvjEY5.css +0 -1
- package/assets/LinkCard.DkQoQJxx.css +0 -1
- package/assets/NavigationTabList.DYjNT2Di.css +0 -1
- package/assets/Notification.DBGpHzov.css +0 -1
- package/assets/Pagination.DZ1yCAMR.css +0 -1
- package/assets/Popover.mL5g23EK.css +0 -1
- package/assets/Select.BZYb_HAG.css +0 -1
- package/assets/Slider.vnSU0ya0.css +0 -1
- package/assets/Stepper.tXJl15yL.css +0 -1
- package/assets/SystemFeedback.PKzqnXUe.css +0 -1
- package/assets/TextUtility.CEBJaKBG.css +0 -1
- package/assets/Textarea.BIgA9_fl.css +0 -1
- package/assets/Toast.CGl8z6mX.css +0 -1
- package/assets/buttonround.CMrJRIeW.css +0 -1
- package/assets/chipgroup.BGxjdSDX.css +0 -1
- package/assets/filelist.CHVupL8T.css +0 -1
- package/assets/flag.CyCIPu_J.css +0 -1
- package/assets/input.BEOus9jX.css +0 -1
- package/assets/link.Dcsio57m.css +0 -1
- package/assets/numberindicator.BYIPwkAK.css +0 -1
- package/assets/optioncheckbox.6zYgifUk.css +0 -1
- package/assets/progressindicator.Cbbzo5-b.css +0 -1
- package/assets/radio.l9OTraQU.css +0 -1
- package/assets/step.Ch508u7I.css +0 -1
- package/assets/switch.DYamtd9O.css +0 -1
- package/assets/tabpane.o34hshTz.css +0 -1
- package/assets/text.BA1eUihR.css +0 -1
- package/assets/tooltip.BPcysHGE.css +0 -1
- package/buttonround.DZCu35Zw.js +0 -101
- package/checkbox.RYvu23i4.js +0 -12
- package/chip.CtZK5gH7.js +0 -12
- package/chipgroup.C-UJt9Nb.js +0 -213
- package/chunks/Accordion.Tz7cWkk5.js +0 -173
- package/chunks/ActionButton.Dqay6Dxt.js +0 -188
- package/chunks/ActionLink.BgWqWSKi.js +0 -161
- package/chunks/Button.Dauhc5op.js +0 -160
- package/chunks/Checkbox.C5Jgtwho.js +0 -88
- package/chunks/CheckboxGroup.Df_nLGBa.js +0 -79
- package/chunks/Chip.DXS_ZMGD.js +0 -157
- package/chunks/Dialog.mP1tZEbW.js +0 -102
- package/chunks/Drawer.D6IG0DRe.js +0 -107
- package/chunks/Fieldset.DxhNhprT.js +0 -91
- package/chunks/InputFile.BSGunqyW.js +0 -260
- package/chunks/InputNumber.BsBAdxWr.js +0 -240
- package/chunks/InputPassword.hZYiAKYC.js +0 -121
- package/chunks/InputSearch.Dp3x5RE4.js +0 -149
- package/chunks/LinkButton.DHcfHamd.js +0 -150
- package/chunks/LinkCard.DV-V9qHd.js +0 -197
- package/chunks/NavigationTabList.BIApwNzg.js +0 -68
- package/chunks/Notification.DeedcinQ.js +0 -91
- package/chunks/Pagination.DhD8i5AV.js +0 -247
- package/chunks/Popover.Cyf3CbLl.js +0 -221
- package/chunks/RadioGroup.D3omhLuC.js +0 -130
- package/chunks/Select.DOeJaqzM.js +0 -147
- package/chunks/Slider.d3gCkWL_.js +0 -309
- package/chunks/SystemFeedback.Dq3ZphgG.js +0 -38
- package/chunks/Text.utils.D_iOyOSH.js +0 -11
- package/chunks/TextUtility.Wbd4oQXI.js +0 -82
- package/chunks/Textarea.DhRMfiWu.js +0 -181
- package/chunks/Toast.KMEq0p-E.js +0 -76
- package/chunks/floating-ui.react.CP5A99-c.js +0 -2980
- package/chunks/translate.nuU7uChI.js +0 -8
- package/filelist.BaYCDtxD.js +0 -128
- package/filepreview.BCslhbM5.js +0 -94
- package/flag.DyZLEgAw.js +0 -50
- package/input.DNdSFW5k.js +0 -175
- package/inputfile.CTXJ_ZSi.js +0 -18
- package/inputsearch.JLM0fNPt.js +0 -15
- package/link.CArLlIsR.js +0 -81
- package/navigationtablist.BerRIzu-.js +0 -10
- package/numberindicator.ZGVRSmqf.js +0 -36
- package/optioncheckbox.BQo8riVL.js +0 -48
- package/pagination.Dm1WnFhY.js +0 -14
- package/progressindicator.1JRFwf-H.js +0 -53
- package/radio.DxdVKoxe.js +0 -137
- package/select.DVuQMz7l.js +0 -14
- package/step.CDNmsF4m.js +0 -82
- package/stepper.D0kSuiYh.js +0 -16
- package/switch.pN105F5-.js +0 -66
- package/text.D_e3JBvf.js +0 -72
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as m, jsx as s, Fragment as he } 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 C } from "./useBreakpoint.1txsny17.js";
|
|
7
|
-
import "./index.cKLI89Eg.js";
|
|
8
|
-
import { f as Fe } from "./AriaLiveRegions.utils.8ofDlHnN.js";
|
|
9
|
-
import { Asterisk as Le } from "../asterisk.Dwtdwpkq.js";
|
|
10
|
-
import { D as ze } from "./Button.Dauhc5op.js";
|
|
11
|
-
import { D as Be } from "./Icon.B0WqYErA.js";
|
|
12
|
-
import { D as ye } from "./Popover.Cyf3CbLl.js";
|
|
13
|
-
import { D as Ne } from "./SystemFeedback.Dq3ZphgG.js";
|
|
14
|
-
import { FileList as ke } from "../filelist.BaYCDtxD.js";
|
|
15
|
-
import { g as _ } from "./helpers.CexwVao7.js";
|
|
16
|
-
import '../assets/InputFile.BUMCNCrj.css';const Te = "ds-input-file_root_ad2pg_1", Pe = "ds-input-file_browse-button--is-dragging-filled_ad2pg_1", Ae = "ds-input-file_browse-button--is-dragging_ad2pg_1", $e = "ds-input-file_hint_ad2pg_14", Ce = "ds-input-file_label-wrapper_ad2pg_14", Ue = "ds-input-file_label_ad2pg_14", We = "ds-input-file_label--disabled_ad2pg_33", Re = "ds-input-file_label-wrapper--hidden_ad2pg_45", qe = "ds-input-file_feedback_ad2pg_73", Ee = "ds-input-file_dropzone_ad2pg_77", He = "ds-input-file_dropzone--disabled_ad2pg_83", xe = "ds-input-file_dropzone--invalid_ad2pg_97", Oe = "ds-input-file_dropzone--is-dragging_ad2pg_100", Me = "ds-input-file_hint-drop-zone_ad2pg_103", Ve = "ds-input-file_upload-icon_ad2pg_106", je = "ds-input-file_browse-button-dropzone--is-dragging_ad2pg_109", Ze = "ds-input-file_instructions_ad2pg_112", Ge = "ds-input-file_input_ad2pg_149", Je = "ds-input-file_required-sr-info_ad2pg_153", t = {
|
|
17
|
-
root: Te,
|
|
18
|
-
browseButtonIsDraggingFilled: Pe,
|
|
19
|
-
browseButtonIsDragging: Ae,
|
|
20
|
-
hint: $e,
|
|
21
|
-
labelWrapper: Ce,
|
|
22
|
-
label: Ue,
|
|
23
|
-
labelDisabled: We,
|
|
24
|
-
labelWrapperHidden: Re,
|
|
25
|
-
feedback: qe,
|
|
26
|
-
dropzone: Ee,
|
|
27
|
-
dropzoneDisabled: He,
|
|
28
|
-
dropzoneInvalid: xe,
|
|
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 i = d.split(",").map((a) => a.trim().toLowerCase()).filter(Boolean), g = r.name.toLowerCase(), o = r.type.toLowerCase();
|
|
83
|
-
return i.some((a) => {
|
|
84
|
-
if (a.startsWith("."))
|
|
85
|
-
return g.endsWith(a);
|
|
86
|
-
if (a.endsWith("/*")) {
|
|
87
|
-
const [h] = o.split("/");
|
|
88
|
-
return h === a.slice(0, -2);
|
|
89
|
-
}
|
|
90
|
-
return o === a;
|
|
91
|
-
});
|
|
92
|
-
}, Ye = ({
|
|
93
|
-
id: r,
|
|
94
|
-
label: d,
|
|
95
|
-
inputFileButtonProps: i,
|
|
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 (i && i.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 (i && i.variant && i.variant !== "outline" && i.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: i,
|
|
112
|
-
className: g,
|
|
113
|
-
disabled: o = !1,
|
|
114
|
-
files: a,
|
|
115
|
-
hideLabel: h = !1,
|
|
116
|
-
hint: b,
|
|
117
|
-
inputFileButtonProps: U,
|
|
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: W,
|
|
128
|
-
required: R = !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: U,
|
|
142
|
-
hideLabel: C(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
|
-
...ae
|
|
149
|
-
} = U || {}, [q, E] = Q([]), ie = {
|
|
150
|
-
...W,
|
|
151
|
-
label: y && y.togglePopover || W?.label || X[F].togglePopover
|
|
152
|
-
}, S = ve(null), [c, T] = Q(!1), se = L * 1024 * 1024, P = `${r}-label`, H = `${r}-feedback`, A = `${r}-hint`, x = b ? ` ${A}` : "", O = C(h), M = C(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 && H].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 (i && !Xe(n, i) && (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 && !a && E(() => {
|
|
176
|
-
const n = [...l], w = n.map(({
|
|
177
|
-
name: $,
|
|
178
|
-
feedback: _e = ""
|
|
179
|
-
}) => `${$} ${_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 || T(!0);
|
|
188
|
-
}, G = (e) => {
|
|
189
|
-
e.preventDefault(), c && T(!1);
|
|
190
|
-
}, J = Se((e) => {
|
|
191
|
-
e.preventDefault(), !o && (T(!1), V(e.dataTransfer.files));
|
|
192
|
-
}, [D, i, L, o]), be = (e) => {
|
|
193
|
-
V(e.target.files), S?.current && (S.current.value = "");
|
|
194
|
-
}, De = (e) => {
|
|
195
|
-
if (a) {
|
|
196
|
-
const l = a.filter((n, w) => w !== e);
|
|
197
|
-
N?.(l);
|
|
198
|
-
} else
|
|
199
|
-
E((l) => {
|
|
200
|
-
const n = l.filter((w, $) => $ !== e);
|
|
201
|
-
return N?.(n), n;
|
|
202
|
-
});
|
|
203
|
-
}, me = (e) => {
|
|
204
|
-
Fe(e, "DSInputFile");
|
|
205
|
-
}, K = () => /* @__PURE__ */ s(ze, { ...ae, 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: P, htmlFor: r, children: [
|
|
209
|
-
d,
|
|
210
|
-
R && /* @__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: ie, children: z })
|
|
216
|
-
] }),
|
|
217
|
-
b && (M || !p) && /* @__PURE__ */ s("div", { className: t.hint, id: A, children: b }),
|
|
218
|
-
!p && /* @__PURE__ */ s(
|
|
219
|
-
"div",
|
|
220
|
-
{
|
|
221
|
-
onDragOver: Z,
|
|
222
|
-
onDragLeave: G,
|
|
223
|
-
onDrop: J,
|
|
224
|
-
"aria-labelledby": `${P}${x}`,
|
|
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": `${P}${x}`,
|
|
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: A, children: b })
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
),
|
|
247
|
-
/* @__PURE__ */ s("input", { ...ne, type: "file", className: t.input, id: r, ref: ge, accept: i, multiple: D, "aria-hidden": "true", required: R, disabled: o, onChange: be }),
|
|
248
|
-
I && B && /* @__PURE__ */ s(Ne, { className: t.feedback, message: B, variant: "error", id: H }),
|
|
249
|
-
(a ? a.length > 0 : q.length > 0) && ee && /* @__PURE__ */ s(ke, { files: a || q, onRemoveFile: De, t: u, showProgress: te })
|
|
250
|
-
] });
|
|
251
|
-
});
|
|
252
|
-
et.displayName = "DSInputFile";
|
|
253
|
-
export {
|
|
254
|
-
et as D,
|
|
255
|
-
Ke as a,
|
|
256
|
-
Qe as b,
|
|
257
|
-
X 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 r } from "./index.DQOqod3i.js";
|
|
4
|
-
import { forwardRef as Be, useState as m, useRef as E, useEffect as W } from "react";
|
|
5
|
-
import { h as Le } 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 Re } from "../asterisk.Dwtdwpkq.js";
|
|
10
|
-
import { D as Q } from "./Button.Dauhc5op.js";
|
|
11
|
-
import { M as k, a as P } from "./Input.utils.D78E4MGO.js";
|
|
12
|
-
import { D as Ee } from "./Popover.Cyf3CbLl.js";
|
|
13
|
-
import { D as We } from "./SystemFeedback.Dq3ZphgG.js";
|
|
14
|
-
import { g as f } from "./helpers.CexwVao7.js";
|
|
15
|
-
import '../assets/InputNumber.Bmz8cNKg.css';const ke = "ds-input-number_input_1nvt0_1", Pe = "ds-input-number_input--small_1nvt0_9", Ce = "ds-input-number_input--invalid_1nvt0_121", Ve = "ds-input-number_input--has-affix_1nvt0_197", $e = "ds-input-number_input--is-ready_1nvt0_211", He = "ds-input-number_root_1nvt0_222", Fe = "ds-input-number_hint_1nvt0_222", Te = "ds-input-number_label-wrapper_1nvt0_222", Me = "ds-input-number_wrapper_1nvt0_226", Xe = "ds-input-number_affix_1nvt0_232", je = "ds-input-number_affix--small_1nvt0_253", qe = "ds-input-number_prefix_1nvt0_266", Ue = "ds-input-number_suffix_1nvt0_272", Ge = "ds-input-number_affix--disabled_1nvt0_278", Oe = "ds-input-number_affix--readonly_1nvt0_289", Je = "ds-input-number_action-button_1nvt0_325", Ke = "ds-input-number_label_1nvt0_222", Qe = "ds-input-number_label--disabled_1nvt0_344", Ye = "ds-input-number_label-wrapper--hidden_1nvt0_356", Ze = "ds-input-number_feedback_1nvt0_384", ze = "ds-input-number_second-action-button_1nvt0_397", et = "ds-input-number_value-announcer_1nvt0_401", e = {
|
|
16
|
-
input: ke,
|
|
17
|
-
inputSmall: Pe,
|
|
18
|
-
inputInvalid: Ce,
|
|
19
|
-
inputHasAffix: Ve,
|
|
20
|
-
inputIsReady: $e,
|
|
21
|
-
root: He,
|
|
22
|
-
hint: Fe,
|
|
23
|
-
labelWrapper: Te,
|
|
24
|
-
wrapper: Me,
|
|
25
|
-
affix: Xe,
|
|
26
|
-
affixSmall: je,
|
|
27
|
-
prefix: qe,
|
|
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: x
|
|
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 > k && console.warn(f("DSInputNumber", `Prefix length must not exceed ${k} characters.`)), h && h.length > P && console.warn(f("DSInputNumber", `Suffix length must not exceed ${P} characters.`)), s && x && console.warn(f("DSInputNumber", "Using a popover when hideLabel is set to true is not supported."));
|
|
51
|
-
}, nt = Be(({
|
|
52
|
-
id: n,
|
|
53
|
-
label: b,
|
|
54
|
-
announcementText: _ = "Value changed to",
|
|
55
|
-
className: h,
|
|
56
|
-
disabled: s = !1,
|
|
57
|
-
decreaseAmountButtonProps: x,
|
|
58
|
-
hint: y,
|
|
59
|
-
hideLabel: C = !1,
|
|
60
|
-
invalid: v = !1,
|
|
61
|
-
increaseAmountButtonProps: Z,
|
|
62
|
-
prefix: u,
|
|
63
|
-
max: V = 100,
|
|
64
|
-
min: $ = 0,
|
|
65
|
-
popoverContent: D,
|
|
66
|
-
popoverInfoButtonProps: z,
|
|
67
|
-
readonly: l = !1,
|
|
68
|
-
required: H = !1,
|
|
69
|
-
size: i = "medium",
|
|
70
|
-
step: ee = 1,
|
|
71
|
-
suffix: c,
|
|
72
|
-
systemFeedback: A,
|
|
73
|
-
value: S,
|
|
74
|
-
onChange: F,
|
|
75
|
-
...te
|
|
76
|
-
}, I) => {
|
|
77
|
-
process.env.NODE_ENV !== "production" && tt({
|
|
78
|
-
id: n,
|
|
79
|
-
label: b,
|
|
80
|
-
prefix: u,
|
|
81
|
-
suffix: c,
|
|
82
|
-
hideLabel: J(C),
|
|
83
|
-
popoverContent: D
|
|
84
|
-
});
|
|
85
|
-
const {
|
|
86
|
-
label: ne = "Decrease",
|
|
87
|
-
tooltip: ae,
|
|
88
|
-
...se
|
|
89
|
-
} = x || {}, {
|
|
90
|
-
label: oe = "Increase",
|
|
91
|
-
tooltip: re,
|
|
92
|
-
...ie
|
|
93
|
-
} = Z || {}, [ue, le] = m(!1), [p, g] = m(S), [w, T] = m(""), [ce, pe] = m(!1), [de, me] = m({}), o = E(null), fe = (t) => {
|
|
94
|
-
o.current = t, typeof I == "function" ? I(t) : I && (I.current = t);
|
|
95
|
-
}, be = u?.substring(0, k), B = E(null), _e = c?.substring(0, P), L = E(null), M = J(C);
|
|
96
|
-
W(() => {
|
|
97
|
-
g(S);
|
|
98
|
-
}, [S]), W(() => {
|
|
99
|
-
if (w) {
|
|
100
|
-
const t = setTimeout(() => {
|
|
101
|
-
T("");
|
|
102
|
-
}, 3e3);
|
|
103
|
-
return () => clearTimeout(t);
|
|
104
|
-
}
|
|
105
|
-
}, [w]), W(() => {
|
|
106
|
-
const t = (d) => {
|
|
107
|
-
d.preventDefault();
|
|
108
|
-
};
|
|
109
|
-
return o.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
|
-
o.current?.removeEventListener("wheel", t);
|
|
114
|
-
};
|
|
115
|
-
}, []), K(() => {
|
|
116
|
-
const t = i === "medium" ? 16 : 8, d = {};
|
|
117
|
-
if (B.current) {
|
|
118
|
-
const R = B.current.offsetWidth;
|
|
119
|
-
d.paddingInlineStart = t + R + "px";
|
|
120
|
-
}
|
|
121
|
-
if (L.current) {
|
|
122
|
-
const R = L.current.offsetWidth;
|
|
123
|
-
d.paddingInlineEnd = t + R + "px";
|
|
124
|
-
}
|
|
125
|
-
me(d), le(!0);
|
|
126
|
-
}, [u, c, i, ce]), K(() => {
|
|
127
|
-
Le && (async () => "fonts" in document && (await document.fonts.load('1em "STIHL Contraface Digital Text Regular"'), pe(!0)))();
|
|
128
|
-
}, []);
|
|
129
|
-
const X = r(e.affix, {
|
|
130
|
-
[e.affixSmall]: i === "small",
|
|
131
|
-
[e.affixDisabled]: s,
|
|
132
|
-
[e.affixReadonly]: l
|
|
133
|
-
}), j = `${n}-label`, q = `${n}-feedback`, U = `${n}-hint`, G = `${n}-value-announcer`, he = y ? ` ${U}` : "", ve = r(e.root, h), Ie = r(e.input, {
|
|
134
|
-
// small input
|
|
135
|
-
[e.inputSmall]: i === "small",
|
|
136
|
-
// invalid state
|
|
137
|
-
[e.inputInvalid]: v,
|
|
138
|
-
// prefix/suffix
|
|
139
|
-
[e.inputHasAffix]: u || c,
|
|
140
|
-
[e.inputIsReady]: ue
|
|
141
|
-
}), Ne = r(e.label, {
|
|
142
|
-
[e.labelDisabled]: s
|
|
143
|
-
}), xe = r(e.labelWrapper, {
|
|
144
|
-
// hide label only visually to keep them available for assistive technologies
|
|
145
|
-
[e.labelWrapperHidden]: M
|
|
146
|
-
}), ye = r(e.secondActionButton, {
|
|
147
|
-
[e.secondActionButtonSmall]: i === "small"
|
|
148
|
-
}), De = r(e.actionButton, {
|
|
149
|
-
[e.actionButtonSmall]: i === "small"
|
|
150
|
-
}), Ae = () => {
|
|
151
|
-
const t = [G];
|
|
152
|
-
return v && A && t.push(q), t.join(" ");
|
|
153
|
-
}, O = () => {
|
|
154
|
-
if (o.current) {
|
|
155
|
-
g(o.current.value);
|
|
156
|
-
const t = new Event("change", {
|
|
157
|
-
bubbles: !0
|
|
158
|
-
});
|
|
159
|
-
o.current?.dispatchEvent(t), T(`${_} ${o.current.value}`);
|
|
160
|
-
}
|
|
161
|
-
}, Se = () => {
|
|
162
|
-
o.current?.stepDown(), O();
|
|
163
|
-
}, ge = () => {
|
|
164
|
-
o.current?.stepUp(), O();
|
|
165
|
-
}, we = (t) => {
|
|
166
|
-
g(t.target.value), F && F(t);
|
|
167
|
-
};
|
|
168
|
-
return /* @__PURE__ */ N("div", { className: ve, children: [
|
|
169
|
-
/* @__PURE__ */ N("div", { className: xe, children: [
|
|
170
|
-
/* @__PURE__ */ N("label", { className: Ne, id: j, htmlFor: n, children: [
|
|
171
|
-
b,
|
|
172
|
-
H && /* @__PURE__ */ a(Re, {})
|
|
173
|
-
] }),
|
|
174
|
-
D && !M && /* @__PURE__ */ a(Ee, { placement: "top", defaultAnchorButtonProps: z, children: D })
|
|
175
|
-
] }),
|
|
176
|
-
y && /* @__PURE__ */ a("div", { className: e.hint, id: U, children: y }),
|
|
177
|
-
/* @__PURE__ */ a(
|
|
178
|
-
"div",
|
|
179
|
-
{
|
|
180
|
-
"aria-live": "polite",
|
|
181
|
-
"aria-atomic": "true",
|
|
182
|
-
className: e.valueAnnouncer,
|
|
183
|
-
id: G,
|
|
184
|
-
children: w
|
|
185
|
-
}
|
|
186
|
-
),
|
|
187
|
-
/* @__PURE__ */ N("div", { className: e.wrapper, children: [
|
|
188
|
-
u && /* @__PURE__ */ a(
|
|
189
|
-
"span",
|
|
190
|
-
{
|
|
191
|
-
className: r(X, e.prefix),
|
|
192
|
-
ref: B,
|
|
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": `${j}${he}`,
|
|
206
|
-
"aria-describedby": Ae(),
|
|
207
|
-
"aria-invalid": v,
|
|
208
|
-
"aria-disabled": l,
|
|
209
|
-
disabled: s,
|
|
210
|
-
min: $,
|
|
211
|
-
max: V,
|
|
212
|
-
readOnly: l,
|
|
213
|
-
required: H,
|
|
214
|
-
step: ee,
|
|
215
|
-
type: "number",
|
|
216
|
-
value: p,
|
|
217
|
-
onChange: we
|
|
218
|
-
}
|
|
219
|
-
),
|
|
220
|
-
c && /* @__PURE__ */ a(
|
|
221
|
-
"span",
|
|
222
|
-
{
|
|
223
|
-
className: r(X, e.suffix),
|
|
224
|
-
ref: L,
|
|
225
|
-
"aria-disabled": s,
|
|
226
|
-
children: _e
|
|
227
|
-
}
|
|
228
|
-
),
|
|
229
|
-
/* @__PURE__ */ a(Q, { ...se, hideLabel: !0, theme: "light", iconName: "minus", variant: "filled", className: ye, size: i, onClick: Se, tooltip: ae, disabled: s || l || Y(p) && Number(p) <= Number($), type: "button", children: ne }),
|
|
230
|
-
/* @__PURE__ */ a(Q, { ...ie, hideLabel: !0, theme: "light", iconName: "plus", variant: "filled", tooltip: re, className: De, size: i, onClick: ge, disabled: s || l || Y(p) && Number(p) >= Number(V), type: "button", children: oe })
|
|
231
|
-
] }),
|
|
232
|
-
v && A && /* @__PURE__ */ a(We, { className: e.feedback, message: A, variant: "error", id: q })
|
|
233
|
-
] });
|
|
234
|
-
});
|
|
235
|
-
nt.displayName = "DSInputNumber";
|
|
236
|
-
export {
|
|
237
|
-
nt as D,
|
|
238
|
-
Y as i,
|
|
239
|
-
tt as v
|
|
240
|
-
};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { c as e } from "./index.DQOqod3i.js";
|
|
4
|
-
import { forwardRef as F, useState as M, useRef as U } from "react";
|
|
5
|
-
import { u as I } from "./useBreakpoint.1txsny17.js";
|
|
6
|
-
import { Asterisk as G } from "../asterisk.Dwtdwpkq.js";
|
|
7
|
-
import { D as J } from "./Button.Dauhc5op.js";
|
|
8
|
-
import { D as K } from "./Popover.Cyf3CbLl.js";
|
|
9
|
-
import { D as Q } from "./SystemFeedback.Dq3ZphgG.js";
|
|
10
|
-
import { g as f } from "./helpers.CexwVao7.js";
|
|
11
|
-
import "./index.cKLI89Eg.js";
|
|
12
|
-
import '../assets/InputPassword.CutbykTm.css';const X = "ds-input-password_input_l2ovg_1", Y = "ds-input-password_input--small_l2ovg_9", Z = "ds-input-password_input--invalid_l2ovg_121", z = "ds-input-password_input--has-action-button_l2ovg_182", ss = "ds-input-password_root_l2ovg_218", as = "ds-input-password_hint_l2ovg_218", ts = "ds-input-password_label-wrapper_l2ovg_218", os = "ds-input-password_wrapper_l2ovg_222", es = "ds-input-password_action-button_l2ovg_228", ns = "ds-input-password_label_l2ovg_218", rs = "ds-input-password_label--disabled_l2ovg_247", ls = "ds-input-password_label-wrapper--hidden_l2ovg_259", is = "ds-input-password_feedback_l2ovg_287", s = {
|
|
13
|
-
input: X,
|
|
14
|
-
inputSmall: Y,
|
|
15
|
-
inputInvalid: Z,
|
|
16
|
-
inputHasActionButton: z,
|
|
17
|
-
root: ss,
|
|
18
|
-
hint: as,
|
|
19
|
-
labelWrapper: ts,
|
|
20
|
-
wrapper: os,
|
|
21
|
-
actionButton: es,
|
|
22
|
-
label: ns,
|
|
23
|
-
labelDisabled: rs,
|
|
24
|
-
labelWrapperHidden: ls,
|
|
25
|
-
feedback: is
|
|
26
|
-
}, ps = ({
|
|
27
|
-
id: a,
|
|
28
|
-
label: n,
|
|
29
|
-
hideLabel: p,
|
|
30
|
-
popoverContent: d
|
|
31
|
-
}) => {
|
|
32
|
-
if (!a)
|
|
33
|
-
throw new Error(f("DSInputPassword", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputPassword component.'));
|
|
34
|
-
if (!n)
|
|
35
|
-
throw new Error(f("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}.`));
|
|
36
|
-
p && d && console.warn(f("DSInputPassword", "Using a popover when hideLabel is set to true is not supported."));
|
|
37
|
-
}, ds = F(({
|
|
38
|
-
id: a,
|
|
39
|
-
label: n,
|
|
40
|
-
autoComplete: p = "new-password",
|
|
41
|
-
className: d,
|
|
42
|
-
disabled: c = !1,
|
|
43
|
-
hint: u,
|
|
44
|
-
hideLabel: h = !1,
|
|
45
|
-
invalid: r = !1,
|
|
46
|
-
popoverContent: w,
|
|
47
|
-
popoverInfoButtonProps: B,
|
|
48
|
-
readonly: v = !1,
|
|
49
|
-
required: g = !1,
|
|
50
|
-
togglePasswordVisibilityButtonProps: N,
|
|
51
|
-
size: b = "medium",
|
|
52
|
-
systemFeedback: m,
|
|
53
|
-
...k
|
|
54
|
-
}, l) => {
|
|
55
|
-
process.env.NODE_ENV !== "production" && ps({
|
|
56
|
-
id: a,
|
|
57
|
-
label: n,
|
|
58
|
-
hideLabel: I(h),
|
|
59
|
-
popoverContent: w
|
|
60
|
-
});
|
|
61
|
-
const {
|
|
62
|
-
hidePasswordText: H = "Hide password",
|
|
63
|
-
showPasswordText: A = "Show password",
|
|
64
|
-
...W
|
|
65
|
-
} = N || {}, [_, x] = M(!1), P = `${a}-label`, D = `${a}-feedback`, S = `${a}-hint`, L = u ? ` ${S}` : "", $ = [r && m && D].filter(Boolean).join(" ") || void 0, y = I(h), C = e(s.root, d), E = e(s.input, {
|
|
66
|
-
// small input
|
|
67
|
-
[s.inputSmall]: b === "small",
|
|
68
|
-
// invalid state
|
|
69
|
-
[s.inputInvalid]: r,
|
|
70
|
-
// action button - input password always has an action button
|
|
71
|
-
[s.inputHasActionButton]: !0
|
|
72
|
-
}), R = e(s.label, {
|
|
73
|
-
[s.labelDisabled]: c
|
|
74
|
-
}), T = e(s.labelWrapper, {
|
|
75
|
-
// hide label only visually to keep them available for assistive technologies
|
|
76
|
-
[s.labelWrapperHidden]: y
|
|
77
|
-
}), V = e(s.actionButton, {
|
|
78
|
-
[s.actionButtonSmall]: b === "small"
|
|
79
|
-
}), j = U(null), q = (o) => {
|
|
80
|
-
j.current = o, typeof l == "function" ? l(o) : l && (l.current = o);
|
|
81
|
-
}, O = () => {
|
|
82
|
-
x((o) => !o);
|
|
83
|
-
};
|
|
84
|
-
return /* @__PURE__ */ i("div", { className: C, children: [
|
|
85
|
-
/* @__PURE__ */ i("div", { className: T, children: [
|
|
86
|
-
/* @__PURE__ */ i("label", { className: R, id: P, htmlFor: a, children: [
|
|
87
|
-
n,
|
|
88
|
-
g && /* @__PURE__ */ t(G, {})
|
|
89
|
-
] }),
|
|
90
|
-
w && !y && /* @__PURE__ */ t(K, { placement: "top", defaultAnchorButtonProps: B, children: w })
|
|
91
|
-
] }),
|
|
92
|
-
u && /* @__PURE__ */ t("div", { className: s.hint, id: S, children: u }),
|
|
93
|
-
/* @__PURE__ */ i("div", { className: s.wrapper, children: [
|
|
94
|
-
/* @__PURE__ */ t(
|
|
95
|
-
"input",
|
|
96
|
-
{
|
|
97
|
-
className: E,
|
|
98
|
-
id: a,
|
|
99
|
-
...k,
|
|
100
|
-
ref: q,
|
|
101
|
-
"aria-labelledby": `${P}${L}`,
|
|
102
|
-
"aria-describedby": $,
|
|
103
|
-
"aria-invalid": r,
|
|
104
|
-
"aria-disabled": v,
|
|
105
|
-
readOnly: v,
|
|
106
|
-
required: g,
|
|
107
|
-
disabled: c,
|
|
108
|
-
autoComplete: p,
|
|
109
|
-
type: _ ? "text" : "password"
|
|
110
|
-
}
|
|
111
|
-
),
|
|
112
|
-
/* @__PURE__ */ t(J, { ...W, hideLabel: !0, theme: "light", iconName: _ ? "eye-closed" : "eye", variant: "ghost", className: V, size: b, onClick: O, type: "button", disabled: c, children: _ ? H : A })
|
|
113
|
-
] }),
|
|
114
|
-
r && m && /* @__PURE__ */ t(Q, { className: s.feedback, message: m, variant: "error", id: D })
|
|
115
|
-
] });
|
|
116
|
-
});
|
|
117
|
-
ds.displayName = "DSInputPassword";
|
|
118
|
-
export {
|
|
119
|
-
ds as D,
|
|
120
|
-
ps as v
|
|
121
|
-
};
|