@consta/uikit 5.27.1 → 5.28.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 (191) hide show
  1. package/ModalDeprecated/index.d.ts +1 -0
  2. package/ModalDeprecated/index.js +1 -0
  3. package/Notification/index.d.ts +1 -0
  4. package/Notification/index.js +1 -0
  5. package/SidebarDeprecated/index.d.ts +1 -0
  6. package/SidebarDeprecated/index.js +1 -0
  7. package/__internal__/src/components/Chips/ChipsChoice/ChipsChoice.js +1 -1
  8. package/__internal__/src/components/Chips/ChipsChoice/ChipsChoice.js.map +1 -1
  9. package/__internal__/src/components/DatePicker/DatePicker.js +1 -1
  10. package/__internal__/src/components/DatePicker/DatePicker.js.map +1 -1
  11. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.d.ts +2 -4
  12. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.js.map +1 -1
  13. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.js +1 -1
  14. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.js.map +1 -1
  15. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +2 -4
  16. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.js +1 -1
  17. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.js.map +1 -1
  18. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/helpers.d.ts +3 -6
  19. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/helpers.js +1 -1
  20. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/helpers.js.map +1 -1
  21. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +1 -0
  22. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.js +1 -1
  23. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.js.map +1 -1
  24. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/helpers.d.ts +2 -0
  25. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/helpers.js.map +1 -1
  26. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.js +1 -1
  27. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.js.map +1 -1
  28. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +2 -4
  29. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.js +1 -1
  30. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.js.map +1 -1
  31. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/helpers.d.ts +3 -6
  32. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/helpers.js +1 -1
  33. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/helpers.js.map +1 -1
  34. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.js +1 -1
  35. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.js.map +1 -1
  36. package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js +1 -1
  37. package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js.map +1 -1
  38. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +1 -1
  39. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js.map +1 -1
  40. package/__internal__/src/components/DatePicker/DatePickerTypeTime/DatePickerTypeTime.js +1 -1
  41. package/__internal__/src/components/DatePicker/DatePickerTypeTime/DatePickerTypeTime.js.map +1 -1
  42. package/__internal__/src/components/DatePicker/helpers.d.ts +27 -8
  43. package/__internal__/src/components/DatePicker/helpers.js +1 -1
  44. package/__internal__/src/components/DatePicker/helpers.js.map +1 -1
  45. package/__internal__/src/components/DatePicker/types.d.ts +26 -5
  46. package/__internal__/src/components/DatePicker/types.js +1 -1
  47. package/__internal__/src/components/DatePicker/types.js.map +1 -1
  48. package/__internal__/src/components/DateTime/DateTime.js +1 -1
  49. package/__internal__/src/components/DateTime/DateTime.js.map +1 -1
  50. package/__internal__/src/components/DateTime/DateTimeTypeDate/DateTimeTypeDate.js +1 -1
  51. package/__internal__/src/components/DateTime/DateTimeTypeDate/DateTimeTypeDate.js.map +1 -1
  52. package/__internal__/src/components/DateTime/DateTimeTypeDateTime/DateTimeTypeDateTime.js +1 -1
  53. package/__internal__/src/components/DateTime/DateTimeTypeDateTime/DateTimeTypeDateTime.js.map +1 -1
  54. package/__internal__/src/components/DateTime/DateTimeTypeDateTime/useOnChange.d.ts +2 -2
  55. package/__internal__/src/components/DateTime/DateTimeTypeDateTime/useOnChange.js +1 -1
  56. package/__internal__/src/components/DateTime/DateTimeTypeDateTime/useOnChange.js.map +1 -1
  57. package/__internal__/src/components/DateTime/DateTimeTypeMonth/DateTimeTypeMonth.js +1 -1
  58. package/__internal__/src/components/DateTime/DateTimeTypeMonth/DateTimeTypeMonth.js.map +1 -1
  59. package/__internal__/src/components/DateTime/DateTimeTypeTime/DateTimeTypeTime.js +1 -1
  60. package/__internal__/src/components/DateTime/DateTimeTypeTime/DateTimeTypeTime.js.map +1 -1
  61. package/__internal__/src/components/DateTime/DateTimeTypeTime/helpers.d.ts +5 -2
  62. package/__internal__/src/components/DateTime/DateTimeTypeTime/helpers.js +1 -1
  63. package/__internal__/src/components/DateTime/DateTimeTypeTime/helpers.js.map +1 -1
  64. package/__internal__/src/components/DateTime/DateTimeTypeYear/DateTimeTypeYear.js +1 -1
  65. package/__internal__/src/components/DateTime/DateTimeTypeYear/DateTimeTypeYear.js.map +1 -1
  66. package/__internal__/src/components/DateTime/helpers/getDisableDatesKey.d.ts +2 -0
  67. package/__internal__/src/components/DateTime/helpers/getDisableDatesKey.js +2 -0
  68. package/__internal__/src/components/DateTime/helpers/getDisableDatesKey.js.map +1 -0
  69. package/__internal__/src/components/DateTime/helpers/getTimeNumbers.d.ts +2 -0
  70. package/__internal__/src/components/DateTime/helpers/getTimeNumbers.js +2 -0
  71. package/__internal__/src/components/DateTime/helpers/getTimeNumbers.js.map +1 -0
  72. package/__internal__/src/components/DateTime/helpers/getTimeOptionsKey.d.ts +2 -0
  73. package/__internal__/src/components/DateTime/helpers/getTimeOptionsKey.js +2 -0
  74. package/__internal__/src/components/DateTime/helpers/getTimeOptionsKey.js.map +1 -0
  75. package/__internal__/src/components/DateTime/helpers/index.d.ts +3 -0
  76. package/__internal__/src/components/DateTime/helpers/index.js +1 -1
  77. package/__internal__/src/components/DateTime/helpers/index.js.map +1 -1
  78. package/__internal__/src/components/DateTime/helpers/types.d.ts +30 -3
  79. package/__internal__/src/components/DateTime/helpers/types.js.map +1 -1
  80. package/__internal__/src/components/DragNDropFieldCanary/DragNDropFieldInformer/DragNDropFieldInformer.d.ts +11 -2
  81. package/__internal__/src/components/DragNDropFieldCanary/DragNDropFieldInformer/DragNDropFieldInformer.js.map +1 -1
  82. package/__internal__/src/components/DragNDropFieldCanary/types.d.ts +2 -2
  83. package/__internal__/src/components/DragNDropFieldCanary/types.js.map +1 -1
  84. package/__internal__/src/components/FlatSelect/FlatSelect.js.map +1 -1
  85. package/__internal__/src/components/FlatSelect/FlatSelectRoot/FlatSelectRoot.js.map +1 -1
  86. package/__internal__/src/components/FlatSelect/defaultProps.js.map +1 -1
  87. package/__internal__/src/components/ModalDeprecated/ModalDeprecated.css +1 -0
  88. package/__internal__/src/components/ModalDeprecated/ModalDeprecated.d.ts +27 -0
  89. package/__internal__/src/components/ModalDeprecated/ModalDeprecated.js +2 -0
  90. package/__internal__/src/components/ModalDeprecated/ModalDeprecated.js.map +1 -0
  91. package/__internal__/src/components/ModalDeprecated/index.d.ts +1 -0
  92. package/__internal__/src/components/ModalDeprecated/index.js +2 -0
  93. package/__internal__/src/components/ModalDeprecated/index.js.map +1 -0
  94. package/__internal__/src/components/Notification/Notification/Notification.css +1 -0
  95. package/__internal__/src/components/Notification/Notification/Notification.d.ts +4 -0
  96. package/__internal__/src/components/Notification/Notification/Notification.js +2 -0
  97. package/__internal__/src/components/Notification/Notification/Notification.js.map +1 -0
  98. package/__internal__/src/components/Notification/Notification/helpers.d.ts +70 -0
  99. package/__internal__/src/components/Notification/Notification/helpers.js +2 -0
  100. package/__internal__/src/components/Notification/Notification/helpers.js.map +1 -0
  101. package/__internal__/src/components/Notification/Notification/index.d.ts +2 -0
  102. package/__internal__/src/components/Notification/Notification/index.js +2 -0
  103. package/__internal__/src/components/Notification/Notification/index.js.map +1 -0
  104. package/__internal__/src/components/Notification/Notification/types.d.ts +66 -0
  105. package/__internal__/src/components/Notification/Notification/types.js +2 -0
  106. package/__internal__/src/components/Notification/Notification/types.js.map +1 -0
  107. package/__internal__/src/components/Notification/NotificationActions/NotificationActions.d.ts +2 -0
  108. package/__internal__/src/components/Notification/NotificationActions/NotificationActions.js +2 -0
  109. package/__internal__/src/components/Notification/NotificationActions/NotificationActions.js.map +1 -0
  110. package/__internal__/src/components/Notification/NotificationActions/helpers.d.ts +21 -0
  111. package/__internal__/src/components/Notification/NotificationActions/helpers.js +2 -0
  112. package/__internal__/src/components/Notification/NotificationActions/helpers.js.map +1 -0
  113. package/__internal__/src/components/Notification/NotificationActions/index.d.ts +2 -0
  114. package/__internal__/src/components/Notification/NotificationActions/index.js +2 -0
  115. package/__internal__/src/components/Notification/NotificationActions/index.js.map +1 -0
  116. package/__internal__/src/components/Notification/NotificationActions/types.d.ts +30 -0
  117. package/__internal__/src/components/Notification/NotificationActions/types.js +2 -0
  118. package/__internal__/src/components/Notification/NotificationActions/types.js.map +1 -0
  119. package/__internal__/src/components/Notification/NotificationCaption/NotificationCaption.css +1 -0
  120. package/__internal__/src/components/Notification/NotificationCaption/NotificationCaption.d.ts +7 -0
  121. package/__internal__/src/components/Notification/NotificationCaption/NotificationCaption.js +2 -0
  122. package/__internal__/src/components/Notification/NotificationCaption/NotificationCaption.js.map +1 -0
  123. package/__internal__/src/components/Notification/NotificationCaption/index.d.ts +1 -0
  124. package/__internal__/src/components/Notification/NotificationCaption/index.js +2 -0
  125. package/__internal__/src/components/Notification/NotificationCaption/index.js.map +1 -0
  126. package/__internal__/src/components/Notification/NotificationGroup/NotificationGroup.css +1 -0
  127. package/__internal__/src/components/Notification/NotificationGroup/NotificationGroup.d.ts +4 -0
  128. package/__internal__/src/components/Notification/NotificationGroup/NotificationGroup.js +2 -0
  129. package/__internal__/src/components/Notification/NotificationGroup/NotificationGroup.js.map +1 -0
  130. package/__internal__/src/components/Notification/NotificationGroup/index.d.ts +2 -0
  131. package/__internal__/src/components/Notification/NotificationGroup/index.js +2 -0
  132. package/__internal__/src/components/Notification/NotificationGroup/index.js.map +1 -0
  133. package/__internal__/src/components/Notification/NotificationGroup/types.d.ts +12 -0
  134. package/__internal__/src/components/Notification/NotificationGroup/types.js +2 -0
  135. package/__internal__/src/components/Notification/NotificationGroup/types.js.map +1 -0
  136. package/__internal__/src/components/Notification/NotificationHeader/NotificationHeader.css +1 -0
  137. package/__internal__/src/components/Notification/NotificationHeader/NotificationHeader.d.ts +5 -0
  138. package/__internal__/src/components/Notification/NotificationHeader/NotificationHeader.js +2 -0
  139. package/__internal__/src/components/Notification/NotificationHeader/NotificationHeader.js.map +1 -0
  140. package/__internal__/src/components/Notification/NotificationHeader/index.d.ts +2 -0
  141. package/__internal__/src/components/Notification/NotificationHeader/index.js +2 -0
  142. package/__internal__/src/components/Notification/NotificationHeader/index.js.map +1 -0
  143. package/__internal__/src/components/Notification/NotificationHeader/types.d.ts +14 -0
  144. package/__internal__/src/components/Notification/NotificationHeader/types.js +2 -0
  145. package/__internal__/src/components/Notification/NotificationHeader/types.js.map +1 -0
  146. package/__internal__/src/components/Notification/NotificationItem/NotificationItem.css +1 -0
  147. package/__internal__/src/components/Notification/NotificationItem/NotificationItem.d.ts +6 -0
  148. package/__internal__/src/components/Notification/NotificationItem/NotificationItem.js +2 -0
  149. package/__internal__/src/components/Notification/NotificationItem/NotificationItem.js.map +1 -0
  150. package/__internal__/src/components/Notification/NotificationItem/index.d.ts +2 -0
  151. package/__internal__/src/components/Notification/NotificationItem/index.js +2 -0
  152. package/__internal__/src/components/Notification/NotificationItem/index.js.map +1 -0
  153. package/__internal__/src/components/Notification/NotificationItem/types.d.ts +19 -0
  154. package/__internal__/src/components/Notification/NotificationItem/types.js +2 -0
  155. package/__internal__/src/components/Notification/NotificationItem/types.js.map +1 -0
  156. package/__internal__/src/components/Notification/helpers/defaultDateFormat.d.ts +1 -0
  157. package/__internal__/src/components/Notification/helpers/defaultDateFormat.js +2 -0
  158. package/__internal__/src/components/Notification/helpers/defaultDateFormat.js.map +1 -0
  159. package/__internal__/src/components/Notification/helpers/groupLabelByDay.d.ts +1 -0
  160. package/__internal__/src/components/Notification/helpers/groupLabelByDay.js +2 -0
  161. package/__internal__/src/components/Notification/helpers/groupLabelByDay.js.map +1 -0
  162. package/__internal__/src/components/Notification/helpers/groupsByDay.d.ts +1 -0
  163. package/__internal__/src/components/Notification/helpers/groupsByDay.js +2 -0
  164. package/__internal__/src/components/Notification/helpers/groupsByDay.js.map +1 -0
  165. package/__internal__/src/components/Notification/helpers/index.d.ts +4 -0
  166. package/__internal__/src/components/Notification/helpers/index.js +2 -0
  167. package/__internal__/src/components/Notification/helpers/index.js.map +1 -0
  168. package/__internal__/src/components/Notification/helpers/sortGroupByDay.d.ts +5 -0
  169. package/__internal__/src/components/Notification/helpers/sortGroupByDay.js +2 -0
  170. package/__internal__/src/components/Notification/helpers/sortGroupByDay.js.map +1 -0
  171. package/__internal__/src/components/Notification/index.d.ts +7 -0
  172. package/__internal__/src/components/Notification/index.js +2 -0
  173. package/__internal__/src/components/Notification/index.js.map +1 -0
  174. package/__internal__/src/components/Sidebar/Sidebar.js +1 -1
  175. package/__internal__/src/components/Sidebar/Sidebar.js.map +1 -1
  176. package/__internal__/src/components/Sidebar/types.d.ts +1 -0
  177. package/__internal__/src/components/Sidebar/types.js.map +1 -1
  178. package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.css +1 -0
  179. package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.d.ts +39 -0
  180. package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.js +2 -0
  181. package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.js.map +1 -0
  182. package/__internal__/src/components/SidebarDeprecated/index.d.ts +1 -0
  183. package/__internal__/src/components/SidebarDeprecated/index.js +2 -0
  184. package/__internal__/src/components/SidebarDeprecated/index.js.map +1 -0
  185. package/__internal__/src/utils/getItemClick.d.ts +5 -0
  186. package/__internal__/src/utils/getItemClick.js +2 -0
  187. package/__internal__/src/utils/getItemClick.js.map +1 -0
  188. package/__internal__/src/utils/object/keys.d.ts +1 -0
  189. package/__internal__/src/utils/object/keys.js +2 -0
  190. package/__internal__/src/utils/object/keys.js.map +1 -0
  191. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export * from './NotificationCaption';
