umwd-components 0.1.201 → 0.1.204

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.
@@ -7,7 +7,14 @@ import "@fontsource/material-icons";
7
7
 
8
8
  import { CssBaseline, ThemeProvider } from "@mui/material";
9
9
  import { withThemeFromJSXProvider } from "@storybook/addon-themes";
10
- import { lightTheme, darkTheme } from "../src/styles/themes.js";
10
+ import {
11
+ AMHdarkTheme,
12
+ AMHlightTheme,
13
+ APdarkTheme,
14
+ APlightTheme,
15
+ OREFSdarkTheme,
16
+ OREFSlightTheme,
17
+ } from "../src/styles/themes.js";
11
18
 
12
19
  import "../src/styles/globals.css";
13
20
 
@@ -27,10 +34,14 @@ const preview = {
27
34
  export const decorators = [
28
35
  withThemeFromJSXProvider({
29
36
  themes: {
30
- light: lightTheme,
31
- dark: darkTheme,
37
+ amhlight: AMHlightTheme,
38
+ amhdark: AMHdarkTheme,
39
+ aplight: APlightTheme,
40
+ apdark: APdarkTheme,
41
+ orefslight: OREFSlightTheme,
42
+ orefsdark: OREFSdarkTheme,
32
43
  },
33
- defaultTheme: "light",
44
+ defaultTheme: "apdark",
34
45
  Provider: ThemeProvider,
35
46
  GlobalStyles: CssBaseline,
36
47
  }),
@@ -22,7 +22,6 @@ function FluidBackground() {
22
22
  const [minSize, setMinSize] = React.useState(0);
23
23
  const [maxSize, setMaxSize] = React.useState(0);
24
24
  const theme = material.useTheme();
25
- const darkMode = Boolean(theme.palette.mode === "dark");
26
25
  let transitionInterval = null;
27
26
  const handleMove = (x, y) => {
28
27
  setObjectX(x);
@@ -138,7 +137,7 @@ function FluidBackground() {
138
137
  display: "Block",
139
138
  width: "100%",
140
139
  height: "100%",
141
- background: darkMode ? "#2d2d2d" : "#fafafa",
140
+ background: theme.palette.mode === "dark" ? "#2d2d2d" : "#fafafa",
142
141
  zIndex: -1
143
142
  }
144
143
  }), /*#__PURE__*/React.createElement("svg", {
@@ -250,7 +249,7 @@ function FluidBackground() {
250
249
  }, "SKILLS AND EXPERTISE TO BRING YOUR VISION TO LIFE.")))), /*#__PURE__*/React.createElement("rect", {
251
250
  width: "100%",
252
251
  height: "100%",
253
- fill: darkMode ? "#222" : "#fff",
252
+ fill: theme.palette.mode === "dark" ? "#222" : "#fff",
254
253
  mask: "url(#mask)"
255
254
  })));
256
255
  }
