@ozen-ui/kit 0.73.0 → 0.75.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 (179) hide show
  1. package/__inner__/cjs/components/Calendar/Calendar.js +26 -2
  2. package/__inner__/cjs/components/Calendar/CalendarContext.d.ts +8 -1
  3. package/__inner__/cjs/components/Calendar/CalendarContext.js +10 -1
  4. package/__inner__/cjs/components/Calendar/__tests__/utils.d.ts +11 -0
  5. package/__inner__/cjs/components/Calendar/__tests__/utils.js +58 -0
  6. package/__inner__/cjs/components/Calendar/components/CalendarGrid/CalendarGrid.js +4 -3
  7. package/__inner__/cjs/components/Calendar/components/CalendarItem/CalendarItem.js +25 -2
  8. package/__inner__/cjs/components/Calendar/components/CalendarItem/CalendarItemContext.d.ts +1 -0
  9. package/__inner__/cjs/components/Calendar/components/CalendarItem/CalendarItemContext.js +1 -0
  10. package/__inner__/cjs/components/Calendar/components/CalendarModeRange/CalendarModeRange.js +68 -13
  11. package/__inner__/cjs/components/Calendar/components/CalendarModeSingle/CalendarModeSingle.js +62 -16
  12. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/CalendarSwitcher.js +6 -7
  13. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/CalendarSwitcherText.d.ts +3 -0
  14. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/CalendarSwitcherText.js +13 -0
  15. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/index.d.ts +2 -0
  16. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/index.js +5 -0
  17. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/types.d.ts +4 -0
  18. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/types.js +2 -0
  19. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/components/index.d.ts +1 -0
  20. package/__inner__/cjs/components/Calendar/components/CalendarSwitcher/components/index.js +4 -0
  21. package/__inner__/cjs/components/Calendar/constants.d.ts +2 -0
  22. package/__inner__/cjs/components/Calendar/constants.js +7 -1
  23. package/__inner__/cjs/components/Calendar/index.d.ts +1 -0
  24. package/__inner__/cjs/components/Calendar/index.js +1 -0
  25. package/__inner__/cjs/components/Calendar/types.d.ts +13 -5
  26. package/__inner__/cjs/components/Calendar/utils.d.ts +10 -1
  27. package/__inner__/cjs/components/Calendar/utils.js +12 -1
  28. package/__inner__/cjs/components/DatePicker/components/DateInput/DateInput.js +4 -3
  29. package/__inner__/cjs/components/DatePicker/components/DateInput/types.d.ts +6 -2
  30. package/__inner__/cjs/components/DatePicker/components/DateInput/utils/dateInputMask/dateInputMask.d.ts +2 -1
  31. package/__inner__/cjs/components/DatePicker/components/DateInput/utils/dateInputMask/dateInputMask.js +67 -7
  32. package/__inner__/cjs/components/DatePicker/components/DatePickerModeDate/DatePickerModeDate.js +32 -20
  33. package/__inner__/cjs/components/DatePicker/components/DatePickerModeDateRange/DatePickerModeDateRange.js +74 -51
  34. package/__inner__/cjs/components/DatePicker/constants.d.ts +2 -0
  35. package/__inner__/cjs/components/DatePicker/constants.js +4 -1
  36. package/__inner__/cjs/components/DatePicker/types.d.ts +10 -6
  37. package/__inner__/cjs/components/DatePicker/types.js +3 -1
  38. package/__inner__/cjs/components/DatePicker/utils/formatDateToString/formatDateToString.d.ts +2 -1
  39. package/__inner__/cjs/components/DatePicker/utils/formatDateToString/formatDateToString.js +18 -5
  40. package/__inner__/cjs/components/DatePicker/utils/formatStringToDate/formatStringToDate.d.ts +2 -1
  41. package/__inner__/cjs/components/DatePicker/utils/formatStringToDate/formatStringToDate.js +6 -5
  42. package/__inner__/cjs/components/DatePicker/utils/getCommonCalendarProps/getCommonCalendarProps.js +2 -2
  43. package/__inner__/cjs/components/DatePicker/utils/index.d.ts +2 -0
  44. package/__inner__/cjs/components/DatePicker/utils/index.js +2 -0
  45. package/__inner__/cjs/components/DatePicker/utils/isValidDateString/isValidDateString.d.ts +2 -1
  46. package/__inner__/cjs/components/DatePicker/utils/isValidDateString/isValidDateString.js +9 -8
  47. package/__inner__/cjs/components/DatePicker/utils/maskPastedDate/index.d.ts +1 -0
  48. package/__inner__/cjs/components/DatePicker/utils/maskPastedDate/index.js +4 -0
  49. package/__inner__/cjs/components/DatePicker/utils/maskPastedDate/maskPastedDate.d.ts +6 -0
  50. package/__inner__/cjs/components/DatePicker/utils/maskPastedDate/maskPastedDate.js +43 -0
  51. package/__inner__/cjs/components/DatePicker/utils/parseDateString/index.d.ts +1 -0
  52. package/__inner__/cjs/components/DatePicker/utils/parseDateString/index.js +4 -0
  53. package/__inner__/cjs/components/DatePicker/utils/parseDateString/parseDateString.d.ts +6 -0
  54. package/__inner__/cjs/components/DatePicker/utils/parseDateString/parseDateString.js +66 -0
  55. package/__inner__/cjs/components/Grid/Grid.d.ts +2 -1
  56. package/__inner__/cjs/components/Grid/GridItem.d.ts +2 -1
  57. package/__inner__/cjs/components/ListCardItem/hooks/useListCardItemRatio.js +10 -14
  58. package/__inner__/cjs/components/SectionMessage/SectionMessage.css +6 -0
  59. package/__inner__/cjs/components/SectionMessage/SectionMessage.js +8 -5
  60. package/__inner__/cjs/components/SectionMessage/config.d.ts +2 -3
  61. package/__inner__/cjs/components/SectionMessage/config.js +6 -22
  62. package/__inner__/cjs/components/SectionMessage/constants.d.ts +3 -0
  63. package/__inner__/cjs/components/SectionMessage/constants.js +7 -1
  64. package/__inner__/cjs/components/SectionMessage/types.d.ts +6 -1
  65. package/__inner__/cjs/components/SectionMessage/types.js +1 -0
  66. package/__inner__/cjs/components/Stack/Stack.css +3 -0
  67. package/__inner__/cjs/components/Stack/Stack.js +2 -1
  68. package/__inner__/cjs/components/Stack/constants.d.ts +1 -0
  69. package/__inner__/cjs/components/Stack/constants.js +2 -1
  70. package/__inner__/cjs/components/Stack/types.d.ts +4 -0
  71. package/__inner__/cjs/components/Stack/types.js +2 -1
  72. package/__inner__/cjs/hooks/useDevEffect/index.d.ts +1 -0
  73. package/__inner__/cjs/hooks/useDevEffect/index.js +4 -0
  74. package/__inner__/cjs/hooks/useDevEffect/useDevEffect.d.ts +3 -0
  75. package/__inner__/cjs/hooks/useDevEffect/useDevEffect.js +13 -0
  76. package/__inner__/cjs/hooks/useIntersectionObserver/index.d.ts +2 -0
  77. package/__inner__/cjs/hooks/useIntersectionObserver/index.js +5 -0
  78. package/__inner__/cjs/hooks/useIntersectionObserver/types.d.ts +29 -0
  79. package/__inner__/cjs/hooks/useIntersectionObserver/types.js +2 -0
  80. package/__inner__/cjs/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +6 -0
  81. package/__inner__/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +80 -0
  82. package/__inner__/cjs/locale/locale.js +39 -3
  83. package/__inner__/cjs/utils/array/createFilled/createFilledArray.d.ts +1 -1
  84. package/__inner__/cjs/utils/array/createFilled/createFilledArray.js +6 -1
  85. package/__inner__/cjs/utils/react/extractRef.d.ts +2 -0
  86. package/__inner__/cjs/utils/react/extractRef.js +11 -0
  87. package/__inner__/cjs/utils/react/index.d.ts +1 -0
  88. package/__inner__/cjs/utils/react/index.js +1 -0
  89. package/__inner__/esm/components/Calendar/Calendar.js +27 -3
  90. package/__inner__/esm/components/Calendar/CalendarContext.d.ts +8 -1
  91. package/__inner__/esm/components/Calendar/CalendarContext.js +10 -1
  92. package/__inner__/esm/components/Calendar/__tests__/utils.d.ts +11 -0
  93. package/__inner__/esm/components/Calendar/__tests__/utils.js +45 -0
  94. package/__inner__/esm/components/Calendar/components/CalendarGrid/CalendarGrid.js +4 -3
  95. package/__inner__/esm/components/Calendar/components/CalendarItem/CalendarItem.js +25 -2
  96. package/__inner__/esm/components/Calendar/components/CalendarItem/CalendarItemContext.d.ts +1 -0
  97. package/__inner__/esm/components/Calendar/components/CalendarItem/CalendarItemContext.js +1 -0
  98. package/__inner__/esm/components/Calendar/components/CalendarModeRange/CalendarModeRange.js +70 -15
  99. package/__inner__/esm/components/Calendar/components/CalendarModeSingle/CalendarModeSingle.js +64 -18
  100. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/CalendarSwitcher.js +6 -7
  101. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/CalendarSwitcherText.d.ts +3 -0
  102. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/CalendarSwitcherText.js +9 -0
  103. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/index.d.ts +2 -0
  104. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/index.js +2 -0
  105. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/types.d.ts +4 -0
  106. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/components/CalendarSwitcherText/types.js +1 -0
  107. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/components/index.d.ts +1 -0
  108. package/__inner__/esm/components/Calendar/components/CalendarSwitcher/components/index.js +1 -0
  109. package/__inner__/esm/components/Calendar/constants.d.ts +2 -0
  110. package/__inner__/esm/components/Calendar/constants.js +6 -0
  111. package/__inner__/esm/components/Calendar/index.d.ts +1 -0
  112. package/__inner__/esm/components/Calendar/index.js +1 -0
  113. package/__inner__/esm/components/Calendar/types.d.ts +13 -5
  114. package/__inner__/esm/components/Calendar/utils.d.ts +10 -1
  115. package/__inner__/esm/components/Calendar/utils.js +9 -0
  116. package/__inner__/esm/components/DatePicker/components/DateInput/DateInput.js +3 -2
  117. package/__inner__/esm/components/DatePicker/components/DateInput/types.d.ts +6 -2
  118. package/__inner__/esm/components/DatePicker/components/DateInput/utils/dateInputMask/dateInputMask.d.ts +2 -1
  119. package/__inner__/esm/components/DatePicker/components/DateInput/utils/dateInputMask/dateInputMask.js +67 -7
  120. package/__inner__/esm/components/DatePicker/components/DatePickerModeDate/DatePickerModeDate.js +33 -21
  121. package/__inner__/esm/components/DatePicker/components/DatePickerModeDateRange/DatePickerModeDateRange.js +68 -45
  122. package/__inner__/esm/components/DatePicker/constants.d.ts +2 -0
  123. package/__inner__/esm/components/DatePicker/constants.js +3 -0
  124. package/__inner__/esm/components/DatePicker/types.d.ts +10 -6
  125. package/__inner__/esm/components/DatePicker/types.js +2 -0
  126. package/__inner__/esm/components/DatePicker/utils/formatDateToString/formatDateToString.d.ts +2 -1
  127. package/__inner__/esm/components/DatePicker/utils/formatDateToString/formatDateToString.js +18 -5
  128. package/__inner__/esm/components/DatePicker/utils/formatStringToDate/formatStringToDate.d.ts +2 -1
  129. package/__inner__/esm/components/DatePicker/utils/formatStringToDate/formatStringToDate.js +6 -5
  130. package/__inner__/esm/components/DatePicker/utils/getCommonCalendarProps/getCommonCalendarProps.js +2 -2
  131. package/__inner__/esm/components/DatePicker/utils/index.d.ts +2 -0
  132. package/__inner__/esm/components/DatePicker/utils/index.js +2 -0
  133. package/__inner__/esm/components/DatePicker/utils/isValidDateString/isValidDateString.d.ts +2 -1
  134. package/__inner__/esm/components/DatePicker/utils/isValidDateString/isValidDateString.js +8 -7
  135. package/__inner__/esm/components/DatePicker/utils/maskPastedDate/index.d.ts +1 -0
  136. package/__inner__/esm/components/DatePicker/utils/maskPastedDate/index.js +1 -0
  137. package/__inner__/esm/components/DatePicker/utils/maskPastedDate/maskPastedDate.d.ts +6 -0
  138. package/__inner__/esm/components/DatePicker/utils/maskPastedDate/maskPastedDate.js +39 -0
  139. package/__inner__/esm/components/DatePicker/utils/parseDateString/index.d.ts +1 -0
  140. package/__inner__/esm/components/DatePicker/utils/parseDateString/index.js +1 -0
  141. package/__inner__/esm/components/DatePicker/utils/parseDateString/parseDateString.d.ts +6 -0
  142. package/__inner__/esm/components/DatePicker/utils/parseDateString/parseDateString.js +62 -0
  143. package/__inner__/esm/components/Grid/Grid.d.ts +2 -1
  144. package/__inner__/esm/components/Grid/GridItem.d.ts +2 -1
  145. package/__inner__/esm/components/ListCardItem/hooks/useListCardItemRatio.js +10 -14
  146. package/__inner__/esm/components/SectionMessage/SectionMessage.css +6 -0
  147. package/__inner__/esm/components/SectionMessage/SectionMessage.js +8 -5
  148. package/__inner__/esm/components/SectionMessage/config.d.ts +2 -3
  149. package/__inner__/esm/components/SectionMessage/config.js +6 -21
  150. package/__inner__/esm/components/SectionMessage/constants.d.ts +3 -0
  151. package/__inner__/esm/components/SectionMessage/constants.js +6 -0
  152. package/__inner__/esm/components/SectionMessage/types.d.ts +6 -1
  153. package/__inner__/esm/components/SectionMessage/types.js +1 -0
  154. package/__inner__/esm/components/Stack/Stack.css +3 -0
  155. package/__inner__/esm/components/Stack/Stack.js +3 -2
  156. package/__inner__/esm/components/Stack/constants.d.ts +1 -0
  157. package/__inner__/esm/components/Stack/constants.js +1 -0
  158. package/__inner__/esm/components/Stack/types.d.ts +4 -0
  159. package/__inner__/esm/components/Stack/types.js +1 -0
  160. package/__inner__/esm/hooks/useDevEffect/index.d.ts +1 -0
  161. package/__inner__/esm/hooks/useDevEffect/index.js +1 -0
  162. package/__inner__/esm/hooks/useDevEffect/useDevEffect.d.ts +3 -0
  163. package/__inner__/esm/hooks/useDevEffect/useDevEffect.js +9 -0
  164. package/__inner__/esm/hooks/useIntersectionObserver/index.d.ts +2 -0
  165. package/__inner__/esm/hooks/useIntersectionObserver/index.js +2 -0
  166. package/__inner__/esm/hooks/useIntersectionObserver/types.d.ts +29 -0
  167. package/__inner__/esm/hooks/useIntersectionObserver/types.js +1 -0
  168. package/__inner__/esm/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +6 -0
  169. package/__inner__/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +77 -0
  170. package/__inner__/esm/locale/locale.js +39 -3
  171. package/__inner__/esm/utils/array/createFilled/createFilledArray.d.ts +1 -1
  172. package/__inner__/esm/utils/array/createFilled/createFilledArray.js +6 -1
  173. package/__inner__/esm/utils/react/extractRef.d.ts +2 -0
  174. package/__inner__/esm/utils/react/extractRef.js +7 -0
  175. package/__inner__/esm/utils/react/index.d.ts +1 -0
  176. package/__inner__/esm/utils/react/index.js +1 -0
  177. package/package.json +4 -4
  178. package/useDevEffect/package.json +5 -0
  179. package/useIntersectionObserver/package.json +5 -0
