@digital-b2c/coreui-kit 0.11.11 → 0.11.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/index.cjs CHANGED
@@ -1275,20 +1275,14 @@ var ResourceCardItem_module_default = {
1275
1275
  cardList: "ResourceCardItem_module_cardList",
1276
1276
  cardListLeft: "ResourceCardItem_module_cardListLeft",
1277
1277
  cardListRight: "ResourceCardItem_module_cardListRight",
1278
- notificationDot: "ResourceCardItem_module_notificationDot",
1279
- iconWrapper: "ResourceCardItem_module_iconWrapper"
1280
- };
1281
- var ResourceIcon = ({ image, type }) => {
1282
- if (!image) return null;
1283
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ResourceCardItem_module_default.iconWrapper, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: image, alt: type != null ? type : "", width: 32, height: 32 }) });
1284
- };
1278
+ notificationDot: "ResourceCardItem_module_notificationDot"};
1285
1279
  var ResourceCardItem = ({ item, view }) => {
1286
1280
  const hasHref = Boolean(item.href);
1287
1281
  const linkWrapper = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: ResourceCardItem_module_default.cardLink, target: "_blank", rel: "noopener noreferrer", children });
1288
1282
  if (view === "grid") {
1289
1283
  return /* @__PURE__ */ jsxRuntime.jsx("article", { className: ResourceCardItem_module_default.cardGrid, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardBody, children: [
1290
1284
  /* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardIconTitle, children: [
1291
- /* @__PURE__ */ jsxRuntime.jsx(ResourceIcon, { image: item.image, type: item.type }),
1285
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 25 }),
1292
1286
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
1293
1287
  ] }) }),
1294
1288
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardMeta, children: [
@@ -1303,7 +1297,7 @@ var ResourceCardItem = ({ item, view }) => {
1303
1297
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date })
1304
1298
  ] }),
1305
1299
  /* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardListRight, children: [
1306
- /* @__PURE__ */ jsxRuntime.jsx(ResourceIcon, { image: item.image, type: item.type }),
1300
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 25 }),
1307
1301
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
1308
1302
  ] }) })
1309
1303
  ] });
@@ -3290,8 +3284,14 @@ var ResourcesGridList = ({
3290
3284
  const isMobile = is("tablet", "below");
3291
3285
  const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
3292
3286
  const handleSelectCategory = (index) => {
3287
+ var _a2, _b;
3293
3288
  setSelectedCategory(index);
3294
3289
  setCurrentPage(1);
3290
+ const categoryText = (_b = (_a2 = categories[index]) == null ? void 0 : _a2.label) == null ? void 0 : _b.replaceAll(" ", "-");
3291
+ if (typeof window !== "undefined" && categoryText) {
3292
+ const url = `${window.location.pathname}#${categoryText}`;
3293
+ window.history.replaceState(null, "", url);
3294
+ }
3295
3295
  if (isMobile) setIsSidebarOpen(false);
3296
3296
  };
3297
3297
  const handleFilterChange = (value) => {