@@ -0,0 +1,181 @@
1
+ "use client";
2
+ /*
3
+ * UMWD-Components
4
+ * @copyright Jelle Paulus
5
+ * @license MIT
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var React = require('react');
13
+ var material = require('@mui/material');
14
+
15
+ function FluidBackground() {
16
+ const [objectX, setObjectX] = React.useState(0);
17
+ const [objectY, setObjectY] = React.useState(0);
18
+ const [ObjectSize, setObjectSize] = React.useState(300);
19
+ const theme = material.useTheme();
20
+ const handleMove = (x, y) => {
21
+ setObjectX(x);
22
+ setObjectY(y);
23
+ };
24
+
25
+ // setting up all the initial values
26
+ React.useEffect(() => {
27
+ setObjectX(window.innerWidth / 2);
28
+ setObjectY(window.innerHeight / 2);
29
+ setObjectSize(Math.sqrt(window.innerWidth ** 2 + window.innerHeight ** 2) / 1.3);
30
+ }, []);
31
+ React.useEffect(() => {
32
+ const handleMoveEvent = e => {
33
+ const x = e instanceof TouchEvent ? e.touches[0].clientX : e.clientX;
34
+ const y = e instanceof TouchEvent ? e.touches[0].clientY : e.clientY;
35
+ handleMove(x, y);
36
+ };
37
+ window.addEventListener("touchmove", handleMoveEvent);
38
+ window.addEventListener("mousemove", handleMoveEvent);
39
+ return () => {
40
+ window.removeEventListener("touchmove", handleMoveEvent);
41
+ window.removeEventListener("mousemove", handleMoveEvent);
42
+ };
43
+ }, []);
44
+ return /*#__PURE__*/React.createElement("div", {
45
+ style: {
46
+ position: "fixed",
47
+ top: 0,
48
+ left: 0,
49
+ width: "100vw",
50
+ height: "100vh",
51
+ zIndex: -1,
52
+ pointerEvents: "none",
53
+ isolation: "isolate"
54
+ }
55
+ }, /*#__PURE__*/React.createElement("div", {
56
+ id: "background",
57
+ style: {
58
+ position: "absolute",
59
+ top: 0,
60
+ left: 0,
61
+ display: "Block",
62
+ width: "100%",
63
+ height: "100%",
64
+ background: theme.palette.background.paper,
65
+ zIndex: -1
66
+ }
67
+ }), /*#__PURE__*/React.createElement("svg", {
68
+ id: "object",
69
+ width: "".concat(ObjectSize, "px"),
70
+ height: "".concat(ObjectSize, "px"),
71
+ style: {
72
+ position: "absolute",
73
+ top: "".concat(objectY, "px"),
74
+ left: "".concat(objectX, "px"),
75
+ transform: "translate(-50%, -50%)"
76
+ }
77
+ }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("mask", {
78
+ id: "radial-gradient-mask"
79
+ }, /*#__PURE__*/React.createElement("radialGradient", {
80
+ id: "gradient",
81
+ cx: "50%",
82
+ cy: "50%",
83
+ r: "50%",
84
+ fx: "50%",
85
+ fy: "50%"
86
+ }, /*#__PURE__*/React.createElement("stop", {
87
+ offset: "0%",
88
+ stopColor: "white"
89
+ }), /*#__PURE__*/React.createElement("stop", {
90
+ offset: "100%",
91
+ stopColor: "black"
92
+ })), /*#__PURE__*/React.createElement("rect", {
93
+ width: "100%",
94
+ height: "100%",
95
+ fill: "url(#gradient)"
96
+ }))), /*#__PURE__*/React.createElement("rect", {
97
+ width: "100%",
98
+ height: "100%",
99
+ fill: theme.palette.primary.main,
100
+ mask: "url(#radial-gradient-mask)",
101
+ style: {
102
+ filter: "opacity(.5)"
103
+ }
104
+ })), /*#__PURE__*/React.createElement("svg", {
105
+ id: "foreground",
106
+ style: {
107
+ position: "absolute"
108
+ },
109
+ preserveAspectRatio: "xMidYMid slice",
110
+ width: "100%",
111
+ height: "100%",
112
+ viewBox: "0 0 7680 4320 "
113
+ }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("mask", {
114
+ id: "mask"
115
+ }, /*#__PURE__*/React.createElement("rect", {
116
+ width: "100%",
117
+ height: "100%",
118
+ fill: "white"
119
+ }), /*#__PURE__*/React.createElement("text", {
120
+ transform: "translate(-1000 200) rotate(-15)",
121
+ style: {
122
+ fill: "#000",
123
+ fontFamily: "Merriweather-Bold, Merriweather",
124
+ fontSize: "360px",
125
+ fontWeight: 700,
126
+ letterSpacing: ".055em"
127
+ }
128
+ }, /*#__PURE__*/React.createElement("tspan", {
129
+ x: "0",
130
+ y: "0"
131
+ }, "JELLE PAULUS IS A TALENTED WEB DEVELOPER AND", " "), /*#__PURE__*/React.createElement("tspan", {
132
+ x: "0",
133
+ y: "432"
134
+ }, "DESIGNER WITH A PASSION FOR CREATING VISUALLY", " "), /*#__PURE__*/React.createElement("tspan", {
135
+ x: "0",
136
+ y: "864"
137
+ }, "STUNNING AND USER-FRIENDLY WEBSITES. WITH A", " "), /*#__PURE__*/React.createElement("tspan", {
138
+ x: "0",
139
+ y: "1296"
140
+ }, "KEEN EYE FOR DETAIL AND A FOCUS ON CREATING", " "), /*#__PURE__*/React.createElement("tspan", {
141
+ x: "0",
142
+ y: "1728"
143
+ }, "CLEAN, FUNCTIONAL DESIGNS, JELLE HAS A", " "), /*#__PURE__*/React.createElement("tspan", {
144
+ x: "0",
145
+ y: "2160"
146
+ }, "REPUTATION FOR DELIVERING HIGH-QUALITY WORK", " "), /*#__PURE__*/React.createElement("tspan", {
147
+ x: "0",
148
+ y: "2592"
149
+ }, "THAT EXCEEDS HIS CLIENTS' EXPECTATIONS. HE HAS A", " "), /*#__PURE__*/React.createElement("tspan", {
150
+ x: "0",
151
+ y: "3024"
152
+ }, "DEEP UNDERSTANDING OF THE LATEST WEB", " "), /*#__PURE__*/React.createElement("tspan", {
153
+ x: "0",
154
+ y: "3456"
155
+ }, "DEVELOPMENT TECHNOLOGIES, AND IS ABLE TO", " "), /*#__PURE__*/React.createElement("tspan", {
156
+ x: "0",
157
+ y: "3888"
158
+ }, "SEAMLESSLY INTEGRATE FUNCTIONALITY AND", " "), /*#__PURE__*/React.createElement("tspan", {
159
+ x: "0",
160
+ y: "4320"
161
+ }, "AESTHETICS TO CREATE WEBSITES THAT ARE BOTH", " "), /*#__PURE__*/React.createElement("tspan", {
162
+ x: "0",
163
+ y: "4752"
164
+ }, "FUNCTIONAL AND VISUALLY APPEALING. WHETHER", " "), /*#__PURE__*/React.createElement("tspan", {
165
+ x: "0",
166
+ y: "5184"
167
+ }, "YOU'RE LOOKING TO ESTABLISH AN ONLINE PRESENCE", " "), /*#__PURE__*/React.createElement("tspan", {
168
+ x: "0",
169
+ y: "5616"
170
+ }, "OR REVAMP AN EXISTING WEBSITE, JELLE HAS THE", " "), /*#__PURE__*/React.createElement("tspan", {
171
+ x: "0",
172
+ y: "6048"
173
+ }, "SKILLS AND EXPERTISE TO BRING YOUR VISION TO LIFE.")))), /*#__PURE__*/React.createElement("rect", {
174
+ width: "100%",
175
+ height: "100%",
176
+ fill: theme.palette.background.default,
177
+ mask: "url(#mask)"
178
+ })));
179
+ }
180
+
181
+ exports.default = FluidBackground;
package/dist/cjs/index.js CHANGED
@@ -18,7 +18,7 @@ var BulletList = require('./components/BulletList.js');
18
18
  var WhatsAppClickToChatButton = require('./components/WhatsAppClickToChatButton.js');
