@redneckz/wildless-cms-uni-blocks 0.2.92 → 0.2.93
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 +79 -56
- 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/AccordionContent.d.ts +38 -14
- package/dist/components/Accordion/AccordionItem.js +8 -6
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/BaseTile/BaseTile.js +1 -1
- 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/ContentPageHead.d.ts +1 -1
- package/dist/components/CreditCalculator/CreditCalculator.js +1 -1
- 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/FooterContent.d.ts +1 -2
- package/dist/components/Footer/HorizontalNavigation.js +1 -1
- package/dist/components/Footer/SocialMedia.js +1 -2
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Gallery/GalleryInner.js +2 -2
- package/dist/components/Gallery/GalleryInner.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.mobile.js +3 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -4
- 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/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/ui-kit/InputRange/InputRange.js +1 -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/AccordionContent.d.ts +38 -14
- package/lib/components/Accordion/AccordionItem.js +8 -6
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- 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/ContentPageHead.d.ts +1 -1
- package/lib/components/CreditCalculator/CreditCalculator.js +1 -1
- 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/FooterContent.d.ts +1 -2
- package/lib/components/Footer/HorizontalNavigation.js +1 -1
- package/lib/components/Footer/SocialMedia.js +1 -2
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Gallery/GalleryInner.js +2 -2
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Headline/Headline.fixture.d.ts +3 -2
- package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +6 -6
- 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.mobile.js +3 -1
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -4
- 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/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/ui-kit/InputRange/InputRange.js +1 -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 -9
- package/src/api/LikeAPI.ts +1 -0
- package/src/components/Accordion/Accordion.example.json +18 -42
- package/src/components/Accordion/Accordion.fixture.tsx +29 -119
- package/src/components/Accordion/AccordionContent.ts +47 -18
- package/src/components/Accordion/AccordionItem.tsx +13 -9
- package/src/components/BaseTile/BaseTile.tsx +6 -3
- package/src/components/Blocks.ts +1 -1
- 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 +14 -7
- package/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +1 -1
- package/src/components/Footer/Contacts.tsx +1 -1
- package/src/components/Footer/FooterContent.ts +1 -1
- package/src/components/Footer/HorizontalNavigation.tsx +1 -1
- package/src/components/Footer/SocialMedia.tsx +5 -6
- package/src/components/Gallery/GalleryInner.tsx +2 -1
- package/src/components/Headline/Headline.fixture.tsx +11 -34
- package/src/components/LinkDocs/LinkDocs.fixture.tsx +14 -14
- package/src/components/LinkDocs/LinkDocs.tsx +8 -7
- package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/src/components/MobileBlocks.ts +0 -3
- package/src/components/PictureText/PictureText.fixture.tsx +20 -20
- package/src/components/PictureText/PictureTextContent.ts +1 -3
- package/src/components/Placeholder/Placeholder.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +1 -0
- package/src/components/ProductBlock/ProductBlockInner.tsx +8 -11
- package/src/components/ProductGallery/ProductGallery.example.json +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +7 -13
- package/src/components/ProductGallery/ProductGallery.tsx +7 -5
- package/src/components/PromoTile/PromoTile.tsx +3 -3
- package/src/components/TariffsTable/TariffsTable.example.json +3 -1
- package/src/components/TariffsTable/TariffsTable.fixture.tsx +3 -0
- package/src/components/TariffsTable/TariffsTable.tsx +39 -37
- package/src/components/TariffsTable/TariffsTableCell.tsx +4 -4
- package/src/components/TextBlock/TextBlock.example.json +9 -2
- package/src/components/TextBlock/TextBlock.fixture.tsx +20 -64
- package/src/components/TextBlock/TextBlockContent.ts +1 -2
- package/src/components/Tile/Tile.example.json +5 -2
- 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/ui-kit/InputRange/InputRange.tsx +2 -2
- package/src/ui-kit/SearchBar.tsx +16 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"AccordionBlock":{"description":"Блок","type":"object"},"AccordionContent":{"properties":{"accordionItems":{"items":{"$ref":"#/definitions/AccordionItemCommonProps"},"title":"Список","type":"array"},"title":{"title":"Заголовок","type":"string"}},"title":"Аккордеон","type":"object"},"AccordionItemCommonProps":{"properties":{"blocks":{"items":{"$ref":"#/definitions/AccordionBlock"},"title":"Блоки","type":"array"},"label":{"title":"Название","type":"string"}},"title":"Элемент списка","type":"object"},"AlignType":{"enum":["left","center","right"],"enumNames":["По левому краю","По центру","По правому краю"],"title":"Выравнивание","type":"string"},"BaseTileCommonProps":{"properties":{"align":{"$ref":"#/definitions/AlignType"},"buttons":{"items":{"$ref":"#/definitions/BaseTileIconButton"},"maxItems":4,"title":"Кнопки","type":"array"},"description":{"title":"Описание","type":"string"},"image":{"$ref":"#/definitions/Picture"},"items":{"items":{"type":"string"},"title":"Список","type":"array"},"title":{"title":"Заголовок","type":"string"},"titleSize":{"$ref":"#/definitions/TitleSize","default":"M","title":"Размер заголовка"},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Плитка","type":"object"},"BaseTileIconButton":{"properties":{"aboveText":{"title":"Верхний текст","type":"string"},"href":{"title":"URL (href)","type":"string"},"icon":{"$ref":"#/definitions/IconName"},"target":{"$ref":"#/definitions/Target"},"text":{"title":"Текст","type":"string"},"version":{"$ref":"#/definitions/ButtonVersion"}},"type":"object"},"Benefit":{"properties":{"description":{"title":"Описание","type":"string"},"icon":{"$ref":"#/definitions/IconName"},"label":{"title":"Название","type":"string"}},"title":"Преимущество","type":"object"},"BenefitsBlockContent":{"properties":{"benefits":{"items":{"$ref":"#/definitions/Benefit"},"maxItems":6,"title":"Список преимуществ","type":"array"},"title":{"title":"Заголовок","type":"string"}},"title":"Блок преимущества","type":"object"},"BlockItemVersion":{"enum":["primary","secondary"],"title":"Версия списка","type":"string"},"BlockVersion":{"enum":["primary","secondary"],"enumNames":["Основная","Второстепенная"],"title":"Цвет плитки","type":"string"},"ButtonProps":{"properties":{"href":{"title":"URL (href)","type":"string"},"target":{"$ref":"#/definitions/Target"},"text":{"title":"Текст","type":"string"},"version":{"$ref":"#/definitions/ButtonVersion"}},"type":"object"},"ButtonVersion":{"enum":["primary","secondary"],"enumNames":["Основная","Второстепенная"],"title":"Цвет кнопки","type":"string"},"ButtonWithIconProps":{"properties":{"aboveText":{"title":"Верхний текст","type":"string"},"href":{"title":"URL (href)","type":"string"},"target":{"$ref":"#/definitions/Target"},"text":{"title":"Текст","type":"string"},"version":{"$ref":"#/definitions/ButtonVersion"}},"type":"object"},"CalculatorParams":{"properties":{"isAnnuity":{"type":"boolean"},"maxMonths":{"type":"number"},"maxSum":{"type":"number"},"minMonths":{"type":"number"},"minSum":{"type":"number"},"rateWithInsurance":{"type":"number"},"rateWithoutInsurance":{"type":"number"}},"type":"object"},"CellData":{"properties":{"description":{"title":"Описание","type":"string"},"label":{"title":"Заголовок","type":"string"}},"title":"Ячейка","type":"object"},"Column":{"properties":{"data":{"items":{"items":{"$ref":"#/definitions/CellData"},"type":"array"},"title":"Данные","type":"array"},"header":{"$ref":"#/definitions/ColumnHeader"}},"title":"Продукт","type":"object"},"ColumnHeader":{"properties":{"icon":{"$ref":"#/definitions/IconName"},"link":{"$ref":"#/definitions/LinkProps"},"title":{"title":"Заголовок","type":"string"}},"title":"Шапка колонки","type":"object"},"ComparisonTableContent":{"properties":{"columns":{"items":{"$ref":"#/definitions/Column"},"title":"Продукты","type":"array"},"isColoredFirstColumn":{"title":"Закрасить первую колонку","type":"boolean"},"rowHeaders":{"items":{"$ref":"#/definitions/RowHeader"},"title":"Параметры","type":"array"},"title":{"title":"Заголовок","type":"string"},"visibleRowLength":{"title":"Отображать заданное количество строк","type":"number"}},"title":"Сравнительная таблица","type":"object"},"ContactInfo":{"properties":{"description":{"title":"Описание","type":"string"},"text":{"title":"Текст","type":"string"},"type":{"$ref":"#/definitions/ContactType"}},"title":"Контакт","type":"object"},"ContactType":{"enum":["tel","email"],"enumNames":["Телефон","Почта"],"title":"Тип контакта","type":"string"},"CreditCalculatorContent":{"properties":{"directoryName":{"title":"Справочник","type":"string"}},"title":"Кредитный калькулятор","type":"object"},"CreditCalculatorData":{"properties":{"rows":{"items":{"$ref":"#/definitions/CalculatorParams"},"type":"array"}},"type":"object"},"ExchangeRateTileContent":{"properties":{"title":{"title":"Заголовок","type":"string"}},"title":"Курсы валют","type":"object"},"FooterContent":{"properties":{"contacts":{"items":{"$ref":"#/definitions/ContactInfo"},"title":"Контакты","type":"array"},"documents":{"items":{"$ref":"#/definitions/LinkProps"},"title":"Обязательные документы","type":"array"},"relatedEnterprises":{"items":{"$ref":"#/definitions/LinkProps"},"title":"Другие предприятия","type":"array"},"socialMedia":{"items":{"$ref":"#/definitions/SocialMedia"},"title":"Социальные сети","type":"array"},"topItems":{"items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню","type":"array"}},"required":["topItems"],"title":"Подвал","type":"object"},"GalleryCard":{"properties":{"description":{"title":"Описание","type":"string"},"href":{"title":"Ссылка","type":"string"},"image":{"$ref":"#/definitions/Picture"},"items":{"items":{"type":"string"},"title":"Список","type":"array"},"title":{"title":"Заголовок","type":"string"}},"title":"Карточка","type":"object"},"GalleryContent":{"properties":{"cards":{"items":{"$ref":"#/definitions/GalleryCard"},"title":"Карточки","type":"array"},"description":{"title":"Описание","type":"string"},"title":{"title":"Заголовок","type":"string"}},"title":"Галерея","type":"object"},"HeaderContent":{"properties":{"defaultLocation":{"default":"Москва","title":"Город по-умолчанию","type":"string"},"topItems":{"items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню","type":"array"}},"required":["defaultLocation","topItems"],"title":"Шапка","type":"object"},"HeadlineBgColor":{"enum":["transparent","bg-white"],"enumNames":["Прозрачный","Белый"],"title":"Цвет фона","type":"string"},"HeadlineContent":{"properties":{"align":{"$ref":"#/definitions/AlignType"},"bgColor":{"$ref":"#/definitions/HeadlineBgColor"},"description":{"title":"Описание","type":"string"},"title":{"title":"Заголовок","type":"string"},"titleSize":{"$ref":"#/definitions/TitleSize","default":"M","title":"Размер заголовка"}},"title":"Заголовок","type":"object"},"IconName":{"enum":["ActualBalanceIcon","AppleIcon","CalendarCircleIcon","CalendarIcon","CardIcon","CardPosIcon","CardTickIcon","ClockIcon","ComfortableCompIcon","DiscountShape","DocIcon","DocumentText","DollarIcon","EmptyWalletChangeIcon","EmptyWalletIcon","EuroIcon","GlassIcon","GridIcon","JCBIcon","LoupeIcon","MasterCardIcon","MinusIcon","MirIcon","MoneyIcon","MonitorMobileIcon","NewDocIcon","OkIcon","PassSendIcon","PercentageSquareIcon","PlayMarketIcon","PlusIcon","Profile2UserIcon","ProfileIcon","ShieldTickIcon","SignDocsIcon","TelegramIcon","UnionPayIcon","UserIcon","VisaIcon","VKIcon","WalletIcon"],"enumNames":["Деньги","Лого «Apple»","Скруглённый календарь","Календарь","Кред. карта","Кред. карта под наклоном","Кред. карта с галочкой","Часы","Кресло","Скидка","Документ","Документ с текстом","Доллар","Пустой кошелёк с возвратом","Пустой кошелёк","Евро","Зеркало","Сетка","JCB","Лупа","MasterCard","Минус","МИР","Деньги","Монитор и мобильный","Новый документ","Лого «Одноклассники»","Бизнес","Проценты","Лого «PlayMarket»","Плюс","Профиль, 2 персоны","Профиль","Безопасность","Подписанные документы","Лого «Telegram»","UnionPay","Пользователь","Visa","Лого «VK»","Кошелёк"],"title":"Иконка","type":"string"},"Img":{"properties":{"alt":{"title":"Альтернативный текст (alt)","type":"string"},"src":{"title":"Картинка","type":"string"},"title":{"title":"Текст подсказки (title)","type":"string"}},"required":["src"],"type":"object"},"ImgSource":{"properties":{"format":{"enum":["jpeg","jpg","png","gif","webp","heif","avif"],"title":"Формат","type":"string"},"size":{"properties":{"height":{"title":"Высота","type":"number"},"width":{"title":"Ширина","type":"number"}},"title":"Размер изображения","type":"object"},"src":{"title":"Картинка","type":"string"}},"required":["src"],"type":"object"},"LinkColumnsMode":{"enum":["single","double"],"title":"Режим отображения списка","type":"string"},"LinkDocsContent":{"properties":{"align":{"$ref":"#/definitions/AlignType"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"},"documents":{"items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список","type":"array"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"title":{"title":"Заголовок","type":"string"}},"title":"Список документов","type":"object"},"LinkDocsItem":{"properties":{"fileSize":{"title":"размер файла","type":"string"},"href":{"title":"URL (href)","type":"string"},"target":{"$ref":"#/definitions/Target"},"text":{"title":"Текст","type":"string"}},"title":"Элемент списка","type":"object"},"LinkProps":{"properties":{"href":{"title":"URL (href)","type":"string"},"target":{"$ref":"#/definitions/Target"},"text":{"title":"Текст","type":"string"}},"required":["text","href"],"title":"Ссылка","type":"object"},"MiniGalleryContent":{"properties":{"cards":{"items":{"$ref":"#/definitions/GalleryCard"},"title":"Карточки","type":"array"},"description":{"title":"Описание","type":"string"},"title":{"title":"Заголовок","type":"string"}},"title":"Мини-галерея","type":"object"},"MobileAppTileContent":{"properties":{"buttons":{"items":{"$ref":"#/definitions/BaseTileIconButton"},"maxItems":4,"title":"Кнопки","type":"array"},"qr":{"$ref":"#/definitions/QRCode"},"title":{"title":"Заголовок","type":"string"}},"title":"Мобильное приложение","type":"object"},"Picture":{"properties":{"alt":{"title":"Альтернативный текст (alt)","type":"string"},"format":{"enum":["jpeg","jpg","png","gif","webp","heif","avif"],"title":"Формат","type":"string"},"size":{"properties":{"height":{"title":"Высота","type":"number"},"width":{"title":"Ширина","type":"number"}},"title":"Размер изображения","type":"object"},"sources":{"items":{"$ref":"#/definitions/ImgSource"},"title":"Другие форматы","type":"array"},"src":{"title":"Картинка","type":"string"},"title":{"title":"Текст подсказки (title)","type":"string"}},"required":["src"],"title":"Изображение","type":"object"},"PictureTextContent":{"properties":{"benefits":{"items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ","type":"array"},"image":{"$ref":"#/definitions/Picture"},"title":{"title":"Заголовок","type":"string"}},"title":"Картинка с текстом","type":"object"},"ProductBlockContent":{"properties":{"align":{"$ref":"#/definitions/AlignType"},"benefits":{"items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","type":"array"},"breadcrumbs":{"items":{"$ref":"#/definitions/LinkProps"},"title":"Хлебные крошки","type":"array"},"buttons":{"items":{"$ref":"#/definitions/BaseTileIconButton"},"maxItems":4,"title":"Кнопки","type":"array"},"description":{"title":"Описание","type":"string"},"image":{"$ref":"#/definitions/Picture"},"items":{"items":{"type":"string"},"title":"Список","type":"array"},"title":{"title":"Заголовок","type":"string"},"titleSize":{"$ref":"#/definitions/TitleSize","default":"M","title":"Размер заголовка"},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Продуктовый блок","type":"object"},"ProductBlockInnerCommonProps":{"properties":{"align":{"$ref":"#/definitions/AlignType"},"benefits":{"items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","type":"array"},"buttons":{"items":{"$ref":"#/definitions/BaseTileIconButton"},"maxItems":4,"title":"Кнопки","type":"array"},"description":{"title":"Описание","type":"string"},"image":{"$ref":"#/definitions/Picture"},"items":{"items":{"type":"string"},"title":"Список","type":"array"},"title":{"title":"Заголовок","type":"string"},"titleSize":{"$ref":"#/definitions/TitleSize","default":"M","title":"Размер заголовка"},"version":{"$ref":"#/definitions/BlockVersion"}},"type":"object"},"ProductGalleryContent":{"properties":{"slides":{"items":{"$ref":"#/definitions/ProductSlide"},"title":"Слайды","type":"array"}},"title":"Продуктовая галерея","type":"object"},"ProductSlide":{"properties":{"nav":{"properties":{"desc":{"title":"Описание","type":"string"},"title":{"title":"Заголовок","type":"string"}},"required":["title","desc"],"title":"Кнопка под слайдом","type":"object"},"productBlock":{"$ref":"#/definitions/ProductBlockInnerCommonProps","title":"Содержимое слайда"}},"required":["nav","productBlock"],"title":"Слайд","type":"object"},"ProductTileContent":{"properties":{"align":{"$ref":"#/definitions/AlignType"},"benefits":{"items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","type":"array"},"buttons":{"items":{"$ref":"#/definitions/BaseTileIconButton"},"maxItems":4,"title":"Кнопки","type":"array"},"description":{"title":"Описание","type":"string"},"image":{"$ref":"#/definitions/Picture"},"items":{"items":{"type":"string"},"title":"Список","type":"array"},"title":{"title":"Заголовок","type":"string"},"titleSize":{"$ref":"#/definitions/TitleSize","default":"M","title":"Размер заголовка"},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Продуктовая плитка","type":"object"},"PromoTileContent":{"properties":{"align":{"$ref":"#/definitions/AlignType"},"buttons":{"items":{"$ref":"#/definitions/BaseTileIconButton"},"maxItems":4,"title":"Кнопки","type":"array"},"date":{"title":"Дата публикации","type":"string"},"description":{"title":"Описание","type":"string"},"image":{"$ref":"#/definitions/Picture"},"items":{"items":{"type":"string"},"title":"Список","type":"array"},"title":{"title":"Заголовок","type":"string"},"titleSize":{"$ref":"#/definitions/TitleSize","default":"M","title":"Размер заголовка"},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Акции","type":"object"},"QRCode":{"properties":{"href":{"title":"Ссылка","type":"string"},"src":{"title":"QR код","type":"string"}},"title":"QR код","type":"object"},"RowHeader":{"properties":{"title":{"title":"Заголовок","type":"string"}},"title":"Параметр","type":"object"},"SitemapProps":{"properties":{"topItems":{"items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню","type":"array"}},"type":"object"},"SocialMedia":{"properties":{"href":{"title":"URL (href)","type":"string"},"target":{"$ref":"#/definitions/Target"}},"required":["href"],"type":"object"},"Step":{"properties":{"description":{"title":"Описание","type":"string"},"icon":{"$ref":"#/definitions/IconName"},"label":{"title":"Название","type":"string"}},"required":["label"],"title":"Шаг","type":"object"},"StepsBlockContent":{"properties":{"steps":{"items":{"$ref":"#/definitions/Step"},"maxItems":6,"title":"Шаги","type":"array"},"title":{"title":"Заголовок","type":"string"}},"title":"Блок шаги","type":"object"},"Target":{"enum":["_blank","_self","_parent","_top"],"enumNames":["self (текущее окно или фрейм)","blank (новое окно)","parent (фрейм-родитель)","top (текущее окно)"],"title":"Таргет (target)","type":"string"},"TariffsTableCellData":{"properties":{"buttons":{"items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","type":"array"},"description":{"title":"Описание","type":"string"},"image":{"$ref":"#/definitions/Picture"},"label":{"title":"Заголовок","type":"string"},"list":{"$ref":"#/definitions/TariffsTableList"}},"title":"Ячейка","type":"object"},"TariffsTableColumn":{"properties":{"data":{"items":{"items":{"$ref":"#/definitions/TariffsTableCellData"},"type":"array"},"title":"Данные","type":"array"}},"title":"Колонка","type":"object"},"TariffsTableContent":{"properties":{"columns":{"items":{"$ref":"#/definitions/TariffsTableColumn"},"title":"Колонки","type":"array"},"rowHeaders":{"items":{"$ref":"#/definitions/TariffsTableRowHeader"},"title":"Параметры","type":"array"},"title":{"title":"Заголовок","type":"string"}},"title":"Таблица тарифов","type":"object"},"TariffsTableList":{"properties":{"isDotted":{"title":"Маркеры","type":"boolean"},"items":{"items":{"type":"string"},"title":"Элементы списка","type":"array"},"version":{"$ref":"#/definitions/BlockItemVersion"}},"title":"Список","type":"object"},"TariffsTableRowData":{"properties":{"data":{"items":{"items":{"$ref":"#/definitions/TariffsTableCellData"},"type":"array"},"type":"array"},"header":{"$ref":"#/definitions/TariffsTableRowHeader"}},"required":["header","data"],"title":"Ряд","type":"object"},"TariffsTableRowHeader":{"properties":{"icon":{"$ref":"#/definitions/IconName"},"title":{"title":"Заголовок","type":"string"}},"title":"Параметр","type":"object"},"TextBlockContent":{"properties":{"blockVersion":{"$ref":"#/definitions/TextBlockVersion"},"description":{"title":"Описание","type":"string"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"image":{"$ref":"#/definitions/Picture"},"title":{"title":"Заголовок","type":"string"}},"title":"Текстовый блок","type":"object"},"TextBlockIconVersion":{"enum":["none","small","big"],"enumNames":["Нет","Маленькая","Большая"],"title":"Размер иконки","type":"string"},"TextBlockVersion":{"enum":["primary","secondary","secondary-light"],"enumNames":["Основная","Второстепенная","Второстепенная прозрачная"],"title":"Цвет плитки","type":"string"},"TileContent":{"$ref":"#/definitions/BaseTileCommonProps","title":"Плитка"},"TitleSize":{"enum":["XL","L","M","S"],"type":"string"},"TopMenuItem":{"properties":{"href":{"title":"URL (href)","type":"string"},"target":{"$ref":"#/definitions/Target"},"text":{"title":"Текст","type":"string"}},"required":["text","href"],"title":"Ссылка","type":"object"}}}
|
|
1
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"HeadlineBgColor":{"type":"string","enum":["transparent","bg-white"],"title":"Цвет фона","enumNames":["Прозрачный","Белый"]},"HeadlineContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"align":{"$ref":"#/definitions/AlignType"},"bgColor":{"$ref":"#/definitions/HeadlineBgColor"}},"title":"Заголовок"},"TitleSize":{"type":"string","enum":["XL","L","M","S"]},"AlignType":{"type":"string","enum":["left","center","right"],"title":"Выравнивание","enumNames":["По левому краю","По центру","По правому краю"]},"LinkColumnsMode":{"type":"string","enum":["single","double"],"title":"Режим отображения списка"},"LinkDocsItem":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"},"fileSize":{"type":"string","title":"размер файла"}},"title":"Элемент списка"},"LinkProps":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Ссылка","required":["text","href"]},"Target":{"type":"string","enum":["_blank","_self","_parent","_top"],"title":"Таргет (target)","enumNames":["self (текущее окно или фрейм)","blank (новое окно)","parent (фрейм-родитель)","top (текущее окно)"]},"LinkDocsContent":{"type":"object","properties":{"align":{"$ref":"#/definitions/AlignType"},"title":{"type":"string","title":"Заголовок"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"}},"title":"Список документов"},"IconName":{"type":"string","enum":["ActualBalanceIcon","AppleIcon","CalendarCircleIcon","CalendarIcon","CardIcon","CardPosIcon","CardTickIcon","ClockIcon","ComfortableCompIcon","DiscountShape","DocIcon","DocumentText","DollarIcon","EmptyWalletChangeIcon","EmptyWalletIcon","EuroIcon","GlassIcon","GridIcon","JCBIcon","LoupeIcon","MasterCardIcon","MinusIcon","MirIcon","MoneyIcon","MonitorMobileIcon","NewDocIcon","OkIcon","PassSendIcon","PercentageSquareIcon","PlayMarketIcon","PlusIcon","Profile2UserIcon","ProfileIcon","ShieldTickIcon","SignDocsIcon","TelegramIcon","UnionPayIcon","UserIcon","VisaIcon","VKIcon","WalletIcon"],"title":"Иконка","enumNames":["Деньги","Лого «Apple»","Скруглённый календарь","Календарь","Кред. карта","Кред. карта под наклоном","Кред. карта с галочкой","Часы","Кресло","Скидка","Документ","Документ с текстом","Доллар","Пустой кошелёк с возвратом","Пустой кошелёк","Евро","Зеркало","Сетка","JCB","Лупа","MasterCard","Минус","МИР","Деньги","Монитор и мобильный","Новый документ","Лого «Одноклассники»","Бизнес","Проценты","Лого «PlayMarket»","Плюс","Профиль, 2 персоны","Профиль","Безопасность","Подписанные документы","Лого «Telegram»","UnionPay","Пользователь","Visa","Лого «VK»","Кошелёк"]},"Benefit":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Преимущество"},"BenefitsBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ","maxItems":6}},"title":"Блок преимущества"},"PictureTextContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ"}},"title":"Картинка с текстом"},"Picture":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"format":{"type":"string","enum":["jpeg","jpg","png","gif","webp","heif","avif"],"title":"Формат"},"size":{"type":"object","properties":{"width":{"type":"number","title":"Ширина"},"height":{"type":"number","title":"Высота"}},"title":"Размер изображения"},"alt":{"type":"string","title":"Альтернативный текст (alt)"},"title":{"type":"string","title":"Текст подсказки (title)"},"sources":{"type":"array","items":{"$ref":"#/definitions/ImgSource"},"title":"Другие форматы"}},"required":["src"],"title":"Изображение"},"Img":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"alt":{"type":"string","title":"Альтернативный текст (alt)"},"title":{"type":"string","title":"Текст подсказки (title)"}},"required":["src"]},"ImgSource":{"type":"object","properties":{"src":{"type":"string","title":"Картинка"},"format":{"type":"string","enum":["jpeg","jpg","png","gif","webp","heif","avif"],"title":"Формат"},"size":{"type":"object","properties":{"width":{"type":"number","title":"Ширина"},"height":{"type":"number","title":"Высота"}},"title":"Размер изображения"}},"required":["src"]},"TextBlockVersion":{"type":"string","enum":["primary","secondary","secondary-light"],"title":"Цвет плитки","enumNames":["Основная","Второстепенная","Второстепенная прозрачная"]},"TextBlockIconVersion":{"type":"string","enum":["none","small","big"],"title":"Размер иконки","enumNames":["Нет","Маленькая","Большая"]},"TextBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"image":{"$ref":"#/definitions/Picture"},"blockVersion":{"$ref":"#/definitions/TextBlockVersion"}},"title":"Текстовый блок"},"AccordionTypeBlock":{"type":"string","enum":["Headline","LinkDocs","TextBlock","PictureText"],"title":"Тип блока"},"HeadlineAccordionBlock":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"align":{"$ref":"#/definitions/AlignType"},"bgColor":{"$ref":"#/definitions/HeadlineBgColor"},"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"Headline"}},"required":["accordionBlockType"],"title":"Заголовок"},"LinkDocsAccordionBlock":{"type":"object","properties":{"align":{"$ref":"#/definitions/AlignType"},"title":{"type":"string","title":"Заголовок"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"},"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"LinkDocs"}},"required":["accordionBlockType"],"title":"Список документов"},"TextBlockAccordionBlock":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"image":{"$ref":"#/definitions/Picture"},"blockVersion":{"$ref":"#/definitions/TextBlockVersion"},"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"TextBlock"}},"required":["accordionBlockType"],"title":"Текстовый блок"},"PictureTextAccordionBlock":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ"},"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"PictureText"}},"required":["accordionBlockType"],"title":"Картинка с текстом"},"EmptyOption":{"type":"null","title":"Выберите блок"},"AccordionBlockProps":{"anyOf":[{"$ref":"#/definitions/EmptyOption"},{"$ref":"#/definitions/HeadlineAccordionBlock"},{"$ref":"#/definitions/LinkDocsAccordionBlock"},{"$ref":"#/definitions/TextBlockAccordionBlock"},{"$ref":"#/definitions/PictureTextAccordionBlock"}],"title":"Содержимое аккордеона"},"AccordionItemCommonProps":{"type":"object","properties":{"label":{"type":"string","title":"Название","default":"Список"},"blocks":{"type":"array","items":{"$ref":"#/definitions/AccordionBlockProps"},"title":"Блоки"}},"title":"Элемент списка"},"AccordionContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"accordionItems":{"type":"array","items":{"$ref":"#/definitions/AccordionItemCommonProps"},"title":"Список"}},"title":"Аккордеон"},"CellData":{"type":"object","properties":{"label":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"}},"title":"Ячейка"},"ColumnHeader":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"icon":{"$ref":"#/definitions/IconName"},"link":{"$ref":"#/definitions/LinkProps"}},"title":"Шапка колонки"},"Column":{"type":"object","properties":{"header":{"$ref":"#/definitions/ColumnHeader"},"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/CellData"}},"title":"Данные"}},"title":"Продукт"},"RowHeader":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"}},"title":"Параметр"},"ComparisonTableContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"rowHeaders":{"type":"array","items":{"$ref":"#/definitions/RowHeader"},"title":"Параметры"},"columns":{"type":"array","items":{"$ref":"#/definitions/Column"},"title":"Продукты"},"visibleRowLength":{"type":"number","title":"Отображать заданное количество строк"},"isColoredFirstColumn":{"type":"boolean","title":"Закрасить первую колонку"}},"title":"Сравнительная таблица"},"ExchangeRateTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"}},"title":"Курсы валют"},"ContactType":{"type":"string","enum":["tel","email"],"title":"Тип контакта","enumNames":["Телефон","Почта"]},"ContactInfo":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"type":{"$ref":"#/definitions/ContactType"},"description":{"type":"string","title":"Описание"}},"title":"Контакт"},"SocialMedia":{"type":"object","properties":{"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"required":["href"]},"FooterContent":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Обязательные документы"},"relatedEnterprises":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Другие предприятия"},"contacts":{"type":"array","items":{"$ref":"#/definitions/ContactInfo"},"title":"Контакты"},"socialMedia":{"type":"array","items":{"$ref":"#/definitions/SocialMedia"},"title":"Социальные сети"}},"title":"Подвал","required":["topItems"]},"SitemapProps":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"}}},"TopMenuItem":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Ссылка","required":["text","href"]},"GalleryCard":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"href":{"type":"string","title":"Ссылка"},"items":{"type":"array","items":{"type":"string"},"title":"Список"}},"title":"Карточка"},"GalleryContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"cards":{"type":"array","items":{"$ref":"#/definitions/GalleryCard"},"title":"Карточки"}},"title":"Галерея"},"HeaderContent":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"},"defaultLocation":{"type":"string","title":"Город по-умолчанию","default":"Москва"}},"title":"Шапка","required":["defaultLocation","topItems"]},"QRCode":{"type":"object","properties":{"src":{"type":"string","title":"QR код"},"href":{"type":"string","title":"Ссылка"}},"title":"QR код"},"MobileAppTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"qr":{"$ref":"#/definitions/QRCode"}},"title":"Мобильное приложение"},"BaseTileIconButton":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"},"version":{"$ref":"#/definitions/ButtonVersion"},"aboveText":{"type":"string","title":"Верхний текст"},"icon":{"$ref":"#/definitions/IconName"}}},"ButtonWithIconProps":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"},"version":{"$ref":"#/definitions/ButtonVersion"},"aboveText":{"type":"string","title":"Верхний текст"}}},"ButtonProps":{"type":"object","properties":{"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"},"version":{"$ref":"#/definitions/ButtonVersion"}}},"ButtonVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет кнопки","enumNames":["Основная","Второстепенная"]},"ProductBlockInnerCommonProps":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"},"align":{"$ref":"#/definitions/AlignType"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества"}}},"BaseTileCommonProps":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"},"align":{"$ref":"#/definitions/AlignType"}},"title":"Плитка"},"BlockVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет плитки","enumNames":["Основная","Второстепенная"]},"ProductBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"},"align":{"$ref":"#/definitions/AlignType"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества"},"breadcrumbs":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Хлебные крошки"}},"title":"Продуктовый блок"},"ProductSlide":{"type":"object","properties":{"nav":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"desc":{"type":"string","title":"Описание"}},"required":["title","desc"],"title":"Кнопка под слайдом"},"productBlock":{"$ref":"#/definitions/ProductBlockInnerCommonProps","title":"Содержимое слайда"}},"required":["nav","productBlock"],"title":"Слайд"},"ProductGalleryContent":{"type":"object","properties":{"slides":{"type":"array","items":{"$ref":"#/definitions/ProductSlide"},"title":"Слайды"}},"title":"Продуктовая галерея"},"ProductTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"},"align":{"$ref":"#/definitions/AlignType"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества"}},"title":"Продуктовая плитка"},"PromoTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"},"align":{"$ref":"#/definitions/AlignType"},"date":{"type":"string","title":"Дата публикации"}},"title":"Акции"},"Step":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"},"icon":{"$ref":"#/definitions/IconName"}},"required":["label"],"title":"Шаг"},"StepsBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"steps":{"type":"array","items":{"$ref":"#/definitions/Step"},"title":"Шаги","maxItems":6}},"title":"Блок шаги"},"TileContent":{"$ref":"#/definitions/BaseTileCommonProps","title":"Плитка"},"TariffsTableRowData":{"type":"object","properties":{"header":{"$ref":"#/definitions/TariffsTableRowHeader"},"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/TariffsTableCellData"}}}},"required":["header","data"],"title":"Ряд"},"TariffsTableRowHeader":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"icon":{"$ref":"#/definitions/IconName"}},"title":"Параметр"},"TariffsTableCellData":{"type":"object","properties":{"label":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"list":{"$ref":"#/definitions/TariffsTableList"},"image":{"$ref":"#/definitions/Picture"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки"}},"title":"Ячейка"},"TariffsTableList":{"type":"object","properties":{"version":{"$ref":"#/definitions/BlockItemVersion"},"isDotted":{"type":"boolean","title":"Маркеры"},"items":{"type":"array","items":{"type":"string"},"title":"Элементы списка"}},"title":"Список"},"BlockItemVersion":{"type":"string","enum":["primary","secondary"],"title":"Версия списка"},"TariffsTableColumn":{"type":"object","properties":{"data":{"type":"array","items":{"type":"array","items":{"$ref":"#/definitions/TariffsTableCellData"}},"title":"Данные"}},"title":"Колонка"},"TariffsTableContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"columns":{"type":"array","items":{"$ref":"#/definitions/TariffsTableColumn"},"title":"Колонки"},"rowHeaders":{"type":"array","items":{"$ref":"#/definitions/TariffsTableRowHeader"},"title":"Параметры"}},"title":"Таблица тарифов"},"CalculatorParams":{"type":"object","properties":{"isAnnuity":{"type":"boolean"},"minSum":{"type":"number"},"maxSum":{"type":"number"},"minMonths":{"type":"number"},"maxMonths":{"type":"number"},"rateWithInsurance":{"type":"number"},"rateWithoutInsurance":{"type":"number"}}},"CreditCalculatorData":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/definitions/CalculatorParams"}}}},"CreditCalculatorContent":{"type":"object","properties":{"directoryName":{"type":"string","title":"Справочник"}},"title":"Кредитный калькулятор"},"MiniGalleryContent":{"$ref":"#/definitions/GalleryContent","title":"Мини-галерея"}}}
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
const AUTH_PREFIX = 'guest';
|
|
73
73
|
const STORAGE_KEY = 'likesToken';
|
|
74
|
+
// eslint-disable-next-line max-lines-per-function
|
|
74
75
|
function LikeAPI(projectId, baseURL = '') {
|
|
75
76
|
async function getLikeCount(...nodeIds) {
|
|
76
77
|
if (!nodeIds.length) {
|
|
@@ -283,7 +284,7 @@
|
|
|
283
284
|
toRelativeHref: toRelativeHref
|
|
284
285
|
});
|
|
285
286
|
|
|
286
|
-
const defaultHandlerDecorator = (handler
|
|
287
|
+
const defaultHandlerDecorator = (handler) => handler;
|
|
287
288
|
function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
|
|
288
289
|
const href = adjustHref(link.href, router);
|
|
289
290
|
return {
|
|
@@ -362,7 +363,7 @@
|
|
|
362
363
|
const BaseTile = JSX(({ className, context, title, titleSize, description, children, buttons, image, items, version = 'primary', align = 'left', }) => {
|
|
363
364
|
const router = context.useRouter();
|
|
364
365
|
const { handlerDecorator } = context;
|
|
365
|
-
return (jsxs("div", { className: `font-sans flex flex-col grow h-full ${alignBlock[align]}`, children: [title && (jsx(Title, { size: titleSize || getTitleSizeByClassName(className), className: TITLE_CLASSES
|
|
366
|
+
return (jsxs("div", { className: `font-sans flex flex-col grow h-full ${alignBlock[align]}`, children: [title && (jsx(Title, { size: titleSize || getTitleSizeByClassName(className), className: `${TITLE_CLASSES} ${version === 'primary' ? 'text-primary-text' : ''}`, children: title })), jsxs("div", { className: "flex grow justify-between w-full", children: [jsxs("div", { className: `flex flex-col justify-between ${alignBlock[align]}`, children: [jsxs("div", { children: [description ? (jsx("div", { className: `font-normal text-base max-w-[600px] ${alignText[align]}`, children: description })) : null, children, items?.length ? renderItems$1(items, version) : null] }), buttons?.length ? (jsx("div", { className: "flex mt-9 gap-3", children: buttons.map((button, index) => renderButton$1(useLink({ router, handlerDecorator }, button), index)) })) : null] }), image?.src && jsx(Img, { className: "mt-auto ml-7", image: image })] })] }));
|
|
366
367
|
});
|
|
367
368
|
function getTitleSizeByClassName(className = '') {
|
|
368
369
|
const colSpan = getColSpan(className);
|
|
@@ -402,12 +403,12 @@
|
|
|
402
403
|
double: 'gap-x-5 gap-y-[26px] flex-wrap',
|
|
403
404
|
single: 'gap-3.5 flex-col',
|
|
404
405
|
};
|
|
405
|
-
const LinkDocs = JSX(({ className, title, align, documents, icon, columnsMode = '
|
|
406
|
+
const LinkDocs = JSX(({ className, title, align, documents, icon, columnsMode = 'single' }) => {
|
|
406
407
|
const containerClasses = linkColumnsModeStyleMap[columnsMode];
|
|
407
|
-
return (jsxs("section", { className: `font-sans p-[50px] bg-white ${className}`, children: [title && (jsx(Title, { className: `font-medium
|
|
408
|
-
? documents.map(({ text, fileSize, ...linkProps }) => (jsxs("a", { className: `group flex
|
|
409
|
-
|
|
410
|
-
|
|
408
|
+
return (jsxs("section", { className: `font-sans p-[50px] bg-white ${className}`, children: [title && (jsx(Title, { className: `font-medium mt-0 ${titleMarginsStyleMap[columnsMode]} ${titleAlignStyleMap[align ?? 'center']}`, children: title })), jsx("div", { className: `flex ${containerClasses}`, role: "list", children: documents?.length
|
|
409
|
+
? documents.map(({ text, fileSize, ...linkProps }, i) => (jsxs("a", { className: `group flex text-sm align-middle h-fit
|
|
410
|
+
text-primary-text no-underline hover:text-primary-main
|
|
411
|
+
${columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : ''}`, role: "listitem", ...linkProps, children: [icon && jsx(Icon, { className: "mr-3.5", name: icon, width: "24px", height: "24px" }), jsxs("span", { className: "self-center", children: [text, jsx("span", { className: "text-secondary-text group-hover:text-primary-main", children: linkProps?.href && formatSuffix(getExtFromHref(linkProps.href), fileSize) })] })] }, String(i))))
|
|
411
412
|
: null })] }));
|
|
412
413
|
});
|
|
413
414
|
const getExtFromHref = (href) => {
|
|
@@ -475,8 +476,9 @@
|
|
|
475
476
|
const hasContent = blocks?.length;
|
|
476
477
|
const icon = isActive ? 'MinusIcon' : 'PlusIcon';
|
|
477
478
|
const handleToggle = (e) => {
|
|
478
|
-
if (!hasContent)
|
|
479
|
-
return
|
|
479
|
+
if (!hasContent) {
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
480
482
|
setIsActive(!isActive);
|
|
481
483
|
const contentBlock = getContentBlock(e);
|
|
482
484
|
contentBlock.style.maxHeight = contentBlock.style.maxHeight
|
|
@@ -487,13 +489,14 @@
|
|
|
487
489
|
${hasContent ? 'group cursor-pointer' : ''}`, onClick: handleToggle, children: [jsx("span", { className: `m-0 text-xl pr-2.5 font-medium ${hasContent ? 'group-hover:text-primary-main' : ''}`, children: label }), hasContent ? jsx(Icon, { name: icon, width: "24", height: "24" }) : null] }), hasContent ? (jsx("div", { className: `${isActive ? 'pb-5' : ''} text-sm transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0 `, children: blocks?.length ? blocks.map((block, i) => renderBlock(block, i, context)) : null })) : null] }));
|
|
488
490
|
});
|
|
489
491
|
const renderBlock = (block, i, context) => {
|
|
490
|
-
|
|
492
|
+
const type = block?.accordionBlockType;
|
|
493
|
+
if (!type || !(type in AccordionBlocks)) {
|
|
491
494
|
return null;
|
|
492
495
|
}
|
|
493
|
-
const AccordionBlock = AccordionBlocks[
|
|
494
|
-
return (jsx("div", { className: "mb-5 last:mb-0", children: jsx(AccordionBlock, { context: context, ...block
|
|
496
|
+
const AccordionBlock = AccordionBlocks[type];
|
|
497
|
+
return (jsx("div", { className: "mb-5 last:mb-0", children: jsx(AccordionBlock, { context: context, ...block }) }, `block_${i}`));
|
|
495
498
|
};
|
|
496
|
-
const getContentBlock = (
|
|
499
|
+
const getContentBlock = ({ target }) => target.tagName === 'BUTTON' ? target.nextSibling : target.parentNode.nextSibling;
|
|
497
500
|
|
|
498
501
|
const Accordion = JSX(({ title, accordionItems, context, className }) => {
|
|
499
502
|
return (jsxs("section", { className: `p-[50px] font-sans bg-white text-primary-text ${className || ''}`, children: [title ? jsx(Title, { className: "m-0 mb-2.5", children: title }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context }, `AccordionItem${i}`))) })) : null] }));
|
|
@@ -506,6 +509,15 @@
|
|
|
506
509
|
return (jsxs("div", { className: "flex items-center p-10 gap-5 max-w-[580px]", children: [benefit.icon && (jsx(Icon, { className: "h-[70px] w-[70px] min-w-[70px] min-h-[70px]", name: benefit.icon, width: "70", height: "70" })), jsxs("div", { children: [jsx("h3", { className: "font-medium text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm mt-2", children: benefit.description }))] })] }, String(i)));
|
|
507
510
|
};
|
|
508
511
|
|
|
512
|
+
const useComparisonTableScroll = ({ colData, colsLengthForScroll, activeCardIndex, setActiveCardIndex, }) => {
|
|
513
|
+
const nextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
514
|
+
const prevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
515
|
+
const isScrollAvailable = colData?.length && colData.length > colsLengthForScroll;
|
|
516
|
+
const showNextButton = isScrollAvailable && colData?.length - activeCardIndex > colsLengthForScroll;
|
|
517
|
+
const showPrevButton = isScrollAvailable && activeCardIndex > 0;
|
|
518
|
+
return { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton };
|
|
519
|
+
};
|
|
520
|
+
|
|
509
521
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
510
522
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill, ...options }, i) => (jsx("path", { d: d, fill: fill || 'currentColor', ...commonOptions, ...options }, i))) }));
|
|
511
523
|
});
|
|
@@ -526,14 +538,6 @@
|
|
|
526
538
|
? 'bg-secondary-light text-secondary-text'
|
|
527
539
|
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(SVG, { paths: ARROW_PATHS, viewBox: "0 0 16 16", fill: "none", width: "16", height: "16" }) })));
|
|
528
540
|
|
|
529
|
-
const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
|
|
530
|
-
|
|
531
|
-
const carouselContainerClassesMap = {
|
|
532
|
-
comparison: 'flex gap-4 duration-1000',
|
|
533
|
-
tariff: 'flex flex-grow duration-1000',
|
|
534
|
-
};
|
|
535
|
-
const TableCarouselContainer = JSX(({ children, activeCardIndex, columnWidth, version = 'comparison' }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: carouselContainerClassesMap[version], style: { transform: `translateX(-${activeCardIndex * columnWidth}px)` }, children: children }) })));
|
|
536
|
-
|
|
537
541
|
const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
538
542
|
const BORDER_CLASSES = 'border-main-stroke border-solid border';
|
|
539
543
|
const DIVIDER_CLASSES$1 = 'border-main-divider border border-t-0 border-x-0';
|
|
@@ -541,7 +545,13 @@
|
|
|
541
545
|
const COLS_LENGTH_FOR_SCROLL$1 = 2;
|
|
542
546
|
const COLUMN_WIDTH$1 = 4 * 80 + 4 * 4; // w-80 + gap-4 = 336px
|
|
543
547
|
|
|
544
|
-
const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-
|
|
548
|
+
const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Icon, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", name: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title && (jsx(Title, { size: "S", className: "font-medium m-0 text-center text-white", children: title })), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "font-medium text-xs py-[11px]", children: link.text }) }) }))] })));
|
|
549
|
+
|
|
550
|
+
const carouselContainerClassesMap = {
|
|
551
|
+
comparison: 'flex gap-4 duration-1000',
|
|
552
|
+
tariff: 'flex flex-grow duration-1000',
|
|
553
|
+
};
|
|
554
|
+
const TableCarouselContainer = JSX(({ children, activeCardIndex, columnWidth, version = 'comparison' }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: carouselContainerClassesMap[version], style: { transform: `translateX(-${activeCardIndex * columnWidth}px)` }, children: children }) })));
|
|
545
555
|
|
|
546
556
|
const TableCell = JSX(({ cell, isFirstRow, isLastRow, isFillGradient }) => {
|
|
547
557
|
const cellWrapperClasses = `w-80 box-border flex flex-col ${BORDER_CLASSES} ${!isLastRow ? 'border-y-0' : 'border-t-0 rounded-b-md'} ${isFillGradient ? GRADIENT : ''}`;
|
|
@@ -550,16 +560,9 @@
|
|
|
550
560
|
});
|
|
551
561
|
const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label && (jsx("h5", { className: `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`, children: label })), description && (jsx("div", { className: `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`, children: description }))] }, String(i)));
|
|
552
562
|
|
|
553
|
-
const
|
|
563
|
+
const TableRowContainer = JSX(({ children }) => (jsx("div", { className: "self-start flex flex-col", role: "row", children: jsx("div", { className: "flex", children: children }) })));
|
|
554
564
|
|
|
555
|
-
const
|
|
556
|
-
const nextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
557
|
-
const prevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
558
|
-
const isScrollAvailable = colData?.length && colData.length > colsLengthForScroll;
|
|
559
|
-
const showNextButton = isScrollAvailable && colData?.length - activeCardIndex > colsLengthForScroll;
|
|
560
|
-
const showPrevButton = isScrollAvailable && activeCardIndex > 0;
|
|
561
|
-
return { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton };
|
|
562
|
-
};
|
|
565
|
+
const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? (jsx("div", { className: `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${!isLastRow ? 'border-solid' : ''}`, children: header.title })) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
|
|
563
566
|
|
|
564
567
|
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, }) => {
|
|
565
568
|
const router = context.useRouter();
|
|
@@ -574,7 +577,12 @@
|
|
|
574
577
|
data: colData.map((col) => col?.[i] || [{}]),
|
|
575
578
|
}))
|
|
576
579
|
.slice(0, isShowAllRow ? rowHeaders.length : visibleRowLength);
|
|
577
|
-
const { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton } = useComparisonTableScroll(
|
|
580
|
+
const { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton } = useComparisonTableScroll({
|
|
581
|
+
colData,
|
|
582
|
+
colsLengthForScroll: COLS_LENGTH_FOR_SCROLL$1,
|
|
583
|
+
activeCardIndex,
|
|
584
|
+
setActiveCardIndex,
|
|
585
|
+
});
|
|
578
586
|
const showToggle = () => setIsShowAllRow(!isShowAllRow);
|
|
579
587
|
return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, children: [jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto", children: title }), jsxs("div", { role: "table", children: [colHeaders?.length ? (jsxs(TableRowContainer, { children: [jsx("div", { className: FIRST_CELL_CLASSES$1, role: "columnheader", scope: "col" }), jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: colHeaders.map((header, i) => (jsx(HeaderCell, { ...header, link: header.link && useLink({ router, handlerDecorator }, header.link) }, String(i)))) })] })) : null, rowData?.length ? (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TableRow, { row: row, isFirstRow: i === 0, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex, isColoredFirstColumn: isColoredFirstColumn }, String(i)))), isScrollAvailable ? (jsx("div", { children: jsxs("div", { className: "absolute top-7 right-7 z-10", children: [jsx(ArrowButton, { onClick: nextClick, disabled: !showNextButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }), jsx(ArrowButton, { className: "mt-4 rotate-180", onClick: prevClick, disabled: !showPrevButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })] }) })) : null] })) : null] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null, visibleRowLength ? (jsx("div", { className: "pr-[50px]", children: jsxs("div", { className: "flex w-full", children: [jsx("div", { className: FIRST_CELL_CLASSES$1 }), jsx("button", { onClick: showToggle, className: "mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main", children: jsx("div", { className: "font-sans font-medium text-xs py-[11px]", children: !isShowAllRow ? 'Показать все параметры' : 'Скрыть' }) })] }) })) : null] }));
|
|
580
588
|
});
|
|
@@ -623,7 +631,7 @@
|
|
|
623
631
|
if (value > max)
|
|
624
632
|
onChange(max);
|
|
625
633
|
};
|
|
626
|
-
return (jsxs("div", { className: className, children: [jsxs("
|
|
634
|
+
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx("span", { className: "absolute text-xs text-secondary-text top-1 mt-0.5 pl-4 ml-0.5", children: title })) : null, jsx("input", { className: `m-0 font-sans text-sm w-full h-12 border-2 border-solid border-main-divider rounded-md outline-none p-0 pl-4 m-0 box-border text-primary-text ${title ? 'pt-4' : ''}`, value: addSpacesBetweenNumbers(value), onChange: (e) => handleChange(e.target.value), onBlur: handleBlur }), jsx("div", { className: "absolute inset-x-0 mt-0.5 top-8 px-4", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, onChange: (e) => handleChange(e.target.value), style: inputStyle }) })] }), jsx("div", { className: "flex justify-between mt-3 mb-4", children: items.map((item, i) => (jsx("span", { className: "text-xs text-secondary-text pl-4", children: item }, String(i)))) })] }));
|
|
627
635
|
});
|
|
628
636
|
|
|
629
637
|
const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
@@ -715,7 +723,7 @@
|
|
|
715
723
|
return (jsx("section", { className: `font-sans text-primary-text bg-white p-4 ${className}`, children: jsxs("div", { className: `box-border p-12 flex flex-col justify-between ${borderStyle}`, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "grow mr-11", children: [jsx(InputRange, { title: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0441\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD", items: [
|
|
716
724
|
`От ${addSpacesBetweenNumbers(minSum)} рублей`,
|
|
717
725
|
`До ${addSpacesBetweenNumbers(maxSum)} рублей`,
|
|
718
|
-
], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), jsx(InputRange, { title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }), jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), jsx(Checkbox, { className: "mb-4", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), jsxs("div", { className: "p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-5", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), jsx("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(montlyPayment)), " \u20BD"] }), jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), jsxs("div", { className: "text-lg", children: [rate, " %"] })] })] }), jsxs("div", { className: "flex items-center", children: [jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), jsx("div", { className: "w-80 text-xxs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417\
|
|
726
|
+
], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), jsx(InputRange, { title: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ['Или выберите из предложенных вариантов ниже'], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: monthsValue || defaultMonths, onChange: setMonthsValue }), jsx("div", { className: "flex mb-7", children: creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick)) }), jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", checked: isAnnuityChecked, onChange: setIsAnnuityChecked }), jsx(Checkbox, { className: "mb-4", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsuranceChecked, onChange: setIsInsuranceChecked })] }), jsxs("div", { className: "p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-5", children: "\u041D\u0430\u0448\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }), jsx("div", { className: "text-sm opacity-60", children: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0451\u0436" }), jsxs("div", { className: "text-lg mb-3", children: [addSpacesBetweenNumbers(Math.round(montlyPayment)), " \u20BD"] }), jsx("div", { className: "text-sm opacity-60", children: "\u0421\u0442\u0430\u0432\u043A\u0430" }), jsxs("div", { className: "text-lg", children: [rate, " %"] })] })] }), jsxs("div", { className: "flex items-center", children: [jsx(Button, { className: "mr-3", text: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443", version: "primary", href: "#" }), jsx("div", { className: "w-80 text-xxs leading-4 text-secondary-text", "aria-label": "\u0421\u043E\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044F \u0437\u0430\u044F\u0432\u043A\u0443, \u0432\u044B \u0441\u043E\u0433\u043B\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044C \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F\u043C \u0424\u0417 \u00AB\u041E \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445\u00BB" })] })] }) }));
|
|
719
727
|
});
|
|
720
728
|
function renderButton(number, i, handleClick) {
|
|
721
729
|
return (jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: jsxs("span", { className: "font-semibold text-sm", children: [number, " ", number === 1 ? 'год' : number > 4 ? 'лет' : 'года'] }) }, String(i)));
|
|
@@ -727,7 +735,7 @@
|
|
|
727
735
|
};
|
|
728
736
|
const Tile = JSX((props) => {
|
|
729
737
|
const { children, className, version = 'primary' } = props;
|
|
730
|
-
return (jsx("section", { className: `font-sans p-9
|
|
738
|
+
return (jsx("section", { className: `font-sans p-9 box-border ${className || ''} ${tileStyleMap[version]} ${getContainerPaddingRight(className)} ${getContainerMinHeight(className)} `, children: jsx(BaseTile, { ...props, children: children }) }));
|
|
731
739
|
});
|
|
732
740
|
function getContainerPaddingRight(className = '') {
|
|
733
741
|
const colSpan = getColSpan(className);
|
|
@@ -741,6 +749,18 @@
|
|
|
741
749
|
return 'pr-[9.4rem]';
|
|
742
750
|
}
|
|
743
751
|
}
|
|
752
|
+
function getContainerMinHeight(className = '') {
|
|
753
|
+
const colSpan = getColSpan(className);
|
|
754
|
+
if (colSpan <= 6) {
|
|
755
|
+
return 'min-h-[300px]';
|
|
756
|
+
}
|
|
757
|
+
else if (colSpan <= 8) {
|
|
758
|
+
return 'min-h-[320px]';
|
|
759
|
+
}
|
|
760
|
+
else {
|
|
761
|
+
return 'min-h-[360px]';
|
|
762
|
+
}
|
|
763
|
+
}
|
|
744
764
|
|
|
745
765
|
const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
|
|
746
766
|
const CURRENCY_CODES = ['USD', 'EUR'];
|
|
@@ -784,7 +804,8 @@
|
|
|
784
804
|
|
|
785
805
|
const SearchBar = JSX(({ className, context }) => {
|
|
786
806
|
const { term, setTerm } = context.useSearch();
|
|
787
|
-
|
|
807
|
+
const [inputHasFocus, setInputHasFocus] = context.useState(false);
|
|
808
|
+
return (jsxs("form", { className: `relative ${className || ''}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: "w-[24px] h-[24px]", children: jsx(Icon, { name: "LoupeIcon", width: "24", height: "24" }) }), !term && (jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-normal text-base text-secondary-text", children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: `${inputHasFocus ? 'border-primary-text' : ''} pr-32 h-12 pl-12 w-full font-sans font-normal text-base text-black border border-solid border-main-divider rounded h-full box-border outline-none pr-[6%]`, value: term, onChange: (e) => setTerm(e.target.value), onFocus: (e) => setInputHasFocus(true), onBlur: (e) => setInputHasFocus(false), type: "text", name: "search-bar-input" }), inputHasFocus && (jsx("button", { type: "submit", version: "primary", 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", onClick: (e) => {
|
|
788
809
|
e.preventDefault();
|
|
789
810
|
console.log('click');
|
|
790
811
|
}, children: "\u041D\u0430\u0439\u0442\u0438" }))] }));
|
|
@@ -813,14 +834,14 @@
|
|
|
813
834
|
return jsx("span", { children: text });
|
|
814
835
|
}
|
|
815
836
|
};
|
|
816
|
-
const formatTel = (s) => s.replaceAll(
|
|
837
|
+
const formatTel = (s) => s.replaceAll(/\D/g, '');
|
|
817
838
|
|
|
818
839
|
const HorizontalNavigation = JSX(({ className, links, context }) => {
|
|
819
840
|
const router = context.useRouter();
|
|
820
841
|
const { handlerDecorator } = context;
|
|
821
842
|
return (jsx("div", { className: `${className || ''}`, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null }));
|
|
822
843
|
});
|
|
823
|
-
const HorizontalNavigationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-normal text-sm text-secondary-text hover:text-primary-
|
|
844
|
+
const HorizontalNavigationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-normal text-sm text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
824
845
|
|
|
825
846
|
function useSitemap(useAsyncData) {
|
|
826
847
|
const { data } = useAsyncData(sitemapURL(), fetchSitemap);
|
|
@@ -876,7 +897,7 @@
|
|
|
876
897
|
const { icon, label, width, height } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
877
898
|
if (!icon)
|
|
878
899
|
return null;
|
|
879
|
-
return (jsx(
|
|
900
|
+
return (jsx("a", { className: "flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[38px] h-[38px] hover:fill-primary-main", href: href, target: "_blank", rel: "noopener noreferrer", children: Icon && jsx(Icon, { name: icon, width: width, height: height, asSVG: true, className: "block" }) }));
|
|
880
901
|
});
|
|
881
902
|
|
|
882
903
|
const TextInformation = JSX(({ className, links, context }) => {
|
|
@@ -916,11 +937,11 @@
|
|
|
916
937
|
const showNextButton = isGalleryScrollAvailable &&
|
|
917
938
|
cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
|
|
918
939
|
const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
|
|
919
|
-
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-12 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Title, { className: "font-medium m-0 text-center", children: title }) : null, description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mt-3", children: description })) : null] }), jsx("div", {
|
|
940
|
+
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-12 py-[50px] overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Title, { className: "font-medium m-0 text-center", children: title }) : null, description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mt-3", children: description })) : null] }), jsx("div", {
|
|
920
941
|
// Need to place all cards at the center if count of cards less than 4
|
|
921
942
|
className: `flex ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`,
|
|
922
943
|
// All cards has same width
|
|
923
|
-
style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard$1(card, i, version)) }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-1 z-10", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" })), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })] }));
|
|
944
|
+
style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard$1(card, i, version)) }), jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent" }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-1 z-10", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" })), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })] }));
|
|
924
945
|
});
|
|
925
946
|
function renderCard$1(card, i, version) {
|
|
926
947
|
return (jsxs("div", { className: `box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between items-stretch ${cardStyleMap[version]} w-full`, role: "listitem", children: [jsxs("div", { children: [card.image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: card.image }) })) : null, card.title ? (jsx("h4", { className: `font-medium text-xl m-0 ${!card.description && !card.items?.length ? 'text-center' : ''}`, children: card.title })) : null, card.description ? (jsx("div", { className: "font-normal text-sm text-secondary-text mt-2", children: card.description })) : null, card.items?.length ? (jsx("section", { className: "max-w-[308px] mt-2", role: "list", children: card.items.map(renderItem) })) : null] }), card.href ? (jsx(Button, { className: "mt-6", text: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435", version: "secondary", href: card.href })) : null] }, String(i)));
|
|
@@ -989,9 +1010,7 @@
|
|
|
989
1010
|
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
990
1011
|
|
|
991
1012
|
const ProductBlockInner = JSX(({ className, context, title, titleSize, description, benefits, buttons, image, items }) => {
|
|
992
|
-
return (jsxs("div", { className: `flex grow justify-between items-stretch ${className || ''}`, children: [
|
|
993
|
-
/* TODO Why <Title> is duplicated here? */
|
|
994
|
-
jsx(Title, { size: titleSize || 'XL', className: "font-medium m-0 mb-4 whitespace-pre-wrap max-w-[600px] text-primary-text", children: title })), jsx(BaseTile, { context: context, description: description, items: items, buttons: buttons, children: benefits?.length ? (jsx("div", { className: "flex gap-6 mt-6 mb-3.5", children: benefits.map(renderBenefit) })) : null })] }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
|
|
1013
|
+
return (jsxs("div", { className: `flex grow justify-between items-stretch ${className || ''}`, children: [jsx("div", { className: 'flex flex-col', children: jsx(BaseTile, { context: context, title: title, titleSize: titleSize || 'XL', description: description, items: items, buttons: buttons, children: benefits?.length ? (jsx("div", { className: "flex gap-6 mt-6 mb-3.5", children: benefits.map(renderBenefit) })) : null }) }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
|
|
995
1014
|
});
|
|
996
1015
|
function renderBenefit(benefit, i) {
|
|
997
1016
|
return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon && (jsx(Icon, { className: "w-[50px] h-[50px] min-w-[50px] min-h-[50px] bg-main rounded-full p-[10px] box-border", name: benefit.icon, width: "24", height: "24" })), jsxs("div", { className: "flex gap-1 flex-col h-full", children: [jsx("h4", { className: "font-medium text-primary-text text-xl m-0", children: benefit.label }), benefit.description && (jsx("div", { className: "font-normal text-sm text-secondary-text", children: benefit.description }))] })] }, String(i)));
|
|
@@ -1021,7 +1040,7 @@
|
|
|
1021
1040
|
const galleryNav = slides.map((s) => s.nav);
|
|
1022
1041
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
1023
1042
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
1024
|
-
return (jsxs("section", { className: `font-sans bg-white overflow-hidden w-100 ${className || ''}`, children: [jsx("div", { className: `flex duration-1000`, style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock(_, i, context)) }), jsx("div", { className:
|
|
1043
|
+
return (jsxs("section", { className: `font-sans bg-white overflow-hidden w-100 ${className || ''}`, children: [jsx("div", { className: `flex duration-1000`, style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock(_, i, context)) }), jsx("div", { className: "flex", children: galleryNav.map((slide, i) => renderNavButton({
|
|
1025
1044
|
slide,
|
|
1026
1045
|
i,
|
|
1027
1046
|
activeSlideIndex,
|
|
@@ -1036,7 +1055,7 @@
|
|
|
1036
1055
|
const isActiveBtn = i === activeSlideIndex;
|
|
1037
1056
|
const progressBarClassName = isActiveBtn ? 'animate-slide' : '';
|
|
1038
1057
|
const btnTitleClassName = isActiveBtn ? 'text-primary-text' : 'text-secondary-text';
|
|
1039
|
-
return (jsxs("button", { type: "button", onClick: onClick, className: `group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0
|
|
1058
|
+
return (jsxs("button", { type: "button", onClick: onClick, className: `font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-5 grow basis-0`, children: [jsxs("div", { className: "border-0 border-r border-solid border-main-divider px-6", children: [jsx("div", { className: `text-sm font-medium pb-1 group-hover:text-primary-text ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: "text-xs text-secondary-text pb-[2px]", children: slide.desc })] }), jsx("div", { className: `absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${progressBarClassName}`, style: { animationDuration: `${duration}s`, animationFillMode: 'forwards' } })] }, String(i)));
|
|
1040
1059
|
}
|
|
1041
1060
|
|
|
1042
1061
|
const ProductTile = JSX((props) => {
|
|
@@ -1055,7 +1074,7 @@
|
|
|
1055
1074
|
}
|
|
1056
1075
|
|
|
1057
1076
|
const PromoTile = JSX(({ className, context, title = 'Акции и спецпредложения', date, description, buttons = [], version, }) => {
|
|
1058
|
-
return (jsx(Tile, { className: className, context: context, title: title, buttons: buttons, version: version, children: jsxs("div", { children: [date && jsx("div", { className: "text-sm mb-2", children: formatDate(date) }), jsx("div", { className: "text-base", children: description })] }) }));
|
|
1077
|
+
return (jsx(Tile, { className: className, context: context, title: title, buttons: buttons, version: version, children: jsxs("div", { className: "mt-1.5", children: [date && jsx("div", { className: "text-sm mb-2", children: formatDate(date) }), jsx("div", { className: "text-base", children: description })] }) }));
|
|
1059
1078
|
});
|
|
1060
1079
|
function formatDate(date) {
|
|
1061
1080
|
const dateObj = new Date(date);
|
|
@@ -1085,11 +1104,11 @@
|
|
|
1085
1104
|
const TariffsTableCell = JSX(({ cell, isLastRow }) => {
|
|
1086
1105
|
const cellWrapperClasses = `first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 ${isLastRow ? 'border-t-0 rounded-b-md' : ''}`;
|
|
1087
1106
|
const cellClasses = `h-full ${DIVIDER_CLASSES}`;
|
|
1088
|
-
return (jsx("div", { className: cellWrapperClasses, children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner(item, i)) }) }));
|
|
1107
|
+
return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner(item, i)) }) }));
|
|
1089
1108
|
});
|
|
1090
|
-
const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label && jsx("
|
|
1109
|
+
const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label && jsx("div", { className: "text-xl font-medium m-0", children: label }), description && jsx("div", { className: "text-sm text-secondary-text", children: description }), list?.items?.length ? (jsx("div", { className: "flex flex-col justify-between items-start", children: jsx("div", { role: "list", children: list.items.map((text, idx) => (jsx(BlockItem, { text: text, version: list.version ?? 'secondary', isDotted: list.isDotted ?? true }, String(idx)))) }) })) : null, image && jsx(Img, { image: image }), buttons?.length
|
|
1091
1110
|
? buttons.map(({ icon, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 ? 'ml-3' : ''} w-12 h-12`, appendLeft: icon && jsx(Icon, { name: icon, width: "24px", height: "24px" }), ...buttonProps }, String(idx))))
|
|
1092
|
-
: null] }));
|
|
1111
|
+
: null] }, String(i)));
|
|
1093
1112
|
|
|
1094
1113
|
const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex, isLastRow }) => {
|
|
1095
1114
|
return (jsxs(TableRowContainer, { children: [jsx("div", { className: `text-sm py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: jsxs("div", { className: "flex items-center text-primary-text", children: [header?.icon && (jsx(Icon, { className: "pr-[14px]", name: header.icon, width: "24px", height: "24px" })), header?.title] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH, version: "tariff", children: data.map((cell, i) => (jsx(TariffsTableCell, { cell: cell, isLastRow: isLastRow }, String(i)))) })) : null] }));
|
|
@@ -1102,8 +1121,13 @@
|
|
|
1102
1121
|
header,
|
|
1103
1122
|
data: colData.map((col) => col?.[i] || [{}]),
|
|
1104
1123
|
}));
|
|
1105
|
-
const { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton } = useComparisonTableScroll(
|
|
1106
|
-
|
|
1124
|
+
const { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton } = useComparisonTableScroll({
|
|
1125
|
+
colData,
|
|
1126
|
+
colsLengthForScroll: COLS_LENGTH_FOR_SCROLL,
|
|
1127
|
+
activeCardIndex,
|
|
1128
|
+
setActiveCardIndex,
|
|
1129
|
+
});
|
|
1130
|
+
return (jsxs("section", { className: `bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${className || ''}`, children: [jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center mb-9 mx-auto", children: title }), jsxs("div", { role: "table", children: [rowData?.length ? (jsxs("div", { className: "relative", children: [rowData.map((row, i, { length }) => (jsx(TariffsTableRow, { row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex }, String(i)))), isScrollAvailable ? (jsx("div", { children: jsxs("div", { className: "absolute top-7 right-7 z-10", children: [jsx(ArrowButton, { onClick: nextClick, disabled: !showNextButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }), jsx(ArrowButton, { className: "mt-4 rotate-180", onClick: prevClick, disabled: !showPrevButton, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })] }) })) : null] })) : null, isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] })] }));
|
|
1107
1131
|
});
|
|
1108
1132
|
|
|
1109
1133
|
const Blocks = {
|
|
@@ -1209,7 +1233,9 @@
|
|
|
1209
1233
|
return (jsx("section", { className: "max-w-[308px] mt-2", role: "list", children: items.map((item, i) => (jsx(BlockItem, { children: jsx("span", { className: "text-sm text-secondary-text", children: item }) }, String(i)))) }));
|
|
1210
1234
|
}
|
|
1211
1235
|
|
|
1212
|
-
const ProductBlock = JSX(
|
|
1236
|
+
const ProductBlock = JSX(
|
|
1237
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1238
|
+
({ titleSize, image, benefits, ...props } /* Get rid of image and benefits */) => {
|
|
1213
1239
|
const { className } = props;
|
|
1214
1240
|
return (jsx("section", { className: `font-sans bg-white pt-10 pl-[50px] pb-[50px] pr-[7.5rem] ${className || ''}`, children: jsx(ProductBlockInner, { ...props, titleSize: "L" }) }));
|
|
1215
1241
|
});
|
|
@@ -1227,9 +1253,6 @@
|
|
|
1227
1253
|
ProductTile,
|
|
1228
1254
|
TextBlock,
|
|
1229
1255
|
Tile,
|
|
1230
|
-
// TODO StepsBlock,
|
|
1231
|
-
// TODO BenefitsBlock,
|
|
1232
|
-
// TODO ProductGallery
|
|
1233
1256
|
};
|
|
1234
1257
|
|
|
1235
1258
|
exports.Blocks = Blocks;
|