@sqrzro/admin 1.0.0-beta.7 → 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 (773) hide show
  1. package/.eslintrc +5 -1
  2. package/.storybook/main.js +6 -34
  3. package/.storybook/preview-head.html +3 -0
  4. package/.storybook/preview.js +1 -11
  5. package/.turbo/turbo-docs.log +0 -0
  6. package/.turbo/turbo-lint.log +112 -0
  7. package/.turbo/turbo-prettier.log +215 -0
  8. package/.turbo/turbo-test.log +6 -0
  9. package/LICENSE +1 -1
  10. package/dist/{types/components → components}/Alert/index.d.ts +4 -4
  11. package/dist/components/Alert/index.js +15 -0
  12. package/dist/{types/components → components}/Allow/index.d.ts +20 -13
  13. package/dist/components/Allow/index.js +29 -0
  14. package/dist/components/AppLayout/AppLayout.stories.d.ts +5 -0
  15. package/dist/components/AppLayout/AppLayout.stories.js +11 -0
  16. package/dist/components/AppLayout/index.d.ts +6 -0
  17. package/dist/components/AppLayout/index.js +18 -0
  18. package/dist/{types/components → components}/AutoSuggest/index.d.ts +74 -60
  19. package/dist/components/AutoSuggest/index.js +143 -0
  20. package/dist/components/Button/Button.stories.d.ts +11 -0
  21. package/{src/components/Button/Button.story.tsx → dist/components/Button/Button.stories.js} +16 -14
  22. package/dist/{types/components → components}/Button/index.d.ts +49 -36
  23. package/dist/components/Button/index.js +50 -0
  24. package/dist/components/CalendarInput/index.d.ts +24 -0
  25. package/dist/components/CalendarInput/index.js +54 -0
  26. package/dist/{types/components → components}/CheckboxList/index.d.ts +17 -17
  27. package/dist/components/CheckboxList/index.js +25 -0
  28. package/dist/components/CodeInput/index.d.ts +9 -0
  29. package/dist/components/CodeInput/index.js +51 -0
  30. package/dist/{types/components → components}/ConnectedDropdown/index.d.ts +14 -14
  31. package/dist/components/ConnectedDropdown/index.js +36 -0
  32. package/dist/{types/components → components}/ConnectedList/index.d.ts +5 -5
  33. package/dist/components/ConnectedList/index.js +7 -0
  34. package/dist/{types/components → components}/ConnectedTable/index.d.ts +5 -5
  35. package/dist/components/ConnectedTable/index.js +7 -0
  36. package/dist/{types/components → components}/ContentBlock/index.d.ts +16 -16
  37. package/dist/components/ContentBlock/index.js +13 -0
  38. package/dist/components/DataPanel/index.d.ts +8 -0
  39. package/dist/components/DataPanel/index.js +8 -0
  40. package/dist/components/DateInput/index.d.ts +18 -0
  41. package/dist/components/DateInput/index.js +81 -0
  42. package/dist/{types/components → components}/Dropdown/index.d.ts +36 -36
  43. package/dist/components/Dropdown/index.js +122 -0
  44. package/dist/components/ErrorMessage/index.d.ts +16 -0
  45. package/dist/components/ErrorMessage/index.js +17 -0
  46. package/dist/components/Fieldset/index.d.ts +18 -0
  47. package/dist/components/Fieldset/index.js +19 -0
  48. package/dist/{types/components → components}/FileInput/index.d.ts +10 -10
  49. package/dist/components/FileInput/index.js +26 -0
  50. package/dist/components/FilterLink/index.d.ts +14 -0
  51. package/dist/components/FilterLink/index.js +15 -0
  52. package/dist/components/Form/index.d.ts +14 -0
  53. package/dist/components/Form/index.js +15 -0
  54. package/dist/components/FormActions/index.d.ts +18 -0
  55. package/dist/components/FormActions/index.js +14 -0
  56. package/dist/{types/components → components}/FormField/index.d.ts +14 -14
  57. package/dist/components/FormField/index.js +40 -0
  58. package/dist/components/FormRepeater/index.d.ts +18 -0
  59. package/dist/components/FormRepeater/index.js +65 -0
  60. package/dist/{types/components → components}/ImageInput/index.d.ts +13 -13
  61. package/dist/components/ImageInput/index.js +45 -0
  62. package/dist/components/InfoPanel/index.d.ts +14 -0
  63. package/dist/components/InfoPanel/index.js +11 -0
  64. package/dist/{types/components → components}/Link/__mocks__/index.d.ts +6 -6
  65. package/dist/components/Link/__mocks__/index.js +12 -0
  66. package/dist/components/Link/index.d.ts +23 -0
  67. package/dist/components/Link/index.js +21 -0
  68. package/dist/{types/components → components}/List/index.d.ts +36 -36
  69. package/dist/components/List/index.js +46 -0
  70. package/dist/components/ListActions/index.d.ts +18 -0
  71. package/dist/components/ListActions/index.js +14 -0
  72. package/dist/components/LoginForm/index.d.ts +3 -0
  73. package/dist/components/LoginForm/index.js +47 -0
  74. package/dist/components/Message/index.d.ts +14 -0
  75. package/dist/components/Message/index.js +14 -0
  76. package/dist/{types/components → components}/Modal/index.d.ts +4 -4
  77. package/dist/components/Modal/index.js +18 -0
  78. package/dist/components/ModalActions/index.d.ts +21 -0
  79. package/dist/components/ModalActions/index.js +18 -0
  80. package/dist/{types/components → components}/MoneyInput/index.d.ts +10 -10
  81. package/dist/components/MoneyInput/index.js +13 -0
  82. package/dist/components/PasswordForm/index.d.ts +35 -0
  83. package/dist/components/PasswordForm/index.js +21 -0
  84. package/dist/components/PasswordInput/index.d.ts +4 -0
  85. package/dist/components/PasswordInput/index.js +12 -0
  86. package/dist/{types/components → components}/RadioList/index.d.ts +9 -9
  87. package/dist/components/RadioList/index.js +7 -0
  88. package/dist/components/RootLayout/index.d.ts +6 -0
  89. package/dist/components/RootLayout/index.js +7 -0
  90. package/dist/components/SummaryList/index.d.ts +18 -0
  91. package/dist/components/SummaryList/index.js +15 -0
  92. package/dist/components/Switch/index.d.ts +21 -0
  93. package/dist/components/Switch/index.js +31 -0
  94. package/dist/{types/components → components}/Table/index.d.ts +28 -28
  95. package/dist/components/Table/index.js +55 -0
  96. package/dist/components/Tag/index.d.ts +15 -0
  97. package/dist/components/Tag/index.js +13 -0
  98. package/dist/components/TextArea/index.d.ts +18 -0
  99. package/dist/components/TextArea/index.js +26 -0
  100. package/dist/{types/components → components}/TextInput/index.d.ts +14 -14
  101. package/dist/components/TextInput/index.js +27 -0
  102. package/dist/{types/components → components}/WebsiteInput/index.d.ts +10 -10
  103. package/dist/components/WebsiteInput/index.js +13 -0
  104. package/dist/components/WeekCalendar/index.d.ts +24 -0
  105. package/dist/components/WeekCalendar/index.js +48 -0
  106. package/dist/{types/core → core}/AlertComponent/index.d.ts +26 -26
  107. package/dist/core/AlertComponent/index.js +35 -0
  108. package/dist/{types/core → core}/AppHeader/index.d.ts +3 -3
  109. package/dist/core/AppHeader/index.js +17 -0
  110. package/dist/core/AppLogo/index.d.ts +12 -0
  111. package/dist/core/AppLogo/index.js +16 -0
  112. package/dist/{types/core → core}/AppLogoImage/index.d.ts +3 -3
  113. package/dist/core/AppLogoImage/index.js +11 -0
  114. package/dist/{types/core → core}/AppLogoPlaceholder/index.d.ts +3 -3
  115. package/dist/core/AppLogoPlaceholder/index.js +10 -0
  116. package/dist/core/Assistive/index.d.ts +12 -0
  117. package/dist/core/Assistive/index.js +9 -0
  118. package/dist/core/AuthForm/index.d.ts +10 -0
  119. package/dist/core/AuthForm/index.js +13 -0
  120. package/dist/{types/core → core}/Banner/index.d.ts +3 -3
  121. package/dist/core/Banner/index.js +14 -0
  122. package/dist/core/Calendar/index.d.ts +21 -0
  123. package/dist/core/Calendar/index.js +69 -0
  124. package/dist/core/CalendarDay/index.d.ts +30 -0
  125. package/dist/core/CalendarDay/index.js +30 -0
  126. package/dist/core/CalendarMonth/index.d.ts +23 -0
  127. package/dist/core/CalendarMonth/index.js +45 -0
  128. package/dist/core/CalendarNavigation/index.d.ts +17 -0
  129. package/dist/core/CalendarNavigation/index.js +24 -0
  130. package/dist/core/CalendarWeek/index.d.ts +28 -0
  131. package/dist/core/CalendarWeek/index.js +46 -0
  132. package/dist/core/ChkRad/index.d.ts +26 -0
  133. package/dist/core/ChkRad/index.js +33 -0
  134. package/dist/core/ChkRadIcon/index.d.ts +14 -0
  135. package/dist/core/ChkRadIcon/index.js +12 -0
  136. package/dist/{types/core → core}/ChkRadList/index.d.ts +32 -32
  137. package/dist/core/ChkRadList/index.js +37 -0
  138. package/dist/core/CloseButton/index.d.ts +17 -0
  139. package/dist/core/CloseButton/index.js +12 -0
  140. package/dist/{types/core → core}/ConfirmModal/index.d.ts +3 -3
  141. package/dist/core/ConfirmModal/index.js +38 -0
  142. package/dist/{types/core → core}/ConnectedRepeater/index.d.ts +50 -50
  143. package/dist/core/ConnectedRepeater/index.js +154 -0
  144. package/dist/{types/core → core}/ConnectedRepeaterComponent/index.d.ts +24 -24
  145. package/dist/core/ConnectedRepeaterComponent/index.js +25 -0
  146. package/dist/core/Container/index.d.ts +14 -0
  147. package/dist/core/Container/index.js +12 -0
  148. package/dist/core/DataPanelItem/index.d.ts +8 -0
  149. package/dist/core/DataPanelItem/index.js +7 -0
  150. package/dist/core/DropdownPanel/index.d.ts +31 -0
  151. package/dist/core/DropdownPanel/index.js +32 -0
  152. package/dist/{types/core → core}/EmptyMessage/index.d.ts +21 -14
  153. package/dist/core/EmptyMessage/index.js +21 -0
  154. package/dist/core/FilterItem/index.d.ts +25 -0
  155. package/dist/core/FilterItem/index.js +82 -0
  156. package/dist/core/Filters/index.d.ts +31 -0
  157. package/dist/core/Filters/index.js +85 -0
  158. package/dist/{types/core → core}/FixedActions/index.d.ts +24 -24
  159. package/dist/core/FixedActions/index.js +22 -0
  160. package/dist/core/FormError/index.d.ts +12 -0
  161. package/dist/core/FormError/index.js +9 -0
  162. package/dist/core/FormLabel/index.d.ts +16 -0
  163. package/dist/core/FormLabel/index.js +13 -0
  164. package/dist/core/FormLegend/index.d.ts +12 -0
  165. package/dist/core/FormLegend/index.js +9 -0
  166. package/dist/core/Header/Header.stories.d.ts +5 -0
  167. package/dist/core/Header/Header.stories.js +11 -0
  168. package/dist/core/Header/index.d.ts +14 -0
  169. package/dist/core/Header/index.js +12 -0
  170. package/dist/core/Icon/index.d.ts +14 -0
  171. package/dist/core/Icon/index.js +32 -0
  172. package/dist/core/IconButton/index.d.ts +22 -0
  173. package/dist/core/IconButton/index.js +20 -0
  174. package/dist/core/InputPanel/index.d.ts +16 -0
  175. package/dist/core/InputPanel/index.js +11 -0
  176. package/dist/{types/core → core}/ListItem/index.d.ts +39 -38
  177. package/dist/core/ListItem/index.js +44 -0
  178. package/dist/core/ListItemAction/index.d.ts +11 -0
  179. package/dist/core/ListItemAction/index.js +13 -0
  180. package/dist/{types/core → core}/ListItemActions/index.d.ts +8 -8
  181. package/dist/core/ListItemActions/index.js +16 -0
  182. package/dist/core/ListItemMetaItem/index.d.ts +19 -0
  183. package/dist/core/ListItemMetaItem/index.js +29 -0
  184. package/dist/core/ListItemTitle/index.d.ts +19 -0
  185. package/dist/core/ListItemTitle/index.js +44 -0
  186. package/dist/core/Loader/index.d.ts +15 -0
  187. package/dist/core/Loader/index.js +16 -0
  188. package/dist/core/MeActions/index.d.ts +3 -0
  189. package/dist/core/MeActions/index.js +48 -0
  190. package/dist/{types/core → core}/MePanel/index.d.ts +19 -19
  191. package/dist/core/MePanel/index.js +29 -0
  192. package/dist/core/ModalComponent/index.d.ts +22 -0
  193. package/dist/core/ModalComponent/index.js +29 -0
  194. package/dist/{types/core → core}/Navigation/index.d.ts +3 -3
  195. package/dist/core/Navigation/index.js +33 -0
  196. package/dist/{types/core → core}/NavigationDivider/index.d.ts +3 -3
  197. package/dist/core/NavigationDivider/index.js +8 -0
  198. package/dist/core/NavigationItem/index.d.ts +16 -0
  199. package/dist/core/NavigationItem/index.js +21 -0
  200. package/dist/core/Pagination/index.d.ts +15 -0
  201. package/{src/core/Pagination/index.tsx → dist/core/Pagination/index.js} +10 -46
  202. package/dist/core/PaginationItem/index.d.ts +10 -0
  203. package/dist/core/PaginationItem/index.js +17 -0
  204. package/dist/core/Panel/index.d.ts +17 -0
  205. package/dist/core/Panel/index.js +13 -0
  206. package/dist/{types/core → core}/PasswordForgotForm/index.d.ts +7 -7
  207. package/dist/core/PasswordForgotForm/index.js +40 -0
  208. package/dist/{types/core → core}/PasswordResetForm/index.d.ts +7 -7
  209. package/dist/core/PasswordResetForm/index.js +34 -0
  210. package/dist/core/RadialProgress/index.d.ts +16 -0
  211. package/dist/core/RadialProgress/index.js +23 -0
  212. package/dist/core/SettingsForm/index.d.ts +3 -0
  213. package/dist/core/SettingsForm/index.js +14 -0
  214. package/dist/core/StaticTextInput/index.d.ts +29 -0
  215. package/dist/core/StaticTextInput/index.js +39 -0
  216. package/dist/{types/core → core}/Styled/index.d.ts +6 -6
  217. package/{src/core/Styled/index.tsx → dist/core/Styled/index.js} +7 -30
  218. package/dist/core/SummaryListItem/index.d.ts +23 -0
  219. package/dist/core/SummaryListItem/index.js +31 -0
  220. package/dist/core/TabItem/index.d.ts +4 -0
  221. package/dist/core/TabItem/index.js +13 -0
  222. package/dist/{types/core → core}/TableActionsCell/index.d.ts +8 -8
  223. package/dist/core/TableActionsCell/index.js +8 -0
  224. package/dist/core/TableCell/index.d.ts +15 -0
  225. package/dist/core/TableCell/index.js +20 -0
  226. package/dist/core/TableHead/index.d.ts +18 -0
  227. package/dist/core/TableHead/index.js +18 -0
  228. package/dist/{types/core → core}/TableRow/index.d.ts +13 -13
  229. package/dist/core/TableRow/index.js +18 -0
  230. package/dist/core/Tabs/index.d.ts +7 -0
  231. package/dist/core/Tabs/index.js +13 -0
  232. package/dist/core/TextInputAncillary/index.d.ts +29 -0
  233. package/dist/core/TextInputAncillary/index.js +31 -0
  234. package/dist/{types/core → core}/Toast/index.d.ts +3 -3
  235. package/dist/core/Toast/index.js +47 -0
  236. package/dist/core/TwoFactor/index.d.ts +13 -0
  237. package/dist/core/TwoFactor/index.js +49 -0
  238. package/dist/{types/core/LoginFormAuthenticator → core/TwoFactorAuthenticator}/index.d.ts +10 -10
  239. package/dist/core/TwoFactorAuthenticator/index.js +9 -0
  240. package/dist/core/TwoFactorMethodList/index.d.ts +10 -0
  241. package/dist/core/TwoFactorMethodList/index.js +22 -0
  242. package/dist/core/TwoFactorSetup/index.d.ts +12 -0
  243. package/dist/core/TwoFactorSetup/index.js +43 -0
  244. package/dist/core/TwoFactorSetupAuthenticator/index.d.ts +20 -0
  245. package/dist/core/TwoFactorSetupAuthenticator/index.js +42 -0
  246. package/dist/core/TwoFactorSetupYubikey/index.d.ts +16 -0
  247. package/dist/core/TwoFactorSetupYubikey/index.js +14 -0
  248. package/dist/{types/core/LoginFormYubikey → core/TwoFactorYubikey}/index.d.ts +9 -9
  249. package/dist/core/TwoFactorYubikey/index.js +14 -0
  250. package/dist/core/WeekCalendarDay/index.d.ts +27 -0
  251. package/dist/core/WeekCalendarDay/index.js +35 -0
  252. package/dist/core/YubikeyInput/index.d.ts +4 -0
  253. package/dist/core/YubikeyInput/index.js +14 -0
  254. package/dist/filters/BooleanFilter/index.d.ts +14 -0
  255. package/dist/filters/BooleanFilter/index.js +35 -0
  256. package/dist/filters/DateFilter/index.d.ts +5 -0
  257. package/dist/filters/DateFilter/index.js +24 -0
  258. package/dist/filters/DropdownFilter/index.d.ts +17 -0
  259. package/dist/filters/DropdownFilter/index.js +32 -0
  260. package/dist/filters/QuickDateFilter/index.d.ts +13 -0
  261. package/dist/filters/QuickDateFilter/index.js +40 -0
  262. package/dist/{types/filters → filters}/interfaces.d.ts +35 -35
  263. package/dist/filters/interfaces.js +1 -0
  264. package/dist/{types/hooks → hooks}/useAlert.d.ts +12 -12
  265. package/dist/hooks/useAlert.js +18 -0
  266. package/dist/hooks/useAppConfig.d.ts +3 -0
  267. package/dist/hooks/useAppConfig.js +5 -0
  268. package/dist/{types/hooks → hooks}/useConnectedList.d.ts +7 -7
  269. package/dist/hooks/useConnectedList.js +6 -0
  270. package/dist/{types/hooks → hooks}/useConnectedRepeater.d.ts +7 -7
  271. package/dist/hooks/useConnectedRepeater.js +14 -0
  272. package/dist/{types/hooks → hooks}/useConnectedTable.d.ts +7 -7
  273. package/dist/hooks/useConnectedTable.js +6 -0
  274. package/dist/hooks/useFilters.d.ts +9 -0
  275. package/dist/hooks/useFilters.js +24 -0
  276. package/dist/{types/hooks → hooks}/useLayout.d.ts +7 -7
  277. package/dist/hooks/useLayout.js +10 -0
  278. package/dist/hooks/useLayout.spec.d.ts +1 -0
  279. package/dist/hooks/useLayout.spec.js +24 -0
  280. package/dist/{types/hooks → hooks}/useModal.d.ts +12 -12
  281. package/dist/hooks/useModal.js +39 -0
  282. package/dist/hooks/useModalOffset.d.ts +2 -0
  283. package/dist/hooks/useModalOffset.js +16 -0
  284. package/dist/hooks/useModalOffset.spec.d.ts +1 -0
  285. package/dist/hooks/useModalOffset.spec.js +19 -0
  286. package/dist/hooks/useNavigation.d.ts +7 -0
  287. package/dist/hooks/useNavigation.js +113 -0
  288. package/dist/hooks/useRemote.d.ts +7 -0
  289. package/dist/hooks/useRemote.js +29 -0
  290. package/dist/hooks/useVariant.d.ts +9 -0
  291. package/dist/hooks/useVariant.js +14 -0
  292. package/dist/{types/index.d.ts → index.d.ts} +209 -203
  293. package/dist/index.js +213 -5459
  294. package/dist/{types/scenes → scenes}/Error404Scene.d.ts +3 -3
  295. package/dist/scenes/Error404Scene.js +5 -0
  296. package/dist/services/AppService.d.ts +5 -0
  297. package/dist/services/AppService.js +11 -0
  298. package/dist/services/ConfigService.d.ts +42 -0
  299. package/dist/services/ConfigService.js +52 -0
  300. package/dist/{types/services → services}/ConfirmService.d.ts +12 -12
  301. package/dist/services/ConfirmService.js +10 -0
  302. package/dist/services/DateService.d.ts +26 -0
  303. package/dist/services/DateService.js +132 -0
  304. package/dist/services/DateService.spec.d.ts +1 -0
  305. package/dist/services/DateService.spec.js +83 -0
  306. package/dist/services/DownloadService.d.ts +7 -0
  307. package/dist/services/DownloadService.js +16 -0
  308. package/dist/services/DownloadService.spec.d.ts +1 -0
  309. package/dist/services/DownloadService.spec.js +18 -0
  310. package/dist/{types/services → services}/FilterComponentService.d.ts +25 -25
  311. package/dist/services/FilterComponentService.js +54 -0
  312. package/dist/services/FilterService.d.ts +34 -0
  313. package/dist/services/FilterService.js +58 -0
  314. package/dist/services/FilterService.spec.d.ts +1 -0
  315. package/dist/services/FilterService.spec.js +67 -0
  316. package/dist/services/FormatService.d.ts +11 -0
  317. package/dist/services/FormatService.js +45 -0
  318. package/dist/services/FormatService.spec.d.ts +1 -0
  319. package/dist/services/FormatService.spec.js +66 -0
  320. package/dist/services/ToastService.d.ts +7 -0
  321. package/dist/services/ToastService.js +17 -0
  322. package/dist/services/ToastService.spec.d.ts +1 -0
  323. package/dist/services/ToastService.spec.js +34 -0
  324. package/dist/styles.css +984 -0
  325. package/dist/utility/MockRouter/index.d.ts +2 -0
  326. package/dist/utility/MockRouter/index.js +37 -0
  327. package/dist/utility/StorybookPanel/index.d.ts +14 -0
  328. package/dist/utility/StorybookPanel/index.js +12 -0
  329. package/dist/utility/TestChangeHandler/index.d.ts +15 -0
  330. package/dist/utility/TestChangeHandler/index.js +30 -0
  331. package/dist/utility/icons.d.ts +3 -0
  332. package/dist/utility/icons.js +12 -0
  333. package/dist/{types/utility → utility}/interfaces.d.ts +79 -69
  334. package/dist/utility/interfaces.js +18 -0
  335. package/dist/utility/middleware.d.ts +4 -0
  336. package/dist/utility/middleware.js +9 -0
  337. package/dist/{types/utility → utility}/prop-types.d.ts +57 -55
  338. package/dist/utility/prop-types.js +77 -0
  339. package/dist/utility/register.d.ts +3 -0
  340. package/dist/utility/register.js +9 -0
  341. package/package.json +53 -88
  342. package/postcss.config.js +1 -1
  343. package/prettier.config.js +1 -0
  344. package/src/components/Alert/index.tsx +103 -13
  345. package/src/components/Allow/Allow.spec.tsx +2 -2
  346. package/src/components/Allow/index.tsx +8 -8
  347. package/src/components/AppLayout/AppLayout.stories.tsx +20 -0
  348. package/src/components/AppLayout/index.tsx +22 -0
  349. package/src/components/AutoSuggest/AutoSuggest.spec.tsx +38 -18
  350. package/src/components/AutoSuggest/AutoSuggest.story.tsx +8 -6
  351. package/src/components/AutoSuggest/index.tsx +30 -30
  352. package/src/components/Button/Button.spec.tsx +8 -0
  353. package/src/components/Button/Button.stories.tsx +62 -0
  354. package/src/components/Button/index.tsx +9 -93
  355. package/src/components/CalendarInput/CalendarInput.spec.tsx +38 -22
  356. package/src/components/CalendarInput/CalendarInput.story.tsx +2 -2
  357. package/src/components/CalendarInput/index.tsx +23 -19
  358. package/src/components/CheckboxList/CheckboxList.spec.tsx +20 -10
  359. package/src/components/CheckboxList/index.tsx +9 -12
  360. package/src/components/ConnectedDropdown/index.tsx +7 -5
  361. package/src/components/ConnectedList/index.tsx +13 -11
  362. package/src/components/ConnectedTable/index.tsx +15 -13
  363. package/src/components/ContentBlock/index.tsx +10 -8
  364. package/src/components/DataPanel/index.tsx +25 -0
  365. package/src/components/DateInput/DateInput.spec.tsx +10 -6
  366. package/src/components/DateInput/index.tsx +11 -12
  367. package/src/components/ErrorMessage/index.tsx +18 -20
  368. package/src/components/Fieldset/Fieldset.story.tsx +17 -13
  369. package/src/components/Fieldset/index.tsx +12 -10
  370. package/src/components/FileInput/FileInput.spec.tsx +9 -5
  371. package/src/components/FileInput/FileInput.story.tsx +3 -1
  372. package/src/components/FileInput/index.tsx +12 -10
  373. package/src/components/FilterLink/FilterLink.spec.tsx +18 -4
  374. package/src/components/FilterLink/index.tsx +19 -14
  375. package/src/components/Form/Form.spec.tsx +7 -5
  376. package/src/components/Form/index.tsx +5 -3
  377. package/src/components/FormActions/FormActions.story.tsx +19 -15
  378. package/src/components/FormActions/index.tsx +11 -7
  379. package/src/components/FormField/FormField.spec.tsx +28 -39
  380. package/src/components/FormField/FormField.stories.tsx +44 -0
  381. package/src/components/FormField/index.tsx +8 -103
  382. package/src/components/FormRepeater/FormRepeater.spec.tsx +26 -14
  383. package/src/components/FormRepeater/index.tsx +9 -7
  384. package/src/components/ImageInput/ImageInput.spec.tsx +3 -1
  385. package/src/components/ImageInput/ImageInput.story.tsx +3 -1
  386. package/src/components/ImageInput/index.tsx +16 -14
  387. package/src/components/InfoPanel/index.tsx +7 -7
  388. package/src/components/Link/Link.spec.tsx +4 -2
  389. package/src/components/Link/__mocks__/index.tsx +3 -3
  390. package/src/components/Link/index.tsx +6 -6
  391. package/src/components/List/List.spec.tsx +57 -20
  392. package/src/components/List/List.story.tsx +21 -2
  393. package/src/components/List/index.tsx +13 -13
  394. package/src/components/ListActions/ListActions.story.tsx +3 -1
  395. package/src/components/ListActions/index.tsx +10 -11
  396. package/src/components/LoginForm/LoginForm.spec.tsx +19 -7
  397. package/src/components/LoginForm/LoginForm.story.tsx +25 -0
  398. package/src/components/LoginForm/index.tsx +72 -171
  399. package/src/components/Message/index.tsx +12 -10
  400. package/src/components/Modal/index.tsx +18 -12
  401. package/src/components/ModalActions/ModalActions.spec.tsx +4 -2
  402. package/src/components/ModalActions/ModalActions.story.tsx +3 -1
  403. package/src/components/ModalActions/index.tsx +22 -18
  404. package/src/components/MoneyInput/MoneyInput.story.tsx +3 -1
  405. package/src/components/MoneyInput/index.tsx +7 -5
  406. package/src/components/PasswordForm/index.tsx +12 -24
  407. package/src/components/RadioList/RadioList.spec.tsx +4 -2
  408. package/src/components/RadioList/index.tsx +8 -6
  409. package/src/components/RootLayout/index.tsx +45 -0
  410. package/src/components/SummaryList/SummaryList.module.css +19 -4
  411. package/src/components/SummaryList/SummaryList.spec.tsx +14 -2
  412. package/src/components/SummaryList/SummaryList.story.tsx +3 -1
  413. package/src/components/SummaryList/index.tsx +16 -14
  414. package/src/components/Switch/Switch.spec.tsx +8 -4
  415. package/src/components/Switch/index.tsx +16 -14
  416. package/src/components/Table/Table.spec.tsx +11 -7
  417. package/src/components/Table/Table.story.tsx +3 -3
  418. package/src/components/Table/index.tsx +20 -22
  419. package/src/components/TextArea/TextArea.spec.tsx +12 -6
  420. package/src/components/TextArea/index.tsx +10 -8
  421. package/src/components/TextInput/TextInput.module.css +1 -0
  422. package/src/components/TextInput/TextInput.spec.tsx +12 -6
  423. package/src/components/TextInput/TextInput.stories.tsx +46 -0
  424. package/src/components/TextInput/index.tsx +6 -99
  425. package/src/components/WebsiteInput/index.tsx +7 -5
  426. package/src/components/WeekCalendar/index.tsx +8 -8
  427. package/src/core/AlertComponent/AlertComponent.spec.tsx +17 -4
  428. package/src/core/AlertComponent/AlertComponent.story.tsx +19 -15
  429. package/src/core/AlertComponent/index.tsx +30 -25
  430. package/src/core/AppHeader/index.tsx +5 -3
  431. package/src/core/AppLogo/index.tsx +9 -7
  432. package/src/core/AppLogoImage/index.tsx +6 -6
  433. package/src/core/AppLogoPlaceholder/index.tsx +28 -22
  434. package/src/core/Assistive/index.tsx +1 -18
  435. package/src/{components/LoginForm/LoginForm.module.css → core/AuthForm/AuthForm.module.css} +4 -0
  436. package/src/core/AuthForm/AuthForm.spec.tsx +72 -0
  437. package/src/core/AuthForm/index.tsx +63 -0
  438. package/src/core/Banner/index.tsx +11 -11
  439. package/src/core/Calendar/index.tsx +9 -7
  440. package/src/core/CalendarDay/index.tsx +12 -12
  441. package/src/core/CalendarMonth/index.tsx +14 -12
  442. package/src/core/CalendarNavigation/index.tsx +14 -14
  443. package/src/core/CalendarWeek/index.tsx +21 -19
  444. package/src/core/ChkRadList/index.tsx +25 -23
  445. package/src/core/CloseButton/CloseButton.spec.tsx +4 -2
  446. package/src/core/CloseButton/index.tsx +10 -8
  447. package/src/core/ConfirmModal/ConfirmModal.spec.tsx +10 -4
  448. package/src/core/ConfirmModal/index.tsx +9 -7
  449. package/src/core/ConnectedRepeater/index.tsx +46 -19
  450. package/src/core/ConnectedRepeaterComponent/index.tsx +13 -9
  451. package/src/core/Container/index.tsx +6 -12
  452. package/src/core/DataPanelItem/index.tsx +19 -0
  453. package/src/core/EmptyMessage/EmptyMessage.stories.tsx +33 -0
  454. package/src/core/EmptyMessage/index.tsx +9 -42
  455. package/src/core/FilterItem/index.tsx +41 -33
  456. package/src/core/Filters/Filters.spec.tsx +103 -69
  457. package/src/core/Filters/index.tsx +39 -31
  458. package/src/core/FixedActions/FixedActions.module.css +6 -0
  459. package/src/core/FixedActions/FixedActions.spec.tsx +8 -3
  460. package/src/core/FixedActions/index.tsx +9 -9
  461. package/src/core/FormLegend/index.tsx +4 -4
  462. package/src/core/Header/Header.stories.tsx +20 -0
  463. package/src/core/Header/index.tsx +8 -13
  464. package/src/core/Icon/Icon.spec.tsx +1 -3
  465. package/src/core/Icon/index.tsx +14 -10
  466. package/src/core/IconButton/index.tsx +18 -20
  467. package/src/core/ListItem/ListItem.story.tsx +23 -19
  468. package/src/core/ListItem/index.tsx +46 -37
  469. package/src/core/ListItemAction/index.tsx +7 -14
  470. package/src/core/ListItemActions/index.tsx +13 -12
  471. package/src/core/ListItemMetaItem/index.tsx +8 -8
  472. package/src/core/ListItemTitle/ListItemTitle.module.css +9 -1
  473. package/src/core/ListItemTitle/ListItemTitle.spec.tsx +24 -2
  474. package/src/core/ListItemTitle/index.tsx +20 -10
  475. package/src/core/Loader/Loader.module.css +3 -3
  476. package/src/core/Loader/Loader.stories.tsx +22 -0
  477. package/src/core/Loader/index.tsx +2 -27
  478. package/src/core/MeActions/index.tsx +28 -18
  479. package/src/core/MePanel/index.tsx +10 -10
  480. package/src/core/ModalComponent/ModalComponent.spec.tsx +8 -4
  481. package/src/core/ModalComponent/index.tsx +13 -13
  482. package/src/core/Navigation/Navigation.spec.tsx +47 -36
  483. package/src/core/Navigation/index.tsx +18 -58
  484. package/src/core/NavigationDivider/index.tsx +6 -6
  485. package/src/core/NavigationItem/index.tsx +12 -21
  486. package/src/core/Panel/Panel.module.css +11 -0
  487. package/src/core/Panel/Panel.spec.tsx +16 -0
  488. package/src/core/Panel/index.tsx +17 -13
  489. package/src/core/PasswordForgotForm/index.tsx +15 -12
  490. package/src/core/PasswordResetForm/index.tsx +15 -12
  491. package/src/core/RadialProgress/index.tsx +11 -14
  492. package/src/core/SettingsForm/index.tsx +9 -8
  493. package/src/core/SummaryListItem/SummaryListItem.module.css +3 -11
  494. package/src/core/SummaryListItem/index.tsx +19 -14
  495. package/src/core/TabItem/TabItem.module.css +28 -0
  496. package/src/core/TabItem/index.tsx +42 -0
  497. package/src/core/Tabs/Tabs.module.css +0 -24
  498. package/src/core/Tabs/Tabs.spec.tsx +30 -0
  499. package/src/core/Tabs/index.tsx +18 -76
  500. package/src/core/Toast/Toast.spec.tsx +4 -2
  501. package/src/core/Toast/index.tsx +16 -18
  502. package/src/core/TwoFactor/TwoFactor.spec.tsx +183 -0
  503. package/src/core/TwoFactor/index.tsx +102 -0
  504. package/src/core/TwoFactorAuthenticator/index.tsx +39 -0
  505. package/src/core/{LoginFormTwoFactor/LoginFormTwoFactor.module.css → TwoFactorMethodList/TwoFactorMethodList.module.css} +1 -1
  506. package/src/core/TwoFactorMethodList/index.tsx +49 -0
  507. package/src/core/TwoFactorSetup/index.tsx +91 -0
  508. package/src/core/TwoFactorSetupAuthenticator/TwoFactorSetupAuthenticator.module.css +6 -0
  509. package/src/core/TwoFactorSetupAuthenticator/index.tsx +100 -0
  510. package/src/core/TwoFactorSetupYubikey/index.tsx +49 -0
  511. package/src/core/TwoFactorYubikey/index.tsx +41 -0
  512. package/src/core/WeekCalendarDay/index.tsx +7 -7
  513. package/src/core/{LoginFormYubikey/LoginFormYubikey.module.css → YubikeyInput/YubikeyInput.module.css} +5 -0
  514. package/src/core/YubikeyInput/YubikeyInput.spec.tsx +77 -0
  515. package/src/core/YubikeyInput/index.tsx +76 -0
  516. package/src/filters/BooleanFilter/index.tsx +13 -12
  517. package/src/filters/DateFilter/index.tsx +8 -8
  518. package/src/filters/DropdownFilter/index.tsx +19 -17
  519. package/src/filters/QuickDateFilter/index.tsx +12 -12
  520. package/src/filters/interfaces.ts +2 -2
  521. package/src/hooks/useAlert.spec.tsx +72 -0
  522. package/src/hooks/useAlert.ts +7 -5
  523. package/src/hooks/useConfig.ts +31 -0
  524. package/src/hooks/useConnectedList.ts +4 -4
  525. package/src/hooks/useConnectedRepeater.ts +8 -6
  526. package/src/hooks/useConnectedTable.ts +4 -4
  527. package/src/hooks/useFilters.ts +21 -13
  528. package/src/hooks/useLayout.spec.ts +3 -11
  529. package/src/hooks/useLayout.ts +8 -7
  530. package/src/hooks/useModal.spec.tsx +23 -15
  531. package/src/hooks/useModal.ts +17 -17
  532. package/src/hooks/useModalOffset.ts +4 -2
  533. package/src/hooks/useNavigation.ts +160 -0
  534. package/src/hooks/useRemote.ts +43 -0
  535. package/src/index.ts +31 -26
  536. package/src/scenes/Error404Scene.tsx +3 -1
  537. package/src/services/AppService.ts +16 -0
  538. package/src/services/ConfigService.ts +93 -0
  539. package/src/services/ConfirmService.ts +7 -2
  540. package/src/services/DateService.ts +48 -32
  541. package/src/services/DownloadService.spec.ts +4 -10
  542. package/src/services/DownloadService.ts +16 -9
  543. package/src/services/FilterComponentService.tsx +9 -5
  544. package/src/services/FilterService.spec.ts +57 -39
  545. package/src/services/FilterService.ts +62 -40
  546. package/src/services/FormatService.spec.ts +2 -0
  547. package/src/services/FormatService.ts +13 -8
  548. package/src/services/ToastService.ts +9 -4
  549. package/src/styles/tailwind.css +57 -0
  550. package/src/typings.d.ts +2 -2
  551. package/src/utility/MockRouter/index.ts +1 -0
  552. package/src/utility/icons.tsx +46 -30
  553. package/src/utility/interfaces.ts +39 -21
  554. package/src/utility/middleware.ts +10 -0
  555. package/src/utility/prop-types.ts +6 -2
  556. package/src/utility/register.tsx +11 -0
  557. package/tailwind.config.js +11 -0
  558. package/tsconfig.eslint.json +4 -0
  559. package/tsconfig.json +7 -15
  560. package/.gitattributes +0 -1
  561. package/.github/workflows/development.yml +0 -47
  562. package/.prettierrc +0 -9
  563. package/.storybook/manager.js +0 -4
  564. package/.storybook/postcss.config.js +0 -3
  565. package/.storybook/theme.js +0 -7
  566. package/.stylelintrc +0 -9
  567. package/__mocks__/@sqrzro/utility.ts +0 -43
  568. package/assets/logo-horizontal-dark.svg +0 -21
  569. package/assets/logo-horizontal-white.svg +0 -21
  570. package/assets/logo-vertical-dark.svg +0 -21
  571. package/assets/logo-vertical-white.svg +0 -21
  572. package/dist/index.css +0 -3812
  573. package/dist/index.js.map +0 -1
  574. package/dist/types/components/App/index.d.ts +0 -18
  575. package/dist/types/components/CalendarInput/index.d.ts +0 -10
  576. package/dist/types/components/CodeInput/index.d.ts +0 -9
  577. package/dist/types/components/ConnectedListScene/index.d.ts +0 -7
  578. package/dist/types/components/ConnectedScene/index.d.ts +0 -11
  579. package/dist/types/components/DateInput/index.d.ts +0 -7
  580. package/dist/types/components/Document/index.d.ts +0 -3
  581. package/dist/types/components/ErrorMessage/index.d.ts +0 -8
  582. package/dist/types/components/Fieldset/index.d.ts +0 -11
  583. package/dist/types/components/FilterLink/index.d.ts +0 -7
  584. package/dist/types/components/Form/index.d.ts +0 -14
  585. package/dist/types/components/FormActions/index.d.ts +0 -9
  586. package/dist/types/components/FormRepeater/index.d.ts +0 -9
  587. package/dist/types/components/InfoPanel/index.d.ts +0 -8
  588. package/dist/types/components/Link/index.d.ts +0 -13
  589. package/dist/types/components/ListActions/index.d.ts +0 -9
  590. package/dist/types/components/LoginForm/index.d.ts +0 -3
  591. package/dist/types/components/Message/index.d.ts +0 -7
  592. package/dist/types/components/ModalActions/index.d.ts +0 -11
  593. package/dist/types/components/PasswordForm/index.d.ts +0 -3
  594. package/dist/types/components/PasswordInput/index.d.ts +0 -4
  595. package/dist/types/components/Scene/index.d.ts +0 -10
  596. package/dist/types/components/SummaryList/index.d.ts +0 -8
  597. package/dist/types/components/Switch/index.d.ts +0 -9
  598. package/dist/types/components/Tag/index.d.ts +0 -8
  599. package/dist/types/components/TextArea/index.d.ts +0 -4
  600. package/dist/types/components/WeekCalendar/index.d.ts +0 -12
  601. package/dist/types/core/App/index.d.ts +0 -19
  602. package/dist/types/core/AppLogo/index.d.ts +0 -6
  603. package/dist/types/core/Assistive/index.d.ts +0 -6
  604. package/dist/types/core/BuildModal/index.d.ts +0 -3
  605. package/dist/types/core/Calendar/index.d.ts +0 -11
  606. package/dist/types/core/CalendarDay/index.d.ts +0 -16
  607. package/dist/types/core/CalendarMonth/index.d.ts +0 -12
  608. package/dist/types/core/CalendarNavigation/index.d.ts +0 -9
  609. package/dist/types/core/CalendarWeek/index.d.ts +0 -14
  610. package/dist/types/core/ChkRad/index.d.ts +0 -13
  611. package/dist/types/core/ChkRadIcon/index.d.ts +0 -7
  612. package/dist/types/core/CloseButton/index.d.ts +0 -9
  613. package/dist/types/core/ConnectedList/index.d.ts +0 -4
  614. package/dist/types/core/ConnectedTable/index.d.ts +0 -4
  615. package/dist/types/core/Container/index.d.ts +0 -7
  616. package/dist/types/core/DropdownPanel/index.d.ts +0 -18
  617. package/dist/types/core/ErrorBoundary/index.d.ts +0 -15
  618. package/dist/types/core/ErrorMessage/index.d.ts +0 -8
  619. package/dist/types/core/FilterItem/index.d.ts +0 -10
  620. package/dist/types/core/Filters/index.d.ts +0 -15
  621. package/dist/types/core/Form/index.d.ts +0 -12
  622. package/dist/types/core/FormError/index.d.ts +0 -6
  623. package/dist/types/core/FormLabel/index.d.ts +0 -8
  624. package/dist/types/core/FormLegend/index.d.ts +0 -6
  625. package/dist/types/core/Header/index.d.ts +0 -8
  626. package/dist/types/core/Icon/index.d.ts +0 -7
  627. package/dist/types/core/IconButton/Icon/index.d.ts +0 -7
  628. package/dist/types/core/IconButton/index.d.ts +0 -11
  629. package/dist/types/core/InputPanel/index.d.ts +0 -8
  630. package/dist/types/core/ListItemAction/index.d.ts +0 -4
  631. package/dist/types/core/ListItemMetaItem/index.d.ts +0 -10
  632. package/dist/types/core/ListItemTitle/index.d.ts +0 -9
  633. package/dist/types/core/Loader/index.d.ts +0 -6
  634. package/dist/types/core/LoginFormTwoFactor/index.d.ts +0 -13
  635. package/dist/types/core/MeActions/index.d.ts +0 -3
  636. package/dist/types/core/Modal/index.d.ts +0 -12
  637. package/dist/types/core/ModalComponent/index.d.ts +0 -12
  638. package/dist/types/core/NavigationItem/index.d.ts +0 -7
  639. package/dist/types/core/Pagination/index.d.ts +0 -7
  640. package/dist/types/core/PaginationItem/index.d.ts +0 -7
  641. package/dist/types/core/Panel/index.d.ts +0 -8
  642. package/dist/types/core/RadialProgress/index.d.ts +0 -8
  643. package/dist/types/core/SettingsForm/index.d.ts +0 -3
  644. package/dist/types/core/StaticTextInput/index.d.ts +0 -13
  645. package/dist/types/core/SummaryListItem/index.d.ts +0 -15
  646. package/dist/types/core/TableCell/index.d.ts +0 -8
  647. package/dist/types/core/TableHead/index.d.ts +0 -8
  648. package/dist/types/core/Tabs/index.d.ts +0 -11
  649. package/dist/types/core/TextInputAncillary/index.d.ts +0 -12
  650. package/dist/types/core/WeekCalendarDay/index.d.ts +0 -14
  651. package/dist/types/filters/BooleanFilter/index.d.ts +0 -5
  652. package/dist/types/filters/DateFilter/index.d.ts +0 -5
  653. package/dist/types/filters/DropdownFilter/index.d.ts +0 -17
  654. package/dist/types/filters/QuickDateFilter/index.d.ts +0 -5
  655. package/dist/types/hooks/useAccessiblePanel.d.ts +0 -13
  656. package/dist/types/hooks/useAppContext.d.ts +0 -55
  657. package/dist/types/hooks/useClickOutside.d.ts +0 -3
  658. package/dist/types/hooks/useComponentId.d.ts +0 -2
  659. package/dist/types/hooks/useFilters.d.ts +0 -3
  660. package/dist/types/hooks/useForm.d.ts +0 -41
  661. package/dist/types/hooks/useFormData.d.ts +0 -12
  662. package/dist/types/hooks/useModalOffset.d.ts +0 -2
  663. package/dist/types/hooks/useVariant.d.ts +0 -6
  664. package/dist/types/services/BuildService.d.ts +0 -5
  665. package/dist/types/services/DateService.d.ts +0 -17
  666. package/dist/types/services/DownloadService.d.ts +0 -5
  667. package/dist/types/services/FilterService.d.ts +0 -13
  668. package/dist/types/services/FormatService.d.ts +0 -7
  669. package/dist/types/services/OLD_ApiService.d.ts +0 -19
  670. package/dist/types/services/ToastService.d.ts +0 -5
  671. package/dist/types/utility/MockRouter/index.d.ts +0 -2
  672. package/dist/types/utility/StorybookPanel/index.d.ts +0 -7
  673. package/dist/types/utility/TestChangeHandler/index.d.ts +0 -15
  674. package/dist/types/utility/create-app.d.ts +0 -4
  675. package/dist/types/utility/icons.d.ts +0 -3
  676. package/docs/guides/01-installation.story.mdx +0 -33
  677. package/docs/guides/02-configuration.story.mdx +0 -80
  678. package/docs/guides/03-pages.story.mdx +0 -18
  679. package/docs/guides/04-integration.story.mdx +0 -33
  680. package/docs/guides/a11y.story.mdx +0 -7
  681. package/docs/guides/theming.story.mdx +0 -7
  682. package/docs/introduction.story.mdx +0 -17
  683. package/jest.config.js +0 -19
  684. package/rollup.config.js +0 -36
  685. package/scripts/create-exports.js +0 -74
  686. package/scripts/update-license.js +0 -8
  687. package/squarezero.config.js +0 -5
  688. package/src/components/Button/Button.module.css +0 -100
  689. package/src/components/CodeInput/CodeInput.module.css +0 -33
  690. package/src/components/CodeInput/CodeInput.spec.tsx +0 -180
  691. package/src/components/CodeInput/index.tsx +0 -138
  692. package/src/components/ConnectedScene/index.tsx +0 -96
  693. package/src/components/Document/index.tsx +0 -14
  694. package/src/components/Dropdown/Dropdown.module.css +0 -8
  695. package/src/components/Dropdown/Dropdown.spec.tsx +0 -304
  696. package/src/components/Dropdown/Dropdown.story.tsx +0 -53
  697. package/src/components/Dropdown/index.tsx +0 -228
  698. package/src/components/FormField/FormField.story.tsx +0 -29
  699. package/src/components/PasswordForm/PasswordForm.module.css +0 -21
  700. package/src/components/PasswordInput/PasswordInput.module.css +0 -23
  701. package/src/components/PasswordInput/PasswordInput.spec.tsx +0 -28
  702. package/src/components/PasswordInput/PasswordInput.story.tsx +0 -16
  703. package/src/components/PasswordInput/index.tsx +0 -23
  704. package/src/components/Scene/Scene.spec.tsx +0 -123
  705. package/src/components/Scene/Scene.story.tsx +0 -6
  706. package/src/components/Scene/index.tsx +0 -58
  707. package/src/components/Tag/Tag.module.css +0 -37
  708. package/src/components/Tag/Tag.spec.tsx +0 -10
  709. package/src/components/Tag/Tag.story.tsx +0 -55
  710. package/src/components/Tag/index.tsx +0 -27
  711. package/src/components/TextInput/TextInput.story.tsx +0 -24
  712. package/src/core/App/App.module.css +0 -24
  713. package/src/core/App/App.spec.tsx +0 -265
  714. package/src/core/App/index.tsx +0 -115
  715. package/src/core/Assistive/Assistive.module.css +0 -10
  716. package/src/core/ChkRad/ChkRad.module.css +0 -31
  717. package/src/core/ChkRad/ChkRad.spec.tsx +0 -79
  718. package/src/core/ChkRad/index.tsx +0 -75
  719. package/src/core/ChkRadIcon/ChkRadIcon.module.css +0 -29
  720. package/src/core/ChkRadIcon/index.tsx +0 -33
  721. package/src/core/DropdownPanel/DropdownPanel.module.css +0 -68
  722. package/src/core/DropdownPanel/index.tsx +0 -93
  723. package/src/core/ErrorBoundary/ErrorBoundary.spec.tsx +0 -33
  724. package/src/core/ErrorBoundary/index.tsx +0 -42
  725. package/src/core/FormError/FormError.module.css +0 -7
  726. package/src/core/FormError/index.tsx +0 -18
  727. package/src/core/FormLabel/FormLabel.module.css +0 -15
  728. package/src/core/FormLabel/index.tsx +0 -25
  729. package/src/core/Header/Header.module.css +0 -28
  730. package/src/core/InputPanel/InputPanel.module.css +0 -70
  731. package/src/core/InputPanel/index.tsx +0 -28
  732. package/src/core/Loader/Loader.story.tsx +0 -8
  733. package/src/core/LoginFormAuthenticator/index.tsx +0 -36
  734. package/src/core/LoginFormTwoFactor/index.tsx +0 -133
  735. package/src/core/LoginFormYubikey/index.tsx +0 -59
  736. package/src/core/Pagination/Pagination.module.css +0 -15
  737. package/src/core/PaginationItem/PaginationItem.module.css +0 -33
  738. package/src/core/PaginationItem/index.tsx +0 -46
  739. package/src/core/StaticTextInput/StaticTextInput.module.css +0 -79
  740. package/src/core/StaticTextInput/StaticTextInput.spec.tsx +0 -126
  741. package/src/core/StaticTextInput/index.tsx +0 -112
  742. package/src/core/Styled/Styled.spec.tsx +0 -32
  743. package/src/core/Styled/Styled.story.tsx +0 -10
  744. package/src/core/TableActionsCell/TableActionsCell.module.css +0 -3
  745. package/src/core/TableActionsCell/index.tsx +0 -26
  746. package/src/core/TableCell/TableCell.module.css +0 -16
  747. package/src/core/TableCell/index.tsx +0 -39
  748. package/src/core/TableHead/TableHead.module.css +0 -12
  749. package/src/core/TableHead/index.tsx +0 -48
  750. package/src/core/TableRow/index.tsx +0 -49
  751. package/src/core/TextInputAncillary/TextInputAncillary.module.css +0 -69
  752. package/src/core/TextInputAncillary/index.tsx +0 -84
  753. package/src/hooks/useAccessiblePanel.spec.tsx +0 -88
  754. package/src/hooks/useAccessiblePanel.ts +0 -74
  755. package/src/hooks/useAppContext.spec.ts +0 -38
  756. package/src/hooks/useAppContext.ts +0 -110
  757. package/src/hooks/useClickOutside.ts +0 -49
  758. package/src/hooks/useComponentId.spec.ts +0 -19
  759. package/src/hooks/useComponentId.ts +0 -16
  760. package/src/hooks/useForm.spec.ts +0 -251
  761. package/src/hooks/useForm.ts +0 -179
  762. package/src/hooks/useVariant.spec.ts +0 -14
  763. package/src/hooks/useVariant.ts +0 -34
  764. package/src/styles/layout.css +0 -64
  765. package/src/styles/variables.css +0 -85
  766. package/src/utility/StorybookPanel/StorybookPanel.module.css +0 -9
  767. package/src/utility/StorybookPanel/index.tsx +0 -25
  768. package/src/utility/TestChangeHandler/TestChangeHandler.module.css +0 -7
  769. package/src/utility/TestChangeHandler/TestChangeHandler.spec.tsx +0 -24
  770. package/src/utility/TestChangeHandler/index.tsx +0 -51
  771. package/src/utility/create-app.tsx +0 -28
  772. package/tests/setupFilesAfterEnv.js +0 -16
  773. package/tsconfig.types.json +0 -9