19
19
  var ScrollLink = require('./components/ScrollLink.js');
20
20
  var ScrollNavbar = require('./components/ScrollNavbar.js');
21
- var FluidBackground = require('./components/FluidBackground.js');
21
+ var FluidBackgroundV2 = require('./components/FluidBackgroundV2.js');
22
22
 
23
23
 
24
24
 
@@ -34,4 +34,4 @@ exports.BulletList = BulletList.default;
34
34
  exports.WhatsAppClickToChatButton = WhatsAppClickToChatButton.default;
35
35
  exports.ScrollLink = ScrollLink.default;
36
36
  exports.ScrollNavbar = ScrollNavbar.default;
37
- exports.FluidBackground = FluidBackground.default;
37
+ exports.FluidBackground = FluidBackgroundV2.default;
@@ -18,7 +18,6 @@ function FluidBackground() {
18
18
  const [minSize, setMinSize] = useState(0);
19
19
  const [maxSize, setMaxSize] = useState(0);
20
20
  const theme = useTheme();
21
- const darkMode = Boolean(theme.palette.mode === "dark");
22
21
  let transitionInterval = null;
23
22
  const handleMove = (x, y) => {
24
23
  setObjectX(x);
@@ -134,7 +133,7 @@ function FluidBackground() {
134
133
  display: "Block",
135
134
  width: "100%",
136
135
  height: "100%",
137
- background: darkMode ? "#2d2d2d" : "#fafafa",
136
+ background: theme.palette.mode === "dark" ? "#2d2d2d" : "#fafafa",
138
137
  zIndex: -1
139
138
  }
140
139
  }), /*#__PURE__*/React__default.createElement("svg", {
@@ -246,7 +245,7 @@ function FluidBackground() {
246
245
  }, "SKILLS AND EXPERTISE TO BRING YOUR VISION TO LIFE.")))), /*#__PURE__*/React__default.createElement("rect", {
247
246
  width: "100%",
248
247
  height: "100%",
249
- fill: darkMode ? "#222" : "#fff",
248
+ fill: theme.palette.mode === "dark" ? "#222" : "#fff",
250
249
  mask: "url(#mask)"
251
250
  })));
252
251
  }
