@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
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as b, jsxs as Se } from "react/jsx-runtime";
|
|
3
|
-
import { d as nt } from "./index.CgTHIF3K.js";
|
|
4
|
-
import { c as v } from "./index.CEyLAtio.js";
|
|
5
|
-
import { forwardRef as ot, useState as Xe, useRef as ct } from "react";
|
|
6
|
-
import { u as dt } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import { DSInput as ut } from "../input.DG20x6gh.js";
|
|
8
|
-
import { g as Je } from "./helpers.BbWkXTr3.js";
|
|
9
|
-
import '../assets/Slider.Bidyhb-B.css';const pt = "ds-slider_root_13uvg_1", mt = "ds-slider_hint_13uvg_13", bt = "ds-slider_label_13uvg_13", ft = "ds-slider_number-input_13uvg_16", _t = "ds-slider_label-hint-input-wrapper_13uvg_20", ht = "ds-slider_label--hidden_13uvg_40", vt = "ds-slider_label--disabled_13uvg_53", gt = "ds-slider_number-input--small_13uvg_82", Tt = "ds-slider_min-max-label-wrapper_13uvg_87", xt = "ds-slider_min-max-label-wrapper--disabled_13uvg_101", kt = "ds-slider_min-label_13uvg_106", Nt = "ds-slider_max-label_13uvg_110", St = "ds-slider_slider-wrapper_13uvg_114", yt = "ds-slider_slider_13uvg_114", Dt = "ds-slider_value-tooltip_13uvg_138", It = "ds-slider_proxy-thumb_13uvg_142", Mt = "ds-slider_proxy-thumb--disabled_13uvg_209", Lt = "ds-slider_custom-track_13uvg_238", Vt = "ds-slider_custom-track--progress_13uvg_243", wt = "ds-slider_custom-track--runnable_13uvg_255", Ct = "ds-slider_custom-track--disabled_13uvg_269", Wt = "ds-slider_tick-wrapper_13uvg_289", $t = "ds-slider_tick_13uvg_289", Pt = "ds-slider_value-tooltip--visible_13uvg_348", At = "ds-slider_value-tooltip--disabled_13uvg_351", a = {
|
|
10
|
-
root: pt,
|
|
11
|
-
hint: mt,
|
|
12
|
-
label: bt,
|
|
13
|
-
numberInput: ft,
|
|
14
|
-
labelHintInputWrapper: _t,
|
|
15
|
-
labelHidden: ht,
|
|
16
|
-
labelDisabled: vt,
|
|
17
|
-
numberInputSmall: gt,
|
|
18
|
-
minMaxLabelWrapper: Tt,
|
|
19
|
-
minMaxLabelWrapperDisabled: xt,
|
|
20
|
-
minLabel: kt,
|
|
21
|
-
maxLabel: Nt,
|
|
22
|
-
sliderWrapper: St,
|
|
23
|
-
slider: yt,
|
|
24
|
-
valueTooltip: Dt,
|
|
25
|
-
proxyThumb: It,
|
|
26
|
-
proxyThumbDisabled: Mt,
|
|
27
|
-
customTrack: Lt,
|
|
28
|
-
customTrackProgress: Vt,
|
|
29
|
-
customTrackRunnable: wt,
|
|
30
|
-
customTrackDisabled: Ct,
|
|
31
|
-
tickWrapper: Wt,
|
|
32
|
-
tick: $t,
|
|
33
|
-
valueTooltipVisible: Pt,
|
|
34
|
-
valueTooltipDisabled: At
|
|
35
|
-
}, Et = 11, Qe = 4, Ye = (p) => p.toString().length, Rt = (p, r, e) => {
|
|
36
|
-
if (r === 0)
|
|
37
|
-
return !0;
|
|
38
|
-
const m = 1e-10, n = (p - e) / r;
|
|
39
|
-
return Math.abs(Math.round(n) - n) < m;
|
|
40
|
-
}, Ft = (p, r, e, m) => {
|
|
41
|
-
var o;
|
|
42
|
-
const n = parseFloat(r), f = e, c = Math.round((p - f) / n);
|
|
43
|
-
let d = f + c * n;
|
|
44
|
-
d = Math.min(Math.max(d, e), m);
|
|
45
|
-
const T = ((o = n.toString().split(".")[1]) == null ? void 0 : o.length) || 0;
|
|
46
|
-
return parseFloat(d.toFixed(T));
|
|
47
|
-
}, Ht = (p, r, e) => {
|
|
48
|
-
const m = (p - r) / (e - r) * 100, n = `calc(-0.24 * ${m}px + 10px)`;
|
|
49
|
-
return `calc(${m}% + ${n})`;
|
|
50
|
-
}, Bt = ({
|
|
51
|
-
id: p,
|
|
52
|
-
label: r
|
|
53
|
-
}) => {
|
|
54
|
-
if (!p)
|
|
55
|
-
throw new Error(Je("DSSlider", 'A unique "id" prop is required. Please add a unique "id" prop to the DSSlider component.'));
|
|
56
|
-
if (!r)
|
|
57
|
-
throw new Error(Je("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}.`));
|
|
58
|
-
}, qt = ot((p, r) => {
|
|
59
|
-
const e = nt.c(154);
|
|
60
|
-
let m, n, f, c, d, T, o, S, U, G, X, J, Q, Y, Z, x;
|
|
61
|
-
e[0] !== p ? ({
|
|
62
|
-
id: c,
|
|
63
|
-
label: d,
|
|
64
|
-
className: m,
|
|
65
|
-
defaultValue: n,
|
|
66
|
-
disabled: U,
|
|
67
|
-
hideLabel: G,
|
|
68
|
-
hideNumberInput: X,
|
|
69
|
-
hint: f,
|
|
70
|
-
isTooltipAlwaysVisible: J,
|
|
71
|
-
max: Q,
|
|
72
|
-
min: Y,
|
|
73
|
-
numberInputProps: T,
|
|
74
|
-
step: Z,
|
|
75
|
-
value: x,
|
|
76
|
-
onChange: o,
|
|
77
|
-
...S
|
|
78
|
-
} = p, e[0] = p, e[1] = m, e[2] = n, e[3] = f, e[4] = c, e[5] = d, e[6] = T, e[7] = o, e[8] = S, e[9] = U, e[10] = G, e[11] = X, e[12] = J, e[13] = Q, e[14] = Y, e[15] = Z, e[16] = x) : (m = e[1], n = e[2], f = e[3], c = e[4], d = e[5], T = e[6], o = e[7], S = e[8], U = e[9], G = e[10], X = e[11], J = e[12], Q = e[13], Y = e[14], Z = e[15], x = e[16]);
|
|
79
|
-
const l = U === void 0 ? !1 : U, Ze = G === void 0 ? !1 : G, y = X === void 0 ? !1 : X, ye = J === void 0 ? !1 : J, et = Q === void 0 ? 100 : Q, tt = Y === void 0 ? 0 : Y, ee = Z === void 0 ? 1 : Z;
|
|
80
|
-
process.env.NODE_ENV !== "production" && Bt({
|
|
81
|
-
id: c,
|
|
82
|
-
label: d
|
|
83
|
-
});
|
|
84
|
-
const i = Number(et), t = Number(tt), u = Number(ee), De = dt(Ze), D = `${c}-label`, Ie = `${c}-hint`, Me = `${c}-number-input`;
|
|
85
|
-
let se;
|
|
86
|
-
e[17] !== n || e[18] !== t || e[19] !== x ? (se = x || n || t.toString() || "0", e[17] = n, e[18] = t, e[19] = x, e[20] = se) : se = e[20];
|
|
87
|
-
const [I, le] = Xe(se), [g, ae] = Xe(x || n || t || 0), st = ct(null);
|
|
88
|
-
let ie;
|
|
89
|
-
e[21] !== r ? (ie = (s) => {
|
|
90
|
-
st.current = s, typeof r == "function" ? r(s) : r && (r.current = s);
|
|
91
|
-
}, e[21] = r, e[22] = ie) : ie = e[22];
|
|
92
|
-
const Le = ie;
|
|
93
|
-
let re;
|
|
94
|
-
e[23] !== T ? (re = T || {}, e[23] = T, e[24] = re) : re = e[24];
|
|
95
|
-
const {
|
|
96
|
-
size: Ge,
|
|
97
|
-
suffix: Ve
|
|
98
|
-
} = re, ne = Ge === void 0 ? "medium" : Ge;
|
|
99
|
-
let oe;
|
|
100
|
-
e[25] !== o ? (oe = (s) => {
|
|
101
|
-
const _ = parseFloat(s.target.value);
|
|
102
|
-
ae(_), le(s.target.value), o && o(s);
|
|
103
|
-
}, e[25] = o, e[26] = oe) : oe = e[26];
|
|
104
|
-
const we = oe;
|
|
105
|
-
let ce;
|
|
106
|
-
e[27] === Symbol.for("react.memo_cache_sentinel") ? (ce = (s) => {
|
|
107
|
-
const _ = s.target.value;
|
|
108
|
-
if (le(_), /^-?\d+(\.\d+)?$/.test(_)) {
|
|
109
|
-
const h = parseFloat(_);
|
|
110
|
-
Number.isNaN(h) || ae(h);
|
|
111
|
-
}
|
|
112
|
-
}, e[27] = ce) : ce = e[27];
|
|
113
|
-
const lt = ce;
|
|
114
|
-
let k;
|
|
115
|
-
if (e[28] !== I || e[29] !== o || e[30] !== i || e[31] !== t || e[32] !== ee) {
|
|
116
|
-
k = (_) => {
|
|
117
|
-
const te = parseFloat(I);
|
|
118
|
-
if (Number.isNaN(te)) {
|
|
119
|
-
s(_);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
let h = Math.min(Math.max(te, t), i);
|
|
123
|
-
Rt(h, parseFloat(ee), t) || (h = Ft(h, ee, t, i)), le(h.toString()), ae(h), o && o(_);
|
|
124
|
-
};
|
|
125
|
-
const s = (_) => {
|
|
126
|
-
le(t.toString()), ae(t), o && o(_);
|
|
127
|
-
};
|
|
128
|
-
e[28] = I, e[29] = o, e[30] = i, e[31] = t, e[32] = ee, e[33] = k;
|
|
129
|
-
} else
|
|
130
|
-
k = e[33];
|
|
131
|
-
const M = (u === 0 ? !1 : (i - t) / u <= Et) && (i - t) / u || 0;
|
|
132
|
-
let de;
|
|
133
|
-
if (e[34] !== i || e[35] !== t || e[36] !== u || e[37] !== M) {
|
|
134
|
-
let s;
|
|
135
|
-
e[39] !== i || e[40] !== t || e[41] !== u ? (s = (_, te) => {
|
|
136
|
-
const h = t + te * u, rt = Ht(h, t, i);
|
|
137
|
-
return /* @__PURE__ */ b("span", { className: a.tick, style: {
|
|
138
|
-
left: rt
|
|
139
|
-
} }, h);
|
|
140
|
-
}, e[39] = i, e[40] = t, e[41] = u, e[42] = s) : s = e[42], de = Array.from({
|
|
141
|
-
length: M + 1
|
|
142
|
-
}, s), e[34] = i, e[35] = t, e[36] = u, e[37] = M, e[38] = de;
|
|
143
|
-
} else
|
|
144
|
-
de = e[38];
|
|
145
|
-
const Ce = de;
|
|
146
|
-
let ue;
|
|
147
|
-
e[43] !== i || e[44] !== t || e[45] !== g ? (ue = () => {
|
|
148
|
-
if (t === i)
|
|
149
|
-
throw new Error("Min and max values cannot be the same.");
|
|
150
|
-
const s = (g - t) / (i - t) * 100;
|
|
151
|
-
return Math.max(0, Math.min(s, 100));
|
|
152
|
-
}, e[43] = i, e[44] = t, e[45] = g, e[46] = ue) : ue = e[46];
|
|
153
|
-
const N = ue;
|
|
154
|
-
let pe;
|
|
155
|
-
e[47] !== N ? (pe = () => {
|
|
156
|
-
const s = N();
|
|
157
|
-
return s < 50 ? `calc(${s}% + 4px)` : `calc(${s}% - 4px)`;
|
|
158
|
-
}, e[47] = N, e[48] = pe) : pe = e[48];
|
|
159
|
-
const at = pe;
|
|
160
|
-
let me;
|
|
161
|
-
e[49] !== N ? (me = () => {
|
|
162
|
-
const s = 100 - N();
|
|
163
|
-
return s < 50 ? `calc(${s}% + 4px)` : `calc(${s}% - 4px)`;
|
|
164
|
-
}, e[49] = N, e[50] = me) : me = e[50];
|
|
165
|
-
const it = me;
|
|
166
|
-
let be;
|
|
167
|
-
e[51] !== m ? (be = v(a.slider, m), e[51] = m, e[52] = be) : be = e[52];
|
|
168
|
-
const We = be;
|
|
169
|
-
let fe;
|
|
170
|
-
e[53] !== l || e[54] !== De ? (fe = v(a.label, {
|
|
171
|
-
[a.labelHidden]: De,
|
|
172
|
-
[a.labelDisabled]: l
|
|
173
|
-
}), e[53] = l, e[54] = De, e[55] = fe) : fe = e[55];
|
|
174
|
-
const $e = fe, Pe = ne === "small";
|
|
175
|
-
let _e;
|
|
176
|
-
e[56] !== Pe ? (_e = v(a.numberInput, {
|
|
177
|
-
[a.numberInputSmall]: Pe
|
|
178
|
-
}), e[56] = Pe, e[57] = _e) : _e = e[57];
|
|
179
|
-
const Ae = _e;
|
|
180
|
-
let he;
|
|
181
|
-
e[58] !== l ? (he = v(a.minMaxLabelWrapper, {
|
|
182
|
-
[a.minMaxLabelWrapperDisabled]: l
|
|
183
|
-
}), e[58] = l, e[59] = he) : he = e[59];
|
|
184
|
-
const Ee = he;
|
|
185
|
-
let ve;
|
|
186
|
-
e[60] !== l ? (ve = v(a.customTrack, a.customTrackProgress, {
|
|
187
|
-
[a.customTrackDisabled]: l
|
|
188
|
-
}), e[60] = l, e[61] = ve) : ve = e[61];
|
|
189
|
-
const Re = ve;
|
|
190
|
-
let ge;
|
|
191
|
-
e[62] !== l ? (ge = v(a.customTrack, a.customTrackRunnable, {
|
|
192
|
-
[a.customTrackDisabled]: l
|
|
193
|
-
}), e[62] = l, e[63] = ge) : ge = e[63];
|
|
194
|
-
const Fe = ge;
|
|
195
|
-
let Te;
|
|
196
|
-
e[64] !== l ? (Te = v(a.proxyThumb, {
|
|
197
|
-
[a.proxyThumbDisabled]: l
|
|
198
|
-
}), e[64] = l, e[65] = Te) : Te = e[65];
|
|
199
|
-
const He = Te;
|
|
200
|
-
let xe;
|
|
201
|
-
e[66] !== l || e[67] !== ye ? (xe = v(a.valueTooltip, {
|
|
202
|
-
[a.valueTooltipVisible]: ye,
|
|
203
|
-
[a.valueTooltipDisabled]: l
|
|
204
|
-
}), e[66] = l, e[67] = ye, e[68] = xe) : xe = e[68];
|
|
205
|
-
const Be = xe;
|
|
206
|
-
let L;
|
|
207
|
-
e[69] !== c || e[70] !== d || e[71] !== $e || e[72] !== D ? (L = /* @__PURE__ */ b("label", { className: $e, htmlFor: c, id: D, children: d }), e[69] = c, e[70] = d, e[71] = $e, e[72] = D, e[73] = L) : L = e[73];
|
|
208
|
-
let V;
|
|
209
|
-
e[74] !== f || e[75] !== Ie ? (V = f && /* @__PURE__ */ b("div", { className: a.hint, id: Ie, children: f }), e[74] = f, e[75] = Ie, e[76] = V) : V = e[76];
|
|
210
|
-
let w;
|
|
211
|
-
e[77] !== l || e[78] !== k || e[79] !== y || e[80] !== Me || e[81] !== I || e[82] !== d || e[83] !== Ae || e[84] !== ne || e[85] !== Ve || e[86] !== i || e[87] !== t || e[88] !== u ? (w = !y && /* @__PURE__ */ b(ut, { id: Me, className: Ae, type: "number", min: t, max: i, step: u, inputMode: "decimal", autoComplete: "off", disabled: l, hideLabel: !0, value: I, onChange: lt, onBlur: k, onKeyDown: (s) => {
|
|
212
|
-
s.key === "Enter" && (s.preventDefault(), k(s));
|
|
213
|
-
}, label: d, size: ne, suffix: Ve }), e[77] = l, e[78] = k, e[79] = y, e[80] = Me, e[81] = I, e[82] = d, e[83] = Ae, e[84] = ne, e[85] = Ve, e[86] = i, e[87] = t, e[88] = u, e[89] = w) : w = e[89];
|
|
214
|
-
let C;
|
|
215
|
-
e[90] !== L || e[91] !== V || e[92] !== w ? (C = /* @__PURE__ */ Se("div", { className: a.labelHintInputWrapper, children: [
|
|
216
|
-
L,
|
|
217
|
-
V,
|
|
218
|
-
w
|
|
219
|
-
] }), e[90] = L, e[91] = V, e[92] = w, e[93] = C) : C = e[93];
|
|
220
|
-
const qe = Ye(t) < Qe;
|
|
221
|
-
let W;
|
|
222
|
-
e[94] !== qe ? (W = v({
|
|
223
|
-
[a.minLabel]: qe
|
|
224
|
-
}), e[94] = qe, e[95] = W) : W = e[95];
|
|
225
|
-
let $;
|
|
226
|
-
e[96] !== t || e[97] !== W ? ($ = /* @__PURE__ */ b("div", { className: W, children: t }), e[96] = t, e[97] = W, e[98] = $) : $ = e[98];
|
|
227
|
-
const Oe = Ye(i) < Qe;
|
|
228
|
-
let P;
|
|
229
|
-
e[99] !== Oe ? (P = v({
|
|
230
|
-
[a.maxLabel]: Oe
|
|
231
|
-
}), e[99] = Oe, e[100] = P) : P = e[100];
|
|
232
|
-
let A;
|
|
233
|
-
e[101] !== i || e[102] !== P ? (A = /* @__PURE__ */ b("div", { className: P, children: i }), e[101] = i, e[102] = P, e[103] = A) : A = e[103];
|
|
234
|
-
let E;
|
|
235
|
-
e[104] !== Ee || e[105] !== $ || e[106] !== A ? (E = /* @__PURE__ */ Se("div", { className: Ee, children: [
|
|
236
|
-
$,
|
|
237
|
-
A
|
|
238
|
-
] }), e[104] = Ee, e[105] = $, e[106] = A, e[107] = E) : E = e[107];
|
|
239
|
-
const ze = `${N()}`;
|
|
240
|
-
let ke;
|
|
241
|
-
e[108] !== ze ? (ke = {
|
|
242
|
-
"--ds-input-slider-thumb-position": ze
|
|
243
|
-
}, e[108] = ze, e[109] = ke) : ke = e[109];
|
|
244
|
-
const Ke = ke, je = at();
|
|
245
|
-
let R;
|
|
246
|
-
e[110] !== je ? (R = {
|
|
247
|
-
width: je
|
|
248
|
-
}, e[110] = je, e[111] = R) : R = e[111];
|
|
249
|
-
let F;
|
|
250
|
-
e[112] !== Re || e[113] !== R ? (F = /* @__PURE__ */ b("div", { className: Re, style: R }), e[112] = Re, e[113] = R, e[114] = F) : F = e[114];
|
|
251
|
-
const Ue = it();
|
|
252
|
-
let H;
|
|
253
|
-
e[115] !== Ue ? (H = {
|
|
254
|
-
width: Ue
|
|
255
|
-
}, e[115] = Ue, e[116] = H) : H = e[116];
|
|
256
|
-
let B;
|
|
257
|
-
e[117] !== Fe || e[118] !== H ? (B = /* @__PURE__ */ b("div", { className: Fe, style: H }), e[117] = Fe, e[118] = H, e[119] = B) : B = e[119];
|
|
258
|
-
let q;
|
|
259
|
-
e[120] !== l || e[121] !== Le || e[122] !== we || e[123] !== c || e[124] !== i || e[125] !== t || e[126] !== u || e[127] !== S || e[128] !== We || e[129] !== D || e[130] !== g ? (q = /* @__PURE__ */ b("input", { ...S, id: c, type: "range", ref: Le, className: We, min: t, max: i, step: u, value: g, disabled: l, "aria-labelledby": D, onChange: we }), e[120] = l, e[121] = Le, e[122] = we, e[123] = c, e[124] = i, e[125] = t, e[126] = u, e[127] = S, e[128] = We, e[129] = D, e[130] = g, e[131] = q) : q = e[131];
|
|
260
|
-
let O;
|
|
261
|
-
e[132] !== M || e[133] !== Ce ? (O = M > 0 && /* @__PURE__ */ b("div", { className: a.tickWrapper, children: Ce }), e[132] = M, e[133] = Ce, e[134] = O) : O = e[134];
|
|
262
|
-
let z;
|
|
263
|
-
e[135] !== He ? (z = /* @__PURE__ */ b("div", { className: He }), e[135] = He, e[136] = z) : z = e[136];
|
|
264
|
-
let K;
|
|
265
|
-
e[137] !== l || e[138] !== y || e[139] !== g || e[140] !== Be ? (K = y && /* @__PURE__ */ b("div", { className: Be, "aria-disabled": l, children: g }), e[137] = l, e[138] = y, e[139] = g, e[140] = Be, e[141] = K) : K = e[141];
|
|
266
|
-
let j;
|
|
267
|
-
e[142] !== Ke || e[143] !== F || e[144] !== B || e[145] !== q || e[146] !== O || e[147] !== z || e[148] !== K ? (j = /* @__PURE__ */ Se("div", { className: a.sliderWrapper, style: Ke, children: [
|
|
268
|
-
F,
|
|
269
|
-
B,
|
|
270
|
-
q,
|
|
271
|
-
O,
|
|
272
|
-
z,
|
|
273
|
-
K
|
|
274
|
-
] }), e[142] = Ke, e[143] = F, e[144] = B, e[145] = q, e[146] = O, e[147] = z, e[148] = K, e[149] = j) : j = e[149];
|
|
275
|
-
let Ne;
|
|
276
|
-
return e[150] !== C || e[151] !== E || e[152] !== j ? (Ne = /* @__PURE__ */ Se("div", { className: a.root, children: [
|
|
277
|
-
C,
|
|
278
|
-
E,
|
|
279
|
-
j
|
|
280
|
-
] }), e[150] = C, e[151] = E, e[152] = j, e[153] = Ne) : Ne = e[153], Ne;
|
|
281
|
-
});
|
|
282
|
-
qt.displayName = "DSSlider";
|
|
283
|
-
export {
|
|
284
|
-
qt as D,
|
|
285
|
-
Qe as L,
|
|
286
|
-
Et as M,
|
|
287
|
-
Ht as a,
|
|
288
|
-
Ye as g,
|
|
289
|
-
Rt as i,
|
|
290
|
-
Ft as s,
|
|
291
|
-
Bt as v
|
|
292
|
-
};
|
package/chunks/Tabs.C8ADTzJ0.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as N, jsxs as L } from "react/jsx-runtime";
|
|
3
|
-
import { d as M } from "./index.CgTHIF3K.js";
|
|
4
|
-
import { useState as $ } from "react";
|
|
5
|
-
import { TabList as j } from "../tablist.V7DBklhE.js";
|
|
6
|
-
import { TabPane as B } from "../tabpane.CB-eudyw.js";
|
|
7
|
-
import { g as C } from "./TabPane.utils.DG16Y2uD.js";
|
|
8
|
-
import { g, r as O } from "./helpers.BbWkXTr3.js";
|
|
9
|
-
const J = ["left", "center"], K = ["prev", "next"], _ = ({
|
|
10
|
-
id: T,
|
|
11
|
-
tabs: e,
|
|
12
|
-
defaultSelectedTabIndex: r = 0
|
|
13
|
-
}) => {
|
|
14
|
-
if (!T)
|
|
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 (r < 0 || r >= e.length)
|
|
21
|
-
throw new Error(g("DSTabs", `Invalid defaultSelectedTabIndex: ${r}. It must be between 0 and ${e.length - 1}.`));
|
|
22
|
-
}, Q = (T) => {
|
|
23
|
-
const e = M.c(37);
|
|
24
|
-
let r, l, n, s, d, f, b, t, a;
|
|
25
|
-
e[0] !== T ? ({
|
|
26
|
-
id: t,
|
|
27
|
-
tabs: a,
|
|
28
|
-
activeTabIndex: r,
|
|
29
|
-
alignment: f,
|
|
30
|
-
className: l,
|
|
31
|
-
classNameTabPane: n,
|
|
32
|
-
defaultSelectedTabIndex: b,
|
|
33
|
-
onTabChange: s,
|
|
34
|
-
...d
|
|
35
|
-
} = T, e[0] = T, e[1] = r, e[2] = l, e[3] = n, e[4] = s, e[5] = d, e[6] = f, e[7] = b, e[8] = t, e[9] = a) : (r = e[1], l = e[2], n = e[3], s = e[4], d = e[5], f = e[6], b = e[7], t = e[8], a = e[9]);
|
|
36
|
-
const h = f === void 0 ? "left" : f, x = b === void 0 ? 0 : b;
|
|
37
|
-
process.env.NODE_ENV !== "production" && _({
|
|
38
|
-
id: t,
|
|
39
|
-
tabs: a,
|
|
40
|
-
defaultSelectedTabIndex: x
|
|
41
|
-
});
|
|
42
|
-
const [A, P] = $(r || x), p = r !== void 0, o = p ? r : A;
|
|
43
|
-
let S;
|
|
44
|
-
e[10] !== p || e[11] !== s ? (S = (i) => {
|
|
45
|
-
p || P(i), s == null || s(i);
|
|
46
|
-
}, e[10] = p, e[11] = s, e[12] = S) : S = e[12];
|
|
47
|
-
const D = S;
|
|
48
|
-
let u;
|
|
49
|
-
e[13] !== h || e[14] !== D || e[15] !== s || 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: s
|
|
56
|
-
}, e[13] = h, e[14] = D, e[15] = s, 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(j, { ...v }), e[20] = v, e[21] = c) : c = e[21];
|
|
60
|
-
let m;
|
|
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(B, { id: E, content: y, index: w, selectedTabIndex: o, tabListId: t, className: n }, C(t, E, w));
|
|
69
|
-
}, e[27] = n, e[28] = o, e[29] = t, e[30] = i) : i = e[30], m = a.map(i), e[22] = n, e[23] = o, e[24] = t, e[25] = a, e[26] = m;
|
|
70
|
-
} else
|
|
71
|
-
m = e[26];
|
|
72
|
-
let I;
|
|
73
|
-
return e[31] !== l || e[32] !== d || e[33] !== c || e[34] !== m || e[35] !== t ? (I = /* @__PURE__ */ L("div", { className: l, id: t, ...d, children: [
|
|
74
|
-
c,
|
|
75
|
-
m
|
|
76
|
-
] }), e[31] = l, e[32] = d, e[33] = c, e[34] = m, 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,163 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as d, jsx as h, Fragment as le } from "react/jsx-runtime";
|
|
3
|
-
import { c as A } from "./index.CEyLAtio.js";
|
|
4
|
-
import { forwardRef as ie, useState as i, useRef as ce, useEffect as m } from "react";
|
|
5
|
-
import { g as q, p as z } from "./helpers.BbWkXTr3.js";
|
|
6
|
-
import { u as de } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import "./index.CgTHIF3K.js";
|
|
8
|
-
import { Asterisk as ue } from "../asterisk.CR60hx8S.js";
|
|
9
|
-
import { D as fe } from "./SystemFeedback.CyGbUCzT.js";
|
|
10
|
-
import '../assets/Textarea.Dq4rH9Tg.css';const pe = "ds-textarea_textarea_1s8pw_1", be = "ds-textarea_textarea--small_1s8pw_9", _e = "ds-textarea_textarea--invalid_1s8pw_121", he = "ds-textarea_textarea--resize-auto_1s8pw_145", me = "ds-textarea_root_1s8pw_155", xe = "ds-textarea_hint_1s8pw_164", we = "ds-textarea_label_1s8pw_164", ve = "ds-textarea_label--hidden_1s8pw_303", Ce = "ds-textarea_label--disabled_1s8pw_316", Se = "ds-textarea_feedback_1s8pw_336", Ae = "ds-textarea_char-count_1s8pw_341", De = "ds-textarea_char-count-announcer_1s8pw_357", a = {
|
|
11
|
-
textarea: pe,
|
|
12
|
-
textareaSmall: be,
|
|
13
|
-
textareaInvalid: _e,
|
|
14
|
-
textareaResizeAuto: he,
|
|
15
|
-
root: me,
|
|
16
|
-
hint: xe,
|
|
17
|
-
label: we,
|
|
18
|
-
labelHidden: ve,
|
|
19
|
-
labelDisabled: Ce,
|
|
20
|
-
feedback: Se,
|
|
21
|
-
charCount: Ae,
|
|
22
|
-
charCountAnnouncer: De
|
|
23
|
-
}, Ve = ["medium", "small"], Ie = ({
|
|
24
|
-
id: r,
|
|
25
|
-
label: u
|
|
26
|
-
}) => {
|
|
27
|
-
if (!r)
|
|
28
|
-
throw new Error(q("DSTextarea", 'A unique "id" prop is required. Please add a unique "id" prop to the DSTextarea component.'));
|
|
29
|
-
if (!u)
|
|
30
|
-
throw new Error(q("DSTextarea", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSTextarea component. If you don't want to display a label, set hideLabel={true}.`));
|
|
31
|
-
}, Te = ie(({
|
|
32
|
-
id: r,
|
|
33
|
-
label: u,
|
|
34
|
-
charsLimitText: M = "Character limit reached",
|
|
35
|
-
charsRemainingText: O = "Characters remaining:",
|
|
36
|
-
className: F,
|
|
37
|
-
defaultValue: X,
|
|
38
|
-
disabled: D = !1,
|
|
39
|
-
hint: x,
|
|
40
|
-
hideLabel: Z = !1,
|
|
41
|
-
invalid: s = !1,
|
|
42
|
-
maxLength: e,
|
|
43
|
-
readonly: I = !1,
|
|
44
|
-
required: T = !1,
|
|
45
|
-
resize: f = "vertical",
|
|
46
|
-
size: G = "medium",
|
|
47
|
-
systemFeedback: n,
|
|
48
|
-
value: w,
|
|
49
|
-
wrapperClassName: J,
|
|
50
|
-
onChange: y,
|
|
51
|
-
onInput: R,
|
|
52
|
-
...K
|
|
53
|
-
}, p) => {
|
|
54
|
-
process.env.NODE_ENV !== "production" && Ie({
|
|
55
|
-
id: r,
|
|
56
|
-
label: u
|
|
57
|
-
});
|
|
58
|
-
const [Q, N] = i(X || ""), [l, E] = i(0), [U, g] = i(0), [W, $] = i("off"), [k, v] = i(n), [C, S] = i(s), H = w !== void 0, b = H ? w : Q, o = ce(null), Y = (t) => {
|
|
59
|
-
o.current = t, typeof p == "function" ? p(t) : p && (p.current = t);
|
|
60
|
-
}, L = de(Z);
|
|
61
|
-
m(() => {
|
|
62
|
-
if (!e || e <= 0)
|
|
63
|
-
return;
|
|
64
|
-
l >= e * 0.8 ? $("polite") : $("off");
|
|
65
|
-
const t = setTimeout(() => {
|
|
66
|
-
g(e - l || 0);
|
|
67
|
-
}, 1e3);
|
|
68
|
-
return () => clearTimeout(t);
|
|
69
|
-
}, [l]), m(() => {
|
|
70
|
-
N(b || ""), c(), e && e > 0 && (E(b.toString().length || 0), g(e - b.toString().length || 0));
|
|
71
|
-
}, [w]), m(() => {
|
|
72
|
-
s && n ? (v(n), S(s)) : !s && e && e >= 0 && l >= e ? (S(!0), v(M)) : (v(n), S(s));
|
|
73
|
-
}, [s, C, n, l]), m(() => {
|
|
74
|
-
if (f === "auto")
|
|
75
|
-
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
76
|
-
}, [f, o.current]);
|
|
77
|
-
const ee = A(a.root, J), te = A(a.textarea, F, {
|
|
78
|
-
// small textarea
|
|
79
|
-
[a.textareaSmall]: G === "small",
|
|
80
|
-
// invalid state
|
|
81
|
-
[a.textareaInvalid]: C,
|
|
82
|
-
// resize handling
|
|
83
|
-
[a.textareaResizeAuto]: f === "auto"
|
|
84
|
-
}), ae = A(a.label, {
|
|
85
|
-
// hide label only visually to keep them available for assistive technologies
|
|
86
|
-
[a.labelHidden]: L,
|
|
87
|
-
[a.labelDisabled]: D
|
|
88
|
-
}), V = `${r}-label`, P = `${r}-feedback`, j = `${r}-hint`, B = `${r}-char-count-announcer`, re = x ? ` ${j}` : "", c = () => {
|
|
89
|
-
if (o.current && f === "auto") {
|
|
90
|
-
o.current.style.height = "auto";
|
|
91
|
-
const t = z(o.current.scrollHeight), _ = z(2);
|
|
92
|
-
o.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
|
|
93
|
-
// from jumping as soon as the user starts typing.
|
|
94
|
-
t + _}rem`;
|
|
95
|
-
}
|
|
96
|
-
}, se = () => {
|
|
97
|
-
const t = [];
|
|
98
|
-
return e && e > 0 && t.push(B), s && n && t.push(P), t.length > 0 ? t.join(" ") : void 0;
|
|
99
|
-
}, oe = (t) => {
|
|
100
|
-
var _;
|
|
101
|
-
R && R(t), e && e > 0 && E(((_ = o.current) == null ? void 0 : _.value.length) || 0), c();
|
|
102
|
-
}, ne = (t) => {
|
|
103
|
-
y && y(t), H || N(t.target.value);
|
|
104
|
-
};
|
|
105
|
-
return /* @__PURE__ */ d("div", { className: ee, children: [
|
|
106
|
-
/* @__PURE__ */ d("label", { className: ae, id: V, htmlFor: r, children: [
|
|
107
|
-
u,
|
|
108
|
-
T && /* @__PURE__ */ h(ue, {})
|
|
109
|
-
] }),
|
|
110
|
-
x && /* @__PURE__ */ h("div", { className: a.hint, id: j, children: x }),
|
|
111
|
-
C && k && /* @__PURE__ */ h(fe, { className: a.feedback, message: k, variant: "error", id: P }),
|
|
112
|
-
/* @__PURE__ */ h(
|
|
113
|
-
"textarea",
|
|
114
|
-
{
|
|
115
|
-
className: te,
|
|
116
|
-
id: r,
|
|
117
|
-
...K,
|
|
118
|
-
ref: Y,
|
|
119
|
-
"aria-labelledby": `${V}${re}`,
|
|
120
|
-
"aria-describedby": se(),
|
|
121
|
-
"aria-invalid": s,
|
|
122
|
-
"aria-disabled": I,
|
|
123
|
-
maxLength: e,
|
|
124
|
-
readOnly: I,
|
|
125
|
-
required: T,
|
|
126
|
-
disabled: D,
|
|
127
|
-
value: b,
|
|
128
|
-
defaultValue: void 0,
|
|
129
|
-
rows: void 0,
|
|
130
|
-
cols: void 0,
|
|
131
|
-
onChange: ne,
|
|
132
|
-
onInput: oe
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
e !== void 0 && e > 0 && /* @__PURE__ */ d(le, { children: [
|
|
136
|
-
/* @__PURE__ */ d("div", { className: a.charCount, "aria-hidden": "true", children: [
|
|
137
|
-
l,
|
|
138
|
-
"/",
|
|
139
|
-
e
|
|
140
|
-
] }),
|
|
141
|
-
/* @__PURE__ */ d(
|
|
142
|
-
"div",
|
|
143
|
-
{
|
|
144
|
-
className: a.charCountAnnouncer,
|
|
145
|
-
id: B,
|
|
146
|
-
"aria-live": W,
|
|
147
|
-
"aria-atomic": "true",
|
|
148
|
-
children: [
|
|
149
|
-
O,
|
|
150
|
-
" ",
|
|
151
|
-
U
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
] })
|
|
156
|
-
] });
|
|
157
|
-
});
|
|
158
|
-
Te.displayName = "DSTextarea";
|
|
159
|
-
export {
|
|
160
|
-
Te as D,
|
|
161
|
-
Ve as T,
|
|
162
|
-
Ie as v
|
|
163
|
-
};
|
package/chunks/Toast.DG3WVvau.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as C, jsxs as y } from "react/jsx-runtime";
|
|
3
|
-
import { d as E } from "./index.CgTHIF3K.js";
|
|
4
|
-
import { c as j } from "./index.CEyLAtio.js";
|
|
5
|
-
import { forwardRef as L } from "react";
|
|
6
|
-
import { D as M } from "./Button.Cf1CKq8N.js";
|
|
7
|
-
import { D as O } from "./Icon.NSsVrYeq.js";
|
|
8
|
-
import '../assets/Toast.CJ1zhDIT.css';const P = "ds-toast_root_gamkt_5", z = "ds-toast_root--closing_gamkt_19", A = "ds-toast_root--success_gamkt_54", R = "ds-toast_root--info_gamkt_58", $ = "ds-toast_root--warning_gamkt_62", q = "ds-toast_content_gamkt_67", F = "ds-toast_content--hide-icon_gamkt_74", G = "ds-toast_icon_gamkt_78", J = "ds-toast_message_gamkt_82", s = {
|
|
9
|
-
root: P,
|
|
10
|
-
rootClosing: z,
|
|
11
|
-
rootSuccess: A,
|
|
12
|
-
rootInfo: R,
|
|
13
|
-
rootWarning: $,
|
|
14
|
-
content: q,
|
|
15
|
-
contentHideIcon: F,
|
|
16
|
-
icon: G,
|
|
17
|
-
message: J
|
|
18
|
-
}, K = {
|
|
19
|
-
success: "circle-check-colored",
|
|
20
|
-
warning: "triangle-exclamationmark-colored",
|
|
21
|
-
info: "circle-info-colored"
|
|
22
|
-
}, Q = L((D, x) => {
|
|
23
|
-
const t = E.c(44);
|
|
24
|
-
let e, n, o, a, c, l, i, k, h;
|
|
25
|
-
t[0] !== D ? ({
|
|
26
|
-
message: o,
|
|
27
|
-
className: e,
|
|
28
|
-
closeButtonProps: n,
|
|
29
|
-
hideIcon: k,
|
|
30
|
-
variant: h,
|
|
31
|
-
onClick: a,
|
|
32
|
-
onMouseEnter: c,
|
|
33
|
-
onMouseLeave: l,
|
|
34
|
-
...i
|
|
35
|
-
} = D, t[0] = D, t[1] = e, t[2] = n, t[3] = o, t[4] = a, t[5] = c, t[6] = l, t[7] = i, t[8] = k, t[9] = h) : (e = t[1], n = t[2], o = t[3], a = t[4], c = t[5], l = t[6], i = t[7], k = t[8], h = t[9]);
|
|
36
|
-
const r = k === void 0 ? !1 : k, m = h === void 0 ? "info" : h;
|
|
37
|
-
let d;
|
|
38
|
-
t[10] !== n ? (d = n || {}, t[10] = n, t[11] = d) : d = t[11];
|
|
39
|
-
let _, v;
|
|
40
|
-
t[12] !== d ? ({
|
|
41
|
-
label: v,
|
|
42
|
-
..._
|
|
43
|
-
} = d, t[12] = d, t[13] = _, t[14] = v) : (_ = t[13], v = t[14]);
|
|
44
|
-
const b = v === void 0 ? "Close toast" : v, w = m === "success", T = m === "warning", B = m === "info";
|
|
45
|
-
let I;
|
|
46
|
-
t[15] !== e || t[16] !== w || t[17] !== T || t[18] !== B ? (I = j(s.root, e, {
|
|
47
|
-
[s.rootSuccess]: w,
|
|
48
|
-
[s.rootWarning]: T,
|
|
49
|
-
[s.rootInfo]: B
|
|
50
|
-
}), t[15] = e, t[16] = w, t[17] = T, t[18] = B, t[19] = I) : I = t[19];
|
|
51
|
-
const H = I;
|
|
52
|
-
let N;
|
|
53
|
-
t[20] !== r ? (N = j(s.content, {
|
|
54
|
-
[s.contentHideIcon]: r
|
|
55
|
-
}), t[20] = r, t[21] = N) : N = t[21];
|
|
56
|
-
const W = N;
|
|
57
|
-
let f;
|
|
58
|
-
t[22] !== r || t[23] !== m ? (f = !r && /* @__PURE__ */ C(O, { name: K[m], className: s.icon, "aria-hidden": "true" }), t[22] = r, t[23] = m, t[24] = f) : f = t[24];
|
|
59
|
-
let g;
|
|
60
|
-
t[25] !== o ? (g = /* @__PURE__ */ C("div", { className: s.message, children: o }), t[25] = o, t[26] = g) : g = t[26];
|
|
61
|
-
let u;
|
|
62
|
-
t[27] !== b || t[28] !== a || t[29] !== _ ? (u = /* @__PURE__ */ C(M, { ..._, hideLabel: !0, iconName: "cross", size: "small", variant: "ghost", onClick: a, children: b }), t[27] = b, t[28] = a, t[29] = _, t[30] = u) : u = t[30];
|
|
63
|
-
let p;
|
|
64
|
-
t[31] !== W || t[32] !== f || t[33] !== g || t[34] !== u ? (p = /* @__PURE__ */ y("div", { className: W, children: [
|
|
65
|
-
f,
|
|
66
|
-
g,
|
|
67
|
-
u
|
|
68
|
-
] }), t[31] = W, t[32] = f, t[33] = g, t[34] = u, t[35] = p) : p = t[35];
|
|
69
|
-
let S;
|
|
70
|
-
return t[36] !== o || t[37] !== c || t[38] !== l || t[39] !== x || t[40] !== i || t[41] !== H || t[42] !== p ? (S = /* @__PURE__ */ C("aside", { className: H, ref: x, popover: "manual", "data-ds-toast": !0, onMouseEnter: c, onMouseLeave: l, "aria-label": o, ...i, children: p }), t[36] = o, t[37] = c, t[38] = l, t[39] = x, t[40] = i, t[41] = H, t[42] = p, t[43] = S) : S = t[43], S;
|
|
71
|
-
});
|
|
72
|
-
Q.displayName = "DSToast";
|
|
73
|
-
export {
|
|
74
|
-
Q as D,
|
|
75
|
-
s
|
|
76
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as e from "react";
|
|
3
|
-
const a = ({
|
|
4
|
-
title: l,
|
|
5
|
-
titleId: t,
|
|
6
|
-
...c
|
|
7
|
-
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 17", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...c }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M3.333 1.333h5.334v4h4V9.5H14V4l-4-4H2v9.5h1.333zM12 4l-2-2v2z", clipRule: "evenodd" }), /* @__PURE__ */ e.createElement("path", { d: "M0 16.003v-5.206h2.014c1.5 0 2.633.988 2.633 2.603s-1.133 2.603-2.633 2.603zm1.393-1.179h.467c.843 0 1.363-.559 1.363-1.424s-.52-1.424-1.363-1.424h-.467zm6.417 1.248c-1.501 0-2.795-1.102-2.795-2.672s1.294-2.664 2.795-2.664 2.794 1.095 2.794 2.664-1.294 2.672-2.794 2.672m0-1.21c.872 0 1.37-.643 1.37-1.462 0-.82-.498-1.455-1.37-1.455s-1.37.636-1.37 1.455.497 1.462 1.37 1.462m8.19-.03c-.513.865-1.233 1.24-2.29 1.24-1.462 0-2.71-1.102-2.71-2.672s1.24-2.664 2.634-2.664c1.126 0 1.815.474 2.251 1.118l-1.049.712c-.199-.307-.52-.62-1.179-.62-.765 0-1.232.635-1.232 1.454 0 .82.482 1.462 1.278 1.462.674 0 1.003-.306 1.225-.72z" }));
|
|
8
|
-
export {
|
|
9
|
-
a as default
|
|
10
|
-
};
|