create-catalyst-app 0.0.1-beta.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/package.json +20 -0
- package/readme.md +53 -0
- package/scripts/cli.mjs +267 -0
- package/templates/common/.babelrc +26 -0
- package/templates/common/.editorconfig +12 -0
- package/templates/common/.eslintignore +6 -0
- package/templates/common/.eslintrc +53 -0
- package/templates/common/.prettierrc.json +7 -0
- package/templates/common/.stylelintrc +35 -0
- package/templates/common/README.md +29 -0
- package/templates/common/api.js +29 -0
- package/templates/common/checkVersion.js +3 -0
- package/templates/common/client/index.js +39 -0
- package/templates/common/client/styles.js +15 -0
- package/templates/common/config/config.json +18 -0
- package/templates/common/config/config_template.json +18 -0
- package/templates/common/config/index.js +77 -0
- package/templates/common/package.json +57 -0
- package/templates/common/server/CustomDocument.js +14 -0
- package/templates/common/server/customIndex.js +3 -0
- package/templates/common/server/customServer.js +16 -0
- package/templates/common/src/js/containers/App/actions.js +20 -0
- package/templates/common/src/js/containers/App/index.js +46 -0
- package/templates/common/src/js/containers/App/reducer.js +21 -0
- package/templates/common/src/js/containers/Home/Home.js +40 -0
- package/templates/common/src/js/containers/PDP/PDP.js +37 -0
- package/templates/common/src/js/reducer/index.js +80 -0
- package/templates/common/src/js/routes/index.js +50 -0
- package/templates/common/src/js/stateManager/stateProvider.js +34 -0
- package/templates/common/src/js/store/index.js +77 -0
- package/templates/common/src/static/css/base/_overrides.scss +81 -0
- package/templates/common/src/static/css/base/animations.js +38 -0
- package/templates/common/src/static/css/base/index.scss +8 -0
- package/templates/common/src/static/css/base/layout.scss +242 -0
- package/templates/common/src/static/css/base/styles.scss +163 -0
- package/templates/common/src/static/css/base/typography.scss +285 -0
- package/templates/common/src/static/css/resources/_mixins.scss +196 -0
- package/templates/common/src/static/css/resources/_variables.scss +172 -0
- package/templates/common/src/static/css/resources/_vendors.scss +1 -0
- 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 +26 -0
- package/templates/none-js/.eslintignore +6 -0
- package/templates/none-js/.eslintrc +53 -0
- package/templates/none-js/.prettierrc.json +7 -0
- package/templates/none-js/.stylelintrc +35 -0
- package/templates/none-js/README.md +22 -0
- package/templates/none-js/api.js +29 -0
- package/templates/none-js/checkVersion.js +3 -0
- package/templates/none-js/client/index.js +27 -0
- package/templates/none-js/client/styles.js +15 -0
- package/templates/none-js/config/config.json +15 -0
- package/templates/none-js/config/config_template.json +18 -0
- package/templates/none-js/config/index.js +44 -0
- package/templates/none-js/package.json +53 -0
- package/templates/none-js/server/document.js +14 -0
- package/templates/none-js/server/index.js +3 -0
- package/templates/none-js/server/server.js +16 -0
- package/templates/none-js/src/js/containers/App/index.js +40 -0
- package/templates/none-js/src/js/containers/DemoPage/DemoPage.js +39 -0
- package/templates/none-js/src/js/containers/DemoPage/DemoPage.scss +3 -0
- package/templates/none-js/src/js/containers/Home/Home.js +27 -0
- package/templates/none-js/src/js/containers/Home/Home.scss +36 -0
- package/templates/none-js/src/js/routes/index.js +49 -0
- package/templates/none-js/src/js/stateManager/stateProvider.js +19 -0
- package/templates/none-js/src/js/store/index.js +6 -0
- package/templates/none-js/src/static/css/base/index.scss +3 -0
- package/templates/none-js/src/static/css/base/styles.scss +11 -0
- package/templates/none-js/src/static/css/base/typography.scss +53 -0
- package/templates/none-js/src/static/css/resources/_variables.scss +1 -0
- 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 +5 -0
- package/templates/redux-js/.babelrc +26 -0
- package/templates/redux-js/.eslintignore +6 -0
- package/templates/redux-js/.eslintrc +53 -0
- package/templates/redux-js/.prettierrc.json +7 -0
- package/templates/redux-js/.stylelintrc +35 -0
- package/templates/redux-js/README.md +22 -0
- package/templates/redux-js/api.js +29 -0
- package/templates/redux-js/checkVersion.js +3 -0
- package/templates/redux-js/client/index.js +27 -0
- package/templates/redux-js/client/styles.js +15 -0
- package/templates/redux-js/config/config.json +15 -0
- package/templates/redux-js/config/config_template.json +18 -0
- package/templates/redux-js/config/index.js +44 -0
- package/templates/redux-js/package.json +53 -0
- package/templates/redux-js/server/document.js +14 -0
- package/templates/redux-js/server/index.js +3 -0
- package/templates/redux-js/server/server.js +16 -0
- package/templates/redux-js/src/js/containers/App/actions.js +20 -0
- package/templates/redux-js/src/js/containers/App/index.js +42 -0
- package/templates/redux-js/src/js/containers/App/reducer.js +21 -0
- package/templates/redux-js/src/js/containers/DemoPage/DemoPage.js +39 -0
- package/templates/redux-js/src/js/containers/DemoPage/DemoPage.scss +3 -0
- package/templates/redux-js/src/js/containers/Home/Home.js +27 -0
- package/templates/redux-js/src/js/containers/Home/Home.scss +36 -0
- package/templates/redux-js/src/js/reducer/index.js +80 -0
- package/templates/redux-js/src/js/routes/index.js +49 -0
- package/templates/redux-js/src/js/stateManager/stateProvider.js +34 -0
- package/templates/redux-js/src/js/store/index.js +79 -0
- package/templates/redux-js/src/static/css/base/index.scss +3 -0
- package/templates/redux-js/src/static/css/base/styles.scss +11 -0
- package/templates/redux-js/src/static/css/base/typography.scss +53 -0
- package/templates/redux-js/src/static/css/resources/_variables.scss +1 -0
- 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/redux-js/webpackConfig.js +5 -0
- package/templates/rtk-js/.babelrc +26 -0
- package/templates/rtk-js/.eslintignore +6 -0
- package/templates/rtk-js/.eslintrc +53 -0
- package/templates/rtk-js/.prettierrc.json +7 -0
- package/templates/rtk-js/.stylelintrc +35 -0
- package/templates/rtk-js/README.md +23 -0
- package/templates/rtk-js/api.js +29 -0
- package/templates/rtk-js/checkVersion.js +3 -0
- package/templates/rtk-js/client/index.js +27 -0
- package/templates/rtk-js/client/styles.js +15 -0
- package/templates/rtk-js/config/config.json +15 -0
- package/templates/rtk-js/config/config_template.json +18 -0
- package/templates/rtk-js/config/index.js +44 -0
- package/templates/rtk-js/package.json +53 -0
- package/templates/rtk-js/server/document.js +14 -0
- package/templates/rtk-js/server/index.js +3 -0
- package/templates/rtk-js/server/server.js +16 -0
- package/templates/rtk-js/src/js/containers/App/index.js +42 -0
- package/templates/rtk-js/src/js/containers/App/reducer.js +26 -0
- package/templates/rtk-js/src/js/containers/DemoPage/DemoPage.js +39 -0
- package/templates/rtk-js/src/js/containers/DemoPage/DemoPage.scss +3 -0
- package/templates/rtk-js/src/js/containers/Home/Home.js +27 -0
- package/templates/rtk-js/src/js/containers/Home/Home.scss +36 -0
- package/templates/rtk-js/src/js/reducer/index.js +80 -0
- package/templates/rtk-js/src/js/routes/index.js +49 -0
- package/templates/rtk-js/src/js/stateManager/stateProvider.js +34 -0
- package/templates/rtk-js/src/js/store/index.js +22 -0
- package/templates/rtk-js/src/static/css/base/index.scss +3 -0
- package/templates/rtk-js/src/static/css/base/styles.scss +11 -0
- package/templates/rtk-js/src/static/css/base/typography.scss +53 -0
- package/templates/rtk-js/src/static/css/resources/_variables.scss +1 -0
- 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 +5 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@param: Number like 1, 2 or 3
|
|
3
|
+
@returns: Space in multiples of 8px
|
|
4
|
+
*/
|
|
5
|
+
@function makespace($spaceMultiple) {
|
|
6
|
+
@if $spaceMultiple == 4 {
|
|
7
|
+
$spaceMultiple: 5;
|
|
8
|
+
}
|
|
9
|
+
@return ($spaceMultiple * $base-space);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
@param: Input size in px
|
|
14
|
+
@returns: Size in rem
|
|
15
|
+
*/
|
|
16
|
+
@function remy($pxsize) {
|
|
17
|
+
@return calc($pxsize/$font-size-body) + rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin font-size($size) {
|
|
21
|
+
// font-size: $size + px; // For unsupported browsers
|
|
22
|
+
font-size: remy($size);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// @mixin vertical-center {
|
|
26
|
+
// position: relative;
|
|
27
|
+
// top: 50%;
|
|
28
|
+
// -ms-transform: translateY(-50%);
|
|
29
|
+
// -webkit-transform: translateY(-50%);
|
|
30
|
+
// transform: translateY(-50%);
|
|
31
|
+
// }
|
|
32
|
+
|
|
33
|
+
// @mixin keyframes($name) {
|
|
34
|
+
// @-webkit-keyframes #{$name} {
|
|
35
|
+
// @content;
|
|
36
|
+
// }
|
|
37
|
+
// @-moz-keyframes #{$name} {
|
|
38
|
+
// @content;
|
|
39
|
+
// }
|
|
40
|
+
// @keyframes #{$name} {
|
|
41
|
+
// @content;
|
|
42
|
+
// }
|
|
43
|
+
// }
|
|
44
|
+
|
|
45
|
+
// @mixin text-shorten {
|
|
46
|
+
// overflow: hidden;
|
|
47
|
+
// text-overflow: ellipsis;
|
|
48
|
+
// white-space: nowrap;
|
|
49
|
+
// }
|
|
50
|
+
|
|
51
|
+
// Clearfix mixin
|
|
52
|
+
// %clearfix {
|
|
53
|
+
// *zoom: 1;
|
|
54
|
+
|
|
55
|
+
// &::before,
|
|
56
|
+
// &::after {
|
|
57
|
+
// content: " ";
|
|
58
|
+
// display: table;
|
|
59
|
+
// }
|
|
60
|
+
|
|
61
|
+
// &::after {
|
|
62
|
+
// clear: both;
|
|
63
|
+
// }
|
|
64
|
+
// }
|
|
65
|
+
|
|
66
|
+
// @mixin generateRatings {
|
|
67
|
+
// @each $index, $color, $text-color in $rating-bg-colors-map {
|
|
68
|
+
// .rating-#{$index} {
|
|
69
|
+
// background: $color;
|
|
70
|
+
// color: $text-color;
|
|
71
|
+
// }
|
|
72
|
+
// }
|
|
73
|
+
// }
|
|
74
|
+
|
|
75
|
+
@mixin optional-at-root($sel) {
|
|
76
|
+
@at-root #{if(not &, $sel, selector-append(&, $sel))} {
|
|
77
|
+
@content;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@mixin placeholder {
|
|
82
|
+
@include optional-at-root("::-webkit-input-placeholder") {
|
|
83
|
+
@content;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include optional-at-root(":-moz-placeholder") {
|
|
87
|
+
@content;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@include optional-at-root("::-moz-placeholder") {
|
|
91
|
+
@content;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@include optional-at-root(":-ms-input-placeholder") {
|
|
95
|
+
@content;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// @mixin transition($transition-property, $transition-time, $method) {
|
|
100
|
+
// -webkit-transition: $transition-property $transition-time $method;
|
|
101
|
+
// -moz-transition: $transition-property $transition-time $method;
|
|
102
|
+
// -ms-transition: $transition-property $transition-time $method;
|
|
103
|
+
// -o-transition: $transition-property $transition-time $method;
|
|
104
|
+
// transition: $transition-property $transition-time $method;
|
|
105
|
+
// }
|
|
106
|
+
|
|
107
|
+
// @mixin enhanceAnimations() {
|
|
108
|
+
// -webkit-transform: translate3d(0, 0, 0);
|
|
109
|
+
// -moz-transform: translate3d(0, 0, 0);
|
|
110
|
+
// -ms-transform: translate3d(0, 0, 0);
|
|
111
|
+
// -o-transform: translate3d(0, 0, 0);
|
|
112
|
+
// transform: translate3d(0, 0, 0);
|
|
113
|
+
|
|
114
|
+
// // stoping flickering on chrome
|
|
115
|
+
// // -webkit-transform-style: preserve-3d;
|
|
116
|
+
// // -webkit-perspective: 1000;
|
|
117
|
+
// // -webkit-backface-visibility: hidden;
|
|
118
|
+
// }
|
|
119
|
+
|
|
120
|
+
// @mixin only-mobile {
|
|
121
|
+
// @media (max-width: #{$tablet-width}) {
|
|
122
|
+
// @content;
|
|
123
|
+
// }
|
|
124
|
+
// }
|
|
125
|
+
|
|
126
|
+
// @mixin tablet {
|
|
127
|
+
// @media (min-width: #{$tablet-width}) {
|
|
128
|
+
// @content;
|
|
129
|
+
// }
|
|
130
|
+
// }
|
|
131
|
+
|
|
132
|
+
// @mixin only-tablet {
|
|
133
|
+
// @media (min-width: #{$tablet-width}) and (max-width: #{$desktop-width}) {
|
|
134
|
+
// @content;
|
|
135
|
+
// }
|
|
136
|
+
// }
|
|
137
|
+
|
|
138
|
+
// @mixin desktop {
|
|
139
|
+
// @media (min-width: #{$desktop-width}) {
|
|
140
|
+
// @content;
|
|
141
|
+
// }
|
|
142
|
+
// }
|
|
143
|
+
|
|
144
|
+
// @mixin only-desktop {
|
|
145
|
+
// @media (min-width: #{$desktop-width}) and (max-width: #{$large-width}) {
|
|
146
|
+
// @content;
|
|
147
|
+
// }
|
|
148
|
+
// }
|
|
149
|
+
|
|
150
|
+
// @mixin large {
|
|
151
|
+
// @media (min-width: #{$large-width}) {
|
|
152
|
+
// @content;
|
|
153
|
+
// }
|
|
154
|
+
// }
|
|
155
|
+
|
|
156
|
+
// @mixin box-sizing($box-model) {
|
|
157
|
+
// -webkit-box-sizing: $box-model; // Safari <= 5
|
|
158
|
+
// -moz-box-sizing: $box-model; // Firefox <= 19
|
|
159
|
+
// box-sizing: $box-model;
|
|
160
|
+
// }
|
|
161
|
+
|
|
162
|
+
// @mixin border-radius($radius) {
|
|
163
|
+
// -webkit-border-radius: $radius;
|
|
164
|
+
// border-radius: $radius;
|
|
165
|
+
// background-clip: padding-box; /* stops bg color from leaking outside the border: */
|
|
166
|
+
// }
|
|
167
|
+
|
|
168
|
+
// @mixin opacity($opacity) {
|
|
169
|
+
// opacity: $opacity;
|
|
170
|
+
// $opacity-ie: $opacity * 100;
|
|
171
|
+
|
|
172
|
+
// filter: alpha(opacity=$opacity-ie); //IE8
|
|
173
|
+
// }
|
|
174
|
+
|
|
175
|
+
// hack to remove scrollbars from chrome and IE
|
|
176
|
+
@mixin hideScroll() {
|
|
177
|
+
-ms-overflow-style: none;
|
|
178
|
+
|
|
179
|
+
&::-webkit-scrollbar {
|
|
180
|
+
width: 0 !important; /* stylelint-disable-line */
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Sidebar Widget / Full width container mixin
|
|
185
|
+
// @mixin contentWidth($container-width) {
|
|
186
|
+
// width: $container-width;
|
|
187
|
+
// }
|
|
188
|
+
|
|
189
|
+
@mixin truncateAfterNumberOfLines($lines) {
|
|
190
|
+
overflow: hidden;
|
|
191
|
+
text-overflow: ellipsis;
|
|
192
|
+
display: -webkit-box;
|
|
193
|
+
line-clamp: $lines;
|
|
194
|
+
-webkit-line-clamp: $lines;
|
|
195
|
+
-webkit-box-orient: vertical;
|
|
196
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Import or define any sass mixins, functions, and vendor mixins below */
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
[
|
|
4
|
+
"@babel/preset-env",
|
|
5
|
+
{
|
|
6
|
+
"targets": {
|
|
7
|
+
"node": "current"
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
"@babel/preset-react"
|
|
12
|
+
],
|
|
13
|
+
"plugins": [
|
|
14
|
+
"@babel/plugin-proposal-object-rest-spread",
|
|
15
|
+
"transform-es2015-modules-commonjs",
|
|
16
|
+
"transform-class-properties",
|
|
17
|
+
"dynamic-import-node",
|
|
18
|
+
"@loadable/babel-plugin"
|
|
19
|
+
],
|
|
20
|
+
"env": {
|
|
21
|
+
"test": {
|
|
22
|
+
"presets": ["@babel/preset-react"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"ignore": ["__TEST__"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@babel/eslint-parser",
|
|
3
|
+
"rules": {
|
|
4
|
+
"prettier/prettier": "error",
|
|
5
|
+
"no-console": "warn",
|
|
6
|
+
"react/prop-types": 1,
|
|
7
|
+
"react/display-name": [0, { "ignoreTranspilerName": true }],
|
|
8
|
+
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
|
|
9
|
+
"no-prototype-builtins": "off",
|
|
10
|
+
"jam3/no-sanitizer-with-danger": 2,
|
|
11
|
+
"react/jsx-no-target-blank": [0, {
|
|
12
|
+
"enforceDynamicLinks": "never"
|
|
13
|
+
}]
|
|
14
|
+
},
|
|
15
|
+
"env": {
|
|
16
|
+
"browser": true,
|
|
17
|
+
"es6": true,
|
|
18
|
+
"jest": true,
|
|
19
|
+
"node": true
|
|
20
|
+
},
|
|
21
|
+
"globals": {
|
|
22
|
+
"expect": true,
|
|
23
|
+
"__non_webpack_require__": true,
|
|
24
|
+
"logger": "readonly",
|
|
25
|
+
"AppCallbacks": "readonly"
|
|
26
|
+
},
|
|
27
|
+
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:prettier/recommended"],
|
|
28
|
+
"parserOptions": {
|
|
29
|
+
"sourceType": "module",
|
|
30
|
+
"ecmaFeatures": {
|
|
31
|
+
"experimentalObjectRestSpread": true,
|
|
32
|
+
"jsx": true
|
|
33
|
+
},
|
|
34
|
+
"babelOptions": {
|
|
35
|
+
"configFile": "./babel.config.js"
|
|
36
|
+
},
|
|
37
|
+
"ecmaVersion": 6
|
|
38
|
+
},
|
|
39
|
+
"plugins": ["babel", "react", "react-hooks", "prettier", "jam3"],
|
|
40
|
+
"settings": {
|
|
41
|
+
"react": {
|
|
42
|
+
"createClass": "createReactClass",
|
|
43
|
+
"pragma": "React",
|
|
44
|
+
"version": "detect"
|
|
45
|
+
},
|
|
46
|
+
"propWrapperFunctions": [
|
|
47
|
+
"forbidExtraProps",
|
|
48
|
+
{ "property": "freeze", "object": "Object" },
|
|
49
|
+
{ "property": "myFavoriteWrapper" }
|
|
50
|
+
],
|
|
51
|
+
"linkComponents": ["Hyperlink", { "name": "Link", "linkAttribute": "to" }]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"stylelint-config-standard-scss",
|
|
4
|
+
"stylelint-config-prettier-scss",
|
|
5
|
+
"stylelint-config-css-modules"
|
|
6
|
+
],
|
|
7
|
+
"plugins": ["stylelint-prettier"],
|
|
8
|
+
"rules": {
|
|
9
|
+
"property-no-vendor-prefix":null,
|
|
10
|
+
"scss/function-no-unknown": null,
|
|
11
|
+
"selector-class-pattern": null,
|
|
12
|
+
"prettier/prettier": true,
|
|
13
|
+
"color-no-invalid-hex": true,
|
|
14
|
+
"comment-empty-line-before": ["always", { "ignore": ["stylelint-commands", "after-comment"] }],
|
|
15
|
+
"indentation": 4,
|
|
16
|
+
"number-leading-zero": null,
|
|
17
|
+
"max-empty-lines": 2,
|
|
18
|
+
"declaration-no-important": true,
|
|
19
|
+
"block-no-empty": true,
|
|
20
|
+
"no-empty-source": null,
|
|
21
|
+
"selector-pseudo-class-no-unknown": null,
|
|
22
|
+
"selector-type-no-unknown": null,
|
|
23
|
+
"rule-empty-line-before": ["always", { "except": ["first-nested"], "ignore": ["after-comment"] }],
|
|
24
|
+
"declaration-property-unit-allowed-list": {
|
|
25
|
+
"/.*/": ["em", "rem", "%", "s", "vh", "vw", "px", "deg", "ms", "dpi", "dvh", "fr"]
|
|
26
|
+
},
|
|
27
|
+
"at-rule-no-unknown": null,
|
|
28
|
+
"scss/double-slash-comment-whitespace-inside": null,
|
|
29
|
+
"scss/at-mixin-pattern": null,
|
|
30
|
+
"scss/dollar-variable-pattern": null,
|
|
31
|
+
"selector-id-pattern": null,
|
|
32
|
+
"keyframes-name-pattern": null,
|
|
33
|
+
"selector-pseudo-element-no-unknown": null
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Getting Started
|
|
2
|
+
Commence development by initiating the application in development mode with the following commands:
|
|
3
|
+
|
|
4
|
+
For running the application in development mode, run:
|
|
5
|
+
```bash
|
|
6
|
+
npm run start
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
For a production build, utilize:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm run build
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
To serve the production build, execute:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm run serve
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Documentation
|
|
22
|
+
Explore the complete documentation at [https://catalyst.1mg.com](https://catalyst.1mg.com).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const apiInstance = () => {
|
|
2
|
+
const fetchFunction = async (url, options) => {
|
|
3
|
+
let baseURL = process.env.API_URL
|
|
4
|
+
let finalUrl = baseURL + url
|
|
5
|
+
|
|
6
|
+
// Request Interceptor - you can modify request here
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// Add query params if exist
|
|
10
|
+
if (Object.keys(options?.params).length > 0) {
|
|
11
|
+
finalUrl = url + "?" + new URLSearchParams(options.params)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return fetch(finalUrl, options)
|
|
15
|
+
.then(async (response) => {
|
|
16
|
+
const parsedResponse = await response.json()
|
|
17
|
+
// Response Interceptor - you can modify response here
|
|
18
|
+
return parsedResponse
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
get: fetchFunction,
|
|
23
|
+
post: fetchFunction,
|
|
24
|
+
delete: fetchFunction,
|
|
25
|
+
patch: fetchFunction,
|
|
26
|
+
put: fetchFunction
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export default { apiInstance }
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { hydrateRoot } from "react-dom/client"
|
|
3
|
+
import { loadableReady } from "@loadable/component"
|
|
4
|
+
import { Provider } from "react-redux"
|
|
5
|
+
import { createBrowserRouter, RouterProvider } from "@tata1mg/router"
|
|
6
|
+
import { preparedRoutes } from "../src/js/routes/index.js"
|
|
7
|
+
import configureStore from "../src/js/store/index.js"
|
|
8
|
+
import "./styles"
|
|
9
|
+
|
|
10
|
+
window.addEventListener("load", () => {
|
|
11
|
+
loadableReady(() => {
|
|
12
|
+
const { __ROUTER_INITIAL_DATA__: routerInitialData } = window
|
|
13
|
+
|
|
14
|
+
const router = createBrowserRouter(preparedRoutes({ store:{}, routerInitialState: routerInitialData }))
|
|
15
|
+
|
|
16
|
+
const Application = (
|
|
17
|
+
|
|
18
|
+
<React.StrictMode>
|
|
19
|
+
<RouterProvider router={router} />
|
|
20
|
+
</React.StrictMode>
|
|
21
|
+
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const container = document.getElementById("app")
|
|
25
|
+
hydrateRoot(container, Application)
|
|
26
|
+
})
|
|
27
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* Style Loader
|
|
2
|
+
*
|
|
3
|
+
* Anything imported in here will either be added to the vendor CSS chunk, or
|
|
4
|
+
* the main app CSS chunk. Where they will go depends on its location or its
|
|
5
|
+
* extension.
|
|
6
|
+
*
|
|
7
|
+
* Files will be added to the vendor.css chunk if:
|
|
8
|
+
* - they are located inside `node_modules`, or
|
|
9
|
+
* - they are plain .css files.
|
|
10
|
+
* Otherwise, files will be added to the main app.css chunk.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// Include initial base styles.
|
|
14
|
+
import "normalize.css"
|
|
15
|
+
import "@css/base/index.scss"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"APPLICATION_PORT": "3005",
|
|
3
|
+
"APPLICATION_BASE_URL": "http://localhost:3005",
|
|
4
|
+
"SERVER_PATH": "http://localhost:3005",
|
|
5
|
+
"OUTPUT_PATH": "build",
|
|
6
|
+
"PUBLIC_OUTPUT_PATH": "build/public",
|
|
7
|
+
"PUBLIC_ASSET_PATH": "http://localhost:3005/assets/",
|
|
8
|
+
"LOCAL_ASSET_PATH": "/assets/",
|
|
9
|
+
"EXTERNAL_BASE_URL": "http://localhost:3005",
|
|
10
|
+
"DEV_SERVER_PORT": 3005,
|
|
11
|
+
"DEV_SERVER_HOSTNAME": "localhost",
|
|
12
|
+
"DEV_SERVER_HOST_URL": "http://localhost:3005",
|
|
13
|
+
"ENV_NAME": "local",
|
|
14
|
+
"BUILD_ENV": ""
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"S3_BUCKET": "",
|
|
3
|
+
"S3_FOLDER": "",
|
|
4
|
+
"CDN_ASSET_PATH": "",
|
|
5
|
+
"APPLICATION_PORT": "",
|
|
6
|
+
"APPLICATION_BASE_URL": "",
|
|
7
|
+
"SERVER_PATH": "",
|
|
8
|
+
"OUTPUT_PATH": "",
|
|
9
|
+
"PUBLIC_OUTPUT_PATH": "",
|
|
10
|
+
"PUBLIC_ASSET_PATH": "",
|
|
11
|
+
"LOCAL_ASSET_PATH": "",
|
|
12
|
+
"EXTERNAL_BASE_URL": "",
|
|
13
|
+
"DEV_SERVER_PORT": 0,
|
|
14
|
+
"DEV_SERVER_HOSTNAME": "",
|
|
15
|
+
"DEV_SERVER_HOST_URL": "",
|
|
16
|
+
"ENV_NAME": "",
|
|
17
|
+
"BUILD_ENV": ""
|
|
18
|
+
}
|