@stihl-design-system/components 1.0.0-RC.32 → 1.0.0-RC.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion.Dmqocj97.js +12 -0
- package/actionbutton.Du5CT-Mt.js +12 -0
- package/actionlink.BK9CaQUY.js +12 -0
- package/{arialiveregions.Fgcshs5k.js → arialiveregions.BUVY9NpY.js} +2 -2
- package/assets/Accordion.CzBGud45.css +1 -0
- package/assets/Button.CmeGVEAY.css +1 -0
- package/assets/Checkbox.CyOw3rXI.css +1 -0
- package/assets/CustomReactSelect.BihX36Uo.css +1 -0
- package/assets/Dialog.DJkn65Es.css +1 -0
- package/assets/Drawer.x3BCQvWE.css +1 -0
- package/assets/Fieldset.Oqu7pOBv.css +1 -0
- package/assets/InputFile.D7Ihod7B.css +1 -0
- package/assets/InputNumber.z_UqRYdv.css +1 -0
- package/assets/InputPassword.DZENjxJ9.css +1 -0
- package/assets/InputSearch.GBH9Eh6F.css +1 -0
- package/assets/LinkButton.88j5ckLu.css +1 -0
- package/assets/{MegaMenu.DX9gChtY.css → MegaMenu.D5EtjFeL.css} +1 -1
- package/assets/Notification.CvohYEvT.css +1 -0
- package/assets/Select.CL0fqx7X.css +1 -0
- package/assets/Slider.DWLuIsNj.css +1 -0
- package/assets/Stepper.tXJl15yL.css +1 -0
- package/assets/{SystemFeedback.RcrPepSZ.css → SystemFeedback.PKzqnXUe.css} +1 -1
- package/assets/Textarea.B1HOakic.css +1 -0
- package/assets/Toast.CGyKXb4V.css +1 -0
- package/assets/buttonround.DBpMesfr.css +1 -0
- package/assets/input.RPDR8qdT.css +1 -0
- package/assets/step.BeLporJO.css +1 -0
- package/assets/switch.B9B-n_3y.css +1 -0
- package/{asterisk.CR60hx8S.js → asterisk.B2ih8VwF.js} +1 -1
- package/{banner.o4Etkjjo.js → banner.D-RX60nJ.js} +3 -3
- package/breadcrumb.tvMByFgp.js +11 -0
- package/button.CZupaV9L.js +12 -0
- package/buttonround.9IS0tUqw.js +96 -0
- package/checkbox.XYQI-ubx.js +12 -0
- package/checkboxgroup.CjnNJ8e6.js +9 -0
- package/chip.B-pxhsdb.js +12 -0
- package/chipgroup.cGjn4LVV.js +143 -0
- package/chunks/Accordion.CYIfNOWr.js +168 -0
- package/chunks/{ActionButton.DdDesD7K.js → ActionButton.BOYQYo5M.js} +37 -37
- package/chunks/{ActionLink.DqAsPYda.js → ActionLink.BlwvrnPN.js} +36 -36
- package/chunks/{AriaLiveRegions.utils.Cb327d_2.js → AriaLiveRegions.utils.CybNIBSa.js} +2 -2
- package/chunks/{Breadcrumb.9KinNuyQ.js → Breadcrumb.Qr6bDP2N.js} +35 -37
- package/chunks/Button.Cn5yg7dG.js +138 -0
- package/chunks/Checkbox.D5X5T6Yg.js +88 -0
- package/chunks/CheckboxGroup.CUR_0VMc.js +74 -0
- package/chunks/{Chip.BrbYu6i_.js → Chip.DIp5hdRH.js} +6 -6
- package/chunks/{CustomReactSelect.Cqq70QC0.js → CustomReactSelect.BA3hUVkh.js} +897 -878
- package/chunks/Dialog.DRk_jSj5.js +102 -0
- package/chunks/Drawer.Dj6WeUC8.js +107 -0
- package/chunks/Fieldset.C0RzpI-h.js +81 -0
- package/chunks/Header.18sOO0Gf.js +370 -0
- package/chunks/{Icon.NSsVrYeq.js → Icon.CDLyB7Pv.js} +77 -79
- package/chunks/{Input.utils.Cnnzvuk4.js → Input.utils.CL1u4Ctq.js} +30 -28
- package/chunks/InputFile.Bki3bs3U.js +236 -0
- package/chunks/InputNumber.B43cqBH0.js +242 -0
- package/chunks/InputPassword.DcdMjsXr.js +121 -0
- package/chunks/InputSearch.CJm6ph8W.js +149 -0
- package/chunks/LinkButton.C6F-yuLL.js +139 -0
- package/chunks/MegaMenu.qttkjGbD.js +188 -0
- package/chunks/NavigationTabList.G_l0GiUa.js +67 -0
- package/chunks/{NavigationTabs.DspPFHPh.js → NavigationTabs.CQxlahX1.js} +13 -14
- package/chunks/Notification.Qzz88ngL.js +91 -0
- package/chunks/Popover.D7McfVaH.js +214 -0
- package/chunks/RadioGroup.B2VCD9x-.js +106 -0
- package/chunks/Select.B0uMOSSD.js +147 -0
- package/chunks/Slider.YTIktxxD.js +306 -0
- package/chunks/Stepper.BvPmbbqw.js +152 -0
- package/chunks/{SystemFeedback.CyGbUCzT.js → SystemFeedback.CjlARKki.js} +9 -9
- package/chunks/Tabs.CoO_lrhV.js +83 -0
- package/chunks/{Text.DGWeWF1y.js → Text.DpRtTpB4.js} +3 -3
- package/chunks/Textarea.lYiPXerd.js +181 -0
- package/chunks/Toast.L5HAuEOn.js +76 -0
- package/chunks/{arrow-clockwise.BefOjGPg.js → arrow-clockwise.C4iOgjOc.js} +1 -1
- package/chunks/{arrow-counterclockwise.C7Ov32BZ.js → arrow-counterclockwise.CgQAuBUe.js} +1 -1
- package/chunks/{circle-check-colored.Bye_GwLy.js → circle-check-colored.qP2s3vjI.js} +1 -1
- package/chunks/{diamond-exclamationmark-colored.WNKYwZ8q.js → diamond-exclamationmark-colored.CzYiaTZ0.js} +1 -1
- package/chunks/feather.l1E4nFBx.js +10 -0
- package/chunks/file-type-doc.B_RSSYbu.js +10 -0
- package/chunks/floating-ui.react.COTL3jH5.js +2984 -0
- package/chunks/helpers.CexwVao7.js +38 -0
- package/chunks/{index.CgTHIF3K.js → index.D-sRdssb.js} +1 -1
- package/chunks/{index.CEyLAtio.js → index.DL9mof6u.js} +2 -2
- package/chunks/{is-animation-disabled.CUl4N3LI.js → is-animation-disabled.B-V_68K-.js} +5 -5
- package/chunks/{map.CXgG1iGz.js → map.DNl7PF61.js} +1 -1
- package/chunks/moon.5yILPYXs.js +10 -0
- package/chunks/muscle.DbNjWasV.js +10 -0
- package/chunks/petrol.BGWwCsTw.js +10 -0
- package/chunks/sun.CY6ttzTL.js +10 -0
- package/chunks/{triangle-exclamationmark-colored.CbVC3Gzi.js → triangle-exclamationmark-colored.e93zvQ6Q.js} +1 -1
- package/chunks/upload.BogDfonx.js +10 -0
- package/chunks/useBreakpoint.1txsny17.js +45 -0
- package/chunks/variants.-R3_RCW8.js +10 -0
- package/chunks/weight.DUPu2UT0.js +10 -0
- package/combobox.CGEDlMo0.js +71 -0
- package/components/Button/Button.d.ts +5 -0
- package/components/Button/Button.utils.d.ts +4 -5
- package/components/CheckboxGroup/CheckboxGroup.d.ts +14 -1
- package/components/ChipGroup/ChipGroup.utils.d.ts +1 -3
- package/components/Combobox/Combobox.utils.d.ts +6 -6
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +17 -2
- package/components/Fieldset/Fieldset.d.ts +14 -1
- package/components/Input/Input.d.ts +13 -0
- package/components/Input/Input.utils.d.ts +2 -2
- package/components/InputFile/InputFile.d.ts +13 -0
- package/components/InputFile/InputFile.utils.d.ts +4 -2
- package/components/{InputStepper/InputStepper.d.ts → InputNumber/InputNumber.d.ts} +21 -8
- package/components/InputNumber/InputNumber.utils.d.ts +13 -0
- package/components/InputPassword/InputPassword.d.ts +13 -0
- package/components/InputPassword/InputPassword.utils.d.ts +2 -2
- package/components/InputSearch/InputSearch.d.ts +13 -0
- package/components/InputSearch/InputSearch.utils.d.ts +2 -2
- package/components/LinkButton/LinkButton.d.ts +5 -0
- package/components/LinkButton/LinkButton.utils.d.ts +4 -5
- package/components/RadioGroup/RadioGroup.d.ts +13 -0
- package/components/Scroller/Scroller.d.ts +6 -2
- package/components/Select/Select.d.ts +13 -0
- package/components/Select/Select.utils.d.ts +2 -2
- package/components/Slider/Slider.d.ts +13 -0
- package/components/Stepper/Step.d.ts +33 -0
- package/components/Stepper/Step.utils.d.ts +5 -0
- package/components/Stepper/Stepper.d.ts +56 -0
- package/components/Stepper/Stepper.test.d.ts +1 -0
- package/components/Stepper/Stepper.utils.d.ts +30 -0
- package/components/Stepper/Stepper.utils.test.d.ts +1 -0
- package/components/Textarea/Textarea.d.ts +13 -0
- package/components/Textarea/Textarea.utils.d.ts +2 -2
- package/customreactselect.BgYf8rKE.js +15 -0
- package/dialog.Bq-ZyzR8.js +9 -0
- package/drawer.DL5UzLWf.js +9 -0
- package/fieldset.BFLW2D9H.js +12 -0
- package/{filelist.BiKMKCyg.js → filelist.BG6SGVJ8.js} +23 -24
- package/{flag.72PONA83.js → flag.CE32qHPa.js} +3 -3
- package/{floatingactionbutton.B2YChsNU.js → floatingactionbutton.B5hJ2At2.js} +5 -5
- package/header.A77yIAH3.js +12 -0
- package/{heading.BXFBZhKv.js → heading.DHLpT4dc.js} +2 -2
- package/icon.vzkPwgjZ.js +9 -0
- package/index.d.ts +4 -2
- package/index.es.js +218 -206
- package/input.hBWqQr3X.js +190 -0
- package/inputfile.BSZuRujU.js +18 -0
- package/inputnumber.CA4JiUmq.js +17 -0
- package/inputnumber.d.ts +2 -0
- package/inputpassword.Cju_crMi.js +13 -0
- package/inputsearch.CU9AhVVv.js +15 -0
- package/{link.DbnvsD3j.js → link.DoiK003-.js} +5 -5
- package/linkbutton.CWco_B7v.js +12 -0
- package/{logo.C96KaG1P.js → logo.DprmD8HU.js} +3 -3
- package/{logo100years.BcB6_c-o.js → logo100years.DDzCrczW.js} +11 -11
- package/megamenu.BurL9MfF.js +12 -0
- package/navigationtablist.CkkLyHrM.js +10 -0
- package/navigationtabs.zhRZHjgs.js +9 -0
- package/notification.BiXdWNo7.js +10 -0
- package/{numberindicator.Ddf3ESi7.js → numberindicator.BdnPMogE.js} +2 -2
- package/{optioncheckbox.DqfXuPdi.js → optioncheckbox.nBVwGv6c.js} +3 -3
- package/package.json +42 -50
- package/partials/index.js +54 -48
- package/partials/lib/partials.d.ts +1 -1
- package/popover.79Voiadz.js +12 -0
- package/{radio.7_N_alaS.js → radio.DHUfSPai.js} +2 -2
- package/radiogroup.CwBh7u9L.js +11 -0
- package/scroller.IpfbFV8B.js +98 -0
- package/select.NHaEtX_u.js +14 -0
- package/{skiptocontent.BSCde5hT.js → skiptocontent.X4USTODk.js} +4 -4
- package/slider.jnNGEyBq.js +12 -0
- package/{spinner.BUjhjAvw.js → spinner.C9qCeq0R.js} +18 -18
- package/step.D5p7qppy.js +82 -0
- package/step.d.ts +6 -0
- package/stepper.DnMc4ex6.js +16 -0
- package/stepper.d.ts +2 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +12 -3
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +10 -2
- package/styles/scss/ds/lib/link-button.scss +11 -3
- package/{switch.D7BCfyyZ.js → switch.Bqdyzi2E.js} +5 -5
- package/systemfeedback.O7tj1juR.js +10 -0
- package/tablist.BFE6RAPD.js +209 -0
- package/{tabpane.CB-eudyw.js → tabpane.C4nsUlwc.js} +2 -2
- package/tabs.CsOxxQyQ.js +11 -0
- package/text.cLv2PhjQ.js +10 -0
- package/textarea.C9OAAjhG.js +14 -0
- package/{title.Bz_k5Vda.js → title.DuLPB-VK.js} +2 -2
- package/toast.OBI9qnAM.js +11 -0
- package/toastmanager.CgsA-1y_.js +89 -0
- package/tooltip.Cj3AvYgB.js +177 -0
- package/topbar.CAujTZAE.js +12 -0
- package/types/icon-types.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/mergeRefs.d.ts +5 -0
- package/utils/mergeRefs.test.d.ts +1 -0
- package/utils/useIsomorphicLayoutEffect.d.ts +2 -2
- package/accordion.HfUSDwQJ.js +0 -12
- package/actionbutton.kgd0E_xF.js +0 -12
- package/actionlink.CwC42RWc.js +0 -12
- package/assets/Accordion.BJb4TOG0.css +0 -1
- package/assets/Button.Dw8H5nFS.css +0 -1
- package/assets/Checkbox.BKHQN_tu.css +0 -1
- package/assets/CustomReactSelect.DGIItWIh.css +0 -1
- package/assets/Dialog.CGAg7bnN.css +0 -1
- package/assets/Drawer.VOvWQoEr.css +0 -1
- package/assets/Fieldset.CW9dBvAo.css +0 -1
- package/assets/InputFile.CCQxsulT.css +0 -1
- package/assets/InputPassword.124xVOiO.css +0 -1
- package/assets/InputSearch.Bkg-1urJ.css +0 -1
- package/assets/InputStepper.DvFJk1Mi.css +0 -1
- package/assets/LinkButton.xMvg_ojf.css +0 -1
- package/assets/Notification.BOuaA5GT.css +0 -1
- package/assets/Select.C1gWF32A.css +0 -1
- package/assets/Slider.Bidyhb-B.css +0 -1
- package/assets/Textarea.Dq4rH9Tg.css +0 -1
- package/assets/Toast.CJ1zhDIT.css +0 -1
- package/assets/buttonround.Cw9hnUan.css +0 -1
- package/assets/input.CUjGh-UM.css +0 -1
- package/assets/switch.Bc9KIyw9.css +0 -1
- package/breadcrumb.BsQm0kUD.js +0 -11
- package/button.Dyy6ajX6.js +0 -13
- package/buttonround.ChKWHzsv.js +0 -96
- package/checkbox.BNnp4ztM.js +0 -12
- package/checkboxgroup.BTVnKenc.js +0 -9
- package/chip.C7NstOHt.js +0 -12
- package/chipgroup.Zo1-IOCn.js +0 -210
- package/chunks/Accordion.CnqryAUu.js +0 -170
- package/chunks/Button.Cf1CKq8N.js +0 -142
- package/chunks/Checkbox.CiwriItT.js +0 -88
- package/chunks/CheckboxGroup.Cj68J6Ee.js +0 -72
- package/chunks/Dialog.Bv7k55He.js +0 -135
- package/chunks/Drawer.BVTvx276.js +0 -140
- package/chunks/Fieldset.D7cLR5ze.js +0 -74
- package/chunks/Header.um5MlziB.js +0 -377
- package/chunks/InputFile.bVWWdePn.js +0 -220
- package/chunks/InputPassword.Da3hEKTc.js +0 -136
- package/chunks/InputSearch.GOYqFCcZ.js +0 -174
- package/chunks/InputStepper.BuhPtfl-.js +0 -268
- package/chunks/LinkButton.59oNDwPU.js +0 -132
- package/chunks/MegaMenu._o3nNDAa.js +0 -192
- package/chunks/NavigationTabList.DuT7gzhj.js +0 -57
- package/chunks/Notification.Pts2oh0R.js +0 -92
- package/chunks/Popover.BRR8YZ-P.js +0 -228
- package/chunks/RadioGroup.DeTz3c19.js +0 -104
- package/chunks/Select.D2ehd4yN.js +0 -162
- package/chunks/Slider.84lkgq3W.js +0 -292
- package/chunks/Tabs.C8ADTzJ0.js +0 -83
- package/chunks/Textarea.Cw85sxHL.js +0 -163
- package/chunks/Toast.DG3WVvau.js +0 -76
- package/chunks/file-type-doc.DlovDOBh.js +0 -10
- package/chunks/floating-ui.dom.VgHc0h4l.js +0 -989
- package/chunks/floating-ui.react.DCyAzlZ4.js +0 -2011
- package/chunks/helpers.BbWkXTr3.js +0 -37
- package/chunks/petrol.Du6qAgp0.js +0 -10
- package/chunks/upload.ZImTAIgx.js +0 -10
- package/chunks/useBreakpoint.CMOR9ZOB.js +0 -44
- package/combobox.orZ3z8CB.js +0 -60
- package/components/InputStepper/InputStepper.utils.d.ts +0 -13
- package/customreactselect.Np-RpzvU.js +0 -14
- package/dialog.D4rcbW6A.js +0 -10
- package/drawer.BCCB3Rkj.js +0 -10
- package/fieldset.ZLs9IGpE.js +0 -11
- package/header.DUbn3BZt.js +0 -12
- package/icon.CHVAZr5T.js +0 -9
- package/input.DG20x6gh.js +0 -203
- package/inputfile.Dc56lQ4t.js +0 -17
- package/inputpassword.znFHRLsI.js +0 -13
- package/inputsearch.B1G6rfVk.js +0 -14
- package/inputstepper.d.ts +0 -2
- package/inputstepper.o6rdM_CW.js +0 -16
- package/linkbutton.DU8Ih8ZF.js +0 -12
- package/megamenu.CPH8EeFF.js +0 -12
- package/navigationtablist.C0iwsAad.js +0 -9
- package/navigationtabs.JjJtbuUe.js +0 -9
- package/notification.Ds_Q7ifk.js +0 -10
- package/popover.B72W0OvU.js +0 -12
- package/radiogroup.C_3IcNBq.js +0 -11
- package/scroller.CQxmQU6U.js +0 -123
- package/select.Ceyt-zvu.js +0 -13
- package/slider.Dq2dcziy.js +0 -11
- package/systemfeedback.CSdWOWuf.js +0 -10
- package/tablist.V7DBklhE.js +0 -256
- package/tabs.DQNLPAEN.js +0 -11
- package/text.ZOUuesnU.js +0 -10
- package/textarea.CixKeQBp.js +0 -13
- package/toast.D8QprMCa.js +0 -11
- package/toastmanager.BSVjYsg9.js +0 -116
- package/tooltip.CUCSRXd3.js +0 -191
- package/topbar.CVhJy-Br.js +0 -12
- /package/components/{InputStepper/InputStepper.test.d.ts → InputNumber/InputNumber.test.d.ts} +0 -0
- /package/components/{InputStepper/InputStepper.utils.test.d.ts → InputNumber/InputNumber.utils.test.d.ts} +0 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as b, jsxs as oe } from "react/jsx-runtime";
|
|
3
|
+
import { d as mt } from "./index.D-sRdssb.js";
|
|
4
|
+
import { c as v } from "./index.DL9mof6u.js";
|
|
5
|
+
import { forwardRef as bt, useState as tt, useRef as ft } from "react";
|
|
6
|
+
import { u as _t } from "./useBreakpoint.1txsny17.js";
|
|
7
|
+
import { DSInput as ht } from "../input.hBWqQr3X.js";
|
|
8
|
+
import { D as vt } from "./Popover.D7McfVaH.js";
|
|
9
|
+
import { g as lt } from "./helpers.CexwVao7.js";
|
|
10
|
+
import '../assets/Slider.DWLuIsNj.css';const Tt = "ds-slider_root_3zq13_1", xt = "ds-slider_hint_3zq13_4", gt = "ds-slider_label-wrapper_3zq13_4", kt = "ds-slider_label-hint-input-wrapper_3zq13_7", Nt = "ds-slider_number-input_3zq13_10", St = "ds-slider_label-wrapper--hidden_3zq13_20", Dt = "ds-slider_label_3zq13_4", yt = "ds-slider_label--disabled_3zq13_55", It = "ds-slider_number-input--small_3zq13_84", qt = "ds-slider_min-max-label-wrapper_3zq13_89", zt = "ds-slider_min-max-label-wrapper--disabled_3zq13_103", Mt = "ds-slider_min-label_3zq13_108", Lt = "ds-slider_max-label_3zq13_112", Wt = "ds-slider_slider-wrapper_3zq13_116", wt = "ds-slider_slider_3zq13_116", Vt = "ds-slider_value-tooltip_3zq13_135", Ct = "ds-slider_proxy-thumb_3zq13_139", Pt = "ds-slider_proxy-thumb--disabled_3zq13_217", $t = "ds-slider_custom-track_3zq13_246", At = "ds-slider_custom-track--progress_3zq13_251", Et = "ds-slider_custom-track--runnable_3zq13_263", Rt = "ds-slider_custom-track--disabled_3zq13_277", Ft = "ds-slider_tick-wrapper_3zq13_297", Bt = "ds-slider_tick_3zq13_297", Ht = "ds-slider_value-tooltip--visible_3zq13_356", Ot = "ds-slider_value-tooltip--disabled_3zq13_359", s = {
|
|
11
|
+
root: Tt,
|
|
12
|
+
hint: xt,
|
|
13
|
+
labelWrapper: gt,
|
|
14
|
+
labelHintInputWrapper: kt,
|
|
15
|
+
numberInput: Nt,
|
|
16
|
+
labelWrapperHidden: St,
|
|
17
|
+
label: Dt,
|
|
18
|
+
labelDisabled: yt,
|
|
19
|
+
numberInputSmall: It,
|
|
20
|
+
minMaxLabelWrapper: qt,
|
|
21
|
+
minMaxLabelWrapperDisabled: zt,
|
|
22
|
+
minLabel: Mt,
|
|
23
|
+
maxLabel: Lt,
|
|
24
|
+
sliderWrapper: Wt,
|
|
25
|
+
slider: wt,
|
|
26
|
+
valueTooltip: Vt,
|
|
27
|
+
proxyThumb: Ct,
|
|
28
|
+
proxyThumbDisabled: Pt,
|
|
29
|
+
customTrack: $t,
|
|
30
|
+
customTrackProgress: At,
|
|
31
|
+
customTrackRunnable: Et,
|
|
32
|
+
customTrackDisabled: Rt,
|
|
33
|
+
tickWrapper: Ft,
|
|
34
|
+
tick: Bt,
|
|
35
|
+
valueTooltipVisible: Ht,
|
|
36
|
+
valueTooltipDisabled: Ot
|
|
37
|
+
}, Kt = 11, st = 4, at = (p) => p.toString().length, jt = (p, r, e) => {
|
|
38
|
+
if (r === 0)
|
|
39
|
+
return !0;
|
|
40
|
+
const u = 1e-10, o = (p - e) / r;
|
|
41
|
+
return Math.abs(Math.round(o) - o) < u;
|
|
42
|
+
}, Ut = (p, r, e, u) => {
|
|
43
|
+
const o = parseFloat(r), f = e, n = Math.round((p - f) / o);
|
|
44
|
+
let c = f + n * o;
|
|
45
|
+
c = Math.min(Math.max(c, e), u);
|
|
46
|
+
const x = o.toString().split(".")[1]?.length || 0;
|
|
47
|
+
return parseFloat(c.toFixed(x));
|
|
48
|
+
}, Gt = (p, r, e) => {
|
|
49
|
+
const u = (p - r) / (e - r) * 100, o = `calc(-0.24 * ${u}px + 10px)`;
|
|
50
|
+
return `calc(${u}% + ${o})`;
|
|
51
|
+
}, Xt = ({
|
|
52
|
+
id: p,
|
|
53
|
+
label: r
|
|
54
|
+
}) => {
|
|
55
|
+
if (!p)
|
|
56
|
+
throw new Error(lt("DSSlider", 'A unique "id" prop is required. Please add a unique "id" prop to the DSSlider component.'));
|
|
57
|
+
if (!r)
|
|
58
|
+
throw new Error(lt("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}.`));
|
|
59
|
+
}, Jt = bt((p, r) => {
|
|
60
|
+
const e = mt.c(165);
|
|
61
|
+
let u, o, f, n, c, x, m, g, D, y, Y, Z, ee, te, le, se, ae, k;
|
|
62
|
+
e[0] !== p ? ({
|
|
63
|
+
id: n,
|
|
64
|
+
label: c,
|
|
65
|
+
className: u,
|
|
66
|
+
defaultValue: o,
|
|
67
|
+
disabled: Y,
|
|
68
|
+
hideLabel: Z,
|
|
69
|
+
hideNumberInput: ee,
|
|
70
|
+
hint: f,
|
|
71
|
+
isTooltipAlwaysVisible: te,
|
|
72
|
+
max: le,
|
|
73
|
+
min: se,
|
|
74
|
+
numberInputProps: x,
|
|
75
|
+
popoverContent: g,
|
|
76
|
+
popoverInfoButtonProps: D,
|
|
77
|
+
step: ae,
|
|
78
|
+
value: k,
|
|
79
|
+
onChange: m,
|
|
80
|
+
...y
|
|
81
|
+
} = p, e[0] = p, e[1] = u, e[2] = o, e[3] = f, e[4] = n, e[5] = c, e[6] = x, e[7] = m, e[8] = g, e[9] = D, e[10] = y, e[11] = Y, e[12] = Z, e[13] = ee, e[14] = te, e[15] = le, e[16] = se, e[17] = ae, e[18] = k) : (u = e[1], o = e[2], f = e[3], n = e[4], c = e[5], x = e[6], m = e[7], g = e[8], D = e[9], y = e[10], Y = e[11], Z = e[12], ee = e[13], te = e[14], le = e[15], se = e[16], ae = e[17], k = e[18]);
|
|
82
|
+
const a = Y === void 0 ? !1 : Y, it = Z === void 0 ? !1 : Z, I = ee === void 0 ? !1 : ee, Le = te === void 0 ? !1 : te, rt = le === void 0 ? 100 : le, ot = se === void 0 ? 0 : se, ie = ae === void 0 ? 1 : ae;
|
|
83
|
+
process.env.NODE_ENV !== "production" && Xt({
|
|
84
|
+
id: n,
|
|
85
|
+
label: c
|
|
86
|
+
});
|
|
87
|
+
const i = Number(rt), t = Number(ot), d = Number(ie), q = _t(it), z = `${n}-label`, We = `${n}-hint`, we = `${n}-number-input`;
|
|
88
|
+
let ne;
|
|
89
|
+
e[19] !== o || e[20] !== t || e[21] !== k ? (ne = k || o || t.toString() || "0", e[19] = o, e[20] = t, e[21] = k, e[22] = ne) : ne = e[22];
|
|
90
|
+
const [M, ce] = tt(ne), [T, de] = tt(k || o || t || 0), nt = ft(null);
|
|
91
|
+
let pe;
|
|
92
|
+
e[23] !== r ? (pe = (l) => {
|
|
93
|
+
nt.current = l, typeof r == "function" ? r(l) : r && (r.current = l);
|
|
94
|
+
}, e[23] = r, e[24] = pe) : pe = e[24];
|
|
95
|
+
const Ve = pe;
|
|
96
|
+
let ue;
|
|
97
|
+
e[25] !== x ? (ue = x || {}, e[25] = x, e[26] = ue) : ue = e[26];
|
|
98
|
+
const {
|
|
99
|
+
size: et,
|
|
100
|
+
suffix: Ce
|
|
101
|
+
} = ue, me = et === void 0 ? "medium" : et;
|
|
102
|
+
let be;
|
|
103
|
+
e[27] !== m ? (be = (l) => {
|
|
104
|
+
const _ = parseFloat(l.target.value);
|
|
105
|
+
de(_), ce(l.target.value), m && m(l);
|
|
106
|
+
}, e[27] = m, e[28] = be) : be = e[28];
|
|
107
|
+
const Pe = be;
|
|
108
|
+
let fe;
|
|
109
|
+
e[29] === Symbol.for("react.memo_cache_sentinel") ? (fe = (l) => {
|
|
110
|
+
const _ = l.target.value;
|
|
111
|
+
if (ce(_), /^-?\d+(\.\d+)?$/.test(_)) {
|
|
112
|
+
const h = parseFloat(_);
|
|
113
|
+
Number.isNaN(h) || de(h);
|
|
114
|
+
}
|
|
115
|
+
}, e[29] = fe) : fe = e[29];
|
|
116
|
+
const ct = fe;
|
|
117
|
+
let N;
|
|
118
|
+
if (e[30] !== M || e[31] !== m || e[32] !== i || e[33] !== t || e[34] !== ie) {
|
|
119
|
+
N = (_) => {
|
|
120
|
+
const re = parseFloat(M);
|
|
121
|
+
if (Number.isNaN(re)) {
|
|
122
|
+
l(_);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
let h = Math.min(Math.max(re, t), i);
|
|
126
|
+
jt(h, parseFloat(ie), t) || (h = Ut(h, ie, t, i)), ce(h.toString()), de(h), m && m(_);
|
|
127
|
+
};
|
|
128
|
+
const l = (_) => {
|
|
129
|
+
ce(t.toString()), de(t), m && m(_);
|
|
130
|
+
};
|
|
131
|
+
e[30] = M, e[31] = m, e[32] = i, e[33] = t, e[34] = ie, e[35] = N;
|
|
132
|
+
} else
|
|
133
|
+
N = e[35];
|
|
134
|
+
const L = (d === 0 ? !1 : (i - t) / d <= Kt) && (i - t) / d || 0;
|
|
135
|
+
let _e;
|
|
136
|
+
if (e[36] !== i || e[37] !== t || e[38] !== d || e[39] !== L) {
|
|
137
|
+
let l;
|
|
138
|
+
e[41] !== i || e[42] !== t || e[43] !== d ? (l = (_, re) => {
|
|
139
|
+
const h = t + re * d, ut = Gt(h, t, i);
|
|
140
|
+
return /* @__PURE__ */ b("span", { className: s.tick, style: {
|
|
141
|
+
left: ut
|
|
142
|
+
} }, h);
|
|
143
|
+
}, e[41] = i, e[42] = t, e[43] = d, e[44] = l) : l = e[44], _e = Array.from({
|
|
144
|
+
length: L + 1
|
|
145
|
+
}, l), e[36] = i, e[37] = t, e[38] = d, e[39] = L, e[40] = _e;
|
|
146
|
+
} else
|
|
147
|
+
_e = e[40];
|
|
148
|
+
const $e = _e;
|
|
149
|
+
let he;
|
|
150
|
+
e[45] !== i || e[46] !== t || e[47] !== T ? (he = () => {
|
|
151
|
+
if (t === i)
|
|
152
|
+
throw new Error("Min and max values cannot be the same.");
|
|
153
|
+
const l = (T - t) / (i - t) * 100;
|
|
154
|
+
return Math.max(0, Math.min(l, 100));
|
|
155
|
+
}, e[45] = i, e[46] = t, e[47] = T, e[48] = he) : he = e[48];
|
|
156
|
+
const S = he;
|
|
157
|
+
let ve;
|
|
158
|
+
e[49] !== S ? (ve = () => {
|
|
159
|
+
const l = S();
|
|
160
|
+
return l < 50 ? `calc(${l}% + 4px)` : `calc(${l}% - 4px)`;
|
|
161
|
+
}, e[49] = S, e[50] = ve) : ve = e[50];
|
|
162
|
+
const dt = ve;
|
|
163
|
+
let Te;
|
|
164
|
+
e[51] !== S ? (Te = () => {
|
|
165
|
+
const l = 100 - S();
|
|
166
|
+
return l < 50 ? `calc(${l}% + 4px)` : `calc(${l}% - 4px)`;
|
|
167
|
+
}, e[51] = S, e[52] = Te) : Te = e[52];
|
|
168
|
+
const pt = Te;
|
|
169
|
+
let xe;
|
|
170
|
+
e[53] !== u ? (xe = v(s.slider, u), e[53] = u, e[54] = xe) : xe = e[54];
|
|
171
|
+
const Ae = xe;
|
|
172
|
+
let ge;
|
|
173
|
+
e[55] !== a ? (ge = v(s.label, {
|
|
174
|
+
[s.labelDisabled]: a
|
|
175
|
+
}), e[55] = a, e[56] = ge) : ge = e[56];
|
|
176
|
+
const Ee = ge;
|
|
177
|
+
let ke;
|
|
178
|
+
e[57] !== q ? (ke = v(s.labelWrapper, {
|
|
179
|
+
[s.labelWrapperHidden]: q
|
|
180
|
+
}), e[57] = q, e[58] = ke) : ke = e[58];
|
|
181
|
+
const Re = ke, Fe = me === "small";
|
|
182
|
+
let Ne;
|
|
183
|
+
e[59] !== Fe ? (Ne = v(s.numberInput, {
|
|
184
|
+
[s.numberInputSmall]: Fe
|
|
185
|
+
}), e[59] = Fe, e[60] = Ne) : Ne = e[60];
|
|
186
|
+
const Be = Ne;
|
|
187
|
+
let Se;
|
|
188
|
+
e[61] !== a ? (Se = v(s.minMaxLabelWrapper, {
|
|
189
|
+
[s.minMaxLabelWrapperDisabled]: a
|
|
190
|
+
}), e[61] = a, e[62] = Se) : Se = e[62];
|
|
191
|
+
const He = Se;
|
|
192
|
+
let De;
|
|
193
|
+
e[63] !== a ? (De = v(s.customTrack, s.customTrackProgress, {
|
|
194
|
+
[s.customTrackDisabled]: a
|
|
195
|
+
}), e[63] = a, e[64] = De) : De = e[64];
|
|
196
|
+
const Oe = De;
|
|
197
|
+
let ye;
|
|
198
|
+
e[65] !== a ? (ye = v(s.customTrack, s.customTrackRunnable, {
|
|
199
|
+
[s.customTrackDisabled]: a
|
|
200
|
+
}), e[65] = a, e[66] = ye) : ye = e[66];
|
|
201
|
+
const Ke = ye;
|
|
202
|
+
let Ie;
|
|
203
|
+
e[67] !== a ? (Ie = v(s.proxyThumb, {
|
|
204
|
+
[s.proxyThumbDisabled]: a
|
|
205
|
+
}), e[67] = a, e[68] = Ie) : Ie = e[68];
|
|
206
|
+
const je = Ie;
|
|
207
|
+
let qe;
|
|
208
|
+
e[69] !== a || e[70] !== Le ? (qe = v(s.valueTooltip, {
|
|
209
|
+
[s.valueTooltipVisible]: Le,
|
|
210
|
+
[s.valueTooltipDisabled]: a
|
|
211
|
+
}), e[69] = a, e[70] = Le, e[71] = qe) : qe = e[71];
|
|
212
|
+
const Ue = qe;
|
|
213
|
+
let W;
|
|
214
|
+
e[72] !== n || e[73] !== c || e[74] !== Ee || e[75] !== z ? (W = /* @__PURE__ */ b("label", { className: Ee, htmlFor: n, id: z, children: c }), e[72] = n, e[73] = c, e[74] = Ee, e[75] = z, e[76] = W) : W = e[76];
|
|
215
|
+
let w;
|
|
216
|
+
e[77] !== q || e[78] !== g || e[79] !== D ? (w = g && !q && /* @__PURE__ */ b(vt, { placement: "top", defaultAnchorButtonProps: D, children: g }), e[77] = q, e[78] = g, e[79] = D, e[80] = w) : w = e[80];
|
|
217
|
+
let V;
|
|
218
|
+
e[81] !== Re || e[82] !== W || e[83] !== w ? (V = /* @__PURE__ */ oe("div", { className: Re, children: [
|
|
219
|
+
W,
|
|
220
|
+
w
|
|
221
|
+
] }), e[81] = Re, e[82] = W, e[83] = w, e[84] = V) : V = e[84];
|
|
222
|
+
let C;
|
|
223
|
+
e[85] !== f || e[86] !== We ? (C = f && /* @__PURE__ */ b("div", { className: s.hint, id: We, children: f }), e[85] = f, e[86] = We, e[87] = C) : C = e[87];
|
|
224
|
+
let P;
|
|
225
|
+
e[88] !== a || e[89] !== N || e[90] !== I || e[91] !== we || e[92] !== M || e[93] !== c || e[94] !== Be || e[95] !== me || e[96] !== Ce || e[97] !== i || e[98] !== t || e[99] !== d ? (P = !I && /* @__PURE__ */ b(ht, { id: we, className: Be, type: "number", min: t, max: i, step: d, inputMode: "decimal", autoComplete: "off", disabled: a, hideLabel: !0, value: M, onChange: ct, onBlur: N, onKeyDown: (l) => {
|
|
226
|
+
l.key === "Enter" && (l.preventDefault(), N(l));
|
|
227
|
+
}, label: c, size: me, suffix: Ce }), e[88] = a, e[89] = N, e[90] = I, e[91] = we, e[92] = M, e[93] = c, e[94] = Be, e[95] = me, e[96] = Ce, e[97] = i, e[98] = t, e[99] = d, e[100] = P) : P = e[100];
|
|
228
|
+
let $;
|
|
229
|
+
e[101] !== V || e[102] !== C || e[103] !== P ? ($ = /* @__PURE__ */ oe("div", { className: s.labelHintInputWrapper, children: [
|
|
230
|
+
V,
|
|
231
|
+
C,
|
|
232
|
+
P
|
|
233
|
+
] }), e[101] = V, e[102] = C, e[103] = P, e[104] = $) : $ = e[104];
|
|
234
|
+
const Ge = at(t) < st;
|
|
235
|
+
let A;
|
|
236
|
+
e[105] !== Ge ? (A = v({
|
|
237
|
+
[s.minLabel]: Ge
|
|
238
|
+
}), e[105] = Ge, e[106] = A) : A = e[106];
|
|
239
|
+
let E;
|
|
240
|
+
e[107] !== t || e[108] !== A ? (E = /* @__PURE__ */ b("div", { className: A, children: t }), e[107] = t, e[108] = A, e[109] = E) : E = e[109];
|
|
241
|
+
const Xe = at(i) < st;
|
|
242
|
+
let R;
|
|
243
|
+
e[110] !== Xe ? (R = v({
|
|
244
|
+
[s.maxLabel]: Xe
|
|
245
|
+
}), e[110] = Xe, e[111] = R) : R = e[111];
|
|
246
|
+
let F;
|
|
247
|
+
e[112] !== i || e[113] !== R ? (F = /* @__PURE__ */ b("div", { className: R, children: i }), e[112] = i, e[113] = R, e[114] = F) : F = e[114];
|
|
248
|
+
let B;
|
|
249
|
+
e[115] !== He || e[116] !== E || e[117] !== F ? (B = /* @__PURE__ */ oe("div", { className: He, children: [
|
|
250
|
+
E,
|
|
251
|
+
F
|
|
252
|
+
] }), e[115] = He, e[116] = E, e[117] = F, e[118] = B) : B = e[118];
|
|
253
|
+
const Je = `${S()}`;
|
|
254
|
+
let ze;
|
|
255
|
+
e[119] !== Je ? (ze = {
|
|
256
|
+
"--ds-input-slider-thumb-position": Je
|
|
257
|
+
}, e[119] = Je, e[120] = ze) : ze = e[120];
|
|
258
|
+
const Qe = ze, Ye = dt();
|
|
259
|
+
let H;
|
|
260
|
+
e[121] !== Ye ? (H = {
|
|
261
|
+
width: Ye
|
|
262
|
+
}, e[121] = Ye, e[122] = H) : H = e[122];
|
|
263
|
+
let O;
|
|
264
|
+
e[123] !== Oe || e[124] !== H ? (O = /* @__PURE__ */ b("div", { className: Oe, style: H }), e[123] = Oe, e[124] = H, e[125] = O) : O = e[125];
|
|
265
|
+
const Ze = pt();
|
|
266
|
+
let K;
|
|
267
|
+
e[126] !== Ze ? (K = {
|
|
268
|
+
width: Ze
|
|
269
|
+
}, e[126] = Ze, e[127] = K) : K = e[127];
|
|
270
|
+
let j;
|
|
271
|
+
e[128] !== Ke || e[129] !== K ? (j = /* @__PURE__ */ b("div", { className: Ke, style: K }), e[128] = Ke, e[129] = K, e[130] = j) : j = e[130];
|
|
272
|
+
let U;
|
|
273
|
+
e[131] !== a || e[132] !== Ve || e[133] !== Pe || e[134] !== n || e[135] !== i || e[136] !== t || e[137] !== d || e[138] !== y || e[139] !== Ae || e[140] !== z || e[141] !== T ? (U = /* @__PURE__ */ b("input", { ...y, id: n, type: "range", ref: Ve, className: Ae, min: t, max: i, step: d, value: T, disabled: a, "aria-labelledby": z, onChange: Pe }), e[131] = a, e[132] = Ve, e[133] = Pe, e[134] = n, e[135] = i, e[136] = t, e[137] = d, e[138] = y, e[139] = Ae, e[140] = z, e[141] = T, e[142] = U) : U = e[142];
|
|
274
|
+
let G;
|
|
275
|
+
e[143] !== L || e[144] !== $e ? (G = L > 0 && /* @__PURE__ */ b("div", { className: s.tickWrapper, children: $e }), e[143] = L, e[144] = $e, e[145] = G) : G = e[145];
|
|
276
|
+
let X;
|
|
277
|
+
e[146] !== je ? (X = /* @__PURE__ */ b("div", { className: je }), e[146] = je, e[147] = X) : X = e[147];
|
|
278
|
+
let J;
|
|
279
|
+
e[148] !== a || e[149] !== I || e[150] !== T || e[151] !== Ue ? (J = I && /* @__PURE__ */ b("div", { className: Ue, "aria-disabled": a, children: T }), e[148] = a, e[149] = I, e[150] = T, e[151] = Ue, e[152] = J) : J = e[152];
|
|
280
|
+
let Q;
|
|
281
|
+
e[153] !== Qe || e[154] !== O || e[155] !== j || e[156] !== U || e[157] !== G || e[158] !== X || e[159] !== J ? (Q = /* @__PURE__ */ oe("div", { className: s.sliderWrapper, style: Qe, children: [
|
|
282
|
+
O,
|
|
283
|
+
j,
|
|
284
|
+
U,
|
|
285
|
+
G,
|
|
286
|
+
X,
|
|
287
|
+
J
|
|
288
|
+
] }), e[153] = Qe, e[154] = O, e[155] = j, e[156] = U, e[157] = G, e[158] = X, e[159] = J, e[160] = Q) : Q = e[160];
|
|
289
|
+
let Me;
|
|
290
|
+
return e[161] !== $ || e[162] !== B || e[163] !== Q ? (Me = /* @__PURE__ */ oe("div", { className: s.root, children: [
|
|
291
|
+
$,
|
|
292
|
+
B,
|
|
293
|
+
Q
|
|
294
|
+
] }), e[161] = $, e[162] = B, e[163] = Q, e[164] = Me) : Me = e[164], Me;
|
|
295
|
+
});
|
|
296
|
+
Jt.displayName = "DSSlider";
|
|
297
|
+
export {
|
|
298
|
+
Jt as D,
|
|
299
|
+
st as L,
|
|
300
|
+
Kt as M,
|
|
301
|
+
Gt as a,
|
|
302
|
+
at as g,
|
|
303
|
+
jt as i,
|
|
304
|
+
Ut as s,
|
|
305
|
+
Xt as v
|
|
306
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import { c as f } from "./index.DL9mof6u.js";
|
|
4
|
+
import { useCallback as V, useEffect as W, useRef as S } from "react";
|
|
5
|
+
import { g as i, r as j } from "./helpers.CexwVao7.js";
|
|
6
|
+
import { i as q } from "./is-animation-disabled.B-V_68K-.js";
|
|
7
|
+
import { t as H } from "./translate.nuU7uChI.js";
|
|
8
|
+
import { u as L } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
9
|
+
import "./index.D-sRdssb.js";
|
|
10
|
+
import { g as w } from "./AriaLiveRegions.utils.CybNIBSa.js";
|
|
11
|
+
import { DSScroller as F } from "../scroller.IpfbFV8B.js";
|
|
12
|
+
import { StepperStep as G } from "../step.D5p7qppy.js";
|
|
13
|
+
import '../assets/Stepper.tXJl15yL.css';const ge = ["prev", "next"], N = 48, J = "ds-stepper_root_1d1si_1", K = "ds-stepper_root--vertical_1d1si_12", Q = "ds-stepper_scroller--centered_1d1si_17", U = "ds-stepper_scroller-button_1d1si_21", X = "ds-stepper_list_1d1si_26", Y = "ds-stepper_list--center_1d1si_35", Z = "ds-stepper_list--vertical_1d1si_38", a = {
|
|
14
|
+
root: J,
|
|
15
|
+
rootVertical: K,
|
|
16
|
+
scrollerCentered: Q,
|
|
17
|
+
scrollerButton: U,
|
|
18
|
+
list: X,
|
|
19
|
+
listCenter: Y,
|
|
20
|
+
listVertical: Z
|
|
21
|
+
}, Te = ["left", "center"], _e = ["horizontal", "vertical"], ee = ({
|
|
22
|
+
aria: t,
|
|
23
|
+
steps: n
|
|
24
|
+
}) => {
|
|
25
|
+
if (!t || typeof t != "object" || Object.keys(t).length === 0 || !t["aria-label"] && !t["aria-labelledby"] || t["aria-label"]?.trim() === "" && t["aria-labelledby"]?.trim() === "")
|
|
26
|
+
throw new Error(i("DSStepper", 'A valid "aria-label" or "aria-labelledby" property is required. Ensure the "aria" prop is a non-empty object and includes either "aria-label" or "aria-labelledby" with a non-empty string value.'));
|
|
27
|
+
if (!Array.isArray(n))
|
|
28
|
+
throw new Error(i("DSStepper", j("steps", "DSStepper")));
|
|
29
|
+
if (n.length < 2)
|
|
30
|
+
throw new Error(i("DSStepper", "The steps array must contain at least two steps."));
|
|
31
|
+
n.forEach((e, o) => {
|
|
32
|
+
if (!e.label || e.label.trim() === "")
|
|
33
|
+
throw new Error(i("DSStepper", `The step at index ${o} is missing a non-empty label. Each step requires a valid label string.`));
|
|
34
|
+
if (e?.state === "current" && e?.disabled)
|
|
35
|
+
throw new Error(i("DSStepper", `The step at index ${o} has a current state but is disabled. Please remove the disabled property if this step is the current step.`));
|
|
36
|
+
});
|
|
37
|
+
}, te = () => {
|
|
38
|
+
w() || console.warn(i("DSStepper", "For accessible announcements place <DSAriaLiveRegions /> once close to <body>. Announcements will be skipped otherwise."));
|
|
39
|
+
}, re = {
|
|
40
|
+
current: "Current step",
|
|
41
|
+
completed: "completed",
|
|
42
|
+
step: "Step",
|
|
43
|
+
of: "of"
|
|
44
|
+
}, oe = {
|
|
45
|
+
current: "Aktueller Schritt",
|
|
46
|
+
completed: "abgeschlossen",
|
|
47
|
+
step: "Schritt",
|
|
48
|
+
of: "von"
|
|
49
|
+
}, se = {
|
|
50
|
+
en: re,
|
|
51
|
+
de: oe
|
|
52
|
+
}, ne = (t) => t.find((e) => e.state === "current") || t.findLast((e) => e.state) || t[0], I = (t) => t.findIndex((n) => n.state === "current"), le = (t, n) => !!t && t === "completed" && !n, Ee = ({
|
|
53
|
+
aria: t,
|
|
54
|
+
className: n,
|
|
55
|
+
steps: e,
|
|
56
|
+
orientation: o = "horizontal",
|
|
57
|
+
alignment: h = "left",
|
|
58
|
+
lang: x = "en",
|
|
59
|
+
translations: m,
|
|
60
|
+
onStepChange: A,
|
|
61
|
+
...y
|
|
62
|
+
}) => {
|
|
63
|
+
process.env.NODE_ENV !== "production" && (ee({
|
|
64
|
+
aria: t,
|
|
65
|
+
steps: e
|
|
66
|
+
}), te());
|
|
67
|
+
const p = H(m || se[x]), b = V(() => {
|
|
68
|
+
const s = w();
|
|
69
|
+
if (s) {
|
|
70
|
+
const r = ne(e);
|
|
71
|
+
s.innerText = `${p("current")}: ${e.indexOf(r) + 1} ${p("of")} ${e.length} - ${r.label}`, setTimeout(() => {
|
|
72
|
+
s.innerText = "";
|
|
73
|
+
}, 350);
|
|
74
|
+
}
|
|
75
|
+
}, [e, m, p]);
|
|
76
|
+
W(() => {
|
|
77
|
+
b();
|
|
78
|
+
}, [e, b]);
|
|
79
|
+
const P = (s, r) => {
|
|
80
|
+
const {
|
|
81
|
+
state: l,
|
|
82
|
+
disabled: c
|
|
83
|
+
} = e[s];
|
|
84
|
+
le(l, c) && (e[s].onClick?.(r), A(s));
|
|
85
|
+
}, O = f(a.root, {
|
|
86
|
+
[a.rootVertical]: o === "vertical"
|
|
87
|
+
}, n), B = f(a.list, {
|
|
88
|
+
[a.listVertical]: o === "vertical",
|
|
89
|
+
[a.listCenter]: o === "horizontal" && h === "center"
|
|
90
|
+
}), k = f({
|
|
91
|
+
[a.scrollerCentered]: o === "horizontal" && h === "center"
|
|
92
|
+
}), g = S([]), T = /* @__PURE__ */ d("ol", { className: B, children: e.map((s, r) => /* @__PURE__ */ d(G, { step: s, index: r, stepsCount: e.length, t: p, orientation: o, onStepClick: (l) => P(r, l), buttonRef: (l) => {
|
|
93
|
+
g.current[r] = l;
|
|
94
|
+
} }, r)) }), _ = S(null), E = S(!1);
|
|
95
|
+
L(() => {
|
|
96
|
+
if (o !== "horizontal")
|
|
97
|
+
return;
|
|
98
|
+
const s = [
|
|
99
|
+
"16px 'STIHL Contraface Digital Text Regular'",
|
|
100
|
+
// text-medium - label default
|
|
101
|
+
"14px 'STIHL Contraface Digital Text Bold'",
|
|
102
|
+
// text-small-bold - number
|
|
103
|
+
"16px 'STIHL Contraface Digital Text Bold'",
|
|
104
|
+
// text-medium-bold - current label
|
|
105
|
+
"14px 'STIHL Contraface Digital Text Regular'"
|
|
106
|
+
// utility-small - number/hint base (regular variant for hint)
|
|
107
|
+
];
|
|
108
|
+
Promise.all(s.map((r) => document.fonts.load(r))).then(() => {
|
|
109
|
+
E.current = !0, I(e) !== -1 && C("instant");
|
|
110
|
+
}).catch((r) => {
|
|
111
|
+
throw new Error(i("DSStepper", `The component requires the fonts to be loaded: ${r}`));
|
|
112
|
+
});
|
|
113
|
+
}, [o]);
|
|
114
|
+
const C = (s = "smooth") => {
|
|
115
|
+
if (o !== "horizontal")
|
|
116
|
+
return;
|
|
117
|
+
const r = I(e);
|
|
118
|
+
if (r === -1)
|
|
119
|
+
return;
|
|
120
|
+
const l = g.current[r], c = _.current;
|
|
121
|
+
if (!l || !c)
|
|
122
|
+
return;
|
|
123
|
+
const R = l.getBoundingClientRect(), v = c.getBoundingClientRect();
|
|
124
|
+
if (R.left - N >= v.left && R.right + N <= v.right)
|
|
125
|
+
return;
|
|
126
|
+
const M = l.offsetLeft, $ = l.offsetWidth, D = c.clientWidth;
|
|
127
|
+
let u = M - Math.max(0, (D - $) / 2);
|
|
128
|
+
const z = c.scrollWidth - D;
|
|
129
|
+
u = Math.min(Math.max(0, u), z), c.scrollTo({
|
|
130
|
+
left: u,
|
|
131
|
+
behavior: q() ? "instant" : s
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
return L(() => {
|
|
135
|
+
E.current && C("smooth");
|
|
136
|
+
}, [e, o]), /* @__PURE__ */ d("nav", { className: O, ...y, ...t, children: o === "horizontal" ? /* @__PURE__ */ d(F, { ref: _, className: a.scroller, scrollerClassName: k, scrollerButtonClassName: a.scrollerButton, children: T }) : T });
|
|
137
|
+
};
|
|
138
|
+
export {
|
|
139
|
+
Ee as D,
|
|
140
|
+
ge as S,
|
|
141
|
+
N as a,
|
|
142
|
+
Te as b,
|
|
143
|
+
_e as c,
|
|
144
|
+
te as d,
|
|
145
|
+
re as e,
|
|
146
|
+
oe as f,
|
|
147
|
+
se as g,
|
|
148
|
+
ne as h,
|
|
149
|
+
I as i,
|
|
150
|
+
le as j,
|
|
151
|
+
ee as v
|
|
152
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as f, jsx as S } from "react/jsx-runtime";
|
|
3
|
-
import { d as _ } from "./index.
|
|
4
|
-
import { c as p } from "./index.
|
|
3
|
+
import { d as _ } from "./index.D-sRdssb.js";
|
|
4
|
+
import { c as p } from "./index.DL9mof6u.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { D as E } from "./Icon.
|
|
7
|
-
import '../assets/SystemFeedback.
|
|
8
|
-
root:
|
|
9
|
-
}, h = ["success", "error", "warning"],
|
|
6
|
+
import { D as E } from "./Icon.CDLyB7Pv.js";
|
|
7
|
+
import '../assets/SystemFeedback.PKzqnXUe.css';const k = "ds-system-feedback_root_1dkn4_1", x = {
|
|
8
|
+
root: k
|
|
9
|
+
}, h = ["success", "error", "warning"], D = {
|
|
10
10
|
success: "circle-check-colored",
|
|
11
11
|
error: "diamond-exclamationmark-colored",
|
|
12
12
|
warning: "triangle-exclamationmark-colored"
|
|
@@ -21,8 +21,8 @@ import '../assets/SystemFeedback.RcrPepSZ.css';const x = "ds-system-feedback_roo
|
|
|
21
21
|
...r
|
|
22
22
|
} = n, e[0] = n, e[1] = s, e[2] = t, e[3] = o, e[4] = r, e[5] = c) : (s = e[1], t = e[2], o = e[3], r = e[4], c = e[5]);
|
|
23
23
|
let l;
|
|
24
|
-
e[6] !== s ? (l = p(
|
|
25
|
-
const m = l, d =
|
|
24
|
+
e[6] !== s ? (l = p(x.root, s), e[6] = s, e[7] = l) : l = e[7];
|
|
25
|
+
const m = l, d = D[c];
|
|
26
26
|
let a;
|
|
27
27
|
e[8] !== d ? (a = /* @__PURE__ */ S(E, { name: d, "aria-hidden": "true" }), e[8] = d, e[9] = a) : a = e[9];
|
|
28
28
|
let i;
|
|
@@ -34,5 +34,5 @@ import '../assets/SystemFeedback.RcrPepSZ.css';const x = "ds-system-feedback_roo
|
|
|
34
34
|
export {
|
|
35
35
|
y as D,
|
|
36
36
|
h as S,
|
|
37
|
-
|
|
37
|
+
D as a
|
|
38
38
|
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as N, jsxs as C } from "react/jsx-runtime";
|
|
3
|
+
import { d as L } from "./index.D-sRdssb.js";
|
|
4
|
+
import { useState as M } from "react";
|
|
5
|
+
import { TabList as $ } from "../tablist.BFE6RAPD.js";
|
|
6
|
+
import { TabPane as j } from "../tabpane.C4nsUlwc.js";
|
|
7
|
+
import { g as B } from "./TabPane.utils.DG16Y2uD.js";
|
|
8
|
+
import { g, r as O } from "./helpers.CexwVao7.js";
|
|
9
|
+
const J = ["left", "center"], K = ["prev", "next"], _ = ({
|
|
10
|
+
id: b,
|
|
11
|
+
tabs: e,
|
|
12
|
+
defaultSelectedTabIndex: s = 0
|
|
13
|
+
}) => {
|
|
14
|
+
if (!b)
|
|
15
|
+
throw new Error(g("DSTabs", 'A unique "id" prop is required. Please add a unique "id" prop to the DSTabs component.'));
|
|
16
|
+
if (Array.isArray(e)) {
|
|
17
|
+
if (e.length === 0)
|
|
18
|
+
throw new Error(g("DSTabs", "The tabs array must not be empty."));
|
|
19
|
+
} else throw new Error(g("DSTabs", O("tabs", "DSTabs")));
|
|
20
|
+
if (s < 0 || s >= e.length)
|
|
21
|
+
throw new Error(g("DSTabs", `Invalid defaultSelectedTabIndex: ${s}. It must be between 0 and ${e.length - 1}.`));
|
|
22
|
+
}, Q = (b) => {
|
|
23
|
+
const e = L.c(37);
|
|
24
|
+
let s, l, n, r, d, m, f, t, a;
|
|
25
|
+
e[0] !== b ? ({
|
|
26
|
+
id: t,
|
|
27
|
+
tabs: a,
|
|
28
|
+
activeTabIndex: s,
|
|
29
|
+
alignment: m,
|
|
30
|
+
className: l,
|
|
31
|
+
classNameTabPane: n,
|
|
32
|
+
defaultSelectedTabIndex: f,
|
|
33
|
+
onTabChange: r,
|
|
34
|
+
...d
|
|
35
|
+
} = b, e[0] = b, e[1] = s, e[2] = l, e[3] = n, e[4] = r, e[5] = d, e[6] = m, e[7] = f, e[8] = t, e[9] = a) : (s = e[1], l = e[2], n = e[3], r = e[4], d = e[5], m = e[6], f = e[7], t = e[8], a = e[9]);
|
|
36
|
+
const h = m === void 0 ? "left" : m, x = f === void 0 ? 0 : f;
|
|
37
|
+
process.env.NODE_ENV !== "production" && _({
|
|
38
|
+
id: t,
|
|
39
|
+
tabs: a,
|
|
40
|
+
defaultSelectedTabIndex: x
|
|
41
|
+
});
|
|
42
|
+
const [A, P] = M(s || x), p = s !== void 0, o = p ? s : A;
|
|
43
|
+
let S;
|
|
44
|
+
e[10] !== p || e[11] !== r ? (S = (i) => {
|
|
45
|
+
p || P(i), r?.(i);
|
|
46
|
+
}, e[10] = p, e[11] = r, e[12] = S) : S = e[12];
|
|
47
|
+
const D = S;
|
|
48
|
+
let u;
|
|
49
|
+
e[13] !== h || e[14] !== D || e[15] !== r || e[16] !== o || e[17] !== t || e[18] !== a ? (u = {
|
|
50
|
+
id: t,
|
|
51
|
+
tabs: a,
|
|
52
|
+
setSelectedTabIndex: D,
|
|
53
|
+
selectedTabIndex: o,
|
|
54
|
+
alignment: h,
|
|
55
|
+
onTabChange: r
|
|
56
|
+
}, e[13] = h, e[14] = D, e[15] = r, e[16] = o, e[17] = t, e[18] = a, e[19] = u) : u = e[19];
|
|
57
|
+
const v = u;
|
|
58
|
+
let c;
|
|
59
|
+
e[20] !== v ? (c = /* @__PURE__ */ N($, { ...v }), e[20] = v, e[21] = c) : c = e[21];
|
|
60
|
+
let T;
|
|
61
|
+
if (e[22] !== n || e[23] !== o || e[24] !== t || e[25] !== a) {
|
|
62
|
+
let i;
|
|
63
|
+
e[27] !== n || e[28] !== o || e[29] !== t ? (i = (q, w) => {
|
|
64
|
+
const {
|
|
65
|
+
id: E,
|
|
66
|
+
content: y
|
|
67
|
+
} = q;
|
|
68
|
+
return /* @__PURE__ */ N(j, { id: E, content: y, index: w, selectedTabIndex: o, tabListId: t, className: n }, B(t, E, w));
|
|
69
|
+
}, e[27] = n, e[28] = o, e[29] = t, e[30] = i) : i = e[30], T = a.map(i), e[22] = n, e[23] = o, e[24] = t, e[25] = a, e[26] = T;
|
|
70
|
+
} else
|
|
71
|
+
T = e[26];
|
|
72
|
+
let I;
|
|
73
|
+
return e[31] !== l || e[32] !== d || e[33] !== c || e[34] !== T || e[35] !== t ? (I = /* @__PURE__ */ C("div", { className: l, id: t, ...d, children: [
|
|
74
|
+
c,
|
|
75
|
+
T
|
|
76
|
+
] }), e[31] = l, e[32] = d, e[33] = c, e[34] = T, e[35] = t, e[36] = I) : I = e[36], I;
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
Q as D,
|
|
80
|
+
J as T,
|
|
81
|
+
K as a,
|
|
82
|
+
_ as v
|
|
83
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as $ } from "react/jsx-runtime";
|
|
3
|
-
import { d as z } from "./index.
|
|
4
|
-
import { c as C } from "./index.
|
|
3
|
+
import { d as z } from "./index.D-sRdssb.js";
|
|
4
|
+
import { c as C } from "./index.DL9mof6u.js";
|
|
5
5
|
import { useRef as G, useEffect as H } from "react";
|
|
6
|
-
import { a as v, g as y } from "./helpers.
|
|
6
|
+
import { a as v, g as y } from "./helpers.CexwVao7.js";
|
|
7
7
|
import '../assets/Text.Dgpj61UP.css';const I = "ds-text_root_1mo26_6", P = "ds-text_root--large_1mo26_15", R = "ds-text_root--large-bold_1mo26_26", W = "ds-text_root--medium_1mo26_37", j = "ds-text_root--medium-bold_1mo26_48", q = "ds-text_root--small_1mo26_59", O = "ds-text_root--small-bold_1mo26_70", V = "ds-text_root--x-small_1mo26_81", Z = "ds-text_root--x-small-bold_1mo26_92", F = "ds-text_root--xx-small_1mo26_103", J = "ds-text_root--theme-dark_1mo26_197", o = {
|
|
8
8
|
root: I,
|
|
9
9
|
rootLarge: P,
|