@qoretechnologies/reqore 0.68.1 → 0.68.3

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 (287) hide show
  1. package/dist/components/Bubble/index.d.ts +57 -0
  2. package/dist/components/Bubble/index.d.ts.map +1 -0
  3. package/dist/components/Bubble/index.js +184 -0
  4. package/dist/components/Bubble/index.js.map +1 -0
  5. package/dist/components/DatePicker/index.d.ts.map +1 -1
  6. package/dist/components/DatePicker/index.js +3 -3
  7. package/dist/components/DatePicker/index.js.map +1 -1
  8. package/dist/components/DescriptionList/index.d.ts.map +1 -1
  9. package/dist/components/DescriptionList/index.js +3 -3
  10. package/dist/components/DescriptionList/index.js.map +1 -1
  11. package/dist/components/Drawer/index.js.map +1 -1
  12. package/dist/components/IconPicker/index.d.ts +114 -0
  13. package/dist/components/IconPicker/index.d.ts.map +1 -0
  14. package/dist/components/IconPicker/index.js +223 -0
  15. package/dist/components/IconPicker/index.js.map +1 -0
  16. package/dist/components/Panel/index.d.ts.map +1 -1
  17. package/dist/components/Panel/index.js +10 -2
  18. package/dist/components/Panel/index.js.map +1 -1
  19. package/dist/components/RichTextEditor/index.d.ts +9 -0
  20. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  21. package/dist/components/RichTextEditor/index.js +2 -2
  22. package/dist/components/RichTextEditor/index.js.map +1 -1
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +8 -3
  26. package/dist/index.js.map +1 -1
  27. package/package.json +2 -6
  28. package/tests.json +1 -1
  29. package/dist/esm/components/Accordion/index.js +0 -142
  30. package/dist/esm/components/Accordion/index.js.map +0 -1
  31. package/dist/esm/components/Breadcrumbs/index.js +0 -122
  32. package/dist/esm/components/Breadcrumbs/index.js.map +0 -1
  33. package/dist/esm/components/Breadcrumbs/item.js +0 -14
  34. package/dist/esm/components/Breadcrumbs/item.js.map +0 -1
  35. package/dist/esm/components/Button/index.js +0 -315
  36. package/dist/esm/components/Button/index.js.map +0 -1
  37. package/dist/esm/components/Callout/index.js +0 -142
  38. package/dist/esm/components/Callout/index.js.map +0 -1
  39. package/dist/esm/components/Checkbox/index.js +0 -217
  40. package/dist/esm/components/Checkbox/index.js.map +0 -1
  41. package/dist/esm/components/Collection/index.js +0 -298
  42. package/dist/esm/components/Collection/index.js.map +0 -1
  43. package/dist/esm/components/Collection/item.js +0 -157
  44. package/dist/esm/components/Collection/item.js.map +0 -1
  45. package/dist/esm/components/Columns/column.js +0 -14
  46. package/dist/esm/components/Columns/column.js.map +0 -1
  47. package/dist/esm/components/Columns/index.js +0 -17
  48. package/dist/esm/components/Columns/index.js.map +0 -1
  49. package/dist/esm/components/Comment/index.js +0 -63
  50. package/dist/esm/components/Comment/index.js.map +0 -1
  51. package/dist/esm/components/CommentFeed/index.js +0 -17
  52. package/dist/esm/components/CommentFeed/index.js.map +0 -1
  53. package/dist/esm/components/Content/index.js +0 -16
  54. package/dist/esm/components/Content/index.js.map +0 -1
  55. package/dist/esm/components/Content/wrapper.js +0 -14
  56. package/dist/esm/components/Content/wrapper.js.map +0 -1
  57. package/dist/esm/components/ControlGroup/index.js +0 -351
  58. package/dist/esm/components/ControlGroup/index.js.map +0 -1
  59. package/dist/esm/components/DatePicker/MonthYearDropdowns.js +0 -30
  60. package/dist/esm/components/DatePicker/MonthYearDropdowns.js.map +0 -1
  61. package/dist/esm/components/DatePicker/index.js +0 -244
  62. package/dist/esm/components/DatePicker/index.js.map +0 -1
  63. package/dist/esm/components/DescriptionList/index.js +0 -132
  64. package/dist/esm/components/DescriptionList/index.js.map +0 -1
  65. package/dist/esm/components/Drawer/backdrop.js +0 -34
  66. package/dist/esm/components/Drawer/backdrop.js.map +0 -1
  67. package/dist/esm/components/Drawer/index.js +0 -286
  68. package/dist/esm/components/Drawer/index.js.map +0 -1
  69. package/dist/esm/components/Dropdown/index.js +0 -49
  70. package/dist/esm/components/Dropdown/index.js.map +0 -1
  71. package/dist/esm/components/Dropdown/item.js +0 -12
  72. package/dist/esm/components/Dropdown/item.js.map +0 -1
  73. package/dist/esm/components/Dropdown/list.js +0 -320
  74. package/dist/esm/components/Dropdown/list.js.map +0 -1
  75. package/dist/esm/components/Effect/index.js +0 -349
  76. package/dist/esm/components/Effect/index.js.map +0 -1
  77. package/dist/esm/components/EmptyState/index.js +0 -31
  78. package/dist/esm/components/EmptyState/index.js.map +0 -1
  79. package/dist/esm/components/EntityRow/index.js +0 -134
  80. package/dist/esm/components/EntityRow/index.js.map +0 -1
  81. package/dist/esm/components/ErrorBoundary/index.js +0 -57
  82. package/dist/esm/components/ErrorBoundary/index.js.map +0 -1
  83. package/dist/esm/components/ExportModal/index.js +0 -60
  84. package/dist/esm/components/ExportModal/index.js.map +0 -1
  85. package/dist/esm/components/FeatureCard/index.js +0 -139
  86. package/dist/esm/components/FeatureCard/index.js.map +0 -1
  87. package/dist/esm/components/GlobalModalsWrapper/index.js +0 -27
  88. package/dist/esm/components/GlobalModalsWrapper/index.js.map +0 -1
  89. package/dist/esm/components/Header/index.js +0 -55
  90. package/dist/esm/components/Header/index.js.map +0 -1
  91. package/dist/esm/components/Icon/index.js +0 -130
  92. package/dist/esm/components/Icon/index.js.map +0 -1
  93. package/dist/esm/components/Input/index.js +0 -136
  94. package/dist/esm/components/Input/index.js.map +0 -1
  95. package/dist/esm/components/InputClearButton/index.js +0 -32
  96. package/dist/esm/components/InputClearButton/index.js.map +0 -1
  97. package/dist/esm/components/InternalPopover/index.js +0 -244
  98. package/dist/esm/components/InternalPopover/index.js.map +0 -1
  99. package/dist/esm/components/KeyValueTable/index.js +0 -81
  100. package/dist/esm/components/KeyValueTable/index.js.map +0 -1
  101. package/dist/esm/components/Label/index.js +0 -7
  102. package/dist/esm/components/Label/index.js.map +0 -1
  103. package/dist/esm/components/Layout/content.js +0 -12
  104. package/dist/esm/components/Layout/content.js.map +0 -1
  105. package/dist/esm/components/Layout/index.js +0 -28
  106. package/dist/esm/components/Layout/index.js.map +0 -1
  107. package/dist/esm/components/Menu/divider.js +0 -41
  108. package/dist/esm/components/Menu/divider.js.map +0 -1
  109. package/dist/esm/components/Menu/index.js +0 -67
  110. package/dist/esm/components/Menu/index.js.map +0 -1
  111. package/dist/esm/components/Menu/item.js +0 -33
  112. package/dist/esm/components/Menu/item.js.map +0 -1
  113. package/dist/esm/components/Menu/section.js +0 -28
  114. package/dist/esm/components/Menu/section.js.map +0 -1
  115. package/dist/esm/components/Message/index.js +0 -52
  116. package/dist/esm/components/Message/index.js.map +0 -1
  117. package/dist/esm/components/Modal/index.js +0 -40
  118. package/dist/esm/components/Modal/index.js.map +0 -1
  119. package/dist/esm/components/MultiSelect/index.js +0 -146
  120. package/dist/esm/components/MultiSelect/index.js.map +0 -1
  121. package/dist/esm/components/Navbar/divider.js +0 -24
  122. package/dist/esm/components/Navbar/divider.js.map +0 -1
  123. package/dist/esm/components/Navbar/group.js +0 -27
  124. package/dist/esm/components/Navbar/group.js.map +0 -1
  125. package/dist/esm/components/Navbar/index.js +0 -39
  126. package/dist/esm/components/Navbar/index.js.map +0 -1
  127. package/dist/esm/components/Navbar/item.js +0 -51
  128. package/dist/esm/components/Navbar/item.js.map +0 -1
  129. package/dist/esm/components/Notifications/index.js +0 -28
  130. package/dist/esm/components/Notifications/index.js.map +0 -1
  131. package/dist/esm/components/Notifications/notification.js +0 -225
  132. package/dist/esm/components/Notifications/notification.js.map +0 -1
  133. package/dist/esm/components/Paging/index.js +0 -116
  134. package/dist/esm/components/Paging/index.js.map +0 -1
  135. package/dist/esm/components/Panel/LabelEditor.js +0 -33
  136. package/dist/esm/components/Panel/LabelEditor.js.map +0 -1
  137. package/dist/esm/components/Panel/NonResponsiveActions.js +0 -18
  138. package/dist/esm/components/Panel/NonResponsiveActions.js.map +0 -1
  139. package/dist/esm/components/Panel/index.js +0 -564
  140. package/dist/esm/components/Panel/index.js.map +0 -1
  141. package/dist/esm/components/Panel/panel.screenshot.js +0 -15
  142. package/dist/esm/components/Panel/panel.screenshot.js.map +0 -1
  143. package/dist/esm/components/Paragraph/index.js +0 -19
  144. package/dist/esm/components/Paragraph/index.js.map +0 -1
  145. package/dist/esm/components/Popover/index.js +0 -267
  146. package/dist/esm/components/Popover/index.js.map +0 -1
  147. package/dist/esm/components/Progress/index.js +0 -188
  148. package/dist/esm/components/Progress/index.js.map +0 -1
  149. package/dist/esm/components/RadioGroup/index.js +0 -9
  150. package/dist/esm/components/RadioGroup/index.js.map +0 -1
  151. package/dist/esm/components/Rating/index.js +0 -165
  152. package/dist/esm/components/Rating/index.js.map +0 -1
  153. package/dist/esm/components/RichTextEditor/index.js +0 -299
  154. package/dist/esm/components/RichTextEditor/index.js.map +0 -1
  155. package/dist/esm/components/SegmentedControl/index.js +0 -291
  156. package/dist/esm/components/SegmentedControl/index.js.map +0 -1
  157. package/dist/esm/components/SeverityRow/index.js +0 -106
  158. package/dist/esm/components/SeverityRow/index.js.map +0 -1
  159. package/dist/esm/components/Skeleton/index.js +0 -28
  160. package/dist/esm/components/Skeleton/index.js.map +0 -1
  161. package/dist/esm/components/Slider/index.js +0 -176
  162. package/dist/esm/components/Slider/index.js.map +0 -1
  163. package/dist/esm/components/Spacer/index.js +0 -96
  164. package/dist/esm/components/Spacer/index.js.map +0 -1
  165. package/dist/esm/components/Span/index.js +0 -18
  166. package/dist/esm/components/Span/index.js.map +0 -1
  167. package/dist/esm/components/Spinner/index.js +0 -14
  168. package/dist/esm/components/Spinner/index.js.map +0 -1
  169. package/dist/esm/components/Statistic/index.js +0 -166
  170. package/dist/esm/components/Statistic/index.js.map +0 -1
  171. package/dist/esm/components/Table/body.js +0 -72
  172. package/dist/esm/components/Table/body.js.map +0 -1
  173. package/dist/esm/components/Table/cell.js +0 -214
  174. package/dist/esm/components/Table/cell.js.map +0 -1
  175. package/dist/esm/components/Table/header.js +0 -158
  176. package/dist/esm/components/Table/header.js.map +0 -1
  177. package/dist/esm/components/Table/headerCell.js +0 -233
  178. package/dist/esm/components/Table/headerCell.js.map +0 -1
  179. package/dist/esm/components/Table/helpers.js +0 -285
  180. package/dist/esm/components/Table/helpers.js.map +0 -1
  181. package/dist/esm/components/Table/index.js +0 -472
  182. package/dist/esm/components/Table/index.js.map +0 -1
  183. package/dist/esm/components/Table/row.js +0 -176
  184. package/dist/esm/components/Table/row.js.map +0 -1
  185. package/dist/esm/components/Table/value.js +0 -19
  186. package/dist/esm/components/Table/value.js.map +0 -1
  187. package/dist/esm/components/Tabs/content.js +0 -23
  188. package/dist/esm/components/Tabs/content.js.map +0 -1
  189. package/dist/esm/components/Tabs/index.js +0 -44
  190. package/dist/esm/components/Tabs/index.js.map +0 -1
  191. package/dist/esm/components/Tabs/item.js +0 -122
  192. package/dist/esm/components/Tabs/item.js.map +0 -1
  193. package/dist/esm/components/Tabs/list.js +0 -208
  194. package/dist/esm/components/Tabs/list.js.map +0 -1
  195. package/dist/esm/components/Tag/group.js +0 -38
  196. package/dist/esm/components/Tag/group.js.map +0 -1
  197. package/dist/esm/components/Tag/index.js +0 -267
  198. package/dist/esm/components/Tag/index.js.map +0 -1
  199. package/dist/esm/components/Testimonial/index.js +0 -108
  200. package/dist/esm/components/Testimonial/index.js.map +0 -1
  201. package/dist/esm/components/Textarea/index.js +0 -135
  202. package/dist/esm/components/Textarea/index.js.map +0 -1
  203. package/dist/esm/components/Tier/index.js +0 -48
  204. package/dist/esm/components/Tier/index.js.map +0 -1
  205. package/dist/esm/components/TimeAgo/index.js +0 -19
  206. package/dist/esm/components/TimeAgo/index.js.map +0 -1
  207. package/dist/esm/components/Timeline/index.js +0 -271
  208. package/dist/esm/components/Timeline/index.js.map +0 -1
  209. package/dist/esm/components/TooltipComponent/index.js +0 -11
  210. package/dist/esm/components/TooltipComponent/index.js.map +0 -1
  211. package/dist/esm/components/Tree/index.js +0 -266
  212. package/dist/esm/components/Tree/index.js.map +0 -1
  213. package/dist/esm/components/Tree/modal.js +0 -30
  214. package/dist/esm/components/Tree/modal.js.map +0 -1
  215. package/dist/esm/constants/animations.js +0 -9
  216. package/dist/esm/constants/animations.js.map +0 -1
  217. package/dist/esm/constants/colors.js +0 -13
  218. package/dist/esm/constants/colors.js.map +0 -1
  219. package/dist/esm/constants/paging.js +0 -48
  220. package/dist/esm/constants/paging.js.map +0 -1
  221. package/dist/esm/constants/sizes.js +0 -363
  222. package/dist/esm/constants/sizes.js.map +0 -1
  223. package/dist/esm/constants/theme.js +0 -40
  224. package/dist/esm/constants/theme.js.map +0 -1
  225. package/dist/esm/containers/Paging.js +0 -29
  226. package/dist/esm/containers/Paging.js.map +0 -1
  227. package/dist/esm/containers/ReqoreProvider.js +0 -239
  228. package/dist/esm/containers/ReqoreProvider.js.map +0 -1
  229. package/dist/esm/containers/ThemeProvider.js +0 -11
  230. package/dist/esm/containers/ThemeProvider.js.map +0 -1
  231. package/dist/esm/containers/UIProvider.js +0 -53
  232. package/dist/esm/containers/UIProvider.js.map +0 -1
  233. package/dist/esm/context/CustomThemeContext.js +0 -4
  234. package/dist/esm/context/CustomThemeContext.js.map +0 -1
  235. package/dist/esm/context/ReqoreContext.js +0 -22
  236. package/dist/esm/context/ReqoreContext.js.map +0 -1
  237. package/dist/esm/context/ThemeContext.js +0 -4
  238. package/dist/esm/context/ThemeContext.js.map +0 -1
  239. package/dist/esm/helpers/animations.js +0 -13
  240. package/dist/esm/helpers/animations.js.map +0 -1
  241. package/dist/esm/helpers/colors.js +0 -240
  242. package/dist/esm/helpers/colors.js.map +0 -1
  243. package/dist/esm/helpers/dates.js +0 -52
  244. package/dist/esm/helpers/dates.js.map +0 -1
  245. package/dist/esm/helpers/time.js +0 -21
  246. package/dist/esm/helpers/time.js.map +0 -1
  247. package/dist/esm/helpers/utils.js +0 -174
  248. package/dist/esm/helpers/utils.js.map +0 -1
  249. package/dist/esm/hooks/useAutoFocus.js +0 -76
  250. package/dist/esm/hooks/useAutoFocus.js.map +0 -1
  251. package/dist/esm/hooks/useCloneThroughFragments.js +0 -26
  252. package/dist/esm/hooks/useCloneThroughFragments.js.map +0 -1
  253. package/dist/esm/hooks/useCombinedRefs.js +0 -25
  254. package/dist/esm/hooks/useCombinedRefs.js.map +0 -1
  255. package/dist/esm/hooks/useComponentTooltip.js +0 -28
  256. package/dist/esm/hooks/useComponentTooltip.js.map +0 -1
  257. package/dist/esm/hooks/useFocusTrap.js +0 -115
  258. package/dist/esm/hooks/useFocusTrap.js.map +0 -1
  259. package/dist/esm/hooks/useLatestZIndex.js +0 -10
  260. package/dist/esm/hooks/useLatestZIndex.js.map +0 -1
  261. package/dist/esm/hooks/useOutsideClick.js +0 -17
  262. package/dist/esm/hooks/useOutsideClick.js.map +0 -1
  263. package/dist/esm/hooks/usePaging.js +0 -92
  264. package/dist/esm/hooks/usePaging.js.map +0 -1
  265. package/dist/esm/hooks/useQueryWithDelay.js +0 -19
  266. package/dist/esm/hooks/useQueryWithDelay.js.map +0 -1
  267. package/dist/esm/hooks/useReqore.js +0 -10
  268. package/dist/esm/hooks/useReqore.js.map +0 -1
  269. package/dist/esm/hooks/useReqoreContext.js +0 -12
  270. package/dist/esm/hooks/useReqoreContext.js.map +0 -1
  271. package/dist/esm/hooks/useReqoreEffect.js +0 -21
  272. package/dist/esm/hooks/useReqoreEffect.js.map +0 -1
  273. package/dist/esm/hooks/useTextareaAutoSize.js +0 -16
  274. package/dist/esm/hooks/useTextareaAutoSize.js.map +0 -1
  275. package/dist/esm/hooks/useTheme.js +0 -39
  276. package/dist/esm/hooks/useTheme.js.map +0 -1
  277. package/dist/esm/hooks/useWhyDidYouUpdate.js +0 -32
  278. package/dist/esm/hooks/useWhyDidYouUpdate.js.map +0 -1
  279. package/dist/esm/index.js +0 -92
  280. package/dist/esm/index.js.map +0 -1
  281. package/dist/esm/styles.js +0 -122
  282. package/dist/esm/styles.js.map +0 -1
  283. package/dist/esm/types/global.js +0 -2
  284. package/dist/esm/types/global.js.map +0 -1
  285. package/dist/esm/types/icons.js +0 -2
  286. package/dist/esm/types/icons.js.map +0 -1
  287. package/tsconfig.esm.json +0 -11
