@ozen-ui/kit 0.50.2 → 0.51.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 (31) hide show
  1. package/__inner__/cjs/components/Autocomplete/helper.d.ts +2 -2
  2. package/__inner__/cjs/components/Badge/constants.d.ts +1 -1
  3. package/__inner__/cjs/components/Badge/constants.js +1 -1
  4. package/__inner__/cjs/components/DatePicker/DatePicker.d.ts +2 -2
  5. package/__inner__/cjs/components/FilePicker/FilePicker.d.ts +1 -1
  6. package/__inner__/cjs/components/Tooltip/Tooltip.css +17 -17
  7. package/__inner__/cjs/components/Tooltip/Tooltip.js +37 -31
  8. package/__inner__/cjs/components/Typography/Typography.css +11 -0
  9. package/__inner__/cjs/components/Typography/Typography.d.ts +3 -3
  10. package/__inner__/cjs/components/Typography/Typography.js +9 -1
  11. package/__inner__/cjs/components/Typography/utils.js +1 -0
  12. package/__inner__/cjs/hooks/useBoolean/useBoolean.d.ts +3 -0
  13. package/__inner__/cjs/hooks/useBoolean/useBoolean.js +1 -1
  14. package/__inner__/cjs/hooks/useControlled/useControlled.d.ts +1 -5
  15. package/__inner__/cjs/hooks/useControlled/useControlled.js +11 -17
  16. package/__inner__/esm/components/Autocomplete/helper.d.ts +2 -2
  17. package/__inner__/esm/components/Badge/constants.d.ts +1 -1
  18. package/__inner__/esm/components/Badge/constants.js +1 -1
  19. package/__inner__/esm/components/DatePicker/DatePicker.d.ts +2 -2
  20. package/__inner__/esm/components/FilePicker/FilePicker.d.ts +1 -1
  21. package/__inner__/esm/components/Tooltip/Tooltip.css +17 -17
  22. package/__inner__/esm/components/Tooltip/Tooltip.js +38 -32
  23. package/__inner__/esm/components/Typography/Typography.css +11 -0
  24. package/__inner__/esm/components/Typography/Typography.d.ts +3 -3
  25. package/__inner__/esm/components/Typography/Typography.js +9 -1
  26. package/__inner__/esm/components/Typography/utils.js +1 -0
  27. package/__inner__/esm/hooks/useBoolean/useBoolean.d.ts +3 -0
  28. package/__inner__/esm/hooks/useBoolean/useBoolean.js +1 -1
  29. package/__inner__/esm/hooks/useControlled/useControlled.d.ts +1 -5
  30. package/__inner__/esm/hooks/useControlled/useControlled.js +11 -17
  31. package/package.json +4 -4
@@ -32,6 +32,7 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
32
32
  disableShowChevron?: boolean | undefined;
33
33
  dataListProps?: Partial<Omit<import("../DataList").DataListProps, "onSelect" | "open" | "onClose" | "multiple" | "selected" | "anchorRef">> | undefined;
