create-catalyst-app 0.0.1-beta.0 → 0.0.1-beta.10
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/{readme.md → Readme.md} +7 -4
- package/codemod/new-route/index.js +98 -0
- package/codemod/new-route/template.js +119 -0
- package/codemod/new-route/transformers/createReducer.js +38 -0
- package/codemod/new-route/transformers/createRoute.js +33 -0
- package/codemod/new-route/utils.js +90 -0
- package/license +10 -0
- package/package.json +18 -18
- package/scripts/cli.cjs +259 -0
- package/templates/common/.eslintignore +1 -6
- package/templates/common/.eslintrc +13 -38
- package/templates/common/README.md +16 -20
- package/templates/common/api.js +12 -25
- package/templates/common/client/styles.js +1 -13
- package/templates/common/config/config.json +10 -16
- package/templates/common/public/favicon.ico +0 -0
- package/templates/{redux-js → common}/server/document.js +2 -4
- package/templates/common/server/index.js +2 -0
- package/templates/common/server/server.js +8 -0
- package/templates/common/src/js/containers/Home/Home.js +23 -40
- package/templates/common/src/js/containers/Home/Home.scss +34 -0
- package/templates/common/src/js/routes/index.js +9 -48
- package/templates/common/src/static/css/base/index.scss +0 -7
- package/templates/common/src/static/css/base/styles.scss +0 -160
- package/templates/common/src/static/css/resources/_variables.scss +0 -172
- package/templates/{redux-js → common}/webpackConfig.js +2 -2
- package/templates/none-js/client/index.js +8 -12
- package/templates/none-js/package.json +13 -36
- package/templates/none-js/src/js/containers/App/index.js +12 -36
- package/templates/none-js/src/js/routes/utils.js +42 -0
- package/templates/redux-js/client/index.js +6 -5
- package/templates/redux-js/package.json +16 -36
- package/templates/redux-js/src/js/containers/App/actions.js +1 -4
- package/templates/redux-js/src/js/containers/App/index.js +12 -38
- package/templates/redux-js/src/js/containers/App/reducer.js +15 -17
- package/templates/redux-js/src/js/routes/utils.js +42 -0
- package/templates/redux-js/src/js/store/index.js +17 -68
- package/templates/rtk-js/client/index.js +6 -5
- package/templates/rtk-js/package.json +16 -36
- package/templates/rtk-js/src/js/containers/App/index.js +12 -38
- package/templates/rtk-js/src/js/containers/App/reducer.js +1 -9
- package/templates/rtk-js/src/js/routes/utils.js +42 -0
- package/templates/rtk-js/src/js/store/index.js +12 -6
- package/scripts/cli.mjs +0 -267
- package/templates/common/.babelrc +0 -26
- package/templates/common/.editorconfig +0 -12
- package/templates/common/.stylelintrc +0 -35
- package/templates/common/checkVersion.js +0 -3
- package/templates/common/client/index.js +0 -39
- package/templates/common/config/config_template.json +0 -18
- package/templates/common/config/index.js +0 -77
- package/templates/common/package.json +0 -57
- package/templates/common/server/CustomDocument.js +0 -14
- package/templates/common/server/customIndex.js +0 -3
- package/templates/common/server/customServer.js +0 -16
- package/templates/common/src/js/containers/App/actions.js +0 -20
- package/templates/common/src/js/containers/App/index.js +0 -46
- package/templates/common/src/js/containers/App/reducer.js +0 -21
- package/templates/common/src/js/containers/PDP/PDP.js +0 -37
- package/templates/common/src/js/reducer/index.js +0 -80
- package/templates/common/src/js/stateManager/stateProvider.js +0 -34
- package/templates/common/src/js/store/index.js +0 -77
- package/templates/common/src/static/css/base/_overrides.scss +0 -81
- package/templates/common/src/static/css/base/animations.js +0 -38
- package/templates/common/src/static/css/base/layout.scss +0 -242
- package/templates/common/src/static/css/base/typography.scss +0 -285
- package/templates/common/src/static/css/resources/_mixins.scss +0 -196
- package/templates/common/src/static/css/resources/_vendors.scss +0 -1
- package/templates/common/src/static/fonts/.gitkeep +0 -0
- package/templates/common/src/static/fonts/Inter-Bold-Subset.otf +0 -0
- package/templates/common/src/static/fonts/Inter-Italic-Subset.otf +0 -0
- package/templates/common/src/static/fonts/Inter-Light-Subset.otf +0 -0
- package/templates/common/src/static/fonts/Inter-Medium-Subset.otf +0 -0
- package/templates/common/src/static/fonts/Inter-Regular-Subset.otf +0 -0
- package/templates/common/src/static/fonts/Inter-SemiBold-Subset.otf +0 -0
- package/templates/common/src/static/fonts/Poppins-Bold-Subset.woff2 +0 -0
- package/templates/common/src/static/fonts/Poppins-Italic-Subset.woff2 +0 -0
- package/templates/common/src/static/fonts/Poppins-Light-Subset.woff2 +0 -0
- package/templates/common/src/static/fonts/Poppins-Medium-Subset.woff2 +0 -0
- package/templates/common/src/static/fonts/Poppins-Regular-Subset.woff2 +0 -0
- package/templates/common/src/static/fonts/Poppins-SemiBold-Subset.woff2 +0 -0
- package/templates/none-js/.babelrc +0 -26
- package/templates/none-js/.eslintignore +0 -6
- package/templates/none-js/.eslintrc +0 -53
- package/templates/none-js/.prettierrc.json +0 -7
- package/templates/none-js/.stylelintrc +0 -35
- package/templates/none-js/README.md +0 -22
- package/templates/none-js/api.js +0 -29
- package/templates/none-js/checkVersion.js +0 -3
- package/templates/none-js/client/styles.js +0 -15
- package/templates/none-js/config/config.json +0 -15
- package/templates/none-js/config/config_template.json +0 -18
- package/templates/none-js/config/index.js +0 -44
- package/templates/none-js/server/document.js +0 -14
- package/templates/none-js/server/index.js +0 -3
- package/templates/none-js/server/server.js +0 -16
- package/templates/none-js/src/js/containers/DemoPage/DemoPage.js +0 -39
- package/templates/none-js/src/js/containers/DemoPage/DemoPage.scss +0 -3
- package/templates/none-js/src/js/containers/Home/Home.js +0 -27
- package/templates/none-js/src/js/containers/Home/Home.scss +0 -36
- package/templates/none-js/src/js/routes/index.js +0 -49
- package/templates/none-js/src/js/stateManager/stateProvider.js +0 -19
- package/templates/none-js/src/js/store/index.js +0 -6
- package/templates/none-js/src/static/css/base/index.scss +0 -3
- package/templates/none-js/src/static/css/base/styles.scss +0 -11
- package/templates/none-js/src/static/css/base/typography.scss +0 -53
- package/templates/none-js/src/static/css/resources/_variables.scss +0 -1
- package/templates/none-js/src/static/fonts/.gitkeep +0 -0
- package/templates/none-js/src/static/fonts/Inter-Bold-Subset.otf +0 -0
- package/templates/none-js/src/static/fonts/Inter-Italic-Subset.otf +0 -0
- package/templates/none-js/src/static/fonts/Inter-Light-Subset.otf +0 -0
- package/templates/none-js/src/static/fonts/Inter-Medium-Subset.otf +0 -0
- package/templates/none-js/src/static/fonts/Inter-Regular-Subset.otf +0 -0
- package/templates/none-js/src/static/fonts/Inter-SemiBold-Subset.otf +0 -0
- package/templates/none-js/src/static/fonts/Poppins-Bold-Subset.woff2 +0 -0
- package/templates/none-js/src/static/fonts/Poppins-Italic-Subset.woff2 +0 -0
- package/templates/none-js/src/static/fonts/Poppins-Medium-Subset.woff2 +0 -0
- package/templates/none-js/src/static/fonts/Poppins-Regular-Subset.woff2 +0 -0
- package/templates/none-js/src/static/fonts/Poppins-SemiBold-Subset.woff2 +0 -0
- package/templates/none-js/webpackConfig.js +0 -5
- package/templates/redux-js/.babelrc +0 -26
- package/templates/redux-js/.eslintignore +0 -6
- package/templates/redux-js/.eslintrc +0 -53
- package/templates/redux-js/.prettierrc.json +0 -7
- package/templates/redux-js/.stylelintrc +0 -35
- package/templates/redux-js/README.md +0 -22
- package/templates/redux-js/api.js +0 -29
- package/templates/redux-js/checkVersion.js +0 -3
- package/templates/redux-js/client/styles.js +0 -15
- package/templates/redux-js/config/config.json +0 -15
- package/templates/redux-js/config/config_template.json +0 -18
- package/templates/redux-js/config/index.js +0 -44
- package/templates/redux-js/server/index.js +0 -3
- package/templates/redux-js/server/server.js +0 -16
- package/templates/redux-js/src/js/containers/DemoPage/DemoPage.js +0 -39
- package/templates/redux-js/src/js/containers/DemoPage/DemoPage.scss +0 -3
- package/templates/redux-js/src/js/containers/Home/Home.js +0 -27
- package/templates/redux-js/src/js/containers/Home/Home.scss +0 -36
- package/templates/redux-js/src/js/reducer/index.js +0 -80
- package/templates/redux-js/src/js/routes/index.js +0 -49
- package/templates/redux-js/src/js/stateManager/stateProvider.js +0 -34
- package/templates/redux-js/src/static/css/base/index.scss +0 -3
- package/templates/redux-js/src/static/css/base/styles.scss +0 -11
- package/templates/redux-js/src/static/css/base/typography.scss +0 -53
- package/templates/redux-js/src/static/css/resources/_variables.scss +0 -1
- package/templates/redux-js/src/static/fonts/.gitkeep +0 -0
- package/templates/redux-js/src/static/fonts/Inter-Bold-Subset.otf +0 -0
- package/templates/redux-js/src/static/fonts/Inter-Italic-Subset.otf +0 -0
- package/templates/redux-js/src/static/fonts/Inter-Light-Subset.otf +0 -0
- package/templates/redux-js/src/static/fonts/Inter-Medium-Subset.otf +0 -0
- package/templates/redux-js/src/static/fonts/Inter-Regular-Subset.otf +0 -0
- package/templates/redux-js/src/static/fonts/Inter-SemiBold-Subset.otf +0 -0
- package/templates/redux-js/src/static/fonts/Poppins-Bold-Subset.woff2 +0 -0
- package/templates/redux-js/src/static/fonts/Poppins-Italic-Subset.woff2 +0 -0
- package/templates/redux-js/src/static/fonts/Poppins-Medium-Subset.woff2 +0 -0
- package/templates/redux-js/src/static/fonts/Poppins-Regular-Subset.woff2 +0 -0
- package/templates/redux-js/src/static/fonts/Poppins-SemiBold-Subset.woff2 +0 -0
- package/templates/rtk-js/.babelrc +0 -26
- package/templates/rtk-js/.eslintignore +0 -6
- package/templates/rtk-js/.eslintrc +0 -53
- package/templates/rtk-js/.prettierrc.json +0 -7
- package/templates/rtk-js/.stylelintrc +0 -35
- package/templates/rtk-js/README.md +0 -23
- package/templates/rtk-js/api.js +0 -29
- package/templates/rtk-js/checkVersion.js +0 -3
- package/templates/rtk-js/client/styles.js +0 -15
- package/templates/rtk-js/config/config.json +0 -15
- package/templates/rtk-js/config/config_template.json +0 -18
- package/templates/rtk-js/config/index.js +0 -44
- package/templates/rtk-js/server/document.js +0 -14
- package/templates/rtk-js/server/index.js +0 -3
- package/templates/rtk-js/server/server.js +0 -16
- package/templates/rtk-js/src/js/containers/DemoPage/DemoPage.js +0 -39
- package/templates/rtk-js/src/js/containers/DemoPage/DemoPage.scss +0 -3
- package/templates/rtk-js/src/js/containers/Home/Home.js +0 -27
- package/templates/rtk-js/src/js/containers/Home/Home.scss +0 -36
- package/templates/rtk-js/src/js/reducer/index.js +0 -80
- package/templates/rtk-js/src/js/routes/index.js +0 -49
- package/templates/rtk-js/src/js/stateManager/stateProvider.js +0 -34
- package/templates/rtk-js/src/static/css/base/index.scss +0 -3
- package/templates/rtk-js/src/static/css/base/styles.scss +0 -11
- package/templates/rtk-js/src/static/css/base/typography.scss +0 -53
- package/templates/rtk-js/src/static/css/resources/_variables.scss +0 -1
- package/templates/rtk-js/src/static/fonts/.gitkeep +0 -0
- package/templates/rtk-js/src/static/fonts/Inter-Bold-Subset.otf +0 -0
- package/templates/rtk-js/src/static/fonts/Inter-Italic-Subset.otf +0 -0
- package/templates/rtk-js/src/static/fonts/Inter-Light-Subset.otf +0 -0
- package/templates/rtk-js/src/static/fonts/Inter-Medium-Subset.otf +0 -0
- package/templates/rtk-js/src/static/fonts/Inter-Regular-Subset.otf +0 -0
- package/templates/rtk-js/src/static/fonts/Inter-SemiBold-Subset.otf +0 -0
- package/templates/rtk-js/src/static/fonts/Poppins-Bold-Subset.woff2 +0 -0
- package/templates/rtk-js/src/static/fonts/Poppins-Italic-Subset.woff2 +0 -0
- package/templates/rtk-js/src/static/fonts/Poppins-Medium-Subset.woff2 +0 -0
- package/templates/rtk-js/src/static/fonts/Poppins-Regular-Subset.woff2 +0 -0
- package/templates/rtk-js/src/static/fonts/Poppins-SemiBold-Subset.woff2 +0 -0
- package/templates/rtk-js/webpackConfig.js +0 -5
- /package/{templates/common/.prettierrc.json → .prettierrc.json} +0 -0
|
@@ -1,163 +1,3 @@
|
|
|
1
1
|
html {
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
html,
|
|
6
|
-
body {
|
|
7
|
-
height: 100%;
|
|
8
|
-
font-family: Inter, Poppins, Avenir, "Century Gothic", Arial, sans-serif;
|
|
9
|
-
-webkit-tap-highlight-color: transparent;
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
body {
|
|
13
|
-
&.preventYAxisScroll {
|
|
14
|
-
position: relative;
|
|
15
|
-
overflow-y: hidden;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&.preventXAxisScroll {
|
|
19
|
-
position: relative;
|
|
20
|
-
overflow-x: hidden;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&.preventScroll {
|
|
24
|
-
position: relative;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&.offline {
|
|
29
|
-
input,
|
|
30
|
-
button,
|
|
31
|
-
a {
|
|
32
|
-
pointer-events: none;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
* {
|
|
38
|
-
-webkit-font-smoothing: antialiased;
|
|
39
|
-
-moz-osx-font-smoothing: grayscale;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
#app {
|
|
43
|
-
height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
margin: 0 auto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
#loader-portal {
|
|
49
|
-
position: absolute;
|
|
50
|
-
z-index: 100;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
*,
|
|
54
|
-
*::before,
|
|
55
|
-
*::after {
|
|
56
|
-
box-sizing: inherit;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.select-element-portal {
|
|
60
|
-
position: fixed;
|
|
61
|
-
z-index: 1300;
|
|
62
|
-
top: 0;
|
|
63
|
-
left: 0;
|
|
64
|
-
right: 0;
|
|
65
|
-
bottom: 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.bottom-sheet-element {
|
|
69
|
-
position: fixed;
|
|
70
|
-
z-index: 100;
|
|
71
|
-
transition: all 0.2s ease-in;
|
|
72
|
-
bottom: 0;
|
|
73
|
-
left: 0;
|
|
74
|
-
right: 0;
|
|
75
|
-
height: 0;
|
|
76
|
-
overflow: hidden;
|
|
77
|
-
transform: translate3d(0, 0, 0);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
#bottom-sheet-root {
|
|
81
|
-
position: relative;
|
|
82
|
-
z-index: 100;
|
|
83
|
-
|
|
84
|
-
&.open {
|
|
85
|
-
height: 100%;
|
|
86
|
-
|
|
87
|
-
.bottom-sheet-backdrop {
|
|
88
|
-
background: $grey-backdrop;
|
|
89
|
-
position: fixed;
|
|
90
|
-
top: 0;
|
|
91
|
-
left: 0;
|
|
92
|
-
right: 0;
|
|
93
|
-
bottom: 0;
|
|
94
|
-
z-index: 99;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.bottom-sheet-element {
|
|
98
|
-
&.full {
|
|
99
|
-
height: 95vh;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&.small {
|
|
103
|
-
height: 40vh;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&.medium {
|
|
107
|
-
height: calc(100% - 82px);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.bottomsheet-portal {
|
|
114
|
-
height: 100%;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.loader {
|
|
118
|
-
margin: makespace(1) auto;
|
|
119
|
-
border: makespace(1) solid $highlighted-background;
|
|
120
|
-
border-top: makespace(1) solid $action-primary;
|
|
121
|
-
border-radius: 50%;
|
|
122
|
-
width: makespace(6);
|
|
123
|
-
height: makespace(6);
|
|
124
|
-
animation: spin 2s linear infinite;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@keyframes spin {
|
|
128
|
-
0% {
|
|
129
|
-
transform: rotate(0deg);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
100% {
|
|
133
|
-
transform: rotate(360deg);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.shimmer {
|
|
138
|
-
border-radius: $gutter;
|
|
139
|
-
background: #f6f7f8;
|
|
140
|
-
background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
|
|
141
|
-
background-repeat: no-repeat;
|
|
142
|
-
background-size: 200vw 100vh;
|
|
143
|
-
animation-duration: 1s;
|
|
144
|
-
animation-fill-mode: forwards;
|
|
145
|
-
animation-iteration-count: infinite;
|
|
146
|
-
animation-name: shimmer;
|
|
147
|
-
animation-timing-function: linear;
|
|
148
|
-
-webkit-animation-duration: 1s;
|
|
149
|
-
-webkit-animation-fill-mode: forwards;
|
|
150
|
-
-webkit-animation-iteration-count: infinite;
|
|
151
|
-
-webkit-animation-name: shimmer;
|
|
152
|
-
-webkit-animation-timing-function: linear;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@keyframes shimmer {
|
|
156
|
-
0% {
|
|
157
|
-
background-position: -100vw 0;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
100% {
|
|
161
|
-
background-position: 100vw 0;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
//COLOURS -------------------------------
|
|
2
|
-
// Actions
|
|
3
|
-
$action-primary: #ff6f61;
|
|
4
|
-
$action-auxiliary: #8a2422;
|
|
5
|
-
$action-disabled: #e0e0e0;
|
|
6
|
-
$action-disabled-text: #a9a9a9;
|
|
7
|
-
$transparent: transparent;
|
|
8
|
-
|
|
9
|
-
// Backgrounds
|
|
10
|
-
$container-background: #fff;
|
|
11
|
-
$divider: #dbdbdb;
|
|
12
|
-
$highlighted-background: #fef7ef;
|
|
13
|
-
$secondary-background: #f0f0f0;
|
|
14
|
-
|
|
15
|
-
// Information (Text)
|
|
16
|
-
$information-primary: #3b3b3b;
|
|
17
|
-
$information-secondary: #767676;
|
|
18
|
-
$information-tertiary: #a9a9a9;
|
|
19
|
-
|
|
20
|
-
// States
|
|
21
|
-
$success: #208376;
|
|
22
|
-
$success-background: #e7f7e5;
|
|
23
|
-
$caution: #d5410b;
|
|
24
|
-
$caution-background: #ffe0cc;
|
|
25
|
-
$error: #e51f47;
|
|
26
|
-
$error-background: #ffd9e1;
|
|
27
|
-
|
|
28
|
-
// Bottom Sheet
|
|
29
|
-
|
|
30
|
-
$grey-backdrop: rgb(43 43 43 / 48%);
|
|
31
|
-
|
|
32
|
-
// Basic
|
|
33
|
-
$transition-duration: 0.2s !default;
|
|
34
|
-
$transition-animation: ease !default;
|
|
35
|
-
$border-radius: 4px !default;
|
|
36
|
-
$border-radius-sm: 2px !default;
|
|
37
|
-
|
|
38
|
-
// TYPOGRAPHY ---------------------------
|
|
39
|
-
//Line Height
|
|
40
|
-
$line-height-base: 1.5 !default;
|
|
41
|
-
$line-height-x-small: 18px !default;
|
|
42
|
-
|
|
43
|
-
//Font Sizes
|
|
44
|
-
$font-size-hero: 48 !default;
|
|
45
|
-
$font-size-l1: 30 !default;
|
|
46
|
-
$font-size-l2: 24 !default;
|
|
47
|
-
$font-size-l3: 20 !default;
|
|
48
|
-
$font-size-l4: 18 !default;
|
|
49
|
-
$font-size-l5: 16 !default;
|
|
50
|
-
$font-size-body: 14 !default;
|
|
51
|
-
$font-size-small: 12 !default;
|
|
52
|
-
$font-size-x-small: 11 !default;
|
|
53
|
-
|
|
54
|
-
//Font Weight
|
|
55
|
-
$font-weight-semi-bold: 600 !default;
|
|
56
|
-
$font-weight-medium: 500 !default;
|
|
57
|
-
$font-weight-regular: 400 !default;
|
|
58
|
-
$font-family-base: "Poppins" !default;
|
|
59
|
-
$tablet-width: 768px;
|
|
60
|
-
$desktop-width: 960px;
|
|
61
|
-
$large-width: 1280px;
|
|
62
|
-
|
|
63
|
-
// Spacers
|
|
64
|
-
$base-space: 8px !default;
|
|
65
|
-
|
|
66
|
-
// Sidenav
|
|
67
|
-
$sidenav-list-separator: #eaeaea !default; // NOT IN DOC, REPLACE ASAP
|
|
68
|
-
$sidenav-text-light: #9e9e9e !default; // NOT IN DOC, REPLACE ASAP
|
|
69
|
-
$sidenav-row-highlight-bg: #f7f7f7 !default; // NOT IN DOC, REPLACE ASAP
|
|
70
|
-
|
|
71
|
-
// Footer
|
|
72
|
-
$footer-bg-alternate: rgb(
|
|
73
|
-
224 224 224 / 20%
|
|
74
|
-
) !default; // Figure out a way to use colours with alpha without breaking general colour guidelines
|
|
75
|
-
|
|
76
|
-
// Dialogs (Not modals for now)
|
|
77
|
-
$dialog-border-radius: $border-radius !default;
|
|
78
|
-
$dialog-box-shadow: 0 0 5px 0 rgb(0 0 0 / 50%) !default;
|
|
79
|
-
$dialog-overlay-bg: rgb(0 0 0 / 75%) !default; // NOT IN DOC, REPLACE ASAP
|
|
80
|
-
|
|
81
|
-
// Form Elements
|
|
82
|
-
$input-box-height: 40px !default;
|
|
83
|
-
$input-border-radius: $border-radius !default;
|
|
84
|
-
$input-border-width: 1px !default;
|
|
85
|
-
$input-border-focused-width: 2px !default;
|
|
86
|
-
$input-border-difference: calc(#{$input-border-focused-width} - #{$input-border-width}) !default;
|
|
87
|
-
$input-textarea-min-height: 85px !default;
|
|
88
|
-
$input-max-width: 100% !default;
|
|
89
|
-
|
|
90
|
-
// Dropdown
|
|
91
|
-
$dropdown-max-rows: 5 !default;
|
|
92
|
-
$dropdown-helper-text-color: rgb(0 0 0 / 54%) !default; // NOT IN DOC, REPLACE ASAP
|
|
93
|
-
$dropdown-height: $input-box-height !default;
|
|
94
|
-
$dropdown-border-radius: $input-border-radius !default;
|
|
95
|
-
$dropdown-border-width: $input-border-width !default;
|
|
96
|
-
$dropdown-border-focused-width: $input-border-focused-width !default;
|
|
97
|
-
$dropdown-border-difference: calc(#{$dropdown-border-focused-width} - #{$dropdown-border-width}) !default;
|
|
98
|
-
|
|
99
|
-
// ELEVATION --------------------------------------------------------------
|
|
100
|
-
//These are to be used in box-shadow css property of the component/div you want to provide elevation to
|
|
101
|
-
$elevation-shadow-l1: 0 0 4px 0 rgb(0 0 0 / 8%), 0 4px 4px 0 rgb(0 0 0 / 8%);
|
|
102
|
-
$elevation-shadow-l2: 0 0 8px 0 rgb(0 0 0 / 8%), 0 8px 8px 0 rgb(0 0 0 / 8%);
|
|
103
|
-
$elevation-shadow-l3: 0 0 16px 0 rgb(0 0 0 / 8%), 0 16px 16px 0 rgb(0 0 0 / 8%);
|
|
104
|
-
|
|
105
|
-
//These are to be used in z-index css property of the component/div you want to provide elevation to
|
|
106
|
-
$elevation-index-l1: 4;
|
|
107
|
-
$elevation-index-l2: 8;
|
|
108
|
-
$elevation-index-l3: 16;
|
|
109
|
-
$elevation-index-l4: 24;
|
|
110
|
-
|
|
111
|
-
// Columns
|
|
112
|
-
$col: calc(
|
|
113
|
-
calc(100vw - 72px) / 6
|
|
114
|
-
); //48px for 6 gutters of 8 pixel each and 24px for 12px of padding on each side : 48+24
|
|
115
|
-
$col-1: $col;
|
|
116
|
-
$col-2: calc(calc(#{$col} * 2) + 8px);
|
|
117
|
-
$col-3: calc(calc(#{$col} * 3) + 16px);
|
|
118
|
-
$col-4: calc(calc(#{$col} * 4) + 24px);
|
|
119
|
-
$col-5: calc(calc(#{$col} * 5) + 32px);
|
|
120
|
-
$col-6: calc(calc(#{$col} * 6) + 40px);
|
|
121
|
-
|
|
122
|
-
// Gutter
|
|
123
|
-
$gutter: 4px;
|
|
124
|
-
|
|
125
|
-
// Header
|
|
126
|
-
$header-height: 56px !default;
|
|
127
|
-
$header-box-shadow: 0 1px 6px 0 rgb(0 0 0 / 15%) !default;
|
|
128
|
-
$header-search-height: 40px !default;
|
|
129
|
-
$header-search-border-radius: 4px !default;
|
|
130
|
-
$header-location-bar-height: 18px !default;
|
|
131
|
-
|
|
132
|
-
// Pages
|
|
133
|
-
//QuantitySelector
|
|
134
|
-
$quantity-chip-color: #616161 !default; // NOT IN DOC, REPLACE ASAP
|
|
135
|
-
|
|
136
|
-
//SelectorChip
|
|
137
|
-
$selector-chip-border-radius: 4px;
|
|
138
|
-
$selector-chip-border: 1px;
|
|
139
|
-
$selector-chip-border-selected: 1px;
|
|
140
|
-
|
|
141
|
-
// Accordion
|
|
142
|
-
$border-width: 1px;
|
|
143
|
-
$accordion-transition-duration: 0.4s;
|
|
144
|
-
|
|
145
|
-
// CheckBox
|
|
146
|
-
$border-width: 1px;
|
|
147
|
-
$border-width-selected: 2px;
|
|
148
|
-
$checkmark-width: 14px;
|
|
149
|
-
$checkmark-height: 8px;
|
|
150
|
-
|
|
151
|
-
// Radio
|
|
152
|
-
$border-width: 1px;
|
|
153
|
-
$border-width-selected: 2px;
|
|
154
|
-
$radio-width: 12px;
|
|
155
|
-
$radio-height: 12px;
|
|
156
|
-
|
|
157
|
-
// Search Page
|
|
158
|
-
$search-input-height: 56px !default;
|
|
159
|
-
$search-item-divider-width: 1px !default;
|
|
160
|
-
$search-item-divider-color: $action-disabled !default;
|
|
161
|
-
|
|
162
|
-
// User Feedback
|
|
163
|
-
$user-feedback-bar-height: 8px !default;
|
|
164
|
-
$user-feedback-bar-radius: 4px !default;
|
|
165
|
-
$user-feedback-legend-height: 21px !default;
|
|
166
|
-
$user-feedback-legend-width: 21px !default;
|
|
167
|
-
|
|
168
|
-
// Separator
|
|
169
|
-
$separator-height-xs: 1px !default;
|
|
170
|
-
$separator-height-sm: 4px !default;
|
|
171
|
-
$separator-height-md: 8px !default;
|
|
172
|
-
$separator-height-lg: 16px !default;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
+
import "./styles"
|
|
2
3
|
import { hydrateRoot } from "react-dom/client"
|
|
3
4
|
import { loadableReady } from "@loadable/component"
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { preparedRoutes } from "../src/js/routes/index.js"
|
|
7
|
-
import configureStore from "../src/js/store/index.js"
|
|
8
|
-
import "./styles"
|
|
5
|
+
import { RouterProvider } from "@tata1mg/router"
|
|
6
|
+
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
9
7
|
|
|
10
8
|
window.addEventListener("load", () => {
|
|
11
9
|
loadableReady(() => {
|
|
12
10
|
const { __ROUTER_INITIAL_DATA__: routerInitialData } = window
|
|
13
|
-
|
|
14
|
-
const router =
|
|
11
|
+
|
|
12
|
+
const router = clientRouter({ routerInitialState: routerInitialData })
|
|
15
13
|
|
|
16
14
|
const Application = (
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
</React.StrictMode>
|
|
21
|
-
|
|
15
|
+
<React.StrictMode>
|
|
16
|
+
<RouterProvider router={router} />
|
|
17
|
+
</React.StrictMode>
|
|
22
18
|
)
|
|
23
19
|
|
|
24
20
|
const container = document.getElementById("app")
|
|
@@ -1,53 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-catalyst-app-starter",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"description": "This README would normally document whatever steps are necessary to get your application up and running.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"bin": "scripts/cli.mjs",
|
|
7
4
|
"scripts": {
|
|
8
5
|
"start": "catalyst start",
|
|
9
6
|
"build": "catalyst build",
|
|
10
|
-
"serve": "catalyst serve"
|
|
7
|
+
"serve": "catalyst serve",
|
|
8
|
+
"lint": "eslint .",
|
|
9
|
+
"devBuild": "catalyst devBuild",
|
|
10
|
+
"devServe": "catalyst devServe"
|
|
11
11
|
},
|
|
12
12
|
"_moduleAliases": {
|
|
13
|
+
"@api": "api.js",
|
|
13
14
|
"@containers": "src/js/containers",
|
|
14
|
-
"@
|
|
15
|
-
"$server": "server",
|
|
16
|
-
"@constants": "src/js/constants",
|
|
15
|
+
"@server": "server",
|
|
17
16
|
"@config": "config",
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
},
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "https://github.com/tata1mg/catalyst"
|
|
17
|
+
"@css": "src/static/css",
|
|
18
|
+
"@routes": "src/js/routes/"
|
|
24
19
|
},
|
|
25
20
|
"dependencies": {
|
|
26
21
|
"@loadable/component": "^5.16.3",
|
|
27
|
-
"@tata1mg/router": "^0.0.1-
|
|
28
|
-
"catalyst-core":"0.0.1-beta.
|
|
29
|
-
"event-source-polyfill": "^1.0.31",
|
|
30
|
-
"express-static-gzip": "^2.1.7",
|
|
31
|
-
"framer-motion": "^10.18.0",
|
|
32
|
-
"isomorphic-dompurify": "^2.2.0",
|
|
33
|
-
"normalize.css": "^8.0.1",
|
|
34
|
-
"prop-types": "^15.8.1",
|
|
35
|
-
"pwa": "git+git@bitbucket.org:tata1mg/catalyst.git#framework-scaffolding",
|
|
36
|
-
"react-dfp": "^0.21.0",
|
|
37
|
-
"react-helmet-async":"^1.3.0",
|
|
38
|
-
"react-intersection-observer": "^9.5.3",
|
|
39
|
-
"react-loadable-visibility": "^3.0.2",
|
|
40
|
-
"react-redux": "^8.1.3",
|
|
41
|
-
"@reduxjs/toolkit": "1.9.3"
|
|
42
|
-
},
|
|
43
|
-
"author": "",
|
|
44
|
-
"license": "ISC",
|
|
45
|
-
"bugs": {
|
|
46
|
-
"url": "https://github.com/tata1mg/catalyst/issues"
|
|
22
|
+
"@tata1mg/router": "^0.0.1-beta.6",
|
|
23
|
+
"catalyst-core": "^0.0.1-beta.9"
|
|
47
24
|
},
|
|
48
|
-
"homepage": "https://github.com/tata1mg/catalyst#readme",
|
|
49
25
|
"devDependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
26
|
+
"eslint": "^8.26.0",
|
|
27
|
+
"eslint-plugin-react": "^7.34.1",
|
|
28
|
+
"eslint-plugin-react-hooks": "^4.6.0"
|
|
52
29
|
}
|
|
53
30
|
}
|
|
@@ -1,40 +1,16 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
useLocation,
|
|
4
|
-
useOutlet,
|
|
5
|
-
UNSAFE_LocationContext,
|
|
6
|
-
} from "react-router-dom";
|
|
7
|
-
import "@css/base/index.scss";
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { Outlet } from "@tata1mg/router"
|
|
8
3
|
|
|
9
|
-
|
|
10
|
-
export const BaseOutlet = () => {
|
|
11
|
-
const o = useOutlet();
|
|
12
|
-
const [outlet] = useState(o);
|
|
13
|
-
|
|
14
|
-
return <>{outlet}</>;
|
|
15
|
-
};
|
|
16
4
|
const App = () => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</UNSAFE_LocationContext.Provider>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
return (
|
|
27
|
-
<div className={"flexColumn"}>
|
|
28
|
-
<>
|
|
29
|
-
{/* <ShellLocusHeader /> */}
|
|
30
|
-
</>
|
|
31
|
-
<div>{page}</div>
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<Outlet />
|
|
8
|
+
</>
|
|
9
|
+
)
|
|
10
|
+
}
|
|
35
11
|
|
|
36
|
-
App.serverSideFunction = (
|
|
37
|
-
|
|
38
|
-
}
|
|
12
|
+
App.serverSideFunction = () => {
|
|
13
|
+
return new Promise((resolve) => resolve())
|
|
14
|
+
}
|
|
39
15
|
|
|
40
|
-
export default App
|
|
16
|
+
export default App
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { RouterDataProvider, MetaTag } from "@tata1mg/router"
|
|
3
|
+
import App from "@containers/App"
|
|
4
|
+
import routes from "./index.js"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Making the routes array compatible with the format accepted by createBrowserRouter
|
|
8
|
+
* API on the client side
|
|
9
|
+
* https://reactrouter.com/en/main/routers/create-browser-router
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export const preparedRoutes = ({ routerInitialState }) => {
|
|
13
|
+
const getPreparedRoutes = (routes) => {
|
|
14
|
+
return routes.map((route, index) => {
|
|
15
|
+
const Component = route.component
|
|
16
|
+
const routeToRender = {
|
|
17
|
+
...route,
|
|
18
|
+
element: <Component key={index} />,
|
|
19
|
+
}
|
|
20
|
+
if (route.children) {
|
|
21
|
+
routeToRender.children = getPreparedRoutes(route.children)
|
|
22
|
+
}
|
|
23
|
+
return routeToRender
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
element: (
|
|
30
|
+
<RouterDataProvider config={{}} initialState={routerInitialState}>
|
|
31
|
+
<MetaTag />
|
|
32
|
+
<App />
|
|
33
|
+
</RouterDataProvider>
|
|
34
|
+
),
|
|
35
|
+
children: getPreparedRoutes(routes),
|
|
36
|
+
},
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const getRoutes = () => {
|
|
41
|
+
return routes
|
|
42
|
+
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
+
import "./styles"
|
|
2
3
|
import { hydrateRoot } from "react-dom/client"
|
|
3
4
|
import { loadableReady } from "@loadable/component"
|
|
4
5
|
import { Provider } from "react-redux"
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import configureStore from "
|
|
8
|
-
import "./styles"
|
|
6
|
+
import { RouterProvider } from "@tata1mg/router"
|
|
7
|
+
import clientRouter from "catalyst-core/router/ClientRouter"
|
|
8
|
+
import configureStore from "@store"
|
|
9
9
|
|
|
10
10
|
window.addEventListener("load", () => {
|
|
11
11
|
loadableReady(() => {
|
|
12
12
|
const { __ROUTER_INITIAL_DATA__: routerInitialData, __INITIAL_STATE__ } = window
|
|
13
13
|
const store = configureStore(__INITIAL_STATE__ || {})
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
const router = clientRouter({ store, routerInitialState: routerInitialData })
|
|
15
16
|
|
|
16
17
|
const Application = (
|
|
17
18
|
<Provider store={store} serverState={__INITIAL_STATE__}>
|
|
@@ -1,53 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-catalyst-app-starter",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"description": "This README would normally document whatever steps are necessary to get your application up and running.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"bin": "scripts/cli.mjs",
|
|
7
4
|
"scripts": {
|
|
8
5
|
"start": "catalyst start",
|
|
9
6
|
"build": "catalyst build",
|
|
10
|
-
"serve": "catalyst serve"
|
|
7
|
+
"serve": "catalyst serve",
|
|
8
|
+
"lint": "eslint .",
|
|
9
|
+
"devBuild": "catalyst devBuild",
|
|
10
|
+
"devServe": "catalyst devServe"
|
|
11
11
|
},
|
|
12
12
|
"_moduleAliases": {
|
|
13
|
+
"@api": "api.js",
|
|
13
14
|
"@containers": "src/js/containers",
|
|
14
|
-
"@
|
|
15
|
-
"$server": "server",
|
|
16
|
-
"@constants": "src/js/constants",
|
|
15
|
+
"@server": "server",
|
|
17
16
|
"@config": "config",
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "https://github.com/tata1mg/catalyst"
|
|
17
|
+
"@css": "src/static/css",
|
|
18
|
+
"@routes": "src/js/routes/",
|
|
19
|
+
"@store": "src/js/store/index.js"
|
|
24
20
|
},
|
|
25
21
|
"dependencies": {
|
|
26
22
|
"@loadable/component": "^5.16.3",
|
|
27
|
-
"@tata1mg/router": "^0.0.1-
|
|
28
|
-
"catalyst-core":"0.0.1-beta.
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"framer-motion": "^10.18.0",
|
|
32
|
-
"isomorphic-dompurify": "^2.2.0",
|
|
33
|
-
"normalize.css": "^8.0.1",
|
|
34
|
-
"prop-types": "^15.8.1",
|
|
35
|
-
"pwa": "git+git@bitbucket.org:tata1mg/catalyst.git#framework-scaffolding",
|
|
36
|
-
"react-dfp": "^0.21.0",
|
|
37
|
-
"react-helmet-async":"^1.3.0",
|
|
38
|
-
"react-intersection-observer": "^9.5.3",
|
|
39
|
-
"react-loadable-visibility": "^3.0.2",
|
|
40
|
-
"react-redux": "^8.1.3",
|
|
41
|
-
"@reduxjs/toolkit": "1.9.3"
|
|
42
|
-
},
|
|
43
|
-
"author": "",
|
|
44
|
-
"license": "ISC",
|
|
45
|
-
"bugs": {
|
|
46
|
-
"url": "https://github.com/tata1mg/catalyst/issues"
|
|
23
|
+
"@tata1mg/router": "^0.0.1-beta.6",
|
|
24
|
+
"catalyst-core": "^0.0.1-beta.9",
|
|
25
|
+
"@reduxjs/toolkit": "1.9.3",
|
|
26
|
+
"react-redux": "^8.1.3"
|
|
47
27
|
},
|
|
48
|
-
"homepage": "https://github.com/tata1mg/catalyst#readme",
|
|
49
28
|
"devDependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
29
|
+
"eslint": "^8.26.0",
|
|
30
|
+
"eslint-plugin-react": "^7.34.1",
|
|
31
|
+
"eslint-plugin-react-hooks": "^4.6.0"
|
|
52
32
|
}
|
|
53
33
|
}
|
|
@@ -9,11 +9,8 @@ const createActionTypes = (prefix, actionTypeList = []) => {
|
|
|
9
9
|
|
|
10
10
|
export default createActionTypes
|
|
11
11
|
|
|
12
|
-
export const ShellActions = createActionTypes("shellActions", [
|
|
13
|
-
"REDUX_TEST"
|
|
14
|
-
])
|
|
12
|
+
export const ShellActions = createActionTypes("shellActions", ["REDUX_TEST"])
|
|
15
13
|
export const reduxTest = () => {
|
|
16
|
-
|
|
17
14
|
return {
|
|
18
15
|
type: ShellActions.REDUX_TEST,
|
|
19
16
|
}
|