surya-virtual-ui-lib 1.0.81 → 1.0.82
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 +108 -2
- package/dist/index.mjs +106 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,7 +30,8 @@ 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
|
+
ImageCard: () => ImageCard
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(index_exports);
|
|
36
37
|
|
|
@@ -191,8 +192,113 @@ var Card = ({
|
|
|
191
192
|
} }, "\u2192"))
|
|
192
193
|
);
|
|
193
194
|
};
|
|
195
|
+
|
|
196
|
+
// src/components/ImageCard/ImageCard.jsx
|
|
197
|
+
var import_react3 = __toESM(require("react"));
|
|
198
|
+
var ImageCard = ({
|
|
199
|
+
image = "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600&q=80",
|
|
200
|
+
tag = "Travel",
|
|
201
|
+
title = "Discover the Hidden Peaks of the Himalayas",
|
|
202
|
+
description = "A breathtaking journey through untouched landscapes, ancient monasteries, and snow-capped summits that few have ever seen.",
|
|
203
|
+
buttonText = "Read More",
|
|
204
|
+
accent = "#6366f1",
|
|
205
|
+
bg = "#0f172a",
|
|
206
|
+
radius = "20px",
|
|
207
|
+
onButtonClick = () => {
|
|
208
|
+
}
|
|
209
|
+
}) => {
|
|
210
|
+
const [hovered, setHovered] = (0, import_react3.useState)(false);
|
|
211
|
+
const alpha = (hex, op) => {
|
|
212
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
213
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
214
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
215
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
216
|
+
};
|
|
217
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
218
|
+
"div",
|
|
219
|
+
{
|
|
220
|
+
onMouseEnter: () => setHovered(true),
|
|
221
|
+
onMouseLeave: () => setHovered(false),
|
|
222
|
+
style: {
|
|
223
|
+
background: bg,
|
|
224
|
+
borderRadius: radius,
|
|
225
|
+
overflow: "hidden",
|
|
226
|
+
width: "300px",
|
|
227
|
+
border: `1px solid ${hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"}`,
|
|
228
|
+
fontFamily: "system-ui, sans-serif",
|
|
229
|
+
transition: "border-color 0.25s, transform 0.25s",
|
|
230
|
+
transform: hovered ? "translateY(-4px)" : "none",
|
|
231
|
+
boxShadow: hovered ? `0 16px 40px rgba(0,0,0,0.5)` : "0 4px 20px rgba(0,0,0,0.3)"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
/* @__PURE__ */ import_react3.default.createElement("div", { style: { position: "relative", width: "100%", height: "180px", overflow: "hidden" } }, /* @__PURE__ */ import_react3.default.createElement(
|
|
235
|
+
"img",
|
|
236
|
+
{
|
|
237
|
+
src: image,
|
|
238
|
+
alt: title,
|
|
239
|
+
style: {
|
|
240
|
+
width: "100%",
|
|
241
|
+
height: "100%",
|
|
242
|
+
objectFit: "cover",
|
|
243
|
+
transform: hovered ? "scale(1.05)" : "scale(1)",
|
|
244
|
+
transition: "transform 0.4s ease"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
), /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
248
|
+
position: "absolute",
|
|
249
|
+
inset: 0,
|
|
250
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)"
|
|
251
|
+
} }), tag && /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
252
|
+
position: "absolute",
|
|
253
|
+
top: "12px",
|
|
254
|
+
left: "12px",
|
|
255
|
+
padding: "4px 10px",
|
|
256
|
+
borderRadius: "20px",
|
|
257
|
+
background: alpha(accent, 0.85),
|
|
258
|
+
fontSize: "10px",
|
|
259
|
+
fontWeight: "700",
|
|
260
|
+
color: "#fff",
|
|
261
|
+
letterSpacing: "0.5px",
|
|
262
|
+
textTransform: "uppercase"
|
|
263
|
+
} }, tag)),
|
|
264
|
+
/* @__PURE__ */ import_react3.default.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ import_react3.default.createElement("h3", { style: {
|
|
265
|
+
fontSize: "15px",
|
|
266
|
+
fontWeight: "700",
|
|
267
|
+
color: "#fff",
|
|
268
|
+
margin: "0 0 8px",
|
|
269
|
+
lineHeight: 1.4
|
|
270
|
+
} }, title), /* @__PURE__ */ import_react3.default.createElement("p", { style: {
|
|
271
|
+
fontSize: "13px",
|
|
272
|
+
color: "rgba(255,255,255,0.45)",
|
|
273
|
+
lineHeight: 1.65,
|
|
274
|
+
margin: "0 0 18px"
|
|
275
|
+
} }, description), /* @__PURE__ */ import_react3.default.createElement(
|
|
276
|
+
"button",
|
|
277
|
+
{
|
|
278
|
+
onClick: onButtonClick,
|
|
279
|
+
style: {
|
|
280
|
+
width: "100%",
|
|
281
|
+
padding: "11px",
|
|
282
|
+
borderRadius: "12px",
|
|
283
|
+
border: "none",
|
|
284
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})`,
|
|
285
|
+
color: "#fff",
|
|
286
|
+
fontSize: "13px",
|
|
287
|
+
fontWeight: "700",
|
|
288
|
+
cursor: "pointer",
|
|
289
|
+
fontFamily: "inherit",
|
|
290
|
+
transition: "opacity 0.2s"
|
|
291
|
+
},
|
|
292
|
+
onMouseEnter: (e) => e.currentTarget.style.opacity = "0.85",
|
|
293
|
+
onMouseLeave: (e) => e.currentTarget.style.opacity = "1"
|
|
294
|
+
},
|
|
295
|
+
buttonText
|
|
296
|
+
))
|
|
297
|
+
);
|
|
298
|
+
};
|
|
194
299
|
// Annotate the CommonJS export names for ESM import in node:
|
|
195
300
|
0 && (module.exports = {
|
|
196
301
|
Button,
|
|
197
|
-
Card
|
|
302
|
+
Card,
|
|
303
|
+
ImageCard
|
|
198
304
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -155,7 +155,112 @@ var Card = ({
|
|
|
155
155
|
} }, "\u2192"))
|
|
156
156
|
);
|
|
157
157
|
};
|
|
158
|
+
|
|
159
|
+
// src/components/ImageCard/ImageCard.jsx
|
|
160
|
+
import React3, { useState as useState3 } from "react";
|
|
161
|
+
var ImageCard = ({
|
|
162
|
+
image = "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600&q=80",
|
|
163
|
+
tag = "Travel",
|
|
164
|
+
title = "Discover the Hidden Peaks of the Himalayas",
|
|
165
|
+
description = "A breathtaking journey through untouched landscapes, ancient monasteries, and snow-capped summits that few have ever seen.",
|
|
166
|
+
buttonText = "Read More",
|
|
167
|
+
accent = "#6366f1",
|
|
168
|
+
bg = "#0f172a",
|
|
169
|
+
radius = "20px",
|
|
170
|
+
onButtonClick = () => {
|
|
171
|
+
}
|
|
172
|
+
}) => {
|
|
173
|
+
const [hovered, setHovered] = useState3(false);
|
|
174
|
+
const alpha = (hex, op) => {
|
|
175
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
176
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
177
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
178
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
179
|
+
};
|
|
180
|
+
return /* @__PURE__ */ React3.createElement(
|
|
181
|
+
"div",
|
|
182
|
+
{
|
|
183
|
+
onMouseEnter: () => setHovered(true),
|
|
184
|
+
onMouseLeave: () => setHovered(false),
|
|
185
|
+
style: {
|
|
186
|
+
background: bg,
|
|
187
|
+
borderRadius: radius,
|
|
188
|
+
overflow: "hidden",
|
|
189
|
+
width: "300px",
|
|
190
|
+
border: `1px solid ${hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"}`,
|
|
191
|
+
fontFamily: "system-ui, sans-serif",
|
|
192
|
+
transition: "border-color 0.25s, transform 0.25s",
|
|
193
|
+
transform: hovered ? "translateY(-4px)" : "none",
|
|
194
|
+
boxShadow: hovered ? `0 16px 40px rgba(0,0,0,0.5)` : "0 4px 20px rgba(0,0,0,0.3)"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
/* @__PURE__ */ React3.createElement("div", { style: { position: "relative", width: "100%", height: "180px", overflow: "hidden" } }, /* @__PURE__ */ React3.createElement(
|
|
198
|
+
"img",
|
|
199
|
+
{
|
|
200
|
+
src: image,
|
|
201
|
+
alt: title,
|
|
202
|
+
style: {
|
|
203
|
+
width: "100%",
|
|
204
|
+
height: "100%",
|
|
205
|
+
objectFit: "cover",
|
|
206
|
+
transform: hovered ? "scale(1.05)" : "scale(1)",
|
|
207
|
+
transition: "transform 0.4s ease"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
), /* @__PURE__ */ React3.createElement("div", { style: {
|
|
211
|
+
position: "absolute",
|
|
212
|
+
inset: 0,
|
|
213
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)"
|
|
214
|
+
} }), tag && /* @__PURE__ */ React3.createElement("div", { style: {
|
|
215
|
+
position: "absolute",
|
|
216
|
+
top: "12px",
|
|
217
|
+
left: "12px",
|
|
218
|
+
padding: "4px 10px",
|
|
219
|
+
borderRadius: "20px",
|
|
220
|
+
background: alpha(accent, 0.85),
|
|
221
|
+
fontSize: "10px",
|
|
222
|
+
fontWeight: "700",
|
|
223
|
+
color: "#fff",
|
|
224
|
+
letterSpacing: "0.5px",
|
|
225
|
+
textTransform: "uppercase"
|
|
226
|
+
} }, tag)),
|
|
227
|
+
/* @__PURE__ */ React3.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ React3.createElement("h3", { style: {
|
|
228
|
+
fontSize: "15px",
|
|
229
|
+
fontWeight: "700",
|
|
230
|
+
color: "#fff",
|
|
231
|
+
margin: "0 0 8px",
|
|
232
|
+
lineHeight: 1.4
|
|
233
|
+
} }, title), /* @__PURE__ */ React3.createElement("p", { style: {
|
|
234
|
+
fontSize: "13px",
|
|
235
|
+
color: "rgba(255,255,255,0.45)",
|
|
236
|
+
lineHeight: 1.65,
|
|
237
|
+
margin: "0 0 18px"
|
|
238
|
+
} }, description), /* @__PURE__ */ React3.createElement(
|
|
239
|
+
"button",
|
|
240
|
+
{
|
|
241
|
+
onClick: onButtonClick,
|
|
242
|
+
style: {
|
|
243
|
+
width: "100%",
|
|
244
|
+
padding: "11px",
|
|
245
|
+
borderRadius: "12px",
|
|
246
|
+
border: "none",
|
|
247
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})`,
|
|
248
|
+
color: "#fff",
|
|
249
|
+
fontSize: "13px",
|
|
250
|
+
fontWeight: "700",
|
|
251
|
+
cursor: "pointer",
|
|
252
|
+
fontFamily: "inherit",
|
|
253
|
+
transition: "opacity 0.2s"
|
|
254
|
+
},
|
|
255
|
+
onMouseEnter: (e) => e.currentTarget.style.opacity = "0.85",
|
|
256
|
+
onMouseLeave: (e) => e.currentTarget.style.opacity = "1"
|
|
257
|
+
},
|
|
258
|
+
buttonText
|
|
259
|
+
))
|
|
260
|
+
);
|
|
261
|
+
};
|
|
158
262
|
export {
|
|
159
263
|
Button,
|
|
160
|
-
Card
|
|
264
|
+
Card,
|
|
265
|
+
ImageCard
|
|
161
266
|
};
|