ecomlab-components-next 0.1.159 → 0.1.162
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/dist/common/headers.js +2 -2
- package/dist/common/hooks/hooks.js +108 -0
- package/dist/common/hooks/useResetOnBaseURL.js +15 -0
- package/dist/common/img/icon-delete.svg +3 -0
- package/dist/common/img/icon-edit.svg +3 -0
- package/dist/common/img/noPhoto.png +0 -0
- package/dist/common/img/time_icon.svg +5 -0
- package/dist/common/img/view_icon.svg +5 -0
- package/dist/common/styles/svg_img.scss +290 -0
- package/dist/common/svg_img.js +238 -0
- package/dist/common/validationFunc.js +14 -0
- package/dist/components/ArticleComponent/Article.js +252 -0
- package/dist/components/ArticleComponent/Article.scss +289 -0
- package/dist/components/ArticleElements/ShortTileArticleBox/ShortTileArticleBox.stories.js +1 -1
- package/dist/components/ArticleMain/ArticleMain.js +451 -0
- package/dist/components/ArticleMain/ArticleMain.scss +220 -0
- package/dist/components/ArticleMain/img/table_icon.svg +3 -0
- package/dist/components/ArticleMain/img/tile-long_icon.svg +3 -0
- package/dist/components/ArticleMain/img/tile_icon.svg +3 -0
- package/dist/components/ButtonColumn/ButtonColumn.js +113 -0
- package/dist/components/ButtonColumn/ButtonColumn.scss +117 -0
- package/dist/components/ButtonColumn/img/column.svg +7 -0
- package/dist/components/ButtonCopy/ButtonCopy.js +37 -0
- package/dist/components/ButtonCopy/ButtonCopy.scss +43 -0
- package/dist/components/ButtonCopy/img/copy.svg +3 -0
- package/dist/components/ButtonExport/ButtonExport.js +83 -0
- package/dist/components/ButtonExport/ButtonExport.scss +111 -0
- package/dist/components/ButtonExport/img/export.svg +8 -0
- package/dist/components/ButtonExport/img/pdf.svg +12 -0
- package/dist/components/ButtonExport/img/xlc.svg +11 -0
- package/dist/components/ButtonUpload/ButtonUpload.js +24 -0
- package/dist/components/ButtonUpload/ButtonUpload.scss +45 -0
- package/dist/components/ButtonUpload/img/upload_icon.svg +8 -0
- package/dist/components/ConstructorComponents/Tariff/TariffPlan.js +8 -5
- package/dist/components/Page404/Page404.js +36 -0
- package/dist/components/Page404/Page404.scss +67 -0
- package/dist/components/Page404/img/banner-404.svg +16 -0
- package/dist/components/ShareComponent/ShareComponent.js +152 -0
- package/dist/components/ShareComponent/ShareComponent.scss +53 -0
- package/dist/components/ShareComponent/img/copy_icon.svg +5 -0
- package/dist/components/ShareComponent/img/facebook_icon.svg +5 -0
- package/dist/components/ShareComponent/img/linkedin_icon.svg +6 -0
- package/dist/components/ShareComponent/img/ok_icon.svg +5 -0
- package/dist/components/ShareComponent/img/share_icon.svg +5 -0
- package/dist/components/ShareComponent/img/tg_icon.svg +5 -0
- package/dist/components/ShareComponent/img/vk_icon.svg +5 -0
- package/dist/components/ShareComponent/img/whatsapp_icon.svg +5 -0
- package/dist/components/ShareComponent/img/x_icon.svg +5 -0
- package/dist/components/Table/TableBox/TableBox.stories.js +1 -1
- package/dist/components/TableInput/TableInput.js +103 -0
- package/dist/components/TableInput/TableInput.scss +35 -0
- package/dist/components/TableWithoutData/TableWithoutData.js +25 -0
- package/dist/components/TableWithoutData/TableWithoutData.scss +32 -0
- package/dist/components/TableWithoutData/img/doc_icon.png +0 -0
- package/dist/fonts/GolosText/GolosText-Black.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-Bold.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-ExtraBold.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-Medium.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-Regular.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-SemiBold.ttf +0 -0
- package/dist/fonts/Inter/Inter-Bold.otf +0 -0
- package/dist/fonts/Inter/Inter-Light.otf +0 -0
- package/dist/fonts/Inter/Inter-Medium.otf +0 -0
- package/dist/fonts/Inter/Inter-Regular.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Black.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-BlackItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-BoldItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ExtraBold.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ExtraLight.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Italic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Light.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-LightItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Medium.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-MediumItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Thin.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ThinItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Black.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-BlackItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Bold.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-BoldItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-ExtraBold.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-ExtraBoldItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-ExtraLight.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-ExtraLightItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Italic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Light.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-LightItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Regular.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-SemiBold.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-SemiBoldItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Black.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-BlackItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Bold.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-BoldItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-ExtraBold.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-ExtraBoldItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Italic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Light.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-LightItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Medium.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-MediumItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Regular.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-SemiBold.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-SemiBoldItalic.ttf +0 -0
- package/dist/index.js +7 -0
- package/dist/main.js +14 -0
- package/dist/pages/_app.js +12 -0
- package/dist/pages/_document.js +12 -0
- package/dist/pages/index.js +92 -0
- package/dist/stories/Article/Article.scss +471 -0
- package/dist/stories/Article/ArticleElement.js +108 -0
- package/dist/stories/Article/ArticleStorybook.scss +6 -0
- package/dist/stories/Article/ArticleView.js +440 -0
- package/dist/stories/Article/ArticleView.stories.js +263 -0
- package/dist/stories/Article/Feedback/Feedback.js +58 -0
- package/dist/stories/Article/Feedback/Feedback.scss +86 -0
- package/dist/stories/Article/FormBtn/FormBtn.js +170 -0
- package/dist/stories/Article/FormBtn/FormBtn.scss +446 -0
- package/dist/stories/Article/FormBtn/img/clos_icon.svg +6 -0
- package/dist/stories/Article/FormBtn/img/close-icon.svg +3 -0
- package/dist/stories/Article/ImgArticle/ImgArticle.js +204 -0
- package/dist/stories/Article/ImgArticle/ImgArticle.scss +140 -0
- package/dist/stories/Article/ListOfContent/ListOfContent.js +41 -0
- package/dist/stories/Article/ListOfContent/ListOfContent.scss +83 -0
- package/dist/stories/Article/ListOfContent/ListOfContent.stories.js +66 -0
- package/dist/stories/Article/ListOfContent/img/time_icon.svg +3 -0
- package/dist/stories/Article/ListOfContent/img/view_icon.svg +3 -0
- package/dist/stories/Article/RecommendationList/RecommendationList.js +31 -0
- package/dist/stories/Article/RecommendationList/RecommendationList.scss +41 -0
- package/dist/stories/Article/TextArticle/TextArticle.js +129 -0
- package/dist/stories/Article/TextArticle/TextArticle.scss +43 -0
- package/dist/stories/Article/TitleText/TitleText.js +30 -0
- package/dist/stories/Article/TitleText/TitleText.scss +33 -0
- package/dist/stories/Article/YellowInformationBox/YellowInformationBox.js +30 -0
- package/dist/stories/Article/YellowInformationBox/YellowInformationBox.scss +46 -0
- package/dist/stories/Article/YellowInformationBox/img/bell.svg +9 -0
- package/dist/stories/Article/img/bell.svg +9 -0
- package/dist/stories/Article/img/btn-add-round.svg +4 -0
- package/dist/stories/Article/img/calendar_icon.svg +6 -0
- package/dist/stories/Article/img/close-round.svg +3 -0
- package/dist/stories/Article/img/close.svg +9 -0
- package/dist/stories/Article/img/copy_icon.svg +5 -0
- package/dist/stories/Article/img/info.svg +9 -0
- package/dist/stories/Article/img/ok_icon.svg +5 -0
- package/dist/stories/Article/img/share_icon.svg +5 -0
- package/dist/stories/Article/img/tg_icon.svg +5 -0
- package/dist/stories/Article/img/time_icon.svg +6 -0
- package/dist/stories/Article/img/view_icon.svg +6 -0
- package/dist/stories/Article/img/vk_icon.svg +5 -0
- package/dist/stories/Article/img/whatsapp_icon.svg +5 -0
- package/dist/stories/ArticleMainContainer/ArticleMainContainer.js +540 -0
- package/dist/stories/ArticleMainContainer/ArticleMainContainer.scss +377 -0
- package/dist/stories/ArticleMainContainer/ArticleMainContainer.stories.js +75 -0
- package/dist/stories/ArticleMainContainer/main/page.js +1 -0
- package/dist/stories/ArticleMinBox/ArticleMinBox.js +172 -0
- package/dist/stories/ArticleMinBox/ArticleMinBox.scss +38 -0
- package/dist/stories/ArticleMinBox/ArticleMinBox.stories.js +56 -0
- package/dist/stories/BasicSelection/BasicSelection.js +143 -0
- package/dist/stories/BasicSelection/BasicSelection.scss +97 -0
- package/dist/stories/BasicSelection/BasicSelection.stories.js +32 -0
- package/dist/stories/Breadcrumb/Breadcrumb.js +113 -0
- package/dist/stories/Breadcrumb/Breadcrumb.scss +92 -0
- package/dist/stories/Breadcrumb/Breadcrums.stories.js +31 -0
- package/dist/stories/Breadcrumb/img/drop-right.svg +3 -0
- package/dist/stories/Breadcrumb/img/home_icon.svg +5 -0
- package/dist/stories/ButtonBasic/ButtonBasic.js +70 -0
- package/dist/stories/ButtonBasic/ButtonBasic.scss +242 -0
- package/dist/stories/ButtonBasic/ButtonBasic.stories.js +60 -0
- package/dist/stories/Checkbox/Checkbox.js +70 -0
- package/dist/stories/Checkbox/Checkbox.scss +128 -0
- package/dist/stories/Checkbox/Checkbox.stories.js +49 -0
- package/dist/stories/Checkbox/img/check.svg +3 -0
- package/dist/stories/CheckboxToggle/CheckboxToggle.js +54 -0
- package/dist/stories/CheckboxToggle/CheckboxToggle.scss +117 -0
- package/dist/stories/CheckboxToggle/CheckboxToggle.stories.js +26 -0
- package/dist/stories/DropDownSelector/DownSelector.js +352 -0
- package/dist/stories/DropDownSelector/DownSelector.stories.js +161 -0
- package/dist/stories/DropDownSelector/DropdownSelector.scss +272 -0
- package/dist/stories/DropDownSelector/img/close_icon.svg +6 -0
- package/dist/stories/DropDownSelector/img/close_icon_disabled.svg +6 -0
- package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.js +162 -0
- package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.scss +475 -0
- package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.stories.js +50 -0
- package/dist/stories/InputDinamycPlaceholder/img/close_grey.svg +5 -0
- package/dist/stories/InputDinamycPlaceholder/img/close_red.svg +5 -0
- package/dist/stories/InputDinamycPlaceholder/img/hide.svg +12 -0
- package/dist/stories/InputDinamycPlaceholder/img/info_tooltip.svg +12 -0
- package/dist/stories/InputDinamycPlaceholder/img/show.svg +3 -0
- package/dist/stories/InputDynamicWidth/InputDynamicWidth.js +85 -0
- package/dist/stories/InputDynamicWidth/InputDynamicWidth.scss +98 -0
- package/dist/stories/InputDynamicWidth/InputDynamicWidth.stories.js +32 -0
- package/dist/stories/InputDynamicWidth/img/close_icon.svg +3 -0
- package/dist/stories/InputDynamicWidth/img/search_icon.svg +6 -0
- package/dist/stories/LongTileArticleBox/LongTileArticleBox.js +168 -0
- package/dist/stories/LongTileArticleBox/LongTileArticleBox.scss +360 -0
- package/dist/stories/LongTileArticleBox/LongTileArticleBox.stories.js +39 -0
- package/dist/stories/LongTileArticleBox/img/arrow_blue.svg +6 -0
- package/dist/stories/LongTileArticleBox/img/calendar_icon.svg +6 -0
- package/dist/stories/LongTileArticleBox/img/copy_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/ok_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/share_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/tag_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/tg_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/time_icon.svg +6 -0
- package/dist/stories/LongTileArticleBox/img/view_icon.svg +6 -0
- package/dist/stories/LongTileArticleBox/img/vk_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/whatsapp_icon.svg +5 -0
- package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.js +128 -0
- package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.scss +124 -0
- package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.stories.js +19 -0
- package/dist/stories/ModalBitrixForm/ModalBitrixForm.js +236 -0
- package/dist/stories/ModalBitrixForm/ModalBitrixForm.scss +167 -0
- package/dist/stories/ModalBitrixForm/ModalBitrixForm.stories.js +101 -0
- package/dist/stories/ModalBitrixForm/img/close_icon.svg +3 -0
- package/dist/stories/ModalBitrixForm/img/done_icon.svg +3 -0
- package/dist/stories/ModalBitrixForm/img/ozon.svg +9 -0
- package/dist/stories/ModalBitrixForm/img/ozon_bkg.svg +9 -0
- package/dist/stories/MultilevelSidebar/MultilevelSidebar.js +472 -0
- package/dist/stories/MultilevelSidebar/MultilevelSidebar.scss +237 -0
- package/dist/stories/MultilevelSidebar/MultilevelSidebar.stories.js +80 -0
- package/dist/stories/MultilevelSidebar/MultilevelSidebarStorybook.scss +7 -0
- package/dist/stories/MultilevelSidebar/img/drop.svg +3 -0
- package/dist/stories/MultilevelSidebar/img/settings.svg +4 -0
- package/dist/stories/NoArticles/NoArticles.js +29 -0
- package/dist/stories/NoArticles/NoArticles.scss +26 -0
- package/dist/stories/NoArticles/NoArticles.stories.js +20 -0
- package/dist/stories/NoArticles/img/banner.svg +266 -0
- package/dist/stories/Paginator/Paginator.js +254 -0
- package/dist/stories/Paginator/Paginator.scss +168 -0
- package/dist/stories/Paginator/Paginator.stories.js +56 -0
- package/dist/stories/Paginator/img/arrow_blue.svg +3 -0
- package/dist/stories/Paginator/img/arrow_next.svg +3 -0
- package/dist/stories/Paginator/img/arrow_prev.svg +3 -0
- package/dist/stories/ResultsFound/ResultsFound.js +269 -0
- package/dist/stories/ResultsFound/ResultsFound.scss +139 -0
- package/dist/stories/ResultsFound/ResultsFound.stories.js +25 -0
- package/dist/stories/ResultsFound/img/arrow_icon.svg +5 -0
- package/dist/stories/ResultsFound/img/no-data_img.svg +13 -0
- package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.js +160 -0
- package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.scss +827 -0
- package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.stories.js +42 -0
- package/dist/stories/ShortTileArticleBox/img/arrow_blue.svg +6 -0
- package/dist/stories/ShortTileArticleBox/img/calendar_icon.svg +6 -0
- package/dist/stories/ShortTileArticleBox/img/copy_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/ok_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/share_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/tag_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/tg_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/time_icon.svg +6 -0
- package/dist/stories/ShortTileArticleBox/img/view_icon.svg +6 -0
- package/dist/stories/ShortTileArticleBox/img/vk_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/whatsapp_icon.svg +5 -0
- package/dist/stories/SliderCarousel/SliderCarousel.js +77 -0
- package/dist/stories/SliderCarousel/SliderCarousel.scss +85 -0
- package/dist/stories/SliderCarousel/SliderCarousel.stories.js +29 -0
- package/dist/stories/SliderCarousel/img/no_image.svg +3 -0
- package/dist/stories/Table/Filters/OptionsDate.js +208 -0
- package/dist/stories/Table/Filters/OptionsImage.js +92 -0
- package/dist/stories/Table/Filters/OptionsImage.scss +10 -0
- package/dist/stories/Table/Filters/OptionsList.js +244 -0
- package/dist/stories/Table/Filters/OptionsNumber.js +220 -0
- package/dist/stories/Table/Filters/OptionsNumber.scss +100 -0
- package/dist/stories/Table/Filters/OptionsText.js +165 -0
- package/dist/stories/Table/Filters/OptionsText.scss +71 -0
- package/dist/stories/Table/Filters/img/FilterDefault.js +26 -0
- package/dist/stories/Table/Filters/img/FilterReset.js +41 -0
- package/dist/stories/Table/Filters/img/dropFilters.png +0 -0
- package/dist/stories/Table/Filters/img/filterDefault.svg +3 -0
- package/dist/stories/Table/Filters/img/filter_blue.svg +3 -0
- package/dist/stories/Table/Filters/img/filter_blue_background.svg +5 -0
- package/dist/stories/Table/Filters/img/filter_reset.svg +7 -0
- package/dist/stories/Table/InputWithState/InputWithState.js +36 -0
- package/dist/stories/Table/RenderFiltersTh/RenderFiltersTh.js +140 -0
- package/dist/stories/Table/RenderTd/RenderTd.js +19 -0
- package/dist/stories/Table/RenderTh/RenderTh.js +112 -0
- package/dist/stories/Table/Table.js +1568 -0
- package/dist/stories/Table/Table.scss +1524 -0
- package/dist/stories/Table/Table.stories.js +83 -0
- package/dist/stories/Table/TableChartTd/TableChartTd.js +172 -0
- package/dist/stories/Table/TableChartTd/TableChartTd.scss +0 -0
- package/dist/stories/Table/TdDate/TdDate.js +36 -0
- package/dist/stories/Table/TdDate/TdDate.scss +0 -0
- package/dist/stories/Table/TdDate.js +34 -0
- package/dist/stories/Table/TypeTdImage.js +85 -0
- package/dist/stories/Table/img/Search.png +0 -0
- package/dist/stories/Table/img/SortArrow.js +12 -0
- package/dist/stories/Table/img/SortArrowUp.js +12 -0
- package/dist/stories/Table/img/SortTable.js +14 -0
- package/dist/stories/Table/img/close_icon.svg +7 -0
- package/dist/stories/Table/img/close_white.svg +3 -0
- package/dist/stories/Table/img/context-menu.svg +6 -0
- package/dist/stories/Table/img/contextMenuBtn.png +0 -0
- package/dist/stories/Table/img/delete_icon.svg +8 -0
- package/dist/stories/Table/img/dropFilters.png +0 -0
- package/dist/stories/Table/img/filter.png +0 -0
- package/dist/stories/Table/img/filterDefault.png +0 -0
- package/dist/stories/Table/img/filter_blue.svg +3 -0
- package/dist/stories/Table/img/filter_blue_background.svg +5 -0
- package/dist/stories/Table/img/imageNotFound.svg +3 -0
- package/dist/stories/Table/img/location.svg +3 -0
- package/dist/stories/Table/img/sort_arrow_down.svg +6 -0
- package/dist/stories/Table/img/sort_arrow_up.svg +4 -0
- package/dist/stories/Table/img/sort_table.svg +8 -0
- package/dist/stories/Table/svg_img.js +8 -0
- package/dist/stories/TableBox/TableBox.js +304 -0
- package/dist/stories/TableBox/TableBox.scss +418 -0
- package/dist/stories/TableBox/TableBox.stories.js +124 -0
- package/dist/stories/TableBox/img/delete_icon.svg +9 -0
- package/dist/stories/TableBox/img/forward_icon.svg +9 -0
- package/dist/stories/TableBox/img/more_icon.svg +10 -0
- package/dist/stories/TableBox/img_stories/tag_icon.svg +5 -0
- package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.js +91 -0
- package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.scss +124 -0
- package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.stories.js +29 -0
- package/dist/stories/TitleContentEditable/TitleContentEditable.js +71 -0
- package/dist/stories/TitleContentEditable/TitleContentEditable.scss +69 -0
- package/dist/stories/TitleContentEditable/TitleContentEditable.stories.js +37 -0
- package/dist/stories/ViewSwitch/ViewSwitch.js +48 -0
- package/dist/stories/ViewSwitch/ViewSwitch.scss +135 -0
- package/dist/stories/ViewSwitch/ViewSwitch.stories.js +48 -0
- package/dist/stories/ViewSwitch/img/Chat.js +24 -0
- package/dist/stories/ViewSwitch/img/Table.js +21 -0
- package/dist/stories/ViewSwitch/img/Tile.js +20 -0
- package/dist/stories/ViewSwitch/img/TileLong.js +20 -0
- package/dist/styles/font.scss +93 -0
- package/dist/styles/globals.scss +66 -0
- package/package.json +1 -1
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
.modal-feedback-2 {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
padding: 32px;
|
|
5
|
+
gap: 24px;
|
|
6
|
+
align-items: center;
|
|
7
|
+
position: relative;
|
|
8
|
+
z-index: 1000;
|
|
9
|
+
display: flex;
|
|
10
|
+
width: auto;
|
|
11
|
+
min-width: 360px;
|
|
12
|
+
margin-left: auto;
|
|
13
|
+
margin-right: auto;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
background: var(--white, #FFF);
|
|
18
|
+
box-shadow: 0px 12px 32px 0px rgba(0, 0, 0, 0.12);
|
|
19
|
+
position: relative;
|
|
20
|
+
height: fit-content;
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
|
|
23
|
+
.b24-form-wrapper.b24-form-shadow {
|
|
24
|
+
box-shadow: none;
|
|
25
|
+
-webkit-box-shadow: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.btn-close {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
position: absolute;
|
|
31
|
+
width: 50px;
|
|
32
|
+
height: 50px;
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
border: none;
|
|
37
|
+
background-color: inherit;
|
|
38
|
+
top: 10px;
|
|
39
|
+
right: 10px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.b24-form-inner-box {
|
|
43
|
+
background-color: white;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.b24-form-sign {
|
|
47
|
+
padding-left: 0;
|
|
48
|
+
padding-right: 0;
|
|
49
|
+
background-color: white;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.b24-form-header,
|
|
53
|
+
.b24-form-padding-side {
|
|
54
|
+
form {
|
|
55
|
+
margin-top: 24px;
|
|
56
|
+
|
|
57
|
+
div {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
border: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.b24-form-header-title {
|
|
67
|
+
color: var(--, #464853);
|
|
68
|
+
text-align: center;
|
|
69
|
+
font-family: Inter;
|
|
70
|
+
font-size: 30px;
|
|
71
|
+
font-style: normal;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
line-height: 160%;
|
|
74
|
+
/* 48px */
|
|
75
|
+
letter-spacing: 0.15px;
|
|
76
|
+
margin-bottom: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.b24-form-control {
|
|
80
|
+
height: 60px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.b24-form-content,
|
|
84
|
+
.b24-form-padding-side {
|
|
85
|
+
padding: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.b24-form-btn-block {
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.b24-form-btn {
|
|
93
|
+
border-radius: var(--Main-System-10px, 10px);
|
|
94
|
+
background: #00B45E;
|
|
95
|
+
width: 100%;
|
|
96
|
+
height: 60px;
|
|
97
|
+
color: var(--, #FFF);
|
|
98
|
+
text-align: center;
|
|
99
|
+
font-family: Inter;
|
|
100
|
+
font-size: 20px;
|
|
101
|
+
font-style: normal;
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
line-height: 160%;
|
|
104
|
+
/* 32px */
|
|
105
|
+
letter-spacing: 0.1px;
|
|
106
|
+
|
|
107
|
+
&:hover {
|
|
108
|
+
background: #15803D;
|
|
109
|
+
transition: 0.5s;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.b24-form-header-description {
|
|
114
|
+
color: var(--, #464853);
|
|
115
|
+
text-align: center;
|
|
116
|
+
font-family: Inter;
|
|
117
|
+
font-size: 20px;
|
|
118
|
+
font-style: normal;
|
|
119
|
+
font-weight: 500;
|
|
120
|
+
line-height: 160%;
|
|
121
|
+
/* 32px */
|
|
122
|
+
letter-spacing: 0.1px;
|
|
123
|
+
margin-bottom: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.b24-form-field,
|
|
127
|
+
.b24-form-field-name,
|
|
128
|
+
.b24-form-control-string,
|
|
129
|
+
.b24-form-control-alert {
|
|
130
|
+
.b24-form-control-label {
|
|
131
|
+
position: absolute;
|
|
132
|
+
top: -10px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.b24-form-control-alert {
|
|
137
|
+
margin-bottom: 15 !important;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.b24-form-field {
|
|
141
|
+
margin-bottom: 24px;
|
|
142
|
+
-webkit-transition: 200ms linear margin-bottom;
|
|
143
|
+
-o-transition: 200ms linear margin-bottom;
|
|
144
|
+
transition: 200ms linear margin-bottom;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.b24-form-control-container,
|
|
148
|
+
.b24-form-control-icon-after {
|
|
149
|
+
width: 100%;
|
|
150
|
+
border-radius: 10px;
|
|
151
|
+
background: #F4F5F9;
|
|
152
|
+
border: none;
|
|
153
|
+
color: var(--, #464853);
|
|
154
|
+
font-family: Inter;
|
|
155
|
+
font-size: 20px;
|
|
156
|
+
font-style: normal;
|
|
157
|
+
font-weight: 600;
|
|
158
|
+
line-height: 160%;
|
|
159
|
+
letter-spacing: 0.1px;
|
|
160
|
+
resize: none;
|
|
161
|
+
border: none;
|
|
162
|
+
|
|
163
|
+
.b24-form-control-label {
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: -20px;
|
|
166
|
+
color: #8E91A1;
|
|
167
|
+
font-family: Inter;
|
|
168
|
+
font-size: 16px;
|
|
169
|
+
font-style: normal;
|
|
170
|
+
font-weight: 500;
|
|
171
|
+
line-height: 20px;
|
|
172
|
+
transform: none;
|
|
173
|
+
flex-direction: row;
|
|
174
|
+
|
|
175
|
+
.b24-form-control-required {
|
|
176
|
+
position: relative;
|
|
177
|
+
left: .1em;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.b24-form-icon-after,
|
|
182
|
+
.b24-form-icon-remove {
|
|
183
|
+
background-image: url('./img/close-icon.svg');
|
|
184
|
+
background-repeat: no-repeat;
|
|
185
|
+
background-position: center;
|
|
186
|
+
|
|
187
|
+
&::after,
|
|
188
|
+
&::before {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
.b24-form-control:focus+.b24-form-control-label {
|
|
197
|
+
position: absolute;
|
|
198
|
+
top: -20px;
|
|
199
|
+
color: #8E91A1;
|
|
200
|
+
font-family: Inter;
|
|
201
|
+
font-size: 16px;
|
|
202
|
+
font-style: normal;
|
|
203
|
+
font-weight: 500;
|
|
204
|
+
line-height: 20px;
|
|
205
|
+
transform: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.b24-form-control,
|
|
209
|
+
.b24-form-control-not-empty {
|
|
210
|
+
width: 100%;
|
|
211
|
+
padding: 0;
|
|
212
|
+
border-radius: var(--Main-System-10px, 10px);
|
|
213
|
+
background: #F4F5F9;
|
|
214
|
+
border: none;
|
|
215
|
+
color: var(--, #464853);
|
|
216
|
+
font-family: Inter;
|
|
217
|
+
font-size: 20px;
|
|
218
|
+
font-style: normal;
|
|
219
|
+
font-weight: 600;
|
|
220
|
+
line-height: 160%;
|
|
221
|
+
padding-left: 20px;
|
|
222
|
+
padding-right: 20px;
|
|
223
|
+
letter-spacing: 0.1px;
|
|
224
|
+
border: none;
|
|
225
|
+
border-radius: 10px;
|
|
226
|
+
|
|
227
|
+
// &:-webkit-autofill {
|
|
228
|
+
// background: #F4F5F9 !important;
|
|
229
|
+
// }
|
|
230
|
+
|
|
231
|
+
&:-webkit-autofill,
|
|
232
|
+
&:-webkit-autofill:hover,
|
|
233
|
+
&:-webkit-autofill:focus {
|
|
234
|
+
-webkit-box-shadow: 0 0 0px 1000px #F4F5F9 inset;
|
|
235
|
+
transition: background-color 5000s ease-in-out 0s;
|
|
236
|
+
border-radius: 10px !important;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&:focus {
|
|
240
|
+
outline: none;
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.b24-form-content,
|
|
248
|
+
.b24-form-padding-side {
|
|
249
|
+
display: flex;
|
|
250
|
+
flex-direction: column;
|
|
251
|
+
gap: 12px;
|
|
252
|
+
margin-bottom: 22px;
|
|
253
|
+
|
|
254
|
+
.input-box {
|
|
255
|
+
display: flex;
|
|
256
|
+
flex-direction: column;
|
|
257
|
+
|
|
258
|
+
.text_name-field {
|
|
259
|
+
color: #8E91A1;
|
|
260
|
+
font-family: Inter;
|
|
261
|
+
font-size: 20px;
|
|
262
|
+
font-style: normal;
|
|
263
|
+
font-weight: 600;
|
|
264
|
+
line-height: 160%;
|
|
265
|
+
letter-spacing: 0.1px;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
textarea {
|
|
271
|
+
width: 100%;
|
|
272
|
+
height: 120px;
|
|
273
|
+
border-radius: 10px;
|
|
274
|
+
background: #F4F5F9;
|
|
275
|
+
border: none;
|
|
276
|
+
color: var(--, #464853);
|
|
277
|
+
font-family: Inter;
|
|
278
|
+
font-size: 20px;
|
|
279
|
+
font-style: normal;
|
|
280
|
+
font-weight: 600;
|
|
281
|
+
line-height: 160%;
|
|
282
|
+
padding-left: 20px;
|
|
283
|
+
padding-right: 20px;
|
|
284
|
+
letter-spacing: 0.1px;
|
|
285
|
+
resize: none;
|
|
286
|
+
padding-top: 16px;
|
|
287
|
+
padding-bottom: 16px;
|
|
288
|
+
|
|
289
|
+
&:focus {
|
|
290
|
+
outline: none;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.text_info {
|
|
296
|
+
max-width: 300px;
|
|
297
|
+
text-align: center;
|
|
298
|
+
margin-top: 28px;
|
|
299
|
+
color: #696C7B;
|
|
300
|
+
font-family: Inter;
|
|
301
|
+
font-size: 15px;
|
|
302
|
+
font-style: normal;
|
|
303
|
+
font-weight: 400;
|
|
304
|
+
line-height: 130%;
|
|
305
|
+
letter-spacing: 0.075px;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
body {
|
|
311
|
+
.blackout {
|
|
312
|
+
display: flex;
|
|
313
|
+
width: 100%;
|
|
314
|
+
height: 100%;
|
|
315
|
+
min-height: 100vh;
|
|
316
|
+
z-index: 10;
|
|
317
|
+
position: fixed;
|
|
318
|
+
overflow: hidden;
|
|
319
|
+
align-items: center;
|
|
320
|
+
justify-content: center;
|
|
321
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
322
|
+
padding: 20px;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
@media (max-width: 420px) {
|
|
327
|
+
.modal-feedback {
|
|
328
|
+
margin-left: 10px;
|
|
329
|
+
margin-right: 10px;
|
|
330
|
+
max-width: calc(100% - 20px);
|
|
331
|
+
position: absolute;
|
|
332
|
+
top: 12px;
|
|
333
|
+
padding: 24px 16px;
|
|
334
|
+
min-width: 340px;
|
|
335
|
+
|
|
336
|
+
.btn-close {
|
|
337
|
+
width: 24px;
|
|
338
|
+
height: 24px;
|
|
339
|
+
top: 10px;
|
|
340
|
+
right: 10px;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.title {
|
|
344
|
+
max-width: 80%;
|
|
345
|
+
font-size: 24px;
|
|
346
|
+
line-height: 32px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.text {
|
|
350
|
+
font-size: 16px;
|
|
351
|
+
line-height: 20px;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.input-group {
|
|
355
|
+
width: 100%;
|
|
356
|
+
|
|
357
|
+
.input-box {
|
|
358
|
+
.text_name-field {
|
|
359
|
+
font-size: 16px;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
input {
|
|
363
|
+
width: 100%;
|
|
364
|
+
height: 50px;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.text_info {
|
|
369
|
+
margin-top: 8px;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.b24-form-btn-block {
|
|
375
|
+
|
|
376
|
+
// .b24-form-btn {
|
|
377
|
+
// background-color: #4285F4;
|
|
378
|
+
|
|
379
|
+
// }
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.blackout {
|
|
384
|
+
display: flex;
|
|
385
|
+
width: 100%;
|
|
386
|
+
height: 100%;
|
|
387
|
+
min-height: 100vh;
|
|
388
|
+
z-index: 10;
|
|
389
|
+
position: fixed;
|
|
390
|
+
overflow: auto;
|
|
391
|
+
align-items: center;
|
|
392
|
+
justify-content: center;
|
|
393
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
394
|
+
padding: 20px;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.form-consultation {
|
|
398
|
+
display: flex;
|
|
399
|
+
flex-direction: column;
|
|
400
|
+
align-items: center;
|
|
401
|
+
justify-content: center;
|
|
402
|
+
width: 100%;
|
|
403
|
+
padding: 30px;
|
|
404
|
+
gap: 10px;
|
|
405
|
+
|
|
406
|
+
.text_blue {
|
|
407
|
+
color: #9959FC;
|
|
408
|
+
text-align: center;
|
|
409
|
+
font-family: "Golos Text";
|
|
410
|
+
font-size: 28px;
|
|
411
|
+
font-style: normal;
|
|
412
|
+
font-weight: 500;
|
|
413
|
+
line-height: 28px;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.text_grey {
|
|
417
|
+
color: var(--globalparcing-grayscale-800, #434C5B);
|
|
418
|
+
text-align: center;
|
|
419
|
+
font-family: "Golos Text";
|
|
420
|
+
font-size: 20px;
|
|
421
|
+
font-style: normal;
|
|
422
|
+
font-weight: 500;
|
|
423
|
+
line-height: 28px;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
@media(max-width: 430px) {
|
|
428
|
+
.form-consultation {
|
|
429
|
+
padding: 0px;
|
|
430
|
+
|
|
431
|
+
.text_blue {
|
|
432
|
+
font-size: 22px;
|
|
433
|
+
line-height: 28px;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.text_grey {
|
|
437
|
+
font-size: 16px;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.violet-btn {
|
|
441
|
+
min-width: 100% !important;
|
|
442
|
+
max-width: 100% !important;
|
|
443
|
+
font-size: 16px !important;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Group 418">
|
|
3
|
+
<circle id="Ellipse 999" cx="6.5" cy="6.5" r="5.5" stroke="#0B110B" stroke-width="2"/>
|
|
4
|
+
<path id="Vector 141" d="M12.2929 14.7071C12.6834 15.0976 13.3166 15.0976 13.7071 14.7071C14.0976 14.3166 14.0976 13.6834 13.7071 13.2929L12.2929 14.7071ZM9.29289 11.7071L12.2929 14.7071L13.7071 13.2929L10.7071 10.2929L9.29289 11.7071Z" fill="#0B110B"/>
|
|
5
|
+
</g>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path id="Union" d="M17.4705 2.73916C18.0807 2.12897 18.0807 1.13965 17.4705 0.529454C16.8603 -0.0807407 15.871 -0.0807407 15.2608 0.529454L8.99998 6.79029L2.73915 0.529454C2.12896 -0.0807393 1.13964 -0.08074 0.529442 0.529454C-0.0807518 1.13965 -0.0807513 2.12897 0.529442 2.73916L6.79027 9L0.529423 15.2608C-0.0807708 15.871 -0.0807714 16.8604 0.529423 17.4706C1.13962 18.0807 2.12894 18.0807 2.73913 17.4706L8.99998 11.2097L15.2608 17.4706C15.871 18.0808 16.8603 18.0808 17.4705 17.4706C18.0807 16.8604 18.0807 15.871 17.4705 15.2608L11.2097 9L17.4705 2.73916Z" fill="#464853"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ImgArticle = void 0;
|
|
8
|
+
var _universalCookie = _interopRequireDefault(require("universal-cookie"));
|
|
9
|
+
var _noPhoto = _interopRequireDefault(require("../../../common/img/noPhoto.png"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _InputDinamycPlaceholder = _interopRequireDefault(require("../../InputDinamycPlaceholder/InputDinamycPlaceholder"));
|
|
12
|
+
require("./ImgArticle.scss");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
20
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
22
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
24
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
25
|
+
var ImgArticle = exports.ImgArticle = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
26
|
+
var data = _ref.data,
|
|
27
|
+
editMode = _ref.editMode,
|
|
28
|
+
onChange = _ref.onChange;
|
|
29
|
+
var _useState = (0, _react.useState)(""),
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
extension = _useState2[0],
|
|
32
|
+
setExtension = _useState2[1];
|
|
33
|
+
var _useState3 = (0, _react.useState)(false),
|
|
34
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
35
|
+
error = _useState4[0],
|
|
36
|
+
setError = _useState4[1];
|
|
37
|
+
var _useState5 = (0, _react.useState)(false),
|
|
38
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
39
|
+
isOpen = _useState6[0],
|
|
40
|
+
setOpen = _useState6[1];
|
|
41
|
+
var fileInputRef = (0, _react.useRef)();
|
|
42
|
+
// const showPlaceholder = (data === undefined || data === '') && uploadedImage === undefined
|
|
43
|
+
var cookies = new _universalCookie["default"]();
|
|
44
|
+
var token = cookies.get('auth');
|
|
45
|
+
var activeLang = localStorage.getItem('lang');
|
|
46
|
+
var _useState7 = (0, _react.useState)(null),
|
|
47
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
48
|
+
objImg = _useState8[0],
|
|
49
|
+
setObjImg = _useState8[1];
|
|
50
|
+
var _useState9 = (0, _react.useState)(data === null || data === void 0 ? void 0 : data.alt),
|
|
51
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
52
|
+
altValue = _useState10[0],
|
|
53
|
+
setAltValue = _useState10[1];
|
|
54
|
+
var translatePlaceholderOpen = function translatePlaceholderOpen() {
|
|
55
|
+
if (activeLang == 'rus') return 'Открыть изображение';
|
|
56
|
+
if (activeLang == 'eng') return 'Open image';
|
|
57
|
+
if (activeLang == 'tur') return "Resmi büyüt";
|
|
58
|
+
return 'Открыть изображение';
|
|
59
|
+
};
|
|
60
|
+
var translatePlaceholderSelected = function translatePlaceholderSelected() {
|
|
61
|
+
if (activeLang == 'rus') return 'Выберите изображение';
|
|
62
|
+
if (activeLang == 'eng') return 'Select an image';
|
|
63
|
+
if (activeLang == 'tur') return "Bir resim seçin";
|
|
64
|
+
return 'Выберите изображение';
|
|
65
|
+
};
|
|
66
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
67
|
+
return {
|
|
68
|
+
error: error,
|
|
69
|
+
// прикрутить открытие системного диалога с выбором изображения
|
|
70
|
+
focus: function focus() {},
|
|
71
|
+
data: objImg
|
|
72
|
+
};
|
|
73
|
+
}, [objImg]);
|
|
74
|
+
var fetchPostImg = function fetchPostImg(file) {
|
|
75
|
+
var fd = new FormData();
|
|
76
|
+
fd.append('images', file);
|
|
77
|
+
var url = "https://apps1.ecomru.ru:6001/redactor/images";
|
|
78
|
+
var requestHeaders = {
|
|
79
|
+
'Accept': 'application/json',
|
|
80
|
+
'Cache-control': 'no-cache',
|
|
81
|
+
'Authorization': "Bearer ".concat(token)
|
|
82
|
+
};
|
|
83
|
+
fetch(url, {
|
|
84
|
+
body: fd,
|
|
85
|
+
method: 'POST',
|
|
86
|
+
headers: requestHeaders
|
|
87
|
+
}).then(function (res) {
|
|
88
|
+
if (res.ok) {
|
|
89
|
+
return res.json();
|
|
90
|
+
} else {
|
|
91
|
+
throw new Error('bad table response');
|
|
92
|
+
}
|
|
93
|
+
}).then(function (json) {
|
|
94
|
+
if (json.images) {
|
|
95
|
+
var _json$images;
|
|
96
|
+
setObjImg({
|
|
97
|
+
value: (_json$images = json.images) === null || _json$images === void 0 || (_json$images = _json$images[0]) === null || _json$images === void 0 ? void 0 : _json$images.url
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
})["catch"](function (err) {
|
|
101
|
+
console.log(err);
|
|
102
|
+
})["finally"](function () {
|
|
103
|
+
mapContentToApiRequest(contentData);
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
var handleImageClick = function handleImageClick(e) {
|
|
107
|
+
if (!editMode) {
|
|
108
|
+
var html = document.querySelector('html');
|
|
109
|
+
html.style = 'overflow: hidden';
|
|
110
|
+
setOpen(!isOpen);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (fileInputRef.current) {
|
|
114
|
+
fileInputRef.current.click();
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
var handleFileInput = function handleFileInput(e) {
|
|
118
|
+
if (e.target.files.length === 0) {
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
var fileBase64Reader = new FileReader();
|
|
123
|
+
fileBase64Reader.onload = function () {
|
|
124
|
+
var _fileBase64Reader$res, _extensionAndBase64$;
|
|
125
|
+
var re = /;base64,/;
|
|
126
|
+
var extensionAndBase64 = (_fileBase64Reader$res = fileBase64Reader.result) === null || _fileBase64Reader$res === void 0 ? void 0 : _fileBase64Reader$res.split(re);
|
|
127
|
+
var onlyExtension = (_extensionAndBase64$ = extensionAndBase64[0]) === null || _extensionAndBase64$ === void 0 ? void 0 : _extensionAndBase64$.split('image/')[1];
|
|
128
|
+
setExtension(onlyExtension);
|
|
129
|
+
fetchPostImg(e.target.files[0]);
|
|
130
|
+
};
|
|
131
|
+
fileBase64Reader.readAsDataURL(e.target.files[0]);
|
|
132
|
+
setError(false);
|
|
133
|
+
onChange();
|
|
134
|
+
};
|
|
135
|
+
(0, _react.useEffect)(function () {
|
|
136
|
+
setObjImg({
|
|
137
|
+
value: data === null || data === void 0 ? void 0 : data.value,
|
|
138
|
+
alt: data === null || data === void 0 ? void 0 : data.alt
|
|
139
|
+
});
|
|
140
|
+
}, [data]);
|
|
141
|
+
(0, _react.useEffect)(function () {
|
|
142
|
+
if (!isOpen) {
|
|
143
|
+
var html = document.querySelector('html');
|
|
144
|
+
html.style = 'overflow: unset';
|
|
145
|
+
}
|
|
146
|
+
}, [isOpen]);
|
|
147
|
+
(0, _react.useEffect)(function () {
|
|
148
|
+
setObjImg(function (prev) {
|
|
149
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
150
|
+
alt: altValue
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
}, [altValue]);
|
|
154
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
155
|
+
className: "img-container",
|
|
156
|
+
onClick: handleImageClick
|
|
157
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
158
|
+
className: "blackout",
|
|
159
|
+
style: {
|
|
160
|
+
display: isOpen ? 'flex' : 'none'
|
|
161
|
+
}
|
|
162
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
className: "img-box"
|
|
164
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
165
|
+
className: "img",
|
|
166
|
+
src: objImg === null || objImg === void 0 ? void 0 : objImg.value
|
|
167
|
+
}))), /*#__PURE__*/React.createElement("button", {
|
|
168
|
+
className: editMode ? 'img-container__button' : 'img-container__button__readonly'
|
|
169
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
170
|
+
src: objImg !== null && objImg !== void 0 && objImg.value ? objImg === null || objImg === void 0 ? void 0 : objImg.value : _noPhoto["default"],
|
|
171
|
+
onError: function onError(e) {
|
|
172
|
+
e.target.src = _noPhoto["default"];
|
|
173
|
+
setError(true);
|
|
174
|
+
},
|
|
175
|
+
className: "img",
|
|
176
|
+
extension: extension,
|
|
177
|
+
alt: altValue ? altValue : ''
|
|
178
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
179
|
+
className: "hidden-placeholder"
|
|
180
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
181
|
+
className: "text"
|
|
182
|
+
}, objImg ? translatePlaceholderOpen() : translatePlaceholderSelected()))), /*#__PURE__*/React.createElement("input", {
|
|
183
|
+
name: "uploadedImage",
|
|
184
|
+
ref: fileInputRef,
|
|
185
|
+
className: "img-container__file-input",
|
|
186
|
+
type: "file",
|
|
187
|
+
onChange: handleFileInput,
|
|
188
|
+
accept: "image/png, image/jpeg"
|
|
189
|
+
}), editMode && /*#__PURE__*/React.createElement("div", {
|
|
190
|
+
className: "link_modal",
|
|
191
|
+
onClick: function onClick(e) {
|
|
192
|
+
return e.stopPropagation();
|
|
193
|
+
}
|
|
194
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
195
|
+
className: "link_modal_container"
|
|
196
|
+
}, /*#__PURE__*/React.createElement(_InputDinamycPlaceholder["default"], {
|
|
197
|
+
placeholder: "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 alt",
|
|
198
|
+
onChange: function onChange(e) {
|
|
199
|
+
return setAltValue(e);
|
|
200
|
+
},
|
|
201
|
+
changeValue: altValue,
|
|
202
|
+
autoComplete: false
|
|
203
|
+
})))));
|
|
204
|
+
});
|