trepur_components 2.3.37 → 2.3.38
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.
|
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
3
3
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
7
|
Image: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<import('../Image').ImageProps> & import('../Image').ImageProps & import('react').RefAttributes<HTMLImageElement>>;
|
|
8
8
|
Images: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
9
9
|
asCarousel?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ImageProps } from '../Image';
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
|
-
declare const ImageCard: import('react').ForwardRefExoticComponent<HTMLAttributes<
|
|
4
|
+
declare const ImageCard: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
5
5
|
Image: import('react').ForwardRefExoticComponent<HTMLAttributes<ImageProps> & ImageProps & import('react').RefAttributes<HTMLImageElement>>;
|
|
6
6
|
Images: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
7
7
|
asCarousel?: boolean | undefined;
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Image as
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { Image as I } from "../Image/index.js";
|
|
4
4
|
import N from "clsx";
|
|
5
5
|
import { Carousel as s } from "../Carousel/index.js";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
6
|
+
const d = t(({ className: e, children: a, onClick: r, ...p }, C) => (
|
|
7
|
+
// <a
|
|
8
|
+
// ref={ref}
|
|
9
|
+
// className="inline-block h-full"
|
|
10
|
+
// href=""
|
|
11
|
+
// onClick={onClick}
|
|
12
|
+
// {...props}
|
|
13
|
+
// >
|
|
14
|
+
/* @__PURE__ */ m(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
ref: C,
|
|
18
|
+
className: N(
|
|
19
|
+
"grid max-w-96 overflow-hidden rounded-xl bg-white drop-shadow",
|
|
20
|
+
e
|
|
21
|
+
),
|
|
22
|
+
...p,
|
|
23
|
+
children: a
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
)), o = t(({ children: e, asCarousel: a = !1, ...r }) => a ? /* @__PURE__ */ m(s, { perView: 1, spacing: 0, className: "h-64", loop: !0, ...r, children: /* @__PURE__ */ m(s.Content, { children: /* @__PURE__ */ m(s.Slides, { children: e }) }) }) : /* @__PURE__ */ m("div", { children: e[0] })), i = t(({ src: e, ...a }) => (
|
|
26
27
|
// <div className="keen-slider__slide h-64">
|
|
27
|
-
/* @__PURE__ */ m("div", { className: "h-64", children: /* @__PURE__ */ m(
|
|
28
|
-
)),
|
|
29
|
-
|
|
28
|
+
/* @__PURE__ */ m("div", { className: "h-64", children: /* @__PURE__ */ m(I, { className: "object-cover", src: e, ...a }) })
|
|
29
|
+
)), l = t(({ children: e, ...a }, r) => /* @__PURE__ */ m("div", { className: "px-2 pb-4 pt-2", ref: r, ...a, children: e })), n = t(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "text-lg", ref: a, ...e })), g = t(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "text-sm", ref: a, ...e })), c = t(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "line-clamp-4 pt-4", ref: a, ...e }));
|
|
30
|
+
d.displayName = "ImageCard";
|
|
30
31
|
i.displayName = "ImageCard.Image";
|
|
31
|
-
|
|
32
|
+
o.displayName = "ImageCard.Images";
|
|
32
33
|
n.displayName = "ImageCard.Title";
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const y = Object.assign(
|
|
34
|
+
g.displayName = "ImageCard.Subtitle";
|
|
35
|
+
l.displayName = "ImageCard.Content";
|
|
36
|
+
c.displayName = "ImageCard.Text";
|
|
37
|
+
const y = Object.assign(d, {
|
|
37
38
|
Image: i,
|
|
38
|
-
Images:
|
|
39
|
-
Content:
|
|
39
|
+
Images: o,
|
|
40
|
+
Content: l,
|
|
40
41
|
Title: n,
|
|
41
|
-
Subtitle:
|
|
42
|
-
Text:
|
|
42
|
+
Subtitle: g,
|
|
43
|
+
Text: c
|
|
43
44
|
});
|
|
44
45
|
export {
|
|
45
46
|
y as ImageCard
|
|
@@ -93,15 +93,16 @@ const i = w(null), g = d(({ className: t, children: r, loading: a }, o) => {
|
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
|
-
}), y = d(({ className: t, src: r,
|
|
97
|
-
const { loading:
|
|
98
|
-
return
|
|
96
|
+
}), y = d(({ className: t, src: r, alt: a, ...o }, s) => {
|
|
97
|
+
const { loading: l } = c(i) || {};
|
|
98
|
+
return l ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "h-20 w-20 animate-pulse bg-gray-300" }) }) : /* @__PURE__ */ e(
|
|
99
99
|
"img",
|
|
100
100
|
{
|
|
101
101
|
className: n("h-20 flex-none", t),
|
|
102
|
-
ref:
|
|
102
|
+
ref: s,
|
|
103
103
|
src: r,
|
|
104
|
-
|
|
104
|
+
alt: a,
|
|
105
|
+
...o
|
|
105
106
|
}
|
|
106
107
|
);
|
|
107
108
|
});
|