@ozen-ui/kit 0.41.0 → 0.42.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 (57) hide show
  1. package/README.md +1 -1
  2. package/__inner__/cjs/components/Autocomplete/helper.d.ts +2 -0
  3. package/__inner__/cjs/components/Autocomplete/types.d.ts +2 -2
  4. package/__inner__/cjs/components/FilePicker/FilePicker.d.ts +4 -2
  5. package/__inner__/cjs/components/FilePicker/FilePicker.js +2 -2
  6. package/__inner__/cjs/components/FilePicker/types.d.ts +4 -1
  7. package/__inner__/cjs/components/IconButtonNext/IconButton.css +1 -0
  8. package/__inner__/cjs/components/Input/Input.js +2 -2
  9. package/__inner__/cjs/components/Input/types.d.ts +3 -0
  10. package/__inner__/cjs/components/InputNumber/InputNumber.js +2 -2
  11. package/__inner__/cjs/components/InputNumber/types.d.ts +4 -1
  12. package/__inner__/cjs/components/Pagination/Pagination.css +9 -9
  13. package/__inner__/cjs/components/Pagination/Pagination.d.ts +2 -2
  14. package/__inner__/cjs/components/Pagination/Pagination.js +21 -11
  15. package/__inner__/cjs/components/Pagination/components/PaginationItem/PaginationItem.css +19 -13
  16. package/__inner__/cjs/components/Pagination/components/PaginationItem/PaginationItem.js +7 -6
  17. package/__inner__/cjs/components/Pagination/constants.d.ts +4 -0
  18. package/__inner__/cjs/components/Pagination/constants.js +5 -1
  19. package/__inner__/cjs/components/Pagination/helpers/getItemAriaLabel/getItemAriaLabel.js +4 -4
  20. package/__inner__/cjs/components/Pagination/types.d.ts +6 -3
  21. package/__inner__/cjs/components/Select/Select.js +2 -2
  22. package/__inner__/cjs/components/Select/components/SelectInput/SelectInput.js +2 -2
  23. package/__inner__/cjs/components/Select/components/SelectInput/types.d.ts +5 -1
  24. package/__inner__/cjs/components/Select/types.d.ts +2 -2
  25. package/__inner__/cjs/components/Textarea/Textarea.js +2 -2
  26. package/__inner__/cjs/components/Textarea/components/TextareaConsumer.js +2 -2
  27. package/__inner__/cjs/components/Textarea/types.d.ts +4 -1
  28. package/__inner__/cjs/locale/locale.js +58 -0
  29. package/__inner__/esm/components/Autocomplete/Autocomplete.js +2 -2
  30. package/__inner__/esm/components/Autocomplete/helper.d.ts +2 -0
  31. package/__inner__/esm/components/Autocomplete/types.d.ts +2 -2
  32. package/__inner__/esm/components/FilePicker/FilePicker.d.ts +4 -2
  33. package/__inner__/esm/components/FilePicker/FilePicker.js +4 -4
  34. package/__inner__/esm/components/FilePicker/types.d.ts +4 -1
  35. package/__inner__/esm/components/IconButtonNext/IconButton.css +1 -0
  36. package/__inner__/esm/components/Input/Input.js +2 -2
  37. package/__inner__/esm/components/Input/types.d.ts +3 -0
  38. package/__inner__/esm/components/InputNumber/InputNumber.js +5 -5
  39. package/__inner__/esm/components/InputNumber/types.d.ts +4 -1
  40. package/__inner__/esm/components/Pagination/Pagination.css +9 -9
  41. package/__inner__/esm/components/Pagination/Pagination.d.ts +2 -2
  42. package/__inner__/esm/components/Pagination/Pagination.js +23 -13
  43. package/__inner__/esm/components/Pagination/components/PaginationItem/PaginationItem.css +19 -13
  44. package/__inner__/esm/components/Pagination/components/PaginationItem/PaginationItem.js +8 -7
  45. package/__inner__/esm/components/Pagination/constants.d.ts +4 -0
  46. package/__inner__/esm/components/Pagination/constants.js +4 -0
  47. package/__inner__/esm/components/Pagination/helpers/getItemAriaLabel/getItemAriaLabel.js +4 -4
  48. package/__inner__/esm/components/Pagination/types.d.ts +6 -3
  49. package/__inner__/esm/components/Select/Select.js +3 -3
  50. package/__inner__/esm/components/Select/components/SelectInput/SelectInput.js +2 -2
  51. package/__inner__/esm/components/Select/components/SelectInput/types.d.ts +5 -1
  52. package/__inner__/esm/components/Select/types.d.ts +2 -2
  53. package/__inner__/esm/components/Textarea/Textarea.js +2 -2
  54. package/__inner__/esm/components/Textarea/components/TextareaConsumer.js +2 -2
  55. package/__inner__/esm/components/Textarea/types.d.ts +4 -1
  56. package/__inner__/esm/locale/locale.js +58 -0
  57. package/package.json +4 -4
