@plesk/ui-library 3.44.0 → 3.45.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.
Files changed (175) hide show
  1. package/cjs/components/Action/Action.js +0 -6
  2. package/cjs/components/Alert/Alert.js +5 -1
  3. package/cjs/components/Button/Button.js +2 -0
  4. package/cjs/components/Carousel/Carousel.js +9 -4
  5. package/cjs/components/ComboBox/ComboBox.js +3 -0
  6. package/cjs/components/ComboBoxDropdown/ComboBoxDropdown.js +6 -2
  7. package/cjs/components/ComboBoxDropdown/index.js +6 -0
  8. package/cjs/components/Dialog/Dialog.js +3 -0
  9. package/cjs/components/Drawer/Header.js +5 -0
  10. package/cjs/components/Dropdown/Dropdown.js +3 -0
  11. package/cjs/components/Form/Form.js +3 -1
  12. package/cjs/components/FormField/FormField.js +9 -5
  13. package/cjs/components/FormFieldPassword/FormFieldPassword.js +9 -11
  14. package/cjs/components/InPlaceEdit/Editor.js +6 -7
  15. package/cjs/components/InPlaceEdit/InPlaceEdit.js +4 -4
  16. package/cjs/components/InputFile/InputFile.js +4 -4
  17. package/cjs/components/InputNumber/InputNumber.js +4 -0
  18. package/cjs/components/Layout/Layout.js +8 -0
  19. package/cjs/components/List/List.js +11 -6
  20. package/cjs/components/List/ListActions.js +5 -0
  21. package/cjs/components/LocaleProvider/LocaleProvider.js +13 -3
  22. package/cjs/components/Menu/MenuItem.js +4 -0
  23. package/cjs/components/Overlay/Overlay.js +1 -0
  24. package/cjs/components/Panel/Panel.js +3 -0
  25. package/cjs/components/Popover/Popover.js +3 -0
  26. package/cjs/components/Section/Section.js +4 -0
  27. package/cjs/components/Select/Select.js +12 -1
  28. package/cjs/components/Select/SelectControl.js +24 -7
  29. package/cjs/components/Spinner/Spinner.js +1 -0
  30. package/cjs/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -0
  31. package/cjs/components/Tabs/SearchBar.js +7 -0
  32. package/cjs/components/Tabs/TabClose.js +3 -0
  33. package/cjs/components/Toast/Toast.js +3 -0
  34. package/cjs/components/Tooltip/Tooltip.js +92 -202
  35. package/cjs/components/Tooltip/TooltipContent.js +83 -0
  36. package/cjs/components/Tooltip/getA11yAttributes.js +30 -0
  37. package/cjs/components/Tooltip/useVirtualElement.js +35 -0
  38. package/cjs/components/utils.js +42 -2
  39. package/cjs/hooks/useEscapeKeydown.js +25 -0
  40. package/cjs/index.js +1 -1
  41. package/cjs/locales/ar.js +66 -4
  42. package/cjs/locales/ca-ES.js +66 -4
  43. package/cjs/locales/cs-CZ.js +66 -4
  44. package/cjs/locales/da-DK.js +66 -4
  45. package/cjs/locales/de-DE.js +66 -4
  46. package/cjs/locales/el-GR.js +66 -4
  47. package/cjs/locales/en-US.js +66 -4
  48. package/cjs/locales/es-ES.js +66 -4
  49. package/cjs/locales/fi-FI.js +66 -4
  50. package/cjs/locales/fr-FR.js +66 -4
  51. package/cjs/locales/he-IL.js +66 -4
  52. package/cjs/locales/hu-HU.js +66 -4
  53. package/cjs/locales/id-ID.js +66 -4
  54. package/cjs/locales/it-IT.js +66 -4
  55. package/cjs/locales/ja-JP.js +66 -4
  56. package/cjs/locales/ko-KR.js +66 -4
  57. package/cjs/locales/ms-MY.js +66 -4
  58. package/cjs/locales/nb-NO.js +66 -4
  59. package/cjs/locales/nl-NL.js +66 -4
  60. package/cjs/locales/pl-PL.js +66 -4
  61. package/cjs/locales/pt-BR.js +66 -4
  62. package/cjs/locales/pt-PT.js +66 -4
  63. package/cjs/locales/ro-RO.js +66 -4
  64. package/cjs/locales/ru-RU.js +66 -4
  65. package/cjs/locales/sv-SE.js +66 -4
  66. package/cjs/locales/th-TH.js +66 -4
  67. package/cjs/locales/tl-PH.js +66 -4
  68. package/cjs/locales/tr-TR.js +66 -4
  69. package/cjs/locales/uk-UA.js +66 -4
  70. package/cjs/locales/vi-VN.js +66 -4
  71. package/cjs/locales/zh-CN.js +66 -4
  72. package/cjs/locales/zh-TW.js +66 -4
  73. package/cjs/utils.js +2 -17
  74. package/dist/plesk-ui-library-rtl.css +1 -1
  75. package/dist/plesk-ui-library-rtl.css.map +1 -1
  76. package/dist/plesk-ui-library.css +1 -1
  77. package/dist/plesk-ui-library.css.map +1 -1
  78. package/dist/plesk-ui-library.js +7632 -3008
  79. package/dist/plesk-ui-library.js.map +1 -1
  80. package/dist/plesk-ui-library.min.js +6 -6
  81. package/dist/plesk-ui-library.min.js.map +1 -1
  82. package/esm/components/Action/Action.js +0 -6
  83. package/esm/components/Alert/Alert.js +5 -1
  84. package/esm/components/Button/Button.js +2 -0
  85. package/esm/components/Carousel/Carousel.js +9 -4
  86. package/esm/components/ComboBox/ComboBox.js +3 -0
  87. package/esm/components/ComboBoxDropdown/ComboBoxDropdown.js +4 -1
  88. package/esm/components/ComboBoxDropdown/index.js +1 -1
  89. package/esm/components/Dialog/Dialog.js +3 -0
  90. package/esm/components/Drawer/Header.js +5 -0
  91. package/esm/components/Dropdown/Dropdown.js +3 -0
  92. package/esm/components/Form/Form.js +3 -1
  93. package/esm/components/FormField/FormField.js +9 -5
  94. package/esm/components/FormFieldPassword/FormFieldPassword.js +9 -11
  95. package/esm/components/InPlaceEdit/Editor.js +6 -7
  96. package/esm/components/InPlaceEdit/InPlaceEdit.js +4 -4
  97. package/esm/components/InputFile/InputFile.js +4 -4
  98. package/esm/components/InputNumber/InputNumber.js +4 -0
  99. package/esm/components/Layout/Layout.js +8 -0
  100. package/esm/components/List/List.js +11 -6
  101. package/esm/components/List/ListActions.js +5 -0
  102. package/esm/components/LocaleProvider/LocaleProvider.js +11 -2
  103. package/esm/components/Menu/MenuItem.js +5 -1
  104. package/esm/components/Overlay/Overlay.js +2 -1
  105. package/esm/components/Panel/Panel.js +3 -0
  106. package/esm/components/Popover/Popover.js +3 -0
  107. package/esm/components/Section/Section.js +4 -0
  108. package/esm/components/Select/Select.js +13 -2
  109. package/esm/components/Select/SelectControl.js +24 -7
  110. package/esm/components/Spinner/Spinner.js +1 -0
  111. package/esm/components/SwitchesPanelItem/SwitchesPanelItem.js +3 -0
  112. package/esm/components/Tabs/SearchBar.js +7 -0
  113. package/esm/components/Tabs/TabClose.js +3 -0
  114. package/esm/components/Toast/Toast.js +3 -0
  115. package/esm/components/Tooltip/Tooltip.js +94 -204
  116. package/esm/components/Tooltip/TooltipContent.js +75 -0
  117. package/esm/components/Tooltip/getA11yAttributes.js +23 -0
  118. package/esm/components/Tooltip/useVirtualElement.js +28 -0
  119. package/esm/components/utils.js +37 -1
  120. package/esm/hooks/useEscapeKeydown.js +18 -0
  121. package/esm/index.js +1 -1
  122. package/esm/locales/ar.js +66 -4
  123. package/esm/locales/ca-ES.js +66 -4
  124. package/esm/locales/cs-CZ.js +66 -4
  125. package/esm/locales/da-DK.js +66 -4
  126. package/esm/locales/de-DE.js +66 -4
  127. package/esm/locales/el-GR.js +66 -4
  128. package/esm/locales/en-US.js +66 -4
  129. package/esm/locales/es-ES.js +66 -4
  130. package/esm/locales/fi-FI.js +66 -4
  131. package/esm/locales/fr-FR.js +66 -4
  132. package/esm/locales/he-IL.js +66 -4
  133. package/esm/locales/hu-HU.js +66 -4
  134. package/esm/locales/id-ID.js +66 -4
  135. package/esm/locales/it-IT.js +66 -4
  136. package/esm/locales/ja-JP.js +66 -4
  137. package/esm/locales/ko-KR.js +66 -4
  138. package/esm/locales/ms-MY.js +66 -4
  139. package/esm/locales/nb-NO.js +66 -4
  140. package/esm/locales/nl-NL.js +66 -4
  141. package/esm/locales/pl-PL.js +66 -4
  142. package/esm/locales/pt-BR.js +66 -4
  143. package/esm/locales/pt-PT.js +66 -4
  144. package/esm/locales/ro-RO.js +66 -4
  145. package/esm/locales/ru-RU.js +66 -4
  146. package/esm/locales/sv-SE.js +66 -4
  147. package/esm/locales/th-TH.js +66 -4
  148. package/esm/locales/tl-PH.js +66 -4
  149. package/esm/locales/tr-TR.js +66 -4
  150. package/esm/locales/uk-UA.js +66 -4
  151. package/esm/locales/vi-VN.js +66 -4
  152. package/esm/locales/zh-CN.js +66 -4
  153. package/esm/locales/zh-TW.js +66 -4
  154. package/esm/utils.js +0 -14
  155. package/package.json +7 -6
  156. package/styleguide/build/bundle.1771d6b7.js +2 -0
  157. package/styleguide/index.html +2 -2
  158. package/types/components/Button/Button.d.ts +6 -0
  159. package/types/components/ComboBoxDropdown/ComboBoxDropdown.d.ts +1 -0
  160. package/types/components/ComboBoxDropdown/index.d.ts +1 -1
  161. package/types/components/Dropdown/Dropdown.d.ts +5 -0
  162. package/types/components/Layout/Layout.d.ts +1 -0
  163. package/types/components/List/ListActions.d.ts +6 -1
  164. package/types/components/LocaleProvider/LocaleProvider.d.ts +3 -0
  165. package/types/components/Select/Select.d.ts +4 -0
  166. package/types/components/Select/SelectControl.d.ts +4 -0
  167. package/types/components/Tooltip/Tooltip.d.ts +15 -26
  168. package/types/components/Tooltip/TooltipContent.d.ts +11 -0
  169. package/types/components/Tooltip/getA11yAttributes.d.ts +19 -0
  170. package/types/components/Tooltip/useVirtualElement.d.ts +3 -0
  171. package/types/components/utils.d.ts +8 -1
  172. package/types/hooks/useEscapeKeydown.d.ts +1 -0
  173. package/types/utils.d.ts +0 -3
  174. package/styleguide/build/bundle.cf3363eb.js +0 -2
  175. /package/styleguide/build/{bundle.cf3363eb.js.LICENSE.txt → bundle.1771d6b7.js.LICENSE.txt} +0 -0
