@moises.ai/design-system 3.9.11 → 3.9.12

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
@@ -5196,9 +5196,9 @@ function Rv(n) {
5196
5196
  }
5197
5197
  function Nv(n, e) {
5198
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
- cx: -10 + t() * 120,
5200
- cy: -10 + t() * 120,
5201
- r: 30 + t() * 35,
5199
+ x: -10 + t() * 120,
5200
+ y: -10 + t() * 120,
5201
+ size: 60 + t() * 70,
5202
5202
  fill: r()
5203
5203
  })), c = 18 + t() * 10;
5204
5204
  return { bg: o, blobs: l, blur: c };
@@ -5226,21 +5226,47 @@ const Ta = ({
5226
5226
  }
5227
5227
  );
5228
5228
  const l = r ?? i, { bg: c, blobs: u, blur: p } = Nv(t, l);
5229
- return /* @__PURE__ */ m(
5230
- "svg",
5229
+ return /* @__PURE__ */ a(
5230
+ "div",
5231
5231
  {
5232
- viewBox: "0 0 100 100",
5233
- width: e,
5234
- height: e,
5235
- overflow: "hidden",
5236
- className: C(n),
5237
5232
  "aria-label": `${t} pattern`,
5238
5233
  role: "img",
5234
+ className: C(n),
5235
+ style: {
5236
+ position: "relative",
5237
+ width: e,
5238
+ height: e,
5239
+ overflow: "hidden",
5240
+ backgroundColor: c,
5241
+ flexShrink: 0
5242
+ },
5239
5243
  ...o,
5240
- children: [
5241
- /* @__PURE__ */ a("rect", { width: "100", height: "100", fill: c }),
5242
- /* @__PURE__ */ a("g", { style: { filter: `blur(${p}px)` }, children: u.map((h, A) => /* @__PURE__ */ a("circle", { cx: h.cx, cy: h.cy, r: h.r, fill: h.fill }, A)) })
5243
- ]
5244
+ children: /* @__PURE__ */ a(
5245
+ "div",
5246
+ {
5247
+ style: {
5248
+ 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
+ )
5244
5270
  }
5245
5271
  );
5246
5272
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moises.ai/design-system",
3
- "version": "3.9.11",
3
+ "version": "3.9.12",
4
4
  "description": "Design System package based on @radix-ui/themes with custom defaults",
5
5
  "private": false,
6
6
  "type": "module",
@@ -36,9 +36,9 @@ function generatePattern(type, seed) {
36
36
 
37
37
  const blobCount = 4 + Math.floor(rng() * 2)
38
38
  const blobs = Array.from({ length: blobCount }, () => ({
39
- cx: -10 + rng() * 120,
40
- cy: -10 + rng() * 120,
41
- r: 30 + rng() * 35,
39
+ x: -10 + rng() * 120,
40
+ y: -10 + rng() * 120,
41
+ size: 60 + rng() * 70,
42
42
  fill: pick(),
43
43
  }))
44
44
 
@@ -75,24 +75,44 @@ export const ProductsBrandPattern = ({
75
75
  const { bg, blobs, blur } = generatePattern(type, effectiveSeed)
76
76
 
77
77
  return (
78
- <svg
79
- viewBox="0 0 100 100"
80
- width={size}
81
- height={size}
82
- overflow="hidden"
83
- className={classNames(className)}
78
+ <div
84
79
  aria-label={`${type} pattern`}
85
80
  role="img"
81
+ className={classNames(className)}
82
+ style={{
83
+ position: 'relative',
84
+ width: size,
85
+ height: size,
86
+ overflow: 'hidden',
87
+ backgroundColor: bg,
88
+ flexShrink: 0,
89
+ }}
86
90
  {...props}
87
91
  >
88
- <rect width="100" height="100" fill={bg} />
89
-
90
- <g style={{ filter: `blur(${blur}px)` }}>
92
+ <div
93
+ style={{
94
+ position: 'absolute',
95
+ inset: 0,
96
+ filter: `blur(${blur}px)`,
97
+ }}
98
+ >
91
99
  {blobs.map((b, i) => (
92
- <circle key={i} cx={b.cx} cy={b.cy} r={b.r} fill={b.fill} />
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
+ />
93
113
  ))}
94
- </g>
95
- </svg>
114
+ </div>
115
+ </div>
96
116
  )
97
117
  }
98
118