generative-ui-library 1.0.0 → 1.0.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.
Files changed (3) hide show
  1. package/dist/index.js +415 -119
  2. package/dist/index.mjs +415 -120
  3. package/package.json +4 -2
package/dist/index.js CHANGED
@@ -30,163 +30,459 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  Button: () => Button,
33
- Card: () => Card
33
+ Card: () => Card,
34
+ ProfileCard: () => ProfileCard
34
35
  });
35
36
  module.exports = __toCommonJS(index_exports);
36
37
 
37
38
  // src/components/Button/Button.jsx
38
39
  var import_react = __toESM(require("react"));
39
40
  var Button = ({
40
- text = "Click Me",
41
+ text = "Hover Me",
41
42
  onClick = () => {
42
43
  },
43
- bgColor = "#4f46e5",
44
- hoverColor = "#4338ca",
45
- textColor = "#ffffff",
44
+ variant = "solid",
45
+ theme = "dark",
46
+ accentColor = "#22d3ee",
46
47
  size = "medium",
48
+ strength = 26,
49
+ icon = null,
50
+ loading = false,
47
51
  disabled = false,
48
- rounded = true
52
+ fullWidth = false
49
53
  }) => {
54
+ const btnRef = (0, import_react.useRef)(null);
55
+ const [offset, setOffset] = (0, import_react.useState)({ x: 0, y: 0 });
50
56
  const [isHovered, setIsHovered] = (0, import_react.useState)(false);
51
- const [isPressed, setIsPressed] = (0, import_react.useState)(false);
57
+ const [isFocused, setIsFocused] = (0, import_react.useState)(false);
58
+ const isInactive = disabled || loading;
52
59
  const sizeStyles = {
53
- small: { padding: "6px 14px", fontSize: "13px" },
54
- medium: { padding: "10px 20px", fontSize: "15px" },
55
- large: { padding: "14px 28px", fontSize: "17px" }
60
+ small: { padding: "8px 18px", fontSize: "13px", gap: "6px" },
61
+ medium: { padding: "12px 26px", fontSize: "15px", gap: "8px" },
62
+ large: { padding: "16px 34px", fontSize: "17px", gap: "10px" }
56
63
  };
57
- const styles = {
58
- backgroundColor: disabled ? "#a0a0a0" : isHovered ? hoverColor : bgColor,
59
- color: textColor,
60
- border: "none",
61
- borderRadius: rounded ? "9999px" : "6px",
62
- cursor: disabled ? "not-allowed" : "pointer",
63
- fontWeight: 600,
64
- fontFamily: "inherit",
65
- transition: "all 0.2s ease",
66
- transform: isPressed ? "scale(0.96)" : isHovered ? "scale(1.03)" : "scale(1)",
67
- boxShadow: isHovered && !disabled ? "0 6px 14px rgba(0,0,0,0.18)" : "0 2px 6px rgba(0,0,0,0.12)",
68
- outline: "none",
69
- ...sizeStyles[size]
64
+ const palette = theme === "light" ? { base: "#ffffff", text: "#111827", border: "rgba(0,0,0,0.12)" } : { base: "#111827", text: "#f9fafb", border: "rgba(255,255,255,0.14)" };
65
+ const variantStyles = {
66
+ solid: {
67
+ backgroundColor: palette.base,
68
+ color: palette.text,
69
+ border: `1px solid ${isHovered ? accentColor : palette.border}`
70
+ },
71
+ outline: {
72
+ backgroundColor: "transparent",
73
+ color: theme === "light" ? "#111827" : "#f9fafb",
74
+ border: `1.5px solid ${isHovered ? accentColor : palette.border}`
75
+ },
76
+ ghost: {
77
+ backgroundColor: isHovered ? theme === "light" ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.08)" : "transparent",
78
+ color: theme === "light" ? "#111827" : "#f9fafb",
79
+ border: "1px solid transparent"
80
+ },
81
+ gradient: {
82
+ backgroundImage: `linear-gradient(135deg, ${accentColor}, ${palette.base})`,
83
+ color: "#ffffff",
84
+ border: "1px solid transparent"
85
+ }
86
+ };
87
+ const handleMouseMove = (e) => {
88
+ if (isInactive || !btnRef.current) return;
89
+ const rect = btnRef.current.getBoundingClientRect();
90
+ const relX = e.clientX - rect.left - rect.width / 2;
91
+ const relY = e.clientY - rect.top - rect.height / 2;
92
+ setOffset({ x: relX / rect.width * strength, y: relY / rect.height * strength });
93
+ };
94
+ const resetOffset = () => {
95
+ setIsHovered(false);
96
+ setOffset({ x: 0, y: 0 });
70
97
  };
71
98
  return /* @__PURE__ */ import_react.default.createElement(
72
99
  "button",
73
100
  {
74
- style: styles,
75
- disabled,
76
- onClick,
77
- onMouseEnter: () => setIsHovered(true),
78
- onMouseLeave: () => {
79
- setIsHovered(false);
80
- setIsPressed(false);
81
- },
82
- onMouseDown: () => setIsPressed(true),
83
- onMouseUp: () => setIsPressed(false)
101
+ ref: btnRef,
102
+ type: "button",
103
+ "aria-disabled": isInactive,
104
+ "aria-busy": loading,
105
+ disabled: isInactive,
106
+ onClick: isInactive ? void 0 : onClick,
107
+ onMouseEnter: () => !isInactive && setIsHovered(true),
108
+ onMouseMove: handleMouseMove,
109
+ onMouseLeave: resetOffset,
110
+ onFocus: () => setIsFocused(true),
111
+ onBlur: () => setIsFocused(false),
112
+ style: {
113
+ position: "relative",
114
+ display: "inline-flex",
115
+ alignItems: "center",
116
+ justifyContent: "center",
117
+ width: fullWidth ? "100%" : "auto",
118
+ borderRadius: "9999px",
119
+ fontWeight: 600,
120
+ fontFamily: "inherit",
121
+ cursor: isInactive ? "not-allowed" : "pointer",
122
+ opacity: disabled ? 0.5 : 1,
123
+ overflow: "hidden",
124
+ transform: `translate(${offset.x}px, ${offset.y}px) scale(${isHovered && !isInactive ? 1.05 : 1})`,
125
+ transition: isHovered ? "transform 0.12s ease-out, border-color 0.2s ease, box-shadow 0.2s ease" : "transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease",
126
+ boxShadow: isFocused ? `0 0 0 3px ${accentColor}55` : isHovered && !isInactive ? `0 0 24px ${accentColor}55` : "0 4px 10px rgba(0,0,0,0.15)",
127
+ outline: "none",
128
+ ...sizeStyles[size],
129
+ ...variantStyles[variant]
130
+ }
84
131
  },
85
- text
132
+ loading ? /* @__PURE__ */ import_react.default.createElement(
133
+ "span",
134
+ {
135
+ "aria-hidden": "true",
136
+ style: {
137
+ width: "15px",
138
+ height: "15px",
139
+ borderRadius: "50%",
140
+ border: `2px solid ${theme === "light" ? "rgba(0,0,0,0.2)" : "rgba(255,255,255,0.3)"}`,
141
+ borderTopColor: accentColor,
142
+ animation: "mb-spin 0.7s linear infinite"
143
+ }
144
+ }
145
+ ) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, icon && /* @__PURE__ */ import_react.default.createElement("span", { style: { display: "inline-flex", alignItems: "center" } }, icon), /* @__PURE__ */ import_react.default.createElement(
146
+ "span",
147
+ {
148
+ style: {
149
+ position: "relative",
150
+ zIndex: 1,
151
+ background: isHovered && !isInactive && variant !== "gradient" ? `linear-gradient(90deg, currentColor, ${accentColor})` : "none",
152
+ WebkitBackgroundClip: isHovered && !isInactive && variant !== "gradient" ? "text" : "unset",
153
+ WebkitTextFillColor: isHovered && !isInactive && variant !== "gradient" ? "transparent" : "currentColor",
154
+ transition: "all 0.3s ease"
155
+ }
156
+ },
157
+ text
158
+ )),
159
+ /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes mb-spin { to { transform: rotate(360deg); } }`)
86
160
  );
87
161
  };
88
162
 
89
163
  // src/components/Card/Card.jsx
90
164
  var import_react2 = __toESM(require("react"));
91
165
  var Card = ({
92
- title = "Card Title",
93
- description = "This is a simple, reusable card component built with React.",
94
- imageUrl = "",
95
- bgColor = "#ffffff",
96
- textColor = "#1f2937",
97
- accentColor = "#4f46e5",
98
- width = "300px",
99
- rounded = true,
100
- elevated = true,
101
- buttonText = "Learn More",
102
- onButtonClick = () => {
103
- },
104
- showButton = true
166
+ title = "Spotlight Card",
167
+ description = "Move your cursor over this card to see the glow follow you.",
168
+ eyebrow = "",
169
+ tags = [],
170
+ theme = "dark",
171
+ spotlightColor = "rgba(99, 102, 241, 0.35)",
172
+ width = "320px",
173
+ footer = null,
174
+ bordered = true,
175
+ interactive = true,
176
+ onClick = null
105
177
  }) => {
178
+ const cardRef = (0, import_react2.useRef)(null);
179
+ const [pos, setPos] = (0, import_react2.useState)({ x: 50, y: 50 });
106
180
  const [isHovered, setIsHovered] = (0, import_react2.useState)(false);
107
- const [isButtonHovered, setIsButtonHovered] = (0, import_react2.useState)(false);
108
- const [isButtonPressed, setIsButtonPressed] = (0, import_react2.useState)(false);
109
- const cardStyles = {
110
- width,
111
- backgroundColor: bgColor,
112
- color: textColor,
113
- borderRadius: rounded ? "16px" : "4px",
114
- overflow: "hidden",
115
- boxShadow: isHovered ? "0 12px 24px rgba(0,0,0,0.18)" : elevated ? "0 4px 12px rgba(0,0,0,0.1)" : "0 1px 3px rgba(0,0,0,0.08)",
116
- transform: isHovered ? "translateY(-6px)" : "translateY(0)",
117
- transition: "all 0.25s ease",
118
- fontFamily: "inherit",
119
- border: "1px solid rgba(0,0,0,0.06)",
120
- display: "flex",
121
- flexDirection: "column"
122
- };
123
- const imageStyles = {
124
- width: "100%",
125
- height: "160px",
126
- objectFit: "cover",
127
- display: "block"
128
- };
129
- const contentStyles = {
130
- padding: "18px 20px",
131
- display: "flex",
132
- flexDirection: "column",
133
- gap: "8px"
134
- };
135
- const titleStyles = {
136
- margin: 0,
137
- fontSize: "18px",
138
- fontWeight: 700,
139
- color: textColor
140
- };
141
- const descStyles = {
142
- margin: 0,
143
- fontSize: "14px",
144
- lineHeight: 1.5,
145
- color: textColor,
146
- opacity: 0.75
147
- };
148
- const buttonStyles = {
149
- marginTop: "10px",
150
- alignSelf: "flex-start",
151
- padding: "8px 18px",
152
- fontSize: "13px",
153
- fontWeight: 600,
154
- color: "#ffffff",
155
- backgroundColor: accentColor,
156
- border: "none",
157
- borderRadius: rounded ? "9999px" : "6px",
158
- cursor: "pointer",
159
- transition: "all 0.2s ease",
160
- transform: isButtonPressed ? "scale(0.96)" : isButtonHovered ? "scale(1.04)" : "scale(1)",
161
- opacity: isButtonHovered ? 0.9 : 1
181
+ const palette = theme === "light" ? { bg: "#ffffff", text: "#111827", subtext: "#4b5563", border: "rgba(0,0,0,0.08)", tagBg: "rgba(0,0,0,0.05)" } : { bg: "#0f0f14", text: "#f4f4f5", subtext: "#a1a1aa", border: "rgba(255,255,255,0.08)", tagBg: "rgba(255,255,255,0.06)" };
182
+ const handleMouseMove = (e) => {
183
+ if (!cardRef.current) return;
184
+ const rect = cardRef.current.getBoundingClientRect();
185
+ setPos({
186
+ x: (e.clientX - rect.left) / rect.width * 100,
187
+ y: (e.clientY - rect.top) / rect.height * 100
188
+ });
162
189
  };
190
+ const Wrapper = onClick ? "button" : "div";
163
191
  return /* @__PURE__ */ import_react2.default.createElement(
164
- "div",
192
+ Wrapper,
165
193
  {
166
- style: cardStyles,
194
+ ref: cardRef,
195
+ type: onClick ? "button" : void 0,
196
+ onClick: onClick || void 0,
167
197
  onMouseEnter: () => setIsHovered(true),
168
- onMouseLeave: () => setIsHovered(false)
198
+ onMouseMove: handleMouseMove,
199
+ onMouseLeave: () => setIsHovered(false),
200
+ style: {
201
+ position: "relative",
202
+ display: "block",
203
+ textAlign: "left",
204
+ width,
205
+ padding: "28px",
206
+ borderRadius: "18px",
207
+ backgroundColor: palette.bg,
208
+ color: palette.text,
209
+ border: `1px solid ${isHovered && bordered ? spotlightColor.replace(/[\d.]+\)$/, "0.9)") : palette.border}`,
210
+ overflow: "hidden",
211
+ fontFamily: "inherit",
212
+ cursor: onClick ? "pointer" : "default",
213
+ transition: "transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease",
214
+ transform: interactive && isHovered ? "translateY(-4px)" : "translateY(0)",
215
+ boxShadow: interactive && isHovered ? "0 20px 40px rgba(0,0,0,0.35)" : "0 8px 20px rgba(0,0,0,0.18)",
216
+ outline: "none"
217
+ }
169
218
  },
170
- imageUrl && /* @__PURE__ */ import_react2.default.createElement("img", { src: imageUrl, alt: title, style: imageStyles }),
171
- /* @__PURE__ */ import_react2.default.createElement("div", { style: contentStyles }, /* @__PURE__ */ import_react2.default.createElement("h3", { style: titleStyles }, title), /* @__PURE__ */ import_react2.default.createElement("p", { style: descStyles }, description), showButton && /* @__PURE__ */ import_react2.default.createElement(
172
- "button",
219
+ /* @__PURE__ */ import_react2.default.createElement(
220
+ "div",
173
221
  {
174
- style: buttonStyles,
175
- onClick: onButtonClick,
176
- onMouseEnter: () => setIsButtonHovered(true),
177
- onMouseLeave: () => {
178
- setIsButtonHovered(false);
179
- setIsButtonPressed(false);
180
- },
181
- onMouseDown: () => setIsButtonPressed(true),
182
- onMouseUp: () => setIsButtonPressed(false)
222
+ "aria-hidden": "true",
223
+ style: {
224
+ position: "absolute",
225
+ inset: 0,
226
+ opacity: isHovered ? 1 : 0,
227
+ transition: "opacity 0.3s ease",
228
+ background: `radial-gradient(circle 220px at ${pos.x}% ${pos.y}%, ${spotlightColor}, transparent 70%)`,
229
+ pointerEvents: "none"
230
+ }
231
+ }
232
+ ),
233
+ /* @__PURE__ */ import_react2.default.createElement("div", { style: { position: "relative", zIndex: 1 } }, eyebrow && /* @__PURE__ */ import_react2.default.createElement(
234
+ "div",
235
+ {
236
+ style: {
237
+ fontSize: "11px",
238
+ fontWeight: 700,
239
+ letterSpacing: "0.08em",
240
+ textTransform: "uppercase",
241
+ color: palette.subtext,
242
+ marginBottom: "8px"
243
+ }
244
+ },
245
+ eyebrow
246
+ ), /* @__PURE__ */ import_react2.default.createElement("h3", { style: { margin: "0 0 10px 0", fontSize: "19px", fontWeight: 700, lineHeight: 1.3 } }, title), /* @__PURE__ */ import_react2.default.createElement("p", { style: { margin: 0, fontSize: "14px", lineHeight: 1.6, color: palette.subtext } }, description), tags.length > 0 && /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px", marginTop: "16px" } }, tags.map((tag, i) => /* @__PURE__ */ import_react2.default.createElement(
247
+ "span",
248
+ {
249
+ key: i,
250
+ style: {
251
+ fontSize: "11px",
252
+ fontWeight: 600,
253
+ padding: "4px 10px",
254
+ borderRadius: "9999px",
255
+ backgroundColor: palette.tagBg,
256
+ color: palette.subtext
257
+ }
183
258
  },
184
- buttonText
259
+ tag
260
+ ))), footer && /* @__PURE__ */ import_react2.default.createElement(
261
+ "div",
262
+ {
263
+ style: {
264
+ marginTop: "20px",
265
+ paddingTop: "16px",
266
+ borderTop: `1px solid ${palette.border}`
267
+ }
268
+ },
269
+ footer
185
270
  ))
186
271
  );
187
272
  };
273
+
274
+ // src/components/ProfileCard/ProfileCard.jsx
275
+ var import_react3 = __toESM(require("react"));
276
+ var ProfileCard = ({
277
+ name = "Aditi Sharma",
278
+ role = "Full-Stack Developer",
279
+ bio = "Building clean, accessible interfaces and scalable backends.",
280
+ avatarUrl = "",
281
+ theme = "dark",
282
+ // "dark" | "light"
283
+ accentColor = "#6366f1",
284
+ stats = [
285
+ { label: "Projects", value: 24 },
286
+ { label: "Followers", value: "1.2k" },
287
+ { label: "Following", value: 180 }
288
+ ],
289
+ socials = [],
290
+ actionText = "Follow",
291
+ onAction = () => {
292
+ },
293
+ secondaryText = "Message",
294
+ onSecondary = null,
295
+ maxWidth = "340px"
296
+ }) => {
297
+ const [isCardHovered, setIsCardHovered] = (0, import_react3.useState)(false);
298
+ const [isAvatarHovered, setIsAvatarHovered] = (0, import_react3.useState)(false);
299
+ const [isFollowing, setIsFollowing] = (0, import_react3.useState)(false);
300
+ const [primaryHover, setPrimaryHover] = (0, import_react3.useState)(false);
301
+ const [secondaryHover, setSecondaryHover] = (0, import_react3.useState)(false);
302
+ const palette = theme === "light" ? { bg: "#ffffff", text: "#111827", subtext: "#6b7280", border: "rgba(0,0,0,0.08)", statBg: "rgba(0,0,0,0.03)" } : { bg: "#131318", text: "#f4f4f5", subtext: "#a1a1aa", border: "rgba(255,255,255,0.08)", statBg: "rgba(255,255,255,0.04)" };
303
+ const initials = name.split(" ").map((w) => w[0]).slice(0, 2).join("").toUpperCase();
304
+ const handlePrimaryClick = () => {
305
+ setIsFollowing((prev) => !prev);
306
+ onAction();
307
+ };
308
+ return /* @__PURE__ */ import_react3.default.createElement(
309
+ "div",
310
+ {
311
+ onMouseEnter: () => setIsCardHovered(true),
312
+ onMouseLeave: () => setIsCardHovered(false),
313
+ style: {
314
+ width: "100%",
315
+ maxWidth,
316
+ boxSizing: "border-box",
317
+ margin: "0 auto",
318
+ padding: "clamp(18px, 4vw, 28px)",
319
+ borderRadius: "18px",
320
+ backgroundColor: palette.bg,
321
+ color: palette.text,
322
+ border: `1px solid ${isCardHovered ? accentColor + "66" : palette.border}`,
323
+ fontFamily: "inherit",
324
+ textAlign: "center",
325
+ transition: "transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease",
326
+ transform: isCardHovered ? "translateY(-4px)" : "translateY(0)",
327
+ boxShadow: isCardHovered ? "0 20px 40px rgba(0,0,0,0.25)" : "0 6px 16px rgba(0,0,0,0.12)"
328
+ }
329
+ },
330
+ /* @__PURE__ */ import_react3.default.createElement(
331
+ "div",
332
+ {
333
+ onMouseEnter: () => setIsAvatarHovered(true),
334
+ onMouseLeave: () => setIsAvatarHovered(false),
335
+ style: {
336
+ width: "clamp(64px, 22vw, 84px)",
337
+ height: "clamp(64px, 22vw, 84px)",
338
+ margin: "0 auto 14px",
339
+ borderRadius: "50%",
340
+ overflow: "hidden",
341
+ display: "flex",
342
+ alignItems: "center",
343
+ justifyContent: "center",
344
+ fontWeight: 700,
345
+ fontSize: "clamp(18px, 5vw, 24px)",
346
+ color: "#ffffff",
347
+ backgroundImage: `linear-gradient(135deg, ${accentColor}, ${accentColor}99)`,
348
+ border: `3px solid ${palette.bg}`,
349
+ boxShadow: isAvatarHovered ? `0 0 0 3px ${accentColor}55` : "0 0 0 0 transparent",
350
+ transform: isAvatarHovered ? "scale(1.06)" : "scale(1)",
351
+ transition: "transform 0.25s ease, box-shadow 0.25s ease"
352
+ }
353
+ },
354
+ avatarUrl ? /* @__PURE__ */ import_react3.default.createElement(
355
+ "img",
356
+ {
357
+ src: avatarUrl,
358
+ alt: name,
359
+ style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
360
+ }
361
+ ) : initials
362
+ ),
363
+ /* @__PURE__ */ import_react3.default.createElement("h3", { style: { margin: "0 0 2px 0", fontSize: "clamp(16px, 4vw, 19px)", fontWeight: 700 } }, name),
364
+ /* @__PURE__ */ import_react3.default.createElement("p", { style: { margin: "0 0 10px 0", fontSize: "13px", fontWeight: 500, color: accentColor } }, role),
365
+ /* @__PURE__ */ import_react3.default.createElement(
366
+ "p",
367
+ {
368
+ style: {
369
+ margin: "0 0 18px 0",
370
+ fontSize: "13.5px",
371
+ lineHeight: 1.6,
372
+ color: palette.subtext
373
+ }
374
+ },
375
+ bio
376
+ ),
377
+ stats.length > 0 && /* @__PURE__ */ import_react3.default.createElement(
378
+ "div",
379
+ {
380
+ style: {
381
+ display: "flex",
382
+ flexWrap: "wrap",
383
+ justifyContent: "center",
384
+ gap: "8px",
385
+ marginBottom: "18px"
386
+ }
387
+ },
388
+ stats.map((s, i) => /* @__PURE__ */ import_react3.default.createElement(
389
+ "div",
390
+ {
391
+ key: i,
392
+ style: {
393
+ flex: "1 1 80px",
394
+ minWidth: "72px",
395
+ padding: "8px 6px",
396
+ borderRadius: "12px",
397
+ backgroundColor: palette.statBg
398
+ }
399
+ },
400
+ /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "15px", fontWeight: 700 } }, s.value),
401
+ /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "11px", color: palette.subtext, marginTop: "2px" } }, s.label)
402
+ ))
403
+ ),
404
+ /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" } }, /* @__PURE__ */ import_react3.default.createElement(
405
+ "button",
406
+ {
407
+ onClick: handlePrimaryClick,
408
+ onMouseEnter: () => setPrimaryHover(true),
409
+ onMouseLeave: () => setPrimaryHover(false),
410
+ style: {
411
+ flex: "1 1 auto",
412
+ minWidth: "100px",
413
+ padding: "10px 16px",
414
+ fontSize: "13.5px",
415
+ fontWeight: 600,
416
+ borderRadius: "9999px",
417
+ border: isFollowing ? `1.5px solid ${accentColor}` : "1.5px solid transparent",
418
+ backgroundColor: isFollowing ? "transparent" : accentColor,
419
+ color: isFollowing ? accentColor : "#ffffff",
420
+ cursor: "pointer",
421
+ transition: "all 0.2s ease",
422
+ transform: primaryHover ? "scale(1.03)" : "scale(1)"
423
+ }
424
+ },
425
+ isFollowing ? "Following" : actionText
426
+ ), secondaryText && /* @__PURE__ */ import_react3.default.createElement(
427
+ "button",
428
+ {
429
+ onClick: onSecondary || (() => {
430
+ }),
431
+ onMouseEnter: () => setSecondaryHover(true),
432
+ onMouseLeave: () => setSecondaryHover(false),
433
+ style: {
434
+ flex: "1 1 auto",
435
+ minWidth: "100px",
436
+ padding: "10px 16px",
437
+ fontSize: "13.5px",
438
+ fontWeight: 600,
439
+ borderRadius: "9999px",
440
+ border: `1.5px solid ${palette.border}`,
441
+ backgroundColor: secondaryHover ? palette.statBg : "transparent",
442
+ color: palette.text,
443
+ cursor: "pointer",
444
+ transition: "all 0.2s ease",
445
+ transform: secondaryHover ? "scale(1.03)" : "scale(1)"
446
+ }
447
+ },
448
+ secondaryText
449
+ )),
450
+ socials.length > 0 && /* @__PURE__ */ import_react3.default.createElement(
451
+ "div",
452
+ {
453
+ style: {
454
+ display: "flex",
455
+ justifyContent: "center",
456
+ gap: "14px",
457
+ marginTop: "16px",
458
+ flexWrap: "wrap"
459
+ }
460
+ },
461
+ socials.map((s, i) => /* @__PURE__ */ import_react3.default.createElement(
462
+ "a",
463
+ {
464
+ key: i,
465
+ href: s.href,
466
+ target: "_blank",
467
+ rel: "noopener noreferrer",
468
+ style: {
469
+ fontSize: "12px",
470
+ fontWeight: 600,
471
+ color: palette.subtext,
472
+ textDecoration: "none",
473
+ transition: "color 0.2s ease"
474
+ },
475
+ onMouseEnter: (e) => e.currentTarget.style.color = accentColor,
476
+ onMouseLeave: (e) => e.currentTarget.style.color = palette.subtext
477
+ },
478
+ s.label
479
+ ))
480
+ )
481
+ );
482
+ };
188
483
  // Annotate the CommonJS export names for ESM import in node:
189
484
  0 && (module.exports = {
190
485
  Button,
191
- Card
486
+ Card,
487
+ ProfileCard
192
488
  });
package/dist/index.mjs CHANGED
@@ -1,155 +1,450 @@
1
1
  // src/components/Button/Button.jsx
2
- import React, { useState } from "react";
2
+ import React, { useRef, useState } from "react";
3
3
  var Button = ({
4
- text = "Click Me",
4
+ text = "Hover Me",
5
5
  onClick = () => {
6
6
  },
7
- bgColor = "#4f46e5",
8
- hoverColor = "#4338ca",
9
- textColor = "#ffffff",
7
+ variant = "solid",
8
+ theme = "dark",
9
+ accentColor = "#22d3ee",
10
10
  size = "medium",
11
+ strength = 26,
12
+ icon = null,
13
+ loading = false,
11
14
  disabled = false,
12
- rounded = true
15
+ fullWidth = false
13
16
  }) => {
17
+ const btnRef = useRef(null);
18
+ const [offset, setOffset] = useState({ x: 0, y: 0 });
14
19
  const [isHovered, setIsHovered] = useState(false);
15
- const [isPressed, setIsPressed] = useState(false);
20
+ const [isFocused, setIsFocused] = useState(false);
21
+ const isInactive = disabled || loading;
16
22
  const sizeStyles = {
17
- small: { padding: "6px 14px", fontSize: "13px" },
18
- medium: { padding: "10px 20px", fontSize: "15px" },
19
- large: { padding: "14px 28px", fontSize: "17px" }
23
+ small: { padding: "8px 18px", fontSize: "13px", gap: "6px" },
24
+ medium: { padding: "12px 26px", fontSize: "15px", gap: "8px" },
25
+ large: { padding: "16px 34px", fontSize: "17px", gap: "10px" }
20
26
  };
21
- const styles = {
22
- backgroundColor: disabled ? "#a0a0a0" : isHovered ? hoverColor : bgColor,
23
- color: textColor,
24
- border: "none",
25
- borderRadius: rounded ? "9999px" : "6px",
26
- cursor: disabled ? "not-allowed" : "pointer",
27
- fontWeight: 600,
28
- fontFamily: "inherit",
29
- transition: "all 0.2s ease",
30
- transform: isPressed ? "scale(0.96)" : isHovered ? "scale(1.03)" : "scale(1)",
31
- boxShadow: isHovered && !disabled ? "0 6px 14px rgba(0,0,0,0.18)" : "0 2px 6px rgba(0,0,0,0.12)",
32
- outline: "none",
33
- ...sizeStyles[size]
27
+ const palette = theme === "light" ? { base: "#ffffff", text: "#111827", border: "rgba(0,0,0,0.12)" } : { base: "#111827", text: "#f9fafb", border: "rgba(255,255,255,0.14)" };
28
+ const variantStyles = {
29
+ solid: {
30
+ backgroundColor: palette.base,
31
+ color: palette.text,
32
+ border: `1px solid ${isHovered ? accentColor : palette.border}`
33
+ },
34
+ outline: {
35
+ backgroundColor: "transparent",
36
+ color: theme === "light" ? "#111827" : "#f9fafb",
37
+ border: `1.5px solid ${isHovered ? accentColor : palette.border}`
38
+ },
39
+ ghost: {
40
+ backgroundColor: isHovered ? theme === "light" ? "rgba(0,0,0,0.05)" : "rgba(255,255,255,0.08)" : "transparent",
41
+ color: theme === "light" ? "#111827" : "#f9fafb",
42
+ border: "1px solid transparent"
43
+ },
44
+ gradient: {
45
+ backgroundImage: `linear-gradient(135deg, ${accentColor}, ${palette.base})`,
46
+ color: "#ffffff",
47
+ border: "1px solid transparent"
48
+ }
49
+ };
50
+ const handleMouseMove = (e) => {
51
+ if (isInactive || !btnRef.current) return;
52
+ const rect = btnRef.current.getBoundingClientRect();
53
+ const relX = e.clientX - rect.left - rect.width / 2;
54
+ const relY = e.clientY - rect.top - rect.height / 2;
55
+ setOffset({ x: relX / rect.width * strength, y: relY / rect.height * strength });
56
+ };
57
+ const resetOffset = () => {
58
+ setIsHovered(false);
59
+ setOffset({ x: 0, y: 0 });
34
60
  };
35
61
  return /* @__PURE__ */ React.createElement(
36
62
  "button",
37
63
  {
38
- style: styles,
39
- disabled,
40
- onClick,
41
- onMouseEnter: () => setIsHovered(true),
42
- onMouseLeave: () => {
43
- setIsHovered(false);
44
- setIsPressed(false);
45
- },
46
- onMouseDown: () => setIsPressed(true),
47
- onMouseUp: () => setIsPressed(false)
64
+ ref: btnRef,
65
+ type: "button",
66
+ "aria-disabled": isInactive,
67
+ "aria-busy": loading,
68
+ disabled: isInactive,
69
+ onClick: isInactive ? void 0 : onClick,
70
+ onMouseEnter: () => !isInactive && setIsHovered(true),
71
+ onMouseMove: handleMouseMove,
72
+ onMouseLeave: resetOffset,
73
+ onFocus: () => setIsFocused(true),
74
+ onBlur: () => setIsFocused(false),
75
+ style: {
76
+ position: "relative",
77
+ display: "inline-flex",
78
+ alignItems: "center",
79
+ justifyContent: "center",
80
+ width: fullWidth ? "100%" : "auto",
81
+ borderRadius: "9999px",
82
+ fontWeight: 600,
83
+ fontFamily: "inherit",
84
+ cursor: isInactive ? "not-allowed" : "pointer",
85
+ opacity: disabled ? 0.5 : 1,
86
+ overflow: "hidden",
87
+ transform: `translate(${offset.x}px, ${offset.y}px) scale(${isHovered && !isInactive ? 1.05 : 1})`,
88
+ transition: isHovered ? "transform 0.12s ease-out, border-color 0.2s ease, box-shadow 0.2s ease" : "transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease",
89
+ boxShadow: isFocused ? `0 0 0 3px ${accentColor}55` : isHovered && !isInactive ? `0 0 24px ${accentColor}55` : "0 4px 10px rgba(0,0,0,0.15)",
90
+ outline: "none",
91
+ ...sizeStyles[size],
92
+ ...variantStyles[variant]
93
+ }
48
94
  },
49
- text
95
+ loading ? /* @__PURE__ */ React.createElement(
96
+ "span",
97
+ {
98
+ "aria-hidden": "true",
99
+ style: {
100
+ width: "15px",
101
+ height: "15px",
102
+ borderRadius: "50%",
103
+ border: `2px solid ${theme === "light" ? "rgba(0,0,0,0.2)" : "rgba(255,255,255,0.3)"}`,
104
+ borderTopColor: accentColor,
105
+ animation: "mb-spin 0.7s linear infinite"
106
+ }
107
+ }
108
+ ) : /* @__PURE__ */ React.createElement(React.Fragment, null, icon && /* @__PURE__ */ React.createElement("span", { style: { display: "inline-flex", alignItems: "center" } }, icon), /* @__PURE__ */ React.createElement(
109
+ "span",
110
+ {
111
+ style: {
112
+ position: "relative",
113
+ zIndex: 1,
114
+ background: isHovered && !isInactive && variant !== "gradient" ? `linear-gradient(90deg, currentColor, ${accentColor})` : "none",
115
+ WebkitBackgroundClip: isHovered && !isInactive && variant !== "gradient" ? "text" : "unset",
116
+ WebkitTextFillColor: isHovered && !isInactive && variant !== "gradient" ? "transparent" : "currentColor",
117
+ transition: "all 0.3s ease"
118
+ }
119
+ },
120
+ text
121
+ )),
122
+ /* @__PURE__ */ React.createElement("style", null, `@keyframes mb-spin { to { transform: rotate(360deg); } }`)
50
123
  );
51
124
  };
52
125
 
53
126
  // src/components/Card/Card.jsx
54
- import React2, { useState as useState2 } from "react";
127
+ import React2, { useRef as useRef2, useState as useState2 } from "react";
55
128
  var Card = ({
56
- title = "Card Title",
57
- description = "This is a simple, reusable card component built with React.",
58
- imageUrl = "",
59
- bgColor = "#ffffff",
60
- textColor = "#1f2937",
61
- accentColor = "#4f46e5",
62
- width = "300px",
63
- rounded = true,
64
- elevated = true,
65
- buttonText = "Learn More",
66
- onButtonClick = () => {
67
- },
68
- showButton = true
129
+ title = "Spotlight Card",
130
+ description = "Move your cursor over this card to see the glow follow you.",
131
+ eyebrow = "",
132
+ tags = [],
133
+ theme = "dark",
134
+ spotlightColor = "rgba(99, 102, 241, 0.35)",
135
+ width = "320px",
136
+ footer = null,
137
+ bordered = true,
138
+ interactive = true,
139
+ onClick = null
69
140
  }) => {
141
+ const cardRef = useRef2(null);
142
+ const [pos, setPos] = useState2({ x: 50, y: 50 });
70
143
  const [isHovered, setIsHovered] = useState2(false);
71
- const [isButtonHovered, setIsButtonHovered] = useState2(false);
72
- const [isButtonPressed, setIsButtonPressed] = useState2(false);
73
- const cardStyles = {
74
- width,
75
- backgroundColor: bgColor,
76
- color: textColor,
77
- borderRadius: rounded ? "16px" : "4px",
78
- overflow: "hidden",
79
- boxShadow: isHovered ? "0 12px 24px rgba(0,0,0,0.18)" : elevated ? "0 4px 12px rgba(0,0,0,0.1)" : "0 1px 3px rgba(0,0,0,0.08)",
80
- transform: isHovered ? "translateY(-6px)" : "translateY(0)",
81
- transition: "all 0.25s ease",
82
- fontFamily: "inherit",
83
- border: "1px solid rgba(0,0,0,0.06)",
84
- display: "flex",
85
- flexDirection: "column"
86
- };
87
- const imageStyles = {
88
- width: "100%",
89
- height: "160px",
90
- objectFit: "cover",
91
- display: "block"
92
- };
93
- const contentStyles = {
94
- padding: "18px 20px",
95
- display: "flex",
96
- flexDirection: "column",
97
- gap: "8px"
98
- };
99
- const titleStyles = {
100
- margin: 0,
101
- fontSize: "18px",
102
- fontWeight: 700,
103
- color: textColor
104
- };
105
- const descStyles = {
106
- margin: 0,
107
- fontSize: "14px",
108
- lineHeight: 1.5,
109
- color: textColor,
110
- opacity: 0.75
111
- };
112
- const buttonStyles = {
113
- marginTop: "10px",
114
- alignSelf: "flex-start",
115
- padding: "8px 18px",
116
- fontSize: "13px",
117
- fontWeight: 600,
118
- color: "#ffffff",
119
- backgroundColor: accentColor,
120
- border: "none",
121
- borderRadius: rounded ? "9999px" : "6px",
122
- cursor: "pointer",
123
- transition: "all 0.2s ease",
124
- transform: isButtonPressed ? "scale(0.96)" : isButtonHovered ? "scale(1.04)" : "scale(1)",
125
- opacity: isButtonHovered ? 0.9 : 1
144
+ const palette = theme === "light" ? { bg: "#ffffff", text: "#111827", subtext: "#4b5563", border: "rgba(0,0,0,0.08)", tagBg: "rgba(0,0,0,0.05)" } : { bg: "#0f0f14", text: "#f4f4f5", subtext: "#a1a1aa", border: "rgba(255,255,255,0.08)", tagBg: "rgba(255,255,255,0.06)" };
145
+ const handleMouseMove = (e) => {
146
+ if (!cardRef.current) return;
147
+ const rect = cardRef.current.getBoundingClientRect();
148
+ setPos({
149
+ x: (e.clientX - rect.left) / rect.width * 100,
150
+ y: (e.clientY - rect.top) / rect.height * 100
151
+ });
126
152
  };
153
+ const Wrapper = onClick ? "button" : "div";
127
154
  return /* @__PURE__ */ React2.createElement(
128
- "div",
155
+ Wrapper,
129
156
  {
130
- style: cardStyles,
157
+ ref: cardRef,
158
+ type: onClick ? "button" : void 0,
159
+ onClick: onClick || void 0,
131
160
  onMouseEnter: () => setIsHovered(true),
132
- onMouseLeave: () => setIsHovered(false)
161
+ onMouseMove: handleMouseMove,
162
+ onMouseLeave: () => setIsHovered(false),
163
+ style: {
164
+ position: "relative",
165
+ display: "block",
166
+ textAlign: "left",
167
+ width,
168
+ padding: "28px",
169
+ borderRadius: "18px",
170
+ backgroundColor: palette.bg,
171
+ color: palette.text,
172
+ border: `1px solid ${isHovered && bordered ? spotlightColor.replace(/[\d.]+\)$/, "0.9)") : palette.border}`,
173
+ overflow: "hidden",
174
+ fontFamily: "inherit",
175
+ cursor: onClick ? "pointer" : "default",
176
+ transition: "transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease",
177
+ transform: interactive && isHovered ? "translateY(-4px)" : "translateY(0)",
178
+ boxShadow: interactive && isHovered ? "0 20px 40px rgba(0,0,0,0.35)" : "0 8px 20px rgba(0,0,0,0.18)",
179
+ outline: "none"
180
+ }
133
181
  },
134
- imageUrl && /* @__PURE__ */ React2.createElement("img", { src: imageUrl, alt: title, style: imageStyles }),
135
- /* @__PURE__ */ React2.createElement("div", { style: contentStyles }, /* @__PURE__ */ React2.createElement("h3", { style: titleStyles }, title), /* @__PURE__ */ React2.createElement("p", { style: descStyles }, description), showButton && /* @__PURE__ */ React2.createElement(
136
- "button",
182
+ /* @__PURE__ */ React2.createElement(
183
+ "div",
137
184
  {
138
- style: buttonStyles,
139
- onClick: onButtonClick,
140
- onMouseEnter: () => setIsButtonHovered(true),
141
- onMouseLeave: () => {
142
- setIsButtonHovered(false);
143
- setIsButtonPressed(false);
144
- },
145
- onMouseDown: () => setIsButtonPressed(true),
146
- onMouseUp: () => setIsButtonPressed(false)
185
+ "aria-hidden": "true",
186
+ style: {
187
+ position: "absolute",
188
+ inset: 0,
189
+ opacity: isHovered ? 1 : 0,
190
+ transition: "opacity 0.3s ease",
191
+ background: `radial-gradient(circle 220px at ${pos.x}% ${pos.y}%, ${spotlightColor}, transparent 70%)`,
192
+ pointerEvents: "none"
193
+ }
194
+ }
195
+ ),
196
+ /* @__PURE__ */ React2.createElement("div", { style: { position: "relative", zIndex: 1 } }, eyebrow && /* @__PURE__ */ React2.createElement(
197
+ "div",
198
+ {
199
+ style: {
200
+ fontSize: "11px",
201
+ fontWeight: 700,
202
+ letterSpacing: "0.08em",
203
+ textTransform: "uppercase",
204
+ color: palette.subtext,
205
+ marginBottom: "8px"
206
+ }
207
+ },
208
+ eyebrow
209
+ ), /* @__PURE__ */ React2.createElement("h3", { style: { margin: "0 0 10px 0", fontSize: "19px", fontWeight: 700, lineHeight: 1.3 } }, title), /* @__PURE__ */ React2.createElement("p", { style: { margin: 0, fontSize: "14px", lineHeight: 1.6, color: palette.subtext } }, description), tags.length > 0 && /* @__PURE__ */ React2.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px", marginTop: "16px" } }, tags.map((tag, i) => /* @__PURE__ */ React2.createElement(
210
+ "span",
211
+ {
212
+ key: i,
213
+ style: {
214
+ fontSize: "11px",
215
+ fontWeight: 600,
216
+ padding: "4px 10px",
217
+ borderRadius: "9999px",
218
+ backgroundColor: palette.tagBg,
219
+ color: palette.subtext
220
+ }
147
221
  },
148
- buttonText
222
+ tag
223
+ ))), footer && /* @__PURE__ */ React2.createElement(
224
+ "div",
225
+ {
226
+ style: {
227
+ marginTop: "20px",
228
+ paddingTop: "16px",
229
+ borderTop: `1px solid ${palette.border}`
230
+ }
231
+ },
232
+ footer
149
233
  ))
150
234
  );
151
235
  };
236
+
237
+ // src/components/ProfileCard/ProfileCard.jsx
238
+ import React3, { useState as useState3 } from "react";
239
+ var ProfileCard = ({
240
+ name = "Aditi Sharma",
241
+ role = "Full-Stack Developer",
242
+ bio = "Building clean, accessible interfaces and scalable backends.",
243
+ avatarUrl = "",
244
+ theme = "dark",
245
+ // "dark" | "light"
246
+ accentColor = "#6366f1",
247
+ stats = [
248
+ { label: "Projects", value: 24 },
249
+ { label: "Followers", value: "1.2k" },
250
+ { label: "Following", value: 180 }
251
+ ],
252
+ socials = [],
253
+ actionText = "Follow",
254
+ onAction = () => {
255
+ },
256
+ secondaryText = "Message",
257
+ onSecondary = null,
258
+ maxWidth = "340px"
259
+ }) => {
260
+ const [isCardHovered, setIsCardHovered] = useState3(false);
261
+ const [isAvatarHovered, setIsAvatarHovered] = useState3(false);
262
+ const [isFollowing, setIsFollowing] = useState3(false);
263
+ const [primaryHover, setPrimaryHover] = useState3(false);
264
+ const [secondaryHover, setSecondaryHover] = useState3(false);
265
+ const palette = theme === "light" ? { bg: "#ffffff", text: "#111827", subtext: "#6b7280", border: "rgba(0,0,0,0.08)", statBg: "rgba(0,0,0,0.03)" } : { bg: "#131318", text: "#f4f4f5", subtext: "#a1a1aa", border: "rgba(255,255,255,0.08)", statBg: "rgba(255,255,255,0.04)" };
266
+ const initials = name.split(" ").map((w) => w[0]).slice(0, 2).join("").toUpperCase();
267
+ const handlePrimaryClick = () => {
268
+ setIsFollowing((prev) => !prev);
269
+ onAction();
270
+ };
271
+ return /* @__PURE__ */ React3.createElement(
272
+ "div",
273
+ {
274
+ onMouseEnter: () => setIsCardHovered(true),
275
+ onMouseLeave: () => setIsCardHovered(false),
276
+ style: {
277
+ width: "100%",
278
+ maxWidth,
279
+ boxSizing: "border-box",
280
+ margin: "0 auto",
281
+ padding: "clamp(18px, 4vw, 28px)",
282
+ borderRadius: "18px",
283
+ backgroundColor: palette.bg,
284
+ color: palette.text,
285
+ border: `1px solid ${isCardHovered ? accentColor + "66" : palette.border}`,
286
+ fontFamily: "inherit",
287
+ textAlign: "center",
288
+ transition: "transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease",
289
+ transform: isCardHovered ? "translateY(-4px)" : "translateY(0)",
290
+ boxShadow: isCardHovered ? "0 20px 40px rgba(0,0,0,0.25)" : "0 6px 16px rgba(0,0,0,0.12)"
291
+ }
292
+ },
293
+ /* @__PURE__ */ React3.createElement(
294
+ "div",
295
+ {
296
+ onMouseEnter: () => setIsAvatarHovered(true),
297
+ onMouseLeave: () => setIsAvatarHovered(false),
298
+ style: {
299
+ width: "clamp(64px, 22vw, 84px)",
300
+ height: "clamp(64px, 22vw, 84px)",
301
+ margin: "0 auto 14px",
302
+ borderRadius: "50%",
303
+ overflow: "hidden",
304
+ display: "flex",
305
+ alignItems: "center",
306
+ justifyContent: "center",
307
+ fontWeight: 700,
308
+ fontSize: "clamp(18px, 5vw, 24px)",
309
+ color: "#ffffff",
310
+ backgroundImage: `linear-gradient(135deg, ${accentColor}, ${accentColor}99)`,
311
+ border: `3px solid ${palette.bg}`,
312
+ boxShadow: isAvatarHovered ? `0 0 0 3px ${accentColor}55` : "0 0 0 0 transparent",
313
+ transform: isAvatarHovered ? "scale(1.06)" : "scale(1)",
314
+ transition: "transform 0.25s ease, box-shadow 0.25s ease"
315
+ }
316
+ },
317
+ avatarUrl ? /* @__PURE__ */ React3.createElement(
318
+ "img",
319
+ {
320
+ src: avatarUrl,
321
+ alt: name,
322
+ style: { width: "100%", height: "100%", objectFit: "cover", display: "block" }
323
+ }
324
+ ) : initials
325
+ ),
326
+ /* @__PURE__ */ React3.createElement("h3", { style: { margin: "0 0 2px 0", fontSize: "clamp(16px, 4vw, 19px)", fontWeight: 700 } }, name),
327
+ /* @__PURE__ */ React3.createElement("p", { style: { margin: "0 0 10px 0", fontSize: "13px", fontWeight: 500, color: accentColor } }, role),
328
+ /* @__PURE__ */ React3.createElement(
329
+ "p",
330
+ {
331
+ style: {
332
+ margin: "0 0 18px 0",
333
+ fontSize: "13.5px",
334
+ lineHeight: 1.6,
335
+ color: palette.subtext
336
+ }
337
+ },
338
+ bio
339
+ ),
340
+ stats.length > 0 && /* @__PURE__ */ React3.createElement(
341
+ "div",
342
+ {
343
+ style: {
344
+ display: "flex",
345
+ flexWrap: "wrap",
346
+ justifyContent: "center",
347
+ gap: "8px",
348
+ marginBottom: "18px"
349
+ }
350
+ },
351
+ stats.map((s, i) => /* @__PURE__ */ React3.createElement(
352
+ "div",
353
+ {
354
+ key: i,
355
+ style: {
356
+ flex: "1 1 80px",
357
+ minWidth: "72px",
358
+ padding: "8px 6px",
359
+ borderRadius: "12px",
360
+ backgroundColor: palette.statBg
361
+ }
362
+ },
363
+ /* @__PURE__ */ React3.createElement("div", { style: { fontSize: "15px", fontWeight: 700 } }, s.value),
364
+ /* @__PURE__ */ React3.createElement("div", { style: { fontSize: "11px", color: palette.subtext, marginTop: "2px" } }, s.label)
365
+ ))
366
+ ),
367
+ /* @__PURE__ */ React3.createElement("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" } }, /* @__PURE__ */ React3.createElement(
368
+ "button",
369
+ {
370
+ onClick: handlePrimaryClick,
371
+ onMouseEnter: () => setPrimaryHover(true),
372
+ onMouseLeave: () => setPrimaryHover(false),
373
+ style: {
374
+ flex: "1 1 auto",
375
+ minWidth: "100px",
376
+ padding: "10px 16px",
377
+ fontSize: "13.5px",
378
+ fontWeight: 600,
379
+ borderRadius: "9999px",
380
+ border: isFollowing ? `1.5px solid ${accentColor}` : "1.5px solid transparent",
381
+ backgroundColor: isFollowing ? "transparent" : accentColor,
382
+ color: isFollowing ? accentColor : "#ffffff",
383
+ cursor: "pointer",
384
+ transition: "all 0.2s ease",
385
+ transform: primaryHover ? "scale(1.03)" : "scale(1)"
386
+ }
387
+ },
388
+ isFollowing ? "Following" : actionText
389
+ ), secondaryText && /* @__PURE__ */ React3.createElement(
390
+ "button",
391
+ {
392
+ onClick: onSecondary || (() => {
393
+ }),
394
+ onMouseEnter: () => setSecondaryHover(true),
395
+ onMouseLeave: () => setSecondaryHover(false),
396
+ style: {
397
+ flex: "1 1 auto",
398
+ minWidth: "100px",
399
+ padding: "10px 16px",
400
+ fontSize: "13.5px",
401
+ fontWeight: 600,
402
+ borderRadius: "9999px",
403
+ border: `1.5px solid ${palette.border}`,
404
+ backgroundColor: secondaryHover ? palette.statBg : "transparent",
405
+ color: palette.text,
406
+ cursor: "pointer",
407
+ transition: "all 0.2s ease",
408
+ transform: secondaryHover ? "scale(1.03)" : "scale(1)"
409
+ }
410
+ },
411
+ secondaryText
412
+ )),
413
+ socials.length > 0 && /* @__PURE__ */ React3.createElement(
414
+ "div",
415
+ {
416
+ style: {
417
+ display: "flex",
418
+ justifyContent: "center",
419
+ gap: "14px",
420
+ marginTop: "16px",
421
+ flexWrap: "wrap"
422
+ }
423
+ },
424
+ socials.map((s, i) => /* @__PURE__ */ React3.createElement(
425
+ "a",
426
+ {
427
+ key: i,
428
+ href: s.href,
429
+ target: "_blank",
430
+ rel: "noopener noreferrer",
431
+ style: {
432
+ fontSize: "12px",
433
+ fontWeight: 600,
434
+ color: palette.subtext,
435
+ textDecoration: "none",
436
+ transition: "color 0.2s ease"
437
+ },
438
+ onMouseEnter: (e) => e.currentTarget.style.color = accentColor,
439
+ onMouseLeave: (e) => e.currentTarget.style.color = palette.subtext
440
+ },
441
+ s.label
442
+ ))
443
+ )
444
+ );
445
+ };
152
446
  export {
153
447
  Button,
154
- Card
448
+ Card,
449
+ ProfileCard
155
450
  };
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "generative-ui-library",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Generative UI React Component Library",
5
5
  "license": "ISC",
6
6
  "author": "Pankajkumar",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.mjs",
9
- "files": ["dist"],
9
+ "files": [
10
+ "dist"
11
+ ],
10
12
  "scripts": {
11
13
  "build": "tsup"
12
14
  },