generator-reackt 0.5.0 → 1.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 (61) hide show
  1. package/.prettierrc +1 -1
  2. package/.stylelintrc +3 -102
  3. package/LICENSE +17 -5
  4. package/README.md +4 -2
  5. package/generators/app/index.js +1 -1
  6. package/generators/component/index.js +1 -1
  7. package/generators/module/index.js +1 -1
  8. package/generators/util/fs.js +1 -1
  9. package/package.json +53 -39
  10. package/templates/app/.lintstagedrc +1 -1
  11. package/templates/app/.prettierrc +1 -1
  12. package/templates/app/.storybook/main.ts +19 -0
  13. package/templates/app/.storybook/preview.ts +36 -0
  14. package/templates/app/.stylelintrc +2 -268
  15. package/templates/app/.yarnrc.yml +3 -0
  16. package/templates/app/_eslint.config.mjs +51 -0
  17. package/templates/app/{package.json → _package.json} +2 -2
  18. package/templates/app/_stories/SuspenseFallback.stories.tsx +17 -0
  19. package/templates/app/gitignore +1 -0
  20. package/templates/app/jest.config.js +1 -1
  21. package/templates/app/src/components/ErrorBoundary.tsx +45 -0
  22. package/templates/app/src/components/Layout.tsx +142 -0
  23. package/templates/app/src/components/SuspenseFallback.tsx +96 -0
  24. package/templates/app/src/{index.scss → index.nscss} +8 -7
  25. package/templates/app/src/index.tsx +60 -0
  26. package/templates/app/src/pages/index.tsx +3 -0
  27. package/templates/app/src/reducers/application.ts +36 -0
  28. package/templates/app/src/reducers/{index.js → index.ts} +1 -0
  29. package/templates/app/src/sagas/application.ts +9 -0
  30. package/templates/app/src/sagas/{index.js → index.ts} +1 -0
  31. package/templates/app/src/selectors/application.test.ts +18 -0
  32. package/templates/app/src/selectors/application.ts +6 -0
  33. package/templates/app/src/types/globals.d.ts +1 -0
  34. package/templates/app/src/types/index.ts +11 -0
  35. package/templates/app/src/utils/{index.js → index.ts} +3 -3
  36. package/templates/app/tsconfig.json +18 -0
  37. package/templates/app/webpack.config.nts +121 -0
  38. package/templates/component/index.stories.tsx +14 -0
  39. package/templates/component/{index.js → index.tsx} +2 -5
  40. package/generators/es.regexp.flags-ccfbed60.js +0 -1
  41. package/templates/app/.babelrc +0 -9
  42. package/templates/app/.eslintrc.js +0 -185
  43. package/templates/app/.storybook/addons.js +0 -1
  44. package/templates/app/.storybook/config.js +0 -14
  45. package/templates/app/.storybook/webpack.config.babel.js +0 -7
  46. package/templates/app/jsconfig.json +0 -8
  47. package/templates/app/src/components/App.js +0 -14
  48. package/templates/app/src/icons.js +0 -4
  49. package/templates/app/src/index.js +0 -50
  50. package/templates/app/src/reducers/application.js +0 -21
  51. package/templates/app/src/sagas/application.js +0 -9
  52. package/templates/app/src/selectors/application.js +0 -1
  53. package/templates/app/src/selectors/application.test.js +0 -13
  54. package/templates/app/webpack.config.babel.js +0 -103
  55. /package/templates/component/{index.test.js → index.test.tsx} +0 -0
  56. /package/templates/module/reducer/{index.test.js → index.test.ts} +0 -0
  57. /package/templates/module/reducer/{index.js → index.ts} +0 -0
  58. /package/templates/module/saga/{index.test.js → index.test.ts} +0 -0
  59. /package/templates/module/saga/{index.js → index.ts} +0 -0
  60. /package/templates/module/selector/{index.js → index.test.ts} +0 -0
  61. /package/templates/module/selector/{index.test.js → index.ts} +0 -0