@@ -0,0 +1,2 @@
1
+ export*from"./NotificationCaption";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/Notification/NotificationCaption/index.ts"],"sourcesContent":["export * from './NotificationCaption';\n"],"mappings":"AAAA"}
@@ -0,0 +1 @@
1
+ .NotificationGroup{background:var(--color-bg-secondary)}.NotificationGroup-Label{flex:1;min-height:var(--control-height-xs)}
@@ -0,0 +1,4 @@
1
+ import './NotificationGroup.css';
2
+ import React from 'react';
3
+ import { NotificationGroupProps } from './types';
4
+ export declare const NotificationGroup: React.FC<NotificationGroupProps>;
@@ -0,0 +1,2 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["title","actions","className"];import"./NotificationGroup.css";import React,{forwardRef}from"react";import{Text}from"../../Text";import{cnMixFlex}from"../../../mixs/MixFlex";import{cn}from"../../../utils/bem";import{NotificationActions}from"../NotificationActions";var cnNotificationGroup=cn("NotificationGroup");export var NotificationGroup=forwardRef(function(a,b){var c=a.title,d=a.actions,e=a.className,f=_objectWithoutProperties(a,_excluded);return c?React.createElement("div",Object.assign({},f,{ref:b,className:cnNotificationGroup(null,[e,cnMixFlex({gap:"xs"})])}),React.createElement(Text,{className:cnNotificationGroup("Label",[cnMixFlex({align:"center"})]),view:"secondary",weight:"medium",size:"xs",lineHeight:"m",fontStyle:"italic"},c),(null===d||void 0===d?void 0:d.length)&&React.createElement(NotificationActions,{items:d})):null});
2
+ //# sourceMappingURL=NotificationGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationGroup.js","names":["React","forwardRef","Text","cnMixFlex","cn","NotificationActions","cnNotificationGroup","NotificationGroup","ref","title","actions","className","otherProps","gap","align","length"],"sources":["../../../../../../src/components/Notification/NotificationGroup/NotificationGroup.tsx"],"sourcesContent":["import './NotificationGroup.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { Text } from '##/components/Text';\nimport { cnMixFlex } from '##/mixs/MixFlex';\nimport { cn } from '##/utils/bem';\n\nimport { NotificationActions } from '../NotificationActions';\nimport { NotificationGroupProps } from './types';\n\nconst cnNotificationGroup = cn('NotificationGroup');\n\nexport const NotificationGroup: React.FC<NotificationGroupProps> = forwardRef<\n HTMLDivElement,\n NotificationGroupProps\n>(({ title, actions, className, ...otherProps }, ref) => {\n if (!title) {\n return null;\n }\n\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnNotificationGroup(null, [\n className,\n cnMixFlex({ gap: 'xs' }),\n ])}\n >\n <Text\n className={cnNotificationGroup('Label', [\n cnMixFlex({ align: 'center' }),\n ])}\n view=\"secondary\"\n weight=\"medium\"\n size=\"xs\"\n lineHeight=\"m\"\n fontStyle=\"italic\"\n >\n {title}\n </Text>\n\n {actions?.length && <NotificationActions items={actions} />}\n </div>\n );\n});\n"],"mappings":"mIAAA,gCAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,IAAT,kBACA,OAASC,SAAT,6BACA,OAASC,EAAT,0BAEA,OAASC,mBAAT,8BAGA,GAAMC,oBAAmB,CAAGF,EAAE,CAAC,mBAAD,CAA9B,CAEA,MAAO,IAAMG,kBAAmD,CAAGN,UAAU,CAG3E,WAA+CO,CAA/C,CAAuD,IAApDC,EAAoD,GAApDA,KAAoD,CAA7CC,CAA6C,GAA7CA,OAA6C,CAApCC,CAAoC,GAApCA,SAAoC,CAAtBC,CAAsB,6CAClDH,EADkD,CAMrD,2CACMG,CADN,EAEE,GAAG,CAAEJ,CAFP,CAGE,SAAS,CAAEF,mBAAmB,CAAC,IAAD,CAAO,CACnCK,CADmC,CAEnCR,SAAS,CAAC,CAAEU,GAAG,CAAE,IAAP,CAAD,CAF0B,CAAP,CAHhC,GAQE,oBAAC,IAAD,EACE,SAAS,CAAEP,mBAAmB,CAAC,OAAD,CAAU,CACtCH,SAAS,CAAC,CAAEW,KAAK,CAAE,QAAT,CAAD,CAD6B,CAAV,CADhC,CAIE,IAAI,CAAC,WAJP,CAKE,MAAM,CAAC,QALT,CAME,IAAI,CAAC,IANP,CAOE,UAAU,CAAC,GAPb,CAQE,SAAS,CAAC,QARZ,EAUGL,CAVH,CARF,CAqBG,QAAAC,CAAO,WAAPA,CAAA,QAAAA,CAAO,CAAEK,MAAT,GAAmB,oBAAC,mBAAD,EAAqB,KAAK,CAAEL,CAA5B,EArBtB,CANqD,CAE9C,IA4BV,CAjC4E,CAAtE"}
@@ -0,0 +1,2 @@
1
+ export * from './NotificationGroup';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export*from"./NotificationGroup";export*from"./types";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/Notification/NotificationGroup/index.ts"],"sourcesContent":["export * from './NotificationGroup';\nexport * from './types';\n"],"mappings":"AAAA,iCACA"}
@@ -0,0 +1,12 @@
1
+ import { IconComponent } from '@consta/icons/Icon';
2
+ import React from 'react';
3
+ import { PropsWithHTMLAttributesAndRef } from '../../../utils/types/PropsWithHTMLAttributes';
4
+ export type NotificationGroupAction = {
5
+ label: string;
6
+ onClick?: React.EventHandler<React.MouseEvent>;
7
+ icon?: IconComponent;
8
+ };
9
+ export type NotificationGroupProps = PropsWithHTMLAttributesAndRef<{
10
+ title?: string;
11
+ actions?: NotificationGroupAction[];
12
+ }, HTMLDivElement>;
@@ -0,0 +1,2 @@
1
+ export{};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../../../src/components/Notification/NotificationGroup/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport type NotificationGroupAction = {\n label: string;\n onClick?: React.EventHandler<React.MouseEvent>;\n icon?: IconComponent;\n};\n\nexport type NotificationGroupProps = PropsWithHTMLAttributesAndRef<\n {\n title?: string;\n actions?: NotificationGroupAction[];\n },\n HTMLDivElement\n>;\n"],"mappings":""}
@@ -0,0 +1 @@
1
+ .NotificationHeader-Title{flex:1;min-height:var(--control-height-xs)}
@@ -0,0 +1,5 @@
1
+ import './NotificationHeader.css';
2
+ import React from 'react';
3
+ import { NotificationHeaderProps } from './types';
4
+ export declare const cnNotificationHeader: import("@bem-react/classname").ClassNameFormatter;
5
+ export declare const NotificationHeader: React.FC<NotificationHeaderProps>;
@@ -0,0 +1,2 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["title","actions","className","onClose","scrollContainerRef"];import"./NotificationHeader.css";import{IconClose}from"@consta/icons/IconClose";import React,{forwardRef}from"react";import{Button}from"../../Button";import{Text}from"../../Text";import{cnMixFlex}from"../../../mixs/MixFlex";import{cn}from"../../../utils/bem";import{NotificationActions}from"../NotificationActions";export var cnNotificationHeader=cn("NotificationHeader");export var NotificationHeader=forwardRef(function(a,b){var c=a.title,d=a.actions,e=a.className,f=a.onClose,g=a.scrollContainerRef,h=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({},h,{ref:b,className:cnNotificationHeader(null,[e,cnMixFlex({gap:"xs"})])}),React.createElement(Text,{className:cnNotificationHeader("Title"),view:"secondary",transform:"uppercase",weight:"semibold",size:"l",lineHeight:"m"},c),(null===d||void 0===d?void 0:d.length)&&React.createElement(NotificationActions,{className:cnNotificationHeader("Action"),items:d,scrollContainerRef:g}),f&&React.createElement(Button,{className:cnNotificationHeader("CloseButton"),size:"xs",view:"clear",iconLeft:IconClose,onClick:f}))});
2
+ //# sourceMappingURL=NotificationHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationHeader.js","names":["IconClose","React","forwardRef","Button","Text","cnMixFlex","cn","NotificationActions","cnNotificationHeader","NotificationHeader","ref","title","actions","className","onClose","scrollContainerRef","otherProps","gap","length"],"sources":["../../../../../../src/components/Notification/NotificationHeader/NotificationHeader.tsx"],"sourcesContent":["import './NotificationHeader.css';\n\nimport { IconClose } from '@consta/icons/IconClose';\nimport React, { forwardRef } from 'react';\n\nimport { Button } from '##/components/Button';\nimport { Text } from '##/components/Text';\nimport { cnMixFlex } from '##/mixs/MixFlex';\nimport { cn } from '##/utils/bem';\n\nimport { NotificationActions } from '../NotificationActions';\nimport { NotificationHeaderProps } from './types';\n\nexport const cnNotificationHeader = cn('NotificationHeader');\n\nexport const NotificationHeader: React.FC<NotificationHeaderProps> = forwardRef<\n HTMLDivElement,\n NotificationHeaderProps\n>(\n (\n { title, actions, className, onClose, scrollContainerRef, ...otherProps },\n ref,\n ) => {\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnNotificationHeader(null, [\n className,\n cnMixFlex({ gap: 'xs' }),\n ])}\n >\n <Text\n className={cnNotificationHeader('Title')}\n view=\"secondary\"\n transform=\"uppercase\"\n weight=\"semibold\"\n size=\"l\"\n lineHeight=\"m\"\n >\n {title}\n </Text>\n\n {actions?.length && (\n <NotificationActions\n className={cnNotificationHeader('Action')}\n items={actions}\n scrollContainerRef={scrollContainerRef}\n />\n )}\n {onClose && (\n <Button\n className={cnNotificationHeader('CloseButton')}\n size=\"xs\"\n view=\"clear\"\n iconLeft={IconClose}\n onClick={onClose}\n />\n )}\n </div>\n );\n },\n);\n"],"mappings":"kKAAA,iCAEA,OAASA,SAAT,KAA0B,yBAA1B,CACA,MAAOC,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,MAAT,oBACA,OAASC,IAAT,kBACA,OAASC,SAAT,6BACA,OAASC,EAAT,0BAEA,OAASC,mBAAT,8BAGA,MAAO,IAAMC,qBAAoB,CAAGF,EAAE,CAAC,oBAAD,CAA/B,CAEP,MAAO,IAAMG,mBAAqD,CAAGP,UAAU,CAI7E,WAEEQ,CAFF,CAGK,IAFDC,EAEC,GAFDA,KAEC,CAFMC,CAEN,GAFMA,OAEN,CAFeC,CAEf,GAFeA,SAEf,CAF0BC,CAE1B,GAF0BA,OAE1B,CAFmCC,CAEnC,GAFmCA,kBAEnC,CAF0DC,CAE1D,uCACH,MACE,4CACMA,CADN,EAEE,GAAG,CAAEN,CAFP,CAGE,SAAS,CAAEF,oBAAoB,CAAC,IAAD,CAAO,CACpCK,CADoC,CAEpCR,SAAS,CAAC,CAAEY,GAAG,CAAE,IAAP,CAAD,CAF2B,CAAP,CAHjC,GAQE,oBAAC,IAAD,EACE,SAAS,CAAET,oBAAoB,CAAC,OAAD,CADjC,CAEE,IAAI,CAAC,WAFP,CAGE,SAAS,CAAC,WAHZ,CAIE,MAAM,CAAC,UAJT,CAKE,IAAI,CAAC,GALP,CAME,UAAU,CAAC,GANb,EAQGG,CARH,CARF,CAmBG,QAAAC,CAAO,WAAPA,CAAA,QAAAA,CAAO,CAAEM,MAAT,GACC,oBAAC,mBAAD,EACE,SAAS,CAAEV,oBAAoB,CAAC,QAAD,CADjC,CAEE,KAAK,CAAEI,CAFT,CAGE,kBAAkB,CAAEG,CAHtB,EApBJ,CA0BGD,CAAO,EACN,oBAAC,MAAD,EACE,SAAS,CAAEN,oBAAoB,CAAC,aAAD,CADjC,CAEE,IAAI,CAAC,IAFP,CAGE,IAAI,CAAC,OAHP,CAIE,QAAQ,CAAER,SAJZ,CAKE,OAAO,CAAEc,CALX,EA3BJ,CAqCH,CA9C4E,CAAxE"}
@@ -0,0 +1,2 @@
1
+ export * from './NotificationHeader';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export*from"./NotificationHeader";export*from"./types";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/Notification/NotificationHeader/index.ts"],"sourcesContent":["export * from './NotificationHeader';\nexport * from './types';\n"],"mappings":"AAAA,kCACA"}
@@ -0,0 +1,14 @@
1
+ import { IconComponent } from '@consta/icons/Icon';
2
+ import React from 'react';
3
+ import { PropsWithHTMLAttributesAndRef } from '../../../utils/types/PropsWithHTMLAttributes';
4
+ export type NotificationHeaderAction = {
5
+ label: string;
6
+ onClick?: React.EventHandler<React.MouseEvent>;
7
+ icon?: IconComponent;
8
+ };
9
+ export type NotificationHeaderProps = PropsWithHTMLAttributesAndRef<{
10
+ title?: string;
11
+ actions?: NotificationHeaderAction[];
12
+ onClose?: React.EventHandler<React.MouseEvent>;
13
+ scrollContainerRef?: React.RefObject<HTMLDivElement>;
14
+ }, HTMLDivElement>;
@@ -0,0 +1,2 @@
1
+ export{};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../../../src/components/Notification/NotificationHeader/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport type NotificationHeaderAction = {\n label: string;\n onClick?: React.EventHandler<React.MouseEvent>;\n icon?: IconComponent;\n};\n\nexport type NotificationHeaderProps = PropsWithHTMLAttributesAndRef<\n {\n title?: string;\n actions?: NotificationHeaderAction[];\n onClose?: React.EventHandler<React.MouseEvent>;\n scrollContainerRef?: React.RefObject<HTMLDivElement>;\n },\n HTMLDivElement\n>;\n"],"mappings":""}
@@ -0,0 +1 @@
1
+ .NotificationItem_withAvatar{--notification-item-gap:var(--space-m,0)}.NotificationItem_clickable{cursor:pointer}.NotificationItem-Avatar{flex:none}.NotificationItem-Content{flex:1;position:relative}.NotificationItem-TitleWrapper{min-height:var(--control-height-xs)}.NotificationItem-Badge{flex:none}.NotificationItem-Caption{min-height:var(--space-m)}.NotificationItem-Badges,.NotificationItem-Caption{overflow:hidden;width:100%}.NotificationItem-Title{margin-bottom:var(--space-2xs)}.NotificationItem-Title:last-child{margin-bottom:0}.NotificationItem-Actions,.NotificationItem-Button{position:absolute;right:0;top:0}.NotificationItem-MixMR{margin-right:calc(var(--control-height-xs) + var(--space-2xs))}
@@ -0,0 +1,6 @@
1
+ import './NotificationItem.css';
2
+ import React from 'react';
3
+ import { NotificationItemProps } from './types';
4
+ export declare const cnNotificationItem: import("@bem-react/classname").ClassNameFormatter;
5
+ export declare const NotificationItem: React.ForwardRefExoticComponent<Omit<NotificationItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["title","className","content","userName","userImageUrl","caption","actions","read","scrollContainerRef"];import"./NotificationItem.css";import React,{forwardRef}from"react";import{Avatar}from"../../Avatar";import{Badge}from"../../Badge";import{Text}from"../../Text";import{cnMixFlex}from"../../../mixs/MixFlex";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{isNotNil,isString}from"../../../utils/type-guards";import{NotificationActions}from"../NotificationActions";import{NotificationCaption}from"../NotificationCaption";export var cnNotificationItem=cn("NotificationItem");var renderContent=function(a,b){return isString(a)?React.createElement(Text,{size:"s",view:"primary",lineHeight:"m",className:b?cnNotificationItem("MixMR"):void 0},a):a},renderCaption=function(a,b){return!a||Array.isArray(a)&&0===a.filter(isNotNil).length?null:React.createElement("div",{className:cnNotificationItem("Caption",[cnMixFlex({gap:"xs",align:"center"}),cnMixSpace({mB:"2xs"}),b?cnNotificationItem("MixMR"):void 0])},isString(a)?React.createElement(NotificationCaption,null,a):a)};export var NotificationItem=forwardRef(function(a,b){var c,d=a.title,e=a.className,f=a.content,g=a.userName,h=a.userImageUrl,i=a.caption,j=a.actions,k=a.read,l=a.scrollContainerRef,m=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({},m,{ref:b,className:cnNotificationItem({withAvatar:!!(g||h),clickable:!!m.onClick},[e])}),React.createElement("div",{className:cnMixFlex({gap:"m"})},(g||h)&&React.createElement(Avatar,{size:"l",name:g,title:g,url:h,className:cnNotificationItem("Avatar")}),React.createElement("div",{className:cnNotificationItem("Content")},d&&React.createElement("div",{className:cnNotificationItem("TitleWrapper",[cnMixFlex({gap:"xs",direction:"row",align:"center"}),cnMixSpace({mB:"2xs"}),null!==j&&void 0!==j&&j.length?cnNotificationItem("MixMR"):void 0])},!1===k&&React.createElement(Badge,{className:cnNotificationItem("Badge"),size:"s",status:"normal",minified:!0}),React.createElement(Text,{weight:"semibold",className:cnNotificationItem("Title"),view:"primary",size:"s",lineHeight:"m",truncate:!0},d)),renderCaption(i,!!(null!==j&&void 0!==j&&j.length)&&!d),React.createElement("div",{className:cnNotificationItem("Children")},f&&renderContent(f,!(null===j||void 0===j||!j.length||d))),(null===j||void 0===j?void 0:j.length)&&React.createElement(NotificationActions,{className:cnNotificationItem("Actions"),items:j,onlyIcon:!0,style:{zIndex:null===(c=a.style)||void 0===c?void 0:c.zIndex},scrollContainerRef:l}))))});export*from"./types";
2
+ //# sourceMappingURL=NotificationItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationItem.js","names":["React","forwardRef","Avatar","Badge","Text","cnMixFlex","cnMixSpace","cn","isNotNil","isString","NotificationActions","NotificationCaption","cnNotificationItem","renderContent","content","mr","renderCaption","node","Array","isArray","filter","length","gap","align","mB","NotificationItem","props","ref","title","className","userName","userImageUrl","caption","actions","read","scrollContainerRef","otherProps","withAvatar","clickable","onClick","direction","zIndex","style"],"sources":["../../../../../../src/components/Notification/NotificationItem/NotificationItem.tsx"],"sourcesContent":["import './NotificationItem.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { Avatar } from '##/components/Avatar';\nimport { Badge } from '##/components/Badge';\nimport { Text } from '##/components/Text';\nimport { cnMixFlex } from '##/mixs/MixFlex';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\nimport { isNotNil, isString } from '##/utils/type-guards';\n\nimport { NotificationActions } from '../NotificationActions';\nimport { NotificationCaption } from '../NotificationCaption';\nimport { NotificationItemProps } from './types';\n\nexport const cnNotificationItem = cn('NotificationItem');\n\nconst renderContent = (content: React.ReactNode, mr: boolean) =>\n isString(content) ? (\n <Text\n size=\"s\"\n view=\"primary\"\n lineHeight=\"m\"\n className={mr ? cnNotificationItem('MixMR') : undefined}\n >\n {content}\n </Text>\n ) : (\n content\n );\n\nconst renderCaption = (node: React.ReactNode, mr: boolean) => {\n if (!node || (Array.isArray(node) && node.filter(isNotNil).length === 0))\n return null;\n\n return (\n <div\n className={cnNotificationItem('Caption', [\n cnMixFlex({ gap: 'xs', align: 'center' }),\n cnMixSpace({ mB: '2xs' }),\n mr ? cnNotificationItem('MixMR') : undefined,\n ])}\n >\n {isString(node) ? (\n <NotificationCaption>{node}</NotificationCaption>\n ) : (\n node\n )}\n </div>\n );\n};\n\nexport const NotificationItem = forwardRef(\n (props: NotificationItemProps, ref: React.Ref<HTMLDivElement>) => {\n const {\n title,\n className,\n content,\n userName,\n userImageUrl,\n caption,\n actions,\n read,\n scrollContainerRef,\n ...otherProps\n } = props;\n\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnNotificationItem(\n {\n withAvatar: !!(userName || userImageUrl),\n clickable: !!otherProps.onClick,\n },\n [className],\n )}\n >\n <div className={cnMixFlex({ gap: 'm' })}>\n {(userName || userImageUrl) && (\n <Avatar\n size=\"l\"\n name={userName}\n title={userName}\n url={userImageUrl}\n className={cnNotificationItem('Avatar')}\n />\n )}\n <div className={cnNotificationItem('Content')}>\n {title && (\n <div\n className={cnNotificationItem('TitleWrapper', [\n cnMixFlex({\n gap: 'xs',\n direction: 'row',\n align: 'center',\n }),\n cnMixSpace({ mB: '2xs' }),\n actions?.length ? cnNotificationItem('MixMR') : undefined,\n ])}\n >\n {read === false && (\n <Badge\n className={cnNotificationItem('Badge')}\n size=\"s\"\n status=\"normal\"\n minified\n />\n )}\n <Text\n weight=\"semibold\"\n className={cnNotificationItem('Title')}\n view=\"primary\"\n size=\"s\"\n lineHeight=\"m\"\n truncate\n >\n {title}\n </Text>\n </div>\n )}\n {renderCaption(caption, !!actions?.length && !title)}\n <div className={cnNotificationItem('Children')}>\n {content && renderContent(content, !!(actions?.length && !title))}\n </div>\n {actions?.length && (\n <NotificationActions\n className={cnNotificationItem('Actions')}\n items={actions}\n onlyIcon\n style={{ zIndex: props.style?.zIndex }}\n scrollContainerRef={scrollContainerRef}\n />\n )}\n </div>\n </div>\n </div>\n );\n },\n);\n\nexport * from './types';\n"],"mappings":"6MAAA,+BAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,MAAT,oBACA,OAASC,KAAT,mBACA,OAASC,IAAT,kBACA,OAASC,SAAT,6BACA,OAASC,UAAT,8BACA,OAASC,EAAT,0BACA,OAASC,QAAT,CAAmBC,QAAnB,kCAEA,OAASC,mBAAT,8BACA,OAASC,mBAAT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AI,CAAC,GAFP,CAGE,MAAM,CAAC,QAHT,CAIE,QAAQ,GAJV,EAZJ,CAmBE,oBAAC,IAAD,EACE,MAAM,CAAC,UADT,CAEE,SAAS,CAAEA,kBAAkB,CAAC,OAAD,CAF/B,CAGE,IAAI,CAAC,SAHP,CAIE,IAAI,CAAC,GAJP,CAKE,UAAU,CAAC,GALb,CAME,QAAQ,GANV,EAQGgB,CARH,CAnBF,CAFJ,CAiCGZ,aAAa,CAACgB,CAAD,CAAU,CAAC,SAACC,CAAD,WAACA,CAAD,EAACA,CAAO,CAAEZ,MAAV,CAAD,EAAqB,CAACO,CAAhC,CAjChB,CAkCE,2BAAK,SAAS,CAAEhB,kBAAkB,CAAC,UAAD,CAAlC,EACGE,CAAO,EAAID,aAAa,CAACC,CAAD,CAAU,EAAG,OAAAmB,CAAO,WAAPA,CAAA,GAAAA,CAAO,CAAEZ,MAAT,EAAoBO,CAAvB,CAAV,CAD3B,CAlCF,CAqCG,QAAAK,CAAO,WAAPA,CAAA,QAAAA,CAAO,CAAEZ,MAAT,GACC,oBAAC,mBAAD,EACE,SAAS,CAAET,kBAAkB,CAAC,SAAD,CAD/B,CAEE,KAAK,CAAEqB,CAFT,CAGE,QAAQ,GAHV,CAIE,KAAK,CAAE,CAAEQ,MAAM,WAAEf,CAAK,CAACgB,KAAR,qBAAE,EAAaD,MAAvB,CAJT,CAKE,kBAAkB,CAAEN,CALtB,EAtCJ,CAVF,CAXF,CAuEH,CAvFuC,CAAnC,CA0FP"}
@@ -0,0 +1,2 @@
1
+ export * from './NotificationItem';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export*from"./NotificationItem";export*from"./types";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/Notification/NotificationItem/index.ts"],"sourcesContent":["export * from './NotificationItem';\nexport * from './types';\n"],"mappings":"AAAA,gCACA"}
@@ -0,0 +1,19 @@
1
+ import { IconProps } from '@consta/icons/Icon';
2
+ import React from 'react';
3
+ import { PropsWithHTMLAttributesAndRef } from '../../../utils/types/PropsWithHTMLAttributes';
4
+ export type NotificationItemAction = {
5
+ label: string;
6
+ onClick?: React.EventHandler<React.MouseEvent>;
7
+ icon?: React.FC<IconProps>;
8
+ };
9
+ export type NotificationItemProps = PropsWithHTMLAttributesAndRef<{
10
+ title?: string;
11
+ userName?: string;
12
+ userImageUrl?: string;
13
+ content?: React.ReactNode;
14
+ caption?: React.ReactNode;
15
+ actions?: NotificationItemAction[];
16
+ children?: never;
17
+ read?: boolean;
18
+ scrollContainerRef?: React.RefObject<HTMLDivElement>;
19
+ }, HTMLDivElement>;
@@ -0,0 +1,2 @@
1
+ export{};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../../../src/components/Notification/NotificationItem/types.ts"],"sourcesContent":["import { IconProps } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport type NotificationItemAction = {\n label: string;\n onClick?: React.EventHandler<React.MouseEvent>;\n icon?: React.FC<IconProps>;\n};\n\nexport type NotificationItemProps = PropsWithHTMLAttributesAndRef<\n {\n title?: string;\n userName?: string;\n userImageUrl?: string;\n content?: React.ReactNode;\n caption?: React.ReactNode;\n actions?: NotificationItemAction[];\n children?: never;\n read?: boolean;\n scrollContainerRef?: React.RefObject<HTMLDivElement>;\n },\n HTMLDivElement\n>;\n"],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare const defaultDateFormat: (date: Date) => string;
@@ -0,0 +1,2 @@
1
+ import{format}from"date-fns";import formatDistanceToNow from"date-fns/formatDistanceToNow";import ruLocale from"date-fns/locale/ru";export var defaultDateFormat=function(a){var b=new Date;if(36e5>b.getTime()-a.getTime()){var c=formatDistanceToNow(a,{locale:ruLocale,addSuffix:!0});return c.charAt(0).toUpperCase()+c.slice(1)}return format(b,"dd.MM.yyyy")===format(a,"dd.MM.yyyy")?format(a,"HH:mm"):format(a,"dd.MM.yyyy HH:mm")};
2
+ //# sourceMappingURL=defaultDateFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultDateFormat.js","names":["format","formatDistanceToNow","ruLocale","defaultDateFormat","date","currentDate","Date","getTime","str","locale","addSuffix","charAt","toUpperCase","slice"],"sources":["../../../../../../src/components/Notification/helpers/defaultDateFormat.ts"],"sourcesContent":["import { format } from 'date-fns';\nimport formatDistanceToNow from 'date-fns/formatDistanceToNow';\nimport ruLocale from 'date-fns/locale/ru';\n\nexport const defaultDateFormat = (date: Date): string => {\n const currentDate = new Date();\n\n if (currentDate.getTime() - date.getTime() < 3600000) {\n const str = formatDistanceToNow(date, {\n locale: ruLocale,\n addSuffix: true,\n });\n return str.charAt(0).toUpperCase() + str.slice(1);\n }\n\n if (format(currentDate, 'dd.MM.yyyy') === format(date, 'dd.MM.yyyy')) {\n return format(date, 'HH:mm');\n }\n\n return format(date, 'dd.MM.yyyy HH:mm');\n};\n"],"mappings":"AAAA,OAASA,MAAT,KAAuB,UAAvB,CACA,MAAOC,oBAAP,KAAgC,8BAAhC,CACA,MAAOC,SAAP,KAAqB,oBAArB,CAEA,MAAO,IAAMC,kBAAiB,CAAG,SAACC,CAAD,CAAwB,CACvD,GAAMC,EAAW,CAAG,GAAIC,KAAxB,CAEA,GAA6C,IAAzC,CAAAD,CAAW,CAACE,OAAZ,GAAwBH,CAAI,CAACG,OAAL,EAA5B,CAAsD,CACpD,GAAMC,EAAG,CAAGP,mBAAmB,CAACG,CAAD,CAAO,CACpCK,MAAM,CAAEP,QAD4B,CAEpCQ,SAAS,GAF2B,CAAP,CAA/B,CAIA,MAAOF,EAAG,CAACG,MAAJ,CAAW,CAAX,EAAcC,WAAd,GAA8BJ,CAAG,CAACK,KAAJ,CAAU,CAAV,CACtC,CATsD,MAWnDb,OAAM,CAACK,CAAD,CAAc,YAAd,CAAN,GAAsCL,MAAM,CAACI,CAAD,CAAO,YAAP,CAXO,CAY9CJ,MAAM,CAACI,CAAD,CAAO,OAAP,CAZwC,CAehDJ,MAAM,CAACI,CAAD,CAAO,kBAAP,CACd,CAhBM"}
@@ -0,0 +1 @@
1
+ export declare const groupLabelByDay: (timestamp: number | string) => string;
@@ -0,0 +1,2 @@
1
+ import{format,isToday,isYesterday}from"date-fns";export var groupLabelByDay=function(a){var b=+a;return isToday(b)?"\u0421\u0435\u0433\u043E\u0434\u043D\u044F":isYesterday(b)?"\u0412\u0447\u0435\u0440\u0430":format(b,"dd.MM.yyyy")};
2
+ //# sourceMappingURL=groupLabelByDay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groupLabelByDay.js","names":["format","isToday","isYesterday","groupLabelByDay","timestamp","date"],"sources":["../../../../../../src/components/Notification/helpers/groupLabelByDay.ts"],"sourcesContent":["import { format, isToday, isYesterday } from 'date-fns';\n\nexport const groupLabelByDay = (timestamp: number | string) => {\n const date = Number(timestamp);\n\n if (isToday(date)) {\n return 'Сегодня';\n }\n if (isYesterday(date)) {\n return 'Вчера';\n }\n return format(date, 'dd.MM.yyyy');\n};\n"],"mappings":"AAAA,OAASA,MAAT,CAAiBC,OAAjB,CAA0BC,WAA1B,KAA6C,UAA7C,CAEA,MAAO,IAAMC,gBAAe,CAAG,SAACC,CAAD,CAAgC,CAC7D,GAAMC,EAAI,EAAUD,CAApB,CAD6D,MAGzDH,QAAO,CAACI,CAAD,CAHkD,CAIpD,4CAJoD,CAMzDH,WAAW,CAACG,CAAD,CAN8C,CAOpD,gCAPoD,CAStDL,MAAM,CAACK,CAAD,CAAO,YAAP,CACd,CAVM"}
@@ -0,0 +1 @@
1
+ export declare const groupsByDay: (date: Date) => number;
@@ -0,0 +1,2 @@
1
+ import{startOfDay}from"date-fns";export var groupsByDay=function(a){return startOfDay(a).getTime()};
2
+ //# sourceMappingURL=groupsByDay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"groupsByDay.js","names":["startOfDay","groupsByDay","date","getTime"],"sources":["../../../../../../src/components/Notification/helpers/groupsByDay.ts"],"sourcesContent":["import { startOfDay } from 'date-fns';\n\nexport const groupsByDay = (date: Date) => startOfDay(date).getTime();\n"],"mappings":"AAAA,OAASA,UAAT,KAA2B,UAA3B,CAEA,MAAO,IAAMC,YAAW,CAAG,SAACC,CAAD,QAAgBF,WAAU,CAACE,CAAD,CAAV,CAAiBC,OAAjB,EAAhB,CAApB"}
@@ -0,0 +1,4 @@
1
+ export * from './defaultDateFormat';
2
+ export * from './groupsByDay';
3
+ export * from './groupLabelByDay';
4
+ export * from './sortGroupByDay';
@@ -0,0 +1,2 @@
1
+ export*from"./defaultDateFormat";export*from"./groupsByDay";export*from"./groupLabelByDay";export*from"./sortGroupByDay";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/Notification/helpers/index.ts"],"sourcesContent":["export * from './defaultDateFormat';\nexport * from './groupsByDay';\nexport * from './groupLabelByDay';\nexport * from './sortGroupByDay';\n"],"mappings":"AAAA,iCACA,2BACA,+BACA"}
@@ -0,0 +1,5 @@
1
+ export declare const sortGroupByDay: (a: {
2
+ key: string | number;
3
+ }, b: {
4
+ key: string | number;
5
+ }) => 0 | 1 | -1;
@@ -0,0 +1,2 @@
1
+ export var sortGroupByDay=function(c,a){return c.key<a.key?1:c.key>a.key?-1:0};
2
+ //# sourceMappingURL=sortGroupByDay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortGroupByDay.js","names":["sortGroupByDay","a","b","key"],"sources":["../../../../../../src/components/Notification/helpers/sortGroupByDay.ts"],"sourcesContent":["export const sortGroupByDay = (\n a: { key: string | number },\n b: { key: string | number },\n) => {\n if (a.key < b.key) {\n return 1;\n }\n if (a.key > b.key) {\n return -1;\n }\n return 0;\n};\n"],"mappings":"AAAA,MAAO,IAAMA,eAAc,CAAG,SAC5BC,CAD4B,CAE5BC,CAF4B,CAGzB,OACCD,EAAC,CAACE,GAAF,CAAQD,CAAC,CAACC,GADX,CAEM,CAFN,CAICF,CAAC,CAACE,GAAF,CAAQD,CAAC,CAACC,GAJX,CAKM,CAAC,CALP,CAOI,CACR,CAXM"}
@@ -0,0 +1,7 @@
1
+ export * from './Notification';
2
+ export * from './NotificationItem';
3
+ export * from './NotificationActions';
4
+ export * from './NotificationGroup';
5
+ export * from './NotificationHeader';
6
+ export * from './NotificationCaption';
7
+ export * from './helpers';
@@ -0,0 +1,2 @@
1
+ export*from"./Notification";export*from"./NotificationItem";export*from"./NotificationActions";export*from"./NotificationGroup";export*from"./NotificationHeader";export*from"./NotificationCaption";export*from"./helpers";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/Notification/index.ts"],"sourcesContent":["export * from './Notification';\nexport * from './NotificationItem';\nexport * from './NotificationActions';\nexport * from './NotificationGroup';\nexport * from './NotificationHeader';\nexport * from './NotificationCaption';\nexport * from './helpers';\n"],"mappings":"AAAA,4BACA,gCACA,mCACA,iCACA,kCACA,mCACA"}
@@ -1,2 +1,2 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","children"],_excluded2=["className","children"],_excluded3=["isOpen","onClose","onOpen","hasOverlay","onClickOutside","onEsc","position","size","className","children","container","style","rootClassName","afterClose","ignoreOutsideClicksRefs","border"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"./Sidebar.css";import React,{forwardRef}from"react";import{Transition}from"react-transition-group";import{useModal}from"../Modal/useModal";import{PortalWithTheme,PortalWithThemeConsumer}from"../PortalWithTheme";import{cnMixScrollBar}from"../../mixs/MixScrollBar";import{cn}from"../../utils/bem";import{withCtx}from"../../utils/state";import{useAnimateTimeout}from"./useAnimateTimeout";export var cnSidebar=cn("Sidebar");var SidebarContent=function(a){var b=a.className,c=a.children,d=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({className:cnSidebar("Content",[b,cnMixScrollBar()])},d),c)},SidebarActions=function(a){var b=a.className,c=a.children,d=_objectWithoutProperties(a,_excluded2);return React.createElement("div",Object.assign({className:cnSidebar("Actions",[b])},d),c)};export var Sidebar=withCtx(forwardRef(function(a,b){var c=a.isOpen,d=a.onClose,e=a.onOpen,f=a.hasOverlay,g=!(void 0!==f)||f,h=a.onClickOutside,i=a.onEsc,j=a.position,k=void 0===j?"right":j,l=a.size,m=void 0===l?"m":l,n=a.className,o=a.children,p=a.container,q=void 0===p?window.document.body:p,r=a.style,s=a.rootClassName,t=a.afterClose,u=a.ignoreOutsideClicksRefs,v=a.border,w=_objectWithoutProperties(a,_excluded3),x=useModal({ref:b,isOpen:c,onEsc:i,onOpen:e,onClose:d,ignoreOutsideClicksRefs:u}),y=x.shadowHeader,z=x.shadowFooter,A=x.scrollable,B=x.theme,C=x.portalRef,D=x.windowRef,E=x.contentRef,F=x.scrollRef,G=x.ignoreOutsideClicksRefs,H=x.windowElAtom,I=useAnimateTimeout(H,k);return React.createElement(Transition,{in:c,unmountOnExit:!0,timeout:I,nodeRef:C,onExiting:t},function(a){return React.createElement(PortalWithTheme,{preset:B,ref:C,container:q,className:cnSidebar({position:k,hasOverlay:g},[s]),style:_objectSpread(_objectSpread(_objectSpread(_objectSpread({},(null===r||void 0===r?void 0:r.zIndex)&&{zIndex:r.zIndex}),{},_defineProperty({},"--sidebar-animate-timeout","".concat(I,"ms")),y&&_defineProperty({},"--modal-layout-header-color-shadow","var(--color-shadow-group-2)")),z&&_defineProperty({},"--modal-layout-footer-color-shadow","var(--color-shadow-group-2)")),(null===r||void 0===r?void 0:r.zIndex)&&_defineProperty({},"--modal-layout-z-index-for-fixed-slot",r.zIndex))},g&&React.createElement("div",{className:cnSidebar("Overlay",{animate:a}),"aria-label":"Overlay"}),React.createElement("div",Object.assign({},w,{style:_objectSpread(_objectSpread({},r),{},{zIndex:void 0}),className:cnSidebar("Window",{size:m,position:k,animate:a,scrollable:A,border:v},[n]),ref:D}),React.createElement("div",{className:cnSidebar("Scroll",cnMixScrollBar({size:"s"})),ref:F},React.createElement("div",{className:cnSidebar("Content"),ref:E},React.createElement(PortalWithThemeConsumer,{onClickOutside:h,ignoreClicksInsideRefs:G},o)))))})}));Sidebar.Actions=SidebarActions,Sidebar.Content=SidebarContent;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","children"],_excluded2=["className","children"],_excluded3=["isOpen","onClose","onOpen","hasOverlay","onClickOutside","onEsc","position","size","className","children","container","style","rootClassName","afterClose","ignoreOutsideClicksRefs","border","scrollContainerRef"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"./Sidebar.css";import React,{forwardRef}from"react";import{Transition}from"react-transition-group";import{useModal}from"../Modal/useModal";import{PortalWithTheme,PortalWithThemeConsumer}from"../PortalWithTheme";import{useForkRef}from"../../hooks/useForkRef";import{cnMixScrollBar}from"../../mixs/MixScrollBar";import{cn}from"../../utils/bem";import{withCtx}from"../../utils/state";import{useAnimateTimeout}from"./useAnimateTimeout";export var cnSidebar=cn("Sidebar");var SidebarContent=function(a){var b=a.className,c=a.children,d=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({className:cnSidebar("Content",[b,cnMixScrollBar()])},d),c)},SidebarActions=function(a){var b=a.className,c=a.children,d=_objectWithoutProperties(a,_excluded2);return React.createElement("div",Object.assign({className:cnSidebar("Actions",[b])},d),c)};export var Sidebar=withCtx(forwardRef(function(a,b){var c=a.isOpen,d=a.onClose,e=a.onOpen,f=a.hasOverlay,g=!(void 0!==f)||f,h=a.onClickOutside,i=a.onEsc,j=a.position,k=void 0===j?"right":j,l=a.size,m=void 0===l?"m":l,n=a.className,o=a.children,p=a.container,q=void 0===p?window.document.body:p,r=a.style,s=a.rootClassName,t=a.afterClose,u=a.ignoreOutsideClicksRefs,v=a.border,w=a.scrollContainerRef,x=_objectWithoutProperties(a,_excluded3),y=useModal({ref:b,isOpen:c,onEsc:i,onOpen:e,onClose:d,ignoreOutsideClicksRefs:u}),z=y.shadowHeader,A=y.shadowFooter,B=y.scrollable,C=y.theme,D=y.portalRef,E=y.windowRef,F=y.contentRef,G=y.scrollRef,H=y.ignoreOutsideClicksRefs,I=y.windowElAtom,J=useAnimateTimeout(I,k),K=useForkRef([w,G]);return React.createElement(Transition,{in:c,unmountOnExit:!0,timeout:J,nodeRef:D,onExiting:t},function(a){return React.createElement(PortalWithTheme,{preset:C,ref:D,container:q,className:cnSidebar({position:k,hasOverlay:g},[s]),style:_objectSpread(_objectSpread(_objectSpread(_objectSpread({},(null===r||void 0===r?void 0:r.zIndex)&&{zIndex:r.zIndex}),{},_defineProperty({},"--sidebar-animate-timeout","".concat(J,"ms")),z&&_defineProperty({},"--modal-layout-header-color-shadow","var(--color-shadow-group-2)")),A&&_defineProperty({},"--modal-layout-footer-color-shadow","var(--color-shadow-group-2)")),(null===r||void 0===r?void 0:r.zIndex)&&_defineProperty({},"--modal-layout-z-index-for-fixed-slot",r.zIndex))},g&&React.createElement("div",{className:cnSidebar("Overlay",{animate:a}),"aria-label":"Overlay"}),React.createElement("div",Object.assign({},x,{style:_objectSpread(_objectSpread({},r),{},{zIndex:void 0}),className:cnSidebar("Window",{size:m,position:k,animate:a,scrollable:B,border:v},[n]),ref:E}),React.createElement("div",{className:cnSidebar("Scroll",cnMixScrollBar({size:"s"})),ref:K},React.createElement("div",{className:cnSidebar("Content"),ref:F},React.createElement(PortalWithThemeConsumer,{onClickOutside:h,ignoreClicksInsideRefs:H},o)))))})}));Sidebar.Actions=SidebarActions,Sidebar.Content=SidebarContent;
2
2
  //# sourceMappingURL=Sidebar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","names":["React","forwardRef","Transition","useModal","PortalWithTheme","PortalWithThemeConsumer","cnMixScrollBar","cn","withCtx","useAnimateTimeout","cnSidebar","SidebarContent","className","children","rest","SidebarActions","Sidebar","props","ref","isOpen","onClose","onOpen","hasOverlay","onClickOutside","onEsc","position","size","container","window","document","body","style","rootClassName","afterClose","ignoreOutsideClicksRefsProp","ignoreOutsideClicksRefs","border","otherProps","shadowHeader","shadowFooter","scrollable","theme","portalRef","windowRef","contentRef","scrollRef","windowElAtom","animateTimeout","animate","zIndex","Actions","Content"],"sources":["../../../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["import './Sidebar.css';\n\nimport React, { forwardRef } from 'react';\nimport { Transition } from 'react-transition-group';\n\nimport { useModal } from '##/components/Modal/useModal';\nimport {\n PortalWithTheme,\n PortalWithThemeConsumer,\n} from '##/components/PortalWithTheme';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cn } from '##/utils/bem';\nimport { withCtx } from '##/utils/state';\n\nimport {\n SidebarActionsProps,\n SidebarComponent,\n SidebarContentProps,\n SidebarProps,\n} from './types';\nimport { useAnimateTimeout } from './useAnimateTimeout';\n\nexport const cnSidebar = cn('Sidebar');\n\nconst SidebarContent: React.FC<SidebarContentProps> = ({\n className,\n children,\n ...rest\n}) => (\n <div\n className={cnSidebar('Content', [className, cnMixScrollBar()])}\n {...rest}\n >\n {children}\n </div>\n);\n\nconst SidebarActions: React.FC<SidebarActionsProps> = ({\n className,\n children,\n ...rest\n}) => (\n <div className={cnSidebar('Actions', [className])} {...rest}>\n {children}\n </div>\n);\n\nexport const Sidebar = withCtx(\n forwardRef<HTMLDivElement, SidebarProps>((props, ref) => {\n const {\n isOpen,\n onClose,\n onOpen,\n hasOverlay = true,\n onClickOutside,\n onEsc,\n position = 'right',\n size = 'm',\n className,\n children,\n container = window.document.body,\n style,\n rootClassName,\n afterClose,\n ignoreOutsideClicksRefs: ignoreOutsideClicksRefsProp,\n border,\n ...otherProps\n } = props;\n\n const {\n shadowHeader,\n shadowFooter,\n scrollable,\n theme,\n portalRef,\n windowRef,\n contentRef,\n scrollRef,\n ignoreOutsideClicksRefs,\n windowElAtom,\n } = useModal({\n ref,\n isOpen,\n onEsc,\n onOpen,\n onClose,\n ignoreOutsideClicksRefs: ignoreOutsideClicksRefsProp,\n });\n\n const animateTimeout = useAnimateTimeout(windowElAtom, position);\n\n return (\n <Transition\n in={isOpen}\n unmountOnExit\n timeout={animateTimeout}\n nodeRef={portalRef}\n onExiting={afterClose}\n >\n {(animate) => (\n <PortalWithTheme\n preset={theme}\n ref={portalRef}\n container={container}\n className={cnSidebar({ position, hasOverlay }, [rootClassName])}\n style={{\n ...(style?.zIndex && {\n zIndex: style.zIndex,\n }),\n ['--sidebar-animate-timeout' as string]: `${animateTimeout}ms`,\n ...(shadowHeader && {\n ['--modal-layout-header-color-shadow' as string]:\n 'var(--color-shadow-group-2)',\n }),\n ...(shadowFooter && {\n ['--modal-layout-footer-color-shadow' as string]:\n 'var(--color-shadow-group-2)',\n }),\n ...(style?.zIndex && {\n ['--modal-layout-z-index-for-fixed-slot' as string]:\n style.zIndex,\n }),\n }}\n >\n {hasOverlay && (\n <div\n className={cnSidebar('Overlay', { animate })}\n aria-label=\"Overlay\"\n />\n )}\n <div\n {...otherProps}\n style={{\n ...style,\n zIndex: undefined,\n }}\n className={cnSidebar(\n 'Window',\n {\n size,\n position,\n animate,\n scrollable,\n border,\n },\n [className],\n )}\n ref={windowRef}\n >\n <div\n className={cnSidebar('Scroll', cnMixScrollBar({ size: 's' }))}\n ref={scrollRef}\n >\n <div className={cnSidebar('Content')} ref={contentRef}>\n <PortalWithThemeConsumer\n onClickOutside={onClickOutside}\n ignoreClicksInsideRefs={ignoreOutsideClicksRefs}\n >\n {children}\n </PortalWithThemeConsumer>\n </div>\n </div>\n </div>\n </PortalWithTheme>\n )}\n </Transition>\n );\n }),\n) as SidebarComponent;\n/**\n * @deprecated use actions\n */\nSidebar.Actions = SidebarActions;\n\n/**\n * @deprecated use actions\n */\nSidebar.Content = SidebarContent;\n"],"mappings":"ihCAAA,sBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CACA,OAASC,UAAT,KAA2B,wBAA3B,CAEA,OAASC,QAAT,yBACA,OACEC,eADF,CAEEC,uBAFF,0BAIA,OAASC,cAAT,+BACA,OAASC,EAAT,uBACA,OAASC,OAAT,yBAQA,OAASC,iBAAT,2BAEA,MAAO,IAAMC,UAAS,CAAGH,EAAE,CAAC,SAAD,CAApB,C,GAEDI,eAA6C,CAAG,eACpDC,EADoD,GACpDA,SADoD,CAEpDC,CAFoD,GAEpDA,QAFoD,CAGjDC,CAHiD,6CAKpD,0CACE,SAAS,CAAEJ,SAAS,CAAC,SAAD,CAAY,CAACE,CAAD,CAAYN,cAAc,EAA1B,CAAZ,CADtB,EAEMQ,CAFN,EAIGD,CAJH,CALoD,C,CAahDE,cAA6C,CAAG,eACpDH,EADoD,GACpDA,SADoD,CAEpDC,CAFoD,GAEpDA,QAFoD,CAGjDC,CAHiD,8CAKpD,0CAAK,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,SAAS,CAAEZ,SAAS,CAAC,SAAD,CAAY,CAAEsC,OAAO,CAAPA,CAAF,CAAZ,CADtB,CAEE,aAAW,SAFb,EAzBJ,CA8BE,2CACMX,CADN,EAEE,KAAK,gCACAN,CADA,MAEHkB,MAAM,OAFH,EAFP,CAME,SAAS,CAAEvC,SAAS,CAClB,QADkB,CAElB,CACEgB,IAAI,CAAJA,CADF,CAEED,QAAQ,CAARA,CAFF,CAGEuB,OAAO,CAAPA,CAHF,CAIER,UAAU,CAAVA,CAJF,CAKEJ,MAAM,CAANA,CALF,CAFkB,CASlB,CAACxB,CAAD,CATkB,CANtB,CAiBE,GAAG,CAAE+B,CAjBP,GAmBE,2BACE,SAAS,CAAEjC,SAAS,CAAC,QAAD,CAAWJ,cAAc,CAAC,CAAEoB,IAAI,CAAE,GAAR,CAAD,CAAzB,CADtB,CAEE,GAAG,CAAEmB,CAFP,EAIE,2BAAK,SAAS,CAAEnC,SAAS,CAAC,SAAD,CAAzB,CAAsC,GAAG,CAAEkC,CAA3C,EACE,oBAAC,uBAAD,EACE,cAAc,CAAErB,CADlB,CAEE,sBAAsB,CAAEY,CAF1B,EAIGtB,CAJH,CADF,CAJF,CAnBF,CA9BF,CADD,CAPH,CA2EH,CAvHS,CADkB,CAAvB,CA6HPG,OAAO,CAACkC,OAAR,CAAkBnC,c,CAKlBC,OAAO,CAACmC,OAAR,CAAkBxC,c"}
