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,117 @@
|
|
|
1
|
+
.checkbox-status,
|
|
2
|
+
.checkbox-status_disabled {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
position: relative;
|
|
5
|
+
vertical-align: middle;
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
user-select: none;
|
|
8
|
+
|
|
9
|
+
.checkbox-status-switch {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: inline-block;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
width: 60px;
|
|
14
|
+
height: 26px;
|
|
15
|
+
border-radius: 16px;
|
|
16
|
+
border: 2px solid #94A3B8;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
background: #F1F5F9;
|
|
19
|
+
transition: .2s;
|
|
20
|
+
|
|
21
|
+
&::after {
|
|
22
|
+
content: 'OFF';
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 6px;
|
|
25
|
+
right: 8px;
|
|
26
|
+
display: inline-block;
|
|
27
|
+
width: 20px;
|
|
28
|
+
height: 16px;
|
|
29
|
+
border-radius: 100px;
|
|
30
|
+
color: #94A3B8;
|
|
31
|
+
transition: .15s;
|
|
32
|
+
font-family: Rubik;
|
|
33
|
+
font-size: 11px;
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
line-height: 14px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.checkbox-status-switch:before {
|
|
41
|
+
content: '';
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 4px;
|
|
44
|
+
left: 4px;
|
|
45
|
+
display: inline-block;
|
|
46
|
+
width: 20px;
|
|
47
|
+
height: 16px;
|
|
48
|
+
border-radius: 100px;
|
|
49
|
+
background: #94A3B8;
|
|
50
|
+
transition: .15s;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
input[type=checkbox] {
|
|
54
|
+
display: block;
|
|
55
|
+
width: 0;
|
|
56
|
+
height: 0;
|
|
57
|
+
position: absolute;
|
|
58
|
+
z-index: -1;
|
|
59
|
+
opacity: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
input[type=checkbox]:not(:disabled):active+.checkbox-status-switch:before {
|
|
63
|
+
box-shadow: inset 0 0 2px rgba(0, 0, 0, .3);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
input[type=checkbox]:checked+.checkbox-status-switch {
|
|
67
|
+
border: 2px solid #22C55E;
|
|
68
|
+
background: #22C55E;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
input[type=checkbox]:checked+.checkbox-status-switch::after {
|
|
72
|
+
content: 'ON';
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 6px;
|
|
75
|
+
left: 8px;
|
|
76
|
+
display: inline-block;
|
|
77
|
+
width: 20px;
|
|
78
|
+
height: 16px;
|
|
79
|
+
border-radius: 100px;
|
|
80
|
+
color: #fff;
|
|
81
|
+
transition: .15s;
|
|
82
|
+
font-family: Rubik;
|
|
83
|
+
font-size: 11px;
|
|
84
|
+
font-style: normal;
|
|
85
|
+
font-weight: 500;
|
|
86
|
+
line-height: 14px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
input[type=checkbox]:checked+.checkbox-status-switch:before {
|
|
91
|
+
background-color: #fff;
|
|
92
|
+
transform: translateX(28px);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Hover */
|
|
96
|
+
input[type="checkbox"]:not(:disabled)+.checkbox-status-switch {
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
// border-color: rgba(0, 0, 0, .3);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Focus */
|
|
102
|
+
.focused .checkbox-status-switch:before {
|
|
103
|
+
box-shadow: inset 0px 0px 4px #ff5623;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&_disabled {
|
|
107
|
+
|
|
108
|
+
.checkbox-status-switch {
|
|
109
|
+
background: #F1F5F9;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.checkbox-status-switch:before {
|
|
113
|
+
background: #C5CCD3;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Default = void 0;
|
|
7
|
+
var _CheckboxToggle = _interopRequireDefault(require("./CheckboxToggle"));
|
|
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: 'Components/CheckboxToggle',
|
|
12
|
+
component: _CheckboxToggle["default"],
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: 'centered'
|
|
15
|
+
},
|
|
16
|
+
args: {
|
|
17
|
+
id: 1,
|
|
18
|
+
value: true,
|
|
19
|
+
onChange: (0, _addonActions.action)('onChange'),
|
|
20
|
+
containerClassName: 'test-c',
|
|
21
|
+
inputClassName: 'test-i',
|
|
22
|
+
className: 'test',
|
|
23
|
+
uncontrolled: false
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var Default = exports.Default = {};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactSelect = _interopRequireWildcard(require("react-select"));
|
|
9
|
+
var _close_icon = _interopRequireDefault(require("./img/close_icon.svg"));
|
|
10
|
+
var _close_icon_disabled = _interopRequireDefault(require("./img/close_icon_disabled.svg"));
|
|
11
|
+
var _async = _interopRequireDefault(require("react-select/async"));
|
|
12
|
+
require("./DropdownSelector.scss");
|
|
13
|
+
var _excluded = ["taskOptions", "err", "options_prop", "setState", "placeholder", "className", "style", "multi", "name", "isClearable", "isSearchable", "disabled", "defaultValue", "state", "loadOptions", "showIndicator", "icon", "iconPlaceholder", "id", "fetchCallback", "setInputChange", "queryValue", "range", "noUpwardPaging", "resetPageOnChange", "tooltip", "color", "size", "width", "required"];
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
+
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); }
|
|
23
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
24
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
25
|
+
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."); }
|
|
26
|
+
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; } }
|
|
27
|
+
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; }
|
|
28
|
+
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; } }
|
|
29
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
30
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
31
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
32
|
+
var DropDownSelector = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, selectRef) {
|
|
33
|
+
var _state$label, _state$label2;
|
|
34
|
+
var taskOptions = _ref.taskOptions,
|
|
35
|
+
err = _ref.err,
|
|
36
|
+
options_prop = _ref.options_prop,
|
|
37
|
+
_ref$setState = _ref.setState,
|
|
38
|
+
setState = _ref$setState === void 0 ? false : _ref$setState,
|
|
39
|
+
placeholder = _ref.placeholder,
|
|
40
|
+
_ref$className = _ref.className,
|
|
41
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
42
|
+
style = _ref.style,
|
|
43
|
+
multi = _ref.multi,
|
|
44
|
+
name = _ref.name,
|
|
45
|
+
_ref$isClearable = _ref.isClearable,
|
|
46
|
+
isClearable = _ref$isClearable === void 0 ? true : _ref$isClearable,
|
|
47
|
+
_ref$isSearchable = _ref.isSearchable,
|
|
48
|
+
isSearchable = _ref$isSearchable === void 0 ? true : _ref$isSearchable,
|
|
49
|
+
_ref$disabled = _ref.disabled,
|
|
50
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
51
|
+
_ref$defaultValue = _ref.defaultValue,
|
|
52
|
+
defaultValue = _ref$defaultValue === void 0 ? false : _ref$defaultValue,
|
|
53
|
+
_ref$state = _ref.state,
|
|
54
|
+
state = _ref$state === void 0 ? [] : _ref$state,
|
|
55
|
+
_ref$loadOptions = _ref.loadOptions,
|
|
56
|
+
loadOptions = _ref$loadOptions === void 0 ? false : _ref$loadOptions,
|
|
57
|
+
_ref$showIndicator = _ref.showIndicator,
|
|
58
|
+
showIndicator = _ref$showIndicator === void 0 ? true : _ref$showIndicator,
|
|
59
|
+
_ref$icon = _ref.icon,
|
|
60
|
+
icon = _ref$icon === void 0 ? false : _ref$icon,
|
|
61
|
+
_ref$iconPlaceholder = _ref.iconPlaceholder,
|
|
62
|
+
iconPlaceholder = _ref$iconPlaceholder === void 0 ? false : _ref$iconPlaceholder,
|
|
63
|
+
id = _ref.id,
|
|
64
|
+
_ref$fetchCallback = _ref.fetchCallback,
|
|
65
|
+
fetchCallback = _ref$fetchCallback === void 0 ? false : _ref$fetchCallback,
|
|
66
|
+
_ref$setInputChange = _ref.setInputChange,
|
|
67
|
+
setInputChange = _ref$setInputChange === void 0 ? false : _ref$setInputChange,
|
|
68
|
+
queryValue = _ref.queryValue,
|
|
69
|
+
_ref$range = _ref.range,
|
|
70
|
+
range = _ref$range === void 0 ? false : _ref$range,
|
|
71
|
+
noUpwardPaging = _ref.noUpwardPaging,
|
|
72
|
+
resetPageOnChange = _ref.resetPageOnChange,
|
|
73
|
+
_ref$tooltip = _ref.tooltip,
|
|
74
|
+
tooltip = _ref$tooltip === void 0 ? false : _ref$tooltip,
|
|
75
|
+
_ref$color = _ref.color,
|
|
76
|
+
color = _ref$color === void 0 ? false : _ref$color,
|
|
77
|
+
_ref$size = _ref.size,
|
|
78
|
+
size = _ref$size === void 0 ? 's' : _ref$size,
|
|
79
|
+
_ref$width = _ref.width,
|
|
80
|
+
width = _ref$width === void 0 ? '140%' : _ref$width,
|
|
81
|
+
_ref$required = _ref.required,
|
|
82
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
83
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
84
|
+
var _useState = (0, _react.useState)(false),
|
|
85
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
86
|
+
isTopPlaceholder = _useState2[0],
|
|
87
|
+
setIsTopPlaceholder = _useState2[1];
|
|
88
|
+
var _useState3 = (0, _react.useState)(false),
|
|
89
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
90
|
+
isFocus = _useState4[0],
|
|
91
|
+
setIsFocus = _useState4[1];
|
|
92
|
+
var _useState5 = (0, _react.useState)(1),
|
|
93
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
94
|
+
selectorPage = _useState6[0],
|
|
95
|
+
setSelectorPage = _useState6[1];
|
|
96
|
+
var inputId = (0, _react.useId)();
|
|
97
|
+
var onChange = function onChange(option, _ref2) {
|
|
98
|
+
var action = _ref2.action;
|
|
99
|
+
if (action === 'clear') {
|
|
100
|
+
setState(multi ? [] : '');
|
|
101
|
+
} else {
|
|
102
|
+
if (resetPageOnChange) setSelectorPage(1);
|
|
103
|
+
if (option.length > 1) {
|
|
104
|
+
var indexAll = -1;
|
|
105
|
+
option.forEach(function (el, ind) {
|
|
106
|
+
if ((el === null || el === void 0 ? void 0 : el.value) === 'all') indexAll = ind;
|
|
107
|
+
});
|
|
108
|
+
if (indexAll !== -1) {
|
|
109
|
+
setState(option === null || option === void 0 ? void 0 : option.filter(function (el, ind) {
|
|
110
|
+
return indexAll === 0 ? ind !== 0 : ind === indexAll;
|
|
111
|
+
}));
|
|
112
|
+
} else {
|
|
113
|
+
setState(option);
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
setState(option);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
var MultiValueRemove = function MultiValueRemove(props) {
|
|
121
|
+
return /*#__PURE__*/React.createElement(_reactSelect.components.MultiValueRemove, props, /*#__PURE__*/React.createElement("img", {
|
|
122
|
+
src: disabled ? _close_icon_disabled["default"] === null || _close_icon_disabled["default"] === void 0 ? void 0 : _close_icon_disabled["default"].src : _close_icon["default"] === null || _close_icon["default"] === void 0 ? void 0 : _close_icon["default"].src
|
|
123
|
+
}));
|
|
124
|
+
};
|
|
125
|
+
var dot = function dot() {
|
|
126
|
+
return {
|
|
127
|
+
alignItems: 'center',
|
|
128
|
+
display: 'flex',
|
|
129
|
+
justifyContent: 'flex-start',
|
|
130
|
+
caretColor: 'red',
|
|
131
|
+
':before': {
|
|
132
|
+
backgroundImage: "url(".concat(icon, ")"),
|
|
133
|
+
backgroundRepeat: 'no-repeat',
|
|
134
|
+
backgroundPosition: 'center',
|
|
135
|
+
content: '" "',
|
|
136
|
+
display: 'block',
|
|
137
|
+
marginRight: 5,
|
|
138
|
+
height: 12,
|
|
139
|
+
minWidth: 12
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
var DefaulOption = function DefaulOption(_ref3) {
|
|
144
|
+
var innerProps = _ref3.innerProps,
|
|
145
|
+
isDisabled = _ref3.isDisabled,
|
|
146
|
+
label = _ref3.label,
|
|
147
|
+
value = _ref3.value,
|
|
148
|
+
isSelected = _ref3.isSelected;
|
|
149
|
+
return !isDisabled ? /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
150
|
+
className: "option-item",
|
|
151
|
+
style: {
|
|
152
|
+
padding: '8px 20px'
|
|
153
|
+
}
|
|
154
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
155
|
+
className: "text"
|
|
156
|
+
}, label)) : null;
|
|
157
|
+
};
|
|
158
|
+
(0, _react.useEffect)(function () {
|
|
159
|
+
if (setState) {
|
|
160
|
+
defaultValue ? setState(defaultValue) : setState(state);
|
|
161
|
+
}
|
|
162
|
+
}, []);
|
|
163
|
+
var OptionTask = function OptionTask(_ref4) {
|
|
164
|
+
var innerProps = _ref4.innerProps,
|
|
165
|
+
label = _ref4.label,
|
|
166
|
+
value = _ref4.value;
|
|
167
|
+
var author = value.author;
|
|
168
|
+
var name = author.name;
|
|
169
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
170
|
+
className: "option-task",
|
|
171
|
+
style: {
|
|
172
|
+
padding: '8px 20px'
|
|
173
|
+
}
|
|
174
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
175
|
+
className: "text",
|
|
176
|
+
style: {
|
|
177
|
+
color: 'black'
|
|
178
|
+
}
|
|
179
|
+
}, label), /*#__PURE__*/React.createElement("p", {
|
|
180
|
+
className: "text_min"
|
|
181
|
+
}, "\u0410\u0432\u0442\u043E\u0440: ", /*#__PURE__*/React.createElement("span", null, name ? name : '')));
|
|
182
|
+
};
|
|
183
|
+
var onMenuScrollHandler = function onMenuScrollHandler(page) {
|
|
184
|
+
if (fetchCallback) {
|
|
185
|
+
setSelectorPage(function (prev) {
|
|
186
|
+
var currPage = prev + page;
|
|
187
|
+
if (page < 1) currPage = 1;
|
|
188
|
+
fetchCallback(currPage);
|
|
189
|
+
return currPage;
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
var selectProps = _objectSpread({
|
|
194
|
+
inputId: inputId,
|
|
195
|
+
options: options_prop,
|
|
196
|
+
value: state,
|
|
197
|
+
onChange: onChange,
|
|
198
|
+
ref: selectRef,
|
|
199
|
+
className: err ? 'dropdown_selector dropdown_selector__err' : 'dropdown_selector',
|
|
200
|
+
placeholder: '',
|
|
201
|
+
defaultValue: defaultValue,
|
|
202
|
+
isMulti: multi,
|
|
203
|
+
openMenuOnFocus: true,
|
|
204
|
+
isClearable: isClearable,
|
|
205
|
+
name: name,
|
|
206
|
+
isSearchable: isSearchable,
|
|
207
|
+
isDisabled: disabled,
|
|
208
|
+
//closeMenuOnSelect: false,
|
|
209
|
+
onFocus: function onFocus() {
|
|
210
|
+
setIsFocus(true);
|
|
211
|
+
},
|
|
212
|
+
onBlur: function onBlur() {
|
|
213
|
+
setIsFocus(false);
|
|
214
|
+
},
|
|
215
|
+
noOptionsMessage: function noOptionsMessage() {
|
|
216
|
+
return /*#__PURE__*/React.createElement("p", {
|
|
217
|
+
className: "no-options"
|
|
218
|
+
}, "\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E");
|
|
219
|
+
},
|
|
220
|
+
components: {
|
|
221
|
+
Option: taskOptions ? OptionTask : DefaulOption,
|
|
222
|
+
MultiValueRemove: MultiValueRemove
|
|
223
|
+
},
|
|
224
|
+
onMenuScrollToBottom: function onMenuScrollToBottom() {
|
|
225
|
+
return onMenuScrollHandler(1);
|
|
226
|
+
},
|
|
227
|
+
onMenuScrollToTop: function onMenuScrollToTop() {
|
|
228
|
+
return noUpwardPaging ? {} : onMenuScrollHandler(-1);
|
|
229
|
+
},
|
|
230
|
+
onInputChange: function onInputChange(value) {
|
|
231
|
+
setIsTopPlaceholder((value === null || value === void 0 ? void 0 : value.length) > 0 ? true : false);
|
|
232
|
+
if (setInputChange !== false) {
|
|
233
|
+
setInputChange(value);
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
cacheOption: true,
|
|
237
|
+
allowCreateWhileLoading: true,
|
|
238
|
+
styles: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
239
|
+
menu: function menu(base) {
|
|
240
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
241
|
+
borderRadius: '8px',
|
|
242
|
+
// overflow: 'hidden',
|
|
243
|
+
boxShadow: '0px 16px 32px 0px rgba(0, 0, 0, 0.04)',
|
|
244
|
+
border: 'none',
|
|
245
|
+
outline: 'none',
|
|
246
|
+
zIndex: 2,
|
|
247
|
+
minWidth: width
|
|
248
|
+
});
|
|
249
|
+
},
|
|
250
|
+
menuList: function menuList(base) {
|
|
251
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
252
|
+
borderRadius: '8px',
|
|
253
|
+
overflow: 'auto',
|
|
254
|
+
maxHeight: '608px',
|
|
255
|
+
padding: 0,
|
|
256
|
+
border: '2px solid #E0E7F2',
|
|
257
|
+
background: 'white'
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
dropdownIndicator: function dropdownIndicator(base) {
|
|
261
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
262
|
+
padding: '4px'
|
|
263
|
+
});
|
|
264
|
+
},
|
|
265
|
+
valueContainer: function valueContainer(base) {
|
|
266
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
267
|
+
fontSize: '14px',
|
|
268
|
+
color: '#020617',
|
|
269
|
+
padding: '6px 12px'
|
|
270
|
+
});
|
|
271
|
+
},
|
|
272
|
+
noOptionsMessage: function noOptionsMessage(base) {
|
|
273
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
274
|
+
fontSize: '12px'
|
|
275
|
+
});
|
|
276
|
+
},
|
|
277
|
+
multiValueLabel: function multiValueLabel(base) {
|
|
278
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
279
|
+
paddingLeft: '0px',
|
|
280
|
+
background: '#fff',
|
|
281
|
+
border: 'none',
|
|
282
|
+
color: disabled ? '#D3DEE7' : '#020617',
|
|
283
|
+
fontSize: '13px',
|
|
284
|
+
fontFamily: 'Rubik',
|
|
285
|
+
borderRadius: '0px',
|
|
286
|
+
margin: '0px'
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}, "valueContainer", function valueContainer(base) {
|
|
290
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
291
|
+
color: disabled ? '#D3DEE7' : '#020617',
|
|
292
|
+
fontSize: '14px',
|
|
293
|
+
paddingLeft: '12px',
|
|
294
|
+
paddingRight: '12px'
|
|
295
|
+
});
|
|
296
|
+
}), "multiValueRemove", function multiValueRemove(base) {
|
|
297
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
298
|
+
background: '#fff',
|
|
299
|
+
color: disabled ? '#D3DEE7' : '#475569',
|
|
300
|
+
padding: '0px',
|
|
301
|
+
border: 'none',
|
|
302
|
+
borderLeft: 'none',
|
|
303
|
+
borderRadius: '0px',
|
|
304
|
+
':hover': {
|
|
305
|
+
background: '#fff'
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}), "indicatorSeparator", function indicatorSeparator(base) {
|
|
309
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
310
|
+
display: 'none'
|
|
311
|
+
});
|
|
312
|
+
}), "singleValue", function singleValue(base) {
|
|
313
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
314
|
+
color: '#020617'
|
|
315
|
+
});
|
|
316
|
+
}), "indicatorsContainer", function indicatorsContainer(base) {
|
|
317
|
+
return _objectSpread(_objectSpread({}, base), {}, {
|
|
318
|
+
padding: '0px',
|
|
319
|
+
display: showIndicator ? 'flex' : 'none'
|
|
320
|
+
});
|
|
321
|
+
}), "input", icon ? function (styles) {
|
|
322
|
+
return _objectSpread(_objectSpread(_objectSpread({}, styles), dot()), {}, {
|
|
323
|
+
color: '#020617'
|
|
324
|
+
});
|
|
325
|
+
} : null), "singleValue", icon ? function (styles, _ref5) {
|
|
326
|
+
var data = _ref5.data;
|
|
327
|
+
return _objectSpread(_objectSpread({}, styles), {}, {
|
|
328
|
+
cursor: 'pointer'
|
|
329
|
+
}, dot(data === null || data === void 0 ? void 0 : data.color));
|
|
330
|
+
} : null)
|
|
331
|
+
}, props);
|
|
332
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
333
|
+
className: "selector_wrapper ".concat(disabled ? 'selector_wrapper_disabled' : '', " ").concat(size == 'l' ? 'selector_wrapper_size-l' : '', " ").concat(placeholder && !multi ? 'value-content-bottom' : ''),
|
|
334
|
+
tabIndex: "0",
|
|
335
|
+
style: style ? style : {}
|
|
336
|
+
}, /*#__PURE__*/React.createElement("div", null, placeholder && multi ? /*#__PURE__*/React.createElement("div", {
|
|
337
|
+
className: _typeof(state === null || state === void 0 ? void 0 : state.label) == 'object' || (state === null || state === void 0 ? void 0 : state.length) > 0 || queryValue || isTopPlaceholder ? isFocus ? 'placeholder-dinamyc_min-blue' : 'placeholder-dinamyc_min' : 'placeholder-dinamyc'
|
|
338
|
+
}, /*#__PURE__*/React.createElement("label", null, placeholder, required ? /*#__PURE__*/React.createElement("span", {
|
|
339
|
+
style: {
|
|
340
|
+
color: 'red'
|
|
341
|
+
}
|
|
342
|
+
}, " *") : '')) : placeholder && /*#__PURE__*/React.createElement("div", {
|
|
343
|
+
className: _typeof(state === null || state === void 0 ? void 0 : state.label) == 'object' || (state === null || state === void 0 ? void 0 : state.length) > 0 || (state === null || state === void 0 || (_state$label = state.label) === null || _state$label === void 0 ? void 0 : _state$label.length) > 0 || state !== null && state !== void 0 && (_state$label2 = state.label) !== null && _state$label2 !== void 0 && (_state$label2 = _state$label2.props) !== null && _state$label2 !== void 0 && _state$label2.children || queryValue || isTopPlaceholder ? isFocus ? 'placeholder-dinamyc_min-blue' : 'placeholder-dinamyc_min' : 'placeholder-dinamyc'
|
|
344
|
+
}, /*#__PURE__*/React.createElement("label", null, placeholder, required ? /*#__PURE__*/React.createElement("span", {
|
|
345
|
+
style: {
|
|
346
|
+
color: 'red'
|
|
347
|
+
}
|
|
348
|
+
}, " *") : ''))), loadOptions ? /*#__PURE__*/React.createElement(_async["default"], selectProps) : /*#__PURE__*/React.createElement(_reactSelect["default"], selectProps)), tooltip && /*#__PURE__*/React.createElement("p", {
|
|
349
|
+
className: "selector_wrapper__text_tooltip"
|
|
350
|
+
}, tooltip));
|
|
351
|
+
});
|
|
352
|
+
var _default = exports["default"] = DropDownSelector;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.SelectorWithFetchCallback = exports.SelectorWithDefaultValue = exports.SelectorSetInputChange = exports.Selector = void 0;
|
|
7
|
+
var _DownSelector = _interopRequireDefault(require("./DownSelector"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
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); }
|
|
13
|
+
var _default = exports["default"] = {
|
|
14
|
+
title: 'Components/DropdownSelector',
|
|
15
|
+
component: _DownSelector["default"],
|
|
16
|
+
parametrs: {
|
|
17
|
+
layout: 'centered'
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
20
|
+
args: {
|
|
21
|
+
defaultValue: {
|
|
22
|
+
label: 'value 1',
|
|
23
|
+
value: 1
|
|
24
|
+
},
|
|
25
|
+
setState: function setState() {},
|
|
26
|
+
options: [{
|
|
27
|
+
label: 'value 1',
|
|
28
|
+
value: 1
|
|
29
|
+
}, {
|
|
30
|
+
label: 'value 2',
|
|
31
|
+
value: 2
|
|
32
|
+
}, {
|
|
33
|
+
label: 'value 3',
|
|
34
|
+
value: 3
|
|
35
|
+
}, {
|
|
36
|
+
label: 'value 4',
|
|
37
|
+
value: 4
|
|
38
|
+
}, {
|
|
39
|
+
label: 'value 5',
|
|
40
|
+
value: 5
|
|
41
|
+
}, {
|
|
42
|
+
label: 'value 6 очень дллиииииииииииииинныыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыый teeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeext',
|
|
43
|
+
value: 6
|
|
44
|
+
}, {
|
|
45
|
+
label: 'value 1',
|
|
46
|
+
value: 1
|
|
47
|
+
}, {
|
|
48
|
+
label: 'value 2',
|
|
49
|
+
value: 2
|
|
50
|
+
}, {
|
|
51
|
+
label: 'value 3',
|
|
52
|
+
value: 3
|
|
53
|
+
}, {
|
|
54
|
+
label: 'value 4',
|
|
55
|
+
value: 4
|
|
56
|
+
}, {
|
|
57
|
+
label: 'value 5',
|
|
58
|
+
value: 5
|
|
59
|
+
}, {
|
|
60
|
+
label: 'value 1',
|
|
61
|
+
value: 1
|
|
62
|
+
}, {
|
|
63
|
+
label: 'value 2',
|
|
64
|
+
value: 2
|
|
65
|
+
}, {
|
|
66
|
+
label: 'value 3',
|
|
67
|
+
value: 3
|
|
68
|
+
}, {
|
|
69
|
+
label: 'value 4',
|
|
70
|
+
value: 4
|
|
71
|
+
}, {
|
|
72
|
+
label: 'value 5',
|
|
73
|
+
value: 5
|
|
74
|
+
}]
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var Selector = exports.Selector = {
|
|
78
|
+
args: {
|
|
79
|
+
id: 1,
|
|
80
|
+
defaultValue: {
|
|
81
|
+
label: 'value 1',
|
|
82
|
+
value: 1
|
|
83
|
+
},
|
|
84
|
+
name: 'Selector',
|
|
85
|
+
selector_title: 'Selector Title',
|
|
86
|
+
placeholder: 'Бренд',
|
|
87
|
+
style: {},
|
|
88
|
+
multi: true,
|
|
89
|
+
isClearable: true,
|
|
90
|
+
isSearchable: true,
|
|
91
|
+
disabled: false,
|
|
92
|
+
showIndicator: true,
|
|
93
|
+
icon: false,
|
|
94
|
+
iconPlaceholder: false,
|
|
95
|
+
size: 'l'
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var SelectorWithDefaultValue = exports.SelectorWithDefaultValue = {
|
|
99
|
+
args: _defineProperty(_defineProperty({
|
|
100
|
+
id: 2,
|
|
101
|
+
name: 'Selector',
|
|
102
|
+
selector_title: 'Selector Title',
|
|
103
|
+
placeholder: 'placeholder',
|
|
104
|
+
style: {},
|
|
105
|
+
multi: true,
|
|
106
|
+
isClearable: true,
|
|
107
|
+
isSearchable: true,
|
|
108
|
+
disabled: false,
|
|
109
|
+
defaultValue: {
|
|
110
|
+
label: 'value 1',
|
|
111
|
+
value: 1
|
|
112
|
+
},
|
|
113
|
+
showIndicator: true,
|
|
114
|
+
icon: false,
|
|
115
|
+
iconPlaceholder: false
|
|
116
|
+
}, "disabled", true), "tooltip", 'Подсказка')
|
|
117
|
+
};
|
|
118
|
+
var SelectorSetInputChange = exports.SelectorSetInputChange = {
|
|
119
|
+
args: {
|
|
120
|
+
id: 3,
|
|
121
|
+
name: 'Selector',
|
|
122
|
+
selector_title: 'Selector Title',
|
|
123
|
+
placeholder: 'placeholder',
|
|
124
|
+
style: {},
|
|
125
|
+
multi: true,
|
|
126
|
+
isClearable: true,
|
|
127
|
+
isSearchable: true,
|
|
128
|
+
disabled: false,
|
|
129
|
+
showIndicator: true,
|
|
130
|
+
icon: false,
|
|
131
|
+
iconPlaceholder: false,
|
|
132
|
+
setInputChange: function setInputChange(args) {
|
|
133
|
+
return console.log("setInputChange called with ".concat(args));
|
|
134
|
+
},
|
|
135
|
+
size: 'l'
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var SelectorWithFetchCallback = exports.SelectorWithFetchCallback = {
|
|
139
|
+
args: {
|
|
140
|
+
id: 4,
|
|
141
|
+
name: 'Selector',
|
|
142
|
+
selector_title: 'Selector Title',
|
|
143
|
+
placeholder: 'placeholder',
|
|
144
|
+
style: {},
|
|
145
|
+
multi: true,
|
|
146
|
+
isClearable: true,
|
|
147
|
+
isSearchable: true,
|
|
148
|
+
disabled: false,
|
|
149
|
+
showIndicator: true,
|
|
150
|
+
state: [{
|
|
151
|
+
label: 'Value',
|
|
152
|
+
value: 'Value'
|
|
153
|
+
}],
|
|
154
|
+
icon: false,
|
|
155
|
+
iconPlaceholder: false,
|
|
156
|
+
fetchCallback: function fetchCallback(e) {
|
|
157
|
+
return e;
|
|
158
|
+
},
|
|
159
|
+
size: 'l'
|
|
160
|
+
}
|
|
161
|
+
};
|