@moises.ai/design-system 3.9.12 → 3.9.14

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/dist/index.js CHANGED
@@ -2111,7 +2111,7 @@ const KA = ({
2111
2111
  onClose: l
2112
2112
  }) => {
2113
2113
  const c = () => {
2114
- window.open(s, "_blank");
2114
+ window.open(s, "_self");
2115
2115
  }, u = N(
2116
2116
  (p) => {
2117
2117
  p.stopPropagation(), l == null || l();
@@ -5195,13 +5195,17 @@ function Rv(n) {
5195
5195
  };
5196
5196
  }
5197
5197
  function Nv(n, e) {
5198
- const t = Rv(e), s = nr[n] || nr.lyrics, r = () => s[Math.floor(t() * s.length)], o = r(), i = 4 + Math.floor(t() * 2), l = Array.from({ length: i }, () => ({
5199
- x: -10 + t() * 120,
5200
- y: -10 + t() * 120,
5201
- size: 60 + t() * 70,
5202
- fill: r()
5203
- })), c = 18 + t() * 10;
5204
- return { bg: o, blobs: l, blur: c };
5198
+ const t = Rv(e), s = nr[n] || nr.lyrics, r = () => s[Math.floor(t() * s.length)], o = r(), i = 6 + Math.floor(t() * 3), l = Array.from({ length: i }, () => {
5199
+ const c = 10 + Math.floor(t() * 20);
5200
+ return {
5201
+ x: -20 + t() * 140,
5202
+ y: -20 + t() * 140,
5203
+ size: 140 + t() * 120,
5204
+ fill: r(),
5205
+ midStop: c
5206
+ };
5207
+ });
5208
+ return { bg: o, blobs: l };
5205
5209
  }
5206
5210
  const Ta = ({
5207
5211
  className: n,
@@ -5225,7 +5229,7 @@ const Ta = ({
5225
5229
  ...o
5226
5230
  }
5227
5231
  );
5228
- const l = r ?? i, { bg: c, blobs: u, blur: p } = Nv(t, l);
5232
+ const l = r ?? i, { bg: c, blobs: u } = Nv(t, l);
5229
5233
  return /* @__PURE__ */ a(
5230
5234
  "div",
5231
5235
  {
@@ -5241,32 +5245,22 @@ const Ta = ({
5241
5245
  flexShrink: 0
5242
5246
  },
5243
5247
  ...o,
5244
- children: /* @__PURE__ */ a(
5248
+ children: u.map((p, h) => /* @__PURE__ */ a(
5245
5249
  "div",
5246
5250
  {
5247
5251
  style: {
5248
5252
  position: "absolute",
5249
- inset: 0,
5250
- filter: `blur(${p}px)`
5251
- },
5252
- children: u.map((h, A) => /* @__PURE__ */ a(
5253
- "div",
5254
- {
5255
- style: {
5256
- position: "absolute",
5257
- left: `${h.x}%`,
5258
- top: `${h.y}%`,
5259
- width: `${h.size}%`,
5260
- height: `${h.size}%`,
5261
- borderRadius: "50%",
5262
- backgroundColor: h.fill,
5263
- transform: "translate(-50%, -50%)"
5264
- }
5265
- },
5266
- A
5267
- ))
5268
- }
5269
- )
5253
+ left: `${p.x}%`,
5254
+ top: `${p.y}%`,
5255
+ width: `${p.size}%`,
5256
+ height: `${p.size}%`,
5257
+ borderRadius: "50%",
5258
+ background: `radial-gradient(circle, ${p.fill} ${p.midStop}%, transparent 70%)`,
5259
+ transform: "translate(-50%, -50%)"
5260
+ }
5261
+ },
5262
+ h
5263
+ ))
5270
5264
  }
5271
5265
  );
5272
5266
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moises.ai/design-system",
3
- "version": "3.9.12",
3
+ "version": "3.9.14",
4
4
  "description": "Design System package based on @radix-ui/themes with custom defaults",
5
5
  "private": false,
6
6
  "type": "module",
@@ -17,7 +17,7 @@ export const BannerAnnouncement = ({
17
17
  onClose,
18
18
  }) => {
19
19
  const navigateToLink = () => {
20
- window.open(link, '_blank')
20
+ window.open(link, '_self')
21
21
  }
22
22
 
23
23
  const handleClose = useCallback(
@@ -34,17 +34,19 @@ function generatePattern(type, seed) {
34
34
 
35
35
  const bg = pick()
36
36
 
37
- const blobCount = 4 + Math.floor(rng() * 2)
38
- const blobs = Array.from({ length: blobCount }, () => ({
39
- x: -10 + rng() * 120,
40
- y: -10 + rng() * 120,
41
- size: 60 + rng() * 70,
42
- fill: pick(),
43
- }))
37
+ const blobCount = 6 + Math.floor(rng() * 3)
38
+ const blobs = Array.from({ length: blobCount }, () => {
39
+ const midStop = 10 + Math.floor(rng() * 20)
40
+ return {
41
+ x: -20 + rng() * 140,
42
+ y: -20 + rng() * 140,
43
+ size: 140 + rng() * 120,
44
+ fill: pick(),
45
+ midStop,
46
+ }
47
+ })
44
48
 
45
- const blur = 18 + rng() * 10
46
-
47
- return { bg, blobs, blur }
49
+ return { bg, blobs }
48
50
  }
49
51
 
50
52
  export const ProductsBrandPattern = ({
@@ -72,7 +74,7 @@ export const ProductsBrandPattern = ({
72
74
  }
73
75
 
74
76
  const effectiveSeed = title != null ? title : randomSeed
75
- const { bg, blobs, blur } = generatePattern(type, effectiveSeed)
77
+ const { bg, blobs } = generatePattern(type, effectiveSeed)
76
78
 
77
79
  return (
78
80
  <div
@@ -89,29 +91,21 @@ export const ProductsBrandPattern = ({
89
91
  }}
90
92
  {...props}
91
93
  >
92
- <div
93
- style={{
94
- position: 'absolute',
95
- inset: 0,
96
- filter: `blur(${blur}px)`,
97
- }}
98
- >
99
- {blobs.map((b, i) => (
100
- <div
101
- key={i}
102
- style={{
103
- position: 'absolute',
104
- left: `${b.x}%`,
105
- top: `${b.y}%`,
106
- width: `${b.size}%`,
107
- height: `${b.size}%`,
108
- borderRadius: '50%',
109
- backgroundColor: b.fill,
110
- transform: 'translate(-50%, -50%)',
111
- }}
112
- />
113
- ))}
114
- </div>
94
+ {blobs.map((b, i) => (
95
+ <div
96
+ key={i}
97
+ style={{
98
+ position: 'absolute',
99
+ left: `${b.x}%`,
100
+ top: `${b.y}%`,
101
+ width: `${b.size}%`,
102
+ height: `${b.size}%`,
103
+ borderRadius: '50%',
104
+ background: `radial-gradient(circle, ${b.fill} ${b.midStop}%, transparent 70%)`,
105
+ transform: 'translate(-50%, -50%)',
106
+ }}
107
+ />
108
+ ))}
115
109
  </div>
116
110
  )
117
111
  }