@iit/precision-ui 0.8.12 → 0.8.13
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/components/cards/FeaturedCard.d.ts +6 -0
- package/dist/components/cards/FeaturedCard.d.ts.map +1 -1
- package/dist/index.es29.js +58 -37
- package/dist/index.es29.js.map +1 -1
- package/dist/index.es43.js +22 -21
- package/dist/index.es43.js.map +1 -1
- package/dist/sections/CardsGridSection.d.ts +5 -1
- package/dist/sections/CardsGridSection.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,12 @@ export interface FeaturedCardProps {
|
|
|
12
12
|
price?: string;
|
|
13
13
|
oldPrice?: string;
|
|
14
14
|
detailsText?: string;
|
|
15
|
+
withWidthLimit?: boolean;
|
|
16
|
+
uniqId?: string;
|
|
17
|
+
onButtonClick?: ({ uniqId, title, }: {
|
|
18
|
+
uniqId?: string;
|
|
19
|
+
title?: string;
|
|
20
|
+
}) => void;
|
|
15
21
|
}
|
|
16
22
|
declare const FeaturedCard: React.FC<FeaturedCardProps>;
|
|
17
23
|
export default FeaturedCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeaturedCard.d.ts","sourceRoot":"","sources":["../../../src/components/cards/FeaturedCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,EAAO,YAAY,EAAE,MAAM,WAAW,CAAA;AAS7C,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACnB,IAAI,EAAE,YAAY,EAAE,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"FeaturedCard.d.ts","sourceRoot":"","sources":["../../../src/components/cards/FeaturedCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,EAAO,YAAY,EAAE,MAAM,WAAW,CAAA;AAS7C,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACnB,IAAI,EAAE,YAAY,EAAE,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,CAAC,EACf,MAAM,EACN,KAAK,GACN,EAAE;QACD,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,KAAK,IAAI,CAAA;CACX;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAgH7C,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/dist/index.es29.js
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import e, { Fragment as
|
|
2
|
-
import { Tag as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { cn as
|
|
7
|
-
import { cva as
|
|
8
|
-
import { getAdapter as
|
|
9
|
-
const
|
|
10
|
-
size:
|
|
11
|
-
tags:
|
|
12
|
-
link:
|
|
13
|
-
title:
|
|
14
|
-
desc:
|
|
15
|
-
className:
|
|
16
|
-
showDivider:
|
|
17
|
-
price:
|
|
18
|
-
oldPrice:
|
|
19
|
-
detailsText:
|
|
1
|
+
import e, { Fragment as N } from "react";
|
|
2
|
+
import { Tag as w } from "./index.es22.js";
|
|
3
|
+
import C from "./index.es6.js";
|
|
4
|
+
import d from "./index.es46.js";
|
|
5
|
+
import v from "./index.es47.js";
|
|
6
|
+
import { cn as t } from "./index.es55.js";
|
|
7
|
+
import { cva as F } from "class-variance-authority";
|
|
8
|
+
import { getAdapter as T } from "./index.es9.js";
|
|
9
|
+
const k = ({
|
|
10
|
+
size: r,
|
|
11
|
+
tags: f,
|
|
12
|
+
link: a,
|
|
13
|
+
title: m,
|
|
14
|
+
desc: n,
|
|
15
|
+
className: o,
|
|
16
|
+
showDivider: u,
|
|
17
|
+
price: E,
|
|
18
|
+
oldPrice: s,
|
|
19
|
+
detailsText: x,
|
|
20
|
+
withWidthLimit: l,
|
|
21
|
+
uniqId: b,
|
|
22
|
+
onButtonClick: y
|
|
20
23
|
}) => {
|
|
21
|
-
const
|
|
24
|
+
const c = F(
|
|
22
25
|
"p-6 pb-4 bg-whitish rounded-lg transition-all bottom-0 transform duration-300 hover:scale1-[1.015] border border-transparent hover:border-sapphire1 relative col-span-1 !flex flex-col justify-between items-start sm:min-h-[264px] h-full",
|
|
23
26
|
{
|
|
24
27
|
variants: {
|
|
@@ -33,34 +36,52 @@ const F = ({
|
|
|
33
36
|
size: 1
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
|
-
),
|
|
37
|
-
|
|
39
|
+
), h = T("LinkWrapper"), i = /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement("div", { "data-test-id": "content-container" }, /* @__PURE__ */ e.createElement("div", { className: "flex space-x-2" }, f.map((p, g) => /* @__PURE__ */ e.createElement(w, { key: g, variant: p.color }, p.title))), /* @__PURE__ */ e.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ e.createElement(
|
|
40
|
+
d,
|
|
41
|
+
{
|
|
42
|
+
level: 5,
|
|
43
|
+
className: t("mt-6", l && "lg:max-w-sm"),
|
|
44
|
+
as: "div"
|
|
45
|
+
},
|
|
46
|
+
m
|
|
47
|
+
), n && /* @__PURE__ */ e.createElement(
|
|
48
|
+
v,
|
|
38
49
|
{
|
|
39
50
|
variant: "small-body",
|
|
40
|
-
className:
|
|
51
|
+
className: t(
|
|
52
|
+
"text-navy-opacity-60",
|
|
53
|
+
l && " lg:max-w-sm"
|
|
54
|
+
)
|
|
41
55
|
},
|
|
42
|
-
|
|
43
|
-
))), /* @__PURE__ */ e.createElement("div", { className: "mt-2 sm:mt-6 space-y-6 w-full" },
|
|
44
|
-
|
|
56
|
+
n
|
|
57
|
+
))), /* @__PURE__ */ e.createElement("div", { className: "mt-2 sm:mt-6 space-y-6 w-full" }, u && /* @__PURE__ */ e.createElement("div", { className: "border-t border-navy-opacity-16" }), /* @__PURE__ */ e.createElement("div", { className: "flex space-x-4 items-baseline" }, s && /* @__PURE__ */ e.createElement(
|
|
58
|
+
v,
|
|
45
59
|
{
|
|
46
60
|
variant: "caption",
|
|
47
61
|
className: "text-navy-opacity-40 line-through"
|
|
48
62
|
},
|
|
49
|
-
|
|
50
|
-
), /* @__PURE__ */ e.createElement(
|
|
51
|
-
return
|
|
52
|
-
|
|
63
|
+
s
|
|
64
|
+
), /* @__PURE__ */ e.createElement(d, { level: 4, as: "div" }, E)), a && /* @__PURE__ */ e.createElement(C, { icon: "arrowRight" }, x || "Подробнее")));
|
|
65
|
+
return a ? /* @__PURE__ */ e.createElement(
|
|
66
|
+
h,
|
|
53
67
|
{
|
|
54
|
-
href:
|
|
55
|
-
className:
|
|
56
|
-
|
|
68
|
+
href: a,
|
|
69
|
+
className: t(
|
|
70
|
+
c({ size: r, className: o }),
|
|
57
71
|
"cursor-pointer hover:bottom-1"
|
|
58
72
|
)
|
|
59
73
|
},
|
|
60
|
-
|
|
61
|
-
) : /* @__PURE__ */ e.createElement(
|
|
62
|
-
|
|
74
|
+
i
|
|
75
|
+
) : /* @__PURE__ */ e.createElement(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: t(c({ size: r, className: o })),
|
|
79
|
+
onClick: () => y?.({ uniqId: b, title: m })
|
|
80
|
+
},
|
|
81
|
+
i
|
|
82
|
+
);
|
|
83
|
+
}, S = k;
|
|
63
84
|
export {
|
|
64
|
-
|
|
85
|
+
S as default
|
|
65
86
|
};
|
|
66
87
|
//# sourceMappingURL=index.es29.js.map
|
package/dist/index.es29.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es29.js","sources":["../src/components/cards/FeaturedCard.tsx"],"sourcesContent":["import React, { Fragment } from 'react'\r\nimport { Tag, TagItemProps } from '../ui/Tag'\r\n\r\nimport { ButtonText } from '../ui/button'\r\nimport Heading from '../core/typography/Heading'\r\nimport Text from '../core/typography/Text'\r\nimport { cn } from '@/lib/utils/cn'\r\nimport { cva } from 'class-variance-authority'\r\nimport { getAdapter } from '@/Adapters'\r\n\r\nexport interface FeaturedCardProps {\r\n size: 1 | 2 | 3 | 4\r\n tags: TagItemProps[]\r\n link?: string\r\n title: string\r\n desc?: string\r\n className?: string\r\n showDivider?: boolean\r\n price?: string\r\n oldPrice?: string\r\n detailsText?: string\r\n}\r\n\r\nconst FeaturedCard: React.FC<FeaturedCardProps> = ({\r\n size,\r\n tags,\r\n link,\r\n title,\r\n desc,\r\n className,\r\n showDivider,\r\n price,\r\n oldPrice,\r\n detailsText,\r\n}) => {\r\n const cardStyles = cva(\r\n 'p-6 pb-4 bg-whitish rounded-lg transition-all bottom-0 transform duration-300 hover:scale1-[1.015] border border-transparent hover:border-sapphire1 relative col-span-1 !flex flex-col justify-between items-start sm:min-h-[264px] h-full',\r\n {\r\n variants: {\r\n size: {\r\n 1: 'sm:col-span-1',\r\n 2: 'sm:col-span-2',\r\n 3: 'sm:col-span-3',\r\n 4: 'sm:col-span-4',\r\n },\r\n },\r\n defaultVariants: {\r\n size: 1,\r\n },\r\n }\r\n )\r\n\r\n const LinkWrapper = getAdapter('LinkWrapper')\r\n\r\n const component = (\r\n <Fragment>\r\n <div data-test-id=\"content-container\">\r\n <div className=\"flex space-x-2\">\r\n {tags.map((tag, index) => (\r\n <Tag key={index} variant={tag.color}>\r\n {tag.title}\r\n </Tag>\r\n ))}\r\n </div>\r\n <div className=\"space-y-2\">\r\n <Heading
|
|
1
|
+
{"version":3,"file":"index.es29.js","sources":["../src/components/cards/FeaturedCard.tsx"],"sourcesContent":["import React, { Fragment } from 'react'\r\nimport { Tag, TagItemProps } from '../ui/Tag'\r\n\r\nimport { ButtonText } from '../ui/button'\r\nimport Heading from '../core/typography/Heading'\r\nimport Text from '../core/typography/Text'\r\nimport { cn } from '@/lib/utils/cn'\r\nimport { cva } from 'class-variance-authority'\r\nimport { getAdapter } from '@/Adapters'\r\n\r\nexport interface FeaturedCardProps {\r\n size: 1 | 2 | 3 | 4\r\n tags: TagItemProps[]\r\n link?: string\r\n title: string\r\n desc?: string\r\n className?: string\r\n showDivider?: boolean\r\n price?: string\r\n oldPrice?: string\r\n detailsText?: string\r\n withWidthLimit?: boolean\r\n uniqId?: string\r\n onButtonClick?: ({\r\n uniqId,\r\n title,\r\n }: {\r\n uniqId?: string\r\n title?: string\r\n }) => void\r\n}\r\n\r\nconst FeaturedCard: React.FC<FeaturedCardProps> = ({\r\n size,\r\n tags,\r\n link,\r\n title,\r\n desc,\r\n className,\r\n showDivider,\r\n price,\r\n oldPrice,\r\n detailsText,\r\n withWidthLimit,\r\n uniqId,\r\n onButtonClick,\r\n}) => {\r\n const cardStyles = cva(\r\n 'p-6 pb-4 bg-whitish rounded-lg transition-all bottom-0 transform duration-300 hover:scale1-[1.015] border border-transparent hover:border-sapphire1 relative col-span-1 !flex flex-col justify-between items-start sm:min-h-[264px] h-full',\r\n {\r\n variants: {\r\n size: {\r\n 1: 'sm:col-span-1',\r\n 2: 'sm:col-span-2',\r\n 3: 'sm:col-span-3',\r\n 4: 'sm:col-span-4',\r\n },\r\n },\r\n defaultVariants: {\r\n size: 1,\r\n },\r\n }\r\n )\r\n\r\n const LinkWrapper = getAdapter('LinkWrapper')\r\n\r\n const component = (\r\n <Fragment>\r\n <div data-test-id=\"content-container\">\r\n <div className=\"flex space-x-2\">\r\n {tags.map((tag, index) => (\r\n <Tag key={index} variant={tag.color}>\r\n {tag.title}\r\n </Tag>\r\n ))}\r\n </div>\r\n <div className=\"space-y-2\">\r\n <Heading\r\n level={5}\r\n className={cn('mt-6', withWidthLimit && 'lg:max-w-sm')}\r\n as={'div'}\r\n >\r\n {title}\r\n </Heading>\r\n {desc && (\r\n <Text\r\n variant=\"small-body\"\r\n className={cn(\r\n 'text-navy-opacity-60',\r\n withWidthLimit && ' lg:max-w-sm'\r\n )}\r\n >\r\n {desc}\r\n </Text>\r\n )}\r\n </div>\r\n </div>\r\n {/* TODO: here is the button, should be a link */}\r\n <div className=\"mt-2 sm:mt-6 space-y-6 w-full\">\r\n {showDivider && <div className=\"border-t border-navy-opacity-16\"></div>}\r\n <div className=\"flex space-x-4 items-baseline\">\r\n {oldPrice && (\r\n <Text\r\n variant=\"caption\"\r\n className=\"text-navy-opacity-40 line-through\"\r\n >\r\n {oldPrice}\r\n </Text>\r\n )}\r\n <Heading level={4} as={'div'}>\r\n {price}\r\n </Heading>\r\n </div>\r\n {link && (\r\n <ButtonText icon=\"arrowRight\">\r\n {detailsText || 'Подробнее'}\r\n </ButtonText>\r\n )}\r\n </div>\r\n </Fragment>\r\n )\r\n\r\n if (link) {\r\n return (\r\n <LinkWrapper\r\n href={link}\r\n className={cn(\r\n cardStyles({ size, className }),\r\n 'cursor-pointer hover:bottom-1'\r\n )}\r\n >\r\n {component}\r\n </LinkWrapper>\r\n )\r\n }\r\n\r\n return (\r\n <div\r\n className={cn(cardStyles({ size, className }))}\r\n onClick={() => onButtonClick?.({ uniqId, title })}\r\n >\r\n {component}\r\n </div>\r\n )\r\n}\r\n\r\nexport default FeaturedCard\r\n"],"names":["FeaturedCard","size","tags","link","title","desc","className","showDivider","price","oldPrice","detailsText","withWidthLimit","uniqId","onButtonClick","cardStyles","cva","LinkWrapper","getAdapter","component","React","Fragment","tag","index","Tag","Heading","cn","Text","ButtonText","FeaturedCard$1"],"mappings":";;;;;;;;AAgCA,MAAMA,IAA4C,CAAC;AAAA,EACjD,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AACF,MAAM;AACJ,QAAMC,IAAaC;AAAA,IACjB;AAAA,IACA;AAAA,MACE,UAAU;AAAA,QACR,MAAM;AAAA,UACJ,GAAG;AAAA,UACH,GAAG;AAAA,UACH,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,MACF;AAAA,MACA,iBAAiB;AAAA,QACf,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EAAA,GAGIC,IAAcC,EAAW,aAAa,GAEtCC,IACJC,gBAAAA,EAAA,cAACC,GACC,MAAAD,gBAAAA,EAAA,cAAC,OAAI,EAAA,gBAAa,uBAChBA,gBAAAA,EAAA,cAAC,OAAI,EAAA,WAAU,iBACZ,GAAAjB,EAAK,IAAI,CAACmB,GAAKC,MACdH,gBAAAA,EAAA,cAACI,GAAI,EAAA,KAAKD,GAAO,SAASD,EAAI,SAC3BA,EAAI,KACP,CACD,CACH,GACCF,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAU,eACbA,gBAAAA,EAAA;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,WAAWC,EAAG,QAAQd,KAAkB,aAAa;AAAA,MACrD,IAAI;AAAA,IAAA;AAAA,IAEHP;AAAA,EAAA,GAEFC,KACCc,gBAAAA,EAAA;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAWD;AAAA,QACT;AAAA,QACAd,KAAkB;AAAA,MACpB;AAAA,IAAA;AAAA,IAECN;AAAA,EAGP,CAAA,CACF,GAECc,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAU,mCACZZ,KAAgBY,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAU,kCAAkC,CAAA,mCAChE,OAAI,EAAA,WAAU,mCACZV,KACCU,gBAAAA,EAAA;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,IAAA;AAAA,IAETjB;AAAA,EAAA,GAGJU,gBAAAA,EAAA,cAAAK,GAAA,EAAQ,OAAO,GAAG,IAAI,SACpBhB,CACH,CACF,GACCL,qCACEwB,GAAW,EAAA,MAAK,gBACdjB,KAAe,WAClB,CAEJ,CACF;AAGF,SAAIP,IAEAgB,gBAAAA,EAAA;AAAA,IAACH;AAAA,IAAA;AAAA,MACC,MAAMb;AAAA,MACN,WAAWsB;AAAA,QACTX,EAAW,EAAE,MAAAb,GAAM,WAAAK,GAAW;AAAA,QAC9B;AAAA,MACF;AAAA,IAAA;AAAA,IAECY;AAAA,EAAA,IAMLC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWM,EAAGX,EAAW,EAAE,MAAAb,GAAM,WAAAK,EAAW,CAAA,CAAC;AAAA,MAC7C,SAAS,MAAMO,IAAgB,EAAE,QAAAD,GAAQ,OAAAR,GAAO;AAAA,IAAA;AAAA,IAE/Cc;AAAA,EAAA;AAGP,GAEAU,IAAe5B;"}
|
package/dist/index.es43.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import S from "./index.es42.js";
|
|
2
2
|
import e from "./index.es23.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
3
|
+
import I from "./index.es24.js";
|
|
4
|
+
import P from "./index.es29.js";
|
|
5
|
+
import R from "./index.es38.js";
|
|
6
|
+
import _ from "./index.es32.js";
|
|
7
|
+
import k from "./index.es33.js";
|
|
8
|
+
import x from "./index.es34.js";
|
|
9
9
|
import t from "react";
|
|
10
|
-
const
|
|
10
|
+
const y = {
|
|
11
11
|
Advantage: e,
|
|
12
|
-
Advantage2:
|
|
13
|
-
Rate:
|
|
14
|
-
Product:
|
|
15
|
-
FeaturedCard:
|
|
16
|
-
Plate:
|
|
17
|
-
},
|
|
12
|
+
Advantage2: I,
|
|
13
|
+
Rate: x,
|
|
14
|
+
Product: k,
|
|
15
|
+
FeaturedCard: P,
|
|
16
|
+
Plate: _
|
|
17
|
+
}, F = ({
|
|
18
18
|
title: r,
|
|
19
19
|
sectionId: o,
|
|
20
20
|
desc: a,
|
|
@@ -29,11 +29,12 @@ const x = {
|
|
|
29
29
|
columns: l,
|
|
30
30
|
hideControlsOnDesktop: u,
|
|
31
31
|
withoutCarousel: C,
|
|
32
|
-
footnote: g
|
|
32
|
+
footnote: g,
|
|
33
|
+
onButtonClick: v
|
|
33
34
|
}) => {
|
|
34
|
-
const
|
|
35
|
+
const A = y[n] || e;
|
|
35
36
|
return /* @__PURE__ */ t.createElement(
|
|
36
|
-
|
|
37
|
+
S,
|
|
37
38
|
{
|
|
38
39
|
title: r,
|
|
39
40
|
sectionId: o,
|
|
@@ -46,19 +47,19 @@ const x = {
|
|
|
46
47
|
withoutBottomPadding: c
|
|
47
48
|
},
|
|
48
49
|
/* @__PURE__ */ t.createElement(
|
|
49
|
-
|
|
50
|
+
R,
|
|
50
51
|
{
|
|
51
52
|
items: m,
|
|
52
53
|
columns: l,
|
|
53
54
|
hideControlsOnDesktop: u,
|
|
54
55
|
withoutCarousel: C,
|
|
55
|
-
renderItem: (
|
|
56
|
+
renderItem: (E, G) => /* @__PURE__ */ t.createElement(A, { key: G, ...E, onButtonClick: v }),
|
|
56
57
|
footnote: g
|
|
57
58
|
}
|
|
58
59
|
)
|
|
59
60
|
);
|
|
60
|
-
},
|
|
61
|
+
}, D = F;
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
+
D as default
|
|
63
64
|
};
|
|
64
65
|
//# sourceMappingURL=index.es43.js.map
|
package/dist/index.es43.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es43.js","sources":["../src/sections/CardsGridSection.tsx"],"sourcesContent":["import Section, { SectionProps } from './Section'\r\n\r\nimport Advantage from '@/components/cards/Advantage'\r\nimport Advantage2 from '@/components/cards/Advantage2'\r\nimport FeaturedCard from '@/components/cards/FeaturedCard'\r\nimport GridIterator from '@/components/GridIterator'\r\nimport Plate from '@/components/cards/Plate'\r\nimport Product from '@/components/cards/Product'\r\nimport Rate from '@/components/cards/Rate'\r\nimport React from 'react'\r\n\r\n// Map component names to actual components\r\nconst componentMap: { [key: string]: React.ElementType } = {\r\n Advantage,\r\n Advantage2,\r\n Rate,\r\n Product,\r\n FeaturedCard,\r\n Plate,\r\n}\r\n\r\ninterface CardsGridSectionProps<T> {\r\n title: string\r\n sectionId?: string\r\n desc?: string\r\n items: T[]\r\n component?: string\r\n withoutTopPadding?: boolean\r\n withoutBottomPadding?: boolean\r\n withTopMargin?: boolean\r\n withBottomMargin?: boolean\r\n variant?: SectionProps['variant']\r\n corners?: SectionProps['corners']\r\n columns?: number\r\n hideControlsOnDesktop?: boolean\r\n withoutCarousel?: boolean\r\n footnote?: string\r\n}\r\n\r\nconst CardsGridSection = <T,>({\r\n title,\r\n sectionId,\r\n desc,\r\n items,\r\n component = 'Advantage',\r\n withoutTopPadding = false,\r\n withTopMargin = false,\r\n withBottomMargin = false,\r\n withoutBottomPadding = false,\r\n variant,\r\n corners,\r\n columns,\r\n hideControlsOnDesktop,\r\n withoutCarousel,\r\n footnote,\r\n}: CardsGridSectionProps<T>) => {\r\n const Component = componentMap[component] || Advantage\r\n\r\n return (\r\n <Section\r\n title={title}\r\n sectionId={sectionId}\r\n desc={desc}\r\n variant={variant}\r\n corners={corners}\r\n withoutTopPadding={withoutTopPadding}\r\n withTopMargin={withTopMargin}\r\n withBottomMargin={withBottomMargin}\r\n withoutBottomPadding={withoutBottomPadding}\r\n >\r\n <GridIterator\r\n items={items}\r\n columns={columns}\r\n hideControlsOnDesktop={hideControlsOnDesktop}\r\n withoutCarousel={withoutCarousel}\r\n renderItem={(item, index) => <Component key={index} {...item}
|
|
1
|
+
{"version":3,"file":"index.es43.js","sources":["../src/sections/CardsGridSection.tsx"],"sourcesContent":["import Section, { SectionProps } from './Section'\r\n\r\nimport Advantage from '@/components/cards/Advantage'\r\nimport Advantage2 from '@/components/cards/Advantage2'\r\nimport FeaturedCard from '@/components/cards/FeaturedCard'\r\nimport GridIterator from '@/components/GridIterator'\r\nimport Plate from '@/components/cards/Plate'\r\nimport Product from '@/components/cards/Product'\r\nimport Rate from '@/components/cards/Rate'\r\nimport React from 'react'\r\n\r\n// Map component names to actual components\r\nconst componentMap: { [key: string]: React.ElementType } = {\r\n Advantage,\r\n Advantage2,\r\n Rate,\r\n Product,\r\n FeaturedCard,\r\n Plate,\r\n}\r\n\r\ninterface CardsGridSectionProps<T> {\r\n title: string\r\n sectionId?: string\r\n desc?: string\r\n items: T[]\r\n component?: string\r\n withoutTopPadding?: boolean\r\n withoutBottomPadding?: boolean\r\n withTopMargin?: boolean\r\n withBottomMargin?: boolean\r\n variant?: SectionProps['variant']\r\n corners?: SectionProps['corners']\r\n columns?: number\r\n hideControlsOnDesktop?: boolean\r\n withoutCarousel?: boolean\r\n footnote?: string\r\n onButtonClick?: ({\r\n uniqId,\r\n title,\r\n }: {\r\n uniqId?: string\r\n title?: string\r\n }) => void\r\n}\r\n\r\nconst CardsGridSection = <T,>({\r\n title,\r\n sectionId,\r\n desc,\r\n items,\r\n component = 'Advantage',\r\n withoutTopPadding = false,\r\n withTopMargin = false,\r\n withBottomMargin = false,\r\n withoutBottomPadding = false,\r\n variant,\r\n corners,\r\n columns,\r\n hideControlsOnDesktop,\r\n withoutCarousel,\r\n footnote,\r\n onButtonClick,\r\n}: CardsGridSectionProps<T>) => {\r\n const Component = componentMap[component] || Advantage\r\n\r\n return (\r\n <Section\r\n title={title}\r\n sectionId={sectionId}\r\n desc={desc}\r\n variant={variant}\r\n corners={corners}\r\n withoutTopPadding={withoutTopPadding}\r\n withTopMargin={withTopMargin}\r\n withBottomMargin={withBottomMargin}\r\n withoutBottomPadding={withoutBottomPadding}\r\n >\r\n <GridIterator\r\n items={items}\r\n columns={columns}\r\n hideControlsOnDesktop={hideControlsOnDesktop}\r\n withoutCarousel={withoutCarousel}\r\n renderItem={(item, index) => (\r\n <Component key={index} {...item} onButtonClick={onButtonClick} />\r\n )}\r\n footnote={footnote}\r\n />\r\n </Section>\r\n )\r\n}\r\n\r\nexport default CardsGridSection\r\n"],"names":["componentMap","Advantage","Advantage2","Rate","Product","FeaturedCard","Plate","CardsGridSection","title","sectionId","desc","items","component","withoutTopPadding","withTopMargin","withBottomMargin","withoutBottomPadding","variant","corners","columns","hideControlsOnDesktop","withoutCarousel","footnote","onButtonClick","Component","React","Section","GridIterator","item","index","CardsGridSection$1"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAqD;AAAA,EACzD,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AACF,GA2BMC,IAAmB,CAAK;AAAA,EAC5B,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,mBAAAC,IAAoB;AAAA,EACpB,eAAAC,IAAgB;AAAA,EAChB,kBAAAC,IAAmB;AAAA,EACnB,sBAAAC,IAAuB;AAAA,EACvB,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AACF,MAAgC;AACxB,QAAAC,IAAYxB,EAAaY,CAAS,KAAKX;AAG3C,SAAAwB,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAlB;AAAA,MACA,WAAAC;AAAA,MACA,MAAAC;AAAA,MACA,SAAAO;AAAA,MACA,SAAAC;AAAA,MACA,mBAAAL;AAAA,MACA,eAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,sBAAAC;AAAA,IAAA;AAAA,IAEAS,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,OAAAhB;AAAA,QACA,SAAAQ;AAAA,QACA,uBAAAC;AAAA,QACA,iBAAAC;AAAA,QACA,YAAY,CAACO,GAAMC,MACjBJ,gBAAAA,EAAA,cAACD,KAAU,KAAKK,GAAQ,GAAGD,GAAM,eAAAL,EAA8B,CAAA;AAAA,QAEjE,UAAAD;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,GAEAQ,IAAevB;"}
|
|
@@ -16,7 +16,11 @@ interface CardsGridSectionProps<T> {
|
|
|
16
16
|
hideControlsOnDesktop?: boolean;
|
|
17
17
|
withoutCarousel?: boolean;
|
|
18
18
|
footnote?: string;
|
|
19
|
+
onButtonClick?: ({ uniqId, title, }: {
|
|
20
|
+
uniqId?: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
}) => void;
|
|
19
23
|
}
|
|
20
|
-
declare const CardsGridSection: <T>({ title, sectionId, desc, items, component, withoutTopPadding, withTopMargin, withBottomMargin, withoutBottomPadding, variant, corners, columns, hideControlsOnDesktop, withoutCarousel, footnote, }: CardsGridSectionProps<T>) => import("react/jsx-dev-runtime").JSX.Element;
|
|
24
|
+
declare const CardsGridSection: <T>({ title, sectionId, desc, items, component, withoutTopPadding, withTopMargin, withBottomMargin, withoutBottomPadding, variant, corners, columns, hideControlsOnDesktop, withoutCarousel, footnote, onButtonClick, }: CardsGridSectionProps<T>) => import("react/jsx-dev-runtime").JSX.Element;
|
|
21
25
|
export default CardsGridSection;
|
|
22
26
|
//# sourceMappingURL=CardsGridSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardsGridSection.d.ts","sourceRoot":"","sources":["../../src/sections/CardsGridSection.tsx"],"names":[],"mappings":"AAAA,OAAgB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAqBjD,UAAU,qBAAqB,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAA;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"CardsGridSection.d.ts","sourceRoot":"","sources":["../../src/sections/CardsGridSection.tsx"],"names":[],"mappings":"AAAA,OAAgB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAqBjD,UAAU,qBAAqB,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAA;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,CAAC,EACf,MAAM,EACN,KAAK,GACN,EAAE;QACD,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,KAAK,IAAI,CAAA;CACX;AAED,QAAA,MAAM,gBAAgB,2NAiBnB,sBAAsB,CAAC,CAAC,gDA2B1B,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|