@redneckz/wildless-cms-uni-blocks 0.2.92 → 0.2.96
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 +165 -112
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/api/LikeAPI.js +1 -0
- package/dist/api/LikeAPI.js.map +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/AccordionContent.d.ts +38 -14
- package/dist/components/Accordion/AccordionItem.js +9 -10
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +7 -2
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/Blocks.js +1 -1
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +11 -6
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ComparisonTable/HeaderCell.js +1 -1
- package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- 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/ContentPageHead.d.ts +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/Contacts.js +1 -1
- package/dist/components/Footer/Contacts.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/FooterContent.d.ts +1 -2
- package/dist/components/Footer/HorizontalNavigation.js +1 -1
- package/dist/components/Footer/Sitemap.js +1 -1
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Footer/SocialMedia.js +1 -2
- package/dist/components/Footer/SocialMedia.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 +5 -5
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
- package/dist/components/MobileBlocks.js +0 -3
- package/dist/components/MobileBlocks.js.map +1 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +1 -3
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js +3 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -5
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +2 -2
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.d.ts +1 -1
- package/dist/components/PromoTile/PromoTile.js +1 -1
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +8 -3
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableCell.js +3 -3
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +5 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/dist/components/Tile/Tile.d.ts +1 -1
- package/dist/components/Tile/Tile.js +14 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/content-page-repository/ContentPageRepository.js +1 -0
- package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/dist/hooks/useComparisonTableScroll.d.ts +6 -1
- package/dist/hooks/useComparisonTableScroll.js +1 -1
- package/dist/hooks/useComparisonTableScroll.js.map +1 -1
- package/dist/hooks/useLink.js +1 -1
- package/dist/hooks/useLink.js.map +1 -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/Checkbox/Checkbox.js +2 -2
- package/dist/ui-kit/Checkbox/Checkbox.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 +2 -1
- package/dist/ui-kit/SearchBar.js.map +1 -1
- package/lib/api/LikeAPI.js +1 -0
- package/lib/api/LikeAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +1 -4
- 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/AccordionContent.d.ts +38 -14
- package/lib/components/Accordion/AccordionItem.js +9 -7
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +7 -2
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/Blocks.js +1 -1
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +11 -6
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ComparisonTable/HeaderCell.js +1 -1
- package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- 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/ContentPageHead.d.ts +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/Contacts.js +1 -1
- package/lib/components/Footer/Contacts.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/FooterContent.d.ts +1 -2
- package/lib/components/Footer/HorizontalNavigation.js +1 -1
- package/lib/components/Footer/Sitemap.js +1 -1
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Footer/SocialMedia.js +1 -2
- package/lib/components/Footer/SocialMedia.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/Headline/Headline.fixture.d.ts +3 -2
- package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +7 -7
- package/lib/components/LinkDocs/LinkDocs.js +5 -5
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
- package/lib/components/MobileBlocks.js +0 -3
- package/lib/components/MobileBlocks.js.map +1 -1
- package/lib/components/PictureText/PictureText.fixture.d.ts +2 -0
- package/lib/components/PictureText/PictureTextContent.d.ts +1 -3
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.js +3 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -5
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +2 -2
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.d.ts +1 -1
- package/lib/components/PromoTile/PromoTile.js +1 -1
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +8 -3
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableCell.js +3 -3
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +5 -1
- package/lib/components/TextBlock/TextBlock.fixture.d.ts +2 -0
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
- package/lib/components/Tile/Tile.d.ts +1 -1
- package/lib/components/Tile/Tile.js +14 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/content-page-repository/ContentPageRepository.js +1 -0
- package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/lib/hooks/useComparisonTableScroll.d.ts +6 -1
- package/lib/hooks/useComparisonTableScroll.js +1 -1
- package/lib/hooks/useComparisonTableScroll.js.map +1 -1
- package/lib/hooks/useLink.js +1 -1
- package/lib/hooks/useLink.js.map +1 -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/Checkbox/Checkbox.js +2 -2
- package/lib/ui-kit/Checkbox/Checkbox.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 +2 -1
- package/lib/ui-kit/SearchBar.js.map +1 -1
- package/package.json +19 -8
- package/src/api/LikeAPI.ts +1 -0
- package/src/components/Accordion/Accordion.example.json +18 -42
- package/src/components/Accordion/Accordion.fixture.tsx +33 -119
- package/src/components/Accordion/AccordionBlocks.tsx +1 -3
- package/src/components/Accordion/AccordionContent.ts +47 -18
- package/src/components/Accordion/AccordionItem.tsx +14 -10
- package/src/components/BaseTile/BaseTile.tsx +13 -5
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +31 -28
- package/src/components/Blocks.ts +1 -1
- package/src/components/ComparisonTable/ComparisonTable.fixture.tsx +43 -53
- package/src/components/ComparisonTable/ComparisonTable.tsx +8 -8
- package/src/components/ComparisonTable/HeaderCell.tsx +3 -3
- package/src/components/ContentPage/ContentPage.fixture.tsx +3 -3
- package/src/components/ContentPage/ContentPage.page.json +45 -56
- package/src/components/ContentPage/ContentPage.tsx +71 -36
- package/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/src/components/ContentPage/toMobilePage.ts +19 -2
- package/src/components/CreditCalculator/CreditCalculator.fixture.tsx +9 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +12 -9
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/Footer/Contacts.tsx +1 -1
- package/src/components/Footer/Footer.fixture.tsx +265 -258
- package/src/components/Footer/Footer.tsx +3 -3
- package/src/components/Footer/FooterContent.ts +1 -1
- package/src/components/Footer/HorizontalNavigation.tsx +1 -1
- package/src/components/Footer/Sitemap.tsx +1 -1
- package/src/components/Footer/SocialMedia.tsx +5 -6
- 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 -93
- package/src/components/Gallery/constants.ts +22 -0
- package/src/components/Header/Header.tsx +14 -12
- package/src/components/Headline/Headline.fixture.tsx +30 -31
- 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 +30 -13
- package/src/components/LinkDocs/LinkDocs.tsx +9 -8
- package/src/components/MiniGallery/MiniGallery.fixture.tsx +12 -22
- package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -1
- package/src/components/MobileBlocks.ts +0 -3
- package/src/components/PictureText/PictureText.fixture.tsx +22 -18
- package/src/components/PictureText/PictureTextContent.ts +1 -3
- package/src/components/Placeholder/Placeholder.fixture.tsx +5 -1
- package/src/components/Placeholder/Placeholder.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +83 -76
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +1 -0
- package/src/components/ProductBlock/ProductBlock.tsx +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +9 -12
- package/src/components/ProductGallery/ProductGallery.example.json +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +103 -106
- package/src/components/ProductGallery/ProductGallery.tsx +7 -5
- package/src/components/ProductTile/ProductTile.fixture.tsx +4 -4
- package/src/components/PromoTile/PromoTile.fixture.tsx +1 -1
- package/src/components/PromoTile/PromoTile.tsx +3 -3
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +21 -18
- package/src/components/TariffsTable/TariffsTable.example.json +3 -1
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +8 -16
- package/src/components/TariffsTable/TariffsTable.tsx +39 -37
- package/src/components/TariffsTable/TariffsTableCell.tsx +4 -4
- package/src/components/TariffsTable/TariffsTableContent.ts +5 -1
- package/src/components/TextBlock/TextBlock.example.json +9 -2
- package/src/components/TextBlock/TextBlock.fixture.tsx +70 -97
- package/src/components/TextBlock/TextBlockContent.ts +1 -2
- package/src/components/Tile/Tile.example.json +5 -2
- package/src/components/Tile/Tile.fixture.tsx +11 -8
- package/src/components/Tile/Tile.tsx +16 -5
- package/src/content-page-repository/ContentPageRepository.ts +1 -0
- package/src/hooks/useComparisonTableScroll.ts +11 -6
- package/src/hooks/useLink.ts +1 -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/Checkbox/Checkbox.tsx +7 -3
- package/src/ui-kit/InputRange/InputRange.tsx +9 -8
- package/src/ui-kit/SearchBar.tsx +15 -6
- package/src/Icons/CalendarCircleIcon.svg +0 -14
- package/src/Icons/CardIcon.svg +0 -11
- package/src/Icons/CardPosIcon.svg +0 -12
- package/src/Icons/CardTickIcon.svg +0 -13
- package/src/Icons/EmptyWalletChangeIcon.svg +0 -21
- package/src/Icons/JCBIcon.svg +0 -42
- package/src/Icons/MastercardIcon.svg +0 -6
- package/src/Icons/MinusIcon.svg +0 -1
- package/src/Icons/MirIcon.svg +0 -13
- package/src/Icons/MoneyIcon.svg +0 -13
- package/src/Icons/MonitorMobileIcon.svg +0 -14
- package/src/Icons/PlusIcon.svg +0 -1
- package/src/Icons/Profile2UserIcon.svg +0 -14
- package/src/Icons/ShieldTickIcon.svg +0 -7
- package/src/Icons/UnionPayIcon.svg +0 -7
- package/src/Icons/UserIcon.svg +0 -11
- package/src/Icons/VisaIcon.svg +0 -7
- package/src/Icons/WalletIcon.svg +0 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.96",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -65,16 +65,18 @@
|
|
|
65
65
|
"postbuild:lib": "replace-in-file --configFile=replace-config.lib.cjs --verbose",
|
|
66
66
|
"build:commonjs": "rimraf ./dist && tsc --module commonjs --noImplicitUseStrict --outDir dist",
|
|
67
67
|
"bundle": "rimraf ./bundle && rollup -c && npm run build:schema",
|
|
68
|
-
"build:schema": "ts-json-schema-generator --path './src/**/*Content.ts' --additional-properties --validation-keywords enumNames --validation-keywords required --minify --no-type-check -o ./bundle/blocks.schema.json",
|
|
68
|
+
"build:schema": "ts-json-schema-generator --path './src/**/*Content.ts' --additional-properties --unstable --validation-keywords enumNames --validation-keywords required --minify --no-type-check -o ./bundle/blocks.schema.json",
|
|
69
69
|
"build:style": "postcss ./src/**/*.css --env production --dir ./lib",
|
|
70
70
|
"build:icons": "svgo -f ./src/icons -o ./cosmos-static/icons",
|
|
71
71
|
"size": "size-limit",
|
|
72
|
+
"lint": "eslint ./src",
|
|
73
|
+
"pretest": "npm run lint",
|
|
72
74
|
"test": "jest --coverage",
|
|
73
75
|
"precosmos": "npm run build:icons",
|
|
74
76
|
"cosmos": "cosmos",
|
|
75
77
|
"precosmos:export": "npm run build:icons",
|
|
76
78
|
"cosmos:export": "cosmos-export",
|
|
77
|
-
"prepare": "husky install || exit 0"
|
|
79
|
+
"prepare": "husky install && npm run --prefix ./eslint-rules build || exit 0"
|
|
78
80
|
},
|
|
79
81
|
"peerDependencies": {
|
|
80
82
|
"react": ">=16.8.0",
|
|
@@ -92,14 +94,20 @@
|
|
|
92
94
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
93
95
|
"@rollup/plugin-typescript": "^8.3.3",
|
|
94
96
|
"@size-limit/file": "^7.0.8",
|
|
95
|
-
"@types/jest": "^28.1.
|
|
97
|
+
"@types/jest": "^28.1.5",
|
|
98
|
+
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
|
99
|
+
"@typescript-eslint/experimental-utils": "^5.30.6",
|
|
100
|
+
"@typescript-eslint/parser": "^5.30.6",
|
|
96
101
|
"autoprefixer": "^10.4.7",
|
|
97
102
|
"copyfiles": "^2.4.1",
|
|
98
103
|
"css-loader": "^6.7.1",
|
|
99
104
|
"cssnano": "^5.1.11",
|
|
105
|
+
"eslint": "^8.19.0",
|
|
106
|
+
"eslint-plugin-import": "^2.26.0",
|
|
107
|
+
"eslint-plugin-local-eslint-rules": "./eslint-rules",
|
|
100
108
|
"html-webpack-plugin": "^5.5.0",
|
|
101
109
|
"husky": "^8.0.1",
|
|
102
|
-
"jest": "^28.1.
|
|
110
|
+
"jest": "^28.1.3",
|
|
103
111
|
"lint-staged": "^13.0.1",
|
|
104
112
|
"postcss": "^8.4.14",
|
|
105
113
|
"postcss-cli": "^9.1.0",
|
|
@@ -114,10 +122,10 @@
|
|
|
114
122
|
"style-loader": "^3.3.1",
|
|
115
123
|
"svgo": "^2.8.0",
|
|
116
124
|
"tailwindcss": "^3.1.1",
|
|
117
|
-
"ts-jest": "^28.0.
|
|
125
|
+
"ts-jest": "^28.0.6",
|
|
118
126
|
"ts-json-schema-generator": "^1.0.0",
|
|
119
127
|
"ts-loader": "^9.3.0",
|
|
120
|
-
"typescript": "^4.7.
|
|
128
|
+
"typescript": "^4.7.4",
|
|
121
129
|
"webpack": "^5.73.0",
|
|
122
130
|
"webpack-cli": "^4.9.2"
|
|
123
131
|
},
|
|
@@ -132,7 +140,10 @@
|
|
|
132
140
|
}
|
|
133
141
|
],
|
|
134
142
|
"lint-staged": {
|
|
135
|
-
"src/**/*.{js,jsx,ts,tsx,css}":
|
|
143
|
+
"src/**/*.{js,jsx,ts,tsx,css}": [
|
|
144
|
+
"prettier --write",
|
|
145
|
+
"eslint"
|
|
146
|
+
],
|
|
136
147
|
"*.{js,jsx,ts,tsx,css,json}": [
|
|
137
148
|
"npm run cosmos:export",
|
|
138
149
|
"git add ./docs"
|
package/src/api/LikeAPI.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface LikeData {
|
|
|
10
10
|
const AUTH_PREFIX = 'guest';
|
|
11
11
|
const STORAGE_KEY = 'likesToken';
|
|
12
12
|
|
|
13
|
+
// eslint-disable-next-line max-lines-per-function
|
|
13
14
|
export function LikeAPI(projectId: string, baseURL = '') {
|
|
14
15
|
async function getLikeCount(...nodeIds: string[]): Promise<LikeData[]> {
|
|
15
16
|
if (!nodeIds.length) {
|
|
@@ -5,22 +5,14 @@
|
|
|
5
5
|
"label": "Accordion label 1",
|
|
6
6
|
"blocks": [
|
|
7
7
|
{
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"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?",
|
|
12
|
-
"blockVersion": "secondary-light",
|
|
13
|
-
"iconVersion": "small"
|
|
14
|
-
}
|
|
8
|
+
"accordionBlockType": "TextBlock",
|
|
9
|
+
"title": "Текстовый блок",
|
|
10
|
+
"description": "Описание текстового блока"
|
|
15
11
|
},
|
|
16
12
|
{
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"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?",
|
|
21
|
-
"blockVersion": "secondary-light",
|
|
22
|
-
"iconVersion": "small"
|
|
23
|
-
}
|
|
13
|
+
"accordionBlockType": "TextBlock",
|
|
14
|
+
"title": "Текстовый блок №2",
|
|
15
|
+
"description": "Описание текстового блока №2"
|
|
24
16
|
}
|
|
25
17
|
]
|
|
26
18
|
},
|
|
@@ -28,22 +20,14 @@
|
|
|
28
20
|
"label": "Accordion label 2",
|
|
29
21
|
"blocks": [
|
|
30
22
|
{
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"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?",
|
|
35
|
-
"blockVersion": "secondary-light",
|
|
36
|
-
"iconVersion": "small"
|
|
37
|
-
}
|
|
23
|
+
"accordionBlockType": "TextBlock",
|
|
24
|
+
"title": "Текстовый блок",
|
|
25
|
+
"description": "Описание текстового блока"
|
|
38
26
|
},
|
|
39
27
|
{
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
"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?",
|
|
44
|
-
"blockVersion": "secondary-light",
|
|
45
|
-
"iconVersion": "small"
|
|
46
|
-
}
|
|
28
|
+
"accordionBlockType": "TextBlock",
|
|
29
|
+
"title": "Текстовый блок №2",
|
|
30
|
+
"description": "Описание текстового блока №2"
|
|
47
31
|
}
|
|
48
32
|
]
|
|
49
33
|
},
|
|
@@ -51,22 +35,14 @@
|
|
|
51
35
|
"label": "Accordion label 3",
|
|
52
36
|
"blocks": [
|
|
53
37
|
{
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
"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?",
|
|
58
|
-
"blockVersion": "secondary-light",
|
|
59
|
-
"iconVersion": "small"
|
|
60
|
-
}
|
|
38
|
+
"accordionBlockType": "TextBlock",
|
|
39
|
+
"title": "Текстовый блок",
|
|
40
|
+
"description": "Описание текстового блока"
|
|
61
41
|
},
|
|
62
42
|
{
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
"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?",
|
|
67
|
-
"blockVersion": "secondary-light",
|
|
68
|
-
"iconVersion": "small"
|
|
69
|
-
}
|
|
43
|
+
"accordionBlockType": "TextBlock",
|
|
44
|
+
"title": "Текстовый блок №2",
|
|
45
|
+
"description": "Описание текстового блока №2"
|
|
70
46
|
}
|
|
71
47
|
]
|
|
72
48
|
}
|
|
@@ -1,52 +1,35 @@
|
|
|
1
1
|
import { context } from '../../setup-fixture';
|
|
2
|
+
import { HEADLINE } from '../Headline/Headline.fixture';
|
|
3
|
+
import { LINK_DOCS } from '../LinkDocs/LinkDocs.fixture';
|
|
4
|
+
import { PICTURE_TEXT } from '../PictureText/PictureText.fixture';
|
|
5
|
+
import { TEXT_BLOCK } from '../TextBlock/TextBlock.fixture';
|
|
2
6
|
import type { AccordionProps } from './Accordion';
|
|
3
|
-
import type { HeadlineProps } from '../Headline/Headline';
|
|
4
|
-
import type { PictureTextContent } from '../PictureText/PictureTextContent';
|
|
5
|
-
import type { TextBlockContent } from '../TextBlock/TextBlockContent';
|
|
6
|
-
|
|
7
7
|
import { Accordion } from './Accordion';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import type {
|
|
9
|
+
HeadlineAccordionBlock,
|
|
10
|
+
LinkDocsAccordionBlock,
|
|
11
|
+
PictureTextAccordionBlock,
|
|
12
|
+
TextBlockAccordionBlock,
|
|
13
|
+
} from './AccordionContent';
|
|
13
14
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const TEXT_BLOCK_ACCORDION_BLOCK: TextBlockAccordionBlock = {
|
|
16
|
+
accordionBlockType: 'TextBlock',
|
|
17
|
+
...TEXT_BLOCK,
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
description: 'Карта работает в 180 странах мира. Бесплатное снятие наличных в любых банкоматах.',
|
|
23
|
-
align: 'left',
|
|
24
|
-
bgColor: 'bg-white',
|
|
20
|
+
const HEADLINE_ACCORDION_BLOCK: HeadlineAccordionBlock = {
|
|
21
|
+
accordionBlockType: 'Headline',
|
|
22
|
+
...HEADLINE,
|
|
25
23
|
};
|
|
26
24
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
label: 'Кредит на общих условиях',
|
|
37
|
-
description: 'До 5 млн ₽ на общих условиях получения кредита',
|
|
38
|
-
icon: 'DiscountShape',
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
image: {
|
|
42
|
-
src: 'legal-support-business.png',
|
|
43
|
-
alt: 'Варианты потребительского кредита',
|
|
44
|
-
format: 'webp',
|
|
45
|
-
size: {
|
|
46
|
-
width: 200,
|
|
47
|
-
height: 200,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
25
|
+
const PICTURE_TEXT_ACCORDION_BLOCK: PictureTextAccordionBlock = {
|
|
26
|
+
accordionBlockType: 'PictureText',
|
|
27
|
+
...PICTURE_TEXT,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const LINK_DOCS_ACCORDION_BLOCK: LinkDocsAccordionBlock = {
|
|
31
|
+
accordionBlockType: 'LinkDocs',
|
|
32
|
+
...LINK_DOCS,
|
|
50
33
|
};
|
|
51
34
|
|
|
52
35
|
const propsTextBlock: AccordionProps = {
|
|
@@ -55,94 +38,25 @@ const propsTextBlock: AccordionProps = {
|
|
|
55
38
|
accordionItems: [
|
|
56
39
|
{
|
|
57
40
|
label: 'Accordion label 1',
|
|
58
|
-
blocks: [
|
|
59
|
-
{
|
|
60
|
-
type: 'TextBlock',
|
|
61
|
-
data: TEXT_BLOCK,
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
type: 'TextBlock',
|
|
65
|
-
data: TEXT_BLOCK,
|
|
66
|
-
},
|
|
67
|
-
],
|
|
41
|
+
blocks: [TEXT_BLOCK_ACCORDION_BLOCK, TEXT_BLOCK_ACCORDION_BLOCK],
|
|
68
42
|
},
|
|
69
43
|
{
|
|
70
44
|
label: 'Accordion label 2',
|
|
71
|
-
blocks: [
|
|
72
|
-
{
|
|
73
|
-
type: 'TextBlock',
|
|
74
|
-
data: TEXT_BLOCK,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
type: 'TextBlock',
|
|
78
|
-
data: TEXT_BLOCK,
|
|
79
|
-
},
|
|
80
|
-
],
|
|
45
|
+
blocks: [PICTURE_TEXT_ACCORDION_BLOCK],
|
|
81
46
|
},
|
|
82
47
|
{
|
|
83
48
|
label: 'Accordion label 3',
|
|
84
|
-
blocks: [
|
|
85
|
-
{
|
|
86
|
-
type: 'PictureText',
|
|
87
|
-
data: PICTURE_TEXT,
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
type: 'PictureText',
|
|
91
|
-
data: PICTURE_TEXT,
|
|
92
|
-
},
|
|
93
|
-
],
|
|
49
|
+
blocks: [HEADLINE_ACCORDION_BLOCK],
|
|
94
50
|
},
|
|
95
51
|
{
|
|
96
52
|
label: 'Accordion label 4',
|
|
97
|
-
blocks: [
|
|
98
|
-
{
|
|
99
|
-
type: 'Headline',
|
|
100
|
-
data: HEADLINE,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
type: 'Headline',
|
|
104
|
-
data: HEADLINE,
|
|
105
|
-
},
|
|
106
|
-
],
|
|
53
|
+
blocks: [LINK_DOCS_ACCORDION_BLOCK],
|
|
107
54
|
},
|
|
108
55
|
],
|
|
109
56
|
};
|
|
110
57
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
label: 'Список документов в 2 колонки',
|
|
117
|
-
blocks: [
|
|
118
|
-
{
|
|
119
|
-
type: 'LinkDocs',
|
|
120
|
-
data: { ...LinkDocsFixtureSetOne, title: '' },
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: 'Список документов в одну колонку',
|
|
126
|
-
blocks: [
|
|
127
|
-
{
|
|
128
|
-
type: 'LinkDocs',
|
|
129
|
-
data: { ...LinkDocsFixtureSetTwo, title: '' },
|
|
130
|
-
},
|
|
131
|
-
],
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
label: 'Немного кастомизированный список',
|
|
135
|
-
blocks: [
|
|
136
|
-
{
|
|
137
|
-
type: 'LinkDocs',
|
|
138
|
-
data: LinkDocsFixtureSetThree,
|
|
139
|
-
},
|
|
140
|
-
],
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export default {
|
|
146
|
-
'with text block': <Accordion {...propsTextBlock} />,
|
|
147
|
-
'with link docs block': <Accordion {...propsLinkDocs} />,
|
|
148
|
-
};
|
|
58
|
+
export default (
|
|
59
|
+
<div className="container grid grid-cols-12">
|
|
60
|
+
<Accordion className="col-span-12" {...propsTextBlock} />
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
@@ -3,11 +3,9 @@ import { LinkDocs } from '../LinkDocs/LinkDocs';
|
|
|
3
3
|
import { PictureText } from '../PictureText/PictureText';
|
|
4
4
|
import { TextBlock } from '../TextBlock/TextBlock';
|
|
5
5
|
|
|
6
|
-
const AccordionBlocks = {
|
|
6
|
+
export const AccordionBlocks = {
|
|
7
7
|
Headline,
|
|
8
8
|
LinkDocs,
|
|
9
9
|
TextBlock,
|
|
10
10
|
PictureText,
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
export default AccordionBlocks;
|
|
@@ -2,41 +2,70 @@ import type { HeadlineContent } from '../Headline/HeadlineContent';
|
|
|
2
2
|
import type { LinkDocsContent } from '../LinkDocs/LinkDocsContent';
|
|
3
3
|
import type { PictureTextContent } from '../PictureText/PictureTextContent';
|
|
4
4
|
import type { TextBlockContent } from '../TextBlock/TextBlockContent';
|
|
5
|
-
import AccordionBlocks from './AccordionBlocks';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
|
-
* @
|
|
9
|
-
* @title Содержимое блока
|
|
7
|
+
* @title Тип блока
|
|
10
8
|
*/
|
|
11
|
-
export type
|
|
12
|
-
| HeadlineContent
|
|
13
|
-
| LinkDocsContent
|
|
14
|
-
| TextBlockContent
|
|
15
|
-
| PictureTextContent;
|
|
9
|
+
export type AccordionTypeBlock = 'Headline' | 'LinkDocs' | 'TextBlock' | 'PictureText';
|
|
16
10
|
|
|
17
11
|
/**
|
|
18
|
-
* @
|
|
19
|
-
* @title Тип блока
|
|
20
|
-
* @enumNames ["Заголовок", "Блок документов", Текстовый блок", "Картинка с текстом"]
|
|
12
|
+
* @title Заголовок
|
|
21
13
|
*/
|
|
22
|
-
export
|
|
14
|
+
export interface HeadlineAccordionBlock extends HeadlineContent {
|
|
15
|
+
/** @default Headline */
|
|
16
|
+
accordionBlockType: AccordionTypeBlock;
|
|
17
|
+
}
|
|
23
18
|
|
|
24
19
|
/**
|
|
25
|
-
*
|
|
20
|
+
* @title Список документов
|
|
26
21
|
*/
|
|
27
|
-
export interface
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
export interface LinkDocsAccordionBlock extends LinkDocsContent {
|
|
23
|
+
/** @default LinkDocs */
|
|
24
|
+
accordionBlockType: AccordionTypeBlock;
|
|
30
25
|
}
|
|
31
26
|
|
|
27
|
+
/**
|
|
28
|
+
* @title Текстовый блок
|
|
29
|
+
*/
|
|
30
|
+
export interface TextBlockAccordionBlock extends TextBlockContent {
|
|
31
|
+
/** @default TextBlock */
|
|
32
|
+
accordionBlockType: AccordionTypeBlock;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @title Картинка с текстом
|
|
37
|
+
*/
|
|
38
|
+
export interface PictureTextAccordionBlock extends PictureTextContent {
|
|
39
|
+
/** @default PictureText */
|
|
40
|
+
accordionBlockType: AccordionTypeBlock;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @title Выберите блок
|
|
45
|
+
*/
|
|
46
|
+
export type EmptyOption = null;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @title Содержимое аккордеона
|
|
50
|
+
*/
|
|
51
|
+
export type AccordionBlockProps =
|
|
52
|
+
| EmptyOption
|
|
53
|
+
| HeadlineAccordionBlock
|
|
54
|
+
| LinkDocsAccordionBlock
|
|
55
|
+
| TextBlockAccordionBlock
|
|
56
|
+
| PictureTextAccordionBlock;
|
|
57
|
+
|
|
32
58
|
/**
|
|
33
59
|
* @title Элемент списка
|
|
34
60
|
*/
|
|
35
61
|
export interface AccordionItemCommonProps {
|
|
36
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* @title Название
|
|
64
|
+
* @default Список
|
|
65
|
+
*/
|
|
37
66
|
label?: string;
|
|
38
67
|
/** @title Блоки */
|
|
39
|
-
blocks?:
|
|
68
|
+
blocks?: AccordionBlockProps[];
|
|
40
69
|
}
|
|
41
70
|
|
|
42
71
|
/**
|
|
@@ -3,8 +3,8 @@ import type { UniBlockProps } from '../../types';
|
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
4
|
import type { JSXBlock } from '../ContentPage/ContentPage';
|
|
5
5
|
import { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
6
|
-
import AccordionBlocks from './AccordionBlocks';
|
|
7
|
-
import type {
|
|
6
|
+
import { AccordionBlocks } from './AccordionBlocks';
|
|
7
|
+
import type { AccordionBlockProps, AccordionItemCommonProps } from './AccordionContent';
|
|
8
8
|
|
|
9
9
|
export interface AccordionItemProps extends AccordionItemCommonProps, UniBlockProps {}
|
|
10
10
|
|
|
@@ -13,8 +13,11 @@ export const AccordionItem = JSX<AccordionItemProps>(({ label, blocks, context }
|
|
|
13
13
|
const hasContent = blocks?.length;
|
|
14
14
|
const icon = isActive ? 'MinusIcon' : 'PlusIcon';
|
|
15
15
|
|
|
16
|
-
const handleToggle = (e) => {
|
|
17
|
-
if (!hasContent)
|
|
16
|
+
const handleToggle = (e: MouseEvent) => {
|
|
17
|
+
if (!hasContent) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
18
21
|
setIsActive(!isActive);
|
|
19
22
|
const contentBlock = getContentBlock(e);
|
|
20
23
|
contentBlock.style.maxHeight = contentBlock.style.maxHeight
|
|
@@ -51,18 +54,19 @@ export const AccordionItem = JSX<AccordionItemProps>(({ label, blocks, context }
|
|
|
51
54
|
);
|
|
52
55
|
});
|
|
53
56
|
|
|
54
|
-
const renderBlock = (block:
|
|
55
|
-
|
|
57
|
+
const renderBlock = (block: AccordionBlockProps, i: number, context: ContentPageContext) => {
|
|
58
|
+
const type = block?.accordionBlockType;
|
|
59
|
+
if (!type || !(type in AccordionBlocks)) {
|
|
56
60
|
return null;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
|
-
const AccordionBlock: JSXBlock = AccordionBlocks[
|
|
63
|
+
const AccordionBlock: JSXBlock = AccordionBlocks[type];
|
|
60
64
|
return (
|
|
61
65
|
<div className="mb-5 last:mb-0" key={`block_${i}`}>
|
|
62
|
-
<AccordionBlock context={context} {...block
|
|
66
|
+
<AccordionBlock context={context} {...block} />
|
|
63
67
|
</div>
|
|
64
68
|
);
|
|
65
69
|
};
|
|
66
70
|
|
|
67
|
-
const getContentBlock = (
|
|
68
|
-
|
|
71
|
+
const getContentBlock = ({ target }) =>
|
|
72
|
+
target.tagName === 'BUTTON' ? target.nextSibling : target.parentNode.nextSibling;
|
|
@@ -10,6 +10,11 @@ import { Title } from '../../ui-kit/Title/Title';
|
|
|
10
10
|
import { getColSpan } from '../../utils/getColSpan';
|
|
11
11
|
import type { AlignType, BaseTileCommonProps, BaseTileIconButton } from './BaseTileProps';
|
|
12
12
|
|
|
13
|
+
const alignFlex: Record<AlignType, string> = {
|
|
14
|
+
left: 'justify-between',
|
|
15
|
+
center: 'justify-center',
|
|
16
|
+
right: 'justify-end',
|
|
17
|
+
};
|
|
13
18
|
const alignBlock: Record<AlignType, string> = {
|
|
14
19
|
left: 'items-start',
|
|
15
20
|
center: 'items-center',
|
|
@@ -23,7 +28,7 @@ const alignText: Record<AlignType, string> = {
|
|
|
23
28
|
|
|
24
29
|
export interface BaseTileProps extends BaseTileCommonProps, UniBlockProps {}
|
|
25
30
|
|
|
26
|
-
const TITLE_CLASSES = 'font-medium m-0
|
|
31
|
+
const TITLE_CLASSES = 'font-medium m-0 whitespace-pre-wrap max-w-[600px]';
|
|
27
32
|
|
|
28
33
|
export const BaseTile = JSX<BaseTileProps>(
|
|
29
34
|
({
|
|
@@ -44,15 +49,18 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
44
49
|
return (
|
|
45
50
|
<div className={`font-sans flex flex-col grow h-full ${alignBlock[align]}`}>
|
|
46
51
|
{title && (
|
|
47
|
-
<Title
|
|
52
|
+
<Title
|
|
53
|
+
size={titleSize || getTitleSizeByClassName(className)}
|
|
54
|
+
className={`${TITLE_CLASSES} ${version === 'primary' ? 'text-primary-text' : ''}`}
|
|
55
|
+
>
|
|
48
56
|
{title}
|
|
49
57
|
</Title>
|
|
50
58
|
)}
|
|
51
|
-
<div className=
|
|
59
|
+
<div className={`flex grow w-full ${alignFlex[align]}`}>
|
|
52
60
|
<div className={`flex flex-col justify-between ${alignBlock[align]}`}>
|
|
53
61
|
<div>
|
|
54
62
|
{description ? (
|
|
55
|
-
<div className={`font-normal text-base max-w-[600px] ${alignText[align]}`}>
|
|
63
|
+
<div className={`font-normal text-base mt-4 max-w-[600px] ${alignText[align]}`}>
|
|
56
64
|
{description}
|
|
57
65
|
</div>
|
|
58
66
|
) : null}
|
|
@@ -74,7 +82,7 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
74
82
|
},
|
|
75
83
|
);
|
|
76
84
|
|
|
77
|
-
function getTitleSizeByClassName(className
|
|
85
|
+
function getTitleSizeByClassName(className = '') {
|
|
78
86
|
const colSpan = getColSpan(className);
|
|
79
87
|
if (colSpan <= 4) {
|
|
80
88
|
return 'S';
|
|
@@ -3,32 +3,35 @@ import { context } from '../../setup-fixture';
|
|
|
3
3
|
import { BenefitsBlock } from './BenefitsBlock';
|
|
4
4
|
|
|
5
5
|
export default (
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
6
|
+
<div className="container grid grid-cols-12">
|
|
7
|
+
<BenefitsBlock
|
|
8
|
+
context={context}
|
|
9
|
+
className="col-span-12"
|
|
10
|
+
title="Преимущества кредита"
|
|
11
|
+
benefits={[
|
|
12
|
+
{
|
|
13
|
+
label: 'Без комиссии',
|
|
14
|
+
description:
|
|
15
|
+
'Комиссия за выдачу кредита не взимается. Допускается полное или частичное погашение кредита',
|
|
16
|
+
icon: 'ClockIcon',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: 'Оформление по паспорту',
|
|
20
|
+
description: 'Обеспечение не требуется. Кредит можно получить на любые цели',
|
|
21
|
+
icon: 'SignDocsIcon',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: 'Без залога и поручительства',
|
|
25
|
+
description:
|
|
26
|
+
'Единовременное перечисление суммы кредита в полном объёме на текущий счет в Банке',
|
|
27
|
+
icon: 'ComfortableCompIcon',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Деньги за 3 дня',
|
|
31
|
+
description: 'Рассмотрение заявки с момента предоставления полного комплекта документов',
|
|
32
|
+
icon: 'ActualBalanceIcon',
|
|
33
|
+
},
|
|
34
|
+
]}
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
34
37
|
);
|
package/src/components/Blocks.ts
CHANGED
|
@@ -17,9 +17,9 @@ import { ProductGallery } from './ProductGallery/ProductGallery';
|
|
|
17
17
|
import { ProductTile } from './ProductTile/ProductTile';
|
|
18
18
|
import { PromoTile } from './PromoTile/PromoTile';
|
|
19
19
|
import { StepsBlock } from './StepsBlock/StepsBlock';
|
|
20
|
+
import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
20
21
|
import { TextBlock } from './TextBlock/TextBlock';
|
|
21
22
|
import { Tile } from './Tile/Tile';
|
|
22
|
-
import { TariffsTable } from './TariffsTable/TariffsTable';
|
|
23
23
|
|
|
24
24
|
export const Blocks = {
|
|
25
25
|
Accordion,
|