@@ -2,16 +2,16 @@ import { NEXT, PAGE, PREVIOUS } from '../../constants';
2
2
  export var getItemAriaLabel = function (_a) {
3
3
  var page = _a.page, type = _a.type, selected = _a.selected;
4
4
  if (type === NEXT) {
5
- return 'Перейти на следующую страницу';
5
+ return 'Next';
6
6
  }
7
7
  if (type === PREVIOUS) {
8
- return 'Перейти на предыдущую страницу';
8
+ return 'Previous';
9
9
  }
10
10
  if (selected) {
11
- return "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 ".concat(page);
11
+ return "Selected";
12
12
  }
13
13
  if (type === PAGE) {
14
- return "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 ".concat(page);
14
+ return "".concat(page);
15
15
  }
16
16
  return '';
17
17
  };
@@ -1,6 +1,7 @@
1
- import type { HTMLAttributes, ReactNode } from 'react';
1
+ import type { ReactNode, ElementType } from 'react';
2
+ import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
2
3
  import type { PaginationItemProps } from './components';
3
- import type { ELLIPSIS, NEXT, PREVIOUS } from './constants';
4
+ import type { ELLIPSIS, NEXT, PREVIOUS, PAGINATION_DEFAULT_TAG } from './constants';
4
5
  import type { GetItemAriaLabel } from './helpers/getItemAriaLabel';
5
6
  export type EllipsisType = typeof ELLIPSIS;
6
7
  export type PreviousType = typeof PREVIOUS;
@@ -26,6 +27,8 @@ export type PaginationBaseProps = {
26
27
  * @default 's'
27
28
  */
28
29
  size?: PaginationSizeVariant;
30
+ /** Если {true} делает компонент неактивным */
31
+ disabled?: boolean;
29
32
  /** Кастомный класс для пагинации. */
30
33
  className?: string;
31
34
  /** Коллбэк, вызывается на смену страницы. */
@@ -35,4 +38,4 @@ export type PaginationBaseProps = {
35
38
  /** Рендер функция, для отображения кнопок пагинации. */
36
39
  renderComponent?: (PagItemProps: PaginationItemProps) => ReactNode;
37
40
  };
38
- export type PaginationProps = PaginationBaseProps & HTMLAttributes<HTMLElement>;
41
+ export type PaginationProps<As extends ElementType = typeof PAGINATION_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<PaginationBaseProps, As>;
@@ -1,6 +1,6 @@
1
1
  import { __assign, __read, __rest, __spreadArray } from "tslib";
2
2
  import './Select.css';
3
- import React, { useRef, useEffect, forwardRef, isValidElement, Children, } from 'react';
3
+ import React, { Children, forwardRef, isValidElement, useEffect, useRef, } from 'react';
4
4
  import { isFragment } from 'react-is';
5
5
  import { useControlled } from '../../hooks/useControlled';
6
6
  import { useMultiRef } from '../../hooks/useMultiRef';
@@ -17,7 +17,7 @@ var SelectRender = function (inProps, ref) {
17
17
  props: inProps,
18
18
  name: 'Select',
19
19
  });
