@digital-b2c/coreui-kit 0.7.2 → 0.7.3
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 +57 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +117 -19
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +57 -38
- 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 } from 'react';
|
|
3
|
+
import React__default, { ImgHTMLAttributes, ReactNode, Ref, AnchorHTMLAttributes, HTMLAttributes, FC, PropsWithChildren, CSSProperties } from 'react';
|
|
4
4
|
|
|
5
5
|
interface IPicture {
|
|
6
6
|
src: string;
|
|
@@ -473,18 +473,18 @@ interface UpcomingEventCardProps {
|
|
|
473
473
|
showImage?: boolean;
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
type EventListVariants = 'grey';
|
|
477
476
|
interface EventListProps extends PropsWithChildren {
|
|
478
477
|
className?: string;
|
|
479
|
-
variant?: EventListVariants;
|
|
480
478
|
title?: ReactNode;
|
|
481
479
|
items: UpcomingEventCardProps[];
|
|
482
480
|
cta?: ICta & {
|
|
483
481
|
icon?: IconType;
|
|
484
482
|
};
|
|
483
|
+
backgroundColor?: CSSProperties['backgroundColor'];
|
|
484
|
+
variant?: 'internalEventList';
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
declare const EventList: (({ className, title, items, cta, variant, children }: EventListProps) => react_jsx_runtime.JSX.Element) & {
|
|
487
|
+
declare const EventList: (({ className, title, items, cta, backgroundColor, variant, children, }: EventListProps) => react_jsx_runtime.JSX.Element) & {
|
|
488
488
|
Title: ({ children }: EventListTitleProps) => react_jsx_runtime.JSX.Element;
|
|
489
489
|
};
|
|
490
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 } from 'react';
|
|
3
|
+
import React__default, { ImgHTMLAttributes, ReactNode, Ref, AnchorHTMLAttributes, HTMLAttributes, FC, PropsWithChildren, CSSProperties } from 'react';
|
|
4
4
|
|
|
5
5
|
interface IPicture {
|
|
6
6
|
src: string;
|
|
@@ -473,18 +473,18 @@ interface UpcomingEventCardProps {
|
|
|
473
473
|
showImage?: boolean;
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
type EventListVariants = 'grey';
|
|
477
476
|
interface EventListProps extends PropsWithChildren {
|
|
478
477
|
className?: string;
|
|
479
|
-
variant?: EventListVariants;
|
|
480
478
|
title?: ReactNode;
|
|
481
479
|
items: UpcomingEventCardProps[];
|
|
482
480
|
cta?: ICta & {
|
|
483
481
|
icon?: IconType;
|
|
484
482
|
};
|
|
483
|
+
backgroundColor?: CSSProperties['backgroundColor'];
|
|
484
|
+
variant?: 'internalEventList';
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
declare const EventList: (({ className, title, items, cta, variant, children }: EventListProps) => react_jsx_runtime.JSX.Element) & {
|
|
487
|
+
declare const EventList: (({ className, title, items, cta, backgroundColor, variant, children, }: EventListProps) => react_jsx_runtime.JSX.Element) & {
|
|
488
488
|
Title: ({ children }: EventListTitleProps) => react_jsx_runtime.JSX.Element;
|
|
489
489
|
};
|
|
490
490
|
|
package/dist/index.mjs
CHANGED
|
@@ -1768,6 +1768,7 @@ var UpcomingEventCard_module_default = {
|
|
|
1768
1768
|
description: "UpcomingEventCard_module_description",
|
|
1769
1769
|
"event-card-footer": "UpcomingEventCard_module_event-card-footer",
|
|
1770
1770
|
horizontal: "UpcomingEventCard_module_horizontal",
|
|
1771
|
+
"event-card-show-image": "UpcomingEventCard_module_event-card-show-image",
|
|
1771
1772
|
"event-card-cta": "UpcomingEventCard_module_event-card-cta",
|
|
1772
1773
|
hidden: "UpcomingEventCard_module_hidden",
|
|
1773
1774
|
"cta-without-image": "UpcomingEventCard_module_cta-without-image",
|
|
@@ -1802,27 +1803,37 @@ var UpcomingEventCard = ({
|
|
|
1802
1803
|
children: [
|
|
1803
1804
|
/* @__PURE__ */ jsxs("div", { className: clsx20("card-content", UpcomingEventCard_module_default["event-card-content"]), children: [
|
|
1804
1805
|
showImage && image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, image), { className: clsx20("card-image", UpcomingEventCard_module_default["event-card-image"]) })),
|
|
1805
|
-
/* @__PURE__ */ jsxs(
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
className:
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1806
|
+
/* @__PURE__ */ jsxs(
|
|
1807
|
+
"div",
|
|
1808
|
+
{
|
|
1809
|
+
className: clsx20(
|
|
1810
|
+
"card-text-content",
|
|
1811
|
+
UpcomingEventCard_module_default["event-card-text-content"],
|
|
1812
|
+
(!showImage || !hasImage) && UpcomingEventCard_module_default["event-card-show-image"]
|
|
1813
|
+
),
|
|
1814
|
+
children: [
|
|
1815
|
+
/* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.date, children: date }),
|
|
1816
|
+
title && /* @__PURE__ */ jsx("h3", { className: clsx20("card-text-title"), children: title }),
|
|
1817
|
+
location && /* @__PURE__ */ jsx("span", { className: UpcomingEventCard_module_default.location, children: location }),
|
|
1818
|
+
description && /* @__PURE__ */ jsx("div", { className: clsx20("card-text-description", UpcomingEventCard_module_default.description), children: description }),
|
|
1819
|
+
cta && cta.url && /* @__PURE__ */ jsx(
|
|
1820
|
+
Button,
|
|
1821
|
+
{
|
|
1822
|
+
variant: "secondary",
|
|
1823
|
+
className: clsx20(
|
|
1824
|
+
"card-cta",
|
|
1825
|
+
UpcomingEventCard_module_default["event-card-cta"],
|
|
1826
|
+
!hasCTAandImage && UpcomingEventCard_module_default.hidden
|
|
1827
|
+
),
|
|
1828
|
+
fullWidth: isBelowMobile,
|
|
1829
|
+
href: cta.url,
|
|
1830
|
+
icon: cta.icon,
|
|
1831
|
+
children: cta.label
|
|
1832
|
+
}
|
|
1833
|
+
)
|
|
1834
|
+
]
|
|
1835
|
+
}
|
|
1836
|
+
)
|
|
1826
1837
|
] }),
|
|
1827
1838
|
cta && cta.url && /* @__PURE__ */ jsx(
|
|
1828
1839
|
"div",
|
|
@@ -1878,11 +1889,13 @@ var Carousel = (_a) => {
|
|
|
1878
1889
|
var EventList_module_default = {
|
|
1879
1890
|
"event-list-module": "EventList_module_event-list-module",
|
|
1880
1891
|
"event-list-header-container": "EventList_module_event-list-header-container",
|
|
1892
|
+
"event-list-title": "EventList_module_event-list-title",
|
|
1881
1893
|
"event-list-wrapper": "EventList_module_event-list-wrapper",
|
|
1882
1894
|
vertical: "EventList_module_vertical",
|
|
1883
|
-
grey: "EventList_module_grey",
|
|
1884
1895
|
"card-list-item": "EventList_module_card-list-item",
|
|
1885
1896
|
"card-item": "EventList_module_card-item",
|
|
1897
|
+
internalEventList: "EventList_module_internalEventList",
|
|
1898
|
+
"events-page": "EventList_module_events-page",
|
|
1886
1899
|
horizontal: "EventList_module_horizontal",
|
|
1887
1900
|
"carousel-wrapper": "EventList_module_carousel-wrapper",
|
|
1888
1901
|
"carousel-list-item": "EventList_module_carousel-list-item",
|
|
@@ -1891,35 +1904,41 @@ var EventList_module_default = {
|
|
|
1891
1904
|
var EventListTitle = ({ children }) => {
|
|
1892
1905
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1893
1906
|
};
|
|
1894
|
-
var EventList = ({
|
|
1907
|
+
var EventList = ({
|
|
1908
|
+
className,
|
|
1909
|
+
title,
|
|
1910
|
+
items,
|
|
1911
|
+
cta,
|
|
1912
|
+
backgroundColor,
|
|
1913
|
+
variant,
|
|
1914
|
+
children
|
|
1915
|
+
}) => {
|
|
1895
1916
|
var _a;
|
|
1896
1917
|
const { is } = useViewPort_default();
|
|
1897
1918
|
const slots = resolveCompoundSlots(children, {
|
|
1898
1919
|
title: EventListTitle
|
|
1899
1920
|
});
|
|
1900
1921
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
1901
|
-
const isGrey = variant === "grey";
|
|
1902
1922
|
const isBelowTablet = is("tablet", "below");
|
|
1903
1923
|
const cardDirection = isBelowTablet ? "vertical" : "horizontal";
|
|
1904
|
-
const
|
|
1924
|
+
const isInternalEventList = variant === "internalEventList";
|
|
1925
|
+
const listDirection = isInternalEventList ? "horizontal" : "vertical";
|
|
1905
1926
|
return /* @__PURE__ */ jsx(
|
|
1906
1927
|
"div",
|
|
1907
1928
|
{
|
|
1908
|
-
className: clsx20(
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
className
|
|
1913
|
-
),
|
|
1929
|
+
className: clsx20("event-list-module", EventList_module_default["event-list-module"], className),
|
|
1930
|
+
style: {
|
|
1931
|
+
backgroundColor
|
|
1932
|
+
},
|
|
1914
1933
|
children: /* @__PURE__ */ jsxs(Container, { className: clsx20(EventList_module_default["event-list-container"]), children: [
|
|
1915
1934
|
/* @__PURE__ */ jsxs("div", { className: EventList_module_default["event-list-header-container"], children: [
|
|
1916
|
-
titleNode && /* @__PURE__ */ jsx("h2", { children: titleNode }),
|
|
1935
|
+
titleNode && /* @__PURE__ */ jsx("h2", { className: clsx20(EventList_module_default["event-list-title"]), children: titleNode }),
|
|
1917
1936
|
cta && cta.url && /* @__PURE__ */ jsx(Button, { className: EventList_module_default.cta, variant: "nofillblack", href: cta.url, icon: cta.icon, children: cta.label })
|
|
1918
1937
|
] }),
|
|
1919
|
-
|
|
1938
|
+
isInternalEventList && isBelowTablet && /* @__PURE__ */ jsx(
|
|
1920
1939
|
Carousel,
|
|
1921
1940
|
{
|
|
1922
|
-
wrapperClass: clsx20(EventList_module_default["carousel-wrapper"]),
|
|
1941
|
+
wrapperClass: clsx20(EventList_module_default["carousel-wrapper"], EventList_module_default[variant]),
|
|
1923
1942
|
slideClass: EventList_module_default["carousel-list-item"],
|
|
1924
1943
|
spaceBetween: 16,
|
|
1925
1944
|
slides: items.map((item) => {
|
|
@@ -1927,7 +1946,7 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
|
|
|
1927
1946
|
return /* @__PURE__ */ jsx(
|
|
1928
1947
|
UpcomingEventCard,
|
|
1929
1948
|
__spreadValues({
|
|
1930
|
-
className:
|
|
1949
|
+
className: clsx20(EventList_module_default["event-card"]),
|
|
1931
1950
|
direction: "vertical",
|
|
1932
1951
|
showImage: false
|
|
1933
1952
|
}, item),
|
|
@@ -1936,7 +1955,7 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
|
|
|
1936
1955
|
})
|
|
1937
1956
|
}
|
|
1938
1957
|
),
|
|
1939
|
-
|
|
1958
|
+
isInternalEventList && !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) => {
|
|
1940
1959
|
var _a2, _b, _c;
|
|
1941
1960
|
return /* @__PURE__ */ jsx(
|
|
1942
1961
|
"li",
|
|
@@ -1945,7 +1964,7 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
|
|
|
1945
1964
|
children: /* @__PURE__ */ jsx(
|
|
1946
1965
|
UpcomingEventCard,
|
|
1947
1966
|
__spreadProps(__spreadValues({}, item), {
|
|
1948
|
-
className:
|
|
1967
|
+
className: clsx20(EventList_module_default["card-item"]),
|
|
1949
1968
|
showImage: false,
|
|
1950
1969
|
direction: "vertical"
|
|
1951
1970
|
})
|
|
@@ -1954,7 +1973,7 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
|
|
|
1954
1973
|
(_c = (_b = (_a2 = item.title) != null ? _a2 : item.date) != null ? _b : item.location) != null ? _c : index
|
|
1955
1974
|
);
|
|
1956
1975
|
}) }),
|
|
1957
|
-
!
|
|
1976
|
+
!isInternalEventList && /* @__PURE__ */ jsx("ul", { className: clsx20(EventList_module_default["event-list-wrapper"], EventList_module_default[listDirection]), children: items == null ? void 0 : items.map((item, index) => {
|
|
1958
1977
|
var _a2, _b, _c;
|
|
1959
1978
|
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);
|
|
1960
1979
|
}) })
|