create-catalyst-app 0.0.1-beta.1 → 0.0.1-beta.3

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 (192) hide show
  1. package/{readme.md → Readme.md} +2 -3
  2. package/license +10 -0
  3. package/package.json +20 -18
  4. package/scripts/cli.cjs +242 -0
  5. package/templates/common/.babelrc +11 -11
  6. package/templates/common/README.md +16 -20
  7. package/templates/common/api.js +9 -11
  8. package/templates/common/client/styles.js +1 -13
  9. package/templates/common/config/config.json +13 -16
  10. package/templates/common/public/favicon.ico +0 -0
  11. package/templates/{redux-js → common}/server/document.js +1 -2
  12. package/templates/common/server/index.js +2 -0
  13. package/templates/common/server/server.js +8 -0
  14. package/templates/common/src/js/containers/Home/Home.js +23 -40
  15. package/templates/common/src/js/containers/Home/Home.scss +34 -0
  16. package/templates/common/src/js/routes/index.js +9 -42
  17. package/templates/common/src/static/css/base/index.scss +0 -7
  18. package/templates/common/src/static/css/base/styles.scss +0 -160
  19. package/templates/common/src/static/css/resources/_variables.scss +0 -172
  20. package/templates/{redux-js → common}/webpackConfig.js +2 -2
  21. package/templates/none-js/client/index.js +9 -13
  22. package/templates/none-js/package.json +6 -37
  23. package/templates/none-js/src/js/containers/App/index.js +12 -36
  24. package/templates/none-js/src/js/routes/utils.js +28 -0
  25. package/templates/redux-js/client/index.js +6 -5
  26. package/templates/redux-js/package.json +9 -37
  27. package/templates/redux-js/src/js/containers/App/actions.js +1 -4
  28. package/templates/redux-js/src/js/containers/App/index.js +12 -38
  29. package/templates/redux-js/src/js/containers/App/reducer.js +15 -16
  30. package/templates/redux-js/src/js/routes/utils.js +28 -0
  31. package/templates/redux-js/src/js/store/index.js +17 -68
  32. package/templates/rtk-js/client/index.js +6 -5
  33. package/templates/rtk-js/package.json +9 -37
  34. package/templates/rtk-js/src/js/containers/App/index.js +12 -38
  35. package/templates/rtk-js/src/js/containers/App/reducer.js +1 -9
  36. package/templates/rtk-js/src/js/routes/utils.js +28 -0
  37. package/templates/rtk-js/src/js/store/index.js +12 -6
  38. package/scripts/cli.mjs +0 -266
  39. package/templates/common/.editorconfig +0 -12
  40. package/templates/common/.eslintignore +0 -6
  41. package/templates/common/.eslintrc +0 -53
  42. package/templates/common/.stylelintrc +0 -35
  43. package/templates/common/checkVersion.js +0 -3
  44. package/templates/common/client/index.js +0 -39
  45. package/templates/common/config/config_template.json +0 -18
  46. package/templates/common/config/index.js +0 -77
  47. package/templates/common/package.json +0 -57
  48. package/templates/common/server/CustomDocument.js +0 -14
  49. package/templates/common/server/customIndex.js +0 -3
  50. package/templates/common/server/customServer.js +0 -16
  51. package/templates/common/src/js/containers/App/actions.js +0 -20
  52. package/templates/common/src/js/containers/App/index.js +0 -46
  53. package/templates/common/src/js/containers/App/reducer.js +0 -21
  54. package/templates/common/src/js/containers/PDP/PDP.js +0 -37
  55. package/templates/common/src/js/reducer/index.js +0 -80
  56. package/templates/common/src/js/stateManager/stateProvider.js +0 -34
  57. package/templates/common/src/js/store/index.js +0 -77
  58. package/templates/common/src/static/css/base/_overrides.scss +0 -81
  59. package/templates/common/src/static/css/base/animations.js +0 -38
  60. package/templates/common/src/static/css/base/layout.scss +0 -242
  61. package/templates/common/src/static/css/base/typography.scss +0 -285
  62. package/templates/common/src/static/css/resources/_mixins.scss +0 -196
  63. package/templates/common/src/static/css/resources/_vendors.scss +0 -1
  64. package/templates/common/src/static/fonts/.gitkeep +0 -0
  65. package/templates/common/src/static/fonts/Inter-Bold-Subset.otf +0 -0
  66. package/templates/common/src/static/fonts/Inter-Italic-Subset.otf +0 -0
  67. package/templates/common/src/static/fonts/Inter-Light-Subset.otf +0 -0
  68. package/templates/common/src/static/fonts/Inter-Medium-Subset.otf +0 -0
  69. package/templates/common/src/static/fonts/Inter-Regular-Subset.otf +0 -0
  70. package/templates/common/src/static/fonts/Inter-SemiBold-Subset.otf +0 -0
  71. package/templates/common/src/static/fonts/Poppins-Bold-Subset.woff2 +0 -0
  72. package/templates/common/src/static/fonts/Poppins-Italic-Subset.woff2 +0 -0
  73. package/templates/common/src/static/fonts/Poppins-Light-Subset.woff2 +0 -0
  74. package/templates/common/src/static/fonts/Poppins-Medium-Subset.woff2 +0 -0
  75. package/templates/common/src/static/fonts/Poppins-Regular-Subset.woff2 +0 -0
  76. package/templates/common/src/static/fonts/Poppins-SemiBold-Subset.woff2 +0 -0
  77. package/templates/none-js/.babelrc +0 -26
  78. package/templates/none-js/.eslintignore +0 -6
  79. package/templates/none-js/.eslintrc +0 -53
  80. package/templates/none-js/.prettierrc.json +0 -7
  81. package/templates/none-js/.stylelintrc +0 -35
  82. package/templates/none-js/README.md +0 -22
  83. package/templates/none-js/api.js +0 -29
  84. package/templates/none-js/checkVersion.js +0 -3
  85. package/templates/none-js/client/styles.js +0 -15
  86. package/templates/none-js/config/config.json +0 -15
  87. package/templates/none-js/config/config_template.json +0 -18
  88. package/templates/none-js/config/index.js +0 -44
  89. package/templates/none-js/server/document.js +0 -14
  90. package/templates/none-js/server/index.js +0 -3
  91. package/templates/none-js/server/server.js +0 -16
  92. package/templates/none-js/src/js/containers/DemoPage/DemoPage.js +0 -39
  93. package/templates/none-js/src/js/containers/DemoPage/DemoPage.scss +0 -3
  94. package/templates/none-js/src/js/containers/Home/Home.js +0 -27
  95. package/templates/none-js/src/js/containers/Home/Home.scss +0 -36
  96. package/templates/none-js/src/js/routes/index.js +0 -49
  97. package/templates/none-js/src/js/stateManager/stateProvider.js +0 -19
  98. package/templates/none-js/src/js/store/index.js +0 -6
  99. package/templates/none-js/src/static/css/base/index.scss +0 -3
  100. package/templates/none-js/src/static/css/base/styles.scss +0 -11
  101. package/templates/none-js/src/static/css/base/typography.scss +0 -53
  102. package/templates/none-js/src/static/css/resources/_variables.scss +0 -1
  103. package/templates/none-js/src/static/fonts/.gitkeep +0 -0
  104. package/templates/none-js/src/static/fonts/Inter-Bold-Subset.otf +0 -0
  105. package/templates/none-js/src/static/fonts/Inter-Italic-Subset.otf +0 -0
  106. package/templates/none-js/src/static/fonts/Inter-Light-Subset.otf +0 -0
  107. package/templates/none-js/src/static/fonts/Inter-Medium-Subset.otf +0 -0
  108. package/templates/none-js/src/static/fonts/Inter-Regular-Subset.otf +0 -0
  109. package/templates/none-js/src/static/fonts/Inter-SemiBold-Subset.otf +0 -0
  110. package/templates/none-js/src/static/fonts/Poppins-Bold-Subset.woff2 +0 -0
  111. package/templates/none-js/src/static/fonts/Poppins-Italic-Subset.woff2 +0 -0
  112. package/templates/none-js/src/static/fonts/Poppins-Medium-Subset.woff2 +0 -0
  113. package/templates/none-js/src/static/fonts/Poppins-Regular-Subset.woff2 +0 -0
  114. package/templates/none-js/src/static/fonts/Poppins-SemiBold-Subset.woff2 +0 -0
  115. package/templates/none-js/webpackConfig.js +0 -5
  116. package/templates/redux-js/.babelrc +0 -26
  117. package/templates/redux-js/.eslintignore +0 -6
  118. package/templates/redux-js/.eslintrc +0 -53
  119. package/templates/redux-js/.prettierrc.json +0 -7
  120. package/templates/redux-js/.stylelintrc +0 -35
  121. package/templates/redux-js/README.md +0 -22
  122. package/templates/redux-js/api.js +0 -29
  123. package/templates/redux-js/checkVersion.js +0 -3
  124. package/templates/redux-js/client/styles.js +0 -15
  125. package/templates/redux-js/config/config.json +0 -15
  126. package/templates/redux-js/config/config_template.json +0 -18
  127. package/templates/redux-js/config/index.js +0 -44
  128. package/templates/redux-js/server/index.js +0 -3
  129. package/templates/redux-js/server/server.js +0 -16
  130. package/templates/redux-js/src/js/containers/DemoPage/DemoPage.js +0 -39
  131. package/templates/redux-js/src/js/containers/DemoPage/DemoPage.scss +0 -3
  132. package/templates/redux-js/src/js/containers/Home/Home.js +0 -27
  133. package/templates/redux-js/src/js/containers/Home/Home.scss +0 -36
  134. package/templates/redux-js/src/js/reducer/index.js +0 -80
  135. package/templates/redux-js/src/js/routes/index.js +0 -49
  136. package/templates/redux-js/src/js/stateManager/stateProvider.js +0 -34
  137. package/templates/redux-js/src/static/css/base/index.scss +0 -3
  138. package/templates/redux-js/src/static/css/base/styles.scss +0 -11
  139. package/templates/redux-js/src/static/css/base/typography.scss +0 -53
  140. package/templates/redux-js/src/static/css/resources/_variables.scss +0 -1
  141. package/templates/redux-js/src/static/fonts/.gitkeep +0 -0
  142. package/templates/redux-js/src/static/fonts/Inter-Bold-Subset.otf +0 -0
  143. package/templates/redux-js/src/static/fonts/Inter-Italic-Subset.otf +0 -0
  144. package/templates/redux-js/src/static/fonts/Inter-Light-Subset.otf +0 -0
  145. package/templates/redux-js/src/static/fonts/Inter-Medium-Subset.otf +0 -0
  146. package/templates/redux-js/src/static/fonts/Inter-Regular-Subset.otf +0 -0
  147. package/templates/redux-js/src/static/fonts/Inter-SemiBold-Subset.otf +0 -0
  148. package/templates/redux-js/src/static/fonts/Poppins-Bold-Subset.woff2 +0 -0
  149. package/templates/redux-js/src/static/fonts/Poppins-Italic-Subset.woff2 +0 -0
  150. package/templates/redux-js/src/static/fonts/Poppins-Medium-Subset.woff2 +0 -0
  151. package/templates/redux-js/src/static/fonts/Poppins-Regular-Subset.woff2 +0 -0
  152. package/templates/redux-js/src/static/fonts/Poppins-SemiBold-Subset.woff2 +0 -0
  153. package/templates/rtk-js/.babelrc +0 -26
  154. package/templates/rtk-js/.eslintignore +0 -6
  155. package/templates/rtk-js/.eslintrc +0 -53
  156. package/templates/rtk-js/.prettierrc.json +0 -7
  157. package/templates/rtk-js/.stylelintrc +0 -35
  158. package/templates/rtk-js/README.md +0 -23
  159. package/templates/rtk-js/api.js +0 -29
  160. package/templates/rtk-js/checkVersion.js +0 -3
  161. package/templates/rtk-js/client/styles.js +0 -15
  162. package/templates/rtk-js/config/config.json +0 -15
  163. package/templates/rtk-js/config/config_template.json +0 -18
  164. package/templates/rtk-js/config/index.js +0 -44
  165. package/templates/rtk-js/server/document.js +0 -14
  166. package/templates/rtk-js/server/index.js +0 -3
  167. package/templates/rtk-js/server/server.js +0 -16
  168. package/templates/rtk-js/src/js/containers/DemoPage/DemoPage.js +0 -39
  169. package/templates/rtk-js/src/js/containers/DemoPage/DemoPage.scss +0 -3
  170. package/templates/rtk-js/src/js/containers/Home/Home.js +0 -27
  171. package/templates/rtk-js/src/js/containers/Home/Home.scss +0 -36
  172. package/templates/rtk-js/src/js/reducer/index.js +0 -80
  173. package/templates/rtk-js/src/js/routes/index.js +0 -49
  174. package/templates/rtk-js/src/js/stateManager/stateProvider.js +0 -34
  175. package/templates/rtk-js/src/static/css/base/index.scss +0 -3
  176. package/templates/rtk-js/src/static/css/base/styles.scss +0 -11
  177. package/templates/rtk-js/src/static/css/base/typography.scss +0 -53
  178. package/templates/rtk-js/src/static/css/resources/_variables.scss +0 -1
  179. package/templates/rtk-js/src/static/fonts/.gitkeep +0 -0
  180. package/templates/rtk-js/src/static/fonts/Inter-Bold-Subset.otf +0 -0
  181. package/templates/rtk-js/src/static/fonts/Inter-Italic-Subset.otf +0 -0
  182. package/templates/rtk-js/src/static/fonts/Inter-Light-Subset.otf +0 -0
  183. package/templates/rtk-js/src/static/fonts/Inter-Medium-Subset.otf +0 -0
  184. package/templates/rtk-js/src/static/fonts/Inter-Regular-Subset.otf +0 -0
  185. package/templates/rtk-js/src/static/fonts/Inter-SemiBold-Subset.otf +0 -0
  186. package/templates/rtk-js/src/static/fonts/Poppins-Bold-Subset.woff2 +0 -0
  187. package/templates/rtk-js/src/static/fonts/Poppins-Italic-Subset.woff2 +0 -0
  188. package/templates/rtk-js/src/static/fonts/Poppins-Medium-Subset.woff2 +0 -0
  189. package/templates/rtk-js/src/static/fonts/Poppins-Regular-Subset.woff2 +0 -0
  190. package/templates/rtk-js/src/static/fonts/Poppins-SemiBold-Subset.woff2 +0 -0
  191. package/templates/rtk-js/webpackConfig.js +0 -5
  192. /package/{templates/common/.prettierrc.json → .prettierrc.json} +0 -0