20
- var _a = props.size, size = _a === void 0 ? SELECT_DEFAULT_SIZE : _a, _b = props.autoFocus, autoFocus = _b === void 0 ? SELECT_DEFAULT_AUTO_FOCUS : _b, _c = props.fullWidth, fullWidth = _c === void 0 ? SELECT_DEFAULT_FULL_WIDTH : _c, _d = props.disabled, disabled = _d === void 0 ? SELECT_DEFAULT_DISABLED : _d, _e = props.required, required = _e === void 0 ? SELECT_DEFAULT_REQUIRED : _e, _f = props.multiline, multiline = _f === void 0 ? SELECT_DEFAULT_MULTILINE : _f, _g = props.defaultOpen, defaultOpen = _g === void 0 ? SELECT_DEFAULT_DEFAULT_OPEN : _g, id = props.id, name = props.name, valueProp = props.value, defaultValue = props.defaultValue, error = props.error, onChange = props.onChange, label = props.label, placeholder = props.placeholder, renderValueProp = props.renderValue, renderLeft = props.renderLeft, renderRight = props.renderRight, hint = props.hint, children = props.children, onClick = props.onClick, onKeyDown = props.onKeyDown, menuProps = props.menuProps, dataListPropsProp = props.dataListProps, bodyProps = props.bodyProps, bodeRefProp = props.bodyRef, onCloseProp = props.onClose, onOpenProp = props.onOpen, openProp = props.open, multiple = props.multiple, other = __rest(props, ["size", "autoFocus", "fullWidth", "disabled", "required", "multiline", "defaultOpen", "id", "name", "value", "defaultValue", "error", "onChange", "label", "placeholder", "renderValue", "renderLeft", "renderRight", "hint", "children", "onClick", "onKeyDown", "menuProps", "dataListProps", "bodyProps", "bodyRef", "onClose", "onOpen", "open", "multiple"]);
20
+ var _a = props.size, size = _a === void 0 ? SELECT_DEFAULT_SIZE : _a, _b = props.autoFocus, autoFocus = _b === void 0 ? SELECT_DEFAULT_AUTO_FOCUS : _b, _c = props.fullWidth, fullWidth = _c === void 0 ? SELECT_DEFAULT_FULL_WIDTH : _c, _d = props.disabled, disabled = _d === void 0 ? SELECT_DEFAULT_DISABLED : _d, _e = props.required, required = _e === void 0 ? SELECT_DEFAULT_REQUIRED : _e, _f = props.multiline, multiline = _f === void 0 ? SELECT_DEFAULT_MULTILINE : _f, _g = props.defaultOpen, defaultOpen = _g === void 0 ? SELECT_DEFAULT_DEFAULT_OPEN : _g, id = props.id, name = props.name, valueProp = props.value, defaultValue = props.defaultValue, error = props.error, onChange = props.onChange, label = props.label, placeholder = props.placeholder, renderValueProp = props.renderValue, renderLeft = props.renderLeft, renderRight = props.renderRight, hint = props.hint, children = props.children, onClick = props.onClick, onKeyDown = props.onKeyDown, menuProps = props.menuProps, dataListPropsProp = props.dataListProps, bodyProps = props.bodyProps, hintProps = props.hintProps, bodeRefProp = props.bodyRef, onCloseProp = props.onClose, onOpenProp = props.onOpen, openProp = props.open, multiple = props.multiple, other = __rest(props, ["size", "autoFocus", "fullWidth", "disabled", "required", "multiline", "defaultOpen", "id", "name", "value", "defaultValue", "error", "onChange", "label", "placeholder", "renderValue", "renderLeft", "renderRight", "hint", "children", "onClick", "onKeyDown", "menuProps", "dataListProps", "bodyProps", "hintProps", "bodyRef", "onClose", "onOpen", "open", "multiple"]);
21
21
  var bodyInnerRef = useRef(null);
22
22
  /** @deprecated props */
23
23
  var bodyRef = (bodyProps === null || bodyProps === void 0 ? void 0 : bodyProps.ref) || bodeRefProp;
