@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,15 +1,15 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { PaginationObject } from '../../utility/interfaces';
4
- interface PaginationProps extends PaginationObject {
5
- isDisabled?: boolean;
6
- }
7
- declare function Pagination({ activePage, isDisabled, pageCount, }: PaginationProps): React.ReactElement | null;
8
- declare namespace Pagination {
9
- var propTypes: {
10
- activePage: PropTypes.Validator<number>;
11
- pageCount: PropTypes.Validator<number>;
12
- isDisabled: PropTypes.Requireable<boolean>;
13
- };
14
- }
15
- export default Pagination;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import type { PaginationObject } from '../../utility/interfaces';
4
+ interface PaginationProps extends PaginationObject {
5
+ isDisabled?: boolean;
6
+ }
7
+ declare function Pagination({ activePage, isDisabled, pageCount, }: PaginationProps): React.ReactElement | null;
8
+ declare namespace Pagination {
9
+ var propTypes: {
10
+ activePage: PropTypes.Validator<number>;
11
+ pageCount: PropTypes.Validator<number>;
12
+ isDisabled: PropTypes.Requireable<boolean>;
13
+ };
14
+ }
15
+ export default Pagination;
@@ -1,64 +1,64 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { filterDuplicates } from '@sqrzro/utility';
4
- import PaginationItem from '../PaginationItem';
5
- // Import styles from './Pagination.module.css';
6
- /**
7
- * Find an index. In many cases this is simply the active page. However, with the first and
8
- * last pages, the index is moved 'in' one space (i.e. when the active page is 1, the index is
9
- * 2). This ensures that the first 3 links are shown on the first page, and the last 3 on the
10
- * last page.
11
- */
12
- const getIndex = (activePage, pageCount) => {
13
- if (activePage === 1) {
14
- return 2;
15
- }
16
- if (activePage === pageCount) {
17
- return pageCount - 1;
18
- }
19
- return activePage;
20
- };
21
- /**
22
- * Reduce the links to their final array. If it's the first value, or the previous value is the
23
- * number before the current one (i.e. the current is 4 and the previous is 3), add it to the array.
24
- * Otherwise (i.e. the current is 5 and the previous is 2), add a hyphen and then the value. This
25
- * will then get interpreted as an ellipsis in the pagination when rendered.
26
- */
27
- const reduceLinks = (acc, cur, index, arr) => {
28
- if (index === 0 || arr[index - 1] === cur - 1) {
29
- return [...acc, cur];
30
- }
31
- return [...acc, '-', cur];
32
- };
33
- /**
34
- * The idea of the pagination is to always have the following links available:
35
- * - The first page
36
- * - The previous page (if applicable)
37
- * - The current page
38
- * - The next page (if applicable)
39
- * - The last page
40
- *
41
- * There are situations where some of these will be the same page (i.e. on page 2, the previous page
42
- * and the first page will both be page 1). When on the first page, links to the first 3 pages are
43
- * displayed (rather than 2, which would be the default if the above rules are followed). The same
44
- * is true with the last page
45
- */
46
- const getLinks = (activePage, pageCount) => {
47
- const index = getIndex(activePage, pageCount);
48
- return filterDuplicates([1, index - 1, index, index + 1, pageCount])
49
- .filter((item) => item > 0 && item <= pageCount)
50
- .reduce(reduceLinks, []);
51
- };
52
- function Pagination({ activePage, isDisabled, pageCount, }) {
53
- if (pageCount === 1) {
54
- return null;
55
- }
56
- return (React.createElement("ul", { className: "/*clsx(styles.root, isDisabled && styles.rootIsDisabled)*/" }, getLinks(activePage, pageCount).map((item, index) => (React.createElement("li", { key: index, className: "/*styles.item*/" },
57
- React.createElement(PaginationItem, { activePage: activePage, pageNumber: item }))))));
58
- }
59
- Pagination.propTypes = {
60
- activePage: PropTypes.number.isRequired,
61
- pageCount: PropTypes.number.isRequired,
62
- isDisabled: PropTypes.bool,
63
- };
64
- export default Pagination;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { filterDuplicates } from '@sqrzro/utility';
4
+ import PaginationItem from '../../core/PaginationItem';
5
+ // Import styles from './Pagination.module.css';
6
+ /**
7
+ * Find an index. In many cases this is simply the active page. However, with the first and
8
+ * last pages, the index is moved 'in' one space (i.e. when the active page is 1, the index is
9
+ * 2). This ensures that the first 3 links are shown on the first page, and the last 3 on the
10
+ * last page.
11
+ */
12
+ const getIndex = (activePage, pageCount) => {
13
+ if (activePage === 1) {
14
+ return 2;
15
+ }
16
+ if (activePage === pageCount) {
17
+ return pageCount - 1;
18
+ }
19
+ return activePage;
20
+ };
21
+ /**
22
+ * Reduce the links to their final array. If it's the first value, or the previous value is the
23
+ * number before the current one (i.e. the current is 4 and the previous is 3), add it to the array.
24
+ * Otherwise (i.e. the current is 5 and the previous is 2), add a hyphen and then the value. This
25
+ * will then get interpreted as an ellipsis in the pagination when rendered.
26
+ */
27
+ const reduceLinks = (acc, cur, index, arr) => {
28
+ if (index === 0 || arr[index - 1] === cur - 1) {
29
+ return [...acc, cur];
30
+ }
31
+ return [...acc, '-', cur];
32
+ };
33
+ /**
34
+ * The idea of the pagination is to always have the following links available:
35
+ * - The first page
36
+ * - The previous page (if applicable)
37
+ * - The current page
38
+ * - The next page (if applicable)
39
+ * - The last page
40
+ *
41
+ * There are situations where some of these will be the same page (i.e. on page 2, the previous page
42
+ * and the first page will both be page 1). When on the first page, links to the first 3 pages are
43
+ * displayed (rather than 2, which would be the default if the above rules are followed). The same
44
+ * is true with the last page
45
+ */
46
+ const getLinks = (activePage, pageCount) => {
47
+ const index = getIndex(activePage, pageCount);
48
+ return filterDuplicates([1, index - 1, index, index + 1, pageCount])
49
+ .filter((item) => item > 0 && item <= pageCount)
50
+ .reduce(reduceLinks, []);
51
+ };
52
+ function Pagination({ activePage, isDisabled, pageCount, }) {
53
+ if (pageCount === 1) {
54
+ return null;
55
+ }
56
+ return (React.createElement("ul", { className: "/*clsx(styles.root, isDisabled && styles.rootIsDisabled)*/" }, getLinks(activePage, pageCount).map((item, index) => (React.createElement("li", { key: index, className: "/*styles.item*/" },
57
+ React.createElement(PaginationItem, { activePage: activePage, pageNumber: item }))))));
58
+ }
59
+ Pagination.propTypes = {
60
+ activePage: PropTypes.number.isRequired,
61
+ pageCount: PropTypes.number.isRequired,
62
+ isDisabled: PropTypes.bool,
63
+ };
64
+ export default Pagination;
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- interface PaginationItemProps {
3
- activePage: number;
4
- pageNumber: number | '-';
5
- }
6
- declare function PaginationItem({ activePage, pageNumber }: PaginationItemProps): React.ReactElement;
7
- declare namespace PaginationItem {
8
- var propTypes: {};
9
- }
10
- export default PaginationItem;
1
+ import React from 'react';
2
+ interface PaginationItemProps {
3
+ activePage: number;
4
+ pageNumber: number | '-';
5
+ }
6
+ declare function PaginationItem({ activePage, pageNumber }: PaginationItemProps): React.ReactElement;
7
+ declare namespace PaginationItem {
8
+ var propTypes: {};
9
+ }
10
+ export default PaginationItem;
@@ -1,17 +1,17 @@
1
- import React from 'react';
2
- import Link from '../../components/Link';
3
- import { ifWindow } from '@sqrzro/utility';
4
- const getLinkUrl = (pageNumber) => {
5
- const windowLocation = ifWindow((win) => `${win.location.pathname}${win.location.search}`, '');
6
- const cleanUrl = windowLocation.replace(/(?:\?|&)page=[0-9]+/u, '');
7
- const hasQuery = Boolean(/\?/u.exec(windowLocation) && !/\?page/u.exec(windowLocation));
8
- return `${cleanUrl}${hasQuery ? '&' : '?'}page=${pageNumber}`;
9
- };
10
- function PaginationItem({ activePage, pageNumber }) {
11
- if (pageNumber === '-') {
12
- return (React.createElement("span", { className: "/*styles.gap*/", "data-testid": "pagination-item-gap" }, "\u2022\u2022\u2022"));
13
- }
14
- return (React.createElement(Link, { className: "/*clsx(styles.link, activePage === pageNumber && styles.linkIsActive)*/", "data-testid": "pagination-item-link", to: getLinkUrl(pageNumber) }, pageNumber));
15
- }
16
- PaginationItem.propTypes = {};
17
- export default PaginationItem;
1
+ import React from 'react';
2
+ import Link from '../../components/Link';
3
+ import { ifWindow } from '@sqrzro/utility';
4
+ const getLinkUrl = (pageNumber) => {
5
+ const windowLocation = ifWindow((win) => `${win.location.pathname}${win.location.search}`, '');
6
+ const cleanUrl = windowLocation.replace(/(?:\?|&)page=[0-9]+/u, '');
7
+ const hasQuery = Boolean(/\?/u.exec(windowLocation) && !/\?page/u.exec(windowLocation));
8
+ return `${cleanUrl}${hasQuery ? '&' : '?'}page=${pageNumber}`;
9
+ };
10
+ function PaginationItem({ activePage, pageNumber }) {
11
+ if (pageNumber === '-') {
12
+ return (React.createElement("span", { className: "/*styles.gap*/", "data-testid": "pagination-item-gap" }, "\u2022\u2022\u2022"));
13
+ }
14
+ return (React.createElement(Link, { className: "/*clsx(styles.link, activePage === pageNumber && styles.linkIsActive)*/", "data-testid": "pagination-item-link", to: getLinkUrl(pageNumber) }, pageNumber));
15
+ }
16
+ PaginationItem.propTypes = {};
17
+ export default PaginationItem;
@@ -1,17 +1,17 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- interface PanelProps {
4
- children: React.ReactNode;
5
- isPadded?: boolean;
6
- isSpaced?: boolean;
7
- title?: string;
8
- }
9
- declare function Panel({ children, isPadded, isSpaced, title }: PanelProps): React.ReactElement;
10
- declare namespace Panel {
11
- var propTypes: {
12
- children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
13
- isPadded: PropTypes.Requireable<boolean>;
14
- isSpaced: PropTypes.Requireable<boolean>;
15
- };
16
- }
17
- export default Panel;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ interface PanelProps {
4
+ children: React.ReactNode;
5
+ isPadded?: boolean;
6
+ isSpaced?: boolean;
7
+ title?: string;
8
+ }
9
+ declare function Panel({ children, isPadded, isSpaced, title }: PanelProps): React.ReactElement;
10
+ declare namespace Panel {
11
+ var propTypes: {
12
+ children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
13
+ isPadded: PropTypes.Requireable<boolean>;
14
+ isSpaced: PropTypes.Requireable<boolean>;
15
+ };
16
+ }
17
+ export default Panel;
@@ -1,16 +1,13 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import PropTypes from 'prop-types';
4
- function Panel({ children, isPadded, isSpaced, title }) {
5
- return (React.createElement("div", { className: clsx('bg-white rounded-md mb-2 w-full p-8', {
6
- 'mb-4': isSpaced,
7
- }) },
8
- title ? (React.createElement("h2", { className: "border-b border-b-slate-400 text-lg font-semibold" }, title)) : null,
9
- children));
10
- }
11
- Panel.propTypes = {
12
- children: PropTypes.node.isRequired,
13
- isPadded: PropTypes.bool,
14
- isSpaced: PropTypes.bool,
15
- };
16
- export default Panel;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ function Panel({ children, isPadded, isSpaced, title }) {
4
+ return (React.createElement("div", { className: "clsx(styles.root, isPadded && styles.rootIsPadded, isSpaced && styles.rootIsSpaced)" },
5
+ title ? React.createElement("h2", { className: "/*styles.title*/" }, title) : null,
6
+ children));
7
+ }
8
+ Panel.propTypes = {
9
+ children: PropTypes.node.isRequired,
10
+ isPadded: PropTypes.bool,
11
+ isSpaced: PropTypes.bool,
12
+ };
13
+ export default Panel;
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import type { NextRouter } from 'next/router';
3
- interface PasswordForgotFormProps {
4
- router: Omit<NextRouter, 'events'>;
5
- }
6
- declare function PasswordForgotForm({ router }: PasswordForgotFormProps): React.ReactElement;
7
- export default PasswordForgotForm;
1
+ import React from 'react';
2
+ import type { NextRouter } from 'next/router';
3
+ interface PasswordForgotFormProps {
4
+ router: Omit<NextRouter, 'events'>;
5
+ }
6
+ declare function PasswordForgotForm({ router }: PasswordForgotFormProps): React.ReactElement;
7
+ export default PasswordForgotForm;
@@ -1,40 +1,40 @@
1
- 'use client';
2
- import React from 'react';
3
- import { AuthIdentifier, useForm } from '@sqrzro/hooks';
4
- import Button from '../../components/Button';
5
- import ContentBlock from '../../components/ContentBlock';
6
- import FormField from '../../components/FormField';
7
- import TextInput from '../../components/TextInput';
8
- import AuthForm from '../AuthForm';
9
- import useConfig from '../../hooks/useConfig';
10
- function PasswordForgotForm({ router }) {
11
- const { auth } = useConfig();
12
- const { fieldProps, formProps, isLoading, handleSubmit } = useForm({
13
- defaults: {
14
- identifier: router.query[auth.identifier]?.toString() || '',
15
- },
16
- errorMessage: false,
17
- method: 'post',
18
- successMessage: 'password ',
19
- transformRequest: (data) => ({
20
- [auth.identifier]: data.identifier,
21
- }),
22
- url: auth.passwordUrl,
23
- });
24
- const handleKeyDown = (event) => {
25
- if (event.key === 'Enter') {
26
- handleSubmit();
27
- }
28
- };
29
- return (React.createElement(AuthForm, { ...formProps },
30
- React.createElement(ContentBlock, { title: "Forgotten you password?", isCentered: true },
31
- "Enter your ",
32
- auth.identifier,
33
- ' ',
34
- auth.identifier === AuthIdentifier.email ? 'address' : '',
35
- " and we will send you an email with a link to reset your password:"),
36
- React.createElement(FormField, { ...fieldProps('identifier'), onKeyDown: handleKeyDown, render: TextInput }),
37
- React.createElement("hr", null),
38
- React.createElement(Button, { isDisabled: isLoading, type: "submit", isFullWidth: true }, isLoading ? 'Loading...' : 'Send Reset Email')));
39
- }
40
- export default PasswordForgotForm;
1
+ 'use client';
2
+ import React from 'react';
3
+ import { AuthIdentifier, useForm } from '@sqrzro/hooks';
4
+ import Button from '../../components/Button';
5
+ import ContentBlock from '../../components/ContentBlock';
6
+ import FormField from '../../components/FormField';
7
+ import TextInput from '../../components/TextInput';
8
+ import AuthForm from '../../core/AuthForm';
9
+ import useAppConfig from '../../hooks/useAppConfig';
10
+ function PasswordForgotForm({ router }) {
11
+ const { auth } = useAppConfig();
12
+ const { fieldProps, formProps, isLoading, handleSubmit } = useForm({
13
+ defaults: {
14
+ identifier: router.query[auth.identifier]?.toString() || '',
15
+ },
16
+ errorMessage: false,
17
+ method: 'post',
18
+ successMessage: 'password ',
19
+ transformRequest: (data) => ({
20
+ [auth.identifier]: data.identifier,
21
+ }),
22
+ url: auth.passwordUrl,
23
+ });
24
+ const handleKeyDown = (event) => {
25
+ if (event.key === 'Enter') {
26
+ handleSubmit();
27
+ }
28
+ };
29
+ return (React.createElement(AuthForm, { ...formProps },
30
+ React.createElement(ContentBlock, { title: "Forgotten you password?", isCentered: true },
31
+ "Enter your ",
32
+ auth.identifier,
33
+ ' ',
34
+ auth.identifier === AuthIdentifier.email ? 'address' : '',
35
+ " and we will send you an email with a link to reset your password:"),
36
+ React.createElement(FormField, { ...fieldProps('identifier'), onKeyDown: handleKeyDown, render: TextInput }),
37
+ React.createElement("hr", null),
38
+ React.createElement(Button, { isDisabled: isLoading, type: "submit", isFullWidth: true }, isLoading ? 'Loading...' : 'Send Reset Email')));
39
+ }
40
+ export default PasswordForgotForm;
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import type { NextRouter } from 'next/router';
3
- interface PasswordResetFormProps {
4
- router: Omit<NextRouter, 'events'>;
5
- }
6
- declare function PasswordResetForm({ router }: PasswordResetFormProps): React.ReactElement;
7
- export default PasswordResetForm;
1
+ import React from 'react';
2
+ import type { NextRouter } from 'next/router';
3
+ interface PasswordResetFormProps {
4
+ router: Omit<NextRouter, 'events'>;
5
+ }
6
+ declare function PasswordResetForm({ router }: PasswordResetFormProps): React.ReactElement;
7
+ export default PasswordResetForm;
@@ -1,34 +1,34 @@
1
- 'use client';
2
- import React from 'react';
3
- import { useForm } from '@sqrzro/hooks';
4
- import Button from '../../components/Button';
5
- import FormField from '../../components/FormField';
6
- import PasswordInput from '../../components/PasswordInput';
7
- import AuthForm from '../AuthForm';
8
- import useConfig from '../../hooks/useConfig';
9
- const AUTH_ROUTE = '/auth/login';
10
- function PasswordResetForm({ router }) {
11
- const { auth } = useConfig();
12
- const handleSubmitSuccess = () => {
13
- void router.push(`${AUTH_ROUTE}?email=${router.query.email?.toString() || ''}`);
14
- };
15
- const { fieldProps, formProps, isLoading, handleSubmit } = useForm({
16
- errorMessage: false,
17
- method: 'post',
18
- successMessage: 'Password reset successfully. You can now log in.',
19
- url: auth.passwordUrl,
20
- onSubmitSuccess: handleSubmitSuccess,
21
- transformRequest: (data) => ({ token: router.query.token || '', ...data }),
22
- });
23
- const handleKeyDown = (event) => {
24
- if (event.key === 'Enter') {
25
- handleSubmit();
26
- }
27
- };
28
- return (React.createElement(AuthForm, { ...formProps },
29
- React.createElement(FormField, { ...fieldProps('password'), label: "New Password", render: PasswordInput }),
30
- React.createElement(FormField, { ...fieldProps('password_confirmation'), label: "Confirm New Password", onKeyDown: handleKeyDown, render: PasswordInput }),
31
- React.createElement("hr", null),
32
- React.createElement(Button, { isDisabled: isLoading, type: "submit", isFullWidth: true }, isLoading ? 'Loading...' : 'Reset Password')));
33
- }
34
- export default PasswordResetForm;
1
+ 'use client';
2
+ import React from 'react';
3
+ import { useForm } from '@sqrzro/hooks';
4
+ import Button from '../../components/Button';
5
+ import FormField from '../../components/FormField';
6
+ import PasswordInput from '../../components/PasswordInput';
7
+ import AuthForm from '../../core/AuthForm';
8
+ import useAppConfig from '../../hooks/useAppConfig';
9
+ const AUTH_ROUTE = '/auth/login';
10
+ function PasswordResetForm({ router }) {
11
+ const { auth } = useAppConfig();
12
+ const handleSubmitSuccess = () => {
13
+ void router.push(`${AUTH_ROUTE}?email=${router.query.email?.toString() || ''}`);
14
+ };
15
+ const { fieldProps, formProps, isLoading, handleSubmit } = useForm({
16
+ errorMessage: false,
17
+ method: 'post',
18
+ successMessage: 'Password reset successfully. You can now log in.',
19
+ url: auth.passwordUrl,
20
+ onSubmitSuccess: handleSubmitSuccess,
21
+ transformRequest: (data) => ({ token: router.query.token || '', ...data }),
22
+ });
23
+ const handleKeyDown = (event) => {
24
+ if (event.key === 'Enter') {
25
+ handleSubmit();
26
+ }
27
+ };
28
+ return (React.createElement(AuthForm, { ...formProps },
29
+ React.createElement(FormField, { ...fieldProps('password'), label: "New Password", render: PasswordInput }),
30
+ React.createElement(FormField, { ...fieldProps('password_confirmation'), label: "Confirm New Password", onKeyDown: handleKeyDown, render: PasswordInput }),
31
+ React.createElement("hr", null),
32
+ React.createElement(Button, { isDisabled: isLoading, type: "submit", isFullWidth: true }, isLoading ? 'Loading...' : 'Reset Password')));
33
+ }
34
+ export default PasswordResetForm;
@@ -1,16 +1,16 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- interface RadialProgressProps {
4
- duration: number;
5
- icon: string;
6
- variant?: string;
7
- }
8
- declare function RadialProgress({ duration, icon, variant }: RadialProgressProps): React.ReactElement;
9
- declare namespace RadialProgress {
10
- var propTypes: {
11
- duration: PropTypes.Validator<number>;
12
- icon: PropTypes.Validator<string>;
13
- variant: PropTypes.Requireable<string>;
14
- };
15
- }
16
- export default RadialProgress;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ interface RadialProgressProps {
4
+ duration: number;
5
+ icon: string;
6
+ variant?: string;
7
+ }
8
+ declare function RadialProgress({ duration, icon, variant }: RadialProgressProps): React.ReactElement;
9
+ declare namespace RadialProgress {
10
+ var propTypes: {
11
+ duration: PropTypes.Validator<number>;
12
+ icon: PropTypes.Validator<string>;
13
+ variant: PropTypes.Requireable<string>;
14
+ };
15
+ }
16
+ export default RadialProgress;
@@ -1,23 +1,23 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import Icon from '../Icon';
4
- // Import styles from './RadialProgress.module.css';
5
- const DURATION_FACTOR = 2000;
6
- function RadialProgress({ duration, icon, variant }) {
7
- const adjustedDuration = duration / DURATION_FACTOR;
8
- return (React.createElement("div", { className: "/*styles.root*/" },
9
- React.createElement("div", { className: "/*styles.semi1*/", style: { animationDuration: `${adjustedDuration}s` } }),
10
- React.createElement("div", { className: "/*clsx(styles.mask, variant && styles[`mask${ucwords(variant)`])*/" }),
11
- React.createElement("div", { className: "/*styles.semi2*/", style: {
12
- animationDuration: `${adjustedDuration}s`,
13
- animationDelay: `${adjustedDuration}s`,
14
- } }),
15
- React.createElement("div", { className: "/*clsx(styles.icon, variant && styles[`icon${ucwords(variant)`])*/" },
16
- React.createElement(Icon, { icon: icon, size: 30 }))));
17
- }
18
- RadialProgress.propTypes = {
19
- duration: PropTypes.number.isRequired,
20
- icon: PropTypes.string.isRequired,
21
- variant: PropTypes.string,
22
- };
23
- export default RadialProgress;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Icon from '../../core/Icon';
4
+ // Import styles from './RadialProgress.module.css';
5
+ const DURATION_FACTOR = 2000;
6
+ function RadialProgress({ duration, icon, variant }) {
7
+ const adjustedDuration = duration / DURATION_FACTOR;
8
+ return (React.createElement("div", { className: "/*styles.root*/" },
9
+ React.createElement("div", { className: "/*styles.semi1*/", style: { animationDuration: `${adjustedDuration}s` } }),
10
+ React.createElement("div", { className: "/*clsx(styles.mask, variant && styles[`mask${ucwords(variant)`])*/" }),
11
+ React.createElement("div", { className: "/*styles.semi2*/", style: {
12
+ animationDuration: `${adjustedDuration}s`,
13
+ animationDelay: `${adjustedDuration}s`,
14
+ } }),
15
+ React.createElement("div", { className: "/*clsx(styles.icon, variant && styles[`icon${ucwords(variant)`])*/" },
16
+ React.createElement(Icon, { icon: icon, size: 30 }))));
17
+ }
18
+ RadialProgress.propTypes = {
19
+ duration: PropTypes.number.isRequired,
20
+ icon: PropTypes.string.isRequired,
21
+ variant: PropTypes.string,
22
+ };
23
+ export default RadialProgress;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- declare function SettingsForm(): React.ReactElement;
3
- export default SettingsForm;
1
+ import React from 'react';
2
+ declare function SettingsForm(): React.ReactElement;
3
+ export default SettingsForm;
@@ -1,14 +1,14 @@
1
- 'use client';
2
- import React from 'react';
3
- import { useForm } from '@sqrzro/hooks';
4
- import Form from '../../components/Form';
5
- import FormField from '../../components/FormField';
6
- import ModalActions from '../../components/ModalActions';
7
- import TextInput from '../../components/TextInput';
8
- function SettingsForm() {
9
- const { fieldProps, formProps } = useForm({});
10
- return (React.createElement(Form, { ...formProps },
11
- React.createElement(FormField, { ...fieldProps('name'), label: "Name", render: TextInput }),
12
- React.createElement(ModalActions, { label: "Save Settings" })));
13
- }
14
- export default SettingsForm;
1
+ 'use client';
2
+ import React from 'react';
3
+ import { useForm } from '@sqrzro/hooks';
4
+ import Form from '../../components/Form';
5
+ import FormField from '../../components/FormField';
6
+ import ModalActions from '../../components/ModalActions';
7
+ import TextInput from '../../components/TextInput';
8
+ function SettingsForm() {
9
+ const { fieldProps, formProps } = useForm({});
10
+ return (React.createElement(Form, { ...formProps },
11
+ React.createElement(FormField, { ...fieldProps('name'), label: "Name", render: TextInput }),
12
+ React.createElement(ModalActions, { label: "Save Settings" })));
13
+ }
14
+ export default SettingsForm;