carbon-react 136.0.4 → 138.0.0
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/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.d.ts +3 -12
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.js +5 -14
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.style.d.ts +1 -3
- package/esm/components/button-toggle/button-toggle-group/button-toggle-group.style.js +3 -11
- package/esm/components/button-toggle/button-toggle-icon.component.js +2 -1
- package/esm/components/button-toggle/button-toggle.component.d.ts +1 -5
- package/esm/components/button-toggle/button-toggle.component.js +2 -17
- package/esm/components/checkbox/checkbox-group/checkbox-group.component.js +2 -0
- package/esm/components/checkbox/checkbox-svg.component.js +1 -0
- package/esm/components/checkbox/checkbox.style.js +0 -1
- package/esm/locales/de-de.d.ts +3 -0
- package/esm/locales/de-de.js +206 -0
- package/esm/locales/en-ca.d.ts +3 -0
- package/esm/locales/en-ca.js +12 -0
- package/esm/locales/en-us.d.ts +3 -0
- package/esm/locales/en-us.js +12 -0
- package/esm/locales/es-es.d.ts +3 -0
- package/esm/locales/{__internal__/es-es.js → es-es.js} +40 -40
- package/esm/locales/fr-ca.d.ts +3 -0
- package/esm/locales/fr-ca.js +207 -0
- package/esm/locales/fr-fr.d.ts +3 -0
- package/esm/locales/fr-fr.js +207 -0
- package/esm/locales/index.d.ts +7 -1
- package/esm/locales/index.js +7 -1
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.d.ts +3 -12
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.js +4 -13
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.d.ts +1 -3
- package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.js +4 -12
- package/lib/components/button-toggle/button-toggle-icon.component.js +2 -1
- package/lib/components/button-toggle/button-toggle.component.d.ts +1 -5
- package/lib/components/button-toggle/button-toggle.component.js +2 -17
- package/lib/components/checkbox/checkbox-group/checkbox-group.component.js +2 -0
- package/lib/components/checkbox/checkbox-svg.component.js +1 -0
- package/lib/components/checkbox/checkbox.style.js +0 -1
- package/lib/locales/de-de.d.ts +3 -0
- package/lib/locales/de-de.js +213 -0
- package/lib/locales/en-ca.d.ts +3 -0
- package/lib/locales/en-ca.js +19 -0
- package/lib/locales/en-us.d.ts +3 -0
- package/lib/locales/en-us.js +19 -0
- package/lib/locales/es-es.d.ts +3 -0
- package/lib/locales/{__internal__/es-es.js → es-es.js} +38 -38
- package/lib/locales/fr-ca.d.ts +3 -0
- package/lib/locales/fr-ca.js +214 -0
- package/lib/locales/fr-fr.d.ts +3 -0
- package/lib/locales/fr-fr.js +214 -0
- package/lib/locales/index.d.ts +7 -1
- package/lib/locales/index.js +43 -1
- package/package.json +1 -1
- package/esm/locales/__internal__/es-es.d.ts +0 -3
- package/lib/locales/__internal__/es-es.d.ts +0 -3
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import { TagProps } from "../../../__internal__/utils/helpers/tags";
|
|
4
|
-
export interface CustomEvent {
|
|
5
|
-
target: {
|
|
6
|
-
name?: string;
|
|
7
|
-
value?: string;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
4
|
export interface ButtonToggleGroupProps extends MarginProps, TagProps {
|
|
11
5
|
/** Unique id for the root element of the component */
|
|
12
6
|
id: string;
|
|
13
|
-
/** Specifies the name prop to be applied to each button in the group */
|
|
14
|
-
name?: string;
|
|
15
7
|
/** Toggle buttons to be rendered. Only accepts children of type ButtonToggle */
|
|
16
8
|
children?: React.ReactNode;
|
|
17
9
|
/** aria-label for the group wrapper. Required for accessibility when no text label is provided */
|
|
@@ -37,7 +29,7 @@ export interface ButtonToggleGroupProps extends MarginProps, TagProps {
|
|
|
37
29
|
/** If true all ButtonToggle children will flex to the full width of the ButtonToggleGroup parent */
|
|
38
30
|
fullWidth?: boolean;
|
|
39
31
|
/** Callback triggered by pressing one of the child buttons. Use with controlled components to set the value prop to the value argument */
|
|
40
|
-
onChange?: (ev: React.MouseEvent<HTMLButtonElement>, value?: string
|
|
32
|
+
onChange?: (ev: React.MouseEvent<HTMLButtonElement>, value?: string) => void;
|
|
41
33
|
/** Determines which child button is selected when the component is used as a controlled component */
|
|
42
34
|
value?: string;
|
|
43
35
|
/** [Legacy] Aria label for rendered help component */
|
|
@@ -56,8 +48,7 @@ declare type ButtonToggleGroupContextType = {
|
|
|
56
48
|
onButtonClick: (value: string) => void;
|
|
57
49
|
handleKeyDown: (ev: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
58
50
|
pressedButtonValue?: string;
|
|
59
|
-
onChange?: (ev: React.MouseEvent<HTMLButtonElement>, value?: string
|
|
60
|
-
name?: string;
|
|
51
|
+
onChange?: (ev: React.MouseEvent<HTMLButtonElement>, value?: string) => void;
|
|
61
52
|
allowDeselect?: boolean;
|
|
62
53
|
isInGroup: boolean;
|
|
63
54
|
isDisabled?: boolean;
|
|
@@ -68,7 +59,7 @@ declare type ButtonToggleGroupContextType = {
|
|
|
68
59
|
};
|
|
69
60
|
export declare const ButtonToggleGroupContext: React.Context<ButtonToggleGroupContextType>;
|
|
70
61
|
declare const ButtonToggleGroup: {
|
|
71
|
-
({ children, fieldHelp, fieldHelpInline, "aria-label": ariaLabel, label, labelHelp, labelSpacing, inputHint, inputWidth, fullWidth, labelInline, labelWidth,
|
|
62
|
+
({ children, fieldHelp, fieldHelpInline, "aria-label": ariaLabel, label, labelHelp, labelSpacing, inputHint, inputWidth, fullWidth, labelInline, labelWidth, onChange, value, "data-component": dataComponent, "data-element": dataElement, "data-role": dataRole, helpAriaLabel, id, allowDeselect, disabled, className, ...props }: ButtonToggleGroupProps): React.JSX.Element;
|
|
72
63
|
displayName: string;
|
|
73
64
|
};
|
|
74
65
|
export default ButtonToggleGroup;
|
|
@@ -4,15 +4,13 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import invariant from "invariant";
|
|
5
5
|
import FormField from "../../../__internal__/form-field";
|
|
6
6
|
import guid from "../../../__internal__/utils/helpers/guid";
|
|
7
|
-
import StyledButtonToggleGroup, {
|
|
7
|
+
import StyledButtonToggleGroup, { StyledHintText } from "./button-toggle-group.style";
|
|
8
8
|
import { ButtonToggle } from "..";
|
|
9
9
|
import { filterStyledSystemMarginProps } from "../../../style/utils";
|
|
10
10
|
import { TooltipProvider } from "../../../__internal__/tooltip-provider";
|
|
11
11
|
import { InputGroupBehaviour } from "../../../__internal__/input-behaviour";
|
|
12
|
-
import Logger from "../../../__internal__/utils/logger";
|
|
13
12
|
import Events from "../../../__internal__/utils/helpers/events";
|
|
14
13
|
import { NewValidationContext } from "../../carbon-provider/carbon-provider.component";
|
|
15
|
-
let deprecateNameWarnTriggered = false;
|
|
16
14
|
const BUTTON_TOGGLE_SELECTOR = '[data-element="button-toggle-button"]';
|
|
17
15
|
export const ButtonToggleGroupContext = /*#__PURE__*/createContext({
|
|
18
16
|
onButtonClick: /* istanbul ignore next */() => {},
|
|
@@ -35,7 +33,6 @@ const ButtonToggleGroup = ({
|
|
|
35
33
|
fullWidth,
|
|
36
34
|
labelInline,
|
|
37
35
|
labelWidth,
|
|
38
|
-
name,
|
|
39
36
|
onChange,
|
|
40
37
|
value,
|
|
41
38
|
"data-component": dataComponent = "button-toggle-group",
|
|
@@ -59,11 +56,6 @@ const ButtonToggleGroup = ({
|
|
|
59
56
|
const hintTextId = useRef(guid());
|
|
60
57
|
const wrapperRef = useRef(null);
|
|
61
58
|
const [pressedButtonValue, setPressedButtonValue] = useState();
|
|
62
|
-
if (name && !deprecateNameWarnTriggered) {
|
|
63
|
-
deprecateNameWarnTriggered = true;
|
|
64
|
-
Logger.deprecate(`The \`name\` prop in \`ButtonToggleGroup\` component is deprecated and will soon be removed. It does not provide any functionality
|
|
65
|
-
since the component can no longer be used in an uncontrolled fashion.`);
|
|
66
|
-
}
|
|
67
59
|
const {
|
|
68
60
|
validationRedesignOptIn
|
|
69
61
|
} = useContext(NewValidationContext);
|
|
@@ -140,7 +132,6 @@ const ButtonToggleGroup = ({
|
|
|
140
132
|
handleKeyDown,
|
|
141
133
|
pressedButtonValue: value || pressedButtonValue,
|
|
142
134
|
onChange,
|
|
143
|
-
name,
|
|
144
135
|
allowDeselect,
|
|
145
136
|
isInGroup: true,
|
|
146
137
|
isDisabled: disabled,
|
|
@@ -151,14 +142,14 @@ const ButtonToggleGroup = ({
|
|
|
151
142
|
}, inputHint && /*#__PURE__*/React.createElement(StyledHintText, {
|
|
152
143
|
id: hintTextId.current,
|
|
153
144
|
isDisabled: disabled
|
|
154
|
-
}, inputHint), /*#__PURE__*/React.createElement(
|
|
155
|
-
labelInline: labelInline,
|
|
145
|
+
}, inputHint), /*#__PURE__*/React.createElement(StyledButtonToggleGroup, _extends({
|
|
156
146
|
ref: wrapperRef
|
|
157
|
-
},
|
|
147
|
+
}, label ? {
|
|
158
148
|
"aria-labelledby": labelId.current
|
|
159
149
|
} : {
|
|
160
150
|
"aria-label": ariaLabel
|
|
161
151
|
}, {
|
|
152
|
+
labelInline: labelInline,
|
|
162
153
|
inputWidth: inputWidth,
|
|
163
154
|
fullWidth: fullWidth,
|
|
164
155
|
role: "group",
|
|
@@ -168,7 +159,7 @@ const ButtonToggleGroup = ({
|
|
|
168
159
|
id: id,
|
|
169
160
|
className: className,
|
|
170
161
|
disabled: disabled
|
|
171
|
-
}), children)))))
|
|
162
|
+
}), children)))));
|
|
172
163
|
};
|
|
173
164
|
ButtonToggleGroup.displayName = "ButtonToggleGroup";
|
|
174
165
|
export default ButtonToggleGroup;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ButtonToggleGroupProps } from ".";
|
|
2
|
-
declare type StyledButtonToggleGroupProps = Pick<ButtonToggleGroupProps, "inputWidth" | "fullWidth" | "disabled">;
|
|
3
|
-
declare type StyledButtonToggleGroupWrapperProps = Pick<ButtonToggleGroupProps, "labelInline">;
|
|
2
|
+
declare type StyledButtonToggleGroupProps = Pick<ButtonToggleGroupProps, "inputWidth" | "fullWidth" | "disabled" | "labelInline">;
|
|
4
3
|
declare const StyledButtonToggleGroup: import("styled-components").StyledComponent<"div", any, StyledButtonToggleGroupProps, never>;
|
|
5
|
-
export declare const StyledButtonToggleGroupWrapper: import("styled-components").StyledComponent<"div", any, StyledButtonToggleGroupWrapperProps, never>;
|
|
6
4
|
export declare const StyledHintText: import("styled-components").StyledComponent<"div", any, {
|
|
7
5
|
isDisabled?: boolean | undefined;
|
|
8
6
|
}, never>;
|
|
@@ -12,7 +12,9 @@ const StyledButtonToggleGroup = styled.div`
|
|
|
12
12
|
gap: 4px;
|
|
13
13
|
width: fit-content;
|
|
14
14
|
height: fit-content;
|
|
15
|
-
flex-wrap:
|
|
15
|
+
flex-wrap: ${({
|
|
16
|
+
labelInline
|
|
17
|
+
}) => labelInline ? "nowrap" : "wrap"};
|
|
16
18
|
|
|
17
19
|
${({
|
|
18
20
|
disabled
|
|
@@ -39,16 +41,6 @@ const StyledButtonToggleGroup = styled.div`
|
|
|
39
41
|
width: ${`${inputWidth}%`};
|
|
40
42
|
`}
|
|
41
43
|
`;
|
|
42
|
-
export const StyledButtonToggleGroupWrapper = styled.div`
|
|
43
|
-
${({
|
|
44
|
-
labelInline
|
|
45
|
-
}) => labelInline && css`
|
|
46
|
-
display: flex;
|
|
47
|
-
${StyledButtonToggleGroup} {
|
|
48
|
-
flex-wrap: nowrap;
|
|
49
|
-
}
|
|
50
|
-
`}
|
|
51
|
-
`;
|
|
52
44
|
export const StyledHintText = styled.div`
|
|
53
45
|
::after {
|
|
54
46
|
content: " ";
|
|
@@ -9,7 +9,8 @@ const ButtonToggleIcon = ({
|
|
|
9
9
|
hasContent
|
|
10
10
|
}) => /*#__PURE__*/React.createElement(StyledButtonToggleIcon, {
|
|
11
11
|
buttonIconSize: buttonIconSize,
|
|
12
|
-
hasContent: hasContent
|
|
12
|
+
hasContent: hasContent,
|
|
13
|
+
"data-role": "button-toggle-icon"
|
|
13
14
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
14
15
|
"aria-hidden": true,
|
|
15
16
|
type: buttonIcon,
|
|
@@ -5,8 +5,6 @@ export interface ButtonToggleProps extends Partial<StyledButtonToggleProps> {
|
|
|
5
5
|
"aria-label"?: string;
|
|
6
6
|
/** Prop to specify the aria-labelledby property of the component */
|
|
7
7
|
"aria-labelledby"?: string;
|
|
8
|
-
/** DEPRECATED: A synonym for pressed, to keep backwards compatibility. */
|
|
9
|
-
checked?: boolean;
|
|
10
8
|
/** Text to display for the button. */
|
|
11
9
|
children?: React.ReactNode;
|
|
12
10
|
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
@@ -17,8 +15,6 @@ export interface ButtonToggleProps extends Partial<StyledButtonToggleProps> {
|
|
|
17
15
|
"data-role"?: string;
|
|
18
16
|
/** DEPRECATED: Remove spacing from between buttons. */
|
|
19
17
|
grouped?: boolean;
|
|
20
|
-
/** An optional string by which to identify the button in an onChange handler on the parent ButtonToggleGroup. */
|
|
21
|
-
name?: string;
|
|
22
18
|
/** Callback triggered by blur event on the button. */
|
|
23
19
|
onBlur?: (ev: React.FocusEvent<HTMLButtonElement>) => void;
|
|
24
20
|
/** Callback triggered by focus event on the button. */
|
|
@@ -31,7 +27,7 @@ export interface ButtonToggleProps extends Partial<StyledButtonToggleProps> {
|
|
|
31
27
|
value?: string;
|
|
32
28
|
}
|
|
33
29
|
export declare const ButtonToggle: {
|
|
34
|
-
({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, buttonIcon, buttonIconSize,
|
|
30
|
+
({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, buttonIcon, buttonIconSize, children, "data-component": dataComponent, "data-element": dataElement, "data-role": dataRole, disabled, grouped, onBlur, onFocus, onClick, pressed, size, value, }: ButtonToggleProps): React.JSX.Element;
|
|
35
31
|
displayName: string;
|
|
36
32
|
};
|
|
37
33
|
export default ButtonToggle;
|
|
@@ -8,8 +8,6 @@ import { ButtonToggleGroupContext } from "./button-toggle-group/button-toggle-gr
|
|
|
8
8
|
import ButtonToggleIcon from "./button-toggle-icon.component";
|
|
9
9
|
import Logger from "../../__internal__/utils/logger";
|
|
10
10
|
import { InputGroupContext } from "../../__internal__/input-behaviour";
|
|
11
|
-
let deprecateCheckedWarnTriggered = false;
|
|
12
|
-
let deprecateNameWarnTriggered = false;
|
|
13
11
|
let deprecateUncontrolledWarnTriggered = false;
|
|
14
12
|
let deprecateGroupedWarnTriggered = false;
|
|
15
13
|
export const ButtonToggle = ({
|
|
@@ -17,14 +15,12 @@ export const ButtonToggle = ({
|
|
|
17
15
|
"aria-labelledby": ariaLabelledBy,
|
|
18
16
|
buttonIcon,
|
|
19
17
|
buttonIconSize = "small",
|
|
20
|
-
checked,
|
|
21
18
|
children,
|
|
22
19
|
"data-component": dataComponent,
|
|
23
20
|
"data-element": dataElement,
|
|
24
21
|
"data-role": dataRole,
|
|
25
22
|
disabled,
|
|
26
23
|
grouped,
|
|
27
|
-
name,
|
|
28
24
|
onBlur,
|
|
29
25
|
onFocus,
|
|
30
26
|
onClick,
|
|
@@ -33,20 +29,10 @@ export const ButtonToggle = ({
|
|
|
33
29
|
value
|
|
34
30
|
}) => {
|
|
35
31
|
!!!(children || buttonIcon) ? process.env.NODE_ENV !== "production" ? invariant(false, "Either prop `buttonIcon` must be defined, or this node must have children") : invariant(false) : void 0;
|
|
36
|
-
if (checked !== undefined && !deprecateCheckedWarnTriggered) {
|
|
37
|
-
deprecateCheckedWarnTriggered = true;
|
|
38
|
-
Logger.deprecate("The `checked` prop in `ButtonToggle` component is deprecated and will soon be removed. Please use `pressed` instead.");
|
|
39
|
-
}
|
|
40
|
-
if (name && !deprecateNameWarnTriggered) {
|
|
41
|
-
deprecateNameWarnTriggered = true;
|
|
42
|
-
Logger.deprecate(`The \`name\` prop in \`ButtonToggle\` component is deprecated and will soon be removed. It does not provide any functionality
|
|
43
|
-
since the component can no longer be used in an uncontrolled fashion.`);
|
|
44
|
-
}
|
|
45
32
|
if (grouped && !deprecateGroupedWarnTriggered) {
|
|
46
33
|
deprecateGroupedWarnTriggered = true;
|
|
47
34
|
Logger.deprecate("The `grouped` prop in `ButtonToggle` component is deprecated and will soon be removed. Spacing between buttons is no longer no removed.");
|
|
48
35
|
}
|
|
49
|
-
const pressedPropValue = pressed === undefined ? checked : pressed;
|
|
50
36
|
const buttonRef = useRef(null);
|
|
51
37
|
const {
|
|
52
38
|
onMouseEnter,
|
|
@@ -59,7 +45,6 @@ export const ButtonToggle = ({
|
|
|
59
45
|
handleKeyDown,
|
|
60
46
|
pressedButtonValue,
|
|
61
47
|
onChange,
|
|
62
|
-
name: groupName,
|
|
63
48
|
allowDeselect,
|
|
64
49
|
isInGroup,
|
|
65
50
|
isDisabled,
|
|
@@ -83,7 +68,7 @@ export const ButtonToggle = ({
|
|
|
83
68
|
if (allowDeselect && pressedButtonValue === value) {
|
|
84
69
|
newValue = undefined;
|
|
85
70
|
}
|
|
86
|
-
onChange(ev, newValue
|
|
71
|
+
onChange(ev, newValue);
|
|
87
72
|
}
|
|
88
73
|
if (value) {
|
|
89
74
|
onButtonClick(value);
|
|
@@ -109,7 +94,7 @@ export const ButtonToggle = ({
|
|
|
109
94
|
inputGroupOnBlur();
|
|
110
95
|
}
|
|
111
96
|
}
|
|
112
|
-
const isPressed = isInGroup ? pressedButtonValue === value :
|
|
97
|
+
const isPressed = isInGroup ? pressedButtonValue === value : pressed;
|
|
113
98
|
const isFirstButton = buttonRef.current === firstButton;
|
|
114
99
|
|
|
115
100
|
// if we're in a ButtonToggleGroup, only one button should be tabbable - the pressed button if there is one, or
|
|
@@ -55,6 +55,7 @@ export const CheckboxGroup = props => {
|
|
|
55
55
|
inline: inline
|
|
56
56
|
}), /*#__PURE__*/React.createElement(StyledCheckboxGroup, {
|
|
57
57
|
"data-component": "checkbox-group",
|
|
58
|
+
"data-role": "checkbox-group",
|
|
58
59
|
legendInline: legendInline,
|
|
59
60
|
inline: inline
|
|
60
61
|
}, /*#__PURE__*/React.createElement(CheckboxGroupContext.Provider, {
|
|
@@ -81,6 +82,7 @@ export const CheckboxGroup = props => {
|
|
|
81
82
|
blockGroupBehaviour: !(error || warning || info)
|
|
82
83
|
}, filterStyledSystemMarginProps(props)), /*#__PURE__*/React.createElement(StyledCheckboxGroup, {
|
|
83
84
|
"data-component": "checkbox-group",
|
|
85
|
+
"data-role": "checkbox-group",
|
|
84
86
|
legendInline: legendInline
|
|
85
87
|
}, /*#__PURE__*/React.createElement(CheckboxGroupContext.Provider, {
|
|
86
88
|
value: {
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import StyledCheckableInputSvgWrapper from "../../__internal__/checkable-input/checkable-input-svg-wrapper.style";
|
|
4
4
|
const CheckboxSvg = () => /*#__PURE__*/React.createElement(StyledCheckableInputSvgWrapper, null, /*#__PURE__*/React.createElement("svg", {
|
|
5
|
+
"data-role": "checkable-svg",
|
|
5
6
|
focusable: "false",
|
|
6
7
|
width: "12",
|
|
7
8
|
height: "10",
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import deDEDateLocale from "date-fns/locale/de";
|
|
2
|
+
const isSingular = count => (typeof count === "string" ? parseInt(count) : count) === 1;
|
|
3
|
+
const deDE = {
|
|
4
|
+
locale: () => "de-DE",
|
|
5
|
+
actions: {
|
|
6
|
+
edit: () => "Bearbeiten",
|
|
7
|
+
delete: () => "Löschen"
|
|
8
|
+
},
|
|
9
|
+
actionPopover: {
|
|
10
|
+
ariaLabel: () => "Aktionen"
|
|
11
|
+
},
|
|
12
|
+
advancedColorPicker: {
|
|
13
|
+
ariaLabel: () => "Farbe ändern",
|
|
14
|
+
currentColorDescriptionTerm: () => "Aktuell zugewiesene Farbe:",
|
|
15
|
+
currentColorAssigned: currentColor => currentColor
|
|
16
|
+
},
|
|
17
|
+
batchSelection: {
|
|
18
|
+
selected: count => `${count} ausgewählt`
|
|
19
|
+
},
|
|
20
|
+
breadcrumbs: {
|
|
21
|
+
ariaLabel: () => "Breadcrumbs"
|
|
22
|
+
},
|
|
23
|
+
confirm: {
|
|
24
|
+
no: () => "Nein",
|
|
25
|
+
yes: () => "Ja"
|
|
26
|
+
},
|
|
27
|
+
characterCount: {
|
|
28
|
+
tooManyCharacters: formattedCount => `${formattedCount} Zeichen zu viel`,
|
|
29
|
+
charactersLeft: formattedCount => `${formattedCount} Zeichen übrig`,
|
|
30
|
+
visuallyHiddenHint: formattedCount => `Sie können bis zu ${formattedCount} Zeichen eingeben.`
|
|
31
|
+
},
|
|
32
|
+
date: {
|
|
33
|
+
dateFnsLocale: () => deDEDateLocale,
|
|
34
|
+
ariaLabels: {
|
|
35
|
+
previousMonthButton: () => "Vorheriger Monat",
|
|
36
|
+
nextMonthButton: () => "Nächster Monat"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
dialog: {
|
|
40
|
+
ariaLabels: {
|
|
41
|
+
close: () => "Schließen"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
dialogFullScreen: {
|
|
45
|
+
ariaLabels: {
|
|
46
|
+
close: () => "Schließen"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
dismissibleBox: {
|
|
50
|
+
ariaLabels: {
|
|
51
|
+
close: () => "Schließen"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
errors: {
|
|
55
|
+
messages: {
|
|
56
|
+
formSummary: /* istanbul ignore next */
|
|
57
|
+
(errors, warnings, type) => {
|
|
58
|
+
const warningPlural = isSingular(warnings) ? "Warnung" : "Warnungen";
|
|
59
|
+
if (errors && warnings && type === "warning") {
|
|
60
|
+
return ["und", `${warnings} ${warningPlural}`];
|
|
61
|
+
}
|
|
62
|
+
if (errors) {
|
|
63
|
+
return ["Es gibt", `${errors} Fehler`];
|
|
64
|
+
}
|
|
65
|
+
if (warnings) {
|
|
66
|
+
return ["Es gibt", `${warnings} ${warningPlural}`];
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
fileInput: {
|
|
73
|
+
dragAndDrop: () => "oder per Drag & Drop ablegen",
|
|
74
|
+
selectFile: () => "Datei auswählen",
|
|
75
|
+
fileUploadStatus: () => "Status",
|
|
76
|
+
actions: {
|
|
77
|
+
cancel: () => "Upload abbrechen",
|
|
78
|
+
clear: () => "Löschen",
|
|
79
|
+
delete: () => "Datei löschen"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
heading: {
|
|
83
|
+
backLinkAriaLabel: () => "Zurück"
|
|
84
|
+
},
|
|
85
|
+
link: {
|
|
86
|
+
skipLinkLabel: () => "Zum Hauptinhalt springen"
|
|
87
|
+
},
|
|
88
|
+
loader: {
|
|
89
|
+
loading: () => "Laden"
|
|
90
|
+
},
|
|
91
|
+
loaderSpinner: {
|
|
92
|
+
loading: () => "Laden..."
|
|
93
|
+
},
|
|
94
|
+
menuFullscreen: {
|
|
95
|
+
ariaLabels: {
|
|
96
|
+
closeButton: () => "Schließen"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
message: {
|
|
100
|
+
closeButtonAriaLabel: () => "Schließen"
|
|
101
|
+
},
|
|
102
|
+
numeralDate: {
|
|
103
|
+
validation: {
|
|
104
|
+
day: (month, daysInMonth) => {
|
|
105
|
+
if (month && daysInMonth) {
|
|
106
|
+
return `Tag in ${month} muss eine Zahl von 1- ${daysInMonth} sein`;
|
|
107
|
+
}
|
|
108
|
+
return "Der Tag muss eine Zahl zwischen 1 und 31 sein.";
|
|
109
|
+
},
|
|
110
|
+
month: () => "Der Monat muss eine Zahl zwischen 1 und 12 sein.",
|
|
111
|
+
year: () => "Das Jahr muss eine Zahl zwischen 1000 und 2200 sein."
|
|
112
|
+
},
|
|
113
|
+
labels: {
|
|
114
|
+
day: () => "Tag",
|
|
115
|
+
month: () => "Monat",
|
|
116
|
+
year: () => "Jahr"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
pager: {
|
|
120
|
+
show: () => "Anzeigen",
|
|
121
|
+
records: (count, showNumber = true) => {
|
|
122
|
+
const noun = isSingular(count) ? "Element" : "Elemente";
|
|
123
|
+
return showNumber ? `${count} ${noun}` : noun;
|
|
124
|
+
},
|
|
125
|
+
first: () => "Erste",
|
|
126
|
+
last: () => "Letzte",
|
|
127
|
+
next: () => "Weiter",
|
|
128
|
+
previous: () => "Vorherige",
|
|
129
|
+
pageX: () => "Seite",
|
|
130
|
+
ofY: count => `von ${count}`
|
|
131
|
+
},
|
|
132
|
+
password: {
|
|
133
|
+
ariaLiveShownMessage: () => "Ihr Passwort wurde angezeigt. Bewegen Sie den Cursor über das Passwort, um es sich vorlesen zu lassen, wenn dies sicher ist.",
|
|
134
|
+
ariaLiveHiddenMessage: () => "Ihr Passwort ist derzeit ausgeblendet."
|
|
135
|
+
},
|
|
136
|
+
progressTracker: {
|
|
137
|
+
of: () => "von"
|
|
138
|
+
},
|
|
139
|
+
pod: {
|
|
140
|
+
undo: () => "Rückgängig"
|
|
141
|
+
},
|
|
142
|
+
search: {
|
|
143
|
+
searchButtonText: () => "Suchen"
|
|
144
|
+
},
|
|
145
|
+
select: {
|
|
146
|
+
actionButtonText: () => "Neues Element hinzufügen",
|
|
147
|
+
placeholder: () => "Bitte auswählen...",
|
|
148
|
+
noResultsForTerm: term => `Es wurden keine Ergebnisse für ${term} gefunden.`
|
|
149
|
+
},
|
|
150
|
+
sidebar: {
|
|
151
|
+
ariaLabels: {
|
|
152
|
+
close: () => "Schließen"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
sort: {
|
|
156
|
+
accessibleName: (sortContent, sortType) => `Alle ${sortContent || "inhalte"}${sortType ? ` in der Reihenfolge ${sortType === "ascending" ? "aufsteigend" : "absteigend"} sortieren.` : " in der Reihenfolge aufsteigend oder absteigend sortieren."}`
|
|
157
|
+
},
|
|
158
|
+
splitButton: {
|
|
159
|
+
ariaLabel: () => "Mehr anzeigen"
|
|
160
|
+
},
|
|
161
|
+
stepFlow: {
|
|
162
|
+
stepLabel: (currentStep, totalSteps) => `Schritt ${currentStep} von ${totalSteps}`,
|
|
163
|
+
screenReaderOnlyTitle: (title, currentStep, totalSteps, category) => `${category ? `${category}.` : ""} ${title}. Schritt ${currentStep} von ${totalSteps}.`,
|
|
164
|
+
closeIconAriaLabel: () => "Schließen"
|
|
165
|
+
},
|
|
166
|
+
switch: {
|
|
167
|
+
on: () => "EIN",
|
|
168
|
+
off: () => "AUS"
|
|
169
|
+
},
|
|
170
|
+
textEditor: {
|
|
171
|
+
tooltipMessages: {
|
|
172
|
+
bold: () => "Fett",
|
|
173
|
+
italic: () => "Kursiv",
|
|
174
|
+
bulletList: () => "Aufzählung mit Punkten",
|
|
175
|
+
numberList: () => "Nummerierte Liste"
|
|
176
|
+
},
|
|
177
|
+
ariaLabels: {
|
|
178
|
+
bold: () => "fett",
|
|
179
|
+
italic: () => "kursiv",
|
|
180
|
+
bulletList: () => "Aufzählung mit Punkten",
|
|
181
|
+
numberList: () => "Nummerierte Liste"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
tileSelect: {
|
|
185
|
+
deselect: () => "Auswahl aufheben"
|
|
186
|
+
},
|
|
187
|
+
time: {
|
|
188
|
+
amText: () => "AM",
|
|
189
|
+
pmText: () => "PM",
|
|
190
|
+
hoursLabelText: () => "h",
|
|
191
|
+
minutesLabelText: () => "min",
|
|
192
|
+
hoursAriaLabelText: () => "Stunden",
|
|
193
|
+
minutesAriaLabelText: () => "Minuten"
|
|
194
|
+
},
|
|
195
|
+
toast: {
|
|
196
|
+
ariaLabels: {
|
|
197
|
+
close: () => "Schließen"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
verticalMenuFullScreen: {
|
|
201
|
+
ariaLabels: {
|
|
202
|
+
close: () => "Schließen"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
export default deDE;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import enCADateLocale from "date-fns/locale/en-CA";
|
|
2
|
+
const enCA = {
|
|
3
|
+
locale: () => "en-CA",
|
|
4
|
+
date: {
|
|
5
|
+
dateFnsLocale: () => enCADateLocale,
|
|
6
|
+
ariaLabels: {
|
|
7
|
+
previousMonthButton: () => "Previous month",
|
|
8
|
+
nextMonthButton: () => "Next month"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export default enCA;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import enUSDateLocale from "date-fns/locale/en-US";
|
|
2
|
+
const enUS = {
|
|
3
|
+
locale: () => "en-US",
|
|
4
|
+
date: {
|
|
5
|
+
dateFnsLocale: () => enUSDateLocale,
|
|
6
|
+
ariaLabels: {
|
|
7
|
+
previousMonthButton: () => "Previous month",
|
|
8
|
+
nextMonthButton: () => "Next month"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export default enUS;
|