@@ -159,7 +159,7 @@ var SelectRender = function (inProps, ref) {
159
159
  }
160
160
  }, [autoFocus]);
161
161
  return (React.createElement(React.Fragment, null,
162
- React.createElement(SelectInput, __assign({ id: id, name: name, label: label, placeholder: placeholder, size: size, disabled: disabled, required: required, multiline: multiline, error: error, hint: hint, fullWidth: fullWidth, renderLeft: renderLeft, renderRight: renderRight }, other, { open: open, value: inputValue() || '', onKeyDown: handleKeyDown, onClick: handleClick, bodyProps: __assign(__assign({}, bodyProps), { ref: useMultiRef([bodyRef, bodyInnerRef]) }), ref: ref, renderedValue: renderValue({
162
+ React.createElement(SelectInput, __assign({ id: id, name: name, label: label, placeholder: placeholder, size: size, disabled: disabled, required: required, multiline: multiline, error: error, hint: hint, fullWidth: fullWidth, renderLeft: renderLeft, renderRight: renderRight }, other, { open: open, value: inputValue() || '', onKeyDown: handleKeyDown, onClick: handleClick, bodyProps: __assign(__assign({}, bodyProps), { ref: useMultiRef([bodyRef, bodyInnerRef]) }), hintProps: hintProps, ref: ref, renderedValue: renderValue({
163
163
  label: currentLabel,
164
164
  value: valueState,
165
165
  }) })),
@@ -13,7 +13,7 @@ import { SELECT_DEFAULT_MULTILINE, SELECT_DEFAULT_SIZE } from '../../constants';
13
13
  import { cnSelect } from '../../index';
14
14
  import { SelectInputConsumer } from '../SelectConsumer';
15
15
  export var SelectInput = forwardRef(function (_a, ref) {
16
- var _b = _a.size, size = _b === void 0 ? SELECT_DEFAULT_SIZE : _b, _c = _a.multiline, multiline = _c === void 0 ? SELECT_DEFAULT_MULTILINE : _c, open = _a.open, label = _a.label, error = _a.error, id = _a.id, name = _a.name, renderLeft = _a.renderLeft, renderRight = _a.renderRight, renderedValue = _a.renderedValue, fullWidth = _a.fullWidth, disabled = _a.disabled, hint = _a.hint, required = _a.required, className = _a.className, inputProps = _a.inputProps, valueProp = _a.value, placeholderProp = _a.placeholder, defaultValue = _a.defaultValue, onFocus = _a.onFocus, onBlur = _a.onBlur, onClick = _a.onClick, onKeyDown = _a.onKeyDown, labelProps = _a.labelProps, fieldProps = _a.fieldProps, labelRef = _a.labelRef, inputRef = _a.inputRef, fieldRef = _a.fieldRef, bodyProps = _a.bodyProps, other = __rest(_a, ["size", "multiline", "open", "label", "error", "id", "name", "renderLeft", "renderRight", "renderedValue", "fullWidth", "disabled", "hint", "required", "className", "inputProps", "value", "placeholder", "defaultValue", "onFocus", "onBlur", "onClick", "onKeyDown", "labelProps", "fieldProps", "labelRef", "inputRef", "fieldRef", "bodyProps"]);
16
+ var _b = _a.size, size = _b === void 0 ? SELECT_DEFAULT_SIZE : _b, _c = _a.multiline, multiline = _c === void 0 ? SELECT_DEFAULT_MULTILINE : _c, open = _a.open, label = _a.label, error = _a.error, id = _a.id, name = _a.name, renderLeft = _a.renderLeft, renderRight = _a.renderRight, renderedValue = _a.renderedValue, fullWidth = _a.fullWidth, disabled = _a.disabled, hint = _a.hint, required = _a.required, className = _a.className, inputProps = _a.inputProps, valueProp = _a.value, placeholderProp = _a.placeholder, defaultValue = _a.defaultValue, onFocus = _a.onFocus, onBlur = _a.onBlur, onClick = _a.onClick, onKeyDown = _a.onKeyDown, labelProps = _a.labelProps, fieldProps = _a.fieldProps, hintProps = _a.hintProps, labelRef = _a.labelRef, inputRef = _a.inputRef, fieldRef = _a.fieldRef, bodyProps = _a.bodyProps, other = __rest(_a, ["size", "multiline", "open", "label", "error", "id", "name", "renderLeft", "renderRight", "renderedValue", "fullWidth", "disabled", "hint", "required", "className", "inputProps", "value", "placeholder", "defaultValue", "onFocus", "onBlur", "onClick", "onKeyDown", "labelProps", "fieldProps", "hintProps", "labelRef", "inputRef", "fieldRef", "bodyProps"]);
17
17
  var _d = __read(useBoolean(), 2), focused = _d[0], _e = _d[1], on = _e.on, off = _e.off;
18
18
  var filled = !!valueProp || valueProp === 0;
19
19
  var handleFocus = useCallback(function (e) {
@@ -35,6 +35,6 @@ export var SelectInput = forwardRef(function (_a, ref) {
35
35
  React.createElement(FieldIcon, { icon: renderRight, className: cnSelect('RenderRight') }),
36
36
  React.createElement(FieldIcon, { icon: ChevronDownIcon, className: classnames(cnSelect('RenderRight'), cnSelect('DropDownIcon', { open: open })) }),
37
37
  React.createElement(Fieldset, { className: cnSelect('Fieldset') })),
38
- React.createElement(FieldHint, null, hint)));
38
+ React.createElement(FieldHint, __assign({}, hintProps), hint)));
39
39
  });
40
40
  SelectInput.displayName = 'SelectInput';
@@ -1,9 +1,11 @@
1
- import type { Ref, ReactNode, ComponentPropsWithRef } from 'react';
1
+ import type { ComponentPropsWithRef, ReactNode, Ref } from 'react';
2
2
  import type { FormElementSizeVariant } from '../../../../types/FormElementSizeVariant';
3
+ import type { FieldHintProps } from '../../../FieldHint';
3
4
  import type { FieldIconProps } from '../../../FieldIcon';
4
5
  import type { FieldLabelProps } from '../../../FieldLabel';
5
6
  export type SelectInputSizeVariant = FormElementSizeVariant;
6
7
  type LabelProps = FieldLabelProps;
8
+ type HintProps = FieldHintProps;
7
9
  type InputProps = ComponentPropsWithRef<'input'> & {
8
10
  'data-testid'?: string;
9
11
  };
@@ -79,6 +81,8 @@ export type SelectInputProps = Omit<ComponentPropsWithRef<'div'>, 'value' | 'def
79
81
  labelProps?: LabelProps;
80
82
  /** Свойства Body */
81
83
  bodyProps?: BodyProps;
84
+ /** Cвойства FieldHint */
85
+ hintProps?: Omit<HintProps, 'children'>;
82
86
  /** Признак раскрытого списка */
83
87
  open?: boolean;
84
88
  /** Идентификатор компонента для тестов */
@@ -1,4 +1,4 @@
1
- import type { SyntheticEvent, ReactNode, ReactElement, ComponentPropsWithRef } from 'react';
1
+ import type { ComponentPropsWithRef, ReactElement, ReactNode, SyntheticEvent } from 'react';
2
2
  import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant';
3
3
  import type { DataListBaseProps, DataListSelected } from '../DataList';
4
4
  import type { SelectInputProps } from './components';
@@ -66,6 +66,6 @@ export type SelectProps<MULTIPLE extends boolean = false> = {
66
66
  multiple?: MULTIPLE;
67
67
  /** Идентификатор компонента для тестов */
68
68
  'data-testid'?: string;
69
- } & Pick<SelectInputProps, 'id' | 'name' | 'label' | 'placeholder' | 'disabled' | 'required' | 'error' | 'hint' | 'fullWidth' | 'renderLeft' | 'renderRight' | 'multiline' | 'inputProps' | 'labelProps' | 'bodyProps' | 'inputRef' | 'labelRef' | 'bodyRef'> & Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'defaultValue'> & SelectPropsDeprecated<MULTIPLE> & (SelectControlledProps<MULTIPLE> | SelectUncontrolledProps<MULTIPLE>) & (SelectOpenControlledProps | SelectOpenUncontrolledProps);
69
+ } & Pick<SelectInputProps, 'id' | 'name' | 'label' | 'placeholder' | 'disabled' | 'required' | 'error' | 'hint' | 'fullWidth' | 'renderLeft' | 'renderRight' | 'multiline' | 'inputProps' | 'labelProps' | 'hintProps' | 'bodyProps' | 'inputRef' | 'labelRef' | 'bodyRef'> & Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'defaultValue'> & SelectPropsDeprecated<MULTIPLE> & (SelectControlledProps<MULTIPLE> | SelectUncontrolledProps<MULTIPLE>) & (SelectOpenControlledProps | SelectOpenUncontrolledProps);
70
70
  export type SelectComponent = <MULTIPLE extends boolean = false>(props: SelectProps<MULTIPLE>) => ReactElement | null;
71
71
  export {};
@@ -12,10 +12,10 @@ export var Textarea = forwardRef(function (inProps, ref) {
12
12
  props: inProps,
13
13
  name: 'Textarea',
14
14
  });
15
- var _a = props.size, size = _a === void 0 ? TEXTAREA_DEFAULT_SIZE : _a, autoFocus = props.autoFocus, maxLength = props.maxLength, expand = props.expand, placeholder = props.placeholder, id = props.id, name = props.name, error = props.error, fullWidth = props.fullWidth, cols = props.cols, rows = props.rows, className = props.className, label = props.label, hint = props.hint, value = props.value, defaultValue = props.defaultValue, onChange = props.onChange, required = props.required, disabled = props.disabled, textareaProps = props.textareaProps, labelProps = props.labelProps, labelRef = props.labelRef, textareaRef = props.textareaRef, other = __rest(props, ["size", "autoFocus", "maxLength", "expand", "placeholder", "id", "name", "error", "fullWidth", "cols", "rows", "className", "label", "hint", "value", "defaultValue", "onChange", "required", "disabled", "textareaProps", "labelProps", "labelRef", "textareaRef"]);
15
+ var _a = props.size, size = _a === void 0 ? TEXTAREA_DEFAULT_SIZE : _a, autoFocus = props.autoFocus, maxLength = props.maxLength, expand = props.expand, placeholder = props.placeholder, id = props.id, name = props.name, error = props.error, fullWidth = props.fullWidth, cols = props.cols, rows = props.rows, className = props.className, label = props.label, hint = props.hint, value = props.value, defaultValue = props.defaultValue, onChange = props.onChange, required = props.required, disabled = props.disabled, textareaProps = props.textareaProps, labelProps = props.labelProps, hintProps = props.hintProps, labelRef = props.labelRef, textareaRef = props.textareaRef, other = __rest(props, ["size", "autoFocus", "maxLength", "expand", "placeholder", "id", "name", "error", "fullWidth", "cols", "rows", "className", "label", "hint", "value", "defaultValue", "onChange", "required", "disabled", "textareaProps", "labelProps", "hintProps", "labelRef", "textareaRef"]);
16
16
  return (React.createElement(FieldControl, __assign({ size: size, error: error, disabled: disabled, required: required, fullWidth: fullWidth }, other, { className: cnTextarea({
17
17
  expand: expand,
18
18
  }, [className]), ref: ref }),
19
- React.createElement(TextareaConsumer, { autoFocus: autoFocus, maxLength: maxLength, placeholder: placeholder, id: id, name: name, cols: cols, expand: expand, rows: rows, label: label, hint: hint, value: value, defaultValue: defaultValue, onChange: onChange, textareaRef: textareaRef, textareaProps: textareaProps, labelRef: labelRef, labelProps: labelProps })));
19
+ React.createElement(TextareaConsumer, { autoFocus: autoFocus, maxLength: maxLength, placeholder: placeholder, id: id, name: name, cols: cols, expand: expand, rows: rows, label: label, hint: hint, value: value, defaultValue: defaultValue, onChange: onChange, textareaRef: textareaRef, textareaProps: textareaProps, labelRef: labelRef, labelProps: labelProps, hintProps: hintProps })));
20
20
  });
21
21
  Textarea.displayName = 'Textarea';
@@ -9,7 +9,7 @@ import { Fieldset } from '../../Fieldset';
9
9
  import { cnTextarea } from '../../Textarea';
10
10
  import { TextareaCounter } from './index';
11
11
  export var TextareaConsumer = function (_a) {
12
- var labelProps = _a.labelProps, labelRef = _a.labelRef, maxLength = _a.maxLength, label = _a.label, id = _a.id, name = _a.name, cols = _a.cols, rows = _a.rows, disabled = _a.disabled, valueProp = _a.value, required = _a.required, defaultValue = _a.defaultValue, placeholder = _a.placeholder, autoFocus = _a.autoFocus, textareaProps = _a.textareaProps, onChange = _a.onChange, textareaRef = _a.textareaRef, expand = _a.expand, hint = _a.hint;
12
+ var labelProps = _a.labelProps, hintProps = _a.hintProps, labelRef = _a.labelRef, maxLength = _a.maxLength, label = _a.label, id = _a.id, name = _a.name, cols = _a.cols, rows = _a.rows, disabled = _a.disabled, valueProp = _a.value, required = _a.required, defaultValue = _a.defaultValue, placeholder = _a.placeholder, autoFocus = _a.autoFocus, textareaProps = _a.textareaProps, onChange = _a.onChange, textareaRef = _a.textareaRef, expand = _a.expand, hint = _a.hint;
13
13
  var fieldRef = useRef(null);
14
14
  var context = useFieldControl();
15
15
  var _b = __read(context, 1), value = _b[0].value;
@@ -26,7 +26,7 @@ export var TextareaConsumer = function (_a) {
26
26
  React.createElement(FieldLabel, __assign({}, labelProps, { className: cnTextarea('Label', [labelProps === null || labelProps === void 0 ? void 0 : labelProps.className]), ref: labelRef || (labelProps === null || labelProps === void 0 ? void 0 : labelProps.ref) }), label),
27
27
  React.createElement(FieldInput, __assign({ as: "textarea", id: id, name: name, cols: cols, rows: rows, disabled: disabled, value: valueProp, required: required, defaultValue: defaultValue, maxLength: maxLength, placeholder: placeholder, autoFocus: autoFocus, onChange: onChange }, textareaProps, { className: cnTextarea('Field', {}, [textareaProps === null || textareaProps === void 0 ? void 0 : textareaProps.className]), ref: useMultiRef([textareaRef || (textareaProps === null || textareaProps === void 0 ? void 0 : textareaProps.ref), fieldRef]) })),
28
28
  React.createElement(Fieldset, null)),
29
- React.createElement(FieldHint, null,
29
+ React.createElement(FieldHint, __assign({}, hintProps),
30
30
  hint,
31
31
  maxLength && React.createElement(TextareaCounter, { maxLength: maxLength }))));
32
32
  };
