@sqrzro/admin 2.0.0-beta.0 → 2.0.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 (344) hide show
  1. package/.turbo/turbo-docs.log +0 -0
  2. package/.turbo/turbo-lint.log +112 -0
  3. package/.turbo/turbo-prettier.log +215 -0
  4. package/.turbo/turbo-test.log +6 -0
  5. package/dist/components/Alert/index.d.ts +4 -26
  6. package/dist/components/Alert/index.js +15 -54
  7. package/dist/components/Allow/index.d.ts +20 -20
  8. package/dist/components/Allow/index.js +29 -29
  9. package/dist/components/AppLayout/AppLayout.stories.d.ts +5 -5
  10. package/dist/components/AppLayout/AppLayout.stories.js +11 -11
  11. package/dist/components/AppLayout/index.d.ts +6 -6
  12. package/dist/components/AppLayout/index.js +18 -11
  13. package/dist/components/AutoSuggest/index.d.ts +74 -74
  14. package/dist/components/AutoSuggest/index.js +143 -143
  15. package/dist/components/Button/Button.stories.d.ts +11 -11
  16. package/dist/components/Button/Button.stories.js +41 -41
  17. package/dist/components/Button/index.d.ts +49 -50
  18. package/dist/components/Button/index.js +50 -50
  19. package/dist/components/CalendarInput/index.d.ts +24 -24
  20. package/dist/components/CalendarInput/index.js +54 -56
  21. package/dist/components/CheckboxList/index.d.ts +17 -17
  22. package/dist/components/CheckboxList/index.js +25 -25
  23. package/dist/components/CodeInput/index.d.ts +9 -9
  24. package/dist/components/CodeInput/index.js +51 -57
  25. package/dist/components/ConnectedDropdown/index.d.ts +14 -14
  26. package/dist/components/ConnectedDropdown/index.js +36 -36
  27. package/dist/components/ConnectedList/index.d.ts +5 -5
  28. package/dist/components/ConnectedList/index.js +7 -7
  29. package/dist/components/ConnectedTable/index.d.ts +5 -5
  30. package/dist/components/ConnectedTable/index.js +7 -7
  31. package/dist/components/ContentBlock/index.d.ts +16 -16
  32. package/dist/components/ContentBlock/index.js +13 -13
  33. package/dist/components/DataPanel/index.d.ts +8 -8
  34. package/dist/components/DataPanel/index.js +8 -8
  35. package/dist/components/DateInput/index.d.ts +18 -18
  36. package/dist/components/DateInput/index.js +81 -81
  37. package/dist/components/Dropdown/index.d.ts +36 -36
  38. package/dist/components/Dropdown/index.js +122 -122
  39. package/dist/components/ErrorMessage/index.d.ts +16 -16
  40. package/dist/components/ErrorMessage/index.js +17 -17
  41. package/dist/components/Fieldset/index.d.ts +18 -18
  42. package/dist/components/Fieldset/index.js +19 -19
  43. package/dist/components/FileInput/index.d.ts +10 -10
  44. package/dist/components/FileInput/index.js +26 -26
  45. package/dist/components/FilterLink/index.d.ts +14 -14
  46. package/dist/components/FilterLink/index.js +15 -15
  47. package/dist/components/Form/index.d.ts +14 -14
  48. package/dist/components/Form/index.js +15 -15
  49. package/dist/components/FormActions/index.d.ts +18 -18
  50. package/dist/components/FormActions/index.js +14 -14
  51. package/dist/components/FormField/index.d.ts +14 -14
  52. package/dist/components/FormField/index.js +40 -40
  53. package/dist/components/FormRepeater/index.d.ts +18 -18
  54. package/dist/components/FormRepeater/index.js +65 -65
  55. package/dist/components/ImageInput/index.d.ts +13 -13
  56. package/dist/components/ImageInput/index.js +45 -45
  57. package/dist/components/InfoPanel/index.d.ts +14 -14
  58. package/dist/components/InfoPanel/index.js +11 -11
  59. package/dist/components/Link/__mocks__/index.d.ts +6 -6
  60. package/dist/components/Link/__mocks__/index.js +12 -12
  61. package/dist/components/Link/index.d.ts +23 -23
  62. package/dist/components/Link/index.js +21 -21
  63. package/dist/components/List/index.d.ts +36 -36
  64. package/dist/components/List/index.js +46 -46
  65. package/dist/components/ListActions/index.d.ts +18 -18
  66. package/dist/components/ListActions/index.js +14 -14
  67. package/dist/components/LoginForm/index.d.ts +3 -3
  68. package/dist/components/LoginForm/index.js +47 -47
  69. package/dist/components/Message/index.d.ts +14 -14
  70. package/dist/components/Message/index.js +14 -14
  71. package/dist/components/Modal/index.d.ts +4 -4
  72. package/dist/components/Modal/index.js +18 -18
  73. package/dist/components/ModalActions/index.d.ts +21 -21
  74. package/dist/components/ModalActions/index.js +18 -18
  75. package/dist/components/MoneyInput/index.d.ts +10 -10
  76. package/dist/components/MoneyInput/index.js +13 -13
  77. package/dist/components/PasswordForm/index.d.ts +35 -35
  78. package/dist/components/PasswordForm/index.js +21 -21
  79. package/dist/components/PasswordInput/index.d.ts +4 -4
  80. package/dist/components/PasswordInput/index.js +12 -12
  81. package/dist/components/RadioList/index.d.ts +9 -9
  82. package/dist/components/RadioList/index.js +7 -7
  83. package/dist/components/RootLayout/index.d.ts +6 -8
  84. package/dist/components/RootLayout/index.js +7 -21
  85. package/dist/components/SummaryList/index.d.ts +18 -18
  86. package/dist/components/SummaryList/index.js +15 -15
  87. package/dist/components/Switch/index.d.ts +21 -21
  88. package/dist/components/Switch/index.js +31 -31
  89. package/dist/components/Table/index.d.ts +28 -28
  90. package/dist/components/Table/index.js +55 -55
  91. package/dist/components/Tag/index.d.ts +15 -15
  92. package/dist/components/Tag/index.js +13 -13
  93. package/dist/components/TextArea/index.d.ts +18 -18
  94. package/dist/components/TextArea/index.js +26 -26
  95. package/dist/components/TextInput/index.d.ts +14 -14
  96. package/dist/components/TextInput/index.js +27 -27
  97. package/dist/components/WebsiteInput/index.d.ts +10 -10
  98. package/dist/components/WebsiteInput/index.js +13 -13
  99. package/dist/components/WeekCalendar/index.d.ts +24 -24
  100. package/dist/components/WeekCalendar/index.js +48 -48
  101. package/dist/core/AlertComponent/index.d.ts +26 -26
  102. package/dist/core/AlertComponent/index.js +35 -45
  103. package/dist/core/AppHeader/index.d.ts +3 -3
  104. package/dist/core/AppHeader/index.js +17 -17
  105. package/dist/core/AppLogo/index.d.ts +12 -12
  106. package/dist/core/AppLogo/index.js +16 -17
  107. package/dist/core/AppLogoImage/index.d.ts +3 -3
  108. package/dist/core/AppLogoImage/index.js +11 -11
  109. package/dist/core/AppLogoPlaceholder/index.d.ts +3 -3
  110. package/dist/core/AppLogoPlaceholder/index.js +10 -10
  111. package/dist/core/Assistive/index.d.ts +12 -12
  112. package/dist/core/Assistive/index.js +9 -9
  113. package/dist/core/AuthForm/index.d.ts +10 -10
  114. package/dist/core/AuthForm/index.js +13 -26
  115. package/dist/core/Banner/index.d.ts +3 -3
  116. package/dist/core/Banner/index.js +14 -14
  117. package/dist/core/Calendar/index.d.ts +21 -21
  118. package/dist/core/Calendar/index.js +69 -69
  119. package/dist/core/CalendarDay/index.d.ts +30 -30
  120. package/dist/core/CalendarDay/index.js +30 -30
  121. package/dist/core/CalendarMonth/index.d.ts +23 -23
  122. package/dist/core/CalendarMonth/index.js +45 -45
  123. package/dist/core/CalendarNavigation/index.d.ts +17 -17
  124. package/dist/core/CalendarNavigation/index.js +24 -24
  125. package/dist/core/CalendarWeek/index.d.ts +28 -28
  126. package/dist/core/CalendarWeek/index.js +46 -46
  127. package/dist/core/ChkRad/index.d.ts +26 -26
  128. package/dist/core/ChkRad/index.js +33 -33
  129. package/dist/core/ChkRadIcon/index.d.ts +14 -14
  130. package/dist/core/ChkRadIcon/index.js +12 -12
  131. package/dist/core/ChkRadList/index.d.ts +32 -32
  132. package/dist/core/ChkRadList/index.js +37 -37
  133. package/dist/core/CloseButton/index.d.ts +17 -17
  134. package/dist/core/CloseButton/index.js +12 -12
  135. package/dist/core/ConfirmModal/index.d.ts +3 -3
  136. package/dist/core/ConfirmModal/index.js +38 -38
  137. package/dist/core/ConnectedRepeater/index.d.ts +50 -50
  138. package/dist/core/ConnectedRepeater/index.js +154 -154
  139. package/dist/core/ConnectedRepeaterComponent/index.d.ts +24 -24
  140. package/dist/core/ConnectedRepeaterComponent/index.js +25 -25
  141. package/dist/core/Container/index.d.ts +14 -14
  142. package/dist/core/Container/index.js +12 -12
  143. package/dist/core/DataPanelItem/index.d.ts +8 -8
  144. package/dist/core/DataPanelItem/index.js +7 -7
  145. package/dist/core/DropdownPanel/index.d.ts +31 -31
  146. package/dist/core/DropdownPanel/index.js +32 -32
  147. package/dist/core/EmptyMessage/index.d.ts +21 -21
  148. package/dist/core/EmptyMessage/index.js +21 -21
  149. package/dist/core/FilterItem/index.d.ts +25 -25
  150. package/dist/core/FilterItem/index.js +82 -84
  151. package/dist/core/Filters/index.d.ts +31 -31
  152. package/dist/core/Filters/index.js +85 -85
  153. package/dist/core/FixedActions/index.d.ts +24 -24
  154. package/dist/core/FixedActions/index.js +22 -22
  155. package/dist/core/FormError/index.d.ts +12 -12
  156. package/dist/core/FormError/index.js +9 -9
  157. package/dist/core/FormLabel/index.d.ts +16 -16
  158. package/dist/core/FormLabel/index.js +13 -13
  159. package/dist/core/FormLegend/index.d.ts +12 -12
  160. package/dist/core/FormLegend/index.js +9 -9
  161. package/dist/core/Header/Header.stories.d.ts +5 -5
  162. package/dist/core/Header/Header.stories.js +11 -11
  163. package/dist/core/Header/index.d.ts +14 -14
  164. package/dist/core/Header/index.js +12 -12
  165. package/dist/core/Icon/index.d.ts +14 -14
  166. package/dist/core/Icon/index.js +32 -32
  167. package/dist/core/IconButton/index.d.ts +22 -22
  168. package/dist/core/IconButton/index.js +20 -20
  169. package/dist/core/InputPanel/index.d.ts +16 -16
  170. package/dist/core/InputPanel/index.js +11 -11
  171. package/dist/core/ListItem/index.d.ts +39 -39
  172. package/dist/core/ListItem/index.js +44 -44
  173. package/dist/core/ListItemAction/index.d.ts +11 -11
  174. package/dist/core/ListItemAction/index.js +13 -13
  175. package/dist/core/ListItemActions/index.d.ts +8 -8
  176. package/dist/core/ListItemActions/index.js +16 -16
  177. package/dist/core/ListItemMetaItem/index.d.ts +19 -19
  178. package/dist/core/ListItemMetaItem/index.js +29 -29
  179. package/dist/core/ListItemTitle/index.d.ts +19 -19
  180. package/dist/core/ListItemTitle/index.js +44 -44
  181. package/dist/core/Loader/index.d.ts +15 -15
  182. package/dist/core/Loader/index.js +16 -16
  183. package/dist/core/MeActions/index.d.ts +3 -3
  184. package/dist/core/MeActions/index.js +48 -48
  185. package/dist/core/MePanel/index.d.ts +19 -19
  186. package/dist/core/MePanel/index.js +29 -29
  187. package/dist/core/ModalComponent/index.d.ts +22 -22
  188. package/dist/core/ModalComponent/index.js +29 -29
  189. package/dist/core/Navigation/index.d.ts +3 -3
  190. package/dist/core/Navigation/index.js +33 -33
  191. package/dist/core/NavigationDivider/index.d.ts +3 -3
  192. package/dist/core/NavigationDivider/index.js +8 -8
  193. package/dist/core/NavigationItem/index.d.ts +16 -16
  194. package/dist/core/NavigationItem/index.js +21 -21
  195. package/dist/core/Pagination/index.d.ts +15 -15
  196. package/dist/core/Pagination/index.js +64 -64
  197. package/dist/core/PaginationItem/index.d.ts +10 -10
  198. package/dist/core/PaginationItem/index.js +17 -17
  199. package/dist/core/Panel/index.d.ts +17 -17
  200. package/dist/core/Panel/index.js +13 -16
  201. package/dist/core/PasswordForgotForm/index.d.ts +7 -7
  202. package/dist/core/PasswordForgotForm/index.js +40 -40
  203. package/dist/core/PasswordResetForm/index.d.ts +7 -7
  204. package/dist/core/PasswordResetForm/index.js +34 -34
  205. package/dist/core/RadialProgress/index.d.ts +16 -16
  206. package/dist/core/RadialProgress/index.js +23 -23
  207. package/dist/core/SettingsForm/index.d.ts +3 -3
  208. package/dist/core/SettingsForm/index.js +14 -14
  209. package/dist/core/StaticTextInput/index.d.ts +29 -29
  210. package/dist/core/StaticTextInput/index.js +39 -39
  211. package/dist/core/Styled/index.d.ts +6 -6
  212. package/dist/core/Styled/index.js +39 -39
  213. package/dist/core/SummaryListItem/index.d.ts +23 -23
  214. package/dist/core/SummaryListItem/index.js +31 -31
  215. package/dist/core/TabItem/index.d.ts +4 -4
  216. package/dist/core/TabItem/index.js +13 -13
  217. package/dist/core/TableActionsCell/index.d.ts +8 -8
  218. package/dist/core/TableActionsCell/index.js +8 -8
  219. package/dist/core/TableCell/index.d.ts +15 -15
  220. package/dist/core/TableCell/index.js +20 -20
  221. package/dist/core/TableHead/index.d.ts +18 -18
  222. package/dist/core/TableHead/index.js +18 -18
  223. package/dist/core/TableRow/index.d.ts +13 -13
  224. package/dist/core/TableRow/index.js +18 -18
  225. package/dist/core/Tabs/index.d.ts +7 -7
  226. package/dist/core/Tabs/index.js +13 -13
  227. package/dist/core/TextInputAncillary/index.d.ts +29 -29
  228. package/dist/core/TextInputAncillary/index.js +31 -31
  229. package/dist/core/Toast/index.d.ts +3 -3
  230. package/dist/core/Toast/index.js +47 -47
  231. package/dist/core/TwoFactor/index.d.ts +13 -13
  232. package/dist/core/TwoFactor/index.js +49 -49
  233. package/dist/core/TwoFactorAuthenticator/index.d.ts +10 -10
  234. package/dist/core/TwoFactorAuthenticator/index.js +9 -9
  235. package/dist/core/TwoFactorMethodList/index.d.ts +10 -10
  236. package/dist/core/TwoFactorMethodList/index.js +22 -22
  237. package/dist/core/TwoFactorSetup/index.d.ts +12 -12
  238. package/dist/core/TwoFactorSetup/index.js +43 -43
  239. package/dist/core/TwoFactorSetupAuthenticator/index.d.ts +20 -20
  240. package/dist/core/TwoFactorSetupAuthenticator/index.js +42 -42
  241. package/dist/core/TwoFactorSetupYubikey/index.d.ts +16 -16
  242. package/dist/core/TwoFactorSetupYubikey/index.js +14 -14
  243. package/dist/core/TwoFactorYubikey/index.d.ts +9 -9
  244. package/dist/core/TwoFactorYubikey/index.js +14 -14
  245. package/dist/core/WeekCalendarDay/index.d.ts +27 -27
  246. package/dist/core/WeekCalendarDay/index.js +35 -35
  247. package/dist/core/YubikeyInput/index.d.ts +4 -4
  248. package/dist/core/YubikeyInput/index.js +14 -39
  249. package/dist/filters/BooleanFilter/index.d.ts +14 -14
  250. package/dist/filters/BooleanFilter/index.js +35 -35
  251. package/dist/filters/DateFilter/index.d.ts +5 -5
  252. package/dist/filters/DateFilter/index.js +24 -24
  253. package/dist/filters/DropdownFilter/index.d.ts +17 -17
  254. package/dist/filters/DropdownFilter/index.js +32 -32
  255. package/dist/filters/QuickDateFilter/index.d.ts +13 -13
  256. package/dist/filters/QuickDateFilter/index.js +40 -40
  257. package/dist/filters/interfaces.d.ts +35 -35
  258. package/dist/filters/interfaces.js +1 -1
  259. package/dist/hooks/useAlert.d.ts +12 -12
  260. package/dist/hooks/useAlert.js +18 -18
  261. package/dist/hooks/useAppConfig.d.ts +3 -0
  262. package/dist/hooks/useAppConfig.js +5 -0
  263. package/dist/hooks/useConnectedList.d.ts +7 -7
  264. package/dist/hooks/useConnectedList.js +6 -6
  265. package/dist/hooks/useConnectedRepeater.d.ts +7 -7
  266. package/dist/hooks/useConnectedRepeater.js +14 -14
  267. package/dist/hooks/useConnectedTable.d.ts +7 -7
  268. package/dist/hooks/useConnectedTable.js +6 -6
  269. package/dist/hooks/useFilters.d.ts +9 -9
  270. package/dist/hooks/useFilters.js +24 -24
  271. package/dist/hooks/useLayout.d.ts +7 -7
  272. package/dist/hooks/useLayout.js +10 -10
  273. package/dist/hooks/useLayout.spec.d.ts +1 -1
  274. package/dist/hooks/useLayout.spec.js +24 -24
  275. package/dist/hooks/useModal.d.ts +12 -12
  276. package/dist/hooks/useModal.js +39 -39
  277. package/dist/hooks/useModalOffset.d.ts +2 -2
  278. package/dist/hooks/useModalOffset.js +16 -16
  279. package/dist/hooks/useModalOffset.spec.d.ts +1 -1
  280. package/dist/hooks/useModalOffset.spec.js +19 -19
  281. package/dist/hooks/useNavigation.d.ts +7 -7
  282. package/dist/hooks/useNavigation.js +113 -113
  283. package/dist/hooks/useRemote.d.ts +7 -7
  284. package/dist/hooks/useRemote.js +29 -29
  285. package/dist/hooks/useVariant.d.ts +9 -9
  286. package/dist/hooks/useVariant.js +14 -14
  287. package/dist/index.d.ts +209 -208
  288. package/dist/index.js +213 -212
  289. package/dist/scenes/Error404Scene.d.ts +3 -3
  290. package/dist/scenes/Error404Scene.js +5 -5
  291. package/dist/services/AppService.d.ts +5 -5
  292. package/dist/services/AppService.js +11 -11
  293. package/dist/services/ConfigService.d.ts +42 -42
  294. package/dist/services/ConfigService.js +52 -55
  295. package/dist/services/ConfirmService.d.ts +12 -12
  296. package/dist/services/ConfirmService.js +10 -10
  297. package/dist/services/DateService.d.ts +26 -26
  298. package/dist/services/DateService.js +132 -132
  299. package/dist/services/DateService.spec.d.ts +1 -1
  300. package/dist/services/DateService.spec.js +83 -83
  301. package/dist/services/DownloadService.d.ts +7 -7
  302. package/dist/services/DownloadService.js +16 -16
  303. package/dist/services/DownloadService.spec.d.ts +1 -1
  304. package/dist/services/DownloadService.spec.js +18 -18
  305. package/dist/services/FilterComponentService.d.ts +25 -25
  306. package/dist/services/FilterComponentService.js +54 -54
  307. package/dist/services/FilterService.d.ts +34 -34
  308. package/dist/services/FilterService.js +58 -58
  309. package/dist/services/FilterService.spec.d.ts +1 -1
  310. package/dist/services/FilterService.spec.js +67 -67
  311. package/dist/services/FormatService.d.ts +11 -11
  312. package/dist/services/FormatService.js +45 -45
  313. package/dist/services/FormatService.spec.d.ts +1 -1
  314. package/dist/services/FormatService.spec.js +66 -66
  315. package/dist/services/ToastService.d.ts +7 -7
  316. package/dist/services/ToastService.js +17 -17
  317. package/dist/services/ToastService.spec.d.ts +1 -1
  318. package/dist/services/ToastService.spec.js +34 -34
  319. package/dist/styles.css +125 -67
  320. package/dist/utility/MockRouter/index.d.ts +2 -2
  321. package/dist/utility/MockRouter/index.js +37 -37
  322. package/dist/utility/StorybookPanel/index.d.ts +14 -14
  323. package/dist/utility/StorybookPanel/index.js +12 -12
  324. package/dist/utility/TestChangeHandler/index.d.ts +15 -15
  325. package/dist/utility/TestChangeHandler/index.js +30 -30
  326. package/dist/utility/icons.d.ts +3 -3
  327. package/dist/utility/icons.js +12 -12
  328. package/dist/utility/interfaces.d.ts +79 -80
  329. package/dist/utility/interfaces.js +18 -18
  330. package/dist/utility/middleware.d.ts +4 -4
  331. package/dist/utility/middleware.js +9 -4
  332. package/dist/utility/prop-types.d.ts +57 -57
  333. package/dist/utility/prop-types.js +77 -77
  334. package/dist/utility/register.d.ts +3 -3
  335. package/dist/utility/register.js +9 -7
  336. package/package.json +5 -5
  337. package/src/components/LoginForm/index.tsx +1 -1
  338. package/src/core/TwoFactor/TwoFactor.spec.tsx +4 -4
  339. package/src/core/TwoFactor/index.tsx +5 -5
  340. package/src/core/TwoFactorAuthenticator/index.tsx +1 -1
  341. package/src/core/TwoFactorSetup/index.tsx +1 -1
  342. package/src/core/TwoFactorYubikey/index.tsx +1 -1
  343. package/dist/hooks/useConfig.d.ts +0 -9
  344. package/dist/hooks/useConfig.js +0 -13
