@stihl-design-system/components 1.0.0-RC.47 → 1.0.0-RC.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{accordion.BQ7vavIt.js → accordion.D4XR2R7e.js} +2 -2
- package/{actionbutton.C7lqEmBx.js → actionbutton.C8hePX-D.js} +3 -3
- package/{actioncard.dgVHW0BC.js → actioncard.kDxu01xm.js} +1 -1
- package/{actionlink.CL6v1mQA.js → actionlink.dccc5JQV.js} +3 -3
- package/{arialiveregions.DC1Gq9Lo.js → arialiveregions.BniSDuPM.js} +9 -10
- package/assets/Accordion.RlqWqpGo.css +1 -0
- package/assets/ActionButton.Dw2FeIaW.css +1 -0
- package/assets/ActionCard.viEoC26n.css +1 -0
- package/assets/ActionLink.B1Jjaf7k.css +1 -0
- package/assets/Button.Bi1KUKMv.css +1 -0
- package/assets/Checkbox.C6RWhy0V.css +1 -0
- package/assets/Chip.DfamkUPw.css +1 -0
- package/assets/CustomReactSelect.CvWMmrAU.css +1 -0
- package/assets/Dialog.6AkQo8ew.css +1 -0
- package/assets/Drawer.CDOlX809.css +1 -0
- package/assets/Fieldset.BbLGXCWa.css +1 -0
- package/assets/InputFile.CDtghZtl.css +1 -0
- package/assets/InputNumber.BNpO9p7n.css +1 -0
- package/assets/InputPassword.BgZo-RUc.css +1 -0
- package/assets/InputSearch.BROFFTK9.css +1 -0
- package/assets/LinkButton.IKIlFnpH.css +1 -0
- package/assets/Notification.2B81JHOp.css +1 -0
- package/assets/Pagination.DH71DZ0j.css +1 -0
- package/assets/Popover.58Tb0dOt.css +1 -0
- package/assets/Select.CfTN3CJo.css +1 -0
- package/assets/Slider.B4kzL60S.css +1 -0
- package/assets/{SystemFeedback.DYi9QetY.css → SystemFeedback.DVMml_h9.css} +1 -1
- package/assets/TextUtility.BThulfyl.css +1 -0
- package/assets/Textarea.BO4AcRJD.css +1 -0
- package/assets/buttonround.syTU1QSI.css +1 -0
- package/assets/chipgroup.DtCnsmS7.css +1 -0
- package/assets/filelist.B-Ru0GP_.css +1 -0
- package/assets/input.Dy8VS73e.css +1 -0
- package/assets/numberindicator.CtbitPQ8.css +1 -0
- package/assets/progressindicator.tyY_RVQ9.css +1 -0
- package/assets/radio.9hUUyg8R.css +1 -0
- package/assets/switch.8v7Wp1Fj.css +1 -0
- package/assets/tabpane.DDaeSDQb.css +1 -0
- package/assets/text.BwGsYzGM.css +1 -0
- package/assets/tooltip.C_BL2kou.css +1 -0
- package/{banner.BlB_7xue.js → banner.DO7GsDL_.js} +1 -1
- package/{breadcrumb.DajORKq7.js → breadcrumb.DYov6vtt.js} +3 -3
- package/{button.EooIlFBI.js → button.qxcuzbnv.js} +2 -2
- package/buttonround.BO7_ewzA.js +101 -0
- package/{checkbox.NJj9qMnx.js → checkbox.C9kyIY9P.js} +4 -5
- package/{checkboxgroup.DELdyn0X.js → checkboxgroup.kEUxnKLf.js} +2 -2
- package/{chip.C4h8Hm9g.js → chip.5ktNLRYf.js} +3 -3
- package/chipgroup.kRU3Z98U.js +226 -0
- package/chunks/Accordion.gih2ni1d.js +179 -0
- package/chunks/ActionButton.B-wm5sUy.js +194 -0
- package/chunks/{ActionCard.Dbq2VqyZ.js → ActionCard.Bm-2ewfS.js} +44 -44
- package/chunks/ActionLink.D0KzqbH4.js +166 -0
- package/chunks/{AriaLiveRegions.utils.BPvIKT6B.js → AriaLiveRegions.utils.xoETe2Ps.js} +14 -16
- package/chunks/{Breadcrumb.Ccm79ver.js → Breadcrumb.I2G-T0zc.js} +2 -2
- package/chunks/Button.CCol--xy.js +165 -0
- package/chunks/Checkbox.BxOGR1bR.js +96 -0
- package/chunks/CheckboxGroup.TneO0tuE.js +85 -0
- package/chunks/Chip.DffaXMkV.js +148 -0
- package/chunks/{CustomReactSelect.oEQpO9iN.js → CustomReactSelect.DTAavYaz.js} +282 -277
- package/chunks/Dialog.guuxflWL.js +101 -0
- package/chunks/{Drawer.CDe_g99S.js → Drawer.CjUZu6GW.js} +27 -28
- package/chunks/Fieldset.BBMuLKps.js +94 -0
- package/chunks/{Flag.X9tB3Mfv.js → Flag.CbQYBzVC.js} +12 -13
- package/chunks/{Header.bLSdAY9-.js → Header.CvcGSuhX.js} +1 -1
- package/chunks/{Input.utils.CkmzxIrU.js → Input.utils.Wycy2SzG.js} +23 -25
- package/chunks/InputFile.y71Cd5J9.js +260 -0
- package/chunks/InputNumber.Fn2YbF_s.js +250 -0
- package/chunks/InputPassword.DtT9yrlx.js +129 -0
- package/chunks/InputSearch.BoAfGqoH.js +157 -0
- package/chunks/LinkButton.BxG7fx1O.js +150 -0
- package/chunks/LinkCard.DM-5WrSt.js +200 -0
- package/chunks/{MegaMenu.DbunD_yW.js → MegaMenu.udXR1H3W.js} +1 -1
- package/chunks/{NavigationTabList.CyrKNAer.js → NavigationTabList.thzA1pU8.js} +1 -1
- package/chunks/{NavigationTabs.DVBe-Wt3.js → NavigationTabs.BWewgBch.js} +1 -1
- package/chunks/Notification.C_o7Ge6Q.js +91 -0
- package/chunks/Pagination.BrOMUJMi.js +272 -0
- package/chunks/Popover.CxZZ_y1Z.js +230 -0
- package/chunks/RadioGroup.CO91_5hA.js +136 -0
- package/chunks/Select.EzoMdk1u.js +157 -0
- package/chunks/Slider.CX38t4Sk.js +330 -0
- package/chunks/{Stepper.KBRikedB.js → Stepper.Ds_aIEF8.js} +68 -69
- package/chunks/SystemFeedback.DhWcYjnu.js +43 -0
- package/chunks/{Tabs.xXn4zpGp.js → Tabs.BHVlgp7L.js} +2 -2
- package/chunks/Text.utils.DzlY9pJS.js +9 -0
- package/chunks/TextUtility.BZLwqyic.js +82 -0
- package/chunks/Textarea.vuJgvW6_.js +192 -0
- package/chunks/{Toast.NZfb7z3q.js → Toast.V_ZUAsf2.js} +1 -1
- package/chunks/translate.DSb-TdWR.js +2460 -0
- package/{combobox.CPsl2TC0.js → combobox.C6cPz4AJ.js} +1 -1
- package/components/Accordion/Accordion.d.ts +5 -0
- package/components/ActionButton/ActionButton.d.ts +5 -1
- package/components/ActionLink/ActionLink.d.ts +1 -1
- package/components/Button/Button.utils.d.ts +1 -1
- package/components/Checkbox/Checkbox.d.ts +8 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +9 -1
- package/components/ChipGroup/Chip.d.ts +2 -0
- package/components/ChipGroup/ChipGroup.d.ts +12 -2
- package/components/ChipGroup/ChipGroup.utils.d.ts +39 -15
- package/components/Combobox/Combobox.utils.d.ts +66 -9
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +5 -1
- package/components/Combobox/CustomReactSelect/CustomReactSelect.utils.d.ts +1 -1
- package/components/Fieldset/Fieldset.d.ts +9 -2
- package/components/Input/Input.d.ts +8 -1
- package/components/InputFile/FileList/FileList.d.ts +4 -2
- package/components/InputFile/FileList/FilePreview/FilePreview.d.ts +8 -2
- package/components/InputFile/FileList/ProgressIndicator/ProgressIndicator.d.ts +8 -2
- package/components/InputFile/InputFile.d.ts +12 -2
- package/components/InputFile/InputFile.utils.d.ts +41 -23
- package/components/InputNumber/InputNumber.d.ts +8 -1
- package/components/InputPassword/InputPassword.d.ts +8 -1
- package/components/InputSearch/InputSearch.d.ts +8 -1
- package/components/LinkCard/LinkCard.d.ts +10 -4
- package/components/LinkCard/LinkCard.utils.d.ts +2 -2
- package/components/NumberIndicator/NumberIndicator.d.ts +6 -1
- package/components/Pagination/Pagination.d.ts +10 -3
- package/components/Pagination/Pagination.utils.d.ts +22 -9
- package/components/Popover/Popover.d.ts +9 -1
- package/components/Popover/Popover.utils.d.ts +3 -2
- package/components/Radio/Radio.d.ts +5 -0
- package/components/RadioGroup/RadioGroup.d.ts +8 -0
- package/components/Select/Select.d.ts +8 -1
- package/components/Slider/Slider.d.ts +8 -1
- package/components/Stepper/Step.d.ts +1 -1
- package/components/Stepper/Step.utils.d.ts +1 -1
- package/components/Stepper/Stepper.d.ts +4 -1
- package/components/Stepper/Stepper.utils.d.ts +9 -4
- package/components/SystemFeedback/SystemFeedback.d.ts +9 -1
- package/components/Textarea/Textarea.d.ts +8 -1
- package/{customreactselect.D7BJg-2s.js → customreactselect.L0zSh3Tg.js} +4 -4
- package/{dialog.BlprGigG.js → dialog.Ddq8o8Od.js} +2 -2
- package/{drawer.BoyrTFi1.js → drawer.rbbjQvqL.js} +2 -2
- package/{fieldset.D_e2-vo_.js → fieldset.BHf3XK2q.js} +3 -3
- package/filelist.GrEwoM1u.js +143 -0
- package/filepreview.B2Ot9SZ7.js +97 -0
- package/{flag.0vpitrQ-.js → flag.fX6LAgty.js} +3 -4
- package/{floatingactionbutton.BrdE1vi2.js → floatingactionbutton.BwCiybnc.js} +1 -1
- package/{header.C3AqYBtz.js → header.BCeCjYfG.js} +1 -1
- package/index.es.js +203 -204
- package/input.Dh0ws-9j.js +187 -0
- package/inputfile.DiZh3GcT.js +17 -0
- package/{inputnumber.Box5R2An.js → inputnumber.D2cmptaH.js} +8 -9
- package/{inputpassword.CBc8GNwI.js → inputpassword.C53Kg4EA.js} +4 -4
- package/inputsearch.BrsIDUSW.js +14 -0
- package/link.DEZDbUgq.js +81 -0
- package/{linkbutton.DxEPueLb.js → linkbutton._X50W2Md.js} +3 -3
- package/{linkcard.CCY-VFWN.js → linkcard.BtM3KnjT.js} +3 -3
- package/{logo.D7LnRA1E.js → logo.D6BTxbxv.js} +0 -1
- package/{megamenu.C8OynEzk.js → megamenu.odVCUm4c.js} +2 -2
- package/{navigationtablist.iSQd5PX4.js → navigationtablist.n9DrtYe5.js} +2 -2
- package/{navigationtabs.FtkVv_qV.js → navigationtabs.D0mSyAtK.js} +2 -2
- package/{notification.Cqg8HpJ8.js → notification._X8-8vOa.js} +2 -2
- package/numberindicator.DsK65Bj3.js +39 -0
- package/package.json +6 -1
- package/pagination.B7Hrx_sk.js +14 -0
- package/partials/index.js +68 -68
- package/{popover.DYiEGSnj.js → popover.BBaqL7y9.js} +3 -3
- package/progressindicator.D9CfVD95.js +74 -0
- package/radio.DjToa2aV.js +148 -0
- package/{radiogroup.wqgExwrG.js → radiogroup.mc-8lw65.js} +3 -3
- package/{scroller.Dqnsxq2M.js → scroller.CgWp2WXG.js} +10 -11
- package/{select.DkKuGI6O.js → select.DTZ6a6Ag.js} +5 -6
- package/{skeleton.DUkBgXxO.js → skeleton.CNJdNVav.js} +10 -10
- package/{skiptocontent.CRQywi6J.js → skiptocontent.BsRpWvyu.js} +4 -4
- package/{slider.BOjqQp9n.js → slider.BMGAihY0.js} +3 -3
- package/{step.C6zDRCBu.js → step.DCQ6CawJ.js} +1 -1
- package/stepper.D7-7BdSv.js +15 -0
- package/styles/scss/ds/index.scss +2 -0
- package/styles/scss/ds/lib/border-width.scss +3 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +65 -21
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +4 -2
- package/styles/scss/ds/lib/ds-internal/_link.scss +23 -3
- package/styles/scss/ds/lib/input.scss +12 -7
- package/styles/scss/ds/lib/link.scss +2 -2
- package/styles/scss/ds/lib/radius.scss +5 -0
- package/{switch.CuNNdrkD.js → switch.tM2XBag8.js} +2 -2
- package/{systemfeedback.Da0wX0Eb.js → systemfeedback.BPPOht_9.js} +1 -1
- package/{tablist.BjKwrLz9.js → tablist.BAm0_UIG.js} +22 -23
- package/{tabpane.7vMXUKFX.js → tabpane.B9rZghU6.js} +1 -1
- package/{tabs.-U2k6Oll.js → tabs.BgTdWbTe.js} +3 -3
- package/text.BEO_ZfJq.js +72 -0
- package/{textarea.BWznY6Gg.js → textarea.Cki-uMkZ.js} +5 -6
- package/{textutility.CBLuAdaa.js → textutility.BypzssPt.js} +2 -2
- package/{toast.D9XLSgJg.js → toast.s0Hfuh5i.js} +2 -2
- package/{toastmanager.V5E05qgI.js → toastmanager.CPIPn4Io.js} +19 -20
- package/{tooltip.a1aWHK00.js → tooltip.BFQG-7VR.js} +1 -1
- package/{topbar.BdGK62KJ.js → topbar.Bbct-XkB.js} +3 -3
- package/utils/translate.d.ts +22 -6
- package/assets/Accordion.DPu2l_Kg.css +0 -1
- package/assets/ActionButton.DcQYatF1.css +0 -1
- package/assets/ActionCard.gRQVVFWz.css +0 -1
- package/assets/ActionLink.B62Aa8y9.css +0 -1
- package/assets/Button.BI6zz6Fw.css +0 -1
- package/assets/Checkbox.DknHnS9a.css +0 -1
- package/assets/Chip.CYhVB1Jh.css +0 -1
- package/assets/CustomReactSelect.lKMLwL7n.css +0 -1
- package/assets/Dialog.BKwWy1g2.css +0 -1
- package/assets/Drawer.IRb7Vc1n.css +0 -1
- package/assets/Fieldset.C4Fx4-UV.css +0 -1
- package/assets/InputFile.ne7gwc_5.css +0 -1
- package/assets/InputNumber.BIdsQuFc.css +0 -1
- package/assets/InputPassword.YSKTDTA1.css +0 -1
- package/assets/InputSearch.C3qtDQcj.css +0 -1
- package/assets/LinkButton.CmEE7Od_.css +0 -1
- package/assets/Notification.BO0Mu9No.css +0 -1
- package/assets/Pagination.OLmfdASf.css +0 -1
- package/assets/Popover.mL5g23EK.css +0 -1
- package/assets/Select.CDP-1_K9.css +0 -1
- package/assets/Slider.Cu7MgNph.css +0 -1
- package/assets/TextUtility.bwkCWEiV.css +0 -1
- package/assets/Textarea.Hsq68tg1.css +0 -1
- package/assets/buttonround.rmUb58WF.css +0 -1
- package/assets/chipgroup.BGxjdSDX.css +0 -1
- package/assets/filelist.cP3O1JeJ.css +0 -1
- package/assets/input.BEBgyvkK.css +0 -1
- package/assets/numberindicator.DSpNPJcs.css +0 -1
- package/assets/progressindicator.Dxrigyne.css +0 -1
- package/assets/radio.DsHt-9om.css +0 -1
- package/assets/switch.fwcMI6o7.css +0 -1
- package/assets/tabpane.o34hshTz.css +0 -1
- package/assets/text.Doa-APfR.css +0 -1
- package/assets/tooltip.DrSplliO.css +0 -1
- package/buttonround.BeQakrPs.js +0 -101
- package/chipgroup.BKjeuuM0.js +0 -213
- package/chunks/Accordion.8kTbiPxs.js +0 -173
- package/chunks/ActionButton.CBV1-_HP.js +0 -188
- package/chunks/ActionLink.BXxDS1Gg.js +0 -161
- package/chunks/Button.COycNYUI.js +0 -160
- package/chunks/Checkbox.CMshaWIU.js +0 -88
- package/chunks/CheckboxGroup.D3D1spfJ.js +0 -79
- package/chunks/Chip.DCJYE513.js +0 -157
- package/chunks/Dialog.lJXxzgu2.js +0 -102
- package/chunks/Fieldset.DOjI3DlI.js +0 -91
- package/chunks/InputFile.DYXvF6vT.js +0 -260
- package/chunks/InputNumber.CkWpchPo.js +0 -240
- package/chunks/InputPassword.21E6XMr5.js +0 -121
- package/chunks/InputSearch.Dy3EKa9f.js +0 -149
- package/chunks/LinkButton.BCHTLFMJ.js +0 -150
- package/chunks/LinkCard.BYmTwsS5.js +0 -197
- package/chunks/Notification.BjyLiO2h.js +0 -91
- package/chunks/Pagination.CJikF9Cw.js +0 -247
- package/chunks/Popover.ByaoNwGK.js +0 -221
- package/chunks/RadioGroup.Bh2X6pT9.js +0 -130
- package/chunks/Select.KWb09VmF.js +0 -147
- package/chunks/Slider.CxnIy51F.js +0 -309
- package/chunks/SystemFeedback.4osheYxC.js +0 -38
- package/chunks/Text.utils.BZ4nTZVu.js +0 -11
- package/chunks/TextUtility.BPrxUX-x.js +0 -82
- package/chunks/Textarea.CAOqZMUi.js +0 -181
- package/chunks/translate.nuU7uChI.js +0 -8
- package/filelist.DfAt2xJa.js +0 -128
- package/filepreview.Defs34bv.js +0 -94
- package/input.ChMzyHej.js +0 -175
- package/inputfile.DZIUs1EC.js +0 -18
- package/inputsearch.DzzYb-C0.js +0 -15
- package/link.aU1f2Xzu.js +0 -81
- package/numberindicator.Q7g4J3Ry.js +0 -36
- package/pagination.DA4PMLOq.js +0 -14
- package/progressindicator.DpmERE8T.js +0 -53
- package/radio.KQ8CUM3_.js +0 -137
- package/stepper.DHl3_XU9.js +0 -16
- package/text.CnP3baHy.js +0 -72
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { c as o } from "./index.DQOqod3i.js";
|
|
4
|
-
import { forwardRef as F, useState as M, useRef as U } from "react";
|
|
5
|
-
import { u as v } from "./useBreakpoint.1txsny17.js";
|
|
6
|
-
import { Asterisk as G } from "../asterisk.Dwtdwpkq.js";
|
|
7
|
-
import { D as J } from "./Button.COycNYUI.js";
|
|
8
|
-
import { D as K } from "./Popover.ByaoNwGK.js";
|
|
9
|
-
import { D as Q } from "./SystemFeedback.4osheYxC.js";
|
|
10
|
-
import { g as f } from "./helpers.CexwVao7.js";
|
|
11
|
-
import "./index.cKLI89Eg.js";
|
|
12
|
-
import '../assets/InputPassword.YSKTDTA1.css';const X = "ds-input-password_input_1ws56_1", Y = "ds-input-password_input--small_1ws56_9", Z = "ds-input-password_input--invalid_1ws56_121", z = "ds-input-password_input--has-action-button_1ws56_182", ss = "ds-input-password_root_1ws56_218", as = "ds-input-password_hint_1ws56_218", ts = "ds-input-password_label-wrapper_1ws56_218", es = "ds-input-password_wrapper_1ws56_222", os = "ds-input-password_action-button_1ws56_228", ns = "ds-input-password_label_1ws56_218", rs = "ds-input-password_label--disabled_1ws56_247", is = "ds-input-password_label-wrapper--hidden_1ws56_259", ls = "ds-input-password_feedback_1ws56_287", s = {
|
|
13
|
-
input: X,
|
|
14
|
-
inputSmall: Y,
|
|
15
|
-
inputInvalid: Z,
|
|
16
|
-
inputHasActionButton: z,
|
|
17
|
-
root: ss,
|
|
18
|
-
hint: as,
|
|
19
|
-
labelWrapper: ts,
|
|
20
|
-
wrapper: es,
|
|
21
|
-
actionButton: os,
|
|
22
|
-
label: ns,
|
|
23
|
-
labelDisabled: rs,
|
|
24
|
-
labelWrapperHidden: is,
|
|
25
|
-
feedback: ls
|
|
26
|
-
}, ps = ({
|
|
27
|
-
id: a,
|
|
28
|
-
label: n,
|
|
29
|
-
hideLabel: p,
|
|
30
|
-
popoverContent: d
|
|
31
|
-
}) => {
|
|
32
|
-
if (!a)
|
|
33
|
-
throw new Error(f("DSInputPassword", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputPassword component.'));
|
|
34
|
-
if (!n)
|
|
35
|
-
throw new Error(f("DSInputPassword", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputPassword component. If you don't want to display a label, set hideLabel={true}.`));
|
|
36
|
-
p && d && console.warn(f("DSInputPassword", "Using a popover when hideLabel is set to true is not supported."));
|
|
37
|
-
}, ds = F(({
|
|
38
|
-
id: a,
|
|
39
|
-
label: n,
|
|
40
|
-
autoComplete: p = "new-password",
|
|
41
|
-
className: d,
|
|
42
|
-
disabled: c = !1,
|
|
43
|
-
hint: u,
|
|
44
|
-
hideLabel: h = !1,
|
|
45
|
-
invalid: r = !1,
|
|
46
|
-
popoverContent: w,
|
|
47
|
-
popoverInfoButtonProps: N,
|
|
48
|
-
readonly: P = !1,
|
|
49
|
-
required: D = !1,
|
|
50
|
-
togglePasswordVisibilityButtonProps: g,
|
|
51
|
-
size: b = "medium",
|
|
52
|
-
systemFeedback: m,
|
|
53
|
-
...k
|
|
54
|
-
}, i) => {
|
|
55
|
-
process.env.NODE_ENV !== "production" && ps({
|
|
56
|
-
id: a,
|
|
57
|
-
label: n,
|
|
58
|
-
hideLabel: v(h),
|
|
59
|
-
popoverContent: w
|
|
60
|
-
});
|
|
61
|
-
const {
|
|
62
|
-
hidePasswordText: H = "Hide password",
|
|
63
|
-
showPasswordText: A = "Show password",
|
|
64
|
-
...W
|
|
65
|
-
} = g || {}, [_, x] = M(!1), S = `${a}-label`, y = `${a}-feedback`, I = `${a}-hint`, L = u ? ` ${I}` : "", $ = [r && m && y].filter(Boolean).join(" ") || void 0, B = v(h), C = o(s.root, d), E = o(s.input, {
|
|
66
|
-
// small input
|
|
67
|
-
[s.inputSmall]: b === "small",
|
|
68
|
-
// invalid state
|
|
69
|
-
[s.inputInvalid]: r,
|
|
70
|
-
// action button - input password always has an action button
|
|
71
|
-
[s.inputHasActionButton]: !0
|
|
72
|
-
}), R = o(s.label, {
|
|
73
|
-
[s.labelDisabled]: c
|
|
74
|
-
}), T = o(s.labelWrapper, {
|
|
75
|
-
// hide label only visually to keep them available for assistive technologies
|
|
76
|
-
[s.labelWrapperHidden]: B
|
|
77
|
-
}), V = o(s.actionButton, {
|
|
78
|
-
[s.actionButtonSmall]: b === "small"
|
|
79
|
-
}), j = U(null), q = (e) => {
|
|
80
|
-
j.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
81
|
-
}, O = () => {
|
|
82
|
-
x((e) => !e);
|
|
83
|
-
};
|
|
84
|
-
return /* @__PURE__ */ l("div", { className: C, children: [
|
|
85
|
-
/* @__PURE__ */ l("div", { className: T, children: [
|
|
86
|
-
/* @__PURE__ */ l("label", { className: R, id: S, htmlFor: a, children: [
|
|
87
|
-
n,
|
|
88
|
-
D && /* @__PURE__ */ t(G, {})
|
|
89
|
-
] }),
|
|
90
|
-
w && !B && /* @__PURE__ */ t(K, { placement: "top", defaultAnchorButtonProps: N, children: w })
|
|
91
|
-
] }),
|
|
92
|
-
u && /* @__PURE__ */ t("div", { className: s.hint, id: I, children: u }),
|
|
93
|
-
/* @__PURE__ */ l("div", { className: s.wrapper, children: [
|
|
94
|
-
/* @__PURE__ */ t(
|
|
95
|
-
"input",
|
|
96
|
-
{
|
|
97
|
-
className: E,
|
|
98
|
-
id: a,
|
|
99
|
-
...k,
|
|
100
|
-
ref: q,
|
|
101
|
-
"aria-labelledby": `${S}${L}`,
|
|
102
|
-
"aria-describedby": $,
|
|
103
|
-
"aria-invalid": r,
|
|
104
|
-
"aria-disabled": P,
|
|
105
|
-
readOnly: P,
|
|
106
|
-
required: D,
|
|
107
|
-
disabled: c,
|
|
108
|
-
autoComplete: p,
|
|
109
|
-
type: _ ? "text" : "password"
|
|
110
|
-
}
|
|
111
|
-
),
|
|
112
|
-
/* @__PURE__ */ t(J, { ...W, hideLabel: !0, theme: "light", iconName: _ ? "eye-closed" : "eye", variant: "ghost", className: V, size: b, onClick: O, type: "button", disabled: c, children: _ ? H : A })
|
|
113
|
-
] }),
|
|
114
|
-
r && m && /* @__PURE__ */ t(Q, { className: s.feedback, message: m, variant: "error", id: y })
|
|
115
|
-
] });
|
|
116
|
-
});
|
|
117
|
-
ds.displayName = "DSInputPassword";
|
|
118
|
-
export {
|
|
119
|
-
ds as D,
|
|
120
|
-
ps as v
|
|
121
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { c as s } from "./index.DQOqod3i.js";
|
|
4
|
-
import { forwardRef as nt, useState as at, useRef as L, useEffect as V } from "react";
|
|
5
|
-
import { g as m, a as st } from "./helpers.CexwVao7.js";
|
|
6
|
-
import { u as O } from "./useBreakpoint.1txsny17.js";
|
|
7
|
-
import "./index.cKLI89Eg.js";
|
|
8
|
-
import { Asterisk as ot } from "../asterisk.Dwtdwpkq.js";
|
|
9
|
-
import { D as W } from "./Button.COycNYUI.js";
|
|
10
|
-
import { D as rt } from "./Popover.ByaoNwGK.js";
|
|
11
|
-
import { D as it } from "./SystemFeedback.4osheYxC.js";
|
|
12
|
-
import '../assets/InputSearch.C3qtDQcj.css';const ct = "ds-input-search_input_195kh_1", lt = "ds-input-search_input--small_195kh_9", ut = "ds-input-search_input--invalid_195kh_121", pt = "ds-input-search_input--has-action-button_195kh_182", ht = "ds-input-search_input--has-second-action-button_195kh_185", dt = "ds-input-search_root_195kh_218", mt = "ds-input-search_hint_195kh_218", bt = "ds-input-search_label-wrapper_195kh_218", ft = "ds-input-search_wrapper_195kh_222", _t = "ds-input-search_action-button_195kh_228", St = "ds-input-search_second-action-button_195kh_232", Dt = "ds-input-search_label_195kh_218", kt = "ds-input-search_label--disabled_195kh_251", Bt = "ds-input-search_label-wrapper--hidden_195kh_263", It = "ds-input-search_feedback_195kh_291", t = {
|
|
13
|
-
input: ct,
|
|
14
|
-
inputSmall: lt,
|
|
15
|
-
inputInvalid: ut,
|
|
16
|
-
inputHasActionButton: pt,
|
|
17
|
-
inputHasSecondActionButton: ht,
|
|
18
|
-
root: dt,
|
|
19
|
-
hint: mt,
|
|
20
|
-
labelWrapper: bt,
|
|
21
|
-
wrapper: ft,
|
|
22
|
-
actionButton: _t,
|
|
23
|
-
secondActionButton: St,
|
|
24
|
-
label: Dt,
|
|
25
|
-
labelDisabled: kt,
|
|
26
|
-
labelWrapperHidden: Bt,
|
|
27
|
-
feedback: It
|
|
28
|
-
}, wt = ({
|
|
29
|
-
id: n,
|
|
30
|
-
label: c,
|
|
31
|
-
hideLabel: b,
|
|
32
|
-
popoverContent: f
|
|
33
|
-
}) => {
|
|
34
|
-
if (!n)
|
|
35
|
-
throw new Error(m("DSInputSearch", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputSearch component.'));
|
|
36
|
-
if (!c)
|
|
37
|
-
throw new Error(m("DSInputSearch", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputSearch component. If you don't want to display a label, set hideLabel={true}.`));
|
|
38
|
-
b && f && console.warn(m("DSInputSearch", "Using a popover when hideLabel is set to true is not supported."));
|
|
39
|
-
}, vt = (n) => !!st(n, "form"), gt = nt(({
|
|
40
|
-
id: n,
|
|
41
|
-
label: c,
|
|
42
|
-
className: b,
|
|
43
|
-
clearButtonLabel: f = "Clear search field",
|
|
44
|
-
disabled: o = !1,
|
|
45
|
-
hint: _,
|
|
46
|
-
hideLabel: I = !1,
|
|
47
|
-
invalid: l = !1,
|
|
48
|
-
popoverContent: S,
|
|
49
|
-
popoverInfoButtonProps: $,
|
|
50
|
-
readonly: r = !1,
|
|
51
|
-
required: w = !1,
|
|
52
|
-
size: i = "medium",
|
|
53
|
-
systemFeedback: D,
|
|
54
|
-
value: k,
|
|
55
|
-
submitButtonProps: j,
|
|
56
|
-
onChange: v,
|
|
57
|
-
...R
|
|
58
|
-
}, u) => {
|
|
59
|
-
process.env.NODE_ENV !== "production" && wt({
|
|
60
|
-
id: n,
|
|
61
|
-
label: c,
|
|
62
|
-
hideLabel: O(I),
|
|
63
|
-
popoverContent: S
|
|
64
|
-
});
|
|
65
|
-
const {
|
|
66
|
-
label: x = "Search",
|
|
67
|
-
onClick: q,
|
|
68
|
-
...T
|
|
69
|
-
} = j || {}, [p, g] = at(k), B = L(null), h = L(null), F = (e) => {
|
|
70
|
-
h.current = e, typeof u == "function" ? u(e) : u && (u.current = e);
|
|
71
|
-
}, N = O(I);
|
|
72
|
-
V(() => {
|
|
73
|
-
g(k);
|
|
74
|
-
}, [k]), V(() => {
|
|
75
|
-
B.current && !vt(B.current) && process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.warn(m("DSInputSearch", `The DSInputSearch component with the id "${n}" is not within a form element. This may cause issues with form submission. Please ensure the DSInputSearch component is within a form element.`));
|
|
76
|
-
}, []);
|
|
77
|
-
const y = `${n}-label`, A = `${n}-feedback`, E = `${n}-hint`, M = _ ? ` ${E}` : "", U = [l && D && A].filter(Boolean).join(" ") || void 0, H = p !== "" && p !== void 0 && p !== null, G = s(t.root, b), J = s(t.input, {
|
|
78
|
-
// small input
|
|
79
|
-
[t.inputSmall]: i === "small",
|
|
80
|
-
// invalid state
|
|
81
|
-
[t.inputInvalid]: l,
|
|
82
|
-
// action button - input password always has an action button
|
|
83
|
-
[t.inputHasActionButton]: !0,
|
|
84
|
-
// action second action button
|
|
85
|
-
[t.inputHasSecondActionButton]: H && !r && !o
|
|
86
|
-
}), K = s(t.label, {
|
|
87
|
-
[t.labelDisabled]: o
|
|
88
|
-
}), Q = s(t.labelWrapper, {
|
|
89
|
-
// hide label only visually to keep them available for assistive technologies
|
|
90
|
-
[t.labelWrapperHidden]: N
|
|
91
|
-
}), X = s(t.actionButton, {
|
|
92
|
-
[t.actionButtonSmall]: i === "small"
|
|
93
|
-
}), Y = s(t.secondActionButton, {
|
|
94
|
-
[t.secondActionButtonSmall]: i === "small"
|
|
95
|
-
}), Z = (e, C) => {
|
|
96
|
-
const et = Object.getPrototypeOf(e), P = Object.getOwnPropertyDescriptor(et, "value");
|
|
97
|
-
P?.set ? P.set.call(e, C) : e.value = C;
|
|
98
|
-
}, z = () => {
|
|
99
|
-
if (!h.current)
|
|
100
|
-
return;
|
|
101
|
-
Z(h.current, "");
|
|
102
|
-
const e = new Event("change", {
|
|
103
|
-
bubbles: !0
|
|
104
|
-
});
|
|
105
|
-
h.current?.dispatchEvent(e);
|
|
106
|
-
}, tt = (e) => {
|
|
107
|
-
g(e.target.value), v && v(e);
|
|
108
|
-
};
|
|
109
|
-
return /* @__PURE__ */ d("div", { className: G, ref: B, children: [
|
|
110
|
-
/* @__PURE__ */ d("div", { className: Q, children: [
|
|
111
|
-
/* @__PURE__ */ d("label", { className: K, id: y, htmlFor: n, children: [
|
|
112
|
-
c,
|
|
113
|
-
w && /* @__PURE__ */ a(ot, {})
|
|
114
|
-
] }),
|
|
115
|
-
S && !N && /* @__PURE__ */ a(rt, { placement: "top", defaultAnchorButtonProps: $, children: S })
|
|
116
|
-
] }),
|
|
117
|
-
_ && /* @__PURE__ */ a("div", { className: t.hint, id: E, children: _ }),
|
|
118
|
-
/* @__PURE__ */ d("div", { className: t.wrapper, children: [
|
|
119
|
-
/* @__PURE__ */ a(
|
|
120
|
-
"input",
|
|
121
|
-
{
|
|
122
|
-
className: J,
|
|
123
|
-
id: n,
|
|
124
|
-
...R,
|
|
125
|
-
ref: F,
|
|
126
|
-
"aria-labelledby": `${y}${M}`,
|
|
127
|
-
"aria-describedby": U,
|
|
128
|
-
"aria-invalid": l,
|
|
129
|
-
"aria-disabled": r,
|
|
130
|
-
readOnly: r,
|
|
131
|
-
required: w,
|
|
132
|
-
disabled: o,
|
|
133
|
-
type: "search",
|
|
134
|
-
value: p,
|
|
135
|
-
onChange: tt
|
|
136
|
-
}
|
|
137
|
-
),
|
|
138
|
-
H && !r && !o && /* @__PURE__ */ a(W, { hideLabel: !0, theme: "light", iconName: "cross", className: Y, variant: "ghost", size: i, onClick: z, type: "button", tabIndex: -1, children: f }),
|
|
139
|
-
/* @__PURE__ */ a(W, { ...T, hideLabel: !0, theme: "light", iconName: "magnifying-glass", className: X, variant: "ghost", size: i, onClick: q, type: "submit", disabled: o || r, children: x })
|
|
140
|
-
] }),
|
|
141
|
-
l && D && /* @__PURE__ */ a(it, { className: t.feedback, message: D, variant: "error", id: A })
|
|
142
|
-
] });
|
|
143
|
-
});
|
|
144
|
-
gt.displayName = "DSInputSearch";
|
|
145
|
-
export {
|
|
146
|
-
gt as D,
|
|
147
|
-
vt as i,
|
|
148
|
-
wt as v
|
|
149
|
-
};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as kt, jsx as K } from "react/jsx-runtime";
|
|
3
|
-
import { d as pt } from "./index.cKLI89Eg.js";
|
|
4
|
-
import { c as gt } from "./index.DQOqod3i.js";
|
|
5
|
-
import { forwardRef as bt } from "react";
|
|
6
|
-
import { u as mt } from "./useBreakpoint.1txsny17.js";
|
|
7
|
-
import { D as St } from "./Icon.DYtaQgbw.js";
|
|
8
|
-
import { Tooltip as _t } from "../tooltip.a1aWHK00.js";
|
|
9
|
-
import { g as D } from "./helpers.CexwVao7.js";
|
|
10
|
-
import '../assets/LinkButton.CmEE7Od_.css';const Dt = "ds-link-button_root_1usl1_1", Nt = "ds-link-button_root--highlight_1usl1_76", Lt = "ds-link-button_root--dark-highlight_1usl1_76", It = "ds-link-button_root--filled_1usl1_152", wt = "ds-link-button_root--outline_1usl1_180", Ft = "ds-link-button_root--ghost_1usl1_207", Ot = "ds-link-button_root--ghost-flush_1usl1_232", Bt = "ds-link-button_root--small_1usl1_238", yt = "ds-link-button_root--navigation_1usl1_318", Gt = "ds-link-button_root--navigation--stretched_1usl1_396", Tt = "ds-link-button_root--navigation--stretched--icon-left_1usl1_399", Ht = "ds-link-button_root--dark-filled_1usl1_402", Pt = "ds-link-button_root--dark-outline_1usl1_459", Et = "ds-link-button_root--dark-ghost_1usl1_515", At = "ds-link-button_root--dark-ghost-flush_1usl1_569", xt = "ds-link-button_root--stretched_1usl1_644", zt = "ds-link-button_root--icon-left_1usl1_647", Ct = "ds-link-button_root--icon-only_1usl1_650", Vt = "ds-link-button_root--icon-only-small_1usl1_659", jt = "ds-link-button_icon--navigation_1usl1_671", Kt = "ds-link-button_label--hidden_1usl1_679", e = {
|
|
11
|
-
root: Dt,
|
|
12
|
-
rootHighlight: Nt,
|
|
13
|
-
rootDarkHighlight: Lt,
|
|
14
|
-
rootFilled: It,
|
|
15
|
-
rootOutline: wt,
|
|
16
|
-
rootGhost: Ft,
|
|
17
|
-
rootGhostFlush: Ot,
|
|
18
|
-
rootSmall: Bt,
|
|
19
|
-
rootNavigation: yt,
|
|
20
|
-
rootNavigationStretched: Gt,
|
|
21
|
-
rootNavigationStretchedIconLeft: Tt,
|
|
22
|
-
rootDarkFilled: Ht,
|
|
23
|
-
rootDarkOutline: Pt,
|
|
24
|
-
rootDarkGhost: Et,
|
|
25
|
-
rootDarkGhostFlush: At,
|
|
26
|
-
rootStretched: xt,
|
|
27
|
-
rootIconLeft: zt,
|
|
28
|
-
rootIconOnly: Ct,
|
|
29
|
-
rootIconOnlySmall: Vt,
|
|
30
|
-
iconNavigation: jt,
|
|
31
|
-
labelHidden: Kt
|
|
32
|
-
}, Yt = ["medium", "small"], to = ["filled", "highlight", "outline", "ghost", "navigation"], Rt = ({
|
|
33
|
-
hideLabel: N,
|
|
34
|
-
iconName: L,
|
|
35
|
-
iconSource: t,
|
|
36
|
-
isFlush: i,
|
|
37
|
-
size: r,
|
|
38
|
-
stretched: s,
|
|
39
|
-
theme: a,
|
|
40
|
-
variant: n
|
|
41
|
-
}) => {
|
|
42
|
-
if (n === "navigation" && (r === "small" && console.warn(D("DSLinkButton", 'A "size" prop should not be used in combination with variant="navigation". Please remove the "size" prop.')), a === "dark"))
|
|
43
|
-
throw new Error(D("DSLinkButton", 'A DSLinkButton with variant="navigation" does not support theme="dark". Please remove the "theme" prop.'));
|
|
44
|
-
n !== "ghost" && i ? console.warn(D("DSLinkButton", 'The "isFlush" prop only has an effect when used with variant="ghost". Please remove the "isFlush" prop or set variant="ghost".')) : n === "ghost" && i && s && console.warn(D("DSLinkButton", 'The "stretched" and "isFlush" props do not have an effect when used together. Please remove one of them.')), N && (!L && !t && console.warn(D("DSLinkButton", 'The "hideLabel" prop is set to true but no icon is provided via "iconName" or "iconSource". Please provide an icon to ensure the link is not empty when the label is hidden.')), s && console.warn(D("DSLinkButton", 'The "stretched" and "hideLabel" props do not have an effect when used together. Please remove one of them.')));
|
|
45
|
-
}, Ut = bt((N, L) => {
|
|
46
|
-
const t = pt.c(76);
|
|
47
|
-
let i, r, s, a, n, c, h, u, g, _, I, w, F, O, B, y, G, T, d;
|
|
48
|
-
t[0] !== N ? ({
|
|
49
|
-
children: r,
|
|
50
|
-
aria: i,
|
|
51
|
-
className: s,
|
|
52
|
-
download: a,
|
|
53
|
-
hideLabel: I,
|
|
54
|
-
href: n,
|
|
55
|
-
iconName: c,
|
|
56
|
-
iconPosition: w,
|
|
57
|
-
iconSource: h,
|
|
58
|
-
isFlush: F,
|
|
59
|
-
referrerPolicy: u,
|
|
60
|
-
rel: g,
|
|
61
|
-
size: O,
|
|
62
|
-
stretched: B,
|
|
63
|
-
target: y,
|
|
64
|
-
theme: G,
|
|
65
|
-
variant: T,
|
|
66
|
-
tooltip: d,
|
|
67
|
-
..._
|
|
68
|
-
} = N, t[0] = N, t[1] = i, t[2] = r, t[3] = s, t[4] = a, t[5] = n, t[6] = c, t[7] = h, t[8] = u, t[9] = g, t[10] = _, t[11] = I, t[12] = w, t[13] = F, t[14] = O, t[15] = B, t[16] = y, t[17] = G, t[18] = T, t[19] = d) : (i = t[1], r = t[2], s = t[3], a = t[4], n = t[5], c = t[6], h = t[7], u = t[8], g = t[9], _ = t[10], I = t[11], w = t[12], F = t[13], O = t[14], B = t[15], y = t[16], G = t[17], T = t[18], d = t[19]);
|
|
69
|
-
const vt = I === void 0 ? !1 : I, R = w === void 0 ? "left" : w, H = F === void 0 ? !1 : F, E = O === void 0 ? "medium" : O, ft = B === void 0 ? !1 : B, U = y === void 0 ? "_self" : y, l = G === void 0 ? "light" : G, o = T === void 0 ? "filled" : T, f = mt(vt), P = mt(ft);
|
|
70
|
-
process.env.NODE_ENV !== "production" && Rt({
|
|
71
|
-
hideLabel: f,
|
|
72
|
-
iconName: c,
|
|
73
|
-
iconSource: h,
|
|
74
|
-
isFlush: H,
|
|
75
|
-
size: E,
|
|
76
|
-
stretched: ft,
|
|
77
|
-
theme: l,
|
|
78
|
-
variant: o
|
|
79
|
-
});
|
|
80
|
-
const M = o === "filled", Z = o === "highlight", $ = o === "outline", q = o === "ghost" && H !== !0, J = o === "navigation", Q = o === "navigation" && P && R === "right", W = o === "navigation" && P && R === "left", X = o === "ghost" && H === !0, Y = l === "dark" && o === "filled", tt = l === "dark" && o === "highlight", ot = l === "dark" && o === "outline", et = l === "dark" && o === "ghost" && H !== !0, nt = l === "dark" && o === "ghost" && H === !0, it = E === "small" || o === "navigation", st = R === "left", lt = f && E === "medium" && o !== "navigation", rt = f && E === "small" && o !== "navigation";
|
|
81
|
-
let A;
|
|
82
|
-
t[20] !== s || t[21] !== P || t[22] !== Z || t[23] !== $ || t[24] !== q || t[25] !== J || t[26] !== Q || t[27] !== W || t[28] !== X || t[29] !== Y || t[30] !== tt || t[31] !== ot || t[32] !== et || t[33] !== nt || t[34] !== it || t[35] !== st || t[36] !== lt || t[37] !== rt || t[38] !== M ? (A = gt(e.root, s, {
|
|
83
|
-
[e.rootFilled]: M,
|
|
84
|
-
[e.rootHighlight]: Z,
|
|
85
|
-
[e.rootOutline]: $,
|
|
86
|
-
[e.rootGhost]: q,
|
|
87
|
-
[e.rootNavigation]: J,
|
|
88
|
-
[e.rootNavigationStretched]: Q,
|
|
89
|
-
[e.rootNavigationStretchedIconLeft]: W,
|
|
90
|
-
[e.rootGhostFlush]: X,
|
|
91
|
-
[e.rootDarkFilled]: Y,
|
|
92
|
-
[e.rootDarkHighlight]: tt,
|
|
93
|
-
[e.rootDarkOutline]: ot,
|
|
94
|
-
[e.rootDarkGhost]: et,
|
|
95
|
-
[e.rootDarkGhostFlush]: nt,
|
|
96
|
-
[e.rootSmall]: it,
|
|
97
|
-
[e.rootStretched]: P,
|
|
98
|
-
[e.rootIconLeft]: st,
|
|
99
|
-
[e.rootIconOnly]: lt,
|
|
100
|
-
[e.rootIconOnlySmall]: rt
|
|
101
|
-
}), t[20] = s, t[21] = P, t[22] = Z, t[23] = $, t[24] = q, t[25] = J, t[26] = Q, t[27] = W, t[28] = X, t[29] = Y, t[30] = tt, t[31] = ot, t[32] = et, t[33] = nt, t[34] = it, t[35] = st, t[36] = lt, t[37] = rt, t[38] = M, t[39] = A) : A = t[39];
|
|
102
|
-
const at = A;
|
|
103
|
-
let x;
|
|
104
|
-
t[40] !== f || t[41] !== o ? (x = gt({
|
|
105
|
-
[e.labelHidden]: f && o !== "navigation"
|
|
106
|
-
}) || void 0, t[40] = f, t[41] = o, t[42] = x) : x = t[42];
|
|
107
|
-
const ct = x, ht = o === "navigation";
|
|
108
|
-
let z;
|
|
109
|
-
t[43] !== ht ? (z = gt({
|
|
110
|
-
[e.iconNavigation]: ht
|
|
111
|
-
}), t[43] = ht, t[44] = z) : z = t[44];
|
|
112
|
-
const dt = z, ut = l === "light" && o === "filled" || l === "dark" && o === "outline" || l === "dark" && o === "ghost" ? "dark" : "light", k = n === void 0 ? "span" : "a";
|
|
113
|
-
let m;
|
|
114
|
-
t[45] !== k || t[46] !== a || t[47] !== n || t[48] !== u || t[49] !== g || t[50] !== U ? (m = k === "a" && {
|
|
115
|
-
href: n,
|
|
116
|
-
target: U,
|
|
117
|
-
rel: g,
|
|
118
|
-
referrerPolicy: u,
|
|
119
|
-
download: a
|
|
120
|
-
}, t[45] = k, t[46] = a, t[47] = n, t[48] = u, t[49] = g, t[50] = U, t[51] = m) : m = t[51];
|
|
121
|
-
let v;
|
|
122
|
-
t[52] !== r || t[53] !== ct ? (v = /* @__PURE__ */ K("span", { className: ct, children: r }), t[52] = r, t[53] = ct, t[54] = v) : v = t[54];
|
|
123
|
-
let p;
|
|
124
|
-
t[55] !== dt || t[56] !== c || t[57] !== h || t[58] !== ut ? (p = (c || h) && /* @__PURE__ */ K(St, { name: c, theme: ut, source: h, className: dt, "aria-hidden": "true" }), t[55] = dt, t[56] = c, t[57] = h, t[58] = ut, t[59] = p) : p = t[59];
|
|
125
|
-
let C;
|
|
126
|
-
t[60] !== k || t[61] !== i || t[62] !== L || t[63] !== _ || t[64] !== at || t[65] !== m || t[66] !== v || t[67] !== p ? (C = /* @__PURE__ */ kt(k, { className: at, ...m, ...i, ..._, ref: L, children: [
|
|
127
|
-
v,
|
|
128
|
-
p
|
|
129
|
-
] }), t[60] = k, t[61] = i, t[62] = L, t[63] = _, t[64] = at, t[65] = m, t[66] = v, t[67] = p, t[68] = C) : C = t[68];
|
|
130
|
-
const V = C;
|
|
131
|
-
if (d) {
|
|
132
|
-
let b;
|
|
133
|
-
t[69] !== V ? (b = /* @__PURE__ */ K(_t.Anchor, { children: V }), t[69] = V, t[70] = b) : b = t[70];
|
|
134
|
-
let S;
|
|
135
|
-
t[71] !== d ? (S = /* @__PURE__ */ K(_t.Content, { children: d }), t[71] = d, t[72] = S) : S = t[72];
|
|
136
|
-
let j;
|
|
137
|
-
return t[73] !== b || t[74] !== S ? (j = /* @__PURE__ */ kt(_t, { placement: "top", tooltipOffset: 6, children: [
|
|
138
|
-
b,
|
|
139
|
-
S
|
|
140
|
-
] }), t[73] = b, t[74] = S, t[75] = j) : j = t[75], j;
|
|
141
|
-
}
|
|
142
|
-
return V;
|
|
143
|
-
});
|
|
144
|
-
Ut.displayName = "DSLinkButton";
|
|
145
|
-
export {
|
|
146
|
-
Ut as D,
|
|
147
|
-
Yt as L,
|
|
148
|
-
to as a,
|
|
149
|
-
Rt as v
|
|
150
|
-
};
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as D, jsx as s, Fragment as Te } from "react/jsx-runtime";
|
|
3
|
-
import { d as Ae } from "./index.cKLI89Eg.js";
|
|
4
|
-
import { c as r } from "./index.DQOqod3i.js";
|
|
5
|
-
import { isValidElement as je, cloneElement as xe } from "react";
|
|
6
|
-
import { b as K } from "./Flag.X9tB3Mfv.js";
|
|
7
|
-
import { DSHeading as Ve } from "../heading.BHSklXho.js";
|
|
8
|
-
import { D as Be } from "./Icon.DYtaQgbw.js";
|
|
9
|
-
import { D as Me } from "./LinkButton.BCHTLFMJ.js";
|
|
10
|
-
import { g as S } from "./helpers.CexwVao7.js";
|
|
11
|
-
import '../assets/LinkCard.pJtgJRIh.css';const Oe = "ds-link-card_root_1tm3t_1", qe = "ds-link-card_root--elevated_1tm3t_26", Re = "ds-link-card_root--horizontal_1tm3t_66", $e = "ds-link-card_media-wrapper_1tm3t_71", Ge = "ds-link-card_content_1tm3t_81", Je = "ds-link-card_content--padding-small_1tm3t_86", Ke = "ds-link-card_header_1tm3t_117", Qe = "ds-link-card_footer_1tm3t_118", Ue = "ds-link-card_heading_1tm3t_133", Xe = "ds-link-card_heading--with-icon_1tm3t_136", Ye = "ds-link-card_link_1tm3t_146", Ze = "ds-link-card_description_1tm3t_151", et = "ds-link-card_meta-data_1tm3t_168", tt = "ds-link-card_decorative-link_1tm3t_185", at = "ds-link-card_flags_1tm3t_189", ot = "ds-link-card_brand-flag_1tm3t_198", it = "ds-link-card_graphic-area_1tm3t_204", t = {
|
|
12
|
-
root: Oe,
|
|
13
|
-
rootElevated: qe,
|
|
14
|
-
rootHorizontal: Re,
|
|
15
|
-
mediaWrapper: $e,
|
|
16
|
-
content: Ge,
|
|
17
|
-
contentPaddingSmall: Je,
|
|
18
|
-
header: Ke,
|
|
19
|
-
footer: Qe,
|
|
20
|
-
heading: Ue,
|
|
21
|
-
headingWithIcon: Xe,
|
|
22
|
-
link: Ye,
|
|
23
|
-
description: Ze,
|
|
24
|
-
metaData: et,
|
|
25
|
-
decorativeLink: tt,
|
|
26
|
-
flags: at,
|
|
27
|
-
brandFlag: ot,
|
|
28
|
-
graphicArea: it
|
|
29
|
-
}, nt = ({
|
|
30
|
-
href: p,
|
|
31
|
-
linkComponent: e,
|
|
32
|
-
flags: a,
|
|
33
|
-
flagListAriaLabel: d,
|
|
34
|
-
heading: i,
|
|
35
|
-
img: l,
|
|
36
|
-
brandFlag: f,
|
|
37
|
-
decorativeLinkButtonProps: c
|
|
38
|
-
}) => {
|
|
39
|
-
if (!p && !e)
|
|
40
|
-
throw new Error(S("DSLinkCard", "Please provide either the 'href' prop or a custom 'linkComponent'."));
|
|
41
|
-
if (p && e)
|
|
42
|
-
throw new Error(S("DSLinkCard", "Please provide either the 'href' prop or a custom 'linkComponent', but not both."));
|
|
43
|
-
if (!i)
|
|
44
|
-
throw new Error(S("DSLinkCard", "The 'heading' prop is required and must be provided."));
|
|
45
|
-
a && a.length > 6 && console.warn(S("DSLinkCard", "It is recommended to provide a maximum of 6 flags for optimal display.")), a && a.length > 0 && !d && console.warn(S("DSLinkCard", "When providing flags, please also ensure to add the 'flagListAriaLabel' to describe the list of flags for non sighted screen reader users.")), f && l === void 0 && console.warn(S("DSLinkCard", "The 'brandFlag' prop is set to true, but no 'img' prop is provided. The 'brandFlag' will have no effect without an image.")), typeof i == "object" && i !== null && i.headingIconName && c?.label && console.warn(S("DSLinkCard", "The 'heading.headingIconName' option should not be used when a decorative link label is provided."));
|
|
46
|
-
}, rt = (p) => {
|
|
47
|
-
const e = Ae.c(86);
|
|
48
|
-
let a, d, i, l, f, c, _, n, m, g, o, k, L, u, N, b, C;
|
|
49
|
-
e[0] !== p ? ({
|
|
50
|
-
heading: n,
|
|
51
|
-
brandFlag: a,
|
|
52
|
-
className: i,
|
|
53
|
-
cardClassNames: d,
|
|
54
|
-
decorativeLinkButtonProps: l,
|
|
55
|
-
description: f,
|
|
56
|
-
flagListAriaLabel: c,
|
|
57
|
-
flags: u,
|
|
58
|
-
href: m,
|
|
59
|
-
img: g,
|
|
60
|
-
linkComponent: o,
|
|
61
|
-
metaData: k,
|
|
62
|
-
orientation: N,
|
|
63
|
-
padding: b,
|
|
64
|
-
graphicArea: _,
|
|
65
|
-
variant: C,
|
|
66
|
-
...L
|
|
67
|
-
} = p, e[0] = p, e[1] = a, e[2] = d, e[3] = i, e[4] = l, e[5] = f, e[6] = c, e[7] = _, e[8] = n, e[9] = m, e[10] = g, e[11] = o, e[12] = k, e[13] = L, e[14] = u, e[15] = N, e[16] = b, e[17] = C) : (a = e[1], d = e[2], i = e[3], l = e[4], f = e[5], c = e[6], _ = e[7], n = e[8], m = e[9], g = e[10], o = e[11], k = e[12], L = e[13], u = e[14], N = e[15], b = e[16], C = e[17]);
|
|
68
|
-
let v, W, w, F;
|
|
69
|
-
e[18] !== a || e[19] !== l || e[20] !== c || e[21] !== n || e[22] !== m || e[23] !== g || e[24] !== o || e[25] !== u || e[26] !== N || e[27] !== b || e[28] !== C ? (v = u === void 0 ? [] : u, W = N === void 0 ? "vertical" : N, w = b === void 0 ? "medium" : b, F = C === void 0 ? "outlined" : C, process.env.NODE_ENV !== "production" && nt({
|
|
70
|
-
href: m,
|
|
71
|
-
linkComponent: o,
|
|
72
|
-
heading: n,
|
|
73
|
-
flags: v,
|
|
74
|
-
flagListAriaLabel: c,
|
|
75
|
-
img: g,
|
|
76
|
-
brandFlag: a,
|
|
77
|
-
decorativeLinkButtonProps: l
|
|
78
|
-
}), e[18] = a, e[19] = l, e[20] = c, e[21] = n, e[22] = m, e[23] = g, e[24] = o, e[25] = u, e[26] = N, e[27] = b, e[28] = C, e[29] = v, e[30] = W, e[31] = w, e[32] = F) : (v = e[29], W = e[30], w = e[31], F = e[32]);
|
|
79
|
-
let j;
|
|
80
|
-
e[33] !== l ? (j = l || {}, e[33] = l, e[34] = j) : j = e[34];
|
|
81
|
-
const {
|
|
82
|
-
label: A,
|
|
83
|
-
iconName: Q,
|
|
84
|
-
iconPosition: ne,
|
|
85
|
-
variant: le,
|
|
86
|
-
hideLabel: U,
|
|
87
|
-
size: re
|
|
88
|
-
} = j, X = ne === void 0 ? "right" : ne, Y = re === void 0 ? "small" : re, x = le === "ghost" ? "ghost" : "filled", Z = k || v.length > 0 || A, ee = typeof n == "object" && n !== null && !!n.headingIconName;
|
|
89
|
-
let V;
|
|
90
|
-
if (e[35] !== x || e[36] !== a || e[37] !== d || e[38] !== i || e[39] !== U || e[40] !== Q || e[41] !== X || e[42] !== A || e[43] !== Y || e[44] !== f || e[45] !== c || e[46] !== v || e[47] !== _ || e[48] !== Z || e[49] !== n || e[50] !== ee || e[51] !== m || e[52] !== g || e[53] !== o || e[54] !== k || e[55] !== W || e[56] !== w || e[57] !== L || e[58] !== F) {
|
|
91
|
-
const {
|
|
92
|
-
brandFlag: de,
|
|
93
|
-
contentWrapper: ce,
|
|
94
|
-
descriptionWrapper: me,
|
|
95
|
-
decorativeLink: he,
|
|
96
|
-
flagsWrapper: pe,
|
|
97
|
-
footerWrapper: ge,
|
|
98
|
-
headerWrapper: fe,
|
|
99
|
-
heading: ve,
|
|
100
|
-
mediaWrapper: _e,
|
|
101
|
-
imageWrapper: ke,
|
|
102
|
-
metaDataWrapper: Le,
|
|
103
|
-
graphicAreaWrapper: ue
|
|
104
|
-
} = d || {}, te = W === "horizontal", ae = F === "elevated";
|
|
105
|
-
let B;
|
|
106
|
-
e[60] !== i || e[61] !== ae || e[62] !== te ? (B = r(t.root, i, {
|
|
107
|
-
[t.rootHorizontal]: te,
|
|
108
|
-
[t.rootElevated]: ae
|
|
109
|
-
}), e[60] = i, e[61] = ae, e[62] = te, e[63] = B) : B = e[63];
|
|
110
|
-
const Ne = B, se = r(t.brandFlag, de), be = r(t.content, ce, {
|
|
111
|
-
[t.contentPaddingSmall]: w === "small"
|
|
112
|
-
}), Ce = r(t.description, me), De = r(t.decorativeLink, he), Se = r(t.flags, pe), We = r(t.footer, ge), we = r(t.header, fe), Fe = r(t.heading, ve, {
|
|
113
|
-
[t.headingWithIcon]: ee
|
|
114
|
-
}), Ie = _e || ke, Pe = r(t.mediaWrapper, Ie), ye = r(t.metaData, Le), ze = r(t.graphicArea, ue);
|
|
115
|
-
let M, I, P, y, z, E, H, T;
|
|
116
|
-
e[64] !== L ? ({
|
|
117
|
-
download: I,
|
|
118
|
-
hrefLang: P,
|
|
119
|
-
ping: y,
|
|
120
|
-
referrerPolicy: z,
|
|
121
|
-
rel: E,
|
|
122
|
-
target: H,
|
|
123
|
-
type: T,
|
|
124
|
-
...M
|
|
125
|
-
} = L, e[64] = L, e[65] = M, e[66] = I, e[67] = P, e[68] = y, e[69] = z, e[70] = E, e[71] = H, e[72] = T) : (M = e[65], I = e[66], P = e[67], y = e[68], z = e[69], E = e[70], H = e[71], T = e[72]);
|
|
126
|
-
let O;
|
|
127
|
-
e[73] !== I || e[74] !== m || e[75] !== P || e[76] !== o || e[77] !== y || e[78] !== z || e[79] !== E || e[80] !== H || e[81] !== T ? (O = (h) => o && je(o) ? xe(o, {
|
|
128
|
-
...o.props,
|
|
129
|
-
className: r(t.link, o.props.className),
|
|
130
|
-
children: /* @__PURE__ */ D(Te, { children: [
|
|
131
|
-
h,
|
|
132
|
-
" ",
|
|
133
|
-
o.props.children
|
|
134
|
-
] })
|
|
135
|
-
}) : /* @__PURE__ */ s("a", { href: m, className: t.link, download: I, hrefLang: P, ping: y, referrerPolicy: z, rel: E, target: H, type: T, children: h }), e[73] = I, e[74] = m, e[75] = P, e[76] = o, e[77] = y, e[78] = z, e[79] = E, e[80] = H, e[81] = T, e[82] = O) : O = e[82];
|
|
136
|
-
const Ee = O, oe = (h) => {
|
|
137
|
-
const R = typeof h == "object" && h !== void 0, {
|
|
138
|
-
headingText: $,
|
|
139
|
-
headingIconName: G,
|
|
140
|
-
headingSize: J,
|
|
141
|
-
headingTag: ie
|
|
142
|
-
} = R ? h : {
|
|
143
|
-
headingText: h
|
|
144
|
-
};
|
|
145
|
-
return /* @__PURE__ */ D(Ve, { tag: ie === void 0 ? "h3" : ie, size: J === void 0 ? "medium" : J, className: Fe, children: [
|
|
146
|
-
Ee($),
|
|
147
|
-
G && /* @__PURE__ */ s(Be, { name: G, "aria-hidden": "true" })
|
|
148
|
-
] });
|
|
149
|
-
}, He = (h) => {
|
|
150
|
-
if (typeof h == "string")
|
|
151
|
-
return /* @__PURE__ */ s(K, { color: "orange-base", className: se, children: h });
|
|
152
|
-
const {
|
|
153
|
-
children: R,
|
|
154
|
-
color: $,
|
|
155
|
-
className: G,
|
|
156
|
-
...J
|
|
157
|
-
} = h;
|
|
158
|
-
return /* @__PURE__ */ s(K, { color: $ === void 0 ? "orange-base" : $, className: r(se, G), ...J, children: R });
|
|
159
|
-
};
|
|
160
|
-
let q;
|
|
161
|
-
e[83] !== oe || e[84] !== n ? (q = oe(n), e[83] = oe, e[84] = n, e[85] = q) : q = e[85], V = /* @__PURE__ */ D("div", { ...M, className: Ne, children: [
|
|
162
|
-
/* @__PURE__ */ D("div", { className: be, children: [
|
|
163
|
-
/* @__PURE__ */ D("div", { className: we, children: [
|
|
164
|
-
_ && /* @__PURE__ */ s("div", { className: ze, children: _ }),
|
|
165
|
-
q,
|
|
166
|
-
f && /* @__PURE__ */ s("div", { className: Ce, children: f })
|
|
167
|
-
] }),
|
|
168
|
-
Z && /* @__PURE__ */ D("div", { className: We, children: [
|
|
169
|
-
k && /* @__PURE__ */ s("div", { className: ye, children: k }),
|
|
170
|
-
v.length > 0 && /* @__PURE__ */ s("ul", { className: Se, "aria-label": c, children: v.map(st) }),
|
|
171
|
-
A && /* @__PURE__ */ s(Me, { iconName: Q, iconPosition: X, variant: x, hideLabel: U, size: Y, isFlush: x === "ghost", "aria-hidden": !0, className: De, children: A })
|
|
172
|
-
] })
|
|
173
|
-
] }),
|
|
174
|
-
g && /* @__PURE__ */ D("div", { className: Pe, children: [
|
|
175
|
-
a && He(a),
|
|
176
|
-
g
|
|
177
|
-
] })
|
|
178
|
-
] }), e[35] = x, e[36] = a, e[37] = d, e[38] = i, e[39] = U, e[40] = Q, e[41] = X, e[42] = A, e[43] = Y, e[44] = f, e[45] = c, e[46] = v, e[47] = _, e[48] = Z, e[49] = n, e[50] = ee, e[51] = m, e[52] = g, e[53] = o, e[54] = k, e[55] = W, e[56] = w, e[57] = L, e[58] = F, e[59] = V;
|
|
179
|
-
} else
|
|
180
|
-
V = e[59];
|
|
181
|
-
return V;
|
|
182
|
-
};
|
|
183
|
-
rt.displayName = "DSLinkCard";
|
|
184
|
-
function st(p, e) {
|
|
185
|
-
if (typeof p == "string")
|
|
186
|
-
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(K, { color: "grey-light", children: p }) }, e);
|
|
187
|
-
const {
|
|
188
|
-
children: a,
|
|
189
|
-
color: d,
|
|
190
|
-
...i
|
|
191
|
-
} = p;
|
|
192
|
-
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(K, { color: d === void 0 ? "grey-light" : d, ...i, children: a }) }, e);
|
|
193
|
-
}
|
|
194
|
-
export {
|
|
195
|
-
rt as D,
|
|
196
|
-
nt as v
|
|
197
|
-
};
|