@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
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as Z } from "react/jsx-runtime";
|
|
3
|
+
import { d as io } from "./index.cKLI89Eg.js";
|
|
4
|
+
import { c as eo } from "./index.DQOqod3i.js";
|
|
5
|
+
import { forwardRef as so, useState as ao } from "react";
|
|
6
|
+
import { D as no } from "./Fieldset.BBMuLKps.js";
|
|
7
|
+
import { DSRadio as lo } from "../radio.DjToa2aV.js";
|
|
8
|
+
import { g as v, r as oo } from "./helpers.CexwVao7.js";
|
|
9
|
+
import '../assets/RadioGroup.q1lQ-HIZ.css';const co = "ds-radio-group_fieldset--custom-area-above_1r3gv_1", uo = "ds-radio-group_root_1r3gv_5", po = "ds-radio-group_root--horizontal_1r3gv_13", vo = "ds-radio-group_root--invalid_1r3gv_16", ho = "ds-radio-group_root--custom-area-above_1r3gv_19", mo = "ds-radio-group_root--custom-area-above--horizontal_1r3gv_26", z = {
|
|
10
|
+
fieldsetCustomAreaAbove: co,
|
|
11
|
+
root: uo,
|
|
12
|
+
rootHorizontal: po,
|
|
13
|
+
rootInvalid: vo,
|
|
14
|
+
rootCustomAreaAbove: ho,
|
|
15
|
+
rootCustomAreaAboveHorizontal: mo
|
|
16
|
+
}, fo = (s) => s.some(({
|
|
17
|
+
hint: r
|
|
18
|
+
}) => !!r), go = (s) => s.some(({
|
|
19
|
+
customArea: r,
|
|
20
|
+
isCustomAreaAbove: o
|
|
21
|
+
}) => !!r && !o), $ = (s) => s.some(({
|
|
22
|
+
customArea: r,
|
|
23
|
+
isCustomAreaAbove: o
|
|
24
|
+
}) => !!r && o), Ao = ({
|
|
25
|
+
legend: s,
|
|
26
|
+
name: r,
|
|
27
|
+
options: o,
|
|
28
|
+
description: G,
|
|
29
|
+
direction: a,
|
|
30
|
+
hideLegend: A,
|
|
31
|
+
hideUncheckedHints: n,
|
|
32
|
+
id: t,
|
|
33
|
+
popoverContent: l,
|
|
34
|
+
systemFeedback: d
|
|
35
|
+
}) => {
|
|
36
|
+
if (!t && (G || d))
|
|
37
|
+
throw new Error(v("DSRadioGroup", 'A unique "id" prop is required when providing the description or systemFeedback property. Please add a unique "id" prop to the DSRadioGroup component.'));
|
|
38
|
+
if (!s)
|
|
39
|
+
throw new Error(v("DSRadioGroup", oo("legend", "DSRadioGroup")));
|
|
40
|
+
if (!r)
|
|
41
|
+
throw new Error(v("DSRadioGroup", oo("name", "DSRadioGroup")));
|
|
42
|
+
if (Array.isArray(o)) {
|
|
43
|
+
if (o.length === 0)
|
|
44
|
+
throw new Error(v("DSRadioGroup", "The options array must not be empty."));
|
|
45
|
+
} else throw new Error(v("DSRadioGroup", oo("options", "DSRadioGroup")));
|
|
46
|
+
if (a === "horizontal" && go(o))
|
|
47
|
+
throw new Error(v("DSRadioGroup", "Horizontal direction is not possible when options contain a custom area without isCustomAreaAbove set to true. Please remove custom areas, change direction property to 'vertical' or set isCustomAreaAbove to true."));
|
|
48
|
+
a === "horizontal" && n && console.warn(v("DSRadioGroup", "Setting 'hideUncheckedHints' to 'true' is not possible when direction is 'horizontal'. Please remove 'hideUncheckedHints' or change direction property to 'vertical'.")), A && l && console.warn(v("DSRadioGroup", '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".'));
|
|
49
|
+
}, bo = so((s, r) => {
|
|
50
|
+
const o = io.c(73), G = s;
|
|
51
|
+
let a, A, n, t, l, d, h, e, m, b, C, u, R, y, E, k, N, P, q, x;
|
|
52
|
+
o[0] !== G ? ({
|
|
53
|
+
legend: l,
|
|
54
|
+
name: d,
|
|
55
|
+
options: e,
|
|
56
|
+
className: a,
|
|
57
|
+
defaultValue: A,
|
|
58
|
+
description: n,
|
|
59
|
+
direction: R,
|
|
60
|
+
disabled: y,
|
|
61
|
+
hideLegend: E,
|
|
62
|
+
hideUncheckedHints: k,
|
|
63
|
+
id: t,
|
|
64
|
+
invalid: N,
|
|
65
|
+
popoverContent: m,
|
|
66
|
+
popoverInfoButtonProps: b,
|
|
67
|
+
required: P,
|
|
68
|
+
systemFeedback: u,
|
|
69
|
+
theme: q,
|
|
70
|
+
value: x,
|
|
71
|
+
onChange: h,
|
|
72
|
+
...C
|
|
73
|
+
} = G, o[0] = G, o[1] = a, o[2] = A, o[3] = n, o[4] = t, o[5] = l, o[6] = d, o[7] = h, o[8] = e, o[9] = m, o[10] = b, o[11] = C, o[12] = u, o[13] = R, o[14] = y, o[15] = E, o[16] = k, o[17] = N, o[18] = P, o[19] = q, o[20] = x) : (a = o[1], A = o[2], n = o[3], t = o[4], l = o[5], d = o[6], h = o[7], e = o[8], m = o[9], b = o[10], C = o[11], u = o[12], R = o[13], y = o[14], E = o[15], k = o[16], N = o[17], P = o[18], q = o[19], x = o[20]);
|
|
74
|
+
const p = R === void 0 ? "vertical" : R, c = y === void 0 ? !1 : y, I = E === void 0 ? !1 : E, f = k === void 0 ? !1 : k, g = N === void 0 ? !1 : N, S = P === void 0 ? !1 : P, w = q === void 0 ? "light" : q;
|
|
75
|
+
process.env.NODE_ENV !== "production" && Ao({
|
|
76
|
+
legend: l,
|
|
77
|
+
name: d,
|
|
78
|
+
options: e,
|
|
79
|
+
description: n,
|
|
80
|
+
direction: p,
|
|
81
|
+
hideLegend: I,
|
|
82
|
+
hideUncheckedHints: f,
|
|
83
|
+
id: t,
|
|
84
|
+
popoverContent: m,
|
|
85
|
+
systemFeedback: u
|
|
86
|
+
});
|
|
87
|
+
const [to, ro] = ao(A), U = x !== void 0, L = U ? x : to;
|
|
88
|
+
let B;
|
|
89
|
+
o[21] !== a || o[22] !== e ? (B = eo({
|
|
90
|
+
[z.fieldsetCustomAreaAbove]: $(e)
|
|
91
|
+
}, a), o[21] = a, o[22] = e, o[23] = B) : B = o[23];
|
|
92
|
+
const j = B, W = p === "horizontal", J = g && !!u;
|
|
93
|
+
let F;
|
|
94
|
+
o[24] !== p || o[25] !== e || o[26] !== J || o[27] !== W ? (F = eo(z.root, {
|
|
95
|
+
[z.rootHorizontal]: W,
|
|
96
|
+
[z.rootInvalid]: J,
|
|
97
|
+
[z.rootCustomAreaAbove]: $(e),
|
|
98
|
+
[z.rootCustomAreaAboveHorizontal]: $(e) && p === "horizontal"
|
|
99
|
+
}), o[24] = p, o[25] = e, o[26] = J, o[27] = W, o[28] = F) : F = o[28];
|
|
100
|
+
const K = F;
|
|
101
|
+
let V;
|
|
102
|
+
o[29] !== c || o[30] !== U || o[31] !== h ? (V = (i) => {
|
|
103
|
+
if (c) {
|
|
104
|
+
i.preventDefault();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
U || ro(i.target.value), h && h(i);
|
|
108
|
+
}, o[29] = c, o[30] = U, o[31] = h, o[32] = V) : V = o[32];
|
|
109
|
+
const Q = V;
|
|
110
|
+
let M;
|
|
111
|
+
o[33] !== f || o[34] !== e ? (M = fo(e) && !f, o[33] = f, o[34] = e, o[35] = M) : M = o[35];
|
|
112
|
+
const X = M;
|
|
113
|
+
let O;
|
|
114
|
+
o[36] !== w ? (O = {
|
|
115
|
+
theme: w
|
|
116
|
+
}, o[36] = w, o[37] = O) : O = o[37];
|
|
117
|
+
const Y = O;
|
|
118
|
+
let D;
|
|
119
|
+
o[38] !== p || o[39] !== e ? (D = $(e) && p === "horizontal" ? {
|
|
120
|
+
maxWidth: `calc(${e.length * 400}px + var(--ds-spacing-dynamic-xs))`
|
|
121
|
+
} : void 0, o[38] = p, o[39] = e, o[40] = D) : D = o[40];
|
|
122
|
+
let _;
|
|
123
|
+
o[41] !== X || o[42] !== L || o[43] !== c || o[44] !== f || o[45] !== t || o[46] !== g || o[47] !== d || o[48] !== e || o[49] !== r || o[50] !== S || o[51] !== w ? (_ = e.map((i) => /* @__PURE__ */ Z(lo, { name: d, checked: i.value === L, disabled: c, fieldsetId: t, hideUncheckedHint: f, hint: i.hint, invalid: g, isBold: X, required: S, ref: i.value === L ? r : null, theme: w, ...i }, t + i.label + i.value + i.hint)), o[41] = X, o[42] = L, o[43] = c, o[44] = f, o[45] = t, o[46] = g, o[47] = d, o[48] = e, o[49] = r, o[50] = S, o[51] = w, o[52] = _) : _ = o[52];
|
|
124
|
+
let H;
|
|
125
|
+
o[53] !== K || o[54] !== D || o[55] !== _ ? (H = /* @__PURE__ */ Z("div", { className: K, style: D, children: _ }), o[53] = K, o[54] = D, o[55] = _, o[56] = H) : H = o[56];
|
|
126
|
+
let T;
|
|
127
|
+
return o[57] !== n || o[58] !== c || o[59] !== j || o[60] !== Q || o[61] !== I || o[62] !== t || o[63] !== g || o[64] !== l || o[65] !== m || o[66] !== b || o[67] !== S || o[68] !== C || o[69] !== u || o[70] !== Y || o[71] !== H ? (T = /* @__PURE__ */ Z(no, { id: t, legend: l, className: j, description: n, disabled: c, hideLegend: I, required: S, invalid: g, systemFeedback: u, popoverContent: m, popoverInfoButtonProps: b, ...Y, ...C, role: "radiogroup", onChange: Q, children: H }), o[57] = n, o[58] = c, o[59] = j, o[60] = Q, o[61] = I, o[62] = t, o[63] = g, o[64] = l, o[65] = m, o[66] = b, o[67] = S, o[68] = C, o[69] = u, o[70] = Y, o[71] = H, o[72] = T) : T = o[72], T;
|
|
128
|
+
});
|
|
129
|
+
bo.displayName = "DSRadioGroup";
|
|
130
|
+
export {
|
|
131
|
+
bo as D,
|
|
132
|
+
go as a,
|
|
133
|
+
fo as b,
|
|
134
|
+
$ as o,
|
|
135
|
+
Ao as v
|
|
136
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "./index.DQOqod3i.js";
|
|
4
|
+
import { forwardRef as G, useRef as ee, useState as q, useEffect as le } from "react";
|
|
5
|
+
import { Asterisk as se } from "../asterisk.Dwtdwpkq.js";
|
|
6
|
+
import { D as ae } from "./Icon.DYtaQgbw.js";
|
|
7
|
+
import { D as te } from "./Popover.CxZZ_y1Z.js";
|
|
8
|
+
import { D as re } from "./SystemFeedback.DhWcYjnu.js";
|
|
9
|
+
import { g as n, r as ce } from "./helpers.CexwVao7.js";
|
|
10
|
+
import { u as A } from "./useBreakpoint.1txsny17.js";
|
|
11
|
+
import '../assets/Select.CfTN3CJo.css';const oe = "ds-select_root_1pc5m_1", ne = "ds-select_hint_1pc5m_1", ie = "ds-select_label-wrapper_1pc5m_1", de = "ds-select_label_1pc5m_1", pe = "ds-select_label--disabled_1pc5m_189", me = "ds-select_label--dark_1pc5m_193", he = "ds-select_label-wrapper--hidden_1pc5m_209", be = "ds-select_hint--dark_1pc5m_236", _e = "ds-select_feedback_1pc5m_240", ue = "ds-select_select-wrapper_1pc5m_244", fe = "ds-select_select_1pc5m_244", ve = "ds-select_select--small_1pc5m_258", Se = "ds-select_select--invalid_1pc5m_376", De = "ds-select_select--dark_1pc5m_394", ke = "ds-select_select--placeholder_1pc5m_598", ye = "ds-select_chevron_1pc5m_657", we = "ds-select_chevron--small_1pc5m_666", ge = "ds-select_chevron--disabled_1pc5m_669", Ne = "ds-select_chevron--dark_1pc5m_677", e = {
|
|
12
|
+
root: oe,
|
|
13
|
+
hint: ne,
|
|
14
|
+
labelWrapper: ie,
|
|
15
|
+
label: de,
|
|
16
|
+
labelDisabled: pe,
|
|
17
|
+
labelDark: me,
|
|
18
|
+
labelWrapperHidden: he,
|
|
19
|
+
hintDark: be,
|
|
20
|
+
feedback: _e,
|
|
21
|
+
selectWrapper: ue,
|
|
22
|
+
select: fe,
|
|
23
|
+
selectSmall: ve,
|
|
24
|
+
selectInvalid: Se,
|
|
25
|
+
selectDark: De,
|
|
26
|
+
selectPlaceholder: ke,
|
|
27
|
+
chevron: ye,
|
|
28
|
+
chevronSmall: we,
|
|
29
|
+
chevronDisabled: ge,
|
|
30
|
+
chevronDark: Ne
|
|
31
|
+
}, He = ["medium", "small"], Pe = ({
|
|
32
|
+
id: o,
|
|
33
|
+
label: a,
|
|
34
|
+
options: l,
|
|
35
|
+
hideLabel: i,
|
|
36
|
+
popoverContent: d
|
|
37
|
+
}) => {
|
|
38
|
+
if (!o)
|
|
39
|
+
throw new Error(n("DSSelect", 'A unique "id" prop is required. Please add a unique "id" prop to the DSSelect component.'));
|
|
40
|
+
if (!a)
|
|
41
|
+
throw new Error(n("DSSelect", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSSelect component. If you don't want to display a label, set hideLabel={true}.`));
|
|
42
|
+
if (Array.isArray(l)) {
|
|
43
|
+
if (l.length === 0)
|
|
44
|
+
throw new Error(n("DSSelect", "The options array must not be empty."));
|
|
45
|
+
} else throw new Error(n("DSSelect", ce("options", "DSSelect")));
|
|
46
|
+
i && d && console.warn(n("DSSelect", "Using a popover when hideLabel is set to true is not supported."));
|
|
47
|
+
}, Ie = (o, a, l) => o === "" || a !== void 0 && a !== "" ? !1 : !(l !== void 0 && l !== ""), Ce = G((o, a) => {
|
|
48
|
+
const {
|
|
49
|
+
id: l,
|
|
50
|
+
label: i,
|
|
51
|
+
options: d,
|
|
52
|
+
className: B,
|
|
53
|
+
defaultValue: y,
|
|
54
|
+
disabled: f = !1,
|
|
55
|
+
hideLabel: w = !1,
|
|
56
|
+
hint: v,
|
|
57
|
+
invalid: p = !1,
|
|
58
|
+
popoverContent: S,
|
|
59
|
+
popoverInfoButtonProps: V,
|
|
60
|
+
placeholder: D = "Select",
|
|
61
|
+
required: g = !1,
|
|
62
|
+
size: N = "medium",
|
|
63
|
+
systemFeedback: k,
|
|
64
|
+
theme: m = "light",
|
|
65
|
+
value: h,
|
|
66
|
+
onChange: P,
|
|
67
|
+
...F
|
|
68
|
+
} = o;
|
|
69
|
+
process.env.NODE_ENV !== "production" && Pe({
|
|
70
|
+
id: l,
|
|
71
|
+
label: i,
|
|
72
|
+
options: d,
|
|
73
|
+
hideLabel: A(w),
|
|
74
|
+
popoverContent: S
|
|
75
|
+
});
|
|
76
|
+
const H = ee(null), [R, I] = q(h), [j, x] = q(Ie(D, y, h));
|
|
77
|
+
le(() => {
|
|
78
|
+
I(h);
|
|
79
|
+
}, [h]);
|
|
80
|
+
const T = (s) => {
|
|
81
|
+
H.current = s, typeof a == "function" ? a(s) : a && (a.current = s);
|
|
82
|
+
}, C = A(w), E = `${l}-label`, W = `${l}-feedback`, L = `${l}-hint`, M = v ? ` ${L}` : "", z = [p && k && W].filter(Boolean).join(" ") || void 0, O = (s) => [D && /* @__PURE__ */ r("option", { value: "", children: D }, `${l}-hidden-option-disabled-placeholder`), ...s.map((t) => {
|
|
83
|
+
if ("options" in t) {
|
|
84
|
+
const {
|
|
85
|
+
label: _,
|
|
86
|
+
options: Y
|
|
87
|
+
} = t;
|
|
88
|
+
return /* @__PURE__ */ r("optgroup", { label: _, children: Y.map($) }, _);
|
|
89
|
+
} else
|
|
90
|
+
return $(t);
|
|
91
|
+
})], $ = ({
|
|
92
|
+
label: s,
|
|
93
|
+
value: t,
|
|
94
|
+
isDisabled: _
|
|
95
|
+
}) => /* @__PURE__ */ r("option", { value: t, disabled: _, children: s }, t), U = c(e.root, B), b = m === "dark", Z = c(e.select, {
|
|
96
|
+
[e.selectDark]: b,
|
|
97
|
+
[e.selectSmall]: N === "small",
|
|
98
|
+
[e.selectInvalid]: p,
|
|
99
|
+
[e.selectPlaceholder]: j
|
|
100
|
+
}), J = c(e.label, {
|
|
101
|
+
[e.labelDark]: b,
|
|
102
|
+
[e.labelDisabled]: f
|
|
103
|
+
}), K = c(e.labelWrapper, {
|
|
104
|
+
// hide label only visually to keep them available for assistive technologies
|
|
105
|
+
[e.labelWrapperHidden]: C
|
|
106
|
+
}), Q = c(e.chevron, {
|
|
107
|
+
[e.chevronDark]: b,
|
|
108
|
+
[e.chevronSmall]: N === "small",
|
|
109
|
+
[e.chevronDisabled]: f
|
|
110
|
+
}), X = (s) => {
|
|
111
|
+
const {
|
|
112
|
+
value: t
|
|
113
|
+
} = s.target;
|
|
114
|
+
x(t === ""), I(t), P && P(s);
|
|
115
|
+
};
|
|
116
|
+
return /* @__PURE__ */ u("div", { className: U, children: [
|
|
117
|
+
/* @__PURE__ */ u("div", { className: K, children: [
|
|
118
|
+
/* @__PURE__ */ u("label", { className: J, id: E, htmlFor: l, children: [
|
|
119
|
+
i,
|
|
120
|
+
g && /* @__PURE__ */ r(se, {})
|
|
121
|
+
] }),
|
|
122
|
+
S && !C && /* @__PURE__ */ r(te, { placement: "top", theme: m, defaultAnchorButtonProps: V, children: S })
|
|
123
|
+
] }),
|
|
124
|
+
v && /* @__PURE__ */ r("div", { className: c(e.hint, {
|
|
125
|
+
[e.hintDark]: b
|
|
126
|
+
}), id: L, children: v }),
|
|
127
|
+
/* @__PURE__ */ u("div", { className: e.selectWrapper, children: [
|
|
128
|
+
/* @__PURE__ */ r(
|
|
129
|
+
"select",
|
|
130
|
+
{
|
|
131
|
+
...F,
|
|
132
|
+
id: l,
|
|
133
|
+
ref: T,
|
|
134
|
+
className: Z,
|
|
135
|
+
"aria-labelledby": `${E}${M}`,
|
|
136
|
+
"aria-describedby": z,
|
|
137
|
+
"aria-invalid": p,
|
|
138
|
+
defaultValue: y,
|
|
139
|
+
value: R,
|
|
140
|
+
disabled: f,
|
|
141
|
+
required: g,
|
|
142
|
+
onChange: X,
|
|
143
|
+
children: O(d)
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ r(ae, { name: "chevron-down", className: Q, "aria-hidden": "true", theme: m })
|
|
147
|
+
] }),
|
|
148
|
+
p && k && /* @__PURE__ */ r(re, { className: e.feedback, message: k, variant: "error", id: W, theme: m })
|
|
149
|
+
] });
|
|
150
|
+
});
|
|
151
|
+
Ce.displayName = "DSSelect";
|
|
152
|
+
export {
|
|
153
|
+
Ce as D,
|
|
154
|
+
He as S,
|
|
155
|
+
Ie as g,
|
|
156
|
+
Pe as v
|
|
157
|
+
};
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m, jsxs as pe } from "react/jsx-runtime";
|
|
3
|
+
import { d as vt } from "./index.cKLI89Eg.js";
|
|
4
|
+
import { c as h } from "./index.DQOqod3i.js";
|
|
5
|
+
import { forwardRef as xt, useState as nt, useRef as gt } from "react";
|
|
6
|
+
import { DSInput as Nt } from "../input.Dh0ws-9j.js";
|
|
7
|
+
import { D as yt } from "./Popover.CxZZ_y1Z.js";
|
|
8
|
+
import { g as ct } from "./helpers.CexwVao7.js";
|
|
9
|
+
import { u as St } from "./useBreakpoint.1txsny17.js";
|
|
10
|
+
import '../assets/Slider.B4kzL60S.css';const It = "ds-slider_root_1iths_1", Lt = "ds-slider_hint_1iths_4", Mt = "ds-slider_label-wrapper_1iths_4", Wt = "ds-slider_label-hint-input-wrapper_1iths_7", wt = "ds-slider_number-input_1iths_10", Vt = "ds-slider_label-wrapper--hidden_1iths_20", Ct = "ds-slider_label_1iths_4", $t = "ds-slider_label--dark_1iths_54", Pt = "ds-slider_label--disabled_1iths_58", At = "ds-slider_hint--dark_1iths_78", Et = "ds-slider_number-input--small_1iths_90", Rt = "ds-slider_min-max-label-wrapper_1iths_95", Bt = "ds-slider_min-max-label-wrapper--dark_1iths_108", Ft = "ds-slider_min-max-label-wrapper--disabled_1iths_112", Ht = "ds-slider_min-label_1iths_117", qt = "ds-slider_max-label_1iths_121", Ot = "ds-slider_slider-wrapper_1iths_125", zt = "ds-slider_slider_1iths_125", Kt = "ds-slider_value-tooltip_1iths_144", jt = "ds-slider_proxy-thumb_1iths_148", Ut = "ds-slider_slider--dark_1iths_153", Gt = "ds-slider_proxy-thumb--disabled_1iths_242", Xt = "ds-slider_proxy-thumb--dark_1iths_270", Jt = "ds-slider_custom-track_1iths_299", Qt = "ds-slider_custom-track--progress_1iths_304", Yt = "ds-slider_custom-track--runnable_1iths_316", Zt = "ds-slider_custom-track--disabled_1iths_330", es = "ds-slider_custom-track--dark_1iths_349", ts = "ds-slider_tick-wrapper_1iths_374", ss = "ds-slider_tick_1iths_374", ls = "ds-slider_value-tooltip--visible_1iths_433", as = "ds-slider_value-tooltip--disabled_1iths_436", is = "ds-slider_value-tooltip--dark_1iths_448", t = {
|
|
11
|
+
root: It,
|
|
12
|
+
hint: Lt,
|
|
13
|
+
labelWrapper: Mt,
|
|
14
|
+
labelHintInputWrapper: Wt,
|
|
15
|
+
numberInput: wt,
|
|
16
|
+
labelWrapperHidden: Vt,
|
|
17
|
+
label: Ct,
|
|
18
|
+
labelDark: $t,
|
|
19
|
+
labelDisabled: Pt,
|
|
20
|
+
hintDark: At,
|
|
21
|
+
numberInputSmall: Et,
|
|
22
|
+
minMaxLabelWrapper: Rt,
|
|
23
|
+
minMaxLabelWrapperDark: Bt,
|
|
24
|
+
minMaxLabelWrapperDisabled: Ft,
|
|
25
|
+
minLabel: Ht,
|
|
26
|
+
maxLabel: qt,
|
|
27
|
+
sliderWrapper: Ot,
|
|
28
|
+
slider: zt,
|
|
29
|
+
valueTooltip: Kt,
|
|
30
|
+
proxyThumb: jt,
|
|
31
|
+
sliderDark: Ut,
|
|
32
|
+
proxyThumbDisabled: Gt,
|
|
33
|
+
proxyThumbDark: Xt,
|
|
34
|
+
customTrack: Jt,
|
|
35
|
+
customTrackProgress: Qt,
|
|
36
|
+
customTrackRunnable: Yt,
|
|
37
|
+
customTrackDisabled: Zt,
|
|
38
|
+
customTrackDark: es,
|
|
39
|
+
tickWrapper: ts,
|
|
40
|
+
tick: ss,
|
|
41
|
+
valueTooltipVisible: ls,
|
|
42
|
+
valueTooltipDisabled: as,
|
|
43
|
+
valueTooltipDark: is
|
|
44
|
+
}, rs = 11, dt = 4, pt = (_) => _.toString().length, os = (_, n, e) => {
|
|
45
|
+
if (n === 0)
|
|
46
|
+
return !0;
|
|
47
|
+
const D = 1e-10, c = (_ - e) / n;
|
|
48
|
+
return Math.abs(Math.round(c) - c) < D;
|
|
49
|
+
}, ns = (_, n, e, D) => {
|
|
50
|
+
const c = parseFloat(n), f = e, p = Math.round((_ - f) / c);
|
|
51
|
+
let o = f + p * c;
|
|
52
|
+
o = Math.min(Math.max(o, e), D);
|
|
53
|
+
const b = c.toString().split(".")[1]?.length || 0;
|
|
54
|
+
return parseFloat(o.toFixed(b));
|
|
55
|
+
}, cs = (_, n, e) => {
|
|
56
|
+
const D = (_ - n) / (e - n) * 100, c = `calc(-0.24 * ${D}px + 10px)`;
|
|
57
|
+
return `calc(${D}% + ${c})`;
|
|
58
|
+
}, ds = ({
|
|
59
|
+
id: _,
|
|
60
|
+
label: n
|
|
61
|
+
}) => {
|
|
62
|
+
if (!_)
|
|
63
|
+
throw new Error(ct("DSSlider", 'A unique "id" prop is required. Please add a unique "id" prop to the DSSlider component.'));
|
|
64
|
+
if (!n)
|
|
65
|
+
throw new Error(ct("DSSlider", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSSlider component. If you don't want to display a label, set hideLabel={true}.`));
|
|
66
|
+
}, ps = xt((_, n) => {
|
|
67
|
+
const e = vt.c(180), D = _;
|
|
68
|
+
let c, f, p, o, b, L, u, x, M, W, te, se, le, ae, ie, re, oe, ne, g;
|
|
69
|
+
e[0] !== D ? ({
|
|
70
|
+
id: o,
|
|
71
|
+
label: b,
|
|
72
|
+
className: c,
|
|
73
|
+
defaultValue: f,
|
|
74
|
+
disabled: te,
|
|
75
|
+
hideLabel: se,
|
|
76
|
+
hideNumberInput: le,
|
|
77
|
+
hint: p,
|
|
78
|
+
isTooltipAlwaysVisible: ae,
|
|
79
|
+
max: ie,
|
|
80
|
+
min: re,
|
|
81
|
+
numberInputProps: L,
|
|
82
|
+
popoverContent: x,
|
|
83
|
+
popoverInfoButtonProps: M,
|
|
84
|
+
step: oe,
|
|
85
|
+
theme: ne,
|
|
86
|
+
value: g,
|
|
87
|
+
onChange: u,
|
|
88
|
+
...W
|
|
89
|
+
} = D, e[0] = D, e[1] = c, e[2] = f, e[3] = p, e[4] = o, e[5] = b, e[6] = L, e[7] = u, e[8] = x, e[9] = M, e[10] = W, e[11] = te, e[12] = se, e[13] = le, e[14] = ae, e[15] = ie, e[16] = re, e[17] = oe, e[18] = ne, e[19] = g) : (c = e[1], f = e[2], p = e[3], o = e[4], b = e[5], L = e[6], u = e[7], x = e[8], M = e[9], W = e[10], te = e[11], se = e[12], le = e[13], ae = e[14], ie = e[15], re = e[16], oe = e[17], ne = e[18], g = e[19]);
|
|
90
|
+
const a = te === void 0 ? !1 : te, ut = se === void 0 ? !1 : se, w = le === void 0 ? !1 : le, Ee = ae === void 0 ? !1 : ae, mt = ie === void 0 ? 100 : ie, bt = re === void 0 ? 0 : re, ce = oe === void 0 ? 1 : oe, N = ne === void 0 ? "light" : ne;
|
|
91
|
+
process.env.NODE_ENV !== "production" && ds({
|
|
92
|
+
id: o,
|
|
93
|
+
label: b
|
|
94
|
+
});
|
|
95
|
+
const i = Number(mt), s = Number(bt), d = Number(ce), r = N === "dark", V = St(ut), ue = `${o}-label`, Re = `${o}-number-input`, y = `${o}-hint`, ht = p ? ` ${y}` : "";
|
|
96
|
+
let me;
|
|
97
|
+
e[20] !== f || e[21] !== s || e[22] !== g ? (me = g || f || s.toString() || "0", e[20] = f, e[21] = s, e[22] = g, e[23] = me) : me = e[23];
|
|
98
|
+
const [C, be] = nt(me), [v, he] = nt(g || f || s || 0), _t = gt(null);
|
|
99
|
+
let _e;
|
|
100
|
+
e[24] !== n ? (_e = (l) => {
|
|
101
|
+
_t.current = l, typeof n == "function" ? n(l) : n && (n.current = l);
|
|
102
|
+
}, e[24] = n, e[25] = _e) : _e = e[25];
|
|
103
|
+
const Be = _e;
|
|
104
|
+
let fe;
|
|
105
|
+
e[26] !== L ? (fe = L || {}, e[26] = L, e[27] = fe) : fe = e[27];
|
|
106
|
+
const {
|
|
107
|
+
size: ot,
|
|
108
|
+
suffix: Fe
|
|
109
|
+
} = fe, ke = ot === void 0 ? "medium" : ot;
|
|
110
|
+
let Te;
|
|
111
|
+
e[28] !== u ? (Te = (l) => {
|
|
112
|
+
const k = parseFloat(l.target.value);
|
|
113
|
+
he(k), be(l.target.value), u && u(l);
|
|
114
|
+
}, e[28] = u, e[29] = Te) : Te = e[29];
|
|
115
|
+
const He = Te;
|
|
116
|
+
let De;
|
|
117
|
+
e[30] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (De = (l) => {
|
|
118
|
+
const k = l.target.value;
|
|
119
|
+
if (be(k), /^-?\d+(\.\d+)?$/.test(k)) {
|
|
120
|
+
const T = parseFloat(k);
|
|
121
|
+
Number.isNaN(T) || he(T);
|
|
122
|
+
}
|
|
123
|
+
}, e[30] = De) : De = e[30];
|
|
124
|
+
const ft = De;
|
|
125
|
+
let S;
|
|
126
|
+
if (e[31] !== C || e[32] !== u || e[33] !== i || e[34] !== s || e[35] !== ce) {
|
|
127
|
+
S = (k) => {
|
|
128
|
+
const de = parseFloat(C);
|
|
129
|
+
if (Number.isNaN(de)) {
|
|
130
|
+
l(k);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
let T = Math.min(Math.max(de, s), i);
|
|
134
|
+
os(T, parseFloat(ce), s) || (T = ns(T, ce, s, i)), be(T.toString()), he(T), u && u(k);
|
|
135
|
+
};
|
|
136
|
+
const l = (k) => {
|
|
137
|
+
be(s.toString()), he(s), u && u(k);
|
|
138
|
+
};
|
|
139
|
+
e[31] = C, e[32] = u, e[33] = i, e[34] = s, e[35] = ce, e[36] = S;
|
|
140
|
+
} else
|
|
141
|
+
S = e[36];
|
|
142
|
+
const $ = (d === 0 ? !1 : (i - s) / d <= rs) && (i - s) / d || 0;
|
|
143
|
+
let ve;
|
|
144
|
+
if (e[37] !== i || e[38] !== s || e[39] !== d || e[40] !== $) {
|
|
145
|
+
let l;
|
|
146
|
+
e[42] !== i || e[43] !== s || e[44] !== d ? (l = (k, de) => {
|
|
147
|
+
const T = s + de * d, Dt = cs(T, s, i);
|
|
148
|
+
return /* @__PURE__ */ m("span", { className: t.tick, style: {
|
|
149
|
+
left: Dt
|
|
150
|
+
} }, T);
|
|
151
|
+
}, e[42] = i, e[43] = s, e[44] = d, e[45] = l) : l = e[45], ve = Array.from({
|
|
152
|
+
length: $ + 1
|
|
153
|
+
}, l), e[37] = i, e[38] = s, e[39] = d, e[40] = $, e[41] = ve;
|
|
154
|
+
} else
|
|
155
|
+
ve = e[41];
|
|
156
|
+
const qe = ve;
|
|
157
|
+
let xe;
|
|
158
|
+
e[46] !== i || e[47] !== s || e[48] !== v ? (xe = () => {
|
|
159
|
+
if (s === i)
|
|
160
|
+
throw new Error("Min and max values cannot be the same.");
|
|
161
|
+
const l = (v - s) / (i - s) * 100;
|
|
162
|
+
return Math.max(0, Math.min(l, 100));
|
|
163
|
+
}, e[46] = i, e[47] = s, e[48] = v, e[49] = xe) : xe = e[49];
|
|
164
|
+
const I = xe;
|
|
165
|
+
let ge;
|
|
166
|
+
e[50] !== I ? (ge = () => {
|
|
167
|
+
const l = I();
|
|
168
|
+
return l < 50 ? `calc(${l}% + 4px)` : `calc(${l}% - 4px)`;
|
|
169
|
+
}, e[50] = I, e[51] = ge) : ge = e[51];
|
|
170
|
+
const kt = ge;
|
|
171
|
+
let Ne;
|
|
172
|
+
e[52] !== I ? (Ne = () => {
|
|
173
|
+
const l = 100 - I();
|
|
174
|
+
return l < 50 ? `calc(${l}% + 4px)` : `calc(${l}% - 4px)`;
|
|
175
|
+
}, e[52] = I, e[53] = Ne) : Ne = e[53];
|
|
176
|
+
const Tt = Ne;
|
|
177
|
+
let ye;
|
|
178
|
+
e[54] !== c || e[55] !== r ? (ye = h(t.slider, c, {
|
|
179
|
+
[t.sliderDark]: r
|
|
180
|
+
}), e[54] = c, e[55] = r, e[56] = ye) : ye = e[56];
|
|
181
|
+
const Oe = ye;
|
|
182
|
+
let Se;
|
|
183
|
+
e[57] !== a || e[58] !== r ? (Se = h(t.label, {
|
|
184
|
+
[t.labelDark]: r,
|
|
185
|
+
[t.labelDisabled]: a
|
|
186
|
+
}), e[57] = a, e[58] = r, e[59] = Se) : Se = e[59];
|
|
187
|
+
const ze = Se;
|
|
188
|
+
let Ie;
|
|
189
|
+
e[60] !== V ? (Ie = h(t.labelWrapper, {
|
|
190
|
+
[t.labelWrapperHidden]: V
|
|
191
|
+
}), e[60] = V, e[61] = Ie) : Ie = e[61];
|
|
192
|
+
const Ke = Ie, je = ke === "small";
|
|
193
|
+
let Le;
|
|
194
|
+
e[62] !== je ? (Le = h(t.numberInput, {
|
|
195
|
+
[t.numberInputSmall]: je
|
|
196
|
+
}), e[62] = je, e[63] = Le) : Le = e[63];
|
|
197
|
+
const Ue = Le;
|
|
198
|
+
let Me;
|
|
199
|
+
e[64] !== a || e[65] !== r ? (Me = h(t.minMaxLabelWrapper, {
|
|
200
|
+
[t.minMaxLabelWrapperDark]: r,
|
|
201
|
+
[t.minMaxLabelWrapperDisabled]: a
|
|
202
|
+
}), e[64] = a, e[65] = r, e[66] = Me) : Me = e[66];
|
|
203
|
+
const Ge = Me;
|
|
204
|
+
let We;
|
|
205
|
+
e[67] !== a || e[68] !== r ? (We = h(t.customTrack, t.customTrackProgress, {
|
|
206
|
+
[t.customTrackDark]: r,
|
|
207
|
+
[t.customTrackDisabled]: a
|
|
208
|
+
}), e[67] = a, e[68] = r, e[69] = We) : We = e[69];
|
|
209
|
+
const Xe = We;
|
|
210
|
+
let we;
|
|
211
|
+
e[70] !== a || e[71] !== r ? (we = h(t.customTrack, t.customTrackRunnable, {
|
|
212
|
+
[t.customTrackDark]: r,
|
|
213
|
+
[t.customTrackDisabled]: a
|
|
214
|
+
}), e[70] = a, e[71] = r, e[72] = we) : we = e[72];
|
|
215
|
+
const Je = we;
|
|
216
|
+
let Ve;
|
|
217
|
+
e[73] !== a || e[74] !== r ? (Ve = h(t.proxyThumb, {
|
|
218
|
+
[t.proxyThumbDark]: r,
|
|
219
|
+
[t.proxyThumbDisabled]: a
|
|
220
|
+
}), e[73] = a, e[74] = r, e[75] = Ve) : Ve = e[75];
|
|
221
|
+
const Qe = Ve;
|
|
222
|
+
let Ce;
|
|
223
|
+
e[76] !== a || e[77] !== r || e[78] !== Ee ? (Ce = h(t.valueTooltip, {
|
|
224
|
+
[t.valueTooltipDark]: r,
|
|
225
|
+
[t.valueTooltipVisible]: Ee,
|
|
226
|
+
[t.valueTooltipDisabled]: a
|
|
227
|
+
}), e[76] = a, e[77] = r, e[78] = Ee, e[79] = Ce) : Ce = e[79];
|
|
228
|
+
const Ye = Ce;
|
|
229
|
+
let $e;
|
|
230
|
+
e[80] !== r ? ($e = h(t.hint, {
|
|
231
|
+
[t.hintDark]: r
|
|
232
|
+
}), e[80] = r, e[81] = $e) : $e = e[81];
|
|
233
|
+
const Ze = $e;
|
|
234
|
+
let P;
|
|
235
|
+
e[82] !== o || e[83] !== b || e[84] !== ze || e[85] !== ue ? (P = /* @__PURE__ */ m("label", { className: ze, htmlFor: o, id: ue, children: b }), e[82] = o, e[83] = b, e[84] = ze, e[85] = ue, e[86] = P) : P = e[86];
|
|
236
|
+
let A;
|
|
237
|
+
e[87] !== V || e[88] !== x || e[89] !== M || e[90] !== N ? (A = x && !V && /* @__PURE__ */ m(yt, { placement: "top", theme: N, defaultAnchorButtonProps: M, children: x }), e[87] = V, e[88] = x, e[89] = M, e[90] = N, e[91] = A) : A = e[91];
|
|
238
|
+
let E;
|
|
239
|
+
e[92] !== Ke || e[93] !== P || e[94] !== A ? (E = /* @__PURE__ */ pe("div", { className: Ke, children: [
|
|
240
|
+
P,
|
|
241
|
+
A
|
|
242
|
+
] }), e[92] = Ke, e[93] = P, e[94] = A, e[95] = E) : E = e[95];
|
|
243
|
+
let R;
|
|
244
|
+
e[96] !== p || e[97] !== Ze || e[98] !== y ? (R = p && /* @__PURE__ */ m("div", { className: Ze, id: y, children: p }), e[96] = p, e[97] = Ze, e[98] = y, e[99] = R) : R = e[99];
|
|
245
|
+
let B;
|
|
246
|
+
e[100] !== a || e[101] !== S || e[102] !== w || e[103] !== p || e[104] !== y || e[105] !== Re || e[106] !== C || e[107] !== b || e[108] !== Ue || e[109] !== ke || e[110] !== Fe || e[111] !== i || e[112] !== s || e[113] !== d || e[114] !== N ? (B = !w && /* @__PURE__ */ m(Nt, { id: Re, aria: {
|
|
247
|
+
"aria-labelledby": p ? y : void 0
|
|
248
|
+
}, className: Ue, type: "number", min: s, max: i, step: d, inputMode: "decimal", autoComplete: "off", disabled: a, hideLabel: !0, value: C, onChange: ft, onBlur: S, onKeyDown: (l) => {
|
|
249
|
+
l.key === "Enter" && (l.preventDefault(), S(l));
|
|
250
|
+
}, label: b, size: ke, suffix: Fe, theme: N }), e[100] = a, e[101] = S, e[102] = w, e[103] = p, e[104] = y, e[105] = Re, e[106] = C, e[107] = b, e[108] = Ue, e[109] = ke, e[110] = Fe, e[111] = i, e[112] = s, e[113] = d, e[114] = N, e[115] = B) : B = e[115];
|
|
251
|
+
let F;
|
|
252
|
+
e[116] !== E || e[117] !== R || e[118] !== B ? (F = /* @__PURE__ */ pe("div", { className: t.labelHintInputWrapper, children: [
|
|
253
|
+
E,
|
|
254
|
+
R,
|
|
255
|
+
B
|
|
256
|
+
] }), e[116] = E, e[117] = R, e[118] = B, e[119] = F) : F = e[119];
|
|
257
|
+
const et = pt(s) < dt;
|
|
258
|
+
let H;
|
|
259
|
+
e[120] !== et ? (H = h({
|
|
260
|
+
[t.minLabel]: et
|
|
261
|
+
}), e[120] = et, e[121] = H) : H = e[121];
|
|
262
|
+
let q;
|
|
263
|
+
e[122] !== s || e[123] !== H ? (q = /* @__PURE__ */ m("div", { className: H, children: s }), e[122] = s, e[123] = H, e[124] = q) : q = e[124];
|
|
264
|
+
const tt = pt(i) < dt;
|
|
265
|
+
let O;
|
|
266
|
+
e[125] !== tt ? (O = h({
|
|
267
|
+
[t.maxLabel]: tt
|
|
268
|
+
}), e[125] = tt, e[126] = O) : O = e[126];
|
|
269
|
+
let z;
|
|
270
|
+
e[127] !== i || e[128] !== O ? (z = /* @__PURE__ */ m("div", { className: O, children: i }), e[127] = i, e[128] = O, e[129] = z) : z = e[129];
|
|
271
|
+
let K;
|
|
272
|
+
e[130] !== Ge || e[131] !== q || e[132] !== z ? (K = /* @__PURE__ */ pe("div", { className: Ge, children: [
|
|
273
|
+
q,
|
|
274
|
+
z
|
|
275
|
+
] }), e[130] = Ge, e[131] = q, e[132] = z, e[133] = K) : K = e[133];
|
|
276
|
+
const st = `${I()}`;
|
|
277
|
+
let Pe;
|
|
278
|
+
e[134] !== st ? (Pe = {
|
|
279
|
+
"--ds-input-slider-thumb-position": st
|
|
280
|
+
}, e[134] = st, e[135] = Pe) : Pe = e[135];
|
|
281
|
+
const lt = Pe, at = kt();
|
|
282
|
+
let j;
|
|
283
|
+
e[136] !== at ? (j = {
|
|
284
|
+
width: at
|
|
285
|
+
}, e[136] = at, e[137] = j) : j = e[137];
|
|
286
|
+
let U;
|
|
287
|
+
e[138] !== Xe || e[139] !== j ? (U = /* @__PURE__ */ m("div", { className: Xe, style: j }), e[138] = Xe, e[139] = j, e[140] = U) : U = e[140];
|
|
288
|
+
const it = Tt();
|
|
289
|
+
let G;
|
|
290
|
+
e[141] !== it ? (G = {
|
|
291
|
+
width: it
|
|
292
|
+
}, e[141] = it, e[142] = G) : G = e[142];
|
|
293
|
+
let X;
|
|
294
|
+
e[143] !== Je || e[144] !== G ? (X = /* @__PURE__ */ m("div", { className: Je, style: G }), e[143] = Je, e[144] = G, e[145] = X) : X = e[145];
|
|
295
|
+
const rt = `${ue}${ht}`;
|
|
296
|
+
let J;
|
|
297
|
+
e[146] !== a || e[147] !== Be || e[148] !== He || e[149] !== o || e[150] !== i || e[151] !== s || e[152] !== d || e[153] !== W || e[154] !== Oe || e[155] !== v || e[156] !== rt ? (J = /* @__PURE__ */ m("input", { ...W, id: o, type: "range", ref: Be, className: Oe, min: s, max: i, step: d, value: v, disabled: a, "aria-labelledby": rt, onChange: He }), e[146] = a, e[147] = Be, e[148] = He, e[149] = o, e[150] = i, e[151] = s, e[152] = d, e[153] = W, e[154] = Oe, e[155] = v, e[156] = rt, e[157] = J) : J = e[157];
|
|
298
|
+
let Q;
|
|
299
|
+
e[158] !== $ || e[159] !== qe ? (Q = $ > 0 && /* @__PURE__ */ m("div", { className: t.tickWrapper, children: qe }), e[158] = $, e[159] = qe, e[160] = Q) : Q = e[160];
|
|
300
|
+
let Y;
|
|
301
|
+
e[161] !== Qe ? (Y = /* @__PURE__ */ m("div", { className: Qe }), e[161] = Qe, e[162] = Y) : Y = e[162];
|
|
302
|
+
let Z;
|
|
303
|
+
e[163] !== a || e[164] !== w || e[165] !== v || e[166] !== Ye ? (Z = w && /* @__PURE__ */ m("div", { className: Ye, "aria-disabled": a, children: v }), e[163] = a, e[164] = w, e[165] = v, e[166] = Ye, e[167] = Z) : Z = e[167];
|
|
304
|
+
let ee;
|
|
305
|
+
e[168] !== lt || e[169] !== U || e[170] !== X || e[171] !== J || e[172] !== Q || e[173] !== Y || e[174] !== Z ? (ee = /* @__PURE__ */ pe("div", { className: t.sliderWrapper, style: lt, children: [
|
|
306
|
+
U,
|
|
307
|
+
X,
|
|
308
|
+
J,
|
|
309
|
+
Q,
|
|
310
|
+
Y,
|
|
311
|
+
Z
|
|
312
|
+
] }), e[168] = lt, e[169] = U, e[170] = X, e[171] = J, e[172] = Q, e[173] = Y, e[174] = Z, e[175] = ee) : ee = e[175];
|
|
313
|
+
let Ae;
|
|
314
|
+
return e[176] !== F || e[177] !== K || e[178] !== ee ? (Ae = /* @__PURE__ */ pe("div", { className: t.root, children: [
|
|
315
|
+
F,
|
|
316
|
+
K,
|
|
317
|
+
ee
|
|
318
|
+
] }), e[176] = F, e[177] = K, e[178] = ee, e[179] = Ae) : Ae = e[179], Ae;
|
|
319
|
+
});
|
|
320
|
+
ps.displayName = "DSSlider";
|
|
321
|
+
export {
|
|
322
|
+
ps as D,
|
|
323
|
+
dt as L,
|
|
324
|
+
rs as M,
|
|
325
|
+
cs as a,
|
|
326
|
+
pt as g,
|
|
327
|
+
os as i,
|
|
328
|
+
ns as s,
|
|
329
|
+
ds as v
|
|
330
|
+
};
|