@redneckz/wildless-cms-uni-blocks 0.2.93 → 0.2.97
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 +134 -78
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/AccordionBlocks.d.ts +1 -2
- package/dist/components/Accordion/AccordionBlocks.js +2 -2
- package/dist/components/Accordion/AccordionBlocks.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.js +3 -6
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +9 -4
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +2 -3
- package/dist/components/ContentPage/ContentPage.d.ts +9 -1
- package/dist/components/ContentPage/ContentPage.js +20 -17
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/toMobilePage.js +13 -2
- package/dist/components/ContentPage/toMobilePage.js.map +1 -1
- package/dist/components/CreditCalculator/CreditCalculator.js +3 -3
- package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Sitemap.js +1 -1
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +1 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.d.ts +2 -0
- package/dist/components/Gallery/GalleryCardInner.js +19 -0
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -0
- package/dist/components/Gallery/GalleryContainer.d.ts +13 -0
- package/dist/components/Gallery/GalleryContainer.js +16 -0
- package/dist/components/Gallery/GalleryContainer.js.map +1 -0
- package/dist/components/Gallery/GalleryContent.d.ts +8 -2
- package/dist/components/Gallery/GalleryInner.d.ts +1 -1
- package/dist/components/Gallery/GalleryInner.js +8 -36
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Gallery/constants.d.ts +6 -0
- package/dist/components/Gallery/constants.js +19 -0
- package/dist/components/Gallery/constants.js.map +1 -0
- package/dist/components/Header/Header.js +3 -3
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +3 -3
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -3
- package/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +12 -4
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +13 -2
- package/dist/components/ProductBlock/ProductBlockInner.js +16 -4
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +2 -2
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +5 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -0
- package/dist/components/Tile/TileContent.d.ts +1 -1
- package/dist/model/ButtonVersion.d.ts +1 -0
- package/dist/model/LinkProps.d.ts +2 -1
- package/dist/types.d.ts +8 -0
- package/dist/ui-kit/BlockItem/BlockItem.js +4 -4
- package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/dist/ui-kit/Button/ButtonProps.d.ts +6 -1
- package/dist/ui-kit/Checkbox/Checkbox.js +2 -2
- package/dist/ui-kit/Checkbox/Checkbox.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/Icon/IconProps.d.ts +49 -41
- package/dist/ui-kit/Icon/IconProps.js +45 -41
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/dist/ui-kit/Img.js +9 -3
- package/dist/ui-kit/Img.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRange.js +2 -1
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/SearchBar.js +1 -1
- package/dist/ui-kit/SearchBar.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/AccordionBlocks.d.ts +1 -2
- package/lib/components/Accordion/AccordionBlocks.js +1 -2
- package/lib/components/Accordion/AccordionBlocks.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.js +1 -1
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +9 -4
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +2 -3
- package/lib/components/ContentPage/ContentPage.d.ts +9 -1
- package/lib/components/ContentPage/ContentPage.js +20 -17
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/toMobilePage.js +13 -2
- package/lib/components/ContentPage/toMobilePage.js.map +1 -1
- package/lib/components/CreditCalculator/CreditCalculator.js +3 -3
- package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/lib/components/Footer/Footer.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Sitemap.js +1 -1
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +1 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.d.ts +2 -0
- package/lib/components/Gallery/GalleryCardInner.js +17 -0
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -0
- package/lib/components/Gallery/GalleryContainer.d.ts +13 -0
- package/lib/components/Gallery/GalleryContainer.js +14 -0
- package/lib/components/Gallery/GalleryContainer.js.map +1 -0
- package/lib/components/Gallery/GalleryContent.d.ts +8 -2
- package/lib/components/Gallery/GalleryInner.d.ts +1 -1
- package/lib/components/Gallery/GalleryInner.js +6 -34
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Gallery/constants.d.ts +6 -0
- package/lib/components/Gallery/constants.js +17 -0
- package/lib/components/Gallery/constants.js.map +1 -0
- package/lib/components/Header/Header.js +3 -3
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +3 -3
- package/lib/components/LinkDocs/LinkDocs.js +3 -3
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -3
- package/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.js +12 -4
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +13 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +16 -4
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +2 -2
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +5 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -0
- package/lib/components/Tile/TileContent.d.ts +1 -1
- package/lib/model/ButtonVersion.d.ts +1 -0
- package/lib/model/LinkProps.d.ts +2 -1
- package/lib/types.d.ts +8 -0
- package/lib/ui-kit/BlockItem/BlockItem.js +4 -4
- package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
- package/lib/ui-kit/Button/ButtonProps.d.ts +6 -1
- package/lib/ui-kit/Checkbox/Checkbox.js +2 -2
- package/lib/ui-kit/Checkbox/Checkbox.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/Icon/IconProps.d.ts +49 -41
- package/lib/ui-kit/Icon/IconProps.js +45 -41
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/ui-kit/Img.js +9 -3
- package/lib/ui-kit/Img.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRange.js +2 -1
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/SearchBar.js +1 -1
- package/lib/ui-kit/SearchBar.js.map +1 -1
- package/package.json +6 -4
- package/src/components/Accordion/Accordion.example.json +4 -4
- package/src/components/Accordion/Accordion.fixture.tsx +5 -1
- package/src/components/Accordion/AccordionBlocks.tsx +1 -3
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/BaseTile/BaseTile.tsx +14 -5
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +31 -28
- package/src/components/ComparisonTable/ComparisonTable.example.json +1 -1
- package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +43 -53
- package/src/components/ComparisonTable/ComparisonTableContent.ts +2 -3
- package/src/components/ContentPage/ContentPage.page.json +31 -49
- package/src/components/ContentPage/ContentPage.tsx +71 -36
- package/src/components/ContentPage/toMobilePage.ts +19 -2
- package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +9 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +11 -8
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/Footer/Footer.fixture.tsx +265 -258
- package/src/components/Footer/Footer.tsx +3 -3
- package/src/components/Footer/Sitemap.tsx +1 -1
- package/src/components/Gallery/Gallery.fixture.tsx +52 -48
- package/src/components/Gallery/Gallery.mobile.tsx +1 -3
- package/src/components/Gallery/GalleryCardInner.tsx +53 -0
- package/src/components/Gallery/GalleryContainer.tsx +58 -0
- package/src/components/Gallery/GalleryContent.ts +8 -2
- package/src/components/Gallery/GalleryInner.tsx +15 -94
- package/src/components/Gallery/constants.ts +22 -0
- package/src/components/Header/Header.tsx +14 -12
- package/src/components/Headline/Headline.fixture.tsx +25 -3
- package/src/components/LikeControl/LikeControl.fixture.tsx +5 -1
- package/src/components/LinkDocs/LinkDocs.example.json +26 -0
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +23 -6
- package/src/components/LinkDocs/LinkDocs.tsx +3 -3
- package/src/components/LinkDocs/LinkDocsContent.ts +3 -3
- package/src/components/MiniGallery/MiniGallery.fixture.tsx +12 -22
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +3 -1
- package/src/components/PictureText/PictureText.example.json +1 -1
- package/src/components/PictureText/PictureText.fixture.tsx +5 -1
- package/src/components/Placeholder/Placeholder.fixture.tsx +5 -1
- package/src/components/ProductBlock/ProductBlock.example.json +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +141 -77
- package/src/components/ProductBlock/ProductBlock.tsx +20 -7
- package/src/components/ProductBlock/ProductBlockContent.ts +14 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +39 -7
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +96 -93
- package/src/components/ProductTile/ProductTile.example.json +1 -1
- package/src/components/ProductTile/ProductTile.fixture.tsx +4 -4
- package/src/components/ProductTile/ProductTileContent.ts +2 -2
- package/src/components/PromoTile/PromoTile.fixture.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +21 -18
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +5 -16
- package/src/components/TariffsTable/TariffsTableContent.ts +5 -1
- package/src/components/TextBlock/TextBlock.fixture.tsx +62 -45
- package/src/components/TextBlock/TextBlockContent.ts +1 -0
- package/src/components/Tile/Tile.example.json +1 -1
- package/src/components/Tile/Tile.fixture.tsx +11 -8
- package/src/components/Tile/TileContent.ts +1 -1
- package/src/icons/AppleIcon.svg +1 -1
- package/src/icons/CalendarWhiteIcon.svg +17 -0
- package/src/icons/EmptyWalletWhiteIcon.svg +16 -0
- package/src/icons/GridIcon.svg +2 -2
- package/src/icons/PercentageSquareWhiteIcon.svg +16 -0
- package/src/icons/PlayMarketIcon.svg +1 -1
- package/src/model/ButtonVersion.ts +1 -0
- package/src/model/LinkProps.ts +2 -1
- package/src/setup-fixture.ts +1 -2
- package/src/types.ts +11 -1
- package/src/ui-kit/BlockItem/BlockItem.tsx +4 -4
- package/src/ui-kit/Button/ButtonProps.ts +6 -1
- package/src/ui-kit/Checkbox/Checkbox.tsx +7 -3
- package/src/ui-kit/Icon/Icon.tsx +1 -1
- package/src/ui-kit/Icon/IconProps.ts +8 -0
- package/src/ui-kit/Img.tsx +23 -10
- package/src/ui-kit/InputRange/InputRange.tsx +7 -6
- package/src/ui-kit/SearchBar.tsx +3 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
stroke="#fff"
|
|
4
|
+
stroke-width="2"
|
|
5
|
+
stroke-linecap="round"
|
|
6
|
+
stroke-linejoin="round"
|
|
7
|
+
d="M2 13.05V15c0 5 2 7 7 7h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9M8.32 15.27l6.54-6.54"
|
|
8
|
+
/>
|
|
9
|
+
<path
|
|
10
|
+
stroke="#fff"
|
|
11
|
+
stroke-width="2"
|
|
12
|
+
stroke-linecap="round"
|
|
13
|
+
stroke-linejoin="round"
|
|
14
|
+
d="M8.73 10.37a1.23 1.23 0 1 0 0-2.46 1.23 1.23 0 0 0 0 2.46ZM15.27 16.09a1.23 1.23 0 1 0 0-2.46 1.23 1.23 0 0 0 0 2.46Z"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg id="icon" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23"><path d="M0 21.427V1.576C0 .883.447.284 1.094 0L13.85 11.498 1.089 23a1.89 1.89 0 0 1-.795-.646A1.625 1.625 0 0 1 0 21.427Zm17.899-6.282-13.95 7.259 11.002-9.915 2.948 2.656Zm4.335-5.035c.237.162.428.37.561.61.133.239.203.502.205.77.002.267-.064.53-.193.771s-.317.452-.551.617l-2.964 1.542-3.241-2.922 3.24-2.92 2.944 1.532ZM3.959.598l13.938 7.253-2.945 2.654L3.958.598Z" fill="
|
|
1
|
+
<svg id="icon" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 23 23"><path d="M0 21.427V1.576C0 .883.447.284 1.094 0L13.85 11.498 1.089 23a1.89 1.89 0 0 1-.795-.646A1.625 1.625 0 0 1 0 21.427Zm17.899-6.282-13.95 7.259 11.002-9.915 2.948 2.656Zm4.335-5.035c.237.162.428.37.561.61.133.239.203.502.205.77.002.267-.064.53-.193.771s-.317.452-.551.617l-2.964 1.542-3.241-2.922 3.24-2.92 2.944 1.532ZM3.959.598l13.938 7.253-2.945 2.654L3.958.598Z" fill="currentColor"/></svg>
|
package/src/model/LinkProps.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @title Таргет (target)
|
|
3
3
|
* @enumNames [
|
|
4
|
+
* "",
|
|
4
5
|
* "self (текущее окно или фрейм)",
|
|
5
6
|
* "blank (новое окно)",
|
|
6
7
|
* "parent (фрейм-родитель)",
|
|
7
8
|
* "top (текущее окно)"
|
|
8
9
|
* ]
|
|
9
10
|
*/
|
|
10
|
-
export type Target = '
|
|
11
|
+
export type Target = '' | '_self' | '_blank' | '_parent' | '_top';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* @title Ссылка
|
package/src/setup-fixture.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { setup } from '@redneckz/uni-jsx';
|
|
2
2
|
|
|
3
|
-
import runtime from 'react/jsx-runtime';
|
|
4
3
|
import { useEffect, useState } from 'react';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
import { DaDataAPI } from './api/DaDataAPI';
|
|
6
6
|
import type { ContentPageContext } from './components/ContentPage/ContentPageContext';
|
|
7
7
|
|
|
8
|
-
const { jsx, jsxs } = runtime as any;
|
|
9
8
|
setup(jsx, jsxs);
|
|
10
9
|
|
|
11
10
|
const TEST_ORIGIN = 'http://localhost:5001';
|
package/src/types.ts
CHANGED
|
@@ -15,6 +15,15 @@ export interface BlockDef {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
export interface Slot {
|
|
19
|
+
style?: string[];
|
|
20
|
+
blocks?: BlockDef[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SlotsMap {
|
|
24
|
+
header?: Slot;
|
|
25
|
+
}
|
|
26
|
+
|
|
18
27
|
export interface ContentPageMeta {
|
|
19
28
|
title: string;
|
|
20
29
|
slug: string;
|
|
@@ -26,7 +35,8 @@ export interface ContentPageMeta {
|
|
|
26
35
|
|
|
27
36
|
export interface ContentPageDef extends ContentPageMeta {
|
|
28
37
|
style?: string[];
|
|
29
|
-
blocks?: BlockDef[];
|
|
38
|
+
blocks?: BlockDef[]; //! for compatibility
|
|
39
|
+
slots?: SlotsMap;
|
|
30
40
|
likeControl?: boolean;
|
|
31
41
|
colorPalette?: ColorPalette;
|
|
32
42
|
}
|
|
@@ -2,13 +2,13 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { BlockItemProps, BlockItemVersion } from './BlockItemProps';
|
|
3
3
|
|
|
4
4
|
const listStyleMap: Record<BlockItemVersion, string> = {
|
|
5
|
-
primary: 'bg-
|
|
6
|
-
secondary: 'bg-
|
|
5
|
+
primary: 'bg-secondary-text w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
|
|
6
|
+
secondary: 'bg-white w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
const textStyleMap: Record<BlockItemVersion, string> = {
|
|
10
|
-
primary: 'text-
|
|
11
|
-
secondary: '
|
|
10
|
+
primary: 'text-secondary-text',
|
|
11
|
+
secondary: '',
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const BlockItem = JSX<BlockItemProps>(
|
|
@@ -13,7 +13,10 @@ export interface ButtonAdditionalProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface ButtonProps extends ButtonAdditionalProps, LinkProps {
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @title Текст
|
|
18
|
+
* @default Кнопка
|
|
19
|
+
*/
|
|
17
20
|
text?: string;
|
|
18
21
|
version?: ButtonVersion;
|
|
19
22
|
}
|
|
@@ -25,4 +28,6 @@ export interface ButtonWithIconProps extends ButtonProps {
|
|
|
25
28
|
appendLeft?: any;
|
|
26
29
|
/** @hidden */
|
|
27
30
|
rounded?: boolean;
|
|
31
|
+
/** @hidden */
|
|
32
|
+
asSVG?: boolean;
|
|
28
33
|
}
|
|
@@ -15,7 +15,9 @@ export const Checkbox = JSX<CheckboxProps>(({ text, checked, onChange, className
|
|
|
15
15
|
<div className={className}>
|
|
16
16
|
<label className="flex items-center cursor-pointer relative">
|
|
17
17
|
<input
|
|
18
|
-
className={`peer appearance-none w-5 h-5 border-solid border
|
|
18
|
+
className={`peer appearance-none w-5 h-5 border-solid border ${
|
|
19
|
+
checked ? 'border-black' : 'border-main-stroke'
|
|
20
|
+
} rounded checked:bg-primary-main checked:border-primary-main m-0`}
|
|
19
21
|
type="checkbox"
|
|
20
22
|
onChange={(e) => {
|
|
21
23
|
onChange(e.target.checked);
|
|
@@ -24,13 +26,15 @@ export const Checkbox = JSX<CheckboxProps>(({ text, checked, onChange, className
|
|
|
24
26
|
/>
|
|
25
27
|
<SVG
|
|
26
28
|
paths={CHECK_PATHS}
|
|
27
|
-
className="hidden absolute left-
|
|
29
|
+
className="hidden absolute left-1 ml-px peer-checked:block"
|
|
28
30
|
width="11"
|
|
29
31
|
height="9"
|
|
30
32
|
fill="white"
|
|
31
33
|
viewBox="0 0 11 9"
|
|
32
34
|
/>
|
|
33
|
-
{text ?
|
|
35
|
+
{text ? (
|
|
36
|
+
<span className="font-sans ml-3 text-sm leading-5 cursor-pointer">{text}</span>
|
|
37
|
+
) : null}
|
|
34
38
|
</label>
|
|
35
39
|
</div>
|
|
36
40
|
));
|
package/src/ui-kit/Icon/Icon.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { projectSettings } from '../../ProjectSettings';
|
|
|
3
3
|
import type { IconProps } from './IconProps';
|
|
4
4
|
|
|
5
5
|
export const Icon = JSX<IconProps>(
|
|
6
|
-
({ className, name, alt = `Icon ${name}`, title = alt, asSVG, ...imgProps }) => {
|
|
6
|
+
({ className = '', name, alt = `Icon ${name}`, title = alt, asSVG, ...imgProps }) => {
|
|
7
7
|
const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
|
|
8
8
|
|
|
9
9
|
if (asSVG) {
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* Icons sorted by name
|
|
3
3
|
*/
|
|
4
4
|
export enum IconMap {
|
|
5
|
+
'',
|
|
5
6
|
'ActualBalanceIcon',
|
|
6
7
|
'AppleIcon',
|
|
7
8
|
'CalendarCircleIcon',
|
|
8
9
|
'CalendarIcon',
|
|
10
|
+
'CalendarWhiteIcon',
|
|
9
11
|
'CardIcon',
|
|
10
12
|
'CardPosIcon',
|
|
11
13
|
'CardTickIcon',
|
|
@@ -17,6 +19,7 @@ export enum IconMap {
|
|
|
17
19
|
'DollarIcon',
|
|
18
20
|
'EmptyWalletChangeIcon',
|
|
19
21
|
'EmptyWalletIcon',
|
|
22
|
+
'EmptyWalletWhiteIcon',
|
|
20
23
|
'EuroIcon',
|
|
21
24
|
'GlassIcon',
|
|
22
25
|
'GridIcon',
|
|
@@ -31,6 +34,7 @@ export enum IconMap {
|
|
|
31
34
|
'OkIcon',
|
|
32
35
|
'PassSendIcon',
|
|
33
36
|
'PercentageSquareIcon',
|
|
37
|
+
'PercentageSquareWhiteIcon',
|
|
34
38
|
'PlayMarketIcon',
|
|
35
39
|
'PlusIcon',
|
|
36
40
|
'Profile2UserIcon',
|
|
@@ -48,10 +52,12 @@ export enum IconMap {
|
|
|
48
52
|
/**
|
|
49
53
|
* @title Иконка
|
|
50
54
|
* @enumNames [
|
|
55
|
+
* "",
|
|
51
56
|
* "Деньги",
|
|
52
57
|
* "Лого «Apple»",
|
|
53
58
|
* "Скруглённый календарь",
|
|
54
59
|
* "Календарь",
|
|
60
|
+
* "Календарь белый",
|
|
55
61
|
* "Кред. карта",
|
|
56
62
|
* "Кред. карта под наклоном",
|
|
57
63
|
* "Кред. карта с галочкой",
|
|
@@ -63,6 +69,7 @@ export enum IconMap {
|
|
|
63
69
|
* "Доллар",
|
|
64
70
|
* "Пустой кошелёк с возвратом",
|
|
65
71
|
* "Пустой кошелёк",
|
|
72
|
+
* "Пустой кошелёк белый",
|
|
66
73
|
* "Евро",
|
|
67
74
|
* "Зеркало",
|
|
68
75
|
* "Сетка",
|
|
@@ -77,6 +84,7 @@ export enum IconMap {
|
|
|
77
84
|
* "Лого «Одноклассники»",
|
|
78
85
|
* "Бизнес",
|
|
79
86
|
* "Проценты",
|
|
87
|
+
* "Проценты белые",
|
|
80
88
|
* "Лого «PlayMarket»",
|
|
81
89
|
* "Плюс",
|
|
82
90
|
* "Профиль, 2 персоны",
|
package/src/ui-kit/Img.tsx
CHANGED
|
@@ -6,16 +6,29 @@ export interface TextWithImageProps {
|
|
|
6
6
|
image: Picture;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export const Img = JSX<TextWithImageProps>(({ className, image }) =>
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
)
|
|
9
|
+
export const Img = JSX<TextWithImageProps>(({ className, image: { size, ...image } }) => {
|
|
10
|
+
const style = {
|
|
11
|
+
width: size?.width ? `${size?.width}px` : '100%',
|
|
12
|
+
height: size?.height ? `${size?.height}px` : '100%',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<picture className={`flex-none ${className || ''}`}>
|
|
17
|
+
{image.sources?.length
|
|
18
|
+
? image.sources.map(({ src, format }, index) => (
|
|
19
|
+
<source key={`${index}_${src}`} srcSet={src} type={formatToMimeType(format)} />
|
|
20
|
+
))
|
|
21
|
+
: null}
|
|
22
|
+
<img
|
|
23
|
+
src={image.src}
|
|
24
|
+
alt={image.alt || image.title}
|
|
25
|
+
title={image.title}
|
|
26
|
+
style={style}
|
|
27
|
+
{...size}
|
|
28
|
+
/>
|
|
29
|
+
</picture>
|
|
30
|
+
);
|
|
31
|
+
});
|
|
19
32
|
|
|
20
33
|
export function formatToMimeType(format: ImgSource['format']): string | undefined {
|
|
21
34
|
return format ? `image/${String(format)}` : undefined;
|
|
@@ -31,14 +31,15 @@ export const InputRange = JSX<InputRangeProps>(
|
|
|
31
31
|
</span>
|
|
32
32
|
) : null}
|
|
33
33
|
<input
|
|
34
|
-
className={`m-0 font-sans text-sm w-full h-12 border
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
className={`m-0 font-sans text-sm w-full h-12 border border-solid border-main-stroke rounded-md
|
|
35
|
+
outline-none p-0 pl-4 m-0 box-border text-primary-text ${
|
|
36
|
+
title ? 'pt-4' : ''
|
|
37
|
+
}`}
|
|
37
38
|
value={addSpacesBetweenNumbers(value)}
|
|
38
39
|
onChange={(e) => handleChange(e.target.value)}
|
|
39
40
|
onBlur={handleBlur}
|
|
40
41
|
/>
|
|
41
|
-
<div className="absolute inset-x-0
|
|
42
|
+
<div className="absolute inset-x-0 top-8 px-4">
|
|
42
43
|
<input
|
|
43
44
|
className="box-border w-full m-0 cursor-pointer slider"
|
|
44
45
|
type="range"
|
|
@@ -51,9 +52,9 @@ export const InputRange = JSX<InputRangeProps>(
|
|
|
51
52
|
/>
|
|
52
53
|
</div>
|
|
53
54
|
</label>
|
|
54
|
-
<div className="flex justify-between
|
|
55
|
+
<div className="flex justify-between my-3">
|
|
55
56
|
{items.map((item, i) => (
|
|
56
|
-
<span key={String(i)} className="text-xs text-secondary-text pl-4">
|
|
57
|
+
<span key={String(i)} className="text-xs leading-[14px] text-secondary-text pl-4">
|
|
57
58
|
{item}
|
|
58
59
|
</span>
|
|
59
60
|
))}
|
package/src/ui-kit/SearchBar.tsx
CHANGED
|
@@ -23,8 +23,8 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
|
23
23
|
<input
|
|
24
24
|
id="search-bar-input"
|
|
25
25
|
className={`${
|
|
26
|
-
inputHasFocus ? 'border-primary-text' : ''
|
|
27
|
-
}
|
|
26
|
+
inputHasFocus ? 'border-primary-text' : 'border-main-divider'
|
|
27
|
+
} h-12 pl-12 w-full font-sans font-normal text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%]`}
|
|
28
28
|
value={term}
|
|
29
29
|
onChange={(e) => setTerm(e.target.value)}
|
|
30
30
|
onFocus={(e) => setInputHasFocus(true)}
|
|
@@ -35,8 +35,7 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
|
|
|
35
35
|
{inputHasFocus && (
|
|
36
36
|
<button
|
|
37
37
|
type="submit"
|
|
38
|
-
|
|
39
|
-
className="absolute font-sans font-normal cursor-pointer text-sm hover:bg-primary-hover active:bg-primary-active border-none px-9 py-[9px] rounded top-1 right-1 outline-none text-secondary-text text-white bg-primary-main"
|
|
38
|
+
className="absolute font-sans font-normal cursor-pointer text-sm bg-primary-main hover:bg-primary-hover active:bg-primary-active border-none px-9 py-[9px] rounded top-1 right-1 outline-none text-secondary-text text-white"
|
|
40
39
|
onClick={(e) => {
|
|
41
40
|
e.preventDefault();
|
|
42
41
|
console.log('click');
|