@refinedev/core 4.45.0 → 4.45.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinedev/core",
3
- "version": "4.45.0",
3
+ "version": "4.45.1",
4
4
  "description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -1,6 +1,9 @@
1
- import React, { useEffect } from "react";
1
+ import React, { SVGProps, useEffect } from "react";
2
2
  import { CSSRules } from "./styles";
3
3
 
4
+ const text =
5
+ "If you find Refine useful, you can contribute to its growth by giving it a star on GitHub";
6
+
4
7
  export const GitHubBanner = () => {
5
8
  useEffect(() => {
6
9
  const styleTag = document.createElement("style");
@@ -10,78 +13,258 @@ export const GitHubBanner = () => {
10
13
  );
11
14
  }, []);
12
15
 
13
-
14
- const texts = ["Be a part of our journey. Star Refine on GitHub!", "Join our community. Star Refine on GitHub!", "Let's elevate Refine together. Star us on GitHub!", "Enhance Refine's reach. Give us a star on GitHub!"]
15
-
16
16
  return (
17
17
  <div
18
- className="banner"
18
+ className="banner bg-top-announcement"
19
19
  style={{
20
- flexDirection: "row",
21
- justifyContent: "center",
22
- alignItems: "center",
23
- position: "relative",
24
- padding: "8px 16px",
25
- backgroundColor: "#0d0d0d",
26
- borderBottom: "1px solid rgba(255, 255, 255, 0.15)",
20
+ width: "100%",
21
+ height: "48px",
27
22
  }}
28
23
  >
29
- {/* sider offset for center alignment */}
30
24
  <div
31
25
  style={{
32
- width: "200px",
26
+ position: "relative",
27
+ display: "flex",
28
+ justifyContent: "center",
29
+ alignItems: "center",
30
+ paddingLeft: "200px",
31
+ width: "100%",
32
+ maxWidth: "100vw",
33
+ height: "100%",
34
+ borderBottom: "1px solid #47ebeb26",
33
35
  }}
34
- />
35
- <a
36
- className="gh-link"
37
- href="https://s.refine.dev/github-support"
38
- target="_blank"
39
- rel="noreferrer"
40
36
  >
41
37
  <div
42
- className="content"
38
+ className="top-announcement-mask"
43
39
  style={{
44
- position: "relative",
45
- zIndex: 2,
46
- color: "#fff",
47
- display: "flex",
48
- flexDirection: "row",
49
- gap: "8px",
40
+ position: "absolute",
41
+ left: 0,
42
+ top: 0,
43
+ width: "100%",
44
+ height: "100%",
45
+ borderBottom: "1px solid #47ebeb26",
50
46
  }}
51
47
  >
52
- <span
48
+ <div
53
49
  style={{
50
+ position: "relative",
51
+ width: "960px",
52
+ height: "100%",
54
53
  display: "flex",
55
- flexDirection: "row",
56
- justifyContent: "center",
57
- alignItems: "center",
58
- }}
59
- >
60
- ⭐️
61
- </span>
62
- <span
63
- className="text"
64
- style={{
65
- padding: "4px 0",
66
- fontSize: "16px",
67
- lineHeight: "24px",
68
- textShadow: "0px 0px 4px rgba(255, 255, 255, 0.5)",
54
+ justifyContent: "space-between",
55
+ margin: "0 auto",
69
56
  }}
70
57
  >
71
- {texts[Math.floor(Math.random() * texts.length)]}
72
- </span>
73
- <span
74
- style={{
75
- display: "flex",
76
- flexDirection: "row",
77
- justifyContent: "center",
78
- alignItems: "center",
79
- }}
80
- >
81
- ⭐️
82
- </span>
58
+ <div
59
+ style={{
60
+ width: "calc(50% - 300px)",
61
+ height: "100%",
62
+ position: "relative",
63
+ }}
64
+ >
65
+ <GlowSmall
66
+ style={{
67
+ animationDelay: "1.5s",
68
+ position: "absolute",
69
+ top: "2px",
70
+ right: "220px",
71
+ }}
72
+ id={"1"}
73
+ />
74
+ <GlowSmall
75
+ style={{
76
+ animationDelay: "1s",
77
+ position: "absolute",
78
+ top: "8px",
79
+ right: "100px",
80
+ transform: "rotate(180deg)",
81
+ }}
82
+ id={"2"}
83
+ />
84
+ <GlowBig
85
+ style={{
86
+ position: "absolute",
87
+ right: "10px",
88
+ }}
89
+ id={"3"}
90
+ />
91
+ </div>
92
+
93
+ <div
94
+ style={{
95
+ width: "calc(50% - 300px)",
96
+ height: "100%",
97
+ position: "relative",
98
+ }}
99
+ >
100
+ <GlowSmall
101
+ style={{
102
+ animationDelay: "2s",
103
+ position: "absolute",
104
+ top: "6px",
105
+ right: "180px",
106
+ transform: "rotate(180deg)",
107
+ }}
108
+ id={"4"}
109
+ />
110
+ <GlowSmall
111
+ style={{
112
+ animationDelay: "0.5s",
113
+ transitionDelay: "1.3s",
114
+ position: "absolute",
115
+ top: "2px",
116
+ right: "40px",
117
+ }}
118
+ id={"5"}
119
+ />
120
+ <GlowBig
121
+ style={{
122
+ position: "absolute",
123
+ right: "-70px",
124
+ }}
125
+ id={"6"}
126
+ />
127
+ </div>
128
+ </div>
83
129
  </div>
84
- </a>
130
+ <Text text={text} />
131
+ </div>
85
132
  </div>
86
133
  );
87
134
  };
