@digital-b2c/coreui-kit 0.7.1 → 0.7.2
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.cjs +42 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +52 -105
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +42 -57
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ImgHTMLAttributes, ReactNode, Ref, AnchorHTMLAttributes, HTMLAttributes, FC, PropsWithChildren
|
|
3
|
+
import React__default, { ImgHTMLAttributes, ReactNode, Ref, AnchorHTMLAttributes, HTMLAttributes, FC, PropsWithChildren } from 'react';
|
|
4
4
|
|
|
5
5
|
interface IPicture {
|
|
6
6
|
src: string;
|
|
@@ -327,6 +327,7 @@ interface HeroBannerCarouselItem {
|
|
|
327
327
|
body: ReactNode;
|
|
328
328
|
image: PictureProps;
|
|
329
329
|
ctas: ICtaLogo[];
|
|
330
|
+
cornerImage?: string;
|
|
330
331
|
}
|
|
331
332
|
interface HeroBannerCarouselProps {
|
|
332
333
|
className?: string;
|
|
@@ -472,18 +473,18 @@ interface UpcomingEventCardProps {
|
|
|
472
473
|
showImage?: boolean;
|
|
473
474
|
}
|
|
474
475
|
|
|
476
|
+
type EventListVariants = 'grey';
|
|
475
477
|
interface EventListProps extends PropsWithChildren {
|
|
476
478
|
className?: string;
|
|
479
|
+
variant?: EventListVariants;
|
|
477
480
|
title?: ReactNode;
|
|
478
481
|
items: UpcomingEventCardProps[];
|
|
479
482
|
cta?: ICta & {
|
|
480
483
|
icon?: IconType;
|
|
481
484
|
};
|
|
482
|
-
backgroundColor?: CSSProperties['backgroundColor'];
|
|
483
|
-
variant?: 'internalEventList';
|
|
484
485
|
}
|
|
485
486
|
|
|
486
|
-
declare const EventList: (({ className, title, items, cta,
|
|
487
|
+
declare const EventList: (({ className, title, items, cta, variant, children }: EventListProps) => react_jsx_runtime.JSX.Element) & {
|
|
487
488
|
Title: ({ children }: EventListTitleProps) => react_jsx_runtime.JSX.Element;
|
|
488
489
|
};
|
|
489
490
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ImgHTMLAttributes, ReactNode, Ref, AnchorHTMLAttributes, HTMLAttributes, FC, PropsWithChildren
|
|
3
|
+
import React__default, { ImgHTMLAttributes, ReactNode, Ref, AnchorHTMLAttributes, HTMLAttributes, FC, PropsWithChildren } from 'react';
|
|
4
4
|
|
|
5
5
|
interface IPicture {
|
|
6
6
|
src: string;
|
|
@@ -327,6 +327,7 @@ interface HeroBannerCarouselItem {
|
|
|
327
327
|
body: ReactNode;
|
|
328
328
|
image: PictureProps;
|
|
329
329
|
ctas: ICtaLogo[];
|
|
330
|
+
cornerImage?: string;
|
|
330
331
|
}
|
|
331
332
|
interface HeroBannerCarouselProps {
|
|
332
333
|
className?: string;
|
|
@@ -472,18 +473,18 @@ interface UpcomingEventCardProps {
|
|
|
472
473
|
showImage?: boolean;
|
|
473
474
|
}
|
|
474
475
|
|
|
476
|
+
type EventListVariants = 'grey';
|
|
475
477
|
interface EventListProps extends PropsWithChildren {
|
|
476
478
|
className?: string;
|
|
479
|
+
variant?: EventListVariants;
|
|
477
480
|
title?: ReactNode;
|
|
478
481
|
items: UpcomingEventCardProps[];
|
|
479
482
|
cta?: ICta & {
|
|
480
483
|
icon?: IconType;
|
|
481
484
|
};
|
|
482
|
-
backgroundColor?: CSSProperties['backgroundColor'];
|
|
483
|
-
variant?: 'internalEventList';
|
|
484
485
|
}
|
|
485
486
|
|
|
486
|
-
declare const EventList: (({ className, title, items, cta,
|
|
487
|
+
declare const EventList: (({ className, title, items, cta, variant, children }: EventListProps) => react_jsx_runtime.JSX.Element) & {
|
|
487
488
|
Title: ({ children }: EventListTitleProps) => react_jsx_runtime.JSX.Element;
|
|
488
489
|
};
|
|
489
490
|
|
package/dist/index.mjs
CHANGED
|
@@ -1324,6 +1324,9 @@ var HeroBannerCarousel_module_default = {
|
|
|
1324
1324
|
inner: "HeroBannerCarousel_module_inner",
|
|
1325
1325
|
swiperContainer: "HeroBannerCarousel_module_swiperContainer",
|
|
1326
1326
|
card: "HeroBannerCarousel_module_card",
|
|
1327
|
+
cardCorner: "HeroBannerCarousel_module_cardCorner",
|
|
1328
|
+
cardCornerImage: "HeroBannerCarousel_module_cardCornerImage",
|
|
1329
|
+
cardCornerDot: "HeroBannerCarousel_module_cardCornerDot",
|
|
1327
1330
|
cardContent: "HeroBannerCarousel_module_cardContent",
|
|
1328
1331
|
cardTitle: "HeroBannerCarousel_module_cardTitle",
|
|
1329
1332
|
cardBottom: "HeroBannerCarousel_module_cardBottom",
|
|
@@ -1359,6 +1362,7 @@ var HeroBannerCarousel = ({
|
|
|
1359
1362
|
onSwiper: setSwiperInstance,
|
|
1360
1363
|
onSlideChange: (swiper) => setActiveIndex(swiper.activeIndex),
|
|
1361
1364
|
children: items.map((item, index) => /* @__PURE__ */ jsx(SwiperSlide, { children: /* @__PURE__ */ jsxs("div", { className: HeroBannerCarousel_module_default.card, children: [
|
|
1365
|
+
item.cornerImage && /* @__PURE__ */ jsx("div", { className: HeroBannerCarousel_module_default.cardCorner, children: isMobile ? /* @__PURE__ */ jsx("span", { className: HeroBannerCarousel_module_default.cardCornerDot }) : /* @__PURE__ */ jsx("img", { src: item.cornerImage, alt: "", className: HeroBannerCarousel_module_default.cardCornerImage }) }),
|
|
1362
1366
|
/* @__PURE__ */ jsxs("div", { className: HeroBannerCarousel_module_default.cardContent, children: [
|
|
1363
1367
|
/* @__PURE__ */ jsx("h3", { className: HeroBannerCarousel_module_default.cardTitle, children: item.title }),
|
|
1364
1368
|
/* @__PURE__ */ jsxs("div", { className: HeroBannerCarousel_module_default.cardBottom, children: [
|
|
@@ -1764,7 +1768,6 @@ var UpcomingEventCard_module_default = {
|
|
|
1764
1768
|
description: "UpcomingEventCard_module_description",
|
|
1765
1769
|
"event-card-footer": "UpcomingEventCard_module_event-card-footer",
|
|
1766
1770
|
horizontal: "UpcomingEventCard_module_horizontal",
|
|
1767
|
-
"event-card-show-image": "UpcomingEventCard_module_event-card-show-image",
|
|
1768
1771
|
"event-card-cta": "UpcomingEventCard_module_event-card-cta",
|
|
1769
1772
|
hidden: "UpcomingEventCard_module_hidden",
|
|
1770
1773
|
"cta-without-image": "UpcomingEventCard_module_cta-without-image",
|
|
@@ -1799,37 +1802,27 @@ var UpcomingEventCard = ({
|
|
|
1799
1802
|
children: [
|
|
1800
1803
|
/* @__PURE__ */ jsxs("div", { className: clsx20("card-content", UpcomingEventCard_module_default["event-card-content"]), children: [
|
|
1801
1804
|
showImage && image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx20("card-image", UpcomingEventCard_module_default["event-card-image"]) })),
|
|
1802
|
-
/* @__PURE__ */ jsxs(
|
|
1803
|
-
"
|
|
1804
|
-
{
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
),
|
|
1824
|
-
fullWidth: isBelowMobile,
|
|
1825
|
-
href: cta.url,
|
|
1826
|
-
icon: cta.icon,
|
|
1827
|
-
children: cta.label
|
|
1828
|
-
}
|
|
1829
|
-
)
|
|
1830
|
-
]
|
|
1831
|
-
}
|
|
1832
|
-
)
|
|
1805
|
+
/* @__PURE__ */ jsxs("div", { className: clsx20("card-text-content", UpcomingEventCard_module_default["event-card-text-content"]), children: [
|
|
1806
|
+
/* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
|
|
1807
|
+
title && /* @__PURE__ */ jsx("h3", { className: clsx20("card-text-title"), children: title }),
|
|
1808
|
+
location && /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
|
|
1809
|
+
description && /* @__PURE__ */ jsx("div", { className: clsx20("card-text-description", UpcomingEventCard_module_default.description), children: description }),
|
|
1810
|
+
cta && cta.url && /* @__PURE__ */ jsx(
|
|
1811
|
+
Button,
|
|
1812
|
+
{
|
|
1813
|
+
variant: "secondary",
|
|
1814
|
+
className: clsx20(
|
|
1815
|
+
"card-cta",
|
|
1816
|
+
UpcomingEventCard_module_default["event-card-cta"],
|
|
1817
|
+
!hasCTAandImage && UpcomingEventCard_module_default.hidden
|
|
1818
|
+
),
|
|
1819
|
+
fullWidth: isBelowMobile,
|
|
1820
|
+
href: cta.url,
|
|
1821
|
+
icon: cta.icon,
|
|
1822
|
+
children: cta.label
|
|
1823
|
+
}
|
|
1824
|
+
)
|
|
1825
|
+
] })
|
|
1833
1826
|
] }),
|
|
1834
1827
|
cta && cta.url && /* @__PURE__ */ jsx(
|
|
1835
1828
|
"div",
|
|
@@ -1885,13 +1878,11 @@ var Carousel = (_a) => {
|
|
|
1885
1878
|
var EventList_module_default = {
|
|
1886
1879
|
"event-list-module": "EventList_module_event-list-module",
|
|
1887
1880
|
"event-list-header-container": "EventList_module_event-list-header-container",
|
|
1888
|
-
"event-list-title": "EventList_module_event-list-title",
|
|
1889
1881
|
"event-list-wrapper": "EventList_module_event-list-wrapper",
|
|
1890
1882
|
vertical: "EventList_module_vertical",
|
|
1883
|
+
grey: "EventList_module_grey",
|
|
1891
1884
|
"card-list-item": "EventList_module_card-list-item",
|
|
1892
1885
|
"card-item": "EventList_module_card-item",
|
|
1893
|
-
internalEventList: "EventList_module_internalEventList",
|
|
1894
|
-
"events-page": "EventList_module_events-page",
|
|
1895
1886
|
horizontal: "EventList_module_horizontal",
|
|
1896
1887
|
"carousel-wrapper": "EventList_module_carousel-wrapper",
|
|
1897
1888
|
"carousel-list-item": "EventList_module_carousel-list-item",
|
|
@@ -1900,41 +1891,35 @@ var EventList_module_default = {
|
|
|
1900
1891
|
var EventListTitle = ({ children }) => {
|
|
1901
1892
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1902
1893
|
};
|
|
1903
|
-
var EventList = ({
|
|
1904
|
-
className,
|
|
1905
|
-
title,
|
|
1906
|
-
items,
|
|
1907
|
-
cta,
|
|
1908
|
-
backgroundColor,
|
|
1909
|
-
variant,
|
|
1910
|
-
children
|
|
1911
|
-
}) => {
|
|
1894
|
+
var EventList = ({ className, title, items, cta, variant, children }) => {
|
|
1912
1895
|
var _a;
|
|
1913
1896
|
const { is } = useViewPort_default();
|
|
1914
1897
|
const slots = resolveCompoundSlots(children, {
|
|
1915
1898
|
title: EventListTitle
|
|
1916
1899
|
});
|
|
1917
1900
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
1901
|
+
const isGrey = variant === "grey";
|
|
1918
1902
|
const isBelowTablet = is("tablet", "below");
|
|
1919
1903
|
const cardDirection = isBelowTablet ? "vertical" : "horizontal";
|
|
1920
|
-
const
|
|
1921
|
-
const listDirection = isInternalEventList ? "horizontal" : "vertical";
|
|
1904
|
+
const listDirection = isGrey ? "horizontal" : "vertical";
|
|
1922
1905
|
return /* @__PURE__ */ jsx(
|
|
1923
1906
|
"div",
|
|
1924
1907
|
{
|
|
1925
|
-
className: clsx20(
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1908
|
+
className: clsx20(
|
|
1909
|
+
"event-list-module",
|
|
1910
|
+
EventList_module_default["event-list-module"],
|
|
1911
|
+
isGrey && EventList_module_default[variant],
|
|
1912
|
+
className
|
|
1913
|
+
),
|
|
1929
1914
|
children: /* @__PURE__ */ jsxs(Container, { className: clsx20(EventList_module_default["event-list-container"]), children: [
|
|
1930
1915
|
/* @__PURE__ */ jsxs("div", { className: EventList_module_default["event-list-header-container"], children: [
|
|
1931
|
-
titleNode && /* @__PURE__ */ jsx("h2", {
|
|
1916
|
+
titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
|
|
1932
1917
|
cta && cta.url && /* @__PURE__ */ jsx(Button, { className: EventList_module_default.cta, variant: "nofillblack", href: cta.url, icon: cta.icon, children: cta.label })
|
|
1933
1918
|
] }),
|
|
1934
|
-
|
|
1919
|
+
isGrey && isBelowTablet && /* @__PURE__ */ jsx(
|
|
1935
1920
|
Carousel,
|
|
1936
1921
|
{
|
|
1937
|
-
wrapperClass: clsx20(EventList_module_default["carousel-wrapper"]
|
|
1922
|
+
wrapperClass: clsx20(EventList_module_default["carousel-wrapper"]),
|
|
1938
1923
|
slideClass: EventList_module_default["carousel-list-item"],
|
|
1939
1924
|
spaceBetween: 16,
|
|
1940
1925
|
slides: items.map((item) => {
|
|
@@ -1942,7 +1927,7 @@ var EventList = ({
|
|
|
1942
1927
|
return /* @__PURE__ */ jsx(
|
|
1943
1928
|
UpcomingEventCard,
|
|
1944
1929
|
__spreadValues({
|
|
1945
|
-
className:
|
|
1930
|
+
className: isGrey && EventList_module_default["event-card"],
|
|
1946
1931
|
direction: "vertical",
|
|
1947
1932
|
showImage: false
|
|
1948
1933
|
}, item),
|
|
@@ -1951,7 +1936,7 @@ var EventList = ({
|
|
|
1951
1936
|
})
|
|
1952
1937
|
}
|
|
1953
1938
|
),
|
|
1954
|
-
|
|
1939
|
+
isGrey && !isBelowTablet && /* @__PURE__ */ jsx("ul", { className: clsx20(EventList_module_default["event-list-wrapper"], EventList_module_default["horizontal"], EventList_module_default[variant]), children: items == null ? void 0 : items.map((item, index) => {
|
|
1955
1940
|
var _a2, _b, _c;
|
|
1956
1941
|
return /* @__PURE__ */ jsx(
|
|
1957
1942
|
"li",
|
|
@@ -1960,7 +1945,7 @@ var EventList = ({
|
|
|
1960
1945
|
children: /* @__PURE__ */ jsx(
|
|
1961
1946
|
UpcomingEventCard,
|
|
1962
1947
|
__spreadProps(__spreadValues({}, item), {
|
|
1963
|
-
className:
|
|
1948
|
+
className: isGrey && EventList_module_default["card-item"],
|
|
1964
1949
|
showImage: false,
|
|
1965
1950
|
direction: "vertical"
|
|
1966
1951
|
})
|
|
@@ -1969,7 +1954,7 @@ var EventList = ({
|
|
|
1969
1954
|
(_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
|
|
1970
1955
|
);
|
|
1971
1956
|
}) }),
|
|
1972
|
-
!
|
|
1957
|
+
!isGrey && /* @__PURE__ */ jsx("ul", { className: clsx20(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]), children: items == null ? void 0 : items.map((item, index) => {
|
|
1973
1958
|
var _a2, _b, _c;
|
|
1974
1959
|
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(UpcomingEventCard, __spreadProps(__spreadValues({}, item), { direction: cardDirection })) }, (_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index);
|
|
1975
1960
|
}) })
|