@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,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { c as k } from "./index.DQOqod3i.js";
|
|
4
|
+
import { forwardRef as L, useRef as V, useState as $, useEffect as A, useCallback as O } from "react";
|
|
5
|
+
import { D as C } from "./Icon.DYtaQgbw.js";
|
|
6
|
+
import { D as G } from "./SystemFeedback.DhWcYjnu.js";
|
|
7
|
+
import { g as v } from "./helpers.CexwVao7.js";
|
|
8
|
+
import { u as T } from "./useBreakpoint.1txsny17.js";
|
|
9
|
+
import '../assets/Checkbox.C6RWhy0V.css';const U = "ds-checkbox_root_1fk9p_1", z = "ds-checkbox_root--disabled_1fk9p_21", J = "ds-checkbox_root--dark_1fk9p_24", K = "ds-checkbox_checkbox_1fk9p_48", Q = "ds-checkbox_icon-check_1fk9p_64", R = "ds-checkbox_icon-minus_1fk9p_65", W = "ds-checkbox_checkbox--dark_1fk9p_89", X = "ds-checkbox_checkbox--invalid_1fk9p_130", Y = "ds-checkbox_label--hidden_1fk9p_139", Z = "ds-checkbox_input_1fk9p_152", ee = "ds-checkbox_label_1fk9p_139", ce = "ds-checkbox_input--dark_1fk9p_265", oe = "ds-checkbox_feedback_1fk9p_338", e = {
|
|
10
|
+
root: U,
|
|
11
|
+
rootDisabled: z,
|
|
12
|
+
rootDark: J,
|
|
13
|
+
checkbox: K,
|
|
14
|
+
iconCheck: Q,
|
|
15
|
+
iconMinus: R,
|
|
16
|
+
checkboxDark: W,
|
|
17
|
+
checkboxInvalid: X,
|
|
18
|
+
labelHidden: Y,
|
|
19
|
+
input: Z,
|
|
20
|
+
label: ee,
|
|
21
|
+
inputDark: ce,
|
|
22
|
+
feedback: oe
|
|
23
|
+
}, ae = ({
|
|
24
|
+
label: t,
|
|
25
|
+
id: o,
|
|
26
|
+
invalid: s,
|
|
27
|
+
systemFeedback: i
|
|
28
|
+
}) => {
|
|
29
|
+
if (!t)
|
|
30
|
+
throw new Error(v("DSCheckbox", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSCheckbox component. If you don't want to display a label, set hideLabel={true}.`));
|
|
31
|
+
if (i && s && !o)
|
|
32
|
+
throw new Error(v("DSCheckbox", `A unique "id" prop is required when passing in the systemFeedback prop and setting invalid to true. Please add a unique "id" prop to the DSCheckbox component with label: "${t}".`));
|
|
33
|
+
}, se = L((t, o) => {
|
|
34
|
+
const {
|
|
35
|
+
label: s,
|
|
36
|
+
checkboxGroupId: i,
|
|
37
|
+
checked: _,
|
|
38
|
+
className: y,
|
|
39
|
+
defaultChecked: N = !1,
|
|
40
|
+
disabled: r = !1,
|
|
41
|
+
hideLabel: g = !1,
|
|
42
|
+
id: b,
|
|
43
|
+
indeterminate: m = !1,
|
|
44
|
+
invalid: a = !1,
|
|
45
|
+
systemFeedback: d,
|
|
46
|
+
theme: x = "light",
|
|
47
|
+
onChange: h,
|
|
48
|
+
...S
|
|
49
|
+
} = t;
|
|
50
|
+
process.env.NODE_ENV !== "production" && ae({
|
|
51
|
+
label: s,
|
|
52
|
+
id: b,
|
|
53
|
+
invalid: a,
|
|
54
|
+
systemFeedback: d
|
|
55
|
+
});
|
|
56
|
+
const p = x === "dark", l = V(null), [w, I] = $(N), E = T(g);
|
|
57
|
+
A(() => {
|
|
58
|
+
l && l.current && (l.current.indeterminate = m);
|
|
59
|
+
}, [m]);
|
|
60
|
+
const u = _ !== void 0, q = u ? _ : w, D = `${b}-feedback`, F = [a && d && D, a && i && `${i}-feedback`].filter(Boolean).join(" ") || void 0, M = k(e.root, {
|
|
61
|
+
[e.rootDark]: p,
|
|
62
|
+
[e.rootDisabled]: r
|
|
63
|
+
}), P = k(e.label, {
|
|
64
|
+
// hide label only visually to keep them available for assistive technologies
|
|
65
|
+
[e.labelHidden]: E
|
|
66
|
+
}), j = k(e.checkbox, {
|
|
67
|
+
[e.checkboxDark]: p,
|
|
68
|
+
[e.checkboxInvalid]: a
|
|
69
|
+
}), B = k(e.input, {
|
|
70
|
+
[e.inputDark]: p
|
|
71
|
+
}), H = O((c) => {
|
|
72
|
+
if (r) {
|
|
73
|
+
c.preventDefault();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
u || I(c.target.checked), h && h(c);
|
|
77
|
+
}, [r, u, h]);
|
|
78
|
+
return /* @__PURE__ */ f("div", { className: y, children: [
|
|
79
|
+
/* @__PURE__ */ f("label", { className: M, children: [
|
|
80
|
+
/* @__PURE__ */ n("input", { id: b, type: "checkbox", className: B, ref: (c) => {
|
|
81
|
+
typeof o == "function" ? o(c) : o !== null && (o.current = c), l.current = c;
|
|
82
|
+
}, ...S, checked: q, disabled: r, "aria-label": s, "aria-describedby": F, "aria-invalid": a, onChange: H }),
|
|
83
|
+
/* @__PURE__ */ f("div", { className: j, children: [
|
|
84
|
+
/* @__PURE__ */ n(C, { name: "check", className: e.iconCheck, "aria-hidden": "true" }),
|
|
85
|
+
/* @__PURE__ */ n(C, { name: "minus", className: e.iconMinus, "aria-hidden": "true" })
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ n("span", { className: P, children: s })
|
|
88
|
+
] }),
|
|
89
|
+
a && d && /* @__PURE__ */ n(G, { id: D, variant: "error", className: e.feedback, message: d, theme: x })
|
|
90
|
+
] });
|
|
91
|
+
});
|
|
92
|
+
se.displayName = "DSCheckbox";
|
|
93
|
+
export {
|
|
94
|
+
se as D,
|
|
95
|
+
ae as v
|
|
96
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as L } from "react/jsx-runtime";
|
|
3
|
+
import { d as H } from "./index.cKLI89Eg.js";
|
|
4
|
+
import { c as O } from "./index.DQOqod3i.js";
|
|
5
|
+
import { D as T } from "./Fieldset.BBMuLKps.js";
|
|
6
|
+
import P from "react";
|
|
7
|
+
import { D as V } from "./Checkbox.BxOGR1bR.js";
|
|
8
|
+
import { g as x, r as $ } from "./helpers.CexwVao7.js";
|
|
9
|
+
import '../assets/CheckboxGroup.Dd-Huo7x.css';const j = "ds-checkbox-group_root_12fot_1", M = "ds-checkbox-group_root--horizontal_12fot_9", R = "ds-checkbox-group_root--invalid_12fot_12", I = {
|
|
10
|
+
root: j,
|
|
11
|
+
rootHorizontal: M,
|
|
12
|
+
rootInvalid: R
|
|
13
|
+
}, A = ({
|
|
14
|
+
children: k,
|
|
15
|
+
description: e,
|
|
16
|
+
hideLegend: p,
|
|
17
|
+
id: t,
|
|
18
|
+
legend: s,
|
|
19
|
+
popoverContent: r,
|
|
20
|
+
systemFeedback: i
|
|
21
|
+
}) => {
|
|
22
|
+
if (!t && (e || i))
|
|
23
|
+
throw new Error(x("DSCheckboxGroup", 'A unique "id" prop is required when providing the description or systemFeedback property. Please add a unique "id" prop to the DSCheckboxGroup component.'));
|
|
24
|
+
if (!s)
|
|
25
|
+
throw new Error(x("DSCheckboxGroup", $("legend", "DSCheckboxGroup")));
|
|
26
|
+
if (!k)
|
|
27
|
+
throw new Error(x("DSCheckboxGroup", "The component requires DSCheckbox components to be explicitly set as its children. Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group."));
|
|
28
|
+
p && r && console.warn(x("DSCheckboxGroup", '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".')), P.Children.forEach(k, (o) => {
|
|
29
|
+
if (!P.isValidElement(o) || // Object.keys(child.type)[1] !== '_payload' checks if the object is currently in a hydration phase
|
|
30
|
+
o.type !== V && Object.keys(o.type)[1] !== "_payload") {
|
|
31
|
+
const n = P.isValidElement(o) ? `Currently you are passing a child of type: ${JSON.stringify(o.type)}.` : "Currently you are passing an invalid React element.";
|
|
32
|
+
throw new Error(x("DSCheckboxGroup", `The component requires the children to be DSCheckbox elements. ${n} Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group.`));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}, Y = (k) => {
|
|
36
|
+
const e = H.c(39), p = k;
|
|
37
|
+
let t, s, r, i, o, n, l, a, c, h, u, m, f, b, v;
|
|
38
|
+
e[0] !== p ? ({
|
|
39
|
+
children: t,
|
|
40
|
+
legend: o,
|
|
41
|
+
className: s,
|
|
42
|
+
description: r,
|
|
43
|
+
direction: h,
|
|
44
|
+
disabled: u,
|
|
45
|
+
hideLegend: m,
|
|
46
|
+
id: i,
|
|
47
|
+
invalid: f,
|
|
48
|
+
popoverContent: n,
|
|
49
|
+
popoverInfoButtonProps: l,
|
|
50
|
+
required: b,
|
|
51
|
+
systemFeedback: c,
|
|
52
|
+
theme: v,
|
|
53
|
+
...a
|
|
54
|
+
} = p, e[0] = p, e[1] = t, e[2] = s, e[3] = r, e[4] = i, e[5] = o, e[6] = n, e[7] = l, e[8] = a, e[9] = c, e[10] = h, e[11] = u, e[12] = m, e[13] = f, e[14] = b, e[15] = v) : (t = e[1], s = e[2], r = e[3], i = e[4], o = e[5], n = e[6], l = e[7], a = e[8], c = e[9], h = e[10], u = e[11], m = e[12], f = e[13], b = e[14], v = e[15]);
|
|
55
|
+
const F = h === void 0 ? "vertical" : h, w = u === void 0 ? !1 : u, g = m === void 0 ? !1 : m, C = f === void 0 ? !1 : f, _ = b === void 0 ? !1 : b, E = v === void 0 ? "light" : v;
|
|
56
|
+
process.env.NODE_ENV !== "production" && A({
|
|
57
|
+
children: t,
|
|
58
|
+
description: r,
|
|
59
|
+
hideLegend: g,
|
|
60
|
+
id: i,
|
|
61
|
+
legend: o,
|
|
62
|
+
popoverContent: n,
|
|
63
|
+
systemFeedback: c
|
|
64
|
+
});
|
|
65
|
+
const G = F === "horizontal", q = C && !!c;
|
|
66
|
+
let D;
|
|
67
|
+
e[16] !== G || e[17] !== q ? (D = O(I.root, {
|
|
68
|
+
[I.rootHorizontal]: G,
|
|
69
|
+
[I.rootInvalid]: q
|
|
70
|
+
}), e[16] = G, e[17] = q, e[18] = D) : D = e[18];
|
|
71
|
+
const N = D;
|
|
72
|
+
let S;
|
|
73
|
+
e[19] !== E ? (S = {
|
|
74
|
+
theme: E
|
|
75
|
+
}, e[19] = E, e[20] = S) : S = e[20];
|
|
76
|
+
const z = S;
|
|
77
|
+
let d;
|
|
78
|
+
e[21] !== t || e[22] !== N ? (d = /* @__PURE__ */ L("div", { className: N, children: t }), e[21] = t, e[22] = N, e[23] = d) : d = e[23];
|
|
79
|
+
let y;
|
|
80
|
+
return e[24] !== s || e[25] !== r || e[26] !== w || e[27] !== g || e[28] !== i || e[29] !== C || e[30] !== o || e[31] !== n || e[32] !== l || e[33] !== _ || e[34] !== a || e[35] !== c || e[36] !== z || e[37] !== d ? (y = /* @__PURE__ */ L(T, { id: i, legend: o, className: s, description: r, disabled: w, hideLegend: g, required: _, invalid: C, systemFeedback: c, popoverContent: n, popoverInfoButtonProps: l, ...z, ...a, children: d }), e[24] = s, e[25] = r, e[26] = w, e[27] = g, e[28] = i, e[29] = C, e[30] = o, e[31] = n, e[32] = l, e[33] = _, e[34] = a, e[35] = c, e[36] = z, e[37] = d, e[38] = y) : y = e[38], y;
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
Y as D,
|
|
84
|
+
A as v
|
|
85
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as O, jsx as I } from "react/jsx-runtime";
|
|
3
|
+
import { d as j } from "./index.cKLI89Eg.js";
|
|
4
|
+
import { c as B } from "./index.DQOqod3i.js";
|
|
5
|
+
import { forwardRef as W } from "react";
|
|
6
|
+
import { D as q } from "./Icon.DYtaQgbw.js";
|
|
7
|
+
import { Tooltip as z } from "../tooltip.BFQG-7VR.js";
|
|
8
|
+
import { g as x, r as H } from "./helpers.CexwVao7.js";
|
|
9
|
+
import { t as Z } from "./translate.DSb-TdWR.js";
|
|
10
|
+
import '../assets/Chip.DfamkUPw.css';const J = "ds-chip-group_chip_kwgno_1", K = "ds-chip-group_chip--small_kwgno_30", Q = "ds-chip-group_chip--dark_kwgno_133", F = {
|
|
11
|
+
chip: J,
|
|
12
|
+
chipSmall: K,
|
|
13
|
+
chipDark: Q
|
|
14
|
+
}, pe = ({
|
|
15
|
+
chips: t,
|
|
16
|
+
id: l,
|
|
17
|
+
label: e
|
|
18
|
+
}) => {
|
|
19
|
+
if (!Array.isArray(t))
|
|
20
|
+
throw new Error(x("DSChipGroup", H("chips", "DSChipGroup")));
|
|
21
|
+
if (!l)
|
|
22
|
+
throw new Error(x("DSChipGroup", 'A unique "id" prop is required when providing the description or systemFeedback property. Please add a unique "id" prop to the DSChipGroup component.'));
|
|
23
|
+
if (!e)
|
|
24
|
+
throw new Error(x("DSChipGroup", H("label", "DSChipGroup")));
|
|
25
|
+
}, de = ["medium", "small"], V = {
|
|
26
|
+
disabled: "disabled",
|
|
27
|
+
selected: "selected",
|
|
28
|
+
notSelected: "not selected",
|
|
29
|
+
removed: "removed",
|
|
30
|
+
selectChip: "press space to {action}",
|
|
31
|
+
unselectAction: "unselect",
|
|
32
|
+
selectAction: "select",
|
|
33
|
+
addToSelection: "add this option to selection",
|
|
34
|
+
removeFromSelection: "remove this option from selection",
|
|
35
|
+
removeChip: "press Backspace to remove the currently focused value",
|
|
36
|
+
tooltipDisabled: "Disabled",
|
|
37
|
+
tooltipRemovable: "Remove filter",
|
|
38
|
+
tooltipDeactivate: "Deactivate property",
|
|
39
|
+
tooltipActivate: "Activate property",
|
|
40
|
+
countSelected: "{count, plural, one {# item selected} other {# items selected}}",
|
|
41
|
+
countRemaining: "{count, plural, one {# item remaining} other {# items remaining}}"
|
|
42
|
+
}, X = {
|
|
43
|
+
disabled: "deaktiviert",
|
|
44
|
+
selected: "ausgewählt",
|
|
45
|
+
notSelected: "nicht ausgewählt",
|
|
46
|
+
removed: "entfernt",
|
|
47
|
+
selectChip: "drücke Leertaste, um {action}",
|
|
48
|
+
unselectAction: "abzuwählen",
|
|
49
|
+
selectAction: "auszuwählen",
|
|
50
|
+
addToSelection: "diese Option zur Auswahl hinzuzufügen",
|
|
51
|
+
removeFromSelection: "diese Option aus der Auswahl zu entfernen",
|
|
52
|
+
removeChip: "drücke Backspace, um den aktuell fokussierten Wert zu entfernen",
|
|
53
|
+
tooltipDisabled: "Deaktiviert",
|
|
54
|
+
tooltipRemovable: "Filter entfernen",
|
|
55
|
+
tooltipDeactivate: "Eigenschaft deaktivieren",
|
|
56
|
+
tooltipActivate: "Eigenschaft aktivieren",
|
|
57
|
+
countSelected: "{count, plural, one {# Element ausgewählt} other {# Elemente ausgewählt}}",
|
|
58
|
+
countRemaining: "{count, plural, one {# Element verbleibend} other {# Elemente verbleibend}}"
|
|
59
|
+
}, U = {
|
|
60
|
+
en: V,
|
|
61
|
+
de: X
|
|
62
|
+
}, Y = (t, l, e, i, a, r) => {
|
|
63
|
+
if (e)
|
|
64
|
+
return `${l}, ${t("disabled")}`;
|
|
65
|
+
if (r)
|
|
66
|
+
return `${l}, ${t("removeChip")}`;
|
|
67
|
+
{
|
|
68
|
+
const c = t(a === "single" ? i ? "unselectAction" : "selectAction" : i ? "removeFromSelection" : "addToSelection");
|
|
69
|
+
return `${l}, ${i ? `${t("selected")}, ` : ""}${t("selectChip", {
|
|
70
|
+
action: c
|
|
71
|
+
})}`;
|
|
72
|
+
}
|
|
73
|
+
}, ee = (t, l, e, i) => t(i ? "tooltipRemovable" : l ? "tooltipDisabled" : e ? "tooltipDeactivate" : "tooltipActivate"), te = W((t, l) => {
|
|
74
|
+
const e = j.c(54);
|
|
75
|
+
let i, a, r, c, o, p, n, m, h, u, f, _, C, A, v, S;
|
|
76
|
+
e[0] !== t ? ({
|
|
77
|
+
id: c,
|
|
78
|
+
label: n,
|
|
79
|
+
disableTooltips: i,
|
|
80
|
+
groupId: a,
|
|
81
|
+
isRemovable: o,
|
|
82
|
+
selectionMode: u,
|
|
83
|
+
disabled: _,
|
|
84
|
+
iconName: r,
|
|
85
|
+
isSelected: p,
|
|
86
|
+
lang: C,
|
|
87
|
+
size: f,
|
|
88
|
+
tabIndex: v,
|
|
89
|
+
theme: A,
|
|
90
|
+
translations: S,
|
|
91
|
+
onClick: m,
|
|
92
|
+
...h
|
|
93
|
+
} = t, e[0] = t, e[1] = i, e[2] = a, e[3] = r, e[4] = c, e[5] = o, e[6] = p, e[7] = n, e[8] = m, e[9] = h, e[10] = u, e[11] = f, e[12] = _, e[13] = C, e[14] = A, e[15] = v, e[16] = S) : (i = e[1], a = e[2], r = e[3], c = e[4], o = e[5], p = e[6], n = e[7], m = e[8], h = e[9], u = e[10], f = e[11], _ = e[12], C = e[13], A = e[14], v = e[15], S = e[16]);
|
|
94
|
+
const k = _ === void 0 ? !1 : _, w = C === void 0 ? "en" : C, s = A === void 0 ? "light" : A;
|
|
95
|
+
let d, g;
|
|
96
|
+
if (e[17] !== i || e[18] !== k || e[19] !== a || e[20] !== r || e[21] !== c || e[22] !== o || e[23] !== p || e[24] !== n || e[25] !== w || e[26] !== m || e[27] !== l || e[28] !== h || e[29] !== u || e[30] !== f || e[31] !== v || e[32] !== s || e[33] !== S) {
|
|
97
|
+
g = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
98
|
+
e: {
|
|
99
|
+
const L = Z(S || U[w] || U.en, w), N = s === "dark", P = f === "small";
|
|
100
|
+
let y;
|
|
101
|
+
e[36] !== N || e[37] !== P ? (y = B(F.chip, {
|
|
102
|
+
[F.chipDark]: N,
|
|
103
|
+
[F.chipSmall]: P
|
|
104
|
+
}), e[36] = N, e[37] = P, e[38] = y) : y = e[38];
|
|
105
|
+
const M = y;
|
|
106
|
+
let R;
|
|
107
|
+
e[39] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = {
|
|
108
|
+
display: "contents"
|
|
109
|
+
}, e[39] = R) : R = e[39];
|
|
110
|
+
let b;
|
|
111
|
+
e[40] !== r || e[41] !== s ? (b = r && /* @__PURE__ */ I(q, { name: r, theme: s, "aria-hidden": "true" }), e[40] = r, e[41] = s, e[42] = b) : b = e[42];
|
|
112
|
+
let E;
|
|
113
|
+
e[43] !== n || e[44] !== b ? (E = /* @__PURE__ */ O("div", { role: "gridcell", "aria-colindex": 1, style: R, children: [
|
|
114
|
+
b,
|
|
115
|
+
n
|
|
116
|
+
] }), e[43] = n, e[44] = b, e[45] = E) : E = e[45];
|
|
117
|
+
let T;
|
|
118
|
+
if (e[46] !== o || e[47] !== s ? (T = o && /* @__PURE__ */ I(q, { name: "cross", theme: s }), e[46] = o, e[47] = s, e[48] = T) : T = e[48], d = /* @__PURE__ */ O("div", { role: "row", "aria-label": Y(L, n, k, p, u, o), "aria-selected": p && !o, "aria-disabled": k && !o, id: `${a}-chip-${c}`, className: M, tabIndex: v, onClick: m, ref: l, ...h, children: [
|
|
119
|
+
E,
|
|
120
|
+
T
|
|
121
|
+
] }), !i) {
|
|
122
|
+
let D;
|
|
123
|
+
e[49] !== d ? (D = /* @__PURE__ */ I(z.Anchor, { children: d }), e[49] = d, e[50] = D) : D = e[50];
|
|
124
|
+
const $ = /* @__PURE__ */ I(z.Content, { children: ee(L, k, p, o) });
|
|
125
|
+
let G;
|
|
126
|
+
e[51] !== D || e[52] !== $ ? (G = /* @__PURE__ */ O(z, { placement: "top", tooltipOffset: 6, children: [
|
|
127
|
+
D,
|
|
128
|
+
$
|
|
129
|
+
] }), e[51] = D, e[52] = $, e[53] = G) : G = e[53], g = G;
|
|
130
|
+
break e;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
e[17] = i, e[18] = k, e[19] = a, e[20] = r, e[21] = c, e[22] = o, e[23] = p, e[24] = n, e[25] = w, e[26] = m, e[27] = l, e[28] = h, e[29] = u, e[30] = f, e[31] = v, e[32] = s, e[33] = S, e[34] = d, e[35] = g;
|
|
134
|
+
} else
|
|
135
|
+
d = e[34], g = e[35];
|
|
136
|
+
return g !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel") ? g : d;
|
|
137
|
+
});
|
|
138
|
+
te.displayName = "DSChip";
|
|
139
|
+
export {
|
|
140
|
+
de as C,
|
|
141
|
+
U as D,
|
|
142
|
+
X as a,
|
|
143
|
+
V as b,
|
|
144
|
+
ee as c,
|
|
145
|
+
te as d,
|
|
146
|
+
Y as g,
|
|
147
|
+
pe as v
|
|
148
|
+
};
|