34
34
  } & {
35
+ error?: boolean | undefined;
35
36
  label?: string | undefined;
36
37
  style?: import("react").CSSProperties | undefined;
37
38
  className?: string | undefined;
@@ -40,7 +41,6 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
40
41
  disabled?: boolean | undefined;
41
42
  placeholder?: string | undefined;
42
43
  required?: boolean | undefined;
43
- error?: boolean | undefined;
44
44
  fullWidth?: boolean | undefined;
45
45
  hint?: string | null | undefined;
46
46
  renderLeft?: string | number | import("react").FC<import("react").SVGProps<SVGSVGElement> & {
@@ -132,6 +132,7 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
132
132
  disableShowChevron?: boolean | undefined;
133
133
  dataListProps?: Partial<Omit<import("../DataList").DataListProps, "onSelect" | "open" | "onClose" | "multiple" | "selected" | "anchorRef">> | undefined;
134
134
  } & {
135
+ error?: boolean | undefined;
135
136
  label?: string | undefined;
136
137
  style?: import("react").CSSProperties | undefined;
137
138
  className?: string | undefined;
@@ -140,7 +141,6 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
140
141
  disabled?: boolean | undefined;
141
142
  placeholder?: string | undefined;
142
143
  required?: boolean | undefined;
143
- error?: boolean | undefined;
144
144
  fullWidth?: boolean | undefined;
145
145
  hint?: string | null | undefined;
146
146
  renderLeft?: string | number | import("react").FC<import("react").SVGProps<SVGSVGElement> & {
@@ -1,6 +1,6 @@
1
1
  export declare const BADGE_DEFAULT_SIZE = "s";
2
2
  export declare const BADGE_DEFAULT_TAG = "div";
3
3
  export declare const BADGE_DEFAULT_VARIANT = "standard";
4
- export declare const BADGE_DEFAULT_COLOR = "defaultDark";
4
+ export declare const BADGE_DEFAULT_COLOR = "neutralDark";
5
5
  export declare const BADGE_DEFAULT_HORIZONTAL_ORIGIN = "right";
6
6
  export declare const BADGE_DEFAULT_VERTICAL_ORIGIN = "top";
@@ -4,6 +4,6 @@ exports.BADGE_DEFAULT_VERTICAL_ORIGIN = exports.BADGE_DEFAULT_HORIZONTAL_ORIGIN
4
4
  exports.BADGE_DEFAULT_SIZE = 's';
5
5
  exports.BADGE_DEFAULT_TAG = 'div';
6
6
  exports.BADGE_DEFAULT_VARIANT = 'standard';
7
- exports.BADGE_DEFAULT_COLOR = 'defaultDark';
7
+ exports.BADGE_DEFAULT_COLOR = 'neutralDark';
8
8
  exports.BADGE_DEFAULT_HORIZONTAL_ORIGIN = 'right';
9
9
  exports.BADGE_DEFAULT_VERTICAL_ORIGIN = 'top';
@@ -16,7 +16,7 @@ export declare const DatePicker: React.ForwardRefExoticComponent<(Omit<{
16
16
  onError?: import("./types").DatePickerPropOnError | undefined;
17
17
  } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
18
18
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
19
- }, "defaultValue" | "onChange" | "onError"> & Pick<import("../Calendar").CalendarBaseProps, "exclude" | "offsetDate" | "minDate" | "maxDate"> & Pick<import("../Input").InputProps, "label" | "onKeyDown" | "disabled" | "placeholder" | "required" | "size" | "error" | "fullWidth" | "hint" | "renderLeft" | "renderRight" | "inputProps"> & {
19
+ }, "defaultValue" | "onChange" | "onError"> & Pick<import("../Calendar").CalendarBaseProps, "exclude" | "offsetDate" | "minDate" | "maxDate"> & Pick<import("../Input").InputProps, "error" | "label" | "onKeyDown" | "disabled" | "placeholder" | "required" | "size" | "fullWidth" | "hint" | "renderLeft" | "renderRight" | "inputProps"> & {
20
20
  open?: boolean | undefined;
21
21
  defaultOpen?: undefined;
22
22
  }, "ref"> | Omit<{
@@ -33,7 +33,7 @@ export declare const DatePicker: React.ForwardRefExoticComponent<(Omit<{
33
33
  onError?: import("./types").DatePickerPropOnError | undefined;
34
34
  } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
35
35
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
36
- }, "defaultValue" | "onChange" | "onError"> & Pick<import("../Calendar").CalendarBaseProps, "exclude" | "offsetDate" | "minDate" | "maxDate"> & Pick<import("../Input").InputProps, "label" | "onKeyDown" | "disabled" | "placeholder" | "required" | "size" | "error" | "fullWidth" | "hint" | "renderLeft" | "renderRight" | "inputProps"> & {
36
+ }, "defaultValue" | "onChange" | "onError"> & Pick<import("../Calendar").CalendarBaseProps, "exclude" | "offsetDate" | "minDate" | "maxDate"> & Pick<import("../Input").InputProps, "error" | "label" | "onKeyDown" | "disabled" | "placeholder" | "required" | "size" | "fullWidth" | "hint" | "renderLeft" | "renderRight" | "inputProps"> & {
37
37
  open?: undefined;
38
38
  defaultOpen?: boolean | undefined;
39
39
  }, "ref">) & React.RefAttributes<HTMLDivElement>>;
@@ -68,7 +68,7 @@ export declare const FilePicker: React.ForwardRefExoticComponent<{
68
68
  } & {
69
69
  labelRef?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
70
70
  inputRef?: React.Ref<HTMLInputElement> | undefined;
71
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "name" | "label" | "className" | "id" | "onChange" | "autoFocus" | "disabled" | "accept" | "multiple" | "placeholder" | "required" | "size" | "error" | "fullWidth" | "labelProps" | "data-testid" | "hint" | "renderLeft" | "renderRight" | "inputProps" | "hintProps" | "clearText" | "onClear" | "fileList" | "disableTruncate" | "renderValue" | keyof {
71
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "name" | "error" | "label" | "className" | "id" | "onChange" | "autoFocus" | "disabled" | "accept" | "multiple" | "placeholder" | "required" | "size" | "fullWidth" | "labelProps" | "data-testid" | "hint" | "renderLeft" | "renderRight" | "inputProps" | "hintProps" | "clearText" | "onClear" | "fileList" | "disableTruncate" | "renderValue" | keyof {
72
72
  labelRef?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
73
73
  inputRef?: React.Ref<HTMLInputElement> | undefined;
74
74
  }> & React.RefAttributes<HTMLDivElement>>;
@@ -1,31 +1,31 @@
1
1
  /* stylelint-disable */
2
2
  .Tooltip {
3
3
  max-inline-size: 300px;
4
- color: var(--color-content-primary);
5
4
  }
5
+ .Tooltip-Content {
6
+ color: var(--color-content-primary);
7
+ }
8
+ .Tooltip-Content_size_xs {
9
+ font: var(--typography-text-xs-font);
10
+ letter-spacing: var(--typography-text-xs-letter_spacing, 0);
11
+ text-transform: var(--typography-text-xs-text_transform, none);
12
+ }
13
+ .Tooltip-Content_size_s {
14
+ font: var(--typography-text-s-font);
15
+ letter-spacing: var(--typography-text-s-letter_spacing, 0);
16
+ text-transform: var(--typography-text-s-text_transform, none);
17
+ }
18
+ .Tooltip-Content_variant_dark,
19
+ .Tooltip-Content_inverse {
20
+ color: var(--color-content-primary-inverse);
21
+ }
6
22
  .Tooltip_size_xs {
7
23
  min-inline-size: 28px;
8
24
  min-block-size: 28px;
9
25
  padding: var(--spacing-2xs) var(--spacing-xs);
10
-
11
- font: var(--typography-text-xs-font);
12
-
13
- letter-spacing: var(--typography-text-xs-letter_spacing, 0);
14
-
15
- text-transform: var(--typography-text-xs-text_transform, none);
16
26
  }
17
27
  .Tooltip_size_s {
18
28
  min-inline-size: 40px;
19
29
  min-block-size: 40px;
20
30
  padding: var(--spacing-xs) var(--spacing-s);
21
-
22
- font: var(--typography-text-s-font);
23
-
24
- letter-spacing: var(--typography-text-s-letter_spacing, 0);
25
-
26
- text-transform: var(--typography-text-s-text_transform, none);
27
31
  }
28
- .Tooltip_variant_dark,
29
- .Tooltip_inverse {
30
- color: var(--color-content-primary-inverse);
31
- }
@@ -5,6 +5,7 @@ var tslib_1 = require("tslib");
5
5
  require("./Tooltip.css");
6
6
  var react_1 = tslib_1.__importStar(require("react"));
7
7
  var logger_1 = require("@ozen-ui/logger");
8
+ var useBoolean_1 = require("../../hooks/useBoolean");
8
9
  var useControlled_1 = require("../../hooks/useControlled");
9
10
  var useDebounceCallback_1 = require("../../hooks/useDebounceCallback");
10
11
  var useMultiRef_1 = require("../../hooks/useMultiRef");
@@ -16,14 +17,14 @@ var constants_1 = require("./constants");
16
17
  exports.cnTooltip = (0, classname_1.cn)('Tooltip');
17
18
  exports.Tooltip = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
18
19
  var props = (0, useThemeProps_1.useThemeProps)({ props: inProps, name: 'Tooltip' });
19
- var _a = props.trigger, trigger = _a === void 0 ? constants_1.TOOLTIP_DEFAULT_TRIGGER : _a, _b = props.size, size = _b === void 0 ? constants_1.TOOLTIP_DEFAULT_SIZE : _b, _c = props.offset, offset = _c === void 0 ? constants_1.TOOLTIP_DEFAULT_OFFSET : _c, _d = props.delayEnter, delayEnter = _d === void 0 ? constants_1.TOOLTIP_DEFAULT_DELAY_ENTER : _d, _e = props.delayLeave, delayLeave = _e === void 0 ? constants_1.TOOLTIP_DEFAULT_DELAY_LEAVE : _e, _f = props.arrow, arrow = _f === void 0 ? constants_1.TOOLTIP_DEFAULT_ARROW : _f, _g = props.shouldWrapChildren, shouldWrapChildren = _g === void 0 ? constants_1.TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN : _g, _h = props.disabled, disabled = _h === void 0 ? constants_1.TOOLTIP_DEFAULT_DISABLED : _h, _j = props.inverse, inverse = _j === void 0 ? constants_1.TOOLTIP_DEFAULT_INVERSE : _j, variant = props.variant, children = props.children, label = props.label, openProp = props.open, placement = props.placement, disableInteractive = props.disableInteractive, className = props.className, onOpen = props.onOpen, onClose = props.onClose, _k = props.as, as = _k === void 0 ? constants_1.TOOLTIP_DEFAULT_TAG : _k, other = tslib_1.__rest(props, ["trigger", "size", "offset", "delayEnter", "delayLeave", "arrow", "shouldWrapChildren", "disabled", "inverse", "variant", "children", "label", "open", "placement", "disableInteractive", "className", "onOpen", "onClose", "as"]);
20
+ var _a = props.trigger, trigger = _a === void 0 ? constants_1.TOOLTIP_DEFAULT_TRIGGER : _a, _b = props.size, size = _b === void 0 ? constants_1.TOOLTIP_DEFAULT_SIZE : _b, _c = props.offset, offset = _c === void 0 ? constants_1.TOOLTIP_DEFAULT_OFFSET : _c, _d = props.delayEnter, delayEnter = _d === void 0 ? constants_1.TOOLTIP_DEFAULT_DELAY_ENTER : _d, _e = props.delayLeave, delayLeave = _e === void 0 ? constants_1.TOOLTIP_DEFAULT_DELAY_LEAVE : _e, _f = props.arrow, arrow = _f === void 0 ? constants_1.TOOLTIP_DEFAULT_ARROW : _f, _g = props.shouldWrapChildren, shouldWrapChildren = _g === void 0 ? constants_1.TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN : _g, _h = props.disabled, disabled = _h === void 0 ? constants_1.TOOLTIP_DEFAULT_DISABLED : _h, _j = props.inverse, inverse = _j === void 0 ? constants_1.TOOLTIP_DEFAULT_INVERSE : _j, _k = props.as, as = _k === void 0 ? constants_1.TOOLTIP_DEFAULT_TAG : _k, variant = props.variant, children = props.children, label = props.label, openProp = props.open, placement = props.placement, disableInteractive = props.disableInteractive, className = props.className, onOpen = props.onOpen, onClose = props.onClose, other = tslib_1.__rest(props, ["trigger", "size", "offset", "delayEnter", "delayLeave", "arrow", "shouldWrapChildren", "disabled", "inverse", "as", "variant", "children", "label", "open", "placement", "disableInteractive", "className", "onOpen", "onClose"]);
20
21
  if (process.env.NODE_ENV !== 'production' && variant) {
21
22
  (0, logger_1.deprecate)('Свойство «variant» устарело. Для замены используйте «inverse».');
22
23
  }
23
- var _l = tslib_1.__read((0, react_1.useState)(), 2), delay = _l[0], setDelay = _l[1];
24
- var _m = tslib_1.__read((0, react_1.useState)(), 2), hasFocus = _m[0], setHasFocus = _m[1];
25
- var _o = tslib_1.__read((0, react_1.useState)(), 2), hasHover = _o[0], setHasHover = _o[1];
26
24
  var anchorRef = (0, react_1.useRef)(null);
25
+ var _l = tslib_1.__read((0, react_1.useState)(), 2), delay = _l[0], setDelay = _l[1];
26
+ var _m = tslib_1.__read((0, useBoolean_1.useBoolean)(), 2), focused = _m[0], setFocused = _m[1];
27
+ var _o = tslib_1.__read((0, useBoolean_1.useBoolean)(), 2), hovered = _o[0], setHovered = _o[1];
27
28
  var modifiers = [
28
29
  {
29
30
  name: 'arrow',
@@ -38,22 +39,27 @@ exports.Tooltip = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)
38
39
  name: 'Tooltip',
39
40
  state: 'open',
40
41
  }), 2), openState = _p[0], setOpenState = _p[1];
41
- (0, react_1.useEffect)(function () {
42
- setDelay(openState ? delayLeave : delayEnter);
43
- }, [openState, delayEnter, delayLeave]);
44
- var handleOpen = function (open) {
45
- if (disabled) {
42
+ var setOpen = function (open) {
43
+ if (disabled && open)
46
44
  return;
47
- }
48
- if (open) {
45
+ if (open)
49
46
  onOpen === null || onOpen === void 0 ? void 0 : onOpen();
50
- }
51
- else {
47
+ else
52
48
  onClose === null || onClose === void 0 ? void 0 : onClose();
53
- }
54
49
  setOpenState(open);
55
50
  };
56
- var _q = tslib_1.__read((0, useDebounceCallback_1.useDebounceCallback)(handleOpen, delay), 1), debounceSetOpen = _q[0];
51
+ var _q = tslib_1.__read((0, useDebounceCallback_1.useDebounceCallback)(setOpen, delay), 2), setOpenWithDelay = _q[0], clearTimeout = _q[1];
52
+ var closeWithDelay = function () { return setOpenWithDelay(false); };
53
+ (0, react_1.useEffect)(function () {
54
+ setDelay(openState ? delayLeave : delayEnter);
55
+ }, [openState, delayEnter, delayLeave]);
56
+ (0, react_1.useEffect)(function () {
57
+ if (!disabled)
58
+ return;
59
+ clearTimeout();
60
+ if (openState)
61
+ setOpen(false);
62
+ }, [disabled, openState]);
57
63
  var resolveChildren = (0, react_1.useMemo)(function () {
58
64
  return typeof children !== 'object' || shouldWrapChildren ? (react_1.default.createElement("span", null, children)) : (children);
59
65
  }, [children, shouldWrapChildren]);
@@ -61,36 +67,34 @@ exports.Tooltip = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)
61
67
  var childrenMultiRef = (0, useMultiRef_1.useMultiRef)([anchorRef, childrenRef]);
62
68
  var handleMouseEnter = function () {
63
69
  if (trigger === 'hover' || trigger === 'hover&focus') {
64
- setHasHover(true);
65
- debounceSetOpen(true);
70
+ setHovered.on();
71
+ setOpenWithDelay(true);
66
72
  }
67
73
  };
68
74
  var handleMouseLeave = function () {
69
75
  if (trigger === 'hover' || trigger === 'hover&focus') {
70
- setHasHover(false);
71
- if (!hasFocus)
72
- debounceSetOpen(false);
76
+ setHovered.off();
77
+ if (!focused)
78
+ setOpenWithDelay(false);
73
79
  }
74
80
  };
75
81
  var handleClick = function () {
76
- if (trigger === 'click') {
77
- debounceSetOpen(!openState);
78
- }
82
+ if (trigger === 'click')
83
+ setOpenWithDelay(!openState);
79
84
  };
80
85
  var handleFocus = function () {
81
86
  if (trigger === 'focus' || trigger === 'hover&focus') {
82
- setHasFocus(true);
83
- debounceSetOpen(true);
87
+ setFocused.on();
88
+ setOpenWithDelay(true);
84
89
  }
85
90
  };
86
91
  var handleBlur = function () {
87
92
  if (trigger === 'focus' || trigger === 'hover&focus') {
88
- setHasFocus(false);
89
- if (!hasHover)
90
- debounceSetOpen(false);
93
+ setFocused.off();
94
+ if (!hovered)
95
+ setOpenWithDelay(false);
91
96
  }
92
97
  };
93
- var handleClose = function () { return debounceSetOpen(false); };
94
98
  var composeChildrenProps = (0, react_1.useMemo)(function () {
95
99
  var onClick = childrenProps.onClick, onFocus = childrenProps.onFocus, onBlur = childrenProps.onBlur, onMouseEnter = childrenProps.onMouseEnter, onMouseLeave = childrenProps.onMouseLeave;
96
100
  return {
@@ -117,6 +121,7 @@ exports.Tooltip = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)
117
121
  },
118
122
  };
119
123
  }, [
124
+ trigger,
120
125
  childrenProps,
121
126
  childrenMultiRef,
122
127
  handleMouseEnter,
@@ -127,8 +132,9 @@ exports.Tooltip = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)
127
132
  ]);