@@ -1,6 +1,7 @@
1
- import type { Ref, ComponentPropsWithRef } from 'react';
1
+ import type { ComponentPropsWithRef, Ref } from 'react';
2
2
  import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant';
3
3
  import type { FIELD_CONTROL_DEFAULT_TAG } from '../FieldControl';
4
+ import type { FieldHintProps } from '../FieldHint';
4
5
  import type { FieldLabelProps } from '../FieldLabel';
5
6
  export type TextareaSizeVariant = FormElementSizeVariant;
6
7
  export declare const textareaExpandVariant: readonly ["autoSize", "verticalResize"];
@@ -61,6 +62,8 @@ export type TextareaProps = Omit<ComponentPropsWithRef<typeof FIELD_CONTROL_DEFA
61
62
  };
62
63
  /** Свойства FieldLabel */
63
64
  labelProps?: FieldLabelProps;
65
+ /** Cвойства FieldHint */
66
+ hintProps?: Omit<FieldHintProps, 'children'>;
64
67
  /** data-атрибут для тестирования */
65
68
  'data-testid'?: string;
66
69
  } & TextareaPropsDeprecated;
@@ -1,3 +1,4 @@
1
+ import { NEXT, PAGE, PREVIOUS } from '../components/Pagination/constants';
1
2
  export var ruRU = {
2
3
  defaultProps: {
3
4
  Autocomplete: {
@@ -28,6 +29,25 @@ export var ruRU = {
28
29
  incrementButtonText: 'Увеличить',
29
30
  decrementButtonText: 'Уменьшить',
30
31
  },
32
+ Pagination: {
33
+ 'aria-label': 'Навигация по страницам',
34
+ getItemAriaLabel: function (_a) {
35
+ var page = _a.page, type = _a.type, selected = _a.selected;
36
+ if (type === NEXT) {
37
+ return 'Перейти на следующую страницу';
38
+ }
39
+ if (type === PREVIOUS) {
40
+ return 'Перейти на предыдущую страницу';
41
+ }
42
+ if (selected) {
43
+ return "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 ".concat(page);
44
+ }
45
+ if (type === PAGE) {
46
+ return "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 ".concat(page);
47
+ }
48
+ return '';
49
+ },
50
+ },
31
51
  },
32
52
  };
33
53
  export var kkKZ = {
@@ -60,6 +80,25 @@ export var kkKZ = {
60
80
  incrementButtonText: 'Үлкейту',
61
81
  decrementButtonText: 'Азайту',
62
82
  },
83
+ Pagination: {
84
+ 'aria-label': 'Беттерді шарлау',
85
+ getItemAriaLabel: function (_a) {
86
+ var page = _a.page, type = _a.type, selected = _a.selected;
87
+ if (type === NEXT) {
88
+ return 'Келесі бетке өтіңіз';
89
+ }
90
+ if (type === PREVIOUS) {
91
+ return 'Алдыңғы бетке өтіңіз';
92
+ }
93
+ if (selected) {
94
+ return "".concat(page, " \u0431\u0435\u0442");
95
+ }
96
+ if (type === PAGE) {
97
+ return "".concat(page, "-\u0431\u0435\u0442\u043A\u0435 \u04E9\u0442\u0456\u04A3\u0456\u0437");
98
+ }
99
+ return '';
100
+ },
101
+ },
63
102
  },
64
103
  };
