@openneuro/app 4.33.4 → 4.34.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/package.json +4 -3
- package/src/client.jsx +2 -1
- package/src/scripts/authentication/signOut.ts +1 -1
- package/src/scripts/common/containers/footer.tsx +1 -1
- package/src/scripts/common/containers/header.tsx +3 -2
- package/src/scripts/common/content/affiliate-content.jsx +72 -0
- package/src/scripts/common/content/assets/affiliates/bids.jpg +0 -0
- package/src/scripts/common/content/assets/affiliates/datalad.jpg +0 -0
- package/src/scripts/common/content/assets/affiliates/nih-bi-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/brand_mark.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-get.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-share.png +0 -0
- package/src/scripts/common/content/assets/front-page/cube-use.png +0 -0
- package/src/scripts/common/content/assets/front-page/ljaf.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_app.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_cube.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_data.png +0 -0
- package/src/scripts/common/content/assets/front-page/logo_users.png +0 -0
- package/src/scripts/common/content/assets/front-page/novo-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/nru-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/nsf.png +0 -0
- package/src/scripts/common/content/assets/front-page/sqm-logo.png +0 -0
- package/src/scripts/common/content/assets/front-page/squishymedia.png +0 -0
- package/src/scripts/common/content/assets/front-page/stanford.png +0 -0
- package/src/scripts/common/content/assets/modality-cubes/brain-initiative.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/eeg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/ieeg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/meg.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/mri.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/nih_cube.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/nirs.jpg +0 -0
- package/src/scripts/common/content/assets/modality-cubes/pet-scan.jpg +0 -0
- package/src/scripts/common/content/assets/portal-content/nih-bi-brand.png +0 -0
- package/src/scripts/common/content/facet-content.jsx +186 -0
- package/src/scripts/common/content/front-page-content.jsx +177 -0
- package/src/scripts/common/content/image-attribution.tsx +3 -3
- package/src/scripts/common/content/modality-cube-content.jsx +92 -0
- package/src/scripts/common/content/portal-content.jsx +149 -0
- package/src/scripts/common/content/portal-grant-content.jsx +30 -0
- package/src/scripts/common/content/sortby-list.jsx +18 -0
- package/src/scripts/common/forms/warn-button.jsx +1 -1
- package/src/scripts/components/accordion/AccordionTab.tsx +68 -0
- package/src/scripts/components/accordion/AccordionWrap.tsx +22 -0
- package/src/scripts/components/accordion/__tests__/AccordionTab.spec.tsx +35 -0
- package/src/scripts/components/accordion/accordion.scss +68 -0
- package/src/scripts/components/activity-slider/ActivitySlider.tsx +121 -0
- package/src/scripts/components/activity-slider/slider.scss +130 -0
- package/src/scripts/components/affiliate-article/AffiliateArticle.tsx +26 -0
- package/src/scripts/components/affiliate-article/affiliate.scss +32 -0
- package/src/scripts/components/aggregate-count/AggregateCount.tsx +20 -0
- package/src/scripts/components/assets/activity-icon.png +0 -0
- package/src/scripts/components/assets/close-button.png +0 -0
- package/src/scripts/components/assets/favicon copy.ico +0 -0
- package/src/scripts/components/assets/favicon.ico +0 -0
- package/src/scripts/components/assets/get_data_browse.png +0 -0
- package/src/scripts/components/assets/get_data_download.png +0 -0
- package/src/scripts/components/assets/ljaf copy.png +0 -0
- package/src/scripts/components/assets/logo_app copy.png +0 -0
- package/src/scripts/components/assets/logo_cube copy.png +0 -0
- package/src/scripts/components/assets/logo_data copy.png +0 -0
- package/src/scripts/components/assets/logo_users copy.png +0 -0
- package/src/scripts/components/assets/mri-scan.jpg +0 -0
- package/src/scripts/components/assets/nih copy.png +0 -0
- package/src/scripts/components/assets/nih-bi-brand.jpg +0 -0
- package/src/scripts/components/assets/nih-stanford.jpg +0 -0
- package/src/scripts/components/assets/nih.png +0 -0
- package/src/scripts/components/assets/nimh.png +0 -0
- package/src/scripts/components/assets/nsf copy.png +0 -0
- package/src/scripts/components/assets/on-dark-horz.svg +1 -0
- package/src/scripts/components/assets/on-dark.svg +1 -0
- package/src/scripts/components/assets/on-light-horz.svg +1 -0
- package/src/scripts/components/assets/on-light.svg +1 -0
- package/src/scripts/components/assets/orcid_24x24 copy.png +0 -0
- package/src/scripts/components/assets/orcid_24x24.png +0 -0
- package/src/scripts/components/assets/share_data_collaborate.png +0 -0
- package/src/scripts/components/assets/share_data_publish.png +0 -0
- package/src/scripts/components/assets/share_data_validate.png +0 -0
- package/src/scripts/components/assets/squishymedia copy.png +0 -0
- package/src/scripts/components/assets/stanford copy.png +0 -0
- package/src/scripts/components/assets/tab-get_data.png +0 -0
- package/src/scripts/components/assets/tab-share_data.png +0 -0
- package/src/scripts/components/assets/tab-use_data.png +0 -0
- package/src/scripts/components/assets/use_data_analyze.png +0 -0
- package/src/scripts/components/assets/use_data_snapshot.png +0 -0
- package/src/scripts/components/button/Button.tsx +113 -0
- package/src/scripts/components/button/__tests__/Button.spec.tsx +21 -0
- package/src/scripts/components/button/button.scss +140 -0
- package/src/scripts/components/count-toggle/CountToggle.tsx +65 -0
- package/src/scripts/components/count-toggle/__tests__/CountToggle.spec.tsx +31 -0
- package/src/scripts/components/count-toggle/count-toggle.scss +34 -0
- package/src/scripts/components/dropdown/Dropdown.tsx +38 -0
- package/src/scripts/components/dropdown/dropdown.scss +29 -0
- package/src/scripts/components/facets/FacetRadio.tsx +43 -0
- package/src/scripts/components/facets/FacetRange.tsx +35 -0
- package/src/scripts/components/facets/FacetSearch.tsx +66 -0
- package/src/scripts/components/facets/FacetSelect.tsx +87 -0
- package/src/scripts/components/facets/SingleSelect.tsx +39 -0
- package/src/scripts/components/facets/__tests__/FacetSelect.spec.tsx +14 -0
- package/src/scripts/components/facets/__tests__/SingleSelect.spec.tsx +58 -0
- package/src/scripts/components/facets/facet.scss +244 -0
- package/src/scripts/components/footer/Footer.tsx +52 -0
- package/src/scripts/components/footer/footer.scss +20 -0
- package/src/scripts/components/formatting/__tests__/modality-label.spec.tsx +34 -0
- package/src/scripts/components/formatting/modality-label.tsx +34 -0
- package/src/scripts/components/front-page/ActivityHeader.tsx +12 -0
- package/src/scripts/components/front-page/AffiliateBlock.tsx +22 -0
- package/src/scripts/components/front-page/Contributors.tsx +28 -0
- package/src/scripts/components/front-page/GetUpdates.tsx +99 -0
- package/src/scripts/components/front-page/Infographic.tsx +36 -0
- package/src/scripts/components/front-page/front-page.scss +295 -0
- package/src/scripts/components/header/Header.tsx +151 -0
- package/src/scripts/components/header/LandingExpandedHeader.tsx +110 -0
- package/src/scripts/components/header/header.scss +409 -0
- package/src/scripts/components/icon/Icon.tsx +55 -0
- package/src/scripts/components/icon/__tests__/Icon.spec.tsx +10 -0
- package/src/scripts/components/icon/icon.scss +8 -0
- package/src/scripts/components/input/Input.tsx +137 -0
- package/src/scripts/components/input/TermSearch.tsx +101 -0
- package/src/scripts/components/input/input.scss +147 -0
- package/src/scripts/components/input/term-search.scss +68 -0
- package/src/scripts/components/json-tree/ExpandableProperty.tsx +35 -0
- package/src/scripts/components/json-tree/RecursiveProperty.tsx +67 -0
- package/src/scripts/components/json-tree/json-tree.scss +19 -0
- package/src/scripts/components/loading/Loading.tsx +19 -0
- package/src/scripts/components/loading/__tests__/Loading.spec.tsx +12 -0
- package/src/scripts/components/loading/loading.scss +141 -0
- package/src/scripts/components/logo/Logo.tsx +44 -0
- package/src/scripts/components/logo/__tests__/Logo.spec.tsx +22 -0
- package/src/scripts/components/modal/Modal.tsx +51 -0
- package/src/scripts/components/modal/ModalExample.tsx +25 -0
- package/src/scripts/components/modal/UserLoginModal.tsx +74 -0
- package/src/scripts/components/modal/__tests__/UserLoginModal.spec.tsx +37 -0
- package/src/scripts/components/modal/modal.scss +60 -0
- package/src/scripts/components/modality-cube/ModalityCube.tsx +60 -0
- package/src/scripts/components/modality-cube/modality-cube.scss +303 -0
- package/src/scripts/components/page/Page.tsx +61 -0
- package/src/scripts/components/page/page.scss +408 -0
- package/src/scripts/components/progress-bar/ProgressBar.tsx +16 -0
- package/src/scripts/components/progress-bar/progress-bar.scss +34 -0
- package/src/scripts/components/radio/Radio.tsx +33 -0
- package/src/scripts/components/radio/RadioGroup.tsx +45 -0
- package/src/scripts/components/radio/__tests__/RadioGroup.spec.tsx +31 -0
- package/src/scripts/components/radio/radio.scss +335 -0
- package/src/scripts/components/range/TwoHandleRange.scss +108 -0
- package/src/scripts/components/range/TwoHandleRange.tsx +128 -0
- package/src/scripts/components/range/__tests__/TwoHandleRange.spec.tsx +34 -0
- package/src/scripts/components/read-more/ReadMore.tsx +50 -0
- package/src/scripts/components/read-more/__tests__/ReadMore.spec.tsx +14 -0
- package/src/scripts/components/read-more/read-more.scss +79 -0
- package/src/scripts/components/scss/_flex-grid.scss +216 -0
- package/src/scripts/components/scss/_helper-classes.scss +162 -0
- package/src/scripts/components/scss/_normalize.scss +614 -0
- package/src/scripts/components/scss/_variables.scss +245 -0
- package/src/scripts/components/scss/global.scss +124 -0
- package/src/scripts/components/scss/toasts.scss +33 -0
- package/src/scripts/components/scss/upload-modal.scss +479 -0
- package/src/scripts/components/search-page/CommunityHeader.tsx +27 -0
- package/src/scripts/components/search-page/FacetBlockContainerExample.tsx +6 -0
- package/src/scripts/components/search-page/FilterDateItem.tsx +44 -0
- package/src/scripts/components/search-page/FilterListItem.tsx +62 -0
- package/src/scripts/components/search-page/FiltersBlock.tsx +277 -0
- package/src/scripts/components/search-page/ModalityHeader.tsx +64 -0
- package/src/scripts/components/search-page/NeurobagelSearch.tsx +59 -0
- package/src/scripts/components/search-page/SearchPage.tsx +114 -0
- package/src/scripts/components/search-page/SearchResultItem.tsx +417 -0
- package/src/scripts/components/search-page/SearchResultsList.tsx +48 -0
- package/src/scripts/components/search-page/SearchSort.tsx +52 -0
- package/src/scripts/components/search-page/SearchSortContainerExample.tsx +9 -0
- package/src/scripts/components/search-page/TermListItem.tsx +41 -0
- package/src/scripts/components/search-page/__tests__/NuerobagelSearch.spec.tsx +17 -0
- package/src/scripts/components/search-page/filters-block.scss +99 -0
- package/src/scripts/components/search-page/neurobagel_logo.svg +75 -0
- package/src/scripts/components/search-page/search-page.scss +505 -0
- package/src/scripts/components/search-page/search-result.scss +117 -0
- package/src/scripts/components/search-page/search-sort.scss +56 -0
- package/src/scripts/components/select/SelectGroup.tsx +41 -0
- package/src/scripts/components/select/__tests__/SelectGroup.spec.tsx +43 -0
- package/src/scripts/components/select/select.scss +40 -0
- package/src/scripts/components/textarea/Textarea.tsx +68 -0
- package/src/scripts/components/textarea/__tests__/Textarea.spec.tsx +53 -0
- package/src/scripts/components/tooltip/Tooltip.tsx +30 -0
- package/src/scripts/components/tooltip/__tests__/Tooltip.spec.tsx +14 -0
- package/src/scripts/components/tooltip/tooltip.scss +159 -0
- package/src/scripts/components/user/UserMenu.tsx +72 -0
- package/src/scripts/components/user/user-menu.scss +88 -0
- package/src/scripts/components/warn-button/WarnButton.tsx +97 -0
- package/src/scripts/components/warn-button/warn-button.scss +39 -0
- package/src/scripts/datalad/dataset/dataset-query-context.js +2 -0
- package/src/scripts/dataset/comments/comment.jsx +1 -1
- package/src/scripts/dataset/components/AnalyzeDropdown.tsx +2 -2
- package/src/scripts/dataset/components/CloneDropdown.tsx +2 -2
- package/src/scripts/dataset/components/DatasetEventItem.tsx +105 -0
- package/src/scripts/dataset/components/DatasetGitAccess.tsx +2 -2
- package/src/scripts/dataset/components/DatasetToolButton.tsx +2 -2
- package/src/scripts/dataset/components/ModalitiesMetaDataBlock.tsx +2 -10
- package/src/scripts/dataset/components/ValidationBlock.tsx +37 -2
- package/src/scripts/dataset/components/VersionList.tsx +1 -1
- package/src/scripts/dataset/components/scss/dataset-events.module.scss +41 -0
- package/src/scripts/dataset/dataset-query.jsx +12 -11
- package/src/scripts/dataset/download/__tests__/__snapshots__/download-command-line.spec.jsx.snap +7 -1
- package/src/scripts/dataset/download/__tests__/download-command-line.spec.jsx +2 -2
- package/src/scripts/dataset/download/download-command-line.jsx +17 -13
- package/src/scripts/dataset/download/download-datalad.jsx +6 -3
- package/src/scripts/dataset/download/download-link.jsx +1 -1
- package/src/scripts/dataset/download/download-s3.jsx +0 -4
- package/src/scripts/dataset/files/file-display.jsx +1 -1
- package/src/scripts/dataset/files/file-tree-unloaded-directory.jsx +1 -1
- package/src/scripts/dataset/files/file-tree.tsx +1 -1
- package/src/scripts/dataset/files/file-view.jsx +1 -1
- package/src/scripts/dataset/files/file-viewer-type.jsx +5 -1
- package/src/scripts/dataset/files/file.tsx +2 -2
- package/src/scripts/dataset/files/files.tsx +3 -3
- package/src/scripts/dataset/files/viewers/file-viewer-json.jsx +1 -1
- package/src/scripts/dataset/files/viewers/file-viewer-markdown.tsx +13 -0
- package/src/scripts/dataset/fragments/cancel-button.tsx +1 -1
- package/src/scripts/dataset/fragments/dataset-citation.jsx +2 -2
- package/src/scripts/dataset/fragments/edit-button.tsx +1 -1
- package/src/scripts/dataset/fragments/edit-list.jsx +1 -1
- package/src/scripts/dataset/fragments/save-button.tsx +1 -1
- package/src/scripts/dataset/mutations/admin-exports.jsx +1 -1
- package/src/scripts/dataset/mutations/cache-clear.jsx +1 -1
- package/src/scripts/dataset/mutations/create-anonymous-reviewer.tsx +2 -2
- package/src/scripts/dataset/mutations/dataset-events.tsx +187 -0
- package/src/scripts/dataset/mutations/dataset-relations.tsx +1 -1
- package/src/scripts/dataset/mutations/delete-anonymous-reviewer.tsx +1 -1
- package/src/scripts/dataset/mutations/delete-comment.jsx +1 -1
- package/src/scripts/dataset/mutations/delete-file.jsx +1 -1
- package/src/scripts/dataset/mutations/deprecate-version.tsx +1 -1
- package/src/scripts/dataset/mutations/flag-annex-object.jsx +2 -2
- package/src/scripts/dataset/mutations/follow.tsx +1 -1
- package/src/scripts/dataset/mutations/import-dataset.tsx +1 -1
- package/src/scripts/dataset/mutations/publish.jsx +1 -1
- package/src/scripts/dataset/mutations/remove-annex-object.jsx +2 -2
- package/src/scripts/dataset/mutations/remove-permissions.tsx +1 -1
- package/src/scripts/dataset/mutations/revalidate.jsx +2 -2
- package/src/scripts/dataset/mutations/snapshot.tsx +1 -1
- package/src/scripts/dataset/mutations/star.tsx +1 -1
- package/src/scripts/dataset/mutations/submit-metadata.jsx +1 -1
- package/src/scripts/dataset/mutations/undo-deprecate-version.tsx +2 -2
- package/src/scripts/dataset/mutations/update-permissions.tsx +1 -1
- package/src/scripts/dataset/routes/admin-datalad.jsx +4 -0
- package/src/scripts/dataset/routes/dataset-default.tsx +1 -1
- package/src/scripts/dataset/routes/delete-page.tsx +7 -3
- package/src/scripts/dataset/routes/deprecate-snapshot-page.tsx +1 -1
- package/src/scripts/dataset/routes/manage-permissions.jsx +1 -1
- package/src/scripts/dataset/routes/snapshot-default.tsx +1 -1
- package/src/scripts/dataset/routes/snapshot.tsx +1 -1
- package/src/scripts/dataset/snapshot-container.tsx +14 -8
- package/src/scripts/pages/admin/flagged-files.jsx +1 -1
- package/src/scripts/pages/admin/user-tools.tsx +1 -1
- package/src/scripts/pages/admin/users.tsx +2 -2
- package/src/scripts/pages/api.jsx +2 -2
- package/src/scripts/pages/front-page/aggregate-queries/aggregate-counts-container.tsx +6 -7
- package/src/scripts/pages/front-page/front-page.tsx +7 -9
- package/src/scripts/pages/metadata/dataset-metadata.tsx +1 -1
- package/src/scripts/search/__tests__/search-container.spec.tsx +7 -7
- package/src/scripts/search/filters-block-container.tsx +66 -9
- package/src/scripts/search/initial-search-params.tsx +7 -7
- package/src/scripts/search/inputs/__tests__/sort-by-select.spec.tsx +1 -1
- package/src/scripts/search/inputs/admin-allDatasets-toggle.tsx +1 -1
- package/src/scripts/search/inputs/age-range-input.tsx +3 -2
- package/src/scripts/search/inputs/author-input.tsx +3 -2
- package/src/scripts/search/inputs/dataset-type-select.tsx +3 -2
- package/src/scripts/search/inputs/date-radios.tsx +3 -2
- package/src/scripts/search/inputs/diagnosis-select.tsx +3 -2
- package/src/scripts/search/inputs/initiative-select.tsx +12 -6
- package/src/scripts/search/inputs/keyword-input.tsx +2 -2
- package/src/scripts/search/inputs/modality-select.tsx +28 -26
- package/src/scripts/search/inputs/pet/bodyParts_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/scannerManufacturersModelNames_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/scannerManufacturers_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/tracerNames_input.tsx +4 -3
- package/src/scripts/search/inputs/pet/tracerRadionuclides_input.tsx +4 -3
- package/src/scripts/search/inputs/section-select.tsx +3 -2
- package/src/scripts/search/inputs/sex-radios.tsx +3 -2
- package/src/scripts/search/inputs/show-datasets-radios.tsx +4 -3
- package/src/scripts/search/inputs/sort-by-select.tsx +1 -1
- package/src/scripts/search/inputs/species-select.tsx +3 -2
- package/src/scripts/search/inputs/study-domain-input.tsx +4 -3
- package/src/scripts/search/inputs/subject-count-range-input.tsx +3 -2
- package/src/scripts/search/inputs/task-input.tsx +4 -3
- package/src/scripts/search/search-container.tsx +14 -17
- package/src/scripts/search/search-params-ctx.tsx +28 -5
- package/src/scripts/search/search-routes.tsx +2 -4
- package/src/scripts/search/use-search-results.tsx +14 -13
- package/src/scripts/uploader/upload-issues.tsx +1 -1
- package/src/scripts/uploader/upload-progress.jsx +1 -1
- package/src/scripts/uploader/uploader-modal.jsx +1 -1
- package/src/scripts/users/components/close-button.tsx +1 -1
- package/src/scripts/users/components/edit-button.tsx +1 -1
- package/src/scripts/users/components/edit-list.tsx +1 -1
- package/src/scripts/users/components/edit-string.tsx +1 -1
- package/src/scripts/users/dataset-card.tsx +2 -2
- package/src/scripts/users/user-notification-accordion.tsx +1 -1
- package/src/scripts/utils/user-login-modal-ctx.tsx +1 -1
- package/src/scripts/validation/validation-issues.tsx +2 -1
- package/src/scripts/validation/validation-panel.tsx +2 -1
- package/src/scripts/validation/validation-results.tsx +4 -3
- package/src/scripts/validation-legacy/validation-panel.jsx +2 -1
- package/src/scripts/validation-legacy/validation-results.issues.jsx +2 -3
- package/src/scripts/validation-legacy/validation-results.tsx +3 -4
- package/tsconfig.json +1 -4
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@import '../scss/variables';
|
|
2
|
+
|
|
3
|
+
.search-sort-list-label {
|
|
4
|
+
padding: 0 0 5px;
|
|
5
|
+
color: var(--current-theme-primary);
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
&:hover {
|
|
8
|
+
color: var(--current-theme-primary-hover);
|
|
9
|
+
}
|
|
10
|
+
i {
|
|
11
|
+
margin-left: 5px;
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
position: relative;
|
|
14
|
+
top: -2px;
|
|
15
|
+
}
|
|
16
|
+
span {
|
|
17
|
+
color: $charcoal;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.search-sort-dropdown-list {
|
|
21
|
+
.label {
|
|
22
|
+
margin: 0 0px 0 30px;
|
|
23
|
+
b {
|
|
24
|
+
margin-right: 20px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
i + .label {
|
|
28
|
+
margin-left: 12px;
|
|
29
|
+
}
|
|
30
|
+
ul {
|
|
31
|
+
list-style: none;
|
|
32
|
+
padding: 10px;
|
|
33
|
+
margin: 0;
|
|
34
|
+
border: 1px solid #ccc;
|
|
35
|
+
border-radius: 6px;
|
|
36
|
+
|
|
37
|
+
background-color: #fff;
|
|
38
|
+
|
|
39
|
+
li {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
width: 100%;
|
|
42
|
+
padding: 0;
|
|
43
|
+
transition: background 0.25s, color 0.25s;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
color: var(--current-theme-primary);
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
&:hover {
|
|
51
|
+
color: var(--current-theme-primary-hover);
|
|
52
|
+
background: rgba(0, 0, 0, 0.025);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import "./select.scss"
|
|
3
|
+
|
|
4
|
+
export interface SelectGroupProps {
|
|
5
|
+
options: {
|
|
6
|
+
label: string
|
|
7
|
+
value: string
|
|
8
|
+
}[]
|
|
9
|
+
value: string
|
|
10
|
+
setValue: (string) => void
|
|
11
|
+
label?: string
|
|
12
|
+
id: string
|
|
13
|
+
layout: "inline" | "stacked"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const SelectGroup = ({
|
|
17
|
+
setValue,
|
|
18
|
+
options,
|
|
19
|
+
label,
|
|
20
|
+
id,
|
|
21
|
+
layout,
|
|
22
|
+
}: SelectGroupProps) => {
|
|
23
|
+
return (
|
|
24
|
+
<span
|
|
25
|
+
className={layout === "stacked"
|
|
26
|
+
? "on-select-wrapper stacked"
|
|
27
|
+
: "on-select-wrapper"}
|
|
28
|
+
>
|
|
29
|
+
{label && <label htmlFor={id}>{label}</label>}
|
|
30
|
+
<select
|
|
31
|
+
className="on-select"
|
|
32
|
+
onChange={(e) => setValue(e.target.value)}
|
|
33
|
+
id={id}
|
|
34
|
+
>
|
|
35
|
+
{options.map((item, index) => (
|
|
36
|
+
<option key={index} label={item.label} value={item.value} />
|
|
37
|
+
))}
|
|
38
|
+
</select>
|
|
39
|
+
</span>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { vi } from "vitest"
|
|
2
|
+
import React from "react"
|
|
3
|
+
import { fireEvent, render, screen } from "@testing-library/react"
|
|
4
|
+
import { SelectGroup } from "../SelectGroup"
|
|
5
|
+
|
|
6
|
+
const SelectContent = [
|
|
7
|
+
{ label: "--Select--", value: "" },
|
|
8
|
+
{ label: "Option-1", value: "option1" },
|
|
9
|
+
{ label: "Option-2", value: "option2" },
|
|
10
|
+
{ label: "Option-3", value: "option3" },
|
|
11
|
+
{ label: "Option-4", value: "option4" },
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
describe("SelectGroup component", () => {
|
|
15
|
+
it("renders options", async () => {
|
|
16
|
+
const setValue = vi.fn()
|
|
17
|
+
render(
|
|
18
|
+
<SelectGroup
|
|
19
|
+
id="test-select"
|
|
20
|
+
options={SelectContent}
|
|
21
|
+
value=""
|
|
22
|
+
layout="inline"
|
|
23
|
+
setValue={setValue}
|
|
24
|
+
/>,
|
|
25
|
+
)
|
|
26
|
+
expect(await screen.queryAllByRole("option")).toHaveLength(5)
|
|
27
|
+
})
|
|
28
|
+
it("is selectable", async () => {
|
|
29
|
+
const setValue = vi.fn()
|
|
30
|
+
render(
|
|
31
|
+
<SelectGroup
|
|
32
|
+
id="test-select"
|
|
33
|
+
options={SelectContent}
|
|
34
|
+
value=""
|
|
35
|
+
setValue={setValue}
|
|
36
|
+
layout="inline"
|
|
37
|
+
/>,
|
|
38
|
+
)
|
|
39
|
+
const select = await screen.getByRole("combobox")
|
|
40
|
+
fireEvent.change(select, { target: { value: "option4" } })
|
|
41
|
+
expect(setValue).toHaveBeenCalledWith("option4")
|
|
42
|
+
})
|
|
43
|
+
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@import "../scss/variables.scss";
|
|
2
|
+
|
|
3
|
+
.on-select-wrapper {
|
|
4
|
+
label {
|
|
5
|
+
margin-right: 15px;
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
letter-spacing: 0.05em;
|
|
9
|
+
color: #444;
|
|
10
|
+
}
|
|
11
|
+
select {
|
|
12
|
+
padding: 20px;
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
background: linear-gradient(45deg, transparent 50%, $charcoal 50%),
|
|
15
|
+
linear-gradient(135deg, $charcoal 50%, transparent 50%),
|
|
16
|
+
linear-gradient(to right, #fff, #fff);
|
|
17
|
+
background-position: calc(100% - 21px) calc(1em + 2px),
|
|
18
|
+
calc(100% - 16px) calc(1em + 2px), 100% 0;
|
|
19
|
+
background-size: 5px 5px, 5px 5px, 2.5em 2.5em;
|
|
20
|
+
background-repeat: no-repeat;
|
|
21
|
+
|
|
22
|
+
border: thin solid #aaa;
|
|
23
|
+
line-height: 1.5em;
|
|
24
|
+
padding: 0.5em 3.5em 0.5em 1em;
|
|
25
|
+
border-radius: $border-radius-default;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
margin: 0;
|
|
28
|
+
-webkit-box-sizing: border-box;
|
|
29
|
+
-moz-box-sizing: border-box;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
-webkit-appearance: none;
|
|
32
|
+
-moz-appearance: none;
|
|
33
|
+
}
|
|
34
|
+
&.stacked {
|
|
35
|
+
label {
|
|
36
|
+
margin: 0 0 10px;
|
|
37
|
+
display: block;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
|
|
3
|
+
export interface TextareaProps {
|
|
4
|
+
placeholder: string
|
|
5
|
+
label?: string
|
|
6
|
+
name: string
|
|
7
|
+
type?: "inline" | "float" | "default"
|
|
8
|
+
setValue: (e: React.FormEvent<HTMLTextAreaElement>) => void
|
|
9
|
+
value?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const Textarea = ({
|
|
13
|
+
placeholder,
|
|
14
|
+
label,
|
|
15
|
+
name,
|
|
16
|
+
type,
|
|
17
|
+
setValue,
|
|
18
|
+
value,
|
|
19
|
+
}: TextareaProps) => {
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
{type == "float"
|
|
23
|
+
? (
|
|
24
|
+
<div className="float-form-style form-control">
|
|
25
|
+
<textarea
|
|
26
|
+
name={name}
|
|
27
|
+
placeholder={placeholder}
|
|
28
|
+
onChange={(e) => setValue(e)}
|
|
29
|
+
rows={5}
|
|
30
|
+
cols={100}
|
|
31
|
+
value={value}
|
|
32
|
+
>
|
|
33
|
+
</textarea>
|
|
34
|
+
{label ? <label htmlFor={name}>{label}</label> : null}
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
: type == "inline"
|
|
38
|
+
? (
|
|
39
|
+
<div className="form-control inline">
|
|
40
|
+
{label ? <label htmlFor={name}>{label}</label> : null}
|
|
41
|
+
<textarea
|
|
42
|
+
name={name}
|
|
43
|
+
placeholder={placeholder}
|
|
44
|
+
onChange={(e) => setValue(e)}
|
|
45
|
+
rows={5}
|
|
46
|
+
cols={100}
|
|
47
|
+
value={value}
|
|
48
|
+
>
|
|
49
|
+
</textarea>
|
|
50
|
+
</div>
|
|
51
|
+
)
|
|
52
|
+
: (
|
|
53
|
+
<div className="form-control">
|
|
54
|
+
{label ? <label htmlFor={name}>{label}</label> : null}
|
|
55
|
+
<textarea
|
|
56
|
+
name={name}
|
|
57
|
+
placeholder={placeholder}
|
|
58
|
+
onChange={(e) => setValue(e)}
|
|
59
|
+
rows={5}
|
|
60
|
+
cols={100}
|
|
61
|
+
value={value}
|
|
62
|
+
>
|
|
63
|
+
</textarea>
|
|
64
|
+
</div>
|
|
65
|
+
)}
|
|
66
|
+
</>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { vi } from "vitest"
|
|
2
|
+
import React from "react"
|
|
3
|
+
import { render, screen } from "@testing-library/react"
|
|
4
|
+
import { Textarea } from "../Textarea"
|
|
5
|
+
|
|
6
|
+
describe("Textarea component", () => {
|
|
7
|
+
it("supports inline type", () => {
|
|
8
|
+
render(
|
|
9
|
+
<Textarea
|
|
10
|
+
placeholder="test"
|
|
11
|
+
type="inline"
|
|
12
|
+
name="inline test"
|
|
13
|
+
label="in-label"
|
|
14
|
+
setValue={vi.fn()}
|
|
15
|
+
/>,
|
|
16
|
+
)
|
|
17
|
+
const textbox = screen.getByRole("textbox")
|
|
18
|
+
expect(textbox).toBeInTheDocument()
|
|
19
|
+
expect(textbox.closest("div")).toHaveClass("inline")
|
|
20
|
+
expect(screen.getByText("in-label")).toBeInTheDocument()
|
|
21
|
+
})
|
|
22
|
+
it("supports float type", () => {
|
|
23
|
+
render(
|
|
24
|
+
<Textarea
|
|
25
|
+
placeholder="test"
|
|
26
|
+
type="float"
|
|
27
|
+
name="float test"
|
|
28
|
+
label="float-label"
|
|
29
|
+
setValue={vi.fn()}
|
|
30
|
+
/>,
|
|
31
|
+
)
|
|
32
|
+
const textbox = screen.getByRole("textbox")
|
|
33
|
+
expect(textbox).toBeInTheDocument()
|
|
34
|
+
expect(textbox.closest("div")).toHaveClass("float-form-style")
|
|
35
|
+
expect(screen.getByText("float-label")).toBeInTheDocument()
|
|
36
|
+
})
|
|
37
|
+
it("supports default type", () => {
|
|
38
|
+
render(
|
|
39
|
+
<Textarea
|
|
40
|
+
name="default test"
|
|
41
|
+
label="default-label"
|
|
42
|
+
placeholder=""
|
|
43
|
+
setValue={() => {}}
|
|
44
|
+
/>,
|
|
45
|
+
)
|
|
46
|
+
const textbox = screen.getByRole("textbox")
|
|
47
|
+
expect(textbox).toBeInTheDocument()
|
|
48
|
+
expect(textbox.closest("div")).toHaveClass("form-control")
|
|
49
|
+
expect(textbox.closest("div")).not.toHaveClass("inline")
|
|
50
|
+
expect(textbox.closest("div")).not.toHaveClass("float-form-style")
|
|
51
|
+
expect(screen.getByText("default-label")).toBeInTheDocument()
|
|
52
|
+
})
|
|
53
|
+
})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { FC } from "react"
|
|
3
|
+
import "./tooltip.scss"
|
|
4
|
+
|
|
5
|
+
export interface TooltipProps {
|
|
6
|
+
tooltip: string
|
|
7
|
+
flow?: "up" | "down" | "left" | "right"
|
|
8
|
+
children: React.ReactNode
|
|
9
|
+
className?: string
|
|
10
|
+
wrapText?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Tooltip: FC<TooltipProps> = ({
|
|
14
|
+
children,
|
|
15
|
+
tooltip,
|
|
16
|
+
flow = "up",
|
|
17
|
+
className,
|
|
18
|
+
wrapText,
|
|
19
|
+
}) => {
|
|
20
|
+
const wrap = wrapText && " wrap-text"
|
|
21
|
+
return (
|
|
22
|
+
<span
|
|
23
|
+
className={(wrap || "") + " " + (className || "")}
|
|
24
|
+
data-tooltip={tooltip}
|
|
25
|
+
data-flow={flow}
|
|
26
|
+
>
|
|
27
|
+
{children}
|
|
28
|
+
</span>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { render, screen } from "@testing-library/react"
|
|
3
|
+
import { Tooltip } from "../Tooltip"
|
|
4
|
+
|
|
5
|
+
describe("Tooltip component", () => {
|
|
6
|
+
it("renders children", async () => {
|
|
7
|
+
render(
|
|
8
|
+
<Tooltip tooltip="tooltiptest" flow="up">
|
|
9
|
+
hover
|
|
10
|
+
</Tooltip>,
|
|
11
|
+
)
|
|
12
|
+
expect(await screen.getByText(/hover/)).toBeInTheDocument()
|
|
13
|
+
})
|
|
14
|
+
})
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
@import '../scss/variables';
|
|
2
|
+
|
|
3
|
+
/* START TOOLTIP STYLES */
|
|
4
|
+
[data-tooltip] {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
z-index: 1201;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Applies to all tooltips */
|
|
11
|
+
[data-tooltip]::before,
|
|
12
|
+
[data-tooltip]::after {
|
|
13
|
+
text-transform: none;
|
|
14
|
+
font-size: 0.9em;
|
|
15
|
+
line-height: 1;
|
|
16
|
+
user-select: none;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
position: absolute;
|
|
19
|
+
display: none;
|
|
20
|
+
opacity: 0;
|
|
21
|
+
}
|
|
22
|
+
[data-tooltip]::before {
|
|
23
|
+
content: '';
|
|
24
|
+
border: 5px solid transparent;
|
|
25
|
+
z-index: 1201;
|
|
26
|
+
}
|
|
27
|
+
[data-tooltip]::after {
|
|
28
|
+
content: attr(data-tooltip);
|
|
29
|
+
min-width: 3em;
|
|
30
|
+
max-width: 21em;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
padding: 1ch 1.5ch;
|
|
35
|
+
border-radius: 0.3ch;
|
|
36
|
+
box-shadow: 0 1em 2em -0.5em rgba(0, 0, 0, 0.35);
|
|
37
|
+
background: $charcoal;
|
|
38
|
+
color: #fff;
|
|
39
|
+
z-index: 1000;
|
|
40
|
+
}
|
|
41
|
+
[data-tooltip].wrap-text::after {
|
|
42
|
+
min-width: 18em;
|
|
43
|
+
max-width: 21em;
|
|
44
|
+
white-space: normal;
|
|
45
|
+
overflow: visible;
|
|
46
|
+
text-overflow: initial;
|
|
47
|
+
line-height: 1.3em;
|
|
48
|
+
text-align: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-tooltip]:hover::before,
|
|
52
|
+
[data-tooltip]:hover::after {
|
|
53
|
+
display: block;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[tooltip='']::before,
|
|
57
|
+
[tooltip='']::after {
|
|
58
|
+
display: none !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* FLOW: UP */
|
|
62
|
+
[data-tooltip]:not([data-flow])::before,
|
|
63
|
+
[data-tooltip][data-flow^='up']::before {
|
|
64
|
+
bottom: 100%;
|
|
65
|
+
border-bottom-width: 0;
|
|
66
|
+
border-top-color: $charcoal;
|
|
67
|
+
}
|
|
68
|
+
[data-tooltip]:not([data-flow])::after,
|
|
69
|
+
[data-tooltip][data-flow^='up']::after {
|
|
70
|
+
bottom: calc(100% + 5px);
|
|
71
|
+
}
|
|
72
|
+
[data-tooltip]:not([data-flow])::before,
|
|
73
|
+
[data-tooltip]:not([data-flow])::after,
|
|
74
|
+
[data-tooltip][data-flow^='up']::before,
|
|
75
|
+
[data-tooltip][data-flow^='up']::after {
|
|
76
|
+
left: 50%;
|
|
77
|
+
transform: translate(-50%, -0.5em);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* FLOW: DOWN */
|
|
81
|
+
[data-tooltip][data-flow^='down']::before {
|
|
82
|
+
top: 100%;
|
|
83
|
+
border-top-width: 0;
|
|
84
|
+
border-bottom-color: $charcoal;
|
|
85
|
+
}
|
|
86
|
+
[data-tooltip][data-flow^='down']::after {
|
|
87
|
+
top: calc(100% + 5px);
|
|
88
|
+
}
|
|
89
|
+
[data-tooltip][data-flow^='down']::before,
|
|
90
|
+
[data-tooltip][data-flow^='down']::after {
|
|
91
|
+
left: 50%;
|
|
92
|
+
transform: translate(-50%, 0.5em);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* FLOW: LEFT */
|
|
96
|
+
[data-tooltip][data-flow^='left']::before {
|
|
97
|
+
top: 50%;
|
|
98
|
+
border-right-width: 0;
|
|
99
|
+
border-left-color: $charcoal;
|
|
100
|
+
left: calc(0em - 5px);
|
|
101
|
+
transform: translate(-0.5em, -50%);
|
|
102
|
+
}
|
|
103
|
+
[data-tooltip][data-flow^='left']::after {
|
|
104
|
+
top: 50%;
|
|
105
|
+
right: calc(100% + 5px);
|
|
106
|
+
transform: translate(-0.5em, -50%);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* FLOW: RIGHT */
|
|
110
|
+
[data-tooltip][data-flow^='right']::before {
|
|
111
|
+
top: 50%;
|
|
112
|
+
border-left-width: 0;
|
|
113
|
+
border-right-color: $charcoal;
|
|
114
|
+
right: calc(0em - 5px);
|
|
115
|
+
transform: translate(0.5em, -50%);
|
|
116
|
+
}
|
|
117
|
+
[data-tooltip][data-flow^='right']::after {
|
|
118
|
+
top: 50%;
|
|
119
|
+
left: calc(100% + 5px);
|
|
120
|
+
transform: translate(0.5em, -50%);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* KEYFRAMES */
|
|
124
|
+
@keyframes tooltips-vert {
|
|
125
|
+
to {
|
|
126
|
+
opacity: 0.9;
|
|
127
|
+
transform: translate(-50%, 0);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@keyframes tooltips-horz {
|
|
132
|
+
to {
|
|
133
|
+
opacity: 0.9;
|
|
134
|
+
transform: translate(0, -50%);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[data-tooltip]:not([data-flow]):hover::before,
|
|
139
|
+
[data-tooltip]:not([data-flow]):hover::after,
|
|
140
|
+
[data-tooltip][data-flow^='up']:hover::before,
|
|
141
|
+
[data-tooltip][data-flow^='up']:hover::after,
|
|
142
|
+
[data-tooltip][data-flow^='down']:hover::before,
|
|
143
|
+
[data-tooltip][data-flow^='down']:hover::after {
|
|
144
|
+
animation: tooltips-vert 300ms ease-out forwards;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
[data-tooltip][data-flow^='left']:hover::before,
|
|
148
|
+
[data-tooltip][data-flow^='left']:hover::after,
|
|
149
|
+
[data-tooltip][data-flow^='right']:hover::before,
|
|
150
|
+
[data-tooltip][data-flow^='right']:hover::after {
|
|
151
|
+
animation: tooltips-horz 300ms ease-out forwards;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@media (max-width: 767px) {
|
|
155
|
+
[data-tooltip]::before,
|
|
156
|
+
[data-tooltip]::after {
|
|
157
|
+
display: none !important;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { Link } from "react-router-dom"
|
|
3
|
+
import { Dropdown } from "../dropdown/Dropdown"
|
|
4
|
+
import "./user-menu.scss"
|
|
5
|
+
|
|
6
|
+
export interface UserMenuProps {
|
|
7
|
+
profile: {
|
|
8
|
+
name: string
|
|
9
|
+
admin: boolean
|
|
10
|
+
email: string
|
|
11
|
+
provider: string
|
|
12
|
+
}
|
|
13
|
+
signOutAndRedirect: () => void
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const UserMenu = ({ profile, signOutAndRedirect }: UserMenuProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<Dropdown
|
|
19
|
+
className={"user-menu-dropdown"}
|
|
20
|
+
label={<div className="user-menu-label">My Account</div>}
|
|
21
|
+
children={
|
|
22
|
+
<div className="user-menu-dropdown-list">
|
|
23
|
+
<ul>
|
|
24
|
+
<li className="dropdown-header">
|
|
25
|
+
<p>
|
|
26
|
+
<span>Hello</span> <br />
|
|
27
|
+
{profile.name}
|
|
28
|
+
</p>
|
|
29
|
+
<p>
|
|
30
|
+
<span>signed in as</span>
|
|
31
|
+
<br />
|
|
32
|
+
{profile.email}
|
|
33
|
+
{" "}
|
|
34
|
+
</p>
|
|
35
|
+
<p>
|
|
36
|
+
<span>via</span>
|
|
37
|
+
<br /> {profile.provider}
|
|
38
|
+
</p>
|
|
39
|
+
</li>
|
|
40
|
+
<li>
|
|
41
|
+
<Link to="/search?mydatasets">My Datasets</Link>
|
|
42
|
+
</li>
|
|
43
|
+
<li className="user-menu-link">
|
|
44
|
+
<Link to="/keygen">Obtain an API Key</Link>
|
|
45
|
+
</li>
|
|
46
|
+
{profile.provider !== "orcid" && (
|
|
47
|
+
<li className="user-menu-link">
|
|
48
|
+
<a href="/crn/auth/orcid?link=true">
|
|
49
|
+
{" "}
|
|
50
|
+
Link ORCID to my account{" "}
|
|
51
|
+
</a>
|
|
52
|
+
</li>
|
|
53
|
+
)}
|
|
54
|
+
{profile.admin && (
|
|
55
|
+
<li className="user-menu-link">
|
|
56
|
+
<Link to="/admin">Admin</Link>
|
|
57
|
+
</li>
|
|
58
|
+
)}
|
|
59
|
+
<li className="user-menu-link">
|
|
60
|
+
<a
|
|
61
|
+
onClick={() => signOutAndRedirect()}
|
|
62
|
+
className="btn-submit-other"
|
|
63
|
+
>
|
|
64
|
+
Sign Out
|
|
65
|
+
</a>
|
|
66
|
+
</li>
|
|
67
|
+
</ul>
|
|
68
|
+
</div>
|
|
69
|
+
}
|
|
70
|
+
/>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@import '../scss/variables';
|
|
2
|
+
|
|
3
|
+
.user-menu-dropdown {
|
|
4
|
+
position: relative;
|
|
5
|
+
.menu {
|
|
6
|
+
box-shadow: 0px 0px 5px -4px black;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
border-radius: $border-radius-default;
|
|
9
|
+
width: 100%;
|
|
10
|
+
min-width: 250px;
|
|
11
|
+
right: 0px;
|
|
12
|
+
top: 60px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.user-menu-dropdown-list {
|
|
16
|
+
ul {
|
|
17
|
+
list-style: none;
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 20px;
|
|
20
|
+
li {
|
|
21
|
+
text-align: center;
|
|
22
|
+
border-bottom: 1px solid $newspaper;
|
|
23
|
+
&.dropdown-header {
|
|
24
|
+
padding: 10px 0;
|
|
25
|
+
font-size: 14px;
|
|
26
|
+
p:first-child {
|
|
27
|
+
margin-top: 0;
|
|
28
|
+
}
|
|
29
|
+
span {
|
|
30
|
+
color: #3d3d3d;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
font-size: 12px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
a {
|
|
36
|
+
display: block;
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
padding: 10px 0;
|
|
39
|
+
&:hover {
|
|
40
|
+
background-color: #eee;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
&:last-child {
|
|
44
|
+
border: 0;
|
|
45
|
+
margin: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.active {
|
|
53
|
+
img {
|
|
54
|
+
opacity: 0.5;
|
|
55
|
+
}
|
|
56
|
+
i {
|
|
57
|
+
color: $on-light-aqua;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.header-account-btn {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
background: #eee;
|
|
66
|
+
border-radius: $border-radius-default;
|
|
67
|
+
|
|
68
|
+
button.on-no-background.icon-text {
|
|
69
|
+
color: $on-dark-aqua;
|
|
70
|
+
margin: 5px 20px 0;
|
|
71
|
+
font-size: 16px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.header-account-btn .toggle {
|
|
75
|
+
color: #204e5a;
|
|
76
|
+
font-weight: bold;
|
|
77
|
+
font-size: 14px;
|
|
78
|
+
padding: 20px 24px;
|
|
79
|
+
@media (max-width: 800px) {
|
|
80
|
+
padding: 10px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
@media (max-width: 800px) {
|
|
84
|
+
.header-account-btn .dropdown-wrapper .menu {
|
|
85
|
+
right: -25vw;
|
|
86
|
+
left: -25vw;
|
|
87
|
+
}
|
|
88
|
+
}
|