@digital-b2c/coreui-kit 0.11.19 → 0.11.21
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 +23 -9
- 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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +23 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/types/global.d.ts +0 -25
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
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
|
|
|
@@ -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
|
{
|