@stihl-design-system/components 1.0.0-RC.32 → 1.0.0-RC.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion.Dmqocj97.js +12 -0
- package/actionbutton.DLQJU6AV.js +12 -0
- package/actionlink.DEBrWfN3.js +12 -0
- package/{arialiveregions.Fgcshs5k.js → arialiveregions.BUVY9NpY.js} +2 -2
- package/assets/Accordion.CzBGud45.css +1 -0
- package/assets/Button.C8sNwIeW.css +1 -0
- package/assets/Checkbox.CyOw3rXI.css +1 -0
- package/assets/CustomReactSelect.E_jJFVew.css +1 -0
- package/assets/Dialog.DJkn65Es.css +1 -0
- package/assets/Drawer.x3BCQvWE.css +1 -0
- package/assets/InputFile.BnIvK65P.css +1 -0
- package/assets/InputNumber.BoiCIR1f.css +1 -0
- package/assets/InputPassword.Dk3_vNLV.css +1 -0
- package/assets/InputSearch.C1_4cVCi.css +1 -0
- package/assets/LinkButton.B86yacK5.css +1 -0
- package/assets/{MegaMenu.DX9gChtY.css → MegaMenu.D5EtjFeL.css} +1 -1
- package/assets/Notification.CvohYEvT.css +1 -0
- package/assets/Select.COxLltX7.css +1 -0
- package/assets/Slider.DPEmJ3HD.css +1 -0
- package/assets/Stepper.tXJl15yL.css +1 -0
- package/assets/{SystemFeedback.RcrPepSZ.css → SystemFeedback.PKzqnXUe.css} +1 -1
- package/assets/Textarea.y3MW7VW0.css +1 -0
- package/assets/Toast.CGyKXb4V.css +1 -0
- package/assets/buttonround.BN3vUDc_.css +1 -0
- package/assets/input.DTu4g_iA.css +1 -0
- package/assets/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.CI5HnDqD.js} +3 -3
- package/breadcrumb.CtwAux3P.js +11 -0
- package/button.DHuKanZP.js +13 -0
- package/{buttonround.ChKWHzsv.js → buttonround.CMlmEDaN.js} +6 -6
- package/checkbox.DwccD0Mp.js +12 -0
- package/checkboxgroup.ZiUFfCJ1.js +9 -0
- package/chip.B0s_fS8L.js +12 -0
- package/chipgroup.Dpu66bo5.js +143 -0
- package/chunks/Accordion.CYIfNOWr.js +168 -0
- package/chunks/{ActionButton.DdDesD7K.js → ActionButton.DOYsEHPr.js} +37 -37
- package/chunks/{ActionLink.DqAsPYda.js → ActionLink.DbyciN3Y.js} +36 -36
- package/chunks/{AriaLiveRegions.utils.Cb327d_2.js → AriaLiveRegions.utils.CybNIBSa.js} +2 -2
- package/chunks/{Breadcrumb.9KinNuyQ.js → Breadcrumb.BgnpTo01.js} +35 -37
- package/chunks/{Button.Cf1CKq8N.js → Button.DCZgBNmA.js} +8 -8
- package/chunks/Checkbox.BcGXAuuP.js +88 -0
- package/chunks/{CheckboxGroup.Cj68J6Ee.js → CheckboxGroup.BuFd1luB.js} +5 -5
- package/chunks/{Chip.BrbYu6i_.js → Chip.D6pubCZV.js} +6 -6
- package/chunks/{CustomReactSelect.Cqq70QC0.js → CustomReactSelect.Dg3wC_VH.js} +450 -447
- package/chunks/Dialog.DpqSVrYR.js +102 -0
- package/chunks/Drawer.DISWybOa.js +107 -0
- package/chunks/{Fieldset.D7cLR5ze.js → Fieldset.DiMtr6Vw.js} +6 -6
- package/chunks/Header.7TQL_J9t.js +370 -0
- package/chunks/{Icon.NSsVrYeq.js → Icon.CDLyB7Pv.js} +77 -79
- package/chunks/{Input.utils.Cnnzvuk4.js → Input.utils.Dkw7gRrr.js} +17 -17
- package/chunks/InputFile.C8nt9Fu8.js +218 -0
- package/chunks/InputNumber.CbH1XJfl.js +267 -0
- package/chunks/{InputPassword.Da3hEKTc.js → InputPassword.DbdjuSiJ.js} +34 -34
- package/chunks/InputSearch.joxmugiv.js +173 -0
- package/chunks/{LinkButton.59oNDwPU.js → LinkButton.BZgIGgc8.js} +7 -7
- package/chunks/MegaMenu.CQbOeaib.js +189 -0
- package/chunks/NavigationTabList.G_l0GiUa.js +67 -0
- package/chunks/{NavigationTabs.DspPFHPh.js → NavigationTabs.BwM-6CRm.js} +13 -14
- package/chunks/Notification.CrojkJ0E.js +91 -0
- package/chunks/Popover.Bb0Pjmvg.js +215 -0
- package/chunks/{RadioGroup.DeTz3c19.js → RadioGroup.CexC4v2Z.js} +5 -5
- package/chunks/Select.BEIdNMML.js +164 -0
- package/chunks/{Slider.84lkgq3W.js → Slider.CR0zYHeZ.js} +83 -84
- package/chunks/Stepper.PTQdQBYf.js +152 -0
- package/chunks/{SystemFeedback.CyGbUCzT.js → SystemFeedback.CjlARKki.js} +9 -9
- package/chunks/Tabs.DyP4whX0.js +83 -0
- package/chunks/{Text.DGWeWF1y.js → Text.DpRtTpB4.js} +3 -3
- package/chunks/Textarea.Du2RII5u.js +168 -0
- package/chunks/Toast.ug_RjGgF.js +76 -0
- package/chunks/{arrow-clockwise.BefOjGPg.js → arrow-clockwise.C4iOgjOc.js} +1 -1
- package/chunks/{arrow-counterclockwise.C7Ov32BZ.js → arrow-counterclockwise.CgQAuBUe.js} +1 -1
- package/chunks/{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.dom.BT8pKtCQ.js +1005 -0
- package/chunks/floating-ui.react.3FjeMiuN.js +1999 -0
- package/chunks/helpers.CexwVao7.js +38 -0
- package/chunks/{index.CgTHIF3K.js → index.D-sRdssb.js} +1 -1
- package/chunks/{index.CEyLAtio.js → index.DL9mof6u.js} +2 -2
- package/chunks/{is-animation-disabled.CUl4N3LI.js → is-animation-disabled.B-V_68K-.js} +5 -5
- package/chunks/{map.CXgG1iGz.js → map.DNl7PF61.js} +1 -1
- package/chunks/moon.5yILPYXs.js +10 -0
- package/chunks/muscle.DbNjWasV.js +10 -0
- package/chunks/petrol.BGWwCsTw.js +10 -0
- package/chunks/sun.CY6ttzTL.js +10 -0
- package/chunks/{triangle-exclamationmark-colored.CbVC3Gzi.js → triangle-exclamationmark-colored.e93zvQ6Q.js} +1 -1
- package/chunks/upload.BogDfonx.js +10 -0
- package/chunks/useBreakpoint.BzR_yaIv.js +42 -0
- package/chunks/variants.-R3_RCW8.js +10 -0
- package/chunks/weight.DUPu2UT0.js +10 -0
- package/combobox.jG5GRA7C.js +65 -0
- package/components/ChipGroup/ChipGroup.utils.d.ts +1 -3
- package/components/Combobox/Combobox.utils.d.ts +3 -4
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +4 -2
- package/components/{InputStepper/InputStepper.d.ts → InputNumber/InputNumber.d.ts} +4 -4
- package/components/InputNumber/InputNumber.utils.d.ts +13 -0
- package/components/Scroller/Scroller.d.ts +6 -2
- package/components/Stepper/Step.d.ts +33 -0
- package/components/Stepper/Step.utils.d.ts +5 -0
- package/components/Stepper/Stepper.d.ts +56 -0
- package/components/Stepper/Stepper.test.d.ts +1 -0
- package/components/Stepper/Stepper.utils.d.ts +30 -0
- package/components/Stepper/Stepper.utils.test.d.ts +1 -0
- package/customreactselect.BFN8cYJi.js +14 -0
- package/dialog.CzM_Cxp0.js +9 -0
- package/drawer._A9MQ8Cj.js +9 -0
- package/fieldset.CId-NtI5.js +11 -0
- package/{filelist.BiKMKCyg.js → filelist.DgVuWpR3.js} +23 -24
- package/{flag.72PONA83.js → flag.CE32qHPa.js} +3 -3
- package/{floatingactionbutton.B2YChsNU.js → floatingactionbutton.Bsnncudt.js} +5 -5
- package/header.CelAkqtp.js +12 -0
- package/{heading.BXFBZhKv.js → heading.DHLpT4dc.js} +2 -2
- package/icon.vzkPwgjZ.js +9 -0
- package/index.d.ts +4 -2
- package/index.es.js +218 -206
- package/input.DuEbg7d6.js +206 -0
- package/inputfile.BjgJGefV.js +17 -0
- package/inputnumber.BcrxBVv0.js +16 -0
- package/inputnumber.d.ts +2 -0
- package/inputpassword.CddmBW-T.js +13 -0
- package/inputsearch.CFOASqrd.js +14 -0
- package/{link.DbnvsD3j.js → link.f8MMZo-w.js} +5 -5
- package/linkbutton.BYAvi-_V.js +12 -0
- package/{logo.C96KaG1P.js → logo.DprmD8HU.js} +3 -3
- package/{logo100years.BcB6_c-o.js → logo100years.B4d_DIiB.js} +1 -1
- package/megamenu.Cy9Cc-mC.js +12 -0
- package/navigationtablist.CkkLyHrM.js +10 -0
- package/navigationtabs.Dp7D2fnc.js +9 -0
- package/notification.B-norGiB.js +10 -0
- package/{numberindicator.Ddf3ESi7.js → numberindicator.BdnPMogE.js} +2 -2
- package/{optioncheckbox.DqfXuPdi.js → optioncheckbox.nBVwGv6c.js} +3 -3
- package/package.json +41 -50
- package/partials/index.js +56 -50
- package/partials/lib/partials.d.ts +1 -1
- package/popover.DFVDZY-m.js +12 -0
- package/{radio.7_N_alaS.js → radio.DHUfSPai.js} +2 -2
- package/radiogroup.DaThoMfq.js +11 -0
- package/scroller.Cu7H_VCT.js +98 -0
- package/select.CMdKf7tC.js +13 -0
- package/{skiptocontent.BSCde5hT.js → skiptocontent.CHVh0hbr.js} +4 -4
- package/slider.C5dK6KcG.js +11 -0
- package/{spinner.BUjhjAvw.js → spinner.C9qCeq0R.js} +18 -18
- package/step.DKf4CHGr.js +82 -0
- package/step.d.ts +6 -0
- package/stepper.CCP_igpJ.js +16 -0
- package/stepper.d.ts +2 -0
- package/{switch.D7BCfyyZ.js → switch.Bqdyzi2E.js} +5 -5
- package/systemfeedback.O7tj1juR.js +10 -0
- package/tablist.DZgo49nZ.js +209 -0
- package/{tabpane.CB-eudyw.js → tabpane.C4nsUlwc.js} +2 -2
- package/tabs.BkoT7feH.js +11 -0
- package/text.cLv2PhjQ.js +10 -0
- package/textarea.DMn20z4p.js +13 -0
- package/{title.Bz_k5Vda.js → title.DuLPB-VK.js} +2 -2
- package/toast.Dvs8woTH.js +11 -0
- package/toastmanager.pi_Fhd5t.js +89 -0
- package/tooltip.QJe_bfO-.js +178 -0
- package/topbar.Bxwvp9Lf.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/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/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/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/Checkbox.CiwriItT.js +0 -88
- package/chunks/Dialog.Bv7k55He.js +0 -135
- package/chunks/Drawer.BVTvx276.js +0 -140
- package/chunks/Header.um5MlziB.js +0 -377
- package/chunks/InputFile.bVWWdePn.js +0 -220
- package/chunks/InputSearch.GOYqFCcZ.js +0 -174
- package/chunks/InputStepper.BuhPtfl-.js +0 -268
- 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/Select.D2ehd4yN.js +0 -162
- 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/InputNumberutils.test.d.ts} +0 -0
package/scroller.CQxmQU6U.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as J, jsx as w } from "react/jsx-runtime";
|
|
3
|
-
import { d as K } from "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import { c as y } from "./chunks/index.CEyLAtio.js";
|
|
5
|
-
import { useState as M, useRef as T } from "react";
|
|
6
|
-
import { i as j, g as A } from "./chunks/is-animation-disabled.CUl4N3LI.js";
|
|
7
|
-
import { g as Q } from "./chunks/helpers.BbWkXTr3.js";
|
|
8
|
-
import { u as O } from "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
9
|
-
import { D as $ } from "./chunks/Button.Cf1CKq8N.js";
|
|
10
|
-
import './assets/scroller.Hszs1Yq4.css';const U = "ds-scroller_root_3ktti_1", Y = "ds-scroller_scroll-wrapper_3ktti_6", Z = "ds-scroller_scroller_3ktti_45", tt = "ds-scroller_scroll-button_3ktti_60", et = "ds-scroller_scroll-button--hidden_3ktti_65", rt = "ds-scroller_scroll-button--right_3ktti_69", n = {
|
|
11
|
-
root: U,
|
|
12
|
-
scrollWrapper: Y,
|
|
13
|
-
scroller: Z,
|
|
14
|
-
scrollButton: tt,
|
|
15
|
-
scrollButtonHidden: et,
|
|
16
|
-
scrollButtonRight: rt
|
|
17
|
-
}, dt = (c) => {
|
|
18
|
-
const t = K.c(37);
|
|
19
|
-
let a, f, u, r;
|
|
20
|
-
t[0] !== c ? ({
|
|
21
|
-
children: a,
|
|
22
|
-
className: f,
|
|
23
|
-
scrollToPosition: r,
|
|
24
|
-
...u
|
|
25
|
-
} = c, t[0] = c, t[1] = a, t[2] = f, t[3] = u, t[4] = r) : (a = t[1], f = t[2], u = t[3], r = t[4]);
|
|
26
|
-
const [z, q] = M(!1), [H, V] = M(!1), S = T(null), e = T(null), X = T(!1), D = () => {
|
|
27
|
-
I();
|
|
28
|
-
};
|
|
29
|
-
let R;
|
|
30
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (R = [], t[5] = R) : R = t[5], O(() => {
|
|
31
|
-
const l = new ResizeObserver(D);
|
|
32
|
-
return e.current && l.observe(e.current), () => {
|
|
33
|
-
l.disconnect();
|
|
34
|
-
};
|
|
35
|
-
}, R);
|
|
36
|
-
let x;
|
|
37
|
-
t[6] !== r ? (x = [r], t[6] = r, t[7] = x) : x = t[7], O(() => {
|
|
38
|
-
var s;
|
|
39
|
-
const l = ["18px 'STIHL Contraface Digital Text Bold'"];
|
|
40
|
-
return Promise.all(l.map(ot)).then(() => {
|
|
41
|
-
X.current = !0, I(), F();
|
|
42
|
-
}).catch(lt), (s = e.current) == null || s.addEventListener("scroll", D), () => {
|
|
43
|
-
var i;
|
|
44
|
-
(i = e.current) == null || i.removeEventListener("scroll", D);
|
|
45
|
-
};
|
|
46
|
-
}, x);
|
|
47
|
-
const F = () => {
|
|
48
|
-
e.current && (r != null && r.scrollPosition) && e.current.scrollTo({
|
|
49
|
-
left: r.scrollPosition,
|
|
50
|
-
behavior: j() || !r.isSmooth ? "instant" : "smooth"
|
|
51
|
-
});
|
|
52
|
-
}, I = () => {
|
|
53
|
-
if (e.current && S.current) {
|
|
54
|
-
const l = A(e.current), s = A(S.current);
|
|
55
|
-
q(s.left < l.left), V(s.right > l.right + 4);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
let o;
|
|
59
|
-
if (t[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
60
|
-
o = (s) => {
|
|
61
|
-
var N;
|
|
62
|
-
const i = l(s);
|
|
63
|
-
(N = e.current) == null || N.scrollTo({
|
|
64
|
-
left: i,
|
|
65
|
-
behavior: j() ? "instant" : "smooth"
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
const l = (s) => {
|
|
69
|
-
if (!S.current || !e.current)
|
|
70
|
-
return 0;
|
|
71
|
-
const {
|
|
72
|
-
scrollLeft: i,
|
|
73
|
-
offsetWidth: N
|
|
74
|
-
} = e.current, W = Math.round(N * 0.2);
|
|
75
|
-
return s === "next" ? i + W : i - W;
|
|
76
|
-
};
|
|
77
|
-
t[8] = o;
|
|
78
|
-
} else
|
|
79
|
-
o = t[8];
|
|
80
|
-
let L;
|
|
81
|
-
t[9] === Symbol.for("react.memo_cache_sentinel") ? (L = y(n.scroller), t[9] = L) : L = t[9];
|
|
82
|
-
const G = L;
|
|
83
|
-
let m;
|
|
84
|
-
t[10] !== f ? (m = y(n.root, f), t[10] = f, t[11] = m) : m = t[11];
|
|
85
|
-
const C = z || H ? 0 : -1;
|
|
86
|
-
let d;
|
|
87
|
-
t[12] !== a ? (d = /* @__PURE__ */ w("div", { className: G, ref: S, children: a }), t[12] = a, t[13] = d) : d = t[13];
|
|
88
|
-
let h;
|
|
89
|
-
t[14] !== C || t[15] !== d ? (h = /* @__PURE__ */ w("div", { className: n.scrollWrapper, ref: e, tabIndex: C, children: d }), t[14] = C, t[15] = d, t[16] = h) : h = t[16];
|
|
90
|
-
const E = !z;
|
|
91
|
-
let p;
|
|
92
|
-
t[17] !== E ? (p = y(n.scrollButton, {
|
|
93
|
-
[n.scrollButtonHidden]: E
|
|
94
|
-
}), t[17] = E, t[18] = p) : p = t[18];
|
|
95
|
-
let _;
|
|
96
|
-
t[19] !== o ? (_ = () => o("prev"), t[19] = o, t[20] = _) : _ = t[20];
|
|
97
|
-
let b;
|
|
98
|
-
t[21] !== _ || t[22] !== p ? (b = /* @__PURE__ */ w($, { variant: "filled", className: p, hideLabel: !0, iconName: "chevron-left", tabIndex: -1, size: "small", onClick: _, children: "Left" }), t[21] = _, t[22] = p, t[23] = b) : b = t[23];
|
|
99
|
-
const P = !H;
|
|
100
|
-
let B;
|
|
101
|
-
t[24] !== P ? (B = y(n.scrollButton, n.scrollButtonRight, {
|
|
102
|
-
[n.scrollButtonHidden]: P
|
|
103
|
-
}), t[24] = P, t[25] = B) : B = t[25];
|
|
104
|
-
let g;
|
|
105
|
-
t[26] !== o ? (g = () => o("next"), t[26] = o, t[27] = g) : g = t[27];
|
|
106
|
-
let v;
|
|
107
|
-
t[28] !== B || t[29] !== g ? (v = /* @__PURE__ */ w($, { variant: "filled", className: B, hideLabel: !0, iconName: "chevron-right", tabIndex: -1, size: "small", onClick: g, children: "Right" }), t[28] = B, t[29] = g, t[30] = v) : v = t[30];
|
|
108
|
-
let k;
|
|
109
|
-
return t[31] !== u || t[32] !== b || t[33] !== v || t[34] !== m || t[35] !== h ? (k = /* @__PURE__ */ J("div", { className: m, ...u, children: [
|
|
110
|
-
h,
|
|
111
|
-
b,
|
|
112
|
-
v
|
|
113
|
-
] }), t[31] = u, t[32] = b, t[33] = v, t[34] = m, t[35] = h, t[36] = k) : k = t[36], k;
|
|
114
|
-
};
|
|
115
|
-
function ot(c) {
|
|
116
|
-
return document.fonts.load(c);
|
|
117
|
-
}
|
|
118
|
-
function lt(c) {
|
|
119
|
-
throw new Error(Q("DSScroller", `The component requires the fonts to be loaded: ${c}`));
|
|
120
|
-
}
|
|
121
|
-
export {
|
|
122
|
-
dt as DSScroller
|
|
123
|
-
};
|
package/select.Ceyt-zvu.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import "./chunks/index.CEyLAtio.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "./chunks/useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import "./asterisk.CR60hx8S.js";
|
|
8
|
-
import "./chunks/Icon.NSsVrYeq.js";
|
|
9
|
-
import "./chunks/SystemFeedback.CyGbUCzT.js";
|
|
10
|
-
import { D } from "./chunks/Select.D2ehd4yN.js";
|
|
11
|
-
export {
|
|
12
|
-
D as DSSelect
|
|
13
|
-
};
|
package/slider.Dq2dcziy.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import "./chunks/index.CEyLAtio.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "./chunks/useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import "./input.DG20x6gh.js";
|
|
8
|
-
import { D as s } from "./chunks/Slider.84lkgq3W.js";
|
|
9
|
-
export {
|
|
10
|
-
s as DSSlider
|
|
11
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import "./chunks/index.CEyLAtio.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "./chunks/Icon.NSsVrYeq.js";
|
|
7
|
-
import { D as s } from "./chunks/SystemFeedback.CyGbUCzT.js";
|
|
8
|
-
export {
|
|
9
|
-
s as DSSystemFeedback
|
|
10
|
-
};
|
package/tablist.V7DBklhE.js
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as v, jsxs as me } from "react/jsx-runtime";
|
|
3
|
-
import { d as ke } from "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import { c as re } from "./chunks/index.CEyLAtio.js";
|
|
5
|
-
import { useState as he, useRef as A, useEffect as xe } from "react";
|
|
6
|
-
import { g as b, i as be } from "./chunks/is-animation-disabled.CUl4N3LI.js";
|
|
7
|
-
import { h as Ce } from "./chunks/has-window.ut_-aShB.js";
|
|
8
|
-
import { g as Ee } from "./chunks/helpers.BbWkXTr3.js";
|
|
9
|
-
import { u as pe } from "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
10
|
-
import { D as ye } from "./chunks/Button.Cf1CKq8N.js";
|
|
11
|
-
import { D as We } from "./chunks/Icon.NSsVrYeq.js";
|
|
12
|
-
import { NumberIndicator as ze } from "./numberindicator.Ddf3ESi7.js";
|
|
13
|
-
import { g as Ae, a as we } from "./chunks/TabPane.utils.DG16Y2uD.js";
|
|
14
|
-
import { s as i, N as He } from "./chunks/NavigationTabList.DuT7gzhj.js";
|
|
15
|
-
const H = 48, Ye = (p) => {
|
|
16
|
-
const e = ke.c(62);
|
|
17
|
-
let g, T, d, M, I, o, X, P, $, m, c;
|
|
18
|
-
e[0] !== p ? ({
|
|
19
|
-
aria: g,
|
|
20
|
-
id: m,
|
|
21
|
-
selectedTabIndex: o,
|
|
22
|
-
setSelectedTabIndex: X,
|
|
23
|
-
tabs: c,
|
|
24
|
-
alignment: P,
|
|
25
|
-
className: T,
|
|
26
|
-
defaultSelectedTabIndex: $,
|
|
27
|
-
isNavigation: d,
|
|
28
|
-
onTabChange: M,
|
|
29
|
-
...I
|
|
30
|
-
} = p, e[0] = p, e[1] = g, e[2] = T, e[3] = d, e[4] = M, e[5] = I, e[6] = o, e[7] = X, e[8] = P, e[9] = $, e[10] = m, e[11] = c) : (g = e[1], T = e[2], d = e[3], M = e[4], I = e[5], o = e[6], X = e[7], P = e[8], $ = e[9], m = e[10], c = e[11]);
|
|
31
|
-
const j = P === void 0 ? "left" : P, Re = $ === void 0 ? 0 : $, [V, h] = he(Re), [Le, Se] = he(!1), [De, Ne] = he(!1);
|
|
32
|
-
let _;
|
|
33
|
-
e[12] === Symbol.for("react.memo_cache_sentinel") ? (_ = [], e[12] = _) : _ = e[12];
|
|
34
|
-
const y = A(_), w = A(null), a = A(null), f = A(null), O = A(!1), ve = A(o), se = () => {
|
|
35
|
-
Te(), Be();
|
|
36
|
-
};
|
|
37
|
-
let q;
|
|
38
|
-
e[13] === Symbol.for("react.memo_cache_sentinel") ? (q = [], e[13] = q) : q = e[13], pe(() => {
|
|
39
|
-
const s = new ResizeObserver(se);
|
|
40
|
-
return a.current && s.observe(a.current), () => {
|
|
41
|
-
s.disconnect();
|
|
42
|
-
};
|
|
43
|
-
}, q);
|
|
44
|
-
let F;
|
|
45
|
-
e[14] !== j || e[15] !== c ? (F = [c, j], e[14] = j, e[15] = c, e[16] = F) : F = e[16], pe(() => {
|
|
46
|
-
var n;
|
|
47
|
-
const s = ["18px 'STIHL Contraface Digital Text Regular'", "18px 'STIHL Contraface Digital Text Bold'", "14px 'STIHL Contraface Digital Text Demi'"];
|
|
48
|
-
Promise.all(s.map(Me)).then(() => {
|
|
49
|
-
ne(o), K("next", o, "instant"), Te(), O.current = !0;
|
|
50
|
-
}).catch(Pe);
|
|
51
|
-
const t = () => {
|
|
52
|
-
!O.current || !f.current || (r.matches ? f.current.style.transitionDuration = "0s" : f.current.style.transitionDuration = "");
|
|
53
|
-
}, r = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
54
|
-
return r.addEventListener("change", t), (n = a.current) == null || n.addEventListener("scroll", se), () => {
|
|
55
|
-
var l;
|
|
56
|
-
r.removeEventListener("change", t), (l = a.current) == null || l.removeEventListener("scroll", se);
|
|
57
|
-
};
|
|
58
|
-
}, F);
|
|
59
|
-
let G;
|
|
60
|
-
e[17] !== o ? (G = [o], e[17] = o, e[18] = G) : G = e[18], pe(() => {
|
|
61
|
-
if (O.current && (ne(o), d)) {
|
|
62
|
-
const s = ge(o);
|
|
63
|
-
h(o), K(s, o);
|
|
64
|
-
}
|
|
65
|
-
ve.current = o;
|
|
66
|
-
}, G);
|
|
67
|
-
let Q, J;
|
|
68
|
-
e[19] !== V ? (Q = () => {
|
|
69
|
-
var s;
|
|
70
|
-
O.current && ((s = y.current[V]) == null || s.focus());
|
|
71
|
-
}, J = [V], e[19] = V, e[20] = Q, e[21] = J) : (Q = e[20], J = e[21]), xe(Q, J);
|
|
72
|
-
const R = (s) => {
|
|
73
|
-
const t = ge(s);
|
|
74
|
-
X(s), h(s), K(t, s), M && M(s);
|
|
75
|
-
}, ge = (s) => {
|
|
76
|
-
const t = b(a.current), r = b(y.current[s]);
|
|
77
|
-
let n;
|
|
78
|
-
return r.left - H < t.left ? n = "prev" : r.right + H > t.right ? n = "next" : n = o < s ? "next" : "prev", n;
|
|
79
|
-
}, Te = () => {
|
|
80
|
-
if (a.current && w.current) {
|
|
81
|
-
const s = b(a.current), t = b(w.current);
|
|
82
|
-
Se(t.left < s.left), Ne(t.right > s.right + 4);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
let U;
|
|
86
|
-
e[22] === Symbol.for("react.memo_cache_sentinel") ? (U = (s) => {
|
|
87
|
-
const t = s === void 0 ? 0 : s;
|
|
88
|
-
Ce && f.current && !be() && setTimeout(() => {
|
|
89
|
-
f.current && (f.current.style.transitionDuration = "250ms");
|
|
90
|
-
}, t);
|
|
91
|
-
}, e[22] = U) : U = e[22];
|
|
92
|
-
const Ie = U, Be = () => {
|
|
93
|
-
f.current && (f.current.style.transitionDuration = "0s", ne(ve.current), Ie());
|
|
94
|
-
}, ne = (s) => {
|
|
95
|
-
const t = f.current, r = b(y.current[s]), n = b(w.current), l = r.left - n.left;
|
|
96
|
-
t && (O.current ? (t.style.width = `${r.width}px`, t.style.transform = `translateX(${l}px)`) : (t.style.transitionDuration = "0s", t.style.transform = `translateX(${l}px)`, t.style.width = `${r.width}px`, Ie(50)));
|
|
97
|
-
}, oe = (s, t) => {
|
|
98
|
-
let r;
|
|
99
|
-
e: switch (s.key) {
|
|
100
|
-
case "ArrowLeft": {
|
|
101
|
-
r = (t > 0 ? t : c.length) - 1, h(r);
|
|
102
|
-
break e;
|
|
103
|
-
}
|
|
104
|
-
case "ArrowRight": {
|
|
105
|
-
r = (t + 1) % c.length, h(r);
|
|
106
|
-
break e;
|
|
107
|
-
}
|
|
108
|
-
case "Home": {
|
|
109
|
-
r = 0, h(r);
|
|
110
|
-
break e;
|
|
111
|
-
}
|
|
112
|
-
case "End": {
|
|
113
|
-
r = c.length - 1, h(r);
|
|
114
|
-
break e;
|
|
115
|
-
}
|
|
116
|
-
case "Enter":
|
|
117
|
-
case " ": {
|
|
118
|
-
R(t);
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
default:
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
if (r !== void 0) {
|
|
125
|
-
const n = r > t ? "next" : "prev";
|
|
126
|
-
setTimeout(() => K(n, r), 0);
|
|
127
|
-
}
|
|
128
|
-
s.preventDefault();
|
|
129
|
-
}, le = (s, t) => {
|
|
130
|
-
let r;
|
|
131
|
-
e: switch (s.key) {
|
|
132
|
-
case "Tab": {
|
|
133
|
-
if (s.shiftKey) {
|
|
134
|
-
r = t - 1 < 0 ? 0 : t - 1, h(r), t !== 0 && s.preventDefault();
|
|
135
|
-
break e;
|
|
136
|
-
} else
|
|
137
|
-
r = t + 1 > c.length - 1 ? t : t + 1, h(r), t !== c.length - 1 && s.preventDefault();
|
|
138
|
-
break e;
|
|
139
|
-
}
|
|
140
|
-
case "Enter": {
|
|
141
|
-
R(t);
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
default:
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (r !== void 0) {
|
|
148
|
-
const n = r > t ? "next" : "prev";
|
|
149
|
-
setTimeout(() => K(n, r), 0);
|
|
150
|
-
}
|
|
151
|
-
}, K = (s, t, r) => {
|
|
152
|
-
const n = r === void 0 ? "smooth" : r, l = y.current[t], W = a.current, z = b(l), ue = b(W);
|
|
153
|
-
let de;
|
|
154
|
-
if (!(!l || !W)) {
|
|
155
|
-
if (s === "prev") {
|
|
156
|
-
if (z.left - H > ue.left)
|
|
157
|
-
return;
|
|
158
|
-
de = l.offsetLeft - H;
|
|
159
|
-
} else {
|
|
160
|
-
if (z.right + H < ue.right)
|
|
161
|
-
return;
|
|
162
|
-
de = l.offsetLeft + l.offsetWidth - ue.width + H;
|
|
163
|
-
}
|
|
164
|
-
W.scrollTo({
|
|
165
|
-
left: de,
|
|
166
|
-
behavior: be() ? "instant" : n
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
let u;
|
|
171
|
-
if (e[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
172
|
-
u = (t) => {
|
|
173
|
-
var n;
|
|
174
|
-
const r = s(t);
|
|
175
|
-
(n = a.current) == null || n.scrollTo({
|
|
176
|
-
left: r,
|
|
177
|
-
behavior: be() ? "instant" : "smooth"
|
|
178
|
-
});
|
|
179
|
-
};
|
|
180
|
-
const s = (t) => {
|
|
181
|
-
if (!w.current || !a.current)
|
|
182
|
-
return 0;
|
|
183
|
-
const {
|
|
184
|
-
scrollLeft: r,
|
|
185
|
-
offsetWidth: n
|
|
186
|
-
} = a.current, l = Math.round(n * 0.2);
|
|
187
|
-
return t === "next" ? r + l : r - l;
|
|
188
|
-
};
|
|
189
|
-
e[23] = u;
|
|
190
|
-
} else
|
|
191
|
-
u = e[23];
|
|
192
|
-
const ce = j === "center";
|
|
193
|
-
let Y;
|
|
194
|
-
e[24] !== ce ? (Y = re(i.scroller, {
|
|
195
|
-
[i.scrollerCentered]: ce
|
|
196
|
-
}), e[24] = ce, e[25] = Y) : Y = e[25];
|
|
197
|
-
const Z = Y, ae = d ? "nav" : "div";
|
|
198
|
-
let L;
|
|
199
|
-
e[26] !== T ? (L = re(i.tabsWrapper, T), e[26] = T, e[27] = L) : L = e[27];
|
|
200
|
-
let S;
|
|
201
|
-
e[28] !== oe || e[29] !== le || e[30] !== d || e[31] !== Z || e[32] !== o || e[33] !== R || e[34] !== m || e[35] !== c ? (S = d ? /* @__PURE__ */ v(He, { tabs: c, tabRefs: y, scrollerRef: w, handleNavigationKeydown: le, scrollerClass: Z, selectedTabIndex: o, setSelectedTab: R }) : /* @__PURE__ */ v("div", { role: "tablist", className: Z, ref: w, children: c.map((s, t) => {
|
|
202
|
-
const {
|
|
203
|
-
id: r,
|
|
204
|
-
label: n,
|
|
205
|
-
iconName: l,
|
|
206
|
-
numberIndicatorValue: W
|
|
207
|
-
} = s;
|
|
208
|
-
return /* @__PURE__ */ me("button", { id: we(m, r), role: "tab", "aria-selected": o === t, "aria-controls": Ae(m, r, t), tabIndex: o === t ? 0 : -1, className: i.tab, ref: (z) => {
|
|
209
|
-
y.current[t] = z;
|
|
210
|
-
}, onClick: () => R(t), onKeyDown: (z) => oe(z, t), children: [
|
|
211
|
-
l && /* @__PURE__ */ v(We, { name: l, "aria-hidden": "true" }),
|
|
212
|
-
n,
|
|
213
|
-
W && /* @__PURE__ */ v(ze, { label: W })
|
|
214
|
-
] }, we(m, r));
|
|
215
|
-
}) }), e[28] = oe, e[29] = le, e[30] = d, e[31] = Z, e[32] = o, e[33] = R, e[34] = m, e[35] = c, e[36] = S) : S = e[36];
|
|
216
|
-
let ee;
|
|
217
|
-
e[37] === Symbol.for("react.memo_cache_sentinel") ? (ee = /* @__PURE__ */ v("span", { className: i.indicator, ref: f }), e[37] = ee) : ee = e[37];
|
|
218
|
-
let D;
|
|
219
|
-
e[38] !== ae || e[39] !== g || e[40] !== S ? (D = /* @__PURE__ */ me(ae, { className: i.scrollWrapper, ref: a, ...g, children: [
|
|
220
|
-
S,
|
|
221
|
-
ee
|
|
222
|
-
] }), e[38] = ae, e[39] = g, e[40] = S, e[41] = D) : D = e[41];
|
|
223
|
-
const ie = !Le;
|
|
224
|
-
let N;
|
|
225
|
-
e[42] !== ie ? (N = re(i.scrollButton, {
|
|
226
|
-
[i.scrollButtonHidden]: ie
|
|
227
|
-
}), e[42] = ie, e[43] = N) : N = e[43];
|
|
228
|
-
let B;
|
|
229
|
-
e[44] !== u ? (B = () => u("prev"), e[44] = u, e[45] = B) : B = e[45];
|
|
230
|
-
let k;
|
|
231
|
-
e[46] !== N || e[47] !== B ? (k = /* @__PURE__ */ v(ye, { variant: "filled", className: N, hideLabel: !0, iconName: "chevron-left", tabIndex: -1, size: "small", onClick: B, children: "Left" }), e[46] = N, e[47] = B, e[48] = k) : k = e[48];
|
|
232
|
-
const fe = !De;
|
|
233
|
-
let x;
|
|
234
|
-
e[49] !== fe ? (x = re(i.scrollButton, i.scrollButtonRight, {
|
|
235
|
-
[i.scrollButtonHidden]: fe
|
|
236
|
-
}), e[49] = fe, e[50] = x) : x = e[50];
|
|
237
|
-
let C;
|
|
238
|
-
e[51] !== u ? (C = () => u("next"), e[51] = u, e[52] = C) : C = e[52];
|
|
239
|
-
let E;
|
|
240
|
-
e[53] !== x || e[54] !== C ? (E = /* @__PURE__ */ v(ye, { variant: "filled", className: x, hideLabel: !0, iconName: "chevron-right", tabIndex: -1, size: "small", onClick: C, children: "Right" }), e[53] = x, e[54] = C, e[55] = E) : E = e[55];
|
|
241
|
-
let te;
|
|
242
|
-
return e[56] !== I || e[57] !== L || e[58] !== D || e[59] !== k || e[60] !== E ? (te = /* @__PURE__ */ me("div", { className: L, ...I, children: [
|
|
243
|
-
D,
|
|
244
|
-
k,
|
|
245
|
-
E
|
|
246
|
-
] }), e[56] = I, e[57] = L, e[58] = D, e[59] = k, e[60] = E, e[61] = te) : te = e[61], te;
|
|
247
|
-
};
|
|
248
|
-
function Me(p) {
|
|
249
|
-
return document.fonts.load(p);
|
|
250
|
-
}
|
|
251
|
-
function Pe(p) {
|
|
252
|
-
throw new Error(Ee("DSTabs", `The component requires the fonts to be loaded: ${p}`));
|
|
253
|
-
}
|
|
254
|
-
export {
|
|
255
|
-
Ye as TabList
|
|
256
|
-
};
|
package/tabs.DQNLPAEN.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import "./tablist.V7DBklhE.js";
|
|
6
|
-
import "./tabpane.CB-eudyw.js";
|
|
7
|
-
import "./chunks/TabPane.utils.DG16Y2uD.js";
|
|
8
|
-
import { D as a } from "./chunks/Tabs.C8ADTzJ0.js";
|
|
9
|
-
export {
|
|
10
|
-
a as DSTabs
|
|
11
|
-
};
|
package/text.ZOUuesnU.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import "./chunks/index.CEyLAtio.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "./chunks/helpers.BbWkXTr3.js";
|
|
7
|
-
import { D as s } from "./chunks/Text.DGWeWF1y.js";
|
|
8
|
-
export {
|
|
9
|
-
s as DSText
|
|
10
|
-
};
|
package/textarea.CixKeQBp.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "./chunks/index.CEyLAtio.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import "./chunks/helpers.BbWkXTr3.js";
|
|
6
|
-
import "./chunks/useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import "./chunks/index.CgTHIF3K.js";
|
|
8
|
-
import "./asterisk.CR60hx8S.js";
|
|
9
|
-
import "./chunks/SystemFeedback.CyGbUCzT.js";
|
|
10
|
-
import { D } from "./chunks/Textarea.Cw85sxHL.js";
|
|
11
|
-
export {
|
|
12
|
-
D as DSTextarea
|
|
13
|
-
};
|
package/toast.D8QprMCa.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "react/jsx-runtime";
|
|
3
|
-
import "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import "./chunks/index.CEyLAtio.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "./chunks/Button.Cf1CKq8N.js";
|
|
7
|
-
import "./chunks/Icon.NSsVrYeq.js";
|
|
8
|
-
import { D as a } from "./chunks/Toast.DG3WVvau.js";
|
|
9
|
-
export {
|
|
10
|
-
a as DSToast
|
|
11
|
-
};
|
package/toastmanager.BSVjYsg9.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as B, jsxs as G } from "react/jsx-runtime";
|
|
3
|
-
import { d as N } from "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import { createContext as V, useContext as W, useState as I, useRef as $, useEffect as M } from "react";
|
|
5
|
-
import { g as S } from "./chunks/helpers.BbWkXTr3.js";
|
|
6
|
-
import { b as P, g as y } from "./chunks/AriaLiveRegions.utils.Cb327d_2.js";
|
|
7
|
-
import { D as z, s as F } from "./chunks/Toast.DG3WVvau.js";
|
|
8
|
-
import { h as H } from "./chunks/has-window.ut_-aShB.js";
|
|
9
|
-
const J = () => {
|
|
10
|
-
if (!P() || !y())
|
|
11
|
-
throw new Error(S("DSToast", '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".'));
|
|
12
|
-
}, K = () => {
|
|
13
|
-
if (!H)
|
|
14
|
-
return;
|
|
15
|
-
if (document.querySelectorAll("[data-ds-toast]").length > 1)
|
|
16
|
-
throw new Error(S("DSToast", 'The destructured "toast" element should only be used once in the DOM.'));
|
|
17
|
-
}, h = "data-ds-toast-timeout-id", R = "closing", X = 1e4, _ = V(void 0), ae = () => {
|
|
18
|
-
const n = W(_);
|
|
19
|
-
if (!n)
|
|
20
|
-
throw new Error(S("DSToastProvider", "useDSToast must be used within a <DSToastProvider />, which wraps around your root component."));
|
|
21
|
-
return n;
|
|
22
|
-
}, ce = (n) => {
|
|
23
|
-
const e = N.c(16), {
|
|
24
|
-
children: i
|
|
25
|
-
} = n;
|
|
26
|
-
let u;
|
|
27
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = [], e[0] = u) : u = e[0];
|
|
28
|
-
const [a, A] = I(u), [o, p] = I(null), s = $(null);
|
|
29
|
-
let l;
|
|
30
|
-
e[1] !== o || e[2] !== a ? (l = () => {
|
|
31
|
-
!o && a.length > 0 && setTimeout(() => {
|
|
32
|
-
p(a[0]);
|
|
33
|
-
});
|
|
34
|
-
}, e[1] = o, e[2] = a, e[3] = l) : l = e[3];
|
|
35
|
-
let m;
|
|
36
|
-
e[4] !== a ? (m = [a], e[4] = a, e[5] = m) : m = e[5], M(l, m);
|
|
37
|
-
let T;
|
|
38
|
-
e[6] !== o ? (T = [o], e[6] = o, e[7] = T) : T = e[7], M(() => {
|
|
39
|
-
o && (O(o.message, o.variant), q());
|
|
40
|
-
}, T);
|
|
41
|
-
const w = () => {
|
|
42
|
-
var t;
|
|
43
|
-
return ((t = s.current) == null ? void 0 : t.getAttribute(h)) || null;
|
|
44
|
-
}, D = (t) => {
|
|
45
|
-
var r;
|
|
46
|
-
(r = s.current) == null || r.setAttribute(h, t);
|
|
47
|
-
}, C = () => {
|
|
48
|
-
var t;
|
|
49
|
-
return (t = s.current) == null ? void 0 : t.removeAttribute(h);
|
|
50
|
-
}, O = Y, v = (t, r) => {
|
|
51
|
-
J();
|
|
52
|
-
const Q = {
|
|
53
|
-
message: t,
|
|
54
|
-
hideIcon: r == null ? void 0 : r.hideIcon,
|
|
55
|
-
variant: (r == null ? void 0 : r.variant) || "info",
|
|
56
|
-
...r,
|
|
57
|
-
onClick: () => {
|
|
58
|
-
L();
|
|
59
|
-
},
|
|
60
|
-
onMouseEnter: U,
|
|
61
|
-
onMouseLeave: j
|
|
62
|
-
};
|
|
63
|
-
A((k) => [...k, Q]);
|
|
64
|
-
}, U = () => {
|
|
65
|
-
E();
|
|
66
|
-
}, E = () => {
|
|
67
|
-
var r;
|
|
68
|
-
const t = w();
|
|
69
|
-
t && (clearTimeout(t), (r = s.current) == null || r.removeAttribute(h));
|
|
70
|
-
}, x = () => {
|
|
71
|
-
const t = setTimeout(() => {
|
|
72
|
-
L();
|
|
73
|
-
}, X);
|
|
74
|
-
D(String(t));
|
|
75
|
-
}, j = () => {
|
|
76
|
-
w() !== R && s.current && x();
|
|
77
|
-
}, q = () => {
|
|
78
|
-
var t;
|
|
79
|
-
K(), o && ((t = s.current) != null && t.showPopover) && (s.current.showPopover(), x());
|
|
80
|
-
}, L = () => {
|
|
81
|
-
E(), D(R), s.current && (s.current.addEventListener("animationend", () => {
|
|
82
|
-
var t;
|
|
83
|
-
(t = s.current) != null && t.hidePopover && (s.current.hidePopover(), C(), s.current = null, A(Z), p(null));
|
|
84
|
-
}, {
|
|
85
|
-
once: !0
|
|
86
|
-
}), s.current.classList.add(F.rootClosing));
|
|
87
|
-
};
|
|
88
|
-
let b, d;
|
|
89
|
-
e[8] !== v ? (d = {
|
|
90
|
-
queueDSToastMessage: v
|
|
91
|
-
}, e[8] = v, e[9] = d) : d = e[9], b = d;
|
|
92
|
-
const g = b;
|
|
93
|
-
let c;
|
|
94
|
-
e[10] !== o ? (c = o ? /* @__PURE__ */ B(z, { ...o, ref: s }) : null, e[10] = o, e[11] = c) : c = e[11];
|
|
95
|
-
let f;
|
|
96
|
-
return e[12] !== i || e[13] !== g || e[14] !== c ? (f = /* @__PURE__ */ G(_.Provider, { value: g, children: [
|
|
97
|
-
c,
|
|
98
|
-
i
|
|
99
|
-
] }), e[12] = i, e[13] = g, e[14] = c, e[15] = f) : f = e[15], f;
|
|
100
|
-
};
|
|
101
|
-
function Y(n, e) {
|
|
102
|
-
if (e === "warning") {
|
|
103
|
-
const i = P();
|
|
104
|
-
i && (i.innerText = n);
|
|
105
|
-
} else if (e === "success" || e === "info") {
|
|
106
|
-
const i = y();
|
|
107
|
-
i && (i.innerText = n);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function Z(n) {
|
|
111
|
-
return n.slice(1);
|
|
112
|
-
}
|
|
113
|
-
export {
|
|
114
|
-
ce as DSToastProvider,
|
|
115
|
-
ae as useDSToast
|
|
116
|
-
};
|