@@ -1,21 +0,0 @@
1
- import { ShellActions } from "./actions";
2
-
3
- export const defaultState = {
4
- testActionDispatched: false,
5
- };
6
-
7
- const shellReducer = (state = defaultState, action) => {
8
- switch (action.type) {
9
- case ShellActions.REDUX_TEST: {
10
- return {
11
- ...state,
12
- testActionDispatched: true,
13
- };
14
- }
15
-
16
- default:
17
- return state;
18
- }
19
- };
20
-
21
- export default shellReducer;
@@ -1,37 +0,0 @@
1
- import React, { useEffect } from "react";
2
- import { useCurrentRouteData, Link } from "@tata1mg/router";
3
- const PDP = () => {
4
- const { data, isFetched, loading } = useCurrentRouteData() || {}
5
-
6
- useEffect(() => {
7
- console.log("data is =>", data)
8
- })
9
-
10
- return (
11
-
12
- <div>
13
- <>Welcome to pdp page</>
14
- <Link to={"/"}>link</Link>
15
- </div>
16
- );
17
- };
18
-
19
- PDP.serverFetcher = async ({ req }, { store }) => {
20
- console.log("server fetcher called!!")
21
- const res = await fetch("https://jsonblob.com/api/1206830251241234432");
22
- const json = await res.json();
23
- return json;
24
- };
25
-
26
- PDP.clientFetcher = async ({ }, { }) => {
27
- console.log("client fetcher called")
28
- const res = await fetch("https://jsonblob.com/api/1206830251241234432");
29
- const json = await res.json();
30
- return json;
31
- };
32
-
33
- PDP.MetaTagFunction = (routerData) => {
34
- return [<title key="PDP">PDP</title>]
35
- };
36
-
37
- export default PDP;
@@ -1,80 +0,0 @@
1
- import { combineReducers } from "redux"
2
- // Import your reducers here
3
-
4
- import shellReducer from "@containers/App/reducer"
5
-
6
- /**
7
- * @description A 'Reducer Manager' object, which keeps track of all the registered reducers and exposes a reduce() function. For detailed info :- https://redux.js.org/usage/code-splitting#using-a-reducer-manager
8
- */
9
-
10
- function createReducerManager() {
11
- // FRAMEWORK COMMENT THIS SHOULD BE EXPOSED TO USER
12
- // Create an object which maps keys to reducers
13
- const reducers = {
14
- shellReducer,
15
- }
16
-
17
- // Create the initial combinedReducer
18
- let reducerObj = combineReducers(reducers)
19
-
20
- // An array which is used to delete state keys when reducers are removed
21
- let keysToRemove = []
22
-
23
- return {
24
- getReducerMap: () => combineReducers(reducers),
25
- // The root reducer function exposed by this object
26
-
27
- // This will be passed to the store
28
- reduce: (state, action) => {
29
- // If any reducers have been removed, clean up their state first
30
- if (keysToRemove.length > 0) {
31
- state = { ...state }
32
- for (let key of keysToRemove) {
33
- delete state[key]
34
- }
35
- keysToRemove = []
36
- }
37
-
38
- // Delegate to the combined reducer
39
- return reducerObj(state, action)
40
- },
41
-
42
- // Adds a new reducer with the specified key
43
- add: (reducer) => {
44
- for (let key in reducer) {
45
- if (!key) {
46
- return
47
- }
48
-
49
- // We will skip a step if the reducer is already present
50
- if (reducers[key]) {
51
- continue
52
- }
53
-
54
- // Add the reducer to the reducer mapping
55
- reducers[key] = reducer[key]
56
- }
57
-
58
- // Generate a new combined reducer
59
- return combineReducers(reducers)
60
- },
61
-
62
- // Removes a reducer with the specified key
63
- remove: (key) => {
64
- if (!key || !reducers[key]) {
65
- return
66
- }
67
-
68
- // Remove it from the reducer mapping
69
- delete reducers[key]
70
-
71
- // Add the key to the list of keys to clean up
72
- keysToRemove.push(key)
73
-
74
- // Generate a new combined reducer
75
- return combineReducers(reducers)
76
- },
77
- }
78
- }
79
-
80
- export default createReducerManager
@@ -1,34 +0,0 @@
1
- import React from "react";
2
- import { Provider } from "react-redux";
3
- import configureStore from "../store";
4
-
5
- const ClientProvider = ({ children }) => {
6
- const { __INITIAL_STATE__ } = window;
7
- console.log("inital state is ====>",__INITIAL_STATE__)
8
- let store = configureStore(__INITIAL_STATE__);
9
- return (
10
- <Provider store={store} serverState={__INITIAL_STATE__}>
11
- {children}
12
- </Provider>
13
- );
14
- };
15
-
16
- const ServerProvider = ({ store, children }) => {
17
- return <Provider store={store}>{children}</Provider>; //on server
18
- };
19
-
20
-
21
- const serverStore = (initialState,req) => {
22
- // will create a new store on server and this store would be available in server provider
23
- return configureStore(initialState, {}, req);
24
- };
25
-
26
- const hydrateClient = (serverStore) => {
27
- const state = serverStore.getState();
28
-
29
- return <script>{`window.__INITIAL_STATE__ = ${state} `}</script>;
30
- };
31
-
32
- // will be calling hydrate client in the template wrapper
33
-
34
- export { ClientProvider, ServerProvider, hydrateClient, serverStore };
@@ -1,77 +0,0 @@
1
- import { compose, createStore, applyMiddleware } from "redux"
2
- import thunk from "redux-thunk"
3
- import { createLogger } from "redux-logger"
4
-
5
- import createReducerManager from "../reducer/index.js"
6
- import fetchInstance from "../../../api.js"
7
- /**
8
- * Function that initializes the store with the initialstate and adds middlewares that can be used during action dispatch
9
- * @param {object} initialState Default state
10
- * @param {object} cookies additional headers if needed
11
- * @param {object} requestObj additional information
12
- * @return {object} the store itself
13
- */
14
-
15
- process.env.NODE_ENV === "production"
16
-
17
- export default function configureStore(initialState, cookies, requestObj, customHeaders) {
18
- // The variable defined below acts as a flag when the store is initialized on the client side
19
- // Reason being that for the first time we need to actually need to forcefully set the reducer for which we have the initial data
20
- let initializeClient = true
21
-
22
- const reducerManager = createReducerManager()
23
-
24
- // FRAMEWORK COMMENT. This should be exposed to user.
25
- const api = fetchInstance
26
-
27
-
28
- // disable redux-logger in server - https://github.com/LogRocket/redux-logger/issues/6
29
- const reduxLogger = createLogger({
30
- predicate: () => typeof window !== "undefined",
31
- })
32
- const addReducer = (reducer) => {
33
- // Only executed once when for the first run in client - side
34
- if (initializeClient) {
35
- initializeClient = false
36
- return store.replaceReducer(reducerManager.add(reducer))
37
- }
38
-
39
- // This blocks check if the reducer is already added or not in store
40
- // If not then it only add the missing reducers
41
- // And if the required reducers are already present then we simply return without performing any change
42
- let reducerToAdd = {}
43
- const currentState = store.getState()
44
- for (let key in reducer) {
45
- if (!currentState[key]) {
46
- reducerToAdd[key] = reducer[key]
47
- }
48
- }
49
- if (Object.keys(reducerToAdd).length > 0) {
50
- return store.replaceReducer(reducerManager.add(reducerToAdd))
51
- }
52
- return
53
- }
54
- let middleware = [thunk.withExtraArgument({ api, addReducer })]
55
- if(process.env.NODE_ENV !== "production"){
56
- middleware = [...middleware,reduxLogger]
57
- }
58
- // Add universal enhancers here
59
- let enhancers = []
60
-
61
- const composeEnhancers = process.env.NODE_ENV === "production" && (typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose
62
- const enhancer = composeEnhancers(...[applyMiddleware(...middleware), ...enhancers])
63
-
64
- // create store with enhancers, middleware, reducers, and initialState
65
- // When the store is initialized on the client side, we are passing a function that just returns the initial State from the server
66
- // This is way we are able to maintain the initial state from the server on the client side and then add the relevant reducers
67
- // Which then consumes the initial state
68
- const store = createStore(
69
- Object.keys(initialState).length === 0 ? reducerManager.getReducerMap() : () => initialState,
70
- initialState,
71
- enhancer
72
- )
73
-
74
- return store
75
- }
76
-
77
-
@@ -1,81 +0,0 @@
1
- pre {
2
- white-space: pre-wrap;
3
- background: #f1f1f1;
4
- padding: 10px;
5
- }
6
-
7
- select {
8
- border: none;
9
- -webkit-appearance: none;
10
- -moz-appearance: none;
11
- appearance: none;
12
- color: $information-primary;
13
- }
14
-
15
- select:focus {
16
- outline: none;
17
- }
18
-
19
- table {
20
- border: 1px solid #ccc;
21
- border-collapse: collapse;
22
- margin: 0;
23
- padding: 0;
24
- width: 100%;
25
- table-layout: fixed;
26
- }
27
-
28
- table caption {
29
- font-size: 1.5em;
30
- margin: 0.5em 0 0.75em;
31
- }
32
-
33
- table tr {
34
- background-color: #f8f8f8;
35
- border: 1px solid #ddd;
36
- padding: 0.35em;
37
- }
38
-
39
- table th,
40
- table td {
41
- padding: 0.625em;
42
- text-align: left;
43
- }
44
-
45
- table th {
46
- font-size: 0.85em;
47
- letter-spacing: 0.1em;
48
- text-transform: uppercase;
49
- }
50
-
51
- button {
52
- padding: 0;
53
- }
54
-
55
- img {
56
- max-width: 100%;
57
- display: inline-block;
58
- }
59
-
60
- a {
61
- text-decoration: none;
62
- color: $action-primary;
63
- }
64
-
65
- hr {
66
- border: solid 1px $divider;
67
- margin: 0;
68
- }
69
-
70
- input {
71
- border: solid;
72
- -webkit-appearance: none;
73
- color: $information-primary;
74
- background-color: $container-background;
75
- text-align: start;
76
- }
77
-
78
- b,
79
- strong {
80
- font-weight: 600;
81
- }
@@ -1,38 +0,0 @@
1
- export const pageTransitions = {
2
- hidden: () => {
3
- return {
4
- x: 0,
5
- opacity: 0,
6
- }
7
- },
8
- visible: () => {
9
- return {
10
- x: 0,
11
- opacity: 1,
12
- transition: {
13
- type: "spring",
14
- delay: 0,
15
- stiffness: 800,
16
- damping: 65,
17
- mass: 2,
18
- },
19
- }
20
- },
21
-
22
- exit: (params) => {
23
- if (params?.showPageTransition === false) return { x: 0 }
24
- else {
25
- return {
26
- x: params?.action === "POP" ? "50vw" : "-50vw",
27
- opacity: 0,
28
- transition: {
29
- type: "spring",
30
- delay: 0,
31
- stiffness: 800,
32
- damping: 65,
33
- mass: 2,
34
- },
35
- }
36
- }
37
- },
38
- }
@@ -1,242 +0,0 @@
1
- .minHeight100 {
2
- height: 100vh;
3
- }
4
-
5
- .containerFluid {
6
- width: 100%;
7
- padding: 8px 16px 16px;
8
- }
9
-
10
- .container-fluid {
11
- // only to be used on VISUALLY root level elements (containers containing components) which do not have full width atoms/molecules inside it
12
- width: 100%;
13
- padding-left: 12px; // the only exception in the entire DLS to ensure an imaginary 16px indentation
14
- padding-right: 12px;
15
- }
16
-
17
- .container-fluid-padded {
18
- // same as the above
19
- width: 100%;
20
- padding: makespace(2) 12px;
21
- }
22
-
23
- .container-fluid-padded-xl {
24
- width: 100%;
25
- padding: makespace(3) 12px;
26
- }
27
-
28
- .gutter-only {
29
- // to be used only in very very crucial scenarios. You almost NEVER need it, if think you do, you're doing something wrong at the atom level
30
- margin-left: $gutter;
31
- margin-right: $gutter;
32
- }
33
-
34
- .fullWidth {
35
- width: 100%;
36
- }
37
-
38
- .col-1 {
39
- width: $col;
40
- margin-left: $gutter;
41
- margin-right: $gutter;
42
- }
43
-
44
- .col-2 {
45
- width: calc(calc(#{$col} * 2) + 8px);
46
- margin-left: $gutter;
47
- margin-right: $gutter;
48
- }
49
-
50
- .col-3 {
51
- width: calc(calc(#{$col} * 3) + 16px);
52
- margin-left: $gutter;
53
- margin-right: $gutter;
54
- }
55
-
56
- .col-4 {
57
- width: calc(calc(#{$col} * 4) + 24px);
58
- margin-left: $gutter;
59
- margin-right: $gutter;
60
- }
61
-
62
- .col-5 {
63
- width: calc(calc(#{$col} * 5) + 32px);
64
- margin-left: $gutter;
65
- margin-right: $gutter;
66
- }
67
-
68
- .col-6 {
69
- width: calc(calc(#{$col} * 6) + 40px);
70
- margin-left: $gutter;
71
- margin-right: $gutter;
72
- }
73
-
74
- .marginTop-4 {
75
- margin-top: $gutter;
76
- }
77
-
78
- .marginTop-8 {
79
- margin-top: makespace(1);
80
- }
81
-
82
- .marginTop-16 {
83
- margin-top: makespace(2);
84
- }
85
-
86
- .marginTop-24 {
87
- margin-top: makespace(3);
88
- }
89
-
90
- .marginTop-32 {
91
- margin-top: makespace(4);
92
- }
93
-
94
- .marginTop-40 {
95
- margin-top: makespace(5);
96
- }
97
-
98
- .marginTop-48 {
99
- margin-top: makespace(6);
100
- }
101
-
102
- .marginBottom-24 {
103
- margin-bottom: makespace(3);
104
- }
105
-
106
- .marginTop-96 {
107
- margin-top: makespace(12);
108
- }
109
-
110
- .marginBoth-4 {
111
- margin-top: $gutter;
112
- margin-bottom: $gutter;
113
- }
114
-
115
- .marginBoth-8 {
116
- margin-top: makespace(1);
117
- margin-bottom: makespace(1);
118
- }
119
-
120
- .marginBoth-16 {
121
- margin-top: makespace(2);
122
- margin-bottom: makespace(2);
123
- }
124
-
125
- .marginBoth-24 {
126
- margin-top: makespace(3);
127
- margin-bottom: makespace(3);
128
- }
129
-
130
- .marginBoth-40 {
131
- margin-top: makespace(5);
132
- margin-bottom: makespace(5);
133
- }
134
-
135
- .marginBoth-48 {
136
- margin-top: makespace(6);
137
- margin-bottom: makespace(6);
138
- }
139
-
140
- .paddingBoth-8 {
141
- padding-top: makespace(1);
142
- padding-bottom: makespace(1);
143
- }
144
-
145
- .paddingBoth-16 {
146
- padding-top: makespace(2);
147
- padding-bottom: makespace(2);
148
- }
149
-
150
- .paddingBoth-40 {
151
- padding-top: makespace(5);
152
- padding-bottom: makespace(5);
153
- }
154
-
155
- // This is where most used flex attributes throughout our codebase should go
156
-
157
- .flex {
158
- display: flex;
159
- }
160
-
161
- .flexColumn {
162
- display: flex;
163
- flex-direction: column;
164
- }
165
-
166
- .flexWrap {
167
- flex-wrap: wrap;
168
- }
169
-
170
- .alignCenter {
171
- align-items: center;
172
- }
173
-
174
- .alignBase {
175
- align-items: baseline;
176
- }
177
-
178
- .alignFlexEnd {
179
- align-items: flex-end;
180
- }
181
-
182
- .justifyCenter {
183
- justify-content: center;
184
- }
185
-
186
- .justifyBetween {
187
- justify-content: space-between;
188
- }
189
-
190
- .justifyEnd {
191
- justify-content: flex-end;
192
- }
193
-
194
- .spaceAround {
195
- justify-content: space-around;
196
- }
197
-
198
- .middleDivider {
199
- margin-left: makespace(2);
200
- margin-right: makespace(2);
201
- }
202
-
203
- .insetDivider {
204
- margin-left: makespace(1);
205
- margin-right: makespace(1);
206
- }
207
-
208
- .displayNone {
209
- display: none;
210
- }
211
-
212
- .textCenter {
213
- text-align: center;
214
- }
215
-
216
- .textRight {
217
- text-align: right;
218
- }
219
-
220
- .textUnderline {
221
- text-decoration: underline;
222
- }
223
-
224
- .minHeight-100 {
225
- min-height: 100vh;
226
- }
227
-
228
- .smallBorderRadius {
229
- border-radius: 4px;
230
- }
231
-
232
- .borderRadius {
233
- border-radius: makespace(1);
234
- }
235
-
236
- //WIDGET
237
-
238
- .widget-container {
239
- width: 100%;
240
- padding-top: makespace(1);
241
- padding-bottom: makespace(2);
242
- }