@digital-b2c/coreui-kit 0.11.20 → 0.11.22
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 +28 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +26 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +28 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -182,6 +182,7 @@ type ResourceView = 'grid' | 'list';
|
|
|
182
182
|
type ResourceItemType = 'pdf' | 'externalLink';
|
|
183
183
|
interface ResourceItem {
|
|
184
184
|
title: string;
|
|
185
|
+
bodyText?: ReactNode;
|
|
185
186
|
date: string;
|
|
186
187
|
type: ResourceItemType;
|
|
187
188
|
href: string;
|
|
@@ -882,12 +883,13 @@ interface BlogSearchResultsListProps extends PropsWithChildren {
|
|
|
882
883
|
searchValue: string;
|
|
883
884
|
onSearchChange: (value: string) => void;
|
|
884
885
|
onSearchSubmit: (value: string) => void;
|
|
886
|
+
searchInputProps?: InputProps;
|
|
885
887
|
renderLink?: (props: React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
886
888
|
children: React.ReactNode;
|
|
887
889
|
}) => React.ReactNode;
|
|
888
890
|
}
|
|
889
891
|
|
|
890
|
-
declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, className, renderLink, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
|
|
892
|
+
declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, searchInputProps, className, renderLink, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
|
|
891
893
|
Search: ({ children }: BlogSearchResultsListSearchProps) => react_jsx_runtime.JSX.Element;
|
|
892
894
|
Pagination: ({ children, }: BlogSearchResultsListPaginationProps) => react_jsx_runtime.JSX.Element;
|
|
893
895
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -182,6 +182,7 @@ type ResourceView = 'grid' | 'list';
|
|
|
182
182
|
type ResourceItemType = 'pdf' | 'externalLink';
|
|
183
183
|
interface ResourceItem {
|
|
184
184
|
title: string;
|
|
185
|
+
bodyText?: ReactNode;
|
|
185
186
|
date: string;
|
|
186
187
|
type: ResourceItemType;
|
|
187
188
|
href: string;
|
|
@@ -882,12 +883,13 @@ interface BlogSearchResultsListProps extends PropsWithChildren {
|
|
|
882
883
|
searchValue: string;
|
|
883
884
|
onSearchChange: (value: string) => void;
|
|
884
885
|
onSearchSubmit: (value: string) => void;
|
|
886
|
+
searchInputProps?: InputProps;
|
|
885
887
|
renderLink?: (props: React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
886
888
|
children: React.ReactNode;
|
|
887
889
|
}) => React.ReactNode;
|
|
888
890
|
}
|
|
889
891
|
|
|
890
|
-
declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, className, renderLink, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
|
|
892
|
+
declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, searchInputProps, className, renderLink, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
|
|
891
893
|
Search: ({ children }: BlogSearchResultsListSearchProps) => react_jsx_runtime.JSX.Element;
|
|
892
894
|
Pagination: ({ children, }: BlogSearchResultsListPaginationProps) => react_jsx_runtime.JSX.Element;
|
|
893
895
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1262,6 +1262,9 @@ var ResourceCardItem_module_default = {
|
|
|
1262
1262
|
cardBody: "ResourceCardItem_module_cardBody",
|
|
1263
1263
|
cardIconTitle: "ResourceCardItem_module_cardIconTitle",
|
|
1264
1264
|
cardTitle: "ResourceCardItem_module_cardTitle",
|
|
1265
|
+
cardBodyTextGrid: "ResourceCardItem_module_cardBodyTextGrid",
|
|
1266
|
+
cardBodyTextList: "ResourceCardItem_module_cardBodyTextList",
|
|
1267
|
+
cardBodyText: "ResourceCardItem_module_cardBodyText",
|
|
1265
1268
|
cardMeta: "ResourceCardItem_module_cardMeta",
|
|
1266
1269
|
cardDate: "ResourceCardItem_module_cardDate",
|
|
1267
1270
|
cardList: "ResourceCardItem_module_cardList",
|
|
@@ -1273,10 +1276,13 @@ var ResourceCardItem = ({ item, view }) => {
|
|
|
1273
1276
|
const linkWrapper = ({ children }) => /* @__PURE__ */ jsx("a", { href: item.href, className: ResourceCardItem_module_default.cardLink, target: "_blank", rel: "noopener noreferrer", children });
|
|
1274
1277
|
if (view === "grid") {
|
|
1275
1278
|
return /* @__PURE__ */ jsx("article", { className: ResourceCardItem_module_default.cardGrid, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardBody, children: [
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
-
/* @__PURE__ */ jsx(
|
|
1278
|
-
|
|
1279
|
-
|
|
1279
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1280
|
+
/* @__PURE__ */ jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardIconTitle, children: [
|
|
1281
|
+
/* @__PURE__ */ jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 33 }),
|
|
1282
|
+
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
|
|
1283
|
+
] }) }),
|
|
1284
|
+
item.bodyText && /* @__PURE__ */ jsx("div", { className: ResourceCardItem_module_default.cardBodyTextGrid, children: /* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardBodyText, children: item.bodyText }) })
|
|
1285
|
+
] }),
|
|
1280
1286
|
/* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardMeta, children: [
|
|
1281
1287
|
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date }),
|
|
1282
1288
|
item.hasNotification && /* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.notificationDot, "aria-label": "New" })
|
|
@@ -1288,10 +1294,13 @@ var ResourceCardItem = ({ item, view }) => {
|
|
|
1288
1294
|
item.hasNotification && /* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.notificationDot, "aria-label": "New" }),
|
|
1289
1295
|
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date })
|
|
1290
1296
|
] }),
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
/* @__PURE__ */ jsx(
|
|
1293
|
-
|
|
1294
|
-
|
|
1297
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1298
|
+
/* @__PURE__ */ jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxs("div", { className: ResourceCardItem_module_default.cardListRight, children: [
|
|
1299
|
+
/* @__PURE__ */ jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 33 }),
|
|
1300
|
+
/* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
|
|
1301
|
+
] }) }),
|
|
1302
|
+
item.bodyText && /* @__PURE__ */ jsx("div", { className: ResourceCardItem_module_default.cardBodyTextList, children: /* @__PURE__ */ jsx("span", { className: ResourceCardItem_module_default.cardBodyText, children: item.bodyText }) })
|
|
1303
|
+
] })
|
|
1295
1304
|
] });
|
|
1296
1305
|
};
|
|
1297
1306
|
|
|
@@ -2640,7 +2649,7 @@ var MiniBanner = ({
|
|
|
2640
2649
|
const goBackNode = slots == null ? void 0 : slots.goBack;
|
|
2641
2650
|
return /* @__PURE__ */ jsxs("div", { className: clsx15(MiniBanner_module_default.minibanner, MiniBanner_module_default[variant], className), children: [
|
|
2642
2651
|
((background == null ? void 0 : background.src) || ((_d = background == null ? void 0 : background.desktop) == null ? void 0 : _d.src) || ((_e = background == null ? void 0 : background.mobile) == null ? void 0 : _e.src)) && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.background }, background)),
|
|
2643
|
-
/* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.wrapper, children: [
|
|
2652
|
+
/* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.wrapper, children: [
|
|
2644
2653
|
/* @__PURE__ */ jsxs("div", { className: MiniBanner_module_default.textContainer, children: [
|
|
2645
2654
|
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
2646
2655
|
pretitleNode && /* @__PURE__ */ jsx("div", { className: clsx15(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
@@ -2675,7 +2684,7 @@ var MiniBanner = ({
|
|
|
2675
2684
|
key
|
|
2676
2685
|
);
|
|
2677
2686
|
}) })
|
|
2678
|
-
] })
|
|
2687
|
+
] }) })
|
|
2679
2688
|
] });
|
|
2680
2689
|
};
|
|
2681
2690
|
|
|
@@ -3284,6 +3293,7 @@ var ResourcesGridList = ({
|
|
|
3284
3293
|
const activeIndex = categories.findIndex((cat) => cat.active);
|
|
3285
3294
|
return activeIndex === -1 ? 0 : activeIndex;
|
|
3286
3295
|
});
|
|
3296
|
+
const widgetRef = useRef(null);
|
|
3287
3297
|
const { is } = useViewPort_default();
|
|
3288
3298
|
const isMobile = is("tablet", "below");
|
|
3289
3299
|
const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
|
|
@@ -3299,6 +3309,10 @@ var ResourcesGridList = ({
|
|
|
3299
3309
|
window.dispatchEvent(new HashChangeEvent("hashchange"));
|
|
3300
3310
|
}
|
|
3301
3311
|
if (isMobile) setIsSidebarOpen(false);
|
|
3312
|
+
setTimeout(() => {
|
|
3313
|
+
var _a3;
|
|
3314
|
+
(_a3 = widgetRef.current) == null ? void 0 : _a3.scrollIntoView({ behavior: "smooth" });
|
|
3315
|
+
}, 200);
|
|
3302
3316
|
};
|
|
3303
3317
|
const handleFilterChange = (value) => {
|
|
3304
3318
|
setFilterValue(value);
|
|
@@ -3327,7 +3341,7 @@ var ResourcesGridList = ({
|
|
|
3327
3341
|
const safeCurrentPage = Math.min(currentPage, totalPages);
|
|
3328
3342
|
const pageStart = (safeCurrentPage - 1) * ITEMS_PER_PAGE;
|
|
3329
3343
|
const paginatedItems = displayedItems.slice(pageStart, pageStart + ITEMS_PER_PAGE);
|
|
3330
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx15(ResourcesGridList_module_default.widget, className), children: [
|
|
3344
|
+
return /* @__PURE__ */ jsxs("div", { ref: widgetRef, className: clsx15(ResourcesGridList_module_default.widget, className), children: [
|
|
3331
3345
|
/* @__PURE__ */ jsx(
|
|
3332
3346
|
FilterBar,
|
|
3333
3347
|
{
|
|
@@ -3843,6 +3857,7 @@ var BlogSearchResultsList = ({
|
|
|
3843
3857
|
onSearchChange,
|
|
3844
3858
|
onSearchSubmit,
|
|
3845
3859
|
searchValue,
|
|
3860
|
+
searchInputProps,
|
|
3846
3861
|
className,
|
|
3847
3862
|
renderLink,
|
|
3848
3863
|
children
|
|
@@ -3861,7 +3876,7 @@ var BlogSearchResultsList = ({
|
|
|
3861
3876
|
/* @__PURE__ */ jsxs("div", { className: clsx15("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
3862
3877
|
/* @__PURE__ */ jsx(
|
|
3863
3878
|
Input,
|
|
3864
|
-
{
|
|
3879
|
+
__spreadValues({
|
|
3865
3880
|
className: clsx15("search-input", BlogSearchResultsList_module_default["search-input"]),
|
|
3866
3881
|
startAdornment: /* @__PURE__ */ jsx(Icon, { type: "search" }),
|
|
3867
3882
|
placeholder: "Search News",
|
|
@@ -3879,7 +3894,7 @@ var BlogSearchResultsList = ({
|
|
|
3879
3894
|
onChange: (e) => {
|
|
3880
3895
|
onSearchChange(e.target.value);
|
|
3881
3896
|
}
|
|
3882
|
-
}
|
|
3897
|
+
}, searchInputProps)
|
|
3883
3898
|
),
|
|
3884
3899
|
/* @__PURE__ */ jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
3885
3900
|
] }),
|