@carbonorm/carbonreact 3.4.0 → 3.4.1

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 CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "browser": "dist/index.umd.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "main": "dist/index.cjs.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@carbonorm/carbonnode": "^1.1.0",
10
+ "@carbonorm/carbonnode": "^1.2.4",
11
11
  "@fortawesome/fontawesome-svg-core": "^6.4.0",
12
12
  "@fortawesome/free-solid-svg-icons": "^6.4.0",
13
13
  "@fortawesome/react-fontawesome": "^0.2.0",
@@ -81,6 +81,8 @@
81
81
  "files": [
82
82
  "compileValidSQL.tsx",
83
83
  "compileValidSQL.cjs",
84
+ "generateRestBindings.tsx",
85
+ "generateRestBindings.cjs",
84
86
  "dist",
85
87
  "src"
86
88
  ]
@@ -9,6 +9,7 @@ import 'react-toastify/dist/ReactToastify.min.css';
9
9
  import BackendThrowable from 'components/Errors/BackendThrowable';
10
10
  import Nest from 'components/Nest/Nest';
11
11
  import {initialRestfulObjectsState, iRestfulObjectArrayTypes} from "variables/C6";
12
+ import CarbonWebSocket from "./components/WebSocket/CarbonWebSocket";
12
13
 
13
14
 
14
15
 
@@ -33,6 +34,16 @@ export const initialCarbonReactState: iCarbonReactState & iRestfulObjectArrayTyp
33
34
  ...initialRestfulObjectsState,
34
35
  }
35
36
 