135
+
136
+ const Text = ({ text }: { text: string }) => {
137
+ return (
138
+ <a
139
+ className="gh-link"
140
+ href="https://s.refine.dev/github-support"
141
+ target="_blank"
142
+ rel="noreferrer"
143
+ style={{
144
+ position: "absolute",
145
+ height: "100%",
146
+ padding: "0 60px",
147
+ display: "flex",
148
+ flexWrap: "nowrap",
149
+ whiteSpace: "nowrap",
150
+ justifyContent: "center",
151
+ alignItems: "center",
152
+ backgroundImage:
153
+ "linear-gradient(90deg, rgba(31, 63, 72, 0.00) 0%, #1F3F48 10%, #1F3F48 90%, rgba(31, 63, 72, 0.00) 100%)",
154
+ }}
155
+ >
156
+ <div
157
+ style={{
158
+ color: "#fff",
159
+ display: "flex",
160
+ flexDirection: "row",
161
+ gap: "8px",
162
+ }}
163
+ >
164
+ <span
165
+ style={{
166
+ display: "flex",
167
+ flexDirection: "row",
168
+ justifyContent: "center",
169
+ alignItems: "center",
170
+ }}
171
+ >
172
+ ⭐️
173
+ </span>
174
+ <span
175
+ className="text"
176
+ style={{
177
+ fontSize: "16px",
178
+ lineHeight: "24px",
179
+ }}
180
+ >
181
+ {text}
182
+ </span>
183
+ <span
184
+ style={{
185
+ display: "flex",
186
+ flexDirection: "row",
187
+ justifyContent: "center",
188
+ alignItems: "center",
189
+ }}
190
+ >
191
+ ⭐️
192
+ </span>
193
+ </div>
194
+ </a>
195
+ );
196
+ };
197
+
198
+ const GlowSmall = ({ style, ...props }: SVGProps<SVGSVGElement>) => {
199
+ return (
200
+ <svg
201
+ xmlns="http://www.w3.org/2000/svg"
202
+ width={80}
203
+ height={40}
204
+ fill="none"
205
+ style={{
206
+ opacity: 1,
207
+ animation:
208
+ "top-announcement-glow 1s ease-in-out infinite alternate",
209
+ ...style,
210
+ }}
211
+ >
212
+ <circle
213
+ cx={40}
214
+ r={40}
215
+ fill={`url(#${props.id}-a)`}
216
+ fillOpacity={0.5}
217
+ />
218
+ <defs>
219
+ <radialGradient
220
+ id={`${props.id}-a`}
221
+ cx={0}
222
+ cy={0}
223
+ r={1}
224
+ gradientTransform="matrix(0 40 -40 0 40 0)"
225
+ gradientUnits="userSpaceOnUse"
226
+ >
227
+ <stop stopColor="#47EBEB" />
228
+ <stop offset={1} stopColor="#47EBEB" stopOpacity={0} />
229
+ </radialGradient>
230
+ </defs>
231
+ </svg>
232
+ );
233
+ };
234
+
235
+ const GlowBig = ({ style, ...props }: SVGProps<SVGSVGElement>) => (
236
+ <svg
237
+ xmlns="http://www.w3.org/2000/svg"
238
+ width={120}
239
+ height={48}
240
+ fill="none"
241
+ {...props}
242
+ style={{
243
+ opacity: 1,
244
+ animation:
245
+ "top-announcement-glow 1s ease-in-out infinite alternate",
246
+ ...style,
247
+ }}
248
+ >
249
+ <circle
250
+ cx={60}
251
+ cy={24}
252
+ r={60}
253
+ fill={`url(#${props.id}-a)`}
254
+ fillOpacity={0.5}
255
+ />
256
+ <defs>
257
+ <radialGradient
258
+ id={`${props.id}-a`}
259
+ cx={0}
260
+ cy={0}
261
+ r={1}
262
+ gradientTransform="matrix(0 60 -60 0 60 24)"
263
+ gradientUnits="userSpaceOnUse"
264
+ >
265
+ <stop stopColor="#47EBEB" />
266
+ <stop offset={1} stopColor="#47EBEB" stopOpacity={0} />
267
+ </radialGradient>
268
+ </defs>
269
+ </svg>
270
+ );
@@ -1,4 +1,24 @@
1
1
  export const CSSRules = [
2
+ `
3
+ .bg-top-announcement {
4
+ border-bottom: 1px solid rgba(71, 235, 235, 0.15);
5
+ background: radial-gradient(
6
+ 218.19% 111.8% at 0% 0%,
7
+ rgba(71, 235, 235, 0.1) 0%,
8
+ rgba(71, 235, 235, 0.2) 100%
9
+ ),
10
+ #14141f;
11
+ }
12
+ `,
13
+ `
14
+ .top-announcement-mask {
15
+ mask-image: url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/hexagon.svg);
16
+ -webkit-mask-image: url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/hexagon.svg);
17
+ mask-repeat: repeat;
18
+ -webkit-mask-repeat: repeat;
19
+ background: rgba(71, 235, 235, 0.25);
20
+ }
21
+ `,
2
22
  `
3
23
  .banner {
4
24
  display: flex;
@@ -7,60 +27,20 @@ export const CSSRules = [
7
27
  }
8
28
  }`,
9
29
  `
10
- .banner::before,
11
- .banner::after {
12
- content: '';
13
- position: absolute;
14
- top: 0;
15
- left: 0;
16
- width: 100%;
17
- height: 100%;
18
- }
19
- `,
20
- `
21
- .banner::before {
22
- background-image: linear-gradient(
23
- 270deg,
24
- rgba(255, 76, 77, 0.35) 0%,
25
- rgba(255, 153, 51, 0.35) 12.5%,
26
- rgba(255, 191, 0, 0.35) 25%,
27
- rgba(38, 217, 127, 0.35) 37.5%,
28
- rgba(71, 235, 235, 0.35) 50%,
29
- rgba(0, 128, 255, 0.35) 62.5%,
30
- rgba(51, 51, 255, 0.35) 75%,
31
- rgba(128, 0, 255, 0.35) 87.5%,
32
- rgba(237, 94, 201, 0.35) 100%
33
- );
34
- background-position: 0 0;
35
- background-size: 200% 100%;
36
- background-repeat: repeat-x;
37
- animation: bgpos 4s linear infinite;
38
- }
39
- `,
40
- `
41
- .banner::after {
42
- background: linear-gradient(
43
- 180deg,
44
- rgba(13, 13, 13, 0.85) 0%,
45
- rgba(13, 13, 13, 0) 100%
46
- );
30
+ .gh-link, .gh-link:hover, .gh-link:active, .gh-link:visited, .gh-link:focus {
31
+ text-decoration: none;
32
+ z-index: 9;
47
33
  }
48
34
  `,
49
35
  `
50
- @keyframes bgpos {
36
+ @keyframes top-announcement-glow {
51
37
  0% {
52
- background-position: 0 0;
38
+ opacity: 1;
53
39
  }
54
40
 
55
41
  100% {
56
- background-position: -200% 0;
42
+ opacity: 0;
57
43
  }
58
44
  }
59
45
  `,
60
- `
61
- .gh-link, .gh-link:hover, .gh-link:active, .gh-link:visited, .gh-link:focus {
62
- text-decoration: none;
63
- z-index: 9;
64
- }
65
- `,
66
46
  ];