@@ -1,87 +1,105 @@
1
+ import type { FilterMap } from '../utility/interfaces';
2
+
1
3
  import FilterService from './FilterService';
2
4
 
3
5
  describe('FilterService', () => {
4
- describe('parseQuery', () => {
6
+ describe('getFiltersFromContext', () => {
5
7
  it('should handle no arguments', () => {
6
- expect(FilterService.parseQuery()).toEqual(new Map());
8
+ expect(FilterService.getFiltersFromContext(null)).toEqual(new Map());
7
9
  });
8
10
 
9
- it('should parse a value', () => {
10
- const search = { lorem: 'ipsum' };
11
+ it('should parse a value (location)', () => {
12
+ const location = { pathname: '', search: 'filter[lorem]=ipsum' };
11
13
 
12
14
  const result = new Map();
13
15
  result.set('lorem', 'ipsum');
14
16
 
15
- expect(FilterService.parseQuery(search)).toEqual(result);
17
+ expect(FilterService.getFiltersFromContext({ location })).toEqual(result);
16
18
  });
17
19
 
18
- it('should parse an array', () => {
19
- const search = { lorem: ['1', '2'] };
20
+ it('should parse an array (location)', () => {
21
+ const location = { pathname: '', search: 'filter[lorem][0]=1&filter[lorem][1]=2' };
20
22
 
21
23
  const result = new Map();
22
24
  result.set('lorem', ['1', '2']);
23
25
 
24
- expect(FilterService.parseQuery(search)).toEqual(result);
26
+ expect(FilterService.getFiltersFromContext({ location })).toEqual(result);
25
27
  });
26
28
 
27
- it('should filter default keys', () => {
28
- const search = { alias: 'lorem' };
29
+ it('should filter no value (location)', () => {
30
+ const location = { pathname: '', search: 'filter[lorem]=' };
29
31
  const result = new Map();
30
32
 
31
- expect(FilterService.parseQuery(search)).toEqual(result);
33
+ expect(FilterService.getFiltersFromContext({ location })).toEqual(result);
32
34
  });
33
35
 
34
- it('should filter no value', () => {
35
- const search = { lorem: '' };
36
+ it('should parse a value (query)', () => {
37
+ const query = { filter: { lorem: 'ipsum' } };
38
+
36
39
  const result = new Map();
40
+ result.set('lorem', 'ipsum');
37
41
 
38
- expect(FilterService.parseQuery(search)).toEqual(result);
42
+ expect(FilterService.getFiltersFromContext({ query })).toEqual(result);
39
43
  });
40
44
 
41
- it('should not filter page', () => {
42
- const search = { page: '1' };
45
+ it('should parse an array (query)', () => {
46
+ const query = { filter: { lorem: ['1', '2'] } };
43
47
 
44
48
  const result = new Map();
45
- result.set('page', '1');
49
+ result.set('lorem', ['1', '2']);
46
50
 
47
- expect(FilterService.parseQuery(search)).toEqual(result);
51
+ expect(FilterService.getFiltersFromContext({ query })).toEqual(result);
48
52
  });
49
53
 
50
- it('should filter page', () => {
51
- const search = { page: '1' };
54
+ it('should filter no value (query)', () => {
55
+ const query = { filter: { lorem: '' } };
52
56
  const result = new Map();
53
57
 
54
- expect(FilterService.parseQuery(search, { shouldFilterPage: true })).toEqual(result);
58
+ expect(FilterService.getFiltersFromContext({ query })).toEqual(result);
55
59
  });
56
60
  });
57
61
 
58
- describe('makeUrl', () => {
59
- it('should make url', () => {
60
- const data = new Map<string, string>();
61
- data.set('lorem', 'ipsum');
62
+ describe('setFiltersUrlFromContext', () => {
63
+ it('should make basic url (location)', () => {
64
+ const location = { pathname: 'lorem', search: '' };
65
+
66
+ const filters: FilterMap = new Map();
67
+ filters.set('lorem', 'ipsum');
62
68
 
63
- expect(FilterService.makeUrl(data)).toBe('/?lorem=ipsum');
69
+ expect(FilterService.setFiltersUrlFromContext({ location }, filters)).toBe(
70
+ encodeURI('/lorem?filter[lorem]=ipsum')
71
+ );
64
72
  });
65
73
 
66
- it('should make url without pathname', () => {
67
- const data = new Map<string, string>();
68
- data.set('lorem', 'ipsum');
74
+ it('should make url with an array (location)', () => {
75
+ const location = { pathname: 'lorem', search: '' };
69
76
 
70
- expect(FilterService.makeUrl(data, false)).toBe('lorem=ipsum');
77
+ const filters: FilterMap = new Map();
78
+ filters.set('lorem', ['1', '2']);
79
+
80
+ expect(FilterService.setFiltersUrlFromContext({ location }, filters)).toBe(
81
+ encodeURI('/lorem?filter[lorem][0]=1&filter[lorem][1]=2')
82
+ );
71
83
  });
72
84
 
73
- it('should make url with array', () => {
74
- const data = new Map<string, string[]>();
75
- data.set('lorem', ['ipsum', 'dolor']);
85
+ it('should make url with no value (location)', () => {
86
+ const location = { pathname: 'lorem', search: '' };
87
+ const filters: FilterMap = new Map();
76
88
 
77
- expect(FilterService.makeUrl(data)).toBe(encodeURI('/?lorem[0]=ipsum&lorem[1]=dolor'));
89
+ expect(FilterService.setFiltersUrlFromContext({ location }, filters)).toBe(
90
+ encodeURI('/lorem')
91
+ );
78
92
  });
79
- });
80
93
 
81
- describe('getUrlForFilters', () => {
82
- it('should get basic url', () => {
83
- const url = FilterService.getUrlForFilters();
84
- expect(url).toBe('/?');
94
+ it('should make basic url with existing query (location)', () => {
95
+ const location = { pathname: 'lorem', search: '?ipsum=dolor' };
96
+
97
+ const filters: FilterMap = new Map();
98
+ filters.set('lorem', 'ipsum');
99
+
100
+ expect(FilterService.setFiltersUrlFromContext({ location }, filters)).toBe(
101
+ encodeURI('/lorem?ipsum=dolor&filter[lorem]=ipsum')
102
+ );
85
103
  });
86
104
  });
87
105
  });
@@ -1,58 +1,80 @@
1
- import { parseSearch, stringifySearch } from '@sqrzro/utility';
1
+ import { UrlService, ifWindow, parseSearch } from '@sqrzro/utility';
2
2
 
3
- /* eslint-disable @typescript-eslint/consistent-indexed-object-style */
4
- interface Query {
5
- [key: string]: Query | Query[] | string[] | string;
6
- }
7
- /* eslint-enable */
3
+ import type { FilterMap } from '../utility/interfaces';
8
4
 
9
- export type FilterMap = Map<string, string[] | string>;
5
+ interface FilterContext {
6
+ location?: { pathname: string; search: string };
7
+ path?: string;
8
+ query?: { filter?: Record<string, string[] | string> };
9
+ }
10
10
 
11
- export interface FilterOptions {
12
- shouldFilterPage?: boolean;
11
+ function getDefaultContext(context: FilterContext | null): FilterContext | null {
12
+ if (context) {
13
+ return context;
14
+ }
15
+ return ifWindow((win) => win, null);
13
16
  }
14
17
 
15
- const FILTERED_KEYS = ['id', 'alias'];
18
+ /**
19
+ * Take either a query string (from a window.location.search, for example) or a query object (e.g.
20
+ * from an Express-style Request object), and return a filter map.
21
+ *
22
+ * @param ctx Either a window element or an Express-style Request object
23
+ * @returns A filter map for the specified filters
24
+ */
25
+ function getFiltersFromContext(ctx: FilterContext | null): FilterMap {
26
+ const map: FilterMap = new Map();
27
+ const context = getDefaultContext(ctx);
16
28
 
17
- const parseQueryEntry = (entry: Query | Query[] | string[] | string): string[] | string => {
18
- if (Array.isArray(entry)) {
19
- return entry.map((item) => item.toString());
29
+ if (!context) {
30
+ return map;
20
31
  }
21
32
 
22
- return entry.toString();
23
- };
33
+ const search = context.location ? parseSearch(context.location.search) : context.query;
24
34
 
25
- const parseQuery = (query?: Query, options?: FilterOptions): FilterMap => {
26
- const map = new Map<string, string[] | string>();
35
+ if (!search?.filter || typeof search.filter !== 'object') {
36
+ return map;
37
+ }
27
38
 
28
- const entries = Object.entries(query || {}).filter(([key, value]) => {
29
- if (value === '') {
30
- return false;
31
- }
32
- if (FILTERED_KEYS.includes(key)) {
33
- return false;
34
- }
35
- if (options?.shouldFilterPage && key === 'page') {
36
- return false;
37
- }
38
- return true;
39
- });
39
+ for (const [key, value] of Object.entries(search.filter)) {
40
+ if (value) {
41
+ const stringValue = Array.isArray(value)
42
+ ? value.map((item) => String(item))
43
+ : value.toString();
40
44
 
41
- for (const [key, value] of entries) {
42
- map.set(key, parseQueryEntry(value));
45
+ map.set(key, stringValue);
46
+ }
43
47
  }
44
48
 
45
49
  return map;
46
- };
50
+ }
51
+
52
+ /**
53
+ * Take either a query string (from a window.location.search, for example) or a query object (e.g.
54
+ * from an Express-style Request object), and a filter map of the specified filter values, and
55
+ * return a url that can be used to apply those specified filters.
56
+ *
57
+ * @param ctx Either a window element or an Express-style Request object
58
+ * @param filters A filter map for the specified filters
59
+ * @returns A url with the specified filters applied
60
+ */
61
+ function setFiltersUrlFromContext(ctx: FilterContext | null, filters: FilterMap): string {
62
+ const context = getDefaultContext(ctx);
47
63
 
48
- const makeUrl = (data: FilterMap, includePathname = true): string =>
49
- `${includePathname ? `${window.location.pathname}?` : ''}${stringifySearch(
50
- Object.fromEntries(data)
51
- )}`;
64
+ if (!context) {
65
+ return '';
66
+ }
67
+
68
+ const pathname = context.location ? context.location.pathname : context.path;
69
+ const search = context.location ? parseSearch(context.location.search) : context.query;
70
+
71
+ return UrlService.build(pathname || '', search, filters);
72
+ }
52
73
 
53
- const getUrlForFilters = (data?: Query, includePathname: boolean = true): string => {
54
- const filters = parseQuery({ ...parseSearch(window.location.search), ...(data || {}) });
55
- return makeUrl(filters, includePathname);
74
+ // eslint-disable-next-line @typescript-eslint/naming-convention
75
+ const FilterService = {
76
+ getFiltersFromContext,
77
+ setFiltersUrlFromContext,
56
78
  };
57
79
 
58
- export default { getUrlForFilters, makeUrl, parseQuery };
80
+ export default FilterService;
@@ -1,3 +1,5 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */
2
+
1
3
  import FormatService from './FormatService';
2
4
 
3
5
  describe('Format Service', () => {
@@ -2,7 +2,7 @@ import { format as fnsFormat, parseISO } from 'date-fns';
2
2
 
3
3
  const TWO_DIGITS = 10;
4
4
 
5
- const formatDate = (value?: unknown, formatString: string = 'dd/MM/Y'): string => {
5
+ function formatDate(value?: unknown, formatString: string = 'dd/MM/Y'): string {
6
6
  if (!value || (typeof value !== 'string' && !(value instanceof Date))) {
7
7
  return '';
8
8
  }
@@ -14,14 +14,18 @@ const formatDate = (value?: unknown, formatString: string = 'dd/MM/Y'): string =
14
14
  } catch (err) {
15
15
  return '';
16
16
  }
17
- };
17
+ }
18
18
 
19
- const formatDatetime = (value?: unknown): string => formatDate(value, 'dd/MM/Y HH:mm');
19
+ function formatDatetime(value?: unknown): string {
20
+ return formatDate(value, 'dd/MM/Y HH:mm');
21
+ }
20
22
 
21
23
  // eslint-disable-next-line prefer-named-capture-group
22
- const addCommas = (value: string): string => value.replace(/(\d)(?=(\d{3})+(?!\d))/gu, '$1,');
24
+ function addCommas(value: string): string {
25
+ return value.replace(/(\d)(?=(\d{3})+(?!\d))/gu, '$1,');
26
+ }
23
27
 
24
- const formatMoney = (value?: unknown): string => {
28
+ function formatMoney(value?: unknown): string {
25
29
  if (!value || (typeof value !== 'string' && typeof value !== 'number')) {
26
30
  return '';
27
31
  }
@@ -30,9 +34,9 @@ const formatMoney = (value?: unknown): string => {
30
34
  const numberValue = isNegative ? value.toString().substring(1) : value.toString();
31
35
 
32
36
  return `${isNegative ? '-' : ''}£${addCommas(parseFloat(numberValue).toFixed(2))}`;
33
- };
37
+ }
34
38
 
35
- const formatTwoDigits = (value?: unknown): string => {
39
+ function formatTwoDigits(value?: unknown): string {
36
40
  if (!value || (typeof value !== 'string' && typeof value !== 'number')) {
37
41
  return '';
38
42
  }
@@ -43,8 +47,9 @@ const formatTwoDigits = (value?: unknown): string => {
43
47
  return `${isNegative ? '-' : ''}${
44
48
  parseInt(numberValue, 10) < TWO_DIGITS ? '0' : ''
45
49
  }${numberValue}`;
46
- };
50
+ }
47
51
 
52
+ // eslint-disable-next-line @typescript-eslint/naming-convention
48
53
  const FormatService = {
49
54
  date: formatDate,
50
55
  datetime: formatDatetime,
@@ -2,18 +2,23 @@ import { EventService } from '@sqrzro/utility';
2
2
 
3
3
  const INTERVAL = 200;
4
4
 
5
- const send = (type: string, message: string): void => {
5
+ function send(type: string, message: string): void {
6
6
  EventService.publish('@toast/send', {});
7
7
 
8
8
  setTimeout(() => {
9
9
  EventService.publish('@toast/send', { type, message });
10
10
  }, INTERVAL);
11
- };
11
+ }
12
12
 
13
- const success = (message: string): void => send('success', message);
13
+ function success(message: string): void {
14
+ return send('success', message);
15
+ }
14
16
 
15
- const error = (message: string): void => send('error', message);
17
+ function error(message: string): void {
18
+ return send('error', message);
19
+ }
16
20
 
21
+ // eslint-disable-next-line @typescript-eslint/naming-convention
17
22
  const ToastService = { success, error };
18
23
 
19
24
  export default ToastService;
@@ -0,0 +1,57 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ @keyframes backdropEnter {
7
+ from {
8
+ opacity: 0;
9
+ }
10
+
11
+ to {
12
+ opacity: 1;
13
+ }
14
+ }
15
+
16
+ dialog {
17
+ background-color: transparent;
18
+ padding: 0;
19
+ }
20
+
21
+ dialog::backdrop {
22
+ animation: backdropEnter .3s;
23
+ @apply bg-slate-800/80;
24
+ }
25
+
26
+ svg {
27
+ height: 100%;
28
+ width: 100%;
29
+ }
30
+ }
31
+
32
+ @layer components {
33
+ @keyframes alertEnter {
34
+ 0% {
35
+ opacity: 0;
36
+ transform: translate3d(0, 2rem, 0);
37
+ }
38
+
39
+ 100% {
40
+ opacity: 1;
41
+ transform: translate3d(0, 0, 0);
42
+ }
43
+ }
44
+
45
+ .alert {
46
+ animation: alertEnter .15s ease-in-out;
47
+ animation-delay: .2s;
48
+ animation-fill-mode: both;
49
+ }
50
+
51
+ .app-logo svg {
52
+ height: calc(100% - 1.5rem);
53
+ max-height: 2.5rem;
54
+ max-width: 2.5rem;
55
+ width: calc(100% - 1.5rem);
56
+ }
57
+ }
package/src/typings.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  declare module '*.module.css' {
2
- const classNames: Record<string, string>;
3
- export = classNames;
2
+ const clsx: Record<string, string>;
3
+ export = clsx;
4
4
  }
@@ -22,6 +22,7 @@ export const createMockRouter = (
22
22
  off: (): null => null,
23
23
  on: (): null => null,
24
24
  },
25
+ forward: () => null,
25
26
  isFallback: false,
26
27
  isLocaleDomain: false,
27
28
  isPreview: false,
@@ -2,34 +2,50 @@
2
2
 
3
3
  import React from 'react';
4
4
 
5
- export const AuthenticatorIcon = (): JSX.Element => (
6
- <svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
7
- <path
8
- clipRule="evenodd"
9
- d="M6.19881 1.39934C6.65631 0.84017 7.30087 0.5 8 0.5H16C16.6991 0.5 17.3437 0.84017 17.8012 1.39934C18.2564 1.95572 18.5 2.69238 18.5 3.44444V20.5556C18.5 21.3076 18.2564 22.0443 17.8012 22.6007C17.3437 23.1598 16.6991 23.5 16 23.5H8C7.30087 23.5 6.65631 23.1598 6.19881 22.6007C5.74359 22.0443 5.5 21.3076 5.5 20.5556V3.44444C5.5 2.69238 5.74359 1.95572 6.19881 1.39934ZM8 1.5C7.63826 1.5 7.26541 1.67491 6.97276 2.03258C6.67784 2.39304 6.5 2.8999 6.5 3.44444V20.5556C6.5 21.1001 6.67784 21.607 6.97276 21.9674C7.26541 22.3251 7.63826 22.5 8 22.5H16C16.3617 22.5 16.7346 22.3251 17.0272 21.9674C17.3222 21.607 17.5 21.1001 17.5 20.5556V3.44444C17.5 2.8999 17.3222 2.39304 17.0272 2.03258C16.7346 1.67491 16.3617 1.5 16 1.5H8ZM11.5 19.3333C11.5 19.0572 11.7239 18.8333 12 18.8333H12.01C12.2861 18.8333 12.51 19.0572 12.51 19.3333C12.51 19.6095 12.2861 19.8333 12.01 19.8333H12C11.7239 19.8333 11.5 19.6095 11.5 19.3333Z"
10
- fill="currentColor"
11
- fillRule="evenodd"
12
- />
13
- </svg>
14
- );
5
+ export function AuthenticatorIcon(): JSX.Element {
6
+ return (
7
+ <svg
8
+ fill="none"
9
+ height="24"
10
+ viewBox="0 0 24 24"
11
+ width="24"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ >
14
+ <path
15
+ clipRule="evenodd"
16
+ d="M6.19881 1.39934C6.65631 0.84017 7.30087 0.5 8 0.5H16C16.6991 0.5 17.3437 0.84017 17.8012 1.39934C18.2564 1.95572 18.5 2.69238 18.5 3.44444V20.5556C18.5 21.3076 18.2564 22.0443 17.8012 22.6007C17.3437 23.1598 16.6991 23.5 16 23.5H8C7.30087 23.5 6.65631 23.1598 6.19881 22.6007C5.74359 22.0443 5.5 21.3076 5.5 20.5556V3.44444C5.5 2.69238 5.74359 1.95572 6.19881 1.39934ZM8 1.5C7.63826 1.5 7.26541 1.67491 6.97276 2.03258C6.67784 2.39304 6.5 2.8999 6.5 3.44444V20.5556C6.5 21.1001 6.67784 21.607 6.97276 21.9674C7.26541 22.3251 7.63826 22.5 8 22.5H16C16.3617 22.5 16.7346 22.3251 17.0272 21.9674C17.3222 21.607 17.5 21.1001 17.5 20.5556V3.44444C17.5 2.8999 17.3222 2.39304 17.0272 2.03258C16.7346 1.67491 16.3617 1.5 16 1.5H8ZM11.5 19.3333C11.5 19.0572 11.7239 18.8333 12 18.8333H12.01C12.2861 18.8333 12.51 19.0572 12.51 19.3333C12.51 19.6095 12.2861 19.8333 12.01 19.8333H12C11.7239 19.8333 11.5 19.6095 11.5 19.3333Z"
17
+ fill="currentColor"
18
+ fillRule="evenodd"
19
+ />
20
+ </svg>
21
+ );
22
+ }
15
23
 
16
- export const YubikeyIcon = (): JSX.Element => (
17
- <svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
18
- <path
19
- d="M11.5 20.1667C11.5 19.8905 11.7239 19.6667 12 19.6667H12.01C12.2861 19.6667 12.51 19.8905 12.51 20.1667C12.51 20.4428 12.2861 20.6667 12.01 20.6667H12C11.7239 20.6667 11.5 20.4428 11.5 20.1667Z"
20
- fill="currentColor"
21
- />
22
- <path
23
- clipRule="evenodd"
24
- d="M12 9C9.79086 9 8 10.7909 8 13C8 15.2091 9.79086 17 12 17C14.2091 17 16 15.2091 16 13C16 10.7909 14.2091 9 12 9ZM9 13C9 11.3431 10.3431 10 12 10C13.6569 10 15 11.3431 15 13C15 14.6569 13.6569 16 12 16C10.3431 16 9 14.6569 9 13Z"
25
- fill="currentColor"
26
- fillRule="evenodd"
27
- />
28
- <path
29
- clipRule="evenodd"
30
- d="M7.5 0.5H16.5V5.54825C16.97 5.6399 17.4083 5.85994 17.7575 6.18974C18.2292 6.63525 18.5 7.24579 18.5 7.88889V21.1111C18.5 21.7542 18.2292 22.3648 17.7575 22.8103C17.2868 23.2549 16.6541 23.5 16 23.5H8C7.34589 23.5 6.71322 23.2549 6.24247 22.8103C5.77076 22.3648 5.5 21.7542 5.5 21.1111V7.88889C5.5 7.2458 5.77076 6.63525 6.24247 6.18974C6.59167 5.85994 7.02995 5.6399 7.5 5.54825V0.5ZM15.5 1.5V5.5H15V2H14V5.5H13.5V3H12.5V5.5H11.5V3H10.5V5.5H10V2H9V5.5H8.5V1.5H15.5ZM8 6.5C7.59325 6.5 7.2085 6.65287 6.9291 6.91675C6.65067 7.17971 6.5 7.53005 6.5 7.88889V21.1111C6.5 21.4699 6.65067 21.8203 6.9291 22.0833C7.2085 22.3471 7.59325 22.5 8 22.5H16C16.4068 22.5 16.7915 22.3471 17.0709 22.0833C17.3493 21.8203 17.5 21.4699 17.5 21.1111V7.88889C17.5 7.53005 17.3493 7.17971 17.0709 6.91675C16.7915 6.65287 16.4068 6.5 16 6.5H8Z"
31
- fill="currentColor"
32
- fillRule="evenodd"
33
- />
34
- </svg>
35
- );
24
+ export function YubikeyIcon(): JSX.Element {
25
+ return (
26
+ <svg
27
+ fill="none"
28
+ height="24"
29
+ viewBox="0 0 24 24"
30
+ width="24"
31
+ xmlns="http://www.w3.org/2000/svg"
32
+ >
33
+ <path
34
+ d="M11.5 20.1667C11.5 19.8905 11.7239 19.6667 12 19.6667H12.01C12.2861 19.6667 12.51 19.8905 12.51 20.1667C12.51 20.4428 12.2861 20.6667 12.01 20.6667H12C11.7239 20.6667 11.5 20.4428 11.5 20.1667Z"
35
+ fill="currentColor"
36
+ />
37
+ <path
38
+ clipRule="evenodd"
39
+ d="M12 9C9.79086 9 8 10.7909 8 13C8 15.2091 9.79086 17 12 17C14.2091 17 16 15.2091 16 13C16 10.7909 14.2091 9 12 9ZM9 13C9 11.3431 10.3431 10 12 10C13.6569 10 15 11.3431 15 13C15 14.6569 13.6569 16 12 16C10.3431 16 9 14.6569 9 13Z"
40
+ fill="currentColor"
41
+ fillRule="evenodd"
42
+ />
43
+ <path
44
+ clipRule="evenodd"
45
+ d="M7.5 0.5H16.5V5.54825C16.97 5.6399 17.4083 5.85994 17.7575 6.18974C18.2292 6.63525 18.5 7.24579 18.5 7.88889V21.1111C18.5 21.7542 18.2292 22.3648 17.7575 22.8103C17.2868 23.2549 16.6541 23.5 16 23.5H8C7.34589 23.5 6.71322 23.2549 6.24247 22.8103C5.77076 22.3648 5.5 21.7542 5.5 21.1111V7.88889C5.5 7.2458 5.77076 6.63525 6.24247 6.18974C6.59167 5.85994 7.02995 5.6399 7.5 5.54825V0.5ZM15.5 1.5V5.5H15V2H14V5.5H13.5V3H12.5V5.5H11.5V3H10.5V5.5H10V2H9V5.5H8.5V1.5H15.5ZM8 6.5C7.59325 6.5 7.2085 6.65287 6.9291 6.91675C6.65067 7.17971 6.5 7.53005 6.5 7.88889V21.1111C6.5 21.4699 6.65067 21.8203 6.9291 22.0833C7.2085 22.3471 7.59325 22.5 8 22.5H16C16.4068 22.5 16.7915 22.3471 17.0709 22.0833C17.3493 21.8203 17.5 21.4699 17.5 21.1111V7.88889C17.5 7.53005 17.3493 7.17971 17.0709 6.91675C16.7915 6.65287 16.4068 6.5 16 6.5H8Z"
46
+ fill="currentColor"
47
+ fillRule="evenodd"
48
+ />
49
+ </svg>
50
+ );
51
+ }
@@ -22,13 +22,18 @@ export interface InputEvent<
22
22
  target: InputEventTarget<T>;
23
23
  }
24
24
 
25
+ export type InputEventHandler<
26
+ T extends InputValue = InputValue,
27
+ O extends SimpleObject = SimpleObject
28
+ > = (event: InputEvent<T, O>) => void;
29
+
25
30
  export interface InputProps<V extends InputValue, T extends V = V, E = HTMLInputElement> {
26
31
  hasError?: boolean;
27
32
  id?: string;
28
33
  isAutoFocus?: boolean;
29
34
  isDisabled?: boolean;
30
35
  name: string;
31
- onChange?: (event: InputEvent<T>) => void;
36
+ onChange?: InputEventHandler<T>;
32
37
  onKeyDown?: KeyboardEventHandler<E>;
33
38
  value?: V;
34
39
  }
@@ -55,14 +60,31 @@ export interface Action {
55
60
  variant?: ButtonVariant | ButtonVariant[];
56
61
  }
57
62
 
63
+ type NavigationObjectDisabledFunction = (
64
+ item: NavigationObject,
65
+ sceneData?: Record<string, unknown>
66
+ ) => boolean;
67
+
58
68
  export interface NavigationObject {
69
+ isActive?: boolean;
70
+ isDisabled?: NavigationObjectDisabledFunction | boolean;
59
71
  label: string;
60
72
  to?: string;
61
73
  onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>;
62
74
  permission?: string;
63
75
  }
64
76
 
65
- export type Remote = string | [string, Record<string, string[] | string>];
77
+ export type NavigationData = NavigationObject[] | [string, NavigationObject[]];
78
+
79
+ export interface Query {
80
+ [key: string]: Query | Query[] | string[] | string;
81
+ }
82
+
83
+ export type QueryValue = Query | Query[] | string[] | string;
84
+
85
+ export type FilterMap = Map<string, QueryValue>;
86
+
87
+ export type Remote = string | [string, Query?, FilterMap?];
66
88
 
67
89
  export interface SimpleObject {
68
90
  [key: string]: unknown;
@@ -89,17 +111,6 @@ export type TransformerWithActions<T extends SimpleObject = SimpleObject, O = Tr
89
111
  | Transformer<T, O>
90
112
  | [Transformer<T, O>, Action[] | ActionFunction<T>];
91
113
 
92
- export type StyleVariant =
93
- | 'bordered'
94
- | 'danger'
95
- | 'primary'
96
- | 'secondary'
97
- | 'success'
98
- | 'tertiary'
99
- | 'warning';
100
-
101
- export type ButtonVariant = StyleVariant | 'link';
102
-
103
114
  export interface PaginationObject {
104
115
  activePage: number;
105
116
  pageCount: number;
@@ -111,14 +122,21 @@ export interface PaginationObject {
111
122
  * ---------------------------------------------------------------------------------
112
123
  */
113
124
 
114
- export const isString = (variable: unknown): variable is string => typeof variable === 'string';
125
+ export function isString(variable: unknown): variable is string {
126
+ return typeof variable === 'string';
127
+ }
115
128
 
116
- export const isStringArray = (variable: unknown): variable is string[] =>
117
- Array.isArray(variable) && (variable.length === 0 || isString(variable[0]));
129
+ export function isStringArray(variable: unknown): variable is string[] {
130
+ return Array.isArray(variable) && (variable.length === 0 || isString(variable[0]));
131
+ }
118
132
 
119
- export const isStrictSimpleObject = (variable: unknown): variable is StrictSimpleObject =>
120
- isString((variable as StrictSimpleObject).id) &&
121
- isString((variable as StrictSimpleObject).name);
133
+ export function isStrictSimpleObject(variable: unknown): variable is StrictSimpleObject {
134
+ return (
135
+ isString((variable as StrictSimpleObject).id) &&
136
+ isString((variable as StrictSimpleObject).name)
137
+ );
138
+ }
122
139
 
123
- export const isStrictSimpleObjectArray = (variable: unknown): variable is StrictSimpleObject[] =>
124
- Array.isArray(variable) && (variable.length === 0 || isStrictSimpleObject(variable[0]));
140
+ export function isStrictSimpleObjectArray(variable: unknown): variable is StrictSimpleObject[] {
141
+ return Array.isArray(variable) && (variable.length === 0 || isStrictSimpleObject(variable[0]));
142
+ }
@@ -0,0 +1,10 @@
1
+ import { NextResponse } from 'next/server';
2
+ import type { NextRequest } from 'next/server';
3
+
4
+ import { ApiService, TestService } from '@sqrzro/utility';
5
+
6
+ async function middleware(request: NextRequest): Promise<NextResponse> {
7
+ //return NextResponse.redirect(new URL('/auth/login', request.url));
8
+ }
9
+
10
+ export default middleware;
@@ -1,7 +1,10 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention */
2
+
1
3
  import PropTypes from 'prop-types';
4
+ import { AuthIdentifier } from '@sqrzro/hooks';
2
5
 
3
- import { AppLayout, AuthIdentifier } from '@hooks/useAppContext';
4
- import type { ButtonVariant, StyleVariant } from '@utility/interfaces';
6
+ import { AppLayout } from '../services/ConfigService';
7
+ import type { ButtonVariant, StyleVariant } from '../utility/interfaces';
5
8
 
6
9
  export const NextRouterPropType = PropTypes.shape({
7
10
  asPath: PropTypes.string.isRequired,
@@ -13,6 +16,7 @@ export const NextRouterPropType = PropTypes.shape({
13
16
  off: PropTypes.func.isRequired,
14
17
  on: PropTypes.func.isRequired,
15
18
  }),
19
+ forward: PropTypes.func.isRequired,
16
20
  isFallback: PropTypes.bool.isRequired,
17
21
  isLocaleDomain: PropTypes.bool.isRequired,
18
22
  isPreview: PropTypes.bool.isRequired,