@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 CHANGED
@@ -1270,6 +1270,9 @@ var ResourceCardItem_module_default = {
1270
1270
  cardBody: "ResourceCardItem_module_cardBody",
1271
1271
  cardIconTitle: "ResourceCardItem_module_cardIconTitle",
1272
1272
  cardTitle: "ResourceCardItem_module_cardTitle",
1273
+ cardBodyTextGrid: "ResourceCardItem_module_cardBodyTextGrid",
1274
+ cardBodyTextList: "ResourceCardItem_module_cardBodyTextList",
1275
+ cardBodyText: "ResourceCardItem_module_cardBodyText",
1273
1276
  cardMeta: "ResourceCardItem_module_cardMeta",
1274
1277
  cardDate: "ResourceCardItem_module_cardDate",
1275
1278
  cardList: "ResourceCardItem_module_cardList",
@@ -1281,10 +1284,13 @@ var ResourceCardItem = ({ item, view }) => {
1281
1284
  const linkWrapper = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: ResourceCardItem_module_default.cardLink, target: "_blank", rel: "noopener noreferrer", children });
1282
1285
  if (view === "grid") {
1283
1286
  return /* @__PURE__ */ jsxRuntime.jsx("article", { className: ResourceCardItem_module_default.cardGrid, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardBody, children: [
1284
- /* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardIconTitle, children: [
1285
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 25 }),
1286
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
1287
- ] }) }),
1287
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1288
+ /* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardIconTitle, children: [
1289
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 33 }),
1290
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
1291
+ ] }) }),
1292
+ item.bodyText && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ResourceCardItem_module_default.cardBodyTextGrid, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardBodyText, children: item.bodyText }) })
1293
+ ] }),
1288
1294
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardMeta, children: [
1289
1295
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date }),
1290
1296
  item.hasNotification && /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.notificationDot, "aria-label": "New" })
@@ -1296,10 +1302,13 @@ var ResourceCardItem = ({ item, view }) => {
1296
1302
  item.hasNotification && /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.notificationDot, "aria-label": "New" }),
1297
1303
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date })
1298
1304
  ] }),
1299
- /* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardListRight, children: [
1300
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 25 }),
1301
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
1302
- ] }) })
1305
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1306
+ /* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardListRight, children: [
1307
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: item.type === "pdf" ? "pdf" : "externalLink", size: 33 }),
1308
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardTitle, children: item.title })
1309
+ ] }) }),
1310
+ item.bodyText && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ResourceCardItem_module_default.cardBodyTextList, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardBodyText, children: item.bodyText }) })
1311
+ ] })
1303
1312
  ] });
1304
1313
  };
1305
1314
 
@@ -2648,7 +2657,7 @@ var MiniBanner = ({
2648
2657
  const goBackNode = slots == null ? void 0 : slots.goBack;
2649
2658
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx15__default.default(MiniBanner_module_default.minibanner, MiniBanner_module_default[variant], className), children: [
2650
2659
  ((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__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.background }, background)),
2651
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.wrapper, children: [
2660
+ /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.wrapper, children: [
2652
2661
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.textContainer, children: [
2653
2662
  (logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
2654
2663
  pretitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx15__default.default(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
@@ -2683,7 +2692,7 @@ var MiniBanner = ({
2683
2692
  key
2684
2693
  );
2685
2694
  }) })
2686
- ] })
2695
+ ] }) })
2687
2696
  ] });
2688
2697
  };
2689
2698
 
@@ -3292,6 +3301,7 @@ var ResourcesGridList = ({
3292
3301
  const activeIndex = categories.findIndex((cat) => cat.active);
3293
3302
  return activeIndex === -1 ? 0 : activeIndex;
3294
3303
  });
3304
+ const widgetRef = React66.useRef(null);
3295
3305
  const { is } = useViewPort_default();
3296
3306
  const isMobile = is("tablet", "below");
3297
3307
  const selectedValue = (_a = categories[selectedCategory]) == null ? void 0 : _a.value;
@@ -3307,6 +3317,10 @@ var ResourcesGridList = ({
3307
3317
  window.dispatchEvent(new HashChangeEvent("hashchange"));
3308
3318
  }
3309
3319
  if (isMobile) setIsSidebarOpen(false);
3320
+ setTimeout(() => {
3321
+ var _a3;
3322
+ (_a3 = widgetRef.current) == null ? void 0 : _a3.scrollIntoView({ behavior: "smooth" });
3323
+ }, 200);
3310
3324
  };
3311
3325
  const handleFilterChange = (value) => {
3312
3326
  setFilterValue(value);
@@ -3335,7 +3349,7 @@ var ResourcesGridList = ({
3335
3349
  const safeCurrentPage = Math.min(currentPage, totalPages);
3336
3350
  const pageStart = (safeCurrentPage - 1) * ITEMS_PER_PAGE;
3337
3351
  const paginatedItems = displayedItems.slice(pageStart, pageStart + ITEMS_PER_PAGE);
3338
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx15__default.default(ResourcesGridList_module_default.widget, className), children: [
3352
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: widgetRef, className: clsx15__default.default(ResourcesGridList_module_default.widget, className), children: [
3339
3353
  /* @__PURE__ */ jsxRuntime.jsx(
3340
3354
  FilterBar,
3341
3355
  {
@@ -3851,6 +3865,7 @@ var BlogSearchResultsList = ({
3851
3865
  onSearchChange,
3852
3866
  onSearchSubmit,
3853
3867
  searchValue,
3868
+ searchInputProps,
3854
3869
  className,
3855
3870
  renderLink,
3856
3871
  children
@@ -3869,7 +3884,7 @@ var BlogSearchResultsList = ({
3869
3884
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx15__default.default("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
3870
3885
  /* @__PURE__ */ jsxRuntime.jsx(
3871
3886
  Input,
3872
- {
3887
+ __spreadValues({
3873
3888
  className: clsx15__default.default("search-input", BlogSearchResultsList_module_default["search-input"]),
3874
3889
  startAdornment: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "search" }),
3875
3890
  placeholder: "Search News",
@@ -3887,7 +3902,7 @@ var BlogSearchResultsList = ({
3887
3902
  onChange: (e) => {
3888
3903
  onSearchChange(e.target.value);
3889
3904
  }
3890
- }
3905
+ }, searchInputProps)
3891
3906
  ),
3892
3907
  /* @__PURE__ */ jsxRuntime.jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
3893
3908
  ] }),