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,140 @@
|
|
|
1
|
+
// @import url('../../../font.scss');
|
|
2
|
+
|
|
3
|
+
.img-container {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
height: auto;
|
|
8
|
+
max-height: 500px;
|
|
9
|
+
width: fit-content;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
border-radius: 10px;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
|
|
14
|
+
.img-container__button__readonly,
|
|
15
|
+
.img-container__button {
|
|
16
|
+
border: none;
|
|
17
|
+
background-color: inherit;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
height: 100%;
|
|
22
|
+
position: relative;
|
|
23
|
+
|
|
24
|
+
.img {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
object-fit: contain;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.hidden-placeholder {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
right: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
z-index: 1;
|
|
42
|
+
background-color: white;
|
|
43
|
+
opacity: 0.5;
|
|
44
|
+
transition: 0.3s;
|
|
45
|
+
opacity: 0;
|
|
46
|
+
visibility: hidden;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
|
|
49
|
+
.text {
|
|
50
|
+
color: #2B2B46;
|
|
51
|
+
font-family: "Golos Text";
|
|
52
|
+
font-size: 32px;
|
|
53
|
+
line-height: 1.1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:hover {
|
|
58
|
+
.hidden-placeholder {
|
|
59
|
+
visibility: visible;
|
|
60
|
+
opacity: 0.5;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
.blackout {
|
|
70
|
+
display: flex;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
min-height: 100vh;
|
|
74
|
+
z-index: 10;
|
|
75
|
+
position: fixed;
|
|
76
|
+
overflow: auto;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
background-color: rgb(0, 0, 0, 0.3);
|
|
80
|
+
padding: 20px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.img-box {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
|
|
87
|
+
.img {
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
object-fit: contain;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__placeholder {
|
|
95
|
+
width: 200px;
|
|
96
|
+
height: 200px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&__button {
|
|
100
|
+
min-width: 100%;
|
|
101
|
+
position: relative;
|
|
102
|
+
top: 0;
|
|
103
|
+
bottom: 0;
|
|
104
|
+
left: 0;
|
|
105
|
+
right: 0;
|
|
106
|
+
z-index: 0;
|
|
107
|
+
border: none;
|
|
108
|
+
border-radius: 16px;
|
|
109
|
+
background-color: unset;
|
|
110
|
+
min-height: 100px;
|
|
111
|
+
|
|
112
|
+
&__placeholder {
|
|
113
|
+
display: flex;
|
|
114
|
+
width: 400px;
|
|
115
|
+
height: 400px;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
align-items: center;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&__file-input {
|
|
122
|
+
position: absolute;
|
|
123
|
+
opacity: 0;
|
|
124
|
+
visibility: hidden;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__img {
|
|
128
|
+
display: inline-block;
|
|
129
|
+
max-width: 100%;
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: auto;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&__img-placeholder {
|
|
135
|
+
display: inline-block;
|
|
136
|
+
max-width: 100%;
|
|
137
|
+
width: 100%;
|
|
138
|
+
height: auto;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
require("./ListOfContent.scss");
|
|
8
|
+
var ListOfContent = function ListOfContent(_ref) {
|
|
9
|
+
var links = _ref.links,
|
|
10
|
+
_ref$lang = _ref.lang,
|
|
11
|
+
lang = _ref$lang === void 0 ? localStorage.getItem('lang') : _ref$lang,
|
|
12
|
+
title = _ref.title,
|
|
13
|
+
setTitle = _ref.setTitle,
|
|
14
|
+
description = _ref.description,
|
|
15
|
+
setDescription = _ref.setDescription,
|
|
16
|
+
isEdit = _ref.isEdit;
|
|
17
|
+
var linksList = links === null || links === void 0 ? void 0 : links.map(function (_ref2, index) {
|
|
18
|
+
var linkText = _ref2.linkText,
|
|
19
|
+
path = _ref2.path;
|
|
20
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
21
|
+
key: index,
|
|
22
|
+
href: "#".concat(path),
|
|
23
|
+
className: "list-of-content__link"
|
|
24
|
+
}, linkText);
|
|
25
|
+
});
|
|
26
|
+
var translateContent = function translateContent() {
|
|
27
|
+
if (lang == 'eng') return 'Table of Contents';
|
|
28
|
+
if (lang == 'tur') return 'Içerik';
|
|
29
|
+
return 'Содержание';
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
32
|
+
className: "list-of-content"
|
|
33
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: "list-of-content__content"
|
|
35
|
+
}, /*#__PURE__*/React.createElement("h4", {
|
|
36
|
+
className: "list-of-content__title"
|
|
37
|
+
}, translateContent()), /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "list-of-content__links"
|
|
39
|
+
}, linksList)));
|
|
40
|
+
};
|
|
41
|
+
var _default = exports["default"] = ListOfContent;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// @import url('../../../font.scss');
|
|
2
|
+
|
|
3
|
+
.list-of-content {
|
|
4
|
+
top: 20px;
|
|
5
|
+
height: 400px;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
padding: 24px;
|
|
10
|
+
width: 306px;
|
|
11
|
+
min-width: 306px;
|
|
12
|
+
background-color: inherit;
|
|
13
|
+
border-radius: 16px;
|
|
14
|
+
height: auto;
|
|
15
|
+
border-radius: 10px;
|
|
16
|
+
background: #FFF;
|
|
17
|
+
overflow: overlay;
|
|
18
|
+
max-height: 65vh;
|
|
19
|
+
|
|
20
|
+
&__title {
|
|
21
|
+
color: #2B2B46;
|
|
22
|
+
font-family: "Golos Text";
|
|
23
|
+
font-size: 22px;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: 28px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__seo-box {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: .5em;
|
|
33
|
+
margin-bottom: 1em;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__links {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 18px;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__content {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: 10px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__link {
|
|
50
|
+
color: #2B2B46;
|
|
51
|
+
font-family: "Golos Text";
|
|
52
|
+
font-size: 18px;
|
|
53
|
+
font-style: normal;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
line-height: 24px;
|
|
56
|
+
word-wrap: break-word;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (max-width: 1240px) {
|
|
61
|
+
.list-of-content {
|
|
62
|
+
display: none;
|
|
63
|
+
background: #FAFAFA;
|
|
64
|
+
padding: 16px;
|
|
65
|
+
width: 100%;
|
|
66
|
+
|
|
67
|
+
&__title {
|
|
68
|
+
font-size: 20px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__link {
|
|
72
|
+
font-size: 16px;
|
|
73
|
+
line-height: 20px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@media (max-width: 430px) {
|
|
80
|
+
.list-of-content {
|
|
81
|
+
padding: 8px 16px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Default = void 0;
|
|
7
|
+
var _ListOfContent = _interopRequireDefault(require("./ListOfContent"));
|
|
8
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
var _default = exports["default"] = {
|
|
11
|
+
title: 'Article/ListOfContent',
|
|
12
|
+
component: _ListOfContent["default"],
|
|
13
|
+
paramters: {
|
|
14
|
+
layout: 'centered'
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var Default = exports.Default = {
|
|
18
|
+
args: {
|
|
19
|
+
links: [{
|
|
20
|
+
linkText: 'link 1',
|
|
21
|
+
path: '#'
|
|
22
|
+
}, {
|
|
23
|
+
linkText: 'link 2',
|
|
24
|
+
path: '#'
|
|
25
|
+
}, {
|
|
26
|
+
linkText: 'link 3',
|
|
27
|
+
path: '#'
|
|
28
|
+
}, {
|
|
29
|
+
linkText: 'very looooooooooooooooooooooooooooooo oooooooo ng link 4',
|
|
30
|
+
path: '#'
|
|
31
|
+
}],
|
|
32
|
+
readonly: false,
|
|
33
|
+
readingTime: 215,
|
|
34
|
+
tags: [{
|
|
35
|
+
label: 'some tag 1',
|
|
36
|
+
value: 10
|
|
37
|
+
}, {
|
|
38
|
+
label: 'some tag 2',
|
|
39
|
+
value: 20
|
|
40
|
+
}, {
|
|
41
|
+
label: 'some tag 3',
|
|
42
|
+
value: 30
|
|
43
|
+
}],
|
|
44
|
+
selectedTags: [{
|
|
45
|
+
label: 'tag 1',
|
|
46
|
+
value: 1
|
|
47
|
+
}, {
|
|
48
|
+
label: 'tag 2',
|
|
49
|
+
value: 2
|
|
50
|
+
}, {
|
|
51
|
+
label: 'tag 3',
|
|
52
|
+
value: 3
|
|
53
|
+
}, {
|
|
54
|
+
label: 'veeeeeryyy looooooooooong tag 4',
|
|
55
|
+
value: 4
|
|
56
|
+
}],
|
|
57
|
+
setSelectedTags: (0, _addonActions.action)('setSelectedTags'),
|
|
58
|
+
onAddTagClick: (0, _addonActions.action)('onAddTagClick'),
|
|
59
|
+
setTitle: (0, _addonActions.action)('setTitle'),
|
|
60
|
+
setDescription: (0, _addonActions.action)('setDescription'),
|
|
61
|
+
isEdit: true,
|
|
62
|
+
views: 100500,
|
|
63
|
+
publicationDate: new Date(),
|
|
64
|
+
author: 'Константин Константинопольский'
|
|
65
|
+
}
|
|
66
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 1.75C7 1.33579 7.33579 1 7.75 1H12.25C12.6642 1 13 1.33579 13 1.75C13 2.16421 12.6642 2.5 12.25 2.5H10.75V3.03469C14.8166 3.41279 18 6.83463 18 11C18 15.4183 14.4183 19 10 19C5.58172 19 2 15.4183 2 11C2 6.83463 5.1834 3.41279 9.25 3.03469V2.5H7.75C7.33579 2.5 7 2.16421 7 1.75ZM4.78033 2.21967C5.07322 2.51256 5.07322 2.98744 4.78033 3.28033L2.28033 5.78033C1.98744 6.07323 1.51256 6.07323 1.21967 5.78033C0.926777 5.48744 0.926777 5.01257 1.21967 4.71967L3.71967 2.21967C4.01256 1.92678 4.48744 1.92678 4.78033 2.21967ZM15.2197 2.21967C15.5126 1.92678 15.9874 1.92678 16.2803 2.21967L18.7803 4.71967C19.0732 5.01257 19.0732 5.48744 18.7803 5.78033C18.4874 6.07323 18.0126 6.07323 17.7197 5.78033L15.2197 3.28033C14.9268 2.98744 14.9268 2.51256 15.2197 2.21967ZM10 4.5C6.41015 4.5 3.5 7.41015 3.5 11C3.5 14.5899 6.41015 17.5 10 17.5C13.5899 17.5 16.5 14.5899 16.5 11C16.5 7.41015 13.5899 4.5 10 4.5ZM9.75 6C10.1642 6 10.5 6.33579 10.5 6.75V10.5H12.25C12.6642 10.5 13 10.8358 13 11.25C13 11.6642 12.6642 12 12.25 12H9.75C9.33578 12 9 11.6642 9 11.25V6.75C9 6.33579 9.33578 6 9.75 6Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.61359 6.42412C4.30606 7.52165 3.27624 8.83007 2.69645 9.64489C2.60201 9.77761 2.55769 9.84094 2.528 9.89127C2.50946 9.92271 2.50594 9.93377 2.50399 9.94131C2.50399 9.94131 2.50305 9.94681 2.50227 9.954C2.50094 9.96632 2.5 9.98222 2.5 10C2.5 10.0178 2.50094 10.0337 2.50227 10.046C2.50305 10.0532 2.50399 10.0587 2.50399 10.0587C2.50594 10.0662 2.50946 10.0773 2.528 10.1087C2.55769 10.1591 2.60201 10.2224 2.69645 10.3551C3.27624 11.1699 4.30606 12.4784 5.61359 13.5759C6.93271 14.6831 8.44391 15.5 10 15.5C11.5561 15.5 13.0673 14.6831 14.3864 13.5759C15.6939 12.4784 16.7238 11.1699 17.3036 10.3551C17.398 10.2224 17.4423 10.1591 17.472 10.1087C17.4905 10.0773 17.4941 10.0662 17.496 10.0587C17.496 10.0587 17.497 10.0532 17.4977 10.046C17.4991 10.0337 17.5 10.0178 17.5 10C17.5 9.98222 17.4991 9.96632 17.4977 9.954C17.497 9.94682 17.496 9.94131 17.496 9.94131C17.4941 9.93377 17.4905 9.92272 17.472 9.89127C17.4423 9.84094 17.398 9.77761 17.3036 9.64489C16.7238 8.83007 15.6939 7.52165 14.3864 6.42412C13.0673 5.31686 11.5561 4.5 10 4.5C8.44391 4.5 6.93271 5.31686 5.61359 6.42412ZM4.64921 5.27522C6.08184 4.07268 7.92989 3 10 3C12.0701 3 13.9182 4.07268 15.3508 5.27522C16.795 6.48747 17.9094 7.90908 18.5257 8.77524C18.5358 8.78946 18.5461 8.80377 18.5564 8.8182C18.7045 9.02535 18.8698 9.25645 18.9506 9.57492C19.0165 9.83465 19.0165 10.1653 18.9506 10.4251C18.8698 10.7436 18.7045 10.9747 18.5564 11.1818C18.5461 11.1962 18.5358 11.2105 18.5257 11.2248C17.9094 12.0909 16.795 13.5125 15.3508 14.7248C13.9182 15.9273 12.0701 17 10 17C7.92989 17 6.08184 15.9273 4.64921 14.7248C3.20501 13.5125 2.0906 12.0909 1.47428 11.2248C1.46416 11.2105 1.45393 11.1962 1.44361 11.1818C1.29548 10.9747 1.13023 10.7436 1.04943 10.4251C0.983524 10.1653 0.983524 9.83465 1.04943 9.57492C1.13023 9.25644 1.29548 9.02535 1.44361 8.81819C1.45393 8.80377 1.46416 8.78945 1.47428 8.77524C2.0906 7.90908 3.20501 6.48747 4.64921 5.27522ZM10 8.5C9.17157 8.5 8.5 9.17157 8.5 10C8.5 10.8284 9.17157 11.5 10 11.5C10.8284 11.5 11.5 10.8284 11.5 10C11.5 9.17157 10.8284 8.5 10 8.5ZM7 10C7 8.34315 8.34315 7 10 7C11.6569 7 13 8.34315 13 10C13 11.6569 11.6569 13 10 13C8.34315 13 7 11.6569 7 10Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RecommendationList = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactRouterDom = require("react-router-dom");
|
|
9
|
+
require("./RecommendationList.scss");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
var RecommendationList = exports.RecommendationList = function RecommendationList(_ref) {
|
|
12
|
+
var recommendationList = _ref.recommendationList;
|
|
13
|
+
var recommendationListItems = recommendationList.map(function (_ref2, key) {
|
|
14
|
+
var title = _ref2.title;
|
|
15
|
+
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
16
|
+
key: key,
|
|
17
|
+
className: "recommendation__item"
|
|
18
|
+
}, /*#__PURE__*/_react["default"].createElement(_reactRouterDom.Link, {
|
|
19
|
+
to: "#",
|
|
20
|
+
key: title,
|
|
21
|
+
className: "recommendation__link"
|
|
22
|
+
}, title));
|
|
23
|
+
});
|
|
24
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
25
|
+
className: "recommendation"
|
|
26
|
+
}, /*#__PURE__*/_react["default"].createElement("h3", {
|
|
27
|
+
className: "title"
|
|
28
|
+
}, "\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0412\u0430\u0441"), /*#__PURE__*/_react["default"].createElement("ul", {
|
|
29
|
+
className: "recommendation__list"
|
|
30
|
+
}, recommendationListItems));
|
|
31
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.recommendation {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
margin-top: 64px;
|
|
5
|
+
gap: 30px;
|
|
6
|
+
margin-bottom: 48px;
|
|
7
|
+
|
|
8
|
+
.title {
|
|
9
|
+
color: #969798;
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
text-transform: uppercase;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__list {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 32px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&__item {
|
|
22
|
+
position: relative;
|
|
23
|
+
|
|
24
|
+
&::after {
|
|
25
|
+
content: '';
|
|
26
|
+
position: absolute;
|
|
27
|
+
display: block;
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 1px;
|
|
31
|
+
background-color: #F0F0F0;
|
|
32
|
+
margin-top: 16px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__link {
|
|
37
|
+
font-size: 20px;
|
|
38
|
+
color: #1890FF;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
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.TextArticle = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _ButtonBasic = _interopRequireDefault(require("../../ButtonBasic/ButtonBasic"));
|
|
10
|
+
var _htmlReactParser = _interopRequireDefault(require("html-react-parser"));
|
|
11
|
+
require("./TextArticle.scss");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
16
|
+
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."); }
|
|
17
|
+
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; } }
|
|
18
|
+
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; }
|
|
19
|
+
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; } }
|
|
20
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
21
|
+
var TextArticle = exports.TextArticle = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
22
|
+
var data = _ref.data,
|
|
23
|
+
editMode = _ref.editMode,
|
|
24
|
+
onChange = _ref.onChange;
|
|
25
|
+
var _useState = (0, _react.useState)(data),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
content = _useState2[0],
|
|
28
|
+
setContent = _useState2[1];
|
|
29
|
+
var _useState3 = (0, _react.useState)(false),
|
|
30
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
+
showLinkModal = _useState4[0],
|
|
32
|
+
setShowLinkModal = _useState4[1];
|
|
33
|
+
var _useState5 = (0, _react.useState)(null),
|
|
34
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
+
target = _useState6[0],
|
|
36
|
+
setTarget = _useState6[1];
|
|
37
|
+
var _useState7 = (0, _react.useState)(''),
|
|
38
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
39
|
+
linkValue = _useState8[0],
|
|
40
|
+
setLinkValue = _useState8[1];
|
|
41
|
+
var _useState9 = (0, _react.useState)({}),
|
|
42
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
43
|
+
selectionData = _useState10[0],
|
|
44
|
+
setSelectionData = _useState10[1];
|
|
45
|
+
var handleInput = function handleInput(e) {
|
|
46
|
+
onChange();
|
|
47
|
+
};
|
|
48
|
+
var getSelectionText = function getSelectionText() {
|
|
49
|
+
var text = "";
|
|
50
|
+
var startIndex;
|
|
51
|
+
var endIndex;
|
|
52
|
+
var WGS = window.getSelection();
|
|
53
|
+
if (WGS) {
|
|
54
|
+
text = WGS.toString();
|
|
55
|
+
startIndex = WGS.anchorOffset;
|
|
56
|
+
endIndex = WGS.extentOffset;
|
|
57
|
+
} else if (document.selection && document.selection.type != "Control") {
|
|
58
|
+
text = document.selection.createRange().text;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
text: text,
|
|
62
|
+
startIndex: startIndex,
|
|
63
|
+
endIndex: endIndex
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
var resetData = function resetData() {
|
|
67
|
+
setSelectionData({});
|
|
68
|
+
setLinkValue('');
|
|
69
|
+
setTarget(null);
|
|
70
|
+
};
|
|
71
|
+
var replaceWithLink = function replaceWithLink(linkValue) {
|
|
72
|
+
var fullContent = target.innerText;
|
|
73
|
+
var text = selectionData.text,
|
|
74
|
+
startIndex = selectionData.startIndex,
|
|
75
|
+
endIndex = selectionData.endIndex;
|
|
76
|
+
target.innerHTML = "".concat(fullContent === null || fullContent === void 0 ? void 0 : fullContent.slice(0, startIndex), "<a class='link' href=").concat(linkValue, " target='_blank'>").concat(text, "</a>").concat(fullContent === null || fullContent === void 0 ? void 0 : fullContent.slice(endIndex, fullContent === null || fullContent === void 0 ? void 0 : fullContent.length));
|
|
77
|
+
resetData();
|
|
78
|
+
};
|
|
79
|
+
var contextMenuHandler = function contextMenuHandler(e) {
|
|
80
|
+
var _selectionObj$text;
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
var selectionObj = getSelectionText();
|
|
83
|
+
if ((selectionObj === null || selectionObj === void 0 || (_selectionObj$text = selectionObj.text) === null || _selectionObj$text === void 0 ? void 0 : _selectionObj$text.length) < 1) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
setSelectionData(selectionObj);
|
|
87
|
+
setTarget(e.target);
|
|
88
|
+
setShowLinkModal(true);
|
|
89
|
+
};
|
|
90
|
+
(0, _react.useEffect)(function () {
|
|
91
|
+
setContent((0, _htmlReactParser["default"])(data));
|
|
92
|
+
}, [editMode, data]);
|
|
93
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, showLinkModal && /*#__PURE__*/_react["default"].createElement("div", {
|
|
94
|
+
className: "link_modal",
|
|
95
|
+
onClick: function onClick() {
|
|
96
|
+
return setShowLinkModal(false);
|
|
97
|
+
}
|
|
98
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
99
|
+
onClick: function onClick(e) {
|
|
100
|
+
return e.stopPropagation();
|
|
101
|
+
},
|
|
102
|
+
className: "link_modal_container"
|
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
104
|
+
className: "link_modal_input",
|
|
105
|
+
placeholder: "\u0410\u0434\u0440\u0435\u0441 \u0441\u0441\u044B\u043B\u043A\u0438",
|
|
106
|
+
value: linkValue,
|
|
107
|
+
onChange: function onChange(e) {
|
|
108
|
+
return setLinkValue(e.target.value);
|
|
109
|
+
}
|
|
110
|
+
}), /*#__PURE__*/_react["default"].createElement(_ButtonBasic["default"], {
|
|
111
|
+
blue: true,
|
|
112
|
+
text: "\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C",
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
setShowLinkModal(false);
|
|
115
|
+
replaceWithLink(linkValue);
|
|
116
|
+
}
|
|
117
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
|
+
className: "text",
|
|
119
|
+
style: showLinkModal ? {
|
|
120
|
+
minWidth: 320,
|
|
121
|
+
minHeight: 320
|
|
122
|
+
} : {},
|
|
123
|
+
suppressContentEditableWarning: true,
|
|
124
|
+
contentEditable: editMode,
|
|
125
|
+
ref: ref,
|
|
126
|
+
onInput: handleInput,
|
|
127
|
+
onContextMenu: contextMenuHandler
|
|
128
|
+
}, content));
|
|
129
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// @import url('../../../font.scss');
|
|
2
|
+
|
|
3
|
+
.text {
|
|
4
|
+
max-width: 920px;
|
|
5
|
+
color: #2B2B46;
|
|
6
|
+
font-family: "Golos Text";
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
line-height: 28px;
|
|
11
|
+
white-space: pre-wrap;
|
|
12
|
+
|
|
13
|
+
.link {
|
|
14
|
+
color: #029CFD;
|
|
15
|
+
text-decoration: underline;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.link_modal {
|
|
20
|
+
z-index: 1;
|
|
21
|
+
width: 100%;
|
|
22
|
+
position: absolute;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
padding: 8px;
|
|
25
|
+
background-color: #fff;
|
|
26
|
+
|
|
27
|
+
.link_modal_container {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
gap: 1em;
|
|
32
|
+
border-radius: 1em;
|
|
33
|
+
background: white;
|
|
34
|
+
width: 100%;
|
|
35
|
+
|
|
36
|
+
.link_modal_input {
|
|
37
|
+
border: 1px solid grey;
|
|
38
|
+
outline: 1px solid grey;
|
|
39
|
+
border-radius: .5em;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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.TitleText = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
require("./TitleText.scss");
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
|
+
var MAX_LENGTH = 100;
|
|
13
|
+
var TitleText = exports.TitleText = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
14
|
+
var data = _ref.data,
|
|
15
|
+
editMode = _ref.editMode,
|
|
16
|
+
onChange = _ref.onChange;
|
|
17
|
+
var handleInput = function handleInput(e) {
|
|
18
|
+
onChange();
|
|
19
|
+
};
|
|
20
|
+
var id = (0, _react.useId)();
|
|
21
|
+
return /*#__PURE__*/_react["default"].createElement("h2", {
|
|
22
|
+
id: id,
|
|
23
|
+
maxLength: 20,
|
|
24
|
+
suppressContentEditableWarning: true,
|
|
25
|
+
ref: ref,
|
|
26
|
+
className: "title__medium",
|
|
27
|
+
contentEditable: editMode,
|
|
28
|
+
onInput: handleInput
|
|
29
|
+
}, data);
|
|
30
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @import url('../../../font.scss');
|
|
2
|
+
|
|
3
|
+
.title__medium {
|
|
4
|
+
text-align: left;
|
|
5
|
+
color: #2B2B46;
|
|
6
|
+
font-family: "Golos Text";
|
|
7
|
+
font-size: 26px;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
line-height: 28px;
|
|
11
|
+
word-break: break-word;
|
|
12
|
+
|
|
13
|
+
&:empty {
|
|
14
|
+
height: 1lh;
|
|
15
|
+
|
|
16
|
+
&::after{
|
|
17
|
+
content: "Введите заголовок";
|
|
18
|
+
color: #D9D9D9;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.title__medium[contenteditable="true"] {
|
|
24
|
+
outline: none;
|
|
25
|
+
margin: 10px 20px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (max-width: 430px) {
|
|
29
|
+
.title__medium {
|
|
30
|
+
font-size: 22px;
|
|
31
|
+
line-height: 24px;
|
|
32
|
+
}
|
|
33
|
+
}
|