@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
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as y, jsxs as Ae, Fragment as xe } from "react/jsx-runtime";
|
|
3
|
-
import { d as T } from "./index.CgTHIF3K.js";
|
|
4
|
-
import { c as x } from "./index.CEyLAtio.js";
|
|
5
|
-
import { useState as V, useEffect as ne, useContext as oe, createContext as De, useRef as U } from "react";
|
|
6
|
-
import { g as j, c as R, p as fe } from "./helpers.BbWkXTr3.js";
|
|
7
|
-
import { u as He } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
8
|
-
import { DSLogo as Pe } from "../logo.C96KaG1P.js";
|
|
9
|
-
import { Logo100Years as Te } from "../logo100years.BcB6_c-o.js";
|
|
10
|
-
import '../assets/Header.CNqtWTxB.css';const Ee = (l) => {
|
|
11
|
-
const e = T.c(3), t = 0, [n, r] = V("down");
|
|
12
|
-
let a, s;
|
|
13
|
-
return e[0] !== t ? (a = () => {
|
|
14
|
-
let c;
|
|
15
|
-
c = window.scrollY;
|
|
16
|
-
const d = () => {
|
|
17
|
-
const o = window.scrollY, h = o > c ? "down" : "up";
|
|
18
|
-
Math.abs(o - c) > t && (r(h), c = o);
|
|
19
|
-
};
|
|
20
|
-
return window.addEventListener("scroll", d, {
|
|
21
|
-
passive: !0
|
|
22
|
-
}), () => window.removeEventListener("scroll", d);
|
|
23
|
-
}, s = [t], e[0] = t, e[1] = a, e[2] = s) : (a = e[1], s = e[2]), ne(a, s), n;
|
|
24
|
-
}, ut = ["full", "main"], Fe = ({
|
|
25
|
-
hasBrandArea: l,
|
|
26
|
-
hasPrimaryArea: e,
|
|
27
|
-
hasSecondaryArea: t
|
|
28
|
-
}) => {
|
|
29
|
-
if (l)
|
|
30
|
-
throw new Error(j("DSHeader", "A <DSTopBar.BrandArea> component was detected as a direct child of DSHeader. Please move it into the DSTopBar component."));
|
|
31
|
-
if (e)
|
|
32
|
-
throw new Error(j("DSHeader", "A <DSTopBar.PrimaryArea> component was detected as a direct child of DSHeader. Please move it into the DSTopBar component."));
|
|
33
|
-
if (t)
|
|
34
|
-
throw new Error(j("DSHeader", "A <DSTopBar.SecondaryArea> component was detected as a direct child of DSHeader. Please move it into the DSTopBar component."));
|
|
35
|
-
}, Ce = "ds-top-bar_root_q6oxc_1", Oe = "ds-top-bar_root--sticky_q6oxc_49", Ve = "ds-top-bar_root--fixed_q6oxc_53", Re = "ds-top-bar_content_q6oxc_62", Me = "ds-top-bar_content--variant-full_q6oxc_81", qe = "ds-top-bar_content--has-primary-area-and-secondary-area_q6oxc_85", ke = "ds-top-bar_primary_q6oxc_90", $e = "ds-top-bar_content--has-brand-add-on-with-primary-area-and-secondary-area_q6oxc_105", We = "ds-top-bar_brand_q6oxc_110", Ie = "ds-top-bar_content--has-primary-area_q6oxc_85", Le = "ds-top-bar_content--has-primary-area--with-brand-add-on_q6oxc_149", Ye = "ds-top-bar_brand-add-on_q6oxc_213", ze = "ds-top-bar_brand-add-on--double_q6oxc_234", Ue = "ds-top-bar_sub-title_q6oxc_248", je = "ds-top-bar_secondary_q6oxc_274", Ge = "ds-top-bar_logo_q6oxc_283", Je = "ds-top-bar_logo--reduced_q6oxc_293", _ = {
|
|
36
|
-
root: Ce,
|
|
37
|
-
rootSticky: Oe,
|
|
38
|
-
rootFixed: Ve,
|
|
39
|
-
content: Re,
|
|
40
|
-
contentVariantFull: Me,
|
|
41
|
-
contentHasPrimaryAreaAndSecondaryArea: qe,
|
|
42
|
-
primary: ke,
|
|
43
|
-
contentHasBrandAddOnWithPrimaryAreaAndSecondaryArea: $e,
|
|
44
|
-
brand: We,
|
|
45
|
-
contentHasPrimaryArea: Ie,
|
|
46
|
-
contentHasPrimaryAreaWithBrandAddOn: Le,
|
|
47
|
-
brandAddOn: Ye,
|
|
48
|
-
brandAddOnDouble: ze,
|
|
49
|
-
subTitle: Ue,
|
|
50
|
-
secondary: je,
|
|
51
|
-
logo: Ge,
|
|
52
|
-
logoReduced: Je
|
|
53
|
-
}, Ke = ({
|
|
54
|
-
hasBrandArea: l,
|
|
55
|
-
hasPrimaryArea: e,
|
|
56
|
-
hasSecondaryArea: t
|
|
57
|
-
}) => {
|
|
58
|
-
if (!l)
|
|
59
|
-
throw new Error(j("DSTopBar", "A <DSTopBar.BrandArea> component is required. Please include it as a child of DSTopBar."));
|
|
60
|
-
if (!e && t)
|
|
61
|
-
throw new Error(j("DSTopBar", "A <DSTopBar.PrimaryArea> is required when using <DSTopBar.SecondaryArea>. Please include <DSTopBar.PrimaryArea> as a child of DSTopBar, or move the content from <DSTopBar.SecondaryArea> into <DSTopBar.PrimaryArea>."));
|
|
62
|
-
}, ve = (l) => l == null || typeof l == "object" && !Array.isArray(l) && l !== null && Object.keys(l).length === 0, _t = ["100years"], L = (l) => {
|
|
63
|
-
const e = T.c(28);
|
|
64
|
-
let t, n, r, a;
|
|
65
|
-
e[0] !== l ? ({
|
|
66
|
-
children: t,
|
|
67
|
-
className: n,
|
|
68
|
-
rootClassName: a,
|
|
69
|
-
...r
|
|
70
|
-
} = l, e[0] = l, e[1] = t, e[2] = n, e[3] = r, e[4] = a) : (t = e[1], n = e[2], r = e[3], a = e[4]);
|
|
71
|
-
const {
|
|
72
|
-
variant: s,
|
|
73
|
-
isHeaderSticky: c,
|
|
74
|
-
isMobile: d,
|
|
75
|
-
topBarAreaRef: o,
|
|
76
|
-
isStickyMainNavigationVisible: h,
|
|
77
|
-
hasBrandAddOn: m
|
|
78
|
-
} = oe(G);
|
|
79
|
-
let A, p;
|
|
80
|
-
if (e[5] !== t || e[6] !== n || e[7] !== m || e[8] !== c || e[9] !== d || e[10] !== h || e[11] !== a || e[12] !== s) {
|
|
81
|
-
const E = R(t, pe), u = R(t, ue), i = R(t, _e);
|
|
82
|
-
process.env.NODE_ENV !== "production" && Ke({
|
|
83
|
-
hasBrandArea: E,
|
|
84
|
-
hasPrimaryArea: u,
|
|
85
|
-
hasSecondaryArea: i
|
|
86
|
-
});
|
|
87
|
-
let b;
|
|
88
|
-
e[15] !== c || e[16] !== d || e[17] !== h || e[18] !== a ? (b = x(_.root, a, c ? {
|
|
89
|
-
[_.rootSticky]: !d && h,
|
|
90
|
-
[_.rootFixed]: !d && !h
|
|
91
|
-
} : {}), e[15] = c, e[16] = d, e[17] = h, e[18] = a, e[19] = b) : b = e[19], A = b, p = x(_.content, n, {
|
|
92
|
-
[_.contentHasPrimaryArea]: u && !m && !i,
|
|
93
|
-
[_.contentHasPrimaryAreaWithBrandAddOn]: u && m && !i,
|
|
94
|
-
[_.contentHasBrandAddOnWithPrimaryAreaAndSecondaryArea]: m && u && i,
|
|
95
|
-
[_.contentHasPrimaryAreaAndSecondaryArea]: u && i && !m,
|
|
96
|
-
[_.contentVariantFull]: s === "full"
|
|
97
|
-
}), e[5] = t, e[6] = n, e[7] = m, e[8] = c, e[9] = d, e[10] = h, e[11] = a, e[12] = s, e[13] = A, e[14] = p;
|
|
98
|
-
} else
|
|
99
|
-
A = e[13], p = e[14];
|
|
100
|
-
const g = p;
|
|
101
|
-
let f;
|
|
102
|
-
e[20] !== t || e[21] !== g || e[22] !== r ? (f = /* @__PURE__ */ y("section", { className: g, ...r, children: t }), e[20] = t, e[21] = g, e[22] = r, e[23] = f) : f = e[23];
|
|
103
|
-
let v;
|
|
104
|
-
return e[24] !== A || e[25] !== f || e[26] !== o ? (v = /* @__PURE__ */ y("div", { className: A, ref: o, children: f }), e[24] = A, e[25] = f, e[26] = o, e[27] = v) : v = e[27], v;
|
|
105
|
-
}, pe = (l) => {
|
|
106
|
-
const e = T.c(26), {
|
|
107
|
-
children: t,
|
|
108
|
-
className: n
|
|
109
|
-
} = l, {
|
|
110
|
-
logoProps: r,
|
|
111
|
-
brandAddOnProps: a,
|
|
112
|
-
setHasBrandAddOn: s
|
|
113
|
-
} = oe(G);
|
|
114
|
-
let c;
|
|
115
|
-
e[0] !== r ? (c = r || {}, e[0] = r, e[1] = c) : c = e[1];
|
|
116
|
-
const {
|
|
117
|
-
aria: d,
|
|
118
|
-
logo: o,
|
|
119
|
-
href: h,
|
|
120
|
-
target: m
|
|
121
|
-
} = c, A = o === void 0 ? "main" : o, p = h === void 0 ? "/" : h, g = m === void 0 ? "_self" : m;
|
|
122
|
-
let f;
|
|
123
|
-
e[2] !== a || e[3] !== t || e[4] !== s ? (f = () => {
|
|
124
|
-
t || !ve(a) ? s == null || s(!0) : s == null || s(!1);
|
|
125
|
-
}, e[2] = a, e[3] = t, e[4] = s, e[5] = f) : f = e[5];
|
|
126
|
-
let v;
|
|
127
|
-
e[6] !== a || e[7] !== t ? (v = [t, a], e[6] = a, e[7] = t, e[8] = v) : v = e[8], ne(f, v);
|
|
128
|
-
let E;
|
|
129
|
-
e[9] !== A ? (E = x(_.logo, {
|
|
130
|
-
[_.logoReduced]: A.includes("reduced")
|
|
131
|
-
}), e[9] = A, e[10] = E) : E = e[10];
|
|
132
|
-
const u = E;
|
|
133
|
-
let i;
|
|
134
|
-
e[11] !== n ? (i = x(_.brand, n), e[11] = n, e[12] = i) : i = e[12];
|
|
135
|
-
let b;
|
|
136
|
-
e[13] !== d || e[14] !== p || e[15] !== A || e[16] !== u || e[17] !== g ? (b = /* @__PURE__ */ y(Pe, { className: u, aria: d, logo: A, href: p, target: g }), e[13] = d, e[14] = p, e[15] = A, e[16] = u, e[17] = g, e[18] = b) : b = e[18];
|
|
137
|
-
let S;
|
|
138
|
-
e[19] !== a ? (S = ve(a) ? void 0 : /* @__PURE__ */ y(ge, { ...a }), e[19] = a, e[20] = S) : S = e[20];
|
|
139
|
-
let D;
|
|
140
|
-
return e[21] !== t || e[22] !== S || e[23] !== i || e[24] !== b ? (D = /* @__PURE__ */ Ae("div", { className: i, children: [
|
|
141
|
-
b,
|
|
142
|
-
S,
|
|
143
|
-
t
|
|
144
|
-
] }), e[21] = t, e[22] = S, e[23] = i, e[24] = b, e[25] = D) : D = e[25], D;
|
|
145
|
-
};
|
|
146
|
-
pe.displayName = "DSTopBar.BrandArea";
|
|
147
|
-
const ge = (l) => {
|
|
148
|
-
const e = T.c(15), {
|
|
149
|
-
children: t,
|
|
150
|
-
className: n,
|
|
151
|
-
subTitle: r,
|
|
152
|
-
variant: a
|
|
153
|
-
} = l;
|
|
154
|
-
let s;
|
|
155
|
-
e[0] !== n || e[1] !== r ? (s = x(_.brandAddOn, n, {
|
|
156
|
-
[_.brandAddOnDouble]: r
|
|
157
|
-
}), e[0] = n, e[1] = r, e[2] = s) : s = e[2];
|
|
158
|
-
const c = s;
|
|
159
|
-
if (r) {
|
|
160
|
-
let o;
|
|
161
|
-
e[3] !== t ? (o = /* @__PURE__ */ y("span", { children: t }), e[3] = t, e[4] = o) : o = e[4];
|
|
162
|
-
let h;
|
|
163
|
-
e[5] !== r ? (h = r && /* @__PURE__ */ y("span", { className: _.subTitle, children: r }), e[5] = r, e[6] = h) : h = e[6];
|
|
164
|
-
let m;
|
|
165
|
-
return e[7] !== c || e[8] !== o || e[9] !== h ? (m = /* @__PURE__ */ Ae("div", { className: c, children: [
|
|
166
|
-
o,
|
|
167
|
-
h
|
|
168
|
-
] }), e[7] = c, e[8] = o, e[9] = h, e[10] = m) : m = e[10], m;
|
|
169
|
-
}
|
|
170
|
-
if (a === "100years") {
|
|
171
|
-
let o;
|
|
172
|
-
return e[11] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ y(Te, {}), e[11] = o) : o = e[11], o;
|
|
173
|
-
}
|
|
174
|
-
let d;
|
|
175
|
-
return e[12] !== c || e[13] !== t ? (d = /* @__PURE__ */ y("div", { className: c, children: t }), e[12] = c, e[13] = t, e[14] = d) : d = e[14], d;
|
|
176
|
-
};
|
|
177
|
-
ge.displayName = "DSTopBar.BrandAddOn";
|
|
178
|
-
const ue = (l) => {
|
|
179
|
-
const e = T.c(5), {
|
|
180
|
-
children: t,
|
|
181
|
-
className: n
|
|
182
|
-
} = l;
|
|
183
|
-
let r;
|
|
184
|
-
e[0] !== n ? (r = x(_.primary, n), e[0] = n, e[1] = r) : r = e[1];
|
|
185
|
-
let a;
|
|
186
|
-
return e[2] !== t || e[3] !== r ? (a = /* @__PURE__ */ y("div", { className: r, children: t }), e[2] = t, e[3] = r, e[4] = a) : a = e[4], a;
|
|
187
|
-
};
|
|
188
|
-
ue.displayName = "DSTopBar.PrimaryArea";
|
|
189
|
-
const _e = (l) => {
|
|
190
|
-
const e = T.c(5), {
|
|
191
|
-
children: t,
|
|
192
|
-
className: n
|
|
193
|
-
} = l;
|
|
194
|
-
let r;
|
|
195
|
-
e[0] !== n ? (r = x(_.secondary, n), e[0] = n, e[1] = r) : r = e[1];
|
|
196
|
-
let a;
|
|
197
|
-
return e[2] !== t || e[3] !== r ? (a = /* @__PURE__ */ y("div", { className: r, children: t }), e[2] = t, e[3] = r, e[4] = a) : a = e[4], a;
|
|
198
|
-
};
|
|
199
|
-
_e.displayName = "DSTopBar.SecondaryArea";
|
|
200
|
-
L.BrandArea = pe;
|
|
201
|
-
L.PrimaryArea = ue;
|
|
202
|
-
L.SecondaryArea = _e;
|
|
203
|
-
const Qe = "ds-header_root_c5fh4_1", Xe = "ds-header_root--sticky_c5fh4_4", Ze = "ds-header_root--hidden_c5fh4_9", et = "ds-header_root--fixed_c5fh4_20", tt = "ds-header_main-navigation-area_c5fh4_37", at = "ds-header_main-navigation-area--fixed_c5fh4_90", rt = "ds-header_main-navigation-area--fixed--visible_c5fh4_105", nt = "ds-header_main-navigation-content_c5fh4_111", ot = "ds-header_main-navigation-content--variant-full_c5fh4_115", it = "ds-header_header-placeholder_c5fh4_120", st = "ds-header_header-placeholder--with-banner_c5fh4_123", N = {
|
|
204
|
-
root: Qe,
|
|
205
|
-
rootSticky: Xe,
|
|
206
|
-
rootHidden: Ze,
|
|
207
|
-
rootFixed: et,
|
|
208
|
-
mainNavigationArea: tt,
|
|
209
|
-
mainNavigationAreaFixed: at,
|
|
210
|
-
mainNavigationAreaFixedVisible: rt,
|
|
211
|
-
mainNavigationContent: nt,
|
|
212
|
-
mainNavigationContentVariantFull: ot,
|
|
213
|
-
headerPlaceholder: it,
|
|
214
|
-
headerPlaceholderWithBanner: st
|
|
215
|
-
}, G = De({
|
|
216
|
-
variant: "main"
|
|
217
|
-
}), ie = (l) => {
|
|
218
|
-
const e = T.c(57);
|
|
219
|
-
let t, n, r, a, s, c, d;
|
|
220
|
-
e[0] !== l ? ({
|
|
221
|
-
children: n,
|
|
222
|
-
brandAddOnProps: t,
|
|
223
|
-
className: r,
|
|
224
|
-
isHeaderSticky: c,
|
|
225
|
-
variant: d,
|
|
226
|
-
logoProps: a,
|
|
227
|
-
...s
|
|
228
|
-
} = l, e[0] = l, e[1] = t, e[2] = n, e[3] = r, e[4] = a, e[5] = s, e[6] = c, e[7] = d) : (t = e[1], n = e[2], r = e[3], a = e[4], s = e[5], c = e[6], d = e[7]);
|
|
229
|
-
const o = c === void 0 ? !1 : c, h = d === void 0 ? "main" : d, [m, A] = V(!1);
|
|
230
|
-
let p;
|
|
231
|
-
e[8] !== n ? (p = R(n, ie.BannerArea, !0), e[8] = n, e[9] = p) : p = e[9];
|
|
232
|
-
const g = p, f = R(n, L.BrandArea), v = R(n, L.PrimaryArea), E = R(n, L.SecondaryArea);
|
|
233
|
-
process.env.NODE_ENV !== "production" && Fe({
|
|
234
|
-
hasBrandArea: f,
|
|
235
|
-
hasPrimaryArea: v,
|
|
236
|
-
hasSecondaryArea: E
|
|
237
|
-
});
|
|
238
|
-
const u = Ee(), [i, b] = V(!1), S = U(null), D = U(null), se = U(null), ce = U(null), [le, Ne] = V(!1), [M, Be] = V(!1), [w, ye] = V(!0), [de, we] = V(!1), he = U(i);
|
|
239
|
-
let J, K;
|
|
240
|
-
e[10] !== o ? (J = () => {
|
|
241
|
-
if (o) {
|
|
242
|
-
const B = () => {
|
|
243
|
-
b((H) => (he.current = H, window.innerWidth < 1024));
|
|
244
|
-
};
|
|
245
|
-
return B(), window.addEventListener("resize", B), () => window.removeEventListener("resize", B);
|
|
246
|
-
}
|
|
247
|
-
}, K = [o], e[10] = o, e[11] = J, e[12] = K) : (J = e[11], K = e[12]), ne(J, K);
|
|
248
|
-
let Q, X;
|
|
249
|
-
e[13] === Symbol.for("react.memo_cache_sentinel") ? (Q = () => {
|
|
250
|
-
const B = () => {
|
|
251
|
-
var F, O, re;
|
|
252
|
-
const H = document.documentElement, Y = ((F = S.current) == null ? void 0 : F.offsetHeight) || 0, P = ((O = se.current) == null ? void 0 : O.offsetHeight) || 0;
|
|
253
|
-
let C;
|
|
254
|
-
if (!ce.current)
|
|
255
|
-
C = Y + P;
|
|
256
|
-
else {
|
|
257
|
-
const z = (re = D.current) == null ? void 0 : re.offsetHeight;
|
|
258
|
-
!z || z === Y ? C = parseInt(H.style.getPropertyValue("--ds-header-height").replace("rem", "")) * 16 || 0 : C = z;
|
|
259
|
-
}
|
|
260
|
-
H.style.setProperty("--ds-banner-height", `${fe(Y)}rem`), H.style.setProperty("--ds-header-height", `${fe(C)}rem`), H.style.setProperty("--ds-top-bar-height", `${fe(P)}rem`);
|
|
261
|
-
};
|
|
262
|
-
return B(), window.addEventListener("resize", B), () => window.removeEventListener("resize", B);
|
|
263
|
-
}, X = [], e[13] = Q, e[14] = X) : (Q = e[13], X = e[14]), He(Q, X);
|
|
264
|
-
let Z;
|
|
265
|
-
e[15] !== o || e[16] !== i || e[17] !== w || e[18] !== u ? (Z = () => {
|
|
266
|
-
if (o) {
|
|
267
|
-
const B = () => {
|
|
268
|
-
const P = D.current, C = !!P && window.scrollY <= P.offsetHeight;
|
|
269
|
-
Ne(C);
|
|
270
|
-
const F = ce.current, O = se.current;
|
|
271
|
-
if (!i && he.current && !w) {
|
|
272
|
-
ye(C && !!P && window.scrollY <= P.offsetHeight);
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
const re = !!O && !!F && F.getBoundingClientRect().bottom > O.getBoundingClientRect().bottom, z = !F && !!O && !!S.current && (window.scrollY >= S.current.offsetHeight || 0) || !F && !S.current && !!O && window.scrollY >= 1;
|
|
276
|
-
ye(F ? re && !!P && window.scrollY <= P.offsetHeight : !z);
|
|
277
|
-
};
|
|
278
|
-
window.addEventListener("scroll", B, {
|
|
279
|
-
passive: !0
|
|
280
|
-
}), B();
|
|
281
|
-
const H = D.current, Y = !!H && H.getBoundingClientRect().bottom > 0;
|
|
282
|
-
return i && Be(u === "up" && !Y), i || we(u === "up" && !w), () => {
|
|
283
|
-
window.removeEventListener("scroll", B);
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
}, e[15] = o, e[16] = i, e[17] = w, e[18] = u, e[19] = Z) : Z = e[19];
|
|
287
|
-
let ee;
|
|
288
|
-
e[20] !== o || e[21] !== i || e[22] !== u ? (ee = [o, i, he, u], e[20] = o, e[21] = i, e[22] = u, e[23] = ee) : ee = e[23], ne(Z, ee);
|
|
289
|
-
let te;
|
|
290
|
-
e[24] !== r || e[25] !== M || e[26] !== o || e[27] !== le || e[28] !== i ? (te = x(N.root, r, o ? {
|
|
291
|
-
[N.rootSticky]: i,
|
|
292
|
-
[N.rootHidden]: i && !le,
|
|
293
|
-
[N.rootFixed]: i && M
|
|
294
|
-
} : {}), e[24] = r, e[25] = M, e[26] = o, e[27] = le, e[28] = i, e[29] = te) : te = e[29];
|
|
295
|
-
const me = te;
|
|
296
|
-
let q;
|
|
297
|
-
e[30] !== t || e[31] !== m || e[32] !== de || e[33] !== o || e[34] !== i || e[35] !== w || e[36] !== a || e[37] !== h ? (q = {
|
|
298
|
-
variant: h,
|
|
299
|
-
bannerAreaRef: S,
|
|
300
|
-
brandAddOnProps: t,
|
|
301
|
-
hasBrandAddOn: m,
|
|
302
|
-
setHasBrandAddOn: A,
|
|
303
|
-
isFixedMainNavigation: de,
|
|
304
|
-
isHeaderSticky: o,
|
|
305
|
-
isMobile: i,
|
|
306
|
-
isStickyMainNavigationVisible: w,
|
|
307
|
-
mainNavigationAreaRef: ce,
|
|
308
|
-
topBarAreaRef: se,
|
|
309
|
-
logoProps: a
|
|
310
|
-
}, e[30] = t, e[31] = m, e[32] = de, e[33] = o, e[34] = i, e[35] = w, e[36] = a, e[37] = h, e[38] = q) : q = e[38];
|
|
311
|
-
let k;
|
|
312
|
-
e[39] !== n || e[40] !== q ? (k = /* @__PURE__ */ y(G.Provider, { value: q, children: n }), e[39] = n, e[40] = q, e[41] = k) : k = e[41];
|
|
313
|
-
let $;
|
|
314
|
-
e[42] !== s || e[43] !== me || e[44] !== k ? ($ = /* @__PURE__ */ y("header", { className: me, ...s, ref: D, children: k }), e[42] = s, e[43] = me, e[44] = k, e[45] = $) : $ = e[45];
|
|
315
|
-
let W;
|
|
316
|
-
e[46] !== M || e[47] !== i ? (W = i && M && /* @__PURE__ */ y("div", { className: N.headerPlaceholder }), e[46] = M, e[47] = i, e[48] = W) : W = e[48];
|
|
317
|
-
let I;
|
|
318
|
-
e[49] !== g || e[50] !== i || e[51] !== w ? (I = !i && !w && /* @__PURE__ */ y("div", { className: g ? N.headerPlaceholderWithBanner : N.headerPlaceholder }), e[49] = g, e[50] = i, e[51] = w, e[52] = I) : I = e[52];
|
|
319
|
-
let ae;
|
|
320
|
-
return e[53] !== $ || e[54] !== W || e[55] !== I ? (ae = /* @__PURE__ */ Ae(xe, { children: [
|
|
321
|
-
$,
|
|
322
|
-
W,
|
|
323
|
-
I
|
|
324
|
-
] }), e[53] = $, e[54] = W, e[55] = I, e[56] = ae) : ae = e[56], ae;
|
|
325
|
-
}, be = (l) => {
|
|
326
|
-
const e = T.c(4), {
|
|
327
|
-
children: t,
|
|
328
|
-
className: n
|
|
329
|
-
} = l, {
|
|
330
|
-
bannerAreaRef: r
|
|
331
|
-
} = oe(G);
|
|
332
|
-
let a;
|
|
333
|
-
return e[0] !== r || e[1] !== t || e[2] !== n ? (a = /* @__PURE__ */ y("div", { ref: r, className: n, children: t }), e[0] = r, e[1] = t, e[2] = n, e[3] = a) : a = e[3], a;
|
|
334
|
-
};
|
|
335
|
-
be.displayName = "DSHeader.BannerArea";
|
|
336
|
-
const Se = (l) => {
|
|
337
|
-
const e = T.c(15), {
|
|
338
|
-
children: t,
|
|
339
|
-
className: n
|
|
340
|
-
} = l, {
|
|
341
|
-
variant: r,
|
|
342
|
-
isFixedMainNavigation: a,
|
|
343
|
-
isHeaderSticky: s,
|
|
344
|
-
isMobile: c,
|
|
345
|
-
isStickyMainNavigationVisible: d,
|
|
346
|
-
mainNavigationAreaRef: o
|
|
347
|
-
} = oe(G);
|
|
348
|
-
let h;
|
|
349
|
-
e[0] !== n || e[1] !== a || e[2] !== s || e[3] !== c || e[4] !== d ? (h = x(N.mainNavigationArea, n, s ? {
|
|
350
|
-
[N.mainNavigationAreaFixed]: !c && !d,
|
|
351
|
-
[N.mainNavigationAreaFixedVisible]: !c && a
|
|
352
|
-
} : {}), e[0] = n, e[1] = a, e[2] = s, e[3] = c, e[4] = d, e[5] = h) : h = e[5];
|
|
353
|
-
const m = h, A = r === "full";
|
|
354
|
-
let p;
|
|
355
|
-
e[6] !== A ? (p = x(N.mainNavigationContent, {
|
|
356
|
-
[N.mainNavigationContentVariantFull]: A
|
|
357
|
-
}), e[6] = A, e[7] = p) : p = e[7];
|
|
358
|
-
const g = p;
|
|
359
|
-
let f;
|
|
360
|
-
e[8] !== t || e[9] !== g ? (f = /* @__PURE__ */ y("div", { className: g, children: t }), e[8] = t, e[9] = g, e[10] = f) : f = e[10];
|
|
361
|
-
let v;
|
|
362
|
-
return e[11] !== o || e[12] !== m || e[13] !== f ? (v = /* @__PURE__ */ y("div", { className: m, ref: o, children: f }), e[11] = o, e[12] = m, e[13] = f, e[14] = v) : v = e[14], v;
|
|
363
|
-
};
|
|
364
|
-
Se.displayName = "DSHeader.MainNavigationArea";
|
|
365
|
-
ie.BannerArea = be;
|
|
366
|
-
ie.MainNavigationArea = Se;
|
|
367
|
-
ie.displayName = "DSHeader";
|
|
368
|
-
export {
|
|
369
|
-
_t as B,
|
|
370
|
-
G as D,
|
|
371
|
-
ut as H,
|
|
372
|
-
ie as a,
|
|
373
|
-
L as b,
|
|
374
|
-
Ke as c,
|
|
375
|
-
ve as i,
|
|
376
|
-
Fe as v
|
|
377
|
-
};
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as v, jsx as a, Fragment as fe } from "react/jsx-runtime";
|
|
3
|
-
import { c as _ } from "./index.CEyLAtio.js";
|
|
4
|
-
import { forwardRef as ge, useState as U, useRef as be, useCallback as me } from "react";
|
|
5
|
-
import { t as De } from "./translate.nuU7uChI.js";
|
|
6
|
-
import { u as Z } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import "./index.CgTHIF3K.js";
|
|
8
|
-
import { g as _e } from "./AriaLiveRegions.utils.Cb327d_2.js";
|
|
9
|
-
import { Asterisk as he } from "../asterisk.CR60hx8S.js";
|
|
10
|
-
import { D as Ie } from "./Button.Cf1CKq8N.js";
|
|
11
|
-
import { FileList as ve } from "../filelist.BiKMKCyg.js";
|
|
12
|
-
import { D as we } from "./Icon.NSsVrYeq.js";
|
|
13
|
-
import { D as ze } from "./SystemFeedback.CyGbUCzT.js";
|
|
14
|
-
import { g as w } from "./helpers.BbWkXTr3.js";
|
|
15
|
-
import '../assets/InputFile.CCQxsulT.css';const Se = "ds-input-file_root_1pdsr_1", Ne = "ds-input-file_hint_1pdsr_1", Le = "ds-input-file_label_1pdsr_1", ke = "ds-input-file_browse-button--is-dragging-filled_1pdsr_4", ye = "ds-input-file_browse-button--is-dragging_1pdsr_4", Be = "ds-input-file_label--hidden_1pdsr_44", Fe = "ds-input-file_label--disabled_1pdsr_57", Te = "ds-input-file_feedback_1pdsr_77", Ae = "ds-input-file_dropzone_1pdsr_82", $e = "ds-input-file_dropzone--disabled_1pdsr_88", Ce = "ds-input-file_dropzone--invalid_1pdsr_102", Ee = "ds-input-file_dropzone--is-dragging_1pdsr_105", Re = "ds-input-file_hint-drop-zone_1pdsr_108", qe = "ds-input-file_upload-icon_1pdsr_111", Pe = "ds-input-file_browse-button-dropzone--is-dragging_1pdsr_114", xe = "ds-input-file_instructions_1pdsr_117", He = "ds-input-file_input_1pdsr_154", Oe = "ds-input-file_required-sr-info_1pdsr_158", t = {
|
|
16
|
-
root: Se,
|
|
17
|
-
hint: Ne,
|
|
18
|
-
label: Le,
|
|
19
|
-
browseButtonIsDraggingFilled: ke,
|
|
20
|
-
browseButtonIsDragging: ye,
|
|
21
|
-
labelHidden: Be,
|
|
22
|
-
labelDisabled: Fe,
|
|
23
|
-
feedback: Te,
|
|
24
|
-
dropzone: Ae,
|
|
25
|
-
dropzoneDisabled: $e,
|
|
26
|
-
dropzoneInvalid: Ce,
|
|
27
|
-
dropzoneIsDragging: Ee,
|
|
28
|
-
hintDropZone: Re,
|
|
29
|
-
uploadIcon: qe,
|
|
30
|
-
browseButtonDropzoneIsDragging: Pe,
|
|
31
|
-
instructions: xe,
|
|
32
|
-
input: He,
|
|
33
|
-
requiredSrInfo: Oe
|
|
34
|
-
}, We = {
|
|
35
|
-
dragAndDropInstructions: "Drag and drop files here or",
|
|
36
|
-
feedbackFileSize: "File too large. Maximum file size is",
|
|
37
|
-
feedbackFileType: "File type not allowed",
|
|
38
|
-
// {0} is the file name
|
|
39
|
-
fileListRemoveSelectionButtonLabel: "Remove {0} from selected files",
|
|
40
|
-
fileListPreviewAltText: "Preview of",
|
|
41
|
-
filesSelectedHint: "The following files are selected",
|
|
42
|
-
required: "required"
|
|
43
|
-
}, Ve = {
|
|
44
|
-
dragAndDropInstructions: "Dateien hier hin ziehen oder",
|
|
45
|
-
feedbackFileSize: "Datei zu groß. Maximale Dateigröße ist",
|
|
46
|
-
feedbackFileType: "Dateityp nicht zugelassen",
|
|
47
|
-
// {0} is the file name
|
|
48
|
-
fileListRemoveSelectionButtonLabel: "Datei {0} aus der Auswahl entfernen",
|
|
49
|
-
fileListPreviewAltText: "Vorschau von",
|
|
50
|
-
filesSelectedHint: "Die folgenden Dateien sind ausgewählt",
|
|
51
|
-
required: "erforderlich"
|
|
52
|
-
}, je = {
|
|
53
|
-
en: We,
|
|
54
|
-
de: Ve
|
|
55
|
-
}, Me = (r, d) => {
|
|
56
|
-
const i = d.split(",").map((l) => l.trim().toLowerCase()).filter(Boolean), u = r.name.toLowerCase(), o = r.type.toLowerCase();
|
|
57
|
-
return i.some((l) => {
|
|
58
|
-
if (l.startsWith("."))
|
|
59
|
-
return u.endsWith(l);
|
|
60
|
-
if (l.endsWith("/*")) {
|
|
61
|
-
const [z] = o.split("/");
|
|
62
|
-
return z === l.slice(0, -2);
|
|
63
|
-
}
|
|
64
|
-
return o === l;
|
|
65
|
-
});
|
|
66
|
-
}, Ue = ({
|
|
67
|
-
id: r,
|
|
68
|
-
label: d,
|
|
69
|
-
inputFileButtonProps: i
|
|
70
|
-
}) => {
|
|
71
|
-
var u;
|
|
72
|
-
if (!r)
|
|
73
|
-
throw new Error(w("DSInputFile", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputFile component.'));
|
|
74
|
-
if (!d)
|
|
75
|
-
throw new Error(w("DSInputFile", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputFile component. If you don't want to display a label, set hideLabel={true}.`));
|
|
76
|
-
if (i && ((u = i.label) == null ? void 0 : u.trim()) === "")
|
|
77
|
-
throw new Error(w("DSInputFile", "The input file button needs to have a label for a11y reasons. Please add a label to the inputFileButtonProps."));
|
|
78
|
-
if (i && i.variant && i.variant !== "outline" && i.variant !== "filled")
|
|
79
|
-
throw new Error(w("DSInputFile", "The inputFileButtonProps variant value can only be 'outline' for DSInputFile components inside forms or 'filled' for standalone DSInputFile components."));
|
|
80
|
-
}, Ze = ge(({
|
|
81
|
-
id: r,
|
|
82
|
-
label: d,
|
|
83
|
-
accept: i,
|
|
84
|
-
className: u,
|
|
85
|
-
disabled: o = !1,
|
|
86
|
-
fileListItemRemoveButtonProps: l,
|
|
87
|
-
hideLabel: z = !1,
|
|
88
|
-
hint: m,
|
|
89
|
-
inputFileButtonProps: T,
|
|
90
|
-
invalid: h = !1,
|
|
91
|
-
isHintOutsideDropzone: G = {
|
|
92
|
-
base: !0,
|
|
93
|
-
m: !1
|
|
94
|
-
},
|
|
95
|
-
lang: A = "en",
|
|
96
|
-
maxSizeInMb: S = 7,
|
|
97
|
-
multiple: D = !1,
|
|
98
|
-
required: $ = !1,
|
|
99
|
-
showFileList: J = !0,
|
|
100
|
-
showDropzone: c = !1,
|
|
101
|
-
systemFeedback: N,
|
|
102
|
-
translations: K,
|
|
103
|
-
onFilesSelect: p,
|
|
104
|
-
...Q
|
|
105
|
-
}, I) => {
|
|
106
|
-
const f = De(K || je[A]);
|
|
107
|
-
process.env.NODE_ENV !== "production" && Ue({
|
|
108
|
-
id: r,
|
|
109
|
-
label: d,
|
|
110
|
-
inputFileButtonProps: T
|
|
111
|
-
});
|
|
112
|
-
const {
|
|
113
|
-
label: X = A === "en" ? `Choose File${D ? "s" : ""}` : `Datei${D ? "en" : ""} auswählen`,
|
|
114
|
-
variant: L = "outline",
|
|
115
|
-
...Y
|
|
116
|
-
} = T || {}, [C, E] = U([]), g = be(null), [b, k] = U(!1), ee = S * 1024 * 1024, y = `${r}-label`, R = `${r}-feedback`, B = `${r}-hint`, q = m ? ` ${B}` : "", te = Z(z), P = Z(G), ne = _(t.root, u), ie = _(t.dropzone, {
|
|
117
|
-
[t.dropzoneDisabled]: o,
|
|
118
|
-
[t.dropzoneInvalid]: h,
|
|
119
|
-
[t.dropzoneIsDragging]: b
|
|
120
|
-
}), oe = _(t.label, {
|
|
121
|
-
// hide label only visually to keep them available for assistive technologies
|
|
122
|
-
[t.labelHidden]: te,
|
|
123
|
-
[t.labelDisabled]: o
|
|
124
|
-
}), se = _(t.browseButton, {
|
|
125
|
-
[t.browseButtonIsDragging]: b && L === "outline",
|
|
126
|
-
[t.browseButtonIsDraggingFilled]: b && L === "filled"
|
|
127
|
-
}), re = _(t.browseButtonDropzone, {
|
|
128
|
-
[t.browseButtonDropzoneIsDragging]: b
|
|
129
|
-
}), ae = [h && N && R].filter(Boolean).join(" ") || void 0, le = (e) => {
|
|
130
|
-
g.current = e, typeof I == "function" ? I(e) : I && (I.current = e);
|
|
131
|
-
}, x = (e) => {
|
|
132
|
-
if (!e)
|
|
133
|
-
return;
|
|
134
|
-
const n = [];
|
|
135
|
-
for (const s of e)
|
|
136
|
-
if (i && !Me(s, i) && (s.feedback = `${f("feedbackFileType")}: ${s.type}.`), s.size > ee && (s.feedback = `${f("feedbackFileSize")} ${S} MB.`), n.push(s), !D && n.length > 0)
|
|
137
|
-
break;
|
|
138
|
-
n.length > 0 && (E(() => {
|
|
139
|
-
const s = [...n], M = s.map(({
|
|
140
|
-
name: F,
|
|
141
|
-
feedback: pe = ""
|
|
142
|
-
}) => `${F} ${pe}`).join(", ");
|
|
143
|
-
return setTimeout(() => {
|
|
144
|
-
ce(`${f("filesSelectedHint")}: ${M}.`);
|
|
145
|
-
}, 1e3), s;
|
|
146
|
-
}), p == null || p(n));
|
|
147
|
-
}, H = (e) => {
|
|
148
|
-
var n;
|
|
149
|
-
o || ((n = g.current) == null || n.click(), e.stopPropagation());
|
|
150
|
-
}, O = (e) => {
|
|
151
|
-
e.preventDefault(), b || k(!0);
|
|
152
|
-
}, W = (e) => {
|
|
153
|
-
e.preventDefault(), b && k(!1);
|
|
154
|
-
}, V = me((e) => {
|
|
155
|
-
e.preventDefault(), !o && (k(!1), x(e.dataTransfer.files));
|
|
156
|
-
}, [D, i, S, o]), de = (e) => {
|
|
157
|
-
x(e.target.files), g != null && g.current && (g.current.value = "");
|
|
158
|
-
}, ue = (e) => {
|
|
159
|
-
E((n) => {
|
|
160
|
-
const s = n.filter((M, F) => F !== e);
|
|
161
|
-
return p == null || p(s), s;
|
|
162
|
-
});
|
|
163
|
-
}, ce = (e) => {
|
|
164
|
-
const n = _e();
|
|
165
|
-
n && (n.innerText = e, setTimeout(() => {
|
|
166
|
-
n.innerText = "";
|
|
167
|
-
}, 350));
|
|
168
|
-
}, j = () => /* @__PURE__ */ a(Ie, { ...Y, className: c ? re : se, type: "button", variant: L, size: c ? "small" : "medium", disabled: o, iconName: c ? void 0 : "upload", onClick: H, "aria-describedby": ae, "aria-invalid": h, children: X });
|
|
169
|
-
return /* @__PURE__ */ v("div", { className: ne, children: [
|
|
170
|
-
/* @__PURE__ */ v("label", { className: oe, id: y, htmlFor: r, children: [
|
|
171
|
-
d,
|
|
172
|
-
$ && /* @__PURE__ */ v(fe, { children: [
|
|
173
|
-
/* @__PURE__ */ a(he, {}),
|
|
174
|
-
/* @__PURE__ */ a("span", { className: t.requiredSrInfo, children: f("required") })
|
|
175
|
-
] })
|
|
176
|
-
] }),
|
|
177
|
-
m && (P || !c) && /* @__PURE__ */ a("div", { className: t.hint, id: B, children: m }),
|
|
178
|
-
h && N && /* @__PURE__ */ a(ze, { className: t.feedback, message: N, variant: "error", id: R }),
|
|
179
|
-
!c && /* @__PURE__ */ a(
|
|
180
|
-
"div",
|
|
181
|
-
{
|
|
182
|
-
onDragOver: O,
|
|
183
|
-
onDragLeave: W,
|
|
184
|
-
onDrop: V,
|
|
185
|
-
"aria-labelledby": `${y}${q}`,
|
|
186
|
-
"aria-disabled": o,
|
|
187
|
-
children: j()
|
|
188
|
-
}
|
|
189
|
-
),
|
|
190
|
-
c && /* @__PURE__ */ v(
|
|
191
|
-
"div",
|
|
192
|
-
{
|
|
193
|
-
className: ie,
|
|
194
|
-
onClick: (e) => H(e),
|
|
195
|
-
onDragOver: O,
|
|
196
|
-
onDragLeave: W,
|
|
197
|
-
onDrop: V,
|
|
198
|
-
"aria-labelledby": `${y}${q}`,
|
|
199
|
-
"aria-disabled": o,
|
|
200
|
-
children: [
|
|
201
|
-
/* @__PURE__ */ a(we, { name: "upload", className: t.uploadIcon, size: "x-large" }),
|
|
202
|
-
/* @__PURE__ */ a("p", { id: "file-upload-instructions", className: t.instructions, children: f("dragAndDropInstructions") }),
|
|
203
|
-
j(),
|
|
204
|
-
m && !P && /* @__PURE__ */ a("div", { className: t.hintDropZone, id: B, children: m })
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
),
|
|
208
|
-
/* @__PURE__ */ a("input", { ...Q, type: "file", className: t.input, id: r, ref: le, accept: i, multiple: D, "aria-hidden": "true", required: $, disabled: o, onChange: de }),
|
|
209
|
-
C.length > 0 && J && /* @__PURE__ */ a(ve, { files: C, onRemoveFile: ue, fileListItemRemoveButtonProps: l, t: f })
|
|
210
|
-
] });
|
|
211
|
-
});
|
|
212
|
-
Ze.displayName = "DSInputFile";
|
|
213
|
-
export {
|
|
214
|
-
Ze as D,
|
|
215
|
-
We as a,
|
|
216
|
-
Ve as b,
|
|
217
|
-
je as c,
|
|
218
|
-
Me as f,
|
|
219
|
-
Ue as v
|
|
220
|
-
};
|