@@ -1,363 +0,0 @@
1
- export const ReqoreSizes = {
2
- MICRO: 'micro',
3
- TINY: 'tiny',
4
- SMALL: 'small',
5
- NORMAL: 'normal',
6
- BIG: 'big',
7
- HUGE: 'huge',
8
- MASSIVE: 'massive',
9
- };
10
- export const SIZES = ['micro', 'tiny', 'small', 'normal', 'big', 'huge', 'massive'];
11
- export const SIZE_TO_MODIFIER = {
12
- micro: 0.6,
13
- tiny: 0.7,
14
- small: 0.9,
15
- normal: 1,
16
- big: 1.1,
17
- huge: 1.2,
18
- massive: 1.4,
19
- };
20
- export const LINE_SIZE_TO_NUMBER = {
21
- none: 0,
22
- micro: 0.5,
23
- tiny: 1,
24
- small: 1,
25
- normal: 1.5,
26
- big: 2,
27
- huge: 3,
28
- massive: 4,
29
- };
30
- export const SIZE_TO_NUMBER = {
31
- none: 0,
32
- micro: 1,
33
- tiny: 2,
34
- small: 3,
35
- normal: 4,
36
- big: 5,
37
- huge: 6,
38
- massive: 7,
39
- };
40
- export const NUMBER_TO_SIZE = {
41
- 1: 'micro',
42
- 2: 'tiny',
43
- 3: 'small',
44
- 4: 'normal',
45
- 5: 'big',
46
- 6: 'huge',
47
- 7: 'massive',
48
- };
49
- export const HEADER_SIZE_TO_NUMBER = {
50
- micro: 6,
51
- tiny: 5,
52
- small: 4,
53
- normal: 3,
54
- big: 2,
55
- huge: 1,
56
- massive: 1,
57
- };
58
- export const SWITCH_SIZE_TO_PX = {
59
- micro: 16,
60
- tiny: 20,
61
- small: 26,
62
- normal: 32,
63
- big: 38,
64
- huge: 48,
65
- massive: 56,
66
- };
67
- export const SIZE_TO_PX = {
68
- micro: 22,
69
- tiny: 26,
70
- small: 32,
71
- normal: 38,
72
- big: 48,
73
- huge: 58,
74
- massive: 68,
75
- };
76
- export const TAG_SIZE_TO_PX = {
77
- micro: 10,
78
- tiny: 14,
79
- small: 20,
80
- normal: 26,
81
- big: 42,
82
- huge: 52,
83
- massive: 62,
84
- };
85
- export const BADGE_SIZE_TO_PX = {
86
- micro: 14,
87
- tiny: 17,
88
- small: 20,
89
- normal: 26,
90
- big: 32,
91
- huge: 38,
92
- massive: 44,
93
- };
94
- export const TABS_SIZE_TO_PX = {
95
- micro: 16,
96
- tiny: 20,
97
- small: 30,
98
- normal: 40,
99
- big: 50,
100
- huge: 60,
101
- massive: 70,
102
- };
103
- export const TABLE_SIZE_TO_PX = SIZE_TO_PX;
104
- export const TABS_PADDING_TO_PX = {
105
- micro: 5,
106
- tiny: 5,
107
- small: 5,
108
- normal: 5,
109
- big: 5,
110
- huge: 5,
111
- massive: 5,
112
- };
113
- export const TAG_HORIZONTAL_PADDING_FROM_SIZE = {
114
- micro: 2,
115
- tiny: 3,
116
- small: 5,
117
- normal: 6,
118
- big: 9,
119
- huge: 13,
120
- massive: 17,
121
- };
122
- export const MARGIN_FROM_SIZE = {
123
- micro: 0,
124
- tiny: 0,
125
- small: 0,
126
- normal: 10,
127
- big: 20,
128
- huge: 30,
129
- massive: 40,
130
- };
131
- export const TEXT_FROM_SIZE = {
132
- micro: 7,
133
- tiny: 9,
134
- small: 12,
135
- normal: 15,
136
- big: 18,
137
- huge: 21,
138
- massive: 24,
139
- };
140
- export const CONTROL_TEXT_FROM_SIZE = {
141
- micro: 7,
142
- tiny: 9,
143
- small: 12,
144
- normal: 14,
145
- big: 17,
146
- huge: 20,
147
- massive: 23,
148
- };
149
- export const TAG_TEXT_FROM_SIZE = {
150
- micro: 8,
151
- tiny: 10,
152
- small: 13,
153
- normal: 15,
154
- big: 18,
155
- huge: 21,
156
- massive: 24,
157
- };
158
- export const TAG_ICON_FROM_SIZE = {
159
- micro: 10,
160
- tiny: 12,
161
- small: 14,
162
- normal: 16,
163
- big: 19,
164
- huge: 22,
165
- massive: 25,
166
- };
167
- export const ICON_FROM_SIZE = {
168
- micro: 10,
169
- tiny: 13,
170
- small: 17,
171
- normal: 20,
172
- big: 26,
173
- huge: 33,
174
- massive: 40,
175
- };
176
- export const HALF_PADDING_FROM_SIZE = {
177
- micro: 1.5,
178
- tiny: 2,
179
- small: 3,
180
- normal: 4,
181
- big: 5.5,
182
- huge: 7,
183
- massive: 8.5,
184
- };
185
- export const PADDING_FROM_SIZE = {
186
- micro: 3,
187
- tiny: 4,
188
- small: 6,
189
- normal: 8,
190
- big: 11,
191
- huge: 14,
192
- massive: 17,
193
- };
194
- export const SPECIAL_PADDING_FROM_SIZE = {
195
- micro: 3,
196
- tiny: 4,
197
- small: 6,
198
- normal: 8,
199
- big: 15,
200
- huge: 28,
201
- massive: 40,
202
- };
203
- export const TEXTAREA_PADDING_FROM_SIZE = {
204
- micro: 1.5,
205
- tiny: 2,
206
- small: 5.5,
207
- normal: 6,
208
- big: 9,
209
- huge: 12,
210
- massive: 15,
211
- };
212
- export const CONTROL_HORIZONTAL_PADDING_FROM_SIZE = {
213
- micro: 7,
214
- tiny: 9,
215
- small: 12,
216
- normal: 14,
217
- big: 17,
218
- huge: 21,
219
- massive: 25,
220
- };
221
- export const CONTROL_VERTICAL_PADDING_FROM_SIZE = {
222
- micro: 4,
223
- tiny: 5,
224
- small: 6,
225
- normal: 8,
226
- big: 11,
227
- huge: 14,
228
- massive: 17,
229
- };
230
- export const CONTROL_VERTICAL_PADDING_MODIFIER_FROM_SIZE = {
231
- micro: -5,
232
- tiny: -4,
233
- small: -2,
234
- normal: 0,
235
- big: 3,
236
- huge: 6,
237
- massive: 9,
238
- };
239
- export const RADIUS_FROM_SIZE = {
240
- micro: 3,
241
- tiny: 4,
242
- small: 4,
243
- normal: 5,
244
- big: 6,
245
- huge: 8,
246
- massive: 10,
247
- };
248
- /**
249
- * Scale used when a component receives an explicit `radiusSize` prop.
250
- * Decoupled from `RADIUS_FROM_SIZE` so consumers can opt into a more
251
- * pronounced corner curve (marketing surfaces, hero cards, …) without
252
- * changing the default look of every Reqore component.
253
- */
254
- export const RADIUS_FROM_RADIUS_SIZE = {
255
- micro: 3,
256
- tiny: 5,
257
- small: 8,
258
- normal: 12,
259
- big: 18,
260
- huge: 26,
261
- massive: 36,
262
- };
263
- /**
264
- * Resolve the border-radius pixel value for a component.
265
- * - When `radiusSize` is set, picks from the pronounced `radiusScale`.
266
- * - Otherwise falls back to the default `sizeScale[size]`.
267
- *
268
- * Most components use `RADIUS_FROM_SIZE` + `RADIUS_FROM_RADIUS_SIZE`, but
269
- * Tag/Badge ship their own scales (`TAG_RADIUS_FROM_*`, `BADGE_RADIUS_FROM_*`)
270
- * and pass those in instead.
271
- */
272
- export const resolveRadius = (size, radiusSize, sizeScale = RADIUS_FROM_SIZE, radiusScale = RADIUS_FROM_RADIUS_SIZE) => (radiusSize ? radiusScale[radiusSize] : sizeScale[size]);
273
- export const TAG_RADIUS_FROM_SIZE = {
274
- micro: 1,
275
- tiny: 2,
276
- small: 3,
277
- normal: 5,
278
- big: 7,
279
- huge: 9,
280
- massive: 11,
281
- };
282
- /** More pronounced radius for `radiusSize`-driven tag corners. */
283
- export const TAG_RADIUS_FROM_RADIUS_SIZE = {
284
- micro: 2,
285
- tiny: 4,
286
- small: 6,
287
- normal: 9,
288
- big: 14,
289
- huge: 20,
290
- massive: 28,
291
- };
292
- export const BADGE_RADIUS_FROM_SIZE = {
293
- micro: 5,
294
- tiny: 6,
295
- small: 7,
296
- normal: 9,
297
- big: 11,
298
- huge: 13,
299
- massive: 15,
300
- };
301
- /** More pronounced radius for `radiusSize`-driven badge corners. */
302
- export const BADGE_RADIUS_FROM_RADIUS_SIZE = {
303
- micro: 6,
304
- tiny: 8,
305
- small: 12,
306
- normal: 16,
307
- big: 20,
308
- huge: 26,
309
- massive: 32,
310
- };
311
- export const GAP_FROM_SIZE = {
312
- micro: 0.5,
313
- tiny: 1,
314
- small: 3,
315
- normal: 5,
316
- big: 18,
317
- huge: 30,
318
- massive: 42,
319
- };
320
- export const RATING_GAP_FROM_SIZE = {
321
- micro: 0.5,
322
- tiny: 1,
323
- small: 3,
324
- normal: 5,
325
- big: 7,
326
- huge: 9,
327
- massive: 12,
328
- };
329
- export const ICON_FROM_HEADER_SIZE = {
330
- 1: 23,
331
- 2: 20,
332
- 3: 17,
333
- 4: 14,
334
- 5: 11,
335
- 6: 8,
336
- };
337
- export const ICON_WRAPPER_FROM_HEADER_SIZE = {
338
- massive: 38,
339
- huge: 34,
340
- big: 26,
341
- normal: 19,
342
- small: 17,
343
- tiny: 15,
344
- micro: 13,
345
- };
346
- export const WEIGHT_TO_NUMBER = {
347
- thin: 100,
348
- light: 250,
349
- normal: 400,
350
- bold: 500,
351
- thick: 600,
352
- };
353
- export const PILL_RADIUS_MODIFIER = 3.5;
354
- export const PROGRESS_HEIGHT_FROM_SIZE = {
355
- micro: 2,
356
- tiny: 3,
357
- small: 4,
358
- normal: 6,
359
- big: 8,
360
- huge: 10,
361
- massive: 14,
362
- };
363
- //# sourceMappingURL=sizes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sizes.js","sourceRoot":"","sources":["../../../src/constants/sizes.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAE7F,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,GAAG;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,CAAC;IACP,KAAK,EAA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E,EAAE;IACT,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,EAAE;CACZ,CAAC"}
@@ -1,40 +0,0 @@
1
- import { Colors } from './colors';
2
- export const DEFAULT_INTENTS = {
3
- info: Colors.BLUE,
4
- success: Colors.GREEN,
5
- pending: Colors.YELLOW,
6
- warning: Colors.ORANGE,
7
- danger: Colors.RED,
8
- muted: Colors.GRAY,
9
- black: Colors.DARK,
10
- white: Colors.LIGHT,
11
- custom1: Colors.GRAY,
12
- custom2: Colors.GRAY,
13
- custom3: Colors.GRAY,
14
- custom4: Colors.GRAY,
15
- custom5: Colors.GRAY,
16
- };
17
- export const DEFAULT_THEME = {
18
- main: Colors.DARK_THEME,
19
- text: {
20
- dim: true,
21
- },
22
- intents: DEFAULT_INTENTS,
23
- notifications: {},
24
- };
25
- export const ReqoreIntents = {
26
- INFO: 'info',
27
- SUCCESS: 'success',
28
- PENDING: 'pending',
29
- WARNING: 'warning',
30
- DANGER: 'danger',
31
- MUTED: 'muted',
32
- BLACK: 'black',
33
- WHITE: 'white',
34
- CUSTOM1: 'custom1',
35
- CUSTOM2: 'custom2',
36
- CUSTOM3: 'custom3',
37
- CUSTOM4: 'custom4',
38
- CUSTOM5: 'custom5',
39
- };
40
- //# sourceMappingURL=theme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/constants/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAiGlC,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC7C,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,OAAO,EAAE,MAAM,CAAC,KAAK;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,MAAM,EAAE,MAAM,CAAC,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,KAAK,EAAE,MAAM,CAAC,KAAK;IAEnB,OAAO,EAAE,MAAM,CAAC,IAAI;IACpB,OAAO,EAAE,MAAM,CAAC,IAAI;IACpB,OAAO,EAAE,MAAM,CAAC,IAAI;IACpB,OAAO,EAAE,MAAM,CAAC,IAAI;IACpB,OAAO,EAAE,MAAM,CAAC,IAAI;CACrB,CAAC;AAIF,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,IAAI,EAAE,MAAM,CAAC,UAAU;IACvB,IAAI,EAAE;QACJ,GAAG,EAAE,IAAI;KACV;IACD,OAAO,EAAE,eAAe;IACxB,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAqC;IAC7D,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACnB,CAAC"}
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo, useMemo } from 'react';
3
- import { ReqorePagination, } from '../components/Paging';
4
- import { ReqoreVerticalSpacer } from '../components/Spacer';
5
- import { getPaginationOptionsFromType, } from '../constants/paging';
6
- import { PADDING_FROM_SIZE } from '../constants/sizes';
7
- import { useReqorePaging } from '../hooks/usePaging';
8
- function PagingControls({ withSpacer, position, pagingData, componentOptions, scrollContainer, size, ...pagingProps }) {
9
- return pagingData.renderControls ? (_jsxs(_Fragment, { children: [withSpacer && position === 'bottom' ? (_jsx(ReqoreVerticalSpacer, { height: PADDING_FROM_SIZE[size] })) : null, _jsx(ReqorePagination, { size: size, ...pagingData, ...componentOptions, scrollContainer: scrollContainer, ...pagingProps }, `reqore-pagination-${position}`), withSpacer && position === 'top' ? (_jsx(ReqoreVerticalSpacer, { height: PADDING_FROM_SIZE[size] })) : null] })) : null;
10
- }
11
- function PagingContainer({ type, items, scrollContainer, children, size = 'normal', }) {
12
- const { pagingOptions = {}, componentOptions = {}, pageControlsPosition = 'bottom', includeTopControls = true, includeBottomControls = true, } = useMemo(() => getPaginationOptionsFromType(type), [type]);
13
- const { items: finalItems, applyPaging, ...pagingData } = useReqorePaging({
14
- items,
15
- ...pagingOptions,
16
- enabled: !!type,
17
- });
18
- return (_jsxs(_Fragment, { children: [includeTopControls && (pageControlsPosition === 'top' || pageControlsPosition === 'both') ? (_jsx(PagingControls, { position: 'top', withSpacer: true, scrollContainer: scrollContainer, size: size, pagingData: pagingData, pagingOptions: pagingOptions, componentOptions: componentOptions, autoLoadMore: false, scrollOnLoadMore: false }, 'top-paging')) : null, children(finalItems, _jsx(PagingControls, { scrollContainer: scrollContainer, size: size, pagingData: pagingData, pagingOptions: pagingOptions, componentOptions: componentOptions }, 'custom-paging'), {
19
- pagingOptions,
20
- applyPaging,
21
- componentOptions,
22
- pageControlsPosition,
23
- includeTopControls,
24
- includeBottomControls,
25
- }), includeBottomControls &&
26
- (pageControlsPosition === 'bottom' || pageControlsPosition === 'both') ? (_jsx(PagingControls, { position: 'bottom', withSpacer: true, scrollContainer: scrollContainer, size: size, pagingData: pagingData, pagingOptions: pagingOptions, componentOptions: componentOptions }, 'bottom-paging')) : null] }));
27
- }
28
- export const ReqorePaginationContainer = memo(PagingContainer);
29
- //# sourceMappingURL=Paging.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Paging.js","sourceRoot":"","sources":["../../../src/containers/Paging.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAGL,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,4BAA4B,GAG7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAU,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAuB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAc1E,SAAS,cAAc,CAAI,EACzB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,IAAI,EACJ,GAAG,WAAW,EAMb;IACD,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CACjC,8BACG,UAAU,IAAI,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CACrC,KAAC,oBAAoB,IAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,CAAC,GAAI,CAC1D,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,gBAAgB,IAEf,IAAI,EAAE,IAAI,KACN,UAAU,KACV,gBAAgB,EACpB,eAAe,EAAE,eAAe,KAC5B,WAAW,IALV,qBAAqB,QAAQ,EAAE,CAMpC,EACD,UAAU,IAAI,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,CAClC,KAAC,oBAAoB,IAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,CAAC,GAAI,CAC1D,CAAC,CAAC,CAA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AAkB;gBAClB,qBAAqB;aACtB,CACF,EAEA,qBAAqB;gBACtB,CAAC,oBAAoB,KAAK,QAAQ,IAAI,oBAAoB,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CACvE,KAAC,cAAc,IAEb,QAAQ,EAAC,QAAQ,EACjB,UAAU,QACV,eAAe,EAAE,eAAe,EAChC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,IAP9B,eAAe,CAQnB,CACH,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,eAAe,CAA2B,CAAC"}
@@ -1,239 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { createElement as _createElement } from "react";
3
- import { last, size } from 'lodash';
4
- import { nanoid } from 'nanoid';
5
- import { memo, useCallback, useMemo, useRef, useState } from 'react';
6
- import { useMedia } from 'react-use';
7
- import { useContext } from 'use-context-selector';
8
- import { create } from 'zustand';
9
- import { ReqoreModal, ReqoreTextEffect } from '..';
10
- import ReqoreNotificationsWrapper from '../components/Notifications';
11
- import ReqoreNotification from '../components/Notifications/notification';
12
- import ReqoreContext from '../context/ReqoreContext';
13
- import ThemeContext from '../context/ThemeContext';
14
- const DEFAULT_ERROR_BOUNDARY_OPTIONS = {
15
- errorMessage: 'There was an error rendering this component. You can try resetting or refreshing the page.',
16
- };
17
- const DEFAULT_TOOLTIP_OPTIONS = { delay: 0 };
18
- const NOTIFICATION_POSITIONS = [
19
- 'TOP',
20
- 'BOTTOM',
21
- 'TOP LEFT',
22
- 'TOP RIGHT',
23
- 'BOTTOM LEFT',
24
- 'BOTTOM RIGHT',
25
- ];
26
- export const modalStore = create((set) => ({
27
- modals: {},
28
- addModal: (modal, id = nanoid(), options) => {
29
- set((cur) => ({
30
- modals: {
31
- ...cur.modals,
32
- [id]: {
33
- modal,
34
- options: {
35
- closable: options?.closable ?? true,
36
- },
37
- },
38
- },
39
- }));
40
- return id;
41
- },
42
- removeModal: (id) => set((cur) => {
43
- const newModals = { ...cur.modals };
44
- delete newModals[id];
45
- return {
46
- modals: newModals,
47
- };
48
- }),
49
- }));
50
- const ReqoreProvider = memo(({ children, options = {} }) => {
51
- const [notifications, setNotifications] = useState([]);
52
- const { addModal, removeModal } = modalStore();
53
- const [escClosableModals, setEscClosableModals] = useState([]);
54
- const [confirmationModal, setConfirmationModal] = useState({});
55
- const theme = useContext(ThemeContext);
56
- const latestZIndex = useRef(9000);
57
- const isMobile = process.env.NODE_ENV === 'test' ? false : useMedia('(max-width: 480px)');
58
- const isTablet = process.env.NODE_ENV === 'test'
59
- ? false
60
- : useMedia('(min-width: 480px) and (max-width: 1200px)');
61
- const isMobileOrTablet = isMobile || isTablet;
62
- const getAndIncreaseZIndex = useCallback(() => {
63
- latestZIndex.current += 1;
64
- return latestZIndex.current;
65
- }, []);
66
- const confirmAction = useCallback((data) => {
67
- setConfirmationModal({
68
- ...data,
69
- isOpen: true,
70
- });
71
- }, []);
72
- // FUnction that closes the confirmation modal
73
- const closeConfirmationModal = useCallback(() => {
74
- setConfirmationModal((cur) => ({
75
- ...cur,
76
- isOpen: false,
77
- }));
78
- }, []);
79
- const addEscClosableModal = useCallback((id) => {
80
- setEscClosableModals((cur) => [...cur, id]);
81
- }, []);
82
- const removeEscClosableModal = useCallback((id, onRemove, confirmOnClose) => {
83
- const onConfirm = (cur) => {
84
- onRemove?.();
85
- return [...cur].filter((modalId) => modalId !== id);
86
- };
87
- if (confirmOnClose) {
88
- confirmAction({
89
- ...(typeof confirmOnClose === 'object' ? confirmOnClose : {}),
90
- onConfirm: () => {
91
- setEscClosableModals((cur) => onConfirm(cur));
92
- },
93
- });
94
- return;
95
- }
96
- setEscClosableModals((cur) => {
97
- // Check if the modal is still in the array and it's the last one
98
- if (last(cur) === id) {
99
- return onConfirm(cur);
100
- }
101
- return cur;
102
- });
103
- }, [confirmAction]);
104
- const addNotification = useCallback((data) => {
105
- setNotifications((cur) => {
106
- let newNotifications = [...cur];
107
- const id = data.id || nanoid();
108
- const fixedData = {
109
- position: 'TOP',
110
- ...data,
111
- };
112
- const index = cur.findIndex((notification) => notification.id === id);
113
- if (index >= 0) {
114
- newNotifications[index] = fixedData;
115
- }
116
- else {
117
- newNotifications = [...newNotifications, { ...fixedData, id }];
118
- }
119
- // If the length of the array is larger than 5, remove the first oldest notification
120
- if (newNotifications.length > 5) {
121
- newNotifications.shift();
122
- }
123
- return newNotifications;
124
- });
125
- }, []);
126
- const removeNotification = (id) => {
127
- setNotifications((cur) => {
128
- return [...cur].filter((notification) => notification.id !== id);
129
- });
130
- };
131
- const getNotificationsByPosition = useCallback((position) => {
132
- return notifications?.filter((notification) => notification.position === position) || [];
133
- }, [notifications]);
134
- const notificationsByPosition = useMemo(() => {
135
- const notificationsByPosition = {};
136
- NOTIFICATION_POSITIONS.forEach((position) => {
137
- notificationsByPosition[position] = getNotificationsByPosition(position);
138
- });
139
- return notificationsByPosition;
140
- }, [notifications, getNotificationsByPosition]);
141
- const resolvedOptions = useMemo(() => ({
142
- animations: {
143
- buttons: true,
144
- dialogs: true,
145
- popovers: true,
146
- ...(options?.animations || {}),
147
- },
148
- tooltips: options?.tooltips ?? DEFAULT_TOOLTIP_OPTIONS,
149
- closePopoversOnEscPress: options && 'closePopoversOnEscPress' in options ? options.closePopoversOnEscPress : true,
150
- closeModalsOnEscPress: options && 'closeModalsOnEscPress' in options ? options.closeModalsOnEscPress : true,
151
- customPortalId: options?.customPortalId,
152
- uiScale: options?.uiScale,
153
- glowingIcons: options?.glowingIcons ?? false,
154
- errorBoundaryOptions: options?.errorBoundaryOptions || DEFAULT_ERROR_BOUNDARY_OPTIONS,
155
- }), [options]);
156
- const contextValue = useMemo(() => ({
157
- notifications,
158
- theme,
159
- addNotification,
160
- removeNotification,
161
- addModal,
162
- removeModal,
163
- confirmAction,
164
- isMobile,
165
- isTablet,
166
- isMobileOrTablet,
167
- latestZIndex: latestZIndex.current,
168
- getAndIncreaseZIndex,
169
- animations: resolvedOptions.animations,
170
- tooltips: resolvedOptions.tooltips,
171
- glowingIcons: resolvedOptions.glowingIcons,
172
- closePopoversOnEscPress: resolvedOptions.closePopoversOnEscPress,
173
- // ESC Closable modals management
174
- closeModalsOnEscPress: resolvedOptions.closeModalsOnEscPress,
175
- escClosableModals,
176
- addEscClosableModal,
177
- removeEscClosableModal,
178
- customPortalId: resolvedOptions.customPortalId,
179
- uiScale: resolvedOptions.uiScale,
180
- errorBoundaryOptions: resolvedOptions.errorBoundaryOptions,
181
- }), [
182
- notifications,
183
- theme,
184
- addNotification,
185
- removeNotification,
186
- addModal,
187
- removeModal,
188
- confirmAction,
189
- isMobile,
190
- isTablet,
191
- isMobileOrTablet,
192
- latestZIndex,
193
- getAndIncreaseZIndex,
194
- resolvedOptions,
195
- escClosableModals,
196
- addEscClosableModal,
197
- removeEscClosableModal,
198
- ]);
199
- return (_jsx(_Fragment, { children: _jsxs(ReqoreContext.Provider, { value: contextValue, children: [Object.entries(notificationsByPosition).map(([position, notifications]) => size(notifications) ? (_jsx(ReqoreNotificationsWrapper, { position: position, children: notifications.map((notification) => (_createElement(ReqoreNotification, { ...notification, key: notification.id, onClick: notification.onClick
200
- ? () => void notification.onClick(notification.id)
201
- : undefined, onClose: notification.closable === false
202
- ? undefined
203
- : () => {
204
- if (notification.onClose) {
205
- notification.onClose(notification.id);
206
- }
207
- removeNotification(notification.id);
208
- }, onFinish: () => {
209
- if (notification.onFinish) {
210
- notification.onFinish(notification.id);
211
- }
212
- removeNotification(notification.id);
213
- } }))) }, position)) : null), children, confirmationModal.isOpen && (_jsx(ReqoreModal, { isOpen: true, flat: true, opacity: 0.9, blur: 2, width: '500px', intent: confirmationModal.intent, label: confirmationModal.title || confirmationModal.label || 'Confirm your action', description: confirmationModal.description, icon: confirmationModal.icon || 'ErrorWarningFill', className: 'reqore-confirmation-modal', bottomActions: [
214
- {
215
- label: confirmationModal.cancelLabel || 'Cancel',
216
- icon: confirmationModal.cancelIcon || 'CloseLine',
217
- intent: confirmationModal.cancelButtonIntent,
218
- ...(confirmationModal.cancelButtonProps || {}),
219
- onClick: () => {
220
- closeConfirmationModal();
221
- confirmationModal?.onCancel?.();
222
- },
223
- position: 'left',
224
- },
225
- {
226
- label: confirmationModal.confirmLabel || 'Confirm',
227
- intent: confirmationModal.confirmButtonIntent || 'success',
228
- icon: confirmationModal.confirmIcon || 'CheckLine',
229
- ...(confirmationModal.confirmButtonProps || {}),
230
- onClick: () => {
231
- closeConfirmationModal();
232
- confirmationModal?.onConfirm?.();
233
- },
234
- position: 'right',
235
- },
236
- ], ...(confirmationModal.modalProps || {}), children: confirmationModal.modalProps?.children || (_jsx(ReqoreTextEffect, { as: 'p', effect: { textAlign: 'center', weight: 'bold', textSize: 'big' }, children: confirmationModal.content || 'Are you sure you want to proceed?' })) }))] }) }));
237
- });
238
- export default ReqoreProvider;
239
- //# sourceMappingURL=ReqoreProvider.js.map