@redneckz/wildless-cms-uni-blocks 0.14.10 → 0.14.11
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/bin/migration-scripts/0.14.7.js +32 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +38 -36
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Depository/useDepository.d.ts +1 -1
- package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +4 -4
- package/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/bundle/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/bundle/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/bundle/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/bundle/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/bundle/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/bundle/utils/formatDate.d.ts +1 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/Depository/Depository.js +3 -2
- package/dist/components/Depository/Depository.js.map +1 -1
- package/dist/components/Depository/DepositoryItem.js +3 -3
- package/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/dist/components/Depository/useDepository.d.ts +1 -1
- package/dist/components/ProductTile/ProductTile.js +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +4 -4
- package/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js +8 -5
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/dist/ui-kit/Pagination/PageSizeSelector.js +12 -0
- package/dist/ui-kit/Pagination/PageSizeSelector.js.map +1 -0
- package/dist/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/dist/ui-kit/Pagination/Pagination.js +4 -27
- package/dist/ui-kit/Pagination/Pagination.js.map +1 -1
- package/dist/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/dist/ui-kit/Pagination/PaginationContainer.js +31 -0
- package/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -0
- package/dist/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/dist/ui-kit/Pagination/paginationBlockStyle.js +4 -0
- package/dist/ui-kit/Pagination/paginationBlockStyle.js.map +1 -0
- package/dist/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/dist/ui-kit/Pagination/renderPages.js +2 -2
- package/dist/ui-kit/Pagination/renderPages.js.map +1 -1
- package/dist/ui-kit/Select/Select.js +1 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/utils/formatDate.d.ts +1 -0
- package/dist/utils/formatDate.js +5 -0
- package/dist/utils/formatDate.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/Depository/Depository.js +3 -2
- package/lib/components/Depository/Depository.js.map +1 -1
- package/lib/components/Depository/DepositoryItem.js +3 -3
- package/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/lib/components/Depository/useDepository.d.ts +1 -1
- package/lib/components/ProductTile/ProductTile.js +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/Tile/Tile.fixture.d.ts +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +4 -4
- package/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js +8 -5
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/lib/ui-kit/Pagination/PageSizeSelector.js +9 -0
- package/lib/ui-kit/Pagination/PageSizeSelector.js.map +1 -0
- package/lib/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/lib/ui-kit/Pagination/Pagination.js +3 -26
- package/lib/ui-kit/Pagination/Pagination.js.map +1 -1
- package/lib/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/lib/ui-kit/Pagination/PaginationContainer.js +28 -0
- package/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -0
- package/lib/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/lib/ui-kit/Pagination/paginationBlockStyle.js +2 -0
- package/lib/ui-kit/Pagination/paginationBlockStyle.js.map +1 -0
- package/lib/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/lib/ui-kit/Pagination/renderPages.js +1 -1
- package/lib/ui-kit/Pagination/renderPages.js.map +1 -1
- package/lib/ui-kit/Select/Select.js +1 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/utils/formatDate.d.ts +1 -0
- package/lib/utils/formatDate.js +2 -0
- package/lib/utils/formatDate.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +13 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Depository/useDepository.d.ts +1 -1
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +4 -4
- package/mobile/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/mobile/bundle/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/mobile/bundle/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/mobile/bundle/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/mobile/bundle/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/mobile/bundle/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/mobile/bundle/utils/formatDate.d.ts +1 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/dist/components/Depository/Depository.js +3 -2
- package/mobile/dist/components/Depository/Depository.js.map +1 -1
- package/mobile/dist/components/Depository/DepositoryItem.js +3 -3
- package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/dist/components/Depository/useDepository.d.ts +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +4 -4
- package/mobile/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +8 -5
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/mobile/dist/ui-kit/Pagination/PageSizeSelector.js +12 -0
- package/mobile/dist/ui-kit/Pagination/PageSizeSelector.js.map +1 -0
- package/mobile/dist/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/mobile/dist/ui-kit/Pagination/Pagination.js +4 -27
- package/mobile/dist/ui-kit/Pagination/Pagination.js.map +1 -1
- package/mobile/dist/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/mobile/dist/ui-kit/Pagination/PaginationContainer.js +31 -0
- package/mobile/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -0
- package/mobile/dist/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/mobile/dist/ui-kit/Pagination/paginationBlockStyle.js +4 -0
- package/mobile/dist/ui-kit/Pagination/paginationBlockStyle.js.map +1 -0
- package/mobile/dist/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/mobile/dist/ui-kit/Pagination/renderPages.js +2 -2
- package/mobile/dist/ui-kit/Pagination/renderPages.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/utils/formatDate.d.ts +1 -0
- package/mobile/dist/utils/formatDate.js +5 -0
- package/mobile/dist/utils/formatDate.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/lib/components/Depository/Depository.js +3 -2
- package/mobile/lib/components/Depository/Depository.js.map +1 -1
- package/mobile/lib/components/Depository/DepositoryItem.js +3 -3
- package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/lib/components/Depository/useDepository.d.ts +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +4 -4
- package/mobile/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +8 -5
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/mobile/lib/ui-kit/Pagination/PageSizeSelector.js +9 -0
- package/mobile/lib/ui-kit/Pagination/PageSizeSelector.js.map +1 -0
- package/mobile/lib/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/mobile/lib/ui-kit/Pagination/Pagination.js +3 -26
- package/mobile/lib/ui-kit/Pagination/Pagination.js.map +1 -1
- package/mobile/lib/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/mobile/lib/ui-kit/Pagination/PaginationContainer.js +28 -0
- package/mobile/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -0
- package/mobile/lib/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/mobile/lib/ui-kit/Pagination/paginationBlockStyle.js +2 -0
- package/mobile/lib/ui-kit/Pagination/paginationBlockStyle.js.map +1 -0
- package/mobile/lib/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/mobile/lib/ui-kit/Pagination/renderPages.js +1 -1
- package/mobile/lib/ui-kit/Pagination/renderPages.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/utils/formatDate.d.ts +1 -0
- package/mobile/lib/utils/formatDate.js +2 -0
- package/mobile/lib/utils/formatDate.js.map +1 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -2
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +1 -1
- package/mobile/src/components/Depository/Depository.tsx +5 -2
- package/mobile/src/components/Depository/DepositoryItem.tsx +3 -3
- package/mobile/src/components/Depository/useDepository.ts +1 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +1 -1
- package/mobile/src/components/ProductTile/ProductTile.tsx +1 -1
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +6 -5
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +4 -4
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +24 -18
- package/mobile/src/ui-kit/Pagination/PageSizeSelector.tsx +27 -0
- package/mobile/src/ui-kit/Pagination/Pagination.tsx +26 -80
- package/mobile/src/ui-kit/Pagination/PaginationContainer.tsx +87 -0
- package/mobile/src/ui-kit/Pagination/paginationBlockStyle.ts +2 -0
- package/mobile/src/ui-kit/Pagination/renderPages.tsx +3 -2
- package/mobile/src/ui-kit/Select/Select.tsx +2 -2
- package/mobile/src/utils/formatDate.ts +1 -0
- package/package.json +1 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -2
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +1 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -1
- package/src/components/Depository/Depository.fixture.tsx +2 -0
- package/src/components/Depository/Depository.tsx +5 -2
- package/src/components/Depository/DepositoryItem.tsx +3 -3
- package/src/components/Depository/useDepository.ts +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +1 -1
- package/src/components/ProductTile/ProductTile.example.json +1 -1
- package/src/components/ProductTile/ProductTile.tsx +1 -1
- package/src/components/Tile/Tile.fixture.tsx +1 -2
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +6 -5
- package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +4 -4
- package/src/ui-kit/BaseTile/BaseTile.tsx +24 -18
- package/src/ui-kit/Pagination/PageSizeSelector.tsx +27 -0
- package/src/ui-kit/Pagination/Pagination.tsx +26 -80
- package/src/ui-kit/Pagination/PaginationContainer.tsx +87 -0
- package/src/ui-kit/Pagination/paginationBlockStyle.ts +2 -0
- package/src/ui-kit/Pagination/renderPages.tsx +3 -2
- package/src/ui-kit/Select/Select.tsx +2 -2
- package/src/utils/formatDate.ts +1 -0
- package/tailwind.config.cjs +20 -1
- package/bundle/utils/convertTimestampToDate.d.ts +0 -1
- package/dist/utils/convertTimestampToDate.d.ts +0 -1
- package/dist/utils/convertTimestampToDate.js +0 -16
- package/dist/utils/convertTimestampToDate.js.map +0 -1
- package/lib/utils/convertTimestampToDate.d.ts +0 -1
- package/lib/utils/convertTimestampToDate.js +0 -13
- package/lib/utils/convertTimestampToDate.js.map +0 -1
- package/mobile/bundle/utils/convertTimestampToDate.d.ts +0 -1
- package/mobile/dist/utils/convertTimestampToDate.d.ts +0 -1
- package/mobile/dist/utils/convertTimestampToDate.js +0 -16
- package/mobile/dist/utils/convertTimestampToDate.js.map +0 -1
- package/mobile/lib/utils/convertTimestampToDate.d.ts +0 -1
- package/mobile/lib/utils/convertTimestampToDate.js +0 -13
- package/mobile/lib/utils/convertTimestampToDate.js.map +0 -1
- package/mobile/src/utils/convertTimestampToDate.ts +0 -15
- package/src/utils/convertTimestampToDate.ts +0 -15
|
@@ -1,28 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export const paginationBlockStyle = 'py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white';
|
|
6
|
-
const ICON_SIZE = { width: '24', height: '24' };
|
|
7
|
-
export const Pagination = ({ currentPage, onPageChange, totalPages }) => {
|
|
8
|
-
const handlePrevPage = useCallback(() => {
|
|
9
|
-
if (currentPage > 1) {
|
|
10
|
-
onPageChange(currentPage - 1);
|
|
11
|
-
}
|
|
12
|
-
}, [currentPage]);
|
|
13
|
-
const handleNextPage = useCallback(() => {
|
|
14
|
-
if (currentPage < totalPages - 1) {
|
|
15
|
-
onPageChange(currentPage + 1);
|
|
16
|
-
}
|
|
17
|
-
}, [currentPage, totalPages]);
|
|
18
|
-
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
19
|
-
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
20
|
-
const pages = useMemo(() => new Array(totalPages).fill({
|
|
21
|
-
currentPage,
|
|
22
|
-
onPageChange,
|
|
23
|
-
totalPages,
|
|
24
|
-
}), [totalPages, currentPage]);
|
|
25
|
-
return (_jsx("div", { className: "mt-3xl flex items-center select-none", role: "navigation", "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: _jsxs("div", { className: "flex gap-m items-center", children: [_jsx("div", { onClick: handlePrevPage, children: _jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE }) }), _jsxs("div", { className: "flex gap-xs", children: [currentPage > 1 ? (_jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 4 ? _jsx("div", { className: "py-m px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 3 ? _jsx("div", { className: "py-m px-s", children: "..." }) : null, currentPage < totalPages ? (_jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}}`, children: totalPages })) : null] }), _jsx("div", { onClick: handleNextPage, children: _jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE }) })] }) }));
|
|
26
|
-
};
|
|
27
|
-
const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
2
|
+
import { PageSizeSelector } from './PageSizeSelector.js';
|
|
3
|
+
import { PaginationContainer } from './PaginationContainer.js';
|
|
4
|
+
export const Pagination = ({ currentPage, onPageChange, totalPages, itemCount, onItemCountChange, }) => (_jsxs("div", { className: "mt-3xl flex justify-between items-center select-none", role: "navigation", "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: [_jsx(PaginationContainer, { currentPage: currentPage, onPageChange: onPageChange, totalPages: totalPages }), itemCount && onItemCountChange ? (_jsx(PageSizeSelector, { itemCount: itemCount, onItemCountChange: onItemCountChange })) : null] }));
|
|
28
5
|
//# sourceMappingURL=Pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","sourceRoot":"","sources":["../../../src/ui-kit/Pagination/Pagination.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Pagination.js","sourceRoot":"","sources":["../../../src/ui-kit/Pagination/Pagination.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAU5D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,WAAW,EACX,YAAY,EACZ,UAAU,EACV,SAAS,EACT,iBAAiB,GACD,EAAE,EAAE,CAAC,CACrB,eACE,SAAS,EAAC,sDAAsD,EAChE,IAAI,EAAC,YAAY,gBACN,wDAAW,aAEtB,KAAC,mBAAmB,IAClB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,GACtB,EACD,SAAS,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAChC,KAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,GAAI,CACjF,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PaginationContainerProps {
|
|
3
|
+
currentPage: number;
|
|
4
|
+
onPageChange: (page: number) => void;
|
|
5
|
+
totalPages: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const PaginationContainer: ({ currentPage, onPageChange, totalPages, }: PaginationContainerProps) => JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { Icon } from '../Icon/Icon.js';
|
|
4
|
+
import { paginationBlockStyle } from './paginationBlockStyle.js';
|
|
5
|
+
import { renderPages } from './renderPages.js';
|
|
6
|
+
const ICON_SIZE = { width: '24', height: '24' };
|
|
7
|
+
export const PaginationContainer = ({ currentPage, onPageChange, totalPages, }) => {
|
|
8
|
+
const pages = useMemo(() => new Array(totalPages).fill({
|
|
9
|
+
currentPage,
|
|
10
|
+
onPageChange,
|
|
11
|
+
totalPages,
|
|
12
|
+
}), [totalPages, currentPage]);
|
|
13
|
+
const handlePrevPage = useCallback(() => {
|
|
14
|
+
if (currentPage > 1) {
|
|
15
|
+
onPageChange(currentPage - 1);
|
|
16
|
+
}
|
|
17
|
+
}, [currentPage]);
|
|
18
|
+
const handleNextPage = useCallback(() => {
|
|
19
|
+
if (currentPage < totalPages - 1) {
|
|
20
|
+
onPageChange(currentPage + 1);
|
|
21
|
+
}
|
|
22
|
+
}, [currentPage, totalPages]);
|
|
23
|
+
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
24
|
+
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
25
|
+
return (_jsxs("div", { className: "flex gap-m items-center", children: [_jsx("div", { onClick: handlePrevPage, children: _jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE }) }), _jsxs("div", { className: "flex gap-xs", children: [currentPage > 1 ? (_jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 4 ? _jsx("div", { className: "py-m px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 3 ? _jsx("div", { className: "py-m px-s", children: "..." }) : null, currentPage < totalPages ? (_jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}}`, children: totalPages })) : null] }), _jsx("div", { onClick: handleNextPage, children: _jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE }) })] }));
|
|
26
|
+
};
|
|
27
|
+
const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
28
|
+
//# sourceMappingURL=PaginationContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationContainer.js","sourceRoot":"","sources":["../../../src/ui-kit/Pagination/PaginationContainer.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const paginationBlockStyle = "py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paginationBlockStyle.js","sourceRoot":"","sources":["../../../src/ui-kit/Pagination/paginationBlockStyle.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAC/B,gFAAgF,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare const renderPages: (pagesParams:
|
|
2
|
+
import type { PaginationContainerProps } from './PaginationContainer';
|
|
3
|
+
export declare const renderPages: (pagesParams: PaginationContainerProps, index: number) => JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { paginationBlockStyle } from './
|
|
2
|
+
import { paginationBlockStyle } from './paginationBlockStyle.js';
|
|
3
3
|
import { shouldRenderPage } from './shouldRenderPage.js';
|
|
4
4
|
export const renderPages = (pagesParams, index) => {
|
|
5
5
|
const { currentPage, onPageChange, totalPages } = pagesParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderPages.js","sourceRoot":"","sources":["../../../src/ui-kit/Pagination/renderPages.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"renderPages.js","sourceRoot":"","sources":["../../../src/ui-kit/Pagination/renderPages.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,WAAqC,EAAE,KAAa,EAAE,EAAE;IAClF,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC;IAC9D,MAAM,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC;IACvB,IAAI,IAAI,KAAK,WAAW,EAAE;QACxB,OAAO,CACL,8BAEe,MAAM,EACnB,SAAS,EAAC,iDAAiD,YAE1D,IAAI,IAJA,MAAM,CAAC,KAAK,CAAC,CAKd,CACP,CAAC;KACH;IAED,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,UAAU,IAAI,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE;QACxF,OAAO,CACL,cAEE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EACjC,SAAS,EAAE,oBAAoB,gBACnB,YAAY,IAAI,EAAE,YAE7B,IAAI,IALA,MAAM,CAAC,KAAK,CAAC,CAMd,CACP,CAAC;KACH;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
4
|
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
5
|
-
import { Text } from '../../ui-kit/Text/Text.js';
|
|
6
5
|
import { style } from '../../utils/style.js';
|
|
7
6
|
import { Icon } from '../Icon/Icon.js';
|
|
8
7
|
import { Input } from '../Input/Input.js';
|
|
8
|
+
import { Text } from '../Text/Text.js';
|
|
9
9
|
import { formatOption } from './formatOption.js';
|
|
10
10
|
import { useSelectPopup } from './useSelectPopup.js';
|
|
11
11
|
export const Select = JSX(({ className, label, options = [], value, valid = true, isBorder = true, placeholder = '', isSearch = false, onChange, }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/ui-kit/Select/Select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAE9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/ui-kit/Select/Select.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatDate: (date: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatDate.js","sourceRoot":"","sources":["../../src/utils/formatDate.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -2586,17 +2586,20 @@
|
|
|
2586
2586
|
center: '@xl:self-center',
|
|
2587
2587
|
end: '@xl:self-end',
|
|
2588
2588
|
};
|
|
2589
|
-
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign,
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
const
|
|
2589
|
+
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, isImageAlwaysOnRight = false, isImageSecondary, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col-reverse @xl:flex-row justify-around @xl:justify-between items-stretch gap-3xl'), children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow'), children: [jsxs("div", { className: "grow grid gap-3xl row-span-1", children: [insetTitle, children] }), renderImageContainer(rightImage, {
|
|
2590
|
+
className: style('@xl:justify-self-end row-start-1 @xl:row-end-3 @xl:col-start-2', positionStyle(isImageAlwaysOnRight), isImageSecondary ? 'hidden @xl:block' : ''),
|
|
2591
|
+
imageAlign,
|
|
2592
|
+
}), jsx("div", { className: "self-end", children: buttons })] })] })] })));
|
|
2593
|
+
const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight
|
|
2594
|
+
? 'ml-xl justify-self-end row-start-1 row-end-3 col-start-2 self-center'
|
|
2595
|
+
: '';
|
|
2596
|
+
const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('shrink-1/2 justify-self-center', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
|
|
2594
2597
|
|
|
2595
2598
|
const cardStyleMap = {
|
|
2596
2599
|
black: 'bg-black',
|
|
2597
2600
|
white: 'bg-white',
|
|
2598
2601
|
};
|
|
2599
|
-
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors = [], align = 'text-left', padding, ...rest }) => (jsx(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, title: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align })) : null, rightImage: image?.src ? (jsx(Img, { className: "flex justify-center align-center mb-xl", image: image })) : null, buttons: renderButtonsSection([button], { buttonClassName: 'w-full
|
|
2602
|
+
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors = [], align = 'text-left', padding, ...rest }) => (jsx(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, title: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align })) : null, rightImage: image?.src ? (jsx(Img, { className: "flex justify-center align-center mb-xl", image: image })) : null, buttons: renderButtonsSection([button], { buttonClassName: 'w-full self-end' }), children: [colors?.length ? (jsxs("div", { className: "flex text-secondary-text mb-m", children: [jsx("div", { className: "mr-xs", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0426\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null] }) })));
|
|
2600
2603
|
const renderColorOption = (color, i) => (jsx("div", { role: "figure", className: `w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
2601
2604
|
|
|
2602
2605
|
const LINK_CLASS_NAME = `absolute border
|
|
@@ -2703,11 +2706,11 @@
|
|
|
2703
2706
|
const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
|
|
2704
2707
|
const renderTag = (tag, key) => (jsx("div", { className: "p-xs border-solid border rounded-md border-gray", role: "listitem", children: jsx(Text, { size: "text-m", font: "font-light", children: tag }) }, String(key)));
|
|
2705
2708
|
|
|
2706
|
-
const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, benefits, __html, isFullWidthTitle = true, items, isDotted = true, listItemSize, tags = [], buttons, image, imageOptions: { imageAlign = '
|
|
2709
|
+
const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, benefits, __html, isFullWidthTitle = true, items, isDotted = true, listItemSize, tags = [], buttons, image, imageOptions: { imageAlign = 'center', directionRight = true, isImageAlwaysOnRight, isImageSecondary = false, } = {}, children, }) => {
|
|
2707
2710
|
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
2708
2711
|
const headline = renderHeadline({ title, description, headlineVersion, align });
|
|
2709
2712
|
const filteredBenefits = benefits?.filter((_) => _?.type === 'rte' || 'label' in _ || 'description' in _);
|
|
2710
|
-
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { insetTitle: headline } : { title: headline }), ...
|
|
2713
|
+
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { insetTitle: headline } : { title: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col sm:gap-xl gap-4xl", children: [filteredBenefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: filteredBenefits })) : null, __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, renderTags(tags)] }) }));
|
|
2711
2714
|
});
|
|
2712
2715
|
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
2713
2716
|
const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
|
|
@@ -3297,7 +3300,7 @@
|
|
|
3297
3300
|
.map((s) => s.productBlock)
|
|
3298
3301
|
.map((_, i) => (jsx("div", { className: "box-border h-full", role: "listitem", children: jsx(BaseProductTile, { className: "px-5 h-full", headlineVersion: "L", ..._, ...rest }) }, String(i)))) }) })));
|
|
3299
3302
|
|
|
3300
|
-
const ProductTile = JSX(({ className, padding, headlineVersion = 'S', isTabularBenefits = true, additionalDescription, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-4xl sm:p-xl", padding: padding, headlineVersion: headlineVersion, isTabularBenefits: isTabularBenefits, imageOptions: {
|
|
3303
|
+
const ProductTile = JSX(({ className, padding, headlineVersion = 'S', isTabularBenefits = true, additionalDescription, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-4xl sm:p-xl", padding: padding, headlineVersion: headlineVersion, isTabularBenefits: isTabularBenefits, imageOptions: { isImageSecondary: true, ...imageOptions }, ...rest, children: additionalDescription ? (jsx(Paragraph, { size: "text-m", font: "font-light", color: "group-data-primary:text-secondary-text", children: additionalDescription })) : null }) })));
|
|
3301
3304
|
|
|
3302
3305
|
const RepresentativeOfficeInfo = JSX(({ address, email, telephone, button, className = '', __html, icon, title, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border text-left space-y-s', className), version: version, ...rest, children: [jsxs("div", { className: "w-full flex justify-between flex-row-reverse", children: [renderIconBlock(icon), title ? jsx(Heading, { headingType: "h3", as: "h3", title: title }) : null] }), jsxs("div", { className: "w-full space-y-m", children: [__html ? renderDescriptionBlock(__html) : null, renderBlock({
|
|
3303
3306
|
label: 'Адрес',
|
|
@@ -4913,7 +4916,7 @@
|
|
|
4913
4916
|
|
|
4914
4917
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
4915
4918
|
|
|
4916
|
-
const packageVersion = "0.14.
|
|
4919
|
+
const packageVersion = "0.14.11";
|
|
4917
4920
|
|
|
4918
4921
|
exports.Blocks = Blocks;
|
|
4919
4922
|
exports.ContentPage = ContentPage;
|