@@ -1,271 +1,5 @@
1
1
  {
2
+ "customSyntax": "postcss-scss",
2
3
  "defaultSeverity": "warning",
3
- "extends": "stylelint-config-recommended",
4
- "rules": {
5
- "at-rule-allowed-list": null,
6
- "at-rule-disallowed-list": null,
7
- "at-rule-empty-line-before": [
8
- "always",
9
- {
10
- "except": [
11
- "blockless-after-blockless",
12
- "first-nested"
13
- ],
14
- "ignore": [
15
- "after-comment"
16
- ],
17
- "ignoreAtRules": [
18
- "else"
19
- ]
20
- }
21
- ],
22
- "at-rule-name-case": "lower",
23
- "at-rule-name-newline-after": "always-multi-line",
24
- "at-rule-name-space-after": "always-single-line",
25
- "at-rule-no-unknown": [
26
- true,
27
- {
28
- "ignoreAtRules": [
29
- "each",
30
- "content",
31
- "else",
32
- "extend",
33
- "if",
34
- "include",
35
- "mixin",
36
- "for",
37
- "elseif",
38
- "return",
39
- "function"
40
- ]
41
- }
42
- ],
43
- "at-rule-no-vendor-prefix": true,
44
- "at-rule-semicolon-newline-after": "always",
45
- "at-rule-semicolon-space-before": "never",
46
- "block-closing-brace-empty-line-before": "never",
47
- "block-closing-brace-newline-after": [
48
- "always",
49
- {
50
- "ignoreAtRules": [
51
- "else",
52
- "if"
53
- ]
54
- }
55
- ],
56
- "block-closing-brace-newline-before": "always-multi-line",
57
- "block-closing-brace-space-after": "always-single-line",
58
- "block-closing-brace-space-before": "always-single-line",
59
- "block-no-empty": true,
60
- "block-opening-brace-newline-after": "always",
61
- "block-opening-brace-newline-before": "never-single-line",
62
- "block-opening-brace-space-after": "always-single-line",
63
- "block-opening-brace-space-before": "always",
64
- "color-hex-case": "lower",
65
- "color-hex-length": "short",
66
- "color-named": [
67
- "never",
68
- {
69
- "severity": "error"
70
- }
71
- ],
72
- "color-no-hex": null,
73
- "color-no-invalid-hex": true,
74
- "comment-empty-line-before": [
75
- "always",
76
- {
77
- "ignore": [
78
- "after-comment",
79
- "stylelint-commands"
80
- ]
81
- }
82
- ],
83
- "comment-no-empty": true,
84
- "comment-whitespace-inside": "always",
85
- "comment-word-disallowed-list": [
86
- "/^TODO:/"
87
- ],
88
- "custom-media-pattern": null,
89
- "custom-property-empty-line-before": null,
90
- "custom-property-pattern": null,
91
- "declaration-bang-space-after": "never",
92
- "declaration-bang-space-before": "always",
93
- "declaration-block-no-duplicate-properties": true,
94
- "declaration-block-no-redundant-longhand-properties": true,
95
- "declaration-block-no-shorthand-property-overrides": true,
96
- "declaration-block-semicolon-newline-after": "always",
97
- "declaration-block-semicolon-newline-before": null,
98
- "declaration-block-semicolon-space-after": "always-single-line",
99
- "declaration-block-semicolon-space-before": "never",
100
- "declaration-block-single-line-max-declarations": 1,
101
- "declaration-block-trailing-semicolon": "always",
102
- "declaration-colon-newline-after": null,
103
- "declaration-colon-space-after": "always",
104
- "declaration-colon-space-before": "never",
105
- "declaration-empty-line-before": "never",
106
- "declaration-no-important": true,
107
- "declaration-property-unit-allowed-list": {
108
- "border": [
109
- "px"
110
- ],
111
- "line-height": [],
112
- "outline-offset": [
113
- "px"
114
- ]
115
- },
116
- "declaration-property-unit-disallowed-list": {},
117
- "declaration-property-value-allowed-list": {},
118
- "declaration-property-value-disallowed-list": {},
119
- "font-family-name-quotes": "always-unless-keyword",
120
- "font-family-no-duplicate-names": true,
121
- "font-family-no-missing-generic-family-keyword": true,
122
- "font-weight-notation": "numeric",
123
- "function-allowed-list": null,
124
- "function-calc-no-unspaced-operator": true,
125
- "function-comma-newline-after": null,
126
- "function-comma-newline-before": null,
127
- "function-comma-space-after": "always",
128
- "function-comma-space-before": null,
129
- "function-disallowed-list": null,
130
- "function-linear-gradient-no-nonstandard-direction": true,
131
- "function-max-empty-lines": 0,
132
- "function-name-case": "lower",
133
- "function-parentheses-newline-inside": null,
134
- "function-parentheses-space-inside": "never",
135
- "function-url-no-scheme-relative": true,
136
- "function-url-quotes": "always",
137
- "function-url-scheme-allowed-list": null,
138
- "function-url-scheme-disallowed-list": null,
139
- "function-whitespace-after": "always",
140
- "indentation": 2,
141
- "keyframe-declaration-no-important": true,
142
- "length-zero-no-unit": true,
143
- "max-empty-lines": 2,
144
- "max-line-length": 100,
145
- "max-nesting-depth": 4,
146
- "media-feature-colon-space-after": "always",
147
- "media-feature-colon-space-before": "never",
148
- "media-feature-name-allowed-list": null,
149
- "media-feature-name-case": "lower",
150
- "media-feature-name-disallowed-list": null,
151
- "media-feature-name-no-unknown": true,
152
- "media-feature-name-no-vendor-prefix": true,
153
- "media-feature-parentheses-space-inside": "never",
154
- "media-feature-range-operator-space-after": "always",
155
- "media-feature-range-operator-space-before": "always",
156
- "media-query-list-comma-newline-after": null,
157
- "media-query-list-comma-newline-before": null,
158
- "media-query-list-comma-space-after": null,
159
- "media-query-list-comma-space-before": null,
160
- "no-descending-specificity": true,
161
- "no-duplicate-at-import-rules": true,
162
- "no-duplicate-selectors": true,
163
- "no-empty-source": true,
164
- "no-eol-whitespace": true,
165
- "no-extra-semicolons": true,
166
- "no-invalid-double-slash-comments": true,
167
- "no-missing-end-of-source-newline": true,
168
- "no-unknown-animations": true,
169
- "number-leading-zero": "always",
170
- "number-max-precision": [
171
- 2,
172
- {
173
- "ignoreUnits": [
174
- "em",
175
- "rem"
176
- ]
177
- }
178
- ],
179
- "number-no-trailing-zeros": true,
180
- "property-allowed-list": null,
181
- "property-case": "lower",
182
- "property-disallowed-list": null,
183
- "property-no-unknown": true,
184
- "property-no-vendor-prefix": true,
185
- "rule-empty-line-before": [
186
- "always",
187
- {
188
- "except": [
189
- "first-nested"
190
- ],
191
- "ignore": [
192
- "after-comment"
193
- ]
194
- }
195
- ],
196
- "selector-attribute-brackets-space-inside": "never",
197
- "selector-attribute-operator-allowed-list": null,
198
- "selector-attribute-operator-disallowed-list": null,
199
- "selector-attribute-operator-space-after": "never",
200
- "selector-attribute-operator-space-before": "never",
201
- "selector-attribute-quotes": "always",
202
- "selector-class-pattern": "[a-z]+",
203
- "selector-combinator-allowed-list": null,
204
- "selector-combinator-disallowed-list": null,
205
- "selector-combinator-space-after": "always",
206
- "selector-combinator-space-before": "always",
207
- "selector-descendant-combinator-no-non-space": true,
208
- "selector-id-pattern": null,
209
- "selector-list-comma-newline-after": "always",
210
- "selector-list-comma-newline-before": "never-multi-line",
211
- "selector-list-comma-space-after": "always-single-line",
212
- "selector-list-comma-space-before": null,
213
- "selector-max-attribute": 1,
214
- "selector-max-class": 3,
215
- "selector-max-combinators": 2,
216
- "selector-max-compound-selectors": 3,
217
- "selector-max-empty-lines": 0,
218
- "selector-max-id": 1,
219
- "selector-max-pseudo-class": 2,
220
- "selector-max-specificity": [
221
- "0,5,1",
222
- {
223
- "severity": "error"
224
- }
225
- ],
226
- "selector-max-type": 2,
227
- "selector-max-universal": 1,
228
- "selector-nested-pattern": null,
229
- "selector-no-qualifying-type": true,
230
- "selector-no-vendor-prefix": true,
231
- "selector-pseudo-class-allowed-list": null,
232
- "selector-pseudo-class-case": "lower",
233
- "selector-pseudo-class-disallowed-list": null,
234
- "selector-pseudo-class-no-unknown": true,
235
- "selector-pseudo-class-parentheses-space-inside": "never",
236
- "selector-pseudo-element-allowed-list": null,
237
- "selector-pseudo-element-case": "lower",
238
- "selector-pseudo-element-colon-notation": "double",
239
- "selector-pseudo-element-disallowed-list": null,
240
- "selector-pseudo-element-no-unknown": true,
241
- "selector-type-case": "lower",
242
- "selector-type-no-unknown": true,
243
- "shorthand-property-no-redundant-values": true,
244
- "string-no-newline": true,
245
- "string-quotes": "double",
246
- "time-min-milliseconds": 100,
247
- "unit-allowed-list": [
248
- "%",
249
- "deg",
250
- "em",
251
- "ms",
252
- "px",
253
- "rem",
254
- "s",
255
- "vh",
256
- "vmax",
257
- "vmin",
258
- "vw"
259
- ],
260
- "unit-case": "lower",
261
- "unit-disallowed-list": null,
262
- "unit-no-unknown": true,
263
- "value-keyword-case": "lower",
264
- "value-list-comma-newline-after": "always-multi-line",
265
- "value-list-comma-newline-before": null,
266
- "value-list-comma-space-after": null,
267
- "value-list-comma-space-before": "never",
268
- "value-list-max-empty-lines": 0,
269
- "value-no-vendor-prefix": true
270
- }
4
+ "extends": "stylelint-config-recommended"
271
5
  }