@@ -0,0 +1,62 @@
1
+ import { isNotNil, isValidDate } from '../../../../utils';
2
+ export var parseDateString = function (value, steps) {
3
+ if (!isNotNil(value)) {
4
+ return null;
5
+ }
6
+ if (value === '') {
7
+ return null;
8
+ }
9
+ var hasYearsSteps = steps.includes('years');
10
+ var hasMonthsSteps = steps.includes('months');
11
+ var hasDaysSteps = steps.includes('days');
12
+ var splitted = value.split('.');
13
+ var day;
14
+ var month;
15
+ var year;
16
+ var offset = 0;
17
+ if (hasDaysSteps) {
18
+ day = splitted[offset];
19
+ offset += 1;
20
+ }
21
+ if (hasMonthsSteps) {
22
+ month = splitted[offset];
23
+ offset += 1;
24
+ }
25
+ if (hasYearsSteps) {
26
+ year = splitted[offset];
27
+ }
28
+ var parts = [];
29
+ if (hasYearsSteps) {
30
+ parts.push(year);
31
+ }
32
+ else {
33
+ var now = new Date();
34
+ parts.push(now.getFullYear().toString());
35
+ }
36
+ if (hasMonthsSteps) {
37
+ parts.push(month);
38
+ }
39
+ else {
40
+ // 3 месяц для кейса, где пользователь вводит 31 день месяца
41
+ parts.push('03');
42
+ }
43
+ if (hasDaysSteps) {
44
+ parts.push(day);
45
+ }
46
+ else {
47
+ parts.push('01');
48
+ }
49
+ var filteredParts = parts.filter(function (part) { return part !== undefined; });
50
+ if (filteredParts.length !== 3) {
51
+ return null;
52
+ }
53
+ var stringDate = filteredParts.join('-');
54
+ if (stringDate.length !== 10 || !isValidDate(stringDate)) {
55
+ return null;
56
+ }
57
+ return {
58
+ year: parts[0],
59
+ month: parts[1],
60
+ day: parts[2],
61
+ };
62
+ };
@@ -1,5 +1,5 @@
1
1
  import './Grid.css';