@@ -0,0 +1,177 @@
1
+ "use client";
2
+ /*
3
+ * UMWD-Components
4
+ * @copyright Jelle Paulus
5
+ * @license MIT
6
+ */
7
+
8
+ import React__default, { useState, useEffect } from 'react';
9
+ import { useTheme } from '@mui/material';
10
+
11
+ function FluidBackground() {
12
+ const [objectX, setObjectX] = useState(0);
13
+ const [objectY, setObjectY] = useState(0);
14
+ const [ObjectSize, setObjectSize] = useState(300);
15
+ const theme = useTheme();
16
+ const handleMove = (x, y) => {
17
+ setObjectX(x);
18
+ setObjectY(y);
19
+ };
20
+
21
+ // setting up all the initial values
22
+ useEffect(() => {
23
+ setObjectX(window.innerWidth / 2);
24
+ setObjectY(window.innerHeight / 2);
25
+ setObjectSize(Math.sqrt(window.innerWidth ** 2 + window.innerHeight ** 2) / 1.3);
26
+ }, []);
27
+ useEffect(() => {
28
+ const handleMoveEvent = e => {
29
+ const x = e instanceof TouchEvent ? e.touches[0].clientX : e.clientX;
30
+ const y = e instanceof TouchEvent ? e.touches[0].clientY : e.clientY;
31
+ handleMove(x, y);
32
+ };
33
+ window.addEventListener("touchmove", handleMoveEvent);
34
+ window.addEventListener("mousemove", handleMoveEvent);
35
+ return () => {
36
+ window.removeEventListener("touchmove", handleMoveEvent);
37
+ window.removeEventListener("mousemove", handleMoveEvent);
38
+ };
39
+ }, []);
40
+ return /*#__PURE__*/React__default.createElement("div", {
41
+ style: {
42
+ position: "fixed",
43
+ top: 0,
44
+ left: 0,
45
+ width: "100vw",
46
+ height: "100vh",
47
+ zIndex: -1,
48
+ pointerEvents: "none",
49
+ isolation: "isolate"
50
+ }
51
+ }, /*#__PURE__*/React__default.createElement("div", {
52
+ id: "background",
53
+ style: {
54
+ position: "absolute",
55
+ top: 0,
56
+ left: 0,
57
+ display: "Block",
58
+ width: "100%",
59
+ height: "100%",
60
+ background: theme.palette.background.paper,
61
+ zIndex: -1
62
+ }
63
+ }), /*#__PURE__*/React__default.createElement("svg", {
64
+ id: "object",
65
+ width: "".concat(ObjectSize, "px"),
66
+ height: "".concat(ObjectSize, "px"),
67
+ style: {
68
+ position: "absolute",
69
+ top: "".concat(objectY, "px"),
70
+ left: "".concat(objectX, "px"),
71
+ transform: "translate(-50%, -50%)"
72
+ }
73
+ }, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("mask", {
74
+ id: "radial-gradient-mask"
75
+ }, /*#__PURE__*/React__default.createElement("radialGradient", {
76
+ id: "gradient",
77
+ cx: "50%",
78
+ cy: "50%",
79
+ r: "50%",
80
+ fx: "50%",
81
+ fy: "50%"
82
+ }, /*#__PURE__*/React__default.createElement("stop", {
83
+ offset: "0%",
84
+ stopColor: "white"
85
+ }), /*#__PURE__*/React__default.createElement("stop", {
86
+ offset: "100%",
87
+ stopColor: "black"
88
+ })), /*#__PURE__*/React__default.createElement("rect", {
89
+ width: "100%",
90
+ height: "100%",
91
+ fill: "url(#gradient)"
92
+ }))), /*#__PURE__*/React__default.createElement("rect", {
93
+ width: "100%",
94
+ height: "100%",
95
+ fill: theme.palette.primary.main,
96
+ mask: "url(#radial-gradient-mask)",
97
+ style: {
98
+ filter: "opacity(.5)"
99
+ }
100
+ })), /*#__PURE__*/React__default.createElement("svg", {
101
+ id: "foreground",
102
+ style: {
103
+ position: "absolute"
104
+ },
105
+ preserveAspectRatio: "xMidYMid slice",
106
+ width: "100%",
107
+ height: "100%",
108
+ viewBox: "0 0 7680 4320 "
109
+ }, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("mask", {
110
+ id: "mask"
111
+ }, /*#__PURE__*/React__default.createElement("rect", {
112
+ width: "100%",
113
+ height: "100%",
114
+ fill: "white"
115
+ }), /*#__PURE__*/React__default.createElement("text", {
116
+ transform: "translate(-1000 200) rotate(-15)",
117
+ style: {
118
+ fill: "#000",
119
+ fontFamily: "Merriweather-Bold, Merriweather",
120
+ fontSize: "360px",
121
+ fontWeight: 700,
122
+ letterSpacing: ".055em"
123
+ }
124
+ }, /*#__PURE__*/React__default.createElement("tspan", {
125
+ x: "0",
126
+ y: "0"
127
+ }, "JELLE PAULUS IS A TALENTED WEB DEVELOPER AND", " "), /*#__PURE__*/React__default.createElement("tspan", {
128
+ x: "0",
129
+ y: "432"
130
+ }, "DESIGNER WITH A PASSION FOR CREATING VISUALLY", " "), /*#__PURE__*/React__default.createElement("tspan", {
131
+ x: "0",
132
+ y: "864"
133
+ }, "STUNNING AND USER-FRIENDLY WEBSITES. WITH A", " "), /*#__PURE__*/React__default.createElement("tspan", {
134
+ x: "0",
135
+ y: "1296"
136
+ }, "KEEN EYE FOR DETAIL AND A FOCUS ON CREATING", " "), /*#__PURE__*/React__default.createElement("tspan", {
137
+ x: "0",
138
+ y: "1728"
139
+ }, "CLEAN, FUNCTIONAL DESIGNS, JELLE HAS A", " "), /*#__PURE__*/React__default.createElement("tspan", {
140
+ x: "0",
141
+ y: "2160"
142
+ }, "REPUTATION FOR DELIVERING HIGH-QUALITY WORK", " "), /*#__PURE__*/React__default.createElement("tspan", {
143
+ x: "0",
144
+ y: "2592"
145
+ }, "THAT EXCEEDS HIS CLIENTS' EXPECTATIONS. HE HAS A", " "), /*#__PURE__*/React__default.createElement("tspan", {
146
+ x: "0",
147
+ y: "3024"
148
+ }, "DEEP UNDERSTANDING OF THE LATEST WEB", " "), /*#__PURE__*/React__default.createElement("tspan", {
149
+ x: "0",
150
+ y: "3456"
151
+ }, "DEVELOPMENT TECHNOLOGIES, AND IS ABLE TO", " "), /*#__PURE__*/React__default.createElement("tspan", {
152
+ x: "0",
153
+ y: "3888"
154
+ }, "SEAMLESSLY INTEGRATE FUNCTIONALITY AND", " "), /*#__PURE__*/React__default.createElement("tspan", {
155
+ x: "0",
156
+ y: "4320"
157
+ }, "AESTHETICS TO CREATE WEBSITES THAT ARE BOTH", " "), /*#__PURE__*/React__default.createElement("tspan", {
158
+ x: "0",
159
+ y: "4752"
160
+ }, "FUNCTIONAL AND VISUALLY APPEALING. WHETHER", " "), /*#__PURE__*/React__default.createElement("tspan", {
161
+ x: "0",
162
+ y: "5184"
163
+ }, "YOU'RE LOOKING TO ESTABLISH AN ONLINE PRESENCE", " "), /*#__PURE__*/React__default.createElement("tspan", {
164
+ x: "0",
165
+ y: "5616"
166
+ }, "OR REVAMP AN EXISTING WEBSITE, JELLE HAS THE", " "), /*#__PURE__*/React__default.createElement("tspan", {
167
+ x: "0",
168
+ y: "6048"
169
+ }, "SKILLS AND EXPERTISE TO BRING YOUR VISION TO LIFE.")))), /*#__PURE__*/React__default.createElement("rect", {
170
+ width: "100%",
171
+ height: "100%",
172
+ fill: theme.palette.background.default,
173
+ mask: "url(#mask)"
174
+ })));
175
+ }
176
+
177
+ export { FluidBackground as default };
package/dist/esm/index.js CHANGED
@@ -16,4 +16,4 @@ export { default as BulletList } from './components/BulletList.js';
16
16
  export { default as WhatsAppClickToChatButton } from './components/WhatsAppClickToChatButton.js';
17
17
  export { default as ScrollLink } from './components/ScrollLink.js';
18
18
  export { default as ScrollNavbar } from './components/ScrollNavbar.js';
