@digital-b2c/coreui-kit 0.11.0 → 0.11.2
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 +76 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +23 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -834,9 +834,15 @@ interface BlogSearchResultsListProps extends PropsWithChildren {
|
|
|
834
834
|
searchValue: string;
|
|
835
835
|
onSearchChange: (value: string) => void;
|
|
836
836
|
onSearchSubmit: (value: string) => void;
|
|
837
|
+
currentPage?: number;
|
|
838
|
+
onPageChange?: (page: number) => void;
|
|
839
|
+
totalPages?: number;
|
|
840
|
+
renderLink?: (props: React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
841
|
+
children: React.ReactNode;
|
|
842
|
+
}) => React.ReactNode;
|
|
837
843
|
}
|
|
838
844
|
|
|
839
|
-
declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, className, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
|
|
845
|
+
declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, onPageChange, searchValue, currentPage, totalPages, className, renderLink, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
|
|
840
846
|
Search: ({ children }: BlogSearchResultsListSearchProps) => react_jsx_runtime.JSX.Element;
|
|
841
847
|
};
|
|
842
848
|
|
package/dist/index.d.ts
CHANGED
|
@@ -834,9 +834,15 @@ interface BlogSearchResultsListProps extends PropsWithChildren {
|
|
|
834
834
|
searchValue: string;
|
|
835
835
|
onSearchChange: (value: string) => void;
|
|
836
836
|
onSearchSubmit: (value: string) => void;
|
|
837
|
+
currentPage?: number;
|
|
838
|
+
onPageChange?: (page: number) => void;
|
|
839
|
+
totalPages?: number;
|
|
840
|
+
renderLink?: (props: React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
841
|
+
children: React.ReactNode;
|
|
842
|
+
}) => React.ReactNode;
|
|
837
843
|
}
|
|
838
844
|
|
|
839
|
-
declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, searchValue, className, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
|
|
845
|
+
declare const BlogSearchResultsList: (({ items, searchResult, onSearchChange, onSearchSubmit, onPageChange, searchValue, currentPage, totalPages, className, renderLink, children, }: BlogSearchResultsListProps) => react_jsx_runtime.JSX.Element) & {
|
|
840
846
|
Search: ({ children }: BlogSearchResultsListSearchProps) => react_jsx_runtime.JSX.Element;
|
|
841
847
|
};
|
|
842
848
|
|
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
|
|
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 =
|
|
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) {
|
|
@@ -3743,15 +3743,20 @@ var BlogSearchResultsList_module_default = {
|
|
|
3743
3743
|
"search-result": "BlogSearchResultsList_module_search-result",
|
|
3744
3744
|
wrapper: "BlogSearchResultsList_module_wrapper",
|
|
3745
3745
|
"search-input": "BlogSearchResultsList_module_search-input",
|
|
3746
|
-
"end-action-button": "BlogSearchResultsList_module_end-action-button"
|
|
3746
|
+
"end-action-button": "BlogSearchResultsList_module_end-action-button",
|
|
3747
|
+
pagination: "BlogSearchResultsList_module_pagination"
|
|
3747
3748
|
};
|
|
3748
3749
|
var BlogSearchResultsList = ({
|
|
3749
3750
|
items,
|
|
3750
3751
|
searchResult,
|
|
3751
3752
|
onSearchChange,
|
|
3752
3753
|
onSearchSubmit,
|
|
3754
|
+
onPageChange,
|
|
3753
3755
|
searchValue,
|
|
3756
|
+
currentPage,
|
|
3757
|
+
totalPages = 0,
|
|
3754
3758
|
className,
|
|
3759
|
+
renderLink,
|
|
3755
3760
|
children
|
|
3756
3761
|
}) => {
|
|
3757
3762
|
var _a;
|
|
@@ -3760,11 +3765,9 @@ var BlogSearchResultsList = ({
|
|
|
3760
3765
|
});
|
|
3761
3766
|
const searchNode = (_a = slots.search) != null ? _a : searchResult;
|
|
3762
3767
|
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
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
'":'
|
|
3767
|
-
] }) : searchNode,
|
|
3768
|
+
typeof searchNode === "string" ? /* @__PURE__ */ jsx("span", { className: clsx15("search-result", BlogSearchResultsList_module_default["search-result"]), children: searchNode }) : React63.isValidElement(searchNode) ? React63.cloneElement(searchNode, {
|
|
3769
|
+
className: clsx15("search-result", BlogSearchResultsList_module_default["search-result"])
|
|
3770
|
+
}) : null,
|
|
3768
3771
|
/* @__PURE__ */ jsxs("div", { className: clsx15("wrapper", BlogSearchResultsList_module_default["wrapper"]), children: [
|
|
3769
3772
|
/* @__PURE__ */ jsx(
|
|
3770
3773
|
Input,
|
|
@@ -3788,8 +3791,18 @@ var BlogSearchResultsList = ({
|
|
|
3788
3791
|
}
|
|
3789
3792
|
}
|
|
3790
3793
|
),
|
|
3791
|
-
/* @__PURE__ */ jsx(BlogCardGrid2, { items, hasContainer: false })
|
|
3792
|
-
] })
|
|
3794
|
+
/* @__PURE__ */ jsx(BlogCardGrid2, { items, hasContainer: false, renderLink })
|
|
3795
|
+
] }),
|
|
3796
|
+
totalPages ? /* @__PURE__ */ jsx(
|
|
3797
|
+
Pagination,
|
|
3798
|
+
{
|
|
3799
|
+
currentPage: currentPage || 1,
|
|
3800
|
+
totalPages: totalPages || 0,
|
|
3801
|
+
onPageChange,
|
|
3802
|
+
className: clsx15("pagination", BlogSearchResultsList_module_default["pagination"]),
|
|
3803
|
+
hasNumber: true
|
|
3804
|
+
}
|
|
3805
|
+
) : null
|
|
3793
3806
|
] }) });
|
|
3794
3807
|
};
|
|
3795
3808
|
|