@@ -0,0 +1,3 @@
1
+ enableScripts: true
2
+
3
+ nodeLinker: node-modules
@@ -0,0 +1,51 @@
1
+ import globals from 'globals';
2
+ import eslint from '@eslint/js';
3
+ import { configs } from 'typescript-eslint';
4
+ import { defineConfig } from 'eslint/config';
5
+ import reactPlugin from 'eslint-plugin-react';
6
+ import reactHooksPlugin from 'eslint-plugin-react-hooks';
7
+ import { flatConfigs as importConfigs } from 'eslint-plugin-import-x';
8
+ import prettierPlugin from 'eslint-plugin-prettier/recommended';
9
+
10
+ export default defineConfig(
11
+ eslint.configs.recommended,
12
+ ...configs.recommended,
13
+ importConfigs.recommended,
14
+ importConfigs.react,
15
+ importConfigs.typescript,
16
+ reactPlugin.configs.flat['recommended'],
17
+ reactHooksPlugin.configs.flat['recommended-latest'],
18
+ {
19
+ languageOptions: {
20
+ globals: globals.browser
21
+ },
22
+ rules: {
23
+ 'react/jsx-uses-react': 0,
24
+ 'react/jsx-sort-props': 2,
25
+ 'react/react-in-jsx-scope': 0
26
+ },
27
+ settings: {
28
+ react: {
29
+ version: 'detect'
30
+ }
31
+ }
32
+ },
33
+ {
34
+ files: ['webpack.config.*', '.storybook/*.ts'],
35
+ languageOptions: {
36
+ globals: globals.node
37
+ }
38
+ },
39
+ <% if (flags.addJest) { %>
40
+ {
41
+ files: ['./src/**/*.test.js'],
42
+ languageOptions: {
43
+ globals: {
44
+ ...globals.node,
45
+ ...globals.jest
46
+ }
47
+ }
48
+ },
49
+ <% } %>
50
+ prettierPlugin
51
+ );
@@ -5,8 +5,8 @@
5
5
  "author": "<%= author.name %> <<%= author.email %>>",