128
133
  return (react_1.default.createElement(react_1.default.Fragment, null,
129
134
  react_1.default.cloneElement(resolveChildren, composeChildrenProps),
130
- react_1.default.createElement(Popover_1.Popover, tslib_1.__assign({ anchorRef: anchorRef, strategy: "absolute", as: as, background: "main" }, (variant === 'dark' && { background: 'main-inverse' }), (inverse && { background: 'main-inverse' }), { radius: size === 'xs' ? 's' : 'l' }, other, { ref: ref, offset: offset, placement: placement, open: openState && !disabled, onClose: handleClose, className: (0, exports.cnTooltip)({ size: size, variant: variant, inverse: inverse }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
135
+ react_1.default.createElement(Popover_1.Popover, tslib_1.__assign({ anchorRef: anchorRef, strategy: "absolute", as: as, background: "main" }, (variant === 'dark' && { background: 'main-inverse' }), (inverse && { background: 'main-inverse' }), { radius: size === 'xs' ? 's' : 'l' }, other, { ref: ref, offset: offset, placement: placement, open: openState, onClose: closeWithDelay, className: (0, exports.cnTooltip)({ size: size, variant: variant, inverse: inverse }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
131
136
  size: size,
132
- }, modifiers: modifiers, disableEnforceFocus: true, disableReturnFocus: true }), label)));
137
+ }, modifiers: modifiers, disableEnforceFocus: true, disableReturnFocus: true }),
138
+ react_1.default.createElement("div", { className: (0, exports.cnTooltip)('Content', { size: size, variant: variant, inverse: inverse }) }, label))));
133
139
  });
134
140
  exports.Tooltip.displayName = 'Tooltip';
@@ -29,6 +29,9 @@
29
29
  .Typography_align_initial {
30
30
  text-align: initial;
31
31
  }
32
+ .Typography_align_inherit {
33
+ text-align: inherit;
34
+ }
32
35
  .Typography_color_primary {
33
36
  color: var(--color-content-primary);
34
37
  }
@@ -119,6 +122,9 @@
119
122
  .Typography_color_accentDisabled {
120
123
  color: var(--color-content-accent-disabled);
121
124
  }