65
104
  export var enUS = {
@@ -92,5 +131,24 @@ export var enUS = {
92
131
  incrementButtonText: 'Increment',
93
132
  decrementButtonText: 'Decrement',
94
133
  },
134
+ Pagination: {
135
+ 'aria-label': 'Pagination navigation',
136
+ getItemAriaLabel: function (_a) {
137
+ var page = _a.page, type = _a.type, selected = _a.selected;
138
+ if (type === NEXT) {
139
+ return 'Go to next page';
140
+ }
141
+ if (type === PREVIOUS) {
142
+ return 'Go to previous page';
143
+ }
144
+ if (selected) {
145
+ return "Page ".concat(page);
146
+ }
147
+ if (type === PAGE) {
148
+ return "Go to page ".concat(page);
149
+ }
150
+ return '';
151
+ },
152
+ },
95
153
  },
96
154
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozen-ui/kit",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "React component library",
5
5
  "files": [
6
6
  "*"
@@ -27,9 +27,9 @@
27
27
  "react-popper": "^2.3.0",
28
28
  "react-transition-group": "^4.4.5",
29
29
  "tslib": "^2.6.2",
30
- "@ozen-ui/fonts": "0.41.0",
31
- "@ozen-ui/icons": "0.41.0",
32
- "@ozen-ui/logger": "0.41.0"
30
+ "@ozen-ui/fonts": "0.42.0",
31
+ "@ozen-ui/logger": "0.42.0",
32
+ "@ozen-ui/icons": "0.42.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=17.0.2 <19.0.0",