@stihl-design-system/components 1.0.0-RC.10 → 1.0.0-RC.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -9
- package/{accordion.B3UkxlAZ.js → accordion.Rvtiu8Y4.js} +3 -3
- package/accordion.d.ts +1 -0
- package/arialiveregions.Cyycgs8g.js +27 -0
- package/arialiveregions.d.ts +1 -0
- package/assets/Accordion.i4k5SMQM.css +1 -0
- package/assets/CheckboxGroup.BH1Br1dg.css +1 -0
- package/assets/Chip.DSdLuzoi.css +1 -0
- package/assets/CustomReactSelect.vHt8qNKC.css +1 -0
- package/assets/Dialog.BgzebVk4.css +1 -0
- package/assets/Drawer.Bauwxrk7.css +1 -0
- package/assets/Fieldset.DOdTbb7C.css +1 -0
- package/assets/Icon.DxRSBRSL.css +1 -0
- package/assets/InputPassword.CG7Ugu73.css +1 -0
- package/assets/InputSearch.CseChMc-.css +1 -0
- package/assets/InputStepper.C0eAYr7P.css +1 -0
- package/assets/Notification.DbRapUJo.css +1 -0
- package/assets/RadioGroup.BfMo157q.css +1 -0
- package/assets/Select.D4EXgIbz.css +1 -0
- package/assets/Textarea.KJGPTYMz.css +1 -0
- package/assets/Toast.CuafTAf7.css +1 -0
- package/assets/arialiveregions.DhsijBaL.css +1 -0
- package/assets/asterisk.BfVAUBO7.css +1 -0
- package/assets/button.DF4RBeC2.css +1 -0
- package/assets/buttonround.19uK_-oO.css +1 -0
- package/assets/checkbox.ByOoFouu.css +1 -0
- package/assets/chipgroup.BzfZLbkv.css +1 -0
- package/assets/flag.B-RLcMcf.css +1 -0
- package/assets/floatingactionbutton.E9HekT6S.css +1 -0
- package/assets/heading.u4f8Mz94.css +1 -0
- package/assets/input.BAkFKPW3.css +1 -0
- package/assets/link.DDJj0D1U.css +1 -0
- package/assets/linkstandalone.DIazcjIv.css +1 -0
- package/assets/logo.CnW8alZU.css +1 -0
- package/assets/optioncheckbox.BZaWtRD7.css +1 -0
- package/assets/radio.X-RTl_jo.css +1 -0
- package/assets/skiptocontent.PTL3256m.css +1 -0
- package/assets/spinner.2iWJWKyA.css +1 -0
- package/assets/switch.gw6aa3kx.css +1 -0
- package/assets/systemfeedback.BPz5YlPC.css +1 -0
- package/assets/text.DjTG_qNb.css +1 -0
- package/assets/title.rosWPEG3.css +1 -0
- package/asterisk.DpzETKdT.js +8 -0
- package/asterisk.d.ts +1 -0
- package/button.M4nXjcUn.js +135 -0
- package/button.d.ts +1 -0
- package/buttonround.E56F_805.js +118 -0
- package/buttonround.d.ts +1 -0
- package/checkbox.Cb2_ey6U.js +111 -0
- package/checkbox.d.ts +1 -0
- package/checkboxgroup.DBDmB-zR.js +8 -0
- package/checkboxgroup.d.ts +1 -0
- package/chip.C_1tGqvZ.js +10 -0
- package/chip.d.ts +2 -0
- package/chipgroup.BvTj1ziW.js +174 -0
- package/chipgroup.d.ts +2 -0
- package/chunks/Accordion.CB6jB3s_.js +125 -0
- package/chunks/{AriaLiveRegions.utils.D2ni4Yrf.js → AriaLiveRegions.utils.BGSZafnS.js} +2 -2
- package/chunks/CheckboxGroup.S6i5EOc4.js +92 -0
- package/chunks/Chip.CMlPUyOJ.js +142 -0
- package/chunks/{CustomReactSelect.ChAtL6fu.js → CustomReactSelect.Cg_XW3YK.js} +1056 -1049
- package/chunks/Dialog.CudsqNag.js +148 -0
- package/chunks/Drawer.ueG2Bzr9.js +154 -0
- package/chunks/Fieldset.Cjmkgxxk.js +99 -0
- package/chunks/{Icon.C2o2seDb.js → Icon.BCmt_XBG.js} +45 -45
- package/chunks/InputPassword.CNLbBFjx.js +143 -0
- package/chunks/InputSearch.CHA6mkX_.js +192 -0
- package/chunks/InputStepper.xmWGU9pU.js +294 -0
- package/chunks/Notification.o6pagKQy.js +93 -0
- package/chunks/RadioGroup.Crj7NoOs.js +137 -0
- package/chunks/Select.E6gLFYLk.js +194 -0
- package/chunks/Textarea.DUBSOpNL.js +198 -0
- package/chunks/Toast.DyEi2GEP.js +89 -0
- package/chunks/translate.isa3FHb8.js +11 -0
- package/{combobox.JL1Dsn3E.js → combobox.DUzv8jzM.js} +1 -1
- package/combobox.d.ts +1 -0
- package/components/Accordion/Accordion.d.ts +0 -1
- package/components/Accordion/Accordion.utils.d.ts +0 -1
- package/components/Button/Button.d.ts +0 -1
- package/components/ButtonRound/ButtonRound.d.ts +0 -1
- package/components/Checkbox/Checkbox.d.ts +0 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +6 -7
- package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +0 -1
- package/components/ChipGroup/Chip.d.ts +12 -0
- package/components/ChipGroup/ChipGroup.d.ts +42 -0
- package/components/ChipGroup/ChipGroup.utils.d.ts +60 -0
- package/components/ChipGroup/ChipGroup.utils.test.d.ts +1 -0
- package/components/Combobox/Combobox.d.ts +1 -2
- package/components/Combobox/Combobox.utils.d.ts +6 -1
- package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.d.ts +2 -3
- package/components/Combobox/CustomReactSelect/CustomReactSelect.utils.d.ts +3 -0
- package/components/Combobox/CustomReactSelect/CustomReactSelect.utils.test.d.ts +1 -0
- package/components/{CustomReactSelect → Combobox/CustomReactSelect}/OptionCheckbox.d.ts +0 -1
- package/components/Dialog/Dialog.d.ts +0 -1
- package/components/Dialog/Dialog.utils.d.ts +0 -1
- package/components/Drawer/Drawer.d.ts +0 -1
- package/components/Drawer/Drawer.utils.d.ts +0 -1
- package/components/Fieldset/Fieldset.d.ts +0 -1
- package/components/Fieldset/Fieldset.utils.d.ts +7 -1
- package/components/Flag/Flag.d.ts +23 -0
- package/components/Flag/Flag.test.d.ts +1 -0
- package/components/Flag/Flag.utils.d.ts +2 -0
- package/components/FloatingActionButton/FloatingActionButton.d.ts +0 -1
- package/components/Heading/Heading.d.ts +0 -1
- package/components/Icon/Icon.d.ts +0 -1
- package/components/Icon/Icon.utils.d.ts +0 -1
- package/components/Input/Input.d.ts +0 -1
- package/components/Input/Input.utils.d.ts +0 -1
- package/components/InputPassword/InputPassword.d.ts +0 -1
- package/components/InputPassword/InputPassword.utils.d.ts +0 -1
- package/components/InputSearch/InputSearch.d.ts +0 -1
- package/components/InputSearch/InputSearch.utils.d.ts +0 -1
- package/components/InputStepper/InputStepper.d.ts +0 -1
- package/components/InputStepper/InputStepper.utils.d.ts +0 -1
- package/components/Link/Link.d.ts +0 -1
- package/components/LinkStandalone/LinkStandalone.d.ts +0 -1
- package/components/Logo/Logo.d.ts +1 -2
- package/components/Logo/Logo.utils.d.ts +0 -1
- package/components/Notification/Notification.d.ts +0 -1
- package/components/Notification/Notification.utils.d.ts +0 -1
- package/components/Radio/Radio.d.ts +1 -2
- package/components/RadioGroup/RadioGroup.d.ts +7 -8
- package/components/RadioGroup/RadioGroup.utils.d.ts +2 -3
- package/components/Select/Select.d.ts +0 -1
- package/components/Select/Select.utils.d.ts +0 -1
- package/components/SkipToContent/SkipToContent.d.ts +0 -1
- package/components/Spinner/Spinner.d.ts +0 -1
- package/components/Switch/Switch.d.ts +0 -1
- package/components/SystemFeedback/SystemFeedback.d.ts +0 -1
- package/components/Text/Text.d.ts +0 -1
- package/components/Textarea/Textarea.d.ts +0 -1
- package/components/Textarea/Textarea.utils.d.ts +0 -1
- package/components/Title/Title.d.ts +0 -1
- package/components/Toast/Toast.d.ts +0 -1
- package/components/Toast/Toast.utils.d.ts +0 -1
- package/components/Toast/ToastManager.d.ts +0 -1
- package/customreactselect.CXmBRqQ9.js +13 -0
- package/customreactselect.d.ts +2 -1
- package/{dialog.D3bJ0rsW.js → dialog.DYlBUsOD.js} +2 -2
- package/dialog.d.ts +1 -0
- package/{drawer.CNPF1-Kc.js → drawer.CvhbP1ra.js} +2 -2
- package/drawer.d.ts +1 -0
- package/fieldset.CtUGEdLv.js +11 -0
- package/fieldset.d.ts +1 -0
- package/flag.BKpsdB_-.js +43 -0
- package/flag.d.ts +2 -0
- package/floatingactionbutton.D5L0B7zI.js +87 -0
- package/floatingactionbutton.d.ts +1 -0
- package/heading.IPIYc5vW.js +50 -0
- package/heading.d.ts +1 -0
- package/{icon.BoMgOmC1.js → icon.Ck0BpI34.js} +1 -1
- package/icon.d.ts +1 -0
- package/index.d.ts +4 -0
- package/index.es.js +134 -114
- package/input.BEnCFNM-.js +239 -0
- package/input.d.ts +1 -0
- package/{inputpassword.nsYu6YeB.js → inputpassword.B-D_jB9w.js} +4 -4
- package/inputpassword.d.ts +1 -0
- package/{inputsearch.ZGIrDrcv.js → inputsearch.CaSpklR1.js} +4 -4
- package/inputsearch.d.ts +1 -0
- package/{inputstepper.BvY36hA1.js → inputstepper.C7KD1-0S.js} +4 -4
- package/inputstepper.d.ts +1 -0
- package/link.DREJAoPG.js +116 -0
- package/link.d.ts +1 -0
- package/linkstandalone.BBoEniZ_.js +79 -0
- package/linkstandalone.d.ts +1 -0
- package/logo.Hul8qCFo.js +65 -0
- package/logo.d.ts +1 -0
- package/{notification.BAS13UQ6.js → notification.JWhrkEcE.js} +3 -3
- package/notification.d.ts +1 -0
- package/optioncheckbox.BRUTnQnJ.js +43 -0
- package/optioncheckbox.d.ts +2 -1
- package/package.json +47 -40
- package/partials/index.js +407 -407
- package/partials/lib/partials.d.ts +0 -1
- package/radio.DEILy_lV.js +114 -0
- package/radio.d.ts +1 -0
- package/radiogroup.DeU-HdlP.js +10 -0
- package/radiogroup.d.ts +1 -0
- package/{select.C4OZMB-V.js → select.BYraFJzz.js} +4 -4
- package/select.d.ts +1 -0
- package/skiptocontent.BxvpIB7H.js +45 -0
- package/skiptocontent.d.ts +1 -0
- package/spinner.Bq97Og-6.js +58 -0
- package/spinner.d.ts +1 -0
- package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff +0 -0
- package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff2 +0 -0
- package/styles/fonts/font-face.min.css +1 -1
- package/styles/scss/ds/index.scss +19 -0
- package/styles/scss/ds/lib/animation.scss +21 -0
- package/styles/scss/ds/lib/breakpoints.scss +15 -0
- package/styles/scss/ds/lib/container-query.scss +54 -0
- package/styles/scss/ds/lib/ds-internal/_a11y.scss +15 -0
- package/styles/scss/{lib → ds/lib/ds-internal}/_focus.scss +13 -15
- package/styles/scss/ds/lib/ds-internal/_heading.scss +37 -0
- package/styles/scss/ds/lib/ds-internal/_helpers.scss +32 -0
- package/styles/scss/ds/lib/ds-internal/_high-contrast.scss +6 -0
- package/styles/scss/ds/lib/ds-internal/_hover.scss +6 -0
- package/styles/scss/ds/lib/ds-internal/_index.scss +9 -0
- package/styles/scss/ds/lib/ds-internal/_link.scss +62 -0
- package/styles/scss/ds/lib/ds-internal/_spacing-dynamic.scss +53 -0
- package/styles/scss/ds/lib/ds-internal/_text.scss +30 -0
- package/styles/scss/ds/lib/grid-extended.scss +11 -0
- package/styles/scss/ds/lib/grid-full.scss +6 -0
- package/styles/scss/ds/lib/grid-main.scss +119 -0
- package/styles/scss/ds/lib/grid-narrow.scss +14 -0
- package/styles/scss/ds/lib/grid-sidebar-sidebar.scss +52 -0
- package/styles/scss/{lib/_grid-sidebar.scss → ds/lib/grid-sidebar.scss} +23 -32
- package/styles/scss/{lib/_grid.scss → ds/lib/grid.scss} +15 -17
- package/styles/scss/ds/lib/heading.scss +75 -0
- package/styles/scss/ds/lib/link.scss +74 -0
- package/styles/scss/ds/lib/media-query.scss +32 -0
- package/styles/scss/{lib/_shadow.scss → ds/lib/shadow.scss} +2 -2
- package/styles/scss/ds/lib/spacing-dynamic.scss +7 -0
- package/styles/scss/ds/lib/spacing.scss +20 -0
- package/styles/scss/ds/lib/text.scss +83 -0
- package/styles/scss/ds/lib/theme.scss +162 -0
- package/styles/scss/ds/lib/transition.scss +36 -0
- package/switch.DI8YYa5G.js +65 -0
- package/switch.d.ts +1 -0
- package/{systemfeedback.ZzRUAVYX.js → systemfeedback.C3Pfxxpp.js} +6 -6
- package/systemfeedback.d.ts +1 -0
- package/text.DThvTwm8.js +57 -0
- package/text.d.ts +1 -0
- package/{textarea.CtQtGqn5.js → textarea.CBvH0ljM.js} +3 -3
- package/textarea.d.ts +1 -0
- package/title.DqzdB2Gq.js +36 -0
- package/title.d.ts +1 -0
- package/toast.d.ts +1 -0
- package/{toast.DVd9dLs2.js → toast.n1QUINSA.js} +3 -3
- package/{toastmanager.Dh0gzFkM.js → toastmanager.B7EZ4JSI.js} +2 -2
- package/toastmanager.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/translate.d.ts +11 -0
- package/utils/translate.test.d.ts +1 -0
- package/utils/useBreakpoint.d.ts +0 -1
- package/utils/useIsomorphicLayoutEffect.d.ts +0 -1
- package/utils/vitest.setup.d.ts +0 -1
- package/arialiveregions.BK4T7Vhk.js +0 -27
- package/assets/Accordion.lFv7Q_RG.css +0 -1
- package/assets/CustomReactSelect.CMkn-EGK.css +0 -1
- package/assets/Dialog.fiQvxJg_.css +0 -1
- package/assets/Drawer.BqBgbSuP.css +0 -1
- package/assets/Fieldset.qHYeUFZt.css +0 -1
- package/assets/Icon.Duy_0R8w.css +0 -1
- package/assets/InputPassword.Cf394z47.css +0 -1
- package/assets/InputSearch.eCRQoxjN.css +0 -1
- package/assets/InputStepper.B80KulYE.css +0 -1
- package/assets/Notification.DK6agBGS.css +0 -1
- package/assets/RadioGroup.Bz3_xkZU.css +0 -1
- package/assets/Select.BptsMxz4.css +0 -1
- package/assets/Textarea.CIIVh03G.css +0 -1
- package/assets/Toast.Dsvs1zdM.css +0 -1
- package/assets/arialiveregions.GsGx2USO.css +0 -1
- package/assets/asterisk.DlJ4YtSZ.css +0 -1
- package/assets/button.B1O7Yw3Q.css +0 -1
- package/assets/buttonround.DlH_ipDo.css +0 -1
- package/assets/checkbox.K4CVYK9g.css +0 -1
- package/assets/floatingactionbutton.DRYentYC.css +0 -1
- package/assets/heading.6bER-Eac.css +0 -1
- package/assets/input.C0MrSbQu.css +0 -1
- package/assets/link.vtTST2ki.css +0 -1
- package/assets/linkstandalone.BtAcziZ7.css +0 -1
- package/assets/logo.pETQEsvZ.css +0 -1
- package/assets/optioncheckbox.BJJAph5_.css +0 -1
- package/assets/radio.9kpIO3HC.css +0 -1
- package/assets/skiptocontent.CHcqLS7S.css +0 -1
- package/assets/spinner.D_Nnf1ZG.css +0 -1
- package/assets/switch.2DQF2zH-.css +0 -1
- package/assets/systemfeedback.Sq0bAIyf.css +0 -1
- package/assets/text.Dhb_l50R.css +0 -1
- package/assets/title.f74Bosn-.css +0 -1
- package/asterisk.DDn-yX4P.js +0 -8
- package/button.DH0h6uPs.js +0 -135
- package/buttonround.0mw4zzlU.js +0 -118
- package/checkbox.DETR3e3X.js +0 -112
- package/checkboxgroup.CZqrlF-x.js +0 -9
- package/chunks/Accordion.pI3JyHJL.js +0 -125
- package/chunks/CheckboxGroup.4J_gZ_XJ.js +0 -87
- package/chunks/Dialog.Z5ESJQMi.js +0 -148
- package/chunks/Drawer.BdowMqE0.js +0 -154
- package/chunks/Fieldset.COGbZwry.js +0 -99
- package/chunks/InputPassword.Dgo95-PU.js +0 -140
- package/chunks/InputSearch.BFof0pBn.js +0 -189
- package/chunks/InputStepper.4IqLa5tX.js +0 -291
- package/chunks/Notification.BhwbaXqk.js +0 -93
- package/chunks/RadioGroup.C5jbCJM4.js +0 -132
- package/chunks/RadioGroup.module.BBZwHDjW.js +0 -11
- package/chunks/Select.fXeQJXtz.js +0 -191
- package/chunks/Textarea.Bewrp0Za.js +0 -195
- package/chunks/Toast.DA_CQ9J-.js +0 -89
- package/components/CustomReactSelect/CustomReactSelect.utils.d.ts +0 -16
- package/customreactselect.Dg8Kgq3e.js +0 -13
- package/fieldset.CTshPWYX.js +0 -11
- package/floatingactionbutton.CCIj9Fjr.js +0 -87
- package/heading.CAkraI2D.js +0 -50
- package/input.CTgeAYdu.js +0 -236
- package/link.DAZNwQ0a.js +0 -116
- package/linkstandalone.C9X3er7g.js +0 -80
- package/logo.CEO6OV7u.js +0 -65
- package/optioncheckbox.DZWwtx6f.js +0 -43
- package/radio.CWGJtmKl.js +0 -115
- package/radiogroup.BhffFqN3.js +0 -11
- package/skiptocontent.C4yQfWr2.js +0 -46
- package/spinner.D-xrotcu.js +0 -58
- package/styles/scss/_index.scss +0 -23
- package/styles/scss/lib/_a11y.scss +0 -15
- package/styles/scss/lib/_animation.scss +0 -21
- package/styles/scss/lib/_breakpoints.scss +0 -16
- package/styles/scss/lib/_container-query.scss +0 -58
- package/styles/scss/lib/_grid-extended.scss +0 -11
- package/styles/scss/lib/_grid-full.scss +0 -6
- package/styles/scss/lib/_grid-main.scss +0 -117
- package/styles/scss/lib/_grid-narrow.scss +0 -16
- package/styles/scss/lib/_grid-sidebar-sidebar.scss +0 -50
- package/styles/scss/lib/_heading.scss +0 -107
- package/styles/scss/lib/_helpers.scss +0 -15
- package/styles/scss/lib/_high-contrast.scss +0 -24
- package/styles/scss/lib/_hover.scss +0 -10
- package/styles/scss/lib/_link.scss +0 -126
- package/styles/scss/lib/_media-query.scss +0 -32
- package/styles/scss/lib/_spacing.scss +0 -32
- package/styles/scss/lib/_text.scss +0 -110
- package/styles/scss/lib/_theme.scss +0 -162
- package/styles/scss/lib/_transition.scss +0 -45
- package/switch.CmpNUC7s.js +0 -65
- package/text.rgDKQBrU.js +0 -57
- package/title.LY1ylQsb.js +0 -36
- package/utils/render-in-iframe.d.ts +0 -15
- /package/components/{CustomReactSelect/CustomReactSelect.utils.test.d.ts → ChipGroup/ChipGroup.test.d.ts} +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as r } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as l } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useRef as h, useState as x, useEffect as q } from "react";
|
|
5
|
+
import { DSButton as j } from "../button.M4nXjcUn.js";
|
|
6
|
+
import { g as B } from "./helpers.B1JT5ShS.js";
|
|
7
|
+
import '../assets/Dialog.BgzebVk4.css';const E = "ds-dialog_root_1e2qq_5", C = "ds-dialog_content-wrapper_1e2qq_159", F = "ds-dialog_content-wrapper--no-footer_1e2qq_165", W = "ds-dialog_close-button_1e2qq_173", k = "ds-dialog_header_1e2qq_186", R = "ds-dialog_content_1e2qq_159", y = "ds-dialog_footer_1e2qq_188", z = "ds-dialog_header--scrollable_1e2qq_209", L = "ds-dialog_header--close-button_1e2qq_218", M = "ds-dialog_content--no-footer_1e2qq_231", H = "ds-dialog_footer--scrollable_1e2qq_238", o = {
|
|
8
|
+
root: E,
|
|
9
|
+
"content-wrapper": "ds-dialog_content-wrapper_1e2qq_159",
|
|
10
|
+
contentWrapper: C,
|
|
11
|
+
"content-wrapper--no-footer": "ds-dialog_content-wrapper--no-footer_1e2qq_165",
|
|
12
|
+
contentWrapperNoFooter: F,
|
|
13
|
+
"close-button": "ds-dialog_close-button_1e2qq_173",
|
|
14
|
+
closeButton: W,
|
|
15
|
+
header: k,
|
|
16
|
+
content: R,
|
|
17
|
+
footer: y,
|
|
18
|
+
"header--scrollable": "ds-dialog_header--scrollable_1e2qq_209",
|
|
19
|
+
headerScrollable: z,
|
|
20
|
+
"header--close-button": "ds-dialog_header--close-button_1e2qq_218",
|
|
21
|
+
headerCloseButton: L,
|
|
22
|
+
"content--no-footer": "ds-dialog_content--no-footer_1e2qq_231",
|
|
23
|
+
contentNoFooter: M,
|
|
24
|
+
"footer--scrollable": "ds-dialog_footer--scrollable_1e2qq_238",
|
|
25
|
+
footerScrollable: H
|
|
26
|
+
}, I = ({ tabIndex: n }) => {
|
|
27
|
+
if (n || n === 0)
|
|
28
|
+
throw new Error(
|
|
29
|
+
B(
|
|
30
|
+
"DSDialog",
|
|
31
|
+
"Do not pass the tabindex property to the DSDialog component as it is not interactive and does not receive focus. The DSDialogs contents, including the close button contained in the DSDialog, can receive focus and be interactive."
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
}, G = ({
|
|
35
|
+
children: n,
|
|
36
|
+
className: b,
|
|
37
|
+
closeButtonLabel: m = "Close dialog",
|
|
38
|
+
disableBackdropClose: D = !1,
|
|
39
|
+
footer: s,
|
|
40
|
+
header: S,
|
|
41
|
+
hideCloseButton: a = !1,
|
|
42
|
+
isOpen: d = !1,
|
|
43
|
+
onClose: c,
|
|
44
|
+
...i
|
|
45
|
+
}) => {
|
|
46
|
+
if (process.env.NODE_ENV !== "production") {
|
|
47
|
+
const { tabIndex: e } = i;
|
|
48
|
+
I({
|
|
49
|
+
tabIndex: e
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const t = h(null), _ = h(null), [f, v] = x(!1);
|
|
53
|
+
q(() => {
|
|
54
|
+
const e = _.current;
|
|
55
|
+
if (e) {
|
|
56
|
+
const p = () => {
|
|
57
|
+
v(
|
|
58
|
+
e.scrollHeight > e.clientHeight
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
p();
|
|
62
|
+
const g = new ResizeObserver(p);
|
|
63
|
+
return g.observe(e), () => {
|
|
64
|
+
g.disconnect();
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}, []), q(() => {
|
|
68
|
+
const e = t.current;
|
|
69
|
+
if (e)
|
|
70
|
+
return e.addEventListener("close", u), d ? e.showModal() : e.close(), () => {
|
|
71
|
+
e.removeEventListener("close", u);
|
|
72
|
+
};
|
|
73
|
+
}, [d, c]);
|
|
74
|
+
const u = () => {
|
|
75
|
+
c && c();
|
|
76
|
+
}, N = (e) => {
|
|
77
|
+
D || t.current && e.target === t.current && t.current.close();
|
|
78
|
+
}, w = () => {
|
|
79
|
+
t.current && t.current.close();
|
|
80
|
+
};
|
|
81
|
+
return /* @__PURE__ */ r.jsx(
|
|
82
|
+
"dialog",
|
|
83
|
+
{
|
|
84
|
+
...i,
|
|
85
|
+
ref: t,
|
|
86
|
+
className: o.root,
|
|
87
|
+
onMouseDown: (e) => N(e),
|
|
88
|
+
"aria-modal": "true",
|
|
89
|
+
children: /* @__PURE__ */ r.jsxs(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
className: l(o.contentWrapper, b, {
|
|
93
|
+
[o.contentWrapperNoFooter]: !s
|
|
94
|
+
}),
|
|
95
|
+
children: [
|
|
96
|
+
!a && /* @__PURE__ */ r.jsx(
|
|
97
|
+
j,
|
|
98
|
+
{
|
|
99
|
+
className: o.closeButton,
|
|
100
|
+
hideLabel: !0,
|
|
101
|
+
iconName: "cross",
|
|
102
|
+
size: "small",
|
|
103
|
+
type: "button",
|
|
104
|
+
variant: "ghost",
|
|
105
|
+
onClick: () => w(),
|
|
106
|
+
children: m
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ r.jsx(
|
|
110
|
+
"header",
|
|
111
|
+
{
|
|
112
|
+
className: l(o.header, {
|
|
113
|
+
[o.headerCloseButton]: !a,
|
|
114
|
+
[o.headerScrollable]: f
|
|
115
|
+
}),
|
|
116
|
+
children: S
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ r.jsx(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
ref: _,
|
|
123
|
+
className: l(o.content, {
|
|
124
|
+
[o.contentNoFooter]: !s
|
|
125
|
+
}),
|
|
126
|
+
tabIndex: 0,
|
|
127
|
+
children: n
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
s && /* @__PURE__ */ r.jsx(
|
|
131
|
+
"footer",
|
|
132
|
+
{
|
|
133
|
+
className: l(o.footer, {
|
|
134
|
+
[o.footerScrollable]: f
|
|
135
|
+
}),
|
|
136
|
+
children: s
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
};
|
|
145
|
+
export {
|
|
146
|
+
G as D,
|
|
147
|
+
I as v
|
|
148
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as n } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useRef as w, useState as g, useEffect as b } from "react";
|
|
5
|
+
import { DSButton as j } from "../button.M4nXjcUn.js";
|
|
6
|
+
import { g as B } from "./helpers.B1JT5ShS.js";
|
|
7
|
+
import '../assets/Drawer.Bauwxrk7.css';const R = "ds-drawer_root_1qhpc_10", W = "ds-drawer_root--end_1qhpc_68", C = "ds-drawer_content-wrapper_1qhpc_169", F = "ds-drawer_content-wrapper--no-footer_1qhpc_175", k = "ds-drawer_close-button_1qhpc_178", I = "ds-drawer_header_1qhpc_191", O = "ds-drawer_content_1qhpc_169", y = "ds-drawer_footer_1qhpc_193", z = "ds-drawer_header--scrollable_1qhpc_214", L = "ds-drawer_header--close-button_1qhpc_223", M = "ds-drawer_content--no-footer_1qhpc_237", H = "ds-drawer_footer--scrollable_1qhpc_244", o = {
|
|
8
|
+
root: R,
|
|
9
|
+
"root--end": "ds-drawer_root--end_1qhpc_68",
|
|
10
|
+
rootEnd: W,
|
|
11
|
+
"content-wrapper": "ds-drawer_content-wrapper_1qhpc_169",
|
|
12
|
+
contentWrapper: C,
|
|
13
|
+
"content-wrapper--no-footer": "ds-drawer_content-wrapper--no-footer_1qhpc_175",
|
|
14
|
+
contentWrapperNoFooter: F,
|
|
15
|
+
"close-button": "ds-drawer_close-button_1qhpc_178",
|
|
16
|
+
closeButton: k,
|
|
17
|
+
header: I,
|
|
18
|
+
content: O,
|
|
19
|
+
footer: y,
|
|
20
|
+
"header--scrollable": "ds-drawer_header--scrollable_1qhpc_214",
|
|
21
|
+
headerScrollable: z,
|
|
22
|
+
"header--close-button": "ds-drawer_header--close-button_1qhpc_223",
|
|
23
|
+
headerCloseButton: L,
|
|
24
|
+
"content--no-footer": "ds-drawer_content--no-footer_1qhpc_237",
|
|
25
|
+
contentNoFooter: M,
|
|
26
|
+
"footer--scrollable": "ds-drawer_footer--scrollable_1qhpc_244",
|
|
27
|
+
footerScrollable: H
|
|
28
|
+
}, K = ["start", "end"], P = ({ tabIndex: c }) => {
|
|
29
|
+
if (c || c === 0)
|
|
30
|
+
throw new Error(
|
|
31
|
+
B(
|
|
32
|
+
"DSDrawer",
|
|
33
|
+
"Do not pass the tabindex property to the DSDrawer component as it is not interactive and does not receive focus. The DSDrawers contents, including the close button contained in the DSDrawer, can receive focus and be interactive."
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
}, Q = ({
|
|
37
|
+
children: c,
|
|
38
|
+
className: m,
|
|
39
|
+
closeButtonLabel: q = "Close modal",
|
|
40
|
+
disableBackdropClose: D = !1,
|
|
41
|
+
footer: s,
|
|
42
|
+
header: S,
|
|
43
|
+
hideCloseButton: l = !1,
|
|
44
|
+
position: N = "start",
|
|
45
|
+
isOpen: d = !1,
|
|
46
|
+
onClose: a,
|
|
47
|
+
..._
|
|
48
|
+
}) => {
|
|
49
|
+
if (process.env.NODE_ENV !== "production") {
|
|
50
|
+
const { tabIndex: e } = _;
|
|
51
|
+
P({
|
|
52
|
+
tabIndex: e
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const r = w(null), p = w(null), [h, v] = g(!1);
|
|
56
|
+
b(() => {
|
|
57
|
+
const e = p.current;
|
|
58
|
+
if (e) {
|
|
59
|
+
const f = () => {
|
|
60
|
+
v(
|
|
61
|
+
e.scrollHeight > e.clientHeight
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
f();
|
|
65
|
+
const u = new ResizeObserver(f);
|
|
66
|
+
return u.observe(e), () => {
|
|
67
|
+
u.disconnect();
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}, []), b(() => {
|
|
71
|
+
const e = r.current;
|
|
72
|
+
if (e)
|
|
73
|
+
return e.addEventListener("close", i), d ? e.showModal() : e.close(), () => {
|
|
74
|
+
e.removeEventListener("close", i);
|
|
75
|
+
};
|
|
76
|
+
}, [d, a]);
|
|
77
|
+
const i = () => {
|
|
78
|
+
a && a();
|
|
79
|
+
}, E = (e) => {
|
|
80
|
+
D || r.current && e.target === r.current && r.current.close();
|
|
81
|
+
}, x = () => {
|
|
82
|
+
r.current && r.current.close();
|
|
83
|
+
};
|
|
84
|
+
return /* @__PURE__ */ t.jsx(
|
|
85
|
+
"dialog",
|
|
86
|
+
{
|
|
87
|
+
..._,
|
|
88
|
+
ref: r,
|
|
89
|
+
className: n(o.root, {
|
|
90
|
+
[o.rootEnd]: N === "end"
|
|
91
|
+
}),
|
|
92
|
+
onMouseDown: (e) => E(e),
|
|
93
|
+
"aria-modal": "true",
|
|
94
|
+
children: /* @__PURE__ */ t.jsxs(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
className: n(o.contentWrapper, m, {
|
|
98
|
+
[o.contentWrapperNoFooter]: !s
|
|
99
|
+
}),
|
|
100
|
+
children: [
|
|
101
|
+
!l && /* @__PURE__ */ t.jsx(
|
|
102
|
+
j,
|
|
103
|
+
{
|
|
104
|
+
className: o.closeButton,
|
|
105
|
+
hideLabel: !0,
|
|
106
|
+
iconName: "cross",
|
|
107
|
+
size: "small",
|
|
108
|
+
type: "button",
|
|
109
|
+
variant: "ghost",
|
|
110
|
+
onClick: () => x(),
|
|
111
|
+
children: q
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ t.jsx(
|
|
115
|
+
"header",
|
|
116
|
+
{
|
|
117
|
+
className: n(o.header, {
|
|
118
|
+
[o.headerCloseButton]: !l,
|
|
119
|
+
[o.headerScrollable]: h
|
|
120
|
+
}),
|
|
121
|
+
children: S
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ t.jsx(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
ref: p,
|
|
128
|
+
className: n(o.content, {
|
|
129
|
+
[o.contentNoFooter]: !s
|
|
130
|
+
}),
|
|
131
|
+
tabIndex: 0,
|
|
132
|
+
children: c
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
s && /* @__PURE__ */ t.jsx(
|
|
136
|
+
"footer",
|
|
137
|
+
{
|
|
138
|
+
className: n(o.footer, {
|
|
139
|
+
[o.footerScrollable]: h
|
|
140
|
+
}),
|
|
141
|
+
children: s
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
};
|
|
150
|
+
export {
|
|
151
|
+
Q as D,
|
|
152
|
+
K as a,
|
|
153
|
+
P as v
|
|
154
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as e } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c } from "./index.CvOaL64Y.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Asterisk as y } from "../asterisk.DpzETKdT.js";
|
|
6
|
+
import { DSHeading as v } from "../heading.IPIYc5vW.js";
|
|
7
|
+
import { DSSystemFeedback as w } from "../systemfeedback.C3Pfxxpp.js";
|
|
8
|
+
import { g as j } from "./helpers.B1JT5ShS.js";
|
|
9
|
+
import '../assets/Fieldset.DOdTbb7C.css';const N = "ds-fieldset_root_1opm7_1", E = "ds-fieldset_child-wrapper_1opm7_95", M = "ds-fieldset_legend_1opm7_102", q = "ds-fieldset_legend--utility--m_1opm7_106", C = "ds-fieldset_description_1opm7_118", P = "ds-fieldset_description--small_1opm7_132", T = "ds-fieldset_system-feedback_1opm7_136", i = {
|
|
10
|
+
root: N,
|
|
11
|
+
"child-wrapper": "ds-fieldset_child-wrapper_1opm7_95",
|
|
12
|
+
childWrapper: E,
|
|
13
|
+
legend: M,
|
|
14
|
+
"legend--utility--m": "ds-fieldset_legend--utility--m_1opm7_106",
|
|
15
|
+
legendUtilityM: q,
|
|
16
|
+
description: C,
|
|
17
|
+
"description--small": "ds-fieldset_description--small_1opm7_132",
|
|
18
|
+
descriptionSmall: P,
|
|
19
|
+
"system-feedback": "ds-fieldset_system-feedback_1opm7_136",
|
|
20
|
+
systemFeedback: T
|
|
21
|
+
}, U = ({
|
|
22
|
+
description: r,
|
|
23
|
+
id: s,
|
|
24
|
+
legend: a,
|
|
25
|
+
systemFeedback: t
|
|
26
|
+
}) => {
|
|
27
|
+
if (!s && (r || t))
|
|
28
|
+
throw new Error(
|
|
29
|
+
j(
|
|
30
|
+
"DSFieldset",
|
|
31
|
+
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSFieldset component.'
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
if (!a)
|
|
35
|
+
throw new Error(
|
|
36
|
+
j(
|
|
37
|
+
"DSFieldset",
|
|
38
|
+
"The legend prop is required. Please add the legend prop to the DSFieldset component."
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
}, H = ({
|
|
42
|
+
children: r,
|
|
43
|
+
legend: s,
|
|
44
|
+
className: a,
|
|
45
|
+
description: t,
|
|
46
|
+
disabled: S = !1,
|
|
47
|
+
id: n,
|
|
48
|
+
invalid: p = !1,
|
|
49
|
+
required: m = !1,
|
|
50
|
+
systemFeedback: o,
|
|
51
|
+
...b
|
|
52
|
+
}) => {
|
|
53
|
+
process.env.NODE_ENV !== "production" && U({ description: t, id: n, legend: s, systemFeedback: o });
|
|
54
|
+
let d, _, f;
|
|
55
|
+
const l = typeof s == "object" && s !== void 0;
|
|
56
|
+
l && ({ headingSize: d, headingTag: _, headingText: f } = s);
|
|
57
|
+
const g = `${n}-feedback`, h = `${n}-description`, u = [
|
|
58
|
+
o && g,
|
|
59
|
+
t && h
|
|
60
|
+
].filter(Boolean).join(" "), x = !l || d === "small" || d === "small-uppercase", D = c(i.root, a), F = c(i.legend, {
|
|
61
|
+
[i.legendUtilityM]: !l
|
|
62
|
+
}), k = c(i.description, {
|
|
63
|
+
[i.descriptionSmall]: x
|
|
64
|
+
});
|
|
65
|
+
return /* @__PURE__ */ e.jsxs(
|
|
66
|
+
"fieldset",
|
|
67
|
+
{
|
|
68
|
+
className: D,
|
|
69
|
+
disabled: S,
|
|
70
|
+
...b,
|
|
71
|
+
"aria-invalid": p,
|
|
72
|
+
"aria-describedby": u || void 0,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ e.jsx("legend", { className: F, children: l ? /* @__PURE__ */ e.jsxs(v, { tag: _, size: d, children: [
|
|
75
|
+
f,
|
|
76
|
+
m && /* @__PURE__ */ e.jsx(y, {})
|
|
77
|
+
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
78
|
+
s,
|
|
79
|
+
m && /* @__PURE__ */ e.jsx(y, {})
|
|
80
|
+
] }) }),
|
|
81
|
+
t && /* @__PURE__ */ e.jsx("span", { id: h, className: k, children: t }),
|
|
82
|
+
p && o && /* @__PURE__ */ e.jsx(
|
|
83
|
+
w,
|
|
84
|
+
{
|
|
85
|
+
id: g,
|
|
86
|
+
type: "invalid",
|
|
87
|
+
message: o,
|
|
88
|
+
className: i.systemFeedback
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ e.jsx("div", { className: i.childWrapper, children: r })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
H as D,
|
|
98
|
+
U as v
|
|
99
|
+
};
|