@digital-b2c/coreui-kit 0.11.0 → 0.11.1

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.d.cts CHANGED
@@ -834,9 +834,12 @@ interface BlogSearchResultsListProps extends PropsWithChildren {
834
834
  searchValue: string;
835
835
  onSearchChange: (value: string) => void;
836
836
  onSearchSubmit: (value: string) => void;
837
+ renderLink?: (props: React.AnchorHTMLAttributes<HTMLAnchorElement> & {
838
+ children: React.ReactNode;
839
+ }) => React.ReactNode;
837
840
  }
838
841
 
839
- declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, className, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
842
+ declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, className, renderLink, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
840
843
  Search: ({ children }: BlogSearchResultsListSearchProps) => react_jsx_runtime.JSX.Element;
841
844
  };
842
845
 
package/dist/index.d.ts CHANGED
@@ -834,9 +834,12 @@ interface BlogSearchResultsListProps extends PropsWithChildren {
834
834
  searchValue: string;
835
835
  onSearchChange: (value: string) => void;
836
836
  onSearchSubmit: (value: string) => void;
837
+ renderLink?: (props: React.AnchorHTMLAttributes<HTMLAnchorElement> & {
838
+ children: React.ReactNode;
839
+ }) => React.ReactNode;
837
840
  }
838
841
 
839
- declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, className, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
842
+ declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, className, renderLink, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
840
843
  Search: ({ children }: BlogSearchResultsListSearchProps) => react_jsx_runtime.JSX.Element;
841
844
  };
842
845
 
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import clsx15 from 'clsx';
2
2
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
- import React62, { forwardRef, useId, useRef, useState, useCallback, useMemo, Children, isValidElement, useEffect } from 'react';
3
+ import React63, { forwardRef, useId, useRef, useState, useCallback, useMemo, Children, isValidElement, useEffect } from 'react';
4
4
  import gsap$1, { gsap } from 'gsap';
5
5
  import { useGSAP } from '@gsap/react';
6
6
  import { ScrollTrigger } from 'gsap/ScrollTrigger';
@@ -368,7 +368,7 @@ var svgs = {
368
368
  xBlack: icon_x_black_default,
369
369
  xWhite: icon_x_white_default
370
370
  };
371
- var Icon = React62.memo(
371
+ var Icon = React63.memo(
372
372
  (_a) => {
373
373
  var _b = _a, { type, size } = _b, props = __objRest(_b, ["type", "size"]);
374
374
  if (type) {
@@ -3752,6 +3752,7 @@ var BlogSearchResultsList = ({
3752
3752
  onSearchSubmit,
3753
3753
  searchValue,
3754
3754
  className,
3755
+ renderLink,
3755
3756
  children
3756
3757
  }) => {
3757
3758
  var _a;
@@ -3760,11 +3761,9 @@ var BlogSearchResultsList = ({
3760
3761
  });
3761
3762
  const searchNode = (_a = slots.search) != null ? _a : searchResult;
3762
3763
  return /* @__PURE__ */ jsx("div", { className: clsx15("search-results-list", BlogSearchResultsList_module_default["search-results-list"], className), children: /* @__PURE__ */ jsxs(Container, { className: clsx15("container", BlogSearchResultsList_module_default["container"]), children: [
3763
- searchNode && typeof searchNode === "string" ? /* @__PURE__ */ jsxs("span", { className: clsx15("search-result", BlogSearchResultsList_module_default["search-result"]), children: [
3764
- 'Search results for "',
3765
- searchNode,
3766
- '":'
3767
- ] }) : searchNode,
3764
+ typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className: clsx15("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React63.isValidElement(searchNode) ? React63.cloneElement(searchNode, {
3765
+ className: clsx15("search-result", BlogSearchResultsList_module_default["search-result"])
3766
+ }) : null,
3768
3767
  /* @__PURE__ */ jsxs("div", { className: clsx15("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
3769
3768
  /* @__PURE__ */ jsx(
3770
3769
  Input,
@@ -3788,7 +3787,7 @@ var BlogSearchResultsList = ({
3788
3787
  }
3789
3788
  }
3790
3789
  ),
3791
- /* @__PURE__ */ jsx(BlogCardGrid2, { items, hasContainer: false })
3790
+ /* @__PURE__ */ jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
3792
3791
  ] })
3793
3792
  ] }) });
3794
3793
  };