@stihl-design-system/components 1.0.0-RC.32 → 1.0.0-RC.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion.Dmqocj97.js +12 -0
- package/actionbutton.Du5CT-Mt.js +12 -0
- package/actionlink.BK9CaQUY.js +12 -0
- package/{arialiveregions.Fgcshs5k.js → arialiveregions.BUVY9NpY.js} +2 -2
- package/assets/Accordion.CzBGud45.css +1 -0
- package/assets/Button.CmeGVEAY.css +1 -0
- package/assets/Checkbox.CyOw3rXI.css +1 -0
- package/assets/CustomReactSelect.BihX36Uo.css +1 -0
- package/assets/Dialog.DJkn65Es.css +1 -0
- package/assets/Drawer.x3BCQvWE.css +1 -0
- package/assets/Fieldset.Oqu7pOBv.css +1 -0
- package/assets/InputFile.D7Ihod7B.css +1 -0
- package/assets/InputNumber.z_UqRYdv.css +1 -0
- package/assets/InputPassword.DZENjxJ9.css +1 -0
- package/assets/InputSearch.GBH9Eh6F.css +1 -0
- package/assets/LinkButton.88j5ckLu.css +1 -0
- package/assets/{MegaMenu.DX9gChtY.css → MegaMenu.D5EtjFeL.css} +1 -1
- package/assets/Notification.CvohYEvT.css +1 -0
- package/assets/Select.CL0fqx7X.css +1 -0
- package/assets/Slider.DWLuIsNj.css +1 -0
- package/assets/Stepper.tXJl15yL.css +1 -0
- package/assets/{SystemFeedback.RcrPepSZ.css → SystemFeedback.PKzqnXUe.css} +1 -1
- package/assets/Textarea.B1HOakic.css +1 -0
- package/assets/Toast.CGyKXb4V.css +1 -0
- package/assets/buttonround.DBpMesfr.css +1 -0
- package/assets/input.RPDR8qdT.css +1 -0
- package/assets/step.BeLporJO.css +1 -0
- package/assets/switch.B9B-n_3y.css +1 -0
- package/{asterisk.CR60hx8S.js → asterisk.B2ih8VwF.js} +1 -1
- package/{banner.o4Etkjjo.js → banner.D-RX60nJ.js} +3 -3
- package/breadcrumb.tvMByFgp.js +11 -0
- package/button.CZupaV9L.js +12 -0
- package/buttonround.9IS0tUqw.js +96 -0
- package/checkbox.XYQI-ubx.js +12 -0
- package/checkboxgroup.CjnNJ8e6.js +9 -0
- package/chip.B-pxhsdb.js +12 -0
- package/chipgroup.cGjn4LVV.js +143 -0
- package/chunks/Accordion.CYIfNOWr.js +168 -0
- package/chunks/{ActionButton.DdDesD7K.js → ActionButton.BOYQYo5M.js} +37 -37
- package/chunks/{ActionLink.DqAsPYda.js → ActionLink.BlwvrnPN.js} +36 -36
- package/chunks/{AriaLiveRegions.utils.Cb327d_2.js → AriaLiveRegions.utils.CybNIBSa.js} +2 -2
- package/chunks/{Breadcrumb.9KinNuyQ.js → Breadcrumb.Qr6bDP2N.js} +35 -37
- package/chunks/Button.Cn5yg7dG.js +138 -0
- package/chunks/Checkbox.D5X5T6Yg.js +88 -0
- package/chunks/CheckboxGroup.CUR_0VMc.js +74 -0
- package/chunks/{Chip.BrbYu6i_.js → Chip.DIp5hdRH.js} +6 -6
- package/chunks/{CustomReactSelect.Cqq70QC0.js → CustomReactSelect.BA3hUVkh.js} +897 -878
- package/chunks/Dialog.DRk_jSj5.js +102 -0
- package/chunks/Drawer.Dj6WeUC8.js +107 -0
- package/chunks/Fieldset.C0RzpI-h.js +81 -0
- package/chunks/Header.18sOO0Gf.js +370 -0
- package/chunks/{Icon.NSsVrYeq.js → Icon.CDLyB7Pv.js} +77 -79
- package/chunks/{Input.utils.Cnnzvuk4.js → Input.utils.CL1u4Ctq.js} +30 -28
- package/chunks/InputFile.Bki3bs3U.js +236 -0
- package/chunks/InputNumber.B43cqBH0.js +242 -0
- package/chunks/InputPassword.DcdMjsXr.js +121 -0
- package/chunks/InputSearch.CJm6ph8W.js +149 -0
- package/chunks/LinkButton.C6F-yuLL.js +139 -0
- package/chunks/MegaMenu.qttkjGbD.js +188 -0
- package/chunks/NavigationTabList.G_l0GiUa.js +67 -0
- package/chunks/{NavigationTabs.DspPFHPh.js → NavigationTabs.CQxlahX1.js} +13 -14
- package/chunks/Notification.Qzz88ngL.js +91 -0
- package/chunks/Popover.D7McfVaH.js +214 -0
- package/chunks/RadioGroup.B2VCD9x-.js +106 -0
- package/chunks/Select.B0uMOSSD.js +147 -0
- package/chunks/Slider.YTIktxxD.js +306 -0
- package/chunks/Stepper.BvPmbbqw.js +152 -0
- package/chunks/{SystemFeedback.CyGbUCzT.js → SystemFeedback.CjlARKki.js} +9 -9
- package/chunks/Tabs.CoO_lrhV.js +83 -0
- package/chunks/{Text.DGWeWF1y.js → Text.DpRtTpB4.js} +3 -3
- package/chunks/Textarea.lYiPXerd.js +181 -0
- package/chunks/Toast.L5HAuEOn.js +76 -0
- package/chunks/{arrow-clockwise.BefOjGPg.js → arrow-clockwise.C4iOgjOc.js} +1 -1
- package/chunks/{arrow-counterclockwise.C7Ov32BZ.js → arrow-counterclockwise.CgQAuBUe.js} +1 -1
- package/chunks/{circle-check-colored.Bye_GwLy.js → circle-check-colored.qP2s3vjI.js} +1 -1
- package/chunks/{diamond-exclamationmark-colored.WNKYwZ8q.js → diamond-exclamationmark-colored.CzYiaTZ0.js} +1 -1
- package/chunks/feather.l1E4nFBx.js +10 -0
- package/chunks/file-type-doc.B_RSSYbu.js +10 -0
- package/chunks/floating-ui.react.COTL3jH5.js +2984 -0
- package/chunks/helpers.CexwVao7.js +38 -0
- package/chunks/{index.CgTHIF3K.js → index.D-sRdssb.js} +1 -1
- package/chunks/{index.CEyLAtio.js → index.DL9mof6u.js} +2 -2
- package/chunks/{is-animation-disabled.CUl4N3LI.js → is-animation-disabled.B-V_68K-.js} +5 -5
- package/chunks/{map.CXgG1iGz.js → map.DNl7PF61.js} +1 -1
- package/chunks/moon.5yILPYXs.js +10 -0
- package/chunks/muscle.DbNjWasV.js +10 -0
- package/chunks/petrol.BGWwCsTw.js +10 -0
- package/chunks/sun.CY6ttzTL.js +10 -0
- package/chunks/{triangle-exclamationmark-colored.CbVC3Gzi.js → triangle-exclamationmark-colored.e93zvQ6Q.js} +1 -1
- package/chunks/upload.BogDfonx.js +10 -0
- package/chunks/useBreakpoint.1txsny17.js +45 -0
- package/chunks/variants.-R3_RCW8.js +10 -0
- package/chunks/weight.DUPu2UT0.js +10 -0
- package/combobox.CGEDlMo0.js +71 -0
- package/components/Button/Button.d.ts +5 -0
- package/components/Button/Button.utils.d.ts +4 -5
- package/components/CheckboxGroup/CheckboxGroup.d.ts +14 -1
- package/components/ChipGroup/ChipGroup.utils.d.ts +1 -3
- package/components/Combobox/Combobox.utils.d.ts +6 -6
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +17 -2
- package/components/Fieldset/Fieldset.d.ts +14 -1
- package/components/Input/Input.d.ts +13 -0
- package/components/Input/Input.utils.d.ts +2 -2
- package/components/InputFile/InputFile.d.ts +13 -0
- package/components/InputFile/InputFile.utils.d.ts +4 -2
- package/components/{InputStepper/InputStepper.d.ts → InputNumber/InputNumber.d.ts} +21 -8
- package/components/InputNumber/InputNumber.utils.d.ts +13 -0
- package/components/InputPassword/InputPassword.d.ts +13 -0
- package/components/InputPassword/InputPassword.utils.d.ts +2 -2
- package/components/InputSearch/InputSearch.d.ts +13 -0
- package/components/InputSearch/InputSearch.utils.d.ts +2 -2
- package/components/LinkButton/LinkButton.d.ts +5 -0
- package/components/LinkButton/LinkButton.utils.d.ts +4 -5
- package/components/RadioGroup/RadioGroup.d.ts +13 -0
- package/components/Scroller/Scroller.d.ts +6 -2
- package/components/Select/Select.d.ts +13 -0
- package/components/Select/Select.utils.d.ts +2 -2
- package/components/Slider/Slider.d.ts +13 -0
- package/components/Stepper/Step.d.ts +33 -0
- package/components/Stepper/Step.utils.d.ts +5 -0
- package/components/Stepper/Stepper.d.ts +56 -0
- package/components/Stepper/Stepper.test.d.ts +1 -0
- package/components/Stepper/Stepper.utils.d.ts +30 -0
- package/components/Stepper/Stepper.utils.test.d.ts +1 -0
- package/components/Textarea/Textarea.d.ts +13 -0
- package/components/Textarea/Textarea.utils.d.ts +2 -2
- package/customreactselect.BgYf8rKE.js +15 -0
- package/dialog.Bq-ZyzR8.js +9 -0
- package/drawer.DL5UzLWf.js +9 -0
- package/fieldset.BFLW2D9H.js +12 -0
- package/{filelist.BiKMKCyg.js → filelist.BG6SGVJ8.js} +23 -24
- package/{flag.72PONA83.js → flag.CE32qHPa.js} +3 -3
- package/{floatingactionbutton.B2YChsNU.js → floatingactionbutton.B5hJ2At2.js} +5 -5
- package/header.A77yIAH3.js +12 -0
- package/{heading.BXFBZhKv.js → heading.DHLpT4dc.js} +2 -2
- package/icon.vzkPwgjZ.js +9 -0
- package/index.d.ts +4 -2
- package/index.es.js +218 -206
- package/input.hBWqQr3X.js +190 -0
- package/inputfile.BSZuRujU.js +18 -0
- package/inputnumber.CA4JiUmq.js +17 -0
- package/inputnumber.d.ts +2 -0
- package/inputpassword.Cju_crMi.js +13 -0
- package/inputsearch.CU9AhVVv.js +15 -0
- package/{link.DbnvsD3j.js → link.DoiK003-.js} +5 -5
- package/linkbutton.CWco_B7v.js +12 -0
- package/{logo.C96KaG1P.js → logo.DprmD8HU.js} +3 -3
- package/{logo100years.BcB6_c-o.js → logo100years.DDzCrczW.js} +11 -11
- package/megamenu.BurL9MfF.js +12 -0
- package/navigationtablist.CkkLyHrM.js +10 -0
- package/navigationtabs.zhRZHjgs.js +9 -0
- package/notification.BiXdWNo7.js +10 -0
- package/{numberindicator.Ddf3ESi7.js → numberindicator.BdnPMogE.js} +2 -2
- package/{optioncheckbox.DqfXuPdi.js → optioncheckbox.nBVwGv6c.js} +3 -3
- package/package.json +42 -50
- package/partials/index.js +54 -48
- package/partials/lib/partials.d.ts +1 -1
- package/popover.79Voiadz.js +12 -0
- package/{radio.7_N_alaS.js → radio.DHUfSPai.js} +2 -2
- package/radiogroup.CwBh7u9L.js +11 -0
- package/scroller.IpfbFV8B.js +98 -0
- package/select.NHaEtX_u.js +14 -0
- package/{skiptocontent.BSCde5hT.js → skiptocontent.X4USTODk.js} +4 -4
- package/slider.jnNGEyBq.js +12 -0
- package/{spinner.BUjhjAvw.js → spinner.C9qCeq0R.js} +18 -18
- package/step.D5p7qppy.js +82 -0
- package/step.d.ts +6 -0
- package/stepper.DnMc4ex6.js +16 -0
- package/stepper.d.ts +2 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +12 -3
- package/styles/scss/ds/lib/ds-internal/_link-button.scss +10 -2
- package/styles/scss/ds/lib/link-button.scss +11 -3
- package/{switch.D7BCfyyZ.js → switch.Bqdyzi2E.js} +5 -5
- package/systemfeedback.O7tj1juR.js +10 -0
- package/tablist.BFE6RAPD.js +209 -0
- package/{tabpane.CB-eudyw.js → tabpane.C4nsUlwc.js} +2 -2
- package/tabs.CsOxxQyQ.js +11 -0
- package/text.cLv2PhjQ.js +10 -0
- package/textarea.C9OAAjhG.js +14 -0
- package/{title.Bz_k5Vda.js → title.DuLPB-VK.js} +2 -2
- package/toast.OBI9qnAM.js +11 -0
- package/toastmanager.CgsA-1y_.js +89 -0
- package/tooltip.Cj3AvYgB.js +177 -0
- package/topbar.CAujTZAE.js +12 -0
- package/types/icon-types.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/mergeRefs.d.ts +5 -0
- package/utils/mergeRefs.test.d.ts +1 -0
- package/utils/useIsomorphicLayoutEffect.d.ts +2 -2
- package/accordion.HfUSDwQJ.js +0 -12
- package/actionbutton.kgd0E_xF.js +0 -12
- package/actionlink.CwC42RWc.js +0 -12
- package/assets/Accordion.BJb4TOG0.css +0 -1
- package/assets/Button.Dw8H5nFS.css +0 -1
- package/assets/Checkbox.BKHQN_tu.css +0 -1
- package/assets/CustomReactSelect.DGIItWIh.css +0 -1
- package/assets/Dialog.CGAg7bnN.css +0 -1
- package/assets/Drawer.VOvWQoEr.css +0 -1
- package/assets/Fieldset.CW9dBvAo.css +0 -1
- package/assets/InputFile.CCQxsulT.css +0 -1
- package/assets/InputPassword.124xVOiO.css +0 -1
- package/assets/InputSearch.Bkg-1urJ.css +0 -1
- package/assets/InputStepper.DvFJk1Mi.css +0 -1
- package/assets/LinkButton.xMvg_ojf.css +0 -1
- package/assets/Notification.BOuaA5GT.css +0 -1
- package/assets/Select.C1gWF32A.css +0 -1
- package/assets/Slider.Bidyhb-B.css +0 -1
- package/assets/Textarea.Dq4rH9Tg.css +0 -1
- package/assets/Toast.CJ1zhDIT.css +0 -1
- package/assets/buttonround.Cw9hnUan.css +0 -1
- package/assets/input.CUjGh-UM.css +0 -1
- package/assets/switch.Bc9KIyw9.css +0 -1
- package/breadcrumb.BsQm0kUD.js +0 -11
- package/button.Dyy6ajX6.js +0 -13
- package/buttonround.ChKWHzsv.js +0 -96
- package/checkbox.BNnp4ztM.js +0 -12
- package/checkboxgroup.BTVnKenc.js +0 -9
- package/chip.C7NstOHt.js +0 -12
- package/chipgroup.Zo1-IOCn.js +0 -210
- package/chunks/Accordion.CnqryAUu.js +0 -170
- package/chunks/Button.Cf1CKq8N.js +0 -142
- package/chunks/Checkbox.CiwriItT.js +0 -88
- package/chunks/CheckboxGroup.Cj68J6Ee.js +0 -72
- package/chunks/Dialog.Bv7k55He.js +0 -135
- package/chunks/Drawer.BVTvx276.js +0 -140
- package/chunks/Fieldset.D7cLR5ze.js +0 -74
- package/chunks/Header.um5MlziB.js +0 -377
- package/chunks/InputFile.bVWWdePn.js +0 -220
- package/chunks/InputPassword.Da3hEKTc.js +0 -136
- package/chunks/InputSearch.GOYqFCcZ.js +0 -174
- package/chunks/InputStepper.BuhPtfl-.js +0 -268
- package/chunks/LinkButton.59oNDwPU.js +0 -132
- package/chunks/MegaMenu._o3nNDAa.js +0 -192
- package/chunks/NavigationTabList.DuT7gzhj.js +0 -57
- package/chunks/Notification.Pts2oh0R.js +0 -92
- package/chunks/Popover.BRR8YZ-P.js +0 -228
- package/chunks/RadioGroup.DeTz3c19.js +0 -104
- package/chunks/Select.D2ehd4yN.js +0 -162
- package/chunks/Slider.84lkgq3W.js +0 -292
- package/chunks/Tabs.C8ADTzJ0.js +0 -83
- package/chunks/Textarea.Cw85sxHL.js +0 -163
- package/chunks/Toast.DG3WVvau.js +0 -76
- package/chunks/file-type-doc.DlovDOBh.js +0 -10
- package/chunks/floating-ui.dom.VgHc0h4l.js +0 -989
- package/chunks/floating-ui.react.DCyAzlZ4.js +0 -2011
- package/chunks/helpers.BbWkXTr3.js +0 -37
- package/chunks/petrol.Du6qAgp0.js +0 -10
- package/chunks/upload.ZImTAIgx.js +0 -10
- package/chunks/useBreakpoint.CMOR9ZOB.js +0 -44
- package/combobox.orZ3z8CB.js +0 -60
- package/components/InputStepper/InputStepper.utils.d.ts +0 -13
- package/customreactselect.Np-RpzvU.js +0 -14
- package/dialog.D4rcbW6A.js +0 -10
- package/drawer.BCCB3Rkj.js +0 -10
- package/fieldset.ZLs9IGpE.js +0 -11
- package/header.DUbn3BZt.js +0 -12
- package/icon.CHVAZr5T.js +0 -9
- package/input.DG20x6gh.js +0 -203
- package/inputfile.Dc56lQ4t.js +0 -17
- package/inputpassword.znFHRLsI.js +0 -13
- package/inputsearch.B1G6rfVk.js +0 -14
- package/inputstepper.d.ts +0 -2
- package/inputstepper.o6rdM_CW.js +0 -16
- package/linkbutton.DU8Ih8ZF.js +0 -12
- package/megamenu.CPH8EeFF.js +0 -12
- package/navigationtablist.C0iwsAad.js +0 -9
- package/navigationtabs.JjJtbuUe.js +0 -9
- package/notification.Ds_Q7ifk.js +0 -10
- package/popover.B72W0OvU.js +0 -12
- package/radiogroup.C_3IcNBq.js +0 -11
- package/scroller.CQxmQU6U.js +0 -123
- package/select.Ceyt-zvu.js +0 -13
- package/slider.Dq2dcziy.js +0 -11
- package/systemfeedback.CSdWOWuf.js +0 -10
- package/tablist.V7DBklhE.js +0 -256
- package/tabs.DQNLPAEN.js +0 -11
- package/text.ZOUuesnU.js +0 -10
- package/textarea.CixKeQBp.js +0 -13
- package/toast.D8QprMCa.js +0 -11
- package/toastmanager.BSVjYsg9.js +0 -116
- package/tooltip.CUCSRXd3.js +0 -191
- package/topbar.CVhJy-Br.js +0 -12
- /package/components/{InputStepper/InputStepper.test.d.ts → InputNumber/InputNumber.test.d.ts} +0 -0
- /package/components/{InputStepper/InputStepper.utils.test.d.ts → InputNumber/InputNumber.utils.test.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { BreakpointCustomizable } from '../../types';
|
|
3
3
|
import { InputSize } from '../Input/Input.utils';
|
|
4
|
-
export interface
|
|
4
|
+
export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'size' | 'value'> {
|
|
5
5
|
/** Unique id for the input. */
|
|
6
6
|
id: string;
|
|
7
7
|
/** Label text displayed above the input. */
|
|
@@ -61,8 +61,25 @@ export interface InputStepperProps extends Omit<InputHTMLAttributes<HTMLInputEle
|
|
|
61
61
|
* @default 0
|
|
62
62
|
*/
|
|
63
63
|
min?: number | string;
|
|
64
|
+
/** The interval between legal numbers of the input.
|
|
65
|
+
* @default 1
|
|
66
|
+
*/
|
|
67
|
+
step?: number | string;
|
|
64
68
|
/** Text displayed as a prefix inside the input, maximum 8 characters. */
|
|
65
69
|
prefix?: string;
|
|
70
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
71
|
+
popoverContent?: React.ReactNode;
|
|
72
|
+
/** Popover info button props:
|
|
73
|
+
*
|
|
74
|
+
* `data-*`: Custom data attributes.
|
|
75
|
+
*
|
|
76
|
+
* `label`: Accessibility label for the default anchor button.
|
|
77
|
+
* (default) 'Toggle popover'
|
|
78
|
+
*/
|
|
79
|
+
popoverInfoButtonProps?: {
|
|
80
|
+
[key: `data-${string}`]: string | undefined;
|
|
81
|
+
label?: string;
|
|
82
|
+
};
|
|
66
83
|
/** Enables the readonly state of the input.
|
|
67
84
|
* @default false
|
|
68
85
|
*/
|
|
@@ -71,10 +88,6 @@ export interface InputStepperProps extends Omit<InputHTMLAttributes<HTMLInputEle
|
|
|
71
88
|
* @default false
|
|
72
89
|
*/
|
|
73
90
|
required?: boolean;
|
|
74
|
-
/** The interval between legal numbers of the input.
|
|
75
|
-
* @default 1
|
|
76
|
-
*/
|
|
77
|
-
step?: number | string;
|
|
78
91
|
/** Text displayed as a suffix inside the input, maximum 5 characters. */
|
|
79
92
|
suffix?: string;
|
|
80
93
|
/** Defines a system feedback message, shown when `invalid={true}`. */
|
|
@@ -87,11 +100,11 @@ export interface InputStepperProps extends Omit<InputHTMLAttributes<HTMLInputEle
|
|
|
87
100
|
value?: InputHTMLAttributes<HTMLInputElement>['value'];
|
|
88
101
|
}
|
|
89
102
|
/**
|
|
90
|
-
* The `<
|
|
103
|
+
* The `<DSInputNumber />` component is a versatile input field that allows users to easily enter a value and decrease or increase it as needed.
|
|
91
104
|
* It comes in two sizes (medium & small) and supports various customizations including a prefix and suffix.
|
|
92
105
|
*
|
|
93
106
|
* Next to the input field, there are two buttons to increase or decrease the input value.
|
|
94
107
|
*
|
|
95
|
-
* Design in Figma: [Input
|
|
108
|
+
* Design in Figma: [Input Number](https://www.figma.com/design/qXldpLO6gxHJNLdcXIPxYt/Core-Components-%F0%9F%92%A0?node-id=2141-6769&t=UBsmFURFENnuYSW1-11)
|
|
96
109
|
*/
|
|
97
|
-
export declare const
|
|
110
|
+
export declare const DSInputNumber: import('react').ForwardRefExoticComponent<InputNumberProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InputNumberProps } from './InputNumber';
|
|
2
|
+
type ValidationProps = Pick<InputNumberProps, 'id' | 'label' | 'prefix' | 'suffix' | 'hideLabel' | 'popoverContent'>;
|
|
3
|
+
export declare const isValidValue: (value: string | number | readonly string[] | undefined | null) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Validates the given properties of the DSInputNumber component for common configuration errors.
|
|
6
|
+
* This function is intended to be used in development mode to provide developers with
|
|
7
|
+
* warnings about potential misuse of the component.
|
|
8
|
+
*
|
|
9
|
+
* @param validationProps - The subset of DSInputNumber properties to validate. This includes
|
|
10
|
+
* properties related to the prefix, suffix, icons and action button of the input.
|
|
11
|
+
*/
|
|
12
|
+
export declare const validateInputNumberProps: ({ id, label, prefix, suffix, hideLabel, popoverContent, }: ValidationProps) => void;
|
|
13
|
+
export {};
|
|
@@ -25,6 +25,19 @@ export interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
25
25
|
* @default false
|
|
26
26
|
*/
|
|
27
27
|
invalid?: boolean;
|
|
28
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
29
|
+
popoverContent?: React.ReactNode;
|
|
30
|
+
/** Popover info button props:
|
|
31
|
+
*
|
|
32
|
+
* `data-*`: Custom data attributes.
|
|
33
|
+
*
|
|
34
|
+
* `label`: Accessibility label for the default anchor button.
|
|
35
|
+
* (default) 'Toggle popover'
|
|
36
|
+
*/
|
|
37
|
+
popoverInfoButtonProps?: {
|
|
38
|
+
[key: `data-${string}`]: string | undefined;
|
|
39
|
+
label?: string;
|
|
40
|
+
};
|
|
28
41
|
/** Enables the readonly state of the input.
|
|
29
42
|
* @default false
|
|
30
43
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputPasswordProps } from './InputPassword';
|
|
2
|
-
type ValidationProps = Pick<InputPasswordProps, 'id' | 'label'>;
|
|
2
|
+
type ValidationProps = Pick<InputPasswordProps, 'id' | 'label' | 'hideLabel' | 'popoverContent'>;
|
|
3
3
|
/**
|
|
4
4
|
* Validates the given properties of the DSInputPassword component for common configuration errors.
|
|
5
5
|
* This function is intended to be used in development mode to provide developers with
|
|
@@ -8,5 +8,5 @@ type ValidationProps = Pick<InputPasswordProps, 'id' | 'label'>;
|
|
|
8
8
|
* @param validationProps - The subset of DSInputPassword properties to validate. This includes
|
|
9
9
|
* id and label.
|
|
10
10
|
*/
|
|
11
|
-
export declare const validateInputPasswordProps: ({ id, label }: ValidationProps) => void;
|
|
11
|
+
export declare const validateInputPasswordProps: ({ id, label, hideLabel, popoverContent, }: ValidationProps) => void;
|
|
12
12
|
export {};
|
|
@@ -25,6 +25,19 @@ export interface InputSearchProps extends Omit<InputHTMLAttributes<HTMLInputElem
|
|
|
25
25
|
* @default false
|
|
26
26
|
*/
|
|
27
27
|
invalid?: boolean;
|
|
28
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
29
|
+
popoverContent?: React.ReactNode;
|
|
30
|
+
/** Popover info button props:
|
|
31
|
+
*
|
|
32
|
+
* `data-*`: Custom data attributes.
|
|
33
|
+
*
|
|
34
|
+
* `label`: Accessibility label for the default anchor button.
|
|
35
|
+
* (default) 'Toggle popover'
|
|
36
|
+
*/
|
|
37
|
+
popoverInfoButtonProps?: {
|
|
38
|
+
[key: `data-${string}`]: string | undefined;
|
|
39
|
+
label?: string;
|
|
40
|
+
};
|
|
28
41
|
/** Enables the readonly state of the input.
|
|
29
42
|
* @default false
|
|
30
43
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputSearchProps } from './InputSearch';
|
|
2
|
-
type ValidationProps = Pick<InputSearchProps, 'id' | 'label'>;
|
|
2
|
+
type ValidationProps = Pick<InputSearchProps, 'id' | 'label' | 'hideLabel' | 'popoverContent'>;
|
|
3
3
|
/**
|
|
4
4
|
* Validates the given properties of the DSInputSearch component for common configuration errors.
|
|
5
5
|
* This function is intended to be used in development mode to provide developers with
|
|
@@ -8,7 +8,7 @@ type ValidationProps = Pick<InputSearchProps, 'id' | 'label'>;
|
|
|
8
8
|
* @param validationProps - The subset of DSInputSearch properties to validate. This includes
|
|
9
9
|
* id and label.
|
|
10
10
|
*/
|
|
11
|
-
export declare const validateInputSearchProps: ({ id, label }: ValidationProps) => void;
|
|
11
|
+
export declare const validateInputSearchProps: ({ id, label, hideLabel, popoverContent, }: ValidationProps) => void;
|
|
12
12
|
/**
|
|
13
13
|
* Determines whether the specified HTMLElement is within a form element.
|
|
14
14
|
*
|
|
@@ -53,6 +53,11 @@ export interface LinkButtonProps extends CommonLinkProps {
|
|
|
53
53
|
* @default 'medium'
|
|
54
54
|
*/
|
|
55
55
|
size?: LinkButtonSize;
|
|
56
|
+
/** Stretches the link over the parent's width.
|
|
57
|
+
* `boolean | { base: boolean; s?: boolean; m?: boolean; l?: boolean; xl?: boolean; }`
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
stretched?: BreakpointCustomizable<boolean>;
|
|
56
61
|
/** Visual style variant of the link.
|
|
57
62
|
* @default 'filled'
|
|
58
63
|
*/
|
|
@@ -7,19 +7,18 @@ export type LinkButtonIconPosition = 'left' | 'right';
|
|
|
7
7
|
export type LinkButtonRel = 'alternate' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'next' | 'nofollow' | 'noreferrer' | 'noopener' | 'prev' | 'search' | 'tag';
|
|
8
8
|
export type LinkButtonReferrerPolicy = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
9
9
|
export type LinkButtonAriaAttribute = 'aria-label' | 'aria-current' | 'aria-labelledby';
|
|
10
|
-
type ValidationProps = Pick<LinkButtonProps, '
|
|
10
|
+
type ValidationProps = Pick<LinkButtonProps, 'hideLabel' | 'iconName' | 'iconSource' | 'isFlush' | 'size' | 'stretched' | 'theme' | 'variant'>;
|
|
11
11
|
/**
|
|
12
12
|
* Performs runtime validation on a subset of `DSLinkButton` props to detect
|
|
13
13
|
* misconfigurations during development.
|
|
14
14
|
*
|
|
15
|
-
* This function provides warnings or throws errors when invalid combinations
|
|
16
|
-
* of `variant`, `size`, or `theme` are detected—particularly for the `navigation` variant.
|
|
15
|
+
* This function provides warnings or throws errors when invalid combinations of props occur.
|
|
17
16
|
*
|
|
18
17
|
* Intended for development use only; should not be used in production environments.
|
|
19
18
|
*
|
|
20
|
-
* @param validationProps - An object containing the
|
|
19
|
+
* @param validationProps - An object containing the props to validate
|
|
21
20
|
* from the `DSLinkButton` component. These are validated to ensure
|
|
22
21
|
* they are used in supported combinations.
|
|
23
22
|
*/
|
|
24
|
-
export declare const validateLinkButtonProps: ({
|
|
23
|
+
export declare const validateLinkButtonProps: ({ hideLabel, iconName, iconSource, isFlush, size, stretched, theme, variant, }: ValidationProps) => void;
|
|
25
24
|
export {};
|
|
@@ -45,6 +45,19 @@ export interface RadioGroupProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSe
|
|
|
45
45
|
* @default false
|
|
46
46
|
*/
|
|
47
47
|
invalid?: boolean;
|
|
48
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
49
|
+
popoverContent?: React.ReactNode;
|
|
50
|
+
/** Popover info button props:
|
|
51
|
+
*
|
|
52
|
+
* `data-*`: Custom data attributes.
|
|
53
|
+
*
|
|
54
|
+
* `label`: Accessibility label for the default anchor button.
|
|
55
|
+
* (default) 'Toggle popover'
|
|
56
|
+
*/
|
|
57
|
+
popoverInfoButtonProps?: {
|
|
58
|
+
[key: `data-${string}`]: string | undefined;
|
|
59
|
+
label?: string;
|
|
60
|
+
};
|
|
48
61
|
/** Marks the radio group as required.
|
|
49
62
|
* When this property is set, an asterisk (*) is automatically appended to the radio group's legend.
|
|
50
63
|
* @default false
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { HTMLAttributes
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
2
|
export interface ScrollerProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
/** Content to be displayed within the scroller. */
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
+
/** Additional class name to apply to the scrolling element. */
|
|
6
|
+
scrollerClassName?: string;
|
|
7
|
+
/** Additional class name to apply to the scroll buttons. */
|
|
8
|
+
scrollerButtonClassName?: string;
|
|
5
9
|
/** Scrolls the scroll area to the left either smooth or immediately.
|
|
6
10
|
* `{scrollPosition: number;`
|
|
7
11
|
* `isSmooth?: boolean;}`
|
|
@@ -17,4 +21,4 @@ export interface ScrollerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
21
|
*
|
|
18
22
|
* Design in Figma: [Scroller](https://www.figma.com/design/Ie2r0R9QwjEc7O3nrFbXhV/Web-Pattern-Library?node-id=6263-49213&t=wRBNgx5siTv3aUkL-11)
|
|
19
23
|
*/
|
|
20
|
-
export declare const DSScroller: (
|
|
24
|
+
export declare const DSScroller: import('react').ForwardRefExoticComponent<ScrollerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -28,6 +28,19 @@ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement
|
|
|
28
28
|
* @default false
|
|
29
29
|
*/
|
|
30
30
|
invalid?: boolean;
|
|
31
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
32
|
+
popoverContent?: React.ReactNode;
|
|
33
|
+
/** Popover info button props:
|
|
34
|
+
*
|
|
35
|
+
* `data-*`: Custom data attributes.
|
|
36
|
+
*
|
|
37
|
+
* `label`: Accessibility label for the default anchor button.
|
|
38
|
+
* (default) 'Toggle popover'
|
|
39
|
+
*/
|
|
40
|
+
popoverInfoButtonProps?: {
|
|
41
|
+
[key: `data-${string}`]: string | undefined;
|
|
42
|
+
label?: string;
|
|
43
|
+
};
|
|
31
44
|
/** Modifies the empty option label to ensure a conscious choice.
|
|
32
45
|
* @default 'Select'
|
|
33
46
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { GroupBase, OptionsOrGroups } from 'react-select';
|
|
3
3
|
import { SelectProps } from './Select';
|
|
4
|
-
type ValidationProps = Pick<SelectProps, 'id' | 'label' | 'options'>;
|
|
4
|
+
type ValidationProps = Pick<SelectProps, 'id' | 'label' | 'options' | 'hideLabel' | 'popoverContent'>;
|
|
5
5
|
export interface SelectOption extends HTMLAttributes<HTMLOptionElement> {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string | number;
|
|
@@ -19,7 +19,7 @@ export type SelectSize = (typeof SELECT_SIZE)[number];
|
|
|
19
19
|
* @param validationProps - The subset of DSSelect properties to validate. This includes
|
|
20
20
|
* id and label.
|
|
21
21
|
*/
|
|
22
|
-
export declare const validateSelectProps: ({ id, label, options, }: ValidationProps) => void;
|
|
22
|
+
export declare const validateSelectProps: ({ id, label, options, hideLabel, popoverContent, }: ValidationProps) => void;
|
|
23
23
|
/**
|
|
24
24
|
* Determines the initial visibility of the placeholder based on the `placeholder` string and
|
|
25
25
|
* the values of `defaultValue` and `value` from the props.
|
|
@@ -51,6 +51,19 @@ export interface SliderProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
51
51
|
suffix?: string;
|
|
52
52
|
size?: InputSize;
|
|
53
53
|
};
|
|
54
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
55
|
+
popoverContent?: React.ReactNode;
|
|
56
|
+
/** Popover info button props:
|
|
57
|
+
*
|
|
58
|
+
* `data-*`: Custom data attributes.
|
|
59
|
+
*
|
|
60
|
+
* `label`: Accessibility label for the default anchor button.
|
|
61
|
+
* (default) 'Toggle popover'
|
|
62
|
+
*/
|
|
63
|
+
popoverInfoButtonProps?: {
|
|
64
|
+
[key: `data-${string}`]: string | undefined;
|
|
65
|
+
label?: string;
|
|
66
|
+
};
|
|
54
67
|
}
|
|
55
68
|
/**
|
|
56
69
|
* The `<DSSlider />` component is a flexible range input that allows users to select a value within a defined range.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React, JSX } from 'react';
|
|
2
|
+
import { StepState } from './Step.utils';
|
|
3
|
+
import { StepperTranslations } from './Stepper.utils';
|
|
4
|
+
/** Local copy of the Step data contract to avoid circular dependency with `Stepper.tsx`. */
|
|
5
|
+
export interface Step {
|
|
6
|
+
label: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
state?: StepState;
|
|
10
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface StepperStepProps {
|
|
13
|
+
/** Step object */
|
|
14
|
+
step: Step;
|
|
15
|
+
/** Index of this step in the list */
|
|
16
|
+
index: number;
|
|
17
|
+
/** Orientation of the Stepper */
|
|
18
|
+
orientation: 'horizontal' | 'vertical';
|
|
19
|
+
/** Total number of steps */
|
|
20
|
+
stepsCount: number;
|
|
21
|
+
/** Translation function */
|
|
22
|
+
t: (key: keyof StepperTranslations, replacements?: string[]) => string;
|
|
23
|
+
/** Called when the button is clicked (index is already bound in parent) */
|
|
24
|
+
onStepClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
25
|
+
/** Collect the ref for scroll / focus management */
|
|
26
|
+
buttonRef?: (el: HTMLButtonElement | null) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Presentational single Step inside the DSStepper.
|
|
30
|
+
* Keeps the markup & ARIA logic isolated from the Stepper container.
|
|
31
|
+
*/
|
|
32
|
+
export declare const StepperStep: ({ step, index, stepsCount, t, onStepClick, buttonRef, orientation, }: StepperStepProps) => JSX.Element;
|
|
33
|
+
export default StepperStep;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Step } from './Step';
|
|
2
|
+
import { StepperTranslations } from './Stepper.utils';
|
|
3
|
+
export declare const STEP_STATE: readonly ["current", "completed", undefined];
|
|
4
|
+
export type StepState = (typeof STEP_STATE)[number];
|
|
5
|
+
export declare const getStepAriaLabel: (t: (key: keyof StepperTranslations, replacements?: string[]) => string, index: number, total: number, step: Step, isCurrent: boolean) => string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { default as React, JSX } from 'react';
|
|
2
|
+
import { SelectedAriaAttributes } from '../../types';
|
|
3
|
+
import { StepState } from './Step.utils';
|
|
4
|
+
import { StepperAlignment, StepperAriaAttributes, StepperLanguage, StepperOrientation, StepperTranslations } from './Stepper.utils';
|
|
5
|
+
export interface Step {
|
|
6
|
+
/** Label text displayed for the Step. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Short descriptive text displayed beneath the label. */
|
|
9
|
+
hint?: string;
|
|
10
|
+
/** Disables the Step, preventing user interaction.
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* State of the Step. If set to 'current', the step is highlighted as the current step.
|
|
16
|
+
* @default undefined
|
|
17
|
+
*/
|
|
18
|
+
state?: StepState;
|
|
19
|
+
/** Callback function called when the Step is clicked. */
|
|
20
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface StepperProps extends React.HTMLAttributes<HTMLElement> {
|
|
23
|
+
/** ARIA attributes to enhance accessibility
|
|
24
|
+
* `{'aria-label'? string;`
|
|
25
|
+
* `'aria-labelledby'?: string;}`
|
|
26
|
+
* */
|
|
27
|
+
aria: SelectedAriaAttributes<StepperAriaAttributes>;
|
|
28
|
+
/** An array of Step Objects containing the label and other optional parameters.
|
|
29
|
+
* `{label: string; hint: string; disabled?: boolean; state?: 'current' | 'completed' | undefined; onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;}[]`*/
|
|
30
|
+
steps: Step[];
|
|
31
|
+
/** Callback function called when the selection of the Stepper changes. */
|
|
32
|
+
onStepChange: (selectedStepIndex: number) => void;
|
|
33
|
+
/** Alignment of the DSStepper.
|
|
34
|
+
* @default 'left'
|
|
35
|
+
*/
|
|
36
|
+
alignment?: StepperAlignment;
|
|
37
|
+
/** Sets language to use for the screen reader messages, if no translations object is provided.
|
|
38
|
+
* @default 'en'
|
|
39
|
+
*/
|
|
40
|
+
lang?: StepperLanguage;
|
|
41
|
+
/** Orientation of the DSStepper.
|
|
42
|
+
* @default 'horizontal'
|
|
43
|
+
*/
|
|
44
|
+
orientation?: StepperOrientation;
|
|
45
|
+
/** Translations for the DSStepper. Use our [customization page](/?path=/story/components-stepper-translations--documentation) for creating custom translations. */
|
|
46
|
+
translations?: StepperTranslations;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The `<DSStepper />` component provides an accessible step-based navigation pattern following the `aria-current="step"` specification.
|
|
50
|
+
* It is a **controlled component** and does not manage its own state.
|
|
51
|
+
* It renders steps as buttons inside an ordered list (`<ol>`) wrapped in a semantic `<nav>` landmark.
|
|
52
|
+
* Horizontal overflow is handled via `<DSScroller>` preventing line wrapping while enabling keyboard and pointer based scrolling.
|
|
53
|
+
*
|
|
54
|
+
* Design in Figma: [Stepper](https://www.figma.com/design/qXldpLO6gxHJNLdcXIPxYt/Core-Components-%F0%9F%92%A0?node-id=26075-10497)
|
|
55
|
+
*/
|
|
56
|
+
export declare const DSStepper: ({ aria, className, steps, orientation, alignment, lang, translations, onStepChange, ...rest }: StepperProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Step } from './Step';
|
|
2
|
+
import { StepperProps } from './Stepper';
|
|
3
|
+
export type StepperAriaAttributes = 'aria-label' | 'aria-labelledby';
|
|
4
|
+
export declare const STEPPER_ALIGNMENT: readonly ["left", "center"];
|
|
5
|
+
export type StepperAlignment = (typeof STEPPER_ALIGNMENT)[number];
|
|
6
|
+
export declare const STEPPER_ORIENTATION: readonly ["horizontal", "vertical"];
|
|
7
|
+
export type StepperOrientation = (typeof STEPPER_ORIENTATION)[number];
|
|
8
|
+
export type ValidateStepperPropsParams = Pick<StepperProps, 'aria' | 'steps'>;
|
|
9
|
+
export declare const validateStepperProps: ({ aria, steps, }: ValidateStepperPropsParams) => void;
|
|
10
|
+
export declare const validateIsLiveRegionPresentForStepper: () => void;
|
|
11
|
+
export type StepperLanguage = 'en' | 'de';
|
|
12
|
+
export type StepperTranslations = typeof DS_STEPPER_TRANSLATIONS_EN;
|
|
13
|
+
export declare const DS_STEPPER_TRANSLATIONS_EN: {
|
|
14
|
+
current: string;
|
|
15
|
+
completed: string;
|
|
16
|
+
step: string;
|
|
17
|
+
of: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const DS_STEPPER_TRANSLATIONS_DE: StepperTranslations;
|
|
20
|
+
export declare const DS_STEPPER_TRANSLATIONS: Record<StepperLanguage, StepperTranslations>;
|
|
21
|
+
/**
|
|
22
|
+
* Get the current step in the stepper.
|
|
23
|
+
* If no step is marked as 'current', the last step with a defined state is returned.
|
|
24
|
+
* If no steps have a defined state, the first step is returned.
|
|
25
|
+
* @param steps The array of steps.
|
|
26
|
+
* @returns The current step.
|
|
27
|
+
*/
|
|
28
|
+
export declare const getCurrentStep: (steps: Step[]) => Step;
|
|
29
|
+
export declare const getCurrentStepIndex: (steps: Step[]) => number;
|
|
30
|
+
export declare const isStepClickable: (state: Step["state"], disabled: boolean | undefined) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -31,6 +31,19 @@ export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaE
|
|
|
31
31
|
invalid?: boolean;
|
|
32
32
|
/** Maximum length of the textarea value - if set, a character counter is visible beneath the textarea. */
|
|
33
33
|
maxLength?: number;
|
|
34
|
+
/** Shows an info button next to the label that triggers a popover with the passed content. */
|
|
35
|
+
popoverContent?: React.ReactNode;
|
|
36
|
+
/** Popover info button props:
|
|
37
|
+
*
|
|
38
|
+
* `data-*`: Custom data attributes.
|
|
39
|
+
*
|
|
40
|
+
* `label`: Accessibility label for the default anchor button.
|
|
41
|
+
* (default) 'Toggle popover'
|
|
42
|
+
*/
|
|
43
|
+
popoverInfoButtonProps?: {
|
|
44
|
+
[key: `data-${string}`]: string | undefined;
|
|
45
|
+
label?: string;
|
|
46
|
+
};
|
|
34
47
|
/** Enables the readonly state of the textarea.
|
|
35
48
|
* @default false
|
|
36
49
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextareaProps } from './Textarea';
|
|
2
2
|
export declare const TEXTAREA_SIZE: readonly ["medium", "small"];
|
|
3
3
|
export type TextareaSize = (typeof TEXTAREA_SIZE)[number];
|
|
4
|
-
type ValidationProps = Pick<TextareaProps, 'id' | 'label'>;
|
|
4
|
+
type ValidationProps = Pick<TextareaProps, 'id' | 'label' | 'hideLabel' | 'popoverContent'>;
|
|
5
5
|
/**
|
|
6
6
|
* Validates the given properties of the DSTextarea component for common configuration errors.
|
|
7
7
|
* This function is intended to be used in development mode to provide developers with
|
|
@@ -9,5 +9,5 @@ type ValidationProps = Pick<TextareaProps, 'id' | 'label'>;
|
|
|
9
9
|
*
|
|
10
10
|
* @param validationProps - The subset of DSTextarea properties to validate.
|
|
11
11
|
*/
|
|
12
|
-
export declare const validateTextareaProps: ({ id, label }: ValidationProps) => void;
|
|
12
|
+
export declare const validateTextareaProps: ({ id, label, hideLabel, popoverContent, }: ValidationProps) => void;
|
|
13
13
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "./chunks/index.D-sRdssb.js";
|
|
4
|
+
import "./chunks/index.DL9mof6u.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { c as f } from "./chunks/CustomReactSelect.BA3hUVkh.js";
|
|
7
|
+
import "./chunks/useBreakpoint.1txsny17.js";
|
|
8
|
+
import "./asterisk.B2ih8VwF.js";
|
|
9
|
+
import "./chunks/Icon.CDLyB7Pv.js";
|
|
10
|
+
import "./chunks/Popover.D7McfVaH.js";
|
|
11
|
+
import "./chunks/SystemFeedback.CjlARKki.js";
|
|
12
|
+
import "./optioncheckbox.nBVwGv6c.js";
|
|
13
|
+
export {
|
|
14
|
+
f as CustomReactSelect
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "./chunks/index.DL9mof6u.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./asterisk.B2ih8VwF.js";
|
|
6
|
+
import "./heading.DHLpT4dc.js";
|
|
7
|
+
import "./chunks/Popover.D7McfVaH.js";
|
|
8
|
+
import "./chunks/SystemFeedback.CjlARKki.js";
|
|
9
|
+
import { D } from "./chunks/Fieldset.C0RzpI-h.js";
|
|
10
|
+
export {
|
|
11
|
+
D as DSFieldset
|
|
12
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as o, jsxs as
|
|
3
|
-
import { d as P } from "./chunks/index.
|
|
4
|
-
import { D as k } from "./chunks/Button.
|
|
5
|
-
import { D as u } from "./chunks/Icon.
|
|
6
|
-
import { D as S } from "./chunks/SystemFeedback.
|
|
7
|
-
import { c as j } from "./chunks/index.
|
|
8
|
-
import './assets/filelist.H_wKcSPX.css';const F = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), z = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), y = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), C = /[^\p{L}\d]+/giu,
|
|
9
|
-
function
|
|
2
|
+
import { jsx as o, jsxs as w } from "react/jsx-runtime";
|
|
3
|
+
import { d as P } from "./chunks/index.D-sRdssb.js";
|
|
4
|
+
import { D as k } from "./chunks/Button.Cn5yg7dG.js";
|
|
5
|
+
import { D as u } from "./chunks/Icon.CDLyB7Pv.js";
|
|
6
|
+
import { D as S } from "./chunks/SystemFeedback.CjlARKki.js";
|
|
7
|
+
import { c as j } from "./chunks/index.DL9mof6u.js";
|
|
8
|
+
import './assets/filelist.H_wKcSPX.css';const F = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), z = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), y = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), C = /[^\p{L}\d]+/giu, I = "$1\0$2", E = "";
|
|
9
|
+
function N(t) {
|
|
10
10
|
let e = t.trim();
|
|
11
|
-
e = e.replace(F,
|
|
11
|
+
e = e.replace(F, I).replace(z, I), e = e.replace(C, "\0");
|
|
12
12
|
let a = 0, s = e.length;
|
|
13
13
|
for (; e.charAt(a) === "\0"; )
|
|
14
14
|
a++;
|
|
@@ -19,7 +19,7 @@ function R(t) {
|
|
|
19
19
|
return e.slice(a, s).split(/\0/g);
|
|
20
20
|
}
|
|
21
21
|
function A(t) {
|
|
22
|
-
const e =
|
|
22
|
+
const e = N(t);
|
|
23
23
|
for (let a = 0; a < e.length; a++) {
|
|
24
24
|
const s = e[a], c = y.exec(s);
|
|
25
25
|
if (c) {
|
|
@@ -31,7 +31,7 @@ function A(t) {
|
|
|
31
31
|
}
|
|
32
32
|
function D(t, e) {
|
|
33
33
|
const [a, s, c] = q(t, e);
|
|
34
|
-
return a + s.map(U(e
|
|
34
|
+
return a + s.map(U(e?.locale)).join(e?.delimiter ?? " ") + c;
|
|
35
35
|
}
|
|
36
36
|
function T(t, e) {
|
|
37
37
|
return D(t, { delimiter: "-", ...e });
|
|
@@ -40,7 +40,7 @@ function U(t) {
|
|
|
40
40
|
return t === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(t);
|
|
41
41
|
}
|
|
42
42
|
function q(t, e = {}) {
|
|
43
|
-
const a = e.split ?? (e.separateNumbers ? A :
|
|
43
|
+
const a = e.split ?? (e.separateNumbers ? A : N), s = e.prefixCharacters ?? E, c = e.suffixCharacters ?? E;
|
|
44
44
|
let i = 0, f = t.length;
|
|
45
45
|
for (; i < t.length; ) {
|
|
46
46
|
const d = t.charAt(i);
|
|
@@ -115,33 +115,32 @@ const W = "ds-file-list_root_qx1ja_1", $ = "ds-file-list_file-wrapper_qx1ja_7",
|
|
|
115
115
|
const d = f, x = Q;
|
|
116
116
|
let b;
|
|
117
117
|
e[2] !== i ? (b = (n) => {
|
|
118
|
-
|
|
119
|
-
const r = ((h = n.name.split(".").pop()) == null ? void 0 : h.toLowerCase()) || "", {
|
|
118
|
+
const r = n.name.split(".").pop()?.toLowerCase() || "", {
|
|
120
119
|
nonDisplayableImages: p,
|
|
121
|
-
documents:
|
|
122
|
-
videos:
|
|
123
|
-
archives:
|
|
120
|
+
documents: h,
|
|
121
|
+
videos: g,
|
|
122
|
+
archives: L
|
|
124
123
|
} = J;
|
|
125
|
-
return n.type.startsWith("image/") ? p.includes(r) ? /* @__PURE__ */ o(u, { name: "file-type-image", className: l.fileIcon }) : /* @__PURE__ */ o("img", { src: URL.createObjectURL(n), alt: `${i("fileListPreviewAltText")} ${n.name}`, className: l.preview }) :
|
|
124
|
+
return n.type.startsWith("image/") ? p.includes(r) ? /* @__PURE__ */ o(u, { name: "file-type-image", className: l.fileIcon }) : /* @__PURE__ */ o("img", { src: URL.createObjectURL(n), alt: `${i("fileListPreviewAltText")} ${n.name}`, className: l.preview }) : h.includes(r) ? /* @__PURE__ */ o(u, { name: "file-type-doc", className: l.fileIcon }) : n.type === "application/pdf" ? /* @__PURE__ */ o(u, { name: "file-type-pdf", className: l.fileIcon }) : n.type.startsWith("video/") && g.includes(r) ? /* @__PURE__ */ o(u, { name: "file-type-video", className: l.fileIcon }) : L.includes(r) ? /* @__PURE__ */ o(u, { name: "file-type-zip", className: l.fileIcon }) : /* @__PURE__ */ o(u, { name: "file", className: l.fileIcon });
|
|
126
125
|
}, e[2] = i, e[3] = b) : b = e[3];
|
|
127
126
|
const v = b;
|
|
128
127
|
let m;
|
|
129
128
|
if (e[4] !== d || e[5] !== a || e[6] !== v || e[7] !== s || e[8] !== i) {
|
|
130
129
|
let n;
|
|
131
130
|
e[10] !== d || e[11] !== v || e[12] !== s || e[13] !== i ? (n = (r, p) => {
|
|
132
|
-
const
|
|
133
|
-
const [
|
|
134
|
-
return [
|
|
131
|
+
const h = Object.fromEntries(Object.entries(d).map((g) => {
|
|
132
|
+
const [L, R] = g;
|
|
133
|
+
return [L, `${R}-${p}`];
|
|
135
134
|
}));
|
|
136
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ w("div", { className: j(l.fileWrapper, {
|
|
137
136
|
[l.fileWrapperInvalid]: r.feedback
|
|
138
137
|
}), children: [
|
|
139
138
|
v(r),
|
|
140
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ w("div", { className: l.fileDetails, children: [
|
|
141
140
|
/* @__PURE__ */ o("span", { className: l.fileName, children: r.name }),
|
|
142
141
|
/* @__PURE__ */ o("span", { className: l.fileSize, children: V(r.size) })
|
|
143
142
|
] }),
|
|
144
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ w(k, { ...h, className: l.removeButton, onClick: () => s(p), hideLabel: !0, iconName: "cross", size: "small", variant: "ghost", type: "button", "aria-describedby": r.feedback ? x(r.name) : void 0, "aria-invalid": r.feedback ? !0 : void 0, children: [
|
|
145
144
|
i("fileListRemoveSelectionButtonLabel", [r.name]),
|
|
146
145
|
"."
|
|
147
146
|
] }),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as y, jsx as p } from "react/jsx-runtime";
|
|
3
|
-
import { d as L } from "./chunks/index.
|
|
4
|
-
import { c as u } from "./chunks/index.
|
|
5
|
-
import { D as w } from "./chunks/Icon.
|
|
3
|
+
import { d as L } from "./chunks/index.D-sRdssb.js";
|
|
4
|
+
import { c as u } from "./chunks/index.DL9mof6u.js";
|
|
5
|
+
import { D as w } from "./chunks/Icon.CDLyB7Pv.js";
|
|
6
6
|
import './assets/flag.C7i3MAAP.css';const b = "ds-flag_root_14d3h_1", x = "ds-flag_root--color-grey-light_14d3h_28", G = "ds-flag_root--color-yellow-light_14d3h_31", N = "ds-flag_root--color-red-light_14d3h_34", S = "ds-flag_root--color-green-light_14d3h_37", D = "ds-flag_root--color-orange-base_14d3h_40", C = {
|
|
7
7
|
root: b,
|
|
8
8
|
"root--color-grey-light": "ds-flag_root--color-grey-light_14d3h_28",
|