@@ -98,10 +98,19 @@ export const useTranslate = namespace => {
98
98
  return useCallback(
99
99
  // eslint-disable-next-line max-params
100
100
  (key, params, fallback, defaultMessages) => {
101
- const lmsg = context?.locale.lmsg ?? createTranslate({});
102
- return lmsg(namespace ? `${namespace}.${key}` : key, params, fallback, defaultMessages);
101
+ if (context || defaultMessages) {
102
+ const lmsg = context?.locale.lmsg ?? createTranslate({});
103
+ return lmsg(namespace ? `${namespace}.${key}` : key, params, fallback, defaultMessages);
104
+ }
105
+ return typeof fallback === 'string' ? applyParams(fallback, params) : `[${key}]`;
103
106
  }, [context, namespace]);
104
107
  };
108
+ /** Internal function to support legacy class components */
109
+ export const getInternalTranslate = namespace => {
110
+ const defaultMessages = getLocaleMessages();
111
+ const lmsg = createTranslate(defaultMessages ?? {});
112
+ return (key, params) => lmsg(namespace ? `${namespace}.${key}` : key, params);
113
+ };
105
114
  export const useInternalTranslate = namespace => {
106
115
  const translate = useTranslate(namespace);
107
116
  const defaultMessages = getLocaleMessages();
@@ -4,7 +4,7 @@ import { cloneElement } from 'react';
4
4
  import classNames from 'classnames';
5
5
  import Tooltip from '../Tooltip';
6
6
  import { CLS_PREFIX } from '../../constants';
7
- import { createProxyProps } from '../utils';
7
+ import { createKeyboardClickAdapter, createProxyProps } from '../utils';
8
8
  import MenuBaseItem from './MenuBaseItem';
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  /**
@@ -41,6 +41,10 @@ const MenuItem = _ref => {
41
41
  icon: icon,
42
42
  label: label,
43
43
  ...props,
44
+ onKeyDown: createKeyboardClickAdapter({
45
+ disabled,
46
+ existingHandler: props.onKeyDown
47
+ }),
44
48
  children: children
45
49
  });
46
50
  if (tooltip) {
@@ -3,7 +3,7 @@
3
3
  import { disableDocumentScroll, enableDocumentScroll } from '../../utils';
4
4
  import { isValidElement, useRef, useState, useLayoutEffect, useCallback, useEffect } from 'react';
5
5
  import { CSSTransition } from 'react-transition-group';
6
- import { safeInvoke } from '../utils';
6
+ import { safeInvoke, setFocusReturned } from '../utils';
7
7
  import classNames from 'classnames';
8
8
  import { CLS_PREFIX, Z_INDEX_OVERLAY } from '../../constants';
9
9
  import Layer from '../Layer';
@@ -147,6 +147,7 @@ const Overlay = _ref2 => {
147
147
  if (!isOpenRef.current) return;
148
148
  isOpenRef.current = false;
149
149
  if (--overlaysCount === 0) enableDocumentScroll();
150
+ setFocusReturned(prevFocusElementRef.current, 300);
150
151
  prevFocusElementRef.current?.focus();
151
152
  }, []);
152
153
  useEffect(() => {
@@ -8,6 +8,7 @@ import { isLikeText } from '../Translate';
8
8
  import Heading from '../Heading';
9
9
  import Button from '../Button';
10
10
  import { isClickable } from '../utils';
11
+ import { useInternalTranslate } from '../LocaleProvider';
11
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
13
  /**
13
14
  * `Panel` component is used for visually grouping some content.
@@ -25,6 +26,7 @@ const Panel = _ref => {
25
26
  extra,
26
27
  ...props
27
28
  } = _ref;
29
+ const translate = useInternalTranslate('Panel');
28
30
  const rootRef = useRef(null);
29
31
  const isControlled = externalCollapsed !== undefined;
30
32
  const [internalCollapsed, setInternalCollapsed] = useState(false);
@@ -61,6 +63,7 @@ const Panel = _ref => {
61
63
  className: `${baseClassName}__extra`,
62
64
  children: [extra, collapsible && /*#__PURE__*/_jsx(Button, {
63
65
  ghost: true,
66
+ "aria-label": translate(collapsed ? 'expand' : 'collapse'),
64
67
  className: `${baseClassName}__control-button`,
65
68
  icon: {
66
69
  name: 'chevron-up',
@@ -14,7 +14,9 @@ import { wrapFunction } from '../utils';
14
14
  import OnDarkContext from '../OnDarkContext';
15
15
  import FocusTrap from '../FocusTrap';
16
16
  import { cloneElement, Component, createRef } from 'react';
17
+ import { getInternalTranslate } from '../LocaleProvider';
17
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
+ const translate = getInternalTranslate('Popover');
18
20
  const PLACEMENT_MAP = {
19
21
  'top-left': 'top-end',
20
22
  'top-right': 'top-start',
@@ -213,6 +215,7 @@ class Popover extends Component {
213
215
  }
214
216
  }
215
217
  const close = /*#__PURE__*/_jsx(Button, {
218
+ "aria-label": translate('closeButton'),
216
219
  className: classNames(`${baseClassName}__close`, title && `${baseClassName}__close--heading`),
217
220
  onClick: this.handleClose,
218
221
  ghost: true,
@@ -10,6 +10,7 @@ import VerticalContext from '../VerticalContext';
10
10
  import SectionContext from './SectionContext';
11
11
  import { useCollapsed } from './useCollapsed';
12
12
  import { useVertical } from './useVertical';
13
+ import { useInternalTranslate } from '../LocaleProvider';
13
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
15
  export const SECTION_BASE_CLASS_NAME = `${CLS_PREFIX}section`;
15
16
 
@@ -34,6 +35,7 @@ const Section = _ref => {
34
35
  children,
35
36
  ...props
36
37
  } = _ref;
38
+ const translate = useInternalTranslate('Section');
37
39
  const containerRef = useRef(null);
38
40
  const collapseButtonRef = useRef(null);
39
41
  const vertical = useVertical(externalVertical, containerRef);
@@ -67,6 +69,7 @@ const Section = _ref => {
67
69
  children: [title && /*#__PURE__*/_jsxs("div", {
68
70
  className: `${baseClassName}__header`,
69
71
  children: [collapsible && /*#__PURE__*/_jsx(Button, {
72
+ "aria-label": translate(collapsed ? 'expand' : 'collapse'),
70
73
  ref: collapseButtonRef,
71
74
  ghost: true,
72
75
  className: classNames(`${baseClassName}__control-button`, `${baseClassName}__control-button--collapse`),
@@ -90,6 +93,7 @@ const Section = _ref => {
90
93
  className: `${baseClassName}__header-buttons`,
91
94
  children: [buttons, onClose && /*#__PURE__*/_jsx(Button, {
92
95
  ghost: true,
96
+ "aria-label": translate('closeButton'),
93
97
  className: classNames(`${baseClassName}__control-button`, `${baseClassName}__control-button--close`),
94
98
  onClick: onClose,
95
99
  icon: "cross-mark"
@@ -4,7 +4,7 @@ import { Children, useState, useRef, isValidElement, useId } from 'react';
4
4
  import classNames from 'classnames';
5
5
  import { safeInvoke, EventEmitter } from '../utils';
6
6
  import { CLS_PREFIX } from '../../constants';
7
- import ComboBoxDropdown, { findNextSafeIndex } from '../ComboBoxDropdown';
7
+ import ComboBoxDropdown, { findNextSafeIndex, getOptionId } from '../ComboBoxDropdown';
8
8
  import { InternalTranslate } from '../Translate';
9
9
  import SelectControl from './SelectControl';
10
10
  import SelectOptionGroup from './SelectOptionGroup';
@@ -85,6 +85,10 @@ const getNextValue = (value, prevValue) => {
85
85
  }
86
86
  return value;
87
87
  };
88
+ const getActiveDescendant = (options, listboxId, highlightedIndex) => {
89
+ const option = options[highlightedIndex];
90
+ return option?.props?.id ?? getOptionId(listboxId, highlightedIndex);
91
+ };
88
92
  /**
89
93
  * `Select` component is used for making a choice among a set of related options.
90
94
  * @since 2.3.0
@@ -105,13 +109,16 @@ const Select = _ref => {
105
109
  clearable = false,
106
110
  multiple = false,
107
111
  placeholder,
112
+ 'aria-label': ariaLabel,
113
+ 'aria-labelledby': ariaLabelledBy,
108
114
  ...props
109
115
  } = _ref;
110
116
  const [opened, setOpened] = useState(false);
111
117
  const controlRef = useRef(null);
112
118
  const emitterRef = useRef(new EventEmitter());
113
119
  const uid = useId();
114
- const listboxId = `${baseClassName}-listbox-${id || uid}`;
120
+ const ariaId = id || uid;
121
+ const listboxId = `${baseClassName}-listbox-${ariaId}`;
115
122
  let [value, setValue] = useState(() => {
116
123
  if (typeof defaultValue === 'undefined') {
117
124
  return multiple ? [] : undefined;
@@ -289,7 +296,11 @@ const Select = _ref => {
289
296
  onValueRemove: handleValueRemove,
290
297
  placeholder: placeholder,
291
298
  opened: opened,
299
+ ariaId: ariaId,
292
300
  listboxId: listboxId,
301
+ "aria-label": ariaLabel,
302
+ "aria-labelledby": ariaLabelledBy,
303
+ "aria-activedescendant": opened ? getActiveDescendant(options, listboxId, highlightedIndex) : undefined,
293
304
  ref: controlRef
294
305
  });
295
306
  return /*#__PURE__*/_jsx(ComboBoxDropdown, {
@@ -51,7 +51,11 @@ const SelectControl = /*#__PURE__*/forwardRef(function SelectControl(_ref, ref)
51
51
  onValueRemove,
52
52
  placeholder,
53
53
  opened = false,
54
+ ariaId,
54
55
  listboxId,
56
+ 'aria-label': ariaLabel,
57
+ 'aria-labelledby': ariaLabelledBy,
58
+ 'aria-activedescendant': ariaActiveDescendant,
55
59
  ...props
56
60
  } = _ref;
57
61
  const inputRef = useRef(null);
@@ -75,6 +79,7 @@ const SelectControl = /*#__PURE__*/forwardRef(function SelectControl(_ref, ref)
75
79
  values = [current.value];
76
80
  }
77
81
  const hasValue = values.length > 0;
82
+ const valueId = `${ariaId}-value`;
78
83
  useLayoutEffect(() => {
79
84
  if (filterValue === '') {
80
85
  setInputWidth(DEFAULT_INPUT_WIDTH);
@@ -102,6 +107,15 @@ const SelectControl = /*#__PURE__*/forwardRef(function SelectControl(_ref, ref)
102
107
  };
103
108
  const handleKeyDown = e => {
104
109
  switch (e.key) {
110
+ case ' ':
111
+ if (searchable) break;
112
+ e.preventDefault();
113
+ if (opened) {
114
+ onHighlightConfirm();
115
+ } else {
116
+ onHighlightChange(0);
117
+ }
118
+ break;
105
119
  case 'ArrowUp':
106
120
  e.preventDefault();
107
121
  onHighlightChange(-1);
@@ -164,6 +178,7 @@ const SelectControl = /*#__PURE__*/forwardRef(function SelectControl(_ref, ref)
164
178
  onClick: handleClick,
165
179
  ref: ref,
166
180
  children: [/*#__PURE__*/_jsxs("span", {
181
+ id: valueId,
167
182
  className: `${baseClassName}__value-container`,
168
183
  children: [Array.isArray(current) && current.map(_ref3 => {
169
184
  let {
@@ -193,12 +208,15 @@ const SelectControl = /*#__PURE__*/forwardRef(function SelectControl(_ref, ref)
193
208
  style: {
194
209
  width: inputWidth
195
210
  },
196
- role: searchable ? 'combobox' : undefined,
197
- "aria-autocomplete": searchable ? 'list' : undefined,
198
- "aria-haspopup": searchable ? 'listbox' : 'listbox',
211
+ role: "combobox",
212
+ "aria-haspopup": "listbox",
199
213
  "aria-expanded": opened,
200
214
  "aria-controls": listboxId,
201
- autoComplete: "off"
215
+ "aria-autocomplete": searchable ? 'list' : undefined,
216
+ "aria-activedescendant": ariaActiveDescendant,
217
+ "aria-label": ariaLabel,
218
+ "aria-labelledby": ariaLabelledBy,
219
+ "aria-describedby": hasValue ? valueId : undefined
202
220
  }), !filterValue && /*#__PURE__*/_jsxs(Fragment, {
203
221
  children: [!Array.isArray(current) && current && /*#__PURE__*/_jsx("span", {
204
222
  className: `${baseClassName}__value`,
@@ -211,6 +229,7 @@ const SelectControl = /*#__PURE__*/forwardRef(function SelectControl(_ref, ref)
211
229
  }), /*#__PURE__*/_jsxs("span", {
212
230
  className: `${baseClassName}__indicators`,
213
231
  children: [clearable && hasValue && /*#__PURE__*/_jsx("button", {
232
+ "aria-label": translate('clearButton'),
214
233
  type: "button",
215
234
  className: classNames(`${baseClassName}__indicator`, `${baseClassName}__indicator--clear`),
216
235
  tabIndex: -1,
@@ -235,14 +254,12 @@ const SelectControl = /*#__PURE__*/forwardRef(function SelectControl(_ref, ref)
235
254
  type: "button",
236
255
  className: classNames(`${baseClassName}__indicator`, `${baseClassName}__indicator--dropdown`),
237
256
  tabIndex: -1,
238
- "aria-haspopup": "listbox",
239
- "aria-expanded": opened,
257
+ "aria-hidden": "true",
240
258
  children: /*#__PURE__*/_jsx(Icon, {
241
259
  className: `${baseClassName}__indicator-icon`,
242
260
  children: /*#__PURE__*/_jsx("svg", {
243
261
  xmlns: "http://www.w3.org/2000/svg",
244
262
  viewBox: "-4 -5 16 16",
245
- "aria-hidden": "true",
246
263
  focusable: "false",
247
264
  children: /*#__PURE__*/_jsx("path", {
248
265
  d: "M4 4.048L.847.895a.496.496 0 1 0-.702.702l3.452 3.451a.5.5 0 0 0 .806 0l3.452-3.451a.496.496 0 0 0-.702-.702L4 4.048z"
@@ -14,6 +14,7 @@ const Spinner = _ref => {
14
14
  ...props
15
15
  } = _ref;
16
16
  return /*#__PURE__*/_jsx("svg", {
17
+ "aria-hidden": true,
17
18
  className: classNames(baseClassName, className, {
18
19
  [`${baseClassName}--color-animation`]: colorAnimation
19
20
  }),
@@ -5,6 +5,7 @@ import { CLS_PREFIX } from '../../constants';
5
5
  import Switch from '../Switch';
6
6
  import Action from '../Action';
7
7
  import Popover from '../Popover';
8
+ import { useInternalTranslate } from '../LocaleProvider';
8
9
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
10
  /**
10
11
  * `SwitchesPanelItem` component is used for combining [Switch](#!/Switch) component with text title and description.
@@ -25,6 +26,7 @@ const SwitchesPanelItem = _ref => {
25
26
  baseClassName = `${CLS_PREFIX}switches-panel-item`,
26
27
  ...props
27
28
  } = _ref;
29
+ const translate = useInternalTranslate('SwitchesPanelItem');
28
30
  return /*#__PURE__*/_jsxs("div", {
29
31
  className: classNames(baseClassName, {
30
32
  [`${baseClassName}--${intent}`]: intent
@@ -49,6 +51,7 @@ const SwitchesPanelItem = _ref => {
49
51
  children: [children, fullDescription && /*#__PURE__*/_jsx(Popover, {
50
52
  intent: "info",
51
53
  target: /*#__PURE__*/_jsx(Action, {
54
+ "aria-label": translate('showDescription'),
52
55
  icon: "question-mark-circle",
53
56
  outerProps: {
54
57
  className: `${baseClassName}__full-description-toggle`
@@ -12,7 +12,10 @@ import Input from '../Input';
12
12
  import Menu, { MenuItem, MenuSelectableItem } from '../Menu';
13
13
  import ResponsiveContext from '../ResponsiveContext';
14
14
  import { safeInvoke } from '../utils';
15
+ import { getInternalTranslate } from '../LocaleProvider';
15
16
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
+ const translate = getInternalTranslate('SearchBar');
18
+
16
19
  /**
17
20
  * `SearchBar` component is used for providing type-as-you-go search.
18
21
  * @since 0.0.58
@@ -351,6 +354,7 @@ class SearchBar extends Component {
351
354
  intent: "info",
352
355
  hidden: !value,
353
356
  children: /*#__PURE__*/_jsx(Button, {
357
+ "aria-label": translate('expandSearch'),
354
358
  icon: "search",
355
359
  onClick: this.handleExpand
356
360
  })
@@ -367,6 +371,7 @@ class SearchBar extends Component {
367
371
  ...inputProps,
368
372
  value: value,
369
373
  prefix: (collapsable && !isCollapsed || distractionFreeModeEnabled) && /*#__PURE__*/_jsx(Button, {
374
+ "aria-label": translate('collapseSearch'),
370
375
  icon: {
371
376
  name: 'chevron-right',
372
377
  flipHorizontal: isRtl()
@@ -376,10 +381,12 @@ class SearchBar extends Component {
376
381
  }),
377
382
  suffix: /*#__PURE__*/_jsxs(_Fragment, {
378
383
  children: [value && /*#__PURE__*/_jsx(Button, {
384
+ "aria-label": translate('clearButton'),
379
385
  icon: "remove",
380
386
  onClick: this.handleReset,
381
387
  ghost: true
382
388
  }), /*#__PURE__*/_jsx(Button, {
389
+ "aria-label": translate('searchButton'),
383
390
  icon: "search",
384
391
  onClick: this.handleSearch,
385
392
  state: loading ? 'loading' : undefined,
@@ -1,6 +1,7 @@
1
1
  // Copyright 1999-2025. WebPros International GmbH. All rights reserved.
2
2
 
3
3
  import Icon from '../Icon';
4
+ import { useInternalTranslate } from '../LocaleProvider';
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  const TabClose = _ref => {
6
7
  let {
@@ -8,10 +9,12 @@ const TabClose = _ref => {
8
9
  onClose,
9
10
  baseClassName
10
11
  } = _ref;
12
+ const translate = useInternalTranslate('Tabs');
11
13
  if (typeof onClose !== 'function') {
12
14
  return null;
13
15
  }
14
16
  return /*#__PURE__*/_jsx("button", {
17
+ "aria-label": translate('closeButton'),
15
18
  className: `${baseClassName}__${tabMode}-close`,
16
19
  type: "button",
17
20
  onClick: e => {
@@ -7,6 +7,7 @@ import Button from '../Button';
7
7
  import { intentIconMap } from '../intentIconMap';
8
8
  import OnDarkContext from '../OnDarkContext';
9
9
  import { useAutoClose } from './useAutoClose';
10
+ import { useInternalTranslate } from '../LocaleProvider';
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  const Toast = _ref => {
12
13
  let {
@@ -26,6 +27,7 @@ const Toast = _ref => {
26
27
  groupKey,
27
28
  ...props
28
29
  } = _ref;
30
+ const translate = useInternalTranslate('Toast');
29
31
  useAutoClose({
30
32
  autoClosable,
31
33
  autoCloseTimeout,
@@ -49,6 +51,7 @@ const Toast = _ref => {
49
51
  className: `${baseClassName}__action`,
50
52
  children: /*#__PURE__*/_jsx(Button, {
51
53
  ghost: true,
54
+ "aria-label": translate('closeButton'),
52
55
  icon: {
53
56
  name: 'cross-mark',
54
57
  size: '12'