@sqrzro/admin 2.0.0 → 2.1.0-bz.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.
- package/.babelrc.json +16 -0
- package/.eslintignore +6 -0
- package/.eslintrc +1 -4
- package/.sqrzrorc +5 -0
- package/.storybook/main.js +10 -11
- package/.turbo/turbo-build.log +20 -0
- package/.turbo/turbo-prettier.log +41 -213
- package/COMPONENTS.md +45 -0
- package/dist/components/AppLayout/index.d.ts +2 -2
- package/dist/components/AppLayout/index.js +7 -15
- package/dist/components/AppNavigation/index.d.ts +3 -0
- package/dist/components/AppNavigation/index.js +15 -0
- package/dist/components/BooleanFilter/index.d.ts +5 -0
- package/dist/components/BooleanFilter/index.js +19 -0
- package/dist/components/Config/index.d.ts +6 -0
- package/dist/components/Config/index.js +9 -0
- package/dist/components/Dashboard/index.d.ts +7 -0
- package/dist/components/Dashboard/index.js +5 -0
- package/dist/components/DateFilter/index.d.ts +6 -0
- package/dist/components/DateFilter/index.js +32 -0
- package/dist/components/DropdownFilter/index.d.ts +6 -0
- package/dist/components/DropdownFilter/index.js +9 -0
- package/dist/components/FilterBar/index.d.ts +8 -0
- package/dist/components/FilterBar/index.js +12 -0
- package/dist/components/FilterBarItem/index.d.ts +14 -0
- package/dist/components/FilterBarItem/index.js +31 -0
- package/dist/components/GridList/index.d.ts +5 -0
- package/dist/components/GridList/index.js +7 -0
- package/dist/components/GridListItem/index.d.ts +4 -0
- package/dist/components/GridListItem/index.js +7 -0
- package/dist/components/Icon/index.d.ts +8 -0
- package/dist/components/Icon/index.js +22 -0
- package/dist/components/List/index.d.ts +19 -33
- package/dist/components/List/index.js +19 -43
- package/dist/components/ListAction/index.d.ts +7 -0
- package/dist/components/ListAction/index.js +9 -0
- package/dist/components/ListActions/index.d.ts +6 -16
- package/dist/components/ListActions/index.js +9 -11
- package/dist/components/ListItem/index.d.ts +14 -0
- package/dist/components/ListItem/index.js +12 -0
- package/dist/components/LoginForm/index.d.ts +5 -2
- package/dist/components/LoginForm/index.js +4 -44
- package/dist/components/MeActions/index.d.ts +3 -0
- package/dist/components/MeActions/index.js +13 -0
- package/dist/components/MePanel/index.d.ts +3 -0
- package/dist/components/MePanel/index.js +9 -0
- package/dist/components/Page/index.d.ts +12 -0
- package/dist/components/Page/index.js +8 -0
- package/dist/components/PageActions/index.d.ts +6 -0
- package/dist/components/PageActions/index.js +13 -0
- package/dist/components/Panel/index.d.ts +7 -0
- package/dist/components/Panel/index.js +5 -0
- package/dist/components/RootLayout/index.d.ts +5 -3
- package/dist/components/RootLayout/index.js +12 -5
- package/dist/components/Table/index.d.ts +7 -26
- package/dist/components/Table/index.js +14 -52
- package/dist/components/TableClientComponent/index.d.ts +16 -0
- package/dist/components/TableClientComponent/index.js +44 -0
- package/dist/components/Tabs/index.d.ts +8 -0
- package/dist/components/Tabs/index.js +6 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/index.js +13 -0
- package/dist/icons/ErrorIcon/index.d.ts +3 -0
- package/dist/icons/ErrorIcon/index.js +5 -0
- package/dist/icons/InfoIcon/index.d.ts +3 -0
- package/dist/icons/InfoIcon/index.js +5 -0
- package/dist/icons/SuccessIcon/index.d.ts +3 -0
- package/dist/icons/SuccessIcon/index.js +5 -0
- package/dist/icons/WarningIcon/index.d.ts +3 -0
- package/dist/icons/WarningIcon/index.js +5 -0
- package/dist/index.d.ts +2 -208
- package/dist/index.js +2 -212
- package/dist/interfaces.d.ts +4 -0
- package/dist/services/ConfigService.d.ts +7 -40
- package/dist/services/ConfigService.js +10 -48
- package/dist/styles/config.d.ts +3 -0
- package/dist/styles/config.js +82 -0
- package/dist/styles.css +873 -134
- package/dist/utility/formatters.d.ts +1 -0
- package/dist/utility/formatters.js +8 -0
- package/next-env.d.ts +5 -0
- package/package.json +75 -64
- package/src/components/AppLayout/index.tsx +21 -11
- package/src/components/AppNavigation/index.tsx +39 -0
- package/src/components/BooleanFilter/index.tsx +28 -0
- package/src/components/Config/index.tsx +17 -0
- package/src/components/Dashboard/index.tsx +15 -0
- package/src/components/DateFilter/index.tsx +49 -0
- package/src/components/DropdownFilter/index.tsx +19 -0
- package/src/components/FilterBar/index.tsx +35 -0
- package/src/components/FilterBarItem/index.tsx +126 -0
- package/src/components/GridList/index.tsx +11 -0
- package/src/components/GridListItem/index.tsx +31 -0
- package/src/components/Icon/index.tsx +33 -0
- package/src/components/List/index.tsx +52 -72
- package/src/components/ListAction/index.tsx +25 -0
- package/src/components/ListActions/index.tsx +32 -19
- package/src/components/ListItem/index.tsx +56 -0
- package/src/components/LoginForm/index.tsx +25 -105
- package/src/components/MeActions/index.tsx +21 -0
- package/src/components/MePanel/index.tsx +21 -0
- package/src/components/Page/index.tsx +60 -0
- package/src/components/PageActions/index.tsx +22 -0
- package/src/components/Panel/Panel.spec.tsx +10 -0
- package/src/components/Panel/Panel.stories.tsx +9 -0
- package/src/components/Panel/index.tsx +15 -0
- package/src/components/RootLayout/index.tsx +23 -29
- package/src/components/Table/index.tsx +22 -111
- package/src/components/TableClientComponent/index.tsx +112 -0
- package/src/components/Tabs/index.tsx +25 -0
- package/src/components/index.ts +68 -0
- package/src/icons/ErrorIcon/index.tsx +19 -0
- package/src/icons/InfoIcon/index.tsx +19 -0
- package/src/icons/SuccessIcon/index.tsx +19 -0
- package/src/icons/WarningIcon/index.tsx +19 -0
- package/src/index.ts +2 -214
- package/src/interfaces.ts +3 -0
- package/src/react.d.ts +12 -0
- package/src/services/ConfigService.ts +15 -84
- package/src/styles/config.ts +95 -0
- package/src/styles/tailwind.css +25 -35
- package/src/utility/formatters.ts +9 -0
- package/tailwind.config.js +8 -3
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +3 -3
- package/.turbo/turbo-docs.log +0 -0
- package/.turbo/turbo-lint.log +0 -112
- package/.turbo/turbo-test.log +0 -6
- package/dist/components/Alert/index.d.ts +0 -4
- package/dist/components/Alert/index.js +0 -15
- package/dist/components/Allow/index.d.ts +0 -20
- package/dist/components/Allow/index.js +0 -29
- package/dist/components/AppLayout/AppLayout.stories.d.ts +0 -5
- package/dist/components/AppLayout/AppLayout.stories.js +0 -11
- package/dist/components/AutoSuggest/index.d.ts +0 -74
- package/dist/components/AutoSuggest/index.js +0 -143
- package/dist/components/Button/Button.stories.d.ts +0 -11
- package/dist/components/Button/Button.stories.js +0 -41
- package/dist/components/Button/index.d.ts +0 -49
- package/dist/components/Button/index.js +0 -50
- package/dist/components/CalendarInput/index.d.ts +0 -24
- package/dist/components/CalendarInput/index.js +0 -54
- package/dist/components/CheckboxList/index.d.ts +0 -17
- package/dist/components/CheckboxList/index.js +0 -25
- package/dist/components/CodeInput/index.d.ts +0 -9
- package/dist/components/CodeInput/index.js +0 -51
- package/dist/components/ConnectedDropdown/index.d.ts +0 -14
- package/dist/components/ConnectedDropdown/index.js +0 -36
- package/dist/components/ConnectedList/index.d.ts +0 -5
- package/dist/components/ConnectedList/index.js +0 -7
- package/dist/components/ConnectedTable/index.d.ts +0 -5
- package/dist/components/ConnectedTable/index.js +0 -7
- package/dist/components/ContentBlock/index.d.ts +0 -16
- package/dist/components/ContentBlock/index.js +0 -13
- package/dist/components/DataPanel/index.d.ts +0 -8
- package/dist/components/DataPanel/index.js +0 -8
- package/dist/components/DateInput/index.d.ts +0 -18
- package/dist/components/DateInput/index.js +0 -81
- package/dist/components/Dropdown/index.d.ts +0 -36
- package/dist/components/Dropdown/index.js +0 -122
- package/dist/components/ErrorMessage/index.d.ts +0 -16
- package/dist/components/ErrorMessage/index.js +0 -17
- package/dist/components/Fieldset/index.d.ts +0 -18
- package/dist/components/Fieldset/index.js +0 -19
- package/dist/components/FileInput/index.d.ts +0 -10
- package/dist/components/FileInput/index.js +0 -26
- package/dist/components/FilterLink/index.d.ts +0 -14
- package/dist/components/FilterLink/index.js +0 -15
- package/dist/components/Form/index.d.ts +0 -14
- package/dist/components/Form/index.js +0 -15
- package/dist/components/FormActions/index.d.ts +0 -18
- package/dist/components/FormActions/index.js +0 -14
- package/dist/components/FormField/index.d.ts +0 -14
- package/dist/components/FormField/index.js +0 -40
- package/dist/components/FormRepeater/index.d.ts +0 -18
- package/dist/components/FormRepeater/index.js +0 -65
- package/dist/components/ImageInput/index.d.ts +0 -13
- package/dist/components/ImageInput/index.js +0 -45
- package/dist/components/InfoPanel/index.d.ts +0 -14
- package/dist/components/InfoPanel/index.js +0 -11
- package/dist/components/Link/__mocks__/index.d.ts +0 -6
- package/dist/components/Link/__mocks__/index.js +0 -12
- package/dist/components/Link/index.d.ts +0 -23
- package/dist/components/Link/index.js +0 -21
- package/dist/components/Message/index.d.ts +0 -14
- package/dist/components/Message/index.js +0 -14
- package/dist/components/Modal/index.d.ts +0 -4
- package/dist/components/Modal/index.js +0 -18
- package/dist/components/ModalActions/index.d.ts +0 -21
- package/dist/components/ModalActions/index.js +0 -18
- package/dist/components/MoneyInput/index.d.ts +0 -10
- package/dist/components/MoneyInput/index.js +0 -13
- package/dist/components/PasswordForm/index.d.ts +0 -35
- package/dist/components/PasswordForm/index.js +0 -21
- package/dist/components/PasswordInput/index.d.ts +0 -4
- package/dist/components/PasswordInput/index.js +0 -12
- package/dist/components/RadioList/index.d.ts +0 -9
- package/dist/components/RadioList/index.js +0 -7
- package/dist/components/SummaryList/index.d.ts +0 -18
- package/dist/components/SummaryList/index.js +0 -15
- package/dist/components/Switch/index.d.ts +0 -21
- package/dist/components/Switch/index.js +0 -31
- package/dist/components/Tag/index.d.ts +0 -15
- package/dist/components/Tag/index.js +0 -13
- package/dist/components/TextArea/index.d.ts +0 -18
- package/dist/components/TextArea/index.js +0 -26
- package/dist/components/TextInput/index.d.ts +0 -14
- package/dist/components/TextInput/index.js +0 -27
- package/dist/components/WebsiteInput/index.d.ts +0 -10
- package/dist/components/WebsiteInput/index.js +0 -13
- package/dist/components/WeekCalendar/index.d.ts +0 -24
- package/dist/components/WeekCalendar/index.js +0 -48
- package/dist/core/AlertComponent/index.d.ts +0 -26
- package/dist/core/AlertComponent/index.js +0 -35
- package/dist/core/AppHeader/index.d.ts +0 -3
- package/dist/core/AppHeader/index.js +0 -17
- package/dist/core/AppLogo/index.d.ts +0 -12
- package/dist/core/AppLogo/index.js +0 -16
- package/dist/core/AppLogoImage/index.d.ts +0 -3
- package/dist/core/AppLogoImage/index.js +0 -11
- package/dist/core/AppLogoPlaceholder/index.d.ts +0 -3
- package/dist/core/AppLogoPlaceholder/index.js +0 -10
- package/dist/core/Assistive/index.d.ts +0 -12
- package/dist/core/Assistive/index.js +0 -9
- package/dist/core/AuthForm/index.d.ts +0 -10
- package/dist/core/AuthForm/index.js +0 -13
- package/dist/core/Banner/index.d.ts +0 -3
- package/dist/core/Banner/index.js +0 -14
- package/dist/core/Calendar/index.d.ts +0 -21
- package/dist/core/Calendar/index.js +0 -69
- package/dist/core/CalendarDay/index.d.ts +0 -30
- package/dist/core/CalendarDay/index.js +0 -30
- package/dist/core/CalendarMonth/index.d.ts +0 -23
- package/dist/core/CalendarMonth/index.js +0 -45
- package/dist/core/CalendarNavigation/index.d.ts +0 -17
- package/dist/core/CalendarNavigation/index.js +0 -24
- package/dist/core/CalendarWeek/index.d.ts +0 -28
- package/dist/core/CalendarWeek/index.js +0 -46
- package/dist/core/ChkRad/index.d.ts +0 -26
- package/dist/core/ChkRad/index.js +0 -33
- package/dist/core/ChkRadIcon/index.d.ts +0 -14
- package/dist/core/ChkRadIcon/index.js +0 -12
- package/dist/core/ChkRadList/index.d.ts +0 -32
- package/dist/core/ChkRadList/index.js +0 -37
- package/dist/core/CloseButton/index.d.ts +0 -17
- package/dist/core/CloseButton/index.js +0 -12
- package/dist/core/ConfirmModal/index.d.ts +0 -3
- package/dist/core/ConfirmModal/index.js +0 -38
- package/dist/core/ConnectedRepeater/index.d.ts +0 -50
- package/dist/core/ConnectedRepeater/index.js +0 -154
- package/dist/core/ConnectedRepeaterComponent/index.d.ts +0 -24
- package/dist/core/ConnectedRepeaterComponent/index.js +0 -25
- package/dist/core/Container/index.d.ts +0 -14
- package/dist/core/Container/index.js +0 -12
- package/dist/core/DataPanelItem/index.d.ts +0 -8
- package/dist/core/DataPanelItem/index.js +0 -7
- package/dist/core/DropdownPanel/index.d.ts +0 -31
- package/dist/core/DropdownPanel/index.js +0 -32
- package/dist/core/EmptyMessage/index.d.ts +0 -21
- package/dist/core/EmptyMessage/index.js +0 -21
- package/dist/core/FilterItem/index.d.ts +0 -25
- package/dist/core/FilterItem/index.js +0 -82
- package/dist/core/Filters/index.d.ts +0 -31
- package/dist/core/Filters/index.js +0 -85
- package/dist/core/FixedActions/index.d.ts +0 -24
- package/dist/core/FixedActions/index.js +0 -22
- package/dist/core/FormError/index.d.ts +0 -12
- package/dist/core/FormError/index.js +0 -9
- package/dist/core/FormLabel/index.d.ts +0 -16
- package/dist/core/FormLabel/index.js +0 -13
- package/dist/core/FormLegend/index.d.ts +0 -12
- package/dist/core/FormLegend/index.js +0 -9
- package/dist/core/Header/Header.stories.d.ts +0 -5
- package/dist/core/Header/Header.stories.js +0 -11
- package/dist/core/Header/index.d.ts +0 -14
- package/dist/core/Header/index.js +0 -12
- package/dist/core/Icon/index.d.ts +0 -14
- package/dist/core/Icon/index.js +0 -32
- package/dist/core/IconButton/index.d.ts +0 -22
- package/dist/core/IconButton/index.js +0 -20
- package/dist/core/InputPanel/index.d.ts +0 -16
- package/dist/core/InputPanel/index.js +0 -11
- package/dist/core/ListItem/index.d.ts +0 -39
- package/dist/core/ListItem/index.js +0 -44
- package/dist/core/ListItemAction/index.d.ts +0 -11
- package/dist/core/ListItemAction/index.js +0 -13
- package/dist/core/ListItemActions/index.d.ts +0 -8
- package/dist/core/ListItemActions/index.js +0 -16
- package/dist/core/ListItemMetaItem/index.d.ts +0 -19
- package/dist/core/ListItemMetaItem/index.js +0 -29
- package/dist/core/ListItemTitle/index.d.ts +0 -19
- package/dist/core/ListItemTitle/index.js +0 -44
- package/dist/core/Loader/index.d.ts +0 -15
- package/dist/core/Loader/index.js +0 -16
- package/dist/core/MeActions/index.d.ts +0 -3
- package/dist/core/MeActions/index.js +0 -48
- package/dist/core/MePanel/index.d.ts +0 -19
- package/dist/core/MePanel/index.js +0 -29
- package/dist/core/ModalComponent/index.d.ts +0 -22
- package/dist/core/ModalComponent/index.js +0 -29
- package/dist/core/Navigation/index.d.ts +0 -3
- package/dist/core/Navigation/index.js +0 -33
- package/dist/core/NavigationDivider/index.d.ts +0 -3
- package/dist/core/NavigationDivider/index.js +0 -8
- package/dist/core/NavigationItem/index.d.ts +0 -16
- package/dist/core/NavigationItem/index.js +0 -21
- package/dist/core/Pagination/index.d.ts +0 -15
- package/dist/core/Pagination/index.js +0 -64
- package/dist/core/PaginationItem/index.d.ts +0 -10
- package/dist/core/PaginationItem/index.js +0 -17
- package/dist/core/Panel/index.d.ts +0 -17
- package/dist/core/Panel/index.js +0 -13
- package/dist/core/PasswordForgotForm/index.d.ts +0 -7
- package/dist/core/PasswordForgotForm/index.js +0 -40
- package/dist/core/PasswordResetForm/index.d.ts +0 -7
- package/dist/core/PasswordResetForm/index.js +0 -34
- package/dist/core/RadialProgress/index.d.ts +0 -16
- package/dist/core/RadialProgress/index.js +0 -23
- package/dist/core/SettingsForm/index.d.ts +0 -3
- package/dist/core/SettingsForm/index.js +0 -14
- package/dist/core/StaticTextInput/index.d.ts +0 -29
- package/dist/core/StaticTextInput/index.js +0 -39
- package/dist/core/Styled/index.d.ts +0 -6
- package/dist/core/Styled/index.js +0 -39
- package/dist/core/SummaryListItem/index.d.ts +0 -23
- package/dist/core/SummaryListItem/index.js +0 -31
- package/dist/core/TabItem/index.d.ts +0 -4
- package/dist/core/TabItem/index.js +0 -13
- package/dist/core/TableActionsCell/index.d.ts +0 -8
- package/dist/core/TableActionsCell/index.js +0 -8
- package/dist/core/TableCell/index.d.ts +0 -15
- package/dist/core/TableCell/index.js +0 -20
- package/dist/core/TableHead/index.d.ts +0 -18
- package/dist/core/TableHead/index.js +0 -18
- package/dist/core/TableRow/index.d.ts +0 -13
- package/dist/core/TableRow/index.js +0 -18
- package/dist/core/Tabs/index.d.ts +0 -7
- package/dist/core/Tabs/index.js +0 -13
- package/dist/core/TextInputAncillary/index.d.ts +0 -29
- package/dist/core/TextInputAncillary/index.js +0 -31
- package/dist/core/Toast/index.d.ts +0 -3
- package/dist/core/Toast/index.js +0 -47
- package/dist/core/TwoFactor/index.d.ts +0 -13
- package/dist/core/TwoFactor/index.js +0 -49
- package/dist/core/TwoFactorAuthenticator/index.d.ts +0 -10
- package/dist/core/TwoFactorAuthenticator/index.js +0 -9
- package/dist/core/TwoFactorMethodList/index.d.ts +0 -10
- package/dist/core/TwoFactorMethodList/index.js +0 -22
- package/dist/core/TwoFactorSetup/index.d.ts +0 -12
- package/dist/core/TwoFactorSetup/index.js +0 -43
- package/dist/core/TwoFactorSetupAuthenticator/index.d.ts +0 -20
- package/dist/core/TwoFactorSetupAuthenticator/index.js +0 -42
- package/dist/core/TwoFactorSetupYubikey/index.d.ts +0 -16
- package/dist/core/TwoFactorSetupYubikey/index.js +0 -14
- package/dist/core/TwoFactorYubikey/index.d.ts +0 -9
- package/dist/core/TwoFactorYubikey/index.js +0 -14
- package/dist/core/WeekCalendarDay/index.d.ts +0 -27
- package/dist/core/WeekCalendarDay/index.js +0 -35
- package/dist/core/YubikeyInput/index.d.ts +0 -4
- package/dist/core/YubikeyInput/index.js +0 -14
- package/dist/filters/BooleanFilter/index.d.ts +0 -14
- package/dist/filters/BooleanFilter/index.js +0 -35
- package/dist/filters/DateFilter/index.d.ts +0 -5
- package/dist/filters/DateFilter/index.js +0 -24
- package/dist/filters/DropdownFilter/index.d.ts +0 -17
- package/dist/filters/DropdownFilter/index.js +0 -32
- package/dist/filters/QuickDateFilter/index.d.ts +0 -13
- package/dist/filters/QuickDateFilter/index.js +0 -40
- package/dist/filters/interfaces.d.ts +0 -35
- package/dist/hooks/useAlert.d.ts +0 -12
- package/dist/hooks/useAlert.js +0 -18
- package/dist/hooks/useAppConfig.d.ts +0 -3
- package/dist/hooks/useAppConfig.js +0 -5
- package/dist/hooks/useConnectedList.d.ts +0 -7
- package/dist/hooks/useConnectedList.js +0 -6
- package/dist/hooks/useConnectedRepeater.d.ts +0 -7
- package/dist/hooks/useConnectedRepeater.js +0 -14
- package/dist/hooks/useConnectedTable.d.ts +0 -7
- package/dist/hooks/useConnectedTable.js +0 -6
- package/dist/hooks/useFilters.d.ts +0 -9
- package/dist/hooks/useFilters.js +0 -24
- package/dist/hooks/useLayout.d.ts +0 -7
- package/dist/hooks/useLayout.js +0 -10
- package/dist/hooks/useLayout.spec.d.ts +0 -1
- package/dist/hooks/useLayout.spec.js +0 -24
- package/dist/hooks/useModal.d.ts +0 -12
- package/dist/hooks/useModal.js +0 -39
- package/dist/hooks/useModalOffset.d.ts +0 -2
- package/dist/hooks/useModalOffset.js +0 -16
- package/dist/hooks/useModalOffset.spec.d.ts +0 -1
- package/dist/hooks/useModalOffset.spec.js +0 -19
- package/dist/hooks/useNavigation.d.ts +0 -7
- package/dist/hooks/useNavigation.js +0 -113
- package/dist/hooks/useRemote.d.ts +0 -7
- package/dist/hooks/useRemote.js +0 -29
- package/dist/hooks/useVariant.d.ts +0 -9
- package/dist/hooks/useVariant.js +0 -14
- package/dist/scenes/Error404Scene.d.ts +0 -3
- package/dist/scenes/Error404Scene.js +0 -5
- package/dist/services/AppService.d.ts +0 -5
- package/dist/services/AppService.js +0 -11
- package/dist/services/ConfirmService.d.ts +0 -12
- package/dist/services/ConfirmService.js +0 -10
- package/dist/services/DateService.d.ts +0 -26
- package/dist/services/DateService.js +0 -132
- package/dist/services/DateService.spec.d.ts +0 -1
- package/dist/services/DateService.spec.js +0 -83
- package/dist/services/DownloadService.d.ts +0 -7
- package/dist/services/DownloadService.js +0 -16
- package/dist/services/DownloadService.spec.d.ts +0 -1
- package/dist/services/DownloadService.spec.js +0 -18
- package/dist/services/FilterComponentService.d.ts +0 -25
- package/dist/services/FilterComponentService.js +0 -54
- package/dist/services/FilterService.d.ts +0 -34
- package/dist/services/FilterService.js +0 -58
- package/dist/services/FilterService.spec.d.ts +0 -1
- package/dist/services/FilterService.spec.js +0 -67
- package/dist/services/FormatService.d.ts +0 -11
- package/dist/services/FormatService.js +0 -45
- package/dist/services/FormatService.spec.d.ts +0 -1
- package/dist/services/FormatService.spec.js +0 -66
- package/dist/services/ToastService.d.ts +0 -7
- package/dist/services/ToastService.js +0 -17
- package/dist/services/ToastService.spec.d.ts +0 -1
- package/dist/services/ToastService.spec.js +0 -34
- package/dist/utility/MockRouter/index.d.ts +0 -2
- package/dist/utility/MockRouter/index.js +0 -37
- package/dist/utility/StorybookPanel/index.d.ts +0 -14
- package/dist/utility/StorybookPanel/index.js +0 -12
- package/dist/utility/TestChangeHandler/index.d.ts +0 -15
- package/dist/utility/TestChangeHandler/index.js +0 -30
- package/dist/utility/icons.d.ts +0 -3
- package/dist/utility/icons.js +0 -12
- package/dist/utility/interfaces.d.ts +0 -79
- package/dist/utility/interfaces.js +0 -18
- package/dist/utility/middleware.d.ts +0 -4
- package/dist/utility/middleware.js +0 -9
- package/dist/utility/prop-types.d.ts +0 -57
- package/dist/utility/prop-types.js +0 -77
- package/dist/utility/register.d.ts +0 -3
- package/dist/utility/register.js +0 -9
- package/src/components/Alert/index.tsx +0 -111
- package/src/components/Allow/Allow.spec.tsx +0 -37
- package/src/components/Allow/index.tsx +0 -42
- package/src/components/AppLayout/AppLayout.stories.tsx +0 -20
- package/src/components/AutoSuggest/AutoSuggest.module.css +0 -8
- package/src/components/AutoSuggest/AutoSuggest.spec.tsx +0 -222
- package/src/components/AutoSuggest/AutoSuggest.story.tsx +0 -32
- package/src/components/AutoSuggest/index.tsx +0 -215
- package/src/components/Button/Button.spec.tsx +0 -61
- package/src/components/Button/Button.stories.tsx +0 -62
- package/src/components/Button/index.tsx +0 -15
- package/src/components/CalendarInput/CalendarInput.module.css +0 -8
- package/src/components/CalendarInput/CalendarInput.spec.tsx +0 -222
- package/src/components/CalendarInput/CalendarInput.story.tsx +0 -62
- package/src/components/CalendarInput/index.tsx +0 -126
- package/src/components/CheckboxList/CheckboxList.spec.tsx +0 -93
- package/src/components/CheckboxList/index.tsx +0 -51
- package/src/components/ConnectedDropdown/index.tsx +0 -53
- package/src/components/ConnectedList/index.tsx +0 -19
- package/src/components/ConnectedTable/index.tsx +0 -21
- package/src/components/ContentBlock/ContentBlock.module.css +0 -17
- package/src/components/ContentBlock/ContentBlock.spec.tsx +0 -25
- package/src/components/ContentBlock/index.tsx +0 -28
- package/src/components/DataPanel/index.tsx +0 -25
- package/src/components/DateInput/DateInput.module.css +0 -15
- package/src/components/DateInput/DateInput.spec.tsx +0 -87
- package/src/components/DateInput/index.tsx +0 -145
- package/src/components/ErrorMessage/ErrorMessage.module.css +0 -25
- package/src/components/ErrorMessage/ErrorMessage.spec.tsx +0 -31
- package/src/components/ErrorMessage/index.tsx +0 -36
- package/src/components/Fieldset/Fieldset.spec.tsx +0 -22
- package/src/components/Fieldset/Fieldset.story.tsx +0 -25
- package/src/components/Fieldset/index.tsx +0 -32
- package/src/components/FileInput/FileInput.module.css +0 -18
- package/src/components/FileInput/FileInput.spec.tsx +0 -52
- package/src/components/FileInput/FileInput.story.tsx +0 -8
- package/src/components/FileInput/index.tsx +0 -75
- package/src/components/FilterLink/FilterLink.module.css +0 -9
- package/src/components/FilterLink/FilterLink.spec.tsx +0 -34
- package/src/components/FilterLink/index.tsx +0 -36
- package/src/components/Form/Form.spec.tsx +0 -39
- package/src/components/Form/index.tsx +0 -25
- package/src/components/FormActions/FormActions.spec.tsx +0 -10
- package/src/components/FormActions/FormActions.story.tsx +0 -27
- package/src/components/FormActions/index.tsx +0 -35
- package/src/components/FormField/FormField.module.css +0 -71
- package/src/components/FormField/FormField.spec.tsx +0 -177
- package/src/components/FormField/FormField.stories.tsx +0 -44
- package/src/components/FormField/index.tsx +0 -14
- package/src/components/FormRepeater/FormRepeater.module.css +0 -7
- package/src/components/FormRepeater/FormRepeater.spec.tsx +0 -156
- package/src/components/FormRepeater/index.tsx +0 -121
- package/src/components/ImageInput/ImageInput.module.css +0 -74
- package/src/components/ImageInput/ImageInput.spec.tsx +0 -47
- package/src/components/ImageInput/ImageInput.story.tsx +0 -8
- package/src/components/ImageInput/index.tsx +0 -93
- package/src/components/InfoPanel/InfoPanel.module.css +0 -20
- package/src/components/InfoPanel/InfoPanel.spec.tsx +0 -15
- package/src/components/InfoPanel/InfoPanel.story.tsx +0 -32
- package/src/components/InfoPanel/index.tsx +0 -25
- package/src/components/Link/Link.spec.tsx +0 -64
- package/src/components/Link/__mocks__/index.tsx +0 -24
- package/src/components/Link/index.tsx +0 -60
- package/src/components/List/List.module.css +0 -9
- package/src/components/List/List.spec.tsx +0 -379
- package/src/components/List/List.story.tsx +0 -119
- package/src/components/ListActions/ListActions.spec.tsx +0 -10
- package/src/components/ListActions/ListActions.story.tsx +0 -8
- package/src/components/LoginForm/LoginForm.spec.tsx +0 -68
- package/src/components/LoginForm/LoginForm.story.tsx +0 -25
- package/src/components/Message/Message.module.css +0 -14
- package/src/components/Message/Message.spec.tsx +0 -20
- package/src/components/Message/index.tsx +0 -29
- package/src/components/Modal/index.tsx +0 -27
- package/src/components/ModalActions/ModalActions.module.css +0 -5
- package/src/components/ModalActions/ModalActions.spec.tsx +0 -49
- package/src/components/ModalActions/ModalActions.story.tsx +0 -8
- package/src/components/ModalActions/index.tsx +0 -51
- package/src/components/MoneyInput/MoneyInput.spec.tsx +0 -17
- package/src/components/MoneyInput/MoneyInput.story.tsx +0 -8
- package/src/components/MoneyInput/index.tsx +0 -18
- package/src/components/PasswordForm/index.tsx +0 -36
- package/src/components/RadioList/RadioList.spec.tsx +0 -47
- package/src/components/RadioList/index.tsx +0 -19
- package/src/components/SummaryList/SummaryList.module.css +0 -31
- package/src/components/SummaryList/SummaryList.spec.tsx +0 -89
- package/src/components/SummaryList/SummaryList.story.tsx +0 -13
- package/src/components/SummaryList/index.tsx +0 -39
- package/src/components/Switch/Switch.module.css +0 -86
- package/src/components/Switch/Switch.spec.tsx +0 -64
- package/src/components/Switch/index.tsx +0 -89
- package/src/components/Table/Table.module.css +0 -14
- package/src/components/Table/Table.spec.tsx +0 -136
- package/src/components/Table/Table.story.tsx +0 -108
- package/src/components/TextArea/TextArea.module.css +0 -23
- package/src/components/TextArea/TextArea.spec.tsx +0 -77
- package/src/components/TextArea/index.tsx +0 -61
- package/src/components/TextInput/TextInput.module.css +0 -62
- package/src/components/TextInput/TextInput.spec.tsx +0 -127
- package/src/components/TextInput/TextInput.stories.tsx +0 -46
- package/src/components/TextInput/index.tsx +0 -11
- package/src/components/WebsiteInput/WebsiteInput.spec.tsx +0 -17
- package/src/components/WebsiteInput/index.tsx +0 -18
- package/src/components/WeekCalendar/WeekCalendar.module.css +0 -19
- package/src/components/WeekCalendar/index.tsx +0 -80
- package/src/core/AlertComponent/AlertComponent.module.css +0 -110
- package/src/core/AlertComponent/AlertComponent.spec.tsx +0 -85
- package/src/core/AlertComponent/AlertComponent.story.tsx +0 -29
- package/src/core/AlertComponent/index.tsx +0 -109
- package/src/core/AppHeader/index.tsx +0 -25
- package/src/core/AppLogo/AppLogo.module.css +0 -18
- package/src/core/AppLogo/index.tsx +0 -35
- package/src/core/AppLogoImage/index.tsx +0 -19
- package/src/core/AppLogoPlaceholder/index.tsx +0 -32
- package/src/core/Assistive/index.tsx +0 -1
- package/src/core/AuthForm/AuthForm.module.css +0 -35
- package/src/core/AuthForm/AuthForm.spec.tsx +0 -72
- package/src/core/AuthForm/index.tsx +0 -63
- package/src/core/Banner/Banner.module.css +0 -34
- package/src/core/Banner/index.tsx +0 -25
- package/src/core/Calendar/index.tsx +0 -118
- package/src/core/CalendarDay/CalendarDay.module.css +0 -61
- package/src/core/CalendarDay/index.tsx +0 -82
- package/src/core/CalendarMonth/CalendarMonth.module.css +0 -13
- package/src/core/CalendarMonth/index.tsx +0 -103
- package/src/core/CalendarNavigation/CalendarNavigation.module.css +0 -26
- package/src/core/CalendarNavigation/index.tsx +0 -55
- package/src/core/CalendarWeek/index.tsx +0 -97
- package/src/core/ChkRadList/ChkRadList.module.css +0 -12
- package/src/core/ChkRadList/index.tsx +0 -88
- package/src/core/CloseButton/CloseButton.spec.tsx +0 -38
- package/src/core/CloseButton/index.tsx +0 -33
- package/src/core/ConfirmModal/ConfirmModal.spec.tsx +0 -94
- package/src/core/ConfirmModal/index.tsx +0 -59
- package/src/core/ConnectedRepeater/index.tsx +0 -284
- package/src/core/ConnectedRepeaterComponent/index.tsx +0 -71
- package/src/core/Container/Container.module.css +0 -13
- package/src/core/Container/index.tsx +0 -29
- package/src/core/DataPanelItem/index.tsx +0 -19
- package/src/core/EmptyMessage/EmptyMessage.module.css +0 -18
- package/src/core/EmptyMessage/EmptyMessage.stories.tsx +0 -33
- package/src/core/EmptyMessage/index.tsx +0 -15
- package/src/core/FilterItem/FilterItem.module.css +0 -104
- package/src/core/FilterItem/index.tsx +0 -172
- package/src/core/Filters/Filters.module.css +0 -86
- package/src/core/Filters/Filters.spec.tsx +0 -573
- package/src/core/Filters/index.tsx +0 -168
- package/src/core/FixedActions/FixedActions.module.css +0 -23
- package/src/core/FixedActions/FixedActions.spec.tsx +0 -53
- package/src/core/FixedActions/index.tsx +0 -54
- package/src/core/FormLegend/FormLegend.module.css +0 -13
- package/src/core/FormLegend/index.tsx +0 -18
- package/src/core/Header/Header.stories.tsx +0 -20
- package/src/core/Header/index.tsx +0 -32
- package/src/core/Icon/Icon.spec.tsx +0 -30
- package/src/core/Icon/index.tsx +0 -70
- package/src/core/IconButton/IconButton.module.css +0 -32
- package/src/core/IconButton/index.tsx +0 -53
- package/src/core/ListItem/ListItem.module.css +0 -28
- package/src/core/ListItem/ListItem.story.tsx +0 -32
- package/src/core/ListItem/index.tsx +0 -109
- package/src/core/ListItemAction/ListItemAction.module.css +0 -33
- package/src/core/ListItemAction/index.tsx +0 -30
- package/src/core/ListItemActions/ListItemActions.module.css +0 -94
- package/src/core/ListItemActions/index.tsx +0 -42
- package/src/core/ListItemMetaItem/ListItemMetaItem.module.css +0 -18
- package/src/core/ListItemMetaItem/index.tsx +0 -54
- package/src/core/ListItemTitle/ListItemTitle.module.css +0 -22
- package/src/core/ListItemTitle/ListItemTitle.spec.tsx +0 -53
- package/src/core/ListItemTitle/index.tsx +0 -82
- package/src/core/Loader/Loader.module.css +0 -57
- package/src/core/Loader/Loader.stories.tsx +0 -22
- package/src/core/Loader/index.tsx +0 -2
- package/src/core/MeActions/MeActions.module.css +0 -47
- package/src/core/MeActions/index.tsx +0 -74
- package/src/core/MePanel/MePanel.module.css +0 -79
- package/src/core/MePanel/index.tsx +0 -58
- package/src/core/ModalComponent/ModalComponent.module.css +0 -86
- package/src/core/ModalComponent/ModalComponent.spec.tsx +0 -55
- package/src/core/ModalComponent/index.tsx +0 -66
- package/src/core/Navigation/Navigation.module.css +0 -89
- package/src/core/Navigation/Navigation.spec.tsx +0 -121
- package/src/core/Navigation/index.tsx +0 -69
- package/src/core/NavigationDivider/NavigationDivider.module.css +0 -3
- package/src/core/NavigationDivider/index.tsx +0 -13
- package/src/core/NavigationItem/NavigationItem.module.css +0 -46
- package/src/core/NavigationItem/index.tsx +0 -50
- package/src/core/Panel/Panel.module.css +0 -26
- package/src/core/Panel/Panel.spec.tsx +0 -16
- package/src/core/Panel/index.tsx +0 -35
- package/src/core/PasswordForgotForm/index.tsx +0 -62
- package/src/core/PasswordResetForm/index.tsx +0 -65
- package/src/core/RadialProgress/RadialProgress.module.css +0 -78
- package/src/core/RadialProgress/index.tsx +0 -49
- package/src/core/SettingsForm/index.tsx +0 -26
- package/src/core/SummaryListItem/SummaryListItem.module.css +0 -20
- package/src/core/SummaryListItem/index.tsx +0 -65
- package/src/core/TabItem/TabItem.module.css +0 -28
- package/src/core/TabItem/index.tsx +0 -42
- package/src/core/Tabs/Tabs.module.css +0 -19
- package/src/core/Tabs/Tabs.spec.tsx +0 -30
- package/src/core/Tabs/index.tsx +0 -36
- package/src/core/Toast/Toast.module.css +0 -54
- package/src/core/Toast/Toast.spec.tsx +0 -80
- package/src/core/Toast/index.tsx +0 -79
- package/src/core/TwoFactor/TwoFactor.spec.tsx +0 -183
- package/src/core/TwoFactor/index.tsx +0 -102
- package/src/core/TwoFactorAuthenticator/index.tsx +0 -39
- package/src/core/TwoFactorMethodList/TwoFactorMethodList.module.css +0 -50
- package/src/core/TwoFactorMethodList/index.tsx +0 -49
- package/src/core/TwoFactorSetup/index.tsx +0 -91
- package/src/core/TwoFactorSetupAuthenticator/TwoFactorSetupAuthenticator.module.css +0 -6
- package/src/core/TwoFactorSetupAuthenticator/index.tsx +0 -100
- package/src/core/TwoFactorSetupYubikey/index.tsx +0 -49
- package/src/core/TwoFactorYubikey/index.tsx +0 -41
- package/src/core/WeekCalendarDay/WeekCalendarDay.module.css +0 -32
- package/src/core/WeekCalendarDay/index.tsx +0 -68
- package/src/core/YubikeyInput/YubikeyInput.module.css +0 -27
- package/src/core/YubikeyInput/YubikeyInput.spec.tsx +0 -77
- package/src/core/YubikeyInput/index.tsx +0 -76
- package/src/filters/BooleanFilter/index.tsx +0 -47
- package/src/filters/DateFilter/index.tsx +0 -36
- package/src/filters/DropdownFilter/index.tsx +0 -51
- package/src/filters/QuickDateFilter/index.tsx +0 -74
- package/src/filters/interfaces.ts +0 -39
- package/src/hooks/useAlert.spec.tsx +0 -72
- package/src/hooks/useAlert.ts +0 -37
- package/src/hooks/useConfig.ts +0 -31
- package/src/hooks/useConnectedList.ts +0 -15
- package/src/hooks/useConnectedRepeater.ts +0 -25
- package/src/hooks/useConnectedTable.ts +0 -15
- package/src/hooks/useFilters.ts +0 -34
- package/src/hooks/useLayout.spec.ts +0 -31
- package/src/hooks/useLayout.ts +0 -23
- package/src/hooks/useModal.spec.tsx +0 -72
- package/src/hooks/useModal.ts +0 -62
- package/src/hooks/useModalOffset.spec.ts +0 -27
- package/src/hooks/useModalOffset.ts +0 -26
- package/src/hooks/useNavigation.ts +0 -160
- package/src/hooks/useRemote.ts +0 -43
- package/src/scenes/Error404Scene.tsx +0 -7
- package/src/services/AppService.ts +0 -16
- package/src/services/ConfirmService.ts +0 -26
- package/src/services/DateService.spec.ts +0 -102
- package/src/services/DateService.ts +0 -182
- package/src/services/DownloadService.spec.ts +0 -23
- package/src/services/DownloadService.ts +0 -21
- package/src/services/FilterComponentService.tsx +0 -67
- package/src/services/FilterService.spec.ts +0 -105
- package/src/services/FilterService.ts +0 -80
- package/src/services/FormatService.spec.ts +0 -85
- package/src/services/FormatService.ts +0 -60
- package/src/services/ToastService.spec.ts +0 -44
- package/src/services/ToastService.ts +0 -24
- package/src/typings.d.ts +0 -4
- package/src/utility/MockRouter/index.ts +0 -46
- package/src/utility/icons.tsx +0 -51
- package/src/utility/interfaces.ts +0 -142
- package/src/utility/middleware.ts +0 -10
- package/src/utility/prop-types.ts +0 -89
- package/src/utility/register.tsx +0 -11
- package/tsconfig.eslint.json +0 -4
- /package/dist/{filters/interfaces.js → interfaces.js} +0 -0
|
@@ -1,93 +1,24 @@
|
|
|
1
|
-
import { AuthIdentifier } from '@sqrzro/hooks';
|
|
2
|
-
import type { AuthObject } from '@sqrzro/hooks';
|
|
3
|
-
|
|
4
|
-
import type { NavigationObject } from '../utility/interfaces';
|
|
5
|
-
|
|
6
|
-
export interface Me {
|
|
7
|
-
name: string;
|
|
8
|
-
permissions?: string[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export enum AppLayout {
|
|
12
|
-
sidebar = 'sidebar',
|
|
13
|
-
topbar = 'topbar',
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface AppConfigObject {
|
|
17
|
-
auth: AuthObject;
|
|
18
|
-
Logo?: React.ComponentType;
|
|
19
|
-
me?: Me;
|
|
20
|
-
name: string;
|
|
21
|
-
navigation: NavigationObject[];
|
|
22
|
-
paths: { api: string };
|
|
23
|
-
style: { brand?: string; isDarkMode?: boolean; layout: AppLayout };
|
|
24
|
-
}
|
|
25
|
-
|
|
26
1
|
export interface Config {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
navigation
|
|
32
|
-
paths?: Partial<AppConfigObject['paths']>;
|
|
33
|
-
style?: Partial<AppConfigObject['style']>;
|
|
2
|
+
app: {
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
};
|
|
6
|
+
navigation: Record<string, string>;
|
|
34
7
|
}
|
|
35
8
|
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
loginUrl: 'tokens',
|
|
41
|
-
meUrl: 'me',
|
|
42
|
-
passwordUrl: 'tokens/password',
|
|
43
|
-
tfa: false,
|
|
9
|
+
let cachedConfig: Config = {
|
|
10
|
+
app: {
|
|
11
|
+
name: 'Square Zero',
|
|
12
|
+
url: 'http://localhost:8080',
|
|
44
13
|
},
|
|
45
|
-
|
|
46
|
-
navigation: [],
|
|
47
|
-
paths: { api: 'http://localhost:8081' },
|
|
48
|
-
style: { isDarkMode: false, layout: AppLayout.sidebar },
|
|
14
|
+
navigation: {},
|
|
49
15
|
};
|
|
50
16
|
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
return defaults;
|
|
17
|
+
export function setConfig(config: Config): Config {
|
|
18
|
+
cachedConfig = config;
|
|
19
|
+
return cachedConfig;
|
|
56
20
|
}
|
|
57
21
|
|
|
58
|
-
export function
|
|
59
|
-
|
|
60
|
-
return appConfig;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const config: AppConfigObject = {
|
|
64
|
-
auth: mergeConfig(appConfig.auth, userConfig.auth),
|
|
65
|
-
name: userConfig.name || 'Square Zero Admin',
|
|
66
|
-
navigation: userConfig.navigation || appConfig.navigation,
|
|
67
|
-
paths: userConfig.paths ? { ...appConfig.paths, ...userConfig.paths } : appConfig.paths,
|
|
68
|
-
style: userConfig.style ? { ...appConfig.style, ...userConfig.style } : appConfig.style,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
if (userConfig.Logo) {
|
|
72
|
-
config.Logo = userConfig.Logo;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (userConfig.me) {
|
|
76
|
-
config.me = { ...userConfig.me };
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
appConfig = config;
|
|
80
|
-
return appConfig;
|
|
22
|
+
export function getConfig(): Config {
|
|
23
|
+
return cachedConfig;
|
|
81
24
|
}
|
|
82
|
-
|
|
83
|
-
function get(): AppConfigObject {
|
|
84
|
-
return appConfig;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
88
|
-
const ConfigService = {
|
|
89
|
-
get,
|
|
90
|
-
registerConfig,
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export default ConfigService;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import type { RegisteredClassNames } from '@sqrzro/components';
|
|
5
|
+
|
|
6
|
+
const classNames: RegisteredClassNames = {
|
|
7
|
+
button: (props) => ({
|
|
8
|
+
root: {
|
|
9
|
+
danger: 'bg-red-500 border-red-500 text-white',
|
|
10
|
+
default: clsx(
|
|
11
|
+
'bg-white h-10 px-5 rounded-md text-md text-slate-600 border border-slate-300',
|
|
12
|
+
props?.isFullWidth ? 'w-full' : null
|
|
13
|
+
),
|
|
14
|
+
primary:
|
|
15
|
+
'bg-primary font-semibold text-white border-none shadow-[inset_rgba(255,255,255,0.1)_0_20px]',
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
calendar: () => ({
|
|
19
|
+
root: 'text-sm text-slate-600 p-4 pb-3',
|
|
20
|
+
head: 'text-xs text-center pb-2 text-slate-400',
|
|
21
|
+
month: 'w-full table-fixed',
|
|
22
|
+
day: {
|
|
23
|
+
default: 'h-10 border border-gray-200',
|
|
24
|
+
highlighted: 'bg-red-300',
|
|
25
|
+
selected: 'bg-blue-400',
|
|
26
|
+
},
|
|
27
|
+
}),
|
|
28
|
+
calendarNavigation: () => ({
|
|
29
|
+
root: 'flex justify-between items-center mb-6',
|
|
30
|
+
title: 'font-semibold text-base',
|
|
31
|
+
control: 'h-6 w-6 bg-red-300',
|
|
32
|
+
previous: '-order-1',
|
|
33
|
+
}),
|
|
34
|
+
emptyMessage: () => ({
|
|
35
|
+
root: 'text-center text-slate-500 my-24',
|
|
36
|
+
title: 'text-2xl font-semibold mb-2',
|
|
37
|
+
}),
|
|
38
|
+
dropdown: () => ({
|
|
39
|
+
item: { default: 'text-gray-700 block px-3 py-2 text-sm', selected: 'bg-red-400' },
|
|
40
|
+
}),
|
|
41
|
+
fieldset: (props) => ({
|
|
42
|
+
root: clsx(
|
|
43
|
+
'bg-white p-8 shadow rounded-md',
|
|
44
|
+
props?.isEditable ? 'grid grid-cols-[30%_1fr]' : ''
|
|
45
|
+
),
|
|
46
|
+
title: 'mb-8 text-xl font-semibold leading-none text-gray-700',
|
|
47
|
+
}),
|
|
48
|
+
formField: (props) => ({
|
|
49
|
+
root: {
|
|
50
|
+
default: props?.isEditable
|
|
51
|
+
? 'grid grid-cols-[25%_1fr] border-t border-slate-200 py-4'
|
|
52
|
+
: 'mb-6',
|
|
53
|
+
},
|
|
54
|
+
label: clsx('font-semibold', props?.isEditable ? 'flex items-center' : 'block mb-2'),
|
|
55
|
+
optional: 'pl-2 text-base text-grey-dark font-normal',
|
|
56
|
+
error: 'flex gap-2 items-center mt-2 text-red-700 before:h-4 before:w-4 before:bg-[url(/images/icons/error.svg)] before:rounded-full',
|
|
57
|
+
}),
|
|
58
|
+
inputPanel: () => ({
|
|
59
|
+
root: 'bg-white border border-slate-300 shadow-md',
|
|
60
|
+
}),
|
|
61
|
+
modal: () => ({
|
|
62
|
+
root: {
|
|
63
|
+
default:
|
|
64
|
+
'bg-white rounded-lg w-full max-w-2xl backdrop:bg-slate-800/60 backdrop:backdrop-blur-sm transition-opacity opacity-0 open:opacity-100 duration-200',
|
|
65
|
+
},
|
|
66
|
+
title: 'text-2xl font-semibold text-center p-4 border-b border-slate-200 text-slate-700',
|
|
67
|
+
content: 'p-4',
|
|
68
|
+
actions: 'flex justify-end p-4 border-t border-slate-200',
|
|
69
|
+
}),
|
|
70
|
+
staticTextInput: () => ({
|
|
71
|
+
root: { default: 'bg-white border border-gray-300 h-10 px-3 rounded-sm text-md' },
|
|
72
|
+
}),
|
|
73
|
+
switch: () => ({
|
|
74
|
+
root: {
|
|
75
|
+
default: 'cursor-pointer w-10 h-6 bg-slate-300 rounded-full p-1 transition-colors my-2',
|
|
76
|
+
checked: 'bg-green-500',
|
|
77
|
+
},
|
|
78
|
+
control: {
|
|
79
|
+
default:
|
|
80
|
+
'w-4 h-4 bg-white rounded-full shadow-md transform translate-x-0 transition-transform',
|
|
81
|
+
checked: 'translate-x-full',
|
|
82
|
+
},
|
|
83
|
+
}),
|
|
84
|
+
textButton: () => ({
|
|
85
|
+
root: { danger: 'text-red-600' },
|
|
86
|
+
}),
|
|
87
|
+
textInput: () => ({
|
|
88
|
+
root: {
|
|
89
|
+
default: 'border border-gray-300 h-10 px-3 rounded-sm text-md focus:border-primary',
|
|
90
|
+
error: 'border-red-700',
|
|
91
|
+
},
|
|
92
|
+
}),
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export default classNames;
|
package/src/styles/tailwind.css
CHANGED
|
@@ -3,55 +3,45 @@
|
|
|
3
3
|
@tailwind utilities;
|
|
4
4
|
|
|
5
5
|
@layer base {
|
|
6
|
-
|
|
6
|
+
body {
|
|
7
|
+
@apply font-body bg-slate-100 text-slate-800 text-sm;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@layer utilities {
|
|
12
|
+
@keyframes show {
|
|
7
13
|
from {
|
|
8
14
|
opacity: 0;
|
|
15
|
+
transform: translateY(2rem);
|
|
9
16
|
}
|
|
10
|
-
|
|
11
17
|
to {
|
|
12
18
|
opacity: 1;
|
|
19
|
+
transform: translateY(0);
|
|
13
20
|
}
|
|
14
21
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
background-color: transparent;
|
|
18
|
-
padding: 0;
|
|
22
|
+
.show {
|
|
23
|
+
animation: show 0.1s ease-in-out;
|
|
19
24
|
}
|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
|
|
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% {
|
|
26
|
+
@keyframes fade {
|
|
27
|
+
from {
|
|
35
28
|
opacity: 0;
|
|
36
|
-
transform: translate3d(0, 2rem, 0);
|
|
37
29
|
}
|
|
38
|
-
|
|
39
|
-
100% {
|
|
30
|
+
to {
|
|
40
31
|
opacity: 1;
|
|
41
|
-
transform: translate3d(0, 0, 0);
|
|
42
32
|
}
|
|
43
33
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
animation: alertEnter .15s ease-in-out;
|
|
47
|
-
animation-delay: .2s;
|
|
48
|
-
animation-fill-mode: both;
|
|
34
|
+
.fade {
|
|
35
|
+
animation: fade 0.2s ease-in-out;
|
|
49
36
|
}
|
|
50
37
|
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
.showpanel:popover-open {
|
|
39
|
+
@starting-style {
|
|
40
|
+
opacity: 0;
|
|
41
|
+
transform: scale(0.95);
|
|
42
|
+
}
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transform: scale(1);
|
|
45
|
+
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
|
56
46
|
}
|
|
57
|
-
}
|
|
47
|
+
}
|
package/tailwind.config.js
CHANGED
|
@@ -2,10 +2,15 @@ const { withSZ } = require('@sqrzro/tailwind-plugin');
|
|
|
2
2
|
|
|
3
3
|
module.exports = withSZ({
|
|
4
4
|
mode: 'jit',
|
|
5
|
-
content: ['./src/**/*.tsx'],
|
|
5
|
+
content: ['./src/**/*.tsx', './src/styles/config.ts'],
|
|
6
6
|
theme: {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
extend: {
|
|
8
|
+
colors: {
|
|
9
|
+
primary: 'rgba(127, 86, 217, 1)',
|
|
10
|
+
},
|
|
11
|
+
fontFamily: {
|
|
12
|
+
body: ['var(--font-body)', 'sans-serif'],
|
|
13
|
+
},
|
|
9
14
|
},
|
|
10
15
|
},
|
|
11
16
|
});
|
package/tsconfig.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"declaration": true,
|
|
5
5
|
"esModuleInterop": true,
|
|
6
6
|
"importHelpers": true,
|
|
7
|
-
"jsx": "react",
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
8
|
"lib": ["dom", "esnext"],
|
|
9
9
|
"moduleResolution": "node",
|
|
10
10
|
"outDir": "dist",
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"strictNullChecks": true,
|
|
14
14
|
"target": "esnext"
|
|
15
15
|
},
|
|
16
|
-
"include": ["src/**/*"],
|
|
17
|
-
"exclude": ["node_modules"
|
|
16
|
+
"include": ["next-env.d.ts", "src/**/*"],
|
|
17
|
+
"exclude": ["node_modules"]
|
|
18
18
|
}
|
package/.turbo/turbo-docs.log
DELETED
|
File without changes
|
package/.turbo/turbo-lint.log
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
$ tsc --noEmit && eslint "./src/**/*.tsx" "./src/**/*.ts"
|
|
2
|
-
src/components/Alert/index.tsx(12,24): error TS2307: Cannot find module '../../hooks/useVariant' or its corresponding type declarations.
|
|
3
|
-
src/components/Alert/index.tsx(14,23): error TS2305: Module '"../../utility/interfaces"' has no exported member 'StyleVariant'.
|
|
4
|
-
src/components/Alert/index.tsx(51,25): error TS2345: Argument of type 'MouseEvent' is not assignable to parameter of type 'MouseEvent<HTMLButtonElement, MouseEvent>'.
|
|
5
|
-
Type 'MouseEvent' is missing the following properties from type 'MouseEvent<HTMLButtonElement, MouseEvent>': nativeEvent, isDefaultPrevented, isPropagationStopped, persist
|
|
6
|
-
src/components/Alert/index.tsx(81,33): error TS2322: Type '{ children: string; key: string; isDisabled: boolean | null | undefined; onClick: () => void; variant: any; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
7
|
-
Property 'variant' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
8
|
-
src/components/Alert/index.tsx(88,51): error TS2322: Type '{ children: string; type: "submit"; variant: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
9
|
-
Property 'variant' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
10
|
-
src/components/AutoSuggest/index.tsx(13,26): error TS2307: Cannot find module '../../core/DropdownList' or its corresponding type declarations.
|
|
11
|
-
src/components/AutoSuggest/index.tsx(14,35): error TS2307: Cannot find module '../../core/DropdownList' or its corresponding type declarations.
|
|
12
|
-
src/components/AutoSuggest/index.tsx(15,24): error TS2307: Cannot find module '../../core/InputPanel' or its corresponding type declarations.
|
|
13
|
-
src/components/Button/Button.stories.tsx(5,15): error TS2614: Module '"./index"' has no exported member 'ButtonProps'. Did you mean to use 'import ButtonProps from "./index"' instead?
|
|
14
|
-
src/components/CalendarInput/index.tsx(10,24): error TS2307: Cannot find module '../../core/InputPanel' or its corresponding type declarations.
|
|
15
|
-
src/components/CalendarInput/index.tsx(11,29): error TS2307: Cannot find module '../../core/StaticTextInput' or its corresponding type declarations.
|
|
16
|
-
src/components/ConnectedDropdown/index.tsx(8,22): error TS2307: Cannot find module '../Dropdown' or its corresponding type declarations.
|
|
17
|
-
src/components/FileInput/index.tsx(7,29): error TS2307: Cannot find module '../../core/StaticTextInput' or its corresponding type declarations.
|
|
18
|
-
src/components/FormRepeater/index.tsx(106,21): error TS2322: Type '{ key: number; action: Action | null; id: string; label: string | undefined; name: string; onChange: (event: InputEvent<string, SimpleObject>) => void; render: (props: InputProps<...>) => ReactElement<...>; value: string; isShallow: true; }' is not assignable to type 'IntrinsicAttributes & FormFieldProps<string>'.
|
|
19
|
-
Property 'isShallow' does not exist on type 'IntrinsicAttributes & FormFieldProps<string>'.
|
|
20
|
-
src/components/InfoPanel/index.tsx(5,24): error TS2307: Cannot find module '../../hooks/useVariant' or its corresponding type declarations.
|
|
21
|
-
src/components/InfoPanel/index.tsx(7,15): error TS2305: Module '"../../utility/interfaces"' has no exported member 'StyleVariant'.
|
|
22
|
-
src/components/List/index.tsx(6,15): error TS2614: Module '"../../core/EmptyMessage"' has no exported member 'EmptyMessageProps'. Did you mean to use 'import EmptyMessageProps from "../../core/EmptyMessage"' instead?
|
|
23
|
-
src/components/List/index.tsx(8,24): error TS2307: Cannot find module '../../core/Pagination' or its corresponding type declarations.
|
|
24
|
-
src/components/LoginForm/index.tsx(11,27): error TS2307: Cannot find module '../PasswordInput' or its corresponding type declarations.
|
|
25
|
-
src/components/LoginForm/index.tsx(33,9): error TS2554: Expected 1 arguments, but got 3.
|
|
26
|
-
src/components/ModalActions/index.tsx(7,15): error TS2305: Module '"../../utility/interfaces"' has no exported member 'ButtonVariant'.
|
|
27
|
-
src/components/ModalActions/index.tsx(34,21): error TS2322: Type '{ children: string; isDisabled: boolean | undefined; onClick: MouseEventHandler<HTMLButtonElement> | undefined; type: "button" | "submit"; variant: any; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
28
|
-
Property 'variant' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
29
|
-
src/components/MoneyInput/index.tsx(6,15): error TS2614: Module '"../TextInput"' has no exported member 'TextInputProps'. Did you mean to use 'import TextInputProps from "../TextInput"' instead?
|
|
30
|
-
src/components/Switch/index.tsx(7,8): error TS2613: Module '"/Users/richard/Sites/@sqrzro/sqrzro/packages/admin/src/core/Assistive/index"' has no default export. Did you mean to use 'import { Assistive } from "/Users/richard/Sites/@sqrzro/sqrzro/packages/admin/src/core/Assistive/index"' instead?
|
|
31
|
-
src/components/Table/index.tsx(8,15): error TS2614: Module '"../../core/EmptyMessage"' has no exported member 'EmptyMessageProps'. Did you mean to use 'import EmptyMessageProps from "../../core/EmptyMessage"' instead?
|
|
32
|
-
src/components/Table/index.tsx(9,24): error TS2307: Cannot find module '../../core/Pagination' or its corresponding type declarations.
|
|
33
|
-
src/components/Table/index.tsx(11,23): error TS2307: Cannot find module '../../core/TableCell' or its corresponding type declarations.
|
|
34
|
-
src/components/Table/index.tsx(12,23): error TS2307: Cannot find module '../../core/TableHead' or its corresponding type declarations.
|
|
35
|
-
src/components/Table/index.tsx(13,30): error TS2307: Cannot find module '../../core/TableCell' or its corresponding type declarations.
|
|
36
|
-
src/components/Table/index.tsx(14,22): error TS2307: Cannot find module '../../core/TableRow' or its corresponding type declarations.
|
|
37
|
-
src/components/Table/index.tsx(15,40): error TS2307: Cannot find module '../../core/TableRow' or its corresponding type declarations.
|
|
38
|
-
src/components/TextArea/index.tsx(7,15): error TS2614: Module '"../TextInput"' has no exported member 'TextInputProps'. Did you mean to use 'import TextInputProps from "../TextInput"' instead?
|
|
39
|
-
src/components/TextInput/TextInput.stories.tsx(5,15): error TS2614: Module '"./index"' has no exported member 'TextInputProps'. Did you mean to use 'import TextInputProps from "./index"' instead?
|
|
40
|
-
src/components/WebsiteInput/index.tsx(6,15): error TS2614: Module '"../TextInput"' has no exported member 'TextInputProps'. Did you mean to use 'import TextInputProps from "../TextInput"' instead?
|
|
41
|
-
src/core/AlertComponent/index.tsx(12,23): error TS2305: Module '"../../utility/interfaces"' has no exported member 'StyleVariant'.
|
|
42
|
-
src/core/AlertComponent/index.tsx(81,33): error TS2322: Type '{ children: string; key: string; isDisabled: boolean | null | undefined; onClick: () => void; variant: any; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
43
|
-
Property 'variant' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
44
|
-
src/core/AlertComponent/index.tsx(87,55): error TS2322: Type '{ children: string; onClick: (event: MouseEvent<HTMLButtonElement, MouseEvent>) => void; variant: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
45
|
-
Property 'variant' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
46
|
-
src/core/AppLogoImage/index.tsx(5,8): error TS2613: Module '"/Users/richard/Sites/@sqrzro/sqrzro/packages/admin/src/core/Assistive/index"' has no default export. Did you mean to use 'import { Assistive } from "/Users/richard/Sites/@sqrzro/sqrzro/packages/admin/src/core/Assistive/index"' instead?
|
|
47
|
-
src/core/AuthForm/index.tsx(13,15): error TS2305: Module '"../../utility/interfaces"' has no exported member 'StyleVariant'.
|
|
48
|
-
src/core/AuthForm/index.tsx(14,24): error TS2307: Cannot find module '../../hooks/useVariant' or its corresponding type declarations.
|
|
49
|
-
src/core/ChkRadList/index.tsx(5,20): error TS2307: Cannot find module '../ChkRad' or its corresponding type declarations.
|
|
50
|
-
src/core/ConnectedRepeater/index.tsx(16,30): error TS2307: Cannot find module '../TableCell' or its corresponding type declarations.
|
|
51
|
-
src/core/ConnectedRepeaterComponent/index.tsx(8,30): error TS2307: Cannot find module '../TableCell' or its corresponding type declarations.
|
|
52
|
-
src/core/EmptyMessage/EmptyMessage.stories.tsx(24,1): error TS2304: Cannot find name 'Custom'.
|
|
53
|
-
src/core/EmptyMessage/EmptyMessage.stories.tsx(31,1): error TS2304: Cannot find name 'WithAction'.
|
|
54
|
-
src/core/FilterItem/index.tsx(12,24): error TS2307: Cannot find module '../InputPanel' or its corresponding type declarations.
|
|
55
|
-
src/core/Filters/index.tsx(91,48): error TS2322: Type '{ children: string[]; onClick: () => void; variant: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
56
|
-
Property 'variant' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
57
|
-
src/core/Filters/index.tsx(133,33): error TS2322: Type '{ children: string; key: string; isDisabled: boolean | null | undefined; onClick: () => void; variant: any; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
58
|
-
Property 'variant' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
59
|
-
src/core/Filters/index.tsx(142,48): error TS2322: Type '{ children: string; onClick: () => void; variant: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
60
|
-
Property 'variant' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
61
|
-
src/core/Header/index.tsx(9,15): error TS2305: Module '"../../utility/interfaces"' has no exported member 'StyleVariant'.
|
|
62
|
-
src/core/IconButton/index.tsx(7,8): error TS2613: Module '"/Users/richard/Sites/@sqrzro/sqrzro/packages/admin/src/core/Assistive/index"' has no default export. Did you mean to use 'import { Assistive } from "/Users/richard/Sites/@sqrzro/sqrzro/packages/admin/src/core/Assistive/index"' instead?
|
|
63
|
-
src/core/ListItemAction/index.tsx(5,24): error TS2307: Cannot find module '../../hooks/useVariant' or its corresponding type declarations.
|
|
64
|
-
src/core/ListItemAction/index.tsx(7,23): error TS2305: Module '"../../utility/interfaces"' has no exported member 'ButtonVariant'.
|
|
65
|
-
src/core/ListItemMetaItem/index.tsx(6,20): error TS2307: Cannot find module '../Styled' or its corresponding type declarations.
|
|
66
|
-
src/core/ListItemTitle/index.tsx(8,17): error TS2307: Cannot find module '../../components/Tag' or its corresponding type declarations.
|
|
67
|
-
src/core/ListItemTitle/index.tsx(10,20): error TS2307: Cannot find module '../Styled' or its corresponding type declarations.
|
|
68
|
-
src/core/MePanel/index.tsx(5,26): error TS2307: Cannot find module '../DropdownList' or its corresponding type declarations.
|
|
69
|
-
src/core/MePanel/index.tsx(6,36): error TS2307: Cannot find module '../DropdownList' or its corresponding type declarations.
|
|
70
|
-
src/core/ModalComponent/index.tsx(10,15): error TS2305: Module '"../../utility/interfaces"' has no exported member 'StyleVariant'.
|
|
71
|
-
src/core/PasswordResetForm/index.tsx(9,27): error TS2307: Cannot find module '../../components/PasswordInput' or its corresponding type declarations.
|
|
72
|
-
src/core/SummaryListItem/index.tsx(5,17): error TS2307: Cannot find module '../../components/Tag' or its corresponding type declarations.
|
|
73
|
-
src/core/SummaryListItem/index.tsx(7,20): error TS2307: Cannot find module '../Styled' or its corresponding type declarations.
|
|
74
|
-
src/core/SummaryListItem/index.tsx(9,15): error TS2305: Module '"../../utility/interfaces"' has no exported member 'StyleVariant'.
|
|
75
|
-
src/core/TwoFactorAuthenticator/index.tsx(3,23): error TS2307: Cannot find module '../../components/CodeInput' or its corresponding type declarations.
|
|
76
|
-
src/core/TwoFactorSetupAuthenticator/index.tsx(6,23): error TS2307: Cannot find module '../../components/CodeInput' or its corresponding type declarations.
|
|
77
|
-
src/core/YubikeyInput/index.tsx(4,8): error TS2613: Module '"/Users/richard/Sites/@sqrzro/sqrzro/packages/admin/src/core/Assistive/index"' has no default export. Did you mean to use 'import { Assistive } from "/Users/richard/Sites/@sqrzro/sqrzro/packages/admin/src/core/Assistive/index"' instead?
|
|
78
|
-
src/filters/BooleanFilter/index.tsx(4,22): error TS2307: Cannot find module '../../components/Dropdown' or its corresponding type declarations.
|
|
79
|
-
src/filters/DropdownFilter/index.tsx(4,39): error TS2307: Cannot find module '../../components/Dropdown' or its corresponding type declarations.
|
|
80
|
-
src/filters/QuickDateFilter/index.tsx(4,22): error TS2307: Cannot find module '../../components/Dropdown' or its corresponding type declarations.
|
|
81
|
-
src/index.ts(25,15): error TS2307: Cannot find module './components/CodeInput' or its corresponding type declarations.
|
|
82
|
-
src/index.ts(26,38): error TS2307: Cannot find module './components/CodeInput' or its corresponding type declarations.
|
|
83
|
-
src/index.ts(39,15): error TS2307: Cannot find module './components/Dropdown' or its corresponding type declarations.
|
|
84
|
-
src/index.ts(40,37): error TS2307: Cannot find module './components/Dropdown' or its corresponding type declarations.
|
|
85
|
-
src/index.ts(79,15): error TS2307: Cannot find module './components/PasswordInput' or its corresponding type declarations.
|
|
86
|
-
src/index.ts(80,42): error TS2307: Cannot find module './components/PasswordInput' or its corresponding type declarations.
|
|
87
|
-
src/index.ts(91,15): error TS2307: Cannot find module './components/Tag' or its corresponding type declarations.
|
|
88
|
-
src/index.ts(92,32): error TS2307: Cannot find module './components/Tag' or its corresponding type declarations.
|
|
89
|
-
src/index.ts(114,15): error TS2307: Cannot find module './core/ChkRad' or its corresponding type declarations.
|
|
90
|
-
src/index.ts(115,15): error TS2307: Cannot find module './core/ChkRadIcon' or its corresponding type declarations.
|
|
91
|
-
src/index.ts(123,15): error TS2307: Cannot find module './core/DropdownList' or its corresponding type declarations.
|
|
92
|
-
src/index.ts(128,15): error TS2307: Cannot find module './core/FormError' or its corresponding type declarations.
|
|
93
|
-
src/index.ts(129,15): error TS2307: Cannot find module './core/FormLabel' or its corresponding type declarations.
|
|
94
|
-
src/index.ts(134,15): error TS2307: Cannot find module './core/InputPanel' or its corresponding type declarations.
|
|
95
|
-
src/index.ts(147,15): error TS2307: Cannot find module './core/Pagination' or its corresponding type declarations.
|
|
96
|
-
src/index.ts(148,15): error TS2307: Cannot find module './core/PaginationItem' or its corresponding type declarations.
|
|
97
|
-
src/index.ts(154,15): error TS2307: Cannot find module './core/StaticTextInput' or its corresponding type declarations.
|
|
98
|
-
src/index.ts(155,15): error TS2307: Cannot find module './core/Styled' or its corresponding type declarations.
|
|
99
|
-
src/index.ts(158,15): error TS2307: Cannot find module './core/TableActionsCell' or its corresponding type declarations.
|
|
100
|
-
src/index.ts(159,15): error TS2307: Cannot find module './core/TableCell' or its corresponding type declarations.
|
|
101
|
-
src/index.ts(160,15): error TS2307: Cannot find module './core/TableHead' or its corresponding type declarations.
|
|
102
|
-
src/index.ts(161,15): error TS2307: Cannot find module './core/TableRow' or its corresponding type declarations.
|
|
103
|
-
src/index.ts(163,15): error TS2307: Cannot find module './core/TextInputAncillary' or its corresponding type declarations.
|
|
104
|
-
src/index.ts(196,15): error TS2307: Cannot find module './hooks/useVariant' or its corresponding type declarations.
|
|
105
|
-
src/index.ts(197,39): error TS2307: Cannot find module './hooks/useVariant' or its corresponding type declarations.
|
|
106
|
-
src/utility/interfaces.ts(60,15): error TS2304: Cannot find name 'ButtonVariant'.
|
|
107
|
-
src/utility/interfaces.ts(60,31): error TS2304: Cannot find name 'ButtonVariant'.
|
|
108
|
-
src/utility/middleware.ts(6,50): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
|
|
109
|
-
src/utility/prop-types.ts(7,15): error TS2305: Module '"../utility/interfaces"' has no exported member 'ButtonVariant'.
|
|
110
|
-
src/utility/prop-types.ts(7,30): error TS2305: Module '"../utility/interfaces"' has no exported member 'StyleVariant'.
|
|
111
|
-
error Command failed with exit code 2.
|
|
112
|
-
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* istanbul ignore file */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { createPortal } from 'react-dom';
|
|
4
|
-
import { ifWindow } from '@sqrzro/utility';
|
|
5
|
-
import AlertComponent from '../../core/AlertComponent';
|
|
6
|
-
function Alert(props) {
|
|
7
|
-
return ifWindow(() => {
|
|
8
|
-
const portalElement = document.getElementById('alert-portal');
|
|
9
|
-
if (!portalElement) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
return createPortal(React.createElement(AlertComponent, { ...props }), portalElement);
|
|
13
|
-
}, null);
|
|
14
|
-
}
|
|
15
|
-
export default Alert;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
interface AllowProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
permission?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* The `Allow` component is essentially a wrappy that lets a developer display or hide child content
|
|
9
|
-
* based on the permissions a particular user has.
|
|
10
|
-
*
|
|
11
|
-
* By default, the
|
|
12
|
-
*/
|
|
13
|
-
declare function Allow({ children, permission }: AllowProps): React.ReactElement | null;
|
|
14
|
-
declare namespace Allow {
|
|
15
|
-
var propTypes: {
|
|
16
|
-
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
17
|
-
permission: PropTypes.Requireable<string>;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export default Allow;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import useAppConfig from '../../hooks/useAppConfig';
|
|
4
|
-
const hasPermission = (me, permission) => {
|
|
5
|
-
if (!me.permissions || !permission) {
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
return me.permissions.includes(permission);
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* The `Allow` component is essentially a wrappy that lets a developer display or hide child content
|
|
12
|
-
* based on the permissions a particular user has.
|
|
13
|
-
*
|
|
14
|
-
* By default, the
|
|
15
|
-
*/
|
|
16
|
-
function Allow({ children, permission }) {
|
|
17
|
-
const { me } = useAppConfig();
|
|
18
|
-
if (me && !hasPermission(me, permission)) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
// Use the `Fragment` here to get around TS complaining about FunctionComponent
|
|
22
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
23
|
-
return React.createElement(Fragment, null, children);
|
|
24
|
-
}
|
|
25
|
-
Allow.propTypes = {
|
|
26
|
-
children: PropTypes.node.isRequired,
|
|
27
|
-
permission: PropTypes.string,
|
|
28
|
-
};
|
|
29
|
-
export default Allow;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import AppLayout from './index';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/AppLayout',
|
|
5
|
-
component: AppLayout,
|
|
6
|
-
};
|
|
7
|
-
const Template = (args) => (React.createElement(AppLayout, { ...args }));
|
|
8
|
-
export const Basic = Template.bind({});
|
|
9
|
-
Basic.args = {
|
|
10
|
-
children: 'Lorem Ipsum',
|
|
11
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import type { DropdownItem } from '../../core/DropdownPanel';
|
|
4
|
-
import type { InputProps } from '../../utility/interfaces';
|
|
5
|
-
export interface AutoSuggestProps extends InputProps<string> {
|
|
6
|
-
/**
|
|
7
|
-
* An array of strings to filter for the suggestions. If a `remote` prop is specified, this is
|
|
8
|
-
* ignored.
|
|
9
|
-
*/
|
|
10
|
-
data?: (DropdownItem | string)[] | null;
|
|
11
|
-
/** The URL for the endpoint that will return the suggestions */
|
|
12
|
-
remote?: string | null;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* As a user types, suggestions based on they've typed are displayed in a panel below. When a user
|
|
16
|
-
* clicks a suggestion, the value is updated. Under the hood, it is more or less a combination of a
|
|
17
|
-
* `TextInput` and a `DropdownPanel`.
|
|
18
|
-
*
|
|
19
|
-
* ## Request Methods
|
|
20
|
-
*
|
|
21
|
-
* At its most basic, the suggestions are a predefined array of `data`. However,
|
|
22
|
-
* if the `remote` prop is specified, the AutoSuggest will `GET` that endpoint as the user types.
|
|
23
|
-
* The following will be appended onto the query:
|
|
24
|
-
*
|
|
25
|
-
* ````
|
|
26
|
-
* ?search={value}
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* The endpoint should then handle filtering the data, and returning an array of the results. If the
|
|
30
|
-
* value of the input changes before the previous `GET` request has completed, that one is
|
|
31
|
-
* cancelled and a new one started, with the updated search query.
|
|
32
|
-
*
|
|
33
|
-
* ## Data Formats
|
|
34
|
-
*
|
|
35
|
-
* The data returned should be one of two formats. The choice of format has an impact on how the
|
|
36
|
-
* value is stored, and the label that is displayed.
|
|
37
|
-
*
|
|
38
|
-
* The most basic format is an array of strings. The value is stored as the string itself, and the
|
|
39
|
-
* label displays the same string. This is most useful for situations where no relationships are
|
|
40
|
-
* required on the backend, and the `AutoSuggest` is purely being used to assist the user in
|
|
41
|
-
* defining a value.
|
|
42
|
-
*
|
|
43
|
-
* An example of this data would be:
|
|
44
|
-
*
|
|
45
|
-
* ```
|
|
46
|
-
* ['apple', 'banana', 'carrot']
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* The second format is an array of objects. The value is stored as the `id` of the object, and the
|
|
50
|
-
* label displays the `name` of the object. This is most useful for situations where a relationship
|
|
51
|
-
* is required on the backend, and the `AutoSuggest` is being used to assist the user in defining
|
|
52
|
-
* a value. With this format, the `AutoSuggest` works more like a `Dropdown`.
|
|
53
|
-
*
|
|
54
|
-
* For example:
|
|
55
|
-
*
|
|
56
|
-
* ```
|
|
57
|
-
* [{ id: 1, name: 'apple' }, { id: 2, name: 'banana' }, { id: 3, name: 'carrot' }]
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
declare function AutoSuggest({ data, name, remote, value, hasError, onChange, }: AutoSuggestProps): React.ReactElement;
|
|
61
|
-
declare namespace AutoSuggest {
|
|
62
|
-
var propTypes: {
|
|
63
|
-
name: PropTypes.Validator<string>;
|
|
64
|
-
data: PropTypes.Requireable<NonNullable<NonNullable<string | NonNullable<PropTypes.InferProps<{
|
|
65
|
-
id: PropTypes.Validator<string>;
|
|
66
|
-
name: PropTypes.Validator<string>;
|
|
67
|
-
}>>>>[]>;
|
|
68
|
-
hasError: PropTypes.Requireable<boolean>;
|
|
69
|
-
remote: PropTypes.Requireable<string>;
|
|
70
|
-
value: PropTypes.Requireable<string>;
|
|
71
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
export default AutoSuggest;
|