125
+ .Typography_color_inherit {
126
+ color: inherit;
127
+ }
122
128
  .Typography_variant_heading-4xl {
123
129
  font: var(--typography-heading-4xl-font);
124
130
  letter-spacing: var(--typography-heading-4xl-letter_spacing, 0);
@@ -327,6 +333,11 @@
327
333
  .Typography_variant_caption-3xs_1.Typography_defaultMargin {
328
334
  margin-block-end: var(--spacing-3xs);
329
335
  }
336
+ .Typography_variant_inherit {
337
+ font: inherit;
338
+ letter-spacing: inherit;
339
+ text-transform: inherit;
340
+ }
330
341
  .Typography_link {
331
342
  color: var(--color-content-action);
332
343
  }
@@ -1,13 +1,13 @@
1
1
  import './Typography.css';
2
2
  import type { ElementType, ReactNode } from 'react';
3
3
  import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
4
- export declare const typographyVariant: readonly ["heading-4xl", "heading-3xl", "heading-2xl", "heading-xl", "text-4xl", "text-4xl_1", "text-3xl", "text-3xl_1", "text-2xl", "text-2xl_1", "text-xl", "text-xl_1", "text-l", "text-l_1", "text-m", "text-m_1", "text-s", "text-s_1", "text-xs", "text-xs_1", "text-2xs", "text-2xs_1", "text-3xs", "text-3xs_1", "caption-3xs", "caption-3xs_1"];
4
+ export declare const typographyVariant: readonly ["heading-4xl", "heading-3xl", "heading-2xl", "heading-xl", "text-4xl", "text-4xl_1", "text-3xl", "text-3xl_1", "text-2xl", "text-2xl_1", "text-xl", "text-xl_1", "text-l", "text-l_1", "text-m", "text-m_1", "text-s", "text-s_1", "text-xs", "text-xs_1", "text-2xs", "text-2xs_1", "text-3xs", "text-3xs_1", "caption-3xs", "caption-3xs_1", "inherit"];
5
5
  export type TypographyVariant = (typeof typographyVariant)[number];
6
6
  export declare const typographyDisplayVariant: readonly ["block", "inline", "inlineBlock"];
7
7
  export type TypographyDisplayVariant = (typeof typographyDisplayVariant)[number];
8
- export declare const typographyAlignVariant: readonly ["left", "center", "right"];
8
+ export declare const typographyAlignVariant: readonly ["left", "center", "right", "initial", "inherit"];
9
9
  export type TypographyAlignVariant = (typeof typographyAlignVariant)[number];
10
- export declare const typographyColorVariant: readonly ["primary", "secondary", "tertiary", "disabled", "ghostDisabled", "action", "actionPressed", "actionHover", "actionDark", "actionOn", "error", "errorHover", "errorPressed", "errorDark", "warning", "warningHover", "warningPressed", "warningDark", "success", "successHover", "successDark", "successPressed", "info", "infoHover", "infoPressed", "infoDark", "primaryInverse", "accentPrimary", "accentSecondary", "accentDisabled"];
10
+ export declare const typographyColorVariant: readonly ["primary", "secondary", "tertiary", "disabled", "ghostDisabled", "action", "actionPressed", "actionHover", "actionDark", "actionOn", "error", "errorHover", "errorPressed", "errorDark", "warning", "warningHover", "warningPressed", "warningDark", "success", "successHover", "successDark", "successPressed", "info", "infoHover", "infoPressed", "infoDark", "primaryInverse", "accentPrimary", "accentSecondary", "accentDisabled", "inherit"];
11
11
  export type TypographyColorVariant = (typeof typographyColorVariant)[number];
12
12
  export type TypographyBaseProps = {
13
13
  /** Вариант типографики */
@@ -36,13 +36,20 @@ exports.typographyVariant = [
36
36
  'text-3xs_1',
37
37
  'caption-3xs',
38
38
  'caption-3xs_1',
39
+ 'inherit',
39
40
  ];
40
41
  exports.typographyDisplayVariant = [
41
42
  'block',
42
43
  'inline',
43
44
  'inlineBlock',
44
45
  ];
45
- exports.typographyAlignVariant = ['left', 'center', 'right'];
46
+ exports.typographyAlignVariant = [
47
+ 'left',
48
+ 'center',
49
+ 'right',
50
+ 'initial',
51
+ 'inherit',
52
+ ];
46
53
  exports.typographyColorVariant = [
47
54
  'primary',
48
55
  'secondary',
@@ -74,6 +81,7 @@ exports.typographyColorVariant = [
74
81
  'accentPrimary',
75
82
  'accentSecondary',
76
83
  'accentDisabled',
84
+ 'inherit',
77
85
  ];
78
86
  exports.cnTypography = (0, classname_1.cn)('Typography');
79
87
  exports.Typography = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
@@ -28,4 +28,5 @@ exports.matchVariantToTag = {
28
28
  'text-3xs_1': 'p',
29
29
  'caption-3xs': 'span',
30
30
  'caption-3xs_1': 'span',
31
+ inherit: 'p',
31
32
  };
@@ -1,3 +1,4 @@
1
+ import type { Dispatch, SetStateAction } from 'react';
1
2
  export type UseBooleanControllers = {
2
3
  /** Установить значение в {true} */
3
4
  on: () => void;
@@ -5,6 +6,8 @@ export type UseBooleanControllers = {
5
6
  off: () => void;
6
7
  /** Перевести значение в противоположное состояние */
7
8
  toggle: () => void;
9
+ /** Перевести значение в собственное состояние */
10
+ set: Dispatch<SetStateAction<boolean>>;
8
11
  };
9
12
  export type UseBooleanReturnValue = [boolean, UseBooleanControllers];
10
13
  export declare function useBoolean(
@@ -11,6 +11,6 @@ defaultValue) {
11
11
  var on = (0, react_1.useCallback)(function () { return setValue(true); }, []);
12
12
  var off = (0, react_1.useCallback)(function () { return setValue(false); }, []);
13
13
  var toggle = (0, react_1.useCallback)(function () { return setValue(function (value) { return !value; }); }, []);
14
- return [value, { on: on, off: off, toggle: toggle }];
14
+ return [value, { on: on, off: off, toggle: toggle, set: setValue }];
15
15
  }
16
16
  exports.useBoolean = useBoolean;
@@ -8,9 +8,5 @@ export interface UseControlledProps<T = unknown> {
8
8
  /** Имя свойства для предупреждения */
9
9
  state?: string;
10
10
  }
11
- /**
12
- * Управляет значением компонента
13
- * при контролируемом и неконтролируемом
14
- * поведении
15
- * */
11
+ /** Управляет значением компонента при контролируемом и неконтролируемом поведении */
16
12
  export declare const useControlled: <T = unknown>({ value: valueProp, defaultValue: defaultProp, name, state, }: UseControlledProps<T>) => [T | undefined, (newValue: T) => void, boolean];
@@ -4,37 +4,31 @@ exports.useControlled = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */
6
6
  var react_1 = require("react");
7
- /**
8
- * Управляет значением компонента
9
- * при контролируемом и неконтролируемом
10
- * поведении
11
- * */
7
+ var logger_1 = require("@ozen-ui/logger");
8
+ /** Управляет значением компонента при контролируемом и неконтролируемом поведении */
12
9
  var useControlled = function (_a) {
13
10
  var valueProp = _a.value, defaultProp = _a.defaultValue, name = _a.name, _b = _a.state, state = _b === void 0 ? 'value' : _b;
14
- /**
15
- * Определение контролируемого поведения
16
- * при первом рендере
17
- * (неизменяемое значение)
18
- * */
11
+ /** Определение контролируемого поведения при первом рендере (неизменяемое значение) */
19
12
  var isControlled = (0, react_1.useRef)(valueProp !== undefined).current;
20
13
  var _c = tslib_1.__read((0, react_1.useState)(defaultProp), 2), valueState = _c[0], setValue = _c[1];
21
14
  var value = isControlled ? valueProp : valueState;
22
15
  if (process.env.NODE_ENV !== 'production') {
23
16
  (0, react_1.useEffect)(function () {
24
17
  if (isControlled !== (valueProp !== undefined)) {
25
- console.error([
26
- "\u00D6zen-UI: \u041F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 '".concat(state, "' \u0443 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430 ").concat(name, " \u043F\u043E\u043C\u0435\u043D\u044F\u043B\u043E\u0441\u044C \u0441 ").concat(isControlled ? '' : 'не', "\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u043E\u0433\u043E \u043D\u0430 ").concat(isControlled ? 'не' : '', "\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u043E\u0435."),
27
- 'Компоненты не должны переключаться с неконтролируемого поведения в контролируемое, или наоборот.',
28
- 'Поведение определяется после первого рендера и является контролируемым, если значение не «undefined».',
18
+ logger_1.logger.error([
19
+ "\u041F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u00AB".concat(state, "\u00BB \u0443 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430 ").concat(name, " \u043F\u043E\u043C\u0435\u043D\u044F\u043B\u043E\u0441\u044C \u0441 ").concat(isControlled ? '' : 'не', "\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u043E\u0433\u043E \u043D\u0430 ").concat(isControlled ? 'не' : '', "\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u043E\u0435."),
20
+ "\n",
21
+ 'Компоненты не должны переключаться с неконтролируемого поведения в контролируемое, или наоборот. Поведение определяется после первого рендера и является контролируемым, если значение не «undefined».',
29
22
  ].join('\n'));
30
23
  }
31
24
  }, [state, name, valueProp]);
32
25
  var defaultValue_1 = (0, react_1.useRef)(defaultProp).current;
33
26
  (0, react_1.useEffect)(function () {
34
27
  if (!isControlled && defaultValue_1 !== defaultProp) {
35
- console.error([
36
- "\u00D6zen-UI: \u041D\u0435\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 ".concat(name, " \u0441\u043C\u0435\u043D\u0438\u043B default ").concat(state, " \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0432\u043E\u0439 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 ").concat(name, "."),
37
- "\u0415\u0441\u043B\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043C\u0435\u043D\u044F\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432\u043E\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435\u0441\u044C \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u044B\u043C \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C.",
28
+ logger_1.logger.error([
29
+ "\u041D\u0435\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 ".concat(name, " \u0441\u043C\u0435\u043D\u0438\u043B \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0434\u043B\u044F \u00AB").concat(state, "\u00BB \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0432\u043E\u0439 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438."),
30
+ "\n",
31
+ "\u0415\u0441\u043B\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043C\u0435\u043D\u044F\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0434\u043B\u044F \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430 \u0432\u043E\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435\u0441\u044C \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u044B\u043C \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C.",
38
32
  ].join('\n'));
39
33
  }
40
34
  }, [JSON.stringify(defaultProp)]);
@@ -32,6 +32,7 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
32
32
  disableShowChevron?: boolean | undefined;
33
33
  dataListProps?: Partial<Omit<import("../DataList").DataListProps, "onSelect" | "open" | "onClose" | "multiple" | "selected" | "anchorRef">> | undefined;
34
34
  } & {
35
+ error?: boolean | undefined;
35
36
  label?: string | undefined;
36
37
  style?: import("react").CSSProperties | undefined;
37
38
  className?: string | undefined;
@@ -40,7 +41,6 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
40
41
  disabled?: boolean | undefined;
41
42
  placeholder?: string | undefined;
42
43
  required?: boolean | undefined;
43
- error?: boolean | undefined;
44
44
  fullWidth?: boolean | undefined;
45
45
  hint?: string | null | undefined;
46
46
  renderLeft?: string | number | import("react").FC<import("react").SVGProps<SVGSVGElement> & {
@@ -132,6 +132,7 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
132
132
  disableShowChevron?: boolean | undefined;
133
133
  dataListProps?: Partial<Omit<import("../DataList").DataListProps, "onSelect" | "open" | "onClose" | "multiple" | "selected" | "anchorRef">> | undefined;
134
134
  } & {
135
+ error?: boolean | undefined;
135
136
  label?: string | undefined;
136
137
  style?: import("react").CSSProperties | undefined;
137
138
  className?: string | undefined;
@@ -140,7 +141,6 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
140
141
  disabled?: boolean | undefined;
141
142
  placeholder?: string | undefined;
142
143
  required?: boolean | undefined;
143
- error?: boolean | undefined;
144
144
  fullWidth?: boolean | undefined;
145
145
  hint?: string | null | undefined;
146
146
  renderLeft?: string | number | import("react").FC<import("react").SVGProps<SVGSVGElement> & {
@@ -1,6 +1,6 @@
1
1
  export declare const BADGE_DEFAULT_SIZE = "s";
2
2
  export declare const BADGE_DEFAULT_TAG = "div";
3
3
  export declare const BADGE_DEFAULT_VARIANT = "standard";
4
- export declare const BADGE_DEFAULT_COLOR = "defaultDark";
4
+ export declare const BADGE_DEFAULT_COLOR = "neutralDark";
5
5
  export declare const BADGE_DEFAULT_HORIZONTAL_ORIGIN = "right";
6
6
  export declare const BADGE_DEFAULT_VERTICAL_ORIGIN = "top";
@@ -1,6 +1,6 @@
1
1
  export var BADGE_DEFAULT_SIZE = 's';
2
2
  export var BADGE_DEFAULT_TAG = 'div';
3
3
  export var BADGE_DEFAULT_VARIANT = 'standard';
4
- export var BADGE_DEFAULT_COLOR = 'defaultDark';
4
+ export var BADGE_DEFAULT_COLOR = 'neutralDark';
5
5
  export var BADGE_DEFAULT_HORIZONTAL_ORIGIN = 'right';
6
6
  export var BADGE_DEFAULT_VERTICAL_ORIGIN = 'top';
@@ -16,7 +16,7 @@ export declare const DatePicker: React.ForwardRefExoticComponent<(Omit<{
16
16
  onError?: import("./types").DatePickerPropOnError | undefined;
17
17
  } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
18
18
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
19
- }, "defaultValue" | "onChange" | "onError"> & Pick<import("../Calendar").CalendarBaseProps, "exclude" | "offsetDate" | "minDate" | "maxDate"> & Pick<import("../Input").InputProps, "label" | "onKeyDown" | "disabled" | "placeholder" | "required" | "size" | "error" | "fullWidth" | "hint" | "renderLeft" | "renderRight" | "inputProps"> & {
19
+ }, "defaultValue" | "onChange" | "onError"> & Pick<import("../Calendar").CalendarBaseProps, "exclude" | "offsetDate" | "minDate" | "maxDate"> & Pick<import("../Input").InputProps, "error" | "label" | "onKeyDown" | "disabled" | "placeholder" | "required" | "size" | "fullWidth" | "hint" | "renderLeft" | "renderRight" | "inputProps"> & {
20
20
  open?: boolean | undefined;
21
21
  defaultOpen?: undefined;
22
22
  }, "ref"> | Omit<{
@@ -33,7 +33,7 @@ export declare const DatePicker: React.ForwardRefExoticComponent<(Omit<{
33
33
  onError?: import("./types").DatePickerPropOnError | undefined;
34
34
  } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
35
35
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
36
- }, "defaultValue" | "onChange" | "onError"> & Pick<import("../Calendar").CalendarBaseProps, "exclude" | "offsetDate" | "minDate" | "maxDate"> & Pick<import("../Input").InputProps, "label" | "onKeyDown" | "disabled" | "placeholder" | "required" | "size" | "error" | "fullWidth" | "hint" | "renderLeft" | "renderRight" | "inputProps"> & {
36
+ }, "defaultValue" | "onChange" | "onError"> & Pick<import("../Calendar").CalendarBaseProps, "exclude" | "offsetDate" | "minDate" | "maxDate"> & Pick<import("../Input").InputProps, "error" | "label" | "onKeyDown" | "disabled" | "placeholder" | "required" | "size" | "fullWidth" | "hint" | "renderLeft" | "renderRight" | "inputProps"> & {
37
37
  open?: undefined;
38
38
  defaultOpen?: boolean | undefined;
39
39
  }, "ref">) & React.RefAttributes<HTMLDivElement>>;
@@ -68,7 +68,7 @@ export declare const FilePicker: React.ForwardRefExoticComponent<{
68
68
  } & {
69
69
  labelRef?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
70
70
  inputRef?: React.Ref<HTMLInputElement> | undefined;
71
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "name" | "label" | "className" | "id" | "onChange" | "autoFocus" | "disabled" | "accept" | "multiple" | "placeholder" | "required" | "size" | "error" | "fullWidth" | "labelProps" | "data-testid" | "hint" | "renderLeft" | "renderRight" | "inputProps" | "hintProps" | "clearText" | "onClear" | "fileList" | "disableTruncate" | "renderValue" | keyof {
71
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "name" | "error" | "label" | "className" | "id" | "onChange" | "autoFocus" | "disabled" | "accept" | "multiple" | "placeholder" | "required" | "size" | "fullWidth" | "labelProps" | "data-testid" | "hint" | "renderLeft" | "renderRight" | "inputProps" | "hintProps" | "clearText" | "onClear" | "fileList" | "disableTruncate" | "renderValue" | keyof {
72
72
  labelRef?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
73
73
  inputRef?: React.Ref<HTMLInputElement> | undefined;
74
74
  }> & React.RefAttributes<HTMLDivElement>>;
@@ -1,31 +1,31 @@
1
1
  /* stylelint-disable */
2
2
  .Tooltip {
3
3
  max-inline-size: 300px;
4
- color: var(--color-content-primary);
5
4
  }
5
+ .Tooltip-Content {
6
+ color: var(--color-content-primary);
7
+ }
8
+ .Tooltip-Content_size_xs {
9
+ font: var(--typography-text-xs-font);
10
+ letter-spacing: var(--typography-text-xs-letter_spacing, 0);
11
+ text-transform: var(--typography-text-xs-text_transform, none);
12
+ }
13
+ .Tooltip-Content_size_s {
14
+ font: var(--typography-text-s-font);
15
+ letter-spacing: var(--typography-text-s-letter_spacing, 0);
16
+ text-transform: var(--typography-text-s-text_transform, none);
17
+ }
18
+ .Tooltip-Content_variant_dark,
19
+ .Tooltip-Content_inverse {
20
+ color: var(--color-content-primary-inverse);
21
+ }
6
22
  .Tooltip_size_xs {
7
23
  min-inline-size: 28px;
8
24
  min-block-size: 28px;
9
25
  padding: var(--spacing-2xs) var(--spacing-xs);
10
-
11
- font: var(--typography-text-xs-font);
12
-
13
- letter-spacing: var(--typography-text-xs-letter_spacing, 0);
14
-
15
- text-transform: var(--typography-text-xs-text_transform, none);
16
26
  }
17
27
  .Tooltip_size_s {
18
28
  min-inline-size: 40px;
19
29
  min-block-size: 40px;
20
30
  padding: var(--spacing-xs) var(--spacing-s);
21
-
22
- font: var(--typography-text-s-font);
23
-
24
- letter-spacing: var(--typography-text-s-letter_spacing, 0);
25
-
26
- text-transform: var(--typography-text-s-text_transform, none);
27
31
  }
28
- .Tooltip_variant_dark,
29
- .Tooltip_inverse {
30
- color: var(--color-content-primary-inverse);
31
- }
@@ -1,7 +1,8 @@
1
1
  import { __assign, __read, __rest } from "tslib";
2
2
  import './Tooltip.css';
3
- import React, { useRef, useMemo, useState, useEffect } from 'react';
3
+ import React, { useRef, useMemo, useEffect, useState } from 'react';
4
4
  import { deprecate } from '@ozen-ui/logger';
5
+ import { useBoolean } from '../../hooks/useBoolean';
5
6
  import { useControlled } from '../../hooks/useControlled';
6
7
  import { useDebounceCallback } from '../../hooks/useDebounceCallback';
7
8
  import { useMultiRef } from '../../hooks/useMultiRef';
@@ -13,14 +14,14 @@ import { TOOLTIP_DEFAULT_ARROW, TOOLTIP_DEFAULT_DELAY_ENTER, TOOLTIP_DEFAULT_DEL
13
14
  export var cnTooltip = cn('Tooltip');
14
15
  export var Tooltip = polymorphicComponentWithRef(function (inProps, ref) {
15
16
  var props = useThemeProps({ props: inProps, name: 'Tooltip' });
16
- var _a = props.trigger, trigger = _a === void 0 ? TOOLTIP_DEFAULT_TRIGGER : _a, _b = props.size, size = _b === void 0 ? TOOLTIP_DEFAULT_SIZE : _b, _c = props.offset, offset = _c === void 0 ? TOOLTIP_DEFAULT_OFFSET : _c, _d = props.delayEnter, delayEnter = _d === void 0 ? TOOLTIP_DEFAULT_DELAY_ENTER : _d, _e = props.delayLeave, delayLeave = _e === void 0 ? TOOLTIP_DEFAULT_DELAY_LEAVE : _e, _f = props.arrow, arrow = _f === void 0 ? TOOLTIP_DEFAULT_ARROW : _f, _g = props.shouldWrapChildren, shouldWrapChildren = _g === void 0 ? TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN : _g, _h = props.disabled, disabled = _h === void 0 ? TOOLTIP_DEFAULT_DISABLED : _h, _j = props.inverse, inverse = _j === void 0 ? TOOLTIP_DEFAULT_INVERSE : _j, variant = props.variant, children = props.children, label = props.label, openProp = props.open, placement = props.placement, disableInteractive = props.disableInteractive, className = props.className, onOpen = props.onOpen, onClose = props.onClose, _k = props.as, as = _k === void 0 ? TOOLTIP_DEFAULT_TAG : _k, other = __rest(props, ["trigger", "size", "offset", "delayEnter", "delayLeave", "arrow", "shouldWrapChildren", "disabled", "inverse", "variant", "children", "label", "open", "placement", "disableInteractive", "className", "onOpen", "onClose", "as"]);
17
+ var _a = props.trigger, trigger = _a === void 0 ? TOOLTIP_DEFAULT_TRIGGER : _a, _b = props.size, size = _b === void 0 ? TOOLTIP_DEFAULT_SIZE : _b, _c = props.offset, offset = _c === void 0 ? TOOLTIP_DEFAULT_OFFSET : _c, _d = props.delayEnter, delayEnter = _d === void 0 ? TOOLTIP_DEFAULT_DELAY_ENTER : _d, _e = props.delayLeave, delayLeave = _e === void 0 ? TOOLTIP_DEFAULT_DELAY_LEAVE : _e, _f = props.arrow, arrow = _f === void 0 ? TOOLTIP_DEFAULT_ARROW : _f, _g = props.shouldWrapChildren, shouldWrapChildren = _g === void 0 ? TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN : _g, _h = props.disabled, disabled = _h === void 0 ? TOOLTIP_DEFAULT_DISABLED : _h, _j = props.inverse, inverse = _j === void 0 ? TOOLTIP_DEFAULT_INVERSE : _j, _k = props.as, as = _k === void 0 ? TOOLTIP_DEFAULT_TAG : _k, variant = props.variant, children = props.children, label = props.label, openProp = props.open, placement = props.placement, disableInteractive = props.disableInteractive, className = props.className, onOpen = props.onOpen, onClose = props.onClose, other = __rest(props, ["trigger", "size", "offset", "delayEnter", "delayLeave", "arrow", "shouldWrapChildren", "disabled", "inverse", "as", "variant", "children", "label", "open", "placement", "disableInteractive", "className", "onOpen", "onClose"]);
17
18
  if (process.env.NODE_ENV !== 'production' && variant) {
18
19
  deprecate('Свойство «variant» устарело. Для замены используйте «inverse».');
19
20
  }
20
- var _l = __read(useState(), 2), delay = _l[0], setDelay = _l[1];
21
- var _m = __read(useState(), 2), hasFocus = _m[0], setHasFocus = _m[1];
22
- var _o = __read(useState(), 2), hasHover = _o[0], setHasHover = _o[1];
23
21
  var anchorRef = useRef(null);
22
+ var _l = __read(useState(), 2), delay = _l[0], setDelay = _l[1];
23
+ var _m = __read(useBoolean(), 2), focused = _m[0], setFocused = _m[1];
24
+ var _o = __read(useBoolean(), 2), hovered = _o[0], setHovered = _o[1];
24
25
  var modifiers = [
25
26
  {
26
27
  name: 'arrow',
@@ -35,22 +36,27 @@ export var Tooltip = polymorphicComponentWithRef(function (inProps, ref) {
35
36
  name: 'Tooltip',
36
37
  state: 'open',
37
38
  }), 2), openState = _p[0], setOpenState = _p[1];
38
- useEffect(function () {
39
- setDelay(openState ? delayLeave : delayEnter);
40
- }, [openState, delayEnter, delayLeave]);
41
- var handleOpen = function (open) {
42
- if (disabled) {
39
+ var setOpen = function (open) {
40
+ if (disabled && open)
43
41
  return;
44
- }
45
- if (open) {
42
+ if (open)
46
43
  onOpen === null || onOpen === void 0 ? void 0 : onOpen();
47
- }
48
- else {
44
+ else
49
45
  onClose === null || onClose === void 0 ? void 0 : onClose();
50
- }
51
46
  setOpenState(open);
52
47
  };
53
- var _q = __read(useDebounceCallback(handleOpen, delay), 1), debounceSetOpen = _q[0];
48
+ var _q = __read(useDebounceCallback(setOpen, delay), 2), setOpenWithDelay = _q[0], clearTimeout = _q[1];
49
+ var closeWithDelay = function () { return setOpenWithDelay(false); };
50
+ useEffect(function () {
51
+ setDelay(openState ? delayLeave : delayEnter);
52
+ }, [openState, delayEnter, delayLeave]);
53
+ useEffect(function () {
54
+ if (!disabled)
55
+ return;
56
+ clearTimeout();
57
+ if (openState)
58
+ setOpen(false);
59
+ }, [disabled, openState]);
54
60
  var resolveChildren = useMemo(function () {
55
61
  return typeof children !== 'object' || shouldWrapChildren ? (React.createElement("span", null, children)) : (children);
56
62
  }, [children, shouldWrapChildren]);
@@ -58,36 +64,34 @@ export var Tooltip = polymorphicComponentWithRef(function (inProps, ref) {
58
64
  var childrenMultiRef = useMultiRef([anchorRef, childrenRef]);
59
65
  var handleMouseEnter = function () {
60
66
  if (trigger === 'hover' || trigger === 'hover&focus') {
61
- setHasHover(true);
62
- debounceSetOpen(true);
67
+ setHovered.on();
68
+ setOpenWithDelay(true);
63
69
  }
64
70
  };
65
71
  var handleMouseLeave = function () {
66
72
  if (trigger === 'hover' || trigger === 'hover&focus') {
67
- setHasHover(false);
68
- if (!hasFocus)
69
- debounceSetOpen(false);
73
+ setHovered.off();
74
+ if (!focused)
75
+ setOpenWithDelay(false);
70
76
  }
71
77
  };
72
78
  var handleClick = function () {
73
- if (trigger === 'click') {
74
- debounceSetOpen(!openState);
75
- }
79
+ if (trigger === 'click')
80
+ setOpenWithDelay(!openState);
76
81
  };
77
82
  var handleFocus = function () {
78
83
  if (trigger === 'focus' || trigger === 'hover&focus') {
79
- setHasFocus(true);
80
- debounceSetOpen(true);
84
+ setFocused.on();
85
+ setOpenWithDelay(true);
81
86
  }
82
87
  };
83
88
  var handleBlur = function () {
84
89
  if (trigger === 'focus' || trigger === 'hover&focus') {
85
- setHasFocus(false);
86
- if (!hasHover)
87
- debounceSetOpen(false);
90
+ setFocused.off();
91
+ if (!hovered)
92
+ setOpenWithDelay(false);
88
93
  }
89
94
  };
90
- var handleClose = function () { return debounceSetOpen(false); };
91
95
  var composeChildrenProps = useMemo(function () {
92
96
  var onClick = childrenProps.onClick, onFocus = childrenProps.onFocus, onBlur = childrenProps.onBlur, onMouseEnter = childrenProps.onMouseEnter, onMouseLeave = childrenProps.onMouseLeave;
93
97
  return {
@@ -114,6 +118,7 @@ export var Tooltip = polymorphicComponentWithRef(function (inProps, ref) {
114
118
  },
115
119
  };
116
120
  }, [
121
+ trigger,
117
122
  childrenProps,
118
123
  childrenMultiRef,
119
124
  handleMouseEnter,
@@ -124,8 +129,9 @@ export var Tooltip = polymorphicComponentWithRef(function (inProps, ref) {
124
129
  ]);
125
130
  return (React.createElement(React.Fragment, null,
126
131
  React.cloneElement(resolveChildren, composeChildrenProps),
127
- React.createElement(Popover, __assign({ anchorRef: anchorRef, strategy: "absolute", as: as, background: "main" }, (variant === 'dark' && { background: 'main-inverse' }), (inverse && { background: 'main-inverse' }), { radius: size === 'xs' ? 's' : 'l' }, other, { ref: ref, offset: offset, placement: placement, open: openState && !disabled, onClose: handleClose, className: cnTooltip({ size: size, variant: variant, inverse: inverse }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
132
+ React.createElement(Popover, __assign({ anchorRef: anchorRef, strategy: "absolute", as: as, background: "main" }, (variant === 'dark' && { background: 'main-inverse' }), (inverse && { background: 'main-inverse' }), { radius: size === 'xs' ? 's' : 'l' }, other, { ref: ref, offset: offset, placement: placement, open: openState, onClose: closeWithDelay, className: cnTooltip({ size: size, variant: variant, inverse: inverse }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
128
133
  size: size,
129
- }, modifiers: modifiers, disableEnforceFocus: true, disableReturnFocus: true }), label)));
134
+ }, modifiers: modifiers, disableEnforceFocus: true, disableReturnFocus: true }),
135
+ React.createElement("div", { className: cnTooltip('Content', { size: size, variant: variant, inverse: inverse }) }, label))));
130
136
  });
131
137
  Tooltip.displayName = 'Tooltip';
@@ -29,6 +29,9 @@
29
29
  .Typography_align_initial {
30
30
  text-align: initial;
31
31
  }
32
+ .Typography_align_inherit {
33
+ text-align: inherit;
34
+ }
32
35
  .Typography_color_primary {
33
36
  color: var(--color-content-primary);
34
37
  }
@@ -119,6 +122,9 @@
119
122
  .Typography_color_accentDisabled {
120
123
  color: var(--color-content-accent-disabled);
121
124
  }
125
+ .Typography_color_inherit {
126
+ color: inherit;
127
+ }
122
128
  .Typography_variant_heading-4xl {
123
129
  font: var(--typography-heading-4xl-font);
124
130
  letter-spacing: var(--typography-heading-4xl-letter_spacing, 0);
@@ -327,6 +333,11 @@
327
333
  .Typography_variant_caption-3xs_1.Typography_defaultMargin {
328
334
  margin-block-end: var(--spacing-3xs);
329
335
  }
336
+ .Typography_variant_inherit {
337
+ font: inherit;
338
+ letter-spacing: inherit;
339
+ text-transform: inherit;
340
+ }
330
341
  .Typography_link {
331
342
  color: var(--color-content-action);
332
343
  }
@@ -1,13 +1,13 @@
1
1
  import './Typography.css';
2
2
  import type { ElementType, ReactNode } from 'react';
3
3
  import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
4
- export declare const typographyVariant: readonly ["heading-4xl", "heading-3xl", "heading-2xl", "heading-xl", "text-4xl", "text-4xl_1", "text-3xl", "text-3xl_1", "text-2xl", "text-2xl_1", "text-xl", "text-xl_1", "text-l", "text-l_1", "text-m", "text-m_1", "text-s", "text-s_1", "text-xs", "text-xs_1", "text-2xs", "text-2xs_1", "text-3xs", "text-3xs_1", "caption-3xs", "caption-3xs_1"];
4
+ export declare const typographyVariant: readonly ["heading-4xl", "heading-3xl", "heading-2xl", "heading-xl", "text-4xl", "text-4xl_1", "text-3xl", "text-3xl_1", "text-2xl", "text-2xl_1", "text-xl", "text-xl_1", "text-l", "text-l_1", "text-m", "text-m_1", "text-s", "text-s_1", "text-xs", "text-xs_1", "text-2xs", "text-2xs_1", "text-3xs", "text-3xs_1", "caption-3xs", "caption-3xs_1", "inherit"];
5
5
  export type TypographyVariant = (typeof typographyVariant)[number];
6
6
  export declare const typographyDisplayVariant: readonly ["block", "inline", "inlineBlock"];
7
7
  export type TypographyDisplayVariant = (typeof typographyDisplayVariant)[number];
8
- export declare const typographyAlignVariant: readonly ["left", "center", "right"];
8
+ export declare const typographyAlignVariant: readonly ["left", "center", "right", "initial", "inherit"];
9
9
  export type TypographyAlignVariant = (typeof typographyAlignVariant)[number];
10
- export declare const typographyColorVariant: readonly ["primary", "secondary", "tertiary", "disabled", "ghostDisabled", "action", "actionPressed", "actionHover", "actionDark", "actionOn", "error", "errorHover", "errorPressed", "errorDark", "warning", "warningHover", "warningPressed", "warningDark", "success", "successHover", "successDark", "successPressed", "info", "infoHover", "infoPressed", "infoDark", "primaryInverse", "accentPrimary", "accentSecondary", "accentDisabled"];
10
+ export declare const typographyColorVariant: readonly ["primary", "secondary", "tertiary", "disabled", "ghostDisabled", "action", "actionPressed", "actionHover", "actionDark", "actionOn", "error", "errorHover", "errorPressed", "errorDark", "warning", "warningHover", "warningPressed", "warningDark", "success", "successHover", "successDark", "successPressed", "info", "infoHover", "infoPressed", "infoDark", "primaryInverse", "accentPrimary", "accentSecondary", "accentDisabled", "inherit"];
11
11
  export type TypographyColorVariant = (typeof typographyColorVariant)[number];
12
12
  export type TypographyBaseProps = {
13
13
  /** Вариант типографики */
@@ -33,13 +33,20 @@ export var typographyVariant = [
33
33
  'text-3xs_1',
34
34
  'caption-3xs',
35
35
  'caption-3xs_1',
36
+ 'inherit',
36
37
  ];
37
38
  export var typographyDisplayVariant = [
38
39
  'block',
39
40
  'inline',
40
41
  'inlineBlock',
41
42
  ];
42
- export var typographyAlignVariant = ['left', 'center', 'right'];
43
+ export var typographyAlignVariant = [
44
+ 'left',
45
+ 'center',
46
+ 'right',
47
+ 'initial',
48
+ 'inherit',
49
+ ];
43
50
  export var typographyColorVariant = [
44
51
  'primary',
45
52
  'secondary',
@@ -71,6 +78,7 @@ export var typographyColorVariant = [
71
78
  'accentPrimary',
72
79
  'accentSecondary',
73
80
  'accentDisabled',
81
+ 'inherit',
74
82
  ];
75
83
  export var cnTypography = cn('Typography');
76
84
  export var Typography = polymorphicComponentWithRef(function (inProps, ref) {
@@ -25,4 +25,5 @@ export var matchVariantToTag = {
25
25
  'text-3xs_1': 'p',
26
26
  'caption-3xs': 'span',
27
27
  'caption-3xs_1': 'span',
28
+ inherit: 'p',
28
29
  };
@@ -1,3 +1,4 @@
1
+ import type { Dispatch, SetStateAction } from 'react';
1
2
  export type UseBooleanControllers = {
2
3
  /** Установить значение в {true} */
3
4
  on: () => void;
@@ -5,6 +6,8 @@ export type UseBooleanControllers = {
5
6
  off: () => void;
6
7
  /** Перевести значение в противоположное состояние */
7
8
  toggle: () => void;
9
+ /** Перевести значение в собственное состояние */
10
+ set: Dispatch<SetStateAction<boolean>>;
8
11
  };
9
12
  export type UseBooleanReturnValue = [boolean, UseBooleanControllers];
10
13
  export declare function useBoolean(
@@ -8,5 +8,5 @@ defaultValue) {
8
8
  var on = useCallback(function () { return setValue(true); }, []);
9
9
  var off = useCallback(function () { return setValue(false); }, []);
10
10
  var toggle = useCallback(function () { return setValue(function (value) { return !value; }); }, []);
11
- return [value, { on: on, off: off, toggle: toggle }];
11
+ return [value, { on: on, off: off, toggle: toggle, set: setValue }];
12
12
  }
@@ -8,9 +8,5 @@ export interface UseControlledProps<T = unknown> {
8
8
  /** Имя свойства для предупреждения */
9
9
  state?: string;
10
10
  }
11
- /**
12
- * Управляет значением компонента
13
- * при контролируемом и неконтролируемом
14
- * поведении
15
- * */
11
+ /** Управляет значением компонента при контролируемом и неконтролируемом поведении */
16
12
  export declare const useControlled: <T = unknown>({ value: valueProp, defaultValue: defaultProp, name, state, }: UseControlledProps<T>) => [T | undefined, (newValue: T) => void, boolean];
@@ -1,37 +1,31 @@
1
1
  import { __read } from "tslib";
2
2
  /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */
3
3
  import { useState, useCallback, useEffect, useRef } from 'react';
4
- /**
5
- * Управляет значением компонента
6
- * при контролируемом и неконтролируемом
7
- * поведении
8
- * */
4
+ import { logger } from '@ozen-ui/logger';
5
+ /** Управляет значением компонента при контролируемом и неконтролируемом поведении */
9
6
  export var useControlled = function (_a) {
10
7
  var valueProp = _a.value, defaultProp = _a.defaultValue, name = _a.name, _b = _a.state, state = _b === void 0 ? 'value' : _b;
11
- /**
12
- * Определение контролируемого поведения
13
- * при первом рендере
14
- * (неизменяемое значение)
15
- * */
8
+ /** Определение контролируемого поведения при первом рендере (неизменяемое значение) */
16
9
  var isControlled = useRef(valueProp !== undefined).current;
17
10
  var _c = __read(useState(defaultProp), 2), valueState = _c[0], setValue = _c[1];
18
11
  var value = isControlled ? valueProp : valueState;
19
12
  if (process.env.NODE_ENV !== 'production') {
20
13
  useEffect(function () {
21
14
  if (isControlled !== (valueProp !== undefined)) {
22
- console.error([
23
- "\u00D6zen-UI: \u041F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 '".concat(state, "' \u0443 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430 ").concat(name, " \u043F\u043E\u043C\u0435\u043D\u044F\u043B\u043E\u0441\u044C \u0441 ").concat(isControlled ? '' : 'не', "\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u043E\u0433\u043E \u043D\u0430 ").concat(isControlled ? 'не' : '', "\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u043E\u0435."),
24
- 'Компоненты не должны переключаться с неконтролируемого поведения в контролируемое, или наоборот.',
25
- 'Поведение определяется после первого рендера и является контролируемым, если значение не «undefined».',
15
+ logger.error([
16
+ "\u041F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u00AB".concat(state, "\u00BB \u0443 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430 ").concat(name, " \u043F\u043E\u043C\u0435\u043D\u044F\u043B\u043E\u0441\u044C \u0441 ").concat(isControlled ? '' : 'не', "\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u043E\u0433\u043E \u043D\u0430 ").concat(isControlled ? 'не' : '', "\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u043E\u0435."),
17
+ "\n",
18
+ 'Компоненты не должны переключаться с неконтролируемого поведения в контролируемое, или наоборот. Поведение определяется после первого рендера и является контролируемым, если значение не «undefined».',
26
19
  ].join('\n'));
27
20
  }
28
21
  }, [state, name, valueProp]);
29
22
  var defaultValue_1 = useRef(defaultProp).current;
30
23
  useEffect(function () {
31
24
  if (!isControlled && defaultValue_1 !== defaultProp) {
32
- console.error([
33
- "\u00D6zen-UI: \u041D\u0435\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 ".concat(name, " \u0441\u043C\u0435\u043D\u0438\u043B default ").concat(state, " \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0432\u043E\u0439 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 ").concat(name, "."),
34
- "\u0415\u0441\u043B\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043C\u0435\u043D\u044F\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432\u043E\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435\u0441\u044C \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u044B\u043C \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C.",
25
+ logger.error([
26
+ "\u041D\u0435\u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 ".concat(name, " \u0441\u043C\u0435\u043D\u0438\u043B \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0434\u043B\u044F \u00AB").concat(state, "\u00BB \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0432\u043E\u0439 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438."),
27
+ "\n",
28
+ "\u0415\u0441\u043B\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043C\u0435\u043D\u044F\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0434\u043B\u044F \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430 \u0432\u043E\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435\u0441\u044C \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u043C\u044B\u043C \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C.",
35
29
  ].join('\n'));
36
30
  }
37
31
  }, [JSON.stringify(defaultProp)]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozen-ui/kit",
3
- "version": "0.50.2",
3
+ "version": "0.51.0",
4
4
  "description": "React component library",
5
5
  "files": [
6
6
  "*"
@@ -28,9 +28,9 @@
28
28
  "react-popper": "^2.3.0",
29
29
  "react-transition-group": "^4.4.5",
30
30
  "tslib": "^2.6.2",
31
- "@ozen-ui/icons": "0.50.2",
32
- "@ozen-ui/fonts": "0.50.2",
33
- "@ozen-ui/logger": "0.50.2"
31
+ "@ozen-ui/fonts": "0.51.0",
32
+ "@ozen-ui/icons": "0.51.0",
33
+ "@ozen-ui/logger": "0.51.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": ">=17.0.2 <19.0.0",