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.
@@ -1,5 +1,6 @@
1
1
  export interface ImageProps {
2
2
  src: string;
3
+ alt?: string;
3
4
  }
4
5
  declare const Image: any;
5
6
  export { Image };
@@ -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<HTMLAnchorElement> & import('react').RefAttributes<HTMLAnchorElement>> & {
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<HTMLAnchorElement> & import('react').RefAttributes<HTMLAnchorElement>> & {
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 r } from "react";
3
- import { Image as C } from "../Image/index.js";
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 l = r(({ className: e, children: a, onClick: t, ...p }, I) => /* @__PURE__ */ m(
7
- "a",
8
- {
9
- ref: I,
10
- className: "inline-block h-full",
11
- href: "",
12
- onClick: t,
13
- ...p,
14
- children: /* @__PURE__ */ m(
15
- "div",
16
- {
17
- className: N(
18
- "grid max-w-96 overflow-hidden rounded-xl bg-white drop-shadow",
19
- e
20
- ),
21
- children: a
22
- }
23
- )
24
- }
25
- )), d = r(({ children: e, asCarousel: a = !1, ...t }) => a ? /* @__PURE__ */ m(s, { perView: 1, spacing: 0, className: "h-64", loop: !0, ...t, children: /* @__PURE__ */ m(s.Content, { children: /* @__PURE__ */ m(s.Slides, { children: e }) }) }) : /* @__PURE__ */ m("div", { children: e[0] })), i = r(({ src: e, ...a }) => (
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(C, { className: "object-cover", src: e, ...a }) })
28
- )), o = r(({ children: e, ...a }, t) => /* @__PURE__ */ m("div", { className: "px-2 pb-4 pt-2", ref: t, ...a, children: e })), n = r(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "text-lg", ref: a, ...e })), c = r(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "text-sm", ref: a, ...e })), g = r(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "line-clamp-4 pt-4", ref: a, ...e }));
29
- l.displayName = "ImageCard";
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
- d.displayName = "ImageCard.Images";
32
+ o.displayName = "ImageCard.Images";
32
33
  n.displayName = "ImageCard.Title";
33
- c.displayName = "ImageCard.Subtitle";
34
- o.displayName = "ImageCard.Content";
35
- g.displayName = "ImageCard.Text";
36
- const y = Object.assign(l, {
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: d,
39
- Content: o,
39
+ Images: o,
40
+ Content: l,
40
41
  Title: n,
41
- Subtitle: c,
42
- Text: g
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, ...a }, o) => {
97
- const { loading: s } = c(i) || {};
98
- return s ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "h-20 w-20 animate-pulse bg-gray-300" }) }) : /* @__PURE__ */ e(
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: o,
102
+ ref: s,
103
103
  src: r,
104
- ...a
104
+ alt: a,
105
+ ...o
105
106
  }
106
107
  );
107
108
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trepur_components",
3
- "version": "2.3.37",
3
+ "version": "2.3.38",
4
4
  "description": "component lib",
5
5
  "author": "trepur_ttenneb",
6
6
  "private": false,