6
6
  "license": "<%= package.license %>",
7
7
  "scripts": {
8
- <% if (flags.addStorybook) { %>
9
- "storybook": "start-storybook",
8
+ <% if (flags.addLintStaged) { %>
9
+ "prepare": "husky",
10
10
  <% } %>
11
11
  <% if (flags.addJest) { %>
12
12
  "test": "jest",
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+
3
+ import SuspenseFallback from './SuspenseFallback';
4
+
5
+ const meta = {
6
+ title: 'Components/SuspenseFallback',
7
+ component: SuspenseFallback,
8
+ parameters: {
9
+ layout: 'fullscreen'
10
+ }
11
+ } satisfies Meta<typeof SuspenseFallback>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const Default: Story = {};
@@ -1,2 +1,3 @@
1
1
  node_modules/
2
2
  dist/
3
+ .yarn/
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  collectCoverage: true,
3
3
  collectCoverageFrom: ['src/**/*.js', '!src/*.js'],
4
4
  coverageDirectory: './coverage',
@@ -0,0 +1,45 @@
1
+ import { Fragment } from 'react';
2
+ <% if (styleFramework === 'bootstrap') { %>
3
+ import { Container } from 'react-bootstrap';
4
+ <% } else if (styleFramework === 'foundation') { %>
5
+ import { GridContainer as Container } from 'react-foundation';
6
+ <% } else if (styleFramework === 'materialize') { %>
7
+ import { Container } from 'react-materialize';
8
+ <% } else if (styleFramework === 'uikit') { %>
9
+ import { Container } from 'uikit-react';
10
+ <% } else if (styleFramework === 'materialUi') { %>
11
+ import { Container } from '@mui/material';
12
+ <% } %>
13
+ import { isRouteErrorResponse, useRouteError } from 'react-router';
14
+
15
+ export default function ErrorBoundary() {
16
+ const error = useRouteError();
17
+
18
+ return (
19
+ <% if (styleFramework === 'bulma') { %>
20
+ <div className="container">
21
+ <% } else if (styleFramework) { %>
22
+ <Container>
23
+ <% } else { %>
24
+ <div>
25
+ <% } %>
26
+ <h1>Error</h1>
27
+ {isRouteErrorResponse(error) ? (
28
+ <h1>
29
+ {error.status} {error.statusText}
30
+ </h1>
31
+ ) : error instanceof Error ? (
32
+ <Fragment>
33
+ <h1>{error.message}</h1>
34
+ <pre>{error.stack}</pre>
35
+ </Fragment>
36
+ ) : (
37
+ <h1>{error as string}</h1>
38
+ )}
39
+ <% if (styleFramework && styleFramework !== 'bulma') { %>
40
+ </Container>
41
+ <% } else { %>
42
+ </div>
43
+ <% } %>
44
+ );
45
+ }
@@ -0,0 +1,142 @@
1
+ <% if (styleFramework === 'bootstrap') { %>
2
+ import { Fragment } from 'react';
3
+ import { Link, Outlet } from 'react-router-dom';
4
+ import { Container, Nav, Navbar } from 'react-bootstrap';
5
+
6
+ export default function Layout() {
7
+ return (
8
+ <Fragment>
9
+ <Navbar expand="lg" variant="dark">
10
+ <Container>
11
+ <Navbar.Brand>
12
+ <Nav.Link as={Link} to="/">
13
+ <%= package.name %>
14
+ </Nav.Link>
15
+ </Navbar.Brand>
16
+ <Navbar.Toggle />
17
+ <Navbar.Collapse>
18
+ <Nav></Nav>
19
+ </Navbar.Collapse>
20
+ </Container>
21
+ </Navbar>
22
+ <Container className="h-100">
23
+ <Outlet />
24
+ </Container>
25
+ </Fragment>
26
+ );
27
+ }
28
+ <% } else if (styleFramework === 'bulma') { %>
29
+ import { Link, Outlet } from 'react-router-dom';
30
+
31
+ export default function Layout() {
32
+ return (
33
+ <div className="container">
34
+ <nav aria-label="main navigation" className="navbar" role="navigation">
35
+ <div className="navbar-brand">
36
+ <Link className="navbar-item" to="/">
37
+ <%= package.name %>
38
+ </Link>
39
+ </div>
40
+ </nav>
41
+ <Outlet />
42
+ </div>
43
+ );
44
+ }
45
+ <% } else if (styleFramework === 'foundation') { %>
46
+ import { Link, Outlet } from 'react-router-dom';
47
+ import {
48
+ GridContainer,
49
+ Menu,
50
+ MenuItem,
51
+ TopBar,
52
+ TopBarLeft
53
+ } from 'react-foundation';
54
+
55
+ export default function Layout() {
56
+ return (
57
+ <GridContainer>
58
+ <TopBar>
59
+ <TopBarLeft>
60
+ <Menu>
61
+ <MenuItem>
62
+ <Link to="/"><%= package.name %></Link>
63
+ </MenuItem>
64
+ </Menu>
65
+ </TopBarLeft>
66
+ </TopBar>
67
+ <Outlet />
68
+ </GridContainer>
69
+ );
70
+ }
71
+ <% } else if (styleFramework === 'materialize') { %>
72
+ import { Link, Outlet } from 'react-router-dom';
73
+ import { Container, Icon, Navbar } from 'react-materialize';
74
+
75
+ export default function Layout() {
76
+ return (
77
+ <Container>
78
+ <Navbar
79
+ brand={<Link to="/"><%= package.name %></Link>}
80
+ menuIcon={<Icon>menu</Icon>}
81
+ />
82
+ <Outlet />
83
+ </Container>
84
+ );
85
+ }
86
+ <% } else if (styleFramework === 'uikit') { %>
87
+ import { Link, Outlet } from 'react-router-dom';
88
+ import { Container, ListItem, Navbar, NavbarContainer } from 'uikit-react';
89
+
90
+ export default function Layout() {
91
+ return (
92
+ <Container>
93
+ <NavbarContainer>
94
+ <Navbar left>
95
+ <ListItem>
96
+ <Link to="/"><%= package.name %></Link>
97
+ </ListItem>
98
+ </Navbar>
99
+ </NavbarContainer>
100
+ <Outlet />
101
+ </Container>
102
+ );
103
+ }
104
+ <% } else if (styleFramework === 'materialUi') { %>
105
+ import { Fragment } from 'react';
106
+ import { Link, Outlet } from 'react-router-dom';
107
+ import {
108
+ AppBar,
109
+ Container,
110
+ CssBaseline,
111
+ Toolbar,
112
+ Typography
113
+ } from '@mui/material';
114
+
115
+ export default function Layout() {
116
+ return (
117
+ <Fragment>
118
+ <CssBaseline />
119
+ <AppBar position="static">
120
+ <Toolbar>
121
+ <Typography component={Link} to="/" variant="h6">
122
+ <%= package.name %>
123
+ </Typography>
124
+ </Toolbar>
125
+ </AppBar>
126
+ <Container>
127
+ <Outlet />
128
+ </Container>
129
+ </Fragment>
130
+ );
131
+ }
132
+ <% } else { %>
133
+ import { Outlet } from 'react-router-dom';
134
+
135
+ export default function Layout() {
136
+ return (
137
+ <div style={{ height: '100vh', width: '100%' }}>
138
+ <Outlet />
139
+ </div>
140
+ );
141
+ }
142
+ <% } %>
@@ -0,0 +1,96 @@
1
+ <% if (styleFramework === 'bootstrap') { %>
2
+ import { Row, Col, Spinner, Container } from 'react-bootstrap';
3
+
4
+ export default function SuspenseFallback() {
5
+ return (
6
+ <Container className="h-100 w-100 d-flex flex-column justify-content-center">
7
+ <Row>
8
+ <Col className="text-center">
9
+ <h1>Loading...</h1>
10
+ </Col>
11
+ </Row>
12
+ <Row>
13
+ <Col className="text-center">
14
+ <Spinner animation="border" className="my-3" />
15
+ </Col>
16
+ </Row>
17
+ </Container>
18
+ );
19
+ }
20
+ <% } else if (styleFramework === 'foundation') { %>
21
+ import { Cell, Grid, GridContainer } from 'react-foundation';
22
+
23
+ export default function SuspenseFallback() {
24
+ return (
25
+ <GridContainer>
26
+ <Grid>
27
+ <Cell className="text-center" small={12}>
28
+ <h1>Loading...</h1>
29
+ </Cell>
30
+ </Grid>
31
+ </GridContainer>
32
+ );
33
+ }
34
+ <% } else if (styleFramework === 'materialize') { %>
35
+ import { Col, Container, Preloader, Row } from 'react-materialize';
36
+
37
+ export default function SuspenseFallback() {
38
+ return (
39
+ <Container>
40
+ <Row>
41
+ <Col className="center-align" s={12}>
42
+ <h1>Loading...</h1>
43
+ </Col>
44
+ </Row>
45
+ <Row>
46
+ <Col className="center-align" s={12}>
47
+ <Preloader active color="blue" size="big" />
48
+ </Col>
49
+ </Row>
50
+ </Container>
51
+ );
52
+ }
53
+ <% } else if (styleFramework === 'uikit') { %>
54
+ import { Container, Section } from 'uikit-react';
55
+
56
+ export default function SuspenseFallback() {
57
+ return (
58
+ <Section>
59
+ <Container className="uk-text-center">
60
+ <h1>Loading...</h1>
61
+ </Container>
62
+ </Section>
63
+ );
64
+ }
65
+ <% } else if (styleFramework === 'materialUi') { %>
66
+ import { Box, CircularProgress, Container, Typography } from '@mui/material';
67
+
68
+ export default function SuspenseFallback() {
69
+ return (
70
+ <Container>
71
+ <Box
72
+ sx={{
73
+ alignItems: 'center',
74
+ display: 'flex',
75
+ flexDirection: 'column',
76
+ height: '100vh',
77
+ justifyContent: 'center'
78
+ }}
79
+ >
80
+ <Typography variant="h4">Loading...</Typography>
81
+ <CircularProgress sx={{ my: 3 }} />
82
+ </Box>
83
+ </Container>
84
+ );
85
+ }
86
+ <% } else { %>
87
+ export default function SuspenseFallback() {
88
+ return (
89
+ <div style={{ height: '100vh', width: '100%' }}>
90
+ <div style={{ textAlign: 'center' }}>
91
+ <h1>Loading...</h1>
92
+ </div>
93
+ </div>
94
+ );
95
+ }
96
+ <% } %>
@@ -2,15 +2,16 @@
2
2
  @charset "utf-8";
3
3
  <% } %>
4
4
  <% if (styleFramework === 'bootstrap') { %>
5
- @import "~bootstrap/scss/bootstrap";
5
+ @import "bootstrap/scss/bootstrap";
6
6
  <% } else if (styleFramework === 'uikit') { %>
7
- @import "~uikit/src/scss/variables-theme";
8
- @import "~uikit/src/scss/mixins-theme";
9
- @import "~uikit/src/scss/uikit-theme";
7
+ @import "uikit/src/scss/variables-theme";
8
+ @import "uikit/src/scss/mixins-theme";
9
+ @import "uikit/src/scss/uikit-theme";
10
10
  <% } else if (styleFramework === 'foundation') { %>
11
- @import "~foundation-sites/scss/foundation";
11
+ @import "foundation-sites/scss/foundation";
12
+ @include foundation-everything;
12
13
  <% } else if (styleFramework === 'materialize') { %>
13
- @import "~materialize-css/sass/materialize";
14
+ @import "materialize-css/sass/materialize";
14
15
  <% } else if (styleFramework === 'bulma') { %>
15
- @import "~bulma/bulma";
16
+ @import "bulma/bulma";
16
17
  <% } %>