@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,194 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as r } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useRef as C, useState as q, useEffect as W } from "react";
|
|
5
|
+
import { u as F } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { Asterisk as M } from "../asterisk.DpzETKdT.js";
|
|
7
|
+
import { D as O } from "./Icon.BCmt_XBG.js";
|
|
8
|
+
import { DSSystemFeedback as T } from "../systemfeedback.C3Pfxxpp.js";
|
|
9
|
+
import { g as p } from "./helpers.B1JT5ShS.js";
|
|
10
|
+
import '../assets/Select.D4EXgIbz.css';const V = "ds-select_root_1ui0h_1", Z = "ds-select_hint_1ui0h_9", J = "ds-select_label_1ui0h_9", K = "ds-select_wrapper_1ui0h_13", Q = "ds-select_affix_1ui0h_19", U = "ds-select_affix--small_1ui0h_40", X = "ds-select_affix--disabled_1ui0h_53", Y = "ds-select_prefix_1ui0h_61", z = "ds-select_affix--readonly_1ui0h_64", G = "ds-select_suffix_1ui0h_74", ee = "ds-select_action-button_1ui0h_81", se = "ds-select_label--hidden_1ui0h_99", te = "ds-select_label--disabled_1ui0h_112", le = "ds-select_feedback_1ui0h_132", ce = "ds-select_select-wrapper_1ui0h_137", ae = "ds-select_select_1ui0h_137", ne = "ds-select_select--invalid_1ui0h_262", ie = "ds-select_select--small_1ui0h_269", oe = "ds-select_input--has-leading-icon_1ui0h_322", de = "ds-select_input--has-action-button_1ui0h_325", re = "ds-select_input--has-second-action-button_1ui0h_328", _e = "ds-select_select--has-leading-icon_1ui0h_331", ue = "ds-select_select--has-action-button_1ui0h_334", he = "ds-select_select--has-second-action-button_1ui0h_337", fe = "ds-select_select--has-affix_1ui0h_340", pe = "ds-select_select--is-ready_1ui0h_354", be = "ds-select_select--placeholder_1ui0h_371", me = "ds-select_chevron_1ui0h_410", xe = "ds-select_chevron--small_1ui0h_414", ve = "ds-select_chevron--disabled_1ui0h_417", e = {
|
|
11
|
+
root: V,
|
|
12
|
+
hint: Z,
|
|
13
|
+
label: J,
|
|
14
|
+
wrapper: K,
|
|
15
|
+
affix: Q,
|
|
16
|
+
"affix--small": "ds-select_affix--small_1ui0h_40",
|
|
17
|
+
affixSmall: U,
|
|
18
|
+
"affix--disabled": "ds-select_affix--disabled_1ui0h_53",
|
|
19
|
+
affixDisabled: X,
|
|
20
|
+
prefix: Y,
|
|
21
|
+
"affix--readonly": "ds-select_affix--readonly_1ui0h_64",
|
|
22
|
+
affixReadonly: z,
|
|
23
|
+
suffix: G,
|
|
24
|
+
"action-button": "ds-select_action-button_1ui0h_81",
|
|
25
|
+
actionButton: ee,
|
|
26
|
+
"label--hidden": "ds-select_label--hidden_1ui0h_99",
|
|
27
|
+
labelHidden: se,
|
|
28
|
+
"label--disabled": "ds-select_label--disabled_1ui0h_112",
|
|
29
|
+
labelDisabled: te,
|
|
30
|
+
feedback: le,
|
|
31
|
+
"select-wrapper": "ds-select_select-wrapper_1ui0h_137",
|
|
32
|
+
selectWrapper: ce,
|
|
33
|
+
select: ae,
|
|
34
|
+
"select--invalid": "ds-select_select--invalid_1ui0h_262",
|
|
35
|
+
selectInvalid: ne,
|
|
36
|
+
"select--small": "ds-select_select--small_1ui0h_269",
|
|
37
|
+
selectSmall: ie,
|
|
38
|
+
"input--has-leading-icon": "ds-select_input--has-leading-icon_1ui0h_322",
|
|
39
|
+
inputHasLeadingIcon: oe,
|
|
40
|
+
"input--has-action-button": "ds-select_input--has-action-button_1ui0h_325",
|
|
41
|
+
inputHasActionButton: de,
|
|
42
|
+
"input--has-second-action-button": "ds-select_input--has-second-action-button_1ui0h_328",
|
|
43
|
+
inputHasSecondActionButton: re,
|
|
44
|
+
"select--has-leading-icon": "ds-select_select--has-leading-icon_1ui0h_331",
|
|
45
|
+
selectHasLeadingIcon: _e,
|
|
46
|
+
"select--has-action-button": "ds-select_select--has-action-button_1ui0h_334",
|
|
47
|
+
selectHasActionButton: ue,
|
|
48
|
+
"select--has-second-action-button": "ds-select_select--has-second-action-button_1ui0h_337",
|
|
49
|
+
selectHasSecondActionButton: he,
|
|
50
|
+
"select--has-affix": "ds-select_select--has-affix_1ui0h_340",
|
|
51
|
+
selectHasAffix: fe,
|
|
52
|
+
"select--is-ready": "ds-select_select--is-ready_1ui0h_354",
|
|
53
|
+
selectIsReady: pe,
|
|
54
|
+
"select--placeholder": "ds-select_select--placeholder_1ui0h_371",
|
|
55
|
+
selectPlaceholder: be,
|
|
56
|
+
chevron: me,
|
|
57
|
+
"chevron--small": "ds-select_chevron--small_1ui0h_414",
|
|
58
|
+
chevronSmall: xe,
|
|
59
|
+
"chevron--disabled": "ds-select_chevron--disabled_1ui0h_417",
|
|
60
|
+
chevronDisabled: ve
|
|
61
|
+
}, Ee = ["medium", "small"], Se = ({
|
|
62
|
+
id: s,
|
|
63
|
+
label: a,
|
|
64
|
+
options: c
|
|
65
|
+
}) => {
|
|
66
|
+
if (!s)
|
|
67
|
+
throw new Error(
|
|
68
|
+
p(
|
|
69
|
+
"DSSelect",
|
|
70
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSSelect component.'
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
if (!a)
|
|
74
|
+
throw new Error(
|
|
75
|
+
p(
|
|
76
|
+
"DSSelect",
|
|
77
|
+
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSSelect component. If you don't want to display a label, set hideLabel={true}.`
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
if (!c || c.length === 0)
|
|
81
|
+
throw new Error(
|
|
82
|
+
p(
|
|
83
|
+
"DSSelect",
|
|
84
|
+
'Options are always required. Please add an "options" prop to the DSSelect component.'
|
|
85
|
+
)
|
|
86
|
+
);
|
|
87
|
+
}, ge = (s, a, c) => s === "" || a !== void 0 && a !== "" ? !1 : !(c !== void 0 && c !== ""), Le = ({
|
|
88
|
+
id: s,
|
|
89
|
+
label: a,
|
|
90
|
+
options: c,
|
|
91
|
+
className: H,
|
|
92
|
+
defaultValue: b,
|
|
93
|
+
disabled: _ = !1,
|
|
94
|
+
hideLabel: I = !1,
|
|
95
|
+
hint: u,
|
|
96
|
+
invalid: d = !1,
|
|
97
|
+
placeholder: h = "Select",
|
|
98
|
+
required: m = !1,
|
|
99
|
+
size: x = "medium",
|
|
100
|
+
systemFeedback: f,
|
|
101
|
+
value: v,
|
|
102
|
+
...w
|
|
103
|
+
}) => {
|
|
104
|
+
process.env.NODE_ENV !== "production" && Se({
|
|
105
|
+
id: s,
|
|
106
|
+
label: a,
|
|
107
|
+
options: c
|
|
108
|
+
});
|
|
109
|
+
const o = C(null), [j, A] = q(
|
|
110
|
+
ge(h, b, v)
|
|
111
|
+
);
|
|
112
|
+
W(() => {
|
|
113
|
+
if (!o.current) return;
|
|
114
|
+
const n = () => {
|
|
115
|
+
if (!o.current) return;
|
|
116
|
+
const i = o.current.value;
|
|
117
|
+
A(i === "");
|
|
118
|
+
}, l = o.current;
|
|
119
|
+
return l.addEventListener("change", n), () => {
|
|
120
|
+
l.removeEventListener("change", n);
|
|
121
|
+
};
|
|
122
|
+
}, []);
|
|
123
|
+
const B = F(I), S = `${s}-label`, g = `${s}-feedback`, D = `${s}-hint`, E = u ? ` ${D}` : "", L = (n) => [
|
|
124
|
+
h && /* @__PURE__ */ t.jsx("option", { value: "", children: h }, `${s}-hidden-option-disabled-placeholder`),
|
|
125
|
+
...n.map((l) => {
|
|
126
|
+
if ("options" in l) {
|
|
127
|
+
const { label: i, options: $ } = l;
|
|
128
|
+
return /* @__PURE__ */ t.jsx("optgroup", { label: i, children: $.map(y) }, i);
|
|
129
|
+
} else
|
|
130
|
+
return y(l);
|
|
131
|
+
})
|
|
132
|
+
], y = ({ label: n, value: l, isDisabled: i }) => /* @__PURE__ */ t.jsx("option", { value: l, disabled: i, children: n }, l), N = r(e.root, H), P = r(e.select, {
|
|
133
|
+
[e.selectSmall]: x === "small",
|
|
134
|
+
[e.selectInvalid]: d,
|
|
135
|
+
[e.selectPlaceholder]: j
|
|
136
|
+
}), k = r(e.label, {
|
|
137
|
+
// hide label only visually to keep them available for assistive technologies
|
|
138
|
+
[e.labelHidden]: B,
|
|
139
|
+
[e.labelDisabled]: _
|
|
140
|
+
}), R = r(e.chevron, {
|
|
141
|
+
[e.chevronSmall]: x === "small",
|
|
142
|
+
[e.chevronDisabled]: _
|
|
143
|
+
});
|
|
144
|
+
return /* @__PURE__ */ t.jsxs("div", { className: N, children: [
|
|
145
|
+
/* @__PURE__ */ t.jsxs("label", { className: k, id: S, htmlFor: s, children: [
|
|
146
|
+
a,
|
|
147
|
+
m && /* @__PURE__ */ t.jsx(M, {})
|
|
148
|
+
] }),
|
|
149
|
+
u && /* @__PURE__ */ t.jsx("div", { className: e.hint, id: D, children: u }),
|
|
150
|
+
d && f && /* @__PURE__ */ t.jsx(
|
|
151
|
+
T,
|
|
152
|
+
{
|
|
153
|
+
className: e.feedback,
|
|
154
|
+
message: f,
|
|
155
|
+
type: "invalid",
|
|
156
|
+
id: g,
|
|
157
|
+
"aria-live": "assertive"
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
/* @__PURE__ */ t.jsxs("div", { className: e.selectWrapper, children: [
|
|
161
|
+
/* @__PURE__ */ t.jsx(
|
|
162
|
+
"select",
|
|
163
|
+
{
|
|
164
|
+
...w,
|
|
165
|
+
id: s,
|
|
166
|
+
ref: o,
|
|
167
|
+
className: P,
|
|
168
|
+
"aria-labelledby": `${S}${E}`,
|
|
169
|
+
"aria-describedby": d && f ? g : void 0,
|
|
170
|
+
"aria-invalid": d,
|
|
171
|
+
defaultValue: b,
|
|
172
|
+
value: v,
|
|
173
|
+
disabled: _,
|
|
174
|
+
required: m,
|
|
175
|
+
children: L(c)
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ t.jsx(
|
|
179
|
+
O,
|
|
180
|
+
{
|
|
181
|
+
name: "chevron-down",
|
|
182
|
+
className: R,
|
|
183
|
+
"aria-hidden": "true"
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
] })
|
|
187
|
+
] });
|
|
188
|
+
};
|
|
189
|
+
export {
|
|
190
|
+
Le as D,
|
|
191
|
+
Ee as S,
|
|
192
|
+
ge as g,
|
|
193
|
+
Se as v
|
|
194
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as s } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as g } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useState as d, useRef as re, useEffect as x } from "react";
|
|
5
|
+
import { u as ne, h as oe } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { g as V, p as z } from "./helpers.B1JT5ShS.js";
|
|
7
|
+
import { Asterisk as ie } from "../asterisk.DpzETKdT.js";
|
|
8
|
+
import { DSSystemFeedback as le } from "../systemfeedback.C3Pfxxpp.js";
|
|
9
|
+
import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_1", ce = "ds-textarea_textarea--invalid_18bj7_113", _e = "ds-textarea_textarea--small_18bj7_120", ue = "ds-textarea_textarea--resize-auto_18bj7_139", be = "ds-textarea_root_18bj7_149", fe = "ds-textarea_hint_18bj7_157", xe = "ds-textarea_label_18bj7_157", je = "ds-textarea_affix_18bj7_161", me = "ds-textarea_affix--small_18bj7_182", he = "ds-textarea_affix--disabled_18bj7_195", pe = "ds-textarea_prefix_18bj7_203", ve = "ds-textarea_affix--readonly_18bj7_206", ge = "ds-textarea_suffix_18bj7_216", Se = "ds-textarea_leading-icon_18bj7_223", Ie = "ds-textarea_leading-icon--small_18bj7_235", Ce = "ds-textarea_leading-icon--disabled_18bj7_238", ye = "ds-textarea_action-button_18bj7_247", De = "ds-textarea_label--hidden_18bj7_265", Ae = "ds-textarea_label--disabled_18bj7_278", we = "ds-textarea_feedback_18bj7_298", Re = "ds-textarea_char-count_18bj7_303", Te = "ds-textarea_char-count-announcer_18bj7_319", t = {
|
|
10
|
+
textarea: de,
|
|
11
|
+
"textarea--invalid": "ds-textarea_textarea--invalid_18bj7_113",
|
|
12
|
+
textareaInvalid: ce,
|
|
13
|
+
"textarea--small": "ds-textarea_textarea--small_18bj7_120",
|
|
14
|
+
textareaSmall: _e,
|
|
15
|
+
"textarea--resize-auto": "ds-textarea_textarea--resize-auto_18bj7_139",
|
|
16
|
+
textareaResizeAuto: ue,
|
|
17
|
+
root: be,
|
|
18
|
+
hint: fe,
|
|
19
|
+
label: xe,
|
|
20
|
+
affix: je,
|
|
21
|
+
"affix--small": "ds-textarea_affix--small_18bj7_182",
|
|
22
|
+
affixSmall: me,
|
|
23
|
+
"affix--disabled": "ds-textarea_affix--disabled_18bj7_195",
|
|
24
|
+
affixDisabled: he,
|
|
25
|
+
prefix: pe,
|
|
26
|
+
"affix--readonly": "ds-textarea_affix--readonly_18bj7_206",
|
|
27
|
+
affixReadonly: ve,
|
|
28
|
+
suffix: ge,
|
|
29
|
+
"leading-icon": "ds-textarea_leading-icon_18bj7_223",
|
|
30
|
+
leadingIcon: Se,
|
|
31
|
+
"leading-icon--small": "ds-textarea_leading-icon--small_18bj7_235",
|
|
32
|
+
leadingIconSmall: Ie,
|
|
33
|
+
"leading-icon--disabled": "ds-textarea_leading-icon--disabled_18bj7_238",
|
|
34
|
+
leadingIconDisabled: Ce,
|
|
35
|
+
"action-button": "ds-textarea_action-button_18bj7_247",
|
|
36
|
+
actionButton: ye,
|
|
37
|
+
"label--hidden": "ds-textarea_label--hidden_18bj7_265",
|
|
38
|
+
labelHidden: De,
|
|
39
|
+
"label--disabled": "ds-textarea_label--disabled_18bj7_278",
|
|
40
|
+
labelDisabled: Ae,
|
|
41
|
+
feedback: we,
|
|
42
|
+
"char-count": "ds-textarea_char-count_18bj7_303",
|
|
43
|
+
charCount: Re,
|
|
44
|
+
"char-count-announcer": "ds-textarea_char-count-announcer_18bj7_319",
|
|
45
|
+
charCountAnnouncer: Te
|
|
46
|
+
}, Pe = ["medium", "small"], Ee = ({ id: r, label: _ }) => {
|
|
47
|
+
if (!r)
|
|
48
|
+
throw new Error(
|
|
49
|
+
V(
|
|
50
|
+
"DSTextarea",
|
|
51
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSTextarea component.'
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
if (!_)
|
|
55
|
+
throw new Error(
|
|
56
|
+
V(
|
|
57
|
+
"DSTextarea",
|
|
58
|
+
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSTextarea component. If you don't want to display a label, set hideLabel={true}.`
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
}, qe = ({
|
|
62
|
+
id: r,
|
|
63
|
+
label: _,
|
|
64
|
+
charsLimitText: P = "Character limit reached",
|
|
65
|
+
charsRemainingText: q = "Characters remaining:",
|
|
66
|
+
className: M,
|
|
67
|
+
defaultValue: O,
|
|
68
|
+
disabled: S = !1,
|
|
69
|
+
hint: j,
|
|
70
|
+
hideLabel: F = !1,
|
|
71
|
+
invalid: n = !1,
|
|
72
|
+
maxLength: e,
|
|
73
|
+
readonly: I = !1,
|
|
74
|
+
required: C = !1,
|
|
75
|
+
resize: u = "vertical",
|
|
76
|
+
size: W = "medium",
|
|
77
|
+
systemFeedback: i,
|
|
78
|
+
value: m,
|
|
79
|
+
wrapperClassName: X,
|
|
80
|
+
onChange: y,
|
|
81
|
+
onInput: D,
|
|
82
|
+
...Z
|
|
83
|
+
}) => {
|
|
84
|
+
process.env.NODE_ENV !== "production" && Ee({
|
|
85
|
+
id: r,
|
|
86
|
+
label: _
|
|
87
|
+
});
|
|
88
|
+
const [G, A] = d(O || ""), [l, w] = d(0), [J, R] = d(0), [K, T] = d("off"), [E, h] = d(i), [p, v] = d(n), N = m !== void 0, b = N ? m : G, o = re(null), Q = ne(F);
|
|
89
|
+
x(() => {
|
|
90
|
+
if (!e || e <= 0)
|
|
91
|
+
return;
|
|
92
|
+
l >= e * 0.8 ? T("polite") : T("off");
|
|
93
|
+
const a = setTimeout(() => {
|
|
94
|
+
R(e - l || 0);
|
|
95
|
+
}, 1e3);
|
|
96
|
+
return () => clearTimeout(a);
|
|
97
|
+
}, [l]), x(() => {
|
|
98
|
+
A(b || ""), c(), e && e > 0 && (w(b.toString().length || 0), R(e - b.toString().length || 0));
|
|
99
|
+
}, [m]), x(() => {
|
|
100
|
+
n && i ? (h(i), v(n)) : !n && e && e >= 0 && l >= e ? (v(!0), h(P)) : (h(i), v(n));
|
|
101
|
+
}, [n, p, i, l]), x(() => {
|
|
102
|
+
if (oe && u === "auto")
|
|
103
|
+
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
104
|
+
}, [u, o.current]);
|
|
105
|
+
const U = g(t.root, X), Y = g(t.textarea, M, {
|
|
106
|
+
// small textarea
|
|
107
|
+
[t.textareaSmall]: W === "small",
|
|
108
|
+
// invalid state
|
|
109
|
+
[t.textareaInvalid]: p,
|
|
110
|
+
// resize handling
|
|
111
|
+
[t.textareaResizeAuto]: u === "auto"
|
|
112
|
+
}), L = g(t.label, {
|
|
113
|
+
// hide label only visually to keep them available for assistive technologies
|
|
114
|
+
[t.labelHidden]: Q,
|
|
115
|
+
[t.labelDisabled]: S
|
|
116
|
+
}), B = `${r}-label`, $ = `${r}-feedback`, k = `${r}-hint`, H = `${r}-char-count-announcer`, ee = j ? ` ${k}` : "", c = () => {
|
|
117
|
+
if (o.current && u === "auto") {
|
|
118
|
+
o.current.style.height = "auto";
|
|
119
|
+
const a = z(o.current.scrollHeight), f = z(2);
|
|
120
|
+
o.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
|
|
121
|
+
// from jumping as soon as the user starts typing.
|
|
122
|
+
a + f}rem`;
|
|
123
|
+
}
|
|
124
|
+
}, ae = () => {
|
|
125
|
+
const a = [];
|
|
126
|
+
return e && e > 0 && a.push(H), n && i && a.push($), a.length > 0 ? a.join(" ") : void 0;
|
|
127
|
+
}, te = (a) => {
|
|
128
|
+
var f;
|
|
129
|
+
D && D(a), e && e > 0 && w(((f = o.current) == null ? void 0 : f.value.length) || 0), c();
|
|
130
|
+
}, se = (a) => {
|
|
131
|
+
y && y(a), N || A(a.target.value);
|
|
132
|
+
};
|
|
133
|
+
return /* @__PURE__ */ s.jsxs("div", { className: U, children: [
|
|
134
|
+
/* @__PURE__ */ s.jsxs("label", { className: L, id: B, htmlFor: r, children: [
|
|
135
|
+
_,
|
|
136
|
+
C && /* @__PURE__ */ s.jsx(ie, {})
|
|
137
|
+
] }),
|
|
138
|
+
j && /* @__PURE__ */ s.jsx("div", { className: t.hint, id: k, children: j }),
|
|
139
|
+
p && E && /* @__PURE__ */ s.jsx(
|
|
140
|
+
le,
|
|
141
|
+
{
|
|
142
|
+
className: t.feedback,
|
|
143
|
+
message: E,
|
|
144
|
+
type: "invalid",
|
|
145
|
+
id: $
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ s.jsx(
|
|
149
|
+
"textarea",
|
|
150
|
+
{
|
|
151
|
+
className: Y,
|
|
152
|
+
id: r,
|
|
153
|
+
ref: o,
|
|
154
|
+
...Z,
|
|
155
|
+
"aria-labelledby": `${B}${ee}`,
|
|
156
|
+
"aria-describedby": ae(),
|
|
157
|
+
"aria-invalid": n,
|
|
158
|
+
"aria-disabled": I,
|
|
159
|
+
maxLength: e,
|
|
160
|
+
readOnly: I,
|
|
161
|
+
required: C,
|
|
162
|
+
disabled: S,
|
|
163
|
+
value: b,
|
|
164
|
+
defaultValue: void 0,
|
|
165
|
+
rows: void 0,
|
|
166
|
+
cols: void 0,
|
|
167
|
+
onChange: se,
|
|
168
|
+
onInput: te
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
e !== void 0 && e > 0 && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
172
|
+
/* @__PURE__ */ s.jsxs("div", { className: t.charCount, "aria-hidden": "true", children: [
|
|
173
|
+
l,
|
|
174
|
+
"/",
|
|
175
|
+
e
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ s.jsxs(
|
|
178
|
+
"div",
|
|
179
|
+
{
|
|
180
|
+
className: t.charCountAnnouncer,
|
|
181
|
+
id: H,
|
|
182
|
+
"aria-live": K,
|
|
183
|
+
"aria-atomic": "true",
|
|
184
|
+
children: [
|
|
185
|
+
q,
|
|
186
|
+
" ",
|
|
187
|
+
J
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
] })
|
|
192
|
+
] });
|
|
193
|
+
};
|
|
194
|
+
export {
|
|
195
|
+
qe as D,
|
|
196
|
+
Pe as T,
|
|
197
|
+
Ee as v
|
|
198
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { forwardRef as u } from "react";
|
|
5
|
+
import { DSButton as y } from "../button.M4nXjcUn.js";
|
|
6
|
+
import { D as g } from "./Icon.BCmt_XBG.js";
|
|
7
|
+
import '../assets/Toast.CuafTAf7.css';const h = "ds-toast_root_58y8a_5", p = "ds-toast_root--closing_58y8a_19", x = "ds-toast_fade-out_58y8a_1", I = "ds-toast_move-in_58y8a_1", S = "ds-toast_root--success_58y8a_54", N = "ds-toast_root--info_58y8a_58", j = "ds-toast_root--warning_58y8a_62", v = "ds-toast_content_58y8a_67", w = "ds-toast_content--hide-icon_58y8a_74", C = "ds-toast_icon_58y8a_78", D = "ds-toast_message_58y8a_82", o = {
|
|
8
|
+
root: h,
|
|
9
|
+
"root--closing": "ds-toast_root--closing_58y8a_19",
|
|
10
|
+
rootClosing: p,
|
|
11
|
+
"fade-out": "ds-toast_fade-out_58y8a_1",
|
|
12
|
+
fadeOut: x,
|
|
13
|
+
"move-in": "ds-toast_move-in_58y8a_1",
|
|
14
|
+
moveIn: I,
|
|
15
|
+
"root--success": "ds-toast_root--success_58y8a_54",
|
|
16
|
+
rootSuccess: S,
|
|
17
|
+
"root--info": "ds-toast_root--info_58y8a_58",
|
|
18
|
+
rootInfo: N,
|
|
19
|
+
"root--warning": "ds-toast_root--warning_58y8a_62",
|
|
20
|
+
rootWarning: j,
|
|
21
|
+
content: v,
|
|
22
|
+
"content--hide-icon": "ds-toast_content--hide-icon_58y8a_74",
|
|
23
|
+
contentHideIcon: w,
|
|
24
|
+
icon: C,
|
|
25
|
+
message: D
|
|
26
|
+
}, O = {
|
|
27
|
+
success: "circle-check-colored",
|
|
28
|
+
warning: "triangle-exclamationmark-colored",
|
|
29
|
+
info: "circle-info-colored"
|
|
30
|
+
}, T = u(
|
|
31
|
+
({
|
|
32
|
+
message: n,
|
|
33
|
+
className: e,
|
|
34
|
+
hideIcon: a = !1,
|
|
35
|
+
variant: s = "info",
|
|
36
|
+
onClick: r,
|
|
37
|
+
onMouseEnter: i,
|
|
38
|
+
onMouseLeave: _,
|
|
39
|
+
...d
|
|
40
|
+
}, l) => {
|
|
41
|
+
const m = c(o.root, e, {
|
|
42
|
+
[o.rootSuccess]: s === "success",
|
|
43
|
+
[o.rootWarning]: s === "warning",
|
|
44
|
+
[o.rootInfo]: s === "info"
|
|
45
|
+
}), f = c(o.content, {
|
|
46
|
+
[o.contentHideIcon]: a
|
|
47
|
+
});
|
|
48
|
+
return /* @__PURE__ */ t.jsx(
|
|
49
|
+
"aside",
|
|
50
|
+
{
|
|
51
|
+
className: m,
|
|
52
|
+
ref: l,
|
|
53
|
+
popover: "manual",
|
|
54
|
+
"data-ds-toast": !0,
|
|
55
|
+
onMouseEnter: i,
|
|
56
|
+
onMouseLeave: _,
|
|
57
|
+
"aria-label": n,
|
|
58
|
+
...d,
|
|
59
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: f, children: [
|
|
60
|
+
!a && /* @__PURE__ */ t.jsx(
|
|
61
|
+
g,
|
|
62
|
+
{
|
|
63
|
+
name: O[s],
|
|
64
|
+
className: o.icon,
|
|
65
|
+
"aria-hidden": "true"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ t.jsx("div", { className: o.message, children: n }),
|
|
69
|
+
/* @__PURE__ */ t.jsx(
|
|
70
|
+
y,
|
|
71
|
+
{
|
|
72
|
+
hideLabel: !0,
|
|
73
|
+
iconName: "cross",
|
|
74
|
+
size: "small",
|
|
75
|
+
variant: "ghost",
|
|
76
|
+
onClick: r,
|
|
77
|
+
children: "Close toast"
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] })
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
T.displayName = "DSToast";
|
|
86
|
+
export {
|
|
87
|
+
T as D,
|
|
88
|
+
o as s
|
|
89
|
+
};
|
package/combobox.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DetailsHTMLAttributes } from 'react';
|
|
2
2
|
import { AccordionSize, ChevronPosition, Summary } from './Accordion.utils';
|
|
3
|
-
|
|
4
3
|
export interface AccordionProps extends DetailsHTMLAttributes<HTMLDetailsElement> {
|
|
5
4
|
/** Content to be displayed within the accordion. */
|
|
6
5
|
children: React.ReactNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HeadingSize, HeadingTag } from '../Heading/Heading.utils';
|
|
2
2
|
import { AccordionProps } from './Accordion';
|
|
3
|
-
|
|
4
3
|
export declare const ACCORDION_SIZE: readonly ["medium", "small"];
|
|
5
4
|
export type AccordionSize = (typeof ACCORDION_SIZE)[number];
|
|
6
5
|
export declare const CHEVRON_POSITION: readonly ["left", "right"];
|
|
@@ -2,7 +2,6 @@ import { ButtonHTMLAttributes } from 'react';
|
|
|
2
2
|
import { BreakpointCustomizable, IconName, SelectedAriaAttributes, Theme } from '../../types';
|
|
3
3
|
import { IconProps } from '../Icon/Icon';
|
|
4
4
|
import { ButtonAriaAttribute, ButtonSize, ButtonVariant } from './Button.utils';
|
|
5
|
-
|
|
6
5
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
6
|
/** Content within the button. */
|
|
8
7
|
children: React.ReactNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IconName } from '../../types';
|
|
2
2
|
import { ButtonProps } from '../Button/Button';
|
|
3
3
|
import { ButtonRoundVariant } from './ButtonRound.utils';
|
|
4
|
-
|
|
5
4
|
export interface ButtonRoundProps extends Omit<ButtonProps, 'hideLabel' | 'size' | 'iconPosition' | 'isFlush'> {
|
|
6
5
|
children: React.ReactNode;
|
|
7
6
|
/** Visual style variant of the button.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FieldsetHTMLAttributes } from 'react';
|
|
2
2
|
import { FieldsetProps } from '../Fieldset/Fieldset';
|
|
3
|
-
|
|
4
3
|
export interface CheckboxGroupProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
|
|
5
4
|
/** DSCheckbox elements within the checkbox group. */
|
|
6
5
|
children: React.ReactNode;
|
|
@@ -15,13 +14,13 @@ export interface CheckboxGroupProps extends FieldsetHTMLAttributes<HTMLFieldSetE
|
|
|
15
14
|
* @prop {string | { headingText: string; headingSize?: HeadingSize; headingTag?: HeadingTag; }} legend
|
|
16
15
|
*/
|
|
17
16
|
legend: FieldsetProps['legend'];
|
|
17
|
+
/** Short descriptive text displayed beneath the legend. */
|
|
18
|
+
description?: FieldsetProps['description'];
|
|
18
19
|
/**
|
|
19
|
-
* Set the
|
|
20
|
+
* Set the direction of the checkboxes.
|
|
20
21
|
* @default 'vertical'
|
|
21
22
|
*/
|
|
22
|
-
|
|
23
|
-
/** Short descriptive text displayed beneath the legend. */
|
|
24
|
-
description?: FieldsetProps['description'];
|
|
23
|
+
direction?: 'vertical' | 'horizontal';
|
|
25
24
|
/** Disables the checkbox group, preventing user interaction.
|
|
26
25
|
* @default false
|
|
27
26
|
*/
|
|
@@ -42,7 +41,7 @@ export interface CheckboxGroupProps extends FieldsetHTMLAttributes<HTMLFieldSetE
|
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* The `DSCheckboxGroup` component offers a cohesive and accessible solution for grouping `DSCheckbox` elements,
|
|
45
|
-
* complete with customizable legends,
|
|
44
|
+
* complete with customizable legends, direction options, and integrated validation feedback,
|
|
46
45
|
* enhancing the user experience in form designs.
|
|
47
46
|
* */
|
|
48
|
-
export declare const DSCheckboxGroup: ({ children, legend,
|
|
47
|
+
export declare const DSCheckboxGroup: ({ children, legend, className, description, direction, disabled, id, invalid, required, systemFeedback, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CheckboxGroupProps } from './CheckboxGroup';
|
|
2
|
-
|
|
3
2
|
type ValidationProps = Pick<CheckboxGroupProps, 'children' | 'description' | 'id' | 'legend' | 'systemFeedback'>;
|
|
4
3
|
export declare const validateCheckboxGroupProps: ({ children, description, id, legend, systemFeedback, }: ValidationProps) => void;
|
|
5
4
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { Chip, ChipGroupAriaTranslations, ChipGroupLanguage, ChipGroupSelectionMode, ChipGroupSize } from './ChipGroup.utils';
|
|
3
|
+
interface ChipProps extends Omit<Chip, 'onClick'>, Omit<HTMLAttributes<HTMLDivElement>, 'id'> {
|
|
4
|
+
groupId: string;
|
|
5
|
+
isRemovable: boolean;
|
|
6
|
+
lang?: ChipGroupLanguage;
|
|
7
|
+
selectionMode: ChipGroupSelectionMode;
|
|
8
|
+
size?: ChipGroupSize;
|
|
9
|
+
translations?: ChipGroupAriaTranslations;
|
|
10
|
+
}
|
|
11
|
+
export declare const DSChip: import('react').ForwardRefExoticComponent<ChipProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { BreakpointCustomizable } from '../../types';
|
|
3
|
+
import { Chip, ChipGroupAriaTranslations, ChipGroupLanguage, ChipGroupSelectionMode, ChipGroupSize } from './ChipGroup.utils';
|
|
4
|
+
export interface ChipGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** An array of Chip Objects containing the id and label and other optional parameters.
|
|
6
|
+
* `{id: string; label: string; disabled?: boolean; iconName?: IconName; isSelected?: boolean; onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;}[]`*/
|
|
7
|
+
chips: Chip[];
|
|
8
|
+
/** Unique id for the DSChipGroup. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Label text displayed above the DSChipGroup. */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Hides the DSChipGroup label, can be responsive.
|
|
13
|
+
* `boolean | { base: boolean; s?: boolean; m?: boolean; l?: boolean; xl?: boolean; }`
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
hideLabel?: BreakpointCustomizable<boolean>;
|
|
17
|
+
/** Allows removal of Chips.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
isRemovable?: boolean;
|
|
21
|
+
/** Sets language to use for the screen reader messages, if no translations object is provided.
|
|
22
|
+
* @default 'en'
|
|
23
|
+
*/
|
|
24
|
+
lang?: ChipGroupLanguage;
|
|
25
|
+
/** Defines if only one Chip or multiple Chips can be selected. Ignored if `isRemovable=true`.
|
|
26
|
+
* @default 'single'
|
|
27
|
+
*/
|
|
28
|
+
selectionMode?: ChipGroupSelectionMode;
|
|
29
|
+
/** Size of the Chips.
|
|
30
|
+
* @default 'medium'
|
|
31
|
+
*/
|
|
32
|
+
size?: ChipGroupSize;
|
|
33
|
+
/** Translations for the DSChipGroup. Use our [customization page](/?path=/story/components-chip-group-translations--documentation) for creating custom translations. */
|
|
34
|
+
translations?: ChipGroupAriaTranslations;
|
|
35
|
+
/** Callback function called when the selection of the DSChipGroup changes. */
|
|
36
|
+
onChipsChange?: (chips: Chip[]) => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A component for selecting single or multiple chips, with options for selection (like radio buttons) or removal.
|
|
40
|
+
* Supports different sizes. Use icons sparingly to reduce cognitive load.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DSChipGroup: React.FC<ChipGroupProps>;
|