2
- import type { ReactNode, ElementType } from 'react';
2
+ import type { ReactNode, ElementType, ComponentRef } from 'react';
3
3
  import type { ResponsiveValue } from '../../types/ResponsiveValue';
4
4
  import { type PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
5
5
  export declare const gridColsVariant: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
@@ -30,4 +30,5 @@ export type GridBaseProps = {
30
30
  className?: string;
31
31
  };
32
32
  export type GridProps<As extends ElementType = 'div'> = PolymorphicComponentPropsWithRef<GridBaseProps, As>;
33
+ export type GridRef<As extends ElementType = 'div'> = ComponentRef<As>;
33
34
  export declare const Grid: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<GridBaseProps, "div", "as">;
@@ -1,5 +1,5 @@
1
1
  import './Grid.css';
2
- import type { ReactNode, ElementType } from 'react';
2
+ import type { ReactNode, ElementType, ComponentRef } from 'react';
3
3
  import type { ResponsiveValue } from '../../types/ResponsiveValue';
4
4
  import { type PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
5
5
  export declare const gridItemColVariant: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
@@ -22,4 +22,5 @@ export type GridItemBaseProps = {
22
22
  className?: string;
23
23
  };
24
24
  export type GridItemProps<As extends ElementType = 'div'> = PolymorphicComponentPropsWithRef<GridItemBaseProps, As>;
25
+ export type GridItemRef<As extends ElementType = 'div'> = ComponentRef<As>;
25
26
  export declare const GridItem: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<GridItemBaseProps, "div", "as">;
@@ -1,19 +1,15 @@
1
- import { useEffect } from 'react';
2
1
  import { logger } from '@ozen-ui/logger';
3
- import { isDev } from '../../../constants/environment';
2
+ import { useDevEffect } from '../../../hooks/useDevEffect';
4
3
  export var useListCardItemRatio = function (contentTrailingRatio) {
5
- if (isDev) {
6
- // eslint-disable-next-line react-hooks/rules-of-hooks
7
- useEffect(function () {
8
- if (contentTrailingRatio < 0) {
9
- logger.error('Свойство «contentTrailingRatio» у компонента ListCardItem не может быть меньше 0');
10
- return;
11
- }
12
- if (contentTrailingRatio > 1) {
13
- logger.error('Свойство «contentTrailingRatio» у компонента ListCardItem не может быть больше 1');
14
- }
15
- }, [contentTrailingRatio]);
16
- }
4
+ useDevEffect(function () {
5
+ if (contentTrailingRatio < 0) {
6
+ logger.error('Свойство «contentTrailingRatio» у компонента ListCardItem не может быть меньше 0');
7
+ return;
8
+ }
9
+ if (contentTrailingRatio > 1) {
10
+ logger.error('Свойство «contentTrailingRatio» у компонента ListCardItem не может быть больше 1');
11
+ }
12
+ }, [contentTrailingRatio]);
17
13
  var contentRatio = contentTrailingRatio * 100;
18
14
  var trailingRatio = 100 - contentRatio;
19
15
  return { content: contentRatio, trailing: trailingRatio };
@@ -42,6 +42,12 @@
42
42
  --section-message-button-color: var(--color-content-error);
43
43
  --section-message-button-color-hover: var(--color-content-error-dark);
44
44
  }
45
+ .SectionMessage_status_action {
46
+ --section-message-icon-color: var(--color-content-action);
47
+ --section-message-background-color: var(--color-background-action-light);
48
+ --section-message-button-color: var(--color-content-action);
49
+ --section-message-button-color-hover: var(--color-content-action-dark);
50
+ }
45
51
  .SectionMessage_size_xs {
46
52
  --section-message-padding: 12px;
47
53
  --section-message-column-gap: var(--spacing-2xs);
@@ -3,9 +3,9 @@ import './modules/SectionMessageButton/SectionMessageButton.css';
3
3
  import './SectionMessage.css';
4
4
  import React, { forwardRef } from 'react';
5
5
  import { useThemeProps } from '../../hooks/useThemeProps';
6
- import { cn } from '../../utils/classname';
6
+ import { renderContent, cn } from '../../utils';
7
7
  import { SECTION_MESSAGE_ICON_BY_STATUS } from './config';
8
- import { SECTION_MESSAGE_DEFAULT_SIZE, SECTION_MESSAGE_DEFAULT_STATUS, } from './constants';
8
+ import { SECTION_MESSAGE_DEFAULT_SIZE, SECTION_MESSAGE_DEFAULT_STATUS, SECTION_MESSAGE_SIZE_TO_ICON_SIZE, } from './constants';
9
9
  import { SectionMessageContext } from './SectionMessageContext';
10
10
  export var cnSectionMessage = cn('SectionMessage');
11
11
  export var SectionMessage = forwardRef(function (inProps, ref) {
@@ -13,8 +13,11 @@ export var SectionMessage = forwardRef(function (inProps, ref) {
13
13
  props: inProps,
14
14
  name: 'SectionMessage',
15
15
  });
16
- var _a = props.status, status = _a === void 0 ? SECTION_MESSAGE_DEFAULT_STATUS : _a, _b = props.size, size = _b === void 0 ? SECTION_MESSAGE_DEFAULT_SIZE : _b, _c = props.showIcon, showIcon = _c === void 0 ? true : _c, children = props.children, action = props.action, title = props.title, className = props.className, otherProps = __rest(props, ["status", "size", "showIcon", "children", "action", "title", "className"]);
17
- var iconSize = size === 'm' || size === 'l' ? 'm' : 's';
16
+ var _a = props.status, status = _a === void 0 ? SECTION_MESSAGE_DEFAULT_STATUS : _a, _b = props.size, size = _b === void 0 ? SECTION_MESSAGE_DEFAULT_SIZE : _b, _c = props.showIcon, showIcon = _c === void 0 ? true : _c, iconProp = props.icon, children = props.children, action = props.action, title = props.title, className = props.className, otherProps = __rest(props, ["status", "size", "showIcon", "icon", "children", "action", "title", "className"]);
17
+ var icon = renderContent({
18
+ content: iconProp !== null && iconProp !== void 0 ? iconProp : SECTION_MESSAGE_ICON_BY_STATUS[status],
19
+ props: { size: SECTION_MESSAGE_SIZE_TO_ICON_SIZE[size] },
20
+ });
18
21
  var resolveAction = function (action) {
19
22
  var actionProps = {
20
23
  variant: 'function',
@@ -33,7 +36,7 @@ export var SectionMessage = forwardRef(function (inProps, ref) {
33
36
  size: size,
34
37
  } },
35
38
  React.createElement("div", __assign({ className: cnSectionMessage({ status: status, size: size }, [className]), role: "alert" }, otherProps, { ref: ref }),
36
- showIcon && (React.createElement("div", { className: cnSectionMessage('Icon') }, SECTION_MESSAGE_ICON_BY_STATUS[status][iconSize])),
39
+ showIcon && React.createElement("div", { className: cnSectionMessage('Icon') }, icon),
37
40
  React.createElement("div", { className: cnSectionMessage('Content') },
38
41
  title && React.createElement("div", { className: cnSectionMessage('Title') }, title),
39
42
  children && (React.createElement("div", { className: cnSectionMessage('Body') }, children)),
@@ -1,3 +1,2 @@
1
- import type { ReactNode } from 'react';
2
- import type { SectionMessageStatusVariant } from './types';
3
- export declare const SECTION_MESSAGE_ICON_BY_STATUS: Readonly<Record<SectionMessageStatusVariant, Record<'s' | 'm', ReactNode>>>;
1
+ import type { SectionMessageIconType, SectionMessageStatusVariant } from './types';
2
+ export declare const SECTION_MESSAGE_ICON_BY_STATUS: Readonly<Record<SectionMessageStatusVariant, SectionMessageIconType>>;
@@ -1,24 +1,9 @@
1
- import React from 'react';
2
1
  import { CheckCircleOutlineIcon, InfoCircleOutlineIcon, WarningCircleOutlineIcon, WarningTriangleOutlineIcon, } from '@ozen-ui/icons';
3
2
  export var SECTION_MESSAGE_ICON_BY_STATUS = {
4
- neutral: {
5
- m: React.createElement(InfoCircleOutlineIcon, { size: "m" }),
6
- s: React.createElement(InfoCircleOutlineIcon, { size: "s" }),
7
- },
8
- info: {
9
- m: React.createElement(InfoCircleOutlineIcon, { size: "m" }),
10
- s: React.createElement(InfoCircleOutlineIcon, { size: "s" }),
11
- },
12
- warning: {
13
- m: React.createElement(WarningTriangleOutlineIcon, { size: "m" }),
14
- s: React.createElement(WarningTriangleOutlineIcon, { size: "s" }),
15
- },
16
- success: {
17
- m: React.createElement(CheckCircleOutlineIcon, { size: "m" }),
18
- s: React.createElement(CheckCircleOutlineIcon, { size: "s" }),
19
- },
20
- error: {
21
- m: React.createElement(WarningCircleOutlineIcon, { size: "m" }),
22
- s: React.createElement(WarningCircleOutlineIcon, { size: "s" }),
23
- },
3
+ neutral: InfoCircleOutlineIcon,
4
+ info: InfoCircleOutlineIcon,
5
+ warning: WarningTriangleOutlineIcon,
6
+ success: CheckCircleOutlineIcon,
7
+ error: WarningCircleOutlineIcon,
8
+ action: InfoCircleOutlineIcon,
24
9
  };
@@ -1,2 +1,5 @@
1
+ import type { IconSize } from '@ozen-ui/icons';
2
+ import type { SectionMessageSizeVariant } from './types';
1
3
  export declare const SECTION_MESSAGE_DEFAULT_STATUS = "info";
2
4
  export declare const SECTION_MESSAGE_DEFAULT_SIZE = "m";
5
+ export declare const SECTION_MESSAGE_SIZE_TO_ICON_SIZE: Readonly<Record<SectionMessageSizeVariant, IconSize>>;
@@ -1,2 +1,8 @@
1
1
  export var SECTION_MESSAGE_DEFAULT_STATUS = 'info';
2
2
  export var SECTION_MESSAGE_DEFAULT_SIZE = 'm';
3
+ export var SECTION_MESSAGE_SIZE_TO_ICON_SIZE = {
4
+ xs: 's',
5
+ s: 's',
6
+ m: 'm',
7
+ l: 'm',
8
+ };
@@ -1,10 +1,13 @@
1
1
  import type { ComponentRef, ReactElement, ReactNode } from 'react';
2
+ import type { IconProps } from '@ozen-ui/icons';
2
3
  import type { ExtendableComponentPropsWithRef } from '../../types/ExtendableComponentPropsWithRef';
4
+ import type { RenderContentType } from '../../utils';
3
5
  import type { ButtonProps } from '../ButtonNext';
4
- export declare const sectionMessageStatusVariant: readonly ["success", "error", "warning", "info", "neutral"];
6
+ export declare const sectionMessageStatusVariant: readonly ["success", "error", "warning", "info", "neutral", "action"];
5
7
  export type SectionMessageStatusVariant = (typeof sectionMessageStatusVariant)[number];
6
8
  export declare const sectionMessageSizeVariant: readonly ["xs", "s", "m", "l"];
7
9
  export type SectionMessageSizeVariant = (typeof sectionMessageSizeVariant)[number];
10
+ export type SectionMessageIconType = RenderContentType<IconProps>['content'];
8
11
  export type SectionMessageRef = ComponentRef<'div'>;
9
12
  export type SectionMessageProps = ExtendableComponentPropsWithRef<{
10
13
  /**
@@ -17,6 +20,8 @@ export type SectionMessageProps = ExtendableComponentPropsWithRef<{
17
20
  * @default true
18
21
  */
19
22
  showIcon?: boolean;
23
+ /** Кастомная иконка */
24
+ icon?: SectionMessageIconType;
20
25
  /**
21
26
  * Размер
22
27
  * @default m
@@ -4,5 +4,6 @@ export var sectionMessageStatusVariant = [
4
4
  'warning',
5
5
  'info',
6
6
  'neutral',
7
+ 'action',
7
8
  ];
8
9
  export var sectionMessageSizeVariant = ['xs', 's', 'm', 'l'];
@@ -9,6 +9,9 @@
9
9
  .Stack-Item {
10
10
  display: inline-block;
11
11
  }
12
+ .Stack_display_block {
13
+ display: flex;
14
+ }
12
15
  .Stack_direction_row {
13
16
  flex-direction: row;
14
17
  }
@@ -5,7 +5,7 @@ import { classnames } from '@bem-react/classnames';
5
5
  import { useThemeProps } from '../../hooks/useThemeProps';
6
6
  import { cn } from '../../utils/classname';
7
7
  import { polymorphicComponentWithRef } from '../../utils/polymorphicComponentWithRef';
8
- import { STACK_DEFAULT_TAG } from './constants';
8
+ import { STACK_DEFAULT_DISPLAY, STACK_DEFAULT_TAG } from './constants';
9
9
  import { generateDirectionCn, generateGapCn } from './utils';
10
10
  export var cnStack = cn('Stack');
11
11
  export var Stack = polymorphicComponentWithRef(function (inProps, ref) {
@@ -13,7 +13,7 @@ export var Stack = polymorphicComponentWithRef(function (inProps, ref) {
13
13
  props: inProps,
14
14
  name: 'Stack',
15
15
  });
16
- var _a = props.as, Tag = _a === void 0 ? STACK_DEFAULT_TAG : _a, _b = props.direction, direction = _b === void 0 ? 'row' : _b, divider = props.divider, _c = props.shouldWrapChildren, shouldWrapChildren = _c === void 0 ? false : _c, fullWidth = props.fullWidth, children = props.children, align = props.align, justify = props.justify, gap = props.gap, wrap = props.wrap, className = props.className, other = __rest(props, ["as", "direction", "divider", "shouldWrapChildren", "fullWidth", "children", "align", "justify", "gap", "wrap", "className"]);
16
+ var _a = props.as, Tag = _a === void 0 ? STACK_DEFAULT_TAG : _a, _b = props.direction, direction = _b === void 0 ? 'row' : _b, divider = props.divider, _c = props.shouldWrapChildren, shouldWrapChildren = _c === void 0 ? false : _c, _d = props.display, display = _d === void 0 ? STACK_DEFAULT_DISPLAY : _d, fullWidth = props.fullWidth, children = props.children, align = props.align, justify = props.justify, gap = props.gap, wrap = props.wrap, className = props.className, other = __rest(props, ["as", "direction", "divider", "shouldWrapChildren", "display", "fullWidth", "children", "align", "justify", "gap", "wrap", "className"]);
17
17
  var childNodes = Children.toArray(children);
18
18
  if (!childNodes.length) {
19
19
  return null;
@@ -35,6 +35,7 @@ export var Stack = polymorphicComponentWithRef(function (inProps, ref) {
35
35
  justify: justify,
36
36
  fullWidth: fullWidth,
37
37
  wrap: wrap,
38
+ display: display === 'inline' ? undefined : display,
38
39
  }), generateDirectionCn(cnStack, direction), generateGapCn(cnStack, gap), className), ref: ref }), resolveChildren()));
39
40
  });
40
41
  Stack.displayName = 'Stack';
@@ -1 +1,2 @@
1
1
  export declare const STACK_DEFAULT_TAG = "div";
2
+ export declare const STACK_DEFAULT_DISPLAY = "inline";
@@ -1 +1,2 @@
1
1
  export var STACK_DEFAULT_TAG = 'div';
2
+ export var STACK_DEFAULT_DISPLAY = 'inline';
@@ -3,6 +3,7 @@ import type { ResponsiveValue } from '../../types/ResponsiveValue';
3
3
  import type { PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
4
4
  import type { STACK_DEFAULT_TAG } from './constants';
5
5
  export declare const stackGapVariant: readonly ["0", "xs", "s", "m", "l", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "8xl"];
6
+ export declare const stackDisplayVariant: readonly ["inline", "block"];
6
7
  export declare const stackDirectionVariant: readonly ["row", "column", "rowReverse", "columnReverse"];
7
8
  export declare const stackAlignVariant: readonly ["center", "start", "end", "baseline"];
8
9
  export declare const stackJustifyVariant: readonly ["start", "center", "end", "spaceBetween", "spaceAround"];
@@ -10,9 +11,12 @@ export type StackGapVariant = (typeof stackGapVariant)[number];
10
11
  export type StackDirectionVariant = (typeof stackDirectionVariant)[number];
11
12
  export type StackAlignVariant = (typeof stackAlignVariant)[number];
12
13
  export type StackJustifyVariant = (typeof stackJustifyVariant)[number];
14
+ export type StackDisplayVariant = (typeof stackDisplayVariant)[number];
13
15
  export type StackBaseProps = {
14
16
  /** Направление */
15
17
  direction?: ResponsiveValue<StackDirectionVariant>;
18
+ /** Display */
19
+ display?: StackDisplayVariant;
16
20
  /** Выравнивание */
17
21
  align?: StackAlignVariant;
18
22
  /** Пространство между элементами */
@@ -13,6 +13,7 @@ export var stackGapVariant = [
13
13
  '7xl',
14
14
  '8xl',
15
15
  ];
16
+ export var stackDisplayVariant = ['inline', 'block'];
16
17
  export var stackDirectionVariant = [
17
18
  'row',
18
19
  'column',
@@ -0,0 +1 @@
1
+ export * from './useDevEffect';
@@ -0,0 +1 @@
1
+ export * from './useDevEffect';
@@ -0,0 +1,3 @@
1
+ import type { EffectCallback, DependencyList } from 'react';
2
+ /** Эффект, отрабатывающий только в dev-режиме */
3
+ export declare const useDevEffect: (effect: EffectCallback, deps: DependencyList) => void;
@@ -0,0 +1,9 @@
1
+ import { useEffect } from 'react';
2
+ import { isDev } from '../../constants/environment';
3
+ /** Эффект, отрабатывающий только в dev-режиме */
4
+ export var useDevEffect = function (effect, deps) {
5
+ if (isDev) {
6
+ // eslint-disable-next-line react-hooks/rules-of-hooks
7
+ useEffect(effect, deps);
8
+ }
9
+ };
@@ -0,0 +1,2 @@
1
+ export * from './useIntersectionObserver';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './useIntersectionObserver';
2
+ export * from './types';
@@ -0,0 +1,29 @@
1
+ import type { RefObject } from 'react';
2
+ import type { StoredValue } from '../useStoredValue';
3
+ export type UseIntersectionObserverElement = RefObject<Element | null | undefined> | Element | undefined | null;
4
+ export type UseIntersectionObserverOnEntryChange = (entry: IntersectionObserverEntry | null) => void;
5
+ export type UseIntersectionObserverOnViewChange = (inView: boolean) => void;
6
+ export type UseIntersectionObserverOnShow = () => void;
7
+ export type UseIntersectionObserverOnHidden = () => void;
8
+ export type UseIntersectionObserverOptions = Omit<IntersectionObserverInit, 'root'> & {
9
+ /** Вызывается при изменении entry наблюдателя */
10
+ onEntryChange?: UseIntersectionObserverOnEntryChange;
11
+ /** Вызывается при входе/выходе элемента из viewport */
12
+ onViewChange?: UseIntersectionObserverOnViewChange;
13
+ /** Вызывается при входе элемента во viewport */
14
+ onShow?: UseIntersectionObserverOnShow;
15
+ /** Вызывается при выходе элемента из viewport */
16
+ onHidden?: UseIntersectionObserverOnHidden;
17
+ /** Если `true`, то включен */
18
+ enabled?: boolean;
19
+ /** Root наблюдателя */
20
+ root?: UseIntersectionObserverElement;
21
+ };
22
+ export type UseIntersectionObserverReturn = {
23
+ /** Entry наблюдателя */
24
+ entry: StoredValue<IntersectionObserverEntry | undefined>;
25
+ /** Если `true`, то элемент находится во viewport */
26
+ inView: StoredValue<boolean>;
27
+ /** Функция для переподключения к наблюдателю */
28
+ reconnect: () => void;
29
+ };
@@ -0,0 +1,6 @@
1
+ import type { UseIntersectionObserverElement, UseIntersectionObserverOptions, UseIntersectionObserverReturn } from './types';
2
+ export declare function useIntersectionObserver(
3
+ /** Отслеживаемый компонент */
4
+ target: UseIntersectionObserverElement,
5
+ /** Параметры отслеживания */
6
+ options?: UseIntersectionObserverOptions): UseIntersectionObserverReturn;
@@ -0,0 +1,77 @@
1
+ import { __assign, __read } from "tslib";
2
+ import { useCallback, useEffect } from 'react';
3
+ import { isRef } from '../../utils';
4
+ import { useMutableRef } from '../useMutableRef';
5
+ import { useStoredValue } from '../useStoredValue';
6
+ export function useIntersectionObserver(
7
+ /** Отслеживаемый компонент */
8
+ target,
9
+ /** Параметры отслеживания */
10
+ options) {
11
+ var _a;
12
+ var isEnabled = (_a = options === null || options === void 0 ? void 0 : options.enabled) !== null && _a !== void 0 ? _a : true;
13
+ var savedOnEntryChange = useMutableRef(options === null || options === void 0 ? void 0 : options.onEntryChange);
14
+ var savedOnViewChange = useMutableRef(options === null || options === void 0 ? void 0 : options.onViewChange);
15
+ var savedOnShow = useMutableRef(options === null || options === void 0 ? void 0 : options.onShow);
16
+ var savedOnHidden = useMutableRef(options === null || options === void 0 ? void 0 : options.onHidden);
17
+ var entry = useStoredValue(undefined);
18
+ var inView = useStoredValue(false);
19
+ var observer = useStoredValue(null);
20
+ var connect = useCallback(function () {
21
+ if (!isEnabled) {
22
+ return;
23
+ }
24
+ var element = isRef(target) ? target.current : target;
25
+ if (!element) {
26
+ return;
27
+ }
28
+ var root = (function () {
29
+ var root = options === null || options === void 0 ? void 0 : options.root;
30
+ if (!root) {
31
+ return document;
32
+ }
33
+ return isRef(options.root) ? options.root.current : options.root;
34
+ })();
35
+ observer.current = new IntersectionObserver(function (_a) {
36
+ var _b, _c, _d, _e, _f;
37
+ var _g = __read(_a, 1), newEntry = _g[0];
38
+ var previousInView = !!((_b = entry.current) === null || _b === void 0 ? void 0 : _b.isIntersecting);
39
+ var currentInView = !!(newEntry === null || newEntry === void 0 ? void 0 : newEntry.isIntersecting);
40
+ entry.current = newEntry;
41
+ inView.current = currentInView;
42
+ (_c = savedOnEntryChange.current) === null || _c === void 0 ? void 0 : _c.call(savedOnEntryChange, newEntry !== null && newEntry !== void 0 ? newEntry : null);
43
+ if (previousInView === currentInView) {
44
+ return;
45
+ }
46
+ (_d = savedOnViewChange.current) === null || _d === void 0 ? void 0 : _d.call(savedOnViewChange, currentInView);
47
+ if (currentInView) {
48
+ (_e = savedOnShow.current) === null || _e === void 0 ? void 0 : _e.call(savedOnShow);
49
+ }
50
+ else {
51
+ (_f = savedOnHidden.current) === null || _f === void 0 ? void 0 : _f.call(savedOnHidden);
52
+ }
53
+ }, __assign(__assign({}, options), { root: root }));
54
+ observer.current.observe(element);
55
+ }, [
56
+ isRef(target) ? target.current : target,
57
+ options === null || options === void 0 ? void 0 : options.rootMargin,
58
+ options === null || options === void 0 ? void 0 : options.threshold,
59
+ options === null || options === void 0 ? void 0 : options.root,
60
+ isEnabled,
61
+ ]);
62
+ var disconnect = useCallback(function () {
63
+ var _a;
64
+ (_a = observer.current) === null || _a === void 0 ? void 0 : _a.disconnect();
65
+ }, [observer]);
66
+ var reconnect = useCallback(function () {
67
+ disconnect();
68
+ connect();
69
+ }, [disconnect, connect]);
70
+ useEffect(function () {
71
+ reconnect();
72
+ }, [connect]);
73
+ useEffect(function () { return function () {
74
+ disconnect();
75
+ }; }, []);
76
+ return { entry: entry, inView: inView, reconnect: reconnect };
77
+ }
@@ -87,7 +87,19 @@ export var ruRU = {
87
87
  },
88
88
  DatePicker: {
89
89
  clearText: 'Очистить',
90
- placeholder: 'ДД.ММ.ГГГГ',
90
+ placeholder: function (steps) {
91
+ var parts = [];
92
+ if (steps.includes('days')) {
93
+ parts.push('ДД');
94
+ }
95
+ if (steps.includes('months')) {
96
+ parts.push('ММ');
97
+ }
98
+ if (steps.includes('years')) {
99
+ parts.push('ГГГГ');
100
+ }
101
+ return parts.join('.');
102
+ },
91
103
  },
92
104
  },
93
105
  };
@@ -179,7 +191,19 @@ export var kkKZ = {
179
191
  },
180
192
  DatePicker: {
181
193
  clearText: 'Тазалау',
182
- placeholder: 'КК.АА.ЖЖЖЖ',
194
+ placeholder: function (steps) {
195
+ var parts = [];
196
+ if (steps.includes('days')) {
197
+ parts.push('КК');
198
+ }
199
+ if (steps.includes('months')) {
200
+ parts.push('АА');
201
+ }
202
+ if (steps.includes('years')) {
203
+ parts.push('ЖЖЖЖ');
204
+ }
205
+ return parts.join('.');
206
+ },
183
207
  },
184
208
  },
185
209
  };
@@ -272,7 +296,19 @@ export var enUS = {
272
296
  },
273
297
  DatePicker: {
274
298
  clearText: 'Clear',
275
- placeholder: 'DD.MM.YYYY',
299
+ placeholder: function (steps) {
300
+ var parts = [];
301
+ if (steps.includes('days')) {
302
+ parts.push('DD');
303
+ }
304
+ if (steps.includes('months')) {
305
+ parts.push('MM');
306
+ }
307
+ if (steps.includes('years')) {
308
+ parts.push('YYYY');
309
+ }
310
+ return parts.join('.');
311
+ },
276
312
  },
277
313
  },
278
314
  };
@@ -1 +1 @@
1
- export declare const createFilledArray: <Value>(length: number, value: Value) => Value[];
1
+ export declare const createFilledArray: <Value>(length: number, value: Value | ((index: number) => Value)) => Value[];
@@ -1,3 +1,8 @@
1
+ import { isFunction } from '../../isFunction';
1
2
  export var createFilledArray = function (length, value) {
2
- return new Array(length).fill(value);
3
+ var array = [];
4
+ for (var i = 0; i < length; i++) {
5
+ array.push(isFunction(value) ? value(i) : value);
6
+ }
7
+ return array;
3
8
  };
@@ -0,0 +1,2 @@
1
+ import type { RefObject } from 'react';
2
+ export declare const extractRef: <Element extends HTMLElement>(element: RefObject<Element | null> | Element | null | undefined) => Element | null;
@@ -0,0 +1,7 @@
1
+ import { isRef } from './isRef';
2
+ export var extractRef = function (element) {
3
+ if (isRef(element)) {
4
+ return element.current;
5
+ }
6
+ return element !== null && element !== void 0 ? element : null;
7
+ };
@@ -1,4 +1,5 @@
1
1
  export * from './extractElementsFromChildren';
2
+ export * from './extractRef';
2
3
  export * from './isNodeWithDisplayName';
3
4
  export * from './isRef';
4
5
  export * from './resolveChildren';
@@ -1,4 +1,5 @@
1
1
  export * from './extractElementsFromChildren';
2
+ export * from './extractRef';
2
3
  export * from './isNodeWithDisplayName';
3
4
  export * from './isRef';
4
5
  export * from './resolveChildren';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozen-ui/kit",
3
- "version": "0.73.0",
3
+ "version": "0.75.0",
4
4
  "description": "React component library",
5
5
  "files": [
6
6
  "*"
@@ -29,9 +29,9 @@
29
29
  "react-popper": "^2.3.0",
30
30
  "react-transition-group": "^4.4.5",
31
31
  "tslib": "^2.6.3",
32
- "@ozen-ui/icons": "0.73.0",
33
- "@ozen-ui/logger": "0.73.0",
34
- "@ozen-ui/fonts": "0.73.0"
32
+ "@ozen-ui/fonts": "0.75.0",
33
+ "@ozen-ui/icons": "0.75.0",
34
+ "@ozen-ui/logger": "0.75.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/lodash.isequal": "^4.5.0"
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../__inner__/cjs/hooks/useDevEffect/index.js",
3
+ "module": "../__inner__/esm/hooks/useDevEffect/index.js",
4
+ "types": "../__inner__/esm/hooks/useDevEffect/index.d.ts"
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "main": "../__inner__/cjs/hooks/useIntersectionObserver/index.js",
3
+ "module": "../__inner__/esm/hooks/useIntersectionObserver/index.js",
4
+ "types": "../__inner__/esm/hooks/useIntersectionObserver/index.d.ts"
5
+ }