@@ -1,65 +1,65 @@
1
- 'use client';
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
4
- import FormField from '../FormField';
5
- // Parse the values that have been passed in as `value`, and prepare them for the `FormField`s.
6
- const parseValues = (value, max) => {
7
- // If there is no value, or an empty value, then return an array.
8
- if (!value || !Array.isArray(value) || !value.length) {
9
- return [''];
10
- }
11
- /*
12
- * Otherwise, return the existing array, and an empty string (for the new field, if the max is
13
- * Not reached).
14
- */
15
- return max && value.length >= max ? [...value] : [...value, ''];
16
- };
17
- const getAction = (onClick, values, index, max) => {
18
- if (index === values.length - 1 && index !== (max || 0) - 1) {
19
- return null;
20
- }
21
- return {
22
- label: 'Remove',
23
- onClick,
24
- variant: ['bordered', 'danger'],
25
- };
26
- };
27
- function FormRepeater({ label, max, name, onChange, render, value, }) {
28
- const values = parseValues(value, max);
29
- const handleChange = (event, index) => {
30
- if (!onChange) {
31
- return;
32
- }
33
- const newValue = [
34
- ...values.slice(0, index),
35
- event.target.value,
36
- ...values.slice(index + 1),
37
- ];
38
- onChange({
39
- target: {
40
- name,
41
- value: newValue.filter(Boolean),
42
- },
43
- });
44
- };
45
- const handleRemove = (index) => {
46
- if (!onChange) {
47
- return;
48
- }
49
- const newValue = [...values.slice(0, index), ...values.slice(index + 1)];
50
- onChange({
51
- target: {
52
- name,
53
- value: newValue.filter(Boolean),
54
- },
55
- });
56
- };
57
- return (React.createElement("div", { className: "/*styles.root*/" }, values.map((_item, index) => (React.createElement(FormField, { key: index, action: getAction(() => handleRemove(index), values, index, max), id: `f_${name}_${index}`, label: index === 0 ? label : '', name: name, onChange: (event) => handleChange(event, index), render: render, value: values[index], isShallow: true })))));
58
- }
59
- FormRepeater.propTypes = {
60
- name: PropTypes.string.isRequired,
61
- label: PropTypes.string,
62
- max: PropTypes.number,
63
- onChange: PropTypes.func,
64
- };
65
- export default FormRepeater;
1
+ 'use client';
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import FormField from '../../components/FormField';
5
+ // Parse the values that have been passed in as `value`, and prepare them for the `FormField`s.
6
+ const parseValues = (value, max) => {
7
+ // If there is no value, or an empty value, then return an array.
8
+ if (!value || !Array.isArray(value) || !value.length) {
9
+ return [''];
10
+ }
11
+ /*
12
+ * Otherwise, return the existing array, and an empty string (for the new field, if the max is
13
+ * Not reached).
14
+ */
15
+ return max && value.length >= max ? [...value] : [...value, ''];
16
+ };
17
+ const getAction = (onClick, values, index, max) => {
18
+ if (index === values.length - 1 && index !== (max || 0) - 1) {
19
+ return null;
20
+ }
21
+ return {
22
+ label: 'Remove',
23
+ onClick,
24
+ variant: ['bordered', 'danger'],
25
+ };
26
+ };
27
+ function FormRepeater({ label, max, name, onChange, render, value, }) {
28
+ const values = parseValues(value, max);
29
+ const handleChange = (event, index) => {
30
+ if (!onChange) {
31
+ return;
32
+ }
33
+ const newValue = [
34
+ ...values.slice(0, index),
35
+ event.target.value,
36
+ ...values.slice(index + 1),
37
+ ];
38
+ onChange({
39
+ target: {
40
+ name,
41
+ value: newValue.filter(Boolean),
42
+ },
43
+ });
44
+ };
45
+ const handleRemove = (index) => {
46
+ if (!onChange) {
47
+ return;
48
+ }
49
+ const newValue = [...values.slice(0, index), ...values.slice(index + 1)];
50
+ onChange({
51
+ target: {
52
+ name,
53
+ value: newValue.filter(Boolean),
54
+ },
55
+ });
56
+ };
57
+ return (React.createElement("div", { className: "/*styles.root*/" }, values.map((_item, index) => (React.createElement(FormField, { key: index, action: getAction(() => handleRemove(index), values, index, max), id: `f_${name}_${index}`, label: index === 0 ? label : '', name: name, onChange: (event) => handleChange(event, index), render: render, value: values[index], isShallow: true })))));
58
+ }
59
+ FormRepeater.propTypes = {
60
+ name: PropTypes.string.isRequired,
61
+ label: PropTypes.string,
62
+ max: PropTypes.number,
63
+ onChange: PropTypes.func,
64
+ };
65
+ export default FormRepeater;
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { InputProps } from '../../utility/interfaces';
4
- declare function ImageInput({ name, isDisabled, hasError, onChange, }: InputProps<File>): React.ReactElement;
5
- declare namespace ImageInput {
6
- var propTypes: {
7
- name: PropTypes.Validator<string>;
8
- hasError: PropTypes.Requireable<boolean>;
9
- isDisabled: PropTypes.Requireable<boolean>;
10
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
11
- };
12
- }
13
- export default ImageInput;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import type { InputProps } from '../../utility/interfaces';
4
+ declare function ImageInput({ name, isDisabled, hasError, onChange, }: InputProps<File>): React.ReactElement;
5
+ declare namespace ImageInput {
6
+ var propTypes: {
7
+ name: PropTypes.Validator<string>;
8
+ hasError: PropTypes.Requireable<boolean>;
9
+ isDisabled: PropTypes.Requireable<boolean>;
10
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
11
+ };
12
+ }
13
+ export default ImageInput;
@@ -1,45 +1,45 @@
1
- 'use client';
2
- import React, { useEffect, useRef, useState } from 'react';
3
- import PropTypes from 'prop-types';
4
- import Icon from '../../core/Icon';
5
- function ImageInput({ name, isDisabled, hasError, onChange, }) {
6
- const reader = useRef(new FileReader());
7
- const [preview, setPreview] = useState('');
8
- const handleReaderLoad = () => {
9
- /*
10
- * `reader.result` can technically be null, but there's no way to set it to null via a file
11
- * input, so we can 'handle' the possibility of null to keep typescript happy, but ignore
12
- * this line in code coverage
13
- */
14
- /* istanbul ignore next */
15
- setPreview(reader.current.result?.toString() || '');
16
- };
17
- const handleChange = (event) => {
18
- const { target } = event;
19
- if (target.files.length) {
20
- reader.current.readAsDataURL(target.files[0]);
21
- if (onChange) {
22
- onChange({ target: { name, value: target.files[0] } });
23
- }
24
- }
25
- };
26
- useEffect(() => {
27
- reader.current.addEventListener('load', handleReaderLoad);
28
- return () => {
29
- reader.current.removeEventListener('load', handleReaderLoad);
30
- };
31
- }, []);
32
- return (React.createElement("div", { className: "/*clsx(\n styles.root,\n hasError && styles.rootHasError,\n isDisabled && styles.rootIsDisabled\n )*/", "data-testid": "image-input-root" },
33
- preview ? (React.createElement("img", { className: "/*styles.preview*/", src: preview })) : (React.createElement("div", { className: "/*styles.placeholder*/" },
34
- React.createElement(Icon, { icon: "upload", size: 30 }),
35
- React.createElement("span", { className: "/*styles.placeholderTitle*/" }, "Click to Upload"),
36
- React.createElement("em", { className: "/*styles.placeholderDescription*/" }, "(or drop an image here)"))),
37
- React.createElement("input", { className: "/*styles.input*/", "data-testid": "image-input-input", name: name, onChange: handleChange, type: "file" })));
38
- }
39
- ImageInput.propTypes = {
40
- name: PropTypes.string.isRequired,
41
- hasError: PropTypes.bool,
42
- isDisabled: PropTypes.bool,
43
- onChange: PropTypes.func,
44
- };
45
- export default ImageInput;
1
+ 'use client';
2
+ import React, { useEffect, useRef, useState } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import Icon from '../../core/Icon';
5
+ function ImageInput({ name, isDisabled, hasError, onChange, }) {
6
+ const reader = useRef(new FileReader());
7
+ const [preview, setPreview] = useState('');
8
+ const handleReaderLoad = () => {
9
+ /*
10
+ * `reader.result` can technically be null, but there's no way to set it to null via a file
11
+ * input, so we can 'handle' the possibility of null to keep typescript happy, but ignore
12
+ * this line in code coverage
13
+ */
14
+ /* istanbul ignore next */
15
+ setPreview(reader.current.result?.toString() || '');
16
+ };
17
+ const handleChange = (event) => {
18
+ const { target } = event;
19
+ if (target.files.length) {
20
+ reader.current.readAsDataURL(target.files[0]);
21
+ if (onChange) {
22
+ onChange({ target: { name, value: target.files[0] } });
23
+ }
24
+ }
25
+ };
26
+ useEffect(() => {
27
+ reader.current.addEventListener('load', handleReaderLoad);
28
+ return () => {
29
+ reader.current.removeEventListener('load', handleReaderLoad);
30
+ };
31
+ }, []);
32
+ return (React.createElement("div", { className: "/*clsx(\n styles.root,\n hasError && styles.rootHasError,\n isDisabled && styles.rootIsDisabled\n )*/", "data-testid": "image-input-root" },
33
+ preview ? (React.createElement("img", { className: "/*styles.preview*/", src: preview })) : (React.createElement("div", { className: "/*styles.placeholder*/" },
34
+ React.createElement(Icon, { icon: "upload", size: 30 }),
35
+ React.createElement("span", { className: "/*styles.placeholderTitle*/" }, "Click to Upload"),
36
+ React.createElement("em", { className: "/*styles.placeholderDescription*/" }, "(or drop an image here)"))),
37
+ React.createElement("input", { className: "/*styles.input*/", "data-testid": "image-input-input", name: name, onChange: handleChange, type: "file" })));
38
+ }
39
+ ImageInput.propTypes = {
40
+ name: PropTypes.string.isRequired,
41
+ hasError: PropTypes.bool,
42
+ isDisabled: PropTypes.bool,
43
+ onChange: PropTypes.func,
44
+ };
45
+ export default ImageInput;
@@ -1,14 +1,14 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { StyleVariant } from '../../utility/interfaces';
4
- export interface InfoPanelProps {
5
- children: React.ReactNode;
6
- variant?: StyleVariant;
7
- }
8
- declare function InfoPanel({ children, variant }: InfoPanelProps): React.ReactElement;
9
- declare namespace InfoPanel {
10
- var propTypes: {
11
- children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
12
- };
13
- }
14
- export default InfoPanel;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import type { StyleVariant } from '../../utility/interfaces';
4
+ export interface InfoPanelProps {
5
+ children: React.ReactNode;
6
+ variant?: StyleVariant;
7
+ }
8
+ declare function InfoPanel({ children, variant }: InfoPanelProps): React.ReactElement;
9
+ declare namespace InfoPanel {
10
+ var propTypes: {
11
+ children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
12
+ };
13
+ }
14
+ export default InfoPanel;
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import useVariant from '../../hooks/useVariant';
4
- function InfoPanel({ children, variant }) {
5
- const { applyVariantClassName } = useVariant(variant);
6
- return React.createElement("div", { className: "/*clsx(styles.root, applyVariantClassName(styles))*/" }, children);
7
- }
8
- InfoPanel.propTypes = {
9
- children: PropTypes.node.isRequired,
10
- };
11
- export default InfoPanel;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import useVariant from '../../hooks/useVariant';
4
+ function InfoPanel({ children, variant }) {
5
+ const { applyVariantClassName } = useVariant(variant);
6
+ return React.createElement("div", { className: "/*clsx(styles.root, applyVariantClassName(styles))*/" }, children);
7
+ }
8
+ InfoPanel.propTypes = {
9
+ children: PropTypes.node.isRequired,
10
+ };
11
+ export default InfoPanel;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- interface LinkProps {
3
- onClick?: React.MouseEventHandler<HTMLAnchorElement>;
4
- }
5
- declare function Link({ onClick, ...props }: LinkProps): React.ReactElement;
6
- export default Link;
1
+ import React from 'react';
2
+ interface LinkProps {
3
+ onClick?: React.MouseEventHandler<HTMLAnchorElement>;
4
+ }
5
+ declare function Link({ onClick, ...props }: LinkProps): React.ReactElement;
6
+ export default Link;
@@ -1,12 +1,12 @@
1
- import React from 'react';
2
- function Link({ onClick, ...props }) {
3
- const { default: ActualLink } = jest.requireActual('../Link');
4
- const handleClick = (event) => {
5
- event.preventDefault();
6
- if (onClick) {
7
- onClick(event);
8
- }
9
- };
10
- return React.createElement(ActualLink, { ...props, onClick: handleClick });
11
- }
12
- export default Link;
1
+ import React from 'react';
2
+ function Link({ onClick, ...props }) {
3
+ const { default: ActualLink } = jest.requireActual('@/components/Link');
4
+ const handleClick = (event) => {
5
+ event.preventDefault();
6
+ if (onClick) {
7
+ onClick(event);
8
+ }
9
+ };
10
+ return React.createElement(ActualLink, { ...props, onClick: handleClick });
11
+ }
12
+ export default Link;
@@ -1,23 +1,23 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- interface DataProps {
4
- 'data-test-id'?: string;
5
- }
6
- interface LinkProps extends DataProps {
7
- children: React.ReactNode;
8
- className?: string;
9
- isNewWindow?: boolean;
10
- to: string;
11
- onClick?: React.MouseEventHandler<HTMLAnchorElement>;
12
- }
13
- declare function Link({ children, className, isNewWindow, onClick, to, ...dataProps }: LinkProps): React.ReactElement;
14
- declare namespace Link {
15
- var propTypes: {
16
- children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
17
- to: PropTypes.Validator<string>;
18
- className: PropTypes.Requireable<string>;
19
- isNewWindow: PropTypes.Requireable<boolean>;
20
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
21
- };
22
- }
23
- export default Link;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ interface DataProps {
4
+ 'data-test-id'?: string;
5
+ }
6
+ interface LinkProps extends DataProps {
7
+ children: React.ReactNode;
8
+ className?: string;
9
+ isNewWindow?: boolean;
10
+ to: string;
11
+ onClick?: React.MouseEventHandler<HTMLAnchorElement>;
12
+ }
13
+ declare function Link({ children, className, isNewWindow, onClick, to, ...dataProps }: LinkProps): React.ReactElement;
14
+ declare namespace Link {
15
+ var propTypes: {
16
+ children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
17
+ to: PropTypes.Validator<string>;
18
+ className: PropTypes.Requireable<string>;
19
+ isNewWindow: PropTypes.Requireable<boolean>;
20
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
21
+ };
22
+ }
23
+ export default Link;
@@ -1,21 +1,21 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import NextLink from 'next/link';
4
- function Link({ children, className, isNewWindow, onClick, to, ...dataProps }) {
5
- const newWindowProps = isNewWindow
6
- ? { target: '_blank', rel: 'noopener noreferrer' }
7
- : {};
8
- const props = { ...newWindowProps, ...dataProps, className, onClick };
9
- if (/^http/u.exec(to) || /^mailto:/u.exec(to) || /^tel:/u.exec(to)) {
10
- return (React.createElement("a", { href: to, ...props }, children));
11
- }
12
- return (React.createElement(NextLink, { href: /^\//u.exec(to) ? to : `/${to}`, ...props }, children));
13
- }
14
- Link.propTypes = {
15
- children: PropTypes.node.isRequired,
16
- to: PropTypes.string.isRequired,
17
- className: PropTypes.string,
18
- isNewWindow: PropTypes.bool,
19
- onClick: PropTypes.func,
20
- };
21
- export default Link;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import NextLink from 'next/link';
4
+ function Link({ children, className, isNewWindow, onClick, to, ...dataProps }) {
5
+ const newWindowProps = isNewWindow
6
+ ? { target: '_blank', rel: 'noopener noreferrer' }
7
+ : {};
8
+ const props = { ...newWindowProps, ...dataProps, className, onClick };
9
+ if (/^http/u.exec(to) || /^mailto:/u.exec(to) || /^tel:/u.exec(to)) {
10
+ return (React.createElement("a", { href: to, ...props }, children));
11
+ }
12
+ return (React.createElement(NextLink, { href: /^\//u.exec(to) ? to : `/${to}`, ...props }, children));
13
+ }
14
+ Link.propTypes = {
15
+ children: PropTypes.node.isRequired,
16
+ to: PropTypes.string.isRequired,
17
+ className: PropTypes.string,
18
+ isNewWindow: PropTypes.bool,
19
+ onClick: PropTypes.func,
20
+ };
21
+ export default Link;
@@ -1,36 +1,36 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { EmptyMessageProps } from '../../core/EmptyMessage';
4
- import type { SimpleObject, TransformerWithActions } from '../../utility/interfaces';
5
- export interface ListProps<T extends SimpleObject> {
6
- data?: T[];
7
- empty?: EmptyMessageProps;
8
- isDisabled?: boolean;
9
- pagination?: {
10
- activePage: number;
11
- pageCount: number;
12
- } | null;
13
- transformer?: TransformerWithActions<T>;
14
- }
15
- /**
16
- * Displays a list of items. Each item in the `data` prop is passed through the `transformer`
17
- * function and then displayed. For more information about what `transformer` options are
18
- * available, take a look at the `ListItem` documentation.
19
- *
20
- * The only value that is required for each transformed item is an `$id` as this is used for the
21
- * `key` prop.
22
- *
23
- * If there is no data, an `EmptyMessage` is displayed.
24
- */
25
- declare function List<T extends SimpleObject>({ data, empty, pagination, transformer, isDisabled, }: ListProps<T>): React.ReactElement;
26
- declare namespace List {
27
- var propTypes: {
28
- data: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{}>>[]>;
29
- isDisabled: PropTypes.Requireable<boolean>;
30
- pagination: PropTypes.Requireable<PropTypes.InferProps<{
31
- activePage: PropTypes.Validator<number>;
32
- pageCount: PropTypes.Validator<number>;
33
- }>>;
34
- };
35
- }
36
- export default List;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import type { EmptyMessageProps } from '../../core/EmptyMessage';
4
+ import type { SimpleObject, TransformerWithActions } from '../../utility/interfaces';
5
+ export interface ListProps<T extends SimpleObject> {
6
+ data?: T[];
7
+ empty?: EmptyMessageProps;
8
+ isDisabled?: boolean;
9
+ pagination?: {
10
+ activePage: number;
11
+ pageCount: number;
12
+ } | null;
13
+ transformer?: TransformerWithActions<T>;
14
+ }
15
+ /**
16
+ * Displays a list of items. Each item in the `data` prop is passed through the `transformer`
17
+ * function and then displayed. For more information about what `transformer` options are
18
+ * available, take a look at the `ListItem` documentation.
19
+ *
20
+ * The only value that is required for each transformed item is an `$id` as this is used for the
21
+ * `key` prop.
22
+ *
23
+ * If there is no data, an `EmptyMessage` is displayed.
24
+ */
25
+ declare function List<T extends SimpleObject>({ data, empty, pagination, transformer, isDisabled, }: ListProps<T>): React.ReactElement;
26
+ declare namespace List {
27
+ var propTypes: {
28
+ data: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{}>>[]>;
29
+ isDisabled: PropTypes.Requireable<boolean>;
30
+ pagination: PropTypes.Requireable<PropTypes.InferProps<{
31
+ activePage: PropTypes.Validator<number>;
32
+ pageCount: PropTypes.Validator<number>;
33
+ }>>;
34
+ };
35
+ }
36
+ export default List;
@@ -1,46 +1,46 @@
1
- import React, { Fragment } from 'react';
2
- import PropTypes from 'prop-types';
3
- import EmptyMessage from '../../core/EmptyMessage';
4
- import ListItem from '../../core/ListItem';
5
- import Pagination from '../../core/Pagination';
6
- // Import styles from './List.module.css';
7
- const defaultTransformer = (item) => ({
8
- ...item,
9
- $id: String(item.id),
10
- $original: item,
11
- });
12
- const transformData = (data, transformer) => {
13
- const [transformFn, actions] = Array.isArray(transformer)
14
- ? transformer
15
- : [transformer || defaultTransformer];
16
- return data.map((item) => ({ ...transformFn(item), $actions: actions, $original: item }));
17
- };
18
- /**
19
- * Displays a list of items. Each item in the `data` prop is passed through the `transformer`
20
- * function and then displayed. For more information about what `transformer` options are
21
- * available, take a look at the `ListItem` documentation.
22
- *
23
- * The only value that is required for each transformed item is an `$id` as this is used for the
24
- * `key` prop.
25
- *
26
- * If there is no data, an `EmptyMessage` is displayed.
27
- */
28
- function List({ data, empty, pagination, transformer, isDisabled, }) {
29
- if (!data?.length) {
30
- return React.createElement(EmptyMessage, { ...empty });
31
- }
32
- const transformed = transformData(data, transformer);
33
- return (React.createElement(Fragment, null,
34
- React.createElement("ul", { className: "/*clsx(styles.root, isDisabled && styles.rootIsDisabled)*/" }, transformed.map((item) => (React.createElement("li", { key: item.$id },
35
- React.createElement(ListItem, { ...item }))))),
36
- pagination ? React.createElement(Pagination, { isDisabled: isDisabled, ...pagination }) : null));
37
- }
38
- List.propTypes = {
39
- data: PropTypes.arrayOf(PropTypes.shape({}).isRequired),
40
- isDisabled: PropTypes.bool,
41
- pagination: PropTypes.shape({
42
- activePage: PropTypes.number.isRequired,
43
- pageCount: PropTypes.number.isRequired,
44
- }),
45
- };
46
- export default List;
1
+ import React, { Fragment } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import EmptyMessage from '../../core/EmptyMessage';
4
+ import ListItem from '../../core/ListItem';
5
+ import Pagination from '../../core/Pagination';
6
+ // Import styles from './List.module.css';
7
+ const defaultTransformer = (item) => ({
8
+ ...item,
9
+ $id: String(item.id),
10
+ $original: item,
11
+ });
12
+ const transformData = (data, transformer) => {
13
+ const [transformFn, actions] = Array.isArray(transformer)
14
+ ? transformer
15
+ : [transformer || defaultTransformer];
16
+ return data.map((item) => ({ ...transformFn(item), $actions: actions, $original: item }));
17
+ };
18
+ /**
19
+ * Displays a list of items. Each item in the `data` prop is passed through the `transformer`
20
+ * function and then displayed. For more information about what `transformer` options are
21
+ * available, take a look at the `ListItem` documentation.
22
+ *
23
+ * The only value that is required for each transformed item is an `$id` as this is used for the
24
+ * `key` prop.
25
+ *
26
+ * If there is no data, an `EmptyMessage` is displayed.
27
+ */
28
+ function List({ data, empty, pagination, transformer, isDisabled, }) {
29
+ if (!data?.length) {
30
+ return React.createElement(EmptyMessage, { ...empty });
31
+ }
32
+ const transformed = transformData(data, transformer);
33
+ return (React.createElement(Fragment, null,
34
+ React.createElement("ul", { className: "/*clsx(styles.root, isDisabled && styles.rootIsDisabled)*/" }, transformed.map((item) => (React.createElement("li", { key: item.$id },
35
+ React.createElement(ListItem, { ...item }))))),
36
+ pagination ? React.createElement(Pagination, { isDisabled: isDisabled, ...pagination }) : null));
37
+ }
38
+ List.propTypes = {
39
+ data: PropTypes.arrayOf(PropTypes.shape({}).isRequired),
40
+ isDisabled: PropTypes.bool,
41
+ pagination: PropTypes.shape({
42
+ activePage: PropTypes.number.isRequired,
43
+ pageCount: PropTypes.number.isRequired,
44
+ }),
45
+ };
46
+ export default List;
@@ -1,18 +1,18 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- interface ListActionsProps {
4
- children?: React.ReactNode;
5
- label: string;
6
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
7
- to?: string;
8
- }
9
- declare function ListActions({ children, label, to, onClick }: ListActionsProps): React.ReactElement;
10
- declare namespace ListActions {
11
- var propTypes: {
12
- label: PropTypes.Validator<string>;
13
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
14
- to: PropTypes.Requireable<string>;
15
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
16
- };
17
- }
18
- export default ListActions;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ interface ListActionsProps {
4
+ children?: React.ReactNode;
5
+ label: string;
6
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
7
+ to?: string;
8
+ }
9
+ declare function ListActions({ children, label, to, onClick }: ListActionsProps): React.ReactElement;
10
+ declare namespace ListActions {
11
+ var propTypes: {
12
+ label: PropTypes.Validator<string>;
13
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
14
+ to: PropTypes.Requireable<string>;
15
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
16
+ };
17
+ }
18
+ export default ListActions;