@stihl-design-system/components 1.0.0-RC.32 → 1.0.0-RC.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion.Dmqocj97.js +12 -0
- package/actionbutton.Du5CT-Mt.js +12 -0
- package/actionlink.BK9CaQUY.js +12 -0
- package/{arialiveregions.Fgcshs5k.js → arialiveregions.BUVY9NpY.js} +2 -2
- package/assets/Accordion.CzBGud45.css +1 -0
- package/assets/Button.CmeGVEAY.css +1 -0
- package/assets/Checkbox.CyOw3rXI.css +1 -0
- package/assets/CustomReactSelect.BihX36Uo.css +1 -0
- package/assets/Dialog.DJkn65Es.css +1 -0
- package/assets/Drawer.x3BCQvWE.css +1 -0
- package/assets/Fieldset.Oqu7pOBv.css +1 -0
- package/assets/InputFile.D7Ihod7B.css +1 -0
- package/assets/InputNumber.z_UqRYdv.css +1 -0
- package/assets/InputPassword.DZENjxJ9.css +1 -0
- package/assets/InputSearch.GBH9Eh6F.css +1 -0
- package/assets/LinkButton.88j5ckLu.css +1 -0
- package/assets/{MegaMenu.DX9gChtY.css → MegaMenu.D5EtjFeL.css} +1 -1
- package/assets/Notification.CvohYEvT.css +1 -0
- package/assets/Select.CL0fqx7X.css +1 -0
- package/assets/Slider.DWLuIsNj.css +1 -0
- package/assets/Stepper.tXJl15yL.css +1 -0
- package/assets/{SystemFeedback.RcrPepSZ.css → SystemFeedback.PKzqnXUe.css} +1 -1
- package/assets/Textarea.B1HOakic.css +1 -0
- package/assets/Toast.CGyKXb4V.css +1 -0
- package/assets/buttonround.DBpMesfr.css +1 -0
- package/assets/input.RPDR8qdT.css +1 -0
- package/assets/step.BeLporJO.css +1 -0
- package/assets/switch.B9B-n_3y.css +1 -0
- package/{asterisk.CR60hx8S.js → asterisk.B2ih8VwF.js} +1 -1
- package/{banner.o4Etkjjo.js → banner.D-RX60nJ.js} +3 -3
- package/breadcrumb.tvMByFgp.js +11 -0
- package/button.CZupaV9L.js +12 -0
- package/buttonround.9IS0tUqw.js +96 -0
- package/checkbox.XYQI-ubx.js +12 -0
- package/checkboxgroup.CjnNJ8e6.js +9 -0
- package/chip.B-pxhsdb.js +12 -0
- package/chipgroup.cGjn4LVV.js +143 -0
- package/chunks/Accordion.CYIfNOWr.js +168 -0
- package/chunks/{ActionButton.DdDesD7K.js → ActionButton.BOYQYo5M.js} +37 -37
- package/chunks/{ActionLink.DqAsPYda.js → ActionLink.BlwvrnPN.js} +36 -36
- package/chunks/{AriaLiveRegions.utils.Cb327d_2.js → AriaLiveRegions.utils.CybNIBSa.js} +2 -2
- package/chunks/{Breadcrumb.9KinNuyQ.js → Breadcrumb.Qr6bDP2N.js} +35 -37
- package/chunks/Button.Cn5yg7dG.js +138 -0
- package/chunks/Checkbox.D5X5T6Yg.js +88 -0
- package/chunks/CheckboxGroup.CUR_0VMc.js +74 -0
- package/chunks/{Chip.BrbYu6i_.js → Chip.DIp5hdRH.js} +6 -6
- package/chunks/{CustomReactSelect.Cqq70QC0.js → CustomReactSelect.BA3hUVkh.js} +897 -878
- package/chunks/Dialog.DRk_jSj5.js +102 -0
- package/chunks/Drawer.Dj6WeUC8.js +107 -0
- package/chunks/Fieldset.C0RzpI-h.js +81 -0
- package/chunks/Header.18sOO0Gf.js +370 -0
- package/chunks/{Icon.NSsVrYeq.js → Icon.CDLyB7Pv.js} +77 -79
- package/chunks/{Input.utils.Cnnzvuk4.js → Input.utils.CL1u4Ctq.js} +30 -28
- package/chunks/InputFile.Bki3bs3U.js +236 -0
- package/chunks/InputNumber.B43cqBH0.js +242 -0
- package/chunks/InputPassword.DcdMjsXr.js +121 -0
- package/chunks/InputSearch.CJm6ph8W.js +149 -0
- package/chunks/LinkButton.C6F-yuLL.js +139 -0
- package/chunks/MegaMenu.qttkjGbD.js +188 -0
- package/chunks/NavigationTabList.G_l0GiUa.js +67 -0
- package/chunks/{NavigationTabs.DspPFHPh.js → NavigationTabs.CQxlahX1.js} +13 -14
- package/chunks/Notification.Qzz88ngL.js +91 -0
- package/chunks/Popover.D7McfVaH.js +214 -0
- package/chunks/RadioGroup.B2VCD9x-.js +106 -0
- package/chunks/Select.B0uMOSSD.js +147 -0
- package/chunks/Slider.YTIktxxD.js +306 -0
- package/chunks/Stepper.BvPmbbqw.js +152 -0
- package/chunks/{SystemFeedback.CyGbUCzT.js → SystemFeedback.CjlARKki.js} +9 -9
- package/chunks/Tabs.CoO_lrhV.js +83 -0
- package/chunks/{Text.DGWeWF1y.js → Text.DpRtTpB4.js} +3 -3
- package/chunks/Textarea.lYiPXerd.js +181 -0
- package/chunks/Toast.L5HAuEOn.js +76 -0
- package/chunks/{arrow-clockwise.BefOjGPg.js → arrow-clockwise.C4iOgjOc.js} +1 -1
- package/chunks/{arrow-counterclockwise.C7Ov32BZ.js → arrow-counterclockwise.CgQAuBUe.js} +1 -1
- package/chunks/{circle-check-colored.Bye_GwLy.js → circle-check-colored.qP2s3vjI.js} +1 -1
- package/chunks/{diamond-exclamationmark-colored.WNKYwZ8q.js → diamond-exclamationmark-colored.CzYiaTZ0.js} +1 -1
- package/chunks/feather.l1E4nFBx.js +10 -0
- package/chunks/file-type-doc.B_RSSYbu.js +10 -0
- package/chunks/floating-ui.react.COTL3jH5.js +2984 -0
- package/chunks/helpers.CexwVao7.js +38 -0
- package/chunks/{index.CgTHIF3K.js → index.D-sRdssb.js} +1 -1
- package/chunks/{index.CEyLAtio.js → index.DL9mof6u.js} +2 -2
- package/chunks/{is-animation-disabled.CUl4N3LI.js → is-animation-disabled.B-V_68K-.js} +5 -5
- package/chunks/{map.CXgG1iGz.js → map.DNl7PF61.js} +1 -1
- package/chunks/moon.5yILPYXs.js +10 -0
- package/chunks/muscle.DbNjWasV.js +10 -0
- package/chunks/petrol.BGWwCsTw.js +10 -0
- package/chunks/sun.CY6ttzTL.js +10 -0
- package/chunks/{triangle-exclamationmark-colored.CbVC3Gzi.js → triangle-exclamationmark-colored.e93zvQ6Q.js} +1 -1
- package/chunks/upload.BogDfonx.js +10 -0
- package/chunks/useBreakpoint.1txsny17.js +45 -0
- package/chunks/variants.-R3_RCW8.js +10 -0
- package/chunks/weight.DUPu2UT0.js +10 -0
- package/combobox.CGEDlMo0.js +71 -0
- package/components/Button/Button.d.ts +5 -0
- package/components/Button/Button.utils.d.ts +4 -5
- package/components/CheckboxGroup/CheckboxGroup.d.ts +14 -1
- package/components/ChipGroup/ChipGroup.utils.d.ts +1 -3
- package/components/Combobox/Combobox.utils.d.ts +6 -6
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +17 -2
- package/components/Fieldset/Fieldset.d.ts +14 -1
- package/components/Input/Input.d.ts +13 -0
- package/components/Input/Input.utils.d.ts +2 -2
- package/components/InputFile/InputFile.d.ts +13 -0
- package/components/InputFile/InputFile.utils.d.ts +4 -2
- package/components/{InputStepper/InputStepper.d.ts → InputNumber/InputNumber.d.ts} +21 -8
- package/components/InputNumber/InputNumber.utils.d.ts +13 -0
- package/components/InputPassword/InputPassword.d.ts +13 -0
- package/components/InputPassword/InputPassword.utils.d.ts +2 -2
- package/components/InputSearch/InputSearch.d.ts +13 -0
- package/components/InputSearch/InputSearch.utils.d.ts +2 -2
- package/components/LinkButton/LinkButton.d.ts +5 -0
- package/components/LinkButton/LinkButton.utils.d.ts +4 -5
- package/components/RadioGroup/RadioGroup.d.ts +13 -0
- package/components/Scroller/Scroller.d.ts +6 -2
- package/components/Select/Select.d.ts +13 -0
- package/components/Select/Select.utils.d.ts +2 -2
- package/components/Slider/Slider.d.ts +13 -0
- package/components/Stepper/Step.d.ts +33 -0
- package/components/Stepper/Step.utils.d.ts +5 -0
- package/components/Stepper/Stepper.d.ts +56 -0
- package/components/Stepper/Stepper.test.d.ts +1 -0
- package/components/Stepper/Stepper.utils.d.ts +30 -0
- package/components/Stepper/Stepper.utils.test.d.ts +1 -0
- package/components/Textarea/Textarea.d.ts +13 -0
- package/components/Textarea/Textarea.utils.d.ts +2 -2
- package/customreactselect.BgYf8rKE.js +15 -0
- package/dialog.Bq-ZyzR8.js +9 -0
- package/drawer.DL5UzLWf.js +9 -0
- package/fieldset.BFLW2D9H.js +12 -0
- package/{filelist.BiKMKCyg.js → filelist.BG6SGVJ8.js} +23 -24
- package/{flag.72PONA83.js → flag.CE32qHPa.js} +3 -3
- package/{floatingactionbutton.B2YChsNU.js → floatingactionbutton.B5hJ2At2.js} +5 -5
- package/header.A77yIAH3.js +12 -0
- package/{heading.BXFBZhKv.js → heading.DHLpT4dc.js} +2 -2
- package/icon.vzkPwgjZ.js +9 -0
- package/index.d.ts +4 -2
- package/index.es.js +218 -206
- package/input.hBWqQr3X.js +190 -0
- package/inputfile.BSZuRujU.js +18 -0
- package/inputnumber.CA4JiUmq.js +17 -0
- package/inputnumber.d.ts +2 -0
- package/inputpassword.Cju_crMi.js +13 -0
- package/inputsearch.CU9AhVVv.js +15 -0
- package/{link.DbnvsD3j.js → link.DoiK003-.js} +5 -5
- package/linkbutton.CWco_B7v.js +12 -0
- package/{logo.C96KaG1P.js → logo.DprmD8HU.js} +3 -3
- package/{logo100years.BcB6_c-o.js → logo100years.DDzCrczW.js} +11 -11
- package/megamenu.BurL9MfF.js +12 -0
- package/navigationtablist.CkkLyHrM.js +10 -0
- package/navigationtabs.zhRZHjgs.js +9 -0
- package/notification.BiXdWNo7.js +10 -0
- package/{numberindicator.Ddf3ESi7.js → numberindicator.BdnPMogE.js} +2 -2
- package/{optioncheckbox.DqfXuPdi.js → optioncheckbox.nBVwGv6c.js} +3 -3
- package/package.json +42 -50
- package/partials/index.js +54 -48
- package/partials/lib/partials.d.ts +1 -1
- package/popover.79Voiadz.js +12 -0
- package/{radio.7_N_alaS.js → radio.DHUfSPai.js} +2 -2
- package/radiogroup.CwBh7u9L.js +11 -0
- package/scroller.IpfbFV8B.js +98 -0
- package/select.NHaEtX_u.js +14 -0
- package/{skiptocontent.BSCde5hT.js → skiptocontent.X4USTODk.js} +4 -4
- package/slider.jnNGEyBq.js +12 -0
- package/{spinner.BUjhjAvw.js → spinner.C9qCeq0R.js} +18 -18
- package/step.D5p7qppy.js +82 -0
- package/step.d.ts +6 -0
- package/stepper.DnMc4ex6.js +16 -0
- package/stepper.d.ts +2 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +12 -3
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +10 -2
- package/styles/scss/ds/lib/link-button.scss +11 -3
- package/{switch.D7BCfyyZ.js → switch.Bqdyzi2E.js} +5 -5
- package/systemfeedback.O7tj1juR.js +10 -0
- package/tablist.BFE6RAPD.js +209 -0
- package/{tabpane.CB-eudyw.js → tabpane.C4nsUlwc.js} +2 -2
- package/tabs.CsOxxQyQ.js +11 -0
- package/text.cLv2PhjQ.js +10 -0
- package/textarea.C9OAAjhG.js +14 -0
- package/{title.Bz_k5Vda.js → title.DuLPB-VK.js} +2 -2
- package/toast.OBI9qnAM.js +11 -0
- package/toastmanager.CgsA-1y_.js +89 -0
- package/tooltip.Cj3AvYgB.js +177 -0
- package/topbar.CAujTZAE.js +12 -0
- package/types/icon-types.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/mergeRefs.d.ts +5 -0
- package/utils/mergeRefs.test.d.ts +1 -0
- package/utils/useIsomorphicLayoutEffect.d.ts +2 -2
- package/accordion.HfUSDwQJ.js +0 -12
- package/actionbutton.kgd0E_xF.js +0 -12
- package/actionlink.CwC42RWc.js +0 -12
- package/assets/Accordion.BJb4TOG0.css +0 -1
- package/assets/Button.Dw8H5nFS.css +0 -1
- package/assets/Checkbox.BKHQN_tu.css +0 -1
- package/assets/CustomReactSelect.DGIItWIh.css +0 -1
- package/assets/Dialog.CGAg7bnN.css +0 -1
- package/assets/Drawer.VOvWQoEr.css +0 -1
- package/assets/Fieldset.CW9dBvAo.css +0 -1
- package/assets/InputFile.CCQxsulT.css +0 -1
- package/assets/InputPassword.124xVOiO.css +0 -1
- package/assets/InputSearch.Bkg-1urJ.css +0 -1
- package/assets/InputStepper.DvFJk1Mi.css +0 -1
- package/assets/LinkButton.xMvg_ojf.css +0 -1
- package/assets/Notification.BOuaA5GT.css +0 -1
- package/assets/Select.C1gWF32A.css +0 -1
- package/assets/Slider.Bidyhb-B.css +0 -1
- package/assets/Textarea.Dq4rH9Tg.css +0 -1
- package/assets/Toast.CJ1zhDIT.css +0 -1
- package/assets/buttonround.Cw9hnUan.css +0 -1
- package/assets/input.CUjGh-UM.css +0 -1
- package/assets/switch.Bc9KIyw9.css +0 -1
- package/breadcrumb.BsQm0kUD.js +0 -11
- package/button.Dyy6ajX6.js +0 -13
- package/buttonround.ChKWHzsv.js +0 -96
- package/checkbox.BNnp4ztM.js +0 -12
- package/checkboxgroup.BTVnKenc.js +0 -9
- package/chip.C7NstOHt.js +0 -12
- package/chipgroup.Zo1-IOCn.js +0 -210
- package/chunks/Accordion.CnqryAUu.js +0 -170
- package/chunks/Button.Cf1CKq8N.js +0 -142
- package/chunks/Checkbox.CiwriItT.js +0 -88
- package/chunks/CheckboxGroup.Cj68J6Ee.js +0 -72
- package/chunks/Dialog.Bv7k55He.js +0 -135
- package/chunks/Drawer.BVTvx276.js +0 -140
- package/chunks/Fieldset.D7cLR5ze.js +0 -74
- package/chunks/Header.um5MlziB.js +0 -377
- package/chunks/InputFile.bVWWdePn.js +0 -220
- package/chunks/InputPassword.Da3hEKTc.js +0 -136
- package/chunks/InputSearch.GOYqFCcZ.js +0 -174
- package/chunks/InputStepper.BuhPtfl-.js +0 -268
- package/chunks/LinkButton.59oNDwPU.js +0 -132
- package/chunks/MegaMenu._o3nNDAa.js +0 -192
- package/chunks/NavigationTabList.DuT7gzhj.js +0 -57
- package/chunks/Notification.Pts2oh0R.js +0 -92
- package/chunks/Popover.BRR8YZ-P.js +0 -228
- package/chunks/RadioGroup.DeTz3c19.js +0 -104
- package/chunks/Select.D2ehd4yN.js +0 -162
- package/chunks/Slider.84lkgq3W.js +0 -292
- package/chunks/Tabs.C8ADTzJ0.js +0 -83
- package/chunks/Textarea.Cw85sxHL.js +0 -163
- package/chunks/Toast.DG3WVvau.js +0 -76
- package/chunks/file-type-doc.DlovDOBh.js +0 -10
- package/chunks/floating-ui.dom.VgHc0h4l.js +0 -989
- package/chunks/floating-ui.react.DCyAzlZ4.js +0 -2011
- package/chunks/helpers.BbWkXTr3.js +0 -37
- package/chunks/petrol.Du6qAgp0.js +0 -10
- package/chunks/upload.ZImTAIgx.js +0 -10
- package/chunks/useBreakpoint.CMOR9ZOB.js +0 -44
- package/combobox.orZ3z8CB.js +0 -60
- package/components/InputStepper/InputStepper.utils.d.ts +0 -13
- package/customreactselect.Np-RpzvU.js +0 -14
- package/dialog.D4rcbW6A.js +0 -10
- package/drawer.BCCB3Rkj.js +0 -10
- package/fieldset.ZLs9IGpE.js +0 -11
- package/header.DUbn3BZt.js +0 -12
- package/icon.CHVAZr5T.js +0 -9
- package/input.DG20x6gh.js +0 -203
- package/inputfile.Dc56lQ4t.js +0 -17
- package/inputpassword.znFHRLsI.js +0 -13
- package/inputsearch.B1G6rfVk.js +0 -14
- package/inputstepper.d.ts +0 -2
- package/inputstepper.o6rdM_CW.js +0 -16
- package/linkbutton.DU8Ih8ZF.js +0 -12
- package/megamenu.CPH8EeFF.js +0 -12
- package/navigationtablist.C0iwsAad.js +0 -9
- package/navigationtabs.JjJtbuUe.js +0 -9
- package/notification.Ds_Q7ifk.js +0 -10
- package/popover.B72W0OvU.js +0 -12
- package/radiogroup.C_3IcNBq.js +0 -11
- package/scroller.CQxmQU6U.js +0 -123
- package/select.Ceyt-zvu.js +0 -13
- package/slider.Dq2dcziy.js +0 -11
- package/systemfeedback.CSdWOWuf.js +0 -10
- package/tablist.V7DBklhE.js +0 -256
- package/tabs.DQNLPAEN.js +0 -11
- package/text.ZOUuesnU.js +0 -10
- package/textarea.CixKeQBp.js +0 -13
- package/toast.D8QprMCa.js +0 -11
- package/toastmanager.BSVjYsg9.js +0 -116
- package/tooltip.CUCSRXd3.js +0 -191
- package/topbar.CVhJy-Br.js +0 -12
- /package/components/{InputStepper/InputStepper.test.d.ts → InputNumber/InputNumber.test.d.ts} +0 -0
- /package/components/{InputStepper/InputStepper.utils.test.d.ts → InputNumber/InputNumber.utils.test.d.ts} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import l from "react";
|
|
3
|
+
const f = (e) => typeof e != "number" || isNaN(e) ? 0 : e / 16, m = (e, t) => `[STIHL Design System] - [${e}]: ${t}`, d = (e, t) => `The "${e}" prop is required. Please add the "${e}" prop to the ${t} component.`, y = (e, t) => e?.closest(t), u = (e, t, a) => {
|
|
4
|
+
let r = !1;
|
|
5
|
+
const n = {
|
|
6
|
+
fn: t,
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- any is needed here to allow any React component type to be checked
|
|
8
|
+
displayName: t.displayName || t.name
|
|
9
|
+
};
|
|
10
|
+
return l.Children.forEach(e, (s) => {
|
|
11
|
+
if (r || !l.isValidElement(s))
|
|
12
|
+
return;
|
|
13
|
+
if (s.type === n.fn) {
|
|
14
|
+
r = !0;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const i = s.type, o = (
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- any is needed here to allow any React component type to be checked
|
|
19
|
+
i.displayName || i.name
|
|
20
|
+
);
|
|
21
|
+
if (typeof o == "string" && o === n.displayName) {
|
|
22
|
+
r = !0;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const p = s.props;
|
|
26
|
+
if (a && p.children && u(p.children, n.fn, a)) {
|
|
27
|
+
r = !0;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
}), r;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
y as a,
|
|
34
|
+
u as c,
|
|
35
|
+
m as g,
|
|
36
|
+
f as p,
|
|
37
|
+
d as r
|
|
38
|
+
};
|
|
@@ -10,7 +10,7 @@ var o = { exports: {} };
|
|
|
10
10
|
*/
|
|
11
11
|
var i;
|
|
12
12
|
function p() {
|
|
13
|
-
return i || (i = 1, function(e) {
|
|
13
|
+
return i || (i = 1, (function(e) {
|
|
14
14
|
(function() {
|
|
15
15
|
var u = {}.hasOwnProperty;
|
|
16
16
|
function s() {
|
|
@@ -39,7 +39,7 @@ function p() {
|
|
|
39
39
|
}
|
|
40
40
|
e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
|
|
41
41
|
})();
|
|
42
|
-
}(o)), o.exports;
|
|
42
|
+
})(o)), o.exports;
|
|
43
43
|
}
|
|
44
44
|
var l = p();
|
|
45
45
|
const m = /* @__PURE__ */ c(l);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { h as i } from "./has-window.ut_-aShB.js";
|
|
3
|
-
const
|
|
3
|
+
const o = (e) => i && e?.getBoundingClientRect() || DOMRect.fromRect({
|
|
4
4
|
x: 0,
|
|
5
5
|
y: 0,
|
|
6
6
|
width: 0,
|
|
@@ -8,13 +8,13 @@ const n = (t) => i && (t == null ? void 0 : t.getBoundingClientRect()) || DOMRec
|
|
|
8
8
|
}), r = () => {
|
|
9
9
|
if (i) {
|
|
10
10
|
const {
|
|
11
|
-
matches:
|
|
12
|
-
} = window.matchMedia("(prefers-reduced-motion: reduce)"),
|
|
13
|
-
return
|
|
11
|
+
matches: e
|
|
12
|
+
} = window.matchMedia("(prefers-reduced-motion: reduce)"), t = getComputedStyle(document.documentElement).getPropertyValue("--ds-animation-duration").trim();
|
|
13
|
+
return t === "0s" || t === "0ms" || e;
|
|
14
14
|
} else
|
|
15
15
|
return !0;
|
|
16
16
|
};
|
|
17
17
|
export {
|
|
18
|
-
|
|
18
|
+
o as g,
|
|
19
19
|
r as i
|
|
20
20
|
};
|
|
@@ -4,7 +4,7 @@ const i = ({
|
|
|
4
4
|
title: l,
|
|
5
5
|
titleId: t,
|
|
6
6
|
...a
|
|
7
|
-
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "m5.565.9 4.671 2L16 .5v12.2l-5.665 2.4-4.67-2L0 15.5V3.3zM1.988 12.5l2.683-1.2V3.5L1.988 4.7zm7.254 0L6.56 11.4V3.5l2.683 1.2zm1.988-.1 2.683-1.1V3.5L11.23 4.7z", clipRule: "evenodd" }));
|
|
8
8
|
export {
|
|
9
9
|
i as default
|
|
10
10
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const c = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: a,
|
|
6
|
+
...t
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": a, ...t }, l ? /* @__PURE__ */ e.createElement("title", { id: a }, l) : null, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M3.992 8c0 2.761 2.229 5 4.978 5a4.7 4.7 0 0 0 1.15-.158c-2.403-2.707-2.39-7.042.103-9.683Q9.62 3.002 8.97 3C6.22 3 3.992 5.239 3.992 8m8.125-6.248A6.9 6.9 0 0 0 8.97 1C5.12 1 2 4.134 2 8s3.12 7 6.97 7c.989 0 2.04-.267 2.99-.694A7.9 7.9 0 0 0 14 13a5.2 5.2 0 0 1-1.921-1.031c-2.349-2.015-2.338-5.87.044-7.84A5.2 5.2 0 0 1 14 3.155a7 7 0 0 0-1.883-1.402", clipRule: "evenodd" }));
|
|
8
|
+
export {
|
|
9
|
+
c as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const c = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: t,
|
|
6
|
+
...a
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M0 5.895c3.5-.723 6.5-.723 10 2.68l1-3.216-2-1.097V1.69L10.4 0H14l2 4.262-2 11.628s-3.911.247-6.4 0c-3.018-.3-5.6-1.153-7.6-1.689zm2 6.244v-4.1s2.726-.911 5.6 1.42c.976.792 2.9 2.68 2.9 2.68l2.5-6.78V4.287l-2-1.071V2.144h2l1 2.143V5.36l-1.6 8.842s-4.214-.267-4.4-.267c-3.018 0-6-1.795-6-1.795", clipRule: "evenodd" }));
|
|
8
|
+
export {
|
|
9
|
+
c as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const n = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: t,
|
|
6
|
+
...a
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { d: "M4.414 0 1 3.46l1.394 1.413 3.414-3.46zm6.053 6.511 1.38 1.399-1.38 1.398 1.38 1.398-1.38 1.399-1.38-1.399-1.379 1.399-1.38-1.399 1.38-1.398-1.38-1.398 1.38-1.399 1.38 1.399z" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M3.175 5.712 8.792.02H15V16H3.175zm1.971 8.29h7.883V2.017H9.58L5.146 6.51z", clipRule: "evenodd" }));
|
|
8
|
+
export {
|
|
9
|
+
n as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const m = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: t,
|
|
6
|
+
...a
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ e.createElement("path", { d: "M9 16H7v-2.75h2zm-4.005-3.58L3.05 14.364 1.636 12.95l1.944-1.945zm9.369.53-1.414 1.414-1.945-1.945 1.414-1.414z" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M8 3.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9m0 2a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5", clipRule: "evenodd" }), /* @__PURE__ */ e.createElement("path", { d: "M2.75 9H0V7h2.75zM16 9h-2.75V7H16zM4.995 3.581 3.581 4.995 1.636 3.051 3.05 1.636zm9.369-.531L12.42 4.995 11.005 3.58l1.945-1.944zM9 2.75H7V0h2z" })));
|
|
8
|
+
export {
|
|
9
|
+
m as default
|
|
10
|
+
};
|
|
@@ -4,7 +4,7 @@ const c = ({
|
|
|
4
4
|
title: l,
|
|
5
5
|
titleId: a,
|
|
6
6
|
...t
|
|
7
|
-
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": a, ...t }, l ? /* @__PURE__ */ e.createElement("title", { id: a }, l) : null, /* @__PURE__ */ e.createElement("path", { fill: "#
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": a, ...t }, l ? /* @__PURE__ */ e.createElement("title", { id: a }, l) : null, /* @__PURE__ */ e.createElement("path", { fill: "#fdc543", d: "M8 0 0 16h16z" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "m8.7 11.3.5-4.9H6.8l.5 4.9zm-1.8 2.1c0 .6.5 1.1 1.1 1.1s1.1-.4 1.1-1.1c0-.6-.5-1.1-1.1-1.1s-1.1.5-1.1 1.1", clipRule: "evenodd" }));
|
|
8
8
|
export {
|
|
9
9
|
c as default
|
|
10
10
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const h = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: t,
|
|
6
|
+
...a
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { d: "M13 5 8 0 3 5l1.5 1.4L7 3.8V10h2V3.8l2.5 2.6z" }), /* @__PURE__ */ e.createElement("path", { d: "M4 8H0v8h16V8h-4v2h2v4H2v-4h2z" }));
|
|
8
|
+
export {
|
|
9
|
+
h as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as u } from "react";
|
|
3
|
+
import { u as c } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
4
|
+
const o = {
|
|
5
|
+
base: 0,
|
|
6
|
+
s: 320,
|
|
7
|
+
m: 768,
|
|
8
|
+
l: 1024,
|
|
9
|
+
xl: 1536
|
|
10
|
+
}, a = ["base", "s", "m", "l", "xl"], k = (e) => {
|
|
11
|
+
let n = "base";
|
|
12
|
+
for (const t of a)
|
|
13
|
+
if (e >= o[t])
|
|
14
|
+
n = t;
|
|
15
|
+
else
|
|
16
|
+
break;
|
|
17
|
+
return n;
|
|
18
|
+
}, f = (e) => e && typeof e == "object" && "base" in e, b = () => {
|
|
19
|
+
const [e, n] = u(void 0);
|
|
20
|
+
c(() => (t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t)), []);
|
|
21
|
+
const t = () => {
|
|
22
|
+
const r = window.innerWidth;
|
|
23
|
+
n(k(r));
|
|
24
|
+
};
|
|
25
|
+
return e;
|
|
26
|
+
}, B = (e) => {
|
|
27
|
+
const n = b();
|
|
28
|
+
if (!n)
|
|
29
|
+
return !1;
|
|
30
|
+
if (e && typeof e != "object" || !f(e))
|
|
31
|
+
return e;
|
|
32
|
+
const t = [...a].reverse();
|
|
33
|
+
let r = e.base;
|
|
34
|
+
for (const s of t) {
|
|
35
|
+
const i = e[s];
|
|
36
|
+
if (i !== void 0 && o[n] >= o[s]) {
|
|
37
|
+
r = i;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return r;
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
B as u
|
|
45
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const h = ({
|
|
4
|
+
title: t,
|
|
5
|
+
titleId: l,
|
|
6
|
+
...a
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": l, ...a }, t ? /* @__PURE__ */ e.createElement("title", { id: l }, t) : null, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M10 16H0V6h10zm-8-2h6V8H2z", clipRule: "evenodd" }), /* @__PURE__ */ e.createElement("path", { d: "M13 13h-2V5H3V3h10z" }), /* @__PURE__ */ e.createElement("path", { d: "M16 10h-2V2H6V0h10z" })));
|
|
8
|
+
export {
|
|
9
|
+
h as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const c = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: t,
|
|
6
|
+
...a
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ e.createElement("path", { d: "m15.614 14.039-1.516-7.767-.256-1.322h-3.678c.481-.525.776-1.23.776-2.001C10.94 1.322 9.64 0 8.04 0S5.143 1.322 5.143 2.949c0 .771.294 1.472.775 2H2.153l-.255 1.323L.38 14.04 0 16h16l-.381-1.961zm-7.573-12.4c.71 0 1.283.587 1.283 1.305 0 .719-.577 1.305-1.283 1.305A1.296 1.296 0 0 1 6.76 2.944c0-.718.576-1.304 1.282-1.304M2.775 14 4 7h8l1.39 7z" })));
|
|
8
|
+
export {
|
|
9
|
+
c as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
import { d as $ } from "./chunks/index.D-sRdssb.js";
|
|
4
|
+
import { v as z, c as A } from "./chunks/CustomReactSelect.BA3hUVkh.js";
|
|
5
|
+
import { forwardRef as G } from "react";
|
|
6
|
+
const H = G((x, N) => {
|
|
7
|
+
const t = $.c(36);
|
|
8
|
+
let a, r, e, d, o, l, p, i, c, s, v, u, n, f, m;
|
|
9
|
+
if (t[0] !== x) {
|
|
10
|
+
const {
|
|
11
|
+
id: q,
|
|
12
|
+
label: B,
|
|
13
|
+
className: I,
|
|
14
|
+
disabled: w,
|
|
15
|
+
dropdownOnFocus: D,
|
|
16
|
+
filterOption: L,
|
|
17
|
+
hideLabel: E,
|
|
18
|
+
invalid: F,
|
|
19
|
+
lang: M,
|
|
20
|
+
popoverContent: R,
|
|
21
|
+
popoverInfoButtonProps: j,
|
|
22
|
+
required: P,
|
|
23
|
+
tabSelectsValue: V,
|
|
24
|
+
variant: h,
|
|
25
|
+
...k
|
|
26
|
+
} = x;
|
|
27
|
+
if (l = q, i = B, a = I, d = L, s = R, v = j, n = k, r = w === void 0 ? !1 : w, e = D === void 0 ? !1 : D, o = E === void 0 ? !1 : E, p = F === void 0 ? !1 : F, c = M === void 0 ? "en" : M, u = P === void 0 ? !1 : P, f = V === void 0 ? !0 : V, m = h === void 0 ? "single" : h, process.env.NODE_ENV !== "production") {
|
|
28
|
+
const {
|
|
29
|
+
options: y
|
|
30
|
+
} = n;
|
|
31
|
+
z({
|
|
32
|
+
id: l,
|
|
33
|
+
label: i,
|
|
34
|
+
options: y,
|
|
35
|
+
hideLabel: o,
|
|
36
|
+
popoverContent: s
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
t[0] = x, t[1] = a, t[2] = r, t[3] = e, t[4] = d, t[5] = o, t[6] = l, t[7] = p, t[8] = i, t[9] = c, t[10] = s, t[11] = v, t[12] = u, t[13] = n, t[14] = f, t[15] = m;
|
|
40
|
+
} else
|
|
41
|
+
a = t[1], r = t[2], e = t[3], d = t[4], o = t[5], l = t[6], p = t[7], i = t[8], c = t[9], s = t[10], v = t[11], u = t[12], n = t[13], f = t[14], m = t[15];
|
|
42
|
+
const b = m === "multi", S = !e || b;
|
|
43
|
+
let C;
|
|
44
|
+
t[16] !== a || t[17] !== r || t[18] !== e || t[19] !== d || t[20] !== o || t[21] !== l || t[22] !== p || t[23] !== b || t[24] !== i || t[25] !== c || t[26] !== s || t[27] !== v || t[28] !== N || t[29] !== u || t[30] !== n || t[31] !== S || t[32] !== f ? (C = {
|
|
45
|
+
id: l,
|
|
46
|
+
label: i,
|
|
47
|
+
className: a,
|
|
48
|
+
disabled: r,
|
|
49
|
+
filterOption: d,
|
|
50
|
+
hideLabel: o,
|
|
51
|
+
isMulti: b,
|
|
52
|
+
invalid: p,
|
|
53
|
+
lang: c,
|
|
54
|
+
openMenuOnClick: e,
|
|
55
|
+
openMenuOnFocus: e,
|
|
56
|
+
isClearable: S,
|
|
57
|
+
required: u,
|
|
58
|
+
ref: N,
|
|
59
|
+
tabSelectsValue: f,
|
|
60
|
+
popoverContent: s,
|
|
61
|
+
popoverInfoButtonProps: v,
|
|
62
|
+
...n
|
|
63
|
+
}, t[16] = a, t[17] = r, t[18] = e, t[19] = d, t[20] = o, t[21] = l, t[22] = p, t[23] = b, t[24] = i, t[25] = c, t[26] = s, t[27] = v, t[28] = N, t[29] = u, t[30] = n, t[31] = S, t[32] = f, t[33] = C) : C = t[33];
|
|
64
|
+
const g = C;
|
|
65
|
+
let O;
|
|
66
|
+
return t[34] !== g ? (O = /* @__PURE__ */ _(A, { ...g }), t[34] = g, t[35] = O) : O = t[35], O;
|
|
67
|
+
});
|
|
68
|
+
H.displayName = "DSCombobox";
|
|
69
|
+
export {
|
|
70
|
+
H as DSCombobox
|
|
71
|
+
};
|
|
@@ -43,6 +43,11 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
43
43
|
* @default 'medium'
|
|
44
44
|
*/
|
|
45
45
|
size?: ButtonSize;
|
|
46
|
+
/** Stretches the button over the parent's width.
|
|
47
|
+
* `boolean | { base: boolean; s?: boolean; m?: boolean; l?: boolean; xl?: boolean; }`
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
stretched?: BreakpointCustomizable<boolean>;
|
|
46
51
|
/** Defines the theme.
|
|
47
52
|
* @default 'light'
|
|
48
53
|
*/
|
|
@@ -5,19 +5,18 @@ export declare const BUTTON_VARIANT: readonly ["highlight", "filled", "outline",
|
|
|
5
5
|
export type ButtonVariant = (typeof BUTTON_VARIANT)[number];
|
|
6
6
|
export type ButtonIconPosition = 'left' | 'right';
|
|
7
7
|
export type ButtonAriaAttribute = 'aria-label' | 'aria-expanded' | 'aria-pressed' | 'aria-haspopup';
|
|
8
|
-
type ValidationProps = Pick<ButtonProps, '
|
|
8
|
+
type ValidationProps = Pick<ButtonProps, 'hideLabel' | 'iconName' | 'iconSource' | 'isFlush' | 'size' | 'stretched' | 'theme' | 'variant'>;
|
|
9
9
|
/**
|
|
10
10
|
* Performs runtime validation on a subset of `DSButton` props to detect
|
|
11
11
|
* misconfigurations during development.
|
|
12
12
|
*
|
|
13
|
-
* This function provides warnings or throws errors when invalid combinations
|
|
14
|
-
* of `variant`, `size`, or `theme` are detected—particularly for the `navigation` variant.
|
|
13
|
+
* This function provides warnings or throws errors when invalid combinations of props occur.
|
|
15
14
|
*
|
|
16
15
|
* Intended for development use only; should not be used in production environments.
|
|
17
16
|
*
|
|
18
|
-
* @param validationProps - An object containing the
|
|
17
|
+
* @param validationProps - An object containing the props to validate
|
|
19
18
|
* from the `DSButton` component. These are validated to ensure
|
|
20
19
|
* they are used in supported combinations.
|
|
21
20
|
*/
|
|
22
|
-
export declare const validateButtonProps: ({
|
|
21
|
+
export declare const validateButtonProps: ({ hideLabel, iconName, iconSource, isFlush, size, stretched, theme, variant, }: ValidationProps) => void;
|
|
23
22
|
export {};
|
|
@@ -31,6 +31,19 @@ export interface CheckboxGroupProps extends FieldsetHTMLAttributes<HTMLFieldSetE
|
|
|
31
31
|
* @default false
|
|
32
32
|
*/
|
|
33
33
|
invalid?: boolean;
|
|
34
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
35
|
+
popoverContent?: React.ReactNode;
|
|
36
|
+
/** Popover info button props:
|
|
37
|
+
*
|
|
38
|
+
* `data-*`: Custom data attributes.
|
|
39
|
+
*
|
|
40
|
+
* `label`: Accessibility label for the default anchor button.
|
|
41
|
+
* (default) 'Toggle popover'
|
|
42
|
+
*/
|
|
43
|
+
popoverInfoButtonProps?: {
|
|
44
|
+
[key: `data-${string}`]: string | undefined;
|
|
45
|
+
label?: string;
|
|
46
|
+
};
|
|
34
47
|
/** Marks the checkbox group as required.
|
|
35
48
|
* When this property is set, an asterisk (*) is automatically appended to the checkbox group's legend.
|
|
36
49
|
* @default false
|
|
@@ -46,4 +59,4 @@ export interface CheckboxGroupProps extends FieldsetHTMLAttributes<HTMLFieldSetE
|
|
|
46
59
|
*
|
|
47
60
|
* Design in Figma: [Checkbox Group](https://www.figma.com/design/qXldpLO6gxHJNLdcXIPxYt/Core-Components-%F0%9F%92%A0?node-id=5626-11362&t=UBsmFURFENnuYSW1-4)
|
|
48
61
|
* */
|
|
49
|
-
export declare const DSCheckboxGroup: ({ children, legend, className, description, direction, disabled, id, invalid, required, systemFeedback, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
62
|
+
export declare const DSCheckboxGroup: ({ children, legend, className, description, direction, disabled, id, invalid, popoverContent, popoverInfoButtonProps, required, systemFeedback, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
@@ -52,9 +52,7 @@ export declare const DS_CHIP_GROUP_TRANSLATIONS_DE: {
|
|
|
52
52
|
tooltipDeactivate: string;
|
|
53
53
|
tooltipActivate: string;
|
|
54
54
|
};
|
|
55
|
-
export declare const DS_CHIP_GROUP_TRANSLATIONS:
|
|
56
|
-
[key in ChipGroupLanguage]: ChipGroupAriaTranslations;
|
|
57
|
-
};
|
|
55
|
+
export declare const DS_CHIP_GROUP_TRANSLATIONS: Record<ChipGroupLanguage, ChipGroupAriaTranslations>;
|
|
58
56
|
export declare const getChipAriaLabel: (t: (key: keyof ChipGroupAriaTranslations, replacements?: string[]) => string, label: string, disabled: boolean | undefined, isSelected: boolean | undefined, selectionMode: ChipGroupSelectionMode, isRemovable: boolean | undefined) => string;
|
|
59
57
|
export declare const getChipTooltip: (t: (key: keyof ChipGroupAriaTranslations, replacements?: string[]) => string, disabled: boolean | undefined, isSelected: boolean | undefined, isRemovable: boolean | undefined) => string;
|
|
60
58
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IconName } from '../../types';
|
|
2
2
|
import { ComboboxProps } from './Combobox';
|
|
3
|
-
import { GroupBase, OptionsOrGroups } from 'react-select';
|
|
3
|
+
import { FilterOptionOption, GroupBase, OptionsOrGroups } from 'react-select';
|
|
4
4
|
export type ComboboxVariant = 'single' | 'multi';
|
|
5
|
-
type ValidationProps = Pick<ComboboxProps, 'id' | 'label' | 'options'>;
|
|
5
|
+
type ValidationProps = Pick<ComboboxProps, 'id' | 'label' | 'options' | 'hideLabel' | 'popoverContent'>;
|
|
6
|
+
export type ComboboxFilterOption<Option> = FilterOptionOption<Option>;
|
|
6
7
|
/**
|
|
7
8
|
* Validates the given properties of the DSCombobox component for common configuration errors.
|
|
8
9
|
* This function is intended to be used in development mode to provide developers with
|
|
@@ -11,7 +12,7 @@ type ValidationProps = Pick<ComboboxProps, 'id' | 'label' | 'options'>;
|
|
|
11
12
|
* @param validationProps - The subset of DSCombobox properties to validate. This includes
|
|
12
13
|
* id and label.
|
|
13
14
|
*/
|
|
14
|
-
export declare const validateComboboxProps: ({ id, label, options, }: ValidationProps) => void;
|
|
15
|
+
export declare const validateComboboxProps: ({ id, label, options, hideLabel, popoverContent, }: ValidationProps) => void;
|
|
15
16
|
export declare const COMBOBOX_SIZE: readonly ["medium", "small"];
|
|
16
17
|
export type ComboboxSize = (typeof COMBOBOX_SIZE)[number];
|
|
17
18
|
export interface ComboboxOption {
|
|
@@ -55,9 +56,8 @@ export declare const DS_COMBOBOX_TRANSLATIONS_EN: {
|
|
|
55
56
|
result_one: string;
|
|
56
57
|
result_other: string;
|
|
57
58
|
resultsAvailable: string;
|
|
59
|
+
togglePopover: string;
|
|
58
60
|
};
|
|
59
61
|
export declare const DS_COMBOBOX_TRANSLATIONS_DE: ComboboxAriaTranslations;
|
|
60
|
-
export declare const DS_COMBOBOX_TRANSLATIONS:
|
|
61
|
-
[key in ComboboxLanguage]: ComboboxAriaTranslations;
|
|
62
|
-
};
|
|
62
|
+
export declare const DS_COMBOBOX_TRANSLATIONS: Record<ComboboxLanguage, ComboboxAriaTranslations>;
|
|
63
63
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { GroupBase } from 'react-select';
|
|
2
2
|
import { BreakpointCustomizable, Optional } from '../../../types';
|
|
3
|
-
import { ComboboxAriaTranslations, ComboboxLanguage, ComboboxOption, ComboboxOptionsGroup, ComboboxOptionsOrOptGroups, ComboboxSize } from '../Combobox.utils';
|
|
3
|
+
import { ComboboxAriaTranslations, ComboboxFilterOption, ComboboxLanguage, ComboboxOption, ComboboxOptionsGroup, ComboboxOptionsOrOptGroups, ComboboxSize } from '../Combobox.utils';
|
|
4
4
|
import { PublicBaseSelectProps } from 'react-select/dist/declarations/src/Select';
|
|
5
5
|
import { StateManagerProps } from 'react-select/dist/declarations/src/useStateManager';
|
|
6
|
-
type IncludedReactSelectKeys = 'className' | 'form' | 'inputValue' | 'menuIsOpen' | 'name' | 'onBlur' | 'onFocus' | 'openMenuOnClick' | 'openMenuOnFocus' | 'tabIndex';
|
|
6
|
+
type IncludedReactSelectKeys = 'className' | 'filterOption' | 'form' | 'inputValue' | 'menuIsOpen' | 'name' | 'onBlur' | 'onFocus' | 'openMenuOnClick' | 'openMenuOnFocus' | 'tabIndex';
|
|
7
7
|
type PickedReactSelectProps<OptionType, IsMulti extends boolean, GroupType extends GroupBase<OptionType>> = Optional<Pick<PublicBaseSelectProps<OptionType, IsMulti, GroupType>, IncludedReactSelectKeys>, IncludedReactSelectKeys>;
|
|
8
8
|
type PickedReactSelectStateManagerProps<OptionType, IsMulti extends boolean, GroupType extends GroupBase<OptionType>> = Optional<Pick<StateManagerProps<OptionType, IsMulti, GroupType>, 'defaultInputValue'>, 'defaultInputValue'>;
|
|
9
9
|
export interface CustomReactSelectProps<IsMulti extends boolean> extends PickedReactSelectProps<ComboboxOption, IsMulti, ComboboxOptionsGroup>, PickedReactSelectStateManagerProps<ComboboxOption, IsMulti, ComboboxOptionsGroup> {
|
|
@@ -26,6 +26,8 @@ export interface CustomReactSelectProps<IsMulti extends boolean> extends PickedR
|
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
28
|
disabled?: boolean;
|
|
29
|
+
/** Custom method to filter whether an option should be displayed in the menu */
|
|
30
|
+
filterOption?: ((option: ComboboxFilterOption<ComboboxOption>, inputValue: string) => boolean) | null;
|
|
29
31
|
/** Hides the DSCombobox label, can be responsive.
|
|
30
32
|
* `boolean | { base: boolean; s?: boolean; m?: boolean; l?: boolean; xl?: boolean; }`
|
|
31
33
|
* @default false
|
|
@@ -45,6 +47,19 @@ export interface CustomReactSelectProps<IsMulti extends boolean> extends PickedR
|
|
|
45
47
|
* @default 'en'
|
|
46
48
|
*/
|
|
47
49
|
lang?: ComboboxLanguage;
|
|
50
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
51
|
+
popoverContent?: React.ReactNode;
|
|
52
|
+
/** Popover info button props:
|
|
53
|
+
*
|
|
54
|
+
* `data-*`: Custom data attributes.
|
|
55
|
+
*
|
|
56
|
+
* `label`: Accessibility label for the default anchor button.
|
|
57
|
+
* (default) 'Toggle popover'
|
|
58
|
+
*/
|
|
59
|
+
popoverInfoButtonProps?: {
|
|
60
|
+
[key: `data-${string}`]: string | undefined;
|
|
61
|
+
label?: string;
|
|
62
|
+
};
|
|
48
63
|
/** Indicates that the DSCombobox is required.
|
|
49
64
|
* @default false
|
|
50
65
|
*/
|
|
@@ -26,6 +26,19 @@ export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElemen
|
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
28
|
invalid?: boolean;
|
|
29
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
30
|
+
popoverContent?: React.ReactNode;
|
|
31
|
+
/** Popover info button props:
|
|
32
|
+
*
|
|
33
|
+
* `data-*`: Custom data attributes.
|
|
34
|
+
*
|
|
35
|
+
* `label`: Accessibility label for the default anchor button.
|
|
36
|
+
* (default) 'Toggle popover'
|
|
37
|
+
*/
|
|
38
|
+
popoverInfoButtonProps?: {
|
|
39
|
+
[key: `data-${string}`]: string | undefined;
|
|
40
|
+
label?: string;
|
|
41
|
+
};
|
|
29
42
|
/**
|
|
30
43
|
* Undocumented property for visually setting the Asterisk.
|
|
31
44
|
* @default false
|
|
@@ -39,4 +52,4 @@ export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElemen
|
|
|
39
52
|
*
|
|
40
53
|
* Design in Figma: [Fieldset](https://www.figma.com/design/Ie2r0R9QwjEc7O3nrFbXhV/Web-Pattern-Library?node-id=8-154)
|
|
41
54
|
* */
|
|
42
|
-
export declare const DSFieldset: ({ children, legend, className, description, disabled, id, invalid, required, systemFeedback, ...rest }: FieldsetProps) => JSX.Element;
|
|
55
|
+
export declare const DSFieldset: ({ children, legend, className, description, disabled, id, invalid, popoverContent, popoverInfoButtonProps, required, systemFeedback, ...rest }: FieldsetProps) => JSX.Element;
|
|
@@ -51,6 +51,19 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
51
51
|
* @default false
|
|
52
52
|
*/
|
|
53
53
|
invalid?: boolean;
|
|
54
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
55
|
+
popoverContent?: React.ReactNode;
|
|
56
|
+
/** Popover info button props:
|
|
57
|
+
*
|
|
58
|
+
* `data-*`: Custom data attributes.
|
|
59
|
+
*
|
|
60
|
+
* `label`: Accessibility label for the default anchor button.
|
|
61
|
+
* (default) 'Toggle popover'
|
|
62
|
+
*/
|
|
63
|
+
popoverInfoButtonProps?: {
|
|
64
|
+
[key: `data-${string}`]: string | undefined;
|
|
65
|
+
label?: string;
|
|
66
|
+
};
|
|
54
67
|
/** Text displayed as a prefix inside the input, maximum 8 characters. */
|
|
55
68
|
prefix?: string;
|
|
56
69
|
/** Enables the readonly state of the input.
|
|
@@ -7,7 +7,7 @@ export declare const SUPPORTED_INPUT_TYPES: readonly ["color", "date", "datetime
|
|
|
7
7
|
export type SupportedInputTypes = (typeof SUPPORTED_INPUT_TYPES)[number];
|
|
8
8
|
export declare const UNSUPPORTED_INPUT_TYPES: readonly ["week", "file", "hidden", "button", "checkbox", "password", "radio", "search", "reset", "submit", "image", "datetime"];
|
|
9
9
|
export type UnSupportedInputTypes = (typeof UNSUPPORTED_INPUT_TYPES)[number];
|
|
10
|
-
type ValidationProps = Pick<InputProps, 'id' | 'label' | 'prefix' | 'suffix' | 'leadingIconName' | 'leadingIconSource' | 'actionButtonProps'>;
|
|
10
|
+
type ValidationProps = Pick<InputProps, 'hideLabel' | 'id' | 'label' | 'prefix' | 'popoverContent' | 'suffix' | 'leadingIconName' | 'leadingIconSource' | 'actionButtonProps'>;
|
|
11
11
|
/**
|
|
12
12
|
* Validates the given properties of the DSInput component for common configuration errors.
|
|
13
13
|
* This function is intended to be used in development mode to provide developers with
|
|
@@ -16,7 +16,7 @@ type ValidationProps = Pick<InputProps, 'id' | 'label' | 'prefix' | 'suffix' | '
|
|
|
16
16
|
* @param validationProps - The subset of DSInput properties to validate. This includes
|
|
17
17
|
* properties related to the prefix, suffix, icons and action button of the input.
|
|
18
18
|
*/
|
|
19
|
-
export declare const validateInputProps: ({ id, label, prefix, suffix, leadingIconName, leadingIconSource, actionButtonProps, }: ValidationProps) => void;
|
|
19
|
+
export declare const validateInputProps: ({ hideLabel, id, label, prefix, popoverContent, suffix, leadingIconName, leadingIconSource, actionButtonProps, }: ValidationProps) => void;
|
|
20
20
|
/**
|
|
21
21
|
* Validates the input type for the DSInput component and provides warnings for certain unsupported types.
|
|
22
22
|
*
|
|
@@ -55,6 +55,19 @@ export interface InputFileProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
55
55
|
* @default 'en'
|
|
56
56
|
*/
|
|
57
57
|
lang?: InputFileLanguage;
|
|
58
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
59
|
+
popoverContent?: React.ReactNode;
|
|
60
|
+
/** Popover info button props:
|
|
61
|
+
*
|
|
62
|
+
* `data-*`: Custom data attributes.
|
|
63
|
+
*
|
|
64
|
+
* `label`: Accessibility label for the default anchor button.
|
|
65
|
+
* (default) 'Toggle popover'
|
|
66
|
+
*/
|
|
67
|
+
popoverInfoButtonProps?: {
|
|
68
|
+
[key: `data-${string}`]: string | undefined;
|
|
69
|
+
label?: string;
|
|
70
|
+
};
|
|
58
71
|
/** Maximum size allowed in MegaBytes.
|
|
59
72
|
* @default 7
|
|
60
73
|
*/
|
|
@@ -9,6 +9,7 @@ export declare const DS_INPUT_FILE_TRANSLATIONS_EN: {
|
|
|
9
9
|
fileListPreviewAltText: string;
|
|
10
10
|
filesSelectedHint: string;
|
|
11
11
|
required: string;
|
|
12
|
+
togglePopover: string;
|
|
12
13
|
};
|
|
13
14
|
export declare const DS_INPUT_FILE_TRANSLATIONS_DE: {
|
|
14
15
|
dragAndDropInstructions: string;
|
|
@@ -18,6 +19,7 @@ export declare const DS_INPUT_FILE_TRANSLATIONS_DE: {
|
|
|
18
19
|
fileListPreviewAltText: string;
|
|
19
20
|
filesSelectedHint: string;
|
|
20
21
|
required: string;
|
|
22
|
+
togglePopover: string;
|
|
21
23
|
};
|
|
22
24
|
export declare const DS_INPUT_FILE_TRANSLATIONS: {
|
|
23
25
|
[key in InputFileLanguage]: InputFileTranslations;
|
|
@@ -28,7 +30,7 @@ export declare const DS_INPUT_FILE_TRANSLATIONS: {
|
|
|
28
30
|
* @returns true if the file would have been allowed by the browser’s picker UI
|
|
29
31
|
*/
|
|
30
32
|
export declare const fileMatchesAccept: (file: File, acceptAttr: string) => boolean;
|
|
31
|
-
type ValidationProps = Pick<InputFileProps, 'id' | 'label' | 'inputFileButtonProps'>;
|
|
33
|
+
type ValidationProps = Pick<InputFileProps, 'id' | 'label' | 'inputFileButtonProps' | 'hideLabel' | 'popoverContent'>;
|
|
32
34
|
/**
|
|
33
35
|
* Validates the required props for the `DSInputFile` component.
|
|
34
36
|
*
|
|
@@ -42,5 +44,5 @@ type ValidationProps = Pick<InputFileProps, 'id' | 'label' | 'inputFileButtonPro
|
|
|
42
44
|
* @param {ValidationProps} params -The subset of DSInputFile properties to validate. This includes
|
|
43
45
|
* properties related to the prefix, suffix, icons and action button of the input.
|
|
44
46
|
*/
|
|
45
|
-
export declare const validateInputFileProps: ({ id, label, inputFileButtonProps, }: ValidationProps) => void;
|
|
47
|
+
export declare const validateInputFileProps: ({ id, label, inputFileButtonProps, hideLabel, popoverContent, }: ValidationProps) => void;
|
|
46
48
|
export {};
|