@redneckz/wildless-cms-uni-blocks 0.3.2 → 0.3.5
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 +9 -9
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/ActualBalanceIcon.svg +1 -0
- package/cosmos-static/icons/AppleIcon.svg +1 -0
- package/cosmos-static/icons/AtmIcon.svg +1 -0
- package/cosmos-static/icons/BankIcon.svg +1 -0
- package/cosmos-static/icons/BurgerIcon.svg +1 -0
- package/cosmos-static/icons/BurgerIconWhite.svg +1 -0
- package/cosmos-static/icons/Calendar2Icon.svg +1 -0
- package/cosmos-static/icons/CalendarCircleIcon.svg +1 -0
- package/cosmos-static/icons/CalendarIcon.svg +1 -0
- package/cosmos-static/icons/CalendarTickIcon.svg +1 -0
- package/cosmos-static/icons/CalendarWhiteIcon.svg +1 -0
- package/cosmos-static/icons/CardIcon.svg +1 -0
- package/cosmos-static/icons/CardPosIcon.svg +1 -0
- package/cosmos-static/icons/CardTickIcon.svg +1 -0
- package/cosmos-static/icons/CardWithGemIcon.svg +1 -0
- package/cosmos-static/icons/ChartSquareIcon.svg +1 -0
- package/cosmos-static/icons/ClockIcon.svg +1 -0
- package/cosmos-static/icons/CloseIcon.svg +1 -0
- package/cosmos-static/icons/ComfortableCompIcon.svg +1 -0
- package/cosmos-static/icons/CreditCardsIcon.svg +1 -0
- package/cosmos-static/icons/DiscountShapeIcon.svg +1 -0
- package/cosmos-static/icons/DocIcon.svg +1 -0
- package/cosmos-static/icons/DocIconMonoColor.svg +1 -0
- package/cosmos-static/icons/DocumentTextIcon.svg +1 -0
- package/cosmos-static/icons/DollarIcon.svg +1 -0
- package/cosmos-static/icons/EarthIcon.svg +1 -0
- package/cosmos-static/icons/EmptyWalletChangeIcon.svg +1 -0
- package/cosmos-static/icons/EmptyWalletIcon.svg +1 -0
- package/cosmos-static/icons/EmptyWalletWhiteIcon.svg +1 -0
- package/cosmos-static/icons/EuroIcon.svg +1 -0
- package/cosmos-static/icons/GeolocationIcon.svg +1 -0
- package/cosmos-static/icons/GlassIcon.svg +1 -0
- package/cosmos-static/icons/GlobalIcon.svg +1 -0
- package/cosmos-static/icons/GridIcon.svg +1 -0
- package/cosmos-static/icons/GridIconWhite.svg +1 -0
- package/cosmos-static/icons/InterestGrowthIcon.svg +1 -0
- package/cosmos-static/icons/InterestIcon.svg +1 -0
- package/cosmos-static/icons/JCBIcon.svg +1 -0
- package/cosmos-static/icons/LoupeIcon.svg +1 -0
- package/cosmos-static/icons/MasterCardIcon.svg +1 -0
- package/cosmos-static/icons/MinusIcon.svg +1 -0
- package/cosmos-static/icons/MirIcon.svg +1 -0
- package/cosmos-static/icons/MoneyIcon.svg +1 -0
- package/cosmos-static/icons/MoneyInsuranceIcon.svg +1 -0
- package/cosmos-static/icons/MonitorMobileIcon.svg +1 -0
- package/cosmos-static/icons/NewDocIcon.svg +1 -0
- package/cosmos-static/icons/OfficeIcon.svg +1 -0
- package/cosmos-static/icons/OkIcon.svg +1 -0
- package/cosmos-static/icons/PassSendIcon.svg +1 -0
- package/cosmos-static/icons/PercentageRoundIcon.svg +1 -0
- package/cosmos-static/icons/PercentageSquareIcon.svg +1 -0
- package/cosmos-static/icons/PercentageSquareWhiteIcon.svg +1 -0
- package/cosmos-static/icons/PersonalCardIcon.svg +1 -0
- package/cosmos-static/icons/PlayMarketIcon.svg +1 -0
- package/cosmos-static/icons/PlusIcon.svg +1 -0
- package/cosmos-static/icons/Profile2UserIcon.svg +1 -0
- package/cosmos-static/icons/ProfileIcon.svg +1 -0
- package/cosmos-static/icons/RoundRubleIcon.svg +1 -0
- package/cosmos-static/icons/SafeIcon.svg +1 -0
- package/cosmos-static/icons/ShieldTickIcon.svg +1 -0
- package/cosmos-static/icons/SignDocsIcon.svg +1 -0
- package/cosmos-static/icons/SmallClockIcon.svg +1 -0
- package/cosmos-static/icons/TelegramIcon.svg +1 -0
- package/cosmos-static/icons/UnionPayIcon.svg +1 -0
- package/cosmos-static/icons/UserTickIcon.svg +1 -0
- package/cosmos-static/icons/VKIcon.svg +1 -0
- package/cosmos-static/icons/VisaIcon.svg +1 -0
- package/cosmos-static/icons/WalletAdd2Icon.svg +1 -0
- package/cosmos-static/icons/WalletAddIcon.svg +1 -0
- package/cosmos-static/icons/WalletIcon.svg +1 -0
- package/cosmos-static/icons/WalletWithMoneyIcon.svg +1 -0
- package/dist/components/Accordion/utils/isActiveHandler.js +1 -1
- package/dist/components/Accordion/utils/isActiveHandler.js.map +1 -1
- package/dist/components/Blocks.mobile.d.ts +3 -1
- package/dist/components/Blocks.mobile.js +5 -1
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +2 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ContentPage/isBlockInRegistry.d.ts +1 -2
- package/dist/components/ContentPage/isBlockInRegistry.js +2 -2
- package/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/dist/components/ContentPage/normalizeBlock.d.ts +1 -1
- package/dist/components/ContentPage/normalizePage.js +1 -1
- package/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.mobile.js +1 -1
- package/dist/components/ContentPage/normalizePage.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +1 -1
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +1 -1
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
- package/dist/components/Placeholder/Placeholder.js +8 -3
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/Placeholder/PlaceholderContent.d.ts +2 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/dist/components/PromoTile/PromoTileContent.d.ts +1 -1
- package/dist/components/Tile/TileContent.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui-kit/Description/Description.d.ts +4 -1
- package/dist/ui-kit/Description/Description.js.map +1 -1
- package/{lib/ui-kit/Description/DescriptionProps.d.ts → dist/ui-kit/Description/DescriptionContent.d.ts} +0 -3
- package/dist/ui-kit/Description/{DescriptionProps.js → DescriptionContent.js} +1 -1
- package/dist/ui-kit/Description/DescriptionContent.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Accordion/utils/isActiveHandler.js +1 -1
- package/lib/components/Accordion/utils/isActiveHandler.js.map +1 -1
- package/lib/components/Blocks.mobile.d.ts +3 -1
- package/lib/components/Blocks.mobile.js +5 -1
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +2 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ContentPage/isBlockInRegistry.d.ts +1 -2
- package/lib/components/ContentPage/isBlockInRegistry.js +2 -2
- package/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/lib/components/ContentPage/normalizeBlock.d.ts +1 -1
- package/lib/components/ContentPage/normalizePage.js +1 -1
- package/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.mobile.js +1 -1
- package/lib/components/ContentPage/normalizePage.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +1 -1
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +1 -1
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
- package/lib/components/Placeholder/Placeholder.fixture.mobile.d.ts +2 -0
- package/lib/components/Placeholder/Placeholder.js +9 -4
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/Placeholder/PlaceholderContent.d.ts +2 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/lib/components/PromoTile/PromoTileContent.d.ts +1 -1
- package/lib/components/Tile/TileContent.d.ts +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/ui-kit/Description/Description.d.ts +4 -1
- package/lib/ui-kit/Description/Description.js.map +1 -1
- package/{mobile/dist/ui-kit/Description/DescriptionProps.d.ts → lib/ui-kit/Description/DescriptionContent.d.ts} +0 -3
- package/lib/ui-kit/Description/DescriptionContent.js +2 -0
- package/lib/ui-kit/Description/DescriptionContent.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +204 -202
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/utils/isActiveHandler.js +1 -1
- package/mobile/dist/components/Accordion/utils/isActiveHandler.js.map +1 -1
- package/mobile/dist/components/Blocks.d.ts +3 -1
- package/mobile/dist/components/Blocks.js +5 -1
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +2 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +1 -2
- package/mobile/dist/components/ContentPage/isBlockInRegistry.js +2 -2
- package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.js +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.d.ts +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js +8 -3
- package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/dist/components/Placeholder/PlaceholderContent.d.ts +2 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +1 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/mobile/dist/components/PromoTile/PromoTileContent.d.ts +1 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +1 -1
- package/mobile/dist/types.d.ts +1 -1
- package/mobile/dist/ui-kit/Description/Description.d.ts +4 -1
- package/mobile/dist/ui-kit/Description/Description.js.map +1 -1
- package/mobile/{lib/ui-kit/Description/DescriptionProps.d.ts → dist/ui-kit/Description/DescriptionContent.d.ts} +0 -3
- package/mobile/dist/ui-kit/Description/{DescriptionProps.js → DescriptionContent.js} +1 -1
- package/mobile/dist/ui-kit/Description/DescriptionContent.js.map +1 -0
- package/mobile/lib/components/Accordion/utils/isActiveHandler.js +1 -1
- package/mobile/lib/components/Accordion/utils/isActiveHandler.js.map +1 -1
- package/mobile/lib/components/Blocks.d.ts +3 -1
- package/mobile/lib/components/Blocks.js +5 -1
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +2 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +1 -2
- package/mobile/lib/components/ContentPage/isBlockInRegistry.js +2 -2
- package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.js +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.d.ts +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js +9 -4
- package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/lib/components/Placeholder/PlaceholderContent.d.ts +2 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +1 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +1 -1
- package/mobile/lib/components/PromoTile/PromoTileContent.d.ts +1 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +1 -1
- package/mobile/lib/types.d.ts +1 -1
- package/mobile/lib/ui-kit/Description/Description.d.ts +4 -1
- package/mobile/lib/ui-kit/Description/Description.js.map +1 -1
- package/{dist/ui-kit/Description/DescriptionProps.d.ts → mobile/lib/ui-kit/Description/DescriptionContent.d.ts} +0 -3
- package/mobile/lib/ui-kit/Description/DescriptionContent.js +2 -0
- package/mobile/lib/ui-kit/Description/DescriptionContent.js.map +1 -0
- package/mobile/src/components/Accordion/utils/isActiveHandler.ts +1 -2
- package/mobile/src/components/Blocks.ts +5 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +37 -43
- package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
- package/mobile/src/components/ContentPage/isBlockInRegistry.ts +2 -4
- package/mobile/src/components/ContentPage/normalizePage.ts +4 -1
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +1 -1
- package/mobile/src/components/Headline/HeadlineContent.ts +1 -1
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +1 -1
- package/mobile/src/components/Placeholder/Placeholder.tsx +36 -14
- package/mobile/src/components/Placeholder/PlaceholderContent.ts +2 -1
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +1 -1
- package/mobile/src/components/ProductTile/ProductTileContent.ts +1 -1
- package/mobile/src/components/PromoTile/PromoTileContent.ts +1 -1
- package/mobile/src/components/Tile/TileContent.ts +1 -1
- package/mobile/src/types.ts +1 -1
- package/mobile/src/ui-kit/Description/Description.tsx +5 -1
- package/mobile/src/ui-kit/Description/{DescriptionProps.ts → DescriptionContent.ts} +0 -4
- package/package.json +4 -5
- package/src/components/Accordion/utils/isActiveHandler.ts +1 -2
- package/src/components/Blocks.mobile.ts +5 -1
- package/src/components/ContentPage/ContentPage.page.json +37 -43
- package/src/components/ContentPage/ContentPage.tsx +2 -2
- package/src/components/ContentPage/isBlockInRegistry.ts +2 -4
- package/src/components/ContentPage/normalizePage.mobile.ts +4 -1
- package/src/components/ContentPage/normalizePage.ts +1 -1
- package/src/components/Gallery/GalleryCardInner.tsx +1 -1
- package/src/components/Headline/HeadlineContent.ts +1 -1
- package/src/components/MobileAppTile/MobileAppTileContent.ts +1 -1
- package/src/components/Placeholder/Placeholder.fixture.mobile.tsx +9 -0
- package/src/components/Placeholder/Placeholder.tsx +35 -8
- package/src/components/Placeholder/PlaceholderContent.ts +2 -1
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +6 -0
- package/src/components/ProductBlock/ProductBlockContent.ts +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.mobile.tsx +8 -0
- package/src/components/ProductTile/ProductTileContent.ts +1 -1
- package/src/components/PromoTile/PromoTileContent.ts +1 -1
- package/src/components/Tile/TileContent.ts +1 -1
- package/src/types.ts +1 -1
- package/src/ui-kit/Description/Description.tsx +5 -1
- package/src/ui-kit/Description/{DescriptionProps.ts → DescriptionContent.ts} +0 -4
- package/dist/components/Placeholder/Placeholder.mobile.d.ts +0 -6
- package/dist/components/Placeholder/Placeholder.mobile.js +0 -15
- package/dist/components/Placeholder/Placeholder.mobile.js.map +0 -1
- package/dist/ui-kit/Description/DescriptionProps.js.map +0 -1
- package/lib/components/Placeholder/Placeholder.mobile.d.ts +0 -6
- package/lib/components/Placeholder/Placeholder.mobile.js +0 -13
- package/lib/components/Placeholder/Placeholder.mobile.js.map +0 -1
- package/lib/ui-kit/Description/DescriptionProps.js +0 -2
- package/lib/ui-kit/Description/DescriptionProps.js.map +0 -1
- package/mobile/dist/ui-kit/Description/DescriptionProps.js.map +0 -1
- package/mobile/lib/ui-kit/Description/DescriptionProps.js +0 -2
- package/mobile/lib/ui-kit/Description/DescriptionProps.js.map +0 -1
- package/src/components/Placeholder/Placeholder.mobile.tsx +0 -35
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
3
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
4
4
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
5
5
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
6
|
import type { TextBenefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
3
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
4
4
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
3
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
4
4
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
5
5
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
6
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
package/mobile/src/types.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { BlockVersion } from './model/BlockVersion';
|
|
|
5
5
|
export type ColorPalette = 'pc' | 'bc' | 'eo' | 'eo2' | 'eo3' | 'eo4';
|
|
6
6
|
|
|
7
7
|
export interface BaseBlockDef {
|
|
8
|
-
type
|
|
8
|
+
type?: string;
|
|
9
9
|
style?: string[];
|
|
10
10
|
content?: BlockContent;
|
|
11
11
|
version?: BlockVersion;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { DescriptionContent } from './DescriptionContent';
|
|
3
|
+
|
|
4
|
+
export interface DescriptionProps extends DescriptionContent {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
3
7
|
|
|
4
8
|
export const Description = JSX<DescriptionProps>((props) => {
|
|
5
9
|
const { className, description } = props;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -65,7 +65,8 @@
|
|
|
65
65
|
"mobile/bundle",
|
|
66
66
|
"fonts",
|
|
67
67
|
"mobile/src",
|
|
68
|
-
"src"
|
|
68
|
+
"src",
|
|
69
|
+
"cosmos-static/icons"
|
|
69
70
|
],
|
|
70
71
|
"repository": {
|
|
71
72
|
"url": "https://github.com/redneckz/wildless-cms-uni-blocks.git"
|
|
@@ -167,9 +168,7 @@
|
|
|
167
168
|
"eslint"
|
|
168
169
|
],
|
|
169
170
|
"src/**/*.{js,jsx,ts,tsx,css}": [
|
|
170
|
-
"prettier --write"
|
|
171
|
-
"npm run build:icons",
|
|
172
|
-
"git add ./cosmos-static/icons"
|
|
171
|
+
"prettier --write"
|
|
173
172
|
]
|
|
174
173
|
},
|
|
175
174
|
"peerDependenciesMeta": {
|
|
@@ -5,8 +5,7 @@ export const isActiveHandler = ({ context, blocks }) => {
|
|
|
5
5
|
const hasContent = blocks?.length;
|
|
6
6
|
const icon: IconName = isActive ? 'MinusIcon' : 'PlusIcon';
|
|
7
7
|
|
|
8
|
-
const getContentBlock = ({
|
|
9
|
-
target.tagName === 'BUTTON' ? target.nextSibling : target.parentNode.nextSibling;
|
|
8
|
+
const getContentBlock = ({ currentTarget }) => currentTarget.nextSibling;
|
|
10
9
|
|
|
11
10
|
const handleToggle = (e: MouseEvent) => {
|
|
12
11
|
if (!hasContent) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { Accordion } from './Accordion/Accordion';
|
|
1
2
|
import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
|
|
2
3
|
import { Footer } from './Footer/Footer';
|
|
3
4
|
import { Header } from './Header/Header';
|
|
4
5
|
import { Headline } from './Headline/Headline';
|
|
5
6
|
import { LinkDocs } from './LinkDocs/LinkDocs';
|
|
7
|
+
import { MobileAppTile } from './MobileAppTile/MobileAppTile';
|
|
6
8
|
import { Placeholder } from './Placeholder/Placeholder';
|
|
7
9
|
import { ProductBlock } from './ProductBlock/ProductBlock';
|
|
8
10
|
import { ProductGallery } from './ProductGallery/ProductGallery';
|
|
@@ -10,14 +12,16 @@ import { StepsBlock } from './StepsBlock/StepsBlock';
|
|
|
10
12
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
11
13
|
|
|
12
14
|
export const Blocks = {
|
|
15
|
+
Accordion,
|
|
13
16
|
ExchangeRateTile,
|
|
14
17
|
Footer,
|
|
15
18
|
Header,
|
|
16
19
|
Headline,
|
|
17
20
|
LinkDocs,
|
|
21
|
+
MobileAppTile,
|
|
18
22
|
Placeholder,
|
|
19
23
|
ProductBlock,
|
|
20
24
|
ProductGallery,
|
|
21
|
-
TextBlock,
|
|
22
25
|
StepsBlock,
|
|
26
|
+
TextBlock,
|
|
23
27
|
};
|
|
@@ -83,7 +83,13 @@
|
|
|
83
83
|
"size": {
|
|
84
84
|
"width": 280,
|
|
85
85
|
"height": 280
|
|
86
|
-
}
|
|
86
|
+
},
|
|
87
|
+
"sources": [
|
|
88
|
+
{
|
|
89
|
+
"src": "money-1.png 1x, money-1-2x.png 2x",
|
|
90
|
+
"format": "png"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
87
93
|
}
|
|
88
94
|
}
|
|
89
95
|
},
|
|
@@ -1312,22 +1318,18 @@
|
|
|
1312
1318
|
"label": "Accordion label 1",
|
|
1313
1319
|
"blocks": [
|
|
1314
1320
|
{
|
|
1315
|
-
"
|
|
1316
|
-
"
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
"iconVersion": "small"
|
|
1321
|
-
}
|
|
1321
|
+
"accordionBlockType": "TextBlock",
|
|
1322
|
+
"title": "Title",
|
|
1323
|
+
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque minima odio soluta cupiditate pariatur, labore molestias quas necessitatibus nesciunt in praesentium accusamus provident sequi maiores autem. Voluptas quam neque iste?",
|
|
1324
|
+
"blockVersion": "secondary-light",
|
|
1325
|
+
"iconVersion": "small"
|
|
1322
1326
|
},
|
|
1323
1327
|
{
|
|
1324
|
-
"
|
|
1325
|
-
"
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
"iconVersion": "small"
|
|
1330
|
-
}
|
|
1328
|
+
"accordionBlockType": "TextBlock",
|
|
1329
|
+
"title": "Title",
|
|
1330
|
+
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque minima odio soluta cupiditate pariatur, labore molestias quas necessitatibus nesciunt in praesentium accusamus provident sequi maiores autem. Voluptas quam neque iste?",
|
|
1331
|
+
"blockVersion": "secondary-light",
|
|
1332
|
+
"iconVersion": "small"
|
|
1331
1333
|
}
|
|
1332
1334
|
]
|
|
1333
1335
|
},
|
|
@@ -1335,22 +1337,18 @@
|
|
|
1335
1337
|
"label": "Accordion label 2",
|
|
1336
1338
|
"blocks": [
|
|
1337
1339
|
{
|
|
1338
|
-
"
|
|
1339
|
-
"
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
"iconVersion": "small"
|
|
1344
|
-
}
|
|
1340
|
+
"accordionBlockType": "TextBlock",
|
|
1341
|
+
"title": "Title",
|
|
1342
|
+
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque minima odio soluta cupiditate pariatur, labore molestias quas necessitatibus nesciunt in praesentium accusamus provident sequi maiores autem. Voluptas quam neque iste?",
|
|
1343
|
+
"blockVersion": "secondary-light",
|
|
1344
|
+
"iconVersion": "small"
|
|
1345
1345
|
},
|
|
1346
1346
|
{
|
|
1347
|
-
"
|
|
1348
|
-
"
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
"iconVersion": "small"
|
|
1353
|
-
}
|
|
1347
|
+
"accordionBlockType": "TextBlock",
|
|
1348
|
+
"title": "Title",
|
|
1349
|
+
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque minima odio soluta cupiditate pariatur, labore molestias quas necessitatibus nesciunt in praesentium accusamus provident sequi maiores autem. Voluptas quam neque iste?",
|
|
1350
|
+
"blockVersion": "secondary-light",
|
|
1351
|
+
"iconVersion": "small"
|
|
1354
1352
|
}
|
|
1355
1353
|
]
|
|
1356
1354
|
},
|
|
@@ -1358,22 +1356,18 @@
|
|
|
1358
1356
|
"label": "Accordion label 3",
|
|
1359
1357
|
"blocks": [
|
|
1360
1358
|
{
|
|
1361
|
-
"
|
|
1362
|
-
"
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
"iconVersion": "small"
|
|
1367
|
-
}
|
|
1359
|
+
"accordionBlockType": "TextBlock",
|
|
1360
|
+
"title": "Title",
|
|
1361
|
+
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque minima odio soluta cupiditate pariatur, labore molestias quas necessitatibus nesciunt in praesentium accusamus provident sequi maiores autem. Voluptas quam neque iste?",
|
|
1362
|
+
"blockVersion": "secondary-light",
|
|
1363
|
+
"iconVersion": "small"
|
|
1368
1364
|
},
|
|
1369
1365
|
{
|
|
1370
|
-
"
|
|
1371
|
-
"
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
"iconVersion": "small"
|
|
1376
|
-
}
|
|
1366
|
+
"accordionBlockType": "TextBlock",
|
|
1367
|
+
"title": "Title",
|
|
1368
|
+
"description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Doloremque minima odio soluta cupiditate pariatur, labore molestias quas necessitatibus nesciunt in praesentium accusamus provident sequi maiores autem. Voluptas quam neque iste?",
|
|
1369
|
+
"blockVersion": "secondary-light",
|
|
1370
|
+
"iconVersion": "small"
|
|
1377
1371
|
}
|
|
1378
1372
|
]
|
|
1379
1373
|
}
|
|
@@ -88,11 +88,11 @@ function renderBlock(
|
|
|
88
88
|
i: number,
|
|
89
89
|
) {
|
|
90
90
|
const { type } = block;
|
|
91
|
-
if (!(type in blocksRegistry)) {
|
|
91
|
+
if (!(type && type in blocksRegistry)) {
|
|
92
92
|
console.warn(`No block with "${type}" is registered`);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
const BlockComponent = blocksRegistry[type] || Placeholder;
|
|
95
|
+
const BlockComponent = blocksRegistry[type || 'Placeholder'] || Placeholder;
|
|
96
96
|
return blockDecorator(
|
|
97
97
|
{
|
|
98
98
|
blockClassName: style2className(block.style),
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export function isBlockInRegistry<T>(block: BlockDef, registry: Record<string, T>) {
|
|
4
|
-
return block.type in registry;
|
|
1
|
+
export function isBlockInRegistry<T>(blockType: string | undefined, registry: Record<string, T>) {
|
|
2
|
+
return (blockType || '') in registry;
|
|
5
3
|
}
|
|
@@ -32,6 +32,9 @@ export function normalizePage(
|
|
|
32
32
|
|
|
33
33
|
function getMobileBlocks(blocks?: BlockDef[]) {
|
|
34
34
|
return blocks
|
|
35
|
-
?.filter(
|
|
35
|
+
?.filter(
|
|
36
|
+
(block) =>
|
|
37
|
+
isBlockInRegistry(block?.type || block?.mobile?.type, Blocks) && !block.mobile?.hidden,
|
|
38
|
+
)
|
|
36
39
|
.map(normalizeBlock);
|
|
37
40
|
}
|
|
@@ -31,5 +31,5 @@ export function normalizePage<T extends ContentPageDef | undefined | null>(
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function getDesktopBlocks(blocks?: BlockDef[]) {
|
|
34
|
-
return blocks?.filter((block) => isBlockInRegistry(block, Blocks)).map(normalizeBlock);
|
|
34
|
+
return blocks?.filter((block) => isBlockInRegistry(block?.type, Blocks)).map(normalizeBlock);
|
|
35
35
|
}
|
|
@@ -20,7 +20,7 @@ export const GalleryCardInner = JSX<GalleryCard>(
|
|
|
20
20
|
{items?.length ? (
|
|
21
21
|
<section className={`max-w-[308px] mt-2`} role="list">
|
|
22
22
|
{items
|
|
23
|
-
.filter((item) => item
|
|
23
|
+
.filter((item) => item?.text)
|
|
24
24
|
.map((item, i) => renderItem(item.text as string, i, version))}
|
|
25
25
|
</section>
|
|
26
26
|
) : null}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
2
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
2
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
3
3
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
4
4
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
5
5
|
import type { AlignType } from '../BaseTile/BaseTileProps';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
2
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
2
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
3
3
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { PlaceholderContent } from '../../components/Placeholder/PlaceholderContent';
|
|
3
|
-
import { Tile } from '../Tile/Tile';
|
|
4
3
|
import type { UniBlockProps } from '../../types';
|
|
4
|
+
import { Description } from '../../ui-kit/Description/Description';
|
|
5
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
|
+
import { BaseTile } from '../BaseTile/BaseTile';
|
|
7
|
+
import { getTileHeadingType } from '../BaseTile/getTileHeadingType';
|
|
8
|
+
import { getTileMinHeight } from '../BaseTile/getTileMinHeight';
|
|
9
|
+
import { getTileRightPadding } from '../BaseTile/getTileRightPadding';
|
|
5
10
|
|
|
6
11
|
export interface PlaceholderProps extends PlaceholderContent, UniBlockProps {
|
|
7
12
|
className?: string;
|
|
@@ -9,13 +14,35 @@ export interface PlaceholderProps extends PlaceholderContent, UniBlockProps {
|
|
|
9
14
|
|
|
10
15
|
const GOLDEN_RATIO = 1.618;
|
|
11
16
|
|
|
12
|
-
export const Placeholder = JSX<PlaceholderProps>(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})
|
|
17
|
+
export const Placeholder = JSX<PlaceholderProps>(
|
|
18
|
+
({ className, context, title, description = 'Блок в разработке...' }) => {
|
|
19
|
+
return (
|
|
20
|
+
<section
|
|
21
|
+
className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(
|
|
22
|
+
className,
|
|
23
|
+
)} ${getTileMinHeight(className)} `}
|
|
24
|
+
>
|
|
25
|
+
<BaseTile
|
|
26
|
+
context={context}
|
|
27
|
+
title={
|
|
28
|
+
title ? (
|
|
29
|
+
<Heading
|
|
30
|
+
headingType={getTileHeadingType(className)}
|
|
31
|
+
title={title}
|
|
32
|
+
className={`whitespace-pre-wrap max-w-[600px]`}
|
|
33
|
+
/>
|
|
34
|
+
) : null
|
|
35
|
+
}
|
|
36
|
+
>
|
|
37
|
+
{description ? (
|
|
38
|
+
<Description className="mt-4 max-w-[600px]" description={description} />
|
|
39
|
+
) : null}
|
|
40
|
+
<figure className="m-0 min-w-[600px]">{renderShimmer()}</figure>
|
|
41
|
+
</BaseTile>
|
|
42
|
+
</section>
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
);
|
|
19
46
|
|
|
20
47
|
const renderShimmer = (size = 3) =>
|
|
21
48
|
goldenSequence(100, size)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
1
2
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @hidden
|
|
5
6
|
*/
|
|
6
|
-
export type PlaceholderContent = HeadingContent;
|
|
7
|
+
export type PlaceholderContent = HeadingContent & DescriptionContent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { LinkProps } from '../../model/LinkProps';
|
|
3
3
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
4
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
4
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
5
5
|
import type { HeadingContent, HeadingTypeContent } from '../../ui-kit/Heading/HeadingContent';
|
|
6
6
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
7
7
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
@@ -10,11 +10,18 @@ const moneyImage: Picture = {
|
|
|
10
10
|
height: 280,
|
|
11
11
|
},
|
|
12
12
|
alt: 'Варианты потребительского кредита',
|
|
13
|
+
sources: [
|
|
14
|
+
{
|
|
15
|
+
src: 'money-1.png 1x, money-1-2x.png 2x',
|
|
16
|
+
format: 'png',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
13
19
|
};
|
|
14
20
|
|
|
15
21
|
const worker: Picture = {
|
|
16
22
|
src: 'money-2.png',
|
|
17
23
|
format: 'webp',
|
|
24
|
+
alt: 'Варианты потребительского кредита',
|
|
18
25
|
size: {
|
|
19
26
|
width: 280,
|
|
20
27
|
height: 280,
|
|
@@ -24,6 +31,7 @@ const worker: Picture = {
|
|
|
24
31
|
const creditCard: Picture = {
|
|
25
32
|
src: 'credit-card-1.png',
|
|
26
33
|
format: 'webp',
|
|
34
|
+
alt: 'Варианты потребительского кредита',
|
|
27
35
|
size: {
|
|
28
36
|
width: 280,
|
|
29
37
|
height: 280,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
3
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
4
4
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
5
5
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
6
|
import type { TextBenefit } from '../BenefitsBlock/BenefitsBlockContent';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
3
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
4
4
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
-
import type { DescriptionContent } from '../../ui-kit/Description/
|
|
3
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
4
4
|
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
5
5
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
6
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
package/src/types.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { BlockVersion } from './model/BlockVersion';
|
|
|
5
5
|
export type ColorPalette = 'pc' | 'bc' | 'eo' | 'eo2' | 'eo3' | 'eo4';
|
|
6
6
|
|
|
7
7
|
export interface BaseBlockDef {
|
|
8
|
-
type
|
|
8
|
+
type?: string;
|
|
9
9
|
style?: string[];
|
|
10
10
|
content?: BlockContent;
|
|
11
11
|
version?: BlockVersion;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { DescriptionContent } from './DescriptionContent';
|
|
3
|
+
|
|
4
|
+
export interface DescriptionProps extends DescriptionContent {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
3
7
|
|
|
4
8
|
export const Description = JSX<DescriptionProps>((props) => {
|
|
5
9
|
const { className, description } = props;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../types';
|
|
2
|
-
import type { PlaceholderContent } from './PlaceholderContent';
|
|
3
|
-
export interface PlaceholderProps extends PlaceholderContent, UniBlockProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<PlaceholderProps, any>, context?: any) => any;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Placeholder = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const Tile_1 = require("../Tile/Tile");
|
|
6
|
-
const GOLDEN_RATIO = 1.618;
|
|
7
|
-
exports.Placeholder = (0, uni_jsx_1.JSX)(({ className = '', context, title }) => {
|
|
8
|
-
return ((0, jsx_runtime_1.jsx)(Tile_1.Tile, { className: `pr-0 min-h-0 ${className}`, context: context, title: title, description: "\u0411\u043B\u043E\u043A \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0435...", children: (0, jsx_runtime_1.jsx)("figure", { className: "m-0", children: renderShimmer() }) }));
|
|
9
|
-
});
|
|
10
|
-
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
11
|
-
.map((_) => Math.floor(_))
|
|
12
|
-
.map(renderShimmerItem);
|
|
13
|
-
const renderShimmerItem = (width = 100, index) => ((0, jsx_runtime_1.jsx)("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
14
|
-
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
15
|
-
//# sourceMappingURL=Placeholder.mobile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.mobile.js","sourceRoot":"","sources":["../../../src/components/Placeholder/Placeholder.mobile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,uCAAoC;AAOpC,MAAM,YAAY,GAAG,KAAK,CAAC;AAEd,QAAA,WAAW,GAAG,IAAA,aAAG,EAAmB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IACtF,OAAO,CACL,uBAAC,WAAI,IACH,SAAS,EAAE,gBAAgB,SAAS,EAAE,EACtC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAC,iGAAsB,YAElC,mCAAQ,SAAS,EAAC,KAAK,YAAE,aAAa,EAAE,GAAU,GAC7C,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,EAAE,CACjC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC;KACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACzB,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAE5B,MAAM,iBAAiB,GAAG,CAAC,KAAK,GAAG,GAAG,EAAE,KAAa,EAAE,EAAE,CAAC,CACxD,gCAAyB,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,EAAE,EAAE,SAAS,EAAC,6BAA6B,IAArF,MAAM,CAAC,KAAK,CAAC,CAA2E,CACnG,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,IAAY,EAAY,EAAE,CAC/D,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,GAAG,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Description/DescriptionProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../types';
|
|
2
|
-
import type { PlaceholderContent } from './PlaceholderContent';
|
|
3
|
-
export interface PlaceholderProps extends PlaceholderContent, UniBlockProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Placeholder: (props: import("@redneckz/uni-jsx").PropsWithChildren<PlaceholderProps, any>, context?: any) => any;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { Tile } from '../Tile/Tile.js';
|
|
4
|
-
const GOLDEN_RATIO = 1.618;
|
|
5
|
-
export const Placeholder = JSX(({ className = '', context, title }) => {
|
|
6
|
-
return (_jsx(Tile, { className: `pr-0 min-h-0 ${className}`, context: context, title: title, description: "\u0411\u043B\u043E\u043A \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0435...", children: _jsx("figure", { className: "m-0", children: renderShimmer() }) }));
|
|
7
|
-
});
|
|
8
|
-
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
9
|
-
.map((_) => Math.floor(_))
|
|
10
|
-
.map(renderShimmerItem);
|
|
11
|
-
const renderShimmerItem = (width = 100, index) => (_jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
12
|
-
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
13
|
-
//# sourceMappingURL=Placeholder.mobile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.mobile.js","sourceRoot":"","sources":["../../../src/components/Placeholder/Placeholder.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAOpC,MAAM,YAAY,GAAG,KAAK,CAAC;AAE3B,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;IACtF,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,gBAAgB,SAAS,EAAE,EACtC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAC,iGAAsB,YAElC,iBAAQ,SAAS,EAAC,KAAK,YAAE,aAAa,EAAE,GAAU,GAC7C,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,EAAE,CACjC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC;KACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACzB,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAE5B,MAAM,iBAAiB,GAAG,CAAC,KAAK,GAAG,GAAG,EAAE,KAAa,EAAE,EAAE,CAAC,CACxD,cAAyB,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,EAAE,EAAE,SAAS,EAAC,6BAA6B,IAArF,MAAM,CAAC,KAAK,CAAC,CAA2E,CACnG,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,IAAY,EAAY,EAAE,CAC/D,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,GAAG,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Description/DescriptionProps.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Description/DescriptionProps.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Description/DescriptionProps.ts"],"names":[],"mappings":""}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import { Tile } from '../Tile/Tile';
|
|
4
|
-
import type { PlaceholderContent } from './PlaceholderContent';
|
|
5
|
-
|
|
6
|
-
export interface PlaceholderProps extends PlaceholderContent, UniBlockProps {
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const GOLDEN_RATIO = 1.618;
|
|
11
|
-
|
|
12
|
-
export const Placeholder = JSX<PlaceholderProps>(({ className = '', context, title }) => {
|
|
13
|
-
return (
|
|
14
|
-
<Tile
|
|
15
|
-
className={`pr-0 min-h-0 ${className}`}
|
|
16
|
-
context={context}
|
|
17
|
-
title={title}
|
|
18
|
-
description="Блок в разработке..."
|
|
19
|
-
>
|
|
20
|
-
<figure className="m-0">{renderShimmer()}</figure>
|
|
21
|
-
</Tile>
|
|
22
|
-
);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const renderShimmer = (size = 3) =>
|
|
26
|
-
goldenSequence(100, size)
|
|
27
|
-
.map((_) => Math.floor(_))
|
|
28
|
-
.map(renderShimmerItem);
|
|
29
|
-
|
|
30
|
-
const renderShimmerItem = (width = 100, index: number) => (
|
|
31
|
-
<div key={String(index)} style={{ width: `${width}%` }} className="h-4 mt-2 bg-secondary-light" />
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const goldenSequence = (first: number, size: number): number[] =>
|
|
35
|
-
[first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|