@redneckz/wildless-cms-uni-blocks 0.14.9 → 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 +40 -38
- 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/ContentPage/ContentPage.js +1 -1
- package/dist/components/ContentPage/ContentPage.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/Icon/Icon.js +1 -1
- package/dist/ui-kit/Icon/Icon.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/ContentPage/ContentPage.js +1 -1
- package/lib/components/ContentPage/ContentPage.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/Icon/Icon.js +1 -1
- package/lib/ui-kit/Icon/Icon.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 +15 -12
- 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/ContentPage/ContentPage.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.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/Icon/Icon.js +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.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/ContentPage/ContentPage.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.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/Icon/Icon.js +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.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/ContentPage/ContentPage.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/Icon/Icon.tsx +1 -1
- 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/ContentPage/ContentPage.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/Icon/Icon.tsx +1 -1
- 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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { useCallback, useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { Icon } from '../Icon/Icon';
|
|
3
|
+
import { paginationBlockStyle } from './paginationBlockStyle';
|
|
4
|
+
import { renderPages } from './renderPages';
|
|
5
|
+
|
|
6
|
+
const ICON_SIZE = { width: '24', height: '24' };
|
|
7
|
+
|
|
8
|
+
export interface PaginationContainerProps {
|
|
9
|
+
currentPage: number;
|
|
10
|
+
onPageChange: (page: number) => void;
|
|
11
|
+
totalPages: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const PaginationContainer = ({
|
|
15
|
+
currentPage,
|
|
16
|
+
onPageChange,
|
|
17
|
+
totalPages,
|
|
18
|
+
}: PaginationContainerProps) => {
|
|
19
|
+
const pages = useMemo(
|
|
20
|
+
() =>
|
|
21
|
+
new Array(totalPages).fill({
|
|
22
|
+
currentPage,
|
|
23
|
+
onPageChange,
|
|
24
|
+
totalPages,
|
|
25
|
+
}),
|
|
26
|
+
[totalPages, currentPage],
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const handlePrevPage = useCallback(() => {
|
|
30
|
+
if (currentPage > 1) {
|
|
31
|
+
onPageChange(currentPage - 1);
|
|
32
|
+
}
|
|
33
|
+
}, [currentPage]);
|
|
34
|
+
|
|
35
|
+
const handleNextPage = useCallback(() => {
|
|
36
|
+
if (currentPage < totalPages - 1) {
|
|
37
|
+
onPageChange(currentPage + 1);
|
|
38
|
+
}
|
|
39
|
+
}, [currentPage, totalPages]);
|
|
40
|
+
|
|
41
|
+
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
42
|
+
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div className="flex gap-m items-center">
|
|
46
|
+
<div onClick={handlePrevPage}>
|
|
47
|
+
<Icon
|
|
48
|
+
name="ArrowLeftIcon"
|
|
49
|
+
iconVersion="black"
|
|
50
|
+
imageClassName={getIconStyle(currentPage === 1)}
|
|
51
|
+
{...ICON_SIZE}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
<div className="flex gap-xs">
|
|
55
|
+
{currentPage > 1 ? (
|
|
56
|
+
<div onClick={handleFirstPage} className={paginationBlockStyle} aria-label="Страница 1">
|
|
57
|
+
1
|
|
58
|
+
</div>
|
|
59
|
+
) : null}
|
|
60
|
+
{currentPage > 4 ? <div className="py-m px-s">...</div> : null}
|
|
61
|
+
{pages.map(renderPages)}
|
|
62
|
+
{currentPage < totalPages - 3 ? <div className="py-m px-s">...</div> : null}
|
|
63
|
+
{currentPage < totalPages ? (
|
|
64
|
+
<div
|
|
65
|
+
onClick={handleLastPage}
|
|
66
|
+
className={paginationBlockStyle}
|
|
67
|
+
aria-label={`Страница ${totalPages}}`}
|
|
68
|
+
>
|
|
69
|
+
{totalPages}
|
|
70
|
+
</div>
|
|
71
|
+
) : null}
|
|
72
|
+
</div>
|
|
73
|
+
<div onClick={handleNextPage}>
|
|
74
|
+
<Icon
|
|
75
|
+
className="rotate-180"
|
|
76
|
+
name="ArrowLeftIcon"
|
|
77
|
+
iconVersion="black"
|
|
78
|
+
imageClassName={getIconStyle(currentPage === totalPages)}
|
|
79
|
+
{...ICON_SIZE}
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const getIconStyle = (condition: boolean) =>
|
|
87
|
+
condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { paginationBlockStyle
|
|
1
|
+
import { paginationBlockStyle } from './paginationBlockStyle';
|
|
2
|
+
import type { PaginationContainerProps } from './PaginationContainer';
|
|
2
3
|
import { shouldRenderPage } from './shouldRenderPage';
|
|
3
4
|
|
|
4
|
-
export const renderPages = (pagesParams:
|
|
5
|
+
export const renderPages = (pagesParams: PaginationContainerProps, index: number) => {
|
|
5
6
|
const { currentPage, onPageChange, totalPages } = pagesParams;
|
|
6
7
|
const page = index + 1;
|
|
7
8
|
if (page === currentPage) {
|
|
@@ -2,12 +2,12 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
4
4
|
import { LabelProps } from '../../model/HeadlineType';
|
|
5
|
-
import { Text } from '../../ui-kit/Text/Text';
|
|
6
5
|
import { style } from '../../utils/style';
|
|
7
6
|
import { Icon } from '../Icon/Icon';
|
|
8
7
|
import { Input } from '../Input/Input';
|
|
9
|
-
import
|
|
8
|
+
import { Text } from '../Text/Text';
|
|
10
9
|
import { formatOption } from './formatOption';
|
|
10
|
+
import type { Option } from './Option';
|
|
11
11
|
import { useSelectPopup } from './useSelectPopup';
|
|
12
12
|
|
|
13
13
|
export type SelectProps = LabelProps & {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const formatDate = (date: string) => date.split('-').reverse().join('.');
|
package/tailwind.config.cjs
CHANGED
|
@@ -64,6 +64,7 @@ module.exports = {
|
|
|
64
64
|
'linear-gradient(90deg, rgba(var(--color-primary-main), 1) 0%, rgba(var(--color-primary-main), 0) 80%);',
|
|
65
65
|
'green-to-yellow': 'linear-gradient(180deg, #42AB44 0%, #F6DB7D 100%)',
|
|
66
66
|
},
|
|
67
|
+
flexShrink: { '1/2': '0.5'},
|
|
67
68
|
fontFamily: {
|
|
68
69
|
sans: ['Ubuntu', ...defaultTheme.fontFamily.sans],
|
|
69
70
|
mohave: ['Mohave', ...defaultTheme.fontFamily.sans],
|
|
@@ -266,6 +267,24 @@ module.exports = {
|
|
|
266
267
|
},
|
|
267
268
|
},
|
|
268
269
|
},
|
|
269
|
-
plugins: [require('@tailwindcss/container-queries')
|
|
270
|
+
plugins: [require('@tailwindcss/container-queries'), function ({ addComponents }) {
|
|
271
|
+
addComponents({
|
|
272
|
+
'.container': {
|
|
273
|
+
maxWidth: '100%',
|
|
274
|
+
'@screen sm': {
|
|
275
|
+
maxWidth: 'none',
|
|
276
|
+
},
|
|
277
|
+
'@screen md': {
|
|
278
|
+
maxWidth: 'none',
|
|
279
|
+
},
|
|
280
|
+
'@screen lg': {
|
|
281
|
+
maxWidth: '1024px',
|
|
282
|
+
},
|
|
283
|
+
'@screen xl': {
|
|
284
|
+
maxWidth: '1280px',
|
|
285
|
+
},
|
|
286
|
+
}
|
|
287
|
+
})
|
|
288
|
+
}],
|
|
270
289
|
safelist: [],
|
|
271
290
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertTimestampToDate: (timestamp: number) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertTimestampToDate: (timestamp: number) => string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.convertTimestampToDate = void 0;
|
|
3
|
-
const convertTimestampToDate = (timestamp) => {
|
|
4
|
-
const date = new Date(timestamp * 1000);
|
|
5
|
-
let dd = date.getDate();
|
|
6
|
-
if (dd < 10) {
|
|
7
|
-
dd = '0' + dd;
|
|
8
|
-
}
|
|
9
|
-
let mm = date.getMonth() + 1;
|
|
10
|
-
if (mm < 10) {
|
|
11
|
-
mm = '0' + mm;
|
|
12
|
-
}
|
|
13
|
-
return dd + '.' + mm + '.' + date.getFullYear();
|
|
14
|
-
};
|
|
15
|
-
exports.convertTimestampToDate = convertTimestampToDate;
|
|
16
|
-
//# sourceMappingURL=convertTimestampToDate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertTimestampToDate.js","sourceRoot":"","sources":["../../src/utils/convertTimestampToDate.ts"],"names":[],"mappings":";;AAAO,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAExC,IAAI,EAAE,GAAoB,IAAI,CAAC,OAAO,EAAE,CAAC;IACzC,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,IAAI,EAAE,GAAoB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC,CAAC;AAdW,QAAA,sBAAsB,0BAcjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertTimestampToDate: (timestamp: number) => string;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const convertTimestampToDate = (timestamp) => {
|
|
2
|
-
const date = new Date(timestamp * 1000);
|
|
3
|
-
let dd = date.getDate();
|
|
4
|
-
if (dd < 10) {
|
|
5
|
-
dd = '0' + dd;
|
|
6
|
-
}
|
|
7
|
-
let mm = date.getMonth() + 1;
|
|
8
|
-
if (mm < 10) {
|
|
9
|
-
mm = '0' + mm;
|
|
10
|
-
}
|
|
11
|
-
return dd + '.' + mm + '.' + date.getFullYear();
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=convertTimestampToDate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertTimestampToDate.js","sourceRoot":"","sources":["../../src/utils/convertTimestampToDate.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAExC,IAAI,EAAE,GAAoB,IAAI,CAAC,OAAO,EAAE,CAAC;IACzC,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,IAAI,EAAE,GAAoB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertTimestampToDate: (timestamp: number) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertTimestampToDate: (timestamp: number) => string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.convertTimestampToDate = void 0;
|
|
3
|
-
const convertTimestampToDate = (timestamp) => {
|
|
4
|
-
const date = new Date(timestamp * 1000);
|
|
5
|
-
let dd = date.getDate();
|
|
6
|
-
if (dd < 10) {
|
|
7
|
-
dd = '0' + dd;
|
|
8
|
-
}
|
|
9
|
-
let mm = date.getMonth() + 1;
|
|
10
|
-
if (mm < 10) {
|
|
11
|
-
mm = '0' + mm;
|
|
12
|
-
}
|
|
13
|
-
return dd + '.' + mm + '.' + date.getFullYear();
|
|
14
|
-
};
|
|
15
|
-
exports.convertTimestampToDate = convertTimestampToDate;
|
|
16
|
-
//# sourceMappingURL=convertTimestampToDate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertTimestampToDate.js","sourceRoot":"","sources":["../../src/utils/convertTimestampToDate.ts"],"names":[],"mappings":";;AAAO,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAExC,IAAI,EAAE,GAAoB,IAAI,CAAC,OAAO,EAAE,CAAC;IACzC,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,IAAI,EAAE,GAAoB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC,CAAC;AAdW,QAAA,sBAAsB,0BAcjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const convertTimestampToDate: (timestamp: number) => string;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const convertTimestampToDate = (timestamp) => {
|
|
2
|
-
const date = new Date(timestamp * 1000);
|
|
3
|
-
let dd = date.getDate();
|
|
4
|
-
if (dd < 10) {
|
|
5
|
-
dd = '0' + dd;
|
|
6
|
-
}
|
|
7
|
-
let mm = date.getMonth() + 1;
|
|
8
|
-
if (mm < 10) {
|
|
9
|
-
mm = '0' + mm;
|
|
10
|
-
}
|
|
11
|
-
return dd + '.' + mm + '.' + date.getFullYear();
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=convertTimestampToDate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertTimestampToDate.js","sourceRoot":"","sources":["../../src/utils/convertTimestampToDate.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAExC,IAAI,EAAE,GAAoB,IAAI,CAAC,OAAO,EAAE,CAAC;IACzC,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,IAAI,EAAE,GAAoB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const convertTimestampToDate = (timestamp: number) => {
|
|
2
|
-
const date = new Date(timestamp * 1000);
|
|
3
|
-
|
|
4
|
-
let dd: string | number = date.getDate();
|
|
5
|
-
if (dd < 10) {
|
|
6
|
-
dd = '0' + dd;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
let mm: string | number = date.getMonth() + 1;
|
|
10
|
-
if (mm < 10) {
|
|
11
|
-
mm = '0' + mm;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return dd + '.' + mm + '.' + date.getFullYear();
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export const convertTimestampToDate = (timestamp: number) => {
|
|
2
|
-
const date = new Date(timestamp * 1000);
|
|
3
|
-
|
|
4
|
-
let dd: string | number = date.getDate();
|
|
5
|
-
if (dd < 10) {
|
|
6
|
-
dd = '0' + dd;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
let mm: string | number = date.getMonth() + 1;
|
|
10
|
-
if (mm < 10) {
|
|
11
|
-
mm = '0' + mm;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return dd + '.' + mm + '.' + date.getFullYear();
|
|
15
|
-
};
|