@stihl-design-system/components 1.0.0-RC.10 → 1.0.0-RC.11
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/README.md +0 -9
- package/{accordion.B3UkxlAZ.js → accordion.CEKQh-7i.js} +1 -1
- package/accordion.d.ts +1 -0
- package/{arialiveregions.BK4T7Vhk.js → arialiveregions.BKpxxK7O.js} +1 -1
- package/arialiveregions.d.ts +1 -0
- package/assets/Accordion.DMEFgtQm.css +1 -0
- package/assets/Chip.D10_7Q82.css +1 -0
- package/assets/CustomReactSelect.D5XKd9vg.css +1 -0
- package/assets/Dialog.B0pucIEI.css +1 -0
- package/assets/Drawer.CATBzfY7.css +1 -0
- package/assets/Fieldset.CwDhKRUL.css +1 -0
- package/assets/InputPassword.DOAAzj-O.css +1 -0
- package/assets/InputSearch.CxPYaQGZ.css +1 -0
- package/assets/InputStepper.CYYJUu0b.css +1 -0
- package/assets/Notification.mhVFeSGm.css +1 -0
- package/assets/Select.DZKpHV4G.css +1 -0
- package/assets/Textarea.Cp0b7oZp.css +1 -0
- package/assets/Toast.Cz6wYaBv.css +1 -0
- package/assets/button.C9_ejpGG.css +1 -0
- package/assets/buttonround.DTCqRP-0.css +1 -0
- package/assets/chipgroup.BMovtKTy.css +1 -0
- package/assets/flag.DX_lH1v7.css +1 -0
- package/assets/floatingactionbutton.Do-yEH6c.css +1 -0
- package/assets/input.Q5oKkmW2.css +1 -0
- package/assets/link.DhZqkLMP.css +1 -0
- package/assets/linkstandalone.Dwz-_O8q.css +1 -0
- package/assets/optioncheckbox.C62HtIj5.css +1 -0
- package/assets/radio.-Xxx5wL4.css +1 -0
- package/assets/switch.C1Ei0-z8.css +1 -0
- package/assets/text.DxKFcfY6.css +1 -0
- package/asterisk.d.ts +1 -0
- package/button.C5opEJ6x.js +135 -0
- package/button.d.ts +1 -0
- package/buttonround.CUoqRyy0.js +118 -0
- package/buttonround.d.ts +1 -0
- package/checkbox.d.ts +1 -0
- package/checkboxgroup.BqD5IV51.js +8 -0
- package/checkboxgroup.d.ts +1 -0
- package/chip.B92ew-hk.js +10 -0
- package/chip.d.ts +2 -0
- package/chipgroup.BJrqEfvr.js +175 -0
- package/chipgroup.d.ts +2 -0
- package/chunks/Accordion.DFwFN8mX.js +125 -0
- package/chunks/{AriaLiveRegions.utils.D2ni4Yrf.js → AriaLiveRegions.utils.BGSZafnS.js} +2 -2
- package/chunks/CheckboxGroup.M3jOjhNf.js +92 -0
- package/chunks/Chip.fMG8wi5K.js +142 -0
- package/chunks/{CustomReactSelect.ChAtL6fu.js → CustomReactSelect.D3jv5-fa.js} +883 -876
- package/chunks/{Dialog.Z5ESJQMi.js → Dialog.Fwr6vLiK.js} +47 -47
- package/chunks/{Drawer.BdowMqE0.js → Drawer.CKoYzQHd.js} +32 -32
- package/chunks/Fieldset.C9K8BYmH.js +99 -0
- package/chunks/InputPassword.C7pNeWGx.js +143 -0
- package/chunks/InputSearch.B24rcIJ_.js +192 -0
- package/chunks/InputStepper.CEW-bieQ.js +294 -0
- package/chunks/Notification.BXVN7_Fs.js +93 -0
- package/chunks/RadioGroup.D4UOflwr.js +137 -0
- package/chunks/Select.Ds86q4UC.js +194 -0
- package/chunks/Textarea.DcB8hKnO.js +198 -0
- package/chunks/Toast.DrzxdzVW.js +89 -0
- package/chunks/translate.isa3FHb8.js +11 -0
- package/{combobox.JL1Dsn3E.js → combobox.BeTnbG1m.js} +1 -1
- package/combobox.d.ts +1 -0
- package/components/Accordion/Accordion.d.ts +0 -1
- package/components/Accordion/Accordion.utils.d.ts +0 -1
- package/components/Button/Button.d.ts +0 -1
- package/components/ButtonRound/ButtonRound.d.ts +0 -1
- package/components/Checkbox/Checkbox.d.ts +0 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +6 -7
- package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +0 -1
- package/components/ChipGroup/Chip.d.ts +12 -0
- package/components/ChipGroup/ChipGroup.d.ts +42 -0
- package/components/ChipGroup/ChipGroup.test.d.ts +1 -0
- package/components/ChipGroup/ChipGroup.utils.d.ts +60 -0
- package/components/ChipGroup/ChipGroup.utils.test.d.ts +1 -0
- package/components/Combobox/Combobox.d.ts +0 -1
- package/components/Combobox/Combobox.utils.d.ts +6 -1
- package/components/CustomReactSelect/CustomReactSelect.d.ts +0 -1
- package/components/CustomReactSelect/CustomReactSelect.utils.d.ts +0 -13
- package/components/CustomReactSelect/OptionCheckbox.d.ts +0 -1
- package/components/Dialog/Dialog.d.ts +0 -1
- package/components/Dialog/Dialog.utils.d.ts +0 -1
- package/components/Drawer/Drawer.d.ts +0 -1
- package/components/Drawer/Drawer.utils.d.ts +0 -1
- package/components/Fieldset/Fieldset.d.ts +0 -1
- package/components/Fieldset/Fieldset.utils.d.ts +7 -1
- package/components/Flag/Flag.d.ts +23 -0
- package/components/Flag/Flag.test.d.ts +1 -0
- package/components/Flag/Flag.utils.d.ts +2 -0
- package/components/FloatingActionButton/FloatingActionButton.d.ts +0 -1
- package/components/Heading/Heading.d.ts +0 -1
- package/components/Icon/Icon.d.ts +0 -1
- package/components/Icon/Icon.utils.d.ts +0 -1
- package/components/Input/Input.d.ts +0 -1
- package/components/Input/Input.utils.d.ts +0 -1
- package/components/InputPassword/InputPassword.d.ts +0 -1
- package/components/InputPassword/InputPassword.utils.d.ts +0 -1
- package/components/InputSearch/InputSearch.d.ts +0 -1
- package/components/InputSearch/InputSearch.utils.d.ts +0 -1
- package/components/InputStepper/InputStepper.d.ts +0 -1
- package/components/InputStepper/InputStepper.utils.d.ts +0 -1
- package/components/Link/Link.d.ts +0 -1
- package/components/LinkStandalone/LinkStandalone.d.ts +0 -1
- package/components/Logo/Logo.d.ts +1 -2
- package/components/Logo/Logo.utils.d.ts +0 -1
- package/components/Notification/Notification.d.ts +0 -1
- package/components/Notification/Notification.utils.d.ts +0 -1
- package/components/Radio/Radio.d.ts +0 -1
- package/components/RadioGroup/RadioGroup.d.ts +7 -8
- package/components/RadioGroup/RadioGroup.utils.d.ts +2 -3
- package/components/Select/Select.d.ts +0 -1
- package/components/Select/Select.utils.d.ts +0 -1
- package/components/SkipToContent/SkipToContent.d.ts +0 -1
- package/components/Spinner/Spinner.d.ts +0 -1
- package/components/Switch/Switch.d.ts +0 -1
- package/components/SystemFeedback/SystemFeedback.d.ts +0 -1
- package/components/Text/Text.d.ts +0 -1
- package/components/Textarea/Textarea.d.ts +0 -1
- package/components/Textarea/Textarea.utils.d.ts +0 -1
- package/components/Title/Title.d.ts +0 -1
- package/components/Toast/Toast.d.ts +0 -1
- package/components/Toast/Toast.utils.d.ts +0 -1
- package/components/Toast/ToastManager.d.ts +0 -1
- package/customreactselect.d.ts +1 -0
- package/{customreactselect.Dg8Kgq3e.js → customreactselect.lYJhIeyx.js} +2 -2
- package/dialog.d.ts +1 -0
- package/{dialog.D3bJ0rsW.js → dialog.lGwNQU91.js} +2 -2
- package/{drawer.CNPF1-Kc.js → drawer.DNi5m8wP.js} +2 -2
- package/drawer.d.ts +1 -0
- package/{fieldset.CTshPWYX.js → fieldset.BqiAjeax.js} +1 -1
- package/fieldset.d.ts +1 -0
- package/flag.XJHHSP38.js +43 -0
- package/flag.d.ts +2 -0
- package/floatingactionbutton.CMpkTdhX.js +87 -0
- package/floatingactionbutton.d.ts +1 -0
- package/heading.d.ts +1 -0
- package/icon.d.ts +1 -0
- package/index.d.ts +4 -0
- package/index.es.js +133 -113
- package/input.d.ts +1 -0
- package/input.v7qB7wPJ.js +239 -0
- package/{inputpassword.nsYu6YeB.js → inputpassword.CSjh1GU7.js} +2 -2
- package/inputpassword.d.ts +1 -0
- package/{inputsearch.ZGIrDrcv.js → inputsearch.DyznOWLK.js} +2 -2
- package/inputsearch.d.ts +1 -0
- package/{inputstepper.BvY36hA1.js → inputstepper.3BLb7s0P.js} +2 -2
- package/inputstepper.d.ts +1 -0
- package/link.Clk5_BYp.js +116 -0
- package/link.d.ts +1 -0
- package/linkstandalone.BXERmqdN.js +80 -0
- package/linkstandalone.d.ts +1 -0
- package/logo.d.ts +1 -0
- package/{notification.BAS13UQ6.js → notification.0kX1GMaB.js} +2 -2
- package/notification.d.ts +1 -0
- package/{optioncheckbox.DZWwtx6f.js → optioncheckbox.BPN3f6l_.js} +13 -13
- package/optioncheckbox.d.ts +1 -0
- package/package.json +44 -39
- package/partials/index.js +407 -407
- package/partials/lib/partials.d.ts +0 -1
- package/radio.DTZNJzMU.js +115 -0
- package/radio.d.ts +1 -0
- package/radiogroup.SYkZm2DG.js +10 -0
- package/radiogroup.d.ts +1 -0
- package/{select.C4OZMB-V.js → select.CYbwR3RW.js} +1 -1
- package/select.d.ts +1 -0
- package/{skiptocontent.C4yQfWr2.js → skiptocontent.DUQWopO4.js} +1 -1
- package/skiptocontent.d.ts +1 -0
- package/spinner.d.ts +1 -0
- package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff +0 -0
- package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff2 +0 -0
- package/styles/fonts/font-face.min.css +1 -1
- package/styles/scss/_index.scss +1 -0
- package/styles/scss/lib/_breakpoints.scss +0 -1
- package/styles/scss/lib/_link.scss +3 -0
- package/styles/scss/lib/_spacing-dynamic.scss +61 -0
- package/switch.CoNnIhM4.js +65 -0
- package/switch.d.ts +1 -0
- package/systemfeedback.d.ts +1 -0
- package/text.d.ts +1 -0
- package/text.fMcHzVbH.js +57 -0
- package/{textarea.CtQtGqn5.js → textarea.DJc527nX.js} +1 -1
- package/textarea.d.ts +1 -0
- package/title.d.ts +1 -0
- package/{toast.DVd9dLs2.js → toast.D48GFmp0.js} +2 -2
- package/toast.d.ts +1 -0
- package/{toastmanager.Dh0gzFkM.js → toastmanager.Dl8-Q3ED.js} +2 -2
- package/toastmanager.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/translate.d.ts +11 -0
- package/utils/translate.test.d.ts +1 -0
- package/utils/useBreakpoint.d.ts +0 -1
- package/utils/useIsomorphicLayoutEffect.d.ts +0 -1
- package/utils/vitest.setup.d.ts +0 -1
- package/assets/Accordion.lFv7Q_RG.css +0 -1
- package/assets/CustomReactSelect.CMkn-EGK.css +0 -1
- package/assets/Dialog.fiQvxJg_.css +0 -1
- package/assets/Drawer.BqBgbSuP.css +0 -1
- package/assets/Fieldset.qHYeUFZt.css +0 -1
- package/assets/InputPassword.Cf394z47.css +0 -1
- package/assets/InputSearch.eCRQoxjN.css +0 -1
- package/assets/InputStepper.B80KulYE.css +0 -1
- package/assets/Notification.DK6agBGS.css +0 -1
- package/assets/Select.BptsMxz4.css +0 -1
- package/assets/Textarea.CIIVh03G.css +0 -1
- package/assets/Toast.Dsvs1zdM.css +0 -1
- package/assets/button.B1O7Yw3Q.css +0 -1
- package/assets/buttonround.DlH_ipDo.css +0 -1
- package/assets/floatingactionbutton.DRYentYC.css +0 -1
- package/assets/input.C0MrSbQu.css +0 -1
- package/assets/link.vtTST2ki.css +0 -1
- package/assets/linkstandalone.BtAcziZ7.css +0 -1
- package/assets/optioncheckbox.BJJAph5_.css +0 -1
- package/assets/radio.9kpIO3HC.css +0 -1
- package/assets/switch.2DQF2zH-.css +0 -1
- package/assets/text.Dhb_l50R.css +0 -1
- package/button.DH0h6uPs.js +0 -135
- package/buttonround.0mw4zzlU.js +0 -118
- package/checkboxgroup.CZqrlF-x.js +0 -9
- package/chunks/Accordion.pI3JyHJL.js +0 -125
- package/chunks/CheckboxGroup.4J_gZ_XJ.js +0 -87
- package/chunks/Fieldset.COGbZwry.js +0 -99
- package/chunks/InputPassword.Dgo95-PU.js +0 -140
- package/chunks/InputSearch.BFof0pBn.js +0 -189
- package/chunks/InputStepper.4IqLa5tX.js +0 -291
- package/chunks/Notification.BhwbaXqk.js +0 -93
- package/chunks/RadioGroup.C5jbCJM4.js +0 -132
- package/chunks/RadioGroup.module.BBZwHDjW.js +0 -11
- package/chunks/Select.fXeQJXtz.js +0 -191
- package/chunks/Textarea.Bewrp0Za.js +0 -195
- package/chunks/Toast.DA_CQ9J-.js +0 -89
- package/floatingactionbutton.CCIj9Fjr.js +0 -87
- package/input.CTgeAYdu.js +0 -236
- package/link.DAZNwQ0a.js +0 -116
- package/linkstandalone.C9X3er7g.js +0 -80
- package/radio.CWGJtmKl.js +0 -115
- package/radiogroup.BhffFqN3.js +0 -11
- package/switch.CmpNUC7s.js +0 -65
- package/text.rgDKQBrU.js +0 -57
- package/utils/render-in-iframe.d.ts +0 -15
- /package/assets/{RadioGroup.Bz3_xkZU.css → CheckboxGroup.Bz3_xkZU.css} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as h } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as m } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { D as f } from "./Fieldset.C9K8BYmH.js";
|
|
5
|
+
import l from "react";
|
|
6
|
+
import { g as i } from "./helpers.B1JT5ShS.js";
|
|
7
|
+
import { DSCheckbox as k } from "../checkbox.DETR3e3X.js";
|
|
8
|
+
import '../assets/CheckboxGroup.Bz3_xkZU.css';const D = "_group_2f5rk_76", b = "_group--horizontal_2f5rk_84", _ = "_group--invalid_2f5rk_87", u = {
|
|
9
|
+
group: D,
|
|
10
|
+
"group--horizontal": "_group--horizontal_2f5rk_84",
|
|
11
|
+
groupHorizontal: b,
|
|
12
|
+
"group--invalid": "_group--invalid_2f5rk_87",
|
|
13
|
+
groupInvalid: _
|
|
14
|
+
}, C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSCheckboxGroup component.`, S = ({
|
|
15
|
+
children: o,
|
|
16
|
+
description: r,
|
|
17
|
+
id: n,
|
|
18
|
+
legend: e,
|
|
19
|
+
systemFeedback: p
|
|
20
|
+
}) => {
|
|
21
|
+
if (!n && (r || p))
|
|
22
|
+
throw new Error(
|
|
23
|
+
i(
|
|
24
|
+
"DSCheckboxGroup",
|
|
25
|
+
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSCheckboxGroup component.'
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
if (!e)
|
|
29
|
+
throw new Error(
|
|
30
|
+
i("DSCheckboxGroup", C("legend"))
|
|
31
|
+
);
|
|
32
|
+
if (!o)
|
|
33
|
+
throw new Error(
|
|
34
|
+
i(
|
|
35
|
+
"DSCheckboxGroup",
|
|
36
|
+
"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."
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
l.Children.forEach(o, (t) => {
|
|
40
|
+
if (!(l.isValidElement(t) && t.type === k))
|
|
41
|
+
throw new Error(
|
|
42
|
+
i(
|
|
43
|
+
"DSCheckboxGroup",
|
|
44
|
+
"The component requires the children to be DSCheckbox elements. Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group."
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
}, y = ({
|
|
49
|
+
children: o,
|
|
50
|
+
legend: r,
|
|
51
|
+
className: n,
|
|
52
|
+
description: e,
|
|
53
|
+
direction: p = "vertical",
|
|
54
|
+
disabled: t = !1,
|
|
55
|
+
id: c,
|
|
56
|
+
invalid: a = !1,
|
|
57
|
+
required: d = !1,
|
|
58
|
+
systemFeedback: s,
|
|
59
|
+
...g
|
|
60
|
+
}) => {
|
|
61
|
+
process.env.NODE_ENV !== "production" && S({
|
|
62
|
+
children: o,
|
|
63
|
+
legend: r,
|
|
64
|
+
description: e,
|
|
65
|
+
id: c,
|
|
66
|
+
systemFeedback: s
|
|
67
|
+
});
|
|
68
|
+
const x = m(u.group, {
|
|
69
|
+
// In case of longer copy, use vertical direction
|
|
70
|
+
[u.groupHorizontal]: p === "horizontal",
|
|
71
|
+
[u.groupInvalid]: a && !!s
|
|
72
|
+
});
|
|
73
|
+
return /* @__PURE__ */ h.jsx(
|
|
74
|
+
f,
|
|
75
|
+
{
|
|
76
|
+
id: c,
|
|
77
|
+
legend: r,
|
|
78
|
+
className: n,
|
|
79
|
+
description: e,
|
|
80
|
+
disabled: t,
|
|
81
|
+
required: d,
|
|
82
|
+
invalid: a,
|
|
83
|
+
systemFeedback: s,
|
|
84
|
+
...g,
|
|
85
|
+
children: /* @__PURE__ */ h.jsx("div", { className: x, children: o })
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
y as D,
|
|
91
|
+
S as v
|
|
92
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as o } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as g } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { forwardRef as y } from "react";
|
|
5
|
+
import { t as w } from "./translate.isa3FHb8.js";
|
|
6
|
+
import { D as h } from "./Icon.C2o2seDb.js";
|
|
7
|
+
import { g as a } from "./helpers.B1JT5ShS.js";
|
|
8
|
+
import { g as P } from "./AriaLiveRegions.utils.BGSZafnS.js";
|
|
9
|
+
import '../assets/Chip.D10_7Q82.css';const T = "_chip_1hj8y_76", b = "_chip--small_1hj8y_106", d = {
|
|
10
|
+
chip: T,
|
|
11
|
+
"chip--small": "_chip--small_1hj8y_106",
|
|
12
|
+
chipSmall: b
|
|
13
|
+
}, u = (e) => `The "${e}" prop is required. Please add the "${e}" prop to the DSChipGroup component.`, F = ({
|
|
14
|
+
chips: e,
|
|
15
|
+
id: i,
|
|
16
|
+
label: r
|
|
17
|
+
}) => {
|
|
18
|
+
if (!Array.isArray(e))
|
|
19
|
+
throw new Error(
|
|
20
|
+
a("DSChipGroup", u("chips"))
|
|
21
|
+
);
|
|
22
|
+
if (!i)
|
|
23
|
+
throw new Error(
|
|
24
|
+
a(
|
|
25
|
+
"DSChipGroup",
|
|
26
|
+
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSChipGroup component.'
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
if (!r)
|
|
30
|
+
throw new Error(
|
|
31
|
+
a("DSChipGroup", u("label"))
|
|
32
|
+
);
|
|
33
|
+
}, H = () => {
|
|
34
|
+
if (!P())
|
|
35
|
+
throw new Error(
|
|
36
|
+
a(
|
|
37
|
+
"DSChipGroup",
|
|
38
|
+
'The DSAriaLiveRegions component has to be placed at the root of your application, as close to the "body" as possible, e.g. in your "App.tsx" or "layout.tsx".'
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
}, U = ["medium", "small"], R = {
|
|
42
|
+
disabled: "disabled",
|
|
43
|
+
selected: "selected",
|
|
44
|
+
// {0} is the action (e.g., select/unselect)
|
|
45
|
+
selectChip: "press space to {0}",
|
|
46
|
+
unselectAction: "unselect",
|
|
47
|
+
selectAction: "select",
|
|
48
|
+
addToSelection: "add this option to selection",
|
|
49
|
+
removeFromSelection: "remove this option from selection",
|
|
50
|
+
removeChip: "press Backspace to remove the currently focused value",
|
|
51
|
+
titleDisabled: "Disabled",
|
|
52
|
+
titleRemovable: "Remove filter",
|
|
53
|
+
titleDeactivate: "Deactivate property",
|
|
54
|
+
titleActivate: "Activate property"
|
|
55
|
+
}, $ = {
|
|
56
|
+
disabled: "deaktiviert",
|
|
57
|
+
selected: "ausgewählt",
|
|
58
|
+
// {0} is the action (e.g., select/unselect)
|
|
59
|
+
selectChip: "drücke Leertaste, um {0}",
|
|
60
|
+
unselectAction: "abzuwählen",
|
|
61
|
+
selectAction: "auszuwählen",
|
|
62
|
+
addToSelection: "diese Option zur Auswahl hinzuzufügen",
|
|
63
|
+
removeFromSelection: "diese Option aus der Auswahl zu entfernen",
|
|
64
|
+
removeChip: "drücke Backspace, um den aktuell fokussierten Wert zu entfernen",
|
|
65
|
+
titleDisabled: "Deaktiviert",
|
|
66
|
+
titleRemovable: "Filter entfernen",
|
|
67
|
+
titleDeactivate: "Eigenschaft deaktivieren",
|
|
68
|
+
titleActivate: "Eigenschaft aktivieren"
|
|
69
|
+
}, k = {
|
|
70
|
+
en: R,
|
|
71
|
+
de: $
|
|
72
|
+
}, E = (e, i, r, t, n, s) => r ? `${i}, ${e("disabled")}` : s ? `${i}, ${e("removeChip")}` : `${i}, ${t ? `${e("selected")}, ` : ""}${e(
|
|
73
|
+
"selectChip",
|
|
74
|
+
[
|
|
75
|
+
e(n === "single" ? t ? "unselectAction" : "selectAction" : t ? "removeFromSelection" : "addToSelection")
|
|
76
|
+
]
|
|
77
|
+
)}`, G = (e, i, r, t) => e(i ? "titleDisabled" : t ? "titleRemovable" : r ? "titleDeactivate" : "titleActivate"), x = y(
|
|
78
|
+
({
|
|
79
|
+
id: e,
|
|
80
|
+
label: i,
|
|
81
|
+
groupId: r,
|
|
82
|
+
isRemovable: t,
|
|
83
|
+
selectionMode: n,
|
|
84
|
+
disabled: s = !1,
|
|
85
|
+
iconName: c,
|
|
86
|
+
isSelected: l,
|
|
87
|
+
lang: m = "en",
|
|
88
|
+
size: v,
|
|
89
|
+
tabIndex: f,
|
|
90
|
+
translations: S,
|
|
91
|
+
onClick: D,
|
|
92
|
+
...A
|
|
93
|
+
}, C) => {
|
|
94
|
+
const p = w(
|
|
95
|
+
S || k[m]
|
|
96
|
+
), _ = g(d.chip, {
|
|
97
|
+
[d.chipSmall]: v === "small"
|
|
98
|
+
});
|
|
99
|
+
return /* @__PURE__ */ o.jsxs(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
role: "row",
|
|
103
|
+
"aria-label": E(
|
|
104
|
+
p,
|
|
105
|
+
i,
|
|
106
|
+
s,
|
|
107
|
+
l,
|
|
108
|
+
n,
|
|
109
|
+
t
|
|
110
|
+
),
|
|
111
|
+
"aria-selected": l && !t,
|
|
112
|
+
"aria-disabled": s && !t,
|
|
113
|
+
id: `${r}-chip-${e}`,
|
|
114
|
+
className: _,
|
|
115
|
+
tabIndex: f,
|
|
116
|
+
onClick: D,
|
|
117
|
+
ref: C,
|
|
118
|
+
...A,
|
|
119
|
+
title: G(p, s, l, t),
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ o.jsxs("div", { role: "gridcell", "aria-colindex": 1, style: { display: "contents" }, children: [
|
|
122
|
+
c && /* @__PURE__ */ o.jsx(h, { name: c, "aria-hidden": "true" }),
|
|
123
|
+
i
|
|
124
|
+
] }),
|
|
125
|
+
t && /* @__PURE__ */ o.jsx(h, { name: "cross" })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
x.displayName = "DSChip";
|
|
132
|
+
export {
|
|
133
|
+
U as C,
|
|
134
|
+
R as D,
|
|
135
|
+
H as a,
|
|
136
|
+
$ as b,
|
|
137
|
+
k as c,
|
|
138
|
+
G as d,
|
|
139
|
+
x as e,
|
|
140
|
+
E as g,
|
|
141
|
+
F as v
|
|
142
|
+
};
|