@manuscripts/style-guide 1.6.2 → 1.7.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/dist/cjs/components/Dialog.js +3 -3
- package/dist/cjs/components/References/BibliographyItemSource.js +91 -0
- package/dist/cjs/components/References/CitationEditor.js +146 -0
- package/dist/cjs/components/References/CitationViewer.js +69 -0
- package/dist/cjs/components/References/ReferenceForm.js +415 -0
- package/dist/cjs/components/References/ReferenceLine.js +52 -0
- package/dist/cjs/components/References/ReferenceSearch.js +124 -0
- package/dist/cjs/components/References/ReferenceSearchResults.js +68 -0
- package/dist/cjs/components/References/ReferenceSearchResultsPlaceholder.js +43 -0
- package/dist/cjs/components/References/ReferenceSearchSection.js +118 -0
- package/dist/cjs/components/References/ReferencesModal.js +219 -0
- package/dist/cjs/components/References/SearchInput.js +103 -0
- package/dist/cjs/components/References/index.js +20 -0
- package/dist/cjs/components/SelectField.js +25 -0
- package/dist/cjs/components/Sidebar.js +44 -0
- package/dist/cjs/components/StyledModal.js +80 -3
- package/dist/cjs/components/icons/delete-icon.js +15 -0
- package/dist/cjs/components/icons/link-icon.js +11 -0
- package/dist/cjs/components/icons/template-icon.js +11 -0
- package/dist/cjs/hooks/use-scroll-detection.js +53 -0
- package/dist/cjs/index.js +1 -1
- package/dist/es/components/Dialog.js +2 -2
- package/dist/es/components/References/BibliographyItemSource.js +64 -0
- package/dist/es/components/References/CitationEditor.js +116 -0
- package/dist/es/components/References/CitationViewer.js +39 -0
- package/dist/es/components/References/ReferenceForm.js +385 -0
- package/dist/es/components/References/ReferenceLine.js +42 -0
- package/dist/es/components/References/ReferenceSearch.js +94 -0
- package/dist/es/components/References/ReferenceSearchResults.js +61 -0
- package/dist/es/components/References/ReferenceSearchResultsPlaceholder.js +36 -0
- package/dist/es/components/References/ReferenceSearchSection.js +88 -0
- package/dist/es/components/References/ReferencesModal.js +188 -0
- package/dist/es/components/References/SearchInput.js +73 -0
- package/dist/es/components/References/index.js +4 -0
- package/dist/es/components/SelectField.js +18 -0
- package/dist/es/components/Sidebar.js +18 -0
- package/dist/es/components/StyledModal.js +81 -3
- package/dist/es/components/icons/delete-icon.js +8 -0
- package/dist/es/components/icons/link-icon.js +4 -0
- package/dist/es/components/icons/template-icon.js +4 -0
- package/dist/es/hooks/use-scroll-detection.js +49 -0
- package/dist/es/index.js +1 -1
- package/dist/types/components/Dialog.d.ts +1 -1
- package/dist/types/components/References/BibliographyItemSource.d.ts +38 -0
- package/dist/types/components/References/CitationEditor.d.ts +18 -0
- package/dist/types/components/References/CitationViewer.d.ts +24 -0
- package/dist/types/components/References/ReferenceForm.d.ts +35 -0
- package/dist/types/components/References/ReferenceLine.d.ts +10 -0
- package/dist/types/components/References/ReferenceSearch.d.ts +26 -0
- package/dist/types/components/References/ReferenceSearchResults.d.ts +26 -0
- package/dist/types/components/References/ReferenceSearchResultsPlaceholder.d.ts +2 -0
- package/dist/types/components/References/ReferenceSearchSection.d.ts +25 -0
- package/dist/types/components/References/ReferencesModal.d.ts +14 -0
- package/dist/types/components/References/SearchInput.d.ts +18 -0
- package/dist/types/components/References/index.d.ts +4 -0
- package/dist/types/components/SelectField.d.ts +27 -0
- package/dist/types/components/Sidebar.d.ts +2 -0
- package/dist/types/components/StyledModal.d.ts +26 -4
- package/dist/types/components/icons/delete-icon.d.ts +2 -0
- package/dist/types/components/icons/link-icon.d.ts +2 -0
- package/dist/types/components/icons/template-icon.d.ts +2 -0
- package/dist/types/hooks/use-scroll-detection.d.ts +22 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +3 -2
- package/dist/cjs/components/SimpleModal.js +0 -95
- package/dist/es/components/SimpleModal.js +0 -88
- package/dist/types/components/SimpleModal.d.ts +0 -41
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { BibliographyItem } from '@manuscripts/json-schema';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
export declare const CitedItems: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
+
export declare const CitedItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
+
export interface CitationViewerProps {
|
|
21
|
+
rids: string[];
|
|
22
|
+
items: BibliographyItem[];
|
|
23
|
+
}
|
|
24
|
+
export declare const CitationViewer: React.FC<CitationViewerProps>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { BibliographyItem } from '@manuscripts/json-schema';
|
|
17
|
+
import React, { MutableRefObject } from 'react';
|
|
18
|
+
export declare const LabelContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
+
export declare const FormField: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
+
export declare const ReferenceTextArea: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, import("../Form").ErrorProps, never>;
|
|
21
|
+
export declare const FlexForm: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "name" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoComplete" | "method" | "target" | "acceptCharset" | "action" | "encType" | "noValidate"> & React.RefAttributes<HTMLFormElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
22
|
+
export declare const FormFields: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
23
|
+
export type ReferenceFormValues = Pick<BibliographyItem, '_id' | 'title' | 'author' | 'DOI' | 'issued' | 'type' | 'container-title' | 'URL' | 'issue' | 'volume' | 'supplement' | 'page'>;
|
|
24
|
+
export interface ReferenceFormActions {
|
|
25
|
+
reset: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const ReferenceForm: React.FC<{
|
|
28
|
+
values: ReferenceFormValues;
|
|
29
|
+
showDelete: boolean;
|
|
30
|
+
onChange: (values: ReferenceFormValues) => void;
|
|
31
|
+
onCancel: () => void;
|
|
32
|
+
onDelete: () => void;
|
|
33
|
+
onSave: (values: ReferenceFormValues) => void;
|
|
34
|
+
actionsRef?: MutableRefObject<ReferenceFormActions | undefined>;
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BibliographyItem } from '@manuscripts/json-schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const Metadata: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const MetadataContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const metadata: (item: BibliographyItem) => string;
|
|
6
|
+
export declare const issuedYear: (item: Partial<BibliographyItem>) => string;
|
|
7
|
+
export declare const authors: (item: BibliographyItem) => string;
|
|
8
|
+
export declare const ReferenceLine: React.FC<{
|
|
9
|
+
item: BibliographyItem;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { BibliographyItem } from '@manuscripts/json-schema';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { BibliographyItemSource } from './BibliographyItemSource';
|
|
19
|
+
export declare const ReferenceSearch: React.FC<{
|
|
20
|
+
query?: string;
|
|
21
|
+
sources: BibliographyItemSource[];
|
|
22
|
+
items: BibliographyItem[];
|
|
23
|
+
onAdd: () => void;
|
|
24
|
+
onCite: (items: BibliographyItem[]) => void;
|
|
25
|
+
onCancel: () => void;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { BibliographyItem } from '@manuscripts/json-schema';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
export declare const ReferenceSearchResultsContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
+
export declare const ReferenceSearchResult: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
+
export declare const ReferenceSearchResults: React.FC<{
|
|
21
|
+
items: BibliographyItem[];
|
|
22
|
+
total: number;
|
|
23
|
+
isSelected: (item: BibliographyItem) => boolean;
|
|
24
|
+
onSelect: (item: BibliographyItem) => void;
|
|
25
|
+
onShowMore: () => void;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { BibliographyItem } from '@manuscripts/json-schema';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { BibliographyItemSource } from './BibliographyItemSource';
|
|
19
|
+
export declare const Arrow: import("styled-components").StyledComponent<React.SFC<React.SVGAttributes<SVGElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
+
export declare const ReferenceSearchSection: React.FC<{
|
|
21
|
+
query: string;
|
|
22
|
+
source: BibliographyItemSource;
|
|
23
|
+
isSelected: (item: BibliographyItem) => boolean;
|
|
24
|
+
onSelect: (item: BibliographyItem) => void;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BibliographyItem } from '@manuscripts/json-schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReferenceFormValues } from './ReferenceForm';
|
|
4
|
+
export declare const normalize: (item: BibliographyItem) => ReferenceFormValues;
|
|
5
|
+
export interface ReferencesModalProps {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
items: BibliographyItem[];
|
|
9
|
+
item?: BibliographyItem;
|
|
10
|
+
citationCounts: Map<string, number>;
|
|
11
|
+
onSave: (item: BibliographyItem) => void;
|
|
12
|
+
onDelete: (item: BibliographyItem) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const ReferencesModal: React.FC<ReferencesModalProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
17
|
+
export declare const SearchWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
+
export declare const SearchInput: React.FC<InputHTMLAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2024 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { FieldProps } from 'formik';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
export type OptionType = {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
};
|
|
22
|
+
interface Props {
|
|
23
|
+
id?: string;
|
|
24
|
+
options: OptionType[];
|
|
25
|
+
}
|
|
26
|
+
export declare const SelectField: React.FC<Props & FieldProps>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const SidebarStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("styled-components").DefaultTheme>>;
|
|
2
|
+
export declare const SidebarContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -14,13 +14,35 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import React from 'react';
|
|
17
|
-
import
|
|
17
|
+
import ReactModal from 'react-modal';
|
|
18
18
|
import { ThemeProps } from 'styled-components';
|
|
19
19
|
interface Props {
|
|
20
|
-
modalClassName?:
|
|
20
|
+
modalClassName?: ReactModal.Classes;
|
|
21
21
|
}
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
22
|
+
export declare const ModalContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
23
|
+
export declare const ModalHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
24
|
+
export declare const CloseButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
25
|
+
type: "button" | "reset" | "submit";
|
|
26
|
+
} & {
|
|
27
|
+
danger?: boolean | undefined;
|
|
28
|
+
disabled?: boolean | undefined;
|
|
29
|
+
mini?: boolean | undefined;
|
|
30
|
+
} & {
|
|
31
|
+
defaultColor?: boolean | undefined;
|
|
32
|
+
size?: number | undefined;
|
|
33
|
+
iconColor?: string | undefined;
|
|
34
|
+
} & {
|
|
35
|
+
defaultColor: boolean;
|
|
36
|
+
} & {
|
|
37
|
+
size?: number | undefined;
|
|
38
|
+
}, "type" | "defaultColor">;
|
|
39
|
+
export declare const ModalBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
40
|
+
export declare const ModalSidebar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
41
|
+
export declare const ModalSidebarHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
42
|
+
export declare const ModalSidebarTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
43
|
+
export declare const ModelContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
44
|
+
export declare const ScrollableModalContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
45
|
+
export declare const StyledModal: import("styled-components").StyledComponent<React.FC<ReactModal.Props & ThemeProps<ReactModal> & Props>, import("styled-components").DefaultTheme, {
|
|
24
46
|
closeTimeoutMS: 800;
|
|
25
47
|
overlayClassName: {
|
|
26
48
|
base: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © 2023 Atypon Systems LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useScrollDetection: (topTrigger: number, bottomTrigger: number) => {
|
|
17
|
+
ref: (node: HTMLDivElement | null) => void;
|
|
18
|
+
triggers: {
|
|
19
|
+
bottom: boolean;
|
|
20
|
+
top: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ export * from './components/FileManager';
|
|
|
34
34
|
export * from './components/FileManager/util';
|
|
35
35
|
export * from './components/Resizer';
|
|
36
36
|
export * from './components/SaveStatus';
|
|
37
|
-
export * from './components/SimpleModal';
|
|
38
37
|
export * from './components/StyledModal';
|
|
39
38
|
export * from './components/TextField';
|
|
40
39
|
export * from './components/TextFieldContainer';
|
|
@@ -54,6 +53,7 @@ export * from './components/Text';
|
|
|
54
53
|
export * from './components/ManuscriptNoteList';
|
|
55
54
|
export * from './components/Comments';
|
|
56
55
|
export * from './components/RelativeDate';
|
|
56
|
+
export * from './components/References';
|
|
57
57
|
export * from './components/Menus';
|
|
58
58
|
export * from './hooks/use-dropdown';
|
|
59
59
|
export * from './hooks/use-files';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/style-guide",
|
|
3
3
|
"description": "Shared components for Manuscripts applications",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.0",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-style-guide",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@manuscripts/json-schema": "^2.2.2",
|
|
41
41
|
"@reach/tabs": "^0.11.2",
|
|
42
42
|
"formik": "^2.2.9",
|
|
43
|
+
"fuzzysort": "^2.0.4",
|
|
43
44
|
"date-fns": "^2.29.3",
|
|
44
45
|
"lodash-es": "^4.17.21",
|
|
45
46
|
"tooltip.js": "^1.3.3",
|
|
@@ -113,4 +114,4 @@
|
|
|
113
114
|
"resolutions": {
|
|
114
115
|
"@types/react": "^17.0.2"
|
|
115
116
|
}
|
|
116
|
-
}
|
|
117
|
+
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* © 2019 Atypon Systems LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.SimpleModal = exports.ModalMain = exports.CloseButton = exports.ModalHeader = exports.ModalContainer = void 0;
|
|
22
|
-
const react_1 = __importDefault(require("react"));
|
|
23
|
-
const react_modal_1 = __importDefault(require("react-modal"));
|
|
24
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
25
|
-
const Button_1 = require("./Button");
|
|
26
|
-
exports.ModalContainer = styled_components_1.default.div `
|
|
27
|
-
background: ${(props) => props.theme.colors.background.primary};
|
|
28
|
-
border-radius: ${(props) => props.theme.grid.radius.default};
|
|
29
|
-
box-shadow: ${(props) => props.theme.shadow.dropShadow};
|
|
30
|
-
font-family: ${(props) => props.theme.font.family.sans};
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
margin: ${(props) => props.theme.grid.unit * 3}px;
|
|
33
|
-
`;
|
|
34
|
-
exports.ModalHeader = styled_components_1.default.div `
|
|
35
|
-
position: absolute;
|
|
36
|
-
right: 0;
|
|
37
|
-
top: 0;
|
|
38
|
-
z-index: 1;
|
|
39
|
-
`;
|
|
40
|
-
exports.CloseButton = (0, styled_components_1.default)(Button_1.RoundIconButton) `
|
|
41
|
-
box-shadow: none;
|
|
42
|
-
text-indent: -99999px;
|
|
43
|
-
|
|
44
|
-
::before,
|
|
45
|
-
::after {
|
|
46
|
-
background-color: ${(props) => props.theme.colors.text.secondary};
|
|
47
|
-
border-radius: 2px;
|
|
48
|
-
content: ' ';
|
|
49
|
-
display: block;
|
|
50
|
-
height: 14px;
|
|
51
|
-
transform: rotate(-45deg);
|
|
52
|
-
width: 2px;
|
|
53
|
-
position: absolute;
|
|
54
|
-
top: calc(50% - 7px);
|
|
55
|
-
left: calc(50% - 1px);
|
|
56
|
-
}
|
|
57
|
-
::after {
|
|
58
|
-
transform: rotate(45deg);
|
|
59
|
-
}
|
|
60
|
-
`;
|
|
61
|
-
exports.ModalMain = styled_components_1.default.div `
|
|
62
|
-
padding: ${(props) => props.theme.grid.unit * 4}px;
|
|
63
|
-
`;
|
|
64
|
-
const SimpleModal = ({ children, closeWithOverlay, handleClose, width = 'auto', }) => (react_1.default.createElement(react_modal_1.default, { isOpen: true, onRequestClose: handleClose, shouldCloseOnOverlayClick: closeWithOverlay, appElement: document.getElementById('root'), style: {
|
|
65
|
-
overlay: {
|
|
66
|
-
alignItems: 'center',
|
|
67
|
-
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
68
|
-
bottom: 0,
|
|
69
|
-
display: 'flex',
|
|
70
|
-
justifyContent: 'center',
|
|
71
|
-
left: 0,
|
|
72
|
-
position: 'fixed',
|
|
73
|
-
right: 0,
|
|
74
|
-
top: 0,
|
|
75
|
-
},
|
|
76
|
-
content: {
|
|
77
|
-
background: 'transparent',
|
|
78
|
-
border: 'none',
|
|
79
|
-
bottom: 0,
|
|
80
|
-
left: 0,
|
|
81
|
-
margin: 'auto',
|
|
82
|
-
maxHeight: '70vh',
|
|
83
|
-
maxWidth: '70vw',
|
|
84
|
-
padding: 0,
|
|
85
|
-
position: 'relative',
|
|
86
|
-
right: 0,
|
|
87
|
-
top: 0,
|
|
88
|
-
width,
|
|
89
|
-
},
|
|
90
|
-
} },
|
|
91
|
-
react_1.default.createElement(exports.ModalContainer, null,
|
|
92
|
-
react_1.default.createElement(exports.ModalHeader, null,
|
|
93
|
-
react_1.default.createElement(exports.CloseButton, { onClick: handleClose })),
|
|
94
|
-
react_1.default.createElement(exports.ModalMain, null, children))));
|
|
95
|
-
exports.SimpleModal = SimpleModal;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2019 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import Modal from 'react-modal';
|
|
18
|
-
import styled from 'styled-components';
|
|
19
|
-
import { RoundIconButton } from './Button';
|
|
20
|
-
export const ModalContainer = styled.div `
|
|
21
|
-
background: ${(props) => props.theme.colors.background.primary};
|
|
22
|
-
border-radius: ${(props) => props.theme.grid.radius.default};
|
|
23
|
-
box-shadow: ${(props) => props.theme.shadow.dropShadow};
|
|
24
|
-
font-family: ${(props) => props.theme.font.family.sans};
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
margin: ${(props) => props.theme.grid.unit * 3}px;
|
|
27
|
-
`;
|
|
28
|
-
export const ModalHeader = styled.div `
|
|
29
|
-
position: absolute;
|
|
30
|
-
right: 0;
|
|
31
|
-
top: 0;
|
|
32
|
-
z-index: 1;
|
|
33
|
-
`;
|
|
34
|
-
export const CloseButton = styled(RoundIconButton) `
|
|
35
|
-
box-shadow: none;
|
|
36
|
-
text-indent: -99999px;
|
|
37
|
-
|
|
38
|
-
::before,
|
|
39
|
-
::after {
|
|
40
|
-
background-color: ${(props) => props.theme.colors.text.secondary};
|
|
41
|
-
border-radius: 2px;
|
|
42
|
-
content: ' ';
|
|
43
|
-
display: block;
|
|
44
|
-
height: 14px;
|
|
45
|
-
transform: rotate(-45deg);
|
|
46
|
-
width: 2px;
|
|
47
|
-
position: absolute;
|
|
48
|
-
top: calc(50% - 7px);
|
|
49
|
-
left: calc(50% - 1px);
|
|
50
|
-
}
|
|
51
|
-
::after {
|
|
52
|
-
transform: rotate(45deg);
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
55
|
-
export const ModalMain = styled.div `
|
|
56
|
-
padding: ${(props) => props.theme.grid.unit * 4}px;
|
|
57
|
-
`;
|
|
58
|
-
export const SimpleModal = ({ children, closeWithOverlay, handleClose, width = 'auto', }) => (React.createElement(Modal, { isOpen: true, onRequestClose: handleClose, shouldCloseOnOverlayClick: closeWithOverlay, appElement: document.getElementById('root'), style: {
|
|
59
|
-
overlay: {
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
62
|
-
bottom: 0,
|
|
63
|
-
display: 'flex',
|
|
64
|
-
justifyContent: 'center',
|
|
65
|
-
left: 0,
|
|
66
|
-
position: 'fixed',
|
|
67
|
-
right: 0,
|
|
68
|
-
top: 0,
|
|
69
|
-
},
|
|
70
|
-
content: {
|
|
71
|
-
background: 'transparent',
|
|
72
|
-
border: 'none',
|
|
73
|
-
bottom: 0,
|
|
74
|
-
left: 0,
|
|
75
|
-
margin: 'auto',
|
|
76
|
-
maxHeight: '70vh',
|
|
77
|
-
maxWidth: '70vw',
|
|
78
|
-
padding: 0,
|
|
79
|
-
position: 'relative',
|
|
80
|
-
right: 0,
|
|
81
|
-
top: 0,
|
|
82
|
-
width,
|
|
83
|
-
},
|
|
84
|
-
} },
|
|
85
|
-
React.createElement(ModalContainer, null,
|
|
86
|
-
React.createElement(ModalHeader, null,
|
|
87
|
-
React.createElement(CloseButton, { onClick: handleClose })),
|
|
88
|
-
React.createElement(ModalMain, null, children))));
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © 2019 Atypon Systems LLC
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import React from 'react';
|
|
17
|
-
export declare const ModalContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
-
export declare const ModalHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
19
|
-
export declare const CloseButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
20
|
-
type: "button" | "reset" | "submit";
|
|
21
|
-
} & {
|
|
22
|
-
danger?: boolean | undefined;
|
|
23
|
-
disabled?: boolean | undefined;
|
|
24
|
-
mini?: boolean | undefined;
|
|
25
|
-
} & {
|
|
26
|
-
defaultColor?: boolean | undefined;
|
|
27
|
-
size?: number | undefined;
|
|
28
|
-
iconColor?: string | undefined;
|
|
29
|
-
} & {
|
|
30
|
-
defaultColor: boolean;
|
|
31
|
-
} & {
|
|
32
|
-
size?: number | undefined;
|
|
33
|
-
}, "type" | "defaultColor">;
|
|
34
|
-
export declare const ModalMain: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
35
|
-
interface Props {
|
|
36
|
-
handleClose: () => void;
|
|
37
|
-
closeWithOverlay: boolean;
|
|
38
|
-
width?: string;
|
|
39
|
-
}
|
|
40
|
-
export declare const SimpleModal: React.FunctionComponent<Props>;
|
|
41
|
-
export {};
|