@logora/debate 0.1.0
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/.changeset/config.json +11 -0
- package/.eslintrc.js +12 -0
- package/.github/dependabot.yml +7 -0
- package/.github/workflows/master.yml +121 -0
- package/.storybook/main.mjs +47 -0
- package/.storybook/preview.js +11 -0
- package/LICENSE +661 -0
- package/README.md +90 -0
- package/package.json +101 -0
- package/src/components/action/back_link/BackLink.docs.mdx +25 -0
- package/src/components/action/back_link/BackLink.jsx +30 -0
- package/src/components/action/back_link/BackLink.module.scss +34 -0
- package/src/components/action/back_link/BackLink.stories.jsx +28 -0
- package/src/components/action/back_link/BackLink.test.jsx +105 -0
- package/src/components/action/back_link/index.js +1 -0
- package/src/components/action/button/Button.docs.mdx +43 -0
- package/src/components/action/button/Button.examples.jsx +60 -0
- package/src/components/action/button/Button.jsx +88 -0
- package/src/components/action/button/Button.module.scss +133 -0
- package/src/components/action/button/Button.stories.jsx +54 -0
- package/src/components/action/button/Button.test.jsx +54 -0
- package/src/components/action/button/index.js +1 -0
- package/src/components/action/icon_text_link/HomeIcon.dev.jsx +9 -0
- package/src/components/action/icon_text_link/IconTextLink.docs.mdx +37 -0
- package/src/components/action/icon_text_link/IconTextLink.jsx +57 -0
- package/src/components/action/icon_text_link/IconTextLink.module.scss +67 -0
- package/src/components/action/icon_text_link/IconTextLink.stories.jsx +44 -0
- package/src/components/action/icon_text_link/IconTextLink.test.jsx +134 -0
- package/src/components/action/icon_text_link/index.js +1 -0
- package/src/components/action/link/Link.docs.mdx +23 -0
- package/src/components/action/link/Link.jsx +50 -0
- package/src/components/action/link/Link.stories.jsx +43 -0
- package/src/components/action/link/Link.test.jsx +91 -0
- package/src/components/action/link/index.js +1 -0
- package/src/components/ad/ad_unit/AdUnit.docs.mdx +23 -0
- package/src/components/ad/ad_unit/AdUnit.jsx +75 -0
- package/src/components/ad/ad_unit/AdUnit.module.scss +9 -0
- package/src/components/ad/ad_unit/AdUnit.stories.jsx +30 -0
- package/src/components/ad/ad_unit/AdUnit.test.jsx +63 -0
- package/src/components/ad/ad_unit/index.js +1 -0
- package/src/components/ad/use_google_ad_manager/index.js +1 -0
- package/src/components/ad/use_google_ad_manager/useGoogleAdManager.docs.mdx +27 -0
- package/src/components/ad/use_google_ad_manager/useGoogleAdManager.jsx +37 -0
- package/src/components/ad/use_google_ad_manager/useGoogleAdManager.test.jsx +47 -0
- package/src/components/ad/with_ad/WithAd.docs.mdx +30 -0
- package/src/components/ad/with_ad/WithAd.jsx +51 -0
- package/src/components/ad/with_ad/WithAd.test.jsx +104 -0
- package/src/components/ad/with_ad/index.js +1 -0
- package/src/components/argument/argument/Argument.docs.mdx +60 -0
- package/src/components/argument/argument/Argument.jsx +358 -0
- package/src/components/argument/argument/Argument.module.scss +233 -0
- package/src/components/argument/argument/Argument.stories.jsx +232 -0
- package/src/components/argument/argument/Argument.test.jsx +303 -0
- package/src/components/argument/argument/ReplyFooter.jsx +47 -0
- package/src/components/argument/argument/ReplyFooter.module.scss +77 -0
- package/src/components/argument/argument/index.js +2 -0
- package/src/components/argument/argument/useRichContent.jsx +18 -0
- package/src/components/argument/top_arguments/TopArguments.docs.mdx +22 -0
- package/src/components/argument/top_arguments/TopArguments.jsx +90 -0
- package/src/components/argument/top_arguments/TopArguments.module.scss +37 -0
- package/src/components/argument/top_arguments/TopArguments.stories.jsx +156 -0
- package/src/components/argument/top_arguments/TopArguments.test.jsx +67 -0
- package/src/components/argument/top_arguments/index.js +1 -0
- package/src/components/auth/auth_initializer/AuthInitializer.alltest.js +21 -0
- package/src/components/auth/auth_initializer/AuthInitializer.docs.mdx +34 -0
- package/src/components/auth/auth_initializer/AuthInitializer.jsx +61 -0
- package/src/components/auth/auth_initializer/index.js +1 -0
- package/src/components/auth/auth_modal/AuthModal.alltest.js +30 -0
- package/src/components/auth/auth_modal/AuthModal.docs.mdx +26 -0
- package/src/components/auth/auth_modal/AuthModal.jsx +99 -0
- package/src/components/auth/auth_modal/AuthModal.module.scss +9 -0
- package/src/components/auth/auth_modal/AuthModal.stories.jsx +90 -0
- package/src/components/auth/auth_modal/index.js +1 -0
- package/src/components/auth/facebook_login_button/FacebookIcon.jsx +7 -0
- package/src/components/auth/facebook_login_button/FacebookLoginButton.docs.mdx +34 -0
- package/src/components/auth/facebook_login_button/FacebookLoginButton.jsx +25 -0
- package/src/components/auth/facebook_login_button/FacebookLoginButton.module.scss +32 -0
- package/src/components/auth/facebook_login_button/FacebookLoginButton.stories.jsx +35 -0
- package/src/components/auth/facebook_login_button/FacebookLoginButton.test.jsx +68 -0
- package/src/components/auth/facebook_login_button/index.js +1 -0
- package/src/components/auth/google_login_button/GoogleIcon.jsx +10 -0
- package/src/components/auth/google_login_button/GoogleLoginButton.docs.mdx +43 -0
- package/src/components/auth/google_login_button/GoogleLoginButton.jsx +27 -0
- package/src/components/auth/google_login_button/GoogleLoginButton.module.scss +28 -0
- package/src/components/auth/google_login_button/GoogleLoginButton.stories.jsx +35 -0
- package/src/components/auth/google_login_button/GoogleLoginButton.test.jsx +69 -0
- package/src/components/auth/google_login_button/index.js +1 -0
- package/src/components/auth/login_form/LoginForm.docs.mdx +24 -0
- package/src/components/auth/login_form/LoginForm.jsx +65 -0
- package/src/components/auth/login_form/LoginForm.module.scss +36 -0
- package/src/components/auth/login_form/LoginForm.stories.jsx +42 -0
- package/src/components/auth/login_form/LoginForm.test.jsx +94 -0
- package/src/components/auth/login_form/index.js +1 -0
- package/src/components/auth/oauth2_button/OAuth2Button.docs.mdx +32 -0
- package/src/components/auth/oauth2_button/OAuth2Button.jsx +79 -0
- package/src/components/auth/oauth2_button/OAuth2Button.module.scss +10 -0
- package/src/components/auth/oauth2_button/OAuth2Button.stories.jsx +48 -0
- package/src/components/auth/oauth2_button/OAuth2Button.test.jsx +306 -0
- package/src/components/auth/oauth2_button/index.js +1 -0
- package/src/components/auth/providers/AuthProvider.docs.mdx +35 -0
- package/src/components/auth/providers/AuthProvider.js +23 -0
- package/src/components/auth/providers/AuthProviderFactory.js +20 -0
- package/src/components/auth/providers/FormAuth.js +36 -0
- package/src/components/auth/providers/JWTAuth.js +35 -0
- package/src/components/auth/providers/OAuth2ServerAuth.js +47 -0
- package/src/components/auth/providers/PasswordAuth.js +31 -0
- package/src/components/auth/providers/index.js +1 -0
- package/src/components/auth/providers/tests/AuthProviderFactory.test.jsx +53 -0
- package/src/components/auth/providers/tests/FormAuth.test.jsx +45 -0
- package/src/components/auth/providers/tests/JWTAuth.test.jsx +57 -0
- package/src/components/auth/providers/tests/OAuth2ServerAuth.test.jsx +78 -0
- package/src/components/auth/providers/tests/PasswordAuth.test.jsx +43 -0
- package/src/components/auth/signup_form/SignupForm.docs.mdx +29 -0
- package/src/components/auth/signup_form/SignupForm.jsx +125 -0
- package/src/components/auth/signup_form/SignupForm.module.scss +21 -0
- package/src/components/auth/signup_form/SignupForm.stories.jsx +40 -0
- package/src/components/auth/signup_form/SignupForm.test.jsx +144 -0
- package/src/components/auth/signup_form/index.js +1 -0
- package/src/components/auth/social_auth_form/SocialAuthForm.docs.mdx +33 -0
- package/src/components/auth/social_auth_form/SocialAuthForm.jsx +170 -0
- package/src/components/auth/social_auth_form/SocialAuthForm.module.scss +141 -0
- package/src/components/auth/social_auth_form/SocialAuthForm.stories.jsx +82 -0
- package/src/components/auth/social_auth_form/SocialAuthForm.test.jsx +201 -0
- package/src/components/auth/social_auth_form/index.js +1 -0
- package/src/components/auth/sso_form/SSOForm.docs.mdx +39 -0
- package/src/components/auth/sso_form/SSOForm.jsx +243 -0
- package/src/components/auth/sso_form/SSOForm.module.scss +99 -0
- package/src/components/auth/sso_form/SSOForm.stories.jsx +117 -0
- package/src/components/auth/sso_form/SSOForm.test.jsx +83 -0
- package/src/components/auth/sso_form/index.js +1 -0
- package/src/components/auth/use_auth/AuthContext.js +3 -0
- package/src/components/auth/use_auth/AuthProvider.jsx +21 -0
- package/src/components/auth/use_auth/AuthProvider.test.jsx +26 -0
- package/src/components/auth/use_auth/AuthStorage.js +33 -0
- package/src/components/auth/use_auth/AuthStorage.test.jsx +165 -0
- package/src/components/auth/use_auth/authTokenHandler.js +67 -0
- package/src/components/auth/use_auth/authTokenHandler.test.jsx +117 -0
- package/src/components/auth/use_auth/index.js +7 -0
- package/src/components/auth/use_auth/useAuth.docs.mdx +34 -0
- package/src/components/auth/use_auth/useAuth.js +8 -0
- package/src/components/auth/use_auth/useAuthActions.js +77 -0
- package/src/components/auth/use_auth/useAuthInterceptor.jsx +42 -0
- package/src/components/chart/line_chart/LineChart.docs.mdx +34 -0
- package/src/components/chart/line_chart/LineChart.jsx +107 -0
- package/src/components/chart/line_chart/LineChart.module.scss +54 -0
- package/src/components/chart/line_chart/LineChart.stories.jsx +49 -0
- package/src/components/chart/line_chart/LineChart.test.jsx +12 -0
- package/src/components/chart/line_chart/index.js +1 -0
- package/src/components/chart/pie_chart/PieChart.docs.mdx +26 -0
- package/src/components/chart/pie_chart/PieChart.jsx +102 -0
- package/src/components/chart/pie_chart/PieChart.module.scss +17 -0
- package/src/components/chart/pie_chart/PieChart.stories.jsx +36 -0
- package/src/components/chart/pie_chart/PieChart.test.jsx +12 -0
- package/src/components/chart/pie_chart/index.js +1 -0
- package/src/components/consultation/consultation_box/ConsultationBox.docs.mdx +21 -0
- package/src/components/consultation/consultation_box/ConsultationBox.jsx +101 -0
- package/src/components/consultation/consultation_box/ConsultationBox.module.scss +105 -0
- package/src/components/consultation/consultation_box/ConsultationBox.stories.jsx +96 -0
- package/src/components/consultation/consultation_box/ConsultationBox.test.jsx +58 -0
- package/src/components/consultation/consultation_box/index.js +1 -0
- package/src/components/data/axios_client/httpClient.docs.mdx +4 -0
- package/src/components/data/axios_client/httpClient.js +11 -0
- package/src/components/data/axios_client/index.js +1 -0
- package/src/components/data/config_provider/ConfigProvider.docs.mdx +26 -0
- package/src/components/data/config_provider/ConfigProvider.jsx +21 -0
- package/src/components/data/config_provider/ConfigProvider.test.jsx +39 -0
- package/src/components/data/config_provider/index.js +4 -0
- package/src/components/data/config_provider/useConfig.jsx +8 -0
- package/src/components/data/config_provider/useRoutes.jsx +8 -0
- package/src/components/data/config_provider/withConfig.jsx +8 -0
- package/src/components/data/data_provider/DataProvider.docs.mdx +52 -0
- package/src/components/data/data_provider/DataProvider.jsx +165 -0
- package/src/components/data/data_provider/DataProvider.test.jsx +419 -0
- package/src/components/data/data_provider/DataProviderContext.jsx +3 -0
- package/src/components/data/data_provider/index.js +4 -0
- package/src/components/data/data_provider/useData.jsx +9 -0
- package/src/components/data/data_provider/useDataProvider.jsx +8 -0
- package/src/components/data/data_provider/useDataProvider.test.jsx +38 -0
- package/src/components/debate/debate_box/DebateBox.docs.mdx +23 -0
- package/src/components/debate/debate_box/DebateBox.jsx +136 -0
- package/src/components/debate/debate_box/DebateBox.module.scss +209 -0
- package/src/components/debate/debate_box/DebateBox.stories.jsx +157 -0
- package/src/components/debate/debate_box/DebateBox.test.jsx +117 -0
- package/src/components/debate/debate_box/index.js +1 -0
- package/src/components/dialog/announcement_dialog/AnnouncementDialog.docs.mdx +24 -0
- package/src/components/dialog/announcement_dialog/AnnouncementDialog.jsx +37 -0
- package/src/components/dialog/announcement_dialog/AnnouncementDialog.module.scss +35 -0
- package/src/components/dialog/announcement_dialog/AnnouncementDialog.stories.jsx +44 -0
- package/src/components/dialog/announcement_dialog/AnnouncementDialog.test.jsx +35 -0
- package/src/components/dialog/announcement_dialog/HomeIcon.dev.jsx +9 -0
- package/src/components/dialog/announcement_dialog/index.js +1 -0
- package/src/components/dialog/confirm_modal/ConfirmModal.docs.mdx +25 -0
- package/src/components/dialog/confirm_modal/ConfirmModal.jsx +53 -0
- package/src/components/dialog/confirm_modal/ConfirmModal.module.scss +30 -0
- package/src/components/dialog/confirm_modal/ConfirmModal.stories.jsx +36 -0
- package/src/components/dialog/confirm_modal/ConfirmModal.test.jsx +176 -0
- package/src/components/dialog/confirm_modal/index.js +1 -0
- package/src/components/dialog/countdown/Countdown.docs.mdx +23 -0
- package/src/components/dialog/countdown/Countdown.jsx +36 -0
- package/src/components/dialog/countdown/Countdown.stories.jsx +33 -0
- package/src/components/dialog/countdown/Countdown.test.jsx +51 -0
- package/src/components/dialog/countdown/index.js +1 -0
- package/src/components/dialog/dialog_box/DialogBox.docs.mdx +25 -0
- package/src/components/dialog/dialog_box/DialogBox.jsx +53 -0
- package/src/components/dialog/dialog_box/DialogBox.module.scss +145 -0
- package/src/components/dialog/dialog_box/DialogBox.stories.jsx +45 -0
- package/src/components/dialog/dialog_box/DialogBox.test.jsx +40 -0
- package/src/components/dialog/dialog_box/index.js +1 -0
- package/src/components/dialog/drawer/Drawer.docs.mdx +31 -0
- package/src/components/dialog/drawer/Drawer.jsx +159 -0
- package/src/components/dialog/drawer/Drawer.module.scss +136 -0
- package/src/components/dialog/drawer/Drawer.stories.jsx +194 -0
- package/src/components/dialog/drawer/Drawer.test.jsx +15 -0
- package/src/components/dialog/drawer/index.js +1 -0
- package/src/components/dialog/dropdown/Dropdown.docs.mdx +28 -0
- package/src/components/dialog/dropdown/Dropdown.jsx +59 -0
- package/src/components/dialog/dropdown/Dropdown.module.scss +41 -0
- package/src/components/dialog/dropdown/Dropdown.stories.jsx +42 -0
- package/src/components/dialog/dropdown/Dropdown.test.jsx +126 -0
- package/src/components/dialog/dropdown/index.js +1 -0
- package/src/components/dialog/modal/Modal.docs.mdx +39 -0
- package/src/components/dialog/modal/Modal.jsx +101 -0
- package/src/components/dialog/modal/Modal.module.scss +99 -0
- package/src/components/dialog/modal/Modal.stories.jsx +53 -0
- package/src/components/dialog/modal/Modal.test.jsx +115 -0
- package/src/components/dialog/modal/ModalProvider.jsx +26 -0
- package/src/components/dialog/modal/ModalProvider.test.jsx +39 -0
- package/src/components/dialog/modal/index.js +3 -0
- package/src/components/dialog/modal/useModal.jsx +6 -0
- package/src/components/dialog/toast/Toast.docs.mdx +21 -0
- package/src/components/dialog/toast/Toast.jsx +44 -0
- package/src/components/dialog/toast/Toast.module.scss +66 -0
- package/src/components/dialog/toast/Toast.stories.jsx +42 -0
- package/src/components/dialog/toast/Toast.test.jsx +21 -0
- package/src/components/dialog/toast/index.js +1 -0
- package/src/components/dialog/toast_provider/ToastContext.js +3 -0
- package/src/components/dialog/toast_provider/ToastProvider.docs.mdx +36 -0
- package/src/components/dialog/toast_provider/ToastProvider.jsx +35 -0
- package/src/components/dialog/toast_provider/ToastProvider.module.scss +14 -0
- package/src/components/dialog/toast_provider/ToastProvider.test.jsx +64 -0
- package/src/components/dialog/toast_provider/index.js +2 -0
- package/src/components/dialog/toast_provider/useToast.jsx +8 -0
- package/src/components/dialog/tooltip/Tooltip.docs.mdx +20 -0
- package/src/components/dialog/tooltip/Tooltip.jsx +53 -0
- package/src/components/dialog/tooltip/Tooltip.module.scss +92 -0
- package/src/components/dialog/tooltip/Tooltip.stories.jsx +76 -0
- package/src/components/dialog/tooltip/Tooltip.test.jsx +67 -0
- package/src/components/dialog/tooltip/index.js +3 -0
- package/src/components/embed/embed_header/EmbedHeader.docs.mdx +25 -0
- package/src/components/embed/embed_header/EmbedHeader.jsx +61 -0
- package/src/components/embed/embed_header/EmbedHeader.module.scss +148 -0
- package/src/components/embed/embed_header/EmbedHeader.stories.jsx +54 -0
- package/src/components/embed/embed_header/EmbedHeader.test.jsx +70 -0
- package/src/components/embed/embed_header/index.js +1 -0
- package/src/components/error/standard_error_boundary/StandardErrorBoundary.docs.mdx +26 -0
- package/src/components/error/standard_error_boundary/StandardErrorBoundary.jsx +27 -0
- package/src/components/error/standard_error_boundary/StandardErrorBoundary.module.scss +8 -0
- package/src/components/error/standard_error_boundary/StandardErrorBoundary.test.jsx +56 -0
- package/src/components/error/standard_error_boundary/index.js +1 -0
- package/src/components/follow/follow_button/FollowButton.docs.mdx +41 -0
- package/src/components/follow/follow_button/FollowButton.jsx +40 -0
- package/src/components/follow/follow_button/FollowButton.module.scss +17 -0
- package/src/components/follow/follow_button/FollowButton.stories.jsx +58 -0
- package/src/components/follow/follow_button/FollowButton.test.jsx +45 -0
- package/src/components/follow/follow_button/index.js +1 -0
- package/src/components/follow/use_follow/index.js +1 -0
- package/src/components/follow/use_follow/useFollow.docs.mdx +24 -0
- package/src/components/follow/use_follow/useFollow.jsx +60 -0
- package/src/components/follow/use_follow/useFollow.test.jsx +94 -0
- package/src/components/forms/form/extract-form-data.js +14 -0
- package/src/components/forms/form/form-context.js +3 -0
- package/src/components/forms/form/form.docs.mdx +232 -0
- package/src/components/forms/form/form.jsx +26 -0
- package/src/components/forms/form/form.stories.jsx +119 -0
- package/src/components/forms/form/form.test.jsx +3 -0
- package/src/components/forms/form/index.js +6 -0
- package/src/components/forms/form/use-form-context.js +43 -0
- package/src/components/forms/form/use-form.js +4 -0
- package/src/components/forms/use_form_validation/index.js +1 -0
- package/src/components/forms/use_form_validation/useFormValidation.docs.mdx +40 -0
- package/src/components/forms/use_form_validation/useFormValidation.jsx +114 -0
- package/src/components/forms/use_form_validation/useFormValidation.test.jsx +91 -0
- package/src/components/gamification/badge_box/BadgeBox.docs.mdx +25 -0
- package/src/components/gamification/badge_box/BadgeBox.jsx +74 -0
- package/src/components/gamification/badge_box/BadgeBox.module.scss +103 -0
- package/src/components/gamification/badge_box/BadgeBox.stories.jsx +64 -0
- package/src/components/gamification/badge_box/BadgeBox.test.jsx +113 -0
- package/src/components/gamification/badge_box/index.js +1 -0
- package/src/components/gamification/point_box/PointBox.docs.mdx +19 -0
- package/src/components/gamification/point_box/PointBox.jsx +28 -0
- package/src/components/gamification/point_box/PointBox.module.scss +38 -0
- package/src/components/gamification/point_box/PointBox.stories.jsx +32 -0
- package/src/components/gamification/point_box/PointBox.test.jsx +21 -0
- package/src/components/gamification/point_box/index.js +1 -0
- package/src/components/hooks/use_auth_required/index.js +1 -0
- package/src/components/hooks/use_auth_required/useAuthRequired.docs.mdx +22 -0
- package/src/components/hooks/use_auth_required/useAuthRequired.jsx +28 -0
- package/src/components/hooks/use_auth_required/useAuthRequired.test.jsx +85 -0
- package/src/components/hooks/use_css_theme/index.js +1 -0
- package/src/components/hooks/use_css_theme/useCssTheme.docs.mdx +34 -0
- package/src/components/hooks/use_css_theme/useCssTheme.js +27 -0
- package/src/components/hooks/use_css_theme/useCssTheme.stories.jsx +41 -0
- package/src/components/hooks/use_css_theme/useCssTheme.test.jsx +31 -0
- package/src/components/hooks/use_font_loader/index.js +1 -0
- package/src/components/hooks/use_font_loader/useFontLoader.docs.mdx +24 -0
- package/src/components/hooks/use_font_loader/useFontLoader.js +16 -0
- package/src/components/hooks/use_font_loader/useFontLoader.test.jsx +64 -0
- package/src/components/hooks/use_matomo/index.js +1 -0
- package/src/components/hooks/use_matomo/useMatomo.docs.mdx +28 -0
- package/src/components/hooks/use_matomo/useMatomo.js +17 -0
- package/src/components/hooks/use_matomo/useMatomo.test.jsx +24 -0
- package/src/components/hooks/use_relative_time/index.js +1 -0
- package/src/components/hooks/use_relative_time/useRelativeTime.docs.mdx +35 -0
- package/src/components/hooks/use_relative_time/useRelativeTime.jsx +40 -0
- package/src/components/hooks/use_relative_time/useRelativeTime.test.jsx +82 -0
- package/src/components/hooks/use_responsive/ResponsiveContext.jsx +3 -0
- package/src/components/hooks/use_responsive/ResponsiveProvider.jsx +52 -0
- package/src/components/hooks/use_responsive/index.js +2 -0
- package/src/components/hooks/use_responsive/useResponsive.docs.mdx +46 -0
- package/src/components/hooks/use_responsive/useResponsive.jsx +8 -0
- package/src/components/hooks/use_responsive/useResponsive.stories.jsx +49 -0
- package/src/components/hooks/use_responsive/useResponsive.test.jsx +54 -0
- package/src/components/icons/bild_icons/Alarm.jsx +7 -0
- package/src/components/icons/bild_icons/Announcement.jsx +16 -0
- package/src/components/icons/bild_icons/Arrow.jsx +7 -0
- package/src/components/icons/bild_icons/BildIcons.docs.mdx +21 -0
- package/src/components/icons/bild_icons/BildIcons.stories.jsx +123 -0
- package/src/components/icons/bild_icons/BildIcons.test.jsx +15 -0
- package/src/components/icons/bild_icons/Blockquote.jsx +7 -0
- package/src/components/icons/bild_icons/Bold.jsx +7 -0
- package/src/components/icons/bild_icons/Camera.jsx +8 -0
- package/src/components/icons/bild_icons/Chat.jsx +16 -0
- package/src/components/icons/bild_icons/Check.jsx +7 -0
- package/src/components/icons/bild_icons/CheckCircle.jsx +17 -0
- package/src/components/icons/bild_icons/Checkbox.jsx +8 -0
- package/src/components/icons/bild_icons/Clap.jsx +9 -0
- package/src/components/icons/bild_icons/Clock.jsx +7 -0
- package/src/components/icons/bild_icons/Close.jsx +7 -0
- package/src/components/icons/bild_icons/Code.jsx +18 -0
- package/src/components/icons/bild_icons/Community.jsx +7 -0
- package/src/components/icons/bild_icons/Crown.jsx +7 -0
- package/src/components/icons/bild_icons/Document.jsx +7 -0
- package/src/components/icons/bild_icons/Downvote.jsx +7 -0
- package/src/components/icons/bild_icons/Ellipsis.jsx +8 -0
- package/src/components/icons/bild_icons/ExpertBadge.jsx +11 -0
- package/src/components/icons/bild_icons/Facebook.jsx +7 -0
- package/src/components/icons/bild_icons/Flag.jsx +7 -0
- package/src/components/icons/bild_icons/Home.jsx +7 -0
- package/src/components/icons/bild_icons/Italic.jsx +7 -0
- package/src/components/icons/bild_icons/LightArrow.jsx +7 -0
- package/src/components/icons/bild_icons/Link.jsx +8 -0
- package/src/components/icons/bild_icons/Login.jsx +11 -0
- package/src/components/icons/bild_icons/Logora.jsx +24 -0
- package/src/components/icons/bild_icons/Mail.jsx +7 -0
- package/src/components/icons/bild_icons/MinusCircle.jsx +16 -0
- package/src/components/icons/bild_icons/MobileClose.jsx +8 -0
- package/src/components/icons/bild_icons/MobileMenu.jsx +10 -0
- package/src/components/icons/bild_icons/Next.jsx +10 -0
- package/src/components/icons/bild_icons/OpenBlank.jsx +15 -0
- package/src/components/icons/bild_icons/OrderedList.jsx +7 -0
- package/src/components/icons/bild_icons/PauseCircle.jsx +10 -0
- package/src/components/icons/bild_icons/Point.jsx +8 -0
- package/src/components/icons/bild_icons/Question.jsx +8 -0
- package/src/components/icons/bild_icons/Refresh.jsx +7 -0
- package/src/components/icons/bild_icons/Reply.jsx +7 -0
- package/src/components/icons/bild_icons/Search.jsx +7 -0
- package/src/components/icons/bild_icons/Send.jsx +7 -0
- package/src/components/icons/bild_icons/Share.jsx +14 -0
- package/src/components/icons/bild_icons/SmallArrow.jsx +11 -0
- package/src/components/icons/bild_icons/Source.jsx +7 -0
- package/src/components/icons/bild_icons/Suggestion.jsx +7 -0
- package/src/components/icons/bild_icons/Twitter.jsx +10 -0
- package/src/components/icons/bild_icons/Underline.jsx +7 -0
- package/src/components/icons/bild_icons/Upvote.jsx +7 -0
- package/src/components/icons/bild_icons/User.jsx +7 -0
- package/src/components/icons/bild_icons/Versus.jsx +11 -0
- package/src/components/icons/bild_icons/Votebox.jsx +7 -0
- package/src/components/icons/bild_icons/index.js +52 -0
- package/src/components/icons/hero_icons/Alarm.jsx +7 -0
- package/src/components/icons/hero_icons/Announcement.jsx +7 -0
- package/src/components/icons/hero_icons/Arrow.jsx +7 -0
- package/src/components/icons/hero_icons/Blockquote.jsx +14 -0
- package/src/components/icons/hero_icons/Bold.jsx +7 -0
- package/src/components/icons/hero_icons/Camera.jsx +8 -0
- package/src/components/icons/hero_icons/Chat.jsx +7 -0
- package/src/components/icons/hero_icons/Check.jsx +8 -0
- package/src/components/icons/hero_icons/CheckCircle.jsx +17 -0
- package/src/components/icons/hero_icons/Checkbox.jsx +7 -0
- package/src/components/icons/hero_icons/Clap.jsx +7 -0
- package/src/components/icons/hero_icons/Clock.jsx +7 -0
- package/src/components/icons/hero_icons/Close.jsx +8 -0
- package/src/components/icons/hero_icons/Code.jsx +7 -0
- package/src/components/icons/hero_icons/Community.jsx +7 -0
- package/src/components/icons/hero_icons/Crown.jsx +7 -0
- package/src/components/icons/hero_icons/Downvote.jsx +8 -0
- package/src/components/icons/hero_icons/Ellipsis.jsx +7 -0
- package/src/components/icons/hero_icons/ExpertBadge.jsx +7 -0
- package/src/components/icons/hero_icons/Facebook.jsx +7 -0
- package/src/components/icons/hero_icons/Flag.jsx +7 -0
- package/src/components/icons/hero_icons/HeroIcons.docs.mdx +19 -0
- package/src/components/icons/hero_icons/HeroIcons.stories.jsx +121 -0
- package/src/components/icons/hero_icons/HeroIcons.test.jsx +15 -0
- package/src/components/icons/hero_icons/Home.jsx +7 -0
- package/src/components/icons/hero_icons/Italic.jsx +7 -0
- package/src/components/icons/hero_icons/LightArrow.jsx +7 -0
- package/src/components/icons/hero_icons/Link.jsx +7 -0
- package/src/components/icons/hero_icons/Login.jsx +7 -0
- package/src/components/icons/hero_icons/Logora.jsx +24 -0
- package/src/components/icons/hero_icons/Mail.jsx +7 -0
- package/src/components/icons/hero_icons/MinusCircle.jsx +16 -0
- package/src/components/icons/hero_icons/MobileClose.jsx +7 -0
- package/src/components/icons/hero_icons/MobileMenu.jsx +7 -0
- package/src/components/icons/hero_icons/Next.jsx +8 -0
- package/src/components/icons/hero_icons/OpenBlank.jsx +7 -0
- package/src/components/icons/hero_icons/OrderedList.jsx +19 -0
- package/src/components/icons/hero_icons/PauseCircle.jsx +10 -0
- package/src/components/icons/hero_icons/Point.jsx +8 -0
- package/src/components/icons/hero_icons/Question.jsx +7 -0
- package/src/components/icons/hero_icons/Refresh.jsx +7 -0
- package/src/components/icons/hero_icons/Reply.jsx +7 -0
- package/src/components/icons/hero_icons/Search.jsx +7 -0
- package/src/components/icons/hero_icons/Send.jsx +7 -0
- package/src/components/icons/hero_icons/Share.jsx +8 -0
- package/src/components/icons/hero_icons/SmallArrow.jsx +7 -0
- package/src/components/icons/hero_icons/Source.jsx +8 -0
- package/src/components/icons/hero_icons/Suggestion.jsx +9 -0
- package/src/components/icons/hero_icons/Twitter.jsx +10 -0
- package/src/components/icons/hero_icons/Underline.jsx +14 -0
- package/src/components/icons/hero_icons/Upvote.jsx +7 -0
- package/src/components/icons/hero_icons/User.jsx +7 -0
- package/src/components/icons/hero_icons/Versus.jsx +7 -0
- package/src/components/icons/hero_icons/Votebox.jsx +7 -0
- package/src/components/icons/hero_icons/index.js +51 -0
- package/src/components/icons/icon/Icon.docs.mdx +20 -0
- package/src/components/icons/icon/Icon.jsx +32 -0
- package/src/components/icons/icon/Icon.test.jsx +33 -0
- package/src/components/icons/icon/index.js +1 -0
- package/src/components/icons/icon_provider/IconProvider.docs.mdx +28 -0
- package/src/components/icons/icon_provider/IconProvider.jsx +19 -0
- package/src/components/icons/icon_provider/IconProvider.test.jsx +24 -0
- package/src/components/icons/icon_provider/index.js +1 -0
- package/src/components/icons/krone_icons/Alarm.jsx +27 -0
- package/src/components/icons/krone_icons/Announcement.jsx +16 -0
- package/src/components/icons/krone_icons/Arrow.jsx +7 -0
- package/src/components/icons/krone_icons/Blockquote.jsx +7 -0
- package/src/components/icons/krone_icons/Bold.jsx +7 -0
- package/src/components/icons/krone_icons/Camera.jsx +8 -0
- package/src/components/icons/krone_icons/Chat.jsx +29 -0
- package/src/components/icons/krone_icons/Check.jsx +7 -0
- package/src/components/icons/krone_icons/CheckBox.jsx +7 -0
- package/src/components/icons/krone_icons/CheckCircle.jsx +17 -0
- package/src/components/icons/krone_icons/Clap.jsx +29 -0
- package/src/components/icons/krone_icons/Clock.jsx +7 -0
- package/src/components/icons/krone_icons/Close.jsx +7 -0
- package/src/components/icons/krone_icons/Code.jsx +18 -0
- package/src/components/icons/krone_icons/Community.jsx +7 -0
- package/src/components/icons/krone_icons/Crown.jsx +7 -0
- package/src/components/icons/krone_icons/Document.jsx +7 -0
- package/src/components/icons/krone_icons/Downvote.jsx +7 -0
- package/src/components/icons/krone_icons/Ellipsis.jsx +18 -0
- package/src/components/icons/krone_icons/ExpertBadge.jsx +29 -0
- package/src/components/icons/krone_icons/Facebook.jsx +7 -0
- package/src/components/icons/krone_icons/Flag.jsx +7 -0
- package/src/components/icons/krone_icons/Home.jsx +29 -0
- package/src/components/icons/krone_icons/Italic.jsx +7 -0
- package/src/components/icons/krone_icons/KroneIcons.docs.mdx +21 -0
- package/src/components/icons/krone_icons/KroneIcons.stories.jsx +124 -0
- package/src/components/icons/krone_icons/KroneIcons.test.jsx +15 -0
- package/src/components/icons/krone_icons/LightArrow.jsx +7 -0
- package/src/components/icons/krone_icons/Link.jsx +8 -0
- package/src/components/icons/krone_icons/Login.jsx +11 -0
- package/src/components/icons/krone_icons/Logora.jsx +24 -0
- package/src/components/icons/krone_icons/Mail.jsx +7 -0
- package/src/components/icons/krone_icons/MinusCircle.jsx +16 -0
- package/src/components/icons/krone_icons/MobileClose.jsx +8 -0
- package/src/components/icons/krone_icons/MobileMenu.jsx +10 -0
- package/src/components/icons/krone_icons/Next.jsx +10 -0
- package/src/components/icons/krone_icons/OpenBlank.jsx +15 -0
- package/src/components/icons/krone_icons/OrderedList.jsx +7 -0
- package/src/components/icons/krone_icons/PauseCircle.jsx +10 -0
- package/src/components/icons/krone_icons/Point.jsx +8 -0
- package/src/components/icons/krone_icons/Question.jsx +29 -0
- package/src/components/icons/krone_icons/Refresh.jsx +7 -0
- package/src/components/icons/krone_icons/Reply.jsx +18 -0
- package/src/components/icons/krone_icons/Search.jsx +7 -0
- package/src/components/icons/krone_icons/Send.jsx +19 -0
- package/src/components/icons/krone_icons/Share.jsx +16 -0
- package/src/components/icons/krone_icons/SmallArrow.jsx +11 -0
- package/src/components/icons/krone_icons/Source.jsx +7 -0
- package/src/components/icons/krone_icons/Suggestion.jsx +29 -0
- package/src/components/icons/krone_icons/Twitter.jsx +10 -0
- package/src/components/icons/krone_icons/Underline.jsx +7 -0
- package/src/components/icons/krone_icons/Upvote.jsx +29 -0
- package/src/components/icons/krone_icons/User.jsx +30 -0
- package/src/components/icons/krone_icons/Versus.jsx +9 -0
- package/src/components/icons/krone_icons/Votebox.jsx +29 -0
- package/src/components/icons/krone_icons/index.js +52 -0
- package/src/components/icons/regular_icons/Alarm.jsx +7 -0
- package/src/components/icons/regular_icons/Announcement.jsx +16 -0
- package/src/components/icons/regular_icons/Arrow.jsx +7 -0
- package/src/components/icons/regular_icons/Blockquote.jsx +7 -0
- package/src/components/icons/regular_icons/Bold.jsx +7 -0
- package/src/components/icons/regular_icons/Camera.jsx +8 -0
- package/src/components/icons/regular_icons/Chat.jsx +10 -0
- package/src/components/icons/regular_icons/Check.jsx +7 -0
- package/src/components/icons/regular_icons/CheckCircle.jsx +17 -0
- package/src/components/icons/regular_icons/Checkbox.jsx +8 -0
- package/src/components/icons/regular_icons/Clap.jsx +7 -0
- package/src/components/icons/regular_icons/Clock.jsx +7 -0
- package/src/components/icons/regular_icons/Close.jsx +7 -0
- package/src/components/icons/regular_icons/Code.jsx +18 -0
- package/src/components/icons/regular_icons/Community.jsx +7 -0
- package/src/components/icons/regular_icons/Crown.jsx +7 -0
- package/src/components/icons/regular_icons/Document.jsx +7 -0
- package/src/components/icons/regular_icons/Downvote.jsx +7 -0
- package/src/components/icons/regular_icons/Ellipsis.jsx +8 -0
- package/src/components/icons/regular_icons/ExpertBadge.jsx +11 -0
- package/src/components/icons/regular_icons/Facebook.jsx +7 -0
- package/src/components/icons/regular_icons/Flag.jsx +7 -0
- package/src/components/icons/regular_icons/Home.jsx +7 -0
- package/src/components/icons/regular_icons/Italic.jsx +7 -0
- package/src/components/icons/regular_icons/LightArrow.jsx +7 -0
- package/src/components/icons/regular_icons/Link.jsx +8 -0
- package/src/components/icons/regular_icons/Login.jsx +11 -0
- package/src/components/icons/regular_icons/Logora.jsx +24 -0
- package/src/components/icons/regular_icons/Mail.jsx +7 -0
- package/src/components/icons/regular_icons/MinusCircle.jsx +16 -0
- package/src/components/icons/regular_icons/MobileClose.jsx +8 -0
- package/src/components/icons/regular_icons/MobileMenu.jsx +10 -0
- package/src/components/icons/regular_icons/Next.jsx +10 -0
- package/src/components/icons/regular_icons/OpenBlank.jsx +15 -0
- package/src/components/icons/regular_icons/OrderedList.jsx +7 -0
- package/src/components/icons/regular_icons/PauseCircle.jsx +10 -0
- package/src/components/icons/regular_icons/Point.jsx +8 -0
- package/src/components/icons/regular_icons/Question.jsx +8 -0
- package/src/components/icons/regular_icons/Refresh.jsx +7 -0
- package/src/components/icons/regular_icons/RegularIcons.docs.mdx +21 -0
- package/src/components/icons/regular_icons/RegularIcons.stories.jsx +123 -0
- package/src/components/icons/regular_icons/RegularIcons.test.jsx +15 -0
- package/src/components/icons/regular_icons/Reply.jsx +7 -0
- package/src/components/icons/regular_icons/Search.jsx +7 -0
- package/src/components/icons/regular_icons/Send.jsx +7 -0
- package/src/components/icons/regular_icons/Share.jsx +14 -0
- package/src/components/icons/regular_icons/SmallArrow.jsx +11 -0
- package/src/components/icons/regular_icons/Source.jsx +7 -0
- package/src/components/icons/regular_icons/Suggestion.jsx +7 -0
- package/src/components/icons/regular_icons/Twitter.jsx +10 -0
- package/src/components/icons/regular_icons/Underline.jsx +7 -0
- package/src/components/icons/regular_icons/Upvote.jsx +7 -0
- package/src/components/icons/regular_icons/User.jsx +7 -0
- package/src/components/icons/regular_icons/Versus.jsx +9 -0
- package/src/components/icons/regular_icons/Votebox.jsx +7 -0
- package/src/components/icons/regular_icons/index.js +52 -0
- package/src/components/icons/spiegel_icons/Alarm.jsx +7 -0
- package/src/components/icons/spiegel_icons/Announcement.jsx +16 -0
- package/src/components/icons/spiegel_icons/Arrow.jsx +7 -0
- package/src/components/icons/spiegel_icons/Blockquote.jsx +14 -0
- package/src/components/icons/spiegel_icons/Bold.jsx +7 -0
- package/src/components/icons/spiegel_icons/Camera.jsx +8 -0
- package/src/components/icons/spiegel_icons/Chat.jsx +7 -0
- package/src/components/icons/spiegel_icons/Check.jsx +11 -0
- package/src/components/icons/spiegel_icons/CheckCircle.jsx +8 -0
- package/src/components/icons/spiegel_icons/Checkbox.jsx +14 -0
- package/src/components/icons/spiegel_icons/Clap.jsx +15 -0
- package/src/components/icons/spiegel_icons/Clock.jsx +15 -0
- package/src/components/icons/spiegel_icons/Close.jsx +7 -0
- package/src/components/icons/spiegel_icons/Code.jsx +18 -0
- package/src/components/icons/spiegel_icons/Community.jsx +7 -0
- package/src/components/icons/spiegel_icons/Crown.jsx +7 -0
- package/src/components/icons/spiegel_icons/Downvote.jsx +7 -0
- package/src/components/icons/spiegel_icons/Ellipsis.jsx +8 -0
- package/src/components/icons/spiegel_icons/ExpertBadge.jsx +16 -0
- package/src/components/icons/spiegel_icons/Facebook.jsx +7 -0
- package/src/components/icons/spiegel_icons/Flag.jsx +8 -0
- package/src/components/icons/spiegel_icons/Home.jsx +7 -0
- package/src/components/icons/spiegel_icons/Italic.jsx +7 -0
- package/src/components/icons/spiegel_icons/LightArrow.jsx +7 -0
- package/src/components/icons/spiegel_icons/Link.jsx +17 -0
- package/src/components/icons/spiegel_icons/Login.jsx +7 -0
- package/src/components/icons/spiegel_icons/Logora.jsx +24 -0
- package/src/components/icons/spiegel_icons/Mail.jsx +7 -0
- package/src/components/icons/spiegel_icons/MinusCircle.jsx +8 -0
- package/src/components/icons/spiegel_icons/MobileClose.jsx +8 -0
- package/src/components/icons/spiegel_icons/MobileMenu.jsx +10 -0
- package/src/components/icons/spiegel_icons/Next.jsx +10 -0
- package/src/components/icons/spiegel_icons/OpenBlank.jsx +15 -0
- package/src/components/icons/spiegel_icons/OrderedList.jsx +20 -0
- package/src/components/icons/spiegel_icons/PauseCircle.jsx +8 -0
- package/src/components/icons/spiegel_icons/Point.jsx +8 -0
- package/src/components/icons/spiegel_icons/Question.jsx +17 -0
- package/src/components/icons/spiegel_icons/Refresh.jsx +7 -0
- package/src/components/icons/spiegel_icons/Reply.jsx +7 -0
- package/src/components/icons/spiegel_icons/Search.jsx +7 -0
- package/src/components/icons/spiegel_icons/Send.jsx +7 -0
- package/src/components/icons/spiegel_icons/Share.jsx +14 -0
- package/src/components/icons/spiegel_icons/SmallArrow.jsx +7 -0
- package/src/components/icons/spiegel_icons/Source.jsx +7 -0
- package/src/components/icons/spiegel_icons/SpiegelIcons.docs.mdx +21 -0
- package/src/components/icons/spiegel_icons/SpiegelIcons.stories.jsx +121 -0
- package/src/components/icons/spiegel_icons/SpiegelIcons.test.jsx +15 -0
- package/src/components/icons/spiegel_icons/Suggestion.jsx +7 -0
- package/src/components/icons/spiegel_icons/Twitter.jsx +10 -0
- package/src/components/icons/spiegel_icons/Underline.jsx +14 -0
- package/src/components/icons/spiegel_icons/Upvote.jsx +7 -0
- package/src/components/icons/spiegel_icons/User.jsx +7 -0
- package/src/components/icons/spiegel_icons/Versus.jsx +11 -0
- package/src/components/icons/spiegel_icons/Votebox.jsx +14 -0
- package/src/components/icons/spiegel_icons/index.js +51 -0
- package/src/components/information/information_box/InformationBox.docs.mdx +28 -0
- package/src/components/information/information_box/InformationBox.jsx +54 -0
- package/src/components/information/information_box/InformationBox.module.scss +92 -0
- package/src/components/information/information_box/InformationBox.stories.jsx +50 -0
- package/src/components/information/information_box/InformationBox.test.jsx +94 -0
- package/src/components/information/information_box/index.js +1 -0
- package/src/components/input/argument_input/ArgumentInput.docs.mdx +29 -0
- package/src/components/input/argument_input/ArgumentInput.jsx +420 -0
- package/src/components/input/argument_input/ArgumentInput.module.scss +166 -0
- package/src/components/input/argument_input/ArgumentInput.stories.jsx +181 -0
- package/src/components/input/argument_input/ArgumentInput.test.jsx +482 -0
- package/src/components/input/argument_input/index.js +1 -0
- package/src/components/input/checkbox/hidden/hidden-checkbox.docs.mdx +4 -0
- package/src/components/input/checkbox/hidden/hidden-checkbox.jsx +8 -0
- package/src/components/input/checkbox/hidden/hidden-checkbox.module.scss +28 -0
- package/src/components/input/checkbox/hidden/hidden-checkbox.stories.jsx +73 -0
- package/src/components/input/checkbox/hidden/index.js +1 -0
- package/src/components/input/checkbox/indicator/checkbox-indicator.docs.mdx +9 -0
- package/src/components/input/checkbox/indicator/checkbox-indicator.jsx +17 -0
- package/src/components/input/checkbox/indicator/checkbox-indicator.module.scss +26 -0
- package/src/components/input/checkbox/indicator/checkbox-indicator.stories.jsx +51 -0
- package/src/components/input/checkbox/indicator/index.js +1 -0
- package/src/components/input/checkbox/label/checkbox-label.docs.mdx +39 -0
- package/src/components/input/checkbox/label/checkbox-label.jsx +40 -0
- package/src/components/input/checkbox/label/checkbox.stories.jsx +57 -0
- package/src/components/input/checkbox/label/index.js +1 -0
- package/src/components/input/input_provider/InputProvider.docs.mdx +38 -0
- package/src/components/input/input_provider/InputProvider.jsx +16 -0
- package/src/components/input/input_provider/InputProvider.test.jsx +102 -0
- package/src/components/input/input_provider/index.js +2 -0
- package/src/components/input/input_provider/useInput.jsx +8 -0
- package/src/components/input/search_input/SearchInput.docs.mdx +25 -0
- package/src/components/input/search_input/SearchInput.jsx +71 -0
- package/src/components/input/search_input/SearchInput.module.scss +18 -0
- package/src/components/input/search_input/SearchInput.stories.jsx +45 -0
- package/src/components/input/search_input/SearchInput.test.jsx +95 -0
- package/src/components/input/search_input/index.js +1 -0
- package/src/components/input/select/Select.docs.mdx +37 -0
- package/src/components/input/select/Select.jsx +102 -0
- package/src/components/input/select/Select.module.scss +72 -0
- package/src/components/input/select/Select.stories.jsx +75 -0
- package/src/components/input/select/Select.test.jsx +136 -0
- package/src/components/input/select/index.js +1 -0
- package/src/components/input/text_editor/EditorTheme.js +71 -0
- package/src/components/input/text_editor/TextEditor.docs.mdx +31 -0
- package/src/components/input/text_editor/TextEditor.jsx +205 -0
- package/src/components/input/text_editor/TextEditor.module.scss +140 -0
- package/src/components/input/text_editor/TextEditor.stories.jsx +227 -0
- package/src/components/input/text_editor/TextEditor.test.jsx +654 -0
- package/src/components/input/text_editor/index.js +2 -0
- package/src/components/input/text_editor/lexicalToHtml.js +23 -0
- package/src/components/input/text_editor/plugins/AutoSavePlugin.jsx +37 -0
- package/src/components/input/text_editor/plugins/FocusPlugin.jsx +19 -0
- package/src/components/input/text_editor/plugins/MaxLengthPlugin.jsx +44 -0
- package/src/components/input/text_editor/plugins/ResetPlugin.jsx +35 -0
- package/src/components/input/text_editor/plugins/SetContentPlugin.jsx +24 -0
- package/src/components/input/text_editor/plugins/SetRichContentPlugin.jsx +20 -0
- package/src/components/input/text_editor/plugins/ToolbarPlugin.jsx +233 -0
- package/src/components/input/text_editor/plugins/ToolbarPlugin.module.scss +77 -0
- package/src/components/input/text_input/TextInput.docs.mdx +73 -0
- package/src/components/input/text_input/TextInput.jsx +46 -0
- package/src/components/input/text_input/TextInput.module.scss +146 -0
- package/src/components/input/text_input/TextInput.stories.jsx +101 -0
- package/src/components/input/text_input/TextInput.test.jsx +64 -0
- package/src/components/input/text_input/color-accent.js +16 -0
- package/src/components/input/text_input/index.js +3 -0
- package/src/components/input/text_input/message.jsx +12 -0
- package/src/components/input/toggle/Toggle.docs.mdx +23 -0
- package/src/components/input/toggle/Toggle.jsx +25 -0
- package/src/components/input/toggle/Toggle.module.scss +73 -0
- package/src/components/input/toggle/Toggle.stories.jsx +42 -0
- package/src/components/input/toggle/Toggle.test.jsx +39 -0
- package/src/components/input/toggle/index.js +1 -0
- package/src/components/input/toggle_position/TogglePosition.docs.mdx +20 -0
- package/src/components/input/toggle_position/TogglePosition.jsx +55 -0
- package/src/components/input/toggle_position/TogglePosition.module.scss +46 -0
- package/src/components/input/toggle_position/TogglePosition.stories.jsx +96 -0
- package/src/components/input/toggle_position/TogglePosition.test.jsx +66 -0
- package/src/components/input/toggle_position/index.js +1 -0
- package/src/components/intl/intl_provider/IntlContext.jsx +3 -0
- package/src/components/intl/intl_provider/IntlProvider.docs.mdx +37 -0
- package/src/components/intl/intl_provider/IntlProvider.jsx +92 -0
- package/src/components/intl/intl_provider/IntlProvider.test.jsx +153 -0
- package/src/components/intl/intl_provider/index.js +3 -0
- package/src/components/intl/intl_provider/locales/en.json +4 -0
- package/src/components/intl/intl_provider/locales/es.json +4 -0
- package/src/components/intl/intl_provider/locales/fr.json +6 -0
- package/src/components/intl/intl_provider/locales/index.js +11 -0
- package/src/components/intl/intl_provider/useLocale.jsx +8 -0
- package/src/components/list/list_provider/ListProvider.docs.mdx +51 -0
- package/src/components/list/list_provider/ListProvider.jsx +32 -0
- package/src/components/list/list_provider/ListProvider.stories.jsx +92 -0
- package/src/components/list/list_provider/ListProvider.test.jsx +137 -0
- package/src/components/list/list_provider/index.js +2 -0
- package/src/components/list/list_provider/useList.jsx +8 -0
- package/src/components/list/paginated_list/PaginatedList.docs.mdx +68 -0
- package/src/components/list/paginated_list/PaginatedList.jsx +397 -0
- package/src/components/list/paginated_list/PaginatedList.module.scss +88 -0
- package/src/components/list/paginated_list/PaginatedList.stories.jsx +301 -0
- package/src/components/list/paginated_list/PaginatedList.test.jsx +1335 -0
- package/src/components/list/paginated_list/VotePaginatedList.jsx +26 -0
- package/src/components/list/paginated_list/VotePaginatedList.test.jsx +1518 -0
- package/src/components/list/paginated_list/action_bar/ActionBar.jsx +132 -0
- package/src/components/list/paginated_list/action_bar/ActionBar.module.scss +81 -0
- package/src/components/list/paginated_list/index.js +3 -0
- package/src/components/list/pagination/Pagination.docs.mdx +32 -0
- package/src/components/list/pagination/Pagination.jsx +58 -0
- package/src/components/list/pagination/Pagination.module.scss +10 -0
- package/src/components/list/pagination/Pagination.stories.jsx +44 -0
- package/src/components/list/pagination/Pagination.test.jsx +80 -0
- package/src/components/list/pagination/index.js +1 -0
- package/src/components/modal/side_modal/SideModal.docs.mdx +31 -0
- package/src/components/modal/side_modal/SideModal.jsx +85 -0
- package/src/components/modal/side_modal/SideModal.module.scss +83 -0
- package/src/components/modal/side_modal/SideModal.stories.jsx +112 -0
- package/src/components/modal/side_modal/SideModal.test.jsx +36 -0
- package/src/components/modal/side_modal/index.js +1 -0
- package/src/components/navbar/navbar_button/NavbarButton.docs.mdx +37 -0
- package/src/components/navbar/navbar_button/NavbarButton.jsx +43 -0
- package/src/components/navbar/navbar_button/NavbarButton.module.scss +45 -0
- package/src/components/navbar/navbar_button/NavbarButton.stories.jsx +93 -0
- package/src/components/navbar/navbar_button/NavbarButton.test.jsx +67 -0
- package/src/components/navbar/navbar_button/index.js +1 -0
- package/src/components/navbar/navbar_modal/NavbarModal.docs.mdx +24 -0
- package/src/components/navbar/navbar_modal/NavbarModal.jsx +175 -0
- package/src/components/navbar/navbar_modal/NavbarModal.module.scss +132 -0
- package/src/components/navbar/navbar_modal/NavbarModal.stories.jsx +96 -0
- package/src/components/navbar/navbar_modal/NavbarModal.test.jsx +155 -0
- package/src/components/navbar/navbar_modal/index.js +1 -0
- package/src/components/notification/notification_item/NotificationItem.docs.mdx +35 -0
- package/src/components/notification/notification_item/NotificationItem.jsx +71 -0
- package/src/components/notification/notification_item/NotificationItem.module.scss +56 -0
- package/src/components/notification/notification_item/NotificationItem.stories.jsx +121 -0
- package/src/components/notification/notification_item/NotificationItem.test.jsx +97 -0
- package/src/components/notification/notification_item/index.js +1 -0
- package/src/components/notification/notification_menu/NotificationMenu.docs.mdx +25 -0
- package/src/components/notification/notification_menu/NotificationMenu.jsx +61 -0
- package/src/components/notification/notification_menu/NotificationMenu.module.scss +49 -0
- package/src/components/notification/notification_menu/NotificationMenu.stories.jsx +94 -0
- package/src/components/notification/notification_menu/NotificationMenu.test.jsx +131 -0
- package/src/components/notification/notification_menu/index.js +1 -0
- package/src/components/progress/loader/Loader.docs.mdx +13 -0
- package/src/components/progress/loader/Loader.jsx +9 -0
- package/src/components/progress/loader/Loader.module.scss +26 -0
- package/src/components/progress/loader/Loader.stories.jsx +11 -0
- package/src/components/progress/loader/Loader.test.jsx +11 -0
- package/src/components/progress/loader/index.js +3 -0
- package/src/components/progress/progress_bar/ProgressBar.docs.mdx +29 -0
- package/src/components/progress/progress_bar/ProgressBar.jsx +75 -0
- package/src/components/progress/progress_bar/ProgressBar.module.scss +87 -0
- package/src/components/progress/progress_bar/ProgressBar.stories.jsx +43 -0
- package/src/components/progress/progress_bar/ProgressBar.test.jsx +126 -0
- package/src/components/progress/progress_bar/index.js +1 -0
- package/src/components/proposal/proposal_box/ProposalBox.docs.mdx +39 -0
- package/src/components/proposal/proposal_box/ProposalBox.jsx +108 -0
- package/src/components/proposal/proposal_box/ProposalBox.module.scss +80 -0
- package/src/components/proposal/proposal_box/ProposalBox.stories.jsx +161 -0
- package/src/components/proposal/proposal_box/ProposalBox.test.jsx +137 -0
- package/src/components/proposal/proposal_box/index.js +1 -0
- package/src/components/report/report_box/ReportBox.docs.mdx +35 -0
- package/src/components/report/report_box/ReportBox.jsx +120 -0
- package/src/components/report/report_box/ReportBox.module.scss +54 -0
- package/src/components/report/report_box/ReportBox.stories.jsx +247 -0
- package/src/components/report/report_box/ReportBox.test.jsx +232 -0
- package/src/components/report/report_box/index.js +1 -0
- package/src/components/section/section_box/SectionBox.docs.mdx +19 -0
- package/src/components/section/section_box/SectionBox.jsx +32 -0
- package/src/components/section/section_box/SectionBox.module.scss +57 -0
- package/src/components/section/section_box/SectionBox.stories.jsx +39 -0
- package/src/components/section/section_box/SectionBox.test.jsx +44 -0
- package/src/components/section/section_box/index.js +1 -0
- package/src/components/share/share_box/ShareBox.docs.mdx +27 -0
- package/src/components/share/share_box/ShareBox.jsx +71 -0
- package/src/components/share/share_box/ShareBox.module.scss +38 -0
- package/src/components/share/share_box/ShareBox.stories.jsx +42 -0
- package/src/components/share/share_box/ShareBox.test.jsx +142 -0
- package/src/components/share/share_box/index.js +1 -0
- package/src/components/share/share_button/ShareButton.docs.mdx +26 -0
- package/src/components/share/share_button/ShareButton.jsx +102 -0
- package/src/components/share/share_button/ShareButton.module.scss +68 -0
- package/src/components/share/share_button/ShareButton.stories.jsx +51 -0
- package/src/components/share/share_button/ShareButton.test.jsx +117 -0
- package/src/components/share/share_button/index.js +1 -0
- package/src/components/share/share_modal/ShareModal.docs.mdx +29 -0
- package/src/components/share/share_modal/ShareModal.jsx +49 -0
- package/src/components/share/share_modal/ShareModal.module.scss +21 -0
- package/src/components/share/share_modal/ShareModal.stories.jsx +48 -0
- package/src/components/share/share_modal/ShareModal.test.jsx +70 -0
- package/src/components/share/share_modal/index.js +1 -0
- package/src/components/skeleton/box_skeleton/BoxSkeleton.docs.mdx +14 -0
- package/src/components/skeleton/box_skeleton/BoxSkeleton.jsx +38 -0
- package/src/components/skeleton/box_skeleton/BoxSkeleton.stories.jsx +46 -0
- package/src/components/skeleton/box_skeleton/BoxSkeleton.test.jsx +39 -0
- package/src/components/skeleton/box_skeleton/index.js +1 -0
- package/src/components/skeleton/user_content_skeleton/UserContentSkeleton.docs.mdx +15 -0
- package/src/components/skeleton/user_content_skeleton/UserContentSkeleton.jsx +56 -0
- package/src/components/skeleton/user_content_skeleton/UserContentSkeleton.module.scss +78 -0
- package/src/components/skeleton/user_content_skeleton/UserContentSkeleton.stories.jsx +44 -0
- package/src/components/skeleton/user_content_skeleton/UserContentSkeleton.test.jsx +55 -0
- package/src/components/skeleton/user_content_skeleton/index.js +1 -0
- package/src/components/source/context_source_box/ContextSourceBox.docs.mdx +27 -0
- package/src/components/source/context_source_box/ContextSourceBox.jsx +38 -0
- package/src/components/source/context_source_box/ContextSourceBox.module.scss +50 -0
- package/src/components/source/context_source_box/ContextSourceBox.stories.jsx +36 -0
- package/src/components/source/context_source_box/ContextSourceBox.test.jsx +46 -0
- package/src/components/source/context_source_box/index.js +1 -0
- package/src/components/source/context_source_list/ContextSourceList.docs.mdx +37 -0
- package/src/components/source/context_source_list/ContextSourceList.jsx +42 -0
- package/src/components/source/context_source_list/ContextSourceList.module.scss +38 -0
- package/src/components/source/context_source_list/ContextSourceList.stories.jsx +39 -0
- package/src/components/source/context_source_list/ContextSourceList.test.jsx +47 -0
- package/src/components/source/context_source_list/index.js +1 -0
- package/src/components/source/source_box/SourceBox.docs.mdx +23 -0
- package/src/components/source/source_box/SourceBox.jsx +43 -0
- package/src/components/source/source_box/SourceBox.module.scss +43 -0
- package/src/components/source/source_box/SourceBox.stories.jsx +26 -0
- package/src/components/source/source_box/SourceBox.test.jsx +30 -0
- package/src/components/source/source_box/index.js +1 -0
- package/src/components/source/source_list_item/SourceListItem.docs.mdx +23 -0
- package/src/components/source/source_list_item/SourceListItem.jsx +28 -0
- package/src/components/source/source_list_item/SourceListItem.module.scss +33 -0
- package/src/components/source/source_list_item/SourceListItem.stories.jsx +40 -0
- package/src/components/source/source_list_item/SourceListItem.test.jsx +41 -0
- package/src/components/source/source_list_item/index.js +1 -0
- package/src/components/source/source_modal/SourceModal.docs.mdx +29 -0
- package/src/components/source/source_modal/SourceModal.jsx +157 -0
- package/src/components/source/source_modal/SourceModal.module.scss +45 -0
- package/src/components/source/source_modal/SourceModal.stories.jsx +82 -0
- package/src/components/source/source_modal/SourceModal.test.jsx +180 -0
- package/src/components/source/source_modal/index.js +1 -0
- package/src/components/styles/display/_display.scss +127 -0
- package/src/components/styles/display/display.docs.mdx +8 -0
- package/src/components/styles/display/index.scss +1 -0
- package/src/components/styles/flex/_flex.scss +55 -0
- package/src/components/styles/flex/flex.docs.mdx +8 -0
- package/src/components/styles/flex/index.scss +1 -0
- package/src/components/styles/spacing/_spacing.scss +107 -0
- package/src/components/styles/spacing/index.scss +1 -0
- package/src/components/styles/spacing/spacing.docs.mdx +8 -0
- package/src/components/styles/tabs/_tabs.scss +159 -0
- package/src/components/styles/tabs/index.scss +1 -0
- package/src/components/styles/tabs/tabs.docs.mdx +8 -0
- package/src/components/styles/theme/_theme.scss +51 -0
- package/src/components/styles/theme/index.scss +1 -0
- package/src/components/styles/theme/theme.docs.mdx +89 -0
- package/src/components/suggestion/suggestion_banner/SuggestionBanner.docs.mdx +35 -0
- package/src/components/suggestion/suggestion_banner/SuggestionBanner.jsx +86 -0
- package/src/components/suggestion/suggestion_banner/SuggestionBanner.module.scss +93 -0
- package/src/components/suggestion/suggestion_banner/SuggestionBanner.stories.jsx +128 -0
- package/src/components/suggestion/suggestion_banner/SuggestionBanner.test.jsx +237 -0
- package/src/components/suggestion/suggestion_banner/index.js +1 -0
- package/src/components/suggestion/suggestion_box/SuggestionBox.docs.mdx +39 -0
- package/src/components/suggestion/suggestion_box/SuggestionBox.jsx +112 -0
- package/src/components/suggestion/suggestion_box/SuggestionBox.module.scss +55 -0
- package/src/components/suggestion/suggestion_box/SuggestionBox.stories.jsx +147 -0
- package/src/components/suggestion/suggestion_box/SuggestionBox.test.jsx +184 -0
- package/src/components/suggestion/suggestion_box/index.js +1 -0
- package/src/components/suggestion/suggestion_input/SuggestionInput.docs.mdx +19 -0
- package/src/components/suggestion/suggestion_input/SuggestionInput.jsx +212 -0
- package/src/components/suggestion/suggestion_input/SuggestionInput.module.scss +50 -0
- package/src/components/suggestion/suggestion_input/SuggestionInput.stories.jsx +87 -0
- package/src/components/suggestion/suggestion_input/SuggestionInput.test.jsx +77 -0
- package/src/components/suggestion/suggestion_input/index.js +1 -0
- package/src/components/summary/argument_summary_box/ArgumentSummaryBox.docs.mdx +19 -0
- package/src/components/summary/argument_summary_box/ArgumentSummaryBox.jsx +40 -0
- package/src/components/summary/argument_summary_box/ArgumentSummaryBox.module.scss +67 -0
- package/src/components/summary/argument_summary_box/ArgumentSummaryBox.stories.jsx +57 -0
- package/src/components/summary/argument_summary_box/ArgumentSummaryBox.test.jsx +18 -0
- package/src/components/summary/argument_summary_box/index.js +1 -0
- package/src/components/summary/keyword_box/KeywordBox.docs.mdx +21 -0
- package/src/components/summary/keyword_box/KeywordBox.jsx +43 -0
- package/src/components/summary/keyword_box/KeywordBox.module.scss +54 -0
- package/src/components/summary/keyword_box/KeywordBox.stories.jsx +49 -0
- package/src/components/summary/keyword_box/KeywordBox.test.jsx +47 -0
- package/src/components/summary/keyword_box/index.js +1 -0
- package/src/components/summary/summary/Summary.docs.mdx +23 -0
- package/src/components/summary/summary/Summary.jsx +93 -0
- package/src/components/summary/summary/Summary.module.scss +26 -0
- package/src/components/summary/summary/Summary.stories.jsx +95 -0
- package/src/components/summary/summary/Summary.test.jsx +116 -0
- package/src/components/summary/summary/index.js +1 -0
- package/src/components/summary/summary_box/SummaryBox.docs.mdx +19 -0
- package/src/components/summary/summary_box/SummaryBox.jsx +39 -0
- package/src/components/summary/summary_box/SummaryBox.module.scss +56 -0
- package/src/components/summary/summary_box/SummaryBox.stories.jsx +83 -0
- package/src/components/summary/summary_box/SummaryBox.test.jsx +47 -0
- package/src/components/summary/summary_box/SummaryBoxComposition.module.scss +3 -0
- package/src/components/summary/summary_box/index.js +1 -0
- package/src/components/tag/tag/Tag.docs.mdx +19 -0
- package/src/components/tag/tag/Tag.jsx +35 -0
- package/src/components/tag/tag/Tag.module.scss +34 -0
- package/src/components/tag/tag/Tag.stories.jsx +70 -0
- package/src/components/tag/tag/Tag.test.jsx +29 -0
- package/src/components/tag/tag/index.js +1 -0
- package/src/components/text/expandable_text/ArrowIcon.jsx +7 -0
- package/src/components/text/expandable_text/ExpandableText.docs.mdx +42 -0
- package/src/components/text/expandable_text/ExpandableText.jsx +81 -0
- package/src/components/text/expandable_text/ExpandableText.module.scss +76 -0
- package/src/components/text/expandable_text/ExpandableText.stories.jsx +63 -0
- package/src/components/text/expandable_text/ExpandableText.test.jsx +23 -0
- package/src/components/text/expandable_text/index.js +1 -0
- package/src/components/text/read_more/ReadMore.docs.mdx +23 -0
- package/src/components/text/read_more/ReadMore.jsx +104 -0
- package/src/components/text/read_more/ReadMore.module.scss +51 -0
- package/src/components/text/read_more/ReadMore.stories.jsx +141 -0
- package/src/components/text/read_more/ReadMore.test.jsx +87 -0
- package/src/components/text/read_more/index.js +1 -0
- package/src/components/tools/hash_scroll/HashScroll.docs.mdx +27 -0
- package/src/components/tools/hash_scroll/HashScroll.jsx +36 -0
- package/src/components/tools/hash_scroll/HashScroll.test.jsx +66 -0
- package/src/components/tools/hash_scroll/index.js +1 -0
- package/src/components/tools/scroll_to_top/ScrollToTop.docs.mdx +28 -0
- package/src/components/tools/scroll_to_top/ScrollToTop.jsx +22 -0
- package/src/components/tools/scroll_to_top/ScrollToTop.stories.jsx +40 -0
- package/src/components/tools/scroll_to_top/ScrollToTop.test.jsx +36 -0
- package/src/components/tools/scroll_to_top/index.js +1 -0
- package/src/components/translation/translated_content/TranslatedContent.jsx +24 -0
- package/src/components/translation/translated_content/TranslatedContent.test.jsx +30 -0
- package/src/components/translation/translated_content/index.js +3 -0
- package/src/components/translation/translated_content/useTranslatedContent.docs.mdx +80 -0
- package/src/components/translation/translated_content/useTranslatedContent.jsx +57 -0
- package/src/components/translation/translated_content/useTranslatedContent.test.jsx +118 -0
- package/src/components/translation/translation_button/TranslationButton.docs.mdx +18 -0
- package/src/components/translation/translation_button/TranslationButton.jsx +46 -0
- package/src/components/translation/translation_button/TranslationButton.module.scss +10 -0
- package/src/components/translation/translation_button/TranslationButton.stories.jsx +30 -0
- package/src/components/translation/translation_button/TranslationButton.test.jsx +35 -0
- package/src/components/translation/translation_button/index.js +1 -0
- package/src/components/user/author_box/AuthorBox.docs.mdx +35 -0
- package/src/components/user/author_box/AuthorBox.jsx +128 -0
- package/src/components/user/author_box/AuthorBox.module.scss +110 -0
- package/src/components/user/author_box/AuthorBox.stories.jsx +193 -0
- package/src/components/user/author_box/AuthorBox.test.jsx +171 -0
- package/src/components/user/author_box/index.js +1 -0
- package/src/components/user/avatar/Avatar.docs.mdx +31 -0
- package/src/components/user/avatar/Avatar.jsx +63 -0
- package/src/components/user/avatar/Avatar.module.scss +30 -0
- package/src/components/user/avatar/Avatar.stories.jsx +79 -0
- package/src/components/user/avatar/Avatar.test.jsx +114 -0
- package/src/components/user/avatar/DefaultAvatar.jsx +13 -0
- package/src/components/user/avatar/index.js +1 -0
- package/src/components/user/avatar_selector/AvatarSelector.docs.mdx +25 -0
- package/src/components/user/avatar_selector/AvatarSelector.jsx +65 -0
- package/src/components/user/avatar_selector/AvatarSelector.module.scss +105 -0
- package/src/components/user/avatar_selector/AvatarSelector.stories.jsx +46 -0
- package/src/components/user/avatar_selector/AvatarSelector.test.jsx +98 -0
- package/src/components/user/avatar_selector/index.js +1 -0
- package/src/components/user/update_user_info_modal/UpdateUserInfoModal.docs.mdx +22 -0
- package/src/components/user/update_user_info_modal/UpdateUserInfoModal.jsx +254 -0
- package/src/components/user/update_user_info_modal/UpdateUserInfoModal.module.scss +176 -0
- package/src/components/user/update_user_info_modal/UpdateUserInfoModal.stories.jsx +113 -0
- package/src/components/user/update_user_info_modal/UpdateUserInfoModal.test.jsx +213 -0
- package/src/components/user/update_user_info_modal/index.js +2 -0
- package/src/components/user/update_user_info_modal/useUpdateUserInfo.jsx +40 -0
- package/src/components/user/user_box/UserBox.docs.mdx +21 -0
- package/src/components/user/user_box/UserBox.jsx +59 -0
- package/src/components/user/user_box/UserBox.module.scss +86 -0
- package/src/components/user/user_box/UserBox.stories.jsx +82 -0
- package/src/components/user/user_box/UserBox.test.jsx +95 -0
- package/src/components/user/user_box/index.js +1 -0
- package/src/components/user/user_box_small/UserBoxSmall.docs.mdx +20 -0
- package/src/components/user/user_box_small/UserBoxSmall.jsx +36 -0
- package/src/components/user/user_box_small/UserBoxSmall.module.scss +21 -0
- package/src/components/user/user_box_small/UserBoxSmall.stories.jsx +38 -0
- package/src/components/user/user_box_small/UserBoxSmall.test.jsx +49 -0
- package/src/components/user/user_box_small/index.js +1 -0
- package/src/components/user_content/content_footer/ContentFooter.docs.mdx +36 -0
- package/src/components/user_content/content_footer/ContentFooter.jsx +234 -0
- package/src/components/user_content/content_footer/ContentFooter.module.scss +79 -0
- package/src/components/user_content/content_footer/ContentFooter.stories.jsx +438 -0
- package/src/components/user_content/content_footer/ContentFooter.test.jsx +246 -0
- package/src/components/user_content/content_footer/index.js +1 -0
- package/src/components/user_content/content_header/ContentHeader.docs.mdx +27 -0
- package/src/components/user_content/content_header/ContentHeader.jsx +131 -0
- package/src/components/user_content/content_header/ContentHeader.module.scss +111 -0
- package/src/components/user_content/content_header/ContentHeader.stories.jsx +221 -0
- package/src/components/user_content/content_header/ContentHeader.test.jsx +98 -0
- package/src/components/user_content/content_header/index.js +1 -0
- package/src/components/user_content/summary_content_box/SummaryContentBox.docs.mdx +25 -0
- package/src/components/user_content/summary_content_box/SummaryContentBox.jsx +89 -0
- package/src/components/user_content/summary_content_box/SummaryContentBox.module.scss +65 -0
- package/src/components/user_content/summary_content_box/SummaryContentBox.stories.jsx +130 -0
- package/src/components/user_content/summary_content_box/SummaryContentBox.test.jsx +169 -0
- package/src/components/user_content/summary_content_box/index.js +1 -0
- package/src/components/user_content/use_delete_content/index.js +1 -0
- package/src/components/user_content/use_delete_content/useDeleteContent.docs.mdx +34 -0
- package/src/components/user_content/use_delete_content/useDeleteContent.jsx +55 -0
- package/src/components/user_content/use_delete_content/useDeleteContent.test.jsx +78 -0
- package/src/components/user_content/use_report_content/ReportModal.docs.mdx +54 -0
- package/src/components/user_content/use_report_content/ReportModal.jsx +187 -0
- package/src/components/user_content/use_report_content/ReportModal.module.scss +121 -0
- package/src/components/user_content/use_report_content/ReportModal.stories.jsx +61 -0
- package/src/components/user_content/use_report_content/ReportModal.test.jsx +51 -0
- package/src/components/user_content/use_report_content/index.js +2 -0
- package/src/components/user_content/use_report_content/useReportContent.docs.mdx +24 -0
- package/src/components/user_content/use_report_content/useReportContent.jsx +32 -0
- package/src/components/user_content/use_report_content/useReportContent.test.jsx +138 -0
- package/src/components/util/lang_emojis/index.js +1 -0
- package/src/components/util/lang_emojis/langEmojis.docs.mdx +10 -0
- package/src/components/util/lang_emojis/langEmojis.js +72 -0
- package/src/components/util/lang_emojis/langEmojis.test.jsx +63 -0
- package/src/components/util/location/Location.docs.mdx +18 -0
- package/src/components/util/location/Location.js +84 -0
- package/src/components/util/location/Location.test.jsx +24 -0
- package/src/components/util/location/index.js +1 -0
- package/src/components/util/unique_by/index.js +1 -0
- package/src/components/util/unique_by/uniqueBy.docs.mdx +24 -0
- package/src/components/util/unique_by/uniqueBy.js +9 -0
- package/src/components/util/unique_by/uniqueBy.test.jsx +29 -0
- package/src/components/vote/suggestion_vote_box/SuggestionVoteBox.docs.mdx +24 -0
- package/src/components/vote/suggestion_vote_box/SuggestionVoteBox.jsx +87 -0
- package/src/components/vote/suggestion_vote_box/SuggestionVoteBox.module.scss +17 -0
- package/src/components/vote/suggestion_vote_box/SuggestionVoteBox.stories.jsx +97 -0
- package/src/components/vote/suggestion_vote_box/SuggestionVoteBox.test.jsx +182 -0
- package/src/components/vote/suggestion_vote_box/index.js +1 -0
- package/src/components/vote/up_down_vote_box/UpDownVoteBox.docs.mdx +24 -0
- package/src/components/vote/up_down_vote_box/UpDownVoteBox.jsx +64 -0
- package/src/components/vote/up_down_vote_box/UpDownVoteBox.module.scss +35 -0
- package/src/components/vote/up_down_vote_box/UpDownVoteBox.stories.jsx +97 -0
- package/src/components/vote/up_down_vote_box/UpDownVoteBox.test.jsx +173 -0
- package/src/components/vote/up_down_vote_box/index.js +1 -0
- package/src/components/vote/use_vote/index.js +1 -0
- package/src/components/vote/use_vote/useVote.docs.mdx +42 -0
- package/src/components/vote/use_vote/useVote.jsx +165 -0
- package/src/components/vote/use_vote/useVote.test.jsx +294 -0
- package/src/components/vote/vote_box/VoteBox.docs.mdx +45 -0
- package/src/components/vote/vote_box/VoteBox.jsx +420 -0
- package/src/components/vote/vote_box/VoteBox.module.scss +254 -0
- package/src/components/vote/vote_box/VoteBox.stories.jsx +319 -0
- package/src/components/vote/vote_box/VoteBox.test.jsx +256 -0
- package/src/components/vote/vote_box/index.js +1 -0
- package/src/components/vote/vote_button/VoteButton.docs.mdx +24 -0
- package/src/components/vote/vote_button/VoteButton.jsx +59 -0
- package/src/components/vote/vote_button/VoteButton.module.scss +35 -0
- package/src/components/vote/vote_button/VoteButton.stories.jsx +97 -0
- package/src/components/vote/vote_button/VoteButton.test.jsx +167 -0
- package/src/components/vote/vote_button/index.js +1 -0
- package/src/components/vote/vote_provider/VoteProvider.docs.mdx +68 -0
- package/src/components/vote/vote_provider/VoteProvider.jsx +63 -0
- package/src/components/vote/vote_provider/VoteProvider.stories.jsx +99 -0
- package/src/components/vote/vote_provider/VoteProvider.test.jsx +137 -0
- package/src/components/vote/vote_provider/index.js +2 -0
- package/src/index.js +127 -0
- package/vitest.config.mjs +52 -0
- package/vitest.setup.js +4 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import userEvent from '@testing-library/user-event';
|
|
4
|
+
import { MemoryRouter } from "react-router-dom";
|
|
5
|
+
import { IntlProvider } from 'react-intl';
|
|
6
|
+
import { SocialAuthForm } from './SocialAuthForm';
|
|
7
|
+
import { DefaultSocialAuthForm, SocialAuthFormWithoutLogo } from './SocialAuthForm.stories';
|
|
8
|
+
import { IconProvider } from '@logora/debate/icons/icon_provider';
|
|
9
|
+
import * as regularIcons from '@logora/debate/icons/regular_icons';
|
|
10
|
+
|
|
11
|
+
describe('SocialAuthForm', () => {
|
|
12
|
+
it('should render with correct default', () => {
|
|
13
|
+
const component = render(
|
|
14
|
+
<DefaultSocialAuthForm />
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
expect(screen.getByRole("img")).toBeTruthy();
|
|
18
|
+
const facebookButton = screen.getByText(/Sign in with Facebook/i);
|
|
19
|
+
const googleButton = screen.getByText(/Sign in with Google/i);
|
|
20
|
+
const emailButton = screen.getByText(/Sign in with email/i);
|
|
21
|
+
|
|
22
|
+
expect(facebookButton).toBeTruthy();
|
|
23
|
+
expect(googleButton).toBeTruthy();
|
|
24
|
+
expect(emailButton).toBeTruthy();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should render without logo', () => {
|
|
28
|
+
const component = render(
|
|
29
|
+
<SocialAuthFormWithoutLogo />
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
expect(screen.queryByRole("img")).toBeNull();
|
|
33
|
+
const facebookButton = screen.getByText(/Sign in with Facebook/i);
|
|
34
|
+
const googleButton = screen.getByText(/Sign in with Google/i);
|
|
35
|
+
const emailButton = screen.getByText(/Sign in with email/i);
|
|
36
|
+
|
|
37
|
+
expect(facebookButton).toBeTruthy();
|
|
38
|
+
expect(googleButton).toBeTruthy();
|
|
39
|
+
expect(emailButton).toBeTruthy();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should handle login navigation', async () => {
|
|
43
|
+
const component = render(
|
|
44
|
+
<DefaultSocialAuthForm />
|
|
45
|
+
)
|
|
46
|
+
const emailButton = screen.getByText(/Sign in with email/i);
|
|
47
|
+
expect(emailButton).toBeTruthy();
|
|
48
|
+
|
|
49
|
+
await userEvent.click(emailButton);
|
|
50
|
+
|
|
51
|
+
expect(screen.getByText("Email")).toBeTruthy();
|
|
52
|
+
expect(screen.getByText("Password")).toBeTruthy();
|
|
53
|
+
|
|
54
|
+
const backButton = screen.getByText("Back to menu");
|
|
55
|
+
expect(backButton).toBeTruthy();
|
|
56
|
+
|
|
57
|
+
await userEvent.click(backButton);
|
|
58
|
+
|
|
59
|
+
const emailButton2 = screen.getByText(/Sign in with email/i);
|
|
60
|
+
expect(emailButton2).toBeTruthy();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('should handle signup navigation', async () => {
|
|
64
|
+
const component = render(
|
|
65
|
+
<DefaultSocialAuthForm />
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
const signupButton = screen.getByText(/Sign up/i);
|
|
69
|
+
expect(signupButton).toBeTruthy();
|
|
70
|
+
|
|
71
|
+
await userEvent.click(signupButton);
|
|
72
|
+
|
|
73
|
+
const emailButton = screen.getByText(/Sign in with email/i);
|
|
74
|
+
expect(emailButton).toBeTruthy();
|
|
75
|
+
|
|
76
|
+
await userEvent.click(emailButton);
|
|
77
|
+
|
|
78
|
+
expect(screen.getByText("First name")).toBeTruthy();
|
|
79
|
+
expect(screen.getByText("Last name")).toBeTruthy();
|
|
80
|
+
expect(screen.getByText("Email")).toBeTruthy();
|
|
81
|
+
expect(screen.getByText("Password")).toBeTruthy();
|
|
82
|
+
|
|
83
|
+
const backButton = screen.getByText("Back to menu");
|
|
84
|
+
expect(backButton).toBeTruthy();
|
|
85
|
+
|
|
86
|
+
await userEvent.click(backButton);
|
|
87
|
+
|
|
88
|
+
expect(screen.getByText(/Sign in with email/i)).toBeTruthy();
|
|
89
|
+
expect(screen.getByText(/Already have an account ?/i)).toBeTruthy();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('should trigger callback when logging in with correct data', async () => {
|
|
93
|
+
const email = "test@test.com";
|
|
94
|
+
const password = "password";
|
|
95
|
+
const onSubmitCallback = vi.fn();
|
|
96
|
+
const data = { email: email, password: password }
|
|
97
|
+
|
|
98
|
+
render(
|
|
99
|
+
<MemoryRouter>
|
|
100
|
+
<IconProvider library={regularIcons}>
|
|
101
|
+
<IntlProvider locale="en">
|
|
102
|
+
<SocialAuthForm
|
|
103
|
+
onSubmit={onSubmitCallback}
|
|
104
|
+
facebookClientId={"facebook-client-id"}
|
|
105
|
+
googleClientId={"google-client-id"}
|
|
106
|
+
oAuthRedirectUri={"https://redirect-uri.com"}
|
|
107
|
+
logoUrl={"https://picsum.photos/200"}
|
|
108
|
+
providerName={"My company"}
|
|
109
|
+
termsUrl={"https://example.com/terms"}
|
|
110
|
+
privacyUrl={"https://example.com/privacy"}
|
|
111
|
+
forgotPasswordUrl={"http://example.com/forgot_password"}
|
|
112
|
+
lastStep={"LOGIN"}
|
|
113
|
+
/>
|
|
114
|
+
</IntlProvider>
|
|
115
|
+
</IconProvider>
|
|
116
|
+
</MemoryRouter>
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
const submitButton = screen.getByRole("button");
|
|
120
|
+
const emailInput = screen.getByTestId("email-input");
|
|
121
|
+
const passwordInput = screen.getByTestId("password-input");
|
|
122
|
+
|
|
123
|
+
await userEvent.type(emailInput, email);
|
|
124
|
+
await userEvent.type(passwordInput, password);
|
|
125
|
+
|
|
126
|
+
expect(submitButton).toBeTruthy();
|
|
127
|
+
|
|
128
|
+
await userEvent.click(submitButton);
|
|
129
|
+
expect(onSubmitCallback).toHaveBeenCalledTimes(1);
|
|
130
|
+
expect(onSubmitCallback).toHaveBeenCalledWith(data, "password", "LOGIN");
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
it('should trigger callback when signing up with correct data', async () => {
|
|
134
|
+
const email = "test@test.com";
|
|
135
|
+
const firstName = "My first name";
|
|
136
|
+
const lastName = "My last name";
|
|
137
|
+
const password = "my-password";
|
|
138
|
+
const passwordConfirmation = password;
|
|
139
|
+
const acceptsEmail = true;
|
|
140
|
+
const onSubmitCallback = vi.fn();
|
|
141
|
+
const data = {
|
|
142
|
+
first_name: firstName,
|
|
143
|
+
last_name: lastName,
|
|
144
|
+
email: email,
|
|
145
|
+
password: password,
|
|
146
|
+
accepts_provider_email: acceptsEmail,
|
|
147
|
+
receives_newsletter_email: acceptsEmail
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const component = render(
|
|
151
|
+
<MemoryRouter>
|
|
152
|
+
<IconProvider library={regularIcons}>
|
|
153
|
+
<IntlProvider locale="en">
|
|
154
|
+
<SocialAuthForm
|
|
155
|
+
onSubmit={onSubmitCallback}
|
|
156
|
+
facebookClientId={"facebook-client-id"}
|
|
157
|
+
googleClientId={"google-client-id"}
|
|
158
|
+
oAuthRedirectUri={"https://redirect-uri.com"}
|
|
159
|
+
logoUrl={"https://picsum.photos/200"}
|
|
160
|
+
providerName={"My company"}
|
|
161
|
+
termsUrl={"https://example.com/terms"}
|
|
162
|
+
privacyUrl={"https://example.com/privacy"}
|
|
163
|
+
forgotPasswordUrl={"http://example.com/forgot_password"}
|
|
164
|
+
lastStep={"SIGNUP"}
|
|
165
|
+
/>
|
|
166
|
+
</IntlProvider>
|
|
167
|
+
</IconProvider>
|
|
168
|
+
</MemoryRouter>
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
const submitButton = screen.getByRole("button");
|
|
172
|
+
const firstNameInput = screen.getByTestId("first-name-input");
|
|
173
|
+
const lastNameInput = screen.getByTestId("last-name-input");
|
|
174
|
+
const emailInput = screen.getByTestId("email-input");
|
|
175
|
+
const passwordInput = screen.getByTestId("password-input");
|
|
176
|
+
const confirmPasswordInput = screen.getByTestId("password-confirmation-input");
|
|
177
|
+
const acceptsEmailInput = screen.getByTestId("accepts-email-input");
|
|
178
|
+
|
|
179
|
+
await userEvent.type(firstNameInput, firstName);
|
|
180
|
+
await userEvent.type(lastNameInput, lastName);
|
|
181
|
+
await userEvent.type(emailInput, email);
|
|
182
|
+
await userEvent.type(passwordInput, password);
|
|
183
|
+
await userEvent.type(confirmPasswordInput, passwordConfirmation);
|
|
184
|
+
await userEvent.click(acceptsEmailInput);
|
|
185
|
+
|
|
186
|
+
expect(submitButton).toBeTruthy();
|
|
187
|
+
|
|
188
|
+
await userEvent.click(submitButton);
|
|
189
|
+
expect(onSubmitCallback).toHaveBeenCalledTimes(1);
|
|
190
|
+
|
|
191
|
+
const call = onSubmitCallback.mock.calls[0];
|
|
192
|
+
expect(call[0].first_name).toBe(firstName);
|
|
193
|
+
expect(call[0].last_name).toBe(lastName);
|
|
194
|
+
expect(call[0].email).toBe(email);
|
|
195
|
+
expect(call[0].password).toBe(password);
|
|
196
|
+
expect(call[0].accepts_provider_email).toBe(acceptsEmail);
|
|
197
|
+
expect(call[0].receives_newsletter_email).toBe(acceptsEmail);
|
|
198
|
+
expect(call[1]).toBe('form');
|
|
199
|
+
expect(call[2]).toBe('SIGNUP');
|
|
200
|
+
});
|
|
201
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SocialAuthForm } from './SocialAuthForm';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: A component to enable user sign in with OAuth2.
|
|
3
|
+
labels: ['auth', 'sso', 'single-sign-on', 'oauth2']
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The SSOForm component is a React component that represents a Single Sign-On form.
|
|
7
|
+
|
|
8
|
+
It provides a form with sign up and sign in options, as well as additional features like displaying a logo, and displaying terms and email consent options.
|
|
9
|
+
|
|
10
|
+
The component supports internationalization using the react-intl library.
|
|
11
|
+
|
|
12
|
+
### Component usage
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
import { SSOForm } from '@logora/debate.auth.sso_form';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
<MemoryRouter>
|
|
20
|
+
<IntlProvider locale="en">
|
|
21
|
+
<IconProvider>
|
|
22
|
+
<SocialAuthForm
|
|
23
|
+
authType={"oauth2_server"}
|
|
24
|
+
providerName={"My Website"}
|
|
25
|
+
clientId={"oauth-client-id"}
|
|
26
|
+
scope={"email"}
|
|
27
|
+
oAuthRedirectUri={"https://redirect-uri.com"}
|
|
28
|
+
loginUrl={"https://example.com/login"}
|
|
29
|
+
signupUrl={"https://example.com/signup"}
|
|
30
|
+
redirectParameter={"customRedirect"}
|
|
31
|
+
trackingParameters={{ tracking: "test" }}
|
|
32
|
+
termsUrl={"https://example.com/terms"}
|
|
33
|
+
showEmailConsent={true}
|
|
34
|
+
showTerms={true}
|
|
35
|
+
/>
|
|
36
|
+
</IconProvider>
|
|
37
|
+
</IntlProvider>
|
|
38
|
+
</MemoryRouter>
|
|
39
|
+
```
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useIntl, FormattedMessage } from "react-intl";
|
|
3
|
+
import { useLocation } from "react-router";
|
|
4
|
+
import useSessionStorageState from '@rooks/use-sessionstorage-state';
|
|
5
|
+
import { EMAIL_CONSENT_STORAGE_KEY } from "@logora/debate/auth/use_auth";
|
|
6
|
+
import { Icon } from "@logora/debate/icons/icon";
|
|
7
|
+
import { Toggle } from "@logora/debate/input/toggle";
|
|
8
|
+
import { Button } from "@logora/debate/action/button";
|
|
9
|
+
import cx from "classnames";
|
|
10
|
+
import styles from "./SSOForm.module.scss";
|
|
11
|
+
|
|
12
|
+
export const SSOForm = ({
|
|
13
|
+
authType,
|
|
14
|
+
providerName,
|
|
15
|
+
loginUrl,
|
|
16
|
+
signupUrl,
|
|
17
|
+
termsUrl,
|
|
18
|
+
logoUrl,
|
|
19
|
+
clientId,
|
|
20
|
+
oAuthRedirectUri,
|
|
21
|
+
scope,
|
|
22
|
+
redirectParameter = "logora_redirect",
|
|
23
|
+
trackingParameters = {},
|
|
24
|
+
hideActions = false,
|
|
25
|
+
hideLoginButton = false,
|
|
26
|
+
showEmailConsent = false,
|
|
27
|
+
showTerms = false,
|
|
28
|
+
hideBelowButton = false,
|
|
29
|
+
error = false,
|
|
30
|
+
}) => {
|
|
31
|
+
const [emailConsent, setEmailConsent] = showEmailConsent
|
|
32
|
+
? useSessionStorageState(EMAIL_CONSENT_STORAGE_KEY, false)
|
|
33
|
+
: [false, () => { }];
|
|
34
|
+
const intl = useIntl();
|
|
35
|
+
const location = useLocation();
|
|
36
|
+
|
|
37
|
+
const getLinkWithRedirect = (url) => {
|
|
38
|
+
if (typeof window !== "undefined") {
|
|
39
|
+
const redirectUrl = url === "CURRENT_LOCATION" ? window.location : url;
|
|
40
|
+
const parsedUrl = new URL(redirectUrl, window.location.origin);
|
|
41
|
+
const params = parsedUrl.searchParams;
|
|
42
|
+
const originalParams = new URLSearchParams(location.search);
|
|
43
|
+
|
|
44
|
+
if (params.has("code")) {
|
|
45
|
+
params.delete("code");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (redirectParameter) {
|
|
49
|
+
params.append(redirectParameter, window.location.toString());
|
|
50
|
+
}
|
|
51
|
+
for (const [key, value] of Object.entries(trackingParameters)) {
|
|
52
|
+
let parsedValue = value;
|
|
53
|
+
if (parsedValue) {
|
|
54
|
+
const currentPath = location.pathname.slice(
|
|
55
|
+
0,
|
|
56
|
+
location.pathname.lastIndexOf("/"),
|
|
57
|
+
);
|
|
58
|
+
parsedValue = parsedValue.replace(
|
|
59
|
+
"{{UTM_CAMPAIGN}}",
|
|
60
|
+
originalParams.get("utm_campaign"),
|
|
61
|
+
);
|
|
62
|
+
parsedValue = parsedValue.replace(
|
|
63
|
+
"{{CURRENT_PATH}}",
|
|
64
|
+
decodeURIComponent(currentPath),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
if (key === "metadata" && parsedValue) {
|
|
68
|
+
parsedValue = window.btoa(parsedValue);
|
|
69
|
+
}
|
|
70
|
+
params.append(key, encodeURIComponent(parsedValue));
|
|
71
|
+
}
|
|
72
|
+
parsedUrl.search = params.toString();
|
|
73
|
+
return parsedUrl.toString();
|
|
74
|
+
}
|
|
75
|
+
return "";
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const getOAuthDialogUrl = (url) => {
|
|
79
|
+
const baseUrl = new URL(url);
|
|
80
|
+
baseUrl.searchParams.delete("code");
|
|
81
|
+
baseUrl.searchParams.append("client_id", clientId);
|
|
82
|
+
baseUrl.searchParams.append("redirect_uri", oAuthRedirectUri);
|
|
83
|
+
baseUrl.searchParams.append("scope", scope);
|
|
84
|
+
baseUrl.searchParams.append("response_type", "code");
|
|
85
|
+
if (typeof window !== "undefined") {
|
|
86
|
+
const parsedUrl = new URL(window.location.href);
|
|
87
|
+
parsedUrl.searchParams.delete("code");
|
|
88
|
+
baseUrl.searchParams.append("state", window.btoa(parsedUrl.toString()));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return baseUrl.href;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const getAuthLink = (url) => {
|
|
95
|
+
if (authType === "oauth2_server") {
|
|
96
|
+
return getOAuthDialogUrl(url);
|
|
97
|
+
}
|
|
98
|
+
return getLinkWithRedirect(url);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const loginLink = getAuthLink(loginUrl);
|
|
102
|
+
const signupLink = getAuthLink(signupUrl);
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<div className={styles.ssoForm}>
|
|
106
|
+
<div className={styles.logo}>
|
|
107
|
+
{logoUrl ? (
|
|
108
|
+
<img
|
|
109
|
+
height={100}
|
|
110
|
+
width={100}
|
|
111
|
+
className={styles.logoImage}
|
|
112
|
+
src={logoUrl}
|
|
113
|
+
alt={`Logo ${providerName}`}
|
|
114
|
+
/>
|
|
115
|
+
) : (
|
|
116
|
+
<Icon
|
|
117
|
+
name="next"
|
|
118
|
+
aria-hidden="true"
|
|
119
|
+
height={50}
|
|
120
|
+
width={50}
|
|
121
|
+
className={styles.loginIcon}
|
|
122
|
+
/>
|
|
123
|
+
)}
|
|
124
|
+
</div>
|
|
125
|
+
<div className={styles.mainText}>
|
|
126
|
+
<div className={styles.title}>
|
|
127
|
+
{intl.formatMessage({
|
|
128
|
+
id: "auth.sso_form.title",
|
|
129
|
+
defaultMessage: "Debate now !",
|
|
130
|
+
})}
|
|
131
|
+
<br />
|
|
132
|
+
</div>
|
|
133
|
+
{intl.formatMessage(
|
|
134
|
+
{
|
|
135
|
+
id: "auth.sso_form.subtitle",
|
|
136
|
+
defaultMessage: "Sign up right now and receive alerts by email.",
|
|
137
|
+
},
|
|
138
|
+
{ provider: providerName },
|
|
139
|
+
)}
|
|
140
|
+
</div>
|
|
141
|
+
{hideActions ? null : (
|
|
142
|
+
<>
|
|
143
|
+
<Button
|
|
144
|
+
data-tid={"link_signup"}
|
|
145
|
+
data-testid={"signup-button"}
|
|
146
|
+
className={styles.loginButton}
|
|
147
|
+
to={signupLink}
|
|
148
|
+
external
|
|
149
|
+
border={false}
|
|
150
|
+
>
|
|
151
|
+
{intl.formatMessage({
|
|
152
|
+
id: "auth.sso_form.signup",
|
|
153
|
+
defaultMessage: "Sign up",
|
|
154
|
+
})}
|
|
155
|
+
</Button>
|
|
156
|
+
{hideBelowButton ? null : (
|
|
157
|
+
<>
|
|
158
|
+
|
|
159
|
+
{hideLoginButton === true ? null : (
|
|
160
|
+
<div className={styles.cgu}>
|
|
161
|
+
{intl.formatMessage({
|
|
162
|
+
id: "auth.sso_form.already_account",
|
|
163
|
+
defaultMessage: "Already have an account ?",
|
|
164
|
+
})}
|
|
165
|
+
<a
|
|
166
|
+
className={styles.signupButton}
|
|
167
|
+
data-testid={"signin-link"}
|
|
168
|
+
data-tid={"link_login"}
|
|
169
|
+
rel="nofollow"
|
|
170
|
+
href={loginLink}
|
|
171
|
+
>
|
|
172
|
+
{intl.formatMessage({
|
|
173
|
+
id: "auth.sso_form.signin",
|
|
174
|
+
defaultMessage: "Sign in",
|
|
175
|
+
})}
|
|
176
|
+
</a>
|
|
177
|
+
</div>
|
|
178
|
+
)}
|
|
179
|
+
{showEmailConsent ? (
|
|
180
|
+
<div className={cx(styles.switchBox)}>
|
|
181
|
+
<Toggle
|
|
182
|
+
type={"checkbox"}
|
|
183
|
+
name={"accepts_provider_email"}
|
|
184
|
+
style={{ fontSize: 18 }}
|
|
185
|
+
checked={emailConsent}
|
|
186
|
+
label={intl.formatMessage(
|
|
187
|
+
{
|
|
188
|
+
id: "auth.sso_form.consent_label",
|
|
189
|
+
defaultMessage: "I agree to receive emails from the editor",
|
|
190
|
+
},
|
|
191
|
+
{ variable: providerName },
|
|
192
|
+
)}
|
|
193
|
+
onInputChanged={(_e) => setEmailConsent(!emailConsent)}
|
|
194
|
+
data-testid={"accepts-email-input"}
|
|
195
|
+
/>
|
|
196
|
+
</div>
|
|
197
|
+
) : null}
|
|
198
|
+
{error ? (
|
|
199
|
+
<div className={styles.error}>
|
|
200
|
+
{intl.formatMessage({
|
|
201
|
+
id: "auth.sso_form.error",
|
|
202
|
+
defaultMessage:
|
|
203
|
+
"An error occurred during sign in. Please try again in a few moments.",
|
|
204
|
+
})}
|
|
205
|
+
</div>
|
|
206
|
+
) : null}
|
|
207
|
+
{showTerms && (
|
|
208
|
+
<>
|
|
209
|
+
<div className={styles.cguButton}>
|
|
210
|
+
<FormattedMessage
|
|
211
|
+
id="auth.sso_form.terms"
|
|
212
|
+
defaultMessage="By clicking on « Sign up », I declare that I have read the <var1> General Conditions of Use </var1> of the debate space and accept them"
|
|
213
|
+
values={{
|
|
214
|
+
var1: (chunks) => (
|
|
215
|
+
<a
|
|
216
|
+
className={styles.termsTarget}
|
|
217
|
+
target="_blank"
|
|
218
|
+
href={termsUrl}
|
|
219
|
+
rel="noreferrer"
|
|
220
|
+
>
|
|
221
|
+
{chunks}
|
|
222
|
+
</a>
|
|
223
|
+
),
|
|
224
|
+
}}
|
|
225
|
+
/>
|
|
226
|
+
</div>
|
|
227
|
+
<div className={styles.cguButton}>
|
|
228
|
+
<FormattedMessage
|
|
229
|
+
id="auth.sso_form.data_terms"
|
|
230
|
+
defaultMessage={
|
|
231
|
+
"Your personal data are being processed by the Editor. For more information and to exercise your rights, see our personal data policy available on the site."
|
|
232
|
+
}
|
|
233
|
+
/>
|
|
234
|
+
</div>
|
|
235
|
+
</>
|
|
236
|
+
)}
|
|
237
|
+
</>
|
|
238
|
+
)}
|
|
239
|
+
</>
|
|
240
|
+
)}
|
|
241
|
+
</div>
|
|
242
|
+
);
|
|
243
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@use 'styles/theme' as theme;
|
|
2
|
+
@use 'styles/spacing' as spacing;
|
|
3
|
+
@use 'styles/display' as display;
|
|
4
|
+
|
|
5
|
+
.ssoForm {
|
|
6
|
+
display: flex !important;
|
|
7
|
+
flex-direction: column !important;
|
|
8
|
+
align-items: center !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.logo {
|
|
12
|
+
align-self: center;
|
|
13
|
+
@include spacing.mt(0, sm);
|
|
14
|
+
@include spacing.mb(3, xs);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.logoImage {
|
|
18
|
+
object-fit: contain;
|
|
19
|
+
width: 100px !important;
|
|
20
|
+
max-height: 100px !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.loginIcon {
|
|
24
|
+
width: 120px;
|
|
25
|
+
height: 120px;
|
|
26
|
+
text-align: center;
|
|
27
|
+
fill-rule: evenodd;
|
|
28
|
+
fill: theme.$call-primary !important;
|
|
29
|
+
|
|
30
|
+
@include display.media-breakpoint-down(sm) {
|
|
31
|
+
width: 80px;
|
|
32
|
+
height: 80px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.mainText {
|
|
37
|
+
font-size: theme.$font-size-normal;
|
|
38
|
+
font-weight: theme.$font-weight-normal;
|
|
39
|
+
color: theme.$text-primary;
|
|
40
|
+
text-align: center;
|
|
41
|
+
@include spacing.mx(2, xs);
|
|
42
|
+
@include spacing.mx(4, sm);
|
|
43
|
+
|
|
44
|
+
@include display.media-breakpoint-down(sm) {
|
|
45
|
+
font-size: theme.$font-size-small;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.title {
|
|
50
|
+
font-weight: theme.$font-weight-bold;
|
|
51
|
+
@include spacing.mb(2, xs);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.loginButton {
|
|
55
|
+
@include spacing.my(3, xs);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.cgu {
|
|
59
|
+
color: theme.$text-secondary;
|
|
60
|
+
font-size: theme.$font-size-small;
|
|
61
|
+
font-weight: theme.$font-weight-normal;
|
|
62
|
+
width: 100%;
|
|
63
|
+
text-align: center;
|
|
64
|
+
@include spacing.mx(5, sm);
|
|
65
|
+
@include spacing.mx(3, xs);
|
|
66
|
+
@include spacing.my(2, xs);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.signupButton {
|
|
70
|
+
color: theme.$text-primary !important;
|
|
71
|
+
text-decoration: underline;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
@include spacing.ml(2, xs);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.cguButton {
|
|
77
|
+
text-align: center;
|
|
78
|
+
background: none;
|
|
79
|
+
font-size: theme.$font-size-extra-small;
|
|
80
|
+
color: theme.$text-secondary;
|
|
81
|
+
border: none;
|
|
82
|
+
font-weight: theme.$font-weight-normal;
|
|
83
|
+
@include spacing.mb(2, xs);
|
|
84
|
+
@include spacing.mt(2, xs);
|
|
85
|
+
@include spacing.p(0, xs);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.switchBox {
|
|
89
|
+
@include spacing.py(3, xs);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.error {
|
|
93
|
+
color: theme.$cancel-primary;
|
|
94
|
+
@include spacing.pb(2, xs);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.termsTarget {
|
|
98
|
+
color: theme.$call-primary !important;
|
|
99
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MemoryRouter } from "react-router-dom";
|
|
3
|
+
import { IntlProvider } from 'react-intl';
|
|
4
|
+
import { SSOForm } from './SSOForm';
|
|
5
|
+
import { IconProvider } from '@logora/debate/icons/icon_provider';
|
|
6
|
+
import * as regularIcons from '@logora/debate/icons/regular_icons';
|
|
7
|
+
import { faker } from '@faker-js/faker';
|
|
8
|
+
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'Auth/Sso Form',
|
|
11
|
+
component: SSOForm,
|
|
12
|
+
args: {
|
|
13
|
+
authType: 'oauth2_server',
|
|
14
|
+
clientId: 'client-id',
|
|
15
|
+
scope: 'email',
|
|
16
|
+
oAuthRedirectUri: 'https://redirect-uri.com',
|
|
17
|
+
loginUrl: 'https://example.com/login',
|
|
18
|
+
signupUrl: 'https://example.com/signup',
|
|
19
|
+
redirectParameter: 'customRedirect',
|
|
20
|
+
trackingParameters: { test: 'OK' },
|
|
21
|
+
termsUrl: 'https://example.com/terms',
|
|
22
|
+
showEmailConsent: false,
|
|
23
|
+
showTerms: false,
|
|
24
|
+
hideActions: false,
|
|
25
|
+
hideBelowButton: false,
|
|
26
|
+
subtitle: null,
|
|
27
|
+
logoUrl: null,
|
|
28
|
+
providerName: null,
|
|
29
|
+
error: false
|
|
30
|
+
},
|
|
31
|
+
argTypes: {
|
|
32
|
+
authType: { control: 'text' },
|
|
33
|
+
clientId: { control: 'text' },
|
|
34
|
+
scope: { control: 'text' },
|
|
35
|
+
oAuthRedirectUri: { control: 'text' },
|
|
36
|
+
loginUrl: { control: 'text' },
|
|
37
|
+
signupUrl: { control: 'text' },
|
|
38
|
+
redirectParameter: { control: 'text' },
|
|
39
|
+
trackingParameters: { control: 'object' },
|
|
40
|
+
termsUrl: { control: 'text' },
|
|
41
|
+
showEmailConsent: { control: 'boolean' },
|
|
42
|
+
showTerms: { control: 'boolean' },
|
|
43
|
+
hideActions: { control: 'boolean' },
|
|
44
|
+
hideBelowButton: { control: 'boolean' },
|
|
45
|
+
subtitle: { control: 'text' },
|
|
46
|
+
logoUrl: { control: 'text' },
|
|
47
|
+
providerName: { control: 'text' },
|
|
48
|
+
error: { control: 'boolean' }
|
|
49
|
+
},
|
|
50
|
+
render: (args) => (
|
|
51
|
+
<MemoryRouter>
|
|
52
|
+
<IconProvider library={regularIcons}>
|
|
53
|
+
<IntlProvider locale="en">
|
|
54
|
+
<SSOForm {...args} />
|
|
55
|
+
</IntlProvider>
|
|
56
|
+
</IconProvider>
|
|
57
|
+
</MemoryRouter>
|
|
58
|
+
)
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default meta;
|
|
62
|
+
|
|
63
|
+
const renderStory = (overrides = {}) => meta.render({ ...meta.args, ...overrides });
|
|
64
|
+
|
|
65
|
+
export const DefaultSSOForm = (props) => renderStory(props);
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
export const SSOFormWithRedirect = (props) => renderStory({
|
|
69
|
+
authType: 'other',
|
|
70
|
+
redirectParameter: 'logora_redirect',
|
|
71
|
+
trackingParameters: {},
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const SSOFormWithLogoUrl = (props) => renderStory({
|
|
76
|
+
showEmailConsent: true,
|
|
77
|
+
logoUrl: faker.image.url(),
|
|
78
|
+
providerName: 'FSociety Inc.',
|
|
79
|
+
error: true,
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const SSOFormWithEmailConsent = (props) => renderStory({
|
|
84
|
+
showEmailConsent: true,
|
|
85
|
+
providerName: 'FSociety Inc.',
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export const SSOFormWithTerms = (props) => renderStory({
|
|
90
|
+
showEmailConsent: true,
|
|
91
|
+
showTerms: true,
|
|
92
|
+
providerName: 'FSociety Inc.',
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export const SSOFormWithError = (props) => renderStory({
|
|
97
|
+
showEmailConsent: true,
|
|
98
|
+
providerName: 'FSociety Inc.',
|
|
99
|
+
error: true,
|
|
100
|
+
...props
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export const SSOFormWithoutActions = (props) => renderStory({
|
|
104
|
+
subtitle: 'My awesome subtitle to give more info',
|
|
105
|
+
showEmailConsent: true,
|
|
106
|
+
providerName: 'FSociety Inc.',
|
|
107
|
+
hideActions: true,
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export const SSOFormHideBelowButton = (props) => renderStory({
|
|
112
|
+
subtitle: 'My awesome subtitle to give more info',
|
|
113
|
+
showEmailConsent: true,
|
|
114
|
+
providerName: 'FSociety Inc.',
|
|
115
|
+
hideBelowButton: true,
|
|
116
|
+
...props
|
|
117
|
+
});
|