@redneckz/wildless-cms-uni-blocks 0.2.96 → 0.2.99
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 +180 -163
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BaseTile/BaseTile.js +4 -19
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +2 -3
- package/dist/components/Footer/Sitemap.js +1 -1
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Headline/Headline.js +9 -3
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -3
- package/dist/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +12 -4
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +13 -2
- package/dist/components/ProductBlock/ProductBlockInner.js +16 -4
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +2 -2
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -0
- package/dist/components/Tile/TileContent.d.ts +1 -1
- package/dist/model/ButtonVersion.d.ts +1 -0
- package/dist/model/LinkProps.d.ts +2 -1
- package/dist/model/SitemapProps.d.ts +2 -2
- package/dist/ui-kit/Button/ButtonProps.d.ts +6 -1
- package/dist/ui-kit/Icon/Icon.js +1 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +49 -41
- package/dist/ui-kit/Icon/IconProps.js +45 -41
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/dist/ui-kit/Img.js +9 -3
- package/dist/ui-kit/Img.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +4 -19
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +2 -3
- package/lib/components/Footer/Sitemap.js +1 -1
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Headline/Headline.js +10 -4
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -3
- package/lib/components/ProductBlock/ProductBlock.d.ts +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.js +12 -4
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +13 -2
- package/lib/components/ProductBlock/ProductBlockInner.js +16 -4
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +2 -2
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -0
- package/lib/components/Tile/TileContent.d.ts +1 -1
- package/lib/model/ButtonVersion.d.ts +1 -0
- package/lib/model/LinkProps.d.ts +2 -1
- package/lib/model/SitemapProps.d.ts +2 -2
- package/lib/ui-kit/Button/ButtonProps.d.ts +6 -1
- package/lib/ui-kit/Icon/Icon.js +1 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +49 -41
- package/lib/ui-kit/Icon/IconProps.js +45 -41
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/ui-kit/Img.js +9 -3
- package/lib/ui-kit/Img.js.map +1 -1
- package/package.json +3 -2
- package/src/components/Accordion/Accordion.example.json +4 -4
- package/src/components/BaseTile/BaseTile.tsx +11 -26
- package/src/components/ComparisonTable/ComparisonTable.example.json +1 -1
- package/src/components/ComparisonTable/ComparisonTableContent.ts +2 -3
- package/src/components/Footer/Sitemap.tsx +1 -1
- package/src/components/Headline/Headline.tsx +25 -8
- package/src/components/LinkDocs/LinkDocs.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsContent.ts +3 -3
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +2 -0
- package/src/components/PictureText/PictureText.example.json +1 -1
- package/src/components/ProductBlock/ProductBlock.example.json +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +58 -1
- package/src/components/ProductBlock/ProductBlock.tsx +19 -8
- package/src/components/ProductBlock/ProductBlockContent.ts +14 -2
- package/src/components/ProductBlock/ProductBlockInner.tsx +38 -6
- package/src/components/ProductTile/ProductTile.example.json +1 -1
- package/src/components/ProductTile/ProductTileContent.ts +2 -2
- package/src/components/TextBlock/TextBlockContent.ts +1 -0
- package/src/components/Tile/Tile.example.json +1 -1
- package/src/components/Tile/TileContent.ts +1 -1
- package/src/icons/AppleIcon.svg +1 -1
- package/src/icons/CalendarWhiteIcon.svg +17 -0
- package/src/icons/EmptyWalletWhiteIcon.svg +16 -0
- package/src/icons/GridIcon.svg +2 -2
- package/src/icons/PercentageSquareWhiteIcon.svg +16 -0
- package/src/icons/PlayMarketIcon.svg +1 -1
- package/src/model/ButtonVersion.ts +1 -0
- package/src/model/LinkProps.ts +2 -1
- package/src/model/SitemapProps.ts +2 -2
- package/src/ui-kit/Button/ButtonProps.ts +6 -1
- package/src/ui-kit/Icon/Icon.tsx +1 -1
- package/src/ui-kit/Icon/IconProps.ts +8 -0
- package/src/ui-kit/Img.tsx +23 -10
|
@@ -1 +1 @@
|
|
|
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"},"button":{"$ref":"#/definitions/BaseTileIconButton","title":"Ссылка"},"items":{"type":"array","items":{"type":"string"},"title":"Список","minItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"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":["Основная","Второстепенная"]},"BlockVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет плитки","enumNames":["Основная","Второстепенная"]},"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":"Мобильное приложение"},"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":"Плитка"},"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":{"items":{"type":"array","items":{"type":"string"},"title":"Элементы списка"}},"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":"Мини-галерея"}}}
|
|
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"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"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":"Текст"},"fileSize":{"type":"string","title":"размер файла"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"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":["","_self","_blank","_parent","_top"],"title":"Таргет (target)","enumNames":["","self (текущее окно или фрейм)","blank (новое окно)","parent (фрейм-родитель)","top (текущее окно)"]},"LinkDocsContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"align":{"$ref":"#/definitions/AlignType"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список"}},"title":"Список документов"},"IconName":{"type":"string","enum":["","ActualBalanceIcon","AppleIcon","CalendarCircleIcon","CalendarIcon","CalendarWhiteIcon","CardIcon","CardPosIcon","CardTickIcon","ClockIcon","ComfortableCompIcon","DiscountShape","DocIcon","DocumentText","DollarIcon","EmptyWalletChangeIcon","EmptyWalletIcon","EmptyWalletWhiteIcon","EuroIcon","GlassIcon","GridIcon","JCBIcon","LoupeIcon","MasterCardIcon","MinusIcon","MirIcon","MoneyIcon","MonitorMobileIcon","NewDocIcon","OkIcon","PassSendIcon","PercentageSquareIcon","PercentageSquareWhiteIcon","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)"},"sources":{"type":"array","items":{"$ref":"#/definitions/ImgSource"},"title":"Другие форматы"},"title":{"type":"string","title":"Текст подсказки (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","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"blockVersion":{"$ref":"#/definitions/TextBlockVersion"}},"title":"Текстовый блок"},"AccordionTypeBlock":{"type":"string","enum":["Headline","LinkDocs","TextBlock","PictureText"],"title":"Тип блока"},"HeadlineAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"Headline"},"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"description":{"type":"string","title":"Описание"},"bgColor":{"$ref":"#/definitions/HeadlineBgColor"}},"required":["accordionBlockType"],"title":"Заголовок"},"LinkDocsAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"LinkDocs"},"title":{"type":"string","title":"Заголовок"},"align":{"$ref":"#/definitions/AlignType"},"columnsMode":{"$ref":"#/definitions/LinkColumnsMode","title":"Отображение списка"},"icon":{"$ref":"#/definitions/IconName","title":"Название иконки"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkDocsItem"},"title":"Список"}},"required":["accordionBlockType"],"title":"Список документов"},"TextBlockAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"TextBlock"},"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"iconVersion":{"$ref":"#/definitions/TextBlockIconVersion"},"blockVersion":{"$ref":"#/definitions/TextBlockVersion"}},"required":["accordionBlockType"],"title":"Текстовый блок"},"PictureTextAccordionBlock":{"type":"object","properties":{"accordionBlockType":{"$ref":"#/definitions/AccordionTypeBlock","default":"PictureText"},"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Список преимуществ"}},"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":{"link":{"$ref":"#/definitions/LinkProps"},"title":{"type":"string","title":"Заголовок"},"image":{"$ref":"#/definitions/Picture"},"icon":{"$ref":"#/definitions/IconName"}},"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":"Продукты"},"isColoredFirstColumn":{"type":"boolean","title":"Закрасить первую колонку"},"visibleRowLength":{"type":"number","title":"Отображать заданное количество строк"}},"title":"Сравнительная таблица"},"ExchangeRateTileContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"}},"title":"Курсы валют"},"ContactType":{"type":"string","enum":["tel","email"],"title":"Тип контакта","enumNames":["Телефон","Почта"]},"ContactInfo":{"type":"object","properties":{"type":{"$ref":"#/definitions/ContactType"},"description":{"type":"string","title":"Описание"},"text":{"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":"Дополнительное меню"},"relatedEnterprises":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Другие предприятия"},"contacts":{"type":"array","items":{"$ref":"#/definitions/ContactInfo"},"title":"Контакты"},"socialMedia":{"type":"array","items":{"$ref":"#/definitions/SocialMedia"},"title":"Социальные сети"},"documents":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Обязательные документы"}},"title":"Подвал","required":["topItems"]},"SitemapProps":{"type":"object","properties":{"topItems":{"type":"array","items":{"$ref":"#/definitions/TopMenuItem"},"title":"Дополнительное меню"}}},"TopMenuItem":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Ссылки"},"text":{"type":"string","title":"Текст"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}},"title":"Меню","required":["text","href"]},"GalleryCard":{"type":"object","properties":{"button":{"$ref":"#/definitions/BaseTileIconButton","title":"Ссылка"},"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"items":{"type":"array","items":{"type":"string"},"title":"Список","minItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Карточка"},"BaseTileIconButton":{"type":"object","properties":{"version":{"$ref":"#/definitions/ButtonVersion"},"aboveText":{"type":"string","title":"Верхний текст"},"icon":{"$ref":"#/definitions/IconName"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonWithIconProps":{"type":"object","properties":{"version":{"$ref":"#/definitions/ButtonVersion"},"aboveText":{"type":"string","title":"Верхний текст"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonProps":{"type":"object","properties":{"version":{"$ref":"#/definitions/ButtonVersion"},"text":{"type":"string","title":"Текст","default":"Кнопка"},"href":{"type":"string","title":"URL (href)"},"target":{"$ref":"#/definitions/Target"}}},"ButtonVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет кнопки","default":"primary","enumNames":["Основная","Второстепенная"]},"BlockVersion":{"type":"string","enum":["primary","secondary"],"title":"Цвет плитки","enumNames":["Основная","Второстепенная"]},"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":"Заголовок"},"qr":{"$ref":"#/definitions/QRCode"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4}},"title":"Мобильное приложение"},"ProductBlockInnerCommonProps":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","minItems":2,"maxItems":3},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}}},"ProductBlockContent":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"breadcrumbs":{"type":"array","items":{"$ref":"#/definitions/LinkProps"},"title":"Хлебные крошки"},"benefits":{"type":"array","items":{"$ref":"#/definitions/Benefit"},"title":"Преимущества","minItems":2,"maxItems":3},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"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"},"benefits":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","title":"Название"},"description":{"type":"string","title":"Описание"}}},"title":"Преимущества"},"items":{"type":"array","items":{"type":"string"},"title":"Список"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки","maxItems":4},"version":{"$ref":"#/definitions/BlockVersion"}},"title":"Продуктовая плитка"},"PromoTileContent":{"type":"object","properties":{"date":{"type":"string","title":"Дата публикации"},"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"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"}},"title":"Акции"},"BaseTileCommonProps":{"type":"object","properties":{"title":{"type":"string","title":"Заголовок"},"titleSize":{"$ref":"#/definitions/TitleSize","title":"Размер заголовка","default":"M"},"align":{"$ref":"#/definitions/AlignType"},"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"}},"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":{"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"}},"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":"Заголовок"},"list":{"$ref":"#/definitions/TariffsTableList"},"description":{"type":"string","title":"Описание"},"image":{"$ref":"#/definitions/Picture"},"buttons":{"type":"array","items":{"$ref":"#/definitions/BaseTileIconButton"},"title":"Кнопки"}},"title":"Ячейка"},"TariffsTableList":{"type":"object","properties":{"items":{"type":"array","items":{"type":"string"},"title":"Элементы списка"}},"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":"Заголовок"},"rowHeaders":{"type":"array","items":{"$ref":"#/definitions/TariffsTableRowHeader"},"title":"Параметры"},"columns":{"type":"array","items":{"$ref":"#/definitions/TariffsTableColumn"},"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
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
}
|
|
232
232
|
})();
|
|
233
233
|
|
|
234
|
-
const Icon = JSX(({ className, name, alt = `Icon ${name}`, title = alt, asSVG, ...imgProps }) => {
|
|
234
|
+
const Icon = JSX(({ className = '', name, alt = `Icon ${name}`, title = alt, asSVG, ...imgProps }) => {
|
|
235
235
|
const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
|
|
236
236
|
if (asSVG) {
|
|
237
237
|
return (jsxs("svg", { className: className, ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }));
|
|
@@ -239,160 +239,14 @@
|
|
|
239
239
|
return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
|
|
240
240
|
});
|
|
241
241
|
|
|
242
|
-
const MOBILE_URL_PATH = '/mobile';
|
|
243
|
-
const isURL = (href) => href?.includes('//');
|
|
244
|
-
const isHrefActive = (href, router, cmp = (href, baseHref) => href === baseHref) => {
|
|
245
|
-
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
246
|
-
};
|
|
247
|
-
const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
|
|
248
|
-
const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
|
|
249
|
-
const getOrigin = (href) => {
|
|
250
|
-
if (!isURL(href)) {
|
|
251
|
-
return undefined;
|
|
252
|
-
}
|
|
253
|
-
const url = href;
|
|
254
|
-
const protoSeparator = '//';
|
|
255
|
-
const endOfProto = url.indexOf(protoSeparator);
|
|
256
|
-
const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
|
|
257
|
-
return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
|
|
258
|
-
};
|
|
259
|
-
const adjustHref = (href, router) => {
|
|
260
|
-
if (!href) {
|
|
261
|
-
return href;
|
|
262
|
-
}
|
|
263
|
-
const relativeHref = toRelativeHref(href, router);
|
|
264
|
-
const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
|
|
265
|
-
return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
|
|
266
|
-
};
|
|
267
|
-
const toRelativeHref = (href, router) => {
|
|
268
|
-
if (!href) {
|
|
269
|
-
return href;
|
|
270
|
-
}
|
|
271
|
-
const origin = getOrigin(router?.href);
|
|
272
|
-
return origin ? href.replace(origin, '') || '/' : href;
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
var url = /*#__PURE__*/Object.freeze({
|
|
276
|
-
__proto__: null,
|
|
277
|
-
MOBILE_URL_PATH: MOBILE_URL_PATH,
|
|
278
|
-
isURL: isURL,
|
|
279
|
-
isHrefActive: isHrefActive,
|
|
280
|
-
withoutQuery: withoutQuery,
|
|
281
|
-
withoutMobilePath: withoutMobilePath,
|
|
282
|
-
getOrigin: getOrigin,
|
|
283
|
-
adjustHref: adjustHref,
|
|
284
|
-
toRelativeHref: toRelativeHref
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
const defaultHandlerDecorator = (handler) => handler;
|
|
288
|
-
function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
|
|
289
|
-
const href = adjustHref(link.href, router);
|
|
290
|
-
return {
|
|
291
|
-
...link,
|
|
292
|
-
href,
|
|
293
|
-
ariaLabel: link.text,
|
|
294
|
-
onClick: handlerDecorator((ev) => {
|
|
295
|
-
const isLocalHref = href && !isURL(href);
|
|
296
|
-
const isLocalTarget = !link.target || link.target === '_self';
|
|
297
|
-
if (isLocalHref && isLocalTarget) {
|
|
298
|
-
ev.preventDefault();
|
|
299
|
-
router.push(href);
|
|
300
|
-
}
|
|
301
|
-
}, link),
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
const listStyleMap = {
|
|
306
|
-
primary: 'bg-secondary-text w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
|
|
307
|
-
secondary: 'bg-white w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
|
|
308
|
-
};
|
|
309
|
-
const textStyleMap = {
|
|
310
|
-
primary: 'text-secondary-text',
|
|
311
|
-
secondary: '',
|
|
312
|
-
};
|
|
313
|
-
const BlockItem = JSX(({ className, isDotted = true, text, children, version = 'primary' }) => {
|
|
314
|
-
return (jsxs("div", { className: `inline-block flex ${className || ''}`, role: "listitem", children: [isDotted && jsx("div", { className: `inline-block mr-3 ${listStyleMap[version]}` }), jsx("span", { className: `text-base font-normal font-sans mr-3 ${textStyleMap[version]}`, children: text || children })] }));
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
const buttonStyleMap = {
|
|
318
|
-
primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
|
|
319
|
-
secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
|
|
320
|
-
};
|
|
321
|
-
const buttonDisabledStyleMap = {
|
|
322
|
-
primary: 'bg-secondary-dark text-secondary-text',
|
|
323
|
-
secondary: 'bg-secondary-light text-secondary-text',
|
|
324
|
-
};
|
|
325
|
-
const styleButton = 'inline-block text-center font-sans select-none';
|
|
326
|
-
const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'none', ariaLabel, ...rest }) => {
|
|
327
|
-
const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
|
|
328
|
-
if (disabled) {
|
|
329
|
-
return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
|
|
330
|
-
}
|
|
331
|
-
return (jsx("a", { className: `${styleButton} cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
|
|
332
|
-
});
|
|
333
|
-
const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded }) => {
|
|
334
|
-
const withoutText = !text && !aboveText && Boolean(appendLeft);
|
|
335
|
-
const buttonInnerClasses = `flex items-center justify-center ${withoutText ? 'h-12 w-12 min-h-12 min-w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[13px]'}`} ${rounded ? 'rounded-full' : ''}`;
|
|
336
|
-
return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, !withoutText ? (jsxs("div", { children: [jsx("div", { className: "text-xxs text-left", children: aboveText }), jsx("div", { className: "text-sm font-medium text-left", children: text })] })) : null] }));
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
const Img = JSX(({ className, image }) => (jsxs("picture", { className: `${className || ''}`, children: [image.sources?.length
|
|
340
|
-
? image.sources.map(({ src, format }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format) }, `${index}_${src}`)))
|
|
341
|
-
: null, jsx("img", { src: image.src, alt: image.alt || image.title, title: image.title, ...image?.size })] })));
|
|
342
|
-
function formatToMimeType(format) {
|
|
343
|
-
return format ? `image/${String(format)}` : undefined;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
const getColSpan = (className) => {
|
|
347
|
-
const colSpanPrefix = 'col-span-';
|
|
348
|
-
const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
|
|
349
|
-
return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
const alignFlex = {
|
|
353
|
-
left: 'justify-between',
|
|
354
|
-
center: 'justify-center',
|
|
355
|
-
right: 'justify-end',
|
|
356
|
-
};
|
|
357
|
-
const alignBlock = {
|
|
358
|
-
left: 'items-start',
|
|
359
|
-
center: 'items-center',
|
|
360
|
-
right: 'items-end',
|
|
361
|
-
};
|
|
362
242
|
const alignText = {
|
|
363
243
|
left: 'text-left',
|
|
364
244
|
center: 'text-center',
|
|
365
245
|
right: 'text-right',
|
|
366
246
|
};
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
const { handlerDecorator } = context;
|
|
371
|
-
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 w-full ${alignFlex[align]}`, children: [jsxs("div", { className: `flex flex-col justify-between ${alignBlock[align]}`, children: [jsxs("div", { children: [description ? (jsx("div", { className: `font-normal text-base mt-4 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 })] })] }));
|
|
372
|
-
});
|
|
373
|
-
function getTitleSizeByClassName(className = '') {
|
|
374
|
-
const colSpan = getColSpan(className);
|
|
375
|
-
if (colSpan <= 4) {
|
|
376
|
-
return 'S';
|
|
377
|
-
}
|
|
378
|
-
else if (colSpan <= 8) {
|
|
379
|
-
return 'M';
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
return 'L';
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
function renderItems$1(items = [], version) {
|
|
386
|
-
return (jsx("section", { className: "max-w-[600px] mt-5", role: "list", children: items.map((_, i) => (jsx(BlockItem, { className: i ? 'mt-2.5' : '', text: _, version: version }, String(i)))) }));
|
|
387
|
-
}
|
|
388
|
-
function renderButton$1({ icon, ...button }, i) {
|
|
389
|
-
if (!button?.text)
|
|
390
|
-
return;
|
|
391
|
-
return icon ? (jsx(Button, { appendLeft: jsx(Icon, { name: icon, width: "24", height: "24" }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
const Headline = JSX(({ bgColor = 'bg-white', className, ...props }) => {
|
|
395
|
-
return (jsx("section", { className: `p-10 ${bgColor} ${className || ''} `, children: jsx(BaseTile, { ...props }) }));
|
|
247
|
+
const Headline = JSX(({ bgColor = 'transparent', align = 'left', className, title, description }) => {
|
|
248
|
+
const textClasses = alignText[align];
|
|
249
|
+
return (jsxs("section", { className: `p-[50px] ${bgColor} ${className || ''} `, children: [title && (jsx(Title, { size: "L", className: `text-primary-text mt-0 font-medium ${textClasses}`, children: title })), description && (jsx("p", { className: `font-normal text-base mt-4 ${textClasses}`, children: description }))] }));
|
|
396
250
|
});
|
|
397
251
|
|
|
398
252
|
const titleAlignStyleMap = {
|
|
@@ -413,7 +267,7 @@
|
|
|
413
267
|
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
|
|
414
268
|
? documents.map(({ text, fileSize, ...linkProps }, i) => (jsxs("a", { className: `group flex text-sm align-middle h-fit
|
|
415
269
|
text-primary-text no-underline hover:text-primary-main
|
|
416
|
-
${columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : ''}`, role: "listitem", ...linkProps, children: [icon && jsx(Icon, { className: "mr-2.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))))
|
|
270
|
+
${columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : ''}`, role: "listitem", ...linkProps, children: [icon && jsx(Icon, { className: "mr-2.5 h-fit", 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))))
|
|
417
271
|
: null })] }));
|
|
418
272
|
});
|
|
419
273
|
const getExtFromHref = (href) => {
|
|
@@ -431,6 +285,19 @@
|
|
|
431
285
|
return prefix + extension + size;
|
|
432
286
|
};
|
|
433
287
|
|
|
288
|
+
const Img = JSX(({ className, image: { size, ...image } }) => {
|
|
289
|
+
const style = {
|
|
290
|
+
width: size?.width ? `${size?.width}px` : '100%',
|
|
291
|
+
height: size?.height ? `${size?.height}px` : '100%',
|
|
292
|
+
};
|
|
293
|
+
return (jsxs("picture", { className: `flex-none ${className || ''}`, children: [image.sources?.length
|
|
294
|
+
? image.sources.map(({ src, format }, index) => (jsx("source", { srcSet: src, type: formatToMimeType(format) }, `${index}_${src}`)))
|
|
295
|
+
: null, jsx("img", { src: image.src, alt: image.alt || image.title, title: image.title, style: style, ...size })] }));
|
|
296
|
+
});
|
|
297
|
+
function formatToMimeType(format) {
|
|
298
|
+
return format ? `image/${String(format)}` : undefined;
|
|
299
|
+
}
|
|
300
|
+
|
|
434
301
|
const PictureText = JSX(({ className, title, image, benefits }) => {
|
|
435
302
|
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-14 ${className}`, children: [jsx(Title, { className: "font-medium m-0 text-center", children: title }), jsxs("div", { className: 'flex justify-center mt-9', children: [image?.src && jsx(Img, { className: "mr-6", image: image }), benefits?.length ? (jsx("div", { className: "flex flex-col", children: benefits.map(renderBenefit$1) })) : null] })] }));
|
|
436
303
|
});
|
|
@@ -523,6 +390,91 @@
|
|
|
523
390
|
return { nextClick, prevClick, isScrollAvailable, showNextButton, showPrevButton };
|
|
524
391
|
};
|
|
525
392
|
|
|
393
|
+
const MOBILE_URL_PATH = '/mobile';
|
|
394
|
+
const isURL = (href) => href?.includes('//');
|
|
395
|
+
const isHrefActive = (href, router, cmp = (href, baseHref) => href === baseHref) => {
|
|
396
|
+
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
397
|
+
};
|
|
398
|
+
const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
|
|
399
|
+
const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
|
|
400
|
+
const getOrigin = (href) => {
|
|
401
|
+
if (!isURL(href)) {
|
|
402
|
+
return undefined;
|
|
403
|
+
}
|
|
404
|
+
const url = href;
|
|
405
|
+
const protoSeparator = '//';
|
|
406
|
+
const endOfProto = url.indexOf(protoSeparator);
|
|
407
|
+
const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
|
|
408
|
+
return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
|
|
409
|
+
};
|
|
410
|
+
const adjustHref = (href, router) => {
|
|
411
|
+
if (!href) {
|
|
412
|
+
return href;
|
|
413
|
+
}
|
|
414
|
+
const relativeHref = toRelativeHref(href, router);
|
|
415
|
+
const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
|
|
416
|
+
return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
|
|
417
|
+
};
|
|
418
|
+
const toRelativeHref = (href, router) => {
|
|
419
|
+
if (!href) {
|
|
420
|
+
return href;
|
|
421
|
+
}
|
|
422
|
+
const origin = getOrigin(router?.href);
|
|
423
|
+
return origin ? href.replace(origin, '') || '/' : href;
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
var url = /*#__PURE__*/Object.freeze({
|
|
427
|
+
__proto__: null,
|
|
428
|
+
MOBILE_URL_PATH: MOBILE_URL_PATH,
|
|
429
|
+
isURL: isURL,
|
|
430
|
+
isHrefActive: isHrefActive,
|
|
431
|
+
withoutQuery: withoutQuery,
|
|
432
|
+
withoutMobilePath: withoutMobilePath,
|
|
433
|
+
getOrigin: getOrigin,
|
|
434
|
+
adjustHref: adjustHref,
|
|
435
|
+
toRelativeHref: toRelativeHref
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
const defaultHandlerDecorator = (handler) => handler;
|
|
439
|
+
function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
|
|
440
|
+
const href = adjustHref(link.href, router);
|
|
441
|
+
return {
|
|
442
|
+
...link,
|
|
443
|
+
href,
|
|
444
|
+
ariaLabel: link.text,
|
|
445
|
+
onClick: handlerDecorator((ev) => {
|
|
446
|
+
const isLocalHref = href && !isURL(href);
|
|
447
|
+
const isLocalTarget = !link.target || link.target === '_self';
|
|
448
|
+
if (isLocalHref && isLocalTarget) {
|
|
449
|
+
ev.preventDefault();
|
|
450
|
+
router.push(href);
|
|
451
|
+
}
|
|
452
|
+
}, link),
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
const buttonStyleMap = {
|
|
457
|
+
primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
|
|
458
|
+
secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
|
|
459
|
+
};
|
|
460
|
+
const buttonDisabledStyleMap = {
|
|
461
|
+
primary: 'bg-secondary-dark text-secondary-text',
|
|
462
|
+
secondary: 'bg-secondary-light text-secondary-text',
|
|
463
|
+
};
|
|
464
|
+
const styleButton = 'inline-block text-center font-sans select-none';
|
|
465
|
+
const Button = JSX(({ className, text, aboveText, appendLeft, href, target, onClick, children, disabled, rounded, version = 'none', ariaLabel, ...rest }) => {
|
|
466
|
+
const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
|
|
467
|
+
if (disabled) {
|
|
468
|
+
return (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `${styleButton} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: buttonInner }));
|
|
469
|
+
}
|
|
470
|
+
return (jsx("a", { className: `${styleButton} cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: !href ? 'button' : 'link', ...rest, children: buttonInner }));
|
|
471
|
+
});
|
|
472
|
+
const ButtonInner = JSX(({ text, aboveText, appendLeft, rounded }) => {
|
|
473
|
+
const withoutText = !text && !aboveText && Boolean(appendLeft);
|
|
474
|
+
const buttonInnerClasses = `flex items-center justify-center ${withoutText ? 'h-12 w-12 min-h-12 min-w-12' : `px-8 gap-2 ${aboveText ? 'py-2' : 'py-[13px]'}`} ${rounded ? 'rounded-full' : ''}`;
|
|
475
|
+
return (jsxs("div", { className: buttonInnerClasses, children: [appendLeft ? appendLeft : null, !withoutText ? (jsxs("div", { children: [jsx("div", { className: "text-xxs text-left", children: aboveText }), jsx("div", { className: "text-sm font-medium text-left", children: text })] })) : null] }));
|
|
476
|
+
});
|
|
477
|
+
|
|
526
478
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
527
479
|
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))) }));
|
|
528
480
|
});
|
|
@@ -729,12 +681,57 @@
|
|
|
729
681
|
return (jsx("section", { className: `font-sans text-primary-text bg-white p-4 w-[847px] ${className || ''}`, children: jsxs("div", { className: `box-border p-[49px] pr-[53px] flex flex-col justify-between ${borderStyle}`, children: [jsxs("div", { className: "flex justify-between ", children: [jsxs("div", { className: "grow mr-[42px] w-[465px]", 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: [
|
|
730
682
|
`От ${addSpacesBetweenNumbers(minSum)} рублей`,
|
|
731
683
|
`До ${addSpacesBetweenNumbers(maxSum)} рублей`,
|
|
732
|
-
], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), jsx(InputRange, { className: "mt-[23px]", 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: "mt-3 mb-7", 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: "basis-[226px] shrink-0 box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-[18px]", 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" })] })] }) }));
|
|
684
|
+
], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue || defaultSum, onChange: setMoneyValue }), jsx(InputRange, { className: "mt-[23px]", 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$1(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: "mt-3 mb-7", 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: "basis-[226px] shrink-0 box-border h-fit p-9 bg-primary-main rounded-md text-white", children: [jsx("div", { className: "text-base mb-[18px]", 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" })] })] }) }));
|
|
733
685
|
});
|
|
734
|
-
function renderButton(number, i, handleClick) {
|
|
686
|
+
function renderButton$1(number, i, handleClick) {
|
|
735
687
|
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)));
|
|
736
688
|
}
|
|
737
689
|
|
|
690
|
+
const getColSpan = (className) => {
|
|
691
|
+
const colSpanPrefix = 'col-span-';
|
|
692
|
+
const colSpanStr = className.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
|
|
693
|
+
return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
const listStyleMap = {
|
|
697
|
+
primary: 'bg-secondary-text w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
|
|
698
|
+
secondary: 'bg-white w-[6px] h-[6px] min-w-[6px] min-h-[6px] mt-2.5 rounded-full',
|
|
699
|
+
};
|
|
700
|
+
const textStyleMap = {
|
|
701
|
+
primary: 'text-secondary-text',
|
|
702
|
+
secondary: '',
|
|
703
|
+
};
|
|
704
|
+
const BlockItem = JSX(({ className, isDotted = true, text, children, version = 'primary' }) => {
|
|
705
|
+
return (jsxs("div", { className: `inline-block flex ${className || ''}`, role: "listitem", children: [isDotted && jsx("div", { className: `inline-block mr-3 ${listStyleMap[version]}` }), jsx("span", { className: `text-base font-normal font-sans mr-3 ${textStyleMap[version]}`, children: text || children })] }));
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
const TITLE_CLASSES = 'font-medium m-0 whitespace-pre-wrap max-w-[600px]';
|
|
709
|
+
const BaseTile = JSX(({ className, context, title, titleSize, description, children, buttons, image, items, version = 'primary', }) => {
|
|
710
|
+
const router = context.useRouter();
|
|
711
|
+
const { handlerDecorator } = context;
|
|
712
|
+
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start`, children: [title && (jsx(Title, { size: titleSize || getTitleSizeByClassName(className), className: `${TITLE_CLASSES} ${version === 'primary' ? 'text-primary-text' : ''}`, children: title })), jsxs("div", { className: `flex grow w-full justify-between`, children: [jsxs("div", { className: `flex flex-col justify-between items-start`, children: [jsxs("div", { children: [description ? (jsx("div", { className: `font-normal text-base mt-4 max-w-[600px]`, 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(useLink({ router, handlerDecorator }, button), index)) })) : null] }), image?.src && jsx(Img, { className: "mt-auto ml-7", image: image })] })] }));
|
|
713
|
+
});
|
|
714
|
+
function getTitleSizeByClassName(className = '') {
|
|
715
|
+
const colSpan = getColSpan(className);
|
|
716
|
+
if (colSpan <= 4) {
|
|
717
|
+
return 'S';
|
|
718
|
+
}
|
|
719
|
+
else if (colSpan <= 8) {
|
|
720
|
+
return 'M';
|
|
721
|
+
}
|
|
722
|
+
else {
|
|
723
|
+
return 'L';
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
function renderItems$1(items = [], version) {
|
|
727
|
+
return (jsx("section", { className: "max-w-[600px] mt-5", role: "list", children: items.map((_, i) => (jsx(BlockItem, { className: i ? 'mt-2.5' : '', text: _, version: version }, String(i)))) }));
|
|
728
|
+
}
|
|
729
|
+
function renderButton({ icon, asSVG, ...button }, i) {
|
|
730
|
+
if (!button?.text)
|
|
731
|
+
return;
|
|
732
|
+
return icon ? (jsx(Button, { appendLeft: jsx(Icon, { name: icon, asSVG: true, width: "24", height: "24" }), ...button }, String(i))) : (jsx(Button, { ...button }, String(i)));
|
|
733
|
+
}
|
|
734
|
+
|
|
738
735
|
const tileStyleMap = {
|
|
739
736
|
primary: 'bg-white text-primary-text',
|
|
740
737
|
secondary: 'bg-primary-main text-white',
|
|
@@ -879,7 +876,7 @@
|
|
|
879
876
|
});
|
|
880
877
|
const renderColumn = (c, index, { router, handlerDecorator }) => {
|
|
881
878
|
const { text, href, items, target } = c;
|
|
882
|
-
return (jsxs("div", { className: "flex flex-col gap-[14px]", children: [jsx("a", { className: "block font-sans font-medium text-base text-primary-text no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ...useLink({ router, handlerDecorator }, _) }, String(i))))] }, String(index)));
|
|
879
|
+
return (jsxs("div", { className: "flex flex-col gap-[14px]", children: [jsx("a", { className: "block font-sans font-medium text-base text-primary-text no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ...useLink({ router, handlerDecorator }, _), index: i }, String(i))))] }, String(index)));
|
|
883
880
|
};
|
|
884
881
|
const ColumnItem = JSX(({ text, href, target, index }) => (jsx("a", { className: "block font-sans font-normal text-base text-secondary-text hover:text-primary-main no-underline", href: href, target: target || '_self', children: text || `Раздел ${index}` })));
|
|
885
882
|
|
|
@@ -1025,13 +1022,6 @@
|
|
|
1025
1022
|
const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
1026
1023
|
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
1027
1024
|
|
|
1028
|
-
const ProductBlockInner = JSX(({ className, context, title, titleSize, description, benefits, buttons, image, items }) => {
|
|
1029
|
-
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 })] }));
|
|
1030
|
-
});
|
|
1031
|
-
function renderBenefit(benefit, i) {
|
|
1032
|
-
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 max-w-[149px]", 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)));
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
1025
|
const Breadcrumb = JSX(({ text, href, target, onClick, className, children }) => {
|
|
1036
1026
|
if (href) {
|
|
1037
1027
|
return (jsx("a", { className: `no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: jsx("span", { className: `${className || ''}`, children: text || children }) }));
|
|
@@ -1045,11 +1035,38 @@
|
|
|
1045
1035
|
return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
|
|
1046
1036
|
}
|
|
1047
1037
|
|
|
1038
|
+
const benefitIconBgStyleMap = {
|
|
1039
|
+
primary: 'bg-main',
|
|
1040
|
+
secondary: 'bg-white/30',
|
|
1041
|
+
};
|
|
1042
|
+
const benefitTitleStyleMap = {
|
|
1043
|
+
primary: 'text-primary-text',
|
|
1044
|
+
secondary: 'text-white',
|
|
1045
|
+
};
|
|
1046
|
+
const benefitDescStyleMap = {
|
|
1047
|
+
primary: 'text-secondary-text',
|
|
1048
|
+
secondary: 'text-white',
|
|
1049
|
+
};
|
|
1050
|
+
const ProductBlockInner = JSX(({ className, context, title, titleSize, description, benefits, buttons, image, items, version = 'primary', }) => {
|
|
1051
|
+
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, version: version, children: benefits?.length ? (jsx("div", { className: "flex gap-6 mt-6 mb-3.5", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null }) }), image?.src && jsx(Img, { className: "mt-auto", image: image })] }));
|
|
1052
|
+
});
|
|
1053
|
+
function renderBenefit(benefit, i, version) {
|
|
1054
|
+
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] rounded-full p-[10px] box-border ${benefitIconBgStyleMap[version]}`, name: benefit.icon, width: "24", height: "24" })), jsxs("div", { className: "flex gap-1 flex-col h-full max-w-[149px]", children: [jsx("h4", { className: `font-medium text-xl m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (jsx("div", { className: `font-normal text-sm ${benefitDescStyleMap[version]}`, children: benefit.description }))] })] }, String(i)));
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
const productBlockStyleMap = {
|
|
1058
|
+
primary: 'bg-white text-primary-text',
|
|
1059
|
+
secondary: 'bg-primary-main text-white',
|
|
1060
|
+
};
|
|
1061
|
+
const breadcrumbsStyleMap = {
|
|
1062
|
+
primary: 'text-secondary-text',
|
|
1063
|
+
secondary: 'text-white/80',
|
|
1064
|
+
};
|
|
1048
1065
|
const ProductBlock$1 = JSX((props) => {
|
|
1049
|
-
const { context, className, breadcrumbs } = props;
|
|
1066
|
+
const { context, className, breadcrumbs, version = 'primary' } = props;
|
|
1050
1067
|
const router = context.useRouter();
|
|
1051
1068
|
const { handlerDecorator } = context;
|
|
1052
|
-
return (jsxs("section", { className: `font-sans
|
|
1069
|
+
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${className || ''} ${productBlockStyleMap[version]}`, children: [breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { ...props })] }));
|
|
1053
1070
|
});
|
|
1054
1071
|
|
|
1055
1072
|
const ProductGallery = JSX(({ className, context, duration = 0, slides = [] }) => {
|