19
- export { default as FluidBackground } from './components/FluidBackground.js';
19
+ export { default as FluidBackground } from './components/FluidBackgroundV2.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.201",
3
+ "version": "0.1.204",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -13,7 +13,7 @@ function FluidBackground() {
13
13
  const [minSize, setMinSize] = useState(0);
14
14
  const [maxSize, setMaxSize] = useState(0);
15
15
  const theme = useTheme();
16
- const darkMode = Boolean(theme.palette.mode === "dark");
16
+
17
17
  let transitionInterval: NodeJS.Timeout | null = null;
18
18
 
19
19
  const handleMove = (x: number, y: number) => {
@@ -127,6 +127,8 @@ function FluidBackground() {
127
127
  };
128
128
  }, [minSize, maxSize]);
129
129
 
130
+ console.log(theme.palette.mode);
131
+
130
132
  return (
131
133
  <div
132
134
  style={{
@@ -149,7 +151,7 @@ function FluidBackground() {
149
151
  display: "Block",
150
152
  width: "100%",
151
153
  height: "100%",
152
- background: darkMode ? "#2d2d2d" : "#fafafa",
154
+ background: theme.palette.background.paper,
153
155
  zIndex: -1,
154
156
  }}
155
157
  />
@@ -263,7 +265,7 @@ function FluidBackground() {
263
265
  <rect
264
266
  width={"100%"}
265
267
  height={"100%"}
266
- fill={darkMode ? "#222" : "#fff"}
268
+ fill={theme.palette.background.default}
267
269
  mask="url(#mask)"
268
270
  ></rect>
269
271
  </svg>
@@ -0,0 +1,189 @@
1
+ "use client";
2
+
3
+ import React, { useState, useEffect } from "react";
4
+ import { useTheme } from "@mui/material";
5
+
6
+ function FluidBackground() {
7
+ const [objectX, setObjectX] = useState(0);
8
+ const [objectY, setObjectY] = useState(0);
9
+
10
+ const [ObjectSize, setObjectSize] = useState(300);
11
+
12
+ const theme = useTheme();
13
+
14
+ const handleMove = (x: number, y: number) => {
15
+ setObjectX(x);
16
+ setObjectY(y);
17
+ };
18
+
19
+ // setting up all the initial values
20
+ useEffect(() => {
21
+ setObjectX(window.innerWidth / 2);
22
+ setObjectY(window.innerHeight / 2);
23
+
24
+ setObjectSize(
25
+ Math.sqrt(window.innerWidth ** 2 + window.innerHeight ** 2) / 1.3
26
+ );
27
+ }, []);
28
+
29
+ useEffect(() => {
30
+ const handleMoveEvent = (e: TouchEvent | MouseEvent) => {
31
+ const x = e instanceof TouchEvent ? e.touches[0].clientX : e.clientX;
32
+ const y = e instanceof TouchEvent ? e.touches[0].clientY : e.clientY;
33
+ handleMove(x, y);
34
+ };
35
+
36
+ window.addEventListener("touchmove", handleMoveEvent);
37
+ window.addEventListener("mousemove", handleMoveEvent);
38
+
39
+ return () => {
40
+ window.removeEventListener("touchmove", handleMoveEvent);
41
+ window.removeEventListener("mousemove", handleMoveEvent);
42
+ };
43
+ }, []);
44
+
45
+ return (
46
+ <div
47
+ style={{
48
+ position: "fixed",
49
+ top: 0,
50
+ left: 0,
51
+ width: "100vw",
52
+ height: "100vh",
53
+ zIndex: -1,
54
+ pointerEvents: "none",
55
+ isolation: "isolate",
56
+ }}
57
+ >
58
+ <div
59
+ id="background"
60
+ style={{
61
+ position: "absolute",
62
+ top: 0,
63
+ left: 0,
64
+ display: "Block",
65
+ width: "100%",
66
+ height: "100%",
67
+ background: theme.palette.background.paper,
68
+ zIndex: -1,
69
+ }}
70
+ />
71
+ <svg
72
+ id="object"
73
+ width={`${ObjectSize}px`}
74
+ height={`${ObjectSize}px`}
75
+ style={{
76
+ position: "absolute",
77
+ top: `${objectY}px`,
78
+ left: `${objectX}px`,
79
+ transform: "translate(-50%, -50%)",
80
+ }}
81
+ >
82
+ <defs>
83
+ <mask id="radial-gradient-mask">
84
+ <radialGradient
85
+ id="gradient"
86
+ cx="50%"
87
+ cy="50%"
88
+ r="50%"
89
+ fx="50%"
90
+ fy="50%"
91
+ >
92
+ <stop offset="0%" stopColor="white" />
93
+ <stop offset="100%" stopColor="black" />
94
+ </radialGradient>
95
+ <rect width="100%" height="100%" fill="url(#gradient)" />
96
+ </mask>
97
+ </defs>
98
+ <rect
99
+ width="100%"
100
+ height="100%"
101
+ fill={theme.palette.primary.main}
102
+ mask="url(#radial-gradient-mask)"
103
+ style={{ filter: `opacity(.5)` }}
104
+ />
105
+ </svg>
106
+
107
+ <svg
108
+ id="foreground"
109
+ style={{
110
+ position: "absolute",
111
+ }}
112
+ preserveAspectRatio="xMidYMid slice"
113
+ width="100%"
114
+ height="100%"
115
+ viewBox="0 0 7680 4320 "
116
+ >
117
+ <defs>
118
+ <mask id="mask">
119
+ <rect width={"100%"} height={"100%"} fill="white" />
120
+ <text
121
+ transform="translate(-1000 200) rotate(-15)"
122
+ style={{
123
+ fill: "#000",
124
+ fontFamily: "Merriweather-Bold, Merriweather",
125
+ fontSize: "360px",
126
+ fontWeight: 700,
127
+ letterSpacing: ".055em",
128
+ }}
129
+ >
130
+ <tspan x="0" y="0">
131
+ JELLE PAULUS IS A TALENTED WEB DEVELOPER AND{" "}
132
+ </tspan>
133
+ <tspan x="0" y="432">
134
+ DESIGNER WITH A PASSION FOR CREATING VISUALLY{" "}
135
+ </tspan>
136
+ <tspan x="0" y="864">
137
+ STUNNING AND USER-FRIENDLY WEBSITES. WITH A{" "}
138
+ </tspan>
139
+ <tspan x="0" y="1296">
140
+ KEEN EYE FOR DETAIL AND A FOCUS ON CREATING{" "}
141
+ </tspan>
142
+ <tspan x="0" y="1728">
143
+ CLEAN, FUNCTIONAL DESIGNS, JELLE HAS A{" "}
144
+ </tspan>
145
+ <tspan x="0" y="2160">
146
+ REPUTATION FOR DELIVERING HIGH-QUALITY WORK{" "}
147
+ </tspan>
148
+ <tspan x="0" y="2592">
149
+ THAT EXCEEDS HIS CLIENTS&apos; EXPECTATIONS. HE HAS A{" "}
150
+ </tspan>
151
+ <tspan x="0" y="3024">
152
+ DEEP UNDERSTANDING OF THE LATEST WEB{" "}
153
+ </tspan>
154
+ <tspan x="0" y="3456">
155
+ DEVELOPMENT TECHNOLOGIES, AND IS ABLE TO{" "}
156
+ </tspan>
157
+ <tspan x="0" y="3888">
158
+ SEAMLESSLY INTEGRATE FUNCTIONALITY AND{" "}
159
+ </tspan>
160
+ <tspan x="0" y="4320">
161
+ AESTHETICS TO CREATE WEBSITES THAT ARE BOTH{" "}
162
+ </tspan>
163
+ <tspan x="0" y="4752">
164
+ FUNCTIONAL AND VISUALLY APPEALING. WHETHER{" "}
165
+ </tspan>
166
+ <tspan x="0" y="5184">
167
+ YOU&apos;RE LOOKING TO ESTABLISH AN ONLINE PRESENCE{" "}
168
+ </tspan>
169
+ <tspan x="0" y="5616">
170
+ OR REVAMP AN EXISTING WEBSITE, JELLE HAS THE{" "}
171
+ </tspan>
172
+ <tspan x="0" y="6048">
173
+ SKILLS AND EXPERTISE TO BRING YOUR VISION TO LIFE.
174
+ </tspan>
175
+ </text>
176
+ </mask>
177
+ </defs>
178
+ <rect
179
+ width={"100%"}
180
+ height={"100%"}
181
+ fill={theme.palette.background.default}
182
+ mask="url(#mask)"
183
+ ></rect>
184
+ </svg>
185
+ </div>
186
+ );
187
+ }
188
+
189
+ export default FluidBackground;
package/src/index.js CHANGED
@@ -10,4 +10,4 @@ export { default as BulletList } from "./components/BulletList";
10
10
  export { default as WhatsAppClickToChatButton } from "./components/WhatsAppClickToChatButton.tsx";
11
11
  export { default as ScrollLink } from "./components/ScrollLink.tsx";
12
12
  export { default as ScrollNavbar } from "./components/ScrollNavbar.tsx";
13
- export { default as FluidBackground } from "./components/FluidBackground.tsx";
13
+ export { default as FluidBackground } from "./components/FluidBackgroundV2.tsx";
@@ -1,4 +1,4 @@
1
- import FluidBackground from "../components/FluidBackground.tsx";
1
+ import FluidBackground from "../components/FluidBackgroundV2.tsx";
2
2
  import React from "react";
3
3
 
4
4
  export default {
@@ -14,7 +14,7 @@ const montserrat = Montserrat({
14
14
  display: "swap",
15
15
  });
16
16
 
17
- export const darkTheme = createTheme({
17
+ const AMHdarkTheme = createTheme({
18
18
  palette: {
19
19
  mode: "dark",
20
20
  primary: {
@@ -103,7 +103,7 @@ export const darkTheme = createTheme({
103
103
  },
104
104
  }); // Dark theme
105
105
 
106
- export const lightTheme = createTheme({
106
+ const AMHlightTheme = createTheme({
107
107
  palette: {
108
108
  mode: "light",
109
109
  primary: {
@@ -197,3 +197,403 @@ export const lightTheme = createTheme({
197
197
  },
198
198
  },
199
199
  }); // Light theme
200
+
201
+ const APdarkTheme = createTheme({
202
+ palette: {
203
+ type: "dark",
204
+ primary: {
205
+ main: "#429294",
206
+ contrastText: "#000000",
207
+ light: "#67a7a9",
208
+ dark: "#2e6667",
209
+ },
210
+ secondary: {
211
+ main: "#ce3a31",
212
+ light: "#d7615a",
213
+ dark: "#902822",
214
+ contrastText: "#ffffff",
215
+ },
216
+ background: {
217
+ default: "#222",
218
+ paper: "#434343",
219
+ },
220
+ text: {
221
+ secondary: "rgba(255,255,255,0.7)",
222
+ primary: "#ffffff",
223
+ disabled: "rgba(255,255,255,0.5)",
224
+ hint: "rgba(255,255,255,0.5)",
225
+ },
226
+ divider: "rgba(255,255,255,0.9)",
227
+ },
228
+ typography: {
229
+ h1: {
230
+ fontFamily: "EB Garamond",
231
+ fontWeight: 400,
232
+ },
233
+ h2: {
234
+ fontFamily: "EB garamond",
235
+ fontWeight: 400,
236
+ },
237
+ h3: {
238
+ fontFamily: "EB Garamond",
239
+ fontWeight: 400,
240
+ },
241
+ h4: {
242
+ fontFamily: "EB Garamond",
243
+ },
244
+ h5: {
245
+ fontFamily: "EB Garamond",
246
+ },
247
+ h6: {
248
+ fontFamily: "EB Garamond",
249
+ },
250
+ },
251
+ props: {
252
+ MuiButton: {
253
+ size: "small",
254
+ },
255
+ MuiButtonGroup: {
256
+ size: "small",
257
+ },
258
+ MuiCheckbox: {
259
+ size: "small",
260
+ },
261
+ MuiFab: {
262
+ size: "small",
263
+ },
264
+ MuiFormControl: {
265
+ margin: "dense",
266
+ size: "small",
267
+ },
268
+ MuiFormHelperText: {
269
+ margin: "dense",
270
+ },
271
+ MuiIconButton: {
272
+ size: "small",
273
+ },
274
+ MuiInputBase: {
275
+ margin: "dense",
276
+ },
277
+ MuiInputLabel: {
278
+ margin: "dense",
279
+ },
280
+ MuiRadio: {
281
+ size: "small",
282
+ },
283
+ MuiSwitch: {
284
+ size: "small",
285
+ },
286
+ MuiTextField: {
287
+ margin: "dense",
288
+ size: "small",
289
+ },
290
+ MuiList: {
291
+ dense: true,
292
+ },
293
+ MuiMenuItem: {
294
+ dense: true,
295
+ },
296
+ MuiTable: {
297
+ size: "small",
298
+ },
299
+ MuiTooltip: {
300
+ arrow: true,
301
+ },
302
+ },
303
+ }); // Dark theme
304
+
305
+ const APlightTheme = createTheme({
306
+ palette: {
307
+ type: "light",
308
+ primary: {
309
+ main: "#ce3a31",
310
+ light: "#d7615a",
311
+ dark: "#902822",
312
+ contrastText: "#ffffff",
313
+ },
314
+ secondary: {
315
+ main: "#429294",
316
+ contrastText: "#000000",
317
+ light: "#67a7a9",
318
+ dark: "#2e6667",
319
+ },
320
+ background: {
321
+ default: "#fafafa",
322
+ paper: "#ffffff",
323
+ },
324
+ text: {
325
+ primary: "rgba(0,0,0,0.87)",
326
+ secondary: "rgba(0,0,0,0.54)",
327
+ disabled: "rgba(0,0,0,0.38)",
328
+ hint: "rgba(0,0,0,0.38)",
329
+ },
330
+ },
331
+ typography: {
332
+ h1: {
333
+ fontFamily: "EB Garamond",
334
+ fontWeight: 400,
335
+ },
336
+ h2: {
337
+ fontFamily: "EB garamond",
338
+ fontWeight: 400,
339
+ },
340
+ h3: {
341
+ fontFamily: "EB Garamond",
342
+ fontWeight: 400,
343
+ },
344
+ h4: {
345
+ fontFamily: "EB Garamond",
346
+ },
347
+ h5: {
348
+ fontFamily: "EB Garamond",
349
+ },
350
+ h6: {
351
+ fontFamily: "EB Garamond",
352
+ },
353
+ },
354
+ props: {
355
+ MuiButton: {
356
+ size: "small",
357
+ },
358
+ MuiButtonGroup: {
359
+ size: "small",
360
+ },
361
+ MuiCheckbox: {
362
+ size: "small",
363
+ },
364
+ MuiFab: {
365
+ size: "small",
366
+ },
367
+ MuiFormControl: {
368
+ margin: "dense",
369
+ size: "small",
370
+ },
371
+ MuiFormHelperText: {
372
+ margin: "dense",
373
+ },
374
+ MuiIconButton: {
375
+ size: "small",
376
+ },
377
+ MuiInputBase: {
378
+ margin: "dense",
379
+ },
380
+ MuiInputLabel: {
381
+ margin: "dense",
382
+ },
383
+ MuiRadio: {
384
+ size: "small",
385
+ },
386
+ MuiSwitch: {
387
+ size: "small",
388
+ },
389
+ MuiTextField: {
390
+ margin: "dense",
391
+ size: "small",
392
+ },
393
+ MuiList: {
394
+ dense: true,
395
+ },
396
+ MuiMenuItem: {
397
+ dense: true,
398
+ },
399
+ MuiTable: {
400
+ size: "small",
401
+ },
402
+ MuiTooltip: {
403
+ arrow: true,
404
+ },
405
+ },
406
+ });
407
+
408
+ const OREFSdarkTheme = createTheme({
409
+ palette: {
410
+ mode: "dark",
411
+ primary: {
412
+ main: "#335e53",
413
+ light: "#457f70",
414
+ dark: "#213d36",
415
+ },
416
+ secondary: {
417
+ main: "#DD1805",
418
+ light: "#fa4736",
419
+ dark: "#b71404",
420
+ },
421
+ background: {
422
+ paper: "#000606",
423
+ default: "#000D06",
424
+ },
425
+ text: {
426
+ primary: "#fff",
427
+ secondary: "rgba(255, 255, 255, 0.7)",
428
+ disabled: "rgba(255, 255, 255, 0.5)",
429
+ hint: "rgba(255, 255, 255, 0.5)",
430
+ },
431
+ },
432
+ typography: {
433
+ fontFamily: roboto.style.fontFamily,
434
+ fontSize: 14,
435
+ h1: {
436
+ fontFamily: montserrat.style.fontFamily,
437
+ },
438
+ h2: {
439
+ fontFamily: montserrat.style.fontFamily,
440
+ },
441
+ h3: {
442
+ fontFamily: montserrat.style.fontFamily,
443
+ },
444
+ h4: {
445
+ fontFamily: montserrat.style.fontFamily,
446
+ },
447
+ h5: {
448
+ fontFamily: montserrat.style.fontFamily,
449
+ },
450
+ h6: {
451
+ fontFamily: montserrat.style.fontFamily,
452
+ },
453
+ subtitle1: {
454
+ fontFamily: roboto.style.fontFamily,
455
+ fontSize: "1.2rem",
456
+ lineHeight: 1.6,
457
+ },
458
+ subtitle2: {
459
+ fontFamily: roboto.style.fontFamily,
460
+ },
461
+ body1: {
462
+ fontFamily: roboto.style.fontFamily,
463
+ fontSize: "1.1rem",
464
+ lineHeight: 1.4,
465
+ },
466
+ body2: {
467
+ fontFamily: roboto.style.fontFamily,
468
+ fontSize: "1rem",
469
+ },
470
+ button: {
471
+ fontFamily: roboto.style.fontFamily,
472
+ },
473
+ caption: {
474
+ fontFamily: roboto.style.fontFamily,
475
+ },
476
+ overline: {
477
+ fontFamily: roboto.style.fontFamily,
478
+ },
479
+ },
480
+ components: {
481
+ MuiCssBaseline: {
482
+ styleOverrides: {
483
+ "*::-webkit-scrollbar": {
484
+ width: "0.8em",
485
+ },
486
+ "*::-webkit-scrollbar-track": {
487
+ backgroundColor: "#000606",
488
+ },
489
+ "*::-webkit-scrollbar-thumb": {
490
+ backgroundColor: "#DD1805",
491
+ },
492
+ },
493
+ },
494
+ },
495
+ }); // Dark theme
496
+
497
+ const OREFSlightTheme = createTheme({
498
+ palette: {
499
+ mode: "light",
500
+ primary: {
501
+ main: "#335e53",
502
+ light: "#457f70",
503
+ dark: "#213d36",
504
+ },
505
+ secondary: {
506
+ main: "#DD1805",
507
+ light: "#fa4736",
508
+ dark: "#b71404",
509
+ },
510
+ background: {
511
+ paper: "#a5c5ba",
512
+ default: "#d0dcd8",
513
+ },
514
+ text: {
515
+ primary: "rgba(0, 0, 0, 0.87)",
516
+ secondary: "rgba(0, 0, 0, 0.54)",
517
+ disabled: "rgba(0, 0, 0, 0.38)",
518
+ hint: "rgba(0, 0, 0, 0.38)",
519
+ },
520
+ },
521
+ typography: {
522
+ h1: {
523
+ fontFamily: "Montserrat",
524
+ fontSize: "84px",
525
+ },
526
+ h2: {
527
+ fontFamily: "Montserrat",
528
+ fontSize: "53px",
529
+ },
530
+ h3: {
531
+ fontFamily: "Montserrat",
532
+ fontSize: "42px",
533
+ },
534
+ h4: {
535
+ fontFamily: "Montserrat",
536
+ fontSize: "30px",
537
+ },
538
+ h5: {
539
+ fontFamily: "Montserrat",
540
+ fontSize: "21px",
541
+ },
542
+ h6: {
543
+ fontFamily: "Montserrat",
544
+ fontSize: "17px",
545
+ },
546
+ fontFamily: "Roboto",
547
+ fontSize: 14,
548
+ subtitle1: {
549
+ fontFamily: "Roboto",
550
+ fontSize: "1.2rem",
551
+ lineHeight: 1.6,
552
+ },
553
+ subtitle2: {
554
+ fontFamily: "Roboto",
555
+ },
556
+ body1: {
557
+ fontFamily: "Roboto",
558
+ fontSize: "1.1rem",
559
+ lineHeight: 1.4,
560
+ },
561
+ body2: {
562
+ fontFamily: "Roboto",
563
+ fontSize: "1rem",
564
+ },
565
+ button: {
566
+ fontFamily: "Roboto",
567
+ },
568
+ caption: {
569
+ fontFamily: "Roboto",
570
+ },
571
+ overline: {
572
+ fontFamily: "Roboto",
573
+ },
574
+ },
575
+ components: {
576
+ MuiCssBaseline: {
577
+ styleOverrides: {
578
+ "*::-webkit-scrollbar": {
579
+ width: "0.8em",
580
+ },
581
+ "*::-webkit-scrollbar-track": {
582
+ backgroundColor: "#a5c5ba",
583
+ },
584
+ "*::-webkit-scrollbar-thumb": {
585
+ backgroundColor: "#DD1805",
586
+ },
587
+ },
588
+ },
589
+ },
590
+ }); // Light theme
591
+
592
+ export {
593
+ AMHdarkTheme,
594
+ AMHlightTheme,
595
+ APdarkTheme,
596
+ APlightTheme,
597
+ OREFSdarkTheme,
598
+ OREFSlightTheme,
599
+ };