@stihl-design-system/components 1.0.0-RC.47 → 1.0.0-RC.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{accordion.BQ7vavIt.js → accordion.D4XR2R7e.js} +2 -2
- package/{actionbutton.C7lqEmBx.js → actionbutton.C8hePX-D.js} +3 -3
- package/{actioncard.dgVHW0BC.js → actioncard.kDxu01xm.js} +1 -1
- package/{actionlink.CL6v1mQA.js → actionlink.dccc5JQV.js} +3 -3
- package/{arialiveregions.DC1Gq9Lo.js → arialiveregions.BniSDuPM.js} +9 -10
- package/assets/Accordion.RlqWqpGo.css +1 -0
- package/assets/ActionButton.Dw2FeIaW.css +1 -0
- package/assets/ActionCard.viEoC26n.css +1 -0
- package/assets/ActionLink.B1Jjaf7k.css +1 -0
- package/assets/Button.Bi1KUKMv.css +1 -0
- package/assets/Checkbox.C6RWhy0V.css +1 -0
- package/assets/Chip.DfamkUPw.css +1 -0
- package/assets/CustomReactSelect.CvWMmrAU.css +1 -0
- package/assets/Dialog.6AkQo8ew.css +1 -0
- package/assets/Drawer.CDOlX809.css +1 -0
- package/assets/Fieldset.BbLGXCWa.css +1 -0
- package/assets/InputFile.CDtghZtl.css +1 -0
- package/assets/InputNumber.BNpO9p7n.css +1 -0
- package/assets/InputPassword.BgZo-RUc.css +1 -0
- package/assets/InputSearch.BROFFTK9.css +1 -0
- package/assets/LinkButton.IKIlFnpH.css +1 -0
- package/assets/Notification.2B81JHOp.css +1 -0
- package/assets/Pagination.DH71DZ0j.css +1 -0
- package/assets/Popover.58Tb0dOt.css +1 -0
- package/assets/Select.CfTN3CJo.css +1 -0
- package/assets/Slider.B4kzL60S.css +1 -0
- package/assets/{SystemFeedback.DYi9QetY.css → SystemFeedback.DVMml_h9.css} +1 -1
- package/assets/TextUtility.BThulfyl.css +1 -0
- package/assets/Textarea.BO4AcRJD.css +1 -0
- package/assets/buttonround.syTU1QSI.css +1 -0
- package/assets/chipgroup.DtCnsmS7.css +1 -0
- package/assets/filelist.B-Ru0GP_.css +1 -0
- package/assets/input.Dy8VS73e.css +1 -0
- package/assets/numberindicator.CtbitPQ8.css +1 -0
- package/assets/progressindicator.tyY_RVQ9.css +1 -0
- package/assets/radio.9hUUyg8R.css +1 -0
- package/assets/switch.8v7Wp1Fj.css +1 -0
- package/assets/tabpane.DDaeSDQb.css +1 -0
- package/assets/text.BwGsYzGM.css +1 -0
- package/assets/tooltip.C_BL2kou.css +1 -0
- package/{banner.BlB_7xue.js → banner.DO7GsDL_.js} +1 -1
- package/{breadcrumb.DajORKq7.js → breadcrumb.DYov6vtt.js} +3 -3
- package/{button.EooIlFBI.js → button.qxcuzbnv.js} +2 -2
- package/buttonround.BO7_ewzA.js +101 -0
- package/{checkbox.NJj9qMnx.js → checkbox.C9kyIY9P.js} +4 -5
- package/{checkboxgroup.DELdyn0X.js → checkboxgroup.kEUxnKLf.js} +2 -2
- package/{chip.C4h8Hm9g.js → chip.5ktNLRYf.js} +3 -3
- package/chipgroup.kRU3Z98U.js +226 -0
- package/chunks/Accordion.gih2ni1d.js +179 -0
- package/chunks/ActionButton.B-wm5sUy.js +194 -0
- package/chunks/{ActionCard.Dbq2VqyZ.js → ActionCard.Bm-2ewfS.js} +44 -44
- package/chunks/ActionLink.D0KzqbH4.js +166 -0
- package/chunks/{AriaLiveRegions.utils.BPvIKT6B.js → AriaLiveRegions.utils.xoETe2Ps.js} +14 -16
- package/chunks/{Breadcrumb.Ccm79ver.js → Breadcrumb.I2G-T0zc.js} +2 -2
- package/chunks/Button.CCol--xy.js +165 -0
- package/chunks/Checkbox.BxOGR1bR.js +96 -0
- package/chunks/CheckboxGroup.TneO0tuE.js +85 -0
- package/chunks/Chip.DffaXMkV.js +148 -0
- package/chunks/{CustomReactSelect.oEQpO9iN.js → CustomReactSelect.DTAavYaz.js} +282 -277
- package/chunks/Dialog.guuxflWL.js +101 -0
- package/chunks/{Drawer.CDe_g99S.js → Drawer.CjUZu6GW.js} +27 -28
- package/chunks/Fieldset.BBMuLKps.js +94 -0
- package/chunks/{Flag.X9tB3Mfv.js → Flag.CbQYBzVC.js} +12 -13
- package/chunks/{Header.bLSdAY9-.js → Header.CvcGSuhX.js} +1 -1
- package/chunks/{Input.utils.CkmzxIrU.js → Input.utils.Wycy2SzG.js} +23 -25
- package/chunks/InputFile.y71Cd5J9.js +260 -0
- package/chunks/InputNumber.Fn2YbF_s.js +250 -0
- package/chunks/InputPassword.DtT9yrlx.js +129 -0
- package/chunks/InputSearch.BoAfGqoH.js +157 -0
- package/chunks/LinkButton.BxG7fx1O.js +150 -0
- package/chunks/LinkCard.DM-5WrSt.js +200 -0
- package/chunks/{MegaMenu.DbunD_yW.js → MegaMenu.udXR1H3W.js} +1 -1
- package/chunks/{NavigationTabList.CyrKNAer.js → NavigationTabList.thzA1pU8.js} +1 -1
- package/chunks/{NavigationTabs.DVBe-Wt3.js → NavigationTabs.BWewgBch.js} +1 -1
- package/chunks/Notification.C_o7Ge6Q.js +91 -0
- package/chunks/Pagination.BrOMUJMi.js +272 -0
- package/chunks/Popover.CxZZ_y1Z.js +230 -0
- package/chunks/RadioGroup.CO91_5hA.js +136 -0
- package/chunks/Select.EzoMdk1u.js +157 -0
- package/chunks/Slider.CX38t4Sk.js +330 -0
- package/chunks/{Stepper.KBRikedB.js → Stepper.Ds_aIEF8.js} +68 -69
- package/chunks/SystemFeedback.DhWcYjnu.js +43 -0
- package/chunks/{Tabs.xXn4zpGp.js → Tabs.BHVlgp7L.js} +2 -2
- package/chunks/Text.utils.DzlY9pJS.js +9 -0
- package/chunks/TextUtility.BZLwqyic.js +82 -0
- package/chunks/Textarea.vuJgvW6_.js +192 -0
- package/chunks/{Toast.NZfb7z3q.js → Toast.V_ZUAsf2.js} +1 -1
- package/chunks/translate.DSb-TdWR.js +2460 -0
- package/{combobox.CPsl2TC0.js → combobox.C6cPz4AJ.js} +1 -1
- package/components/Accordion/Accordion.d.ts +5 -0
- package/components/ActionButton/ActionButton.d.ts +5 -1
- package/components/ActionLink/ActionLink.d.ts +1 -1
- package/components/Button/Button.utils.d.ts +1 -1
- package/components/Checkbox/Checkbox.d.ts +8 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +9 -1
- package/components/ChipGroup/Chip.d.ts +2 -0
- package/components/ChipGroup/ChipGroup.d.ts +12 -2
- package/components/ChipGroup/ChipGroup.utils.d.ts +39 -15
- package/components/Combobox/Combobox.utils.d.ts +66 -9
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +5 -1
- package/components/Combobox/CustomReactSelect/CustomReactSelect.utils.d.ts +1 -1
- package/components/Fieldset/Fieldset.d.ts +9 -2
- package/components/Input/Input.d.ts +8 -1
- package/components/InputFile/FileList/FileList.d.ts +4 -2
- package/components/InputFile/FileList/FilePreview/FilePreview.d.ts +8 -2
- package/components/InputFile/FileList/ProgressIndicator/ProgressIndicator.d.ts +8 -2
- package/components/InputFile/InputFile.d.ts +12 -2
- package/components/InputFile/InputFile.utils.d.ts +41 -23
- package/components/InputNumber/InputNumber.d.ts +8 -1
- package/components/InputPassword/InputPassword.d.ts +8 -1
- package/components/InputSearch/InputSearch.d.ts +8 -1
- package/components/LinkCard/LinkCard.d.ts +10 -4
- package/components/LinkCard/LinkCard.utils.d.ts +2 -2
- package/components/NumberIndicator/NumberIndicator.d.ts +6 -1
- package/components/Pagination/Pagination.d.ts +10 -3
- package/components/Pagination/Pagination.utils.d.ts +22 -9
- package/components/Popover/Popover.d.ts +9 -1
- package/components/Popover/Popover.utils.d.ts +3 -2
- package/components/Radio/Radio.d.ts +5 -0
- package/components/RadioGroup/RadioGroup.d.ts +8 -0
- package/components/Select/Select.d.ts +8 -1
- package/components/Slider/Slider.d.ts +8 -1
- package/components/Stepper/Step.d.ts +1 -1
- package/components/Stepper/Step.utils.d.ts +1 -1
- package/components/Stepper/Stepper.d.ts +4 -1
- package/components/Stepper/Stepper.utils.d.ts +9 -4
- package/components/SystemFeedback/SystemFeedback.d.ts +9 -1
- package/components/Textarea/Textarea.d.ts +8 -1
- package/{customreactselect.D7BJg-2s.js → customreactselect.L0zSh3Tg.js} +4 -4
- package/{dialog.BlprGigG.js → dialog.Ddq8o8Od.js} +2 -2
- package/{drawer.BoyrTFi1.js → drawer.rbbjQvqL.js} +2 -2
- package/{fieldset.D_e2-vo_.js → fieldset.BHf3XK2q.js} +3 -3
- package/filelist.GrEwoM1u.js +143 -0
- package/filepreview.B2Ot9SZ7.js +97 -0
- package/{flag.0vpitrQ-.js → flag.fX6LAgty.js} +3 -4
- package/{floatingactionbutton.BrdE1vi2.js → floatingactionbutton.BwCiybnc.js} +1 -1
- package/{header.C3AqYBtz.js → header.BCeCjYfG.js} +1 -1
- package/index.es.js +203 -204
- package/input.Dh0ws-9j.js +187 -0
- package/inputfile.DiZh3GcT.js +17 -0
- package/{inputnumber.Box5R2An.js → inputnumber.D2cmptaH.js} +8 -9
- package/{inputpassword.CBc8GNwI.js → inputpassword.C53Kg4EA.js} +4 -4
- package/inputsearch.BrsIDUSW.js +14 -0
- package/link.DEZDbUgq.js +81 -0
- package/{linkbutton.DxEPueLb.js → linkbutton._X50W2Md.js} +3 -3
- package/{linkcard.CCY-VFWN.js → linkcard.BtM3KnjT.js} +3 -3
- package/{logo.D7LnRA1E.js → logo.D6BTxbxv.js} +0 -1
- package/{megamenu.C8OynEzk.js → megamenu.odVCUm4c.js} +2 -2
- package/{navigationtablist.iSQd5PX4.js → navigationtablist.n9DrtYe5.js} +2 -2
- package/{navigationtabs.FtkVv_qV.js → navigationtabs.D0mSyAtK.js} +2 -2
- package/{notification.Cqg8HpJ8.js → notification._X8-8vOa.js} +2 -2
- package/numberindicator.DsK65Bj3.js +39 -0
- package/package.json +6 -1
- package/pagination.B7Hrx_sk.js +14 -0
- package/partials/index.js +68 -68
- package/{popover.DYiEGSnj.js → popover.BBaqL7y9.js} +3 -3
- package/progressindicator.D9CfVD95.js +74 -0
- package/radio.DjToa2aV.js +148 -0
- package/{radiogroup.wqgExwrG.js → radiogroup.mc-8lw65.js} +3 -3
- package/{scroller.Dqnsxq2M.js → scroller.CgWp2WXG.js} +10 -11
- package/{select.DkKuGI6O.js → select.DTZ6a6Ag.js} +5 -6
- package/{skeleton.DUkBgXxO.js → skeleton.CNJdNVav.js} +10 -10
- package/{skiptocontent.CRQywi6J.js → skiptocontent.BsRpWvyu.js} +4 -4
- package/{slider.BOjqQp9n.js → slider.BMGAihY0.js} +3 -3
- package/{step.C6zDRCBu.js → step.DCQ6CawJ.js} +1 -1
- package/stepper.D7-7BdSv.js +15 -0
- package/styles/scss/ds/index.scss +2 -0
- package/styles/scss/ds/lib/border-width.scss +3 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +65 -21
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +4 -2
- package/styles/scss/ds/lib/ds-internal/_link.scss +23 -3
- package/styles/scss/ds/lib/input.scss +12 -7
- package/styles/scss/ds/lib/link.scss +2 -2
- package/styles/scss/ds/lib/radius.scss +5 -0
- package/{switch.CuNNdrkD.js → switch.tM2XBag8.js} +2 -2
- package/{systemfeedback.Da0wX0Eb.js → systemfeedback.BPPOht_9.js} +1 -1
- package/{tablist.BjKwrLz9.js → tablist.BAm0_UIG.js} +22 -23
- package/{tabpane.7vMXUKFX.js → tabpane.B9rZghU6.js} +1 -1
- package/{tabs.-U2k6Oll.js → tabs.BgTdWbTe.js} +3 -3
- package/text.BEO_ZfJq.js +72 -0
- package/{textarea.BWznY6Gg.js → textarea.Cki-uMkZ.js} +5 -6
- package/{textutility.CBLuAdaa.js → textutility.BypzssPt.js} +2 -2
- package/{toast.D9XLSgJg.js → toast.s0Hfuh5i.js} +2 -2
- package/{toastmanager.V5E05qgI.js → toastmanager.CPIPn4Io.js} +19 -20
- package/{tooltip.a1aWHK00.js → tooltip.BFQG-7VR.js} +1 -1
- package/{topbar.BdGK62KJ.js → topbar.Bbct-XkB.js} +3 -3
- package/utils/translate.d.ts +22 -6
- package/assets/Accordion.DPu2l_Kg.css +0 -1
- package/assets/ActionButton.DcQYatF1.css +0 -1
- package/assets/ActionCard.gRQVVFWz.css +0 -1
- package/assets/ActionLink.B62Aa8y9.css +0 -1
- package/assets/Button.BI6zz6Fw.css +0 -1
- package/assets/Checkbox.DknHnS9a.css +0 -1
- package/assets/Chip.CYhVB1Jh.css +0 -1
- package/assets/CustomReactSelect.lKMLwL7n.css +0 -1
- package/assets/Dialog.BKwWy1g2.css +0 -1
- package/assets/Drawer.IRb7Vc1n.css +0 -1
- package/assets/Fieldset.C4Fx4-UV.css +0 -1
- package/assets/InputFile.ne7gwc_5.css +0 -1
- package/assets/InputNumber.BIdsQuFc.css +0 -1
- package/assets/InputPassword.YSKTDTA1.css +0 -1
- package/assets/InputSearch.C3qtDQcj.css +0 -1
- package/assets/LinkButton.CmEE7Od_.css +0 -1
- package/assets/Notification.BO0Mu9No.css +0 -1
- package/assets/Pagination.OLmfdASf.css +0 -1
- package/assets/Popover.mL5g23EK.css +0 -1
- package/assets/Select.CDP-1_K9.css +0 -1
- package/assets/Slider.Cu7MgNph.css +0 -1
- package/assets/TextUtility.bwkCWEiV.css +0 -1
- package/assets/Textarea.Hsq68tg1.css +0 -1
- package/assets/buttonround.rmUb58WF.css +0 -1
- package/assets/chipgroup.BGxjdSDX.css +0 -1
- package/assets/filelist.cP3O1JeJ.css +0 -1
- package/assets/input.BEBgyvkK.css +0 -1
- package/assets/numberindicator.DSpNPJcs.css +0 -1
- package/assets/progressindicator.Dxrigyne.css +0 -1
- package/assets/radio.DsHt-9om.css +0 -1
- package/assets/switch.fwcMI6o7.css +0 -1
- package/assets/tabpane.o34hshTz.css +0 -1
- package/assets/text.Doa-APfR.css +0 -1
- package/assets/tooltip.DrSplliO.css +0 -1
- package/buttonround.BeQakrPs.js +0 -101
- package/chipgroup.BKjeuuM0.js +0 -213
- package/chunks/Accordion.8kTbiPxs.js +0 -173
- package/chunks/ActionButton.CBV1-_HP.js +0 -188
- package/chunks/ActionLink.BXxDS1Gg.js +0 -161
- package/chunks/Button.COycNYUI.js +0 -160
- package/chunks/Checkbox.CMshaWIU.js +0 -88
- package/chunks/CheckboxGroup.D3D1spfJ.js +0 -79
- package/chunks/Chip.DCJYE513.js +0 -157
- package/chunks/Dialog.lJXxzgu2.js +0 -102
- package/chunks/Fieldset.DOjI3DlI.js +0 -91
- package/chunks/InputFile.DYXvF6vT.js +0 -260
- package/chunks/InputNumber.CkWpchPo.js +0 -240
- package/chunks/InputPassword.21E6XMr5.js +0 -121
- package/chunks/InputSearch.Dy3EKa9f.js +0 -149
- package/chunks/LinkButton.BCHTLFMJ.js +0 -150
- package/chunks/LinkCard.BYmTwsS5.js +0 -197
- package/chunks/Notification.BjyLiO2h.js +0 -91
- package/chunks/Pagination.CJikF9Cw.js +0 -247
- package/chunks/Popover.ByaoNwGK.js +0 -221
- package/chunks/RadioGroup.Bh2X6pT9.js +0 -130
- package/chunks/Select.KWb09VmF.js +0 -147
- package/chunks/Slider.CxnIy51F.js +0 -309
- package/chunks/SystemFeedback.4osheYxC.js +0 -38
- package/chunks/Text.utils.BZ4nTZVu.js +0 -11
- package/chunks/TextUtility.BPrxUX-x.js +0 -82
- package/chunks/Textarea.CAOqZMUi.js +0 -181
- package/chunks/translate.nuU7uChI.js +0 -8
- package/filelist.DfAt2xJa.js +0 -128
- package/filepreview.Defs34bv.js +0 -94
- package/input.ChMzyHej.js +0 -175
- package/inputfile.DZIUs1EC.js +0 -18
- package/inputsearch.DzzYb-C0.js +0 -15
- package/link.aU1f2Xzu.js +0 -81
- package/numberindicator.Q7g4J3Ry.js +0 -36
- package/pagination.DA4PMLOq.js +0 -14
- package/progressindicator.DpmERE8T.js +0 -53
- package/radio.KQ8CUM3_.js +0 -137
- package/stepper.DHl3_XU9.js +0 -16
- package/text.CnP3baHy.js +0 -72
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as N, jsxs as Ae } from "react/jsx-runtime";
|
|
3
|
+
import { d as Be } from "./index.cKLI89Eg.js";
|
|
4
|
+
import { c as D } from "./index.DQOqod3i.js";
|
|
5
|
+
import { isValidElement as fe, useState as _e, useEffect as ve, cloneElement as be } from "react";
|
|
6
|
+
import { f as ze } from "./AriaLiveRegions.utils.xoETe2Ps.js";
|
|
7
|
+
import { D as Ne } from "./Button.CCol--xy.js";
|
|
8
|
+
import { D as De } from "./LinkButton.BxG7fx1O.js";
|
|
9
|
+
import { g as v, r as ge } from "./helpers.CexwVao7.js";
|
|
10
|
+
import { u as Ie } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
11
|
+
import { t as Te } from "./translate.DSb-TdWR.js";
|
|
12
|
+
import '../assets/Pagination.DH71DZ0j.css';const Me = "ds-pagination_list_1u9zx_1", Ce = "ds-pagination_list--center_1u9zx_8", Le = "ds-pagination_list--right_1u9zx_11", Oe = "ds-pagination_item_1u9zx_15", $e = "ds-pagination_item-prev-button-wrapper_1u9zx_19", Fe = "ds-pagination_item-next-button-wrapper_1u9zx_22", Re = "ds-pagination_prev-next-button_1u9zx_26", We = "ds-pagination_prev-next-button--dark_1u9zx_58", Ve = "ds-pagination_page-button_1u9zx_87", je = "ds-pagination_page-button--dark_1u9zx_138", Ge = "ds-pagination_page-button--active_1u9zx_174", Qe = "ds-pagination_page-button--active--dark_1u9zx_201", Ue = "ds-pagination_ellipsis_1u9zx_210", qe = "ds-pagination_ellipsis--dark_1u9zx_217", Ye = "ds-pagination_divider_1u9zx_221", He = "ds-pagination_divider--dark_1u9zx_233", Je = "ds-pagination_wrapper-focus_1u9zx_242", Ke = "ds-pagination_wrapper-focus--dark_1u9zx_270", t = {
|
|
13
|
+
list: Me,
|
|
14
|
+
listCenter: Ce,
|
|
15
|
+
listRight: Le,
|
|
16
|
+
item: Oe,
|
|
17
|
+
itemPrevButtonWrapper: $e,
|
|
18
|
+
itemNextButtonWrapper: Fe,
|
|
19
|
+
prevNextButton: Re,
|
|
20
|
+
prevNextButtonDark: We,
|
|
21
|
+
pageButton: Ve,
|
|
22
|
+
pageButtonDark: je,
|
|
23
|
+
pageButtonActive: Ge,
|
|
24
|
+
pageButtonActiveDark: Qe,
|
|
25
|
+
ellipsis: Ue,
|
|
26
|
+
ellipsisDark: qe,
|
|
27
|
+
divider: Ye,
|
|
28
|
+
dividerDark: He,
|
|
29
|
+
wrapperFocus: Je,
|
|
30
|
+
wrapperFocusDark: Ke
|
|
31
|
+
}, ke = "(max-width: 518px)", xe = "(max-width: 428px)", we = () => typeof window > "u" ? 9 : window.matchMedia(xe).matches ? 5 : window.matchMedia(ke).matches ? 7 : 9, Xe = (s, e, a) => {
|
|
32
|
+
const o = [];
|
|
33
|
+
if (s <= a) {
|
|
34
|
+
for (let i = 0; i < s; i++)
|
|
35
|
+
o.push({
|
|
36
|
+
type: "page",
|
|
37
|
+
pageIndex: i
|
|
38
|
+
});
|
|
39
|
+
return o;
|
|
40
|
+
}
|
|
41
|
+
const g = a - 4;
|
|
42
|
+
let l = e - Math.floor((g - 1) / 2), d = l + g - 1;
|
|
43
|
+
l <= 2 && (l = 1, d = a - 3), d >= s - 3 && (d = s - 2, l = s - a + 2);
|
|
44
|
+
const c = [0];
|
|
45
|
+
for (let i = l; i <= d; i++)
|
|
46
|
+
c.push(i);
|
|
47
|
+
return c.push(s - 1), c.forEach((i, k) => {
|
|
48
|
+
const w = c[k - 1];
|
|
49
|
+
w !== void 0 && i - w > 1 && o.push({
|
|
50
|
+
type: "ellipsis",
|
|
51
|
+
id: `ellipsis-${w}-${i}`
|
|
52
|
+
}), o.push({
|
|
53
|
+
type: "page",
|
|
54
|
+
pageIndex: i
|
|
55
|
+
});
|
|
56
|
+
}), o;
|
|
57
|
+
}, Ze = (s) => {
|
|
58
|
+
const e = [];
|
|
59
|
+
return s.forEach((a, o) => {
|
|
60
|
+
o > 0 && e.push({
|
|
61
|
+
type: "divider",
|
|
62
|
+
id: `divider-${o}`
|
|
63
|
+
}), e.push(a);
|
|
64
|
+
}), e;
|
|
65
|
+
}, et = (s, e, a) => Ze(Xe(s, e, a)), tt = {
|
|
66
|
+
previousPage: "Previous page",
|
|
67
|
+
nextPage: "Next page",
|
|
68
|
+
page: "Page {pageNumber}",
|
|
69
|
+
pageOf: "Page {currentPage} of {totalPages} loaded"
|
|
70
|
+
}, at = {
|
|
71
|
+
previousPage: "Vorherige Seite",
|
|
72
|
+
nextPage: "Nächste Seite",
|
|
73
|
+
page: "Seite {pageNumber}",
|
|
74
|
+
pageOf: "Seite {currentPage} von {totalPages} geladen"
|
|
75
|
+
}, Pe = {
|
|
76
|
+
en: tt,
|
|
77
|
+
de: at
|
|
78
|
+
}, it = ({
|
|
79
|
+
activePageIndex: s,
|
|
80
|
+
aria: e,
|
|
81
|
+
itemsPerPage: a,
|
|
82
|
+
links: o,
|
|
83
|
+
totalItemsCount: g
|
|
84
|
+
}) => {
|
|
85
|
+
if (!e || typeof e != "object" || Object.keys(e).length === 0 || !e["aria-label"] && !e["aria-labelledby"] || e["aria-label"]?.trim() === "" && e["aria-labelledby"]?.trim() === "")
|
|
86
|
+
throw new Error(v("DSPagination", 'A valid "aria-label" or "aria-labelledby" property is required. Ensure the "aria" prop is a non-empty object and includes either "aria-label" or "aria-labelledby" with a non-empty string value.'));
|
|
87
|
+
if (typeof g != "number" || Number.isNaN(g))
|
|
88
|
+
throw new Error(v("DSPagination", ge("totalItemsCount", "DSPagination")));
|
|
89
|
+
if (g < 0)
|
|
90
|
+
throw new Error(v("DSPagination", 'The "totalItemsCount" prop must be zero or a positive number.'));
|
|
91
|
+
if (typeof a != "number" || Number.isNaN(a))
|
|
92
|
+
throw new Error(v("DSPagination", ge("itemsPerPage", "DSPagination")));
|
|
93
|
+
if (a <= 0)
|
|
94
|
+
throw new Error(v("DSPagination", 'The "itemsPerPage" prop must be greater than 0.'));
|
|
95
|
+
if (typeof s != "number" || Number.isNaN(s) || !Number.isInteger(s))
|
|
96
|
+
throw new Error(v("DSPagination", ge("activePageIndex", "DSPagination")));
|
|
97
|
+
const l = Math.max(1, Math.ceil(g / Math.max(1, a)));
|
|
98
|
+
if (s < 0 || s > l - 1)
|
|
99
|
+
throw new Error(v("DSPagination", `The "activePageIndex" must be between 0 and ${l - 1}.`));
|
|
100
|
+
if (o && !Array.isArray(o))
|
|
101
|
+
throw new Error(v("DSPagination", 'The "links" prop must be an array when provided.'));
|
|
102
|
+
Array.isArray(o) && o.forEach(({
|
|
103
|
+
href: d,
|
|
104
|
+
wrapper: c
|
|
105
|
+
}, i) => {
|
|
106
|
+
if (c && !fe(c))
|
|
107
|
+
throw new Error(v("DSPagination", `The link with label "${i + 1}" provided an invalid ReactElement as wrapper property.`));
|
|
108
|
+
c && d && console.warn(v("DSPagination", `The link with label "${i + 1}" has both a wrapper and an href property. Please use only one.`)), c && fe(c) && c.props?.children && console.warn(v("DSPagination", `The link with label "${i + 1}" contains a wrapper with children. Please remove the children, as they will be replaced.`));
|
|
109
|
+
});
|
|
110
|
+
}, ht = (s) => {
|
|
111
|
+
const e = Be.c(82);
|
|
112
|
+
let a, o, g, l, d, c, i, k, w, F, R, j;
|
|
113
|
+
e[0] !== s ? ({
|
|
114
|
+
aria: a,
|
|
115
|
+
activePageIndex: i,
|
|
116
|
+
itemsPerPage: g,
|
|
117
|
+
totalItemsCount: R,
|
|
118
|
+
className: o,
|
|
119
|
+
alignment: k,
|
|
120
|
+
lang: w,
|
|
121
|
+
links: l,
|
|
122
|
+
theme: F,
|
|
123
|
+
translations: j,
|
|
124
|
+
onPageChange: d,
|
|
125
|
+
...c
|
|
126
|
+
} = s, e[0] = s, e[1] = a, e[2] = o, e[3] = g, e[4] = l, e[5] = d, e[6] = c, e[7] = i, e[8] = k, e[9] = w, e[10] = F, e[11] = R, e[12] = j) : (a = e[1], o = e[2], g = e[3], l = e[4], d = e[5], c = e[6], i = e[7], k = e[8], w = e[9], F = e[10], R = e[11], j = e[12]);
|
|
127
|
+
const x = i === void 0 ? 0 : i, he = k === void 0 ? "right" : k, G = w === void 0 ? "en" : w, f = F === void 0 ? "light" : F, m = f === "dark", P = typeof d == "function", [Se, me] = _e(x), r = P ? x : Se, [oe, ye] = _e(we);
|
|
128
|
+
let Q, U;
|
|
129
|
+
e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Q = () => {
|
|
130
|
+
const n = window.matchMedia(ke), p = window.matchMedia(xe), u = () => {
|
|
131
|
+
ye(we());
|
|
132
|
+
};
|
|
133
|
+
return n.addEventListener("change", u), p.addEventListener("change", u), () => {
|
|
134
|
+
n.removeEventListener("change", u), p.removeEventListener("change", u);
|
|
135
|
+
};
|
|
136
|
+
}, U = [], e[13] = Q, e[14] = U) : (Q = e[13], U = e[14]), Ie(Q, U), process.env.NODE_ENV !== "production" && it({
|
|
137
|
+
aria: a,
|
|
138
|
+
itemsPerPage: g,
|
|
139
|
+
totalItemsCount: R,
|
|
140
|
+
activePageIndex: x,
|
|
141
|
+
links: l
|
|
142
|
+
});
|
|
143
|
+
const _ = Math.max(1, Math.ceil(R / Math.max(1, g))), le = j || Pe[G] || Pe.en;
|
|
144
|
+
let q;
|
|
145
|
+
e[15] !== G || e[16] !== le ? (q = Te(le, G), e[15] = G, e[16] = le, e[17] = q) : q = e[17];
|
|
146
|
+
const h = q;
|
|
147
|
+
let Y, H;
|
|
148
|
+
e[18] !== r || e[19] !== h || e[20] !== _ ? (Y = () => {
|
|
149
|
+
const n = h("pageOf", {
|
|
150
|
+
currentPage: r + 1,
|
|
151
|
+
totalPages: _
|
|
152
|
+
});
|
|
153
|
+
ze(n, "DSPagination");
|
|
154
|
+
}, H = [r, _, h], e[18] = r, e[19] = h, e[20] = _, e[21] = Y, e[22] = H) : (Y = e[21], H = e[22]), ve(Y, H);
|
|
155
|
+
let J, K;
|
|
156
|
+
e[23] !== x || e[24] !== P ? (J = () => {
|
|
157
|
+
P || me(x);
|
|
158
|
+
}, K = [x, P], e[23] = x, e[24] = P, e[25] = J, e[26] = K) : (J = e[25], K = e[26]), ve(J, K);
|
|
159
|
+
let X;
|
|
160
|
+
e[27] !== r || e[28] !== _ || e[29] !== oe ? (X = et(_, r, oe), e[27] = r, e[28] = _, e[29] = oe, e[30] = X) : X = e[30];
|
|
161
|
+
const ce = X;
|
|
162
|
+
let Z;
|
|
163
|
+
e[31] !== r || e[32] !== P || e[33] !== d ? (Z = (n, p) => {
|
|
164
|
+
if (!p.defaultPrevented && n !== r) {
|
|
165
|
+
if (P) {
|
|
166
|
+
d?.(n);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
me(n);
|
|
170
|
+
}
|
|
171
|
+
}, e[31] = r, e[32] = P, e[33] = d, e[34] = Z) : Z = e[34];
|
|
172
|
+
const E = Z;
|
|
173
|
+
let ee;
|
|
174
|
+
e[35] !== r || e[36] !== E || e[37] !== l || e[38] !== h || e[39] !== f ? (ee = (n) => {
|
|
175
|
+
const {
|
|
176
|
+
href: p,
|
|
177
|
+
wrapper: u
|
|
178
|
+
} = l?.[n] || {}, L = f === "dark", O = `${n + 1}`, $ = n === r, b = h("page", {
|
|
179
|
+
pageNumber: O
|
|
180
|
+
}), V = $ ? "page" : void 0, se = D(t.pageButton, {
|
|
181
|
+
[t.pageButtonDark]: L,
|
|
182
|
+
[t.pageButtonActive]: $,
|
|
183
|
+
[t.pageButtonActiveDark]: $ && L
|
|
184
|
+
}), S = (Ee) => {
|
|
185
|
+
E(n, Ee);
|
|
186
|
+
}, y = /* @__PURE__ */ N(De, { className: se, size: "small", variant: "ghost", theme: f, href: u ? void 0 : p, "aria-label": u ? void 0 : b, "aria-current": u ? void 0 : V, onClick: u ? void 0 : S, children: O });
|
|
187
|
+
return u ? be(u, {
|
|
188
|
+
"aria-label": b,
|
|
189
|
+
"aria-current": V,
|
|
190
|
+
className: D(u.props.className, t.wrapperFocus, {
|
|
191
|
+
[t.wrapperFocusDark]: L
|
|
192
|
+
}),
|
|
193
|
+
onClick: S,
|
|
194
|
+
children: y
|
|
195
|
+
}) : p ? y : /* @__PURE__ */ N(Ne, { type: "button", className: se, "aria-label": b, "aria-current": V, size: "small", variant: "ghost", theme: f, onClick: S, children: O });
|
|
196
|
+
}, e[35] = r, e[36] = E, e[37] = l, e[38] = h, e[39] = f, e[40] = ee) : ee = e[40];
|
|
197
|
+
const W = ee;
|
|
198
|
+
let te;
|
|
199
|
+
e[41] !== E || e[42] !== l || e[43] !== f ? (te = (n, p, u, L, O) => {
|
|
200
|
+
const {
|
|
201
|
+
href: $,
|
|
202
|
+
wrapper: b
|
|
203
|
+
} = l?.[n] || {}, V = !L && l && ($ || b), se = f === "dark", S = (y) => {
|
|
204
|
+
E(n, y);
|
|
205
|
+
};
|
|
206
|
+
if (V) {
|
|
207
|
+
const y = /* @__PURE__ */ N(De, { className: O, iconName: p, hideLabel: !0, size: "small", variant: "filled", theme: f, href: b ? void 0 : $, onClick: b ? void 0 : S, children: u });
|
|
208
|
+
return b ? be(b, {
|
|
209
|
+
className: D(b.props.className, t.wrapperFocus, {
|
|
210
|
+
[t.wrapperFocusDark]: se
|
|
211
|
+
}),
|
|
212
|
+
children: y,
|
|
213
|
+
onClick: S
|
|
214
|
+
}) : y;
|
|
215
|
+
}
|
|
216
|
+
return /* @__PURE__ */ N(Ne, { type: "button", className: O, iconName: p, disabled: L, hideLabel: !0, variant: "filled", size: "small", theme: f, onClick: S, children: u });
|
|
217
|
+
}, e[41] = E, e[42] = l, e[43] = f, e[44] = te) : te = e[44];
|
|
218
|
+
const A = te, pe = he === "center", ue = he === "right";
|
|
219
|
+
let ae;
|
|
220
|
+
e[45] !== pe || e[46] !== ue ? (ae = D(t.list, {
|
|
221
|
+
[t.listCenter]: pe,
|
|
222
|
+
[t.listRight]: ue
|
|
223
|
+
}), e[45] = pe, e[46] = ue, e[47] = ae) : ae = e[47];
|
|
224
|
+
const de = ae;
|
|
225
|
+
let ie;
|
|
226
|
+
e[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ie = D(t.item, t.itemPrevButtonWrapper), e[48] = ie) : ie = e[48];
|
|
227
|
+
let B;
|
|
228
|
+
e[49] !== r || e[50] !== m || e[51] !== A || e[52] !== h ? (B = A(Math.max(0, r - 1), "chevron-left", h("previousPage"), r === 0, D(t.prevNextButton, {
|
|
229
|
+
[t.prevNextButtonDark]: m
|
|
230
|
+
})), e[49] = r, e[50] = m, e[51] = A, e[52] = h, e[53] = B) : B = e[53];
|
|
231
|
+
let z;
|
|
232
|
+
e[54] !== B ? (z = /* @__PURE__ */ N("li", { className: ie, children: B }), e[54] = B, e[55] = z) : z = e[55];
|
|
233
|
+
let I;
|
|
234
|
+
if (e[56] !== m || e[57] !== ce || e[58] !== W) {
|
|
235
|
+
let n;
|
|
236
|
+
e[60] !== m || e[61] !== W ? (n = (p) => p.type === "page" ? /* @__PURE__ */ N("li", { className: t.item, children: W(p.pageIndex) }, `page-${p.pageIndex}`) : p.type === "ellipsis" ? /* @__PURE__ */ N("li", { className: D(t.item, t.ellipsis, {
|
|
237
|
+
[t.ellipsisDark]: m
|
|
238
|
+
}), "aria-hidden": "true", children: "…" }, p.id) : /* @__PURE__ */ N("li", { className: D(t.divider, {
|
|
239
|
+
[t.dividerDark]: m
|
|
240
|
+
}), "aria-hidden": "true" }, p.id), e[60] = m, e[61] = W, e[62] = n) : n = e[62], I = ce.map(n), e[56] = m, e[57] = ce, e[58] = W, e[59] = I;
|
|
241
|
+
} else
|
|
242
|
+
I = e[59];
|
|
243
|
+
let re;
|
|
244
|
+
e[63] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (re = D(t.item, t.itemNextButtonWrapper), e[63] = re) : re = e[63];
|
|
245
|
+
let T;
|
|
246
|
+
e[64] !== r || e[65] !== m || e[66] !== A || e[67] !== h || e[68] !== _ ? (T = A(Math.min(_ - 1, r + 1), "chevron-right", h("nextPage"), r >= _ - 1, D(t.prevNextButton, {
|
|
247
|
+
[t.prevNextButtonDark]: m
|
|
248
|
+
})), e[64] = r, e[65] = m, e[66] = A, e[67] = h, e[68] = _, e[69] = T) : T = e[69];
|
|
249
|
+
let M;
|
|
250
|
+
e[70] !== T ? (M = /* @__PURE__ */ N("li", { className: re, children: T }), e[70] = T, e[71] = M) : M = e[71];
|
|
251
|
+
let C;
|
|
252
|
+
e[72] !== de || e[73] !== z || e[74] !== I || e[75] !== M ? (C = /* @__PURE__ */ Ae("ul", { className: de, children: [
|
|
253
|
+
z,
|
|
254
|
+
I,
|
|
255
|
+
M
|
|
256
|
+
] }), e[72] = de, e[73] = z, e[74] = I, e[75] = M, e[76] = C) : C = e[76];
|
|
257
|
+
let ne;
|
|
258
|
+
return e[77] !== a || e[78] !== o || e[79] !== c || e[80] !== C ? (ne = /* @__PURE__ */ N("nav", { className: o, ...c, ...a, children: C }), e[77] = a, e[78] = o, e[79] = c, e[80] = C, e[81] = ne) : ne = e[81], ne;
|
|
259
|
+
};
|
|
260
|
+
export {
|
|
261
|
+
ht as D,
|
|
262
|
+
ke as a,
|
|
263
|
+
xe as b,
|
|
264
|
+
Pe as c,
|
|
265
|
+
at as d,
|
|
266
|
+
tt as e,
|
|
267
|
+
Ze as f,
|
|
268
|
+
Xe as g,
|
|
269
|
+
et as h,
|
|
270
|
+
we as i,
|
|
271
|
+
it as v
|
|
272
|
+
};
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as P, jsxs as U, Fragment as te } from "react/jsx-runtime";
|
|
3
|
+
import { d as W } from "./index.cKLI89Eg.js";
|
|
4
|
+
import { useState as $, useRef as re, useMemo as ne, createContext as se, forwardRef as z, isValidElement as ae, cloneElement as ce, useContext as le } from "react";
|
|
5
|
+
import { u as ie, a as pe, o as de, j as ve, s as fe, k as ue, b as he, c as me, d as ge, e as we, f as q, g as De, l as Pe, F as ye, i as Se } from "./floating-ui.react.Chmq0RmI.js";
|
|
6
|
+
import { c as j } from "./index.DQOqod3i.js";
|
|
7
|
+
import { D as Ae } from "./Button.CCol--xy.js";
|
|
8
|
+
import { g as E, c as B } from "./helpers.CexwVao7.js";
|
|
9
|
+
import { u as _e } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
10
|
+
import '../assets/Popover.58Tb0dOt.css';const ke = "ds-popover_popover_y9vkf_5", Ce = "ds-popover_popover--no-arrow_y9vkf_65", xe = "ds-popover_popover--variant-grey_y9vkf_68", Ee = "ds-popover_popover--dark_y9vkf_71", be = "ds-popover_arrow_y9vkf_109", Ne = "ds-popover_arrow--variant-grey_y9vkf_128", Re = "ds-popover_arrow--dark_y9vkf_139", Fe = "ds-popover_default-anchor_y9vkf_185", m = {
|
|
11
|
+
popover: ke,
|
|
12
|
+
popoverNoArrow: Ce,
|
|
13
|
+
popoverVariantGrey: xe,
|
|
14
|
+
popoverDark: Ee,
|
|
15
|
+
arrow: be,
|
|
16
|
+
arrowVariantGrey: Ne,
|
|
17
|
+
arrowDark: Re,
|
|
18
|
+
defaultAnchor: Fe
|
|
19
|
+
}, Te = ({
|
|
20
|
+
initialOpen: r = !1,
|
|
21
|
+
placement: o = "bottom",
|
|
22
|
+
isOpen: e,
|
|
23
|
+
popoverOffset: n = 6,
|
|
24
|
+
showArrow: c = !0,
|
|
25
|
+
theme: i = "light",
|
|
26
|
+
variant: p = "default",
|
|
27
|
+
defaultAnchorButtonProps: d,
|
|
28
|
+
onOpenChange: t
|
|
29
|
+
} = {}) => {
|
|
30
|
+
const [s, f] = $(r), a = e ?? s, l = t ?? f, v = re(null), w = ie({
|
|
31
|
+
placement: o,
|
|
32
|
+
open: a,
|
|
33
|
+
strategy: "fixed",
|
|
34
|
+
onOpenChange: l,
|
|
35
|
+
whileElementsMounted: pe,
|
|
36
|
+
middleware: [de(n + (c ? 7 : 0)), ve({
|
|
37
|
+
// default configuration taken from https://floating-ui.com/docs/flip
|
|
38
|
+
crossAxis: o.includes("-"),
|
|
39
|
+
fallbackAxisSideDirection: "end",
|
|
40
|
+
padding: n
|
|
41
|
+
}), fe({
|
|
42
|
+
padding: n
|
|
43
|
+
}), ...c ? [ue({
|
|
44
|
+
element: v
|
|
45
|
+
})] : []]
|
|
46
|
+
}), u = w.context, x = he(u, {
|
|
47
|
+
enabled: !0
|
|
48
|
+
}), h = me(u), y = ge(u), b = we([x, h, y]);
|
|
49
|
+
return ne(() => ({
|
|
50
|
+
open: a,
|
|
51
|
+
popoverOffset: n,
|
|
52
|
+
setOpen: l,
|
|
53
|
+
arrowRef: v,
|
|
54
|
+
showArrow: c,
|
|
55
|
+
defaultAnchorButtonProps: d,
|
|
56
|
+
theme: i,
|
|
57
|
+
variant: p,
|
|
58
|
+
...b,
|
|
59
|
+
...w
|
|
60
|
+
}), [a, n, l, v, c, d, i, p, b, w]);
|
|
61
|
+
}, Ve = ({
|
|
62
|
+
children: r,
|
|
63
|
+
hasContent: o,
|
|
64
|
+
hasAnchor: e
|
|
65
|
+
}) => {
|
|
66
|
+
if (!r)
|
|
67
|
+
throw new Error(E("DSPopover", "A DSPopover must have children."));
|
|
68
|
+
if (!o && e)
|
|
69
|
+
throw new Error(E("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."));
|
|
70
|
+
if (!e && o)
|
|
71
|
+
throw new Error(E("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."));
|
|
72
|
+
}, Ge = ({
|
|
73
|
+
showArrow: r,
|
|
74
|
+
variant: o
|
|
75
|
+
}) => {
|
|
76
|
+
o === "grey" && r === !1 && console.warn(E("DSPopover", "The 'grey' variant is only available when 'showArrow' is true. To use the 'grey' variant, please ensure that 'showArrow' is set to true."));
|
|
77
|
+
}, J = se(null), K = () => {
|
|
78
|
+
const r = le(J);
|
|
79
|
+
if (r == null)
|
|
80
|
+
throw new Error(E("DSPopover", "Components like DSPopover.Anchor or DSPopover.Content must be wrapped in <DSPopover />."));
|
|
81
|
+
return r;
|
|
82
|
+
}, D = (r) => {
|
|
83
|
+
const o = W.c(11), {
|
|
84
|
+
children: e,
|
|
85
|
+
...n
|
|
86
|
+
} = r, c = Te({
|
|
87
|
+
...n
|
|
88
|
+
}), i = B(e, D.Content), p = B(e, D.Anchor);
|
|
89
|
+
process.env.NODE_ENV !== "production" && (Ve({
|
|
90
|
+
children: e,
|
|
91
|
+
hasContent: i,
|
|
92
|
+
hasAnchor: p
|
|
93
|
+
}), Ge({
|
|
94
|
+
showArrow: n.showArrow,
|
|
95
|
+
variant: n.variant
|
|
96
|
+
}));
|
|
97
|
+
const d = !i && !p && e !== null;
|
|
98
|
+
let t;
|
|
99
|
+
o[0] !== e || o[1] !== d ? (t = d ? /* @__PURE__ */ U(te, { children: [
|
|
100
|
+
/* @__PURE__ */ P(D.Anchor, {}),
|
|
101
|
+
/* @__PURE__ */ P(D.Content, { children: e })
|
|
102
|
+
] }) : e, o[0] = e, o[1] = d, o[2] = t) : t = o[2];
|
|
103
|
+
const s = t, f = i || d, a = p || d;
|
|
104
|
+
let l;
|
|
105
|
+
o[3] !== c || o[4] !== f || o[5] !== a ? (l = {
|
|
106
|
+
...c,
|
|
107
|
+
hasContent: f,
|
|
108
|
+
hasAnchor: a
|
|
109
|
+
}, o[3] = c, o[4] = f, o[5] = a, o[6] = l) : l = o[6];
|
|
110
|
+
const v = l;
|
|
111
|
+
let g;
|
|
112
|
+
return o[7] !== s || o[8] !== v || o[9] !== n ? (g = /* @__PURE__ */ P(J.Provider, { value: v, ...n, children: s }), o[7] = s, o[8] = v, o[9] = n, o[10] = g) : g = o[10], g;
|
|
113
|
+
}, Q = z(({
|
|
114
|
+
children: r,
|
|
115
|
+
...o
|
|
116
|
+
}, e) => {
|
|
117
|
+
const {
|
|
118
|
+
context: n,
|
|
119
|
+
defaultAnchorButtonProps: c,
|
|
120
|
+
refs: i,
|
|
121
|
+
hasAnchor: p,
|
|
122
|
+
theme: d,
|
|
123
|
+
getReferenceProps: t
|
|
124
|
+
} = K(), {
|
|
125
|
+
label: s = "Toggle popover",
|
|
126
|
+
...f
|
|
127
|
+
} = c || {}, a = r ? r?.ref : null, l = q([i.setReference, e, a]);
|
|
128
|
+
return p && r && ae(r) ? ce(r, t({
|
|
129
|
+
ref: l,
|
|
130
|
+
...o,
|
|
131
|
+
...r.props,
|
|
132
|
+
"data-state": n.open ? "open" : "closed"
|
|
133
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
134
|
+
})) : /* @__PURE__ */ P(
|
|
135
|
+
Ae,
|
|
136
|
+
{
|
|
137
|
+
...f,
|
|
138
|
+
ref: l,
|
|
139
|
+
type: "button",
|
|
140
|
+
"data-state": n.open ? "open" : "closed",
|
|
141
|
+
...t(o),
|
|
142
|
+
size: "small",
|
|
143
|
+
hideLabel: !0,
|
|
144
|
+
iconName: "circle-info-inverted",
|
|
145
|
+
variant: "ghost",
|
|
146
|
+
theme: d,
|
|
147
|
+
className: m.defaultAnchor,
|
|
148
|
+
children: r ?? s
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
});
|
|
152
|
+
Q.displayName = "DSPopover.Anchor";
|
|
153
|
+
const X = z((r, o) => {
|
|
154
|
+
const e = W.c(41), {
|
|
155
|
+
style: n,
|
|
156
|
+
className: c,
|
|
157
|
+
classNameArrow: i,
|
|
158
|
+
children: p,
|
|
159
|
+
...d
|
|
160
|
+
} = r, {
|
|
161
|
+
context: t,
|
|
162
|
+
refs: s,
|
|
163
|
+
floatingStyles: f,
|
|
164
|
+
showArrow: a,
|
|
165
|
+
theme: l,
|
|
166
|
+
variant: v,
|
|
167
|
+
getFloatingProps: g,
|
|
168
|
+
arrowRef: w
|
|
169
|
+
} = K();
|
|
170
|
+
let u;
|
|
171
|
+
e[0] !== o || e[1] !== s.setFloating ? (u = [s.setFloating, o], e[0] = o, e[1] = s.setFloating, e[2] = u) : u = e[2];
|
|
172
|
+
const x = q(u), h = l === "dark";
|
|
173
|
+
let y;
|
|
174
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = {
|
|
175
|
+
duration: {
|
|
176
|
+
open: 250,
|
|
177
|
+
close: 250
|
|
178
|
+
}
|
|
179
|
+
}, e[3] = y) : y = e[3];
|
|
180
|
+
const {
|
|
181
|
+
isMounted: b,
|
|
182
|
+
status: T
|
|
183
|
+
} = De(t, y), [Y, Z] = $(null);
|
|
184
|
+
let N;
|
|
185
|
+
e[4] !== s.reference.current ? (N = () => {
|
|
186
|
+
const L = s.reference.current?.closest("dialog");
|
|
187
|
+
Z(L instanceof HTMLDialogElement ? L : null);
|
|
188
|
+
}, e[4] = s.reference.current, e[5] = N) : N = e[5];
|
|
189
|
+
let R;
|
|
190
|
+
if (e[6] !== t.open || e[7] !== s.reference ? (R = [s.reference, t.open], e[6] = t.open, e[7] = s.reference, e[8] = R) : R = e[8], _e(N, R), !b)
|
|
191
|
+
return null;
|
|
192
|
+
const V = Se, G = Y ?? void 0, M = ye, ee = !1;
|
|
193
|
+
let S;
|
|
194
|
+
e[9] !== f || e[10] !== n ? (S = {
|
|
195
|
+
...f,
|
|
196
|
+
...n
|
|
197
|
+
}, e[9] = f, e[10] = n, e[11] = S) : S = e[11];
|
|
198
|
+
const H = !a, I = v === "grey" && a;
|
|
199
|
+
let A;
|
|
200
|
+
e[12] !== c || e[13] !== h || e[14] !== H || e[15] !== I ? (A = j(m.popover, c, {
|
|
201
|
+
[m.popoverDark]: h,
|
|
202
|
+
[m.popoverNoArrow]: H,
|
|
203
|
+
[m.popoverVariantGrey]: I
|
|
204
|
+
}), e[12] = c, e[13] = h, e[14] = H, e[15] = I, e[16] = A) : A = e[16];
|
|
205
|
+
const oe = t.placement, O = g(d);
|
|
206
|
+
let _;
|
|
207
|
+
e[17] !== w || e[18] !== i || e[19] !== t || e[20] !== h || e[21] !== a || e[22] !== v ? (_ = a && /* @__PURE__ */ P(Pe, { ref: w, context: t, className: j(m.arrow, i, {
|
|
208
|
+
[m.arrowDark]: h,
|
|
209
|
+
[m.arrowVariantGrey]: v === "grey" && a
|
|
210
|
+
}), strokeWidth: 1, tipRadius: 1, width: 16, height: 7 }), e[17] = w, e[18] = i, e[19] = t, e[20] = h, e[21] = a, e[22] = v, e[23] = _) : _ = e[23];
|
|
211
|
+
let k;
|
|
212
|
+
e[24] !== p || e[25] !== t.placement || e[26] !== x || e[27] !== T || e[28] !== A || e[29] !== O || e[30] !== _ || e[31] !== S ? (k = /* @__PURE__ */ U("div", { ref: x, style: S, className: A, "data-placement": oe, "data-status": T, ...O, children: [
|
|
213
|
+
_,
|
|
214
|
+
p
|
|
215
|
+
] }), e[24] = p, e[25] = t.placement, e[26] = x, e[27] = T, e[28] = A, e[29] = O, e[30] = _, e[31] = S, e[32] = k) : k = e[32];
|
|
216
|
+
let C;
|
|
217
|
+
e[33] !== M || e[34] !== t || e[35] !== k ? (C = /* @__PURE__ */ P(M, { context: t, modal: ee, children: k }), e[33] = M, e[34] = t, e[35] = k, e[36] = C) : C = e[36];
|
|
218
|
+
let F;
|
|
219
|
+
return e[37] !== V || e[38] !== C || e[39] !== G ? (F = /* @__PURE__ */ P(V, { root: G, children: C }), e[37] = V, e[38] = C, e[39] = G, e[40] = F) : F = e[40], F;
|
|
220
|
+
});
|
|
221
|
+
X.displayName = "DSPopover.Content";
|
|
222
|
+
D.Anchor = Q;
|
|
223
|
+
D.Content = X;
|
|
224
|
+
D.displayName = "DSPopover";
|
|
225
|
+
export {
|
|
226
|
+
D,
|
|
227
|
+
Ge as a,
|
|
228
|
+
Te as u,
|
|
229
|
+
Ve as v
|
|
230
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as Z } from "react/jsx-runtime";
|
|
3
|
+
import { d as io } from "./index.cKLI89Eg.js";
|
|
4
|
+
import { c as eo } from "./index.DQOqod3i.js";
|
|
5
|
+
import { forwardRef as so, useState as ao } from "react";
|
|
6
|
+
import { D as no } from "./Fieldset.BBMuLKps.js";
|
|
7
|
+
import { DSRadio as lo } from "../radio.DjToa2aV.js";
|
|
8
|
+
import { g as v, r as oo } from "./helpers.CexwVao7.js";
|
|
9
|
+
import '../assets/RadioGroup.q1lQ-HIZ.css';const co = "ds-radio-group_fieldset--custom-area-above_1r3gv_1", uo = "ds-radio-group_root_1r3gv_5", po = "ds-radio-group_root--horizontal_1r3gv_13", vo = "ds-radio-group_root--invalid_1r3gv_16", ho = "ds-radio-group_root--custom-area-above_1r3gv_19", mo = "ds-radio-group_root--custom-area-above--horizontal_1r3gv_26", z = {
|
|
10
|
+
fieldsetCustomAreaAbove: co,
|
|
11
|
+
root: uo,
|
|
12
|
+
rootHorizontal: po,
|
|
13
|
+
rootInvalid: vo,
|
|
14
|
+
rootCustomAreaAbove: ho,
|
|
15
|
+
rootCustomAreaAboveHorizontal: mo
|
|
16
|
+
}, fo = (s) => s.some(({
|
|
17
|
+
hint: r
|
|
18
|
+
}) => !!r), go = (s) => s.some(({
|
|
19
|
+
customArea: r,
|
|
20
|
+
isCustomAreaAbove: o
|
|
21
|
+
}) => !!r && !o), $ = (s) => s.some(({
|
|
22
|
+
customArea: r,
|
|
23
|
+
isCustomAreaAbove: o
|
|
24
|
+
}) => !!r && o), Ao = ({
|
|
25
|
+
legend: s,
|
|
26
|
+
name: r,
|
|
27
|
+
options: o,
|
|
28
|
+
description: G,
|
|
29
|
+
direction: a,
|
|
30
|
+
hideLegend: A,
|
|
31
|
+
hideUncheckedHints: n,
|
|
32
|
+
id: t,
|
|
33
|
+
popoverContent: l,
|
|
34
|
+
systemFeedback: d
|
|
35
|
+
}) => {
|
|
36
|
+
if (!t && (G || d))
|
|
37
|
+
throw new Error(v("DSRadioGroup", 'A unique "id" prop is required when providing the description or systemFeedback property. Please add a unique "id" prop to the DSRadioGroup component.'));
|
|
38
|
+
if (!s)
|
|
39
|
+
throw new Error(v("DSRadioGroup", oo("legend", "DSRadioGroup")));
|
|
40
|
+
if (!r)
|
|
41
|
+
throw new Error(v("DSRadioGroup", oo("name", "DSRadioGroup")));
|
|
42
|
+
if (Array.isArray(o)) {
|
|
43
|
+
if (o.length === 0)
|
|
44
|
+
throw new Error(v("DSRadioGroup", "The options array must not be empty."));
|
|
45
|
+
} else throw new Error(v("DSRadioGroup", oo("options", "DSRadioGroup")));
|
|
46
|
+
if (a === "horizontal" && go(o))
|
|
47
|
+
throw new Error(v("DSRadioGroup", "Horizontal direction is not possible when options contain a custom area without isCustomAreaAbove set to true. Please remove custom areas, change direction property to 'vertical' or set isCustomAreaAbove to true."));
|
|
48
|
+
a === "horizontal" && n && console.warn(v("DSRadioGroup", "Setting 'hideUncheckedHints' to 'true' is not possible when direction is 'horizontal'. Please remove 'hideUncheckedHints' or change direction property to 'vertical'.")), A && l && console.warn(v("DSRadioGroup", 'Setting "hideLegend" and "popoverContent" at the same time is not supported. The popover info button is part of the legend and will be hidden along with it. Please remove either "hideLegend" or "popoverContent".'));
|
|
49
|
+
}, bo = so((s, r) => {
|
|
50
|
+
const o = io.c(73), G = s;
|
|
51
|
+
let a, A, n, t, l, d, h, e, m, b, C, u, R, y, E, k, N, P, q, x;
|
|
52
|
+
o[0] !== G ? ({
|
|
53
|
+
legend: l,
|
|
54
|
+
name: d,
|
|
55
|
+
options: e,
|
|
56
|
+
className: a,
|
|
57
|
+
defaultValue: A,
|
|
58
|
+
description: n,
|
|
59
|
+
direction: R,
|
|
60
|
+
disabled: y,
|
|
61
|
+
hideLegend: E,
|
|
62
|
+
hideUncheckedHints: k,
|
|
63
|
+
id: t,
|
|
64
|
+
invalid: N,
|
|
65
|
+
popoverContent: m,
|
|
66
|
+
popoverInfoButtonProps: b,
|
|
67
|
+
required: P,
|
|
68
|
+
systemFeedback: u,
|
|
69
|
+
theme: q,
|
|
70
|
+
value: x,
|
|
71
|
+
onChange: h,
|
|
72
|
+
...C
|
|
73
|
+
} = G, o[0] = G, o[1] = a, o[2] = A, o[3] = n, o[4] = t, o[5] = l, o[6] = d, o[7] = h, o[8] = e, o[9] = m, o[10] = b, o[11] = C, o[12] = u, o[13] = R, o[14] = y, o[15] = E, o[16] = k, o[17] = N, o[18] = P, o[19] = q, o[20] = x) : (a = o[1], A = o[2], n = o[3], t = o[4], l = o[5], d = o[6], h = o[7], e = o[8], m = o[9], b = o[10], C = o[11], u = o[12], R = o[13], y = o[14], E = o[15], k = o[16], N = o[17], P = o[18], q = o[19], x = o[20]);
|
|
74
|
+
const p = R === void 0 ? "vertical" : R, c = y === void 0 ? !1 : y, I = E === void 0 ? !1 : E, f = k === void 0 ? !1 : k, g = N === void 0 ? !1 : N, S = P === void 0 ? !1 : P, w = q === void 0 ? "light" : q;
|
|
75
|
+
process.env.NODE_ENV !== "production" && Ao({
|
|
76
|
+
legend: l,
|
|
77
|
+
name: d,
|
|
78
|
+
options: e,
|
|
79
|
+
description: n,
|
|
80
|
+
direction: p,
|
|
81
|
+
hideLegend: I,
|
|
82
|
+
hideUncheckedHints: f,
|
|
83
|
+
id: t,
|
|
84
|
+
popoverContent: m,
|
|
85
|
+
systemFeedback: u
|
|
86
|
+
});
|
|
87
|
+
const [to, ro] = ao(A), U = x !== void 0, L = U ? x : to;
|
|
88
|
+
let B;
|
|
89
|
+
o[21] !== a || o[22] !== e ? (B = eo({
|
|
90
|
+
[z.fieldsetCustomAreaAbove]: $(e)
|
|
91
|
+
}, a), o[21] = a, o[22] = e, o[23] = B) : B = o[23];
|
|
92
|
+
const j = B, W = p === "horizontal", J = g && !!u;
|
|
93
|
+
let F;
|
|
94
|
+
o[24] !== p || o[25] !== e || o[26] !== J || o[27] !== W ? (F = eo(z.root, {
|
|
95
|
+
[z.rootHorizontal]: W,
|
|
96
|
+
[z.rootInvalid]: J,
|
|
97
|
+
[z.rootCustomAreaAbove]: $(e),
|
|
98
|
+
[z.rootCustomAreaAboveHorizontal]: $(e) && p === "horizontal"
|
|
99
|
+
}), o[24] = p, o[25] = e, o[26] = J, o[27] = W, o[28] = F) : F = o[28];
|
|
100
|
+
const K = F;
|
|
101
|
+
let V;
|
|
102
|
+
o[29] !== c || o[30] !== U || o[31] !== h ? (V = (i) => {
|
|
103
|
+
if (c) {
|
|
104
|
+
i.preventDefault();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
U || ro(i.target.value), h && h(i);
|
|
108
|
+
}, o[29] = c, o[30] = U, o[31] = h, o[32] = V) : V = o[32];
|
|
109
|
+
const Q = V;
|
|
110
|
+
let M;
|
|
111
|
+
o[33] !== f || o[34] !== e ? (M = fo(e) && !f, o[33] = f, o[34] = e, o[35] = M) : M = o[35];
|
|
112
|
+
const X = M;
|
|
113
|
+
let O;
|
|
114
|
+
o[36] !== w ? (O = {
|
|
115
|
+
theme: w
|
|
116
|
+
}, o[36] = w, o[37] = O) : O = o[37];
|
|
117
|
+
const Y = O;
|
|
118
|
+
let D;
|
|
119
|
+
o[38] !== p || o[39] !== e ? (D = $(e) && p === "horizontal" ? {
|
|
120
|
+
maxWidth: `calc(${e.length * 400}px + var(--ds-spacing-dynamic-xs))`
|
|
121
|
+
} : void 0, o[38] = p, o[39] = e, o[40] = D) : D = o[40];
|
|
122
|
+
let _;
|
|
123
|
+
o[41] !== X || o[42] !== L || o[43] !== c || o[44] !== f || o[45] !== t || o[46] !== g || o[47] !== d || o[48] !== e || o[49] !== r || o[50] !== S || o[51] !== w ? (_ = e.map((i) => /* @__PURE__ */ Z(lo, { name: d, checked: i.value === L, disabled: c, fieldsetId: t, hideUncheckedHint: f, hint: i.hint, invalid: g, isBold: X, required: S, ref: i.value === L ? r : null, theme: w, ...i }, t + i.label + i.value + i.hint)), o[41] = X, o[42] = L, o[43] = c, o[44] = f, o[45] = t, o[46] = g, o[47] = d, o[48] = e, o[49] = r, o[50] = S, o[51] = w, o[52] = _) : _ = o[52];
|
|
124
|
+
let H;
|
|
125
|
+
o[53] !== K || o[54] !== D || o[55] !== _ ? (H = /* @__PURE__ */ Z("div", { className: K, style: D, children: _ }), o[53] = K, o[54] = D, o[55] = _, o[56] = H) : H = o[56];
|
|
126
|
+
let T;
|
|
127
|
+
return o[57] !== n || o[58] !== c || o[59] !== j || o[60] !== Q || o[61] !== I || o[62] !== t || o[63] !== g || o[64] !== l || o[65] !== m || o[66] !== b || o[67] !== S || o[68] !== C || o[69] !== u || o[70] !== Y || o[71] !== H ? (T = /* @__PURE__ */ Z(no, { id: t, legend: l, className: j, description: n, disabled: c, hideLegend: I, required: S, invalid: g, systemFeedback: u, popoverContent: m, popoverInfoButtonProps: b, ...Y, ...C, role: "radiogroup", onChange: Q, children: H }), o[57] = n, o[58] = c, o[59] = j, o[60] = Q, o[61] = I, o[62] = t, o[63] = g, o[64] = l, o[65] = m, o[66] = b, o[67] = S, o[68] = C, o[69] = u, o[70] = Y, o[71] = H, o[72] = T) : T = o[72], T;
|
|
128
|
+
});
|
|
129
|
+
bo.displayName = "DSRadioGroup";
|
|
130
|
+
export {
|
|
131
|
+
bo as D,
|
|
132
|
+
go as a,
|
|
133
|
+
fo as b,
|
|
134
|
+
$ as o,
|
|
135
|
+
Ao as v
|
|
136
|
+
};
|