37
+ // @link https://stackoverflow.com/questions/3710204/how-to-check-if-a-string-is-a-valid-json-string
38
+ export function isJsonString(str) {
39
+ try {
40
+ JSON.parse(str);
41
+ } catch (e) {
42
+ return false;
43
+ }
44
+ return true;
45
+ }
46
+
36
47
  const CarbonReact= class <P = {}, S = {}> extends Component<{
37
48
  children?: ReactNode | ReactNode[],
38
49
  } & P, S & iCarbonReactState> {
@@ -42,6 +53,9 @@ const CarbonReact= class <P = {}, S = {}> extends Component<{
42
53
  } & any, any & iCarbonReactState>;
43
54
 
44
55
  static lastLocation = window.location.pathname;
56
+ static websocketUrl = (window.location.protocol === 'https:' ? 'wss://' : 'ws://') + window.location.host + ':8888/ws';
57
+ static websocketTimeoutSeconds : number = 250;
58
+ static websocketHeartbeatSeconds : number = 250;
45
59
 
46
60
  // @link https://github.com/welldone-software/why-did-you-render
47
61
  // noinspection JSUnusedGlobalSymbols
@@ -71,8 +85,6 @@ const CarbonReact= class <P = {}, S = {}> extends Component<{
71
85
  return CarbonReact.instance.state;
72
86
  }
73
87
 
74
- websocketTimeout = 5000;
75
-
76
88
  shouldComponentUpdate(
77
89
  nextProps: Readonly<any>,
78
90
  nextState: Readonly<iCarbonReactState>,
@@ -117,6 +129,7 @@ const CarbonReact= class <P = {}, S = {}> extends Component<{
117
129
 
118
130
  return <BrowserRouter>
119
131
  <GlobalHistory/>
132
+ <CarbonWebSocket />
120
133
  {this.props.children}
121
134
  <ToastContainer/>
122
135
  </BrowserRouter>;
@@ -0,0 +1,33 @@
1
+ import { useEffect, useRef, useState } from 'react';
2
+
3
+ // @link https://dev.to/ag-grid/react-18-avoiding-use-effect-getting-called-twice-4i9e
4
+ export const useEffectOnce = (effect: () => void | (() => void)) => {
5
+ const effectFn = useRef<() => void | (() => void)>(effect);
6
+ const destroyFn = useRef<void | (() => void)>();
7
+ const effectCalled = useRef(false);
8
+ const rendered = useRef(false);
9
+ const [, setVal] = useState<number>(0);
10
+
11
+ if (effectCalled.current) {
12
+ rendered.current = true;
13
+ }
14
+
15
+ useEffect(() => {
16
+ if (!effectCalled.current) {
17
+ destroyFn.current = effectFn.current();
18
+ effectCalled.current = true;
19
+ }
20
+
21
+ setVal(val => val + 1);
22
+
23
+ return () => {
24
+ if (!rendered.current) {
25
+ return;
26
+ }
27
+
28
+ if (destroyFn.current) {
29
+ destroyFn.current();
30
+ }
31
+ };
32
+ }, []);
33
+ }
@@ -18,16 +18,6 @@ export interface iAlertButtonOptions {
18
18
  color: "default" | "primary" | "secondary" | "inherit" | "danger" | "info" | "success" | "warning" | undefined,
19
19
  }
20
20
 
21
- export function addAlert(props: iAlert) {
22
-
23
- CarbonReact.instance.setState(previousState => ({
24
- alertsWaiting: previousState.alertsWaiting.length === 0
25
- ? [props]
26
- : [...previousState.alertsWaiting, props]
27
- }))
28
-
29
- }
30
-
31
21
  export interface iAlert {
32
22
  title: string,
33
23
  text: string,
@@ -38,11 +28,20 @@ export interface iAlert {
38
28
  then?: (value: string | undefined) => void,
39
29
  timeout?: number,
40
30
  footerText?: string,
41
-
42
31
  intercept?: boolean,
43
32
  backendThrowable?: { [key: string]: any },
44
33
  }
45
34
 
35
+ export function addAlert(props: iAlert) {
36
+
37
+ CarbonReact.instance.setState(previousState => ({
38
+ alertsWaiting: previousState.alertsWaiting.length === 0
39
+ ? [props]
40
+ : [...previousState.alertsWaiting, props]
41
+ }))
42
+
43
+ }
44
+
46
45
  export default function Alert() {
47
46
 
48
47
  const {alertsWaiting, backendThrowable} = CarbonReact.instance.state
@@ -73,7 +72,7 @@ export default function Alert() {
73
72
  title: "Oh no! An issue occurred!",
74
73
  text: backendThrowable?.['DropInGaming\\PHP\\Errors\\DropException'] ?? 'An unknown issue occurred. Please try again.',
75
74
  timeout: 0,
76
- footerText: hideExpandInformation ? '' : 'These alert footer options are only shown to admins and in development environments. Click "Expand" to see more details.',
75
+ footerText: hideExpandInformation ? '' : 'These alert footer options are only shown in development environments. Click "Expand" to see more details.',
77
76
  buttons: buttons,
78
77
  // backendThrowable has its own custom component that can be expanded (called in the Bootstrap component)
79
78
  // our then function will be called when the user clicks on the button providing the option to expand or close
@@ -0,0 +1,181 @@
1
+ import CarbonReact, {isJsonString} from "CarbonReact";
2
+ import {addAlert} from "../Alert/Alert";
3
+ import {useEffectOnce} from "../../api/hoc/useEffectOnce";
4
+ import {tC6Tables} from "@carbonorm/carbonnode";
5
+
6
+
7
+ /**
8
+ * @function connect
9
+ * This function establishes a connection with the websocket and also ensures constant reconnection if connection closes
10
+ **/
11
+ export function initiateWebsocket({TABLES = undefined}: {TABLES?: tC6Tables} = {}) {
12
+
13
+ const {websocket} = CarbonReact.instance.state;
14
+
15
+ if (!("WebSocket" in window)) {
16
+
17
+ // todo - store that this has been shown in the state
18
+ addAlert({
19
+ title: 'Browser does not support websockets, live updates will fail. You may need to refresh the page to see the newest content.',
20
+ text: 'Please use a modern browser.',
21
+ icon: 'warning',
22
+ })
23
+
24
+ }
25
+
26
+ if (false === (undefined === websocket || null === websocket)) {
27
+
28
+ return;
29
+
30
+ }
31
+
32
+
33
+ let connectInterval;
34
+
35
+ const connection = new WebSocket(CarbonReact.websocketUrl);
36
+
37
+ console.log("Connecting websocket url", CarbonReact.websocketUrl);
38
+
39
+ CarbonReact.instance.setState({
40
+ websocket: connection
41
+ }, () => {
42
+
43
+ connection.onopen = () => {
44
+
45
+ console.log('WebSocket Client Connected To :: ' + CarbonReact.websocketUrl);
46
+
47
+ clearTimeout(connectInterval); // clear Interval on open of websocket connection
48
+
49
+ function heartbeat() {
50
+
51
+ const {websocket} = CarbonReact.instance.state;
52
+
53
+ if (!websocket) return;
54
+
55
+ if (websocket.readyState !== 1) return;
56
+
57
+ websocket.send("ping");
58
+
59
+ setTimeout(heartbeat, CarbonReact.websocketHeartbeatSeconds * 1000);
60
+
61
+ }
62
+
63
+ heartbeat();
64
+
65
+ };
66
+
67
+ connection.onmessage = (message: MessageEvent<string> ) => {
68
+
69
+ const parsedData = isJsonString(message?.data) ? JSON.parse(message?.data) : message?.data;
70
+
71
+ CarbonReact.instance.setState((prevState: Readonly<any>) => ({
72
+ websocketEvents: prevState.websocketEvents.concat(message),
73
+ websocketData: prevState.websocketData.concat(parsedData), // JSON.parse no good - base64?
74
+ }));
75
+
76
+ console.log('going to impl TABLES', TABLES)
77
+
78
+ /*if (undefined !== TABLES) {
79
+
80
+ TABLES.
81
+
82
+
83
+ }*/
84
+
85
+ };
86
+
87
+ window.addEventListener("focus", () => initiateWebsocket());
88
+
89
+ // websocket onclose event listener
90
+ connection.addEventListener('close', event => {
91
+
92
+ let reason;
93
+
94
+ console.log(
95
+ `Socket is closed.`,
96
+ event.reason, event);
97
+
98
+ const retry = () => {
99
+
100
+ const retrySeconds = Math.min(5000, (CarbonReact.websocketTimeoutSeconds + CarbonReact.websocketTimeoutSeconds) * 1000)
101
+
102
+ CarbonReact.websocketTimeoutSeconds = retrySeconds;
103
+
104
+ console.log(`WebSocket reconnect will be attempted in ${retrySeconds} second(s).`)
105
+
106
+ connectInterval = setTimeout(() => initiateWebsocket(), retrySeconds);
107
+
108
+ }
109
+
110
+ // See https://www.rfc-editor.org/rfc/rfc6455#section-7.4.1
111
+ switch (event.code) {
112
+ case 1000:
113
+ reason = "Normal closure, meaning that the purpose for which the connection was established has been fulfilled.";
114
+ break;
115
+ case 1001:
116
+ retry(); //call check function after timeout
117
+ reason = "An endpoint is \"going away\", such as a server going down or a browser having navigated away from a page.";
118
+ break;
119
+ case 1002:
120
+ reason = "An endpoint is terminating the connection due to a protocol error";
121
+ break;
122
+ case 1003:
123
+ reason = "An endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message).";
124
+ break;
125
+ case 1004:
126
+ reason = "Reserved. The specific meaning might be defined in the future.";
127
+ break;
128
+ case 1005:
129
+ reason = "No status code was actually present.";
130
+ break;
131
+ case 1006:
132
+ retry();
133
+ reason = "The connection was closed abnormally, e.g., without sending or receiving a close control frame";
134
+ break;
135
+ case 1007:
136
+ reason = "An endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [https://www.rfc-editor.org/rfc/rfc3629] data within a text message).";
137
+ break;
138
+ case 1008:
139
+ reason = "An endpoint is terminating the connection because it has received a message that \"violates its policy\". This reason is given either if there is no other suitable reason, or if there is a need to hide specific details about the policy.";
140
+ break;
141
+ case 1009:
142
+ reason = "An endpoint is terminating the connection because it has received a message that is too big for it to process.";
143
+ break;
144
+ case 1010:
145
+ reason = "An endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake. <br /> Specifically, the extensions that are needed are: " + event.reason;
146
+ break;
147
+ case 1011:
148
+ reason = "A server is terminating the connection because it encountered an un expected condition that prevented it from fulfilling the request.";
149
+ break;
150
+ case 1015:
151
+ reason = "The connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).";
152
+ break;
153
+ default:
154
+ reason = "Unknown reason";
155
+ }
156
+
157
+ console.log("The connection was closed for reason: " + reason);
158
+
159
+ });
160
+
161
+ // websocket onerror event listener
162
+ connection.addEventListener('websocket error', (e: Event) => {
163
+ console.error("Socket encountered error: ", e, JSON.stringify(e));
164
+ connection.close();
165
+ });
166
+
167
+ });
168
+
169
+ }
170
+
171
+ export default function () {
172
+
173
+ useEffectOnce(() => {
174
+
175
+ initiateWebsocket()
176
+
177
+ })
178
+
179
+ return null
180
+
181
+ }
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  export { default as CarbonReact } from "./CarbonReact";
6
6
  export * from "./CarbonReact";
7
+ export * from "./api/hoc/useEffectOnce";
7
8
  export { default as Alert } from "./components/Alert/Alert";
8
9
  export * from "./components/Alert/Alert";
9
10
  export { default as AccessDenied } from "./components/Errors/AccessDenied";
@@ -20,6 +21,8 @@ export { default as Nest } from "./components/Nest/Nest";
20
21
  export * from "./components/Nest/Nest";
21
22
  export { default as Popup } from "./components/Popup/Popup";
22
23
  export * from "./components/Popup/Popup";
24
+ export { default as CarbonWebSocket } from "./components/WebSocket/CarbonWebSocket";
25
+ export * from "./components/WebSocket/CarbonWebSocket";
23
26
  export * from "./hoc/GlobalHistory";
24
27
  export * from "./hoc/KeysMatching";
25
28
  export { default as addValidSQL } from "./hoc/addValidSQL";
@@ -12,7 +12,7 @@
12
12
  **/
13
13
  /* override the !default vars with the values we set above */
14
14
  /*!
15
- * Bootstrap v5.3.1 (https://getbootstrap.com/)
15
+ * Bootstrap v5.3.2 (https://getbootstrap.com/)
16
16
  * Copyright 2011-2023 The Bootstrap Authors
17
17
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
18
18
  */
@@ -111,6 +111,7 @@
111
111
  --bs-link-hover-color: #0a58ca;
112
112
  --bs-link-hover-color-rgb: 10, 88, 202;
113
113
  --bs-code-color: #d63384;
114
+ --bs-highlight-color: #212529;
114
115
  --bs-highlight-bg: #fff3cd;
115
116
  --bs-border-width: 1px;
116
117
  --bs-border-style: solid;
@@ -182,6 +183,8 @@
182
183
  --bs-link-color-rgb: 110, 168, 254;
183
184
  --bs-link-hover-color-rgb: 139, 185, 254;
184
185
  --bs-code-color: #e685b5;
186
+ --bs-highlight-color: #dee2e6;
187
+ --bs-highlight-bg: #664d03;
185
188
  --bs-border-color: #495057;
186
189
  --bs-border-color-translucent: rgba(255, 255, 255, 0.15);
187
190
  --bs-form-valid-color: #75b798;
@@ -335,6 +338,7 @@ small, .small {
335
338
 
336
339
  mark, .mark {
337
340
  padding: 0.1875em;
341
+ color: var(--bs-highlight-color);
338
342
  background-color: var(--bs-highlight-bg);
339
343
  }
340
344
 
@@ -836,7 +840,7 @@ progress {
836
840
 
837
841
  .row-cols-3 > * {
838
842
  flex: 0 0 auto;
839
- width: 33.3333333333%;
843
+ width: 33.33333333%;
840
844
  }
841
845
 
842
846
  .row-cols-4 > * {
@@ -851,7 +855,7 @@ progress {
851
855
 
852
856
  .row-cols-6 > * {
853
857
  flex: 0 0 auto;
854
- width: 16.6666666667%;
858
+ width: 16.66666667%;
855
859
  }
856
860
 
857
861
  .col-auto {
@@ -1041,7 +1045,7 @@ progress {
1041
1045
  }
1042
1046
  .row-cols-xs-3 > * {
1043
1047
  flex: 0 0 auto;
1044
- width: 33.3333333333%;
1048
+ width: 33.33333333%;
1045
1049
  }
1046
1050
  .row-cols-xs-4 > * {
1047
1051
  flex: 0 0 auto;
@@ -1053,7 +1057,7 @@ progress {
1053
1057
  }
1054
1058
  .row-cols-xs-6 > * {
1055
1059
  flex: 0 0 auto;
1056
- width: 16.6666666667%;
1060
+ width: 16.66666667%;
1057
1061
  }
1058
1062
  .col-xs-auto {
1059
1063
  flex: 0 0 auto;
@@ -1210,7 +1214,7 @@ progress {
1210
1214
  }
1211
1215
  .row-cols-sm-3 > * {
1212
1216
  flex: 0 0 auto;
1213
- width: 33.3333333333%;
1217
+ width: 33.33333333%;
1214
1218
  }
1215
1219
  .row-cols-sm-4 > * {
1216
1220
  flex: 0 0 auto;
@@ -1222,7 +1226,7 @@ progress {
1222
1226
  }
1223
1227
  .row-cols-sm-6 > * {
1224
1228
  flex: 0 0 auto;
1225
- width: 16.6666666667%;
1229
+ width: 16.66666667%;
1226
1230
  }
1227
1231
  .col-sm-auto {
1228
1232
  flex: 0 0 auto;
@@ -1379,7 +1383,7 @@ progress {
1379
1383
  }
1380
1384
  .row-cols-md-3 > * {
1381
1385
  flex: 0 0 auto;
1382
- width: 33.3333333333%;
1386
+ width: 33.33333333%;
1383
1387
  }
1384
1388
  .row-cols-md-4 > * {
1385
1389
  flex: 0 0 auto;
@@ -1391,7 +1395,7 @@ progress {
1391
1395
  }
1392
1396
  .row-cols-md-6 > * {
1393
1397
  flex: 0 0 auto;
1394
- width: 16.6666666667%;
1398
+ width: 16.66666667%;
1395
1399
  }
1396
1400
  .col-md-auto {
1397
1401
  flex: 0 0 auto;
@@ -1548,7 +1552,7 @@ progress {
1548
1552
  }
1549
1553
  .row-cols-lg-3 > * {
1550
1554
  flex: 0 0 auto;
1551
- width: 33.3333333333%;
1555
+ width: 33.33333333%;
1552
1556
  }
1553
1557
  .row-cols-lg-4 > * {
1554
1558
  flex: 0 0 auto;
@@ -1560,7 +1564,7 @@ progress {
1560
1564
  }
1561
1565
  .row-cols-lg-6 > * {
1562
1566
  flex: 0 0 auto;
1563
- width: 16.6666666667%;
1567
+ width: 16.66666667%;
1564
1568
  }
1565
1569
  .col-lg-auto {
1566
1570
  flex: 0 0 auto;
@@ -1717,7 +1721,7 @@ progress {
1717
1721
  }
1718
1722
  .row-cols-xl-3 > * {
1719
1723
  flex: 0 0 auto;
1720
- width: 33.3333333333%;
1724
+ width: 33.33333333%;
1721
1725
  }
1722
1726
  .row-cols-xl-4 > * {
1723
1727
  flex: 0 0 auto;
@@ -1729,7 +1733,7 @@ progress {
1729
1733
  }
1730
1734
  .row-cols-xl-6 > * {
1731
1735
  flex: 0 0 auto;
1732
- width: 16.6666666667%;
1736
+ width: 16.66666667%;
1733
1737
  }
1734
1738
  .col-xl-auto {
1735
1739
  flex: 0 0 auto;
@@ -1886,7 +1890,7 @@ progress {
1886
1890
  }
1887
1891
  .row-cols-xxl-3 > * {
1888
1892
  flex: 0 0 auto;
1889
- width: 33.3333333333%;
1893
+ width: 33.33333333%;
1890
1894
  }
1891
1895
  .row-cols-xxl-4 > * {
1892
1896
  flex: 0 0 auto;
@@ -1898,7 +1902,7 @@ progress {
1898
1902
  }
1899
1903
  .row-cols-xxl-6 > * {
1900
1904
  flex: 0 0 auto;
1901
- width: 16.6666666667%;
1905
+ width: 16.66666667%;
1902
1906
  }
1903
1907
  .col-xxl-auto {
1904
1908
  flex: 0 0 auto;
@@ -2042,16 +2046,16 @@ progress {
2042
2046
  --bs-table-bg-type: initial;
2043
2047
  --bs-table-color-state: initial;
2044
2048
  --bs-table-bg-state: initial;
2045
- --bs-table-color: var(--bs-body-color);
2049
+ --bs-table-color: var(--bs-emphasis-color);
2046
2050
  --bs-table-bg: var(--bs-body-bg);
2047
2051
  --bs-table-border-color: var(--bs-border-color);
2048
2052
  --bs-table-accent-bg: transparent;
2049
- --bs-table-striped-color: var(--bs-body-color);
2050
- --bs-table-striped-bg: rgba(0, 0, 0, 0.05);
2051
- --bs-table-active-color: var(--bs-body-color);
2052
- --bs-table-active-bg: rgba(0, 0, 0, 0.1);
2053
- --bs-table-hover-color: var(--bs-body-color);
2054
- --bs-table-hover-bg: rgba(0, 0, 0, 0.075);
2053
+ --bs-table-striped-color: var(--bs-emphasis-color);
2054
+ --bs-table-striped-bg: rgba(var(--bs-emphasis-color-rgb), 0.05);
2055
+ --bs-table-active-color: var(--bs-emphasis-color);
2056
+ --bs-table-active-bg: rgba(var(--bs-emphasis-color-rgb), 0.1);
2057
+ --bs-table-hover-color: var(--bs-emphasis-color);
2058
+ --bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), 0.075);
2055
2059
  width: 100%;
2056
2060
  margin-bottom: 1rem;
2057
2061
  vertical-align: top;
@@ -2120,7 +2124,7 @@ progress {
2120
2124
  .table-primary {
2121
2125
  --bs-table-color: #000;
2122
2126
  --bs-table-bg: #cfe2ff;
2123
- --bs-table-border-color: #bacbe6;
2127
+ --bs-table-border-color: #a6b5cc;
2124
2128
  --bs-table-striped-bg: #c5d7f2;
2125
2129
  --bs-table-striped-color: #000;
2126
2130
  --bs-table-active-bg: #bacbe6;
@@ -2134,7 +2138,7 @@ progress {
2134
2138
  .table-secondary {
2135
2139
  --bs-table-color: #000;
2136
2140
  --bs-table-bg: #e2e3e5;
2137
- --bs-table-border-color: #cbccce;
2141
+ --bs-table-border-color: #b5b6b7;
2138
2142
  --bs-table-striped-bg: #d7d8da;
2139
2143
  --bs-table-striped-color: #000;
2140
2144
  --bs-table-active-bg: #cbccce;
@@ -2148,7 +2152,7 @@ progress {
2148
2152
  .table-success {
2149
2153
  --bs-table-color: #000;
2150
2154
  --bs-table-bg: #d1e7dd;
2151
- --bs-table-border-color: #bcd0c7;
2155
+ --bs-table-border-color: #a7b9b1;
2152
2156
  --bs-table-striped-bg: #c7dbd2;
2153
2157
  --bs-table-striped-color: #000;
2154
2158
  --bs-table-active-bg: #bcd0c7;
@@ -2162,7 +2166,7 @@ progress {
2162
2166
  .table-info {
2163
2167
  --bs-table-color: #000;
2164
2168
  --bs-table-bg: #cff4fc;
2165
- --bs-table-border-color: #badce3;
2169
+ --bs-table-border-color: #a6c3ca;
2166
2170
  --bs-table-striped-bg: #c5e8ef;
2167
2171
  --bs-table-striped-color: #000;
2168
2172
  --bs-table-active-bg: #badce3;
@@ -2176,7 +2180,7 @@ progress {
2176
2180
  .table-warning {
2177
2181
  --bs-table-color: #000;
2178
2182
  --bs-table-bg: #fff3cd;
2179
- --bs-table-border-color: #e6dbb9;
2183
+ --bs-table-border-color: #ccc2a4;
2180
2184
  --bs-table-striped-bg: #f2e7c3;
2181
2185
  --bs-table-striped-color: #000;
2182
2186
  --bs-table-active-bg: #e6dbb9;
@@ -2190,7 +2194,7 @@ progress {
2190
2194
  .table-danger {
2191
2195
  --bs-table-color: #000;
2192
2196
  --bs-table-bg: #f8d7da;
2193
- --bs-table-border-color: #dfc2c4;
2197
+ --bs-table-border-color: #c6acae;
2194
2198
  --bs-table-striped-bg: #eccccf;
2195
2199
  --bs-table-striped-color: #000;
2196
2200
  --bs-table-active-bg: #dfc2c4;
@@ -2204,7 +2208,7 @@ progress {
2204
2208
  .table-light {
2205
2209
  --bs-table-color: #000;
2206
2210
  --bs-table-bg: #f8f9fa;
2207
- --bs-table-border-color: #dfe0e1;
2211
+ --bs-table-border-color: #c6c7c8;
2208
2212
  --bs-table-striped-bg: #ecedee;
2209
2213
  --bs-table-striped-color: #000;
2210
2214
  --bs-table-active-bg: #dfe0e1;
@@ -2218,7 +2222,7 @@ progress {
2218
2222
  .table-dark {
2219
2223
  --bs-table-color: #fff;
2220
2224
  --bs-table-bg: #212529;
2221
- --bs-table-border-color: #373b3e;
2225
+ --bs-table-border-color: #4d5154;
2222
2226
  --bs-table-striped-bg: #2c3034;
2223
2227
  --bs-table-striped-color: #fff;
2224
2228
  --bs-table-active-bg: #373b3e;
@@ -2534,6 +2538,7 @@ textarea.form-control-lg {
2534
2538
 
2535
2539
  .form-check-input {
2536
2540
  --bs-form-check-bg: var(--bs-body-bg);
2541
+ flex-shrink: 0;
2537
2542
  width: 1em;
2538
2543
  height: 1em;
2539
2544
  margin-top: 0.25em;
@@ -2681,7 +2686,7 @@ textarea.form-control-lg {
2681
2686
  height: 0.5rem;
2682
2687
  color: transparent;
2683
2688
  cursor: pointer;
2684
- background-color: var(--bs-tertiary-bg);
2689
+ background-color: var(--bs-secondary-bg);
2685
2690
  border-color: transparent;
2686
2691
  border-radius: 1rem;
2687
2692
  }
@@ -2707,7 +2712,7 @@ textarea.form-control-lg {
2707
2712
  height: 0.5rem;
2708
2713
  color: transparent;
2709
2714
  cursor: pointer;
2710
- background-color: var(--bs-tertiary-bg);
2715
+ background-color: var(--bs-secondary-bg);
2711
2716
  border-color: transparent;
2712
2717
  border-radius: 1rem;
2713
2718
  }
@@ -3543,7 +3548,7 @@ textarea.form-control-lg {
3543
3548
  --bs-dropdown-inner-border-radius: calc(var(--bs-border-radius) - var(--bs-border-width));
3544
3549
  --bs-dropdown-divider-bg: var(--bs-border-color-translucent);
3545
3550
  --bs-dropdown-divider-margin-y: 0.5rem;
3546
- --bs-dropdown-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
3551
+ --bs-dropdown-box-shadow: var(--bs-box-shadow);
3547
3552
  --bs-dropdown-link-color: var(--bs-body-color);
3548
3553
  --bs-dropdown-link-hover-color: var(--bs-body-color);
3549
3554
  --bs-dropdown-link-hover-bg: var(--bs-tertiary-bg);
@@ -5670,7 +5675,7 @@ textarea.form-control-lg {
5670
5675
  --bs-modal-border-color: var(--bs-border-color-translucent);
5671
5676
  --bs-modal-border-width: var(--bs-border-width);
5672
5677
  --bs-modal-border-radius: var(--bs-border-radius-lg);
5673
- --bs-modal-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
5678
+ --bs-modal-box-shadow: var(--bs-box-shadow-sm);
5674
5679
  --bs-modal-inner-border-radius: calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));
5675
5680
  --bs-modal-header-padding-x: 1rem;
5676
5681
  --bs-modal-header-padding-y: 1rem;
@@ -5811,7 +5816,7 @@ textarea.form-control-lg {
5811
5816
  @media (min-width: 576px) {
5812
5817
  .modal {
5813
5818
  --bs-modal-margin: 1.75rem;
5814
- --bs-modal-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
5819
+ --bs-modal-box-shadow: var(--bs-box-shadow);
5815
5820
  }
5816
5821
  .modal-dialog {
5817
5822
  max-width: var(--bs-modal-width);
@@ -6083,7 +6088,7 @@ textarea.form-control-lg {
6083
6088
  --bs-popover-border-color: var(--bs-border-color-translucent);
6084
6089
  --bs-popover-border-radius: var(--bs-border-radius-lg);
6085
6090
  --bs-popover-inner-border-radius: calc(var(--bs-border-radius-lg) - var(--bs-border-width));
6086
- --bs-popover-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
6091
+ --bs-popover-box-shadow: var(--bs-box-shadow);
6087
6092
  --bs-popover-header-padding-x: 1rem;
6088
6093
  --bs-popover-header-padding-y: 0.5rem;
6089
6094
  --bs-popover-header-font-size: 1rem;
@@ -6517,7 +6522,7 @@ textarea.form-control-lg {
6517
6522
  --bs-offcanvas-bg: var(--bs-body-bg);
6518
6523
  --bs-offcanvas-border-width: var(--bs-border-width);
6519
6524
  --bs-offcanvas-border-color: var(--bs-border-color-translucent);
6520
- --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
6525
+ --bs-offcanvas-box-shadow: var(--bs-box-shadow-sm);
6521
6526
  --bs-offcanvas-transition: transform 0.3s ease-in-out;
6522
6527
  --bs-offcanvas-title-line-height: 1.5;
6523
6528
  }
@@ -7646,15 +7651,15 @@ textarea.form-control-lg {
7646
7651
  }
7647
7652
 
7648
7653
  .shadow {
7649
- box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
7654
+ box-shadow: var(--bs-box-shadow) !important;
7650
7655
  }
7651
7656
 
7652
7657
  .shadow-sm {
7653
- box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
7658
+ box-shadow: var(--bs-box-shadow-sm) !important;
7654
7659
  }
7655
7660
 
7656
7661
  .shadow-lg {
7657
- box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
7662
+ box-shadow: var(--bs-box-shadow-lg) !important;
7658
7663
  }
7659
7664
 
7660
7665
  .shadow-none {