@stihl-design-system/components 1.0.0-RC.10 → 1.0.0-RC.11
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.CEKQh-7i.js} +1 -1
- package/accordion.d.ts +1 -0
- package/{arialiveregions.BK4T7Vhk.js → arialiveregions.BKpxxK7O.js} +1 -1
- package/arialiveregions.d.ts +1 -0
- package/assets/Accordion.DMEFgtQm.css +1 -0
- package/assets/Chip.D10_7Q82.css +1 -0
- package/assets/CustomReactSelect.D5XKd9vg.css +1 -0
- package/assets/Dialog.B0pucIEI.css +1 -0
- package/assets/Drawer.CATBzfY7.css +1 -0
- package/assets/Fieldset.CwDhKRUL.css +1 -0
- package/assets/InputPassword.DOAAzj-O.css +1 -0
- package/assets/InputSearch.CxPYaQGZ.css +1 -0
- package/assets/InputStepper.CYYJUu0b.css +1 -0
- package/assets/Notification.mhVFeSGm.css +1 -0
- package/assets/Select.DZKpHV4G.css +1 -0
- package/assets/Textarea.Cp0b7oZp.css +1 -0
- package/assets/Toast.Cz6wYaBv.css +1 -0
- package/assets/button.C9_ejpGG.css +1 -0
- package/assets/buttonround.DTCqRP-0.css +1 -0
- package/assets/chipgroup.BMovtKTy.css +1 -0
- package/assets/flag.DX_lH1v7.css +1 -0
- package/assets/floatingactionbutton.Do-yEH6c.css +1 -0
- package/assets/input.Q5oKkmW2.css +1 -0
- package/assets/link.DhZqkLMP.css +1 -0
- package/assets/linkstandalone.Dwz-_O8q.css +1 -0
- package/assets/optioncheckbox.C62HtIj5.css +1 -0
- package/assets/radio.-Xxx5wL4.css +1 -0
- package/assets/switch.C1Ei0-z8.css +1 -0
- package/assets/text.DxKFcfY6.css +1 -0
- package/asterisk.d.ts +1 -0
- package/button.C5opEJ6x.js +135 -0
- package/button.d.ts +1 -0
- package/buttonround.CUoqRyy0.js +118 -0
- package/buttonround.d.ts +1 -0
- package/checkbox.d.ts +1 -0
- package/checkboxgroup.BqD5IV51.js +8 -0
- package/checkboxgroup.d.ts +1 -0
- package/chip.B92ew-hk.js +10 -0
- package/chip.d.ts +2 -0
- package/chipgroup.BJrqEfvr.js +175 -0
- package/chipgroup.d.ts +2 -0
- package/chunks/Accordion.DFwFN8mX.js +125 -0
- package/chunks/{AriaLiveRegions.utils.D2ni4Yrf.js → AriaLiveRegions.utils.BGSZafnS.js} +2 -2
- package/chunks/CheckboxGroup.M3jOjhNf.js +92 -0
- package/chunks/Chip.fMG8wi5K.js +142 -0
- package/chunks/{CustomReactSelect.ChAtL6fu.js → CustomReactSelect.D3jv5-fa.js} +883 -876
- package/chunks/{Dialog.Z5ESJQMi.js → Dialog.Fwr6vLiK.js} +47 -47
- package/chunks/{Drawer.BdowMqE0.js → Drawer.CKoYzQHd.js} +32 -32
- package/chunks/Fieldset.C9K8BYmH.js +99 -0
- package/chunks/InputPassword.C7pNeWGx.js +143 -0
- package/chunks/InputSearch.B24rcIJ_.js +192 -0
- package/chunks/InputStepper.CEW-bieQ.js +294 -0
- package/chunks/Notification.BXVN7_Fs.js +93 -0
- package/chunks/RadioGroup.D4UOflwr.js +137 -0
- package/chunks/Select.Ds86q4UC.js +194 -0
- package/chunks/Textarea.DcB8hKnO.js +198 -0
- package/chunks/Toast.DrzxdzVW.js +89 -0
- package/chunks/translate.isa3FHb8.js +11 -0
- package/{combobox.JL1Dsn3E.js → combobox.BeTnbG1m.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.test.d.ts +1 -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 +0 -1
- package/components/Combobox/Combobox.utils.d.ts +6 -1
- package/components/CustomReactSelect/CustomReactSelect.d.ts +0 -1
- package/components/CustomReactSelect/CustomReactSelect.utils.d.ts +0 -13
- package/components/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 +0 -1
- 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.d.ts +1 -0
- package/{customreactselect.Dg8Kgq3e.js → customreactselect.lYJhIeyx.js} +2 -2
- package/dialog.d.ts +1 -0
- package/{dialog.D3bJ0rsW.js → dialog.lGwNQU91.js} +2 -2
- package/{drawer.CNPF1-Kc.js → drawer.DNi5m8wP.js} +2 -2
- package/drawer.d.ts +1 -0
- package/{fieldset.CTshPWYX.js → fieldset.BqiAjeax.js} +1 -1
- package/fieldset.d.ts +1 -0
- package/flag.XJHHSP38.js +43 -0
- package/flag.d.ts +2 -0
- package/floatingactionbutton.CMpkTdhX.js +87 -0
- package/floatingactionbutton.d.ts +1 -0
- package/heading.d.ts +1 -0
- package/icon.d.ts +1 -0
- package/index.d.ts +4 -0
- package/index.es.js +133 -113
- package/input.d.ts +1 -0
- package/input.v7qB7wPJ.js +239 -0
- package/{inputpassword.nsYu6YeB.js → inputpassword.CSjh1GU7.js} +2 -2
- package/inputpassword.d.ts +1 -0
- package/{inputsearch.ZGIrDrcv.js → inputsearch.DyznOWLK.js} +2 -2
- package/inputsearch.d.ts +1 -0
- package/{inputstepper.BvY36hA1.js → inputstepper.3BLb7s0P.js} +2 -2
- package/inputstepper.d.ts +1 -0
- package/link.Clk5_BYp.js +116 -0
- package/link.d.ts +1 -0
- package/linkstandalone.BXERmqdN.js +80 -0
- package/linkstandalone.d.ts +1 -0
- package/logo.d.ts +1 -0
- package/{notification.BAS13UQ6.js → notification.0kX1GMaB.js} +2 -2
- package/notification.d.ts +1 -0
- package/{optioncheckbox.DZWwtx6f.js → optioncheckbox.BPN3f6l_.js} +13 -13
- package/optioncheckbox.d.ts +1 -0
- package/package.json +44 -39
- package/partials/index.js +407 -407
- package/partials/lib/partials.d.ts +0 -1
- package/radio.DTZNJzMU.js +115 -0
- package/radio.d.ts +1 -0
- package/radiogroup.SYkZm2DG.js +10 -0
- package/radiogroup.d.ts +1 -0
- package/{select.C4OZMB-V.js → select.CYbwR3RW.js} +1 -1
- package/select.d.ts +1 -0
- package/{skiptocontent.C4yQfWr2.js → skiptocontent.DUQWopO4.js} +1 -1
- package/skiptocontent.d.ts +1 -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/_index.scss +1 -0
- package/styles/scss/lib/_breakpoints.scss +0 -1
- package/styles/scss/lib/_link.scss +3 -0
- package/styles/scss/lib/_spacing-dynamic.scss +61 -0
- package/switch.CoNnIhM4.js +65 -0
- package/switch.d.ts +1 -0
- package/systemfeedback.d.ts +1 -0
- package/text.d.ts +1 -0
- package/text.fMcHzVbH.js +57 -0
- package/{textarea.CtQtGqn5.js → textarea.DJc527nX.js} +1 -1
- package/textarea.d.ts +1 -0
- package/title.d.ts +1 -0
- package/{toast.DVd9dLs2.js → toast.D48GFmp0.js} +2 -2
- package/toast.d.ts +1 -0
- package/{toastmanager.Dh0gzFkM.js → toastmanager.Dl8-Q3ED.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/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/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/Select.BptsMxz4.css +0 -1
- package/assets/Textarea.CIIVh03G.css +0 -1
- package/assets/Toast.Dsvs1zdM.css +0 -1
- package/assets/button.B1O7Yw3Q.css +0 -1
- package/assets/buttonround.DlH_ipDo.css +0 -1
- package/assets/floatingactionbutton.DRYentYC.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/optioncheckbox.BJJAph5_.css +0 -1
- package/assets/radio.9kpIO3HC.css +0 -1
- package/assets/switch.2DQF2zH-.css +0 -1
- package/assets/text.Dhb_l50R.css +0 -1
- package/button.DH0h6uPs.js +0 -135
- package/buttonround.0mw4zzlU.js +0 -118
- 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/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/floatingactionbutton.CCIj9Fjr.js +0 -87
- package/input.CTgeAYdu.js +0 -236
- package/link.DAZNwQ0a.js +0 -116
- package/linkstandalone.C9X3er7g.js +0 -80
- package/radio.CWGJtmKl.js +0 -115
- package/radiogroup.BhffFqN3.js +0 -11
- package/switch.CmpNUC7s.js +0 -65
- package/text.rgDKQBrU.js +0 -57
- package/utils/render-in-iframe.d.ts +0 -15
- /package/assets/{RadioGroup.Bz3_xkZU.css → CheckboxGroup.Bz3_xkZU.css} +0 -0
|
@@ -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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IconName } from '../../types';
|
|
2
|
+
import { ChipGroupProps } from './ChipGroup';
|
|
3
|
+
type ValidationProps = Pick<ChipGroupProps, 'id' | 'chips' | 'label'>;
|
|
4
|
+
export declare const validateChipGroupProps: ({ chips, id, label, }: ValidationProps) => void;
|
|
5
|
+
export declare const validateIsLiveRegionPresent: () => void;
|
|
6
|
+
export interface Chip {
|
|
7
|
+
/** Unique id for the Chip. */
|
|
8
|
+
id: string | number;
|
|
9
|
+
/** Label text displayed inside the Chip. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Disables the Chip, preventing user interaction.
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Name of the icon to display */
|
|
16
|
+
iconName?: IconName;
|
|
17
|
+
/** Displays the Chip as selected */
|
|
18
|
+
isSelected?: boolean;
|
|
19
|
+
/** Callback function called when the Chip is clicked. */
|
|
20
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const CHIP_GROUP_SIZE: readonly ["medium", "small"];
|
|
23
|
+
export type ChipGroupSize = (typeof CHIP_GROUP_SIZE)[number];
|
|
24
|
+
export type ChipGroupSelectionMode = 'single' | 'multiple';
|
|
25
|
+
export type ChipGroupLanguage = 'de' | 'en';
|
|
26
|
+
export type ChipGroupAriaTranslations = typeof DS_CHIP_GROUP_TRANSLATIONS_EN;
|
|
27
|
+
export declare const DS_CHIP_GROUP_TRANSLATIONS_EN: {
|
|
28
|
+
disabled: string;
|
|
29
|
+
selected: string;
|
|
30
|
+
selectChip: string;
|
|
31
|
+
unselectAction: string;
|
|
32
|
+
selectAction: string;
|
|
33
|
+
addToSelection: string;
|
|
34
|
+
removeFromSelection: string;
|
|
35
|
+
removeChip: string;
|
|
36
|
+
titleDisabled: string;
|
|
37
|
+
titleRemovable: string;
|
|
38
|
+
titleDeactivate: string;
|
|
39
|
+
titleActivate: string;
|
|
40
|
+
};
|
|
41
|
+
export declare const DS_CHIP_GROUP_TRANSLATIONS_DE: {
|
|
42
|
+
disabled: string;
|
|
43
|
+
selected: string;
|
|
44
|
+
selectChip: string;
|
|
45
|
+
unselectAction: string;
|
|
46
|
+
selectAction: string;
|
|
47
|
+
addToSelection: string;
|
|
48
|
+
removeFromSelection: string;
|
|
49
|
+
removeChip: string;
|
|
50
|
+
titleDisabled: string;
|
|
51
|
+
titleRemovable: string;
|
|
52
|
+
titleDeactivate: string;
|
|
53
|
+
titleActivate: string;
|
|
54
|
+
};
|
|
55
|
+
export declare const DS_CHIP_GROUP_TRANSLATIONS: {
|
|
56
|
+
[key in ChipGroupLanguage]: ChipGroupAriaTranslations;
|
|
57
|
+
};
|
|
58
|
+
export declare const getChipAriaLabel: (t: (key: keyof ChipGroupAriaTranslations, replacements?: string[]) => string, label: string, disabled: boolean | undefined, isSelected: boolean | undefined, selectionMode: ChipGroupSelectionMode, isRemovable: boolean | undefined) => string;
|
|
59
|
+
export declare const getChipTitle: (t: (key: keyof ChipGroupAriaTranslations, replacements?: string[]) => string, disabled: boolean | undefined, isSelected: boolean | undefined, isRemovable: boolean | undefined) => string;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IconName } from '../../types';
|
|
2
2
|
import { ComboboxProps } from './Combobox';
|
|
3
3
|
import { GroupBase, OptionsOrGroups } from 'react-select';
|
|
4
|
-
|
|
5
4
|
export type ComboboxVariant = 'single' | 'multi';
|
|
6
5
|
type ValidationProps = Pick<ComboboxProps, 'id' | 'label' | 'options'>;
|
|
7
6
|
/**
|
|
@@ -16,9 +15,15 @@ export declare const validateComboboxProps: ({ id, label, options, }: Validation
|
|
|
16
15
|
export declare const COMBOBOX_SIZE: readonly ["medium", "small"];
|
|
17
16
|
export type ComboboxSize = (typeof COMBOBOX_SIZE)[number];
|
|
18
17
|
export interface ComboboxOption {
|
|
18
|
+
/** Label text displayed as the option. */
|
|
19
19
|
label: string;
|
|
20
|
+
/** Value of the option. */
|
|
20
21
|
value: string | number;
|
|
22
|
+
/** Name of the icon to display. */
|
|
21
23
|
leadingIconName?: IconName;
|
|
24
|
+
/** Disables the Option, preventing user interaction.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
22
27
|
isDisabled?: boolean;
|
|
23
28
|
}
|
|
24
29
|
export type ComboboxOptionsGroup = GroupBase<ComboboxOption>;
|
|
@@ -3,7 +3,6 @@ import { BreakpointCustomizable, Optional } from '../../types';
|
|
|
3
3
|
import { ComboboxAriaTranslations, ComboboxLanguage, ComboboxOption, ComboboxOptionsGroup, ComboboxOptionsOrOptGroups, ComboboxSize } from '../Combobox/Combobox.utils';
|
|
4
4
|
import { PublicBaseSelectProps } from 'react-select/dist/declarations/src/Select';
|
|
5
5
|
import { StateManagerProps } from 'react-select/dist/declarations/src/useStateManager';
|
|
6
|
-
|
|
7
6
|
type IncludedReactSelectKeys = 'className' | 'form' | 'inputValue' | 'menuIsOpen' | 'name' | 'onBlur' | 'onFocus' | 'openMenuOnClick' | 'openMenuOnFocus' | 'tabIndex';
|
|
8
7
|
type PickedReactSelectProps<OptionType, IsMulti extends boolean, GroupType extends GroupBase<OptionType>> = Pick<Optional<PublicBaseSelectProps<OptionType, IsMulti, GroupType>, 'inputValue'>, IncludedReactSelectKeys>;
|
|
9
8
|
type PickedReactSelectStateManagerProps<OptionType, IsMulti extends boolean, GroupType extends GroupBase<OptionType>> = Pick<StateManagerProps<OptionType, IsMulti, GroupType>, 'defaultInputValue'>;
|
|
@@ -1,16 +1,3 @@
|
|
|
1
1
|
import { AriaLiveMessages, GroupBase } from 'react-select';
|
|
2
2
|
import { ComboboxAriaTranslations } from '../Combobox/Combobox.utils';
|
|
3
|
-
|
|
4
|
-
type ComboboxAriaTranslationKey = keyof ComboboxAriaTranslations;
|
|
5
|
-
/**
|
|
6
|
-
* Translates a given key using specified translations and dynamic replacements of placeholders like {0} or {1}.
|
|
7
|
-
* Unmatched placeholders in the translation are removed.
|
|
8
|
-
*
|
|
9
|
-
* @param {ComboboxAriaTranslationKey} key - The key identifying the text to be translated.
|
|
10
|
-
* @param {ComboboxAriaTranslations} translations - Object containing translation mappings.
|
|
11
|
-
* @param {string[]} [replacements=[]] - Optional array of replacement strings for placeholders in the translation.
|
|
12
|
-
* @returns {string} The translated string with placeholders replaced by corresponding values in replacements array or removed if no match is found.
|
|
13
|
-
*/
|
|
14
|
-
export declare const translate: (key: ComboboxAriaTranslationKey, translations: ComboboxAriaTranslations, replacements?: string[]) => string;
|
|
15
3
|
export declare const defaultAriaLiveMessages: (translations: ComboboxAriaTranslations) => AriaLiveMessages<unknown, boolean, GroupBase<unknown>>;
|
|
16
|
-
export {};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { HeadingSize, HeadingTag } from '../Heading/Heading.utils';
|
|
2
2
|
import { FieldsetProps } from './Fieldset';
|
|
3
|
-
|
|
4
3
|
export type Legend = string | {
|
|
4
|
+
/** The text content for the legend. */
|
|
5
5
|
headingText: string;
|
|
6
|
+
/** Defines the size of the heading, using predefined size types.
|
|
7
|
+
* @default 'medium'
|
|
8
|
+
*/
|
|
6
9
|
headingSize?: HeadingSize;
|
|
10
|
+
/** Specifies the HTML tag to be used for the heading, such as 'h1', 'h2', etc.
|
|
11
|
+
* @default 'h2'
|
|
12
|
+
*/
|
|
7
13
|
headingTag?: HeadingTag;
|
|
8
14
|
};
|
|
9
15
|
type ValidationProps = Pick<FieldsetProps, 'description' | 'id' | 'legend' | 'systemFeedback'>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IconName } from '../../types';
|
|
2
|
+
import { IconProps } from '../Icon/Icon';
|
|
3
|
+
import { FlagColor } from './Flag.utils';
|
|
4
|
+
export interface FlagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
/** Content within the Flag. */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Background color of the Flag. It can either be a predefined color token (recommended) or a custom color value (e.g. #F37A1F).
|
|
9
|
+
*
|
|
10
|
+
* Possible predefined values: `grey-light` `yellow-light` `red-light` `green-light` `orange-base`
|
|
11
|
+
*
|
|
12
|
+
* @default 'grey-light'
|
|
13
|
+
*/
|
|
14
|
+
color: FlagColor;
|
|
15
|
+
/** Name of the icon to display. */
|
|
16
|
+
iconName?: IconName;
|
|
17
|
+
/** URL or path for a custom icon. */
|
|
18
|
+
iconSource?: IconProps['source'];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A read-only component, often representing a status or category.
|
|
22
|
+
* */
|
|
23
|
+
export declare const DSFlag: ({ children, className, color, iconName, iconSource, ...rest }: FlagProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IconName } from '../../types';
|
|
2
2
|
import { ButtonProps } from '../Button/Button';
|
|
3
|
-
|
|
4
3
|
export interface FloatingActionButtonProps extends Omit<ButtonProps, 'hideLabel' | 'iconPosition' | 'variant' | 'isFlush'> {
|
|
5
4
|
children: React.ReactNode;
|
|
6
5
|
/** Name of the icon to display.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { Theme } from '../../types';
|
|
3
3
|
import { HeadingSize, HeadingTag } from './Heading.utils';
|
|
4
|
-
|
|
5
4
|
export interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
6
5
|
/** Content within the heading. */
|
|
7
6
|
children: React.ReactNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HTMLProps, SVGProps } from 'react';
|
|
2
2
|
import { IconName, SelectedAriaAttributes, Theme } from '../../types';
|
|
3
3
|
import { IconAriaAttribute, IconSize } from './Icon.utils';
|
|
4
|
-
|
|
5
4
|
export interface IconProps {
|
|
6
5
|
/** ARIA attributes to enhance accessibility.
|
|
7
6
|
* `{'aria-label'? string;}`
|
|
@@ -2,7 +2,6 @@ import { InputHTMLAttributes } from 'react';
|
|
|
2
2
|
import { BreakpointCustomizable, IconName } from '../../types';
|
|
3
3
|
import { IconProps } from '../Icon/Icon';
|
|
4
4
|
import { InputSize, SupportedInputTypes } from './Input.utils';
|
|
5
|
-
|
|
6
5
|
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
7
6
|
/** Unique id for the input. */
|
|
8
7
|
id: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { BreakpointCustomizable } from '../../types';
|
|
3
3
|
import { InputSize } from '../Input/Input.utils';
|
|
4
|
-
|
|
5
4
|
export interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'size'> {
|
|
6
5
|
/** Unique id for the input. */
|
|
7
6
|
id: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { BreakpointCustomizable } from '../../types';
|
|
3
3
|
import { InputSize } from '../Input/Input.utils';
|
|
4
|
-
|
|
5
4
|
export interface InputSearchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'size'> {
|
|
6
5
|
/** Unique id for the input. */
|
|
7
6
|
id: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { BreakpointCustomizable } from '../../types';
|
|
3
3
|
import { InputSize } from '../Input/Input.utils';
|
|
4
|
-
|
|
5
4
|
export interface InputStepperProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'size'> {
|
|
6
5
|
/** Unique id for the input. */
|
|
7
6
|
id: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BreakpointCustomizable, IconName, LinkTarget, SelectedAriaAttributes, Theme } from '../../types';
|
|
2
2
|
import { IconProps } from '../Icon/Icon';
|
|
3
3
|
import { LinkAriaAttribute, LinkIconPosition, LinkReferrerPolicy, LinkRel, LinkSize, LinkVariant } from './Link.utils';
|
|
4
|
-
|
|
5
4
|
export interface CommonLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
6
5
|
/** ARIA attributes to enhance accessibility.
|
|
7
6
|
* `{'aria-label'? string;`
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { SelectedAriaAttributes, Theme } from '../../types';
|
|
3
3
|
import { LogoAriaAttribute, LogoTarget, LogoVariant } from './Logo.utils';
|
|
4
|
-
|
|
5
|
-
export interface LogoProps extends HTMLAttributes<HTMLOrSVGElement | HTMLAnchorElement> {
|
|
4
|
+
export interface LogoProps extends HTMLAttributes<SVGElement | HTMLAnchorElement> {
|
|
6
5
|
/** If the DSLogo is used with an href prop, make sure to add a descriptive label to inform screen reader users what the link stands for.
|
|
7
6
|
* `{'aria-label'? string;}`
|
|
8
7
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IconName } from '../../types';
|
|
2
|
-
|
|
3
2
|
export declare const NOTIFICATION_VARIANT: readonly ["success", "error", "warning", "info"];
|
|
4
3
|
export type NotificationVariant = (typeof NOTIFICATION_VARIANT)[number];
|
|
5
4
|
export declare const NOTIFICATION_ICONS: Record<NotificationVariant, IconName>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FieldsetHTMLAttributes } from 'react';
|
|
2
2
|
import { FieldsetProps } from '../Fieldset/Fieldset';
|
|
3
3
|
import { RadioGroupOption } from './RadioGroup.utils';
|
|
4
|
-
|
|
5
4
|
export interface RadioGroupProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'onChange'> {
|
|
6
5
|
/**
|
|
7
6
|
* The `legend` prop can either be a simple `string` or an object with specific properties.
|
|
@@ -22,16 +21,16 @@ export interface RadioGroupProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSe
|
|
|
22
21
|
* @prop {{label: string; value: string; customArea?: React.ReactNode; hint?: string}[]} options
|
|
23
22
|
*/
|
|
24
23
|
options: RadioGroupOption[];
|
|
25
|
-
/**
|
|
26
|
-
* Set the alignment of the radio buttons.
|
|
27
|
-
* `alignment="horizontal"` is not possible if a `hint` or `customArea` is passed to the `options`.
|
|
28
|
-
* @default 'vertical'
|
|
29
|
-
*/
|
|
30
|
-
alignment?: 'vertical' | 'horizontal';
|
|
31
24
|
/** Value of the selected Option in **uncontrolled RadioGroup** component. */
|
|
32
25
|
defaultValue?: string;
|
|
33
26
|
/** Short descriptive text displayed beneath the legend. */
|
|
34
27
|
description?: FieldsetProps['description'];
|
|
28
|
+
/**
|
|
29
|
+
* Set the direction of the radio buttons.
|
|
30
|
+
* `direction="horizontal"` is not possible if a `hint` or `customArea` is passed to the `options`.
|
|
31
|
+
* @default 'vertical'
|
|
32
|
+
*/
|
|
33
|
+
direction?: 'vertical' | 'horizontal';
|
|
35
34
|
/** Disables the radio group, preventing user interaction.
|
|
36
35
|
* @default false
|
|
37
36
|
*/
|
|
@@ -60,7 +59,7 @@ export interface RadioGroupProps extends Omit<FieldsetHTMLAttributes<HTMLFieldSe
|
|
|
60
59
|
}
|
|
61
60
|
/**
|
|
62
61
|
* The `DSRadioGroup` component offers a cohesive and accessible solution for grouping radio buttons,
|
|
63
|
-
* complete with customizable legends,
|
|
62
|
+
* complete with customizable legends, direction options, and integrated validation feedback,
|
|
64
63
|
* enhancing the user experience in form designs.
|
|
65
64
|
* */
|
|
66
65
|
export declare const DSRadioGroup: import('react').ForwardRefExoticComponent<RadioGroupProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { RadioProps } from '../Radio/Radio';
|
|
2
2
|
import { RadioGroupProps } from './RadioGroup';
|
|
3
|
-
|
|
4
3
|
export type RadioGroupOption = Pick<RadioProps, 'label' | 'value' | 'customArea' | 'hint'>;
|
|
5
|
-
type ValidationProps = Pick<RadioGroupProps, 'legend' | 'name' | 'options' | '
|
|
4
|
+
type ValidationProps = Pick<RadioGroupProps, 'legend' | 'name' | 'options' | 'description' | 'direction' | 'id' | 'systemFeedback'>;
|
|
6
5
|
export declare const optionsHaveHint: (options: RadioGroupOption[]) => boolean;
|
|
7
6
|
export declare const optionsHaveCustomArea: (options: RadioGroupOption[]) => boolean;
|
|
8
|
-
export declare const validateRadioGroupProps: ({ legend, name, options,
|
|
7
|
+
export declare const validateRadioGroupProps: ({ legend, name, options, description, direction, id, systemFeedback, }: ValidationProps) => void;
|
|
9
8
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SelectHTMLAttributes } from 'react';
|
|
2
2
|
import { BreakpointCustomizable } from '../../types';
|
|
3
3
|
import { SelectOptionsOrOptGroups, SelectSize } from './Select.utils';
|
|
4
|
-
|
|
5
4
|
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
6
5
|
/** Unique id for the select. */
|
|
7
6
|
id: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { GroupBase, OptionsOrGroups } from 'react-select';
|
|
3
3
|
import { SelectProps } from './Select';
|
|
4
|
-
|
|
5
4
|
type ValidationProps = Pick<SelectProps, 'id' | 'label' | 'options'>;
|
|
6
5
|
export interface SelectOption extends HTMLAttributes<HTMLOptionElement> {
|
|
7
6
|
label: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { SelectedAriaAttributes, Theme } from '../../types';
|
|
3
3
|
import { SpinnerAriaAttribute, SpinnerSize } from './Spinner.utils';
|
|
4
|
-
|
|
5
4
|
export interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
|
|
6
5
|
/** ARIA attributes to enhance accessibility.
|
|
7
6
|
* `{'aria-label'? string;}`
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { SelectedAriaAttributes } from '../../types';
|
|
3
3
|
import { SwitchAriaAttribute, SwitchLabelPosition } from './Switch.utils';
|
|
4
|
-
|
|
5
4
|
export interface SwitchProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
5
|
/** Content within the label. */
|
|
7
6
|
children: React.ReactNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { Theme } from '../../types';
|
|
3
3
|
import { TextSize, TextTag, TextWeight } from './Text.utils';
|
|
4
|
-
|
|
5
4
|
export interface TextProps extends HTMLAttributes<HTMLQuoteElement | HTMLDivElement | HTMLLegendElement | HTMLParagraphElement | HTMLSpanElement | HTMLTimeElement> {
|
|
6
5
|
/** Content of the text. */
|
|
7
6
|
children: React.ReactNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TextareaHTMLAttributes } from 'react';
|
|
2
2
|
import { BreakpointCustomizable } from '../../types';
|
|
3
3
|
import { TextareaSize } from './Textarea.utils';
|
|
4
|
-
|
|
5
4
|
export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size' | 'rows' | 'cols'> {
|
|
6
5
|
/** Unique id for the textarea. */
|
|
7
6
|
id: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { Theme } from '../../types';
|
|
3
3
|
import { TitleSize, TitleTag } from './Title.utils';
|
|
4
|
-
|
|
5
4
|
export interface TitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
6
5
|
/** Content of the title. */
|
|
7
6
|
children: React.ReactNode;
|