@soul-refiner/design-system 0.0.14 → 0.0.16
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/.eslintrc.js +4 -0
- package/.turbo/turbo-build.log +12 -0
- package/.turbo/turbo-test.log +4417 -0
- package/CHANGELOG.md +7 -0
- package/babel.config.js +6 -0
- package/custom.d.ts +4 -0
- package/package.json +1 -7
- package/src/actions/Button/Button.module.scss +205 -0
- package/src/actions/Button/Button.spec.js +56 -0
- package/src/actions/Button/Button.tsx +143 -0
- package/src/actions/Button/index.ts +1 -0
- package/src/actions/Dropdown/Dropdown.module.scss +77 -0
- package/src/actions/Dropdown/Dropdown.spec.js +149 -0
- package/src/actions/Dropdown/Dropdown.tsx +224 -0
- package/src/actions/Dropdown/index.ts +6 -0
- package/src/actions/Dropzone/Dropzone.module.scss +48 -0
- package/src/actions/Dropzone/Dropzone.spec.js +60 -0
- package/src/actions/Dropzone/Dropzone.tsx +191 -0
- package/src/actions/Dropzone/index.ts +1 -0
- package/src/actions/Rate/Rate.module.scss +17 -0
- package/src/actions/Rate/Rate.tsx +53 -0
- package/src/actions/Rate/index.ts +1 -0
- package/src/actions/Switch/Switch.module.scss +35 -0
- package/src/actions/Switch/Switch.spec.js +31 -0
- package/src/actions/Switch/Switch.tsx +34 -0
- package/src/actions/Switch/index.ts +1 -0
- package/src/actions/index.ts +5 -0
- package/src/cards/CourseCard/CourseCard.module.scss +219 -0
- package/src/cards/CourseCard/CourseCard.spec.js +60 -0
- package/src/cards/CourseCard/CourseCard.tsx +145 -0
- package/src/cards/CourseCard/index.ts +1 -0
- package/src/cards/EpisodeCard/EpisodeCard.module.scss +69 -0
- package/src/cards/EpisodeCard/EpisodeCard.tsx +53 -0
- package/src/cards/EpisodeCard/index.ts +1 -0
- package/src/cards/FeatureCard/FeatureCard.module.scss +116 -0
- package/src/cards/FeatureCard/FeatureCard.spec.js +70 -0
- package/src/cards/FeatureCard/FeatureCard.tsx +123 -0
- package/src/cards/FeatureCard/index.ts +1 -0
- package/src/cards/index.ts +3 -0
- package/src/data/Bar/Bar.module.scss +105 -0
- package/src/data/Bar/Bar.tsx +161 -0
- package/src/data/Bar/index.ts +1 -0
- package/src/data/Line/Line.module.scss +102 -0
- package/src/data/Line/Line.tsx +162 -0
- package/src/data/Line/index.ts +1 -0
- package/src/data/Pie/Pie.module.scss +56 -0
- package/src/data/Pie/Pie.spec.js +72 -0
- package/src/data/Pie/Pie.tsx +111 -0
- package/src/data/Pie/index.ts +1 -0
- package/src/data/index.ts +3 -0
- package/src/editor/Editor.module.scss +125 -0
- package/src/editor/Editor.tsx +327 -0
- package/src/editor/common/elements.ts +50 -0
- package/src/editor/common/index.ts +2 -0
- package/src/editor/common/marks.ts +27 -0
- package/src/editor/components/MediaDrawer/MediaDrawer.module.scss +316 -0
- package/src/editor/components/MediaDrawer/MediaDrawer.tsx +457 -0
- package/src/editor/components/MediaDrawer/index.ts +1 -0
- package/src/editor/components/index.ts +1 -0
- package/src/editor/config/default.ts +213 -0
- package/src/editor/config/index.ts +2 -0
- package/src/editor/config/props.ts +9 -0
- package/src/editor/index.ts +2 -0
- package/src/editor/plateUI.ts +82 -0
- package/src/editor/plugins/blocks.tsx +71 -0
- package/src/editor/plugins/custom/assets/DefaultThumbnail.tsx +57 -0
- package/src/editor/plugins/custom/assets/index.ts +1 -0
- package/src/editor/plugins/custom/buttons.tsx +289 -0
- package/src/editor/plugins/custom/example.tsx +64 -0
- package/src/editor/plugins/custom/exitBreak.ts +41 -0
- package/src/editor/plugins/custom/footnote.tsx +185 -0
- package/src/editor/plugins/custom/index.ts +14 -0
- package/src/editor/plugins/custom/paywall.tsx +156 -0
- package/src/editor/plugins/custom/qa.tsx +390 -0
- package/src/editor/plugins/custom/resetBlockType.ts +29 -0
- package/src/editor/plugins/custom/selectOnBackspace.ts +7 -0
- package/src/editor/plugins/custom/softBreak.ts +20 -0
- package/src/editor/plugins/custom/styles/Button.module.scss +51 -0
- package/src/editor/plugins/custom/styles/Footnote.module.scss +58 -0
- package/src/editor/plugins/custom/styles/Paywall.module.scss +67 -0
- package/src/editor/plugins/custom/styles/QA.module.scss +140 -0
- package/src/editor/plugins/custom/styles/Video.module.scss +79 -0
- package/src/editor/plugins/custom/video.tsx +163 -0
- package/src/editor/plugins/index.ts +18 -0
- package/src/editor/plugins/inline.ts +46 -0
- package/src/editor/plugins/marks.ts +25 -0
- package/src/editor/plugins/utils.ts +22 -0
- package/src/feedback/Chip/Chip.module.scss +23 -0
- package/src/feedback/Chip/Chip.tsx +58 -0
- package/src/feedback/Chip/index.ts +1 -0
- package/src/feedback/Loader/Loader.module.scss +18 -0
- package/src/feedback/Loader/Loader.spec.js +18 -0
- package/src/feedback/Loader/Loader.tsx +53 -0
- package/src/feedback/Loader/index.ts +1 -0
- package/src/feedback/ProgressBar/ProgressBar.module.scss +13 -0
- package/src/feedback/ProgressBar/ProgressBar.tsx +32 -0
- package/src/feedback/ProgressBar/index.ts +1 -0
- package/src/feedback/Toast/Toast.module.scss +44 -0
- package/src/feedback/Toast/Toast.tsx +76 -0
- package/src/feedback/Toast/index.ts +1 -0
- package/src/feedback/Tooltip/Tooltip.module.scss +47 -0
- package/src/feedback/Tooltip/Tooltip.tsx +10 -0
- package/src/feedback/Tooltip/index.ts +1 -0
- package/src/feedback/index.ts +5 -0
- package/src/global.d.ts +6 -0
- package/src/iconography/Avatar/Avatar.module.scss +90 -0
- package/src/iconography/Avatar/Avatar.spec.js +75 -0
- package/src/iconography/Avatar/Avatar.tsx +96 -0
- package/src/iconography/Avatar/DefaultIcon.svg +4 -0
- package/src/iconography/Avatar/DefaultIcon.tsx +12 -0
- package/src/iconography/Avatar/iconHelpers.tsx +186 -0
- package/src/iconography/Avatar/index.ts +1 -0
- package/src/iconography/ColoredIcon/ColoredIcon.module.scss +40 -0
- package/src/iconography/ColoredIcon/ColoredIcon.tsx +30 -0
- package/src/iconography/ColoredIcon/index.ts +5 -0
- package/src/iconography/DevicePreview/DevicePreview.module.scss +143 -0
- package/src/iconography/DevicePreview/DevicePreview.tsx +592 -0
- package/src/iconography/DevicePreview/index.ts +1 -0
- package/src/iconography/IconHeader/IconHeader.module.scss +42 -0
- package/src/iconography/IconHeader/IconHeader.tsx +42 -0
- package/src/iconography/IconHeader/index.ts +1 -0
- package/src/iconography/StarRating/StarRating.tsx +99 -0
- package/src/iconography/StarRating/index.ts +1 -0
- package/src/iconography/index.ts +5 -0
- package/src/implementations/BodyContent/BodyContent.module.scss +38 -0
- package/src/implementations/BodyContent/BodyContent.tsx +78 -0
- package/src/implementations/BodyContent/index.ts +2 -0
- package/src/implementations/JoinGroupModal/JoinGroupModal.module.scss +83 -0
- package/src/implementations/JoinGroupModal/JoinGroupModal.tsx +176 -0
- package/src/implementations/JoinGroupModal/index.ts +1 -0
- package/src/implementations/index.ts +2 -0
- package/src/index.ts +86 -0
- package/src/inputs/CalendarInput/CalendarInput.module.scss +38 -0
- package/src/inputs/CalendarInput/CalendarInput.spec.js +19 -0
- package/src/inputs/CalendarInput/CalendarInput.tsx +29 -0
- package/src/inputs/CalendarInput/index.ts +1 -0
- package/src/inputs/CheckboxInput/CheckboxInput.module.scss +23 -0
- package/src/inputs/CheckboxInput/CheckboxInput.tsx +39 -0
- package/src/inputs/CheckboxInput/index.ts +1 -0
- package/src/inputs/FeedInput/FeedInput.module.scss +48 -0
- package/src/inputs/FeedInput/FeedInput.spec.js +16 -0
- package/src/inputs/FeedInput/FeedInput.tsx +197 -0
- package/src/inputs/FeedInput/index.ts +1 -0
- package/src/inputs/InboxInput/InboxInput.module.scss +48 -0
- package/src/inputs/InboxInput/InboxInput.spec.js +19 -0
- package/src/inputs/InboxInput/InboxInput.tsx +97 -0
- package/src/inputs/InboxInput/index.ts +1 -0
- package/src/inputs/PostInput/PostInput.module.scss +49 -0
- package/src/inputs/PostInput/PostInput.spec.js +19 -0
- package/src/inputs/PostInput/PostInput.tsx +54 -0
- package/src/inputs/PostInput/index.ts +1 -0
- package/src/inputs/RadioInput/RadioInput.module.scss +68 -0
- package/src/inputs/RadioInput/RadioInput.tsx +55 -0
- package/src/inputs/RadioInput/index.ts +1 -0
- package/src/inputs/SearchInput/SearchInput.module.scss +40 -0
- package/src/inputs/SearchInput/SearchInput.tsx +61 -0
- package/src/inputs/SearchInput/index.ts +1 -0
- package/src/inputs/SelectInput/SelectInput.module.scss +66 -0
- package/src/inputs/SelectInput/SelectInput.tsx +145 -0
- package/src/inputs/SelectInput/index.ts +1 -0
- package/src/inputs/TagInput/TagInput.module.scss +75 -0
- package/src/inputs/TagInput/TagInput.tsx +115 -0
- package/src/inputs/TagInput/index.ts +1 -0
- package/src/inputs/TextInput/TextInput.module.scss +35 -0
- package/src/inputs/TextInput/TextInput.tsx +46 -0
- package/src/inputs/TextInput/index.ts +1 -0
- package/src/inputs/index.ts +10 -0
- package/src/lists/ContactDetails/ContactDetails.module.scss +70 -0
- package/src/lists/ContactDetails/ContactDetails.spec.js +69 -0
- package/src/lists/ContactDetails/ContactDetails.tsx +185 -0
- package/src/lists/ContactDetails/index.ts +1 -0
- package/src/lists/index.ts +1 -0
- package/src/navigation/Breadcrumbs/Breadcrumbs.module.scss +18 -0
- package/src/navigation/Breadcrumbs/Breadcrumbs.spec.js +38 -0
- package/src/navigation/Breadcrumbs/Breadcrumbs.tsx +43 -0
- package/src/navigation/Breadcrumbs/index.ts +1 -0
- package/src/navigation/Drawer/Drawer.module.scss +104 -0
- package/src/navigation/Drawer/Drawer.tsx +177 -0
- package/src/navigation/Drawer/index.ts +1 -0
- package/src/navigation/EditorBar/EditorBar.module.scss +118 -0
- package/src/navigation/EditorBar/EditorBar.tsx +416 -0
- package/src/navigation/EditorBar/components/AlignmentDropdown/AlignmentDropdown.tsx +106 -0
- package/src/navigation/EditorBar/components/AlignmentDropdown/index.ts +1 -0
- package/src/navigation/EditorBar/components/ButtonModal/ButtonModal.module.scss +85 -0
- package/src/navigation/EditorBar/components/ButtonModal/ButtonModal.tsx +314 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/Comment.tsx +28 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/GiftSubscription.tsx +28 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/Link.tsx +28 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/Share.tsx +28 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/ShareCommunity.tsx +42 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/Signup.tsx +68 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/Special.tsx +24 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/Subscribe.tsx +28 -0
- package/src/navigation/EditorBar/components/ButtonModal/assets/index.ts +8 -0
- package/src/navigation/EditorBar/components/ButtonModal/index.ts +1 -0
- package/src/navigation/EditorBar/components/FontDropdown/FontDropdown.module.scss +16 -0
- package/src/navigation/EditorBar/components/FontDropdown/FontDropdown.tsx +137 -0
- package/src/navigation/EditorBar/components/FontDropdown/index.ts +1 -0
- package/src/navigation/EditorBar/components/MoreDropdown/MoreDropdown.module.scss +43 -0
- package/src/navigation/EditorBar/components/MoreDropdown/MoreDropdown.tsx +124 -0
- package/src/navigation/EditorBar/components/MoreDropdown/index.ts +1 -0
- package/src/navigation/EditorBar/components/OutlineDropdown/OutlineDropdown.module.scss +21 -0
- package/src/navigation/EditorBar/components/OutlineDropdown/OutlineDropdown.tsx +37 -0
- package/src/navigation/EditorBar/components/OutlineDropdown/index.ts +1 -0
- package/src/navigation/EditorBar/components/TextTypeDropdown/TextTypeDropdown.module.scss +51 -0
- package/src/navigation/EditorBar/components/TextTypeDropdown/TextTypeDropdown.tsx +80 -0
- package/src/navigation/EditorBar/components/TextTypeDropdown/index.ts +1 -0
- package/src/navigation/EditorBar/components/VideoModal/VideoModal.module.scss +150 -0
- package/src/navigation/EditorBar/components/VideoModal/VideoModal.tsx +163 -0
- package/src/navigation/EditorBar/components/VideoModal/index.ts +1 -0
- package/src/navigation/EditorBar/components/index.ts +7 -0
- package/src/navigation/EditorBar/index.ts +1 -0
- package/src/navigation/MenuTabs/MenuTabs.module.scss +34 -0
- package/src/navigation/MenuTabs/MenuTabs.spec.js +36 -0
- package/src/navigation/MenuTabs/MenuTabs.tsx +52 -0
- package/src/navigation/MenuTabs/index.ts +1 -0
- package/src/navigation/Navigation/Navigation.module.scss +92 -0
- package/src/navigation/Navigation/Navigation.spec.js +144 -0
- package/src/navigation/Navigation/Navigation.tsx +111 -0
- package/src/navigation/Navigation/SubNavigation.module.scss +255 -0
- package/src/navigation/Navigation/SubNavigation.spec.js +112 -0
- package/src/navigation/Navigation/SubNavigation.tsx +443 -0
- package/src/navigation/Navigation/index.ts +15 -0
- package/src/navigation/Pagination/Pagination.module.scss +49 -0
- package/src/navigation/Pagination/Pagination.tsx +115 -0
- package/src/navigation/Pagination/index.ts +1 -0
- package/src/navigation/index.ts +21 -0
- package/src/surfaces/Comment/Comment.module.scss +106 -0
- package/src/surfaces/Comment/Comment.spec.js +105 -0
- package/src/surfaces/Comment/Comment.tsx +157 -0
- package/src/surfaces/Comment/index.ts +1 -0
- package/src/surfaces/Faq/Faq.module.scss +91 -0
- package/src/surfaces/Faq/Faq.spec.js +38 -0
- package/src/surfaces/Faq/Faq.tsx +156 -0
- package/src/surfaces/Faq/index.ts +1 -0
- package/src/surfaces/Message/Message.module.scss +37 -0
- package/src/surfaces/Message/Message.spec.js +47 -0
- package/src/surfaces/Message/Message.tsx +54 -0
- package/src/surfaces/Message/index.ts +1 -0
- package/src/surfaces/Modal/Modal.module.scss +52 -0
- package/src/surfaces/Modal/Modal.spec.js +38 -0
- package/src/surfaces/Modal/Modal.tsx +131 -0
- package/src/surfaces/Modal/index.ts +5 -0
- package/src/surfaces/Plan/Plan.module.scss +79 -0
- package/src/surfaces/Plan/Plan.tsx +75 -0
- package/src/surfaces/Plan/index.ts +1 -0
- package/src/surfaces/Post/Post.module.scss +46 -0
- package/src/surfaces/Post/Post.spec.js +103 -0
- package/src/surfaces/Post/Post.tsx +185 -0
- package/src/surfaces/Post/index.ts +1 -0
- package/src/surfaces/Post/postHelpers.ts +20 -0
- package/src/surfaces/ProfileHeader/ProfileHeader.module.scss +202 -0
- package/src/surfaces/ProfileHeader/ProfileHeader.tsx +103 -0
- package/src/surfaces/ProfileHeader/index.ts +1 -0
- package/src/surfaces/RatingsOverview/RatingsOverview.module.scss +54 -0
- package/src/surfaces/RatingsOverview/RatingsOverview.tsx +69 -0
- package/src/surfaces/RatingsOverview/index.ts +1 -0
- package/src/surfaces/Review/Review.module.scss +73 -0
- package/src/surfaces/Review/Review.tsx +88 -0
- package/src/surfaces/Review/index.ts +1 -0
- package/src/surfaces/index.ts +9 -0
- package/src/tables/Filter/Filter.module.scss +34 -0
- package/src/tables/Filter/Filter.tsx +30 -0
- package/src/tables/Filter/index.ts +1 -0
- package/src/tables/Table/Table.module.scss +126 -0
- package/src/tables/Table/Table.spec.js +113 -0
- package/src/tables/Table/Table.tsx +251 -0
- package/src/tables/Table/index.ts +7 -0
- package/src/tables/index.ts +7 -0
- package/tsconfig.json +14 -0
- package/vite.config.ts +28 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface StarRatingProps {
|
|
4
|
+
rating: number;
|
|
5
|
+
width: number;
|
|
6
|
+
outlines?: boolean;
|
|
7
|
+
gradient?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const StarRating = ({
|
|
11
|
+
rating,
|
|
12
|
+
width,
|
|
13
|
+
outlines = true,
|
|
14
|
+
gradient = false,
|
|
15
|
+
}: StarRatingProps) => {
|
|
16
|
+
var maskWidth = 0;
|
|
17
|
+
const fillColor = gradient ? "url(#gradient)" : "#D5A806";
|
|
18
|
+
|
|
19
|
+
// Kind of a cheap way to skip the mask over the gaps... But it works :)
|
|
20
|
+
if (rating < 1) {
|
|
21
|
+
maskWidth = 2 + rating * 25;
|
|
22
|
+
} else if (rating < 2) {
|
|
23
|
+
maskWidth = 31.5 + (rating - 1) * 25;
|
|
24
|
+
} else if (rating < 3) {
|
|
25
|
+
maskWidth = 61 + (rating - 2) * 25;
|
|
26
|
+
} else if (rating < 4) {
|
|
27
|
+
maskWidth = 90.5 + (rating - 3) * 25;
|
|
28
|
+
} else {
|
|
29
|
+
maskWidth = 120 + (rating - 4) * 25;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<svg
|
|
34
|
+
width={width}
|
|
35
|
+
height="30"
|
|
36
|
+
viewBox="0 0 147 30"
|
|
37
|
+
fill={fillColor}
|
|
38
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
39
|
+
>
|
|
40
|
+
<defs>
|
|
41
|
+
<mask id="starMask">
|
|
42
|
+
<path
|
|
43
|
+
d="M26.3806 10.0509L19.1404 8.99872L15.9039 2.43728C15.8155 2.25763 15.6701 2.1122 15.4904 2.0238C15.0399 1.80138 14.4924 1.98673 14.2671 2.43728L11.0306 8.99872L3.79048 10.0509C3.59087 10.0795 3.40837 10.1736 3.26864 10.3161C3.09972 10.4898 3.00664 10.7233 3.00985 10.9656C3.01305 11.2078 3.11229 11.4388 3.28575 11.6079L8.52407 16.715L7.28649 23.9267C7.25747 24.0944 7.27604 24.2669 7.34008 24.4247C7.40412 24.5824 7.51109 24.7191 7.64884 24.8191C7.78659 24.9192 7.94962 24.9786 8.11943 24.9907C8.28925 25.0028 8.45907 24.9671 8.60962 24.8876L15.0855 21.4829L21.5614 24.8876C21.7382 24.9817 21.9435 25.0131 22.1403 24.9789C22.6365 24.8933 22.9701 24.4228 22.8845 23.9267L21.647 16.715L26.8853 11.6079C27.0279 11.4682 27.122 11.2857 27.1505 11.0861C27.2275 10.587 26.8796 10.1251 26.3806 10.0509Z"
|
|
44
|
+
fill="#FFFFFF"
|
|
45
|
+
/>
|
|
46
|
+
<path
|
|
47
|
+
d="M55.5798 10.0509L48.3397 8.99872L45.1031 2.43728C45.0147 2.25763 44.8693 2.1122 44.6897 2.0238C44.2391 1.80138 43.6916 1.98673 43.4663 2.43728L40.2298 8.99872L32.9897 10.0509C32.7901 10.0795 32.6076 10.1736 32.4679 10.3161C32.2989 10.4898 32.2059 10.7233 32.2091 10.9656C32.2123 11.2078 32.3115 11.4388 32.485 11.6079L37.7233 16.715L36.4857 23.9267C36.4567 24.0944 36.4753 24.2669 36.5393 24.4247C36.6033 24.5824 36.7103 24.7191 36.8481 24.8191C36.9858 24.9192 37.1488 24.9786 37.3187 24.9907C37.4885 25.0028 37.6583 24.9671 37.8088 24.8876L44.2847 21.4829L50.7606 24.8876C50.9374 24.9817 51.1427 25.0131 51.3395 24.9789C51.8357 24.8933 52.1693 24.4228 52.0838 23.9267L50.8462 16.715L56.0845 11.6079C56.2271 11.4682 56.3212 11.2857 56.3497 11.0861C56.4267 10.587 56.0788 10.1251 55.5798 10.0509Z"
|
|
48
|
+
fill="#FFFFFF"
|
|
49
|
+
/>
|
|
50
|
+
<path
|
|
51
|
+
d="M84.7809 10.0509L77.5408 8.99872L74.3043 2.43728C74.2159 2.25763 74.0705 2.1122 73.8908 2.0238C73.4403 1.80138 72.8928 1.98673 72.6675 2.43728L69.431 8.99872L62.1909 10.0509C61.9913 10.0795 61.8088 10.1736 61.669 10.3161C61.5001 10.4898 61.407 10.7233 61.4102 10.9656C61.4134 11.2078 61.5127 11.4388 61.6861 11.6079L66.9245 16.715L65.6869 23.9267C65.6579 24.0944 65.6764 24.2669 65.7405 24.4247C65.8045 24.5824 65.9115 24.7191 66.0492 24.8191C66.187 24.9192 66.35 24.9786 66.5198 24.9907C66.6896 25.0028 66.8595 24.9671 67.01 24.8876L73.4859 21.4829L79.9618 24.8876C80.1386 24.9817 80.3439 25.0131 80.5407 24.9789C81.0368 24.8933 81.3705 24.4228 81.2849 23.9267L80.0474 16.715L85.2857 11.6079C85.4283 11.4682 85.5224 11.2857 85.5509 11.0861C85.6279 10.587 85.28 10.1251 84.7809 10.0509Z"
|
|
52
|
+
fill="#FFFFFF"
|
|
53
|
+
/>
|
|
54
|
+
<path
|
|
55
|
+
d="M113.98 10.0509L106.74 8.99872L103.504 2.43728C103.415 2.25763 103.27 2.1122 103.09 2.0238C102.64 1.80138 102.092 1.98673 101.867 2.43728L98.6302 8.99872L91.3901 10.0509C91.1905 10.0795 91.008 10.1736 90.8683 10.3161C90.6993 10.4898 90.6062 10.7233 90.6095 10.9656C90.6127 11.2078 90.7119 11.4388 90.8854 11.6079L96.1237 16.715L94.8861 23.9267C94.8571 24.0944 94.8756 24.2669 94.9397 24.4247C95.0037 24.5824 95.1107 24.7191 95.2484 24.8191C95.3862 24.9192 95.5492 24.9786 95.719 24.9907C95.8889 25.0028 96.0587 24.9671 96.2092 24.8876L102.685 21.4829L109.161 24.8876C109.338 24.9817 109.543 25.0131 109.74 24.9789C110.236 24.8933 110.57 24.4228 110.484 23.9267L109.247 16.715L114.485 11.6079C114.627 11.4682 114.722 11.2857 114.75 11.0861C114.827 10.587 114.479 10.1251 113.98 10.0509Z"
|
|
56
|
+
fill="#FFFFFF"
|
|
57
|
+
/>
|
|
58
|
+
<path
|
|
59
|
+
d="M143.181 10.0588L135.941 9.00653L132.705 2.44509C132.616 2.26544 132.471 2.12001 132.291 2.03161C131.841 1.80919 131.293 1.99454 131.068 2.44509L127.831 9.00653L120.591 10.0588C120.392 10.0873 120.209 10.1814 120.069 10.324C119.901 10.4976 119.807 10.7312 119.811 10.9734C119.814 11.2156 119.913 11.4466 120.087 11.6157L125.325 16.7229L124.087 23.9345C124.058 24.1022 124.077 24.2748 124.141 24.4325C124.205 24.5902 124.312 24.7269 124.45 24.8269C124.587 24.927 124.75 24.9864 124.92 24.9985C125.09 25.0106 125.26 24.9749 125.41 24.8954L131.886 21.4907L138.362 24.8954C138.539 24.9895 138.744 25.0209 138.941 24.9867C139.437 24.9011 139.771 24.4306 139.685 23.9345L138.448 16.7229L143.686 11.6157C143.829 11.476 143.923 11.2935 143.951 11.0939C144.028 10.5949 143.68 10.1329 143.181 10.0588Z"
|
|
60
|
+
fill="#FFFFFF"
|
|
61
|
+
/>
|
|
62
|
+
</mask>
|
|
63
|
+
<linearGradient id="gradient">
|
|
64
|
+
<stop offset="0%" stopColor="#FFB51F" />
|
|
65
|
+
<stop offset="100%" stopColor="#FF870A" />
|
|
66
|
+
</linearGradient>
|
|
67
|
+
</defs>
|
|
68
|
+
|
|
69
|
+
<rect
|
|
70
|
+
x="0"
|
|
71
|
+
y="0"
|
|
72
|
+
height="30"
|
|
73
|
+
width={maskWidth}
|
|
74
|
+
fillOpacity="100%"
|
|
75
|
+
mask="url(#starMask)"
|
|
76
|
+
/>
|
|
77
|
+
<path
|
|
78
|
+
d="M26.3806 10.1603L19.1404 9.1081L15.9039 2.54665C15.8155 2.367 15.6701 2.22157 15.4904 2.13317C15.0399 1.91075 14.4924 2.0961 14.2671 2.54665L11.0306 9.1081L3.79048 10.1603C3.59087 10.1888 3.40837 10.2829 3.26864 10.4255C3.09972 10.5991 3.00664 10.8327 3.00985 11.0749C3.01305 11.3172 3.11229 11.5482 3.28575 11.7173L8.52407 16.8244L7.28649 24.036C7.25747 24.2038 7.27604 24.3763 7.34008 24.5341C7.40413 24.6918 7.51109 24.8284 7.64884 24.9285C7.78659 25.0285 7.94962 25.088 8.11943 25.1001C8.28925 25.1122 8.45907 25.0765 8.60962 24.997L15.0855 21.5922L21.5614 24.997C21.7382 25.0911 21.9435 25.1225 22.1403 25.0882C22.6365 25.0027 22.9701 24.5322 22.8845 24.036L21.647 16.8244L26.8853 11.7173C27.0279 11.5775 27.122 11.395 27.1505 11.1954C27.2275 10.6964 26.8796 10.2345 26.3806 10.1603V10.1603ZM19.4427 16.1058L20.4721 22.1027L15.0855 19.2739L9.69892 22.1055L10.7283 16.1087L6.37114 11.8599L12.3936 10.9844L15.0855 5.52939L17.7774 10.9844L23.7999 11.8599L19.4427 16.1058Z"
|
|
79
|
+
fillOpacity={outlines ? 1 : 0}
|
|
80
|
+
/>
|
|
81
|
+
<path
|
|
82
|
+
d="M55.5798 10.1603L48.3397 9.1081L45.1031 2.54665C45.0147 2.367 44.8693 2.22157 44.6897 2.13317C44.2391 1.91075 43.6916 2.0961 43.4663 2.54665L40.2298 9.1081L32.9897 10.1603C32.7901 10.1888 32.6076 10.2829 32.4679 10.4255C32.2989 10.5991 32.2059 10.8327 32.2091 11.0749C32.2123 11.3172 32.3115 11.5482 32.485 11.7173L37.7233 16.8244L36.4857 24.036C36.4567 24.2038 36.4753 24.3763 36.5393 24.5341C36.6033 24.6918 36.7103 24.8284 36.8481 24.9285C36.9858 25.0285 37.1488 25.088 37.3187 25.1001C37.4885 25.1122 37.6583 25.0765 37.8088 24.997L44.2847 21.5922L50.7606 24.997C50.9374 25.0911 51.1427 25.1225 51.3395 25.0882C51.8357 25.0027 52.1693 24.5322 52.0838 24.036L50.8462 16.8244L56.0845 11.7173C56.2271 11.5775 56.3212 11.395 56.3497 11.1954C56.4267 10.6964 56.0788 10.2345 55.5798 10.1603V10.1603ZM48.6419 16.1058L49.6713 22.1027L44.2847 19.2739L38.8981 22.1055L39.9275 16.1087L35.5704 11.8599L41.5929 10.9844L44.2847 5.52939L46.9766 10.9844L52.9991 11.8599L48.6419 16.1058Z"
|
|
83
|
+
fillOpacity={outlines ? 1 : 0}
|
|
84
|
+
/>
|
|
85
|
+
<path
|
|
86
|
+
d="M84.7809 10.1603L77.5408 9.1081L74.3043 2.54665C74.2159 2.367 74.0705 2.22157 73.8908 2.13317C73.4403 1.91075 72.8928 2.0961 72.6675 2.54665L69.431 9.1081L62.1909 10.1603C61.9913 10.1888 61.8088 10.2829 61.669 10.4255C61.5001 10.5991 61.407 10.8327 61.4102 11.0749C61.4134 11.3172 61.5127 11.5482 61.6861 11.7173L66.9245 16.8244L65.6869 24.036C65.6579 24.2038 65.6764 24.3763 65.7405 24.5341C65.8045 24.6918 65.9115 24.8284 66.0492 24.9285C66.187 25.0285 66.35 25.088 66.5198 25.1001C66.6896 25.1122 66.8595 25.0765 67.01 24.997L73.4859 21.5922L79.9618 24.997C80.1386 25.0911 80.3439 25.1225 80.5407 25.0882C81.0368 25.0027 81.3705 24.5322 81.2849 24.036L80.0474 16.8244L85.2857 11.7173C85.4283 11.5775 85.5224 11.395 85.5509 11.1954C85.6279 10.6964 85.28 10.2345 84.7809 10.1603V10.1603ZM77.8431 16.1058L78.8725 22.1027L73.4859 19.2739L68.0993 22.1055L69.1287 16.1087L64.7715 11.8599L70.794 10.9844L73.4859 5.52939L76.1778 10.9844L82.2003 11.8599L77.8431 16.1058Z"
|
|
87
|
+
fillOpacity={outlines ? 1 : 0}
|
|
88
|
+
/>
|
|
89
|
+
<path
|
|
90
|
+
d="M113.98 10.1603L106.74 9.1081L103.504 2.54665C103.415 2.367 103.27 2.22157 103.09 2.13317C102.64 1.91075 102.092 2.0961 101.867 2.54665L98.6302 9.1081L91.3901 10.1603C91.1905 10.1888 91.008 10.2829 90.8683 10.4255C90.6993 10.5991 90.6062 10.8327 90.6095 11.0749C90.6127 11.3172 90.7119 11.5482 90.8854 11.7173L96.1237 16.8244L94.8861 24.036C94.8571 24.2038 94.8756 24.3763 94.9397 24.5341C95.0037 24.6918 95.1107 24.8284 95.2484 24.9285C95.3862 25.0285 95.5492 25.088 95.719 25.1001C95.8889 25.1122 96.0587 25.0765 96.2092 24.997L102.685 21.5922L109.161 24.997C109.338 25.0911 109.543 25.1225 109.74 25.0882C110.236 25.0027 110.57 24.5322 110.484 24.036L109.247 16.8244L114.485 11.7173C114.627 11.5775 114.722 11.395 114.75 11.1954C114.827 10.6964 114.479 10.2345 113.98 10.1603V10.1603ZM107.042 16.1058L108.072 22.1027L102.685 19.2739L97.2985 22.1055L98.3279 16.1087L93.9708 11.8599L99.9933 10.9844L102.685 5.52939L105.377 10.9844L111.4 11.8599L107.042 16.1058Z"
|
|
91
|
+
fillOpacity={outlines ? 1 : 0}
|
|
92
|
+
/>
|
|
93
|
+
<path
|
|
94
|
+
d="M143.181 10.1603L135.941 9.1081L132.705 2.54665C132.616 2.367 132.471 2.22157 132.291 2.13317C131.841 1.91075 131.293 2.0961 131.068 2.54665L127.831 9.1081L120.591 10.1603C120.392 10.1888 120.209 10.2829 120.069 10.4255C119.901 10.5991 119.807 10.8327 119.811 11.0749C119.814 11.3172 119.913 11.5482 120.087 11.7173L125.325 16.8244L124.087 24.036C124.058 24.2038 124.077 24.3763 124.141 24.5341C124.205 24.6918 124.312 24.8284 124.45 24.9285C124.587 25.0285 124.75 25.088 124.92 25.1001C125.09 25.1122 125.26 25.0765 125.41 24.997L131.886 21.5922L138.362 24.997C138.539 25.0911 138.744 25.1225 138.941 25.0882C139.437 25.0027 139.771 24.5322 139.685 24.036L138.448 16.8244L143.686 11.7173C143.829 11.5775 143.923 11.395 143.951 11.1954C144.028 10.6964 143.68 10.2345 143.181 10.1603V10.1603ZM136.243 16.1058L137.273 22.1027L131.886 19.2739L126.5 22.1055L127.529 16.1087L123.172 11.8599L129.194 10.9844L131.886 5.52939L134.578 10.9844L140.601 11.8599L136.243 16.1058Z"
|
|
95
|
+
fillOpacity={outlines ? 1 : 0}
|
|
96
|
+
/>
|
|
97
|
+
</svg>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StarRating, type StarRatingProps } from "./StarRating";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Avatar, type AvatarProps } from "./Avatar";
|
|
2
|
+
export { ColoredIcon, type ColoredIconProps } from "./ColoredIcon";
|
|
3
|
+
export { DevicePreview, type DevicePreviewProps } from "./DevicePreview";
|
|
4
|
+
export { IconHeader, type IconHeaderProps } from "./IconHeader";
|
|
5
|
+
export { StarRating, type StarRatingProps } from "./StarRating";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@use "@soul-refiner/styles/mixins";
|
|
2
|
+
|
|
3
|
+
.bodycontent {
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100%;
|
|
6
|
+
|
|
7
|
+
[class~="menu-bar"] {
|
|
8
|
+
box-shadow: 0px 3.75998px 11.28px rgba(0, 0, 0, 0.0503198);
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
margin-bottom: 32px;
|
|
11
|
+
width: fit-content;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[class~="content"] {
|
|
15
|
+
&[class~="not-editing"] {
|
|
16
|
+
@include mixins.hover-editable();
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
& > h1,
|
|
21
|
+
& > h2,
|
|
22
|
+
& > h3,
|
|
23
|
+
& > p {
|
|
24
|
+
margin-bottom: 24px;
|
|
25
|
+
padding-left: 16px;
|
|
26
|
+
padding-right: 16px;
|
|
27
|
+
&:last-child {
|
|
28
|
+
margin-bottom: 0px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
img {
|
|
33
|
+
margin: 12px 0px 32px;
|
|
34
|
+
border-radius: 16px;
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// import React from "react";
|
|
2
|
+
// import { Editor } from "../../editor";
|
|
3
|
+
// import bodyContentStyles from "./BodyContent.module.scss";
|
|
4
|
+
// import { Media } from "@soul-refiner/models";
|
|
5
|
+
|
|
6
|
+
// export interface BodyContentProps {}
|
|
7
|
+
|
|
8
|
+
// const getContent = () => `
|
|
9
|
+
// <h1>About Soul Refiner</h1>
|
|
10
|
+
// <p>At Soul Refiner, we are on a mission to bring inner-healing tools to every church in the world. Our mission is to see the power of God break addictions and heal broken lives.</p>
|
|
11
|
+
// <h3>Powerful Bible-based training.</h3>
|
|
12
|
+
// <p>The Church is ground-zero for people who are hurting, broken, and addicted. Soul Refiner is a turn-key ministry that provides you or your church with proven, Bible-based tools and strategies that bring healing and restoration to their lives.</p>
|
|
13
|
+
// <p>Your small groups will have all the videos, digital tools, and resources necessary to help heal broken hearts and bring lasting change and freedom where there once was no hope.</p>
|
|
14
|
+
// <img src="./example-course.png" alt="" />
|
|
15
|
+
// <h3>We strive for excellence.</h3>
|
|
16
|
+
// <p>We like what we do. We like to dream big. We like to take on big films. We don’t believe in “that’s good enough,” mediocrity or failure. We push each other to be our best. Hopefully our passion comes across in our work.</p>
|
|
17
|
+
// `;
|
|
18
|
+
|
|
19
|
+
// export const BodyContent = ({}: BodyContentProps) => {
|
|
20
|
+
// const content = getContent(); // TODO: Get Content from Redux / Network request
|
|
21
|
+
|
|
22
|
+
// const handleUploadImage = (event: React.FormEvent) => {
|
|
23
|
+
// const uploads = (event.target as HTMLInputElement).files;
|
|
24
|
+
// // TODO: Network request and image processing
|
|
25
|
+
// return "https://source.unsplash.com/random/1920x1080/?christian";
|
|
26
|
+
// };
|
|
27
|
+
|
|
28
|
+
// const handleVideoUpload = async (event: React.FormEvent) => {
|
|
29
|
+
// const uploads = (event.target as HTMLInputElement).files;
|
|
30
|
+
// // TODO: Network request and image processing
|
|
31
|
+
// return await ({
|
|
32
|
+
// id: "string",
|
|
33
|
+
// created: new Date(),
|
|
34
|
+
// Modified: new Date(),
|
|
35
|
+
// parentId: "",
|
|
36
|
+
// title: "New Video",
|
|
37
|
+
// synopsis: "Video kjlkjsdf",
|
|
38
|
+
// duration: 123456,
|
|
39
|
+
// thumbnail: "https://source.unsplash.com/random/1920x1080/?christian",
|
|
40
|
+
// captions: [
|
|
41
|
+
// {
|
|
42
|
+
// id: "captions-1234-asdf-1234",
|
|
43
|
+
// parent: "vid-1234-asdf-1234",
|
|
44
|
+
// created: new Date(),
|
|
45
|
+
// source: "https://www.amazon-bucket-is-here.com",
|
|
46
|
+
// language: "English",
|
|
47
|
+
// },
|
|
48
|
+
// ],
|
|
49
|
+
// source: "https://source.unsplash.com/random/1920x1080/?christian",
|
|
50
|
+
// sample: "https://source.unsplash.com/random/1920x1080/?christian",
|
|
51
|
+
// status: "draft",
|
|
52
|
+
// } as Media);
|
|
53
|
+
// };
|
|
54
|
+
|
|
55
|
+
// return (
|
|
56
|
+
// <div className={bodyContentStyles.bodycontent}>
|
|
57
|
+
// <Editor
|
|
58
|
+
// editing={true}
|
|
59
|
+
// alignment
|
|
60
|
+
// bold
|
|
61
|
+
// editCaption="Edit Course Content"
|
|
62
|
+
// history
|
|
63
|
+
// image
|
|
64
|
+
// indent
|
|
65
|
+
// initialContent={content}
|
|
66
|
+
// italic
|
|
67
|
+
// link
|
|
68
|
+
// onImageUpload={handleUploadImage}
|
|
69
|
+
// onVideoUpload={handleVideoUpload}
|
|
70
|
+
// orderedList
|
|
71
|
+
// underline
|
|
72
|
+
// unorderedList
|
|
73
|
+
// video
|
|
74
|
+
// />
|
|
75
|
+
// </div>
|
|
76
|
+
// );
|
|
77
|
+
// };
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@use "@soul-refiner/styles/_mixins";
|
|
2
|
+
|
|
3
|
+
.header {
|
|
4
|
+
@include mixins.flex($gap: 32px, $align: center);
|
|
5
|
+
h5 {
|
|
6
|
+
color: var(--colorify-blue-3);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.content {
|
|
11
|
+
@include mixins.flex($dir: column, $gap: 16px);
|
|
12
|
+
max-height: 460px;
|
|
13
|
+
width: 484px;
|
|
14
|
+
margin-top: 16px;
|
|
15
|
+
padding: 4px 35px 20px 30px;
|
|
16
|
+
overflow-y: scroll;
|
|
17
|
+
|
|
18
|
+
&[class~="warning"] {
|
|
19
|
+
overflow-y: auto;
|
|
20
|
+
gap: 16px;
|
|
21
|
+
padding: 16px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[class~="pending-box"] {
|
|
25
|
+
padding: 16px;
|
|
26
|
+
border-radius: var(--border-radius-small);
|
|
27
|
+
background-color: var(--color-grey-9);
|
|
28
|
+
& > h6 {
|
|
29
|
+
margin-bottom: 8px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
ol {
|
|
34
|
+
list-style-type: revert;
|
|
35
|
+
padding: 0px 0px 0px 20px;
|
|
36
|
+
li {
|
|
37
|
+
padding-left: 18px;
|
|
38
|
+
margin-bottom: 16px;
|
|
39
|
+
&:last-of-type {
|
|
40
|
+
margin-bottom: 0px;
|
|
41
|
+
}
|
|
42
|
+
[class~="rule-title"] {
|
|
43
|
+
@include mixins.font(400, 15px, 20px);
|
|
44
|
+
color: var(--color-grey-0);
|
|
45
|
+
}
|
|
46
|
+
[class~="rule-explanation"] {
|
|
47
|
+
@include mixins.font(400, 13px, 16px);
|
|
48
|
+
color: var(--color-grey-4);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[class~="agreement"] {
|
|
54
|
+
@include mixins.flex($justify: space-between, $align: center);
|
|
55
|
+
width: 100%;
|
|
56
|
+
padding: 20px 16px;
|
|
57
|
+
border-radius: var(--border-radius-small);
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
user-select: none;
|
|
60
|
+
&[class~="active"] {
|
|
61
|
+
background-color: var(--color-grey-9);
|
|
62
|
+
}
|
|
63
|
+
& > p {
|
|
64
|
+
@include mixins.font(600, 16px, 22px);
|
|
65
|
+
color: var(--color-grey-4);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::-webkit-scrollbar {
|
|
70
|
+
height: calc(100% - 20px);
|
|
71
|
+
margin-bottom: 20px;
|
|
72
|
+
}
|
|
73
|
+
&::-webkit-scrollbar-thumb {
|
|
74
|
+
margin-bottom: 20px;
|
|
75
|
+
}
|
|
76
|
+
&::-webkit-scrollbar-track {
|
|
77
|
+
margin-bottom: 20px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.footer {
|
|
82
|
+
@include mixins.flex($gap: 16px);
|
|
83
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "../../actions";
|
|
3
|
+
import { CircleQuestion, CloseThin } from "@soul-refiner/icons/src";
|
|
4
|
+
import { RadioInput } from "../../inputs";
|
|
5
|
+
import { Modal } from "../../surfaces";
|
|
6
|
+
import styles from "./JoinGroupModal.module.scss";
|
|
7
|
+
|
|
8
|
+
export interface JoinGroupModalProps {
|
|
9
|
+
onSubmit: () => void;
|
|
10
|
+
rules: {
|
|
11
|
+
title: React.ReactNode;
|
|
12
|
+
explanation?: React.ReactNode;
|
|
13
|
+
}[];
|
|
14
|
+
trigger: React.ReactElement;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const JoinGroupModal = ({
|
|
18
|
+
onSubmit,
|
|
19
|
+
rules,
|
|
20
|
+
trigger,
|
|
21
|
+
}: JoinGroupModalProps) => {
|
|
22
|
+
const [warning, setWarning] = React.useState(false);
|
|
23
|
+
const [disabled, setDisabled] = React.useState(true);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Modal>
|
|
27
|
+
<Modal.Trigger>{trigger}</Modal.Trigger>
|
|
28
|
+
<Modal.Content
|
|
29
|
+
footer={
|
|
30
|
+
!warning ? (
|
|
31
|
+
<div className={styles.footer}>
|
|
32
|
+
<Button
|
|
33
|
+
buttonColor="#FFFFFF"
|
|
34
|
+
color="var(--color-grey-3)"
|
|
35
|
+
icon={
|
|
36
|
+
<CloseThin
|
|
37
|
+
fill="var(--color-grey-3)"
|
|
38
|
+
iconSize={12}
|
|
39
|
+
size={20}
|
|
40
|
+
/>
|
|
41
|
+
}
|
|
42
|
+
onClick={() => setWarning(true)}
|
|
43
|
+
shape="rectangular"
|
|
44
|
+
size="large"
|
|
45
|
+
style={{
|
|
46
|
+
flex: 1,
|
|
47
|
+
border: "1px solid var(--color-grey-7)",
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
Cancel
|
|
51
|
+
</Button>
|
|
52
|
+
<Button
|
|
53
|
+
buttonColor="var(--color-blue-3)"
|
|
54
|
+
color="#FFFFFF"
|
|
55
|
+
disabled={disabled}
|
|
56
|
+
onClick={onSubmit}
|
|
57
|
+
shape="rectangular"
|
|
58
|
+
size="large"
|
|
59
|
+
style={{
|
|
60
|
+
flex: 1,
|
|
61
|
+
border: "1px solid var(--color-grey-7)",
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
Submit
|
|
65
|
+
</Button>
|
|
66
|
+
</div>
|
|
67
|
+
) : undefined
|
|
68
|
+
}
|
|
69
|
+
header={
|
|
70
|
+
<div className={styles.header}>
|
|
71
|
+
<CircleQuestion
|
|
72
|
+
fill="var(--colorify-blue-3)"
|
|
73
|
+
iconSize={24}
|
|
74
|
+
size={48}
|
|
75
|
+
style={{
|
|
76
|
+
backgroundColor: "var(--colorify-blue-2)",
|
|
77
|
+
borderRadius: "var(--border-radius-small)",
|
|
78
|
+
}}
|
|
79
|
+
/>
|
|
80
|
+
<h5>
|
|
81
|
+
{!warning ? "Answer Questions" : "Cancel your request to join?"}
|
|
82
|
+
</h5>
|
|
83
|
+
</div>
|
|
84
|
+
}
|
|
85
|
+
>
|
|
86
|
+
{!warning && (
|
|
87
|
+
<div className={`${styles.content}`}>
|
|
88
|
+
<div className="pending-box">
|
|
89
|
+
<h6>Your membership is pending approval</h6>
|
|
90
|
+
<p>
|
|
91
|
+
Answer these questions from the group admins to help them review
|
|
92
|
+
your request to join. Only the admins and moderators will see
|
|
93
|
+
your answers.
|
|
94
|
+
</p>
|
|
95
|
+
</div>
|
|
96
|
+
<div>
|
|
97
|
+
<h6>Group rules</h6>
|
|
98
|
+
<p>Group members agree to follow these rules</p>
|
|
99
|
+
</div>
|
|
100
|
+
<ol>
|
|
101
|
+
{rules.map((rule) => (
|
|
102
|
+
<li key={JSON.stringify(rule)}>
|
|
103
|
+
<p className="rule-title">{rule.title}</p>
|
|
104
|
+
{rule?.explanation && (
|
|
105
|
+
<p className="rule-explanation">{rule?.explanation}</p>
|
|
106
|
+
)}
|
|
107
|
+
</li>
|
|
108
|
+
))}
|
|
109
|
+
</ol>
|
|
110
|
+
<div
|
|
111
|
+
className={`agreement ${!disabled ? "active" : ""}`}
|
|
112
|
+
onClick={() => setDisabled((prev) => !prev)}
|
|
113
|
+
>
|
|
114
|
+
<p>I agree to the group rules</p>
|
|
115
|
+
<RadioInput
|
|
116
|
+
checked={!disabled}
|
|
117
|
+
onChange={(_, checked) =>
|
|
118
|
+
setDisabled((prev) =>
|
|
119
|
+
checked !== undefined ? checked : prev
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
)}
|
|
126
|
+
{warning && (
|
|
127
|
+
<div className={`${styles.content} warning`}>
|
|
128
|
+
<p>
|
|
129
|
+
Answering these questions helps the group leaders to review your
|
|
130
|
+
pending membership. By exiting, your request to join will be
|
|
131
|
+
canceled.
|
|
132
|
+
</p>
|
|
133
|
+
<div
|
|
134
|
+
style={{
|
|
135
|
+
display: "flex",
|
|
136
|
+
width: "100%",
|
|
137
|
+
marginTop: "8px",
|
|
138
|
+
gap: "16px",
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
<Button
|
|
142
|
+
buttonColor="#FFFFFF"
|
|
143
|
+
color="var(--color-grey-3)"
|
|
144
|
+
onClick={() => setWarning(false)}
|
|
145
|
+
shape="rectangular"
|
|
146
|
+
size="large"
|
|
147
|
+
style={{
|
|
148
|
+
flex: 1,
|
|
149
|
+
padding: "14px",
|
|
150
|
+
border: "1px solid var(--color-grey-7)",
|
|
151
|
+
}}
|
|
152
|
+
>
|
|
153
|
+
Answer Questions
|
|
154
|
+
</Button>
|
|
155
|
+
<Modal.Dismiss>
|
|
156
|
+
<Button
|
|
157
|
+
buttonColor="var(--color-blue-3)"
|
|
158
|
+
color="#FFFFFF"
|
|
159
|
+
shape="rectangular"
|
|
160
|
+
size="large"
|
|
161
|
+
style={{
|
|
162
|
+
flex: 1,
|
|
163
|
+
padding: "14px",
|
|
164
|
+
border: "1px solid var(--color-grey-7)",
|
|
165
|
+
}}
|
|
166
|
+
>
|
|
167
|
+
Exit
|
|
168
|
+
</Button>
|
|
169
|
+
</Modal.Dismiss>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
)}
|
|
173
|
+
</Modal.Content>
|
|
174
|
+
</Modal>
|
|
175
|
+
);
|
|
176
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { JoinGroupModal, type JoinGroupModalProps } from "./JoinGroupModal";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export {
|
|
3
|
+
Button,
|
|
4
|
+
Dropdown,
|
|
5
|
+
Dropzone,
|
|
6
|
+
Rate,
|
|
7
|
+
Switch,
|
|
8
|
+
} from "./actions";
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
CourseCard,
|
|
12
|
+
EpisodeCard,
|
|
13
|
+
FeatureCard,
|
|
14
|
+
} from "./cards";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
Bar,
|
|
18
|
+
Line,
|
|
19
|
+
Pie,
|
|
20
|
+
} from "./data";
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
Editor,
|
|
24
|
+
} from "./editor";
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
Chip,
|
|
28
|
+
Loader,
|
|
29
|
+
ProgressBar,
|
|
30
|
+
Toast,
|
|
31
|
+
Tooltip,
|
|
32
|
+
} from "./feedback";
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
Avatar,
|
|
36
|
+
ColoredIcon,
|
|
37
|
+
DevicePreview,
|
|
38
|
+
IconHeader,
|
|
39
|
+
StarRating,
|
|
40
|
+
} from "./iconography";
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
JoinGroupModal,
|
|
44
|
+
} from "./implementations";
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
CalendarInput,
|
|
48
|
+
CheckboxInput,
|
|
49
|
+
FeedInput,
|
|
50
|
+
InboxInput,
|
|
51
|
+
PostInput,
|
|
52
|
+
RadioInput,
|
|
53
|
+
SearchInput,
|
|
54
|
+
SelectInput,
|
|
55
|
+
TagInput,
|
|
56
|
+
TextInput,
|
|
57
|
+
} from "./inputs";
|
|
58
|
+
|
|
59
|
+
export { ContactDetails } from "./lists";
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
Breadcrumbs,
|
|
63
|
+
EditorBar,
|
|
64
|
+
Drawer,
|
|
65
|
+
MenuTabs,
|
|
66
|
+
Navigation,
|
|
67
|
+
SubNavigation,
|
|
68
|
+
Pagination,
|
|
69
|
+
} from "./navigation";
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
Comment,
|
|
73
|
+
Faq,
|
|
74
|
+
Message,
|
|
75
|
+
Modal,
|
|
76
|
+
Plan,
|
|
77
|
+
Post,
|
|
78
|
+
ProfileHeader,
|
|
79
|
+
RatingsOverview,
|
|
80
|
+
Review,
|
|
81
|
+
} from "./surfaces";
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
Filter,
|
|
85
|
+
Table
|
|
86
|
+
} from "./tables";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.calendar {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
place-items: center;
|
|
6
|
+
|
|
7
|
+
[class~=icon] svg {
|
|
8
|
+
fill: var(--color-grey-3);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
input[type=date] {
|
|
12
|
+
resize: none;
|
|
13
|
+
border: 1px solid var(--color-grey-9);
|
|
14
|
+
border-radius: 16px;
|
|
15
|
+
background-color: var(--color-grey-10);
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
padding: 10px 20px;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
line-height: 24px;
|
|
20
|
+
color: var(--color-grey-1);
|
|
21
|
+
overflow-y: hidden;
|
|
22
|
+
|
|
23
|
+
&::-webkit-datetime-edit-day-field:focus,
|
|
24
|
+
&::-webkit-datetime-edit-month-field:focus,
|
|
25
|
+
&::-webkit-datetime-edit-year-field:focus {
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
color: var(--color-grey-3);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:focus {
|
|
31
|
+
outline: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&::placeholder {
|
|
35
|
+
color: var(--color-grey-7);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "@testing-library/jest-dom";
|
|
3
|
+
import { fireEvent, render, screen } from "@testing-library/react";
|
|
4
|
+
|
|
5
|
+
import { CalendarInput } from "./CalendarInput";
|
|
6
|
+
|
|
7
|
+
const generateMockProps = props => ({
|
|
8
|
+
...props,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
describe("Calendar Input", () => {
|
|
12
|
+
it("selects the date", () => {
|
|
13
|
+
const props = generateMockProps({});
|
|
14
|
+
render(<CalendarInput {...props} />);
|
|
15
|
+
const input = screen.getByTestId("calendar-input");
|
|
16
|
+
fireEvent.click(input);
|
|
17
|
+
fireEvent.change(input, { target: { value: "2022-09-23" } })
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import calendarStyles from "./CalendarInput.module.scss";
|
|
3
|
+
import { Calendar } from "@soul-refiner/icons/src";
|
|
4
|
+
|
|
5
|
+
export interface CalendarInputProps extends React.HTMLProps<HTMLInputElement> {
|
|
6
|
+
icon?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const CalendarInput = ({ icon = true, ...rest }: CalendarInputProps) => {
|
|
10
|
+
const ref = React.useRef<HTMLInputElement>(null);
|
|
11
|
+
const handleWrapperClick = () => {
|
|
12
|
+
if (ref?.current && (ref.current as any)?.showPicker) {
|
|
13
|
+
(ref.current as any).showPicker();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<label className={calendarStyles.calendar} onClick={handleWrapperClick}>
|
|
19
|
+
{icon && <Calendar />}
|
|
20
|
+
<input
|
|
21
|
+
{...rest}
|
|
22
|
+
data-testid="calendar-input"
|
|
23
|
+
type="date"
|
|
24
|
+
data-form-type="other"
|
|
25
|
+
ref={ref}
|
|
26
|
+
/>
|
|
27
|
+
</label>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CalendarInput, type CalendarInputProps } from "./CalendarInput";
|