@stihl-design-system/components 1.0.0-RC.31 → 1.0.0-RC.34
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.DLQJU6AV.js +12 -0
- package/actionlink.DEBrWfN3.js +12 -0
- package/{arialiveregions.Fgcshs5k.js → arialiveregions.BUVY9NpY.js} +2 -2
- package/assets/Accordion.CzBGud45.css +1 -0
- package/assets/Button.C8sNwIeW.css +1 -0
- package/assets/Checkbox.CyOw3rXI.css +1 -0
- package/assets/CustomReactSelect.E_jJFVew.css +1 -0
- package/assets/Dialog.DJkn65Es.css +1 -0
- package/assets/Drawer.x3BCQvWE.css +1 -0
- package/assets/InputFile.BnIvK65P.css +1 -0
- package/assets/InputNumber.BoiCIR1f.css +1 -0
- package/assets/InputPassword.Dk3_vNLV.css +1 -0
- package/assets/InputSearch.C1_4cVCi.css +1 -0
- package/assets/LinkButton.B86yacK5.css +1 -0
- package/assets/{MegaMenu.DX9gChtY.css → MegaMenu.D5EtjFeL.css} +1 -1
- package/assets/Notification.CvohYEvT.css +1 -0
- package/assets/Popover.CXyUaXiO.css +1 -0
- package/assets/Select.COxLltX7.css +1 -0
- package/assets/Slider.DPEmJ3HD.css +1 -0
- package/assets/Stepper.tXJl15yL.css +1 -0
- package/assets/{SystemFeedback.RcrPepSZ.css → SystemFeedback.PKzqnXUe.css} +1 -1
- package/assets/Textarea.y3MW7VW0.css +1 -0
- package/assets/Toast.CGyKXb4V.css +1 -0
- package/assets/buttonround.BN3vUDc_.css +1 -0
- package/assets/input.DTu4g_iA.css +1 -0
- package/assets/logo100years.CQrEg-Vo.css +1 -0
- package/assets/step.BeLporJO.css +1 -0
- package/assets/switch.B9B-n_3y.css +1 -0
- package/assets/tooltip.Co1gWF_0.css +1 -0
- package/{asterisk.CR60hx8S.js → asterisk.B2ih8VwF.js} +1 -1
- package/{banner.j9YpudOS.js → banner.CI5HnDqD.js} +3 -3
- package/breadcrumb.CtwAux3P.js +11 -0
- package/button.DHuKanZP.js +13 -0
- package/buttonround.CMlmEDaN.js +96 -0
- package/checkbox.DwccD0Mp.js +12 -0
- package/checkboxgroup.ZiUFfCJ1.js +9 -0
- package/chip.B0s_fS8L.js +12 -0
- package/chipgroup.Dpu66bo5.js +143 -0
- package/chunks/Accordion.CYIfNOWr.js +168 -0
- package/chunks/ActionButton.DOYsEHPr.js +180 -0
- package/chunks/ActionLink.DbyciN3Y.js +153 -0
- package/chunks/{AriaLiveRegions.utils.Cb327d_2.js → AriaLiveRegions.utils.CybNIBSa.js} +2 -2
- package/chunks/{Breadcrumb.BGzwzvh8.js → Breadcrumb.BgnpTo01.js} +35 -37
- package/chunks/Button.DCZgBNmA.js +142 -0
- package/chunks/Checkbox.BcGXAuuP.js +88 -0
- package/chunks/{CheckboxGroup.Dy_6tiGk.js → CheckboxGroup.BuFd1luB.js} +5 -5
- package/chunks/Chip.D6pubCZV.js +133 -0
- package/chunks/{CustomReactSelect.iE5iTdez.js → CustomReactSelect.Dg3wC_VH.js} +484 -473
- package/chunks/Dialog.DpqSVrYR.js +102 -0
- package/chunks/Drawer.DISWybOa.js +107 -0
- package/chunks/{Fieldset.CjIfmN_5.js → Fieldset.DiMtr6Vw.js} +6 -6
- package/chunks/Header.7TQL_J9t.js +370 -0
- package/chunks/Icon.CDLyB7Pv.js +229 -0
- package/chunks/{Input.utils.Cnnzvuk4.js → Input.utils.Dkw7gRrr.js} +17 -17
- package/chunks/InputFile.C8nt9Fu8.js +218 -0
- package/chunks/InputNumber.CbH1XJfl.js +267 -0
- package/chunks/{InputPassword.DC2POUc1.js → InputPassword.DbdjuSiJ.js} +34 -34
- package/chunks/InputSearch.joxmugiv.js +173 -0
- package/chunks/LinkButton.BZgIGgc8.js +132 -0
- package/chunks/MegaMenu.CQbOeaib.js +189 -0
- package/chunks/NavigationTabList.G_l0GiUa.js +67 -0
- package/chunks/{NavigationTabs.ClpVGcl0.js → NavigationTabs.BwM-6CRm.js} +13 -14
- package/chunks/Notification.CrojkJ0E.js +91 -0
- package/chunks/Popover.Bb0Pjmvg.js +215 -0
- package/chunks/{RadioGroup.peTeMK45.js → RadioGroup.CexC4v2Z.js} +5 -5
- package/chunks/Select.BEIdNMML.js +164 -0
- package/chunks/{Slider.kyVr7BLk.js → Slider.CR0zYHeZ.js} +70 -71
- package/chunks/Stepper.PTQdQBYf.js +152 -0
- package/chunks/{SystemFeedback.B9f67mjJ.js → SystemFeedback.CjlARKki.js} +9 -9
- package/chunks/Tabs.DyP4whX0.js +83 -0
- package/chunks/{Text.DGWeWF1y.js → Text.DpRtTpB4.js} +3 -3
- package/chunks/Textarea.Du2RII5u.js +168 -0
- package/chunks/Toast.ug_RjGgF.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/battery-charge-0.DxlgEAto.js +10 -0
- package/chunks/battery-charge-100.D0Cax7dU.js +10 -0
- package/chunks/{battery.YCg9lYqC.js → battery.6Idoickg.js} +3 -3
- package/chunks/bluetooth-off.BzZCh4Q8.js +10 -0
- 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/document-s.CoOp0kBK.js +10 -0
- package/chunks/feather.l1E4nFBx.js +10 -0
- package/chunks/file-type-doc.B_RSSYbu.js +10 -0
- package/chunks/floating-ui.dom.BT8pKtCQ.js +1005 -0
- package/chunks/floating-ui.react.3FjeMiuN.js +1999 -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.BzR_yaIv.js +42 -0
- package/chunks/variants.-R3_RCW8.js +10 -0
- package/chunks/weight.DUPu2UT0.js +10 -0
- package/combobox.jG5GRA7C.js +65 -0
- package/components/ActionButton/ActionButton.d.ts +2 -0
- package/components/Button/Button.d.ts +4 -0
- package/components/ChipGroup/Chip.d.ts +1 -0
- package/components/ChipGroup/ChipGroup.d.ts +4 -0
- package/components/ChipGroup/ChipGroup.utils.d.ts +10 -12
- package/components/Combobox/Combobox.utils.d.ts +3 -4
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +4 -2
- package/components/Header/Header.d.ts +4 -5
- package/components/{InputStepper/InputStepper.d.ts → InputNumber/InputNumber.d.ts} +10 -4
- package/components/InputNumber/InputNumber.utils.d.ts +13 -0
- package/components/LinkButton/LinkButton.d.ts +2 -0
- package/components/Logo100Years/Logo100Years.d.ts +1 -0
- package/components/Popover/Popover.d.ts +29 -7
- package/components/Popover/Popover.utils.d.ts +34 -3
- package/components/Scroller/Scroller.d.ts +6 -2
- 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/Tooltip/Tooltip.d.ts +40 -0
- package/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/components/Tooltip/Tooltip.utils.d.ts +70 -0
- package/components/Tooltip/Tooltip.utils.test.d.ts +1 -0
- package/components/TopBar/TopBar.d.ts +4 -4
- package/components/TopBar/TopBar.utils.d.ts +1 -1
- package/customreactselect.BFN8cYJi.js +14 -0
- package/dialog.CzM_Cxp0.js +9 -0
- package/drawer._A9MQ8Cj.js +9 -0
- package/fieldset.CId-NtI5.js +11 -0
- package/{filelist.nunJKxkv.js → filelist.DgVuWpR3.js} +23 -24
- package/{flag.D_iN8iD6.js → flag.CE32qHPa.js} +3 -3
- package/floatingactionbutton.Bsnncudt.js +87 -0
- package/header.CelAkqtp.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 +217 -204
- package/input.DuEbg7d6.js +206 -0
- package/inputfile.BjgJGefV.js +17 -0
- package/inputnumber.BcrxBVv0.js +16 -0
- package/inputnumber.d.ts +2 -0
- package/inputpassword.CddmBW-T.js +13 -0
- package/inputsearch.CFOASqrd.js +14 -0
- package/link.f8MMZo-w.js +81 -0
- package/linkbutton.BYAvi-_V.js +12 -0
- package/{logo.C96KaG1P.js → logo.DprmD8HU.js} +3 -3
- package/logo100years.B4d_DIiB.js +24 -0
- package/logo100years.d.ts +2 -0
- package/megamenu.Cy9Cc-mC.js +12 -0
- package/navigationtablist.CkkLyHrM.js +10 -0
- package/navigationtabs.Dp7D2fnc.js +9 -0
- package/notification.B-norGiB.js +10 -0
- package/{numberindicator.Ddf3ESi7.js → numberindicator.BdnPMogE.js} +2 -2
- package/{optioncheckbox.D97W3zeW.js → optioncheckbox.nBVwGv6c.js} +3 -3
- package/package.json +41 -51
- package/partials/index.js +58 -52
- package/partials/lib/partials.d.ts +1 -1
- package/popover.DFVDZY-m.js +12 -0
- package/{radio.7_N_alaS.js → radio.DHUfSPai.js} +2 -2
- package/radiogroup.DaThoMfq.js +11 -0
- package/scroller.Cu7H_VCT.js +98 -0
- package/select.CMdKf7tC.js +13 -0
- package/{skiptocontent._F-d8y5b.js → skiptocontent.CHVh0hbr.js} +4 -4
- package/slider.C5dK6KcG.js +11 -0
- package/{spinner.Dht6FspZ.js → spinner.C9qCeq0R.js} +18 -18
- package/step.DKf4CHGr.js +82 -0
- package/step.d.ts +6 -0
- package/stepper.CCP_igpJ.js +16 -0
- package/stepper.d.ts +2 -0
- package/{switch.B37S4vfP.js → switch.Bqdyzi2E.js} +5 -5
- package/systemfeedback.O7tj1juR.js +10 -0
- package/tablist.DZgo49nZ.js +209 -0
- package/{tabpane.CB-eudyw.js → tabpane.C4nsUlwc.js} +2 -2
- package/tabs.BkoT7feH.js +11 -0
- package/text.cLv2PhjQ.js +10 -0
- package/textarea.DMn20z4p.js +13 -0
- package/{title.Bz_k5Vda.js → title.DuLPB-VK.js} +2 -2
- package/toast.Dvs8woTH.js +11 -0
- package/toastmanager.pi_Fhd5t.js +89 -0
- package/tooltip.QJe_bfO-.js +178 -0
- package/tooltip.d.ts +2 -0
- package/topbar.Bxwvp9Lf.js +12 -0
- package/types/icon-types.d.ts +1 -1
- package/types/prettier-plugin-organize-imports.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/mergeRefs.d.ts +5 -0
- package/utils/mergeRefs.test.d.ts +1 -0
- package/accordion.DkwtJy--.js +0 -12
- package/actionbutton.u1qp8oGC.js +0 -11
- package/actionlink.C7HzeIVa.js +0 -11
- 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.D0b1Hg1T.css +0 -1
- package/assets/Dialog.CGAg7bnN.css +0 -1
- package/assets/Drawer.VOvWQoEr.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.Dth4qZN_.css +0 -1
- package/assets/LinkButton.xMvg_ojf.css +0 -1
- package/assets/Notification.BOuaA5GT.css +0 -1
- package/assets/Popover.BDTDsPAt.css +0 -1
- package/assets/Select.CYACicZ3.css +0 -1
- package/assets/Slider.DzwSjDPV.css +0 -1
- package/assets/Textarea.BXWhXpXx.css +0 -1
- package/assets/Toast.CJ1zhDIT.css +0 -1
- package/assets/buttonround.Cw9hnUan.css +0 -1
- package/assets/input.ONbL-_C1.css +0 -1
- package/assets/switch.Bc9KIyw9.css +0 -1
- package/breadcrumb.BS-S3zUI.js +0 -11
- package/button.CPilCCUI.js +0 -12
- package/buttonround.C426mO4d.js +0 -81
- package/checkbox.BtlUvs0z.js +0 -12
- package/checkboxgroup.C5NgyyQF.js +0 -9
- package/chip.tVIG1ysH.js +0 -11
- package/chipgroup.CjIK0Z0x.js +0 -209
- package/chunks/Accordion.C5V5IcM-.js +0 -170
- package/chunks/ActionButton.B8zFwOrJ.js +0 -165
- package/chunks/ActionLink.IX6oRXU3.js +0 -138
- package/chunks/Button.B7xF1E19.js +0 -127
- package/chunks/Checkbox.DxV7-F5W.js +0 -88
- package/chunks/Chip.31UfPwQF.js +0 -119
- package/chunks/Dialog.B_2pKRnd.js +0 -135
- package/chunks/Drawer.HFlBTcqN.js +0 -140
- package/chunks/Header.DqZRryB5.js +0 -366
- package/chunks/Icon.DGTYCv63.js +0 -231
- package/chunks/InputFile.DvOatDzg.js +0 -220
- package/chunks/InputSearch.B0aCuPRZ.js +0 -174
- package/chunks/InputStepper.D_1YqlWl.js +0 -263
- package/chunks/LinkButton.DdTspmJz.js +0 -117
- package/chunks/MegaMenu.BY7eOnhj.js +0 -189
- package/chunks/NavigationTabList.dYFYTmWv.js +0 -57
- package/chunks/Notification.DIdIhGTQ.js +0 -92
- package/chunks/Popover.NGetxKGg.js +0 -159
- package/chunks/Select.BDHLJ2ma.js +0 -162
- package/chunks/Tabs.CkVL8Jw8.js +0 -83
- package/chunks/Textarea.ORkJUx-S.js +0 -163
- package/chunks/Toast.DHo4pLH3.js +0 -76
- package/chunks/file-type-doc.DlovDOBh.js +0 -10
- package/chunks/floating-ui.dom.C9TD1WpB.js +0 -950
- package/chunks/floating-ui.react.x0F9CYgn.js +0 -1637
- 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.Bk2ycofh.js +0 -60
- package/components/InputStepper/InputStepper.utils.d.ts +0 -12
- package/customreactselect.Hnch9LGg.js +0 -14
- package/dialog.7sWoqGwL.js +0 -10
- package/drawer.DsF4KIPn.js +0 -10
- package/fieldset.DUFUMcT-.js +0 -11
- package/floatingactionbutton.DOH2k0gv.js +0 -72
- package/header.QpNjE3N-.js +0 -12
- package/icon.vMQcEBnH.js +0 -9
- package/input.BKHOY118.js +0 -203
- package/inputfile.DK8759wV.js +0 -17
- package/inputpassword.rV_ZZw5F.js +0 -13
- package/inputsearch.CmhakTpa.js +0 -14
- package/inputstepper.Y-YzUHhF.js +0 -16
- package/inputstepper.d.ts +0 -2
- package/link.D_FjTyoZ.js +0 -66
- package/linkbutton.D2C4vykc.js +0 -11
- package/megamenu.CdHrEeoh.js +0 -12
- package/navigationtablist.CVjh1k-b.js +0 -9
- package/navigationtabs.BGfi9AG2.js +0 -9
- package/notification.Dn-FZWEL.js +0 -10
- package/popover.DXxm1oWI.js +0 -11
- package/radiogroup.J8WpEEo8.js +0 -11
- package/scroller.BiRLQg__.js +0 -123
- package/select.DIzGPVx3.js +0 -13
- package/slider.DuJK0RdB.js +0 -11
- package/systemfeedback.C_2PhwKe.js +0 -10
- package/tablist.g_Nwu6GA.js +0 -256
- package/tabs.oh9-wHPp.js +0 -11
- package/text.ZOUuesnU.js +0 -10
- package/textarea.dQ12-oYB.js +0 -13
- package/toast.sMNbfKxi.js +0 -11
- package/toastmanager.CVamaS5T.js +0 -116
- package/topbar.Dhy_TL0U.js +0 -11
- /package/components/{InputStepper/InputStepper.test.d.ts → InputNumber/InputNumber.test.d.ts} +0 -0
- /package/components/{InputStepper/InputStepper.utils.test.d.ts → InputNumber/InputNumberutils.test.d.ts} +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m, jsxs as O, Fragment as q } from "react/jsx-runtime";
|
|
3
|
+
import { d as H } from "./index.D-sRdssb.js";
|
|
4
|
+
import { useState as J, useRef as K, useMemo as Q, createContext as X, forwardRef as I, isValidElement as Y, cloneElement as Z, useContext as ee } from "react";
|
|
5
|
+
import { u as oe, o as te, i as re, s as se, j as ne, a as ae, b as ce, c as ie, d as le, e as j, f as pe, k as de, F as ue, h as he } from "./floating-ui.react.3FjeMiuN.js";
|
|
6
|
+
import { c as k } from "./index.DL9mof6u.js";
|
|
7
|
+
import { g as b, c as M } from "./helpers.CexwVao7.js";
|
|
8
|
+
import { D as ve } from "./Button.DCZgBNmA.js";
|
|
9
|
+
import { a as fe } from "./floating-ui.dom.BT8pKtCQ.js";
|
|
10
|
+
import '../assets/Popover.CXyUaXiO.css';const me = "ds-popover_popover_xg81f_5", ge = "ds-popover_popover--no-arrow_xg81f_64", we = "ds-popover_popover--variant-grey_xg81f_67", Pe = "ds-popover_arrow_xg81f_71", De = "ds-popover_arrow--variant-grey_xg81f_90", Se = "ds-popover_default-anchor_xg81f_107", _ = {
|
|
11
|
+
popover: me,
|
|
12
|
+
popoverNoArrow: ge,
|
|
13
|
+
popoverVariantGrey: we,
|
|
14
|
+
arrow: Pe,
|
|
15
|
+
arrowVariantGrey: De,
|
|
16
|
+
defaultAnchor: Se
|
|
17
|
+
}, Ae = ({
|
|
18
|
+
initialOpen: t = !1,
|
|
19
|
+
placement: o = "bottom",
|
|
20
|
+
isOpen: e,
|
|
21
|
+
popoverOffset: r = 6,
|
|
22
|
+
showArrow: a = !0,
|
|
23
|
+
variant: l = "default",
|
|
24
|
+
defaultAnchorButtonProps: p,
|
|
25
|
+
onOpenChange: d
|
|
26
|
+
} = {}) => {
|
|
27
|
+
const [s, h] = J(t), c = e ?? s, n = d ?? h, i = K(null), u = oe({
|
|
28
|
+
placement: o,
|
|
29
|
+
open: c,
|
|
30
|
+
strategy: "fixed",
|
|
31
|
+
onOpenChange: n,
|
|
32
|
+
whileElementsMounted: fe,
|
|
33
|
+
middleware: [te(r + (a ? 7 : 0)), re({
|
|
34
|
+
// default configuration taken from https://floating-ui.com/docs/flip
|
|
35
|
+
crossAxis: o.includes("-"),
|
|
36
|
+
fallbackAxisSideDirection: "end",
|
|
37
|
+
padding: r
|
|
38
|
+
}), se({
|
|
39
|
+
padding: r
|
|
40
|
+
}), ...a ? [ne({
|
|
41
|
+
element: i
|
|
42
|
+
})] : []]
|
|
43
|
+
}), v = u.context, C = ae(v, {
|
|
44
|
+
enabled: !0
|
|
45
|
+
}), w = ce(v), E = ie(v), P = le([C, w, E]);
|
|
46
|
+
return Q(() => ({
|
|
47
|
+
open: c,
|
|
48
|
+
popoverOffset: r,
|
|
49
|
+
setOpen: n,
|
|
50
|
+
arrowRef: i,
|
|
51
|
+
showArrow: a,
|
|
52
|
+
defaultAnchorButtonProps: p,
|
|
53
|
+
variant: l,
|
|
54
|
+
...P,
|
|
55
|
+
...u
|
|
56
|
+
}), [c, r, n, i, a, p, l, P, u]);
|
|
57
|
+
}, xe = ({
|
|
58
|
+
children: t,
|
|
59
|
+
hasContent: o,
|
|
60
|
+
hasAnchor: e
|
|
61
|
+
}) => {
|
|
62
|
+
if (!t)
|
|
63
|
+
throw new Error(b("DSPopover", "A DSPopover must have children."));
|
|
64
|
+
if (!o && e)
|
|
65
|
+
throw new Error(b("DSPopover", "A DSPopover must either have no child components for its most basic usage or have both a <DSPopover.Content> and <DSPopover.Anchor> component as a child. <DSPopover.Content> is missing! Please add it to the children of DSPopover."));
|
|
66
|
+
if (!e && o)
|
|
67
|
+
throw new Error(b("DSPopover", "A DSPopover must either have no child components for its most basic usage or have both a <DSPopover.Content> and <DSPopover.Anchor> component as a child. <DSPopover.Anchor> is missing! Please add it to the children of DSPopover."));
|
|
68
|
+
}, ye = ({
|
|
69
|
+
showArrow: t,
|
|
70
|
+
variant: o
|
|
71
|
+
}) => {
|
|
72
|
+
o === "grey" && t === !1 && console.warn(b("DSPopover", "The 'grey' variant is only available when 'showArrow' is true. To use the 'grey' variant, please ensure that 'showArrow' is set to true."));
|
|
73
|
+
}, B = X(null), U = () => {
|
|
74
|
+
const t = ee(B);
|
|
75
|
+
if (t == null)
|
|
76
|
+
throw new Error(b("DSPopover", "Components like DSPopover.Anchor or DSPopover.Content must be wrapped in <DSPopover />."));
|
|
77
|
+
return t;
|
|
78
|
+
}, f = (t) => {
|
|
79
|
+
const o = H.c(11), {
|
|
80
|
+
children: e,
|
|
81
|
+
...r
|
|
82
|
+
} = t, a = Ae({
|
|
83
|
+
...r
|
|
84
|
+
}), l = M(e, f.Content), p = M(e, f.Anchor);
|
|
85
|
+
process.env.NODE_ENV !== "production" && (xe({
|
|
86
|
+
children: e,
|
|
87
|
+
hasContent: l,
|
|
88
|
+
hasAnchor: p
|
|
89
|
+
}), ye({
|
|
90
|
+
showArrow: r.showArrow,
|
|
91
|
+
variant: r.variant
|
|
92
|
+
}));
|
|
93
|
+
const d = !l && !p && e !== null;
|
|
94
|
+
let s;
|
|
95
|
+
o[0] !== e || o[1] !== d ? (s = d ? /* @__PURE__ */ O(q, { children: [
|
|
96
|
+
/* @__PURE__ */ m(f.Anchor, {}),
|
|
97
|
+
/* @__PURE__ */ m(f.Content, { children: e })
|
|
98
|
+
] }) : e, o[0] = e, o[1] = d, o[2] = s) : s = o[2];
|
|
99
|
+
const h = s, c = l || d, n = p || d;
|
|
100
|
+
let i;
|
|
101
|
+
o[3] !== a || o[4] !== c || o[5] !== n ? (i = {
|
|
102
|
+
...a,
|
|
103
|
+
hasContent: c,
|
|
104
|
+
hasAnchor: n
|
|
105
|
+
}, o[3] = a, o[4] = c, o[5] = n, o[6] = i) : i = o[6];
|
|
106
|
+
const g = i;
|
|
107
|
+
let u;
|
|
108
|
+
return o[7] !== h || o[8] !== g || o[9] !== r ? (u = /* @__PURE__ */ m(B.Provider, { value: g, ...r, children: h }), o[7] = h, o[8] = g, o[9] = r, o[10] = u) : u = o[10], u;
|
|
109
|
+
}, W = I(({
|
|
110
|
+
children: t,
|
|
111
|
+
...o
|
|
112
|
+
}, e) => {
|
|
113
|
+
const {
|
|
114
|
+
context: r,
|
|
115
|
+
defaultAnchorButtonProps: a,
|
|
116
|
+
refs: l,
|
|
117
|
+
hasAnchor: p,
|
|
118
|
+
getReferenceProps: d
|
|
119
|
+
} = U(), {
|
|
120
|
+
label: s = "Toggle popover",
|
|
121
|
+
...h
|
|
122
|
+
} = a || {}, c = t ? t?.ref : null, n = j([l.setReference, e, c]);
|
|
123
|
+
return p && t && Y(t) ? Z(t, d({
|
|
124
|
+
ref: n,
|
|
125
|
+
...o,
|
|
126
|
+
...t.props,
|
|
127
|
+
"data-state": r.open ? "open" : "closed"
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
129
|
+
})) : /* @__PURE__ */ m(
|
|
130
|
+
ve,
|
|
131
|
+
{
|
|
132
|
+
...h,
|
|
133
|
+
ref: n,
|
|
134
|
+
type: "button",
|
|
135
|
+
"data-state": r.open ? "open" : "closed",
|
|
136
|
+
...d(o),
|
|
137
|
+
size: "small",
|
|
138
|
+
hideLabel: !0,
|
|
139
|
+
iconName: "circle-info-inverted",
|
|
140
|
+
variant: "ghost",
|
|
141
|
+
className: _.defaultAnchor,
|
|
142
|
+
children: t ?? s
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
});
|
|
146
|
+
W.displayName = "DSPopover.Anchor";
|
|
147
|
+
const $ = I((t, o) => {
|
|
148
|
+
const e = H.c(33), {
|
|
149
|
+
style: r,
|
|
150
|
+
className: a,
|
|
151
|
+
classNameArrow: l,
|
|
152
|
+
children: p,
|
|
153
|
+
...d
|
|
154
|
+
} = t, {
|
|
155
|
+
context: s,
|
|
156
|
+
refs: h,
|
|
157
|
+
floatingStyles: c,
|
|
158
|
+
showArrow: n,
|
|
159
|
+
variant: i,
|
|
160
|
+
getFloatingProps: g,
|
|
161
|
+
arrowRef: u
|
|
162
|
+
} = U();
|
|
163
|
+
let v;
|
|
164
|
+
e[0] !== o || e[1] !== h.setFloating ? (v = [h.setFloating, o], e[0] = o, e[1] = h.setFloating, e[2] = v) : v = e[2];
|
|
165
|
+
const C = j(v);
|
|
166
|
+
let w;
|
|
167
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (w = {
|
|
168
|
+
duration: {
|
|
169
|
+
open: 250,
|
|
170
|
+
close: 250
|
|
171
|
+
}
|
|
172
|
+
}, e[3] = w) : w = e[3];
|
|
173
|
+
const {
|
|
174
|
+
isMounted: E,
|
|
175
|
+
status: P
|
|
176
|
+
} = pe(s, w);
|
|
177
|
+
if (!E)
|
|
178
|
+
return null;
|
|
179
|
+
const R = he, F = ue, L = !1;
|
|
180
|
+
let D;
|
|
181
|
+
e[4] !== c || e[5] !== r ? (D = {
|
|
182
|
+
...c,
|
|
183
|
+
...r
|
|
184
|
+
}, e[4] = c, e[5] = r, e[6] = D) : D = e[6];
|
|
185
|
+
const V = !n, G = i === "grey" && n;
|
|
186
|
+
let S;
|
|
187
|
+
e[7] !== a || e[8] !== V || e[9] !== G ? (S = k(_.popover, a, {
|
|
188
|
+
[_.popoverNoArrow]: V,
|
|
189
|
+
[_.popoverVariantGrey]: G
|
|
190
|
+
}), e[7] = a, e[8] = V, e[9] = G, e[10] = S) : S = e[10];
|
|
191
|
+
const z = s.placement, T = g(d);
|
|
192
|
+
let A;
|
|
193
|
+
e[11] !== u || e[12] !== l || e[13] !== s || e[14] !== n || e[15] !== i ? (A = n && /* @__PURE__ */ m(de, { ref: u, context: s, className: k(_.arrow, l, {
|
|
194
|
+
[_.arrowVariantGrey]: i === "grey" && n
|
|
195
|
+
}), strokeWidth: 1, tipRadius: 1, width: 16, height: 7 }), e[11] = u, e[12] = l, e[13] = s, e[14] = n, e[15] = i, e[16] = A) : A = e[16];
|
|
196
|
+
let x;
|
|
197
|
+
e[17] !== p || e[18] !== s.placement || e[19] !== C || e[20] !== P || e[21] !== A || e[22] !== D || e[23] !== S || e[24] !== T ? (x = /* @__PURE__ */ O("div", { ref: C, style: D, className: S, "data-placement": z, "data-status": P, ...T, children: [
|
|
198
|
+
A,
|
|
199
|
+
p
|
|
200
|
+
] }), e[17] = p, e[18] = s.placement, e[19] = C, e[20] = P, e[21] = A, e[22] = D, e[23] = S, e[24] = T, e[25] = x) : x = e[25];
|
|
201
|
+
let y;
|
|
202
|
+
e[26] !== F || e[27] !== s || e[28] !== x ? (y = /* @__PURE__ */ m(F, { context: s, modal: L, children: x }), e[26] = F, e[27] = s, e[28] = x, e[29] = y) : y = e[29];
|
|
203
|
+
let N;
|
|
204
|
+
return e[30] !== R || e[31] !== y ? (N = /* @__PURE__ */ m(R, { children: y }), e[30] = R, e[31] = y, e[32] = N) : N = e[32], N;
|
|
205
|
+
});
|
|
206
|
+
$.displayName = "DSPopover.Content";
|
|
207
|
+
f.Anchor = W;
|
|
208
|
+
f.Content = $;
|
|
209
|
+
f.displayName = "DSPopover";
|
|
210
|
+
export {
|
|
211
|
+
f as D,
|
|
212
|
+
ye as a,
|
|
213
|
+
Ae as u,
|
|
214
|
+
xe as v
|
|
215
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as F } from "react/jsx-runtime";
|
|
3
|
-
import { d as $ } from "./index.
|
|
4
|
-
import { c as J } from "./index.
|
|
3
|
+
import { d as $ } from "./index.D-sRdssb.js";
|
|
4
|
+
import { c as J } from "./index.DL9mof6u.js";
|
|
5
5
|
import { forwardRef as K, useState as Q } from "react";
|
|
6
|
-
import { D as W } from "./Fieldset.
|
|
7
|
-
import { DSRadio as X } from "../radio.
|
|
8
|
-
import { g as m, r as V } from "./helpers.
|
|
6
|
+
import { D as W } from "./Fieldset.DiMtr6Vw.js";
|
|
7
|
+
import { DSRadio as X } from "../radio.DHUfSPai.js";
|
|
8
|
+
import { g as m, r as V } from "./helpers.CexwVao7.js";
|
|
9
9
|
import '../assets/RadioGroup.CM2mYOzc.css';const Y = "ds-radio-group_root_12fot_1", Z = "ds-radio-group_root--horizontal_12fot_9", oo = "ds-radio-group_root--invalid_12fot_12", B = {
|
|
10
10
|
root: Y,
|
|
11
11
|
rootHorizontal: Z,
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as u, jsxs as ye } from "react/jsx-runtime";
|
|
3
|
+
import { d as Ae } from "./index.D-sRdssb.js";
|
|
4
|
+
import { c as me } from "./index.DL9mof6u.js";
|
|
5
|
+
import { forwardRef as xe, useRef as Be, useState as ke, useEffect as Fe } from "react";
|
|
6
|
+
import { u as He } from "./useBreakpoint.BzR_yaIv.js";
|
|
7
|
+
import { Asterisk as Re } from "../asterisk.B2ih8VwF.js";
|
|
8
|
+
import { D as je } from "./Icon.CDLyB7Pv.js";
|
|
9
|
+
import { D as We } from "./SystemFeedback.CjlARKki.js";
|
|
10
|
+
import { g as pe, r as Me } from "./helpers.CexwVao7.js";
|
|
11
|
+
import '../assets/Select.COxLltX7.css';const Te = "ds-select_root_1qg6z_1", Oe = "ds-select_hint_1qg6z_1", Ze = "ds-select_label_1qg6z_1", Je = "ds-select_label--hidden_1qg6z_122", Ke = "ds-select_label--disabled_1qg6z_135", Qe = "ds-select_feedback_1qg6z_155", Ue = "ds-select_select-wrapper_1qg6z_159", Xe = "ds-select_select_1qg6z_159", Ye = "ds-select_select--small_1qg6z_173", Ge = "ds-select_select--invalid_1qg6z_285", el = "ds-select_select--placeholder_1qg6z_393", ll = "ds-select_chevron_1qg6z_443", tl = "ds-select_chevron--small_1qg6z_447", sl = "ds-select_chevron--disabled_1qg6z_450", t = {
|
|
12
|
+
root: Te,
|
|
13
|
+
hint: Oe,
|
|
14
|
+
label: Ze,
|
|
15
|
+
labelHidden: Je,
|
|
16
|
+
labelDisabled: Ke,
|
|
17
|
+
feedback: Qe,
|
|
18
|
+
selectWrapper: Ue,
|
|
19
|
+
select: Xe,
|
|
20
|
+
selectSmall: Ye,
|
|
21
|
+
selectInvalid: Ge,
|
|
22
|
+
selectPlaceholder: el,
|
|
23
|
+
chevron: ll,
|
|
24
|
+
chevronSmall: tl,
|
|
25
|
+
chevronDisabled: sl
|
|
26
|
+
}, _l = ["medium", "small"], al = ({
|
|
27
|
+
id: n,
|
|
28
|
+
label: s,
|
|
29
|
+
options: e
|
|
30
|
+
}) => {
|
|
31
|
+
if (!n)
|
|
32
|
+
throw new Error(pe("DSSelect", 'A unique "id" prop is required. Please add a unique "id" prop to the DSSelect component.'));
|
|
33
|
+
if (!s)
|
|
34
|
+
throw new Error(pe("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}.`));
|
|
35
|
+
if (Array.isArray(e)) {
|
|
36
|
+
if (e.length === 0)
|
|
37
|
+
throw new Error(pe("DSSelect", "The options array must not be empty."));
|
|
38
|
+
} else throw new Error(pe("DSSelect", Me("options", "DSSelect")));
|
|
39
|
+
}, ol = (n, s, e) => n === "" || s !== void 0 && s !== "" ? !1 : !(e !== void 0 && e !== ""), cl = xe((n, s) => {
|
|
40
|
+
const e = Ae.c(124);
|
|
41
|
+
let c, d, i, l, f, b, _, S, r, Z, J, K, Q, U, X, o;
|
|
42
|
+
e[0] !== n ? ({
|
|
43
|
+
id: l,
|
|
44
|
+
label: f,
|
|
45
|
+
options: _,
|
|
46
|
+
className: c,
|
|
47
|
+
defaultValue: d,
|
|
48
|
+
disabled: Z,
|
|
49
|
+
hideLabel: J,
|
|
50
|
+
hint: i,
|
|
51
|
+
invalid: K,
|
|
52
|
+
placeholder: Q,
|
|
53
|
+
required: U,
|
|
54
|
+
size: X,
|
|
55
|
+
systemFeedback: r,
|
|
56
|
+
value: o,
|
|
57
|
+
onChange: b,
|
|
58
|
+
...S
|
|
59
|
+
} = n, e[0] = n, e[1] = c, e[2] = d, e[3] = i, e[4] = l, e[5] = f, e[6] = b, e[7] = _, e[8] = S, e[9] = r, e[10] = Z, e[11] = J, e[12] = K, e[13] = Q, e[14] = U, e[15] = X, e[16] = o) : (c = e[1], d = e[2], i = e[3], l = e[4], f = e[5], b = e[6], _ = e[7], S = e[8], r = e[9], Z = e[10], J = e[11], K = e[12], Q = e[13], U = e[14], X = e[15], o = e[16]);
|
|
60
|
+
const h = Z === void 0 ? !1 : Z, Ee = J === void 0 ? !1 : J, a = K === void 0 ? !1 : K, v = Q === void 0 ? "Select" : Q, g = U === void 0 ? !1 : U, le = X === void 0 ? "medium" : X;
|
|
61
|
+
process.env.NODE_ENV !== "production" && al({
|
|
62
|
+
id: l,
|
|
63
|
+
label: f,
|
|
64
|
+
options: _
|
|
65
|
+
});
|
|
66
|
+
const Ie = Be(null), [ue, ze] = ke(o);
|
|
67
|
+
let te;
|
|
68
|
+
e[17] !== d || e[18] !== v || e[19] !== o ? (te = ol(v, d, o), e[17] = d, e[18] = v, e[19] = o, e[20] = te) : te = e[20];
|
|
69
|
+
const [Y, Pe] = ke(te);
|
|
70
|
+
let se, ae;
|
|
71
|
+
e[21] !== o ? (se = () => {
|
|
72
|
+
ze(o);
|
|
73
|
+
}, ae = [o], e[21] = o, e[22] = se, e[23] = ae) : (se = e[22], ae = e[23]), Fe(se, ae);
|
|
74
|
+
let oe;
|
|
75
|
+
e[24] !== s ? (oe = (ee) => {
|
|
76
|
+
Ie.current = ee, typeof s == "function" ? s(ee) : s && (s.current = ee);
|
|
77
|
+
}, e[24] = s, e[25] = oe) : oe = e[25];
|
|
78
|
+
const _e = oe, G = He(Ee), D = `${l}-label`, q = `${l}-feedback`, y = `${l}-hint`, ve = i ? ` ${y}` : "";
|
|
79
|
+
let ce;
|
|
80
|
+
e[26] !== a || e[27] !== r || e[28] !== q ? (ce = [a && r && q].filter(Boolean).join(" ") || void 0, e[26] = a, e[27] = r, e[28] = q, e[29] = ce) : ce = e[29];
|
|
81
|
+
const Se = ce;
|
|
82
|
+
let z, w, N, k, E, I, P, C, $, L, V, A, x, B, F, H, m, p;
|
|
83
|
+
if (e[30] !== Se || e[31] !== ve || e[32] !== c || e[33] !== d || e[34] !== h || e[35] !== _e || e[36] !== G || e[37] !== i || e[38] !== y || e[39] !== l || e[40] !== a || e[41] !== Y || e[42] !== f || e[43] !== b || e[44] !== _ || e[45] !== v || e[46] !== g || e[47] !== S || e[48] !== D || e[49] !== ue || e[50] !== le) {
|
|
84
|
+
const ee = (he) => [v && /* @__PURE__ */ u("option", { value: "", children: v }, `${l}-hidden-option-disabled-placeholder`), ...he.map((O) => {
|
|
85
|
+
if ("options" in O) {
|
|
86
|
+
const {
|
|
87
|
+
label: Ne,
|
|
88
|
+
options: Ve
|
|
89
|
+
} = O;
|
|
90
|
+
return /* @__PURE__ */ u("optgroup", { label: Ne, children: Ve.map(we) }, Ne);
|
|
91
|
+
} else
|
|
92
|
+
return we(O);
|
|
93
|
+
})], we = il;
|
|
94
|
+
let re;
|
|
95
|
+
e[69] !== c ? (re = me(t.root, c), e[69] = c, e[70] = re) : re = e[70];
|
|
96
|
+
const Ce = re, ge = le === "small";
|
|
97
|
+
let ne;
|
|
98
|
+
e[71] !== a || e[72] !== Y || e[73] !== ge ? (ne = me(t.select, {
|
|
99
|
+
[t.selectSmall]: ge,
|
|
100
|
+
[t.selectInvalid]: a,
|
|
101
|
+
[t.selectPlaceholder]: Y
|
|
102
|
+
}), e[71] = a, e[72] = Y, e[73] = ge, e[74] = ne) : ne = e[74];
|
|
103
|
+
const $e = ne;
|
|
104
|
+
let de;
|
|
105
|
+
e[75] !== h || e[76] !== G ? (de = me(t.label, {
|
|
106
|
+
[t.labelHidden]: G,
|
|
107
|
+
[t.labelDisabled]: h
|
|
108
|
+
}), e[75] = h, e[76] = G, e[77] = de) : de = e[77];
|
|
109
|
+
const De = de, qe = le === "small";
|
|
110
|
+
let fe;
|
|
111
|
+
e[78] !== h || e[79] !== qe ? (fe = me(t.chevron, {
|
|
112
|
+
[t.chevronSmall]: qe,
|
|
113
|
+
[t.chevronDisabled]: h
|
|
114
|
+
}), e[78] = h, e[79] = qe, e[80] = fe) : fe = e[80], z = fe;
|
|
115
|
+
let be;
|
|
116
|
+
e[81] !== b ? (be = (he) => {
|
|
117
|
+
const {
|
|
118
|
+
value: O
|
|
119
|
+
} = he.target;
|
|
120
|
+
Pe(O === ""), ze(O), b && b(he);
|
|
121
|
+
}, e[81] = b, e[82] = be) : be = e[82];
|
|
122
|
+
const Le = be;
|
|
123
|
+
H = Ce;
|
|
124
|
+
let T;
|
|
125
|
+
e[83] !== g ? (T = g && /* @__PURE__ */ u(Re, {}), e[83] = g, e[84] = T) : T = e[84], e[85] !== l || e[86] !== f || e[87] !== De || e[88] !== D || e[89] !== T ? (m = /* @__PURE__ */ ye("label", { className: De, id: D, htmlFor: l, children: [
|
|
126
|
+
f,
|
|
127
|
+
T
|
|
128
|
+
] }), e[85] = l, e[86] = f, e[87] = De, e[88] = D, e[89] = T, e[90] = m) : m = e[90], e[91] !== i || e[92] !== y ? (p = i && /* @__PURE__ */ u("div", { className: t.hint, id: y, children: i }), e[91] = i, e[92] = y, e[93] = p) : p = e[93], F = t.selectWrapper, w = S, N = l, k = _e, E = $e, I = `${D}${ve}`, P = Se, C = a, $ = d, L = ue, V = h, A = g, x = Le, B = ee(_), e[30] = Se, e[31] = ve, e[32] = c, e[33] = d, e[34] = h, e[35] = _e, e[36] = G, e[37] = i, e[38] = y, e[39] = l, e[40] = a, e[41] = Y, e[42] = f, e[43] = b, e[44] = _, e[45] = v, e[46] = g, e[47] = S, e[48] = D, e[49] = ue, e[50] = le, e[51] = z, e[52] = w, e[53] = N, e[54] = k, e[55] = E, e[56] = I, e[57] = P, e[58] = C, e[59] = $, e[60] = L, e[61] = V, e[62] = A, e[63] = x, e[64] = B, e[65] = F, e[66] = H, e[67] = m, e[68] = p;
|
|
129
|
+
} else
|
|
130
|
+
z = e[51], w = e[52], N = e[53], k = e[54], E = e[55], I = e[56], P = e[57], C = e[58], $ = e[59], L = e[60], V = e[61], A = e[62], x = e[63], B = e[64], F = e[65], H = e[66], m = e[67], p = e[68];
|
|
131
|
+
let R;
|
|
132
|
+
e[94] !== w || e[95] !== N || e[96] !== k || e[97] !== E || e[98] !== I || e[99] !== P || e[100] !== C || e[101] !== $ || e[102] !== L || e[103] !== V || e[104] !== A || e[105] !== x || e[106] !== B ? (R = /* @__PURE__ */ u("select", { ...w, id: N, ref: k, className: E, "aria-labelledby": I, "aria-describedby": P, "aria-invalid": C, defaultValue: $, value: L, disabled: V, required: A, onChange: x, children: B }), e[94] = w, e[95] = N, e[96] = k, e[97] = E, e[98] = I, e[99] = P, e[100] = C, e[101] = $, e[102] = L, e[103] = V, e[104] = A, e[105] = x, e[106] = B, e[107] = R) : R = e[107];
|
|
133
|
+
let j;
|
|
134
|
+
e[108] !== z ? (j = /* @__PURE__ */ u(je, { name: "chevron-down", className: z, "aria-hidden": "true" }), e[108] = z, e[109] = j) : j = e[109];
|
|
135
|
+
let W;
|
|
136
|
+
e[110] !== F || e[111] !== R || e[112] !== j ? (W = /* @__PURE__ */ ye("div", { className: F, children: [
|
|
137
|
+
R,
|
|
138
|
+
j
|
|
139
|
+
] }), e[110] = F, e[111] = R, e[112] = j, e[113] = W) : W = e[113];
|
|
140
|
+
let M;
|
|
141
|
+
e[114] !== a || e[115] !== r || e[116] !== q ? (M = a && r && /* @__PURE__ */ u(We, { className: t.feedback, message: r, variant: "error", id: q }), e[114] = a, e[115] = r, e[116] = q, e[117] = M) : M = e[117];
|
|
142
|
+
let ie;
|
|
143
|
+
return e[118] !== H || e[119] !== m || e[120] !== p || e[121] !== W || e[122] !== M ? (ie = /* @__PURE__ */ ye("div", { className: H, children: [
|
|
144
|
+
m,
|
|
145
|
+
p,
|
|
146
|
+
W,
|
|
147
|
+
M
|
|
148
|
+
] }), e[118] = H, e[119] = m, e[120] = p, e[121] = W, e[122] = M, e[123] = ie) : ie = e[123], ie;
|
|
149
|
+
});
|
|
150
|
+
cl.displayName = "DSSelect";
|
|
151
|
+
function il(n) {
|
|
152
|
+
const {
|
|
153
|
+
label: s,
|
|
154
|
+
value: e,
|
|
155
|
+
isDisabled: c
|
|
156
|
+
} = n;
|
|
157
|
+
return /* @__PURE__ */ u("option", { value: e, disabled: c, children: s }, e);
|
|
158
|
+
}
|
|
159
|
+
export {
|
|
160
|
+
cl as D,
|
|
161
|
+
_l as S,
|
|
162
|
+
ol as g,
|
|
163
|
+
al as v
|
|
164
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as b, jsxs as Se } from "react/jsx-runtime";
|
|
3
|
-
import { d as
|
|
4
|
-
import { c as T } from "./index.
|
|
3
|
+
import { d as nt } from "./index.D-sRdssb.js";
|
|
4
|
+
import { c as T } from "./index.DL9mof6u.js";
|
|
5
5
|
import { forwardRef as ot, useState as Xe, useRef as ct } from "react";
|
|
6
|
-
import { u as dt } from "./useBreakpoint.
|
|
7
|
-
import { DSInput as
|
|
8
|
-
import { g as Je } from "./helpers.
|
|
9
|
-
import '../assets/Slider.
|
|
10
|
-
root:
|
|
6
|
+
import { u as dt } from "./useBreakpoint.BzR_yaIv.js";
|
|
7
|
+
import { DSInput as ut } from "../input.DuEbg7d6.js";
|
|
8
|
+
import { g as Je } from "./helpers.CexwVao7.js";
|
|
9
|
+
import '../assets/Slider.DPEmJ3HD.css';const pt = "ds-slider_root_164e2_1", mt = "ds-slider_hint_164e2_4", bt = "ds-slider_label_164e2_4", ft = "ds-slider_number-input_164e2_7", _t = "ds-slider_label-hint-input-wrapper_164e2_11", ht = "ds-slider_label--hidden_164e2_31", Tt = "ds-slider_label--disabled_164e2_44", xt = "ds-slider_number-input--small_164e2_73", vt = "ds-slider_min-max-label-wrapper_164e2_78", gt = "ds-slider_min-max-label-wrapper--disabled_164e2_92", kt = "ds-slider_min-label_164e2_97", Nt = "ds-slider_max-label_164e2_101", St = "ds-slider_slider-wrapper_164e2_105", yt = "ds-slider_slider_164e2_105", Dt = "ds-slider_value-tooltip_164e2_124", It = "ds-slider_proxy-thumb_164e2_128", Mt = "ds-slider_proxy-thumb--disabled_164e2_206", Lt = "ds-slider_custom-track_164e2_235", Vt = "ds-slider_custom-track--progress_164e2_240", wt = "ds-slider_custom-track--runnable_164e2_252", Ct = "ds-slider_custom-track--disabled_164e2_266", Wt = "ds-slider_tick-wrapper_164e2_286", $t = "ds-slider_tick_164e2_286", Pt = "ds-slider_value-tooltip--visible_164e2_345", At = "ds-slider_value-tooltip--disabled_164e2_348", a = {
|
|
10
|
+
root: pt,
|
|
11
11
|
hint: mt,
|
|
12
12
|
label: bt,
|
|
13
13
|
numberInput: ft,
|
|
@@ -32,37 +32,36 @@ import '../assets/Slider.DzwSjDPV.css';const ut = "ds-slider_root_1p0nf_1", mt =
|
|
|
32
32
|
tick: $t,
|
|
33
33
|
valueTooltipVisible: Pt,
|
|
34
34
|
valueTooltipDisabled: At
|
|
35
|
-
}, Et = 11, Qe = 4, Ye = (u) => u.toString().length, Rt = (u,
|
|
36
|
-
if (
|
|
35
|
+
}, Et = 11, Qe = 4, Ye = (u) => u.toString().length, Rt = (u, r, e) => {
|
|
36
|
+
if (r === 0)
|
|
37
37
|
return !0;
|
|
38
|
-
const
|
|
39
|
-
return Math.abs(Math.round(
|
|
40
|
-
}, Ft = (u,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return `calc(${m}% + ${r})`;
|
|
38
|
+
const p = 1e-10, n = (u - e) / r;
|
|
39
|
+
return Math.abs(Math.round(n) - n) < p;
|
|
40
|
+
}, Ft = (u, r, e, p) => {
|
|
41
|
+
const n = parseFloat(r), f = e, o = Math.round((u - f) / n);
|
|
42
|
+
let c = f + o * n;
|
|
43
|
+
c = Math.min(Math.max(c, e), p);
|
|
44
|
+
const v = n.toString().split(".")[1]?.length || 0;
|
|
45
|
+
return parseFloat(c.toFixed(v));
|
|
46
|
+
}, Ht = (u, r, e) => {
|
|
47
|
+
const p = (u - r) / (e - r) * 100, n = `calc(-0.24 * ${p}px + 10px)`;
|
|
48
|
+
return `calc(${p}% + ${n})`;
|
|
50
49
|
}, Bt = ({
|
|
51
50
|
id: u,
|
|
52
|
-
label:
|
|
51
|
+
label: r
|
|
53
52
|
}) => {
|
|
54
53
|
if (!u)
|
|
55
54
|
throw new Error(Je("DSSlider", 'A unique "id" prop is required. Please add a unique "id" prop to the DSSlider component.'));
|
|
56
|
-
if (!
|
|
55
|
+
if (!r)
|
|
57
56
|
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((u,
|
|
59
|
-
const e =
|
|
60
|
-
let
|
|
57
|
+
}, qt = ot((u, r) => {
|
|
58
|
+
const e = nt.c(154);
|
|
59
|
+
let p, n, f, o, c, v, m, S, U, G, X, J, Q, Y, Z, g;
|
|
61
60
|
e[0] !== u ? ({
|
|
62
|
-
id:
|
|
63
|
-
label:
|
|
64
|
-
className:
|
|
65
|
-
defaultValue:
|
|
61
|
+
id: o,
|
|
62
|
+
label: c,
|
|
63
|
+
className: p,
|
|
64
|
+
defaultValue: n,
|
|
66
65
|
disabled: U,
|
|
67
66
|
hideLabel: G,
|
|
68
67
|
hideNumberInput: X,
|
|
@@ -73,34 +72,34 @@ import '../assets/Slider.DzwSjDPV.css';const ut = "ds-slider_root_1p0nf_1", mt =
|
|
|
73
72
|
numberInputProps: v,
|
|
74
73
|
step: Z,
|
|
75
74
|
value: g,
|
|
76
|
-
onChange:
|
|
75
|
+
onChange: m,
|
|
77
76
|
...S
|
|
78
|
-
} = u, e[0] = u, e[1] =
|
|
77
|
+
} = u, e[0] = u, e[1] = p, e[2] = n, e[3] = f, e[4] = o, e[5] = c, e[6] = v, e[7] = m, 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] = g) : (p = e[1], n = e[2], f = e[3], o = e[4], c = e[5], v = e[6], m = 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], g = e[16]);
|
|
79
78
|
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
79
|
process.env.NODE_ENV !== "production" && Bt({
|
|
81
|
-
id:
|
|
82
|
-
label:
|
|
80
|
+
id: o,
|
|
81
|
+
label: c
|
|
83
82
|
});
|
|
84
|
-
const i = Number(et), t = Number(tt),
|
|
83
|
+
const i = Number(et), t = Number(tt), d = Number(ee), De = dt(Ze), D = `${o}-label`, Ie = `${o}-hint`, Me = `${o}-number-input`;
|
|
85
84
|
let se;
|
|
86
|
-
e[17] !==
|
|
87
|
-
const [I, le] = Xe(se), [x, ae] = Xe(g ||
|
|
85
|
+
e[17] !== n || e[18] !== t || e[19] !== g ? (se = g || n || t.toString() || "0", e[17] = n, e[18] = t, e[19] = g, e[20] = se) : se = e[20];
|
|
86
|
+
const [I, le] = Xe(se), [x, ae] = Xe(g || n || t || 0), st = ct(null);
|
|
88
87
|
let ie;
|
|
89
|
-
e[21] !==
|
|
90
|
-
st.current = s, typeof
|
|
91
|
-
}, e[21] =
|
|
88
|
+
e[21] !== r ? (ie = (s) => {
|
|
89
|
+
st.current = s, typeof r == "function" ? r(s) : r && (r.current = s);
|
|
90
|
+
}, e[21] = r, e[22] = ie) : ie = e[22];
|
|
92
91
|
const Le = ie;
|
|
93
|
-
let
|
|
94
|
-
e[23] !== v ? (
|
|
92
|
+
let re;
|
|
93
|
+
e[23] !== v ? (re = v || {}, e[23] = v, e[24] = re) : re = e[24];
|
|
95
94
|
const {
|
|
96
95
|
size: Ge,
|
|
97
96
|
suffix: Ve
|
|
98
|
-
} =
|
|
97
|
+
} = re, ne = Ge === void 0 ? "medium" : Ge;
|
|
99
98
|
let oe;
|
|
100
|
-
e[25] !==
|
|
99
|
+
e[25] !== m ? (oe = (s) => {
|
|
101
100
|
const _ = parseFloat(s.target.value);
|
|
102
|
-
ae(_), le(s.target.value),
|
|
103
|
-
}, e[25] =
|
|
101
|
+
ae(_), le(s.target.value), m && m(s);
|
|
102
|
+
}, e[25] = m, e[26] = oe) : oe = e[26];
|
|
104
103
|
const we = oe;
|
|
105
104
|
let ce;
|
|
106
105
|
e[27] === Symbol.for("react.memo_cache_sentinel") ? (ce = (s) => {
|
|
@@ -112,7 +111,7 @@ import '../assets/Slider.DzwSjDPV.css';const ut = "ds-slider_root_1p0nf_1", mt =
|
|
|
112
111
|
}, e[27] = ce) : ce = e[27];
|
|
113
112
|
const lt = ce;
|
|
114
113
|
let k;
|
|
115
|
-
if (e[28] !== I || e[29] !==
|
|
114
|
+
if (e[28] !== I || e[29] !== m || e[30] !== i || e[31] !== t || e[32] !== ee) {
|
|
116
115
|
k = (_) => {
|
|
117
116
|
const te = parseFloat(I);
|
|
118
117
|
if (Number.isNaN(te)) {
|
|
@@ -120,43 +119,43 @@ import '../assets/Slider.DzwSjDPV.css';const ut = "ds-slider_root_1p0nf_1", mt =
|
|
|
120
119
|
return;
|
|
121
120
|
}
|
|
122
121
|
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),
|
|
122
|
+
Rt(h, parseFloat(ee), t) || (h = Ft(h, ee, t, i)), le(h.toString()), ae(h), m && m(_);
|
|
124
123
|
};
|
|
125
124
|
const s = (_) => {
|
|
126
|
-
le(t.toString()), ae(t),
|
|
125
|
+
le(t.toString()), ae(t), m && m(_);
|
|
127
126
|
};
|
|
128
|
-
e[28] = I, e[29] =
|
|
127
|
+
e[28] = I, e[29] = m, e[30] = i, e[31] = t, e[32] = ee, e[33] = k;
|
|
129
128
|
} else
|
|
130
129
|
k = e[33];
|
|
131
|
-
const M = (
|
|
130
|
+
const M = (d === 0 ? !1 : (i - t) / d <= Et) && (i - t) / d || 0;
|
|
132
131
|
let de;
|
|
133
|
-
if (e[34] !== i || e[35] !== t || e[36] !==
|
|
132
|
+
if (e[34] !== i || e[35] !== t || e[36] !== d || e[37] !== M) {
|
|
134
133
|
let s;
|
|
135
|
-
e[39] !== i || e[40] !== t || e[41] !==
|
|
136
|
-
const h = t + te *
|
|
134
|
+
e[39] !== i || e[40] !== t || e[41] !== d ? (s = (_, te) => {
|
|
135
|
+
const h = t + te * d, rt = Ht(h, t, i);
|
|
137
136
|
return /* @__PURE__ */ b("span", { className: a.tick, style: {
|
|
138
|
-
left:
|
|
137
|
+
left: rt
|
|
139
138
|
} }, h);
|
|
140
|
-
}, e[39] = i, e[40] = t, e[41] =
|
|
139
|
+
}, e[39] = i, e[40] = t, e[41] = d, e[42] = s) : s = e[42], de = Array.from({
|
|
141
140
|
length: M + 1
|
|
142
|
-
}, s), e[34] = i, e[35] = t, e[36] =
|
|
141
|
+
}, s), e[34] = i, e[35] = t, e[36] = d, e[37] = M, e[38] = de;
|
|
143
142
|
} else
|
|
144
143
|
de = e[38];
|
|
145
144
|
const Ce = de;
|
|
146
|
-
let
|
|
147
|
-
e[43] !== i || e[44] !== t || e[45] !== x ? (
|
|
145
|
+
let ue;
|
|
146
|
+
e[43] !== i || e[44] !== t || e[45] !== x ? (ue = () => {
|
|
148
147
|
if (t === i)
|
|
149
148
|
throw new Error("Min and max values cannot be the same.");
|
|
150
149
|
const s = (x - t) / (i - t) * 100;
|
|
151
150
|
return Math.max(0, Math.min(s, 100));
|
|
152
|
-
}, e[43] = i, e[44] = t, e[45] = x, e[46] =
|
|
153
|
-
const N =
|
|
154
|
-
let
|
|
155
|
-
e[47] !== N ? (
|
|
151
|
+
}, e[43] = i, e[44] = t, e[45] = x, e[46] = ue) : ue = e[46];
|
|
152
|
+
const N = ue;
|
|
153
|
+
let pe;
|
|
154
|
+
e[47] !== N ? (pe = () => {
|
|
156
155
|
const s = N();
|
|
157
156
|
return s < 50 ? `calc(${s}% + 4px)` : `calc(${s}% - 4px)`;
|
|
158
|
-
}, e[47] = N, e[48] =
|
|
159
|
-
const at =
|
|
157
|
+
}, e[47] = N, e[48] = pe) : pe = e[48];
|
|
158
|
+
const at = pe;
|
|
160
159
|
let me;
|
|
161
160
|
e[49] !== N ? (me = () => {
|
|
162
161
|
const s = 100 - N();
|
|
@@ -164,14 +163,14 @@ import '../assets/Slider.DzwSjDPV.css';const ut = "ds-slider_root_1p0nf_1", mt =
|
|
|
164
163
|
}, e[49] = N, e[50] = me) : me = e[50];
|
|
165
164
|
const it = me;
|
|
166
165
|
let be;
|
|
167
|
-
e[51] !==
|
|
166
|
+
e[51] !== p ? (be = T(a.slider, p), e[51] = p, e[52] = be) : be = e[52];
|
|
168
167
|
const We = be;
|
|
169
168
|
let fe;
|
|
170
169
|
e[53] !== l || e[54] !== De ? (fe = T(a.label, {
|
|
171
170
|
[a.labelHidden]: De,
|
|
172
171
|
[a.labelDisabled]: l
|
|
173
172
|
}), e[53] = l, e[54] = De, e[55] = fe) : fe = e[55];
|
|
174
|
-
const $e = fe, Pe =
|
|
173
|
+
const $e = fe, Pe = ne === "small";
|
|
175
174
|
let _e;
|
|
176
175
|
e[56] !== Pe ? (_e = T(a.numberInput, {
|
|
177
176
|
[a.numberInputSmall]: Pe
|
|
@@ -204,13 +203,13 @@ import '../assets/Slider.DzwSjDPV.css';const ut = "ds-slider_root_1p0nf_1", mt =
|
|
|
204
203
|
}), e[66] = l, e[67] = ye, e[68] = ge) : ge = e[68];
|
|
205
204
|
const Be = ge;
|
|
206
205
|
let L;
|
|
207
|
-
e[69] !==
|
|
206
|
+
e[69] !== o || e[70] !== c || e[71] !== $e || e[72] !== D ? (L = /* @__PURE__ */ b("label", { className: $e, htmlFor: o, id: D, children: c }), e[69] = o, e[70] = c, e[71] = $e, e[72] = D, e[73] = L) : L = e[73];
|
|
208
207
|
let V;
|
|
209
208
|
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
209
|
let w;
|
|
211
|
-
e[77] !== l || e[78] !== k || e[79] !== y || e[80] !== Me || e[81] !== I || e[82] !==
|
|
210
|
+
e[77] !== l || e[78] !== k || e[79] !== y || e[80] !== Me || e[81] !== I || e[82] !== c || e[83] !== Ae || e[84] !== ne || e[85] !== Ve || e[86] !== i || e[87] !== t || e[88] !== d ? (w = !y && /* @__PURE__ */ b(ut, { id: Me, className: Ae, type: "number", min: t, max: i, step: d, inputMode: "decimal", autoComplete: "off", disabled: l, hideLabel: !0, value: I, onChange: lt, onBlur: k, onKeyDown: (s) => {
|
|
212
211
|
s.key === "Enter" && (s.preventDefault(), k(s));
|
|
213
|
-
}, label:
|
|
212
|
+
}, label: c, size: ne, suffix: Ve }), e[77] = l, e[78] = k, e[79] = y, e[80] = Me, e[81] = I, e[82] = c, e[83] = Ae, e[84] = ne, e[85] = Ve, e[86] = i, e[87] = t, e[88] = d, e[89] = w) : w = e[89];
|
|
214
213
|
let C;
|
|
215
214
|
e[90] !== L || e[91] !== V || e[92] !== w ? (C = /* @__PURE__ */ Se("div", { className: a.labelHintInputWrapper, children: [
|
|
216
215
|
L,
|
|
@@ -256,7 +255,7 @@ import '../assets/Slider.DzwSjDPV.css';const ut = "ds-slider_root_1p0nf_1", mt =
|
|
|
256
255
|
let B;
|
|
257
256
|
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
257
|
let q;
|
|
259
|
-
e[120] !== l || e[121] !== Le || e[122] !== we || e[123] !==
|
|
258
|
+
e[120] !== l || e[121] !== Le || e[122] !== we || e[123] !== o || e[124] !== i || e[125] !== t || e[126] !== d || e[127] !== S || e[128] !== We || e[129] !== D || e[130] !== x ? (q = /* @__PURE__ */ b("input", { ...S, id: o, type: "range", ref: Le, className: We, min: t, max: i, step: d, value: x, disabled: l, "aria-labelledby": D, onChange: we }), e[120] = l, e[121] = Le, e[122] = we, e[123] = o, e[124] = i, e[125] = t, e[126] = d, e[127] = S, e[128] = We, e[129] = D, e[130] = x, e[131] = q) : q = e[131];
|
|
260
259
|
let O;
|
|
261
260
|
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
261
|
let z;
|