1
+ {"version":3,"file":"Sidebar.js","names":["React","forwardRef","Transition","useModal","PortalWithTheme","PortalWithThemeConsumer","useForkRef","cnMixScrollBar","cn","withCtx","useAnimateTimeout","cnSidebar","SidebarContent","className","children","rest","SidebarActions","Sidebar","props","ref","isOpen","onClose","onOpen","hasOverlay","onClickOutside","onEsc","position","size","container","window","document","body","style","rootClassName","afterClose","ignoreOutsideClicksRefsProp","ignoreOutsideClicksRefs","border","scrollContainerRefProp","scrollContainerRef","otherProps","shadowHeader","shadowFooter","scrollable","theme","portalRef","windowRef","contentRef","scrollRef","windowElAtom","animateTimeout","animate","zIndex","Actions","Content"],"sources":["../../../../../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["import './Sidebar.css';\n\nimport React, { forwardRef } from 'react';\nimport { Transition } from 'react-transition-group';\n\nimport { useModal } from '##/components/Modal/useModal';\nimport {\n PortalWithTheme,\n PortalWithThemeConsumer,\n} from '##/components/PortalWithTheme';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cn } from '##/utils/bem';\nimport { withCtx } from '##/utils/state';\n\nimport {\n SidebarActionsProps,\n SidebarComponent,\n SidebarContentProps,\n SidebarProps,\n} from './types';\nimport { useAnimateTimeout } from './useAnimateTimeout';\n\nexport const cnSidebar = cn('Sidebar');\n\nconst SidebarContent: React.FC<SidebarContentProps> = ({\n className,\n children,\n ...rest\n}) => (\n <div\n className={cnSidebar('Content', [className, cnMixScrollBar()])}\n {...rest}\n >\n {children}\n </div>\n);\n\nconst SidebarActions: React.FC<SidebarActionsProps> = ({\n className,\n children,\n ...rest\n}) => (\n <div className={cnSidebar('Actions', [className])} {...rest}>\n {children}\n </div>\n);\n\nexport const Sidebar = withCtx(\n forwardRef<HTMLDivElement, SidebarProps>((props, ref) => {\n const {\n isOpen,\n onClose,\n onOpen,\n hasOverlay = true,\n onClickOutside,\n onEsc,\n position = 'right',\n size = 'm',\n className,\n children,\n container = window.document.body,\n style,\n rootClassName,\n afterClose,\n ignoreOutsideClicksRefs: ignoreOutsideClicksRefsProp,\n border,\n scrollContainerRef: scrollContainerRefProp,\n ...otherProps\n } = props;\n\n const {\n shadowHeader,\n shadowFooter,\n scrollable,\n theme,\n portalRef,\n windowRef,\n contentRef,\n scrollRef,\n ignoreOutsideClicksRefs,\n windowElAtom,\n } = useModal({\n ref,\n isOpen,\n onEsc,\n onOpen,\n onClose,\n ignoreOutsideClicksRefs: ignoreOutsideClicksRefsProp,\n });\n\n const animateTimeout = useAnimateTimeout(windowElAtom, position);\n const scrollContainerRef = useForkRef([scrollContainerRefProp, scrollRef]);\n\n return (\n <Transition\n in={isOpen}\n unmountOnExit\n timeout={animateTimeout}\n nodeRef={portalRef}\n onExiting={afterClose}\n >\n {(animate) => (\n <PortalWithTheme\n preset={theme}\n ref={portalRef}\n container={container}\n className={cnSidebar({ position, hasOverlay }, [rootClassName])}\n style={{\n ...(style?.zIndex && {\n zIndex: style.zIndex,\n }),\n ['--sidebar-animate-timeout' as string]: `${animateTimeout}ms`,\n ...(shadowHeader && {\n ['--modal-layout-header-color-shadow' as string]:\n 'var(--color-shadow-group-2)',\n }),\n ...(shadowFooter && {\n ['--modal-layout-footer-color-shadow' as string]:\n 'var(--color-shadow-group-2)',\n }),\n ...(style?.zIndex && {\n ['--modal-layout-z-index-for-fixed-slot' as string]:\n style.zIndex,\n }),\n }}\n >\n {hasOverlay && (\n <div\n className={cnSidebar('Overlay', { animate })}\n aria-label=\"Overlay\"\n />\n )}\n <div\n {...otherProps}\n style={{\n ...style,\n zIndex: undefined,\n }}\n className={cnSidebar(\n 'Window',\n {\n size,\n position,\n animate,\n scrollable,\n border,\n },\n [className],\n )}\n ref={windowRef}\n >\n <div\n className={cnSidebar('Scroll', cnMixScrollBar({ size: 's' }))}\n ref={scrollContainerRef}\n >\n <div className={cnSidebar('Content')} ref={contentRef}>\n <PortalWithThemeConsumer\n onClickOutside={onClickOutside}\n ignoreClicksInsideRefs={ignoreOutsideClicksRefs}\n >\n {children}\n </PortalWithThemeConsumer>\n </div>\n </div>\n </div>\n </PortalWithTheme>\n )}\n </Transition>\n );\n }),\n) as SidebarComponent;\n/**\n * @deprecated use actions\n */\nSidebar.Actions = SidebarActions;\n\n/**\n * @deprecated use actions\n */\nSidebar.Content = SidebarContent;\n"],"mappings":"siCAAA,sBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CACA,OAASC,UAAT,KAA2B,wBAA3B,CAEA,OAASC,QAAT,yBACA,OACEC,eADF,CAEEC,uBAFF,0BAIA,OAASC,UAAT,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EACE,oBAAC,uBAAD,EACE,cAAc,CAAEvB,CADlB,CAEE,sBAAsB,CAAEY,CAF1B,EAIGtB,CAJH,CADF,CAJF,CAnBF,CA9BF,CADD,CAPH,CA2EH,CAzHS,CADkB,CAAvB,CA+HPG,OAAO,CAACoC,OAAR,CAAkBrC,c,CAKlBC,OAAO,CAACqC,OAAR,CAAkB1C,c"}
@@ -19,6 +19,7 @@ export type SidebarProps = PropsWithHTMLAttributes<{
19
19
  afterClose?: () => void;
20
20
  ignoreOutsideClicksRefs?: React.RefObject<HTMLElement>[];
21
21
  border?: boolean;
22
+ scrollContainerRef?: React.RefObject<HTMLDivElement>;
22
23
  }, HTMLDivElement>;
23
24
  /**
24
25
  * @deprecated
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["sidebarPropPosition","sidebarPropSize"],"sources":["../../../../../src/components/Sidebar/types.ts"],"sourcesContent":["import { AsTagAttribute } from '##/utils/types/AsTags';\nimport { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nconst sidebarPropPosition = ['right', 'bottom', 'left', 'top'] as const;\nexport type SidebarPropPosition = typeof sidebarPropPosition[number];\n\nexport const sidebarPropSize = [\n 's',\n 'm',\n 'l',\n 'full',\n 'none',\n '1/2',\n '1/3',\n '1/4',\n '2/3',\n '3/4',\n] as const;\n\nexport type SidebarPropSize = typeof sidebarPropSize[number];\n\nexport type SidebarProps = PropsWithHTMLAttributes<\n {\n isOpen?: boolean;\n onClose?: () => void;\n onOpen?: () => void;\n hasOverlay?: boolean;\n onClickOutside?: (event: MouseEvent) => void;\n onEsc?: (event: KeyboardEvent) => void;\n position?: SidebarPropPosition;\n size?: SidebarPropSize;\n rootClassName?: string;\n children?: React.ReactNode;\n container?: HTMLDivElement | React.RefObject<HTMLDivElement>;\n afterClose?: () => void;\n ignoreOutsideClicksRefs?: React.RefObject<HTMLElement>[];\n border?: boolean;\n },\n HTMLDivElement\n>;\n\n/**\n * @deprecated\n */\nexport type SidebarContentProps = {\n className?: string;\n children: React.ReactNode;\n};\n\n/**\n * @deprecated\n */\nexport type SidebarActionsProps = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport interface SidebarComponent\n extends React.ForwardRefExoticComponent<SidebarProps>,\n AsTagAttribute<'div'> {\n /**\n * @deprecated\n */\n Content: React.FC<SidebarContentProps>;\n /**\n * @deprecated\n */\n Actions: React.FC<SidebarActionsProps>;\n}\n"],"mappings":"AAGA,GAAMA,oBAAmB,CAAG,CAAC,OAAD,CAAU,QAAV,CAAoB,MAApB,CAA4B,KAA5B,CAA5B,CAGA,MAAO,IAAMC,gBAAe,CAAG,CAC7B,GAD6B,CAE7B,GAF6B,CAG7B,GAH6B,CAI7B,MAJ6B,CAK7B,MAL6B,CAM7B,KAN6B,CAO7B,KAP6B,CAQ7B,KAR6B,CAS7B,KAT6B,CAU7B,KAV6B,CAAxB"}
1
+ {"version":3,"file":"types.js","names":["sidebarPropPosition","sidebarPropSize"],"sources":["../../../../../src/components/Sidebar/types.ts"],"sourcesContent":["import { AsTagAttribute } from '##/utils/types/AsTags';\nimport { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nconst sidebarPropPosition = ['right', 'bottom', 'left', 'top'] as const;\nexport type SidebarPropPosition = typeof sidebarPropPosition[number];\n\nexport const sidebarPropSize = [\n 's',\n 'm',\n 'l',\n 'full',\n 'none',\n '1/2',\n '1/3',\n '1/4',\n '2/3',\n '3/4',\n] as const;\n\nexport type SidebarPropSize = typeof sidebarPropSize[number];\n\nexport type SidebarProps = PropsWithHTMLAttributes<\n {\n isOpen?: boolean;\n onClose?: () => void;\n onOpen?: () => void;\n hasOverlay?: boolean;\n onClickOutside?: (event: MouseEvent) => void;\n onEsc?: (event: KeyboardEvent) => void;\n position?: SidebarPropPosition;\n size?: SidebarPropSize;\n rootClassName?: string;\n children?: React.ReactNode;\n container?: HTMLDivElement | React.RefObject<HTMLDivElement>;\n afterClose?: () => void;\n ignoreOutsideClicksRefs?: React.RefObject<HTMLElement>[];\n border?: boolean;\n scrollContainerRef?: React.RefObject<HTMLDivElement>;\n },\n HTMLDivElement\n>;\n\n/**\n * @deprecated\n */\nexport type SidebarContentProps = {\n className?: string;\n children: React.ReactNode;\n};\n\n/**\n * @deprecated\n */\nexport type SidebarActionsProps = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport interface SidebarComponent\n extends React.ForwardRefExoticComponent<SidebarProps>,\n AsTagAttribute<'div'> {\n /**\n * @deprecated\n */\n Content: React.FC<SidebarContentProps>;\n /**\n * @deprecated\n */\n Actions: React.FC<SidebarActionsProps>;\n}\n"],"mappings":"AAGA,GAAMA,oBAAmB,CAAG,CAAC,OAAD,CAAU,QAAV,CAAoB,MAApB,CAA4B,KAA5B,CAA5B,CAGA,MAAO,IAAMC,gBAAe,CAAG,CAC7B,GAD6B,CAE7B,GAF6B,CAG7B,GAH6B,CAI7B,MAJ6B,CAK7B,MAL6B,CAM7B,KAN6B,CAO7B,KAP6B,CAQ7B,KAR6B,CAS7B,KAT6B,CAU7B,KAV6B,CAAxB"}
@@ -0,0 +1 @@
1
+ .deprecated--Sidebar{--sidebar-size-s:260px;--sidebar-size-m:320px;--sidebar-size-l:480px;--sidebar-size-1-of-4:25;--sidebar-size-3-of-4:75;--sidebar-size-1-of-2:50;--sidebar-size-1-of-3:33.33333;--sidebar-size-2-of-3:66.66667;--sidebar-size-full:100;bottom:0;display:flex;left:0;overflow:hidden;position:fixed;right:0;top:0}.deprecated--Sidebar:not(.Sidebar_hasOverlay){pointer-events:none}.deprecated--Sidebar_position_top{flex-direction:column}.deprecated--Sidebar_position_bottom{flex-direction:column;justify-content:flex-end}.deprecated--Sidebar_position_right{justify-content:flex-end}.deprecated--Sidebar-Overlay{background:var(--color-bg-tone);border:none;bottom:0;left:0;padding:0;position:absolute;right:0;top:0}.deprecated--Sidebar-Overlay_animate_exited,.deprecated--Sidebar-Overlay_animate_exiting{opacity:0}.deprecated--Sidebar-Overlay_animate_entered,.deprecated--Sidebar-Overlay_animate_entering{opacity:1}.deprecated--Sidebar-Overlay_animate_entered,.deprecated--Sidebar-Overlay_animate_entering,.deprecated--Sidebar-Overlay_animate_exited,.deprecated--Sidebar-Overlay_animate_exiting{transition:opacity .24s ease}.deprecated--Sidebar-Window{background-color:var(--color-bg-default);box-shadow:var(--shadow-modal);display:flex;flex-direction:column;pointer-events:auto;position:absolute}.deprecated--Sidebar-Window_position_right{--sidebar-transform:translate3d(100%,0,0);height:100vh;width:var(--sidebar-width)}.deprecated--Sidebar-Window_position_bottom{--sidebar-transform:translate3d(0,100%,0);height:var(--sidebar-height);width:100vw}.deprecated--Sidebar-Window_position_left{--sidebar-transform:translate3d(-100%,0,0);height:100vh;width:var(--sidebar-width)}.deprecated--Sidebar-Window_position_top{--sidebar-transform:translate3d(0,-100%,0);height:var(--sidebar-height);width:100vw}.deprecated--Sidebar-Window_size_s{--sidebar-width:var(--sidebar-size-s);--sidebar-height:var(--sidebar-size-s)}.deprecated--Sidebar-Window_size_m{--sidebar-width:var(--sidebar-size-m);--sidebar-height:var(--sidebar-size-m)}.deprecated--Sidebar-Window_size_l{--sidebar-width:var(--sidebar-size-l);--sidebar-height:var(--sidebar-size-l)}.deprecated--Sidebar-Window_size_full{--sidebar-width:calc(var(--sidebar-size-full)*1vw);--sidebar-height:calc(var(--sidebar-size-full)*1vh)}.deprecated--Sidebar-Window_size_1\/4{--sidebar-width:calc(var(--sidebar-size-1-of-4)*1vw);--sidebar-height:calc(var(--sidebar-size-1-of-4)*1vh)}.deprecated--Sidebar-Window_size_3\/4{--sidebar-width:calc(var(--sidebar-size-3-of-4)*1vw);--sidebar-height:calc(var(--sidebar-size-3-of-4)*1vh)}.deprecated--Sidebar-Window_size_1\/2{--sidebar-width:calc(var(--sidebar-size-1-of-2)*1vw);--sidebar-height:calc(var(--sidebar-size-1-of-2)*1vh)}.deprecated--Sidebar-Window_size_1\/3{--sidebar-width:calc(var(--sidebar-size-1-of-3)*1vw);--sidebar-height:calc(var(--sidebar-size-1-of-3)*1vh)}.deprecated--Sidebar-Window_size_2\/3{--sidebar-width:calc(var(--sidebar-size-2-of-3)*1vw);--sidebar-height:calc(var(--sidebar-size-2-of-3)*1vh)}.deprecated--Sidebar-Window_animate_exited,.deprecated--Sidebar-Window_animate_exiting{transform:var(--sidebar-transform)}.deprecated--Sidebar-Window_animate_entered,.deprecated--Sidebar-Window_animate_entering{transform:translateZ(0)}.deprecated--Sidebar-Window_animate_entered,.deprecated--Sidebar-Window_animate_entering,.deprecated--Sidebar-Window_animate_exited,.deprecated--Sidebar-Window_animate_exiting{transition:transform .24s ease}.deprecated--Sidebar-Content{flex:1;overflow:auto}.deprecated--Sidebar-Actions{border-top:1px solid var(--color-bg-border);flex-shrink:0}
@@ -0,0 +1,39 @@
1
+ import './SidebarDeprecated.css';
2
+ import React from 'react';
3
+ import { AsTagAttribute } from '../../utils/types/AsTags';
4
+ import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
5
+ declare const sidebarPropPosition: readonly ["right", "bottom", "left", "top"];
6
+ type SidebarPropPosition = typeof sidebarPropPosition[number];
7
+ export declare const sidebarPropSize: readonly ["s", "m", "l", "full", "1/2", "1/3", "1/4", "2/3", "3/4"];
8
+ export type SidebarPropSize = typeof sidebarPropSize[number];
9
+ export type SidebarProps = PropsWithHTMLAttributes<{
10
+ isOpen?: boolean;
11
+ onClose?: () => void;
12
+ onOpen?: () => void;
13
+ hasOverlay?: boolean;
14
+ onClickOutside?: (event: MouseEvent) => void;
15
+ onEsc?: (event: KeyboardEvent) => void;
16
+ position?: SidebarPropPosition;
17
+ size?: SidebarPropSize;
18
+ rootClassName?: string;
19
+ children?: React.ReactNode;
20
+ container?: HTMLDivElement | undefined;
21
+ afterClose?: () => void;
22
+ }, HTMLDivElement>;
23
+ type SidebarContentProps = {
24
+ className?: string;
25
+ children: React.ReactNode;
26
+ };
27
+ type SidebarActionsProps = {
28
+ className?: string;
29
+ children: React.ReactNode;
30
+ };
31
+ export declare const cnSidebar: import("@bem-react/classname").ClassNameFormatter;
32
+ declare const SidebarContent: React.FC<SidebarContentProps>;
33
+ declare const SidebarActions: React.FC<SidebarActionsProps>;
34
+ interface SidebarComponent extends React.FC<SidebarProps>, AsTagAttribute<'div'> {
35
+ Content: typeof SidebarContent;
36
+ Actions: typeof SidebarActions;
37
+ }
38
+ export declare const Sidebar: SidebarComponent;
39
+ export {};
@@ -0,0 +1,2 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","children"],_excluded2=["className","children"],_excluded3=["isOpen","onClose","onOpen","hasOverlay","onClickOutside","onEsc","position","size","className","children","container","style","rootClassName","afterClose"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"./SidebarDeprecated.css";import React,{useEffect,useRef}from"react";import{Transition}from"react-transition-group";import{PortalWithTheme,PortalWithThemeConsumer}from"../PortalWithTheme";import{useTheme}from"../Theme/Theme";import{useGlobalKeys}from"../../hooks/useGlobalKeys";import{cnMixScrollBar}from"../../mixs/MixScrollBar";import{cn}from"../../utils/bem";var sidebarPropPosition=["right","bottom","left","top"],sidebarPropPositionDefault=sidebarPropPosition[0];export var sidebarPropSize=["s","m","l","full","1/2","1/3","1/4","2/3","3/4"];var sidebarPropSizeDefault=sidebarPropSize[1];export var cnSidebar=cn("Sidebar");var SidebarContent=function(a){var b=a.className,c=a.children,d=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({className:cnSidebar("Content",[b,cnMixScrollBar()])},d),c)},SidebarActions=function(a){var b=a.className,c=a.children,d=_objectWithoutProperties(a,_excluded2);return React.createElement("div",Object.assign({className:cnSidebar("Actions",[b])},d),c)};export var Sidebar=function(a){var b=a.isOpen,c=a.onClose,d=a.onOpen,e=a.hasOverlay,f=void 0===e||e,g=a.onClickOutside,h=a.onEsc,i=a.position,j=void 0===i?sidebarPropPositionDefault:i,k=a.size,l=void 0===k?sidebarPropSizeDefault:k,m=a.className,n=a.children,o=a.container,p=void 0===o?window.document.body:o,q=a.style,r=a.rootClassName,s=a.afterClose,t=_objectWithoutProperties(a,_excluded3),u=useRef(null),v=useRef(null),w=useTheme(),x=w.theme;return useEffect(function(){b?null===d||void 0===d?void 0:d():null===c||void 0===c?void 0:c()},[b]),useGlobalKeys({Escape:function Escape(a){return b&&h&&h(a)}}),React.createElement(Transition,{in:b,unmountOnExit:!0,timeout:240,nodeRef:v,onExiting:s},function(a){return React.createElement(PortalWithTheme,{preset:x,ref:v,container:p,className:cnSidebar({position:j,hasOverlay:f},[r]),style:"number"==typeof(null===q||void 0===q?void 0:q.zIndex)?{zIndex:q.zIndex}:void 0},f&&React.createElement("div",{className:cnSidebar("Overlay",{animate:a}),"aria-label":"Overlay"}),React.createElement("div",Object.assign({},t,{style:_objectSpread(_objectSpread({},q),{},{zIndex:void 0}),className:cnSidebar("Window",{size:l,position:j,animate:a},[m]),ref:u}),React.createElement(PortalWithThemeConsumer,{onClickOutside:g,ignoreClicksInsideRefs:[u]},n)))})};Sidebar.Content=SidebarContent,Sidebar.Actions=SidebarActions;
2
+ //# sourceMappingURL=SidebarDeprecated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarDeprecated.js","names":["React","useEffect","useRef","Transition","PortalWithTheme","PortalWithThemeConsumer","useTheme","useGlobalKeys","cnMixScrollBar","cn","sidebarPropPosition","sidebarPropPositionDefault","sidebarPropSize","sidebarPropSizeDefault","cnSidebar","SidebarContent","className","children","rest","SidebarActions","Sidebar","props","isOpen","onClose","onOpen","hasOverlay","onClickOutside","onEsc","position","size","container","window","document","body","style","rootClassName","afterClose","otherProps","ref","portalRef","theme","Escape","e","animate","zIndex","Content","Actions"],"sources":["../../../../../src/components/SidebarDeprecated/SidebarDeprecated.tsx"],"sourcesContent":["import './SidebarDeprecated.css';\n\nimport React, { useEffect, useRef } from 'react';\nimport { Transition } from 'react-transition-group';\n\nimport {\n PortalWithTheme,\n PortalWithThemeConsumer,\n} from '##/components/PortalWithTheme';\nimport { useTheme } from '##/components/Theme/Theme';\nimport { useGlobalKeys } from '##/hooks/useGlobalKeys';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cn } from '##/utils/bem';\nimport { AsTagAttribute } from '##/utils/types/AsTags';\nimport { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nconst sidebarPropPosition = ['right', 'bottom', 'left', 'top'] as const;\ntype SidebarPropPosition = typeof sidebarPropPosition[number];\nconst sidebarPropPositionDefault: SidebarPropPosition = sidebarPropPosition[0];\n\nexport const sidebarPropSize = [\n 's',\n 'm',\n 'l',\n 'full',\n '1/2',\n '1/3',\n '1/4',\n '2/3',\n '3/4',\n] as const;\n\nexport type SidebarPropSize = typeof sidebarPropSize[number];\nconst sidebarPropSizeDefault: SidebarPropSize = sidebarPropSize[1];\n\nexport type SidebarProps = PropsWithHTMLAttributes<\n {\n isOpen?: boolean;\n onClose?: () => void;\n onOpen?: () => void;\n hasOverlay?: boolean;\n onClickOutside?: (event: MouseEvent) => void;\n onEsc?: (event: KeyboardEvent) => void;\n position?: SidebarPropPosition;\n size?: SidebarPropSize;\n rootClassName?: string;\n children?: React.ReactNode;\n container?: HTMLDivElement | undefined;\n afterClose?: () => void;\n },\n HTMLDivElement\n>;\n\ntype SidebarContentProps = {\n className?: string;\n children: React.ReactNode;\n};\n\ntype SidebarActionsProps = {\n className?: string;\n children: React.ReactNode;\n};\n\nexport const cnSidebar = cn('Sidebar');\n\nconst SidebarContent: React.FC<SidebarContentProps> = ({\n className,\n children,\n ...rest\n}) => (\n <div\n className={cnSidebar('Content', [className, cnMixScrollBar()])}\n {...rest}\n >\n {children}\n </div>\n);\n\nconst SidebarActions: React.FC<SidebarActionsProps> = ({\n className,\n children,\n ...rest\n}) => (\n <div className={cnSidebar('Actions', [className])} {...rest}>\n {children}\n </div>\n);\n\ninterface SidebarComponent\n extends React.FC<SidebarProps>,\n AsTagAttribute<'div'> {\n Content: typeof SidebarContent;\n Actions: typeof SidebarActions;\n}\n\nexport const Sidebar: SidebarComponent = (props) => {\n const {\n isOpen,\n onClose,\n onOpen,\n hasOverlay = true,\n onClickOutside,\n onEsc,\n position = sidebarPropPositionDefault,\n size = sidebarPropSizeDefault,\n className,\n children,\n container = window.document.body,\n style,\n rootClassName,\n afterClose,\n ...otherProps\n } = props;\n\n const ref = useRef<HTMLDivElement | null>(null);\n\n const portalRef = useRef<HTMLDivElement>(null);\n\n const { theme } = useTheme();\n\n useEffect(() => {\n if (isOpen) {\n onOpen?.();\n } else {\n onClose?.();\n }\n }, [isOpen]);\n\n useGlobalKeys({\n Escape: (e) => isOpen && onEsc && onEsc(e),\n });\n\n return (\n <Transition\n in={isOpen}\n unmountOnExit\n timeout={240}\n nodeRef={portalRef}\n onExiting={afterClose}\n >\n {(animate) => (\n <PortalWithTheme\n preset={theme}\n ref={portalRef}\n container={container}\n className={cnSidebar({ position, hasOverlay }, [rootClassName])}\n style={\n typeof style?.zIndex === 'number'\n ? { zIndex: style.zIndex }\n : undefined\n }\n >\n {hasOverlay && (\n <div\n className={cnSidebar('Overlay', { animate })}\n aria-label=\"Overlay\"\n />\n )}\n <div\n {...otherProps}\n style={{\n ...style,\n zIndex: undefined,\n }}\n className={cnSidebar('Window', { size, position, animate }, [\n className,\n ])}\n ref={ref}\n >\n <PortalWithThemeConsumer\n onClickOutside={onClickOutside}\n ignoreClicksInsideRefs={[ref]}\n >\n {children}\n </PortalWithThemeConsumer>\n </div>\n </PortalWithTheme>\n )}\n </Transition>\n );\n};\n\nSidebar.Content = SidebarContent;\nSidebar.Actions = SidebarActions;\n"],"mappings":"8+BAAA,gCAEA,MAAOA,MAAP,EAAgBC,SAAhB,CAA2BC,MAA3B,KAAyC,OAAzC,CACA,OAASC,UAAT,KAA2B,wBAA3B,CAEA,OACEC,eADF,CAEEC,uBAFF,0BAIA,OAASC,QAAT,sBACA,OAASC,aAAT,iCACA,OAASC,cAAT,+BACA,OAASC,EAAT,uB,GAIMC,oBAAmB,CAAG,CAAC,OAAD,CAAU,QAAV,CAAoB,MAApB,CAA4B,KAA5B,C,CAEtBC,0BAA+C,CAAGD,mBAAmB,CAAC,CAAD,C,CAE3E,MAAO,IAAME,gBAAe,CAAG,CAC7B,GAD6B,CAE7B,GAF6B,CAG7B,GAH6B,CAI7B,MAJ6B,CAK7B,KAL6B,CAM7B,KAN6B,CAO7B,KAP6B,CAQ7B,KAR6B,CAS7B,KAT6B,CAAxB,CAaP,GAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D,CA8BA,MAAO,IAAME,UAAS,CAAGL,EAAE,CAAC,SAAD,CAApB,C,GAEDM,eAA6C,CAAG,eACpDC,EADoD,GACpDA,SADoD,CAEpDC,CAFoD,GAEpDA,QAFoD,CAGjDC,CAHiD,6CAKpD,0CACE,SAAS,CAAEJ,SAAS,CAAC,SAAD,CAAY,CAACE,CAAD,CAAYR,cAAc,EAA1B,CAAZ,CADtB,EAEMU,CAFN,EAIGD,CAJH,CALoD,C,CAahDE,cAA6C,CAAG,eACpDH,EADoD,GACpDA,SADoD,CAEpDC,CAFoD,GAEpDA,QAFoD,CAGjDC,CAHiD,8CAKpD,0CAAK,SAAS,CAAEJ,SAAS,CAAC,SAAD,CAAY,CAACE,CAAD,CAAZ,CAAzB,EAAuDE,CAAvD,EACGD,CADH,CALoD,C,CAiBtD,MAAO,IAAMG,QAAyB,CAAG,SAACC,CAAD,CAAW,IAE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=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/SidebarDeprecated/index.ts"],"sourcesContent":["export * from './SidebarDeprecated';\n"],"mappings":"AAAA"}
@@ -0,0 +1,5 @@
1
+ export type GetItemOnClick<ITEM> = (item: ITEM) => React.EventHandler<React.MouseEvent> | undefined;
2
+ export type OnItemClick<ITEM> = (item: ITEM, props: {
3
+ e: React.MouseEvent;
4
+ }) => void;
5
+ export declare const getItemClick: <ITEM>(item: ITEM, getItemOnClick: GetItemOnClick<ITEM>, onItemClick?: OnItemClick<ITEM>) => React.MouseEventHandler;
@@ -0,0 +1,2 @@
1
+ export var getItemClick=function(a,b,c){return function(d){var e;null===c||void 0===c?void 0:c(a,{e:d}),null===(e=b(a))||void 0===e?void 0:e(d)}};
2
+ //# sourceMappingURL=getItemClick.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getItemClick.js","names":["getItemClick","item","getItemOnClick","onItemClick","e"],"sources":["../../../../src/utils/getItemClick.ts"],"sourcesContent":["export type GetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.EventHandler<React.MouseEvent> | undefined;\nexport type OnItemClick<ITEM> = (\n item: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport const getItemClick =\n <ITEM>(\n item: ITEM,\n getItemOnClick: GetItemOnClick<ITEM>,\n onItemClick?: OnItemClick<ITEM>,\n ): React.MouseEventHandler =>\n (e) => {\n onItemClick?.(item, { e });\n getItemOnClick(item)?.(e);\n };\n"],"mappings":"AAUA,MAAO,IAAMA,aAAY,CACvB,SACEC,CADF,CAEEC,CAFF,CAGEC,CAHF,QAKA,UAACC,CAAD,CAAO,cACLD,CADK,WACLA,CADK,QACLA,CAAW,CAAGF,CAAH,CAAS,CAAEG,CAAC,CAADA,CAAF,CAAT,CADN,WAELF,CAAc,CAACD,CAAD,CAFT,qBAEL,EAAuBG,CAAvB,CACD,CARD,CADK"}
@@ -0,0 +1 @@
1
+ export declare const keys: <T extends Record<string, unknown>>(obj: T) => (keyof T)[];
@@ -0,0 +1,2 @@
1
+ export var keys=function(a){return Object.keys(a)};
2
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","names":["keys","obj","Object"],"sources":["../../../../../src/utils/object/keys.ts"],"sourcesContent":["export const keys = <T extends Record<string, unknown>>(obj: T) =>\n Object.keys(obj) as (keyof T)[];\n"],"mappings":"AAAA,MAAO,IAAMA,KAAI,CAAG,SAAoCC,CAApC,QAClBC,OAAM,CAACF,IAAP,CAAYC,CAAZ,CADkB,CAAb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit",
3
- "version": "5.27.1",
3
+ "version": "5.28.0",
4
4
  "keywords": [
5
5
  "ui-kit",
6
6
  "design-system",