@redneckz/wildless-cms-uni-blocks 0.3.23 → 0.3.26
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +30 -51
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.mobile.d.ts +1 -0
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +18 -6
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +4 -4
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +4 -9
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +3 -2
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/dist/components/OtherProducts/OtherProductsItem.js +1 -1
- package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js +7 -5
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +8 -3
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.d.ts +2 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.js +1 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/dist/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/dist/components/TariffsTable/TariffsTableCell.js +4 -4
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/icons/IconName.d.ts +1 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +2 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +2 -2
- package/dist/ui-kit/Img/Img.js +3 -1
- package/dist/ui-kit/Img/Img.js.map +1 -1
- package/dist/ui-kit/List/List.d.ts +1 -1
- package/dist/ui-kit/List/List.js +7 -2
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListItem.d.ts +1 -1
- package/dist/ui-kit/List/ListItem.js +4 -9
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/List/ListProps.d.ts +2 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.d.ts +1 -0
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +18 -6
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +4 -4
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +4 -9
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +3 -2
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/lib/components/OtherProducts/OtherProductsItem.js +1 -1
- package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +4 -0
- package/lib/components/ProductBlock/ProductBlock.mobile.js +7 -5
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +8 -3
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.d.ts +2 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.js +1 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/lib/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/lib/components/TariffsTable/TariffsTableCell.js +4 -4
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +2 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +2 -2
- package/lib/ui-kit/Img/Img.js +3 -1
- package/lib/ui-kit/Img/Img.js.map +1 -1
- package/lib/ui-kit/List/List.d.ts +1 -1
- package/lib/ui-kit/List/List.fixture.d.ts +10 -0
- package/lib/ui-kit/List/List.js +7 -2
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListItem.d.ts +1 -1
- package/lib/ui-kit/List/ListItem.js +4 -9
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/List/ListProps.d.ts +2 -0
- package/mobile/bundle/bundle.umd.js +74 -75
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Blocks.d.ts +1 -0
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +18 -6
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +4 -4
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +4 -9
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +3 -2
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/mobile/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +7 -5
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +8 -3
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.d.ts +2 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js +4 -4
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +2 -1
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/IconProps.d.ts +2 -2
- package/mobile/dist/ui-kit/List/List.d.ts +1 -1
- package/mobile/dist/ui-kit/List/List.js +7 -2
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js +4 -9
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListProps.d.ts +2 -0
- package/mobile/lib/components/Blocks.d.ts +1 -0
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +18 -6
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +4 -4
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +4 -9
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +3 -2
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/mobile/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +7 -5
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +8 -3
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.d.ts +2 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js +4 -4
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +2 -1
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/IconProps.d.ts +2 -2
- package/mobile/lib/ui-kit/List/List.d.ts +1 -1
- package/mobile/lib/ui-kit/List/List.js +7 -2
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js +4 -9
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListProps.d.ts +2 -0
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/ComparisonTable/ComparisonTable.example.json +1 -0
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +52 -31
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +3 -2
- package/mobile/src/components/ContentPage/ContentPage.tsx +0 -1
- package/mobile/src/components/CreditCalculator/CreditCalculator.example.json +19 -0
- package/mobile/src/components/Gallery/Gallery.example.json +1 -0
- package/mobile/src/components/Gallery/Gallery.tsx +5 -4
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +13 -18
- package/mobile/src/components/Gallery/GalleryContent.ts +3 -2
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +3 -10
- package/mobile/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +1 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -0
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +17 -12
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +4 -0
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +25 -5
- package/mobile/src/components/ProductBlock/renderBenefit.tsx +2 -1
- package/mobile/src/components/ProductGallery/ProductGalleryContent.ts +4 -1
- package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +28 -27
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +1 -1
- package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +33 -31
- package/mobile/src/components/TextBlock/TextBlock.example.json +2 -1
- package/mobile/src/components/TextBlock/TextBlock.tsx +2 -2
- package/mobile/src/components/Tile/Tile.tsx +3 -1
- package/mobile/src/ui-kit/Icon/Icon.tsx +7 -1
- package/mobile/src/ui-kit/Icon/IconProps.ts +2 -2
- package/mobile/src/ui-kit/List/List.tsx +9 -3
- package/mobile/src/ui-kit/List/ListItem.tsx +5 -12
- package/mobile/src/ui-kit/List/ListProps.ts +2 -0
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/ComparisonTable/ComparisonTable.example.json +1 -0
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +1 -1
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +52 -31
- package/src/components/ComparisonTable/ComparisonTableContent.ts +3 -2
- package/src/components/ContentPage/ContentPage.tsx +0 -1
- package/src/components/CreditCalculator/CreditCalculator.example.json +19 -0
- package/src/components/Gallery/Gallery.example.json +1 -0
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +3 -2
- package/src/components/Gallery/Gallery.mobile.tsx +5 -4
- package/src/components/Gallery/GalleryCardInner.tsx +13 -18
- package/src/components/Gallery/GalleryContent.ts +3 -2
- package/src/components/LinkDocs/LinkDocsContent.ts +3 -10
- package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/src/components/OtherProducts/OtherProductsItem.tsx +1 -1
- package/src/components/ProductBlock/ProductBlock.example.json +1 -0
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +49 -13
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +17 -12
- package/src/components/ProductBlock/ProductBlockContent.ts +4 -0
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +25 -5
- package/src/components/ProductBlock/ProductBlockInner.tsx +8 -1
- package/src/components/ProductBlock/renderBenefit.mobile.tsx +2 -1
- package/src/components/ProductGallery/ProductGalleryContent.ts +4 -1
- package/src/components/TariffsTable/TariffsTableCell.tsx +28 -27
- package/src/components/TariffsTable/TariffsTableContent.ts +1 -1
- package/src/components/TariffsTable/TariffsTableTileCell.tsx +33 -31
- package/src/components/TextBlock/TextBlock.example.json +2 -1
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +8 -0
- package/src/components/TextBlock/TextBlock.mobile.tsx +2 -2
- package/src/components/Tile/Tile.tsx +3 -1
- package/src/icons/IconName.ts +152 -3
- package/src/ui-kit/Icon/Icon.tsx +7 -1
- package/src/ui-kit/Icon/IconProps.ts +2 -2
- package/src/ui-kit/Img/Img.tsx +5 -2
- package/src/ui-kit/List/List.fixture.tsx +37 -0
- package/src/ui-kit/List/List.tsx +9 -3
- package/src/ui-kit/List/ListItem.tsx +5 -12
- package/src/ui-kit/List/ListProps.ts +2 -0
- package/dist/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/dist/ui-kit/BlockItem/BlockItem.js +0 -23
- package/dist/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/dist/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/dist/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/lib/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/lib/ui-kit/BlockItem/BlockItem.fixture.d.ts +0 -8
- package/lib/ui-kit/BlockItem/BlockItem.js +0 -21
- package/lib/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/lib/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/lib/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/dist/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/mobile/dist/ui-kit/BlockItem/BlockItem.js +0 -23
- package/mobile/dist/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/lib/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/mobile/lib/ui-kit/BlockItem/BlockItem.js +0 -21
- package/mobile/lib/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/src/ui-kit/BlockItem/BlockItem.tsx +0 -33
- package/mobile/src/ui-kit/BlockItem/BlockItemProps.ts +0 -23
- package/src/ui-kit/BlockItem/BlockItem.fixture.tsx +0 -12
- package/src/ui-kit/BlockItem/BlockItem.tsx +0 -33
- package/src/ui-kit/BlockItem/BlockItemProps.ts +0 -23
package/src/ui-kit/List/List.tsx
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { ListItem } from './ListItem';
|
|
3
|
-
import { ListProps } from './ListProps';
|
|
3
|
+
import type { ListProps, ListItemVersion } from './ListProps';
|
|
4
|
+
|
|
5
|
+
const TEXT_STYLE_MAP: Record<ListItemVersion, string> = {
|
|
6
|
+
primary: 'text-primary-text',
|
|
7
|
+
secondary: 'text-white',
|
|
8
|
+
gray: 'text-secondary-text',
|
|
9
|
+
};
|
|
4
10
|
|
|
5
11
|
export const List = JSX<ListProps>((props) => {
|
|
6
|
-
const { className = '', itemClassName, isDotted, items, version } = props;
|
|
12
|
+
const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
|
|
7
13
|
|
|
8
14
|
return (
|
|
9
|
-
<section className={`${className}`} role="list">
|
|
15
|
+
<section className={`${TEXT_STYLE_MAP[version]} ${className}`} role="list">
|
|
10
16
|
{items?.length
|
|
11
17
|
? items.map((_, i) => (
|
|
12
18
|
<ListItem
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { ListItemVersion } from './ListProps';
|
|
2
|
+
import type { ListItemVersion } from './ListProps';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @title Параметры элемента списка
|
|
@@ -13,13 +13,7 @@ export interface ListItemProps {
|
|
|
13
13
|
|
|
14
14
|
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
primary: 'text-primary-text',
|
|
18
|
-
secondary: 'text-white',
|
|
19
|
-
gray: 'text-secondary-text',
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const LIST_STYLE_MAP: Record<ListItemVersion, string> = {
|
|
16
|
+
const LIST_DOT_STYLE_MAP: Record<ListItemVersion, string> = {
|
|
23
17
|
primary: 'bg-primary-main',
|
|
24
18
|
secondary: 'bg-white',
|
|
25
19
|
gray: 'bg-secondary-text',
|
|
@@ -30,14 +24,13 @@ export const ListItem = JSX<ListItemProps>(
|
|
|
30
24
|
return (
|
|
31
25
|
<div className={`font-sans flex items-start ${className}`} role="listitem">
|
|
32
26
|
{isDotted && <div className={getListStyle(version)} />}
|
|
33
|
-
<span
|
|
27
|
+
<span>{children}</span>
|
|
34
28
|
</div>
|
|
35
29
|
);
|
|
36
30
|
},
|
|
37
31
|
);
|
|
38
32
|
|
|
39
33
|
const getListStyle = (version: ListItemVersion) => {
|
|
40
|
-
const size =
|
|
41
|
-
|
|
42
|
-
return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
|
|
34
|
+
const size = version === 'gray' ? 'w-1.5 h-1.5 min-w-1.5 min-h-1.5' : 'w-2 h-2 min-w-2 min-h-2';
|
|
35
|
+
return `${LIST_STYLE_CLASSES} ${LIST_DOT_STYLE_MAP[version]} ${size}`;
|
|
43
36
|
};
|
|
@@ -2,6 +2,7 @@ import type { ListContent } from './ListContent';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @title Версия списка
|
|
5
|
+
* @enumNames ["Основной", "Второстепенный", "Серый"]
|
|
5
6
|
*/
|
|
6
7
|
export type ListItemVersion = 'primary' | 'secondary' | 'gray';
|
|
7
8
|
|
|
@@ -10,6 +11,7 @@ export type ListItemVersion = 'primary' | 'secondary' | 'gray';
|
|
|
10
11
|
*/
|
|
11
12
|
export interface ListProps extends ListContent {
|
|
12
13
|
className?: string;
|
|
14
|
+
/** @title Буллиты */
|
|
13
15
|
isDotted?: boolean;
|
|
14
16
|
version?: ListItemVersion;
|
|
15
17
|
itemClassName?: string;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.BlockItem = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
6
|
-
const TEXT_STYLE_MAP = {
|
|
7
|
-
primary: 'text-secondary-text',
|
|
8
|
-
secondary: 'text-white',
|
|
9
|
-
gray: 'text-secondary-text',
|
|
10
|
-
};
|
|
11
|
-
const LIST_STYLE_MAP = {
|
|
12
|
-
primary: 'bg-primary-main',
|
|
13
|
-
secondary: 'bg-white',
|
|
14
|
-
gray: 'bg-secondary-text',
|
|
15
|
-
};
|
|
16
|
-
exports.BlockItem = (0, uni_jsx_1.JSX)(({ className = '', isDotted = true, text, children, version = 'primary' }) => {
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && (0, jsx_runtime_1.jsx)("div", { className: getListStyle(version) }), (0, jsx_runtime_1.jsx)("span", { className: TEXT_STYLE_MAP[version], children: text || children })] }));
|
|
18
|
-
});
|
|
19
|
-
const getListStyle = (version) => {
|
|
20
|
-
const size = version === 'gray' ? 'w-[6px] h-[6px] min-w-[6px] min-h-[6px]' : 'w-2 h-2 min-w-2 min-h-2';
|
|
21
|
-
return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=BlockItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItem.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,MAAM,kBAAkB,GAAG,qCAAqC,CAAC;AAEjE,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,qBAAqB;CAC5B,CAAC;AAEF,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEW,QAAA,SAAS,GAAG,IAAA,aAAG,EAC1B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,EAAE,EAAE;IAC3E,OAAO,CACL,iCAAK,SAAS,EAAE,8BAA8B,SAAS,EAAE,EAAE,IAAI,EAAC,UAAU,aACvE,QAAQ,IAAI,gCAAK,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,GAAI,EACtD,iCAAM,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,YAAG,IAAI,IAAI,QAAQ,GAAQ,IAC/D,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAAyB,EAAE,EAAE;IACjD,MAAM,IAAI,GACR,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,yBAAyB,CAAC;IAC7F,OAAO,GAAG,kBAAkB,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;AACpE,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title Версия списка
|
|
3
|
-
* @enumNames ["Основной", "Второстепенный", "Белый"]
|
|
4
|
-
*/
|
|
5
|
-
export declare type BlockItemVersion = 'primary' | 'secondary' | 'gray';
|
|
6
|
-
/**
|
|
7
|
-
* @title Содержимое элемента блока
|
|
8
|
-
*/
|
|
9
|
-
export interface BlockItemContent {
|
|
10
|
-
/** @title Текст */
|
|
11
|
-
text?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @title Параметры элемента блока
|
|
15
|
-
*/
|
|
16
|
-
export interface BlockItemProps extends BlockItemContent {
|
|
17
|
-
className?: string;
|
|
18
|
-
version?: BlockItemVersion;
|
|
19
|
-
/** @title Маркер */
|
|
20
|
-
isDotted?: boolean;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItemProps.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItemProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
4
|
-
const TEXT_STYLE_MAP = {
|
|
5
|
-
primary: 'text-secondary-text',
|
|
6
|
-
secondary: 'text-white',
|
|
7
|
-
gray: 'text-secondary-text',
|
|
8
|
-
};
|
|
9
|
-
const LIST_STYLE_MAP = {
|
|
10
|
-
primary: 'bg-primary-main',
|
|
11
|
-
secondary: 'bg-white',
|
|
12
|
-
gray: 'bg-secondary-text',
|
|
13
|
-
};
|
|
14
|
-
export const BlockItem = JSX(({ className = '', isDotted = true, text, children, version = 'primary' }) => {
|
|
15
|
-
return (_jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && _jsx("div", { className: getListStyle(version) }), _jsx("span", { className: TEXT_STYLE_MAP[version], children: text || children })] }));
|
|
16
|
-
});
|
|
17
|
-
const getListStyle = (version) => {
|
|
18
|
-
const size = version === 'gray' ? 'w-[6px] h-[6px] min-w-[6px] min-h-[6px]' : 'w-2 h-2 min-w-2 min-h-2';
|
|
19
|
-
return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=BlockItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItem.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,kBAAkB,GAAG,qCAAqC,CAAC;AAEjE,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,qBAAqB;CAC5B,CAAC;AAEF,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,EAAE,EAAE;IAC3E,OAAO,CACL,eAAK,SAAS,EAAE,8BAA8B,SAAS,EAAE,EAAE,IAAI,EAAC,UAAU,aACvE,QAAQ,IAAI,cAAK,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,GAAI,EACtD,eAAM,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,YAAG,IAAI,IAAI,QAAQ,GAAQ,IAC/D,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAAyB,EAAE,EAAE;IACjD,MAAM,IAAI,GACR,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,yBAAyB,CAAC;IAC7F,OAAO,GAAG,kBAAkB,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;AACpE,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title Версия списка
|
|
3
|
-
* @enumNames ["Основной", "Второстепенный", "Белый"]
|
|
4
|
-
*/
|
|
5
|
-
export declare type BlockItemVersion = 'primary' | 'secondary' | 'gray';
|
|
6
|
-
/**
|
|
7
|
-
* @title Содержимое элемента блока
|
|
8
|
-
*/
|
|
9
|
-
export interface BlockItemContent {
|
|
10
|
-
/** @title Текст */
|
|
11
|
-
text?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @title Параметры элемента блока
|
|
15
|
-
*/
|
|
16
|
-
export interface BlockItemProps extends BlockItemContent {
|
|
17
|
-
className?: string;
|
|
18
|
-
version?: BlockItemVersion;
|
|
19
|
-
/** @title Маркер */
|
|
20
|
-
isDotted?: boolean;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItemProps.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItemProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.BlockItem = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
6
|
-
const TEXT_STYLE_MAP = {
|
|
7
|
-
primary: 'text-secondary-text',
|
|
8
|
-
secondary: 'text-white',
|
|
9
|
-
gray: 'text-secondary-text',
|
|
10
|
-
};
|
|
11
|
-
const LIST_STYLE_MAP = {
|
|
12
|
-
primary: 'bg-primary-main',
|
|
13
|
-
secondary: 'bg-white',
|
|
14
|
-
gray: 'bg-secondary-text',
|
|
15
|
-
};
|
|
16
|
-
exports.BlockItem = (0, uni_jsx_1.JSX)(({ className = '', isDotted = true, text, children, version = 'primary' }) => {
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && (0, jsx_runtime_1.jsx)("div", { className: getListStyle(version) }), (0, jsx_runtime_1.jsx)("span", { className: TEXT_STYLE_MAP[version], children: text || children })] }));
|
|
18
|
-
});
|
|
19
|
-
const getListStyle = (version) => {
|
|
20
|
-
const size = version === 'gray' ? 'w-[6px] h-[6px] min-w-[6px] min-h-[6px]' : 'w-2 h-2 min-w-2 min-h-2';
|
|
21
|
-
return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=BlockItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItem.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,MAAM,kBAAkB,GAAG,qCAAqC,CAAC;AAEjE,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,qBAAqB;CAC5B,CAAC;AAEF,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEW,QAAA,SAAS,GAAG,IAAA,aAAG,EAC1B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,EAAE,EAAE;IAC3E,OAAO,CACL,iCAAK,SAAS,EAAE,8BAA8B,SAAS,EAAE,EAAE,IAAI,EAAC,UAAU,aACvE,QAAQ,IAAI,gCAAK,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,GAAI,EACtD,iCAAM,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,YAAG,IAAI,IAAI,QAAQ,GAAQ,IAC/D,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAAyB,EAAE,EAAE;IACjD,MAAM,IAAI,GACR,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,yBAAyB,CAAC;IAC7F,OAAO,GAAG,kBAAkB,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;AACpE,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title Версия списка
|
|
3
|
-
* @enumNames ["Основной", "Второстепенный", "Белый"]
|
|
4
|
-
*/
|
|
5
|
-
export declare type BlockItemVersion = 'primary' | 'secondary' | 'gray';
|
|
6
|
-
/**
|
|
7
|
-
* @title Содержимое элемента блока
|
|
8
|
-
*/
|
|
9
|
-
export interface BlockItemContent {
|
|
10
|
-
/** @title Текст */
|
|
11
|
-
text?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @title Параметры элемента блока
|
|
15
|
-
*/
|
|
16
|
-
export interface BlockItemProps extends BlockItemContent {
|
|
17
|
-
className?: string;
|
|
18
|
-
version?: BlockItemVersion;
|
|
19
|
-
/** @title Маркер */
|
|
20
|
-
isDotted?: boolean;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItemProps.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItemProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
4
|
-
const TEXT_STYLE_MAP = {
|
|
5
|
-
primary: 'text-secondary-text',
|
|
6
|
-
secondary: 'text-white',
|
|
7
|
-
gray: 'text-secondary-text',
|
|
8
|
-
};
|
|
9
|
-
const LIST_STYLE_MAP = {
|
|
10
|
-
primary: 'bg-primary-main',
|
|
11
|
-
secondary: 'bg-white',
|
|
12
|
-
gray: 'bg-secondary-text',
|
|
13
|
-
};
|
|
14
|
-
export const BlockItem = JSX(({ className = '', isDotted = true, text, children, version = 'primary' }) => {
|
|
15
|
-
return (_jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && _jsx("div", { className: getListStyle(version) }), _jsx("span", { className: TEXT_STYLE_MAP[version], children: text || children })] }));
|
|
16
|
-
});
|
|
17
|
-
const getListStyle = (version) => {
|
|
18
|
-
const size = version === 'gray' ? 'w-[6px] h-[6px] min-w-[6px] min-h-[6px]' : 'w-2 h-2 min-w-2 min-h-2';
|
|
19
|
-
return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=BlockItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItem.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,kBAAkB,GAAG,qCAAqC,CAAC;AAEjE,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,qBAAqB;CAC5B,CAAC;AAEF,MAAM,cAAc,GAAqC;IACvD,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,EAAE,EAAE;IAC3E,OAAO,CACL,eAAK,SAAS,EAAE,8BAA8B,SAAS,EAAE,EAAE,IAAI,EAAC,UAAU,aACvE,QAAQ,IAAI,cAAK,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,GAAI,EACtD,eAAM,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,YAAG,IAAI,IAAI,QAAQ,GAAQ,IAC/D,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAAyB,EAAE,EAAE;IACjD,MAAM,IAAI,GACR,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,yBAAyB,CAAC;IAC7F,OAAO,GAAG,kBAAkB,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;AACpE,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title Версия списка
|
|
3
|
-
* @enumNames ["Основной", "Второстепенный", "Белый"]
|
|
4
|
-
*/
|
|
5
|
-
export declare type BlockItemVersion = 'primary' | 'secondary' | 'gray';
|
|
6
|
-
/**
|
|
7
|
-
* @title Содержимое элемента блока
|
|
8
|
-
*/
|
|
9
|
-
export interface BlockItemContent {
|
|
10
|
-
/** @title Текст */
|
|
11
|
-
text?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @title Параметры элемента блока
|
|
15
|
-
*/
|
|
16
|
-
export interface BlockItemProps extends BlockItemContent {
|
|
17
|
-
className?: string;
|
|
18
|
-
version?: BlockItemVersion;
|
|
19
|
-
/** @title Маркер */
|
|
20
|
-
isDotted?: boolean;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlockItemProps.js","sourceRoot":"","sources":["../../../src/ui-kit/BlockItem/BlockItemProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { BlockItemProps, BlockItemVersion } from './BlockItemProps';
|
|
3
|
-
|
|
4
|
-
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
5
|
-
|
|
6
|
-
const TEXT_STYLE_MAP: Record<BlockItemVersion, string> = {
|
|
7
|
-
primary: 'text-secondary-text',
|
|
8
|
-
secondary: 'text-white',
|
|
9
|
-
gray: 'text-secondary-text',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const LIST_STYLE_MAP: Record<BlockItemVersion, string> = {
|
|
13
|
-
primary: 'bg-primary-main',
|
|
14
|
-
secondary: 'bg-white',
|
|
15
|
-
gray: 'bg-secondary-text',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const BlockItem = JSX<BlockItemProps>(
|
|
19
|
-
({ className = '', isDotted = true, text, children, version = 'primary' }) => {
|
|
20
|
-
return (
|
|
21
|
-
<div className={`font-sans flex items-start ${className}`} role="listitem">
|
|
22
|
-
{isDotted && <div className={getListStyle(version)} />}
|
|
23
|
-
<span className={TEXT_STYLE_MAP[version]}>{text || children}</span>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
},
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const getListStyle = (version: BlockItemVersion) => {
|
|
30
|
-
const size =
|
|
31
|
-
version === 'gray' ? 'w-[6px] h-[6px] min-w-[6px] min-h-[6px]' : 'w-2 h-2 min-w-2 min-h-2';
|
|
32
|
-
return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
|
|
33
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title Версия списка
|
|
3
|
-
* @enumNames ["Основной", "Второстепенный", "Белый"]
|
|
4
|
-
*/
|
|
5
|
-
export type BlockItemVersion = 'primary' | 'secondary' | 'gray';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @title Содержимое элемента блока
|
|
9
|
-
*/
|
|
10
|
-
export interface BlockItemContent {
|
|
11
|
-
/** @title Текст */
|
|
12
|
-
text?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @title Параметры элемента блока
|
|
17
|
-
*/
|
|
18
|
-
export interface BlockItemProps extends BlockItemContent {
|
|
19
|
-
className?: string;
|
|
20
|
-
version?: BlockItemVersion;
|
|
21
|
-
/** @title Маркер */
|
|
22
|
-
isDotted?: boolean;
|
|
23
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import '../../setup-fixture';
|
|
2
|
-
|
|
3
|
-
import { BlockItem } from './BlockItem';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
primary: <BlockItem text="Совершайте любые личные покупки" />,
|
|
7
|
-
'primary without dot': <BlockItem text="Совершайте любые личные покупки" isDotted={false} />,
|
|
8
|
-
secondary: <BlockItem text="Совершайте любые личные покупки" version="secondary" />,
|
|
9
|
-
'secondary without dot': (
|
|
10
|
-
<BlockItem text="Совершайте любые личные покупки" isDotted={false} version="secondary" />
|
|
11
|
-
),
|
|
12
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { BlockItemProps, BlockItemVersion } from './BlockItemProps';
|
|
3
|
-
|
|
4
|
-
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
5
|
-
|
|
6
|
-
const TEXT_STYLE_MAP: Record<BlockItemVersion, string> = {
|
|
7
|
-
primary: 'text-secondary-text',
|
|
8
|
-
secondary: 'text-white',
|
|
9
|
-
gray: 'text-secondary-text',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const LIST_STYLE_MAP: Record<BlockItemVersion, string> = {
|
|
13
|
-
primary: 'bg-primary-main',
|
|
14
|
-
secondary: 'bg-white',
|
|
15
|
-
gray: 'bg-secondary-text',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const BlockItem = JSX<BlockItemProps>(
|
|
19
|
-
({ className = '', isDotted = true, text, children, version = 'primary' }) => {
|
|
20
|
-
return (
|
|
21
|
-
<div className={`font-sans flex items-start ${className}`} role="listitem">
|
|
22
|
-
{isDotted && <div className={getListStyle(version)} />}
|
|
23
|
-
<span className={TEXT_STYLE_MAP[version]}>{text || children}</span>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
},
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const getListStyle = (version: BlockItemVersion) => {
|
|
30
|
-
const size =
|
|
31
|
-
version === 'gray' ? 'w-[6px] h-[6px] min-w-[6px] min-h-[6px]' : 'w-2 h-2 min-w-2 min-h-2';
|
|
32
|
-
return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
|
|
33
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title Версия списка
|
|
3
|
-
* @enumNames ["Основной", "Второстепенный", "Белый"]
|
|
4
|
-
*/
|
|
5
|
-
export type BlockItemVersion = 'primary' | 'secondary' | 'gray';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @title Содержимое элемента блока
|
|
9
|
-
*/
|
|
10
|
-
export interface BlockItemContent {
|
|
11
|
-
/** @title Текст */
|
|
12
|
-
text?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @title Параметры элемента блока
|
|
17
|
-
*/
|
|
18
|
-
export interface BlockItemProps extends BlockItemContent {
|
|
19
|
-
className?: string;
|
|
20
|
-
version?: BlockItemVersion;
|
|
21
|
-
/** @title Маркер */
|
|
22
|
-
isDotted?: boolean;
|
|
23
|
-
}
|