@manuscripts/style-guide 3.3.7 → 3.3.9
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/AlertMessage.js +2 -23
- package/dist/cjs/components/AutoSaveInput.js +2 -16
- package/dist/cjs/components/Avatar.js +3 -50
- package/dist/cjs/components/Button.js +5 -1
- package/dist/cjs/components/ContextMenu.js +5 -22
- package/dist/cjs/components/Dialog.js +5 -38
- package/dist/cjs/components/DraggableModal.js +4 -52
- package/dist/cjs/components/Drawer.js +2 -10
- package/dist/cjs/components/InspectorSection.js +5 -58
- package/dist/cjs/components/LoadingOverlay.js +3 -5
- package/dist/cjs/components/Menus/Menus.js +9 -28
- package/dist/cjs/components/Menus/Shortcut.js +3 -18
- package/dist/cjs/components/Menus/Submenu.js +7 -28
- package/dist/cjs/components/Message.js +2 -4
- package/dist/cjs/components/MultiValueInput.js +3 -39
- package/dist/cjs/components/NavDropdown.js +2 -23
- package/dist/cjs/components/RadioButton.js +2 -19
- package/dist/cjs/components/RelativeDate.js +3 -21
- package/dist/cjs/components/Resizer/Resizer.js +2 -2
- package/dist/cjs/components/Resizer/ResizerButton.js +2 -1
- package/dist/cjs/components/RichText/RichText.js +3 -35
- package/dist/cjs/components/RichText/RichTextField.js +3 -35
- package/dist/cjs/components/SaveStatus.js +5 -31
- package/dist/cjs/components/SelectField.js +2 -17
- package/dist/cjs/components/SelectedItemsBox.js +2 -5
- package/dist/cjs/components/StyledModal.js +4 -18
- package/dist/cjs/components/SystemUserAvatar.js +3 -50
- package/dist/cjs/components/TextField.js +2 -22
- package/dist/cjs/components/TextFieldContainer.js +2 -22
- package/dist/cjs/components/TextFieldError.js +2 -19
- package/dist/cjs/components/TextFieldGroupContainer.js +2 -22
- package/dist/cjs/components/ToggleHeader.js +3 -20
- package/dist/cjs/components/Tooltip.js +3 -4
- package/dist/cjs/components/icons/add-author.js +2 -23
- package/dist/cjs/components/icons/add-comment.js +2 -25
- package/dist/cjs/components/icons/add-figure.js +2 -23
- package/dist/cjs/components/icons/add-institution.js +2 -20
- package/dist/cjs/components/icons/add-new.js +2 -7
- package/dist/cjs/components/icons/add-outline.js +2 -8
- package/dist/cjs/components/icons/add-role.js +2 -8
- package/dist/cjs/components/icons/add-user.js +2 -8
- package/dist/cjs/components/icons/add.js +2 -8
- package/dist/cjs/components/icons/added.js +2 -7
- package/dist/cjs/components/icons/affiliation-placeholder.js +2 -39
- package/dist/cjs/components/icons/affiliation.js +2 -7
- package/dist/cjs/components/icons/alert.js +2 -6
- package/dist/cjs/components/icons/arrow-down-circle.js +2 -7
- package/dist/cjs/components/icons/arrow-down.js +2 -6
- package/dist/cjs/components/icons/arrow-left.js +2 -6
- package/dist/cjs/components/icons/arrow-up.js +2 -6
- package/dist/cjs/components/icons/attach.js +2 -21
- package/dist/cjs/components/icons/attention-blue.js +2 -10
- package/dist/cjs/components/icons/attention-green.js +2 -7
- package/dist/cjs/components/icons/attention-orange.js +2 -12
- package/dist/cjs/components/icons/attention-red.js +2 -10
- package/dist/cjs/components/icons/author-placeholder.js +2 -46
- package/dist/cjs/components/icons/avatar.js +2 -8
- package/dist/cjs/components/icons/book.js +2 -22
- package/dist/cjs/components/icons/chat.js +2 -23
- package/dist/cjs/components/icons/circle-tick-animation.js +4 -8
- package/dist/cjs/components/icons/citation-count.js +2 -6
- package/dist/cjs/components/icons/comment-reply.js +2 -6
- package/dist/cjs/components/icons/comment-resolve.js +2 -21
- package/dist/cjs/components/icons/comment.js +2 -25
- package/dist/cjs/components/icons/corresponding-author.js +2 -12
- package/dist/cjs/components/icons/danger.js +2 -10
- package/dist/cjs/components/icons/delete-solid.js +2 -6
- package/dist/cjs/components/icons/deleted.js +2 -11
- package/dist/cjs/components/icons/dots.js +2 -23
- package/dist/cjs/components/icons/draggable-icon.js +2 -13
- package/dist/cjs/components/icons/edit-attrs-tracking.js +2 -7
- package/dist/cjs/components/icons/edit.js +2 -6
- package/dist/cjs/components/icons/file-audio.js +2 -23
- package/dist/cjs/components/icons/file-code.js +2 -23
- package/dist/cjs/components/icons/file-compressed.js +2 -30
- package/dist/cjs/components/icons/file-corrupted.js +2 -24
- package/dist/cjs/components/icons/file-document.js +2 -24
- package/dist/cjs/components/icons/file-figure.js +2 -23
- package/dist/cjs/components/icons/file-graphical-abstract.js +2 -8
- package/dist/cjs/components/icons/file-image.js +2 -6
- package/dist/cjs/components/icons/file-latex-icon.js +2 -25
- package/dist/cjs/components/icons/file-main-document.js +2 -10
- package/dist/cjs/components/icons/file-pdf.js +2 -22
- package/dist/cjs/components/icons/file-table.js +2 -21
- package/dist/cjs/components/icons/file-unknown.js +2 -22
- package/dist/cjs/components/icons/file-video.js +2 -21
- package/dist/cjs/components/icons/handle-inspector.js +2 -6
- package/dist/cjs/components/icons/handle-outline.js +2 -11
- package/dist/cjs/components/icons/help.js +2 -8
- package/dist/cjs/components/icons/image-default.js +2 -9
- package/dist/cjs/components/icons/image-left.js +2 -9
- package/dist/cjs/components/icons/image-right.js +2 -9
- package/dist/cjs/components/icons/index.js +4 -2
- package/dist/cjs/components/icons/inspector-plugin.js +5 -0
- package/dist/cjs/components/icons/link.js +2 -7
- package/dist/cjs/components/icons/lock.js +2 -9
- package/dist/cjs/components/icons/logout.js +2 -6
- package/dist/cjs/components/icons/manuscript.js +2 -24
- package/dist/cjs/components/icons/outline-block-quote.js +2 -8
- package/dist/cjs/components/icons/outline-code.js +2 -7
- package/dist/cjs/components/icons/outline-embed.js +2 -8
- package/dist/cjs/components/icons/outline-equation.js +2 -6
- package/dist/cjs/components/icons/outline-figure.js +2 -12
- package/dist/cjs/components/icons/outline-manuscript.js +2 -9
- package/dist/cjs/components/icons/outline-ordered-list.js +2 -6
- package/dist/cjs/components/icons/outline-paragraph.js +2 -6
- package/dist/cjs/components/icons/outline-pull-quote.js +2 -8
- package/dist/cjs/components/icons/outline-section.js +2 -6
- package/dist/cjs/components/icons/outline-table.js +2 -8
- package/dist/cjs/components/icons/outline-unordered-list.js +2 -8
- package/dist/cjs/components/icons/plus.js +2 -22
- package/dist/cjs/components/icons/profile-avatar.js +2 -6
- package/dist/cjs/components/icons/role-annotating.js +2 -8
- package/dist/cjs/components/icons/role-reading.js +2 -10
- package/dist/cjs/components/icons/save-status-offline.js +2 -23
- package/dist/cjs/components/icons/save-status-saved.js +2 -22
- package/dist/cjs/components/icons/save-status-saving.js +2 -24
- package/dist/cjs/components/icons/scroll.js +2 -10
- package/dist/cjs/components/icons/search.js +2 -22
- package/dist/cjs/components/icons/section-category.js +2 -21
- package/dist/cjs/components/icons/slider-off.js +2 -7
- package/dist/cjs/components/icons/slider-on.js +2 -7
- package/dist/cjs/components/icons/system-user-avatar.js +2 -9
- package/dist/cjs/components/icons/task-step-done.js +2 -22
- package/dist/cjs/components/icons/tick.js +2 -6
- package/dist/cjs/components/icons/toolbar-bold.js +2 -6
- package/dist/cjs/components/icons/toolbar-boxed-text.js +2 -7
- package/dist/cjs/components/icons/toolbar-citation.js +2 -8
- package/dist/cjs/components/icons/toolbar-code.js +2 -7
- package/dist/cjs/components/icons/toolbar-equation.js +2 -6
- package/dist/cjs/components/icons/toolbar-figure.js +2 -6
- package/dist/cjs/components/icons/toolbar-indent.js +2 -11
- package/dist/cjs/components/icons/toolbar-italic.js +2 -6
- package/dist/cjs/components/icons/toolbar-ordered-list.js +2 -6
- package/dist/cjs/components/icons/toolbar-special-characters.js +2 -7
- package/dist/cjs/components/icons/toolbar-subscript.js +2 -6
- package/dist/cjs/components/icons/toolbar-superscript.js +2 -6
- package/dist/cjs/components/icons/toolbar-symbol.js +2 -6
- package/dist/cjs/components/icons/toolbar-table.js +2 -6
- package/dist/cjs/components/icons/toolbar-underline.js +2 -6
- package/dist/cjs/components/icons/toolbar-unindent.js +2 -11
- package/dist/cjs/components/icons/toolbar-unordered-list.js +2 -6
- package/dist/cjs/components/icons/translate.js +2 -13
- package/dist/cjs/components/icons/triangle-collapsed.js +2 -6
- package/dist/cjs/components/icons/triangle-expanded.js +2 -6
- package/dist/cjs/components/icons/upload.js +2 -8
- package/dist/cjs/components/icons/vertical-ellipsis.js +2 -8
- package/dist/cjs/components/icons/x.js +2 -7
- package/dist/cjs/hooks/use-scroll-detection.js +2 -2
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/lib/files.js +14 -17
- package/dist/es/components/AlertMessage.js +2 -23
- package/dist/es/components/AutoSaveInput.js +2 -16
- package/dist/es/components/Avatar.js +3 -17
- package/dist/es/components/Button.js +5 -1
- package/dist/es/components/ContextMenu.js +5 -22
- package/dist/es/components/Dialog.js +5 -38
- package/dist/es/components/DraggableModal.js +4 -19
- package/dist/es/components/Drawer.js +2 -7
- package/dist/es/components/InspectorSection.js +5 -25
- package/dist/es/components/LoadingOverlay.js +3 -5
- package/dist/es/components/Menus/Menus.js +9 -28
- package/dist/es/components/Menus/Shortcut.js +3 -18
- package/dist/es/components/Menus/Submenu.js +7 -28
- package/dist/es/components/Message.js +2 -4
- package/dist/es/components/MultiValueInput.js +3 -6
- package/dist/es/components/NavDropdown.js +2 -20
- package/dist/es/components/RadioButton.js +2 -19
- package/dist/es/components/RelativeDate.js +3 -18
- package/dist/es/components/Resizer/Resizer.js +2 -2
- package/dist/es/components/Resizer/ResizerButton.js +2 -1
- package/dist/es/components/RichText/RichText.js +3 -2
- package/dist/es/components/RichText/RichTextField.js +3 -2
- package/dist/es/components/SaveStatus.js +5 -31
- package/dist/es/components/SelectField.js +2 -17
- package/dist/es/components/SelectedItemsBox.js +2 -5
- package/dist/es/components/StyledModal.js +4 -18
- package/dist/es/components/SystemUserAvatar.js +3 -17
- package/dist/es/components/TextField.js +2 -19
- package/dist/es/components/TextFieldContainer.js +2 -22
- package/dist/es/components/TextFieldError.js +2 -19
- package/dist/es/components/TextFieldGroupContainer.js +2 -19
- package/dist/es/components/ToggleHeader.js +3 -20
- package/dist/es/components/Tooltip.js +3 -4
- package/dist/es/components/icons/add-author.js +2 -20
- package/dist/es/components/icons/add-comment.js +2 -22
- package/dist/es/components/icons/add-figure.js +2 -20
- package/dist/es/components/icons/add-institution.js +2 -17
- package/dist/es/components/icons/add-new.js +2 -4
- package/dist/es/components/icons/add-outline.js +2 -5
- package/dist/es/components/icons/add-role.js +2 -5
- package/dist/es/components/icons/add-user.js +2 -5
- package/dist/es/components/icons/add.js +2 -5
- package/dist/es/components/icons/added.js +2 -4
- package/dist/es/components/icons/affiliation-placeholder.js +2 -36
- package/dist/es/components/icons/affiliation.js +2 -4
- package/dist/es/components/icons/alert.js +2 -3
- package/dist/es/components/icons/arrow-down-circle.js +2 -4
- package/dist/es/components/icons/arrow-down.js +2 -3
- package/dist/es/components/icons/arrow-left.js +2 -3
- package/dist/es/components/icons/arrow-up.js +2 -3
- package/dist/es/components/icons/attach.js +2 -18
- package/dist/es/components/icons/attention-blue.js +2 -7
- package/dist/es/components/icons/attention-green.js +2 -4
- package/dist/es/components/icons/attention-orange.js +2 -9
- package/dist/es/components/icons/attention-red.js +2 -7
- package/dist/es/components/icons/author-placeholder.js +2 -43
- package/dist/es/components/icons/avatar.js +2 -5
- package/dist/es/components/icons/book.js +2 -19
- package/dist/es/components/icons/chat.js +2 -20
- package/dist/es/components/icons/circle-tick-animation.js +4 -5
- package/dist/es/components/icons/citation-count.js +2 -3
- package/dist/es/components/icons/comment-reply.js +2 -3
- package/dist/es/components/icons/comment-resolve.js +2 -18
- package/dist/es/components/icons/comment.js +2 -22
- package/dist/es/components/icons/corresponding-author.js +2 -9
- package/dist/es/components/icons/danger.js +2 -7
- package/dist/es/components/icons/delete-solid.js +2 -3
- package/dist/es/components/icons/deleted.js +2 -8
- package/dist/es/components/icons/dots.js +2 -20
- package/dist/es/components/icons/draggable-icon.js +2 -10
- package/dist/es/components/icons/edit-attrs-tracking.js +2 -4
- package/dist/es/components/icons/edit.js +2 -3
- package/dist/es/components/icons/file-audio.js +2 -20
- package/dist/es/components/icons/file-code.js +2 -20
- package/dist/es/components/icons/file-compressed.js +2 -27
- package/dist/es/components/icons/file-corrupted.js +2 -21
- package/dist/es/components/icons/file-document.js +2 -21
- package/dist/es/components/icons/file-figure.js +2 -20
- package/dist/es/components/icons/file-graphical-abstract.js +2 -5
- package/dist/es/components/icons/file-image.js +2 -3
- package/dist/es/components/icons/file-latex-icon.js +2 -22
- package/dist/es/components/icons/file-main-document.js +2 -7
- package/dist/es/components/icons/file-pdf.js +2 -19
- package/dist/es/components/icons/file-table.js +2 -18
- package/dist/es/components/icons/file-unknown.js +2 -19
- package/dist/es/components/icons/file-video.js +2 -18
- package/dist/es/components/icons/handle-inspector.js +2 -3
- package/dist/es/components/icons/handle-outline.js +2 -8
- package/dist/es/components/icons/help.js +2 -5
- package/dist/es/components/icons/image-default.js +2 -6
- package/dist/es/components/icons/image-left.js +2 -6
- package/dist/es/components/icons/image-right.js +2 -6
- package/dist/es/components/icons/index.js +1 -0
- package/dist/es/components/icons/inspector-plugin.js +3 -0
- package/dist/es/components/icons/link.js +2 -4
- package/dist/es/components/icons/lock.js +2 -6
- package/dist/es/components/icons/logout.js +2 -3
- package/dist/es/components/icons/manuscript.js +2 -21
- package/dist/es/components/icons/outline-block-quote.js +2 -5
- package/dist/es/components/icons/outline-code.js +2 -4
- package/dist/es/components/icons/outline-embed.js +2 -5
- package/dist/es/components/icons/outline-equation.js +2 -3
- package/dist/es/components/icons/outline-figure.js +2 -9
- package/dist/es/components/icons/outline-manuscript.js +2 -6
- package/dist/es/components/icons/outline-ordered-list.js +2 -3
- package/dist/es/components/icons/outline-paragraph.js +2 -3
- package/dist/es/components/icons/outline-pull-quote.js +2 -5
- package/dist/es/components/icons/outline-section.js +2 -3
- package/dist/es/components/icons/outline-table.js +2 -5
- package/dist/es/components/icons/outline-unordered-list.js +2 -5
- package/dist/es/components/icons/plus.js +2 -19
- package/dist/es/components/icons/profile-avatar.js +2 -3
- package/dist/es/components/icons/role-annotating.js +2 -5
- package/dist/es/components/icons/role-reading.js +2 -7
- package/dist/es/components/icons/save-status-offline.js +2 -20
- package/dist/es/components/icons/save-status-saved.js +2 -19
- package/dist/es/components/icons/save-status-saving.js +2 -21
- package/dist/es/components/icons/scroll.js +2 -7
- package/dist/es/components/icons/search.js +2 -19
- package/dist/es/components/icons/section-category.js +2 -18
- package/dist/es/components/icons/slider-off.js +2 -4
- package/dist/es/components/icons/slider-on.js +2 -4
- package/dist/es/components/icons/system-user-avatar.js +2 -6
- package/dist/es/components/icons/task-step-done.js +2 -19
- package/dist/es/components/icons/tick.js +2 -3
- package/dist/es/components/icons/toolbar-bold.js +2 -3
- package/dist/es/components/icons/toolbar-boxed-text.js +2 -4
- package/dist/es/components/icons/toolbar-citation.js +2 -5
- package/dist/es/components/icons/toolbar-code.js +2 -4
- package/dist/es/components/icons/toolbar-equation.js +2 -3
- package/dist/es/components/icons/toolbar-figure.js +2 -3
- package/dist/es/components/icons/toolbar-indent.js +2 -8
- package/dist/es/components/icons/toolbar-italic.js +2 -3
- package/dist/es/components/icons/toolbar-ordered-list.js +2 -3
- package/dist/es/components/icons/toolbar-special-characters.js +2 -4
- package/dist/es/components/icons/toolbar-subscript.js +2 -3
- package/dist/es/components/icons/toolbar-superscript.js +2 -3
- package/dist/es/components/icons/toolbar-symbol.js +2 -3
- package/dist/es/components/icons/toolbar-table.js +2 -3
- package/dist/es/components/icons/toolbar-underline.js +2 -3
- package/dist/es/components/icons/toolbar-unindent.js +2 -8
- package/dist/es/components/icons/toolbar-unordered-list.js +2 -3
- package/dist/es/components/icons/translate.js +2 -10
- package/dist/es/components/icons/triangle-collapsed.js +2 -3
- package/dist/es/components/icons/triangle-expanded.js +2 -3
- package/dist/es/components/icons/upload.js +2 -5
- package/dist/es/components/icons/vertical-ellipsis.js +2 -5
- package/dist/es/components/icons/x.js +2 -4
- package/dist/es/hooks/use-scroll-detection.js +2 -2
- package/dist/es/index.js +0 -1
- package/dist/es/lib/files.js +14 -14
- package/dist/types/components/AlertMessage.d.ts +1 -1
- package/dist/types/components/AutoSaveInput.d.ts +1 -1
- package/dist/types/components/Dialog.d.ts +1 -1
- package/dist/types/components/InspectorSection.d.ts +1 -1
- package/dist/types/components/RadioButton.d.ts +1 -1
- package/dist/types/components/Resizer/Resizer.d.ts +2 -2
- package/dist/types/components/Resizer/ResizerButton.d.ts +1 -1
- package/dist/types/components/TextField.d.ts +1 -1
- package/dist/types/components/Tooltip.d.ts +1 -1
- package/dist/types/components/icons/add-author.d.ts +1 -2
- package/dist/types/components/icons/add-figure.d.ts +1 -2
- package/dist/types/components/icons/affiliation-placeholder.d.ts +1 -2
- package/dist/types/components/icons/author-placeholder.d.ts +1 -2
- package/dist/types/components/icons/danger.d.ts +1 -2
- package/dist/types/components/icons/index.d.ts +1 -0
- package/dist/types/components/icons/inspector-plugin.d.ts +4 -0
- package/dist/types/components/icons/section-category.d.ts +1 -2
- package/dist/types/components/icons/x.d.ts +1 -2
- package/dist/types/hooks/use-dropdown.d.ts +1 -1
- package/dist/types/hooks/use-menus.d.ts +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/lib/files.d.ts +3 -2
- package/package.json +19 -19
- package/dist/cjs/components/DatePicker/CalendarDatePicker.js +0 -169
- package/dist/cjs/components/DatePicker/index.js +0 -17
- package/dist/es/components/DatePicker/CalendarDatePicker.js +0 -127
- package/dist/es/components/DatePicker/index.js +0 -1
- package/dist/types/components/DatePicker/CalendarDatePicker.d.ts +0 -32
- package/dist/types/components/DatePicker/index.d.ts +0 -1
|
@@ -1,18 +1,4 @@
|
|
|
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
|
-
*/
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
2
|
import React from 'react';
|
|
17
3
|
import styled from 'styled-components';
|
|
18
4
|
import { ButtonGroup, PrimaryButton, SecondaryButton } from './Button';
|
|
@@ -71,19 +57,15 @@ export var Category;
|
|
|
71
57
|
Category["warning"] = "warning";
|
|
72
58
|
Category["success"] = "success";
|
|
73
59
|
})(Category || (Category = {}));
|
|
74
|
-
const PrimaryAction = (props) => props.isDestructive ? (props.hasForm ? (
|
|
75
|
-
const SecondaryAction = (props) => (
|
|
60
|
+
const PrimaryAction = (props) => props.isDestructive ? (props.hasForm ? (_jsx(PrimaryButton, { danger: true, disabled: props.disabled, form: "formDialog", type: "submit", children: props.title })) : (_jsx(PrimaryButton, { danger: true, disabled: props.disabled, onClick: props.action, autoFocus: true, children: props.title }))) : props.hasForm ? (_jsx(PrimaryButton, { disabled: props.disabled, form: "formDialog", type: "submit", children: props.title })) : (_jsx(PrimaryButton, { disabled: props.disabled, onClick: props.action, autoFocus: true, children: props.title }));
|
|
61
|
+
const SecondaryAction = (props) => (_jsx(SecondaryButton, { disabled: props.disabled, onClick: props.action, children: props.title }));
|
|
76
62
|
export class Dialog extends React.Component {
|
|
77
63
|
constructor() {
|
|
78
64
|
super(...arguments);
|
|
79
65
|
this.state = {
|
|
80
66
|
primaryActionDisabled: true,
|
|
81
67
|
};
|
|
82
|
-
this.renderButtons = (props, disabled) => (
|
|
83
|
-
React.createElement(SecondaryAction, { action: props.actions.secondary.action, hasForm: !!this.props.confirmFieldText, title: props.actions.secondary.title }),
|
|
84
|
-
React.createElement(PrimaryAction, { action: props.actions.primary.action, disabled: disabled, title: props.actions.primary.title || 'Dismiss' }))) : (React.createElement(React.Fragment, null,
|
|
85
|
-
React.createElement(PrimaryAction, { action: props.actions.primary.action, disabled: disabled, isDestructive: true, hasForm: !!this.props.confirmFieldText, title: props.actions.primary.title || 'Dismiss' }),
|
|
86
|
-
React.createElement(SecondaryAction, { action: props.actions.secondary.action, title: props.actions.secondary.title })))) : (React.createElement(PrimaryAction, { action: props.actions.primary.action, disabled: disabled, isDestructive: props.actions.primary.isDestructive, hasForm: !!this.props.confirmFieldText, title: props.actions.primary.title || 'Dismiss' }))));
|
|
68
|
+
this.renderButtons = (props, disabled) => (_jsx(ButtonsContainer, { children: props.actions.secondary ? (!props.actions.primary.isDestructive ? (_jsxs(_Fragment, { children: [_jsx(SecondaryAction, { action: props.actions.secondary.action, hasForm: !!this.props.confirmFieldText, title: props.actions.secondary.title }), _jsx(PrimaryAction, { action: props.actions.primary.action, disabled: disabled, title: props.actions.primary.title || 'Dismiss' })] })) : (_jsxs(_Fragment, { children: [_jsx(PrimaryAction, { action: props.actions.primary.action, disabled: disabled, isDestructive: true, hasForm: !!this.props.confirmFieldText, title: props.actions.primary.title || 'Dismiss' }), _jsx(SecondaryAction, { action: props.actions.secondary.action, title: props.actions.secondary.title })] }))) : (_jsx(PrimaryAction, { action: props.actions.primary.action, disabled: disabled, isDestructive: props.actions.primary.isDestructive, hasForm: !!this.props.confirmFieldText, title: props.actions.primary.title || 'Dismiss' })) }));
|
|
87
69
|
this.checkInputValue = (event) => {
|
|
88
70
|
const testingVal = this.props.confirmFieldText && this.props.confirmFieldText.toUpperCase();
|
|
89
71
|
const target = event.target;
|
|
@@ -107,21 +89,6 @@ export class Dialog extends React.Component {
|
|
|
107
89
|
render() {
|
|
108
90
|
const { actions, isOpen, header, message, category, children, confirmFieldText, className, } = this.props;
|
|
109
91
|
const { primaryActionDisabled } = this.state;
|
|
110
|
-
return (
|
|
111
|
-
React.createElement(DialogModalBody, null,
|
|
112
|
-
React.createElement(HeaderContainer, null,
|
|
113
|
-
category === Category.error && (React.createElement(Icon, null,
|
|
114
|
-
React.createElement(AttentionRedIcon, null))),
|
|
115
|
-
category === Category.warning && (React.createElement(Icon, null,
|
|
116
|
-
React.createElement(AttentionOrangeIcon, null))),
|
|
117
|
-
category === Category.success && (React.createElement(Icon, null,
|
|
118
|
-
React.createElement(AttentionGreenIcon, null))),
|
|
119
|
-
header),
|
|
120
|
-
React.createElement(MessageContainer, null,
|
|
121
|
-
message,
|
|
122
|
-
confirmFieldText && (React.createElement("form", { id: "formDialog", onSubmit: this.handleSubmit },
|
|
123
|
-
React.createElement(ConfirmationTextField, { autoFocus: true, onChange: this.checkInputValue, placeholder: 'Please type: ' + confirmFieldText, required: true }))),
|
|
124
|
-
children),
|
|
125
|
-
this.renderButtons(this.props, primaryActionDisabled))));
|
|
92
|
+
return (_jsx(StyledModal, { isOpen: isOpen, onRequestClose: actions.onClose, shouldCloseOnOverlayClick: true, className: className, children: _jsxs(DialogModalBody, { children: [_jsxs(HeaderContainer, { children: [category === Category.error && (_jsx(Icon, { children: _jsx(AttentionRedIcon, {}) })), category === Category.warning && (_jsx(Icon, { children: _jsx(AttentionOrangeIcon, {}) })), category === Category.success && (_jsx(Icon, { children: _jsx(AttentionGreenIcon, {}) })), header] }), _jsxs(MessageContainer, { children: [message, confirmFieldText && (_jsx("form", { id: "formDialog", onSubmit: this.handleSubmit, children: _jsx(ConfirmationTextField, { autoFocus: true, onChange: this.checkInputValue, placeholder: 'Please type: ' + confirmFieldText, required: true }) })), children] }), this.renderButtons(this.props, primaryActionDisabled)] }) }));
|
|
126
93
|
}
|
|
127
94
|
}
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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, { useCallback, useEffect, useState } from 'react';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
17
3
|
import styled from 'styled-components';
|
|
18
4
|
import { ModalContainer, StyledModal } from './StyledModal';
|
|
19
5
|
export const DraggableModal = ({ children, isOpen, onRequestClose, hideOverlay }) => {
|
|
@@ -56,7 +42,7 @@ export const DraggableModal = ({ children, isOpen, onRequestClose, hideOverlay }
|
|
|
56
42
|
document.removeEventListener('mouseup', mouseup);
|
|
57
43
|
};
|
|
58
44
|
}, []);
|
|
59
|
-
return (
|
|
45
|
+
return (_jsx(StyledModal, { isOpen: isOpen, onRequestClose: onRequestClose, shouldCloseOnOverlayClick: false, pointerEventsOnBackdrop: "none", hideOverlay: hideOverlay, style: {
|
|
60
46
|
content: {
|
|
61
47
|
left: '0',
|
|
62
48
|
bottom: '0',
|
|
@@ -64,8 +50,7 @@ export const DraggableModal = ({ children, isOpen, onRequestClose, hideOverlay }
|
|
|
64
50
|
position: 'fixed',
|
|
65
51
|
width: '100%',
|
|
66
52
|
},
|
|
67
|
-
} }
|
|
68
|
-
React.createElement(DraggableModalContainer, { onMouseDown: mouseDown, onMouseMove: mouseMove, "data-cy": "find-replace-modal" }, children)));
|
|
53
|
+
}, children: _jsx(DraggableModalContainer, { onMouseDown: mouseDown, onMouseMove: mouseMove, "data-cy": "find-replace-modal", children: children }) }));
|
|
69
54
|
};
|
|
70
55
|
const DraggableModalContainer = styled(ModalContainer) `
|
|
71
56
|
padding: 1rem 1.5rem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled, { keyframes } from 'styled-components';
|
|
3
3
|
const slideIn = keyframes `
|
|
4
4
|
from {
|
|
@@ -95,10 +95,5 @@ export const DrawerItemMeta = styled.span `
|
|
|
95
95
|
color: ${(props) => props.theme.colors.text.secondary};
|
|
96
96
|
`;
|
|
97
97
|
export const Drawer = ({ title, onBack, width, children, }) => {
|
|
98
|
-
return (
|
|
99
|
-
React.createElement(DrawerBackButton, { onClick: onBack },
|
|
100
|
-
React.createElement("span", null, "\u2190"),
|
|
101
|
-
"Back"),
|
|
102
|
-
React.createElement(DrawerTitle, null, title),
|
|
103
|
-
children));
|
|
98
|
+
return (_jsxs(DrawerContainer, { "data-cy": "drawer", width: width, children: [_jsxs(DrawerBackButton, { onClick: onBack, children: [_jsx("span", { children: "\u2190" }), "Back"] }), _jsx(DrawerTitle, { children: title }), children] }));
|
|
104
99
|
};
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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, { useState } from 'react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
17
3
|
import styled from 'styled-components';
|
|
18
4
|
import { IconButton } from './Button';
|
|
19
5
|
import { ArrowDownCircleIcon } from './icons';
|
|
@@ -67,15 +53,9 @@ export const Field = styled.div `
|
|
|
67
53
|
`;
|
|
68
54
|
export const InspectorSection = ({ title, contentStyles, children, }) => {
|
|
69
55
|
const [expanded, setExpanded] = useState(true);
|
|
70
|
-
return (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
React.createElement(HeadingText, null, title),
|
|
74
|
-
React.createElement(ExpanderButton, { "aria-label": 'Toggle expand section', onClick: () => setExpanded(!expanded), style: {
|
|
75
|
-
transform: expanded ? 'rotate(0deg)' : 'rotate(180deg)',
|
|
76
|
-
} },
|
|
77
|
-
React.createElement(ArrowDownCircleIcon, null))),
|
|
78
|
-
expanded && children && React.createElement("div", { style: contentStyles }, children)));
|
|
56
|
+
return (_jsxs(Section, { children: [_jsx(Line, {}), _jsxs(Heading, { onClick: () => setExpanded(!expanded), marginBottom: (!(expanded && children) && '40px') || undefined, children: [_jsx(HeadingText, { children: title }), _jsx(ExpanderButton, { "aria-label": 'Toggle expand section', onClick: () => setExpanded(!expanded), style: {
|
|
57
|
+
transform: expanded ? 'rotate(0deg)' : 'rotate(180deg)',
|
|
58
|
+
}, children: _jsx(ArrowDownCircleIcon, {}) })] }), expanded && children && _jsx("div", { style: contentStyles, children: children })] }));
|
|
79
59
|
};
|
|
80
60
|
const Line = styled.hr `
|
|
81
61
|
flex: 1;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Modal from 'react-modal';
|
|
3
|
-
export const LoadingOverlay = ({ children, }) => (
|
|
4
|
-
React.createElement(Modal, { isOpen: true, style: {
|
|
3
|
+
export const LoadingOverlay = ({ children, }) => (_jsx(_Fragment, { children: _jsx(Modal, { isOpen: true, style: {
|
|
5
4
|
overlay: {
|
|
6
5
|
position: 'fixed',
|
|
7
6
|
top: 0,
|
|
@@ -24,5 +23,4 @@ export const LoadingOverlay = ({ children, }) => (React.createElement(React.Frag
|
|
|
24
23
|
overflow: 'auto',
|
|
25
24
|
border: 'none',
|
|
26
25
|
},
|
|
27
|
-
} }
|
|
28
|
-
React.createElement(React.Fragment, null, children))));
|
|
26
|
+
}, children: _jsx(_Fragment, { children: children }) }) }));
|
|
@@ -1,19 +1,4 @@
|
|
|
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';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
2
|
import styled from 'styled-components';
|
|
18
3
|
import { Submenu, SubmenusContainer, SubmenusContainerWrapper, Text, } from './Submenu';
|
|
19
4
|
const MenusContainer = styled.div `
|
|
@@ -38,16 +23,12 @@ const MenuContainer = styled.div `
|
|
|
38
23
|
}
|
|
39
24
|
`;
|
|
40
25
|
export const Menus = ({ menus, innerRef, handleClick, }) => {
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
React.createElement(SubmenusContainer, null, menu.submenu.map((submenu, sindex) => {
|
|
50
|
-
return (React.createElement(Submenu, { key: `${index}-${sindex}`, menu: submenu, handleClick: (i) => handleClick([index, sindex, ...i]) }));
|
|
51
|
-
}))))));
|
|
52
|
-
})));
|
|
26
|
+
return (_jsx(MenusContainer, { ref: innerRef, "data-cy": 'manuscript-menus', children: menus.map((menu, index) => {
|
|
27
|
+
return (_jsxs(MenuContainer, { "data-cy": 'menu', isEnabled: menu.isEnabled, children: [_jsx(MenuHeading, { onMouseDown: (e) => {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
handleClick([index]);
|
|
30
|
+
}, isOpen: menu.isOpen, children: _jsx(Text, { children: menu.label }) }), menu.isEnabled && menu.isOpen && menu.submenu && (_jsx(SubmenusContainerWrapper, { children: _jsx(SubmenusContainer, { children: menu.submenu.map((submenu, sindex) => {
|
|
31
|
+
return (_jsx(Submenu, { menu: submenu, handleClick: (i) => handleClick([index, sindex, ...i]) }, `${index}-${sindex}`));
|
|
32
|
+
}) }) }))] }, `menu-${index}`));
|
|
33
|
+
}) }));
|
|
53
34
|
};
|
|
@@ -1,19 +1,4 @@
|
|
|
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';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
2
|
import styled from 'styled-components';
|
|
18
3
|
const isMac = /Mac/.test(window.navigator.platform);
|
|
19
4
|
export const ShortcutContainer = styled.div `
|
|
@@ -49,9 +34,9 @@ const parts = (shortcut) => {
|
|
|
49
34
|
nodes.push(separator);
|
|
50
35
|
}
|
|
51
36
|
else {
|
|
52
|
-
nodes.push(
|
|
37
|
+
nodes.push(_jsx(Character, { children: part }, part));
|
|
53
38
|
}
|
|
54
39
|
}
|
|
55
40
|
return nodes;
|
|
56
41
|
};
|
|
57
|
-
export const Shortcut = ({ shortcut }) => (
|
|
42
|
+
export const Shortcut = ({ shortcut }) => (_jsx(ShortcutContainer, { children: parts(shortcut) }));
|
|
@@ -1,19 +1,4 @@
|
|
|
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';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
2
|
import styled from 'styled-components';
|
|
18
3
|
import { isMenuSeparator } from '../../lib/menus';
|
|
19
4
|
import { TriangleCollapsedIcon } from '../icons';
|
|
@@ -91,26 +76,20 @@ export const SubmenuLabel = ({ menu, handleClick }) => {
|
|
|
91
76
|
if (isMenuSeparator(menu)) {
|
|
92
77
|
return null;
|
|
93
78
|
}
|
|
94
|
-
return (
|
|
79
|
+
return (_jsxs(Container, { isOpen: menu.isOpen, "data-cy": 'submenu', className: menu.isEnabled ? '' : 'disabled', onMouseDown: (e) => {
|
|
95
80
|
e.preventDefault();
|
|
96
81
|
handleClick([]);
|
|
97
|
-
} },
|
|
98
|
-
React.createElement(Active, null, activeContent(menu)),
|
|
99
|
-
React.createElement(Text, null, menu.label),
|
|
100
|
-
menu.submenu && React.createElement(Arrow, null),
|
|
101
|
-
menu.shortcut && React.createElement(Shortcut, { shortcut: menu.shortcut })));
|
|
82
|
+
}, children: [_jsx(Active, { children: activeContent(menu) }), _jsx(Text, { children: menu.label }), menu.submenu && _jsx(Arrow, {}), menu.shortcut && _jsx(Shortcut, { shortcut: menu.shortcut })] }));
|
|
102
83
|
};
|
|
103
84
|
export const Submenu = ({ menu, handleClick }) => {
|
|
104
85
|
if (isMenuSeparator(menu)) {
|
|
105
|
-
return
|
|
86
|
+
return _jsx(Separator, {});
|
|
106
87
|
}
|
|
107
88
|
if (menu.component) {
|
|
108
|
-
return
|
|
89
|
+
return _jsx(menu.component, { menu: menu, handleClick: handleClick });
|
|
109
90
|
}
|
|
110
91
|
if (!menu.submenu) {
|
|
111
|
-
return
|
|
92
|
+
return _jsx(SubmenuLabel, { menu: menu, handleClick: handleClick });
|
|
112
93
|
}
|
|
113
|
-
return (
|
|
114
|
-
React.createElement(SubmenuLabel, { menu: menu, handleClick: handleClick }),
|
|
115
|
-
menu.submenu && menu.isOpen && (React.createElement(NestedSubmenusContainer, null, menu.submenu.map((submenu, index) => (React.createElement(Submenu, { key: `menu-${index}`, menu: submenu, handleClick: (i) => handleClick([index, ...i]) })))))));
|
|
94
|
+
return (_jsxs(SubmenuContainer, { "data-cy": 'submenu', children: [_jsx(SubmenuLabel, { menu: menu, handleClick: handleClick }), menu.submenu && menu.isOpen && (_jsx(NestedSubmenusContainer, { children: menu.submenu.map((submenu, index) => (_jsx(Submenu, { menu: submenu, handleClick: (i) => handleClick([index, ...i]) }, `menu-${index}`))) }))] }));
|
|
116
95
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
const Text = styled.p `
|
|
4
4
|
font: ${(props) => props.theme.font.weight.normal}
|
|
@@ -23,6 +23,4 @@ const MessageWrapper = styled.div `
|
|
|
23
23
|
transform: translate(-50%);
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
26
|
-
export const Message = ({ isCentered, icon: Icon, children, }) => (
|
|
27
|
-
Icon && React.createElement(Icon, null),
|
|
28
|
-
React.createElement(Text, null, children)));
|
|
26
|
+
export const Message = ({ isCentered, icon: Icon, children, }) => (_jsxs(MessageWrapper, { className: isCentered ? 'centered' : '', children: [Icon && _jsx(Icon, {}), _jsx(Text, { children: children })] }));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import { commonStyles } from './TextField';
|
|
4
5
|
const Container = styled.div `
|
|
@@ -114,9 +115,5 @@ export const MultiValueInput = ({ id, inputType, placeholder = '', initialValues
|
|
|
114
115
|
: inputType === 'number'
|
|
115
116
|
? 'Enter number and press enter'
|
|
116
117
|
: 'Enter text and press enter';
|
|
117
|
-
return (
|
|
118
|
-
values.map((value, index) => (React.createElement(Chip, { key: index },
|
|
119
|
-
value,
|
|
120
|
-
React.createElement(RemoveButton, { onMouseUp: () => handleRemoveValue(index) }, "\u00D7")))),
|
|
121
|
-
React.createElement(Input, { id: id, type: inputType, value: currentValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onBlur: handleBlur, placeholder: xplaceholder })));
|
|
118
|
+
return (_jsxs(Container, { children: [values.map((value, index) => (_jsxs(Chip, { children: [value, _jsx(RemoveButton, { onMouseUp: () => handleRemoveValue(index), children: "\u00D7" })] }, index))), _jsx(Input, { id: id, type: inputType, value: currentValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onBlur: handleBlur, placeholder: xplaceholder })] }));
|
|
122
119
|
};
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* © 2020 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';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
2
|
import { NavLink } from 'react-router-dom';
|
|
18
3
|
import styled, { css } from 'styled-components';
|
|
19
4
|
import { Badge } from './Badge';
|
|
@@ -121,7 +106,4 @@ export const NavDropdownButtonContainer = styled(SecondaryButton).attrs((props)
|
|
|
121
106
|
stroke: currentColor;
|
|
122
107
|
}
|
|
123
108
|
`;
|
|
124
|
-
export const NavDropdownButton = ({ as, children, disabled, isOpen, notificationsCount, onClick, removeChevron, }) => (
|
|
125
|
-
React.createElement(NavDropdownButtonText, null, children),
|
|
126
|
-
!!notificationsCount && (React.createElement(NotificationsBadge, { isOpen: isOpen }, notificationsCount)),
|
|
127
|
-
!removeChevron && React.createElement(NavDropdownToggle, { className: isOpen ? 'open' : '' })));
|
|
109
|
+
export const NavDropdownButton = ({ as, children, disabled, isOpen, notificationsCount, onClick, removeChevron, }) => (_jsxs(NavDropdownButtonContainer, { as: as, disabled: disabled, onClick: onClick, isOpen: isOpen, className: 'dropdown-toggle', children: [_jsx(NavDropdownButtonText, { children: children }), !!notificationsCount && (_jsx(NotificationsBadge, { isOpen: isOpen, children: notificationsCount })), !removeChevron && _jsx(NavDropdownToggle, { className: isOpen ? 'open' : '' })] }));
|
|
@@ -1,19 +1,4 @@
|
|
|
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';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
2
|
import styled from 'styled-components';
|
|
18
3
|
const Input = styled.input `
|
|
19
4
|
position: absolute;
|
|
@@ -61,6 +46,4 @@ const Input = styled.input `
|
|
|
61
46
|
}
|
|
62
47
|
}
|
|
63
48
|
`;
|
|
64
|
-
export const RadioButton = ({ checked, id, label, name, ...rest }) => (
|
|
65
|
-
React.createElement(Input, { checked: checked, type: "radio", name: name, id: id, ...rest }),
|
|
66
|
-
React.createElement("label", { htmlFor: id }, label)));
|
|
49
|
+
export const RadioButton = ({ checked, id, label, name, ...rest }) => (_jsxs(_Fragment, { children: [_jsx(Input, { checked: checked, type: "radio", name: name, id: id, ...rest }), _jsx("label", { htmlFor: id, children: label })] }));
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* © 2020 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';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
2
|
export const RelativeDate = ({ date, ...props }) => {
|
|
18
3
|
if (!date) {
|
|
19
4
|
return null;
|
|
@@ -26,7 +11,7 @@ export const RelativeDate = ({ date, ...props }) => {
|
|
|
26
11
|
let value;
|
|
27
12
|
let unit;
|
|
28
13
|
if (minutesAgo < 1) {
|
|
29
|
-
return
|
|
14
|
+
return _jsx("span", { ...props, children: "just now" });
|
|
30
15
|
}
|
|
31
16
|
else if (minutesAgo < HOUR) {
|
|
32
17
|
value = Math.round(minutesAgo);
|
|
@@ -40,5 +25,5 @@ export const RelativeDate = ({ date, ...props }) => {
|
|
|
40
25
|
value = Math.round(minutesAgo / DAY);
|
|
41
26
|
unit = 'day';
|
|
42
27
|
}
|
|
43
|
-
return
|
|
28
|
+
return _jsx("span", { ...props, children: formatter.format(-value, unit) });
|
|
44
29
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { ResizerButton } from './ResizerButton';
|
|
3
4
|
import { HorizontalEndResizerInner, HorizontalStartResizerInner, VerticalEndResizerInner, VerticalStartResizerInner, } from './ResizerInner';
|
|
@@ -96,7 +97,6 @@ export class Resizer extends React.Component {
|
|
|
96
97
|
render() {
|
|
97
98
|
const { buttonInner, direction, side } = this.props;
|
|
98
99
|
const ResizerInner = inners[direction][side];
|
|
99
|
-
return (
|
|
100
|
-
React.createElement(ResizerButton, { direction: direction, isCollapsed: this.props.collapsed, isVisible: this.state.isHovering, onClick: this.props.onResizeButton, side: side, buttonInner: buttonInner })));
|
|
100
|
+
return (_jsx(ResizerInner, { ref: this.resizerRef, onMouseDown: this.mouseDownHandler, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, children: _jsx(ResizerButton, { direction: direction, isCollapsed: this.props.collapsed, isVisible: this.state.isHovering, onClick: this.props.onResizeButton, side: side, buttonInner: buttonInner }) }));
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { HorizontalEndResizerButtonInner, HorizontalStartResizerButtonInner, VerticalEndResizerButtonInner, VerticalStartResizerButtonInner, } from './ResizerButtonInner';
|
|
3
4
|
const inners = {
|
|
@@ -14,7 +15,7 @@ export class ResizerButton extends React.PureComponent {
|
|
|
14
15
|
render() {
|
|
15
16
|
const { buttonInner, direction, side, isCollapsed, onClick, isVisible } = this.props;
|
|
16
17
|
const ResizerButtonInner = buttonInner || inners[direction][side];
|
|
17
|
-
return (
|
|
18
|
+
return (_jsx(ResizerButtonInner, { "aria-expanded": !isCollapsed, isCollapsed: isCollapsed, isVisible: isVisible, onClick: onClick, onMouseDown: (event) => event.preventDefault() }));
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
ResizerButton.defaultProps = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { EditorState } from 'prosemirror-state';
|
|
2
3
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
-
import
|
|
4
|
+
import { useEffect, useRef } from 'react';
|
|
4
5
|
import { parseRichText, schema } from './schema';
|
|
5
6
|
export const RichText = ({ className, value }) => {
|
|
6
7
|
const editorRef = useRef(null);
|
|
@@ -15,5 +16,5 @@ export const RichText = ({ className, value }) => {
|
|
|
15
16
|
});
|
|
16
17
|
editorRef.current && editorRef.current.replaceChildren(view.dom);
|
|
17
18
|
}, [value]);
|
|
18
|
-
return
|
|
19
|
+
return _jsx("div", { className: className, ref: editorRef });
|
|
19
20
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { baseKeymap, toggleMark } from 'prosemirror-commands';
|
|
2
3
|
import { history, redo, undo } from 'prosemirror-history';
|
|
3
4
|
import { keymap } from 'prosemirror-keymap';
|
|
4
5
|
import { EditorState } from 'prosemirror-state';
|
|
5
6
|
import { EditorView } from 'prosemirror-view';
|
|
6
|
-
import
|
|
7
|
+
import { useEffect, useRef } from 'react';
|
|
7
8
|
import styled from 'styled-components';
|
|
8
9
|
import { parseRichText, schema, serializeRichText } from './schema';
|
|
9
10
|
const Container = styled.div `
|
|
@@ -56,5 +57,5 @@ export const RichTextField = ({ value, onChange, }) => {
|
|
|
56
57
|
});
|
|
57
58
|
editorRef.current && editorRef.current.appendChild(view.dom);
|
|
58
59
|
}, [value, onChange]);
|
|
59
|
-
return
|
|
60
|
+
return _jsx(Container, { ref: editorRef });
|
|
60
61
|
};
|
|
@@ -1,42 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
* © 2020 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';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
2
|
import styled from 'styled-components';
|
|
18
3
|
import { AttentionRedIcon, SaveStatusOfflineIcon, SaveStatusSavedIcon, SaveStatusSavingIcon, } from './icons';
|
|
19
4
|
export const SaveStatus = ({ status }) => {
|
|
20
5
|
switch (status) {
|
|
21
6
|
case 'offline':
|
|
22
|
-
return (
|
|
23
|
-
React.createElement(SaveStatusOfflineIcon, null),
|
|
24
|
-
React.createElement(Text, null, "Offline")));
|
|
7
|
+
return (_jsxs(Container, { children: [_jsx(SaveStatusOfflineIcon, {}), _jsx(Text, { children: "Offline" })] }));
|
|
25
8
|
case 'saving':
|
|
26
|
-
return (
|
|
27
|
-
React.createElement(RotateContinuous, null,
|
|
28
|
-
React.createElement(SaveStatusSavingIcon, null)),
|
|
29
|
-
React.createElement(Text, null, "Saving\u2026")));
|
|
9
|
+
return (_jsxs(Container, { children: [_jsx(RotateContinuous, { children: _jsx(SaveStatusSavingIcon, {}) }), _jsx(Text, { children: "Saving\u2026" })] }));
|
|
30
10
|
case 'saved':
|
|
31
|
-
return (
|
|
32
|
-
React.createElement(PopPop, null,
|
|
33
|
-
React.createElement(SaveStatusSavedIcon, null)),
|
|
34
|
-
React.createElement(Text, null, "Saved")));
|
|
11
|
+
return (_jsxs(Container, { children: [_jsx(PopPop, { children: _jsx(SaveStatusSavedIcon, {}) }), _jsx(Text, { children: "Saved" })] }));
|
|
35
12
|
case 'failed':
|
|
36
|
-
return (
|
|
37
|
-
React.createElement(PopPop, null,
|
|
38
|
-
React.createElement(AttentionRedIcon, null)),
|
|
39
|
-
React.createElement(FailedText, null, "Failed To Save")));
|
|
13
|
+
return (_jsxs(FailedContainer, { children: [_jsx(PopPop, { children: _jsx(AttentionRedIcon, {}) }), _jsx(FailedText, { children: "Failed To Save" })] }));
|
|
40
14
|
default:
|
|
41
15
|
return null;
|
|
42
16
|
}
|
|
@@ -1,18 +1,3 @@
|
|
|
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 React from 'react';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
2
|
import Select from 'react-select';
|
|
18
|
-
export const SelectField = ({ id, options, field, form, }) => (
|
|
3
|
+
export const SelectField = ({ id, options, field, form, }) => (_jsx(Select, { inputId: id, options: options, name: field.name, classNamePrefix: field.name, value: options?.find((option) => option.value === field.value), onChange: (option) => form.setFieldValue(field.name, option?.value), onBlur: field.onBlur }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
const BoxContainer = styled.div `
|
|
4
4
|
border: 1px solid ${(props) => props.theme.colors.border.tertiary};
|
|
@@ -54,9 +54,6 @@ const RemoveButton = styled.button `
|
|
|
54
54
|
font-weight: ${(props) => props.theme.font.weight.light};
|
|
55
55
|
`;
|
|
56
56
|
export const SelectedItemsBox = ({ items, onRemove, placeholder = 'No items selected', ...props }) => {
|
|
57
|
-
return (
|
|
58
|
-
item.label,
|
|
59
|
-
React.createElement(RemoveButton, { onClick: () => onRemove(item.id), "aria-label": `Remove ${item.label}` }, "x")))))) : (React.createElement(EmptyContainer, null,
|
|
60
|
-
React.createElement(Placeholder, null, placeholder)))));
|
|
57
|
+
return (_jsx(BoxContainer, { ...props, children: items.length > 0 ? (_jsx(ItemsList, { children: items.map((item) => (_jsxs(Item, { "data-cy": "item", children: [item.label, _jsx(RemoveButton, { onClick: () => onRemove(item.id), "aria-label": `Remove ${item.label}`, children: "x" })] }, item.id))) })) : (_jsx(EmptyContainer, { children: _jsx(Placeholder, { children: placeholder }) })) }));
|
|
61
58
|
};
|
|
62
59